summaryrefslogtreecommitdiff
path: root/shaders
diff options
context:
space:
mode:
Diffstat (limited to 'shaders')
-rw-r--r--shaders/skia/1-1.shader_test52
-rw-r--r--shaders/skia/1-10.shader_test75
-rw-r--r--shaders/skia/1-1066.shader_test32
-rw-r--r--shaders/skia/1-1073.shader_test40
-rw-r--r--shaders/skia/1-108.shader_test46
-rw-r--r--shaders/skia/1-121.shader_test63
-rw-r--r--shaders/skia/1-132.shader_test34
-rw-r--r--shaders/skia/1-14.shader_test36
-rw-r--r--shaders/skia/1-140.shader_test22
-rw-r--r--shaders/skia/1-145.shader_test76
-rw-r--r--shaders/skia/1-148.shader_test86
-rw-r--r--shaders/skia/1-149.shader_test92
-rw-r--r--shaders/skia/1-150.shader_test80
-rw-r--r--shaders/skia/1-153.shader_test44
-rw-r--r--shaders/skia/1-158.shader_test77
-rw-r--r--shaders/skia/1-159.shader_test139
-rw-r--r--shaders/skia/1-164.shader_test128
-rw-r--r--shaders/skia/1-172.shader_test72
-rw-r--r--shaders/skia/1-178.shader_test55
-rw-r--r--shaders/skia/1-179.shader_test62
-rw-r--r--shaders/skia/1-181.shader_test42
-rw-r--r--shaders/skia/1-196.shader_test39
-rw-r--r--shaders/skia/1-2.shader_test46
-rw-r--r--shaders/skia/1-20.shader_test67
-rw-r--r--shaders/skia/1-203.shader_test59
-rw-r--r--shaders/skia/1-21.shader_test42
-rw-r--r--shaders/skia/1-227.shader_test92
-rw-r--r--shaders/skia/1-23.shader_test63
-rw-r--r--shaders/skia/1-247.shader_test36
-rw-r--r--shaders/skia/1-25.shader_test85
-rw-r--r--shaders/skia/1-255.shader_test76
-rw-r--r--shaders/skia/1-258.shader_test75
-rw-r--r--shaders/skia/1-26.shader_test42
-rw-r--r--shaders/skia/1-269.shader_test93
-rw-r--r--shaders/skia/1-27.shader_test57
-rw-r--r--shaders/skia/1-28.shader_test35
-rw-r--r--shaders/skia/1-289.shader_test77
-rw-r--r--shaders/skia/1-299.shader_test64
-rw-r--r--shaders/skia/1-31.shader_test48
-rw-r--r--shaders/skia/1-336.shader_test60
-rw-r--r--shaders/skia/1-379.shader_test94
-rw-r--r--shaders/skia/1-382.shader_test109
-rw-r--r--shaders/skia/1-384.shader_test98
-rw-r--r--shaders/skia/1-385.shader_test107
-rw-r--r--shaders/skia/1-387.shader_test96
-rw-r--r--shaders/skia/1-388.shader_test110
-rw-r--r--shaders/skia/1-397.shader_test92
-rw-r--r--shaders/skia/1-398.shader_test108
-rw-r--r--shaders/skia/1-4.shader_test31
-rw-r--r--shaders/skia/1-403.shader_test147
-rw-r--r--shaders/skia/1-404.shader_test163
-rw-r--r--shaders/skia/1-405.shader_test94
-rw-r--r--shaders/skia/1-408.shader_test87
-rw-r--r--shaders/skia/1-41.shader_test41
-rw-r--r--shaders/skia/1-411.shader_test86
-rw-r--r--shaders/skia/1-412.shader_test102
-rw-r--r--shaders/skia/1-413.shader_test65
-rw-r--r--shaders/skia/1-414.shader_test81
-rw-r--r--shaders/skia/1-442.shader_test41
-rw-r--r--shaders/skia/1-443.shader_test46
-rw-r--r--shaders/skia/1-446.shader_test74
-rw-r--r--shaders/skia/1-453.shader_test58
-rw-r--r--shaders/skia/1-476.shader_test88
-rw-r--r--shaders/skia/1-492.shader_test45
-rw-r--r--shaders/skia/1-5.shader_test35
-rw-r--r--shaders/skia/1-503.shader_test103
-rw-r--r--shaders/skia/1-508.shader_test67
-rw-r--r--shaders/skia/1-510.shader_test81
-rw-r--r--shaders/skia/1-556.shader_test57
-rw-r--r--shaders/skia/1-575.shader_test51
-rw-r--r--shaders/skia/1-596.shader_test66
-rw-r--r--shaders/skia/1-597.shader_test96
-rw-r--r--shaders/skia/1-62.shader_test56
-rw-r--r--shaders/skia/1-625.shader_test82
-rw-r--r--shaders/skia/1-626.shader_test106
-rw-r--r--shaders/skia/1-63.shader_test79
-rw-r--r--shaders/skia/1-632.shader_test65
-rw-r--r--shaders/skia/1-638.shader_test27
-rw-r--r--shaders/skia/1-65.shader_test75
-rw-r--r--shaders/skia/1-650.shader_test61
-rw-r--r--shaders/skia/1-651.shader_test81
-rw-r--r--shaders/skia/1-66.shader_test38
-rw-r--r--shaders/skia/1-671.shader_test52
-rw-r--r--shaders/skia/1-677.shader_test40
-rw-r--r--shaders/skia/1-680.shader_test52
-rw-r--r--shaders/skia/1-681.shader_test57
-rw-r--r--shaders/skia/1-7.shader_test66
-rw-r--r--shaders/skia/1-703.shader_test67
-rw-r--r--shaders/skia/1-705.shader_test50
-rw-r--r--shaders/skia/1-725.shader_test51
-rw-r--r--shaders/skia/1-73.shader_test51
-rw-r--r--shaders/skia/1-733.shader_test31
-rw-r--r--shaders/skia/1-736.shader_test125
-rw-r--r--shaders/skia/1-737.shader_test74
-rw-r--r--shaders/skia/1-760.shader_test85
-rw-r--r--shaders/skia/1-780.shader_test33
-rw-r--r--shaders/skia/1-8.shader_test55
-rw-r--r--shaders/skia/1-80.shader_test42
-rw-r--r--shaders/skia/1-803.shader_test54
-rw-r--r--shaders/skia/1-81.shader_test75
-rw-r--r--shaders/skia/1-831.shader_test37
-rw-r--r--shaders/skia/1-834.shader_test48
-rw-r--r--shaders/skia/1-844.shader_test62
-rw-r--r--shaders/skia/1-850.shader_test43
-rw-r--r--shaders/skia/1-854.shader_test48
-rw-r--r--shaders/skia/1-855.shader_test37
-rw-r--r--shaders/skia/1-856.shader_test51
-rw-r--r--shaders/skia/1-857.shader_test39
-rw-r--r--shaders/skia/1-860.shader_test43
-rw-r--r--shaders/skia/1-88.shader_test80
-rw-r--r--shaders/skia/1-888.shader_test26
-rw-r--r--shaders/skia/1-91.shader_test58
-rw-r--r--shaders/skia/1.shader_test31
-rw-r--r--shaders/skia/10-1.shader_test126
-rw-r--r--shaders/skia/10-105.shader_test32
-rw-r--r--shaders/skia/10-109.shader_test33
-rw-r--r--shaders/skia/10-115.shader_test54
-rw-r--r--shaders/skia/10-12.shader_test33
-rw-r--r--shaders/skia/10-120.shader_test46
-rw-r--r--shaders/skia/10-121.shader_test41
-rw-r--r--shaders/skia/10-122.shader_test79
-rw-r--r--shaders/skia/10-123.shader_test158
-rw-r--r--shaders/skia/10-124.shader_test51
-rw-r--r--shaders/skia/10-126.shader_test198
-rw-r--r--shaders/skia/10-129.shader_test64
-rw-r--r--shaders/skia/10-133.shader_test137
-rw-r--r--shaders/skia/10-134.shader_test86
-rw-r--r--shaders/skia/10-136.shader_test53
-rw-r--r--shaders/skia/10-14.shader_test56
-rw-r--r--shaders/skia/10-140.shader_test43
-rw-r--r--shaders/skia/10-141.shader_test66
-rw-r--r--shaders/skia/10-148.shader_test123
-rw-r--r--shaders/skia/10-149.shader_test106
-rw-r--r--shaders/skia/10-15.shader_test30
-rw-r--r--shaders/skia/10-152.shader_test73
-rw-r--r--shaders/skia/10-161.shader_test90
-rw-r--r--shaders/skia/10-163.shader_test319
-rw-r--r--shaders/skia/10-18.shader_test63
-rw-r--r--shaders/skia/10-184.shader_test92
-rw-r--r--shaders/skia/10-187.shader_test91
-rw-r--r--shaders/skia/10-19.shader_test93
-rw-r--r--shaders/skia/10-190.shader_test62
-rw-r--r--shaders/skia/10-192.shader_test96
-rw-r--r--shaders/skia/10-193.shader_test82
-rw-r--r--shaders/skia/10-194.shader_test79
-rw-r--r--shaders/skia/10-195.shader_test111
-rw-r--r--shaders/skia/10-196.shader_test97
-rw-r--r--shaders/skia/10-197.shader_test77
-rw-r--r--shaders/skia/10-198.shader_test109
-rw-r--r--shaders/skia/10-199.shader_test95
-rw-r--r--shaders/skia/10-2.shader_test66
-rw-r--r--shaders/skia/10-201.shader_test112
-rw-r--r--shaders/skia/10-202.shader_test98
-rw-r--r--shaders/skia/10-206.shader_test105
-rw-r--r--shaders/skia/10-207.shader_test121
-rw-r--r--shaders/skia/10-208.shader_test84
-rw-r--r--shaders/skia/10-209.shader_test100
-rw-r--r--shaders/skia/10-224.shader_test106
-rw-r--r--shaders/skia/10-225.shader_test57
-rw-r--r--shaders/skia/10-23.shader_test33
-rw-r--r--shaders/skia/10-233.shader_test81
-rw-r--r--shaders/skia/10-238.shader_test67
-rw-r--r--shaders/skia/10-239.shader_test84
-rw-r--r--shaders/skia/10-241.shader_test56
-rw-r--r--shaders/skia/10-250.shader_test52
-rw-r--r--shaders/skia/10-254.shader_test84
-rw-r--r--shaders/skia/10-257.shader_test82
-rw-r--r--shaders/skia/10-259.shader_test88
-rw-r--r--shaders/skia/10-263.shader_test97
-rw-r--r--shaders/skia/10-264.shader_test118
-rw-r--r--shaders/skia/10-27.shader_test107
-rw-r--r--shaders/skia/10-28.shader_test166
-rw-r--r--shaders/skia/10-282.shader_test110
-rw-r--r--shaders/skia/10-284.shader_test75
-rw-r--r--shaders/skia/10-285.shader_test89
-rw-r--r--shaders/skia/10-287.shader_test68
-rw-r--r--shaders/skia/10-288.shader_test29
-rw-r--r--shaders/skia/10-290.shader_test113
-rw-r--r--shaders/skia/10-30.shader_test68
-rw-r--r--shaders/skia/10-306.shader_test101
-rw-r--r--shaders/skia/10-307.shader_test55
-rw-r--r--shaders/skia/10-308.shader_test67
-rw-r--r--shaders/skia/10-31.shader_test59
-rw-r--r--shaders/skia/10-325.shader_test38
-rw-r--r--shaders/skia/10-326.shader_test38
-rw-r--r--shaders/skia/10-328.shader_test153
-rw-r--r--shaders/skia/10-33.shader_test52
-rw-r--r--shaders/skia/10-346.shader_test71
-rw-r--r--shaders/skia/10-351.shader_test46
-rw-r--r--shaders/skia/10-359.shader_test55
-rw-r--r--shaders/skia/10-36.shader_test90
-rw-r--r--shaders/skia/10-365.shader_test108
-rw-r--r--shaders/skia/10-366.shader_test51
-rw-r--r--shaders/skia/10-37.shader_test102
-rw-r--r--shaders/skia/10-376.shader_test36
-rw-r--r--shaders/skia/10-38.shader_test67
-rw-r--r--shaders/skia/10-40.shader_test42
-rw-r--r--shaders/skia/10-42.shader_test53
-rw-r--r--shaders/skia/10-46.shader_test73
-rw-r--r--shaders/skia/10-47.shader_test92
-rw-r--r--shaders/skia/10-52.shader_test67
-rw-r--r--shaders/skia/10-54.shader_test55
-rw-r--r--shaders/skia/10-6.shader_test50
-rw-r--r--shaders/skia/10-63.shader_test86
-rw-r--r--shaders/skia/10-65.shader_test151
-rw-r--r--shaders/skia/10-68.shader_test127
-rw-r--r--shaders/skia/10-7.shader_test94
-rw-r--r--shaders/skia/10-70.shader_test47
-rw-r--r--shaders/skia/10-73.shader_test81
-rw-r--r--shaders/skia/10-76.shader_test77
-rw-r--r--shaders/skia/10-78.shader_test81
-rw-r--r--shaders/skia/10-8.shader_test63
-rw-r--r--shaders/skia/10-85.shader_test31
-rw-r--r--shaders/skia/10-86.shader_test30
-rw-r--r--shaders/skia/10-9.shader_test78
-rw-r--r--shaders/skia/10-95.shader_test40
-rw-r--r--shaders/skia/10-96.shader_test80
-rw-r--r--shaders/skia/10-98.shader_test106
-rw-r--r--shaders/skia/10.shader_test62
-rw-r--r--shaders/skia/100-1.shader_test123
-rw-r--r--shaders/skia/100-10.shader_test98
-rw-r--r--shaders/skia/100-18.shader_test207
-rw-r--r--shaders/skia/100-19.shader_test51
-rw-r--r--shaders/skia/100-20.shader_test70
-rw-r--r--shaders/skia/100-3.shader_test132
-rw-r--r--shaders/skia/100-5.shader_test56
-rw-r--r--shaders/skia/100-6.shader_test48
-rw-r--r--shaders/skia/100-7.shader_test82
-rw-r--r--shaders/skia/100-8.shader_test44
-rw-r--r--shaders/skia/100-9.shader_test140
-rw-r--r--shaders/skia/100.shader_test68
-rw-r--r--shaders/skia/1000-1.shader_test87
-rw-r--r--shaders/skia/1003-1.shader_test113
-rw-r--r--shaders/skia/1003.shader_test284
-rw-r--r--shaders/skia/1006-1.shader_test127
-rw-r--r--shaders/skia/1006.shader_test57
-rw-r--r--shaders/skia/1009-1.shader_test90
-rw-r--r--shaders/skia/1009.shader_test375
-rw-r--r--shaders/skia/1015-1.shader_test89
-rw-r--r--shaders/skia/1018-1.shader_test116
-rw-r--r--shaders/skia/1018.shader_test79
-rw-r--r--shaders/skia/1021-1.shader_test114
-rw-r--r--shaders/skia/1021.shader_test87
-rw-r--r--shaders/skia/1024-1.shader_test135
-rw-r--r--shaders/skia/1024.shader_test50
-rw-r--r--shaders/skia/1027-1.shader_test99
-rw-r--r--shaders/skia/1027.shader_test82
-rw-r--r--shaders/skia/103-15.shader_test322
-rw-r--r--shaders/skia/103-16.shader_test51
-rw-r--r--shaders/skia/103-17.shader_test74
-rw-r--r--shaders/skia/103-2.shader_test61
-rw-r--r--shaders/skia/103-4.shader_test69
-rw-r--r--shaders/skia/103-5.shader_test86
-rw-r--r--shaders/skia/103-6.shader_test41
-rw-r--r--shaders/skia/103-7.shader_test140
-rw-r--r--shaders/skia/103-8.shader_test98
-rw-r--r--shaders/skia/103.shader_test127
-rw-r--r--shaders/skia/1030.shader_test26
-rw-r--r--shaders/skia/1033.shader_test329
-rw-r--r--shaders/skia/1039.shader_test421
-rw-r--r--shaders/skia/1042.shader_test164
-rw-r--r--shaders/skia/1045.shader_test93
-rw-r--r--shaders/skia/1048.shader_test87
-rw-r--r--shaders/skia/1051.shader_test880
-rw-r--r--shaders/skia/1054.shader_test50
-rw-r--r--shaders/skia/106-1.shader_test90
-rw-r--r--shaders/skia/106-14.shader_test52
-rw-r--r--shaders/skia/106-15.shader_test51
-rw-r--r--shaders/skia/106-2.shader_test152
-rw-r--r--shaders/skia/106-4.shader_test51
-rw-r--r--shaders/skia/106-5.shader_test81
-rw-r--r--shaders/skia/106-6.shader_test140
-rw-r--r--shaders/skia/106-7.shader_test101
-rw-r--r--shaders/skia/106.shader_test138
-rw-r--r--shaders/skia/1060.shader_test65
-rw-r--r--shaders/skia/1063.shader_test27
-rw-r--r--shaders/skia/1069.shader_test257
-rw-r--r--shaders/skia/1072.shader_test65
-rw-r--r--shaders/skia/1075.shader_test160
-rw-r--r--shaders/skia/1078.shader_test25
-rw-r--r--shaders/skia/1081.shader_test53
-rw-r--r--shaders/skia/1084.shader_test40
-rw-r--r--shaders/skia/109-14.shader_test31
-rw-r--r--shaders/skia/109-15.shader_test51
-rw-r--r--shaders/skia/109-16.shader_test67
-rw-r--r--shaders/skia/109-17.shader_test44
-rw-r--r--shaders/skia/109-2.shader_test81
-rw-r--r--shaders/skia/109-4.shader_test71
-rw-r--r--shaders/skia/109-5.shader_test85
-rw-r--r--shaders/skia/109-6.shader_test140
-rw-r--r--shaders/skia/109-7.shader_test98
-rw-r--r--shaders/skia/109.shader_test112
-rw-r--r--shaders/skia/1090.shader_test96
-rw-r--r--shaders/skia/1093.shader_test45
-rw-r--r--shaders/skia/1099.shader_test232
-rw-r--r--shaders/skia/1105.shader_test85
-rw-r--r--shaders/skia/1108.shader_test59
-rw-r--r--shaders/skia/1111.shader_test206
-rw-r--r--shaders/skia/1114.shader_test627
-rw-r--r--shaders/skia/1117.shader_test216
-rw-r--r--shaders/skia/112-1.shader_test68
-rw-r--r--shaders/skia/112-14.shader_test156
-rw-r--r--shaders/skia/112-15.shader_test51
-rw-r--r--shaders/skia/112-16.shader_test77
-rw-r--r--shaders/skia/112-17.shader_test41
-rw-r--r--shaders/skia/112-2.shader_test145
-rw-r--r--shaders/skia/112-4.shader_test52
-rw-r--r--shaders/skia/112-5.shader_test89
-rw-r--r--shaders/skia/112-6.shader_test140
-rw-r--r--shaders/skia/112-7.shader_test98
-rw-r--r--shaders/skia/112.shader_test141
-rw-r--r--shaders/skia/1123.shader_test209
-rw-r--r--shaders/skia/1126.shader_test35
-rw-r--r--shaders/skia/1129.shader_test429
-rw-r--r--shaders/skia/1132.shader_test65
-rw-r--r--shaders/skia/1135.shader_test263
-rw-r--r--shaders/skia/1138.shader_test261
-rw-r--r--shaders/skia/1141.shader_test674
-rw-r--r--shaders/skia/1144.shader_test44
-rw-r--r--shaders/skia/1147.shader_test189
-rw-r--r--shaders/skia/115-1.shader_test68
-rw-r--r--shaders/skia/115-14.shader_test131
-rw-r--r--shaders/skia/115-15.shader_test51
-rw-r--r--shaders/skia/115-2.shader_test68
-rw-r--r--shaders/skia/115-4.shader_test111
-rw-r--r--shaders/skia/115-5.shader_test75
-rw-r--r--shaders/skia/115-6.shader_test138
-rw-r--r--shaders/skia/115-7.shader_test98
-rw-r--r--shaders/skia/115.shader_test59
-rw-r--r--shaders/skia/1150.shader_test96
-rw-r--r--shaders/skia/1153.shader_test435
-rw-r--r--shaders/skia/1156.shader_test309
-rw-r--r--shaders/skia/1159.shader_test42
-rw-r--r--shaders/skia/1162.shader_test207
-rw-r--r--shaders/skia/1168.shader_test30
-rw-r--r--shaders/skia/1171.shader_test56
-rw-r--r--shaders/skia/1174.shader_test159
-rw-r--r--shaders/skia/1177.shader_test31
-rw-r--r--shaders/skia/118-15.shader_test51
-rw-r--r--shaders/skia/118-2.shader_test165
-rw-r--r--shaders/skia/118-4.shader_test84
-rw-r--r--shaders/skia/118-5.shader_test79
-rw-r--r--shaders/skia/118-6.shader_test138
-rw-r--r--shaders/skia/118-7.shader_test98
-rw-r--r--shaders/skia/118.shader_test119
-rw-r--r--shaders/skia/1180.shader_test101
-rw-r--r--shaders/skia/1183.shader_test153
-rw-r--r--shaders/skia/1189.shader_test28
-rw-r--r--shaders/skia/1192.shader_test210
-rw-r--r--shaders/skia/1195.shader_test27
-rw-r--r--shaders/skia/1198.shader_test105
-rw-r--r--shaders/skia/1204.shader_test366
-rw-r--r--shaders/skia/1207.shader_test75
-rw-r--r--shaders/skia/121-14.shader_test215
-rw-r--r--shaders/skia/121-15.shader_test51
-rw-r--r--shaders/skia/121-16.shader_test49
-rw-r--r--shaders/skia/121-2.shader_test88
-rw-r--r--shaders/skia/121-4.shader_test51
-rw-r--r--shaders/skia/121-5.shader_test89
-rw-r--r--shaders/skia/121-6.shader_test138
-rw-r--r--shaders/skia/121-7.shader_test98
-rw-r--r--shaders/skia/121.shader_test119
-rw-r--r--shaders/skia/1210.shader_test88
-rw-r--r--shaders/skia/1213.shader_test308
-rw-r--r--shaders/skia/1216.shader_test224
-rw-r--r--shaders/skia/1222.shader_test198
-rw-r--r--shaders/skia/1225.shader_test21
-rw-r--r--shaders/skia/1228.shader_test36
-rw-r--r--shaders/skia/1231.shader_test137
-rw-r--r--shaders/skia/1234.shader_test198
-rw-r--r--shaders/skia/1237.shader_test322
-rw-r--r--shaders/skia/124-14.shader_test92
-rw-r--r--shaders/skia/124-15.shader_test51
-rw-r--r--shaders/skia/124-16.shader_test63
-rw-r--r--shaders/skia/124-2.shader_test132
-rw-r--r--shaders/skia/124-4.shader_test30
-rw-r--r--shaders/skia/124-5.shader_test78
-rw-r--r--shaders/skia/124-6.shader_test138
-rw-r--r--shaders/skia/124-7.shader_test98
-rw-r--r--shaders/skia/124.shader_test141
-rw-r--r--shaders/skia/1240.shader_test220
-rw-r--r--shaders/skia/1243.shader_test339
-rw-r--r--shaders/skia/1246.shader_test157
-rw-r--r--shaders/skia/1249.shader_test138
-rw-r--r--shaders/skia/1252.shader_test136
-rw-r--r--shaders/skia/1255.shader_test306
-rw-r--r--shaders/skia/1258.shader_test54
-rw-r--r--shaders/skia/1261.shader_test42
-rw-r--r--shaders/skia/1264.shader_test46
-rw-r--r--shaders/skia/1267.shader_test485
-rw-r--r--shaders/skia/127-1.shader_test78
-rw-r--r--shaders/skia/127-14.shader_test86
-rw-r--r--shaders/skia/127-15.shader_test51
-rw-r--r--shaders/skia/127-16.shader_test60
-rw-r--r--shaders/skia/127-2.shader_test61
-rw-r--r--shaders/skia/127-4.shader_test68
-rw-r--r--shaders/skia/127-5.shader_test82
-rw-r--r--shaders/skia/127-6.shader_test138
-rw-r--r--shaders/skia/127-7.shader_test98
-rw-r--r--shaders/skia/127.shader_test141
-rw-r--r--shaders/skia/1270.shader_test353
-rw-r--r--shaders/skia/1273.shader_test29
-rw-r--r--shaders/skia/1276.shader_test46
-rw-r--r--shaders/skia/1279.shader_test134
-rw-r--r--shaders/skia/1282.shader_test134
-rw-r--r--shaders/skia/1285.shader_test253
-rw-r--r--shaders/skia/1288.shader_test168
-rw-r--r--shaders/skia/1291.shader_test272
-rw-r--r--shaders/skia/1294.shader_test316
-rw-r--r--shaders/skia/1297.shader_test492
-rw-r--r--shaders/skia/13-1.shader_test118
-rw-r--r--shaders/skia/13-100.shader_test137
-rw-r--r--shaders/skia/13-101.shader_test67
-rw-r--r--shaders/skia/13-11.shader_test55
-rw-r--r--shaders/skia/13-110.shader_test116
-rw-r--r--shaders/skia/13-113.shader_test123
-rw-r--r--shaders/skia/13-116.shader_test58
-rw-r--r--shaders/skia/13-121.shader_test90
-rw-r--r--shaders/skia/13-126.shader_test318
-rw-r--r--shaders/skia/13-127.shader_test63
-rw-r--r--shaders/skia/13-13.shader_test63
-rw-r--r--shaders/skia/13-135.shader_test61
-rw-r--r--shaders/skia/13-136.shader_test72
-rw-r--r--shaders/skia/13-14.shader_test37
-rw-r--r--shaders/skia/13-140.shader_test111
-rw-r--r--shaders/skia/13-144.shader_test117
-rw-r--r--shaders/skia/13-145.shader_test80
-rw-r--r--shaders/skia/13-146.shader_test85
-rw-r--r--shaders/skia/13-147.shader_test132
-rw-r--r--shaders/skia/13-148.shader_test95
-rw-r--r--shaders/skia/13-149.shader_test100
-rw-r--r--shaders/skia/13-150.shader_test130
-rw-r--r--shaders/skia/13-151.shader_test93
-rw-r--r--shaders/skia/13-152.shader_test98
-rw-r--r--shaders/skia/13-153.shader_test133
-rw-r--r--shaders/skia/13-154.shader_test96
-rw-r--r--shaders/skia/13-155.shader_test101
-rw-r--r--shaders/skia/13-157.shader_test98
-rw-r--r--shaders/skia/13-159.shader_test116
-rw-r--r--shaders/skia/13-160.shader_test132
-rw-r--r--shaders/skia/13-161.shader_test95
-rw-r--r--shaders/skia/13-162.shader_test111
-rw-r--r--shaders/skia/13-169.shader_test41
-rw-r--r--shaders/skia/13-17.shader_test64
-rw-r--r--shaders/skia/13-170.shader_test38
-rw-r--r--shaders/skia/13-174.shader_test97
-rw-r--r--shaders/skia/13-175.shader_test64
-rw-r--r--shaders/skia/13-176.shader_test50
-rw-r--r--shaders/skia/13-177.shader_test64
-rw-r--r--shaders/skia/13-180.shader_test86
-rw-r--r--shaders/skia/13-185.shader_test35
-rw-r--r--shaders/skia/13-186.shader_test80
-rw-r--r--shaders/skia/13-187.shader_test56
-rw-r--r--shaders/skia/13-190.shader_test45
-rw-r--r--shaders/skia/13-197.shader_test66
-rw-r--r--shaders/skia/13-2.shader_test66
-rw-r--r--shaders/skia/13-200.shader_test85
-rw-r--r--shaders/skia/13-201.shader_test56
-rw-r--r--shaders/skia/13-202.shader_test106
-rw-r--r--shaders/skia/13-203.shader_test88
-rw-r--r--shaders/skia/13-205.shader_test124
-rw-r--r--shaders/skia/13-209.shader_test55
-rw-r--r--shaders/skia/13-21.shader_test43
-rw-r--r--shaders/skia/13-211.shader_test59
-rw-r--r--shaders/skia/13-22.shader_test158
-rw-r--r--shaders/skia/13-220.shader_test93
-rw-r--r--shaders/skia/13-222.shader_test102
-rw-r--r--shaders/skia/13-225.shader_test84
-rw-r--r--shaders/skia/13-227.shader_test139
-rw-r--r--shaders/skia/13-23.shader_test57
-rw-r--r--shaders/skia/13-236.shader_test123
-rw-r--r--shaders/skia/13-237.shader_test129
-rw-r--r--shaders/skia/13-253.shader_test42
-rw-r--r--shaders/skia/13-254.shader_test52
-rw-r--r--shaders/skia/13-256.shader_test130
-rw-r--r--shaders/skia/13-262.shader_test77
-rw-r--r--shaders/skia/13-269.shader_test98
-rw-r--r--shaders/skia/13-274.shader_test56
-rw-r--r--shaders/skia/13-28.shader_test90
-rw-r--r--shaders/skia/13-284.shader_test46
-rw-r--r--shaders/skia/13-285.shader_test109
-rw-r--r--shaders/skia/13-29.shader_test90
-rw-r--r--shaders/skia/13-3.shader_test52
-rw-r--r--shaders/skia/13-32.shader_test47
-rw-r--r--shaders/skia/13-37.shader_test69
-rw-r--r--shaders/skia/13-38.shader_test78
-rw-r--r--shaders/skia/13-39.shader_test163
-rw-r--r--shaders/skia/13-41.shader_test59
-rw-r--r--shaders/skia/13-49.shader_test80
-rw-r--r--shaders/skia/13-5.shader_test50
-rw-r--r--shaders/skia/13-50.shader_test66
-rw-r--r--shaders/skia/13-51.shader_test50
-rw-r--r--shaders/skia/13-55.shader_test86
-rw-r--r--shaders/skia/13-58.shader_test46
-rw-r--r--shaders/skia/13-68.shader_test92
-rw-r--r--shaders/skia/13-69.shader_test114
-rw-r--r--shaders/skia/13-7.shader_test63
-rw-r--r--shaders/skia/13-71.shader_test91
-rw-r--r--shaders/skia/13-8.shader_test45
-rw-r--r--shaders/skia/13-82.shader_test41
-rw-r--r--shaders/skia/13-83.shader_test41
-rw-r--r--shaders/skia/13-9.shader_test76
-rw-r--r--shaders/skia/13-90.shader_test44
-rw-r--r--shaders/skia/13-91.shader_test89
-rw-r--r--shaders/skia/13-93.shader_test143
-rw-r--r--shaders/skia/13-95.shader_test145
-rw-r--r--shaders/skia/13.shader_test42
-rw-r--r--shaders/skia/130-1.shader_test68
-rw-r--r--shaders/skia/130-14.shader_test82
-rw-r--r--shaders/skia/130-15.shader_test116
-rw-r--r--shaders/skia/130-2.shader_test152
-rw-r--r--shaders/skia/130-4.shader_test62
-rw-r--r--shaders/skia/130-5.shader_test92
-rw-r--r--shaders/skia/130-6.shader_test138
-rw-r--r--shaders/skia/130-7.shader_test98
-rw-r--r--shaders/skia/130.shader_test152
-rw-r--r--shaders/skia/1300.shader_test38
-rw-r--r--shaders/skia/1306.shader_test43
-rw-r--r--shaders/skia/1309.shader_test149
-rw-r--r--shaders/skia/1312.shader_test101
-rw-r--r--shaders/skia/1315.shader_test126
-rw-r--r--shaders/skia/1318.shader_test183
-rw-r--r--shaders/skia/1327.shader_test361
-rw-r--r--shaders/skia/133-13.shader_test125
-rw-r--r--shaders/skia/133-14.shader_test74
-rw-r--r--shaders/skia/133-15.shader_test83
-rw-r--r--shaders/skia/133-16.shader_test91
-rw-r--r--shaders/skia/133-2.shader_test81
-rw-r--r--shaders/skia/133-4.shader_test51
-rw-r--r--shaders/skia/133-5.shader_test75
-rw-r--r--shaders/skia/133-6.shader_test138
-rw-r--r--shaders/skia/133-7.shader_test106
-rw-r--r--shaders/skia/133.shader_test126
-rw-r--r--shaders/skia/1339.shader_test98
-rw-r--r--shaders/skia/1342.shader_test32
-rw-r--r--shaders/skia/1345.shader_test97
-rw-r--r--shaders/skia/1348.shader_test191
-rw-r--r--shaders/skia/1351.shader_test97
-rw-r--r--shaders/skia/1354.shader_test458
-rw-r--r--shaders/skia/1357.shader_test126
-rw-r--r--shaders/skia/136-12.shader_test386
-rw-r--r--shaders/skia/136-13.shader_test71
-rw-r--r--shaders/skia/136-14.shader_test140
-rw-r--r--shaders/skia/136-2.shader_test142
-rw-r--r--shaders/skia/136-4.shader_test79
-rw-r--r--shaders/skia/136-5.shader_test138
-rw-r--r--shaders/skia/136-6.shader_test103
-rw-r--r--shaders/skia/136.shader_test119
-rw-r--r--shaders/skia/1360.shader_test338
-rw-r--r--shaders/skia/1366.shader_test133
-rw-r--r--shaders/skia/1369.shader_test180
-rw-r--r--shaders/skia/1372.shader_test51
-rw-r--r--shaders/skia/1375.shader_test146
-rw-r--r--shaders/skia/1378.shader_test283
-rw-r--r--shaders/skia/1381.shader_test228
-rw-r--r--shaders/skia/1384.shader_test386
-rw-r--r--shaders/skia/1387.shader_test253
-rw-r--r--shaders/skia/139-1.shader_test68
-rw-r--r--shaders/skia/139-11.shader_test38
-rw-r--r--shaders/skia/139-12.shader_test81
-rw-r--r--shaders/skia/139-13.shader_test163
-rw-r--r--shaders/skia/139-3.shader_test89
-rw-r--r--shaders/skia/139-4.shader_test138
-rw-r--r--shaders/skia/139-5.shader_test103
-rw-r--r--shaders/skia/139.shader_test126
-rw-r--r--shaders/skia/1390.shader_test98
-rw-r--r--shaders/skia/1393.shader_test445
-rw-r--r--shaders/skia/1396.shader_test54
-rw-r--r--shaders/skia/1399.shader_test30
-rw-r--r--shaders/skia/1402.shader_test169
-rw-r--r--shaders/skia/1405.shader_test95
-rw-r--r--shaders/skia/1408.shader_test113
-rw-r--r--shaders/skia/1414.shader_test164
-rw-r--r--shaders/skia/142-1.shader_test162
-rw-r--r--shaders/skia/142-11.shader_test321
-rw-r--r--shaders/skia/142-12.shader_test62
-rw-r--r--shaders/skia/142-3.shader_test78
-rw-r--r--shaders/skia/142-4.shader_test156
-rw-r--r--shaders/skia/142-5.shader_test113
-rw-r--r--shaders/skia/142.shader_test137
-rw-r--r--shaders/skia/1423.shader_test220
-rw-r--r--shaders/skia/1426.shader_test74
-rw-r--r--shaders/skia/1429.shader_test252
-rw-r--r--shaders/skia/1432.shader_test107
-rw-r--r--shaders/skia/1435.shader_test68
-rw-r--r--shaders/skia/1441.shader_test260
-rw-r--r--shaders/skia/1447.shader_test67
-rw-r--r--shaders/skia/145-10.shader_test99
-rw-r--r--shaders/skia/145-11.shader_test76
-rw-r--r--shaders/skia/145-2.shader_test82
-rw-r--r--shaders/skia/145-3.shader_test156
-rw-r--r--shaders/skia/145-4.shader_test110
-rw-r--r--shaders/skia/145.shader_test88
-rw-r--r--shaders/skia/1450.shader_test108
-rw-r--r--shaders/skia/1453.shader_test704
-rw-r--r--shaders/skia/1459.shader_test62
-rw-r--r--shaders/skia/1462.shader_test229
-rw-r--r--shaders/skia/1465.shader_test48
-rw-r--r--shaders/skia/1468.shader_test172
-rw-r--r--shaders/skia/1471.shader_test68
-rw-r--r--shaders/skia/1477.shader_test424
-rw-r--r--shaders/skia/148-10.shader_test62
-rw-r--r--shaders/skia/148-2.shader_test92
-rw-r--r--shaders/skia/148-3.shader_test156
-rw-r--r--shaders/skia/148-4.shader_test109
-rw-r--r--shaders/skia/148.shader_test135
-rw-r--r--shaders/skia/1480.shader_test26
-rw-r--r--shaders/skia/1483.shader_test455
-rw-r--r--shaders/skia/1486.shader_test394
-rw-r--r--shaders/skia/1489.shader_test31
-rw-r--r--shaders/skia/1492.shader_test121
-rw-r--r--shaders/skia/1495.shader_test83
-rw-r--r--shaders/skia/1498.shader_test205
-rw-r--r--shaders/skia/1501.shader_test101
-rw-r--r--shaders/skia/1504.shader_test229
-rw-r--r--shaders/skia/1507.shader_test127
-rw-r--r--shaders/skia/151-10.shader_test75
-rw-r--r--shaders/skia/151-2.shader_test75
-rw-r--r--shaders/skia/151-3.shader_test156
-rw-r--r--shaders/skia/151-4.shader_test116
-rw-r--r--shaders/skia/151-5.shader_test66
-rw-r--r--shaders/skia/151-9.shader_test190
-rw-r--r--shaders/skia/151.shader_test64
-rw-r--r--shaders/skia/1510.shader_test92
-rw-r--r--shaders/skia/1516.shader_test294
-rw-r--r--shaders/skia/1519.shader_test40
-rw-r--r--shaders/skia/1522.shader_test432
-rw-r--r--shaders/skia/1525.shader_test38
-rw-r--r--shaders/skia/1528.shader_test355
-rw-r--r--shaders/skia/1531.shader_test196
-rw-r--r--shaders/skia/1537.shader_test696
-rw-r--r--shaders/skia/154-2.shader_test79
-rw-r--r--shaders/skia/154-3.shader_test156
-rw-r--r--shaders/skia/154-4.shader_test98
-rw-r--r--shaders/skia/154-7.shader_test167
-rw-r--r--shaders/skia/154-8.shader_test99
-rw-r--r--shaders/skia/154.shader_test155
-rw-r--r--shaders/skia/1540.shader_test173
-rw-r--r--shaders/skia/1543.shader_test178
-rw-r--r--shaders/skia/1546.shader_test654
-rw-r--r--shaders/skia/1552.shader_test223
-rw-r--r--shaders/skia/1555.shader_test26
-rw-r--r--shaders/skia/1561.shader_test512
-rw-r--r--shaders/skia/1567.shader_test412
-rw-r--r--shaders/skia/157-2.shader_test89
-rw-r--r--shaders/skia/157-3.shader_test156
-rw-r--r--shaders/skia/157-4.shader_test98
-rw-r--r--shaders/skia/157-6.shader_test112
-rw-r--r--shaders/skia/157-7.shader_test272
-rw-r--r--shaders/skia/157-8.shader_test66
-rw-r--r--shaders/skia/157.shader_test84
-rw-r--r--shaders/skia/1573.shader_test656
-rw-r--r--shaders/skia/1576.shader_test247
-rw-r--r--shaders/skia/1579.shader_test671
-rw-r--r--shaders/skia/1582.shader_test44
-rw-r--r--shaders/skia/1588.shader_test486
-rw-r--r--shaders/skia/1591.shader_test220
-rw-r--r--shaders/skia/1594.shader_test437
-rw-r--r--shaders/skia/1597.shader_test255
-rw-r--r--shaders/skia/16-1.shader_test138
-rw-r--r--shaders/skia/16-10.shader_test124
-rw-r--r--shaders/skia/16-104.shader_test114
-rw-r--r--shaders/skia/16-106.shader_test58
-rw-r--r--shaders/skia/16-111.shader_test98
-rw-r--r--shaders/skia/16-112.shader_test74
-rw-r--r--shaders/skia/16-118.shader_test110
-rw-r--r--shaders/skia/16-121.shader_test125
-rw-r--r--shaders/skia/16-124.shader_test123
-rw-r--r--shaders/skia/16-127.shader_test126
-rw-r--r--shaders/skia/16-13.shader_test61
-rw-r--r--shaders/skia/16-131.shader_test339
-rw-r--r--shaders/skia/16-132.shader_test87
-rw-r--r--shaders/skia/16-133.shader_test109
-rw-r--r--shaders/skia/16-134.shader_test125
-rw-r--r--shaders/skia/16-135.shader_test88
-rw-r--r--shaders/skia/16-136.shader_test104
-rw-r--r--shaders/skia/16-144.shader_test43
-rw-r--r--shaders/skia/16-15.shader_test68
-rw-r--r--shaders/skia/16-150.shader_test61
-rw-r--r--shaders/skia/16-154.shader_test62
-rw-r--r--shaders/skia/16-155.shader_test71
-rw-r--r--shaders/skia/16-159.shader_test82
-rw-r--r--shaders/skia/16-16.shader_test63
-rw-r--r--shaders/skia/16-160.shader_test56
-rw-r--r--shaders/skia/16-166.shader_test66
-rw-r--r--shaders/skia/16-168.shader_test85
-rw-r--r--shaders/skia/16-170.shader_test105
-rw-r--r--shaders/skia/16-171.shader_test108
-rw-r--r--shaders/skia/16-174.shader_test44
-rw-r--r--shaders/skia/16-18.shader_test139
-rw-r--r--shaders/skia/16-188.shader_test122
-rw-r--r--shaders/skia/16-189.shader_test100
-rw-r--r--shaders/skia/16-19.shader_test57
-rw-r--r--shaders/skia/16-191.shader_test46
-rw-r--r--shaders/skia/16-192.shader_test91
-rw-r--r--shaders/skia/16-2.shader_test66
-rw-r--r--shaders/skia/16-202.shader_test126
-rw-r--r--shaders/skia/16-216.shader_test143
-rw-r--r--shaders/skia/16-22.shader_test58
-rw-r--r--shaders/skia/16-220.shader_test77
-rw-r--r--shaders/skia/16-221.shader_test70
-rw-r--r--shaders/skia/16-231.shader_test46
-rw-r--r--shaders/skia/16-239.shader_test39
-rw-r--r--shaders/skia/16-24.shader_test108
-rw-r--r--shaders/skia/16-240.shader_test111
-rw-r--r--shaders/skia/16-241.shader_test108
-rw-r--r--shaders/skia/16-242.shader_test73
-rw-r--r--shaders/skia/16-25.shader_test116
-rw-r--r--shaders/skia/16-31.shader_test92
-rw-r--r--shaders/skia/16-32.shader_test63
-rw-r--r--shaders/skia/16-33.shader_test138
-rw-r--r--shaders/skia/16-35.shader_test45
-rw-r--r--shaders/skia/16-4.shader_test33
-rw-r--r--shaders/skia/16-40.shader_test83
-rw-r--r--shaders/skia/16-42.shader_test103
-rw-r--r--shaders/skia/16-43.shader_test43
-rw-r--r--shaders/skia/16-5.shader_test50
-rw-r--r--shaders/skia/16-55.shader_test90
-rw-r--r--shaders/skia/16-56.shader_test130
-rw-r--r--shaders/skia/16-57.shader_test62
-rw-r--r--shaders/skia/16-58.shader_test92
-rw-r--r--shaders/skia/16-6.shader_test63
-rw-r--r--shaders/skia/16-65.shader_test69
-rw-r--r--shaders/skia/16-66.shader_test69
-rw-r--r--shaders/skia/16-7.shader_test78
-rw-r--r--shaders/skia/16-72.shader_test41
-rw-r--r--shaders/skia/16-73.shader_test78
-rw-r--r--shaders/skia/16-75.shader_test168
-rw-r--r--shaders/skia/16-77.shader_test140
-rw-r--r--shaders/skia/16-79.shader_test137
-rw-r--r--shaders/skia/16-8.shader_test76
-rw-r--r--shaders/skia/16-84.shader_test87
-rw-r--r--shaders/skia/16-92.shader_test106
-rw-r--r--shaders/skia/16-95.shader_test73
-rw-r--r--shaders/skia/16.shader_test51
-rw-r--r--shaders/skia/160-2.shader_test78
-rw-r--r--shaders/skia/160-3.shader_test156
-rw-r--r--shaders/skia/160-4.shader_test98
-rw-r--r--shaders/skia/160-8.shader_test51
-rw-r--r--shaders/skia/160.shader_test142
-rw-r--r--shaders/skia/1603.shader_test439
-rw-r--r--shaders/skia/1606.shader_test127
-rw-r--r--shaders/skia/1609.shader_test43
-rw-r--r--shaders/skia/1618.shader_test496
-rw-r--r--shaders/skia/1621.shader_test93
-rw-r--r--shaders/skia/1624.shader_test318
-rw-r--r--shaders/skia/1627.shader_test40
-rw-r--r--shaders/skia/163-2.shader_test82
-rw-r--r--shaders/skia/163-3.shader_test156
-rw-r--r--shaders/skia/163-4.shader_test145
-rw-r--r--shaders/skia/163-7.shader_test27
-rw-r--r--shaders/skia/163-8.shader_test58
-rw-r--r--shaders/skia/163.shader_test71
-rw-r--r--shaders/skia/1630.shader_test184
-rw-r--r--shaders/skia/1633.shader_test333
-rw-r--r--shaders/skia/1636.shader_test75
-rw-r--r--shaders/skia/1639.shader_test79
-rw-r--r--shaders/skia/1642.shader_test49
-rw-r--r--shaders/skia/1648.shader_test50
-rw-r--r--shaders/skia/1651.shader_test235
-rw-r--r--shaders/skia/1654.shader_test31
-rw-r--r--shaders/skia/1657.shader_test45
-rw-r--r--shaders/skia/166-2.shader_test92
-rw-r--r--shaders/skia/166-3.shader_test156
-rw-r--r--shaders/skia/166-4.shader_test145
-rw-r--r--shaders/skia/166-7.shader_test115
-rw-r--r--shaders/skia/166-8.shader_test45
-rw-r--r--shaders/skia/166.shader_test162
-rw-r--r--shaders/skia/1663.shader_test33
-rw-r--r--shaders/skia/1666.shader_test84
-rw-r--r--shaders/skia/1672.shader_test235
-rw-r--r--shaders/skia/1678.shader_test267
-rw-r--r--shaders/skia/1681.shader_test187
-rw-r--r--shaders/skia/1684.shader_test942
-rw-r--r--shaders/skia/169-2.shader_test75
-rw-r--r--shaders/skia/169-4.shader_test117
-rw-r--r--shaders/skia/169-8.shader_test52
-rw-r--r--shaders/skia/169.shader_test91
-rw-r--r--shaders/skia/1699.shader_test419
-rw-r--r--shaders/skia/1702.shader_test169
-rw-r--r--shaders/skia/1705.shader_test185
-rw-r--r--shaders/skia/1708.shader_test164
-rw-r--r--shaders/skia/1711.shader_test23
-rw-r--r--shaders/skia/1714.shader_test190
-rw-r--r--shaders/skia/172-2.shader_test79
-rw-r--r--shaders/skia/172-3.shader_test193
-rw-r--r--shaders/skia/172-4.shader_test117
-rw-r--r--shaders/skia/172-7.shader_test31
-rw-r--r--shaders/skia/172-8.shader_test54
-rw-r--r--shaders/skia/172.shader_test132
-rw-r--r--shaders/skia/1720.shader_test135
-rw-r--r--shaders/skia/1723.shader_test228
-rw-r--r--shaders/skia/1726.shader_test258
-rw-r--r--shaders/skia/1735.shader_test146
-rw-r--r--shaders/skia/1738.shader_test41
-rw-r--r--shaders/skia/175-2.shader_test89
-rw-r--r--shaders/skia/175-3.shader_test193
-rw-r--r--shaders/skia/175-7.shader_test179
-rw-r--r--shaders/skia/175-8.shader_test61
-rw-r--r--shaders/skia/175-9.shader_test75
-rw-r--r--shaders/skia/175.shader_test61
-rw-r--r--shaders/skia/1750.shader_test30
-rw-r--r--shaders/skia/1756.shader_test50
-rw-r--r--shaders/skia/1762.shader_test190
-rw-r--r--shaders/skia/1768.shader_test153
-rw-r--r--shaders/skia/1771.shader_test219
-rw-r--r--shaders/skia/1774.shader_test108
-rw-r--r--shaders/skia/1777.shader_test44
-rw-r--r--shaders/skia/178-2.shader_test78
-rw-r--r--shaders/skia/178-3.shader_test193
-rw-r--r--shaders/skia/178-6.shader_test77
-rw-r--r--shaders/skia/178-7.shader_test64
-rw-r--r--shaders/skia/178.shader_test152
-rw-r--r--shaders/skia/1780.shader_test37
-rw-r--r--shaders/skia/1783.shader_test667
-rw-r--r--shaders/skia/1786.shader_test47
-rw-r--r--shaders/skia/1789.shader_test217
-rw-r--r--shaders/skia/1792.shader_test78
-rw-r--r--shaders/skia/1795.shader_test139
-rw-r--r--shaders/skia/1798.shader_test250
-rw-r--r--shaders/skia/1801.shader_test46
-rw-r--r--shaders/skia/1804.shader_test75
-rw-r--r--shaders/skia/1807.shader_test109
-rw-r--r--shaders/skia/181-2.shader_test82
-rw-r--r--shaders/skia/181-3.shader_test193
-rw-r--r--shaders/skia/181-6.shader_test91
-rw-r--r--shaders/skia/181-7.shader_test46
-rw-r--r--shaders/skia/181.shader_test81
-rw-r--r--shaders/skia/1810.shader_test216
-rw-r--r--shaders/skia/1813.shader_test244
-rw-r--r--shaders/skia/1816.shader_test294
-rw-r--r--shaders/skia/1819.shader_test36
-rw-r--r--shaders/skia/1825.shader_test127
-rw-r--r--shaders/skia/1831.shader_test133
-rw-r--r--shaders/skia/1834.shader_test93
-rw-r--r--shaders/skia/184-2.shader_test92
-rw-r--r--shaders/skia/184-3.shader_test193
-rw-r--r--shaders/skia/184-6.shader_test85
-rw-r--r--shaders/skia/184-7.shader_test63
-rw-r--r--shaders/skia/184.shader_test145
-rw-r--r--shaders/skia/1840.shader_test177
-rw-r--r--shaders/skia/1843.shader_test40
-rw-r--r--shaders/skia/1846.shader_test98
-rw-r--r--shaders/skia/1849.shader_test130
-rw-r--r--shaders/skia/1852.shader_test132
-rw-r--r--shaders/skia/1855.shader_test211
-rw-r--r--shaders/skia/1861.shader_test300
-rw-r--r--shaders/skia/1867.shader_test61
-rw-r--r--shaders/skia/187-2.shader_test75
-rw-r--r--shaders/skia/187-3.shader_test193
-rw-r--r--shaders/skia/187-6.shader_test108
-rw-r--r--shaders/skia/187.shader_test68
-rw-r--r--shaders/skia/1870.shader_test26
-rw-r--r--shaders/skia/1873.shader_test174
-rw-r--r--shaders/skia/1876.shader_test113
-rw-r--r--shaders/skia/1879.shader_test219
-rw-r--r--shaders/skia/1882.shader_test92
-rw-r--r--shaders/skia/1885.shader_test363
-rw-r--r--shaders/skia/1888.shader_test56
-rw-r--r--shaders/skia/1891.shader_test242
-rw-r--r--shaders/skia/1894.shader_test161
-rw-r--r--shaders/skia/1897.shader_test120
-rw-r--r--shaders/skia/19-1.shader_test117
-rw-r--r--shaders/skia/19-10.shader_test58
-rw-r--r--shaders/skia/19-100.shader_test89
-rw-r--r--shaders/skia/19-101.shader_test127
-rw-r--r--shaders/skia/19-103.shader_test92
-rw-r--r--shaders/skia/19-105.shader_test109
-rw-r--r--shaders/skia/19-106.shader_test125
-rw-r--r--shaders/skia/19-107.shader_test88
-rw-r--r--shaders/skia/19-108.shader_test104
-rw-r--r--shaders/skia/19-114.shader_test37
-rw-r--r--shaders/skia/19-115.shader_test60
-rw-r--r--shaders/skia/19-119.shader_test67
-rw-r--r--shaders/skia/19-12.shader_test42
-rw-r--r--shaders/skia/19-120.shader_test95
-rw-r--r--shaders/skia/19-125.shader_test66
-rw-r--r--shaders/skia/19-126.shader_test62
-rw-r--r--shaders/skia/19-128.shader_test88
-rw-r--r--shaders/skia/19-129.shader_test121
-rw-r--r--shaders/skia/19-134.shader_test73
-rw-r--r--shaders/skia/19-135.shader_test85
-rw-r--r--shaders/skia/19-142.shader_test105
-rw-r--r--shaders/skia/19-149.shader_test115
-rw-r--r--shaders/skia/19-15.shader_test66
-rw-r--r--shaders/skia/19-162.shader_test122
-rw-r--r--shaders/skia/19-166.shader_test68
-rw-r--r--shaders/skia/19-169.shader_test52
-rw-r--r--shaders/skia/19-17.shader_test67
-rw-r--r--shaders/skia/19-175.shader_test113
-rw-r--r--shaders/skia/19-18.shader_test68
-rw-r--r--shaders/skia/19-181.shader_test31
-rw-r--r--shaders/skia/19-182.shader_test108
-rw-r--r--shaders/skia/19-183.shader_test77
-rw-r--r--shaders/skia/19-184.shader_test66
-rw-r--r--shaders/skia/19-19.shader_test59
-rw-r--r--shaders/skia/19-2.shader_test63
-rw-r--r--shaders/skia/19-21.shader_test52
-rw-r--r--shaders/skia/19-23.shader_test111
-rw-r--r--shaders/skia/19-24.shader_test124
-rw-r--r--shaders/skia/19-27.shader_test26
-rw-r--r--shaders/skia/19-3.shader_test27
-rw-r--r--shaders/skia/19-31.shader_test52
-rw-r--r--shaders/skia/19-34.shader_test86
-rw-r--r--shaders/skia/19-35.shader_test90
-rw-r--r--shaders/skia/19-36.shader_test48
-rw-r--r--shaders/skia/19-37.shader_test67
-rw-r--r--shaders/skia/19-39.shader_test63
-rw-r--r--shaders/skia/19-4.shader_test35
-rw-r--r--shaders/skia/19-42.shader_test73
-rw-r--r--shaders/skia/19-49.shader_test120
-rw-r--r--shaders/skia/19-5.shader_test50
-rw-r--r--shaders/skia/19-52.shader_test44
-rw-r--r--shaders/skia/19-53.shader_test82
-rw-r--r--shaders/skia/19-54.shader_test229
-rw-r--r--shaders/skia/19-57.shader_test137
-rw-r--r--shaders/skia/19-58.shader_test67
-rw-r--r--shaders/skia/19-6.shader_test103
-rw-r--r--shaders/skia/19-60.shader_test43
-rw-r--r--shaders/skia/19-63.shader_test76
-rw-r--r--shaders/skia/19-66.shader_test123
-rw-r--r--shaders/skia/19-7.shader_test45
-rw-r--r--shaders/skia/19-72.shader_test66
-rw-r--r--shaders/skia/19-77.shader_test68
-rw-r--r--shaders/skia/19-8.shader_test87
-rw-r--r--shaders/skia/19-85.shader_test62
-rw-r--r--shaders/skia/19-87.shader_test29
-rw-r--r--shaders/skia/19-92.shader_test111
-rw-r--r--shaders/skia/19-94.shader_test76
-rw-r--r--shaders/skia/19-95.shader_test126
-rw-r--r--shaders/skia/19-96.shader_test132
-rw-r--r--shaders/skia/19-97.shader_test91
-rw-r--r--shaders/skia/19-98.shader_test124
-rw-r--r--shaders/skia/19-99.shader_test130
-rw-r--r--shaders/skia/19.shader_test75
-rw-r--r--shaders/skia/190-2.shader_test79
-rw-r--r--shaders/skia/190-3.shader_test193
-rw-r--r--shaders/skia/190-5.shader_test39
-rw-r--r--shaders/skia/190-6.shader_test116
-rw-r--r--shaders/skia/190.shader_test165
-rw-r--r--shaders/skia/1900.shader_test206
-rw-r--r--shaders/skia/1903.shader_test148
-rw-r--r--shaders/skia/1906.shader_test497
-rw-r--r--shaders/skia/1909.shader_test50
-rw-r--r--shaders/skia/1912.shader_test41
-rw-r--r--shaders/skia/1915.shader_test206
-rw-r--r--shaders/skia/1918.shader_test49
-rw-r--r--shaders/skia/1921.shader_test116
-rw-r--r--shaders/skia/193-2.shader_test89
-rw-r--r--shaders/skia/193-3.shader_test193
-rw-r--r--shaders/skia/193-5.shader_test735
-rw-r--r--shaders/skia/193-6.shader_test68
-rw-r--r--shaders/skia/193.shader_test88
-rw-r--r--shaders/skia/1930.shader_test133
-rw-r--r--shaders/skia/1933.shader_test165
-rw-r--r--shaders/skia/1936.shader_test238
-rw-r--r--shaders/skia/1939.shader_test190
-rw-r--r--shaders/skia/1942.shader_test283
-rw-r--r--shaders/skia/1945.shader_test127
-rw-r--r--shaders/skia/1948.shader_test677
-rw-r--r--shaders/skia/1951.shader_test155
-rw-r--r--shaders/skia/1954.shader_test256
-rw-r--r--shaders/skia/1957.shader_test248
-rw-r--r--shaders/skia/196-2.shader_test78
-rw-r--r--shaders/skia/196-3.shader_test193
-rw-r--r--shaders/skia/196-5.shader_test268
-rw-r--r--shaders/skia/196-6.shader_test116
-rw-r--r--shaders/skia/196-7.shader_test57
-rw-r--r--shaders/skia/196.shader_test132
-rw-r--r--shaders/skia/1960.shader_test166
-rw-r--r--shaders/skia/1963.shader_test488
-rw-r--r--shaders/skia/1966.shader_test86
-rw-r--r--shaders/skia/1978.shader_test287
-rw-r--r--shaders/skia/1981.shader_test250
-rw-r--r--shaders/skia/1984.shader_test145
-rw-r--r--shaders/skia/1987.shader_test115
-rw-r--r--shaders/skia/199-2.shader_test82
-rw-r--r--shaders/skia/199-3.shader_test191
-rw-r--r--shaders/skia/199-5.shader_test25
-rw-r--r--shaders/skia/199-6.shader_test100
-rw-r--r--shaders/skia/199-7.shader_test72
-rw-r--r--shaders/skia/199.shader_test61
-rw-r--r--shaders/skia/1993.shader_test26
-rw-r--r--shaders/skia/1996.shader_test607
-rw-r--r--shaders/skia/1999.shader_test29
-rw-r--r--shaders/skia/2002.shader_test283
-rw-r--r--shaders/skia/2008.shader_test69
-rw-r--r--shaders/skia/2017.shader_test43
-rw-r--r--shaders/skia/202-2.shader_test92
-rw-r--r--shaders/skia/202-3.shader_test191
-rw-r--r--shaders/skia/202-6.shader_test74
-rw-r--r--shaders/skia/202-7.shader_test61
-rw-r--r--shaders/skia/202.shader_test152
-rw-r--r--shaders/skia/2020.shader_test413
-rw-r--r--shaders/skia/2023.shader_test225
-rw-r--r--shaders/skia/2026.shader_test117
-rw-r--r--shaders/skia/2029.shader_test249
-rw-r--r--shaders/skia/2041.shader_test556
-rw-r--r--shaders/skia/2044.shader_test375
-rw-r--r--shaders/skia/2047.shader_test171
-rw-r--r--shaders/skia/205-2.shader_test75
-rw-r--r--shaders/skia/205-3.shader_test191
-rw-r--r--shaders/skia/205-4.shader_test201
-rw-r--r--shaders/skia/205-5.shader_test163
-rw-r--r--shaders/skia/205-6.shader_test61
-rw-r--r--shaders/skia/205.shader_test81
-rw-r--r--shaders/skia/2050.shader_test79
-rw-r--r--shaders/skia/2053.shader_test110
-rw-r--r--shaders/skia/2056.shader_test61
-rw-r--r--shaders/skia/2059.shader_test116
-rw-r--r--shaders/skia/2068.shader_test149
-rw-r--r--shaders/skia/2074.shader_test130
-rw-r--r--shaders/skia/2077.shader_test44
-rw-r--r--shaders/skia/208-2.shader_test79
-rw-r--r--shaders/skia/208-3.shader_test191
-rw-r--r--shaders/skia/208-4.shader_test200
-rw-r--r--shaders/skia/208-5.shader_test84
-rw-r--r--shaders/skia/208.shader_test145
-rw-r--r--shaders/skia/2080.shader_test364
-rw-r--r--shaders/skia/2083.shader_test335
-rw-r--r--shaders/skia/2089.shader_test326
-rw-r--r--shaders/skia/2092.shader_test125
-rw-r--r--shaders/skia/2095.shader_test52
-rw-r--r--shaders/skia/2098.shader_test201
-rw-r--r--shaders/skia/2104.shader_test161
-rw-r--r--shaders/skia/2107.shader_test57
-rw-r--r--shaders/skia/211-2.shader_test89
-rw-r--r--shaders/skia/211-3.shader_test191
-rw-r--r--shaders/skia/211-4.shader_test85
-rw-r--r--shaders/skia/211-5.shader_test68
-rw-r--r--shaders/skia/211-6.shader_test284
-rw-r--r--shaders/skia/211.shader_test68
-rw-r--r--shaders/skia/2110.shader_test90
-rw-r--r--shaders/skia/2113.shader_test34
-rw-r--r--shaders/skia/2116.shader_test70
-rw-r--r--shaders/skia/2119.shader_test70
-rw-r--r--shaders/skia/2122.shader_test54
-rw-r--r--shaders/skia/2125.shader_test86
-rw-r--r--shaders/skia/2128.shader_test82
-rw-r--r--shaders/skia/2131.shader_test48
-rw-r--r--shaders/skia/2134.shader_test133
-rw-r--r--shaders/skia/2137.shader_test135
-rw-r--r--shaders/skia/214-2.shader_test78
-rw-r--r--shaders/skia/214-3.shader_test191
-rw-r--r--shaders/skia/214-4.shader_test59
-rw-r--r--shaders/skia/214-5.shader_test239
-rw-r--r--shaders/skia/214-6.shader_test130
-rw-r--r--shaders/skia/214.shader_test165
-rw-r--r--shaders/skia/2140.shader_test145
-rw-r--r--shaders/skia/2143.shader_test110
-rw-r--r--shaders/skia/2146.shader_test134
-rw-r--r--shaders/skia/2149.shader_test140
-rw-r--r--shaders/skia/2152.shader_test132
-rw-r--r--shaders/skia/2155.shader_test89
-rw-r--r--shaders/skia/2158.shader_test87
-rw-r--r--shaders/skia/2161.shader_test128
-rw-r--r--shaders/skia/2164.shader_test86
-rw-r--r--shaders/skia/2167.shader_test113
-rw-r--r--shaders/skia/217-2.shader_test82
-rw-r--r--shaders/skia/217-3.shader_test191
-rw-r--r--shaders/skia/217-5.shader_test327
-rw-r--r--shaders/skia/217-6.shader_test105
-rw-r--r--shaders/skia/217.shader_test88
-rw-r--r--shaders/skia/2173.shader_test242
-rw-r--r--shaders/skia/2176.shader_test253
-rw-r--r--shaders/skia/2179.shader_test230
-rw-r--r--shaders/skia/2182.shader_test202
-rw-r--r--shaders/skia/2185.shader_test205
-rw-r--r--shaders/skia/2188.shader_test221
-rw-r--r--shaders/skia/2191.shader_test77
-rw-r--r--shaders/skia/2194.shader_test49
-rw-r--r--shaders/skia/2197.shader_test49
-rw-r--r--shaders/skia/22-1.shader_test63
-rw-r--r--shaders/skia/22-103.shader_test113
-rw-r--r--shaders/skia/22-108.shader_test85
-rw-r--r--shaders/skia/22-109.shader_test67
-rw-r--r--shaders/skia/22-11.shader_test70
-rw-r--r--shaders/skia/22-110.shader_test97
-rw-r--r--shaders/skia/22-111.shader_test84
-rw-r--r--shaders/skia/22-113.shader_test68
-rw-r--r--shaders/skia/22-114.shader_test66
-rw-r--r--shaders/skia/22-115.shader_test62
-rw-r--r--shaders/skia/22-117.shader_test127
-rw-r--r--shaders/skia/22-119.shader_test56
-rw-r--r--shaders/skia/22-121.shader_test56
-rw-r--r--shaders/skia/22-123.shader_test62
-rw-r--r--shaders/skia/22-128.shader_test110
-rw-r--r--shaders/skia/22-129.shader_test69
-rw-r--r--shaders/skia/22-13.shader_test42
-rw-r--r--shaders/skia/22-133.shader_test61
-rw-r--r--shaders/skia/22-136.shader_test28
-rw-r--r--shaders/skia/22-15.shader_test82
-rw-r--r--shaders/skia/22-151.shader_test52
-rw-r--r--shaders/skia/22-152.shader_test70
-rw-r--r--shaders/skia/22-155.shader_test61
-rw-r--r--shaders/skia/22-159.shader_test73
-rw-r--r--shaders/skia/22-16.shader_test66
-rw-r--r--shaders/skia/22-167.shader_test25
-rw-r--r--shaders/skia/22-168.shader_test93
-rw-r--r--shaders/skia/22-169.shader_test78
-rw-r--r--shaders/skia/22-18.shader_test52
-rw-r--r--shaders/skia/22-2.shader_test33
-rw-r--r--shaders/skia/22-20.shader_test111
-rw-r--r--shaders/skia/22-21.shader_test131
-rw-r--r--shaders/skia/22-23.shader_test74
-rw-r--r--shaders/skia/22-29.shader_test53
-rw-r--r--shaders/skia/22-3.shader_test41
-rw-r--r--shaders/skia/22-30.shader_test86
-rw-r--r--shaders/skia/22-31.shader_test103
-rw-r--r--shaders/skia/22-32.shader_test44
-rw-r--r--shaders/skia/22-4.shader_test53
-rw-r--r--shaders/skia/22-44.shader_test60
-rw-r--r--shaders/skia/22-45.shader_test41
-rw-r--r--shaders/skia/22-46.shader_test92
-rw-r--r--shaders/skia/22-48.shader_test168
-rw-r--r--shaders/skia/22-5.shader_test103
-rw-r--r--shaders/skia/22-50.shader_test137
-rw-r--r--shaders/skia/22-51.shader_test67
-rw-r--r--shaders/skia/22-58.shader_test86
-rw-r--r--shaders/skia/22-59.shader_test143
-rw-r--r--shaders/skia/22-6.shader_test67
-rw-r--r--shaders/skia/22-61.shader_test93
-rw-r--r--shaders/skia/22-66.shader_test53
-rw-r--r--shaders/skia/22-67.shader_test115
-rw-r--r--shaders/skia/22-7.shader_test87
-rw-r--r--shaders/skia/22-75.shader_test63
-rw-r--r--shaders/skia/22-76.shader_test84
-rw-r--r--shaders/skia/22-77.shader_test27
-rw-r--r--shaders/skia/22-81.shader_test91
-rw-r--r--shaders/skia/22-83.shader_test116
-rw-r--r--shaders/skia/22-85.shader_test102
-rw-r--r--shaders/skia/22-86.shader_test131
-rw-r--r--shaders/skia/22-87.shader_test121
-rw-r--r--shaders/skia/22-88.shader_test100
-rw-r--r--shaders/skia/22-89.shader_test129
-rw-r--r--shaders/skia/22-9.shader_test42
-rw-r--r--shaders/skia/22-90.shader_test119
-rw-r--r--shaders/skia/22-92.shader_test132
-rw-r--r--shaders/skia/22-95.shader_test115
-rw-r--r--shaders/skia/22-96.shader_test131
-rw-r--r--shaders/skia/22-97.shader_test94
-rw-r--r--shaders/skia/22-98.shader_test110
-rw-r--r--shaders/skia/22.shader_test90
-rw-r--r--shaders/skia/220-2.shader_test92
-rw-r--r--shaders/skia/220-3.shader_test191
-rw-r--r--shaders/skia/220-4.shader_test492
-rw-r--r--shaders/skia/220-5.shader_test505
-rw-r--r--shaders/skia/220-6.shader_test88
-rw-r--r--shaders/skia/220.shader_test132
-rw-r--r--shaders/skia/2200.shader_test59
-rw-r--r--shaders/skia/2203.shader_test63
-rw-r--r--shaders/skia/2206.shader_test57
-rw-r--r--shaders/skia/2209.shader_test114
-rw-r--r--shaders/skia/2212.shader_test84
-rw-r--r--shaders/skia/2215.shader_test75
-rw-r--r--shaders/skia/2218.shader_test480
-rw-r--r--shaders/skia/2221.shader_test224
-rw-r--r--shaders/skia/2224.shader_test46
-rw-r--r--shaders/skia/2227.shader_test48
-rw-r--r--shaders/skia/223-2.shader_test75
-rw-r--r--shaders/skia/223-3.shader_test191
-rw-r--r--shaders/skia/223-4.shader_test61
-rw-r--r--shaders/skia/223-5.shader_test277
-rw-r--r--shaders/skia/223.shader_test61
-rw-r--r--shaders/skia/2230.shader_test45
-rw-r--r--shaders/skia/2233.shader_test80
-rw-r--r--shaders/skia/2236.shader_test84
-rw-r--r--shaders/skia/2239.shader_test81
-rw-r--r--shaders/skia/2242.shader_test82
-rw-r--r--shaders/skia/2245.shader_test81
-rw-r--r--shaders/skia/2248.shader_test93
-rw-r--r--shaders/skia/2251.shader_test94
-rw-r--r--shaders/skia/2254.shader_test63
-rw-r--r--shaders/skia/2257.shader_test87
-rw-r--r--shaders/skia/226-2.shader_test79
-rw-r--r--shaders/skia/226-3.shader_test209
-rw-r--r--shaders/skia/226-4.shader_test31
-rw-r--r--shaders/skia/226-5.shader_test429
-rw-r--r--shaders/skia/226.shader_test152
-rw-r--r--shaders/skia/2260.shader_test45
-rw-r--r--shaders/skia/2263.shader_test87
-rw-r--r--shaders/skia/2266.shader_test93
-rw-r--r--shaders/skia/2269.shader_test76
-rw-r--r--shaders/skia/2272.shader_test75
-rw-r--r--shaders/skia/2275.shader_test41
-rw-r--r--shaders/skia/2278.shader_test141
-rw-r--r--shaders/skia/2281.shader_test85
-rw-r--r--shaders/skia/2284.shader_test534
-rw-r--r--shaders/skia/2287.shader_test364
-rw-r--r--shaders/skia/229-2.shader_test89
-rw-r--r--shaders/skia/229-3.shader_test209
-rw-r--r--shaders/skia/229-5.shader_test317
-rw-r--r--shaders/skia/229-6.shader_test283
-rw-r--r--shaders/skia/229.shader_test81
-rw-r--r--shaders/skia/2290.shader_test300
-rw-r--r--shaders/skia/2293.shader_test42
-rw-r--r--shaders/skia/2296.shader_test85
-rw-r--r--shaders/skia/2299.shader_test44
-rw-r--r--shaders/skia/2302.shader_test70
-rw-r--r--shaders/skia/2305.shader_test81
-rw-r--r--shaders/skia/2308.shader_test91
-rw-r--r--shaders/skia/2311.shader_test72
-rw-r--r--shaders/skia/2314.shader_test38
-rw-r--r--shaders/skia/2317.shader_test43
-rw-r--r--shaders/skia/232-2.shader_test78
-rw-r--r--shaders/skia/232-3.shader_test209
-rw-r--r--shaders/skia/232-5.shader_test386
-rw-r--r--shaders/skia/232.shader_test145
-rw-r--r--shaders/skia/2320.shader_test44
-rw-r--r--shaders/skia/2323.shader_test73
-rw-r--r--shaders/skia/2326.shader_test66
-rw-r--r--shaders/skia/2329.shader_test74
-rw-r--r--shaders/skia/2332.shader_test43
-rw-r--r--shaders/skia/2335.shader_test43
-rw-r--r--shaders/skia/2338.shader_test91
-rw-r--r--shaders/skia/2341.shader_test91
-rw-r--r--shaders/skia/2344.shader_test81
-rw-r--r--shaders/skia/2347.shader_test38
-rw-r--r--shaders/skia/235-2.shader_test82
-rw-r--r--shaders/skia/235-3.shader_test209
-rw-r--r--shaders/skia/235-4.shader_test30
-rw-r--r--shaders/skia/235-5.shader_test346
-rw-r--r--shaders/skia/235.shader_test68
-rw-r--r--shaders/skia/2350.shader_test109
-rw-r--r--shaders/skia/2353.shader_test72
-rw-r--r--shaders/skia/2359.shader_test95
-rw-r--r--shaders/skia/2362.shader_test61
-rw-r--r--shaders/skia/2365.shader_test85
-rw-r--r--shaders/skia/2368.shader_test60
-rw-r--r--shaders/skia/2374.shader_test53
-rw-r--r--shaders/skia/2377.shader_test60
-rw-r--r--shaders/skia/238-2.shader_test92
-rw-r--r--shaders/skia/238-3.shader_test209
-rw-r--r--shaders/skia/238-4.shader_test40
-rw-r--r--shaders/skia/238-5.shader_test448
-rw-r--r--shaders/skia/238-6.shader_test80
-rw-r--r--shaders/skia/238.shader_test165
-rw-r--r--shaders/skia/2386.shader_test56
-rw-r--r--shaders/skia/2398.shader_test84
-rw-r--r--shaders/skia/2401.shader_test88
-rw-r--r--shaders/skia/2404.shader_test138
-rw-r--r--shaders/skia/2407.shader_test99
-rw-r--r--shaders/skia/241-2.shader_test209
-rw-r--r--shaders/skia/241-3.shader_test123
-rw-r--r--shaders/skia/241-4.shader_test45
-rw-r--r--shaders/skia/241.shader_test88
-rw-r--r--shaders/skia/2410.shader_test102
-rw-r--r--shaders/skia/2413.shader_test105
-rw-r--r--shaders/skia/2416.shader_test124
-rw-r--r--shaders/skia/2419.shader_test100
-rw-r--r--shaders/skia/2422.shader_test115
-rw-r--r--shaders/skia/2425.shader_test154
-rw-r--r--shaders/skia/2428.shader_test107
-rw-r--r--shaders/skia/2431.shader_test99
-rw-r--r--shaders/skia/2434.shader_test145
-rw-r--r--shaders/skia/2437.shader_test98
-rw-r--r--shaders/skia/244-2.shader_test209
-rw-r--r--shaders/skia/244-4.shader_test46
-rw-r--r--shaders/skia/244.shader_test132
-rw-r--r--shaders/skia/2440.shader_test111
-rw-r--r--shaders/skia/2443.shader_test154
-rw-r--r--shaders/skia/2446.shader_test106
-rw-r--r--shaders/skia/2449.shader_test66
-rw-r--r--shaders/skia/2452.shader_test67
-rw-r--r--shaders/skia/2455.shader_test91
-rw-r--r--shaders/skia/2458.shader_test68
-rw-r--r--shaders/skia/2461.shader_test83
-rw-r--r--shaders/skia/2467.shader_test56
-rw-r--r--shaders/skia/247-2.shader_test209
-rw-r--r--shaders/skia/247-3.shader_test23
-rw-r--r--shaders/skia/247-4.shader_test50
-rw-r--r--shaders/skia/247.shader_test61
-rw-r--r--shaders/skia/2470.shader_test54
-rw-r--r--shaders/skia/2473.shader_test59
-rw-r--r--shaders/skia/2476.shader_test81
-rw-r--r--shaders/skia/2479.shader_test85
-rw-r--r--shaders/skia/2482.shader_test85
-rw-r--r--shaders/skia/2485.shader_test77
-rw-r--r--shaders/skia/2488.shader_test91
-rw-r--r--shaders/skia/2491.shader_test91
-rw-r--r--shaders/skia/25-1.shader_test63
-rw-r--r--shaders/skia/25-101.shader_test121
-rw-r--r--shaders/skia/25-108.shader_test93
-rw-r--r--shaders/skia/25-109.shader_test67
-rw-r--r--shaders/skia/25-11.shader_test67
-rw-r--r--shaders/skia/25-112.shader_test61
-rw-r--r--shaders/skia/25-114.shader_test116
-rw-r--r--shaders/skia/25-119.shader_test106
-rw-r--r--shaders/skia/25-121.shader_test66
-rw-r--r--shaders/skia/25-123.shader_test60
-rw-r--r--shaders/skia/25-13.shader_test73
-rw-r--r--shaders/skia/25-131.shader_test73
-rw-r--r--shaders/skia/25-133.shader_test63
-rw-r--r--shaders/skia/25-137.shader_test93
-rw-r--r--shaders/skia/25-138.shader_test61
-rw-r--r--shaders/skia/25-14.shader_test64
-rw-r--r--shaders/skia/25-16.shader_test57
-rw-r--r--shaders/skia/25-18.shader_test111
-rw-r--r--shaders/skia/25-19.shader_test119
-rw-r--r--shaders/skia/25-2.shader_test44
-rw-r--r--shaders/skia/25-20.shader_test77
-rw-r--r--shaders/skia/25-21.shader_test61
-rw-r--r--shaders/skia/25-27.shader_test86
-rw-r--r--shaders/skia/25-28.shader_test90
-rw-r--r--shaders/skia/25-29.shader_test43
-rw-r--r--shaders/skia/25-3.shader_test39
-rw-r--r--shaders/skia/25-35.shader_test75
-rw-r--r--shaders/skia/25-37.shader_test44
-rw-r--r--shaders/skia/25-38.shader_test60
-rw-r--r--shaders/skia/25-4.shader_test50
-rw-r--r--shaders/skia/25-40.shader_test137
-rw-r--r--shaders/skia/25-41.shader_test70
-rw-r--r--shaders/skia/25-47.shader_test122
-rw-r--r--shaders/skia/25-49.shader_test82
-rw-r--r--shaders/skia/25-5.shader_test123
-rw-r--r--shaders/skia/25-54.shader_test50
-rw-r--r--shaders/skia/25-57.shader_test138
-rw-r--r--shaders/skia/25-6.shader_test64
-rw-r--r--shaders/skia/25-61.shader_test100
-rw-r--r--shaders/skia/25-62.shader_test86
-rw-r--r--shaders/skia/25-66.shader_test81
-rw-r--r--shaders/skia/25-67.shader_test97
-rw-r--r--shaders/skia/25-68.shader_test122
-rw-r--r--shaders/skia/25-69.shader_test119
-rw-r--r--shaders/skia/25-7.shader_test64
-rw-r--r--shaders/skia/25-70.shader_test106
-rw-r--r--shaders/skia/25-71.shader_test137
-rw-r--r--shaders/skia/25-72.shader_test134
-rw-r--r--shaders/skia/25-73.shader_test121
-rw-r--r--shaders/skia/25-74.shader_test135
-rw-r--r--shaders/skia/25-75.shader_test132
-rw-r--r--shaders/skia/25-76.shader_test119
-rw-r--r--shaders/skia/25-77.shader_test138
-rw-r--r--shaders/skia/25-78.shader_test135
-rw-r--r--shaders/skia/25-79.shader_test122
-rw-r--r--shaders/skia/25-80.shader_test128
-rw-r--r--shaders/skia/25-81.shader_test144
-rw-r--r--shaders/skia/25-82.shader_test107
-rw-r--r--shaders/skia/25-83.shader_test123
-rw-r--r--shaders/skia/25-88.shader_test113
-rw-r--r--shaders/skia/25-89.shader_test50
-rw-r--r--shaders/skia/25-9.shader_test114
-rw-r--r--shaders/skia/25-90.shader_test58
-rw-r--r--shaders/skia/25-93.shader_test70
-rw-r--r--shaders/skia/25-98.shader_test67
-rw-r--r--shaders/skia/25-99.shader_test75
-rw-r--r--shaders/skia/25.shader_test84
-rw-r--r--shaders/skia/250-2.shader_test209
-rw-r--r--shaders/skia/250-3.shader_test146
-rw-r--r--shaders/skia/250-4.shader_test50
-rw-r--r--shaders/skia/250.shader_test152
-rw-r--r--shaders/skia/253-2.shader_test196
-rw-r--r--shaders/skia/253-3.shader_test417
-rw-r--r--shaders/skia/253-4.shader_test50
-rw-r--r--shaders/skia/253-5.shader_test64
-rw-r--r--shaders/skia/253.shader_test81
-rw-r--r--shaders/skia/256-2.shader_test196
-rw-r--r--shaders/skia/256-3.shader_test47
-rw-r--r--shaders/skia/256-4.shader_test50
-rw-r--r--shaders/skia/256-5.shader_test100
-rw-r--r--shaders/skia/256.shader_test145
-rw-r--r--shaders/skia/259-2.shader_test196
-rw-r--r--shaders/skia/259-3.shader_test51
-rw-r--r--shaders/skia/259-4.shader_test52
-rw-r--r--shaders/skia/259-5.shader_test219
-rw-r--r--shaders/skia/259.shader_test68
-rw-r--r--shaders/skia/262-2.shader_test196
-rw-r--r--shaders/skia/262-3.shader_test30
-rw-r--r--shaders/skia/262-4.shader_test61
-rw-r--r--shaders/skia/262.shader_test165
-rw-r--r--shaders/skia/265-2.shader_test196
-rw-r--r--shaders/skia/265-3.shader_test27
-rw-r--r--shaders/skia/265-4.shader_test49
-rw-r--r--shaders/skia/265.shader_test88
-rw-r--r--shaders/skia/268-2.shader_test196
-rw-r--r--shaders/skia/268-4.shader_test49
-rw-r--r--shaders/skia/268-5.shader_test103
-rw-r--r--shaders/skia/268.shader_test132
-rw-r--r--shaders/skia/271-2.shader_test196
-rw-r--r--shaders/skia/271-3.shader_test157
-rw-r--r--shaders/skia/271-4.shader_test55
-rw-r--r--shaders/skia/271-5.shader_test103
-rw-r--r--shaders/skia/271.shader_test61
-rw-r--r--shaders/skia/274-2.shader_test196
-rw-r--r--shaders/skia/274-4.shader_test49
-rw-r--r--shaders/skia/274.shader_test152
-rw-r--r--shaders/skia/277-2.shader_test196
-rw-r--r--shaders/skia/277-3.shader_test273
-rw-r--r--shaders/skia/277-4.shader_test42
-rw-r--r--shaders/skia/277.shader_test81
-rw-r--r--shaders/skia/28-1.shader_test63
-rw-r--r--shaders/skia/28-100.shader_test110
-rw-r--r--shaders/skia/28-11.shader_test69
-rw-r--r--shaders/skia/28-110.shader_test97
-rw-r--r--shaders/skia/28-112.shader_test46
-rw-r--r--shaders/skia/28-117.shader_test63
-rw-r--r--shaders/skia/28-119.shader_test61
-rw-r--r--shaders/skia/28-12.shader_test71
-rw-r--r--shaders/skia/28-125.shader_test92
-rw-r--r--shaders/skia/28-126.shader_test66
-rw-r--r--shaders/skia/28-13.shader_test62
-rw-r--r--shaders/skia/28-15.shader_test58
-rw-r--r--shaders/skia/28-17.shader_test111
-rw-r--r--shaders/skia/28-18.shader_test124
-rw-r--r--shaders/skia/28-19.shader_test82
-rw-r--r--shaders/skia/28-2.shader_test54
-rw-r--r--shaders/skia/28-20.shader_test46
-rw-r--r--shaders/skia/28-25.shader_test66
-rw-r--r--shaders/skia/28-26.shader_test43
-rw-r--r--shaders/skia/28-29.shader_test69
-rw-r--r--shaders/skia/28-3.shader_test43
-rw-r--r--shaders/skia/28-30.shader_test69
-rw-r--r--shaders/skia/28-34.shader_test41
-rw-r--r--shaders/skia/28-37.shader_test137
-rw-r--r--shaders/skia/28-38.shader_test67
-rw-r--r--shaders/skia/28-4.shader_test50
-rw-r--r--shaders/skia/28-43.shader_test152
-rw-r--r--shaders/skia/28-46.shader_test93
-rw-r--r--shaders/skia/28-5.shader_test123
-rw-r--r--shaders/skia/28-6.shader_test42
-rw-r--r--shaders/skia/28-61.shader_test94
-rw-r--r--shaders/skia/28-62.shader_test110
-rw-r--r--shaders/skia/28-63.shader_test115
-rw-r--r--shaders/skia/28-64.shader_test103
-rw-r--r--shaders/skia/28-65.shader_test99
-rw-r--r--shaders/skia/28-66.shader_test130
-rw-r--r--shaders/skia/28-67.shader_test118
-rw-r--r--shaders/skia/28-68.shader_test114
-rw-r--r--shaders/skia/28-69.shader_test128
-rw-r--r--shaders/skia/28-7.shader_test64
-rw-r--r--shaders/skia/28-70.shader_test116
-rw-r--r--shaders/skia/28-71.shader_test112
-rw-r--r--shaders/skia/28-72.shader_test131
-rw-r--r--shaders/skia/28-73.shader_test119
-rw-r--r--shaders/skia/28-74.shader_test115
-rw-r--r--shaders/skia/28-75.shader_test139
-rw-r--r--shaders/skia/28-76.shader_test155
-rw-r--r--shaders/skia/28-77.shader_test118
-rw-r--r--shaders/skia/28-78.shader_test134
-rw-r--r--shaders/skia/28-85.shader_test54
-rw-r--r--shaders/skia/28-88.shader_test67
-rw-r--r--shaders/skia/28-89.shader_test69
-rw-r--r--shaders/skia/28-9.shader_test45
-rw-r--r--shaders/skia/28-91.shader_test70
-rw-r--r--shaders/skia/28-92.shader_test67
-rw-r--r--shaders/skia/28-93.shader_test75
-rw-r--r--shaders/skia/28-95.shader_test127
-rw-r--r--shaders/skia/28-97.shader_test56
-rw-r--r--shaders/skia/28.shader_test42
-rw-r--r--shaders/skia/280-2.shader_test194
-rw-r--r--shaders/skia/280-3.shader_test148
-rw-r--r--shaders/skia/280-4.shader_test42
-rw-r--r--shaders/skia/280-5.shader_test76
-rw-r--r--shaders/skia/280.shader_test145
-rw-r--r--shaders/skia/283-2.shader_test194
-rw-r--r--shaders/skia/283-4.shader_test100
-rw-r--r--shaders/skia/283-5.shader_test75
-rw-r--r--shaders/skia/283.shader_test68
-rw-r--r--shaders/skia/286-2.shader_test194
-rw-r--r--shaders/skia/286-3.shader_test65
-rw-r--r--shaders/skia/286-4.shader_test64
-rw-r--r--shaders/skia/286-5.shader_test128
-rw-r--r--shaders/skia/286.shader_test165
-rw-r--r--shaders/skia/289-2.shader_test194
-rw-r--r--shaders/skia/289-3.shader_test75
-rw-r--r--shaders/skia/289-4.shader_test70
-rw-r--r--shaders/skia/289-5.shader_test62
-rw-r--r--shaders/skia/289.shader_test88
-rw-r--r--shaders/skia/292-2.shader_test194
-rw-r--r--shaders/skia/292-3.shader_test27
-rw-r--r--shaders/skia/292-4.shader_test229
-rw-r--r--shaders/skia/292-5.shader_test57
-rw-r--r--shaders/skia/292.shader_test132
-rw-r--r--shaders/skia/295-2.shader_test194
-rw-r--r--shaders/skia/295-4.shader_test100
-rw-r--r--shaders/skia/295-5.shader_test63
-rw-r--r--shaders/skia/295.shader_test61
-rw-r--r--shaders/skia/298-2.shader_test194
-rw-r--r--shaders/skia/298-3.shader_test48
-rw-r--r--shaders/skia/298-4.shader_test228
-rw-r--r--shaders/skia/298-5.shader_test86
-rw-r--r--shaders/skia/298.shader_test152
-rw-r--r--shaders/skia/301-2.shader_test194
-rw-r--r--shaders/skia/301-3.shader_test256
-rw-r--r--shaders/skia/301-4.shader_test93
-rw-r--r--shaders/skia/301-5.shader_test82
-rw-r--r--shaders/skia/301.shader_test81
-rw-r--r--shaders/skia/304-2.shader_test194
-rw-r--r--shaders/skia/304-3.shader_test259
-rw-r--r--shaders/skia/304-4.shader_test91
-rw-r--r--shaders/skia/304-5.shader_test89
-rw-r--r--shaders/skia/304.shader_test145
-rw-r--r--shaders/skia/307-2.shader_test212
-rw-r--r--shaders/skia/307-3.shader_test179
-rw-r--r--shaders/skia/307-4.shader_test122
-rw-r--r--shaders/skia/307-5.shader_test104
-rw-r--r--shaders/skia/307.shader_test68
-rw-r--r--shaders/skia/31-1.shader_test63
-rw-r--r--shaders/skia/31-101.shader_test92
-rw-r--r--shaders/skia/31-105.shader_test51
-rw-r--r--shaders/skia/31-108.shader_test72
-rw-r--r--shaders/skia/31-11.shader_test57
-rw-r--r--shaders/skia/31-112.shader_test92
-rw-r--r--shaders/skia/31-113.shader_test81
-rw-r--r--shaders/skia/31-16.shader_test108
-rw-r--r--shaders/skia/31-17.shader_test113
-rw-r--r--shaders/skia/31-18.shader_test71
-rw-r--r--shaders/skia/31-19.shader_test72
-rw-r--r--shaders/skia/31-2.shader_test25
-rw-r--r--shaders/skia/31-20.shader_test138
-rw-r--r--shaders/skia/31-24.shader_test76
-rw-r--r--shaders/skia/31-25.shader_test43
-rw-r--r--shaders/skia/31-26.shader_test49
-rw-r--r--shaders/skia/31-29.shader_test44
-rw-r--r--shaders/skia/31-33.shader_test67
-rw-r--r--shaders/skia/31-34.shader_test133
-rw-r--r--shaders/skia/31-38.shader_test86
-rw-r--r--shaders/skia/31-39.shader_test56
-rw-r--r--shaders/skia/31-4.shader_test50
-rw-r--r--shaders/skia/31-41.shader_test82
-rw-r--r--shaders/skia/31-47.shader_test54
-rw-r--r--shaders/skia/31-5.shader_test82
-rw-r--r--shaders/skia/31-51.shader_test52
-rw-r--r--shaders/skia/31-53.shader_test105
-rw-r--r--shaders/skia/31-54.shader_test121
-rw-r--r--shaders/skia/31-55.shader_test116
-rw-r--r--shaders/skia/31-57.shader_test105
-rw-r--r--shaders/skia/31-58.shader_test131
-rw-r--r--shaders/skia/31-6.shader_test75
-rw-r--r--shaders/skia/31-60.shader_test120
-rw-r--r--shaders/skia/31-61.shader_test129
-rw-r--r--shaders/skia/31-63.shader_test118
-rw-r--r--shaders/skia/31-64.shader_test132
-rw-r--r--shaders/skia/31-66.shader_test121
-rw-r--r--shaders/skia/31-68.shader_test130
-rw-r--r--shaders/skia/31-69.shader_test93
-rw-r--r--shaders/skia/31-70.shader_test109
-rw-r--r--shaders/skia/31-77.shader_test58
-rw-r--r--shaders/skia/31-80.shader_test67
-rw-r--r--shaders/skia/31-81.shader_test82
-rw-r--r--shaders/skia/31-83.shader_test40
-rw-r--r--shaders/skia/31-86.shader_test121
-rw-r--r--shaders/skia/31-88.shader_test45
-rw-r--r--shaders/skia/31-9.shader_test62
-rw-r--r--shaders/skia/31-91.shader_test93
-rw-r--r--shaders/skia/31-92.shader_test103
-rw-r--r--shaders/skia/31-94.shader_test107
-rw-r--r--shaders/skia/31-96.shader_test74
-rw-r--r--shaders/skia/31-99.shader_test132
-rw-r--r--shaders/skia/31.shader_test51
-rw-r--r--shaders/skia/310-2.shader_test212
-rw-r--r--shaders/skia/310-4.shader_test110
-rw-r--r--shaders/skia/310-5.shader_test62
-rw-r--r--shaders/skia/310.shader_test165
-rw-r--r--shaders/skia/313-2.shader_test212
-rw-r--r--shaders/skia/313-3.shader_test256
-rw-r--r--shaders/skia/313-4.shader_test67
-rw-r--r--shaders/skia/313-5.shader_test102
-rw-r--r--shaders/skia/313.shader_test88
-rw-r--r--shaders/skia/316-2.shader_test212
-rw-r--r--shaders/skia/316-3.shader_test553
-rw-r--r--shaders/skia/316-4.shader_test48
-rw-r--r--shaders/skia/316-5.shader_test122
-rw-r--r--shaders/skia/316.shader_test132
-rw-r--r--shaders/skia/319-2.shader_test212
-rw-r--r--shaders/skia/319-3.shader_test51
-rw-r--r--shaders/skia/319-4.shader_test73
-rw-r--r--shaders/skia/319-5.shader_test74
-rw-r--r--shaders/skia/319.shader_test61
-rw-r--r--shaders/skia/322-2.shader_test212
-rw-r--r--shaders/skia/322-3.shader_test535
-rw-r--r--shaders/skia/322-4.shader_test69
-rw-r--r--shaders/skia/322.shader_test152
-rw-r--r--shaders/skia/325-2.shader_test212
-rw-r--r--shaders/skia/325-3.shader_test219
-rw-r--r--shaders/skia/325-4.shader_test106
-rw-r--r--shaders/skia/325-5.shader_test73
-rw-r--r--shaders/skia/325.shader_test81
-rw-r--r--shaders/skia/328-2.shader_test212
-rw-r--r--shaders/skia/328-3.shader_test477
-rw-r--r--shaders/skia/328-4.shader_test54
-rw-r--r--shaders/skia/328-5.shader_test105
-rw-r--r--shaders/skia/328.shader_test145
-rw-r--r--shaders/skia/331-2.shader_test212
-rw-r--r--shaders/skia/331-3.shader_test83
-rw-r--r--shaders/skia/331-4.shader_test60
-rw-r--r--shaders/skia/331-5.shader_test61
-rw-r--r--shaders/skia/331.shader_test68
-rw-r--r--shaders/skia/334-2.shader_test455
-rw-r--r--shaders/skia/334-3.shader_test51
-rw-r--r--shaders/skia/334-4.shader_test65
-rw-r--r--shaders/skia/334.shader_test165
-rw-r--r--shaders/skia/337-3.shader_test74
-rw-r--r--shaders/skia/337-4.shader_test104
-rw-r--r--shaders/skia/337.shader_test88
-rw-r--r--shaders/skia/34-1.shader_test63
-rw-r--r--shaders/skia/34-102.shader_test96
-rw-r--r--shaders/skia/34-106.shader_test83
-rw-r--r--shaders/skia/34-107.shader_test61
-rw-r--r--shaders/skia/34-11.shader_test73
-rw-r--r--shaders/skia/34-12.shader_test64
-rw-r--r--shaders/skia/34-14.shader_test57
-rw-r--r--shaders/skia/34-16.shader_test111
-rw-r--r--shaders/skia/34-17.shader_test128
-rw-r--r--shaders/skia/34-18.shader_test82
-rw-r--r--shaders/skia/34-19.shader_test74
-rw-r--r--shaders/skia/34-2.shader_test29
-rw-r--r--shaders/skia/34-24.shader_test43
-rw-r--r--shaders/skia/34-26.shader_test52
-rw-r--r--shaders/skia/34-27.shader_test41
-rw-r--r--shaders/skia/34-28.shader_test63
-rw-r--r--shaders/skia/34-29.shader_test44
-rw-r--r--shaders/skia/34-30.shader_test135
-rw-r--r--shaders/skia/34-31.shader_test67
-rw-r--r--shaders/skia/34-32.shader_test114
-rw-r--r--shaders/skia/34-36.shader_test78
-rw-r--r--shaders/skia/34-4.shader_test50
-rw-r--r--shaders/skia/34-40.shader_test44
-rw-r--r--shaders/skia/34-46.shader_test138
-rw-r--r--shaders/skia/34-49.shader_test54
-rw-r--r--shaders/skia/34-5.shader_test82
-rw-r--r--shaders/skia/34-52.shader_test103
-rw-r--r--shaders/skia/34-53.shader_test92
-rw-r--r--shaders/skia/34-54.shader_test122
-rw-r--r--shaders/skia/34-55.shader_test108
-rw-r--r--shaders/skia/34-56.shader_test107
-rw-r--r--shaders/skia/34-57.shader_test137
-rw-r--r--shaders/skia/34-58.shader_test123
-rw-r--r--shaders/skia/34-59.shader_test105
-rw-r--r--shaders/skia/34-6.shader_test55
-rw-r--r--shaders/skia/34-60.shader_test135
-rw-r--r--shaders/skia/34-61.shader_test121
-rw-r--r--shaders/skia/34-62.shader_test108
-rw-r--r--shaders/skia/34-63.shader_test138
-rw-r--r--shaders/skia/34-64.shader_test124
-rw-r--r--shaders/skia/34-65.shader_test114
-rw-r--r--shaders/skia/34-66.shader_test130
-rw-r--r--shaders/skia/34-67.shader_test93
-rw-r--r--shaders/skia/34-68.shader_test109
-rw-r--r--shaders/skia/34-7.shader_test75
-rw-r--r--shaders/skia/34-75.shader_test55
-rw-r--r--shaders/skia/34-78.shader_test67
-rw-r--r--shaders/skia/34-79.shader_test84
-rw-r--r--shaders/skia/34-81.shader_test44
-rw-r--r--shaders/skia/34-83.shader_test115
-rw-r--r--shaders/skia/34-84.shader_test124
-rw-r--r--shaders/skia/34-87.shader_test101
-rw-r--r--shaders/skia/34-9.shader_test134
-rw-r--r--shaders/skia/34-94.shader_test152
-rw-r--r--shaders/skia/34-96.shader_test112
-rw-r--r--shaders/skia/34-98.shader_test106
-rw-r--r--shaders/skia/34.shader_test77
-rw-r--r--shaders/skia/340-3.shader_test112
-rw-r--r--shaders/skia/340-4.shader_test82
-rw-r--r--shaders/skia/340.shader_test132
-rw-r--r--shaders/skia/343-2.shader_test34
-rw-r--r--shaders/skia/343-3.shader_test49
-rw-r--r--shaders/skia/343.shader_test61
-rw-r--r--shaders/skia/346-2.shader_test177
-rw-r--r--shaders/skia/346-3.shader_test52
-rw-r--r--shaders/skia/346-4.shader_test94
-rw-r--r--shaders/skia/346.shader_test152
-rw-r--r--shaders/skia/349-2.shader_test22
-rw-r--r--shaders/skia/349-3.shader_test44
-rw-r--r--shaders/skia/349-4.shader_test197
-rw-r--r--shaders/skia/349.shader_test81
-rw-r--r--shaders/skia/352-2.shader_test342
-rw-r--r--shaders/skia/352-4.shader_test93
-rw-r--r--shaders/skia/352.shader_test145
-rw-r--r--shaders/skia/355-2.shader_test352
-rw-r--r--shaders/skia/355-3.shader_test47
-rw-r--r--shaders/skia/355-4.shader_test222
-rw-r--r--shaders/skia/355.shader_test68
-rw-r--r--shaders/skia/358-2.shader_test149
-rw-r--r--shaders/skia/358-3.shader_test43
-rw-r--r--shaders/skia/358-4.shader_test57
-rw-r--r--shaders/skia/358.shader_test165
-rw-r--r--shaders/skia/361-2.shader_test376
-rw-r--r--shaders/skia/361-3.shader_test40
-rw-r--r--shaders/skia/361-4.shader_test58
-rw-r--r--shaders/skia/361.shader_test88
-rw-r--r--shaders/skia/364-2.shader_test56
-rw-r--r--shaders/skia/364-4.shader_test86
-rw-r--r--shaders/skia/364.shader_test140
-rw-r--r--shaders/skia/367-2.shader_test63
-rw-r--r--shaders/skia/367-3.shader_test46
-rw-r--r--shaders/skia/367-4.shader_test223
-rw-r--r--shaders/skia/367.shader_test69
-rw-r--r--shaders/skia/37-1.shader_test39
-rw-r--r--shaders/skia/37-10.shader_test62
-rw-r--r--shaders/skia/37-15.shader_test111
-rw-r--r--shaders/skia/37-16.shader_test116
-rw-r--r--shaders/skia/37-17.shader_test99
-rw-r--r--shaders/skia/37-18.shader_test107
-rw-r--r--shaders/skia/37-23.shader_test44
-rw-r--r--shaders/skia/37-24.shader_test110
-rw-r--r--shaders/skia/37-26.shader_test44
-rw-r--r--shaders/skia/37-28.shader_test41
-rw-r--r--shaders/skia/37-29.shader_test135
-rw-r--r--shaders/skia/37-3.shader_test50
-rw-r--r--shaders/skia/37-30.shader_test67
-rw-r--r--shaders/skia/37-31.shader_test133
-rw-r--r--shaders/skia/37-39.shader_test41
-rw-r--r--shaders/skia/37-4.shader_test82
-rw-r--r--shaders/skia/37-48.shader_test37
-rw-r--r--shaders/skia/37-5.shader_test55
-rw-r--r--shaders/skia/37-50.shader_test87
-rw-r--r--shaders/skia/37-51.shader_test103
-rw-r--r--shaders/skia/37-52.shader_test121
-rw-r--r--shaders/skia/37-54.shader_test136
-rw-r--r--shaders/skia/37-56.shader_test134
-rw-r--r--shaders/skia/37-58.shader_test137
-rw-r--r--shaders/skia/37-6.shader_test90
-rw-r--r--shaders/skia/37-60.shader_test120
-rw-r--r--shaders/skia/37-61.shader_test136
-rw-r--r--shaders/skia/37-62.shader_test99
-rw-r--r--shaders/skia/37-63.shader_test115
-rw-r--r--shaders/skia/37-65.shader_test114
-rw-r--r--shaders/skia/37-69.shader_test54
-rw-r--r--shaders/skia/37-71.shader_test67
-rw-r--r--shaders/skia/37-72.shader_test80
-rw-r--r--shaders/skia/37-73.shader_test49
-rw-r--r--shaders/skia/37-75.shader_test92
-rw-r--r--shaders/skia/37-76.shader_test124
-rw-r--r--shaders/skia/37-78.shader_test44
-rw-r--r--shaders/skia/37-8.shader_test65
-rw-r--r--shaders/skia/37-84.shader_test141
-rw-r--r--shaders/skia/37-86.shader_test101
-rw-r--r--shaders/skia/37-88.shader_test95
-rw-r--r--shaders/skia/37-93.shader_test44
-rw-r--r--shaders/skia/37-95.shader_test83
-rw-r--r--shaders/skia/37-96.shader_test71
-rw-r--r--shaders/skia/37.shader_test92
-rw-r--r--shaders/skia/370-2.shader_test307
-rw-r--r--shaders/skia/370-3.shader_test46
-rw-r--r--shaders/skia/370-4.shader_test83
-rw-r--r--shaders/skia/370.shader_test160
-rw-r--r--shaders/skia/373-2.shader_test46
-rw-r--r--shaders/skia/373-3.shader_test47
-rw-r--r--shaders/skia/373-4.shader_test80
-rw-r--r--shaders/skia/373.shader_test89
-rw-r--r--shaders/skia/376-2.shader_test115
-rw-r--r--shaders/skia/376-3.shader_test43
-rw-r--r--shaders/skia/376-4.shader_test77
-rw-r--r--shaders/skia/376.shader_test153
-rw-r--r--shaders/skia/379-2.shader_test152
-rw-r--r--shaders/skia/379-3.shader_test47
-rw-r--r--shaders/skia/379-4.shader_test83
-rw-r--r--shaders/skia/379.shader_test76
-rw-r--r--shaders/skia/382-2.shader_test46
-rw-r--r--shaders/skia/382-3.shader_test50
-rw-r--r--shaders/skia/382-4.shader_test72
-rw-r--r--shaders/skia/382.shader_test173
-rw-r--r--shaders/skia/385-2.shader_test79
-rw-r--r--shaders/skia/385-4.shader_test73
-rw-r--r--shaders/skia/385.shader_test96
-rw-r--r--shaders/skia/388-2.shader_test191
-rw-r--r--shaders/skia/388-4.shader_test79
-rw-r--r--shaders/skia/388.shader_test137
-rw-r--r--shaders/skia/391-2.shader_test169
-rw-r--r--shaders/skia/391-3.shader_test40
-rw-r--r--shaders/skia/391-4.shader_test65
-rw-r--r--shaders/skia/391.shader_test66
-rw-r--r--shaders/skia/394-4.shader_test100
-rw-r--r--shaders/skia/394.shader_test149
-rw-r--r--shaders/skia/397-2.shader_test206
-rw-r--r--shaders/skia/397-3.shader_test40
-rw-r--r--shaders/skia/397-4.shader_test106
-rw-r--r--shaders/skia/397.shader_test78
-rw-r--r--shaders/skia/4-1.shader_test48
-rw-r--r--shaders/skia/4-110.shader_test63
-rw-r--r--shaders/skia/4-113.shader_test67
-rw-r--r--shaders/skia/4-117.shader_test51
-rw-r--r--shaders/skia/4-12.shader_test21
-rw-r--r--shaders/skia/4-121.shader_test136
-rw-r--r--shaders/skia/4-123.shader_test38
-rw-r--r--shaders/skia/4-128.shader_test45
-rw-r--r--shaders/skia/4-130.shader_test97
-rw-r--r--shaders/skia/4-131.shader_test54
-rw-r--r--shaders/skia/4-132.shader_test50
-rw-r--r--shaders/skia/4-14.shader_test105
-rw-r--r--shaders/skia/4-143.shader_test51
-rw-r--r--shaders/skia/4-16.shader_test45
-rw-r--r--shaders/skia/4-168.shader_test35
-rw-r--r--shaders/skia/4-169.shader_test55
-rw-r--r--shaders/skia/4-172.shader_test68
-rw-r--r--shaders/skia/4-193.shader_test43
-rw-r--r--shaders/skia/4-207.shader_test129
-rw-r--r--shaders/skia/4-21.shader_test41
-rw-r--r--shaders/skia/4-210.shader_test78
-rw-r--r--shaders/skia/4-213.shader_test143
-rw-r--r--shaders/skia/4-22.shader_test58
-rw-r--r--shaders/skia/4-226.shader_test137
-rw-r--r--shaders/skia/4-23.shader_test131
-rw-r--r--shaders/skia/4-24.shader_test104
-rw-r--r--shaders/skia/4-243.shader_test43
-rw-r--r--shaders/skia/4-244.shader_test43
-rw-r--r--shaders/skia/4-250.shader_test87
-rw-r--r--shaders/skia/4-26.shader_test33
-rw-r--r--shaders/skia/4-267.shader_test52
-rw-r--r--shaders/skia/4-286.shader_test101
-rw-r--r--shaders/skia/4-294.shader_test95
-rw-r--r--shaders/skia/4-297.shader_test63
-rw-r--r--shaders/skia/4-298.shader_test79
-rw-r--r--shaders/skia/4-299.shader_test83
-rw-r--r--shaders/skia/4-3.shader_test42
-rw-r--r--shaders/skia/4-30.shader_test40
-rw-r--r--shaders/skia/4-300.shader_test99
-rw-r--r--shaders/skia/4-302.shader_test87
-rw-r--r--shaders/skia/4-304.shader_test83
-rw-r--r--shaders/skia/4-305.shader_test102
-rw-r--r--shaders/skia/4-306.shader_test109
-rw-r--r--shaders/skia/4-307.shader_test98
-rw-r--r--shaders/skia/4-308.shader_test100
-rw-r--r--shaders/skia/4-309.shader_test107
-rw-r--r--shaders/skia/4-310.shader_test96
-rw-r--r--shaders/skia/4-311.shader_test103
-rw-r--r--shaders/skia/4-313.shader_test99
-rw-r--r--shaders/skia/4-315.shader_test90
-rw-r--r--shaders/skia/4-316.shader_test90
-rw-r--r--shaders/skia/4-320.shader_test117
-rw-r--r--shaders/skia/4-321.shader_test102
-rw-r--r--shaders/skia/4-322.shader_test118
-rw-r--r--shaders/skia/4-323.shader_test86
-rw-r--r--shaders/skia/4-324.shader_test102
-rw-r--r--shaders/skia/4-325.shader_test65
-rw-r--r--shaders/skia/4-326.shader_test81
-rw-r--r--shaders/skia/4-332.shader_test63
-rw-r--r--shaders/skia/4-340.shader_test104
-rw-r--r--shaders/skia/4-348.shader_test68
-rw-r--r--shaders/skia/4-35.shader_test64
-rw-r--r--shaders/skia/4-37.shader_test58
-rw-r--r--shaders/skia/4-382.shader_test61
-rw-r--r--shaders/skia/4-386.shader_test34
-rw-r--r--shaders/skia/4-395.shader_test69
-rw-r--r--shaders/skia/4-4.shader_test93
-rw-r--r--shaders/skia/4-422.shader_test47
-rw-r--r--shaders/skia/4-426.shader_test51
-rw-r--r--shaders/skia/4-427.shader_test53
-rw-r--r--shaders/skia/4-442.shader_test102
-rw-r--r--shaders/skia/4-444.shader_test121
-rw-r--r--shaders/skia/4-447.shader_test52
-rw-r--r--shaders/skia/4-449.shader_test23
-rw-r--r--shaders/skia/4-452.shader_test96
-rw-r--r--shaders/skia/4-453.shader_test121
-rw-r--r--shaders/skia/4-456.shader_test89
-rw-r--r--shaders/skia/4-466.shader_test130
-rw-r--r--shaders/skia/4-467.shader_test121
-rw-r--r--shaders/skia/4-468.shader_test85
-rw-r--r--shaders/skia/4-470.shader_test99
-rw-r--r--shaders/skia/4-471.shader_test89
-rw-r--r--shaders/skia/4-475.shader_test31
-rw-r--r--shaders/skia/4-482.shader_test61
-rw-r--r--shaders/skia/4-488.shader_test68
-rw-r--r--shaders/skia/4-490.shader_test65
-rw-r--r--shaders/skia/4-496.shader_test61
-rw-r--r--shaders/skia/4-5.shader_test52
-rw-r--r--shaders/skia/4-50.shader_test44
-rw-r--r--shaders/skia/4-503.shader_test71
-rw-r--r--shaders/skia/4-504.shader_test52
-rw-r--r--shaders/skia/4-515.shader_test117
-rw-r--r--shaders/skia/4-517.shader_test77
-rw-r--r--shaders/skia/4-52.shader_test34
-rw-r--r--shaders/skia/4-53.shader_test67
-rw-r--r--shaders/skia/4-547.shader_test44
-rw-r--r--shaders/skia/4-564.shader_test74
-rw-r--r--shaders/skia/4-574.shader_test76
-rw-r--r--shaders/skia/4-58.shader_test42
-rw-r--r--shaders/skia/4-590.shader_test55
-rw-r--r--shaders/skia/4-596.shader_test45
-rw-r--r--shaders/skia/4-597.shader_test51
-rw-r--r--shaders/skia/4-6.shader_test66
-rw-r--r--shaders/skia/4-601.shader_test87
-rw-r--r--shaders/skia/4-603.shader_test39
-rw-r--r--shaders/skia/4-605.shader_test51
-rw-r--r--shaders/skia/4-616.shader_test33
-rw-r--r--shaders/skia/4-623.shader_test51
-rw-r--r--shaders/skia/4-625.shader_test143
-rw-r--r--shaders/skia/4-63.shader_test90
-rw-r--r--shaders/skia/4-65.shader_test90
-rw-r--r--shaders/skia/4-66.shader_test98
-rw-r--r--shaders/skia/4-67.shader_test54
-rw-r--r--shaders/skia/4-7.shader_test35
-rw-r--r--shaders/skia/4-73.shader_test46
-rw-r--r--shaders/skia/4-77.shader_test56
-rw-r--r--shaders/skia/4-86.shader_test66
-rw-r--r--shaders/skia/4-90.shader_test50
-rw-r--r--shaders/skia/4-93.shader_test44
-rw-r--r--shaders/skia/4-97.shader_test59
-rw-r--r--shaders/skia/4.shader_test48
-rw-r--r--shaders/skia/40-1.shader_test49
-rw-r--r--shaders/skia/40-12.shader_test63
-rw-r--r--shaders/skia/40-14.shader_test111
-rw-r--r--shaders/skia/40-15.shader_test131
-rw-r--r--shaders/skia/40-16.shader_test62
-rw-r--r--shaders/skia/40-17.shader_test90
-rw-r--r--shaders/skia/40-2.shader_test50
-rw-r--r--shaders/skia/40-22.shader_test44
-rw-r--r--shaders/skia/40-23.shader_test88
-rw-r--r--shaders/skia/40-25.shader_test41
-rw-r--r--shaders/skia/40-26.shader_test77
-rw-r--r--shaders/skia/40-27.shader_test44
-rw-r--r--shaders/skia/40-28.shader_test135
-rw-r--r--shaders/skia/40-29.shader_test67
-rw-r--r--shaders/skia/40-3.shader_test102
-rw-r--r--shaders/skia/40-30.shader_test114
-rw-r--r--shaders/skia/40-36.shader_test44
-rw-r--r--shaders/skia/40-43.shader_test106
-rw-r--r--shaders/skia/40-45.shader_test39
-rw-r--r--shaders/skia/40-48.shader_test109
-rw-r--r--shaders/skia/40-49.shader_test124
-rw-r--r--shaders/skia/40-5.shader_test90
-rw-r--r--shaders/skia/40-50.shader_test99
-rw-r--r--shaders/skia/40-51.shader_test139
-rw-r--r--shaders/skia/40-52.shader_test114
-rw-r--r--shaders/skia/40-53.shader_test137
-rw-r--r--shaders/skia/40-54.shader_test112
-rw-r--r--shaders/skia/40-55.shader_test140
-rw-r--r--shaders/skia/40-56.shader_test115
-rw-r--r--shaders/skia/40-57.shader_test133
-rw-r--r--shaders/skia/40-58.shader_test149
-rw-r--r--shaders/skia/40-59.shader_test112
-rw-r--r--shaders/skia/40-60.shader_test128
-rw-r--r--shaders/skia/40-67.shader_test67
-rw-r--r--shaders/skia/40-68.shader_test82
-rw-r--r--shaders/skia/40-69.shader_test47
-rw-r--r--shaders/skia/40-7.shader_test132
-rw-r--r--shaders/skia/40-70.shader_test64
-rw-r--r--shaders/skia/40-71.shader_test44
-rw-r--r--shaders/skia/40-72.shader_test124
-rw-r--r--shaders/skia/40-74.shader_test56
-rw-r--r--shaders/skia/40-77.shader_test108
-rw-r--r--shaders/skia/40-79.shader_test68
-rw-r--r--shaders/skia/40-85.shader_test38
-rw-r--r--shaders/skia/40-86.shader_test54
-rw-r--r--shaders/skia/40-87.shader_test84
-rw-r--r--shaders/skia/40-88.shader_test87
-rw-r--r--shaders/skia/40-9.shader_test62
-rw-r--r--shaders/skia/40.shader_test86
-rw-r--r--shaders/skia/400-2.shader_test49
-rw-r--r--shaders/skia/400-3.shader_test47
-rw-r--r--shaders/skia/400-4.shader_test72
-rw-r--r--shaders/skia/400.shader_test150
-rw-r--r--shaders/skia/403-2.shader_test88
-rw-r--r--shaders/skia/403-3.shader_test44
-rw-r--r--shaders/skia/403-4.shader_test73
-rw-r--r--shaders/skia/403.shader_test73
-rw-r--r--shaders/skia/406-2.shader_test683
-rw-r--r--shaders/skia/406-3.shader_test51
-rw-r--r--shaders/skia/406-4.shader_test110
-rw-r--r--shaders/skia/406.shader_test162
-rw-r--r--shaders/skia/409-2.shader_test153
-rw-r--r--shaders/skia/409-3.shader_test50
-rw-r--r--shaders/skia/409-4.shader_test110
-rw-r--r--shaders/skia/409.shader_test85
-rw-r--r--shaders/skia/412-2.shader_test92
-rw-r--r--shaders/skia/412-3.shader_test65
-rw-r--r--shaders/skia/412-4.shader_test75
-rw-r--r--shaders/skia/412.shader_test137
-rw-r--r--shaders/skia/415-3.shader_test60
-rw-r--r--shaders/skia/415-4.shader_test81
-rw-r--r--shaders/skia/415.shader_test66
-rw-r--r--shaders/skia/418-2.shader_test50
-rw-r--r--shaders/skia/418-3.shader_test48
-rw-r--r--shaders/skia/418-4.shader_test104
-rw-r--r--shaders/skia/418.shader_test154
-rw-r--r--shaders/skia/421-2.shader_test23
-rw-r--r--shaders/skia/421-3.shader_test51
-rw-r--r--shaders/skia/421-4.shader_test117
-rw-r--r--shaders/skia/421.shader_test83
-rw-r--r--shaders/skia/424-2.shader_test340
-rw-r--r--shaders/skia/424-3.shader_test222
-rw-r--r--shaders/skia/424-4.shader_test111
-rw-r--r--shaders/skia/424.shader_test150
-rw-r--r--shaders/skia/427-2.shader_test93
-rw-r--r--shaders/skia/427-3.shader_test59
-rw-r--r--shaders/skia/427-4.shader_test265
-rw-r--r--shaders/skia/427.shader_test73
-rw-r--r--shaders/skia/43-1.shader_test31
-rw-r--r--shaders/skia/43-12.shader_test58
-rw-r--r--shaders/skia/43-14.shader_test111
-rw-r--r--shaders/skia/43-15.shader_test128
-rw-r--r--shaders/skia/43-17.shader_test122
-rw-r--r--shaders/skia/43-2.shader_test50
-rw-r--r--shaders/skia/43-21.shader_test44
-rw-r--r--shaders/skia/43-22.shader_test91
-rw-r--r--shaders/skia/43-24.shader_test44
-rw-r--r--shaders/skia/43-25.shader_test75
-rw-r--r--shaders/skia/43-26.shader_test41
-rw-r--r--shaders/skia/43-27.shader_test135
-rw-r--r--shaders/skia/43-28.shader_test67
-rw-r--r--shaders/skia/43-3.shader_test102
-rw-r--r--shaders/skia/43-35.shader_test41
-rw-r--r--shaders/skia/43-44.shader_test52
-rw-r--r--shaders/skia/43-45.shader_test106
-rw-r--r--shaders/skia/43-46.shader_test122
-rw-r--r--shaders/skia/43-47.shader_test108
-rw-r--r--shaders/skia/43-48.shader_test111
-rw-r--r--shaders/skia/43-49.shader_test123
-rw-r--r--shaders/skia/43-5.shader_test101
-rw-r--r--shaders/skia/43-50.shader_test126
-rw-r--r--shaders/skia/43-51.shader_test121
-rw-r--r--shaders/skia/43-52.shader_test124
-rw-r--r--shaders/skia/43-53.shader_test124
-rw-r--r--shaders/skia/43-54.shader_test127
-rw-r--r--shaders/skia/43-55.shader_test144
-rw-r--r--shaders/skia/43-56.shader_test160
-rw-r--r--shaders/skia/43-57.shader_test123
-rw-r--r--shaders/skia/43-58.shader_test139
-rw-r--r--shaders/skia/43-65.shader_test67
-rw-r--r--shaders/skia/43-66.shader_test95
-rw-r--r--shaders/skia/43-67.shader_test52
-rw-r--r--shaders/skia/43-68.shader_test56
-rw-r--r--shaders/skia/43-69.shader_test41
-rw-r--r--shaders/skia/43-7.shader_test61
-rw-r--r--shaders/skia/43-70.shader_test121
-rw-r--r--shaders/skia/43-72.shader_test56
-rw-r--r--shaders/skia/43-74.shader_test97
-rw-r--r--shaders/skia/43-76.shader_test57
-rw-r--r--shaders/skia/43-83.shader_test45
-rw-r--r--shaders/skia/43-84.shader_test84
-rw-r--r--shaders/skia/43-85.shader_test82
-rw-r--r--shaders/skia/43-9.shader_test57
-rw-r--r--shaders/skia/43.shader_test52
-rw-r--r--shaders/skia/430-2.shader_test38
-rw-r--r--shaders/skia/430.shader_test167
-rw-r--r--shaders/skia/433-2.shader_test149
-rw-r--r--shaders/skia/433.shader_test90
-rw-r--r--shaders/skia/436-2.shader_test268
-rw-r--r--shaders/skia/436-4.shader_test75
-rw-r--r--shaders/skia/436.shader_test147
-rw-r--r--shaders/skia/439-2.shader_test125
-rw-r--r--shaders/skia/439-4.shader_test227
-rw-r--r--shaders/skia/439.shader_test76
-rw-r--r--shaders/skia/442-2.shader_test264
-rw-r--r--shaders/skia/442-4.shader_test82
-rw-r--r--shaders/skia/442.shader_test167
-rw-r--r--shaders/skia/445-2.shader_test26
-rw-r--r--shaders/skia/445-3.shader_test58
-rw-r--r--shaders/skia/445-4.shader_test69
-rw-r--r--shaders/skia/445.shader_test96
-rw-r--r--shaders/skia/448-2.shader_test317
-rw-r--r--shaders/skia/448-4.shader_test79
-rw-r--r--shaders/skia/448.shader_test160
-rw-r--r--shaders/skia/451-2.shader_test201
-rw-r--r--shaders/skia/451-4.shader_test224
-rw-r--r--shaders/skia/451.shader_test83
-rw-r--r--shaders/skia/454-2.shader_test30
-rw-r--r--shaders/skia/454-4.shader_test68
-rw-r--r--shaders/skia/454.shader_test180
-rw-r--r--shaders/skia/457-2.shader_test57
-rw-r--r--shaders/skia/457-4.shader_test85
-rw-r--r--shaders/skia/457.shader_test103
-rw-r--r--shaders/skia/46-1.shader_test41
-rw-r--r--shaders/skia/46-10.shader_test62
-rw-r--r--shaders/skia/46-12.shader_test58
-rw-r--r--shaders/skia/46-14.shader_test108
-rw-r--r--shaders/skia/46-15.shader_test120
-rw-r--r--shaders/skia/46-16.shader_test44
-rw-r--r--shaders/skia/46-17.shader_test105
-rw-r--r--shaders/skia/46-18.shader_test107
-rw-r--r--shaders/skia/46-2.shader_test50
-rw-r--r--shaders/skia/46-21.shader_test44
-rw-r--r--shaders/skia/46-23.shader_test137
-rw-r--r--shaders/skia/46-24.shader_test41
-rw-r--r--shaders/skia/46-25.shader_test79
-rw-r--r--shaders/skia/46-26.shader_test44
-rw-r--r--shaders/skia/46-27.shader_test135
-rw-r--r--shaders/skia/46-28.shader_test67
-rw-r--r--shaders/skia/46-3.shader_test117
-rw-r--r--shaders/skia/46-35.shader_test44
-rw-r--r--shaders/skia/46-42.shader_test106
-rw-r--r--shaders/skia/46-43.shader_test53
-rw-r--r--shaders/skia/46-44.shader_test54
-rw-r--r--shaders/skia/46-45.shader_test117
-rw-r--r--shaders/skia/46-46.shader_test133
-rw-r--r--shaders/skia/46-47.shader_test111
-rw-r--r--shaders/skia/46-48.shader_test126
-rw-r--r--shaders/skia/46-49.shader_test124
-rw-r--r--shaders/skia/46-5.shader_test101
-rw-r--r--shaders/skia/46-50.shader_test127
-rw-r--r--shaders/skia/46-53.shader_test67
-rw-r--r--shaders/skia/46-54.shader_test97
-rw-r--r--shaders/skia/46-56.shader_test56
-rw-r--r--shaders/skia/46-57.shader_test44
-rw-r--r--shaders/skia/46-58.shader_test127
-rw-r--r--shaders/skia/46-60.shader_test123
-rw-r--r--shaders/skia/46-62.shader_test83
-rw-r--r--shaders/skia/46-68.shader_test63
-rw-r--r--shaders/skia/46-69.shader_test726
-rw-r--r--shaders/skia/46-7.shader_test152
-rw-r--r--shaders/skia/46-70.shader_test84
-rw-r--r--shaders/skia/46-71.shader_test68
-rw-r--r--shaders/skia/46-9.shader_test71
-rw-r--r--shaders/skia/46.shader_test57
-rw-r--r--shaders/skia/460-4.shader_test69
-rw-r--r--shaders/skia/460.shader_test144
-rw-r--r--shaders/skia/463-4.shader_test75
-rw-r--r--shaders/skia/463.shader_test73
-rw-r--r--shaders/skia/466-2.shader_test30
-rw-r--r--shaders/skia/466-4.shader_test66
-rw-r--r--shaders/skia/466.shader_test164
-rw-r--r--shaders/skia/469-2.shader_test26
-rw-r--r--shaders/skia/469-4.shader_test69
-rw-r--r--shaders/skia/469.shader_test93
-rw-r--r--shaders/skia/472-2.shader_test186
-rw-r--r--shaders/skia/472-4.shader_test218
-rw-r--r--shaders/skia/472.shader_test157
-rw-r--r--shaders/skia/475-2.shader_test56
-rw-r--r--shaders/skia/475-4.shader_test82
-rw-r--r--shaders/skia/475.shader_test80
-rw-r--r--shaders/skia/478-2.shader_test161
-rw-r--r--shaders/skia/478-4.shader_test64
-rw-r--r--shaders/skia/478.shader_test177
-rw-r--r--shaders/skia/481-2.shader_test112
-rw-r--r--shaders/skia/481-4.shader_test65
-rw-r--r--shaders/skia/481.shader_test100
-rw-r--r--shaders/skia/484-2.shader_test459
-rw-r--r--shaders/skia/484-4.shader_test63
-rw-r--r--shaders/skia/484.shader_test143
-rw-r--r--shaders/skia/487-2.shader_test300
-rw-r--r--shaders/skia/487-4.shader_test105
-rw-r--r--shaders/skia/487.shader_test72
-rw-r--r--shaders/skia/49-1.shader_test51
-rw-r--r--shaders/skia/49-12.shader_test63
-rw-r--r--shaders/skia/49-14.shader_test111
-rw-r--r--shaders/skia/49-15.shader_test123
-rw-r--r--shaders/skia/49-18.shader_test131
-rw-r--r--shaders/skia/49-2.shader_test58
-rw-r--r--shaders/skia/49-21.shader_test48
-rw-r--r--shaders/skia/49-22.shader_test101
-rw-r--r--shaders/skia/49-23.shader_test44
-rw-r--r--shaders/skia/49-24.shader_test89
-rw-r--r--shaders/skia/49-25.shader_test41
-rw-r--r--shaders/skia/49-26.shader_test135
-rw-r--r--shaders/skia/49-27.shader_test67
-rw-r--r--shaders/skia/49-28.shader_test44
-rw-r--r--shaders/skia/49-3.shader_test77
-rw-r--r--shaders/skia/49-34.shader_test41
-rw-r--r--shaders/skia/49-35.shader_test68
-rw-r--r--shaders/skia/49-4.shader_test52
-rw-r--r--shaders/skia/49-42.shader_test50
-rw-r--r--shaders/skia/49-43.shader_test52
-rw-r--r--shaders/skia/49-44.shader_test93
-rw-r--r--shaders/skia/49-45.shader_test109
-rw-r--r--shaders/skia/49-46.shader_test104
-rw-r--r--shaders/skia/49-47.shader_test119
-rw-r--r--shaders/skia/49-48.shader_test117
-rw-r--r--shaders/skia/49-49.shader_test120
-rw-r--r--shaders/skia/49-5.shader_test78
-rw-r--r--shaders/skia/49-51.shader_test66
-rw-r--r--shaders/skia/49-52.shader_test67
-rw-r--r--shaders/skia/49-53.shader_test69
-rw-r--r--shaders/skia/49-54.shader_test41
-rw-r--r--shaders/skia/49-55.shader_test121
-rw-r--r--shaders/skia/49-56.shader_test143
-rw-r--r--shaders/skia/49-58.shader_test103
-rw-r--r--shaders/skia/49-60.shader_test97
-rw-r--r--shaders/skia/49-64.shader_test63
-rw-r--r--shaders/skia/49-65.shader_test30
-rw-r--r--shaders/skia/49-66.shader_test84
-rw-r--r--shaders/skia/49-67.shader_test92
-rw-r--r--shaders/skia/49-7.shader_test81
-rw-r--r--shaders/skia/49-9.shader_test62
-rw-r--r--shaders/skia/49.shader_test52
-rw-r--r--shaders/skia/490-2.shader_test436
-rw-r--r--shaders/skia/490-3.shader_test53
-rw-r--r--shaders/skia/490-4.shader_test74
-rw-r--r--shaders/skia/490.shader_test163
-rw-r--r--shaders/skia/493-2.shader_test35
-rw-r--r--shaders/skia/493-3.shader_test100
-rw-r--r--shaders/skia/493-4.shader_test302
-rw-r--r--shaders/skia/493.shader_test92
-rw-r--r--shaders/skia/496-2.shader_test76
-rw-r--r--shaders/skia/496-3.shader_test86
-rw-r--r--shaders/skia/496-4.shader_test68
-rw-r--r--shaders/skia/496.shader_test156
-rw-r--r--shaders/skia/499-2.shader_test137
-rw-r--r--shaders/skia/499-3.shader_test115
-rw-r--r--shaders/skia/499-4.shader_test55
-rw-r--r--shaders/skia/499.shader_test79
-rw-r--r--shaders/skia/502-2.shader_test146
-rw-r--r--shaders/skia/502-3.shader_test103
-rw-r--r--shaders/skia/502-4.shader_test237
-rw-r--r--shaders/skia/502.shader_test176
-rw-r--r--shaders/skia/505-2.shader_test493
-rw-r--r--shaders/skia/505-3.shader_test89
-rw-r--r--shaders/skia/505-4.shader_test110
-rw-r--r--shaders/skia/505.shader_test99
-rw-r--r--shaders/skia/508-2.shader_test92
-rw-r--r--shaders/skia/508-3.shader_test105
-rw-r--r--shaders/skia/508-4.shader_test81
-rw-r--r--shaders/skia/508.shader_test150
-rw-r--r--shaders/skia/511-2.shader_test335
-rw-r--r--shaders/skia/511-3.shader_test106
-rw-r--r--shaders/skia/511-4.shader_test71
-rw-r--r--shaders/skia/511.shader_test79
-rw-r--r--shaders/skia/514-2.shader_test232
-rw-r--r--shaders/skia/514-3.shader_test101
-rw-r--r--shaders/skia/514-4.shader_test95
-rw-r--r--shaders/skia/514.shader_test170
-rw-r--r--shaders/skia/517-2.shader_test372
-rw-r--r--shaders/skia/517-3.shader_test86
-rw-r--r--shaders/skia/517-4.shader_test61
-rw-r--r--shaders/skia/517.shader_test99
-rw-r--r--shaders/skia/52-1.shader_test55
-rw-r--r--shaders/skia/52-11.shader_test60
-rw-r--r--shaders/skia/52-13.shader_test111
-rw-r--r--shaders/skia/52-14.shader_test119
-rw-r--r--shaders/skia/52-2.shader_test77
-rw-r--r--shaders/skia/52-21.shader_test94
-rw-r--r--shaders/skia/52-22.shader_test41
-rw-r--r--shaders/skia/52-23.shader_test78
-rw-r--r--shaders/skia/52-24.shader_test44
-rw-r--r--shaders/skia/52-25.shader_test135
-rw-r--r--shaders/skia/52-26.shader_test75
-rw-r--r--shaders/skia/52-27.shader_test41
-rw-r--r--shaders/skia/52-3.shader_test42
-rw-r--r--shaders/skia/52-33.shader_test44
-rw-r--r--shaders/skia/52-4.shader_test78
-rw-r--r--shaders/skia/52-41.shader_test54
-rw-r--r--shaders/skia/52-42.shader_test104
-rw-r--r--shaders/skia/52-43.shader_test120
-rw-r--r--shaders/skia/52-44.shader_test110
-rw-r--r--shaders/skia/52-45.shader_test125
-rw-r--r--shaders/skia/52-46.shader_test123
-rw-r--r--shaders/skia/52-47.shader_test126
-rw-r--r--shaders/skia/52-49.shader_test75
-rw-r--r--shaders/skia/52-50.shader_test69
-rw-r--r--shaders/skia/52-51.shader_test102
-rw-r--r--shaders/skia/52-52.shader_test127
-rw-r--r--shaders/skia/52-53.shader_test132
-rw-r--r--shaders/skia/52-55.shader_test92
-rw-r--r--shaders/skia/52-57.shader_test86
-rw-r--r--shaders/skia/52-6.shader_test145
-rw-r--r--shaders/skia/52-61.shader_test176
-rw-r--r--shaders/skia/52-62.shader_test84
-rw-r--r--shaders/skia/52-63.shader_test97
-rw-r--r--shaders/skia/52-8.shader_test59
-rw-r--r--shaders/skia/52.shader_test52
-rw-r--r--shaders/skia/520-2.shader_test31
-rw-r--r--shaders/skia/520-3.shader_test114
-rw-r--r--shaders/skia/520-4.shader_test64
-rw-r--r--shaders/skia/520.shader_test163
-rw-r--r--shaders/skia/523-3.shader_test106
-rw-r--r--shaders/skia/523-4.shader_test79
-rw-r--r--shaders/skia/523.shader_test86
-rw-r--r--shaders/skia/526-2.shader_test173
-rw-r--r--shaders/skia/526-3.shader_test88
-rw-r--r--shaders/skia/526-4.shader_test48
-rw-r--r--shaders/skia/526.shader_test183
-rw-r--r--shaders/skia/529-2.shader_test82
-rw-r--r--shaders/skia/529-3.shader_test78
-rw-r--r--shaders/skia/529-4.shader_test59
-rw-r--r--shaders/skia/529.shader_test106
-rw-r--r--shaders/skia/532-3.shader_test105
-rw-r--r--shaders/skia/532-4.shader_test67
-rw-r--r--shaders/skia/532.shader_test132
-rw-r--r--shaders/skia/535-2.shader_test42
-rw-r--r--shaders/skia/535-3.shader_test112
-rw-r--r--shaders/skia/535-4.shader_test131
-rw-r--r--shaders/skia/535.shader_test61
-rw-r--r--shaders/skia/538-2.shader_test272
-rw-r--r--shaders/skia/538-3.shader_test77
-rw-r--r--shaders/skia/538-4.shader_test85
-rw-r--r--shaders/skia/538.shader_test152
-rw-r--r--shaders/skia/541-2.shader_test346
-rw-r--r--shaders/skia/541-3.shader_test107
-rw-r--r--shaders/skia/541-4.shader_test71
-rw-r--r--shaders/skia/541.shader_test81
-rw-r--r--shaders/skia/544-2.shader_test176
-rw-r--r--shaders/skia/544-3.shader_test95
-rw-r--r--shaders/skia/544-4.shader_test71
-rw-r--r--shaders/skia/544.shader_test145
-rw-r--r--shaders/skia/547-3.shader_test112
-rw-r--r--shaders/skia/547-4.shader_test45
-rw-r--r--shaders/skia/547.shader_test68
-rw-r--r--shaders/skia/55-1.shader_test55
-rw-r--r--shaders/skia/55-13.shader_test111
-rw-r--r--shaders/skia/55-14.shader_test116
-rw-r--r--shaders/skia/55-17.shader_test65
-rw-r--r--shaders/skia/55-2.shader_test77
-rw-r--r--shaders/skia/55-20.shader_test50
-rw-r--r--shaders/skia/55-21.shader_test82
-rw-r--r--shaders/skia/55-22.shader_test41
-rw-r--r--shaders/skia/55-23.shader_test135
-rw-r--r--shaders/skia/55-24.shader_test72
-rw-r--r--shaders/skia/55-25.shader_test44
-rw-r--r--shaders/skia/55-30.shader_test41
-rw-r--r--shaders/skia/55-31.shader_test91
-rw-r--r--shaders/skia/55-36.shader_test300
-rw-r--r--shaders/skia/55-38.shader_test90
-rw-r--r--shaders/skia/55-39.shader_test113
-rw-r--r--shaders/skia/55-4.shader_test89
-rw-r--r--shaders/skia/55-40.shader_test128
-rw-r--r--shaders/skia/55-41.shader_test126
-rw-r--r--shaders/skia/55-42.shader_test129
-rw-r--r--shaders/skia/55-43.shader_test72
-rw-r--r--shaders/skia/55-46.shader_test121
-rw-r--r--shaders/skia/55-54.shader_test48
-rw-r--r--shaders/skia/55-56.shader_test83
-rw-r--r--shaders/skia/55-57.shader_test86
-rw-r--r--shaders/skia/55-6.shader_test68
-rw-r--r--shaders/skia/55.shader_test57
-rw-r--r--shaders/skia/550-3.shader_test118
-rw-r--r--shaders/skia/550-4.shader_test106
-rw-r--r--shaders/skia/550.shader_test165
-rw-r--r--shaders/skia/553-2.shader_test28
-rw-r--r--shaders/skia/553-3.shader_test101
-rw-r--r--shaders/skia/553-4.shader_test261
-rw-r--r--shaders/skia/553.shader_test88
-rw-r--r--shaders/skia/556-2.shader_test154
-rw-r--r--shaders/skia/556-3.shader_test100
-rw-r--r--shaders/skia/556-4.shader_test92
-rw-r--r--shaders/skia/556.shader_test132
-rw-r--r--shaders/skia/559-2.shader_test98
-rw-r--r--shaders/skia/559-3.shader_test121
-rw-r--r--shaders/skia/559-4.shader_test209
-rw-r--r--shaders/skia/559.shader_test61
-rw-r--r--shaders/skia/562-2.shader_test409
-rw-r--r--shaders/skia/562-3.shader_test127
-rw-r--r--shaders/skia/562-4.shader_test84
-rw-r--r--shaders/skia/562.shader_test152
-rw-r--r--shaders/skia/565-2.shader_test26
-rw-r--r--shaders/skia/565-3.shader_test118
-rw-r--r--shaders/skia/565-4.shader_test381
-rw-r--r--shaders/skia/565.shader_test81
-rw-r--r--shaders/skia/568-2.shader_test54
-rw-r--r--shaders/skia/568-3.shader_test101
-rw-r--r--shaders/skia/568-4.shader_test65
-rw-r--r--shaders/skia/568.shader_test145
-rw-r--r--shaders/skia/571-3.shader_test115
-rw-r--r--shaders/skia/571-4.shader_test61
-rw-r--r--shaders/skia/571.shader_test68
-rw-r--r--shaders/skia/574-2.shader_test30
-rw-r--r--shaders/skia/574-3.shader_test130
-rw-r--r--shaders/skia/574-4.shader_test50
-rw-r--r--shaders/skia/574.shader_test165
-rw-r--r--shaders/skia/577-2.shader_test159
-rw-r--r--shaders/skia/577-3.shader_test122
-rw-r--r--shaders/skia/577-4.shader_test63
-rw-r--r--shaders/skia/577.shader_test88
-rw-r--r--shaders/skia/58-1.shader_test65
-rw-r--r--shaders/skia/58-10.shader_test55
-rw-r--r--shaders/skia/58-11.shader_test52
-rw-r--r--shaders/skia/58-12.shader_test44
-rw-r--r--shaders/skia/58-13.shader_test92
-rw-r--r--shaders/skia/58-14.shader_test44
-rw-r--r--shaders/skia/58-15.shader_test135
-rw-r--r--shaders/skia/58-16.shader_test72
-rw-r--r--shaders/skia/58-17.shader_test41
-rw-r--r--shaders/skia/58-2.shader_test117
-rw-r--r--shaders/skia/58-22.shader_test44
-rw-r--r--shaders/skia/58-28.shader_test63
-rw-r--r--shaders/skia/58-29.shader_test74
-rw-r--r--shaders/skia/58-30.shader_test90
-rw-r--r--shaders/skia/58-35.shader_test72
-rw-r--r--shaders/skia/58-37.shader_test44
-rw-r--r--shaders/skia/58-38.shader_test127
-rw-r--r--shaders/skia/58-39.shader_test97
-rw-r--r--shaders/skia/58-4.shader_test89
-rw-r--r--shaders/skia/58-41.shader_test57
-rw-r--r--shaders/skia/58-46.shader_test48
-rw-r--r--shaders/skia/58-47.shader_test115
-rw-r--r--shaders/skia/58-48.shader_test203
-rw-r--r--shaders/skia/58-49.shader_test90
-rw-r--r--shaders/skia/58-6.shader_test165
-rw-r--r--shaders/skia/58-8.shader_test111
-rw-r--r--shaders/skia/58-9.shader_test123
-rw-r--r--shaders/skia/58.shader_test57
-rw-r--r--shaders/skia/580-2.shader_test79
-rw-r--r--shaders/skia/580-3.shader_test61
-rw-r--r--shaders/skia/580-4.shader_test102
-rw-r--r--shaders/skia/580.shader_test132
-rw-r--r--shaders/skia/583-2.shader_test513
-rw-r--r--shaders/skia/583-3.shader_test61
-rw-r--r--shaders/skia/583-4.shader_test45
-rw-r--r--shaders/skia/583.shader_test61
-rw-r--r--shaders/skia/586-2.shader_test145
-rw-r--r--shaders/skia/586-3.shader_test61
-rw-r--r--shaders/skia/586-4.shader_test66
-rw-r--r--shaders/skia/586.shader_test152
-rw-r--r--shaders/skia/589-2.shader_test30
-rw-r--r--shaders/skia/589-3.shader_test61
-rw-r--r--shaders/skia/589-4.shader_test88
-rw-r--r--shaders/skia/589.shader_test81
-rw-r--r--shaders/skia/592-2.shader_test458
-rw-r--r--shaders/skia/592-3.shader_test61
-rw-r--r--shaders/skia/592-4.shader_test97
-rw-r--r--shaders/skia/592.shader_test145
-rw-r--r--shaders/skia/595-2.shader_test274
-rw-r--r--shaders/skia/595-3.shader_test61
-rw-r--r--shaders/skia/595-4.shader_test47
-rw-r--r--shaders/skia/595.shader_test68
-rw-r--r--shaders/skia/598-2.shader_test397
-rw-r--r--shaders/skia/598-3.shader_test57
-rw-r--r--shaders/skia/598-4.shader_test73
-rw-r--r--shaders/skia/598.shader_test165
-rw-r--r--shaders/skia/601-2.shader_test92
-rw-r--r--shaders/skia/601-3.shader_test46
-rw-r--r--shaders/skia/601-4.shader_test183
-rw-r--r--shaders/skia/601.shader_test88
-rw-r--r--shaders/skia/604-2.shader_test90
-rw-r--r--shaders/skia/604-3.shader_test46
-rw-r--r--shaders/skia/604-4.shader_test55
-rw-r--r--shaders/skia/604.shader_test179
-rw-r--r--shaders/skia/607-3.shader_test46
-rw-r--r--shaders/skia/607-4.shader_test105
-rw-r--r--shaders/skia/607.shader_test108
-rw-r--r--shaders/skia/61-1.shader_test62
-rw-r--r--shaders/skia/61-10.shader_test54
-rw-r--r--shaders/skia/61-11.shader_test50
-rw-r--r--shaders/skia/61-12.shader_test75
-rw-r--r--shaders/skia/61-13.shader_test41
-rw-r--r--shaders/skia/61-14.shader_test153
-rw-r--r--shaders/skia/61-15.shader_test82
-rw-r--r--shaders/skia/61-16.shader_test44
-rw-r--r--shaders/skia/61-2.shader_test117
-rw-r--r--shaders/skia/61-21.shader_test41
-rw-r--r--shaders/skia/61-27.shader_test58
-rw-r--r--shaders/skia/61-28.shader_test80
-rw-r--r--shaders/skia/61-29.shader_test96
-rw-r--r--shaders/skia/61-30.shader_test104
-rw-r--r--shaders/skia/61-31.shader_test119
-rw-r--r--shaders/skia/61-32.shader_test117
-rw-r--r--shaders/skia/61-33.shader_test120
-rw-r--r--shaders/skia/61-34.shader_test82
-rw-r--r--shaders/skia/61-35.shader_test41
-rw-r--r--shaders/skia/61-36.shader_test121
-rw-r--r--shaders/skia/61-39.shader_test48
-rw-r--r--shaders/skia/61-45.shader_test72
-rw-r--r--shaders/skia/61-46.shader_test219
-rw-r--r--shaders/skia/61-47.shader_test72
-rw-r--r--shaders/skia/61-5.shader_test88
-rw-r--r--shaders/skia/61-7.shader_test108
-rw-r--r--shaders/skia/61-8.shader_test108
-rw-r--r--shaders/skia/61-9.shader_test60
-rw-r--r--shaders/skia/61.shader_test62
-rw-r--r--shaders/skia/610-2.shader_test101
-rw-r--r--shaders/skia/610-3.shader_test52
-rw-r--r--shaders/skia/610-4.shader_test54
-rw-r--r--shaders/skia/610.shader_test199
-rw-r--r--shaders/skia/613-2.shader_test46
-rw-r--r--shaders/skia/613-3.shader_test52
-rw-r--r--shaders/skia/613-4.shader_test143
-rw-r--r--shaders/skia/613.shader_test128
-rw-r--r--shaders/skia/616-2.shader_test439
-rw-r--r--shaders/skia/616-3.shader_test52
-rw-r--r--shaders/skia/616-4.shader_test77
-rw-r--r--shaders/skia/616.shader_test192
-rw-r--r--shaders/skia/619-2.shader_test319
-rw-r--r--shaders/skia/619-3.shader_test52
-rw-r--r--shaders/skia/619-4.shader_test48
-rw-r--r--shaders/skia/619.shader_test115
-rw-r--r--shaders/skia/622-2.shader_test218
-rw-r--r--shaders/skia/622-3.shader_test51
-rw-r--r--shaders/skia/622.shader_test212
-rw-r--r--shaders/skia/625-2.shader_test126
-rw-r--r--shaders/skia/625-3.shader_test60
-rw-r--r--shaders/skia/625.shader_test135
-rw-r--r--shaders/skia/628-2.shader_test92
-rw-r--r--shaders/skia/628-3.shader_test57
-rw-r--r--shaders/skia/628.shader_test179
-rw-r--r--shaders/skia/631-2.shader_test597
-rw-r--r--shaders/skia/631-3.shader_test101
-rw-r--r--shaders/skia/631.shader_test108
-rw-r--r--shaders/skia/634-2.shader_test76
-rw-r--r--shaders/skia/634-3.shader_test50
-rw-r--r--shaders/skia/634.shader_test199
-rw-r--r--shaders/skia/637-2.shader_test176
-rw-r--r--shaders/skia/637-3.shader_test65
-rw-r--r--shaders/skia/637.shader_test128
-rw-r--r--shaders/skia/64-1.shader_test61
-rw-r--r--shaders/skia/64-10.shader_test79
-rw-r--r--shaders/skia/64-11.shader_test44
-rw-r--r--shaders/skia/64-12.shader_test153
-rw-r--r--shaders/skia/64-13.shader_test79
-rw-r--r--shaders/skia/64-14.shader_test41
-rw-r--r--shaders/skia/64-18.shader_test76
-rw-r--r--shaders/skia/64-2.shader_test137
-rw-r--r--shaders/skia/64-21.shader_test66
-rw-r--r--shaders/skia/64-24.shader_test88
-rw-r--r--shaders/skia/64-25.shader_test300
-rw-r--r--shaders/skia/64-26.shader_test85
-rw-r--r--shaders/skia/64-27.shader_test101
-rw-r--r--shaders/skia/64-28.shader_test79
-rw-r--r--shaders/skia/64-30.shader_test127
-rw-r--r--shaders/skia/64-31.shader_test132
-rw-r--r--shaders/skia/64-33.shader_test46
-rw-r--r--shaders/skia/64-35.shader_test50
-rw-r--r--shaders/skia/64-39.shader_test169
-rw-r--r--shaders/skia/64-40.shader_test201
-rw-r--r--shaders/skia/64-41.shader_test76
-rw-r--r--shaders/skia/64-5.shader_test103
-rw-r--r--shaders/skia/64-7.shader_test49
-rw-r--r--shaders/skia/64-8.shader_test105
-rw-r--r--shaders/skia/64-9.shader_test50
-rw-r--r--shaders/skia/64.shader_test57
-rw-r--r--shaders/skia/640-3.shader_test62
-rw-r--r--shaders/skia/640.shader_test192
-rw-r--r--shaders/skia/643-2.shader_test127
-rw-r--r--shaders/skia/643-3.shader_test437
-rw-r--r--shaders/skia/643.shader_test115
-rw-r--r--shaders/skia/646-2.shader_test25
-rw-r--r--shaders/skia/646-3.shader_test230
-rw-r--r--shaders/skia/646.shader_test212
-rw-r--r--shaders/skia/649-3.shader_test78
-rw-r--r--shaders/skia/649.shader_test135
-rw-r--r--shaders/skia/652-3.shader_test70
-rw-r--r--shaders/skia/652.shader_test151
-rw-r--r--shaders/skia/655-2.shader_test258
-rw-r--r--shaders/skia/655-3.shader_test209
-rw-r--r--shaders/skia/655.shader_test80
-rw-r--r--shaders/skia/658-2.shader_test42
-rw-r--r--shaders/skia/658-3.shader_test112
-rw-r--r--shaders/skia/658.shader_test171
-rw-r--r--shaders/skia/661-2.shader_test41
-rw-r--r--shaders/skia/661-3.shader_test57
-rw-r--r--shaders/skia/661.shader_test100
-rw-r--r--shaders/skia/664-2.shader_test27
-rw-r--r--shaders/skia/664-3.shader_test50
-rw-r--r--shaders/skia/664.shader_test164
-rw-r--r--shaders/skia/667-2.shader_test168
-rw-r--r--shaders/skia/667-3.shader_test47
-rw-r--r--shaders/skia/667.shader_test87
-rw-r--r--shaders/skia/67-1.shader_test68
-rw-r--r--shaders/skia/67-10.shader_test89
-rw-r--r--shaders/skia/67-11.shader_test41
-rw-r--r--shaders/skia/67-12.shader_test153
-rw-r--r--shaders/skia/67-14.shader_test44
-rw-r--r--shaders/skia/67-18.shader_test92
-rw-r--r--shaders/skia/67-2.shader_test137
-rw-r--r--shaders/skia/67-24.shader_test470
-rw-r--r--shaders/skia/67-25.shader_test85
-rw-r--r--shaders/skia/67-26.shader_test101
-rw-r--r--shaders/skia/67-27.shader_test78
-rw-r--r--shaders/skia/67-29.shader_test121
-rw-r--r--shaders/skia/67-3.shader_test83
-rw-r--r--shaders/skia/67-30.shader_test123
-rw-r--r--shaders/skia/67-37.shader_test63
-rw-r--r--shaders/skia/67-39.shader_test203
-rw-r--r--shaders/skia/67-4.shader_test76
-rw-r--r--shaders/skia/67-5.shader_test123
-rw-r--r--shaders/skia/67-7.shader_test60
-rw-r--r--shaders/skia/67-8.shader_test35
-rw-r--r--shaders/skia/67-9.shader_test44
-rw-r--r--shaders/skia/67.shader_test57
-rw-r--r--shaders/skia/670-2.shader_test41
-rw-r--r--shaders/skia/670-3.shader_test71
-rw-r--r--shaders/skia/670.shader_test184
-rw-r--r--shaders/skia/673-2.shader_test160
-rw-r--r--shaders/skia/673-3.shader_test315
-rw-r--r--shaders/skia/673.shader_test107
-rw-r--r--shaders/skia/676-2.shader_test51
-rw-r--r--shaders/skia/676-3.shader_test95
-rw-r--r--shaders/skia/676.shader_test151
-rw-r--r--shaders/skia/679-2.shader_test330
-rw-r--r--shaders/skia/679-3.shader_test48
-rw-r--r--shaders/skia/679.shader_test80
-rw-r--r--shaders/skia/682-2.shader_test102
-rw-r--r--shaders/skia/682-3.shader_test158
-rw-r--r--shaders/skia/682.shader_test171
-rw-r--r--shaders/skia/685-2.shader_test39
-rw-r--r--shaders/skia/685-3.shader_test51
-rw-r--r--shaders/skia/685.shader_test100
-rw-r--r--shaders/skia/688-2.shader_test43
-rw-r--r--shaders/skia/688-3.shader_test58
-rw-r--r--shaders/skia/688.shader_test164
-rw-r--r--shaders/skia/691-2.shader_test65
-rw-r--r--shaders/skia/691-3.shader_test71
-rw-r--r--shaders/skia/691.shader_test87
-rw-r--r--shaders/skia/694-2.shader_test64
-rw-r--r--shaders/skia/694-3.shader_test79
-rw-r--r--shaders/skia/694.shader_test184
-rw-r--r--shaders/skia/697-2.shader_test256
-rw-r--r--shaders/skia/697-3.shader_test69
-rw-r--r--shaders/skia/697.shader_test30
-rw-r--r--shaders/skia/7-1.shader_test124
-rw-r--r--shaders/skia/7-10.shader_test103
-rw-r--r--shaders/skia/7-11.shader_test67
-rw-r--r--shaders/skia/7-117.shader_test64
-rw-r--r--shaders/skia/7-119.shader_test107
-rw-r--r--shaders/skia/7-145.shader_test44
-rw-r--r--shaders/skia/7-146.shader_test75
-rw-r--r--shaders/skia/7-147.shader_test121
-rw-r--r--shaders/skia/7-15.shader_test38
-rw-r--r--shaders/skia/7-159.shader_test137
-rw-r--r--shaders/skia/7-160.shader_test78
-rw-r--r--shaders/skia/7-161.shader_test67
-rw-r--r--shaders/skia/7-17.shader_test40
-rw-r--r--shaders/skia/7-170.shader_test57
-rw-r--r--shaders/skia/7-2.shader_test66
-rw-r--r--shaders/skia/7-21.shader_test61
-rw-r--r--shaders/skia/7-211.shader_test87
-rw-r--r--shaders/skia/7-216.shader_test114
-rw-r--r--shaders/skia/7-218.shader_test118
-rw-r--r--shaders/skia/7-219.shader_test134
-rw-r--r--shaders/skia/7-22.shader_test93
-rw-r--r--shaders/skia/7-220.shader_test94
-rw-r--r--shaders/skia/7-221.shader_test110
-rw-r--r--shaders/skia/7-222.shader_test68
-rw-r--r--shaders/skia/7-223.shader_test88
-rw-r--r--shaders/skia/7-224.shader_test93
-rw-r--r--shaders/skia/7-226.shader_test103
-rw-r--r--shaders/skia/7-227.shader_test108
-rw-r--r--shaders/skia/7-228.shader_test91
-rw-r--r--shaders/skia/7-229.shader_test101
-rw-r--r--shaders/skia/7-230.shader_test106
-rw-r--r--shaders/skia/7-231.shader_test89
-rw-r--r--shaders/skia/7-232.shader_test104
-rw-r--r--shaders/skia/7-233.shader_test109
-rw-r--r--shaders/skia/7-236.shader_test92
-rw-r--r--shaders/skia/7-237.shader_test63
-rw-r--r--shaders/skia/7-239.shader_test99
-rw-r--r--shaders/skia/7-240.shader_test115
-rw-r--r--shaders/skia/7-241.shader_test92
-rw-r--r--shaders/skia/7-242.shader_test108
-rw-r--r--shaders/skia/7-243.shader_test71
-rw-r--r--shaders/skia/7-244.shader_test87
-rw-r--r--shaders/skia/7-249.shader_test69
-rw-r--r--shaders/skia/7-27.shader_test35
-rw-r--r--shaders/skia/7-275.shader_test94
-rw-r--r--shaders/skia/7-280.shader_test66
-rw-r--r--shaders/skia/7-281.shader_test77
-rw-r--r--shaders/skia/7-283.shader_test55
-rw-r--r--shaders/skia/7-287.shader_test73
-rw-r--r--shaders/skia/7-288.shader_test39
-rw-r--r--shaders/skia/7-289.shader_test43
-rw-r--r--shaders/skia/7-294.shader_test38
-rw-r--r--shaders/skia/7-295.shader_test82
-rw-r--r--shaders/skia/7-297.shader_test40
-rw-r--r--shaders/skia/7-298.shader_test56
-rw-r--r--shaders/skia/7-3.shader_test34
-rw-r--r--shaders/skia/7-300.shader_test59
-rw-r--r--shaders/skia/7-31.shader_test89
-rw-r--r--shaders/skia/7-312.shader_test52
-rw-r--r--shaders/skia/7-313.shader_test53
-rw-r--r--shaders/skia/7-320.shader_test60
-rw-r--r--shaders/skia/7-322.shader_test109
-rw-r--r--shaders/skia/7-326.shader_test91
-rw-r--r--shaders/skia/7-328.shader_test121
-rw-r--r--shaders/skia/7-34.shader_test29
-rw-r--r--shaders/skia/7-349.shader_test133
-rw-r--r--shaders/skia/7-350.shader_test123
-rw-r--r--shaders/skia/7-353.shader_test97
-rw-r--r--shaders/skia/7-355.shader_test44
-rw-r--r--shaders/skia/7-356.shader_test61
-rw-r--r--shaders/skia/7-357.shader_test27
-rw-r--r--shaders/skia/7-372.shader_test41
-rw-r--r--shaders/skia/7-377.shader_test83
-rw-r--r--shaders/skia/7-378.shader_test99
-rw-r--r--shaders/skia/7-380.shader_test83
-rw-r--r--shaders/skia/7-39.shader_test43
-rw-r--r--shaders/skia/7-40.shader_test90
-rw-r--r--shaders/skia/7-41.shader_test95
-rw-r--r--shaders/skia/7-42.shader_test72
-rw-r--r--shaders/skia/7-422.shader_test98
-rw-r--r--shaders/skia/7-426.shader_test91
-rw-r--r--shaders/skia/7-443.shader_test55
-rw-r--r--shaders/skia/7-446.shader_test67
-rw-r--r--shaders/skia/7-449.shader_test107
-rw-r--r--shaders/skia/7-450.shader_test51
-rw-r--r--shaders/skia/7-452.shader_test78
-rw-r--r--shaders/skia/7-460.shader_test34
-rw-r--r--shaders/skia/7-465.shader_test58
-rw-r--r--shaders/skia/7-466.shader_test54
-rw-r--r--shaders/skia/7-51.shader_test35
-rw-r--r--shaders/skia/7-56.shader_test75
-rw-r--r--shaders/skia/7-58.shader_test69
-rw-r--r--shaders/skia/7-60.shader_test163
-rw-r--r--shaders/skia/7-63.shader_test319
-rw-r--r--shaders/skia/7-65.shader_test67
-rw-r--r--shaders/skia/7-67.shader_test60
-rw-r--r--shaders/skia/7-68.shader_test70
-rw-r--r--shaders/skia/7-69.shader_test54
-rw-r--r--shaders/skia/7-7.shader_test100
-rw-r--r--shaders/skia/7-70.shader_test93
-rw-r--r--shaders/skia/7-71.shader_test75
-rw-r--r--shaders/skia/7-72.shader_test64
-rw-r--r--shaders/skia/7-76.shader_test48
-rw-r--r--shaders/skia/7-77.shader_test124
-rw-r--r--shaders/skia/7-8.shader_test71
-rw-r--r--shaders/skia/7-81.shader_test47
-rw-r--r--shaders/skia/7-83.shader_test61
-rw-r--r--shaders/skia/7-85.shader_test63
-rw-r--r--shaders/skia/7-88.shader_test44
-rw-r--r--shaders/skia/7-9.shader_test96
-rw-r--r--shaders/skia/7-97.shader_test56
-rw-r--r--shaders/skia/7.shader_test57
-rw-r--r--shaders/skia/70-1.shader_test50
-rw-r--r--shaders/skia/70-10.shader_test78
-rw-r--r--shaders/skia/70-11.shader_test44
-rw-r--r--shaders/skia/70-12.shader_test153
-rw-r--r--shaders/skia/70-13.shader_test85
-rw-r--r--shaders/skia/70-14.shader_test41
-rw-r--r--shaders/skia/70-2.shader_test96
-rw-r--r--shaders/skia/70-25.shader_test91
-rw-r--r--shaders/skia/70-26.shader_test107
-rw-r--r--shaders/skia/70-27.shader_test85
-rw-r--r--shaders/skia/70-28.shader_test81
-rw-r--r--shaders/skia/70-29.shader_test127
-rw-r--r--shaders/skia/70-3.shader_test127
-rw-r--r--shaders/skia/70-30.shader_test100
-rw-r--r--shaders/skia/70-32.shader_test96
-rw-r--r--shaders/skia/70-35.shader_test63
-rw-r--r--shaders/skia/70-36.shader_test26
-rw-r--r--shaders/skia/70-37.shader_test219
-rw-r--r--shaders/skia/70-38.shader_test71
-rw-r--r--shaders/skia/70-4.shader_test54
-rw-r--r--shaders/skia/70-5.shader_test113
-rw-r--r--shaders/skia/70-7.shader_test77
-rw-r--r--shaders/skia/70-8.shader_test37
-rw-r--r--shaders/skia/70-9.shader_test48
-rw-r--r--shaders/skia/70.shader_test64
-rw-r--r--shaders/skia/700-2.shader_test506
-rw-r--r--shaders/skia/700.shader_test107
-rw-r--r--shaders/skia/706.shader_test150
-rw-r--r--shaders/skia/709.shader_test724
-rw-r--r--shaders/skia/712.shader_test325
-rw-r--r--shaders/skia/715.shader_test219
-rw-r--r--shaders/skia/718-1.shader_test43
-rw-r--r--shaders/skia/718.shader_test493
-rw-r--r--shaders/skia/724.shader_test356
-rw-r--r--shaders/skia/73-1.shader_test50
-rw-r--r--shaders/skia/73-10.shader_test82
-rw-r--r--shaders/skia/73-11.shader_test41
-rw-r--r--shaders/skia/73-12.shader_test153
-rw-r--r--shaders/skia/73-14.shader_test56
-rw-r--r--shaders/skia/73-2.shader_test96
-rw-r--r--shaders/skia/73-20.shader_test42
-rw-r--r--shaders/skia/73-24.shader_test48
-rw-r--r--shaders/skia/73-25.shader_test104
-rw-r--r--shaders/skia/73-26.shader_test120
-rw-r--r--shaders/skia/73-27.shader_test67
-rw-r--r--shaders/skia/73-29.shader_test121
-rw-r--r--shaders/skia/73-30.shader_test91
-rw-r--r--shaders/skia/73-36.shader_test229
-rw-r--r--shaders/skia/73-37.shader_test203
-rw-r--r--shaders/skia/73-38.shader_test61
-rw-r--r--shaders/skia/73-4.shader_test54
-rw-r--r--shaders/skia/73-5.shader_test133
-rw-r--r--shaders/skia/73-7.shader_test40
-rw-r--r--shaders/skia/73-8.shader_test88
-rw-r--r--shaders/skia/73-9.shader_test44
-rw-r--r--shaders/skia/73.shader_test62
-rw-r--r--shaders/skia/730.shader_test374
-rw-r--r--shaders/skia/733.shader_test26
-rw-r--r--shaders/skia/739.shader_test47
-rw-r--r--shaders/skia/745.shader_test168
-rw-r--r--shaders/skia/748.shader_test46
-rw-r--r--shaders/skia/751-1.shader_test101
-rw-r--r--shaders/skia/754.shader_test452
-rw-r--r--shaders/skia/757-1.shader_test98
-rw-r--r--shaders/skia/757.shader_test112
-rw-r--r--shaders/skia/76-1.shader_test50
-rw-r--r--shaders/skia/76-10.shader_test92
-rw-r--r--shaders/skia/76-11.shader_test44
-rw-r--r--shaders/skia/76-12.shader_test153
-rw-r--r--shaders/skia/76-13.shader_test67
-rw-r--r--shaders/skia/76-14.shader_test70
-rw-r--r--shaders/skia/76-19.shader_test68
-rw-r--r--shaders/skia/76-2.shader_test96
-rw-r--r--shaders/skia/76-23.shader_test42
-rw-r--r--shaders/skia/76-24.shader_test115
-rw-r--r--shaders/skia/76-25.shader_test131
-rw-r--r--shaders/skia/76-26.shader_test67
-rw-r--r--shaders/skia/76-27.shader_test44
-rw-r--r--shaders/skia/76-28.shader_test127
-rw-r--r--shaders/skia/76-29.shader_test65
-rw-r--r--shaders/skia/76-3.shader_test105
-rw-r--r--shaders/skia/76-31.shader_test61
-rw-r--r--shaders/skia/76-34.shader_test63
-rw-r--r--shaders/skia/76-35.shader_test178
-rw-r--r--shaders/skia/76-36.shader_test222
-rw-r--r--shaders/skia/76-37.shader_test77
-rw-r--r--shaders/skia/76-5.shader_test132
-rw-r--r--shaders/skia/76-7.shader_test38
-rw-r--r--shaders/skia/76-8.shader_test79
-rw-r--r--shaders/skia/76-9.shader_test44
-rw-r--r--shaders/skia/76.shader_test85
-rw-r--r--shaders/skia/760.shader_test489
-rw-r--r--shaders/skia/763.shader_test215
-rw-r--r--shaders/skia/766.shader_test36
-rw-r--r--shaders/skia/769.shader_test672
-rw-r--r--shaders/skia/772.shader_test115
-rw-r--r--shaders/skia/775-1.shader_test78
-rw-r--r--shaders/skia/775.shader_test369
-rw-r--r--shaders/skia/778-1.shader_test75
-rw-r--r--shaders/skia/778.shader_test373
-rw-r--r--shaders/skia/781-1.shader_test77
-rw-r--r--shaders/skia/781.shader_test431
-rw-r--r--shaders/skia/784-1.shader_test88
-rw-r--r--shaders/skia/784.shader_test371
-rw-r--r--shaders/skia/787-1.shader_test112
-rw-r--r--shaders/skia/787.shader_test40
-rw-r--r--shaders/skia/79-1.shader_test97
-rw-r--r--shaders/skia/79-10.shader_test75
-rw-r--r--shaders/skia/79-11.shader_test41
-rw-r--r--shaders/skia/79-12.shader_test153
-rw-r--r--shaders/skia/79-13.shader_test67
-rw-r--r--shaders/skia/79-14.shader_test68
-rw-r--r--shaders/skia/79-2.shader_test116
-rw-r--r--shaders/skia/79-22.shader_test83
-rw-r--r--shaders/skia/79-24.shader_test97
-rw-r--r--shaders/skia/79-25.shader_test113
-rw-r--r--shaders/skia/79-26.shader_test67
-rw-r--r--shaders/skia/79-27.shader_test41
-rw-r--r--shaders/skia/79-28.shader_test121
-rw-r--r--shaders/skia/79-29.shader_test56
-rw-r--r--shaders/skia/79-3.shader_test127
-rw-r--r--shaders/skia/79-34.shader_test63
-rw-r--r--shaders/skia/79-35.shader_test89
-rw-r--r--shaders/skia/79-36.shader_test222
-rw-r--r--shaders/skia/79-37.shader_test77
-rw-r--r--shaders/skia/79-5.shader_test61
-rw-r--r--shaders/skia/79-7.shader_test95
-rw-r--r--shaders/skia/79-8.shader_test74
-rw-r--r--shaders/skia/79-9.shader_test44
-rw-r--r--shaders/skia/79.shader_test90
-rw-r--r--shaders/skia/790-1.shader_test114
-rw-r--r--shaders/skia/790.shader_test87
-rw-r--r--shaders/skia/793.shader_test342
-rw-r--r--shaders/skia/796-1.shader_test98
-rw-r--r--shaders/skia/796.shader_test96
-rw-r--r--shaders/skia/799.shader_test121
-rw-r--r--shaders/skia/802-1.shader_test89
-rw-r--r--shaders/skia/802.shader_test42
-rw-r--r--shaders/skia/805.shader_test27
-rw-r--r--shaders/skia/808-1.shader_test115
-rw-r--r--shaders/skia/808.shader_test468
-rw-r--r--shaders/skia/811.shader_test202
-rw-r--r--shaders/skia/814-1.shader_test103
-rw-r--r--shaders/skia/814.shader_test156
-rw-r--r--shaders/skia/82-1.shader_test97
-rw-r--r--shaders/skia/82-10.shader_test79
-rw-r--r--shaders/skia/82-11.shader_test44
-rw-r--r--shaders/skia/82-12.shader_test153
-rw-r--r--shaders/skia/82-13.shader_test114
-rw-r--r--shaders/skia/82-2.shader_test116
-rw-r--r--shaders/skia/82-21.shader_test64
-rw-r--r--shaders/skia/82-23.shader_test97
-rw-r--r--shaders/skia/82-24.shader_test113
-rw-r--r--shaders/skia/82-25.shader_test114
-rw-r--r--shaders/skia/82-26.shader_test44
-rw-r--r--shaders/skia/82-27.shader_test127
-rw-r--r--shaders/skia/82-29.shader_test39
-rw-r--r--shaders/skia/82-3.shader_test138
-rw-r--r--shaders/skia/82-30.shader_test215
-rw-r--r--shaders/skia/82-31.shader_test206
-rw-r--r--shaders/skia/82-4.shader_test64
-rw-r--r--shaders/skia/82-5.shader_test149
-rw-r--r--shaders/skia/82-7.shader_test115
-rw-r--r--shaders/skia/82-8.shader_test134
-rw-r--r--shaders/skia/82-9.shader_test44
-rw-r--r--shaders/skia/82.shader_test85
-rw-r--r--shaders/skia/820.shader_test474
-rw-r--r--shaders/skia/823-1.shader_test100
-rw-r--r--shaders/skia/823.shader_test39
-rw-r--r--shaders/skia/826-1.shader_test75
-rw-r--r--shaders/skia/826.shader_test23
-rw-r--r--shaders/skia/829.shader_test235
-rw-r--r--shaders/skia/832.shader_test32
-rw-r--r--shaders/skia/835.shader_test227
-rw-r--r--shaders/skia/838.shader_test42
-rw-r--r--shaders/skia/841.shader_test49
-rw-r--r--shaders/skia/847-1.shader_test84
-rw-r--r--shaders/skia/847.shader_test217
-rw-r--r--shaders/skia/85-1.shader_test69
-rw-r--r--shaders/skia/85-10.shader_test41
-rw-r--r--shaders/skia/85-11.shader_test153
-rw-r--r--shaders/skia/85-12.shader_test114
-rw-r--r--shaders/skia/85-13.shader_test67
-rw-r--r--shaders/skia/85-2.shader_test112
-rw-r--r--shaders/skia/85-20.shader_test83
-rw-r--r--shaders/skia/85-21.shader_test48
-rw-r--r--shaders/skia/85-22.shader_test103
-rw-r--r--shaders/skia/85-23.shader_test119
-rw-r--r--shaders/skia/85-24.shader_test114
-rw-r--r--shaders/skia/85-25.shader_test41
-rw-r--r--shaders/skia/85-26.shader_test121
-rw-r--r--shaders/skia/85-28.shader_test48
-rw-r--r--shaders/skia/85-29.shader_test310
-rw-r--r--shaders/skia/85-3.shader_test54
-rw-r--r--shaders/skia/85-30.shader_test204
-rw-r--r--shaders/skia/85-31.shader_test78
-rw-r--r--shaders/skia/85-4.shader_test78
-rw-r--r--shaders/skia/85-7.shader_test94
-rw-r--r--shaders/skia/85-8.shader_test44
-rw-r--r--shaders/skia/85-9.shader_test86
-rw-r--r--shaders/skia/85.shader_test85
-rw-r--r--shaders/skia/850-1.shader_test121
-rw-r--r--shaders/skia/850.shader_test207
-rw-r--r--shaders/skia/853.shader_test179
-rw-r--r--shaders/skia/856-1.shader_test104
-rw-r--r--shaders/skia/856.shader_test251
-rw-r--r--shaders/skia/859-1.shader_test100
-rw-r--r--shaders/skia/859.shader_test530
-rw-r--r--shaders/skia/862-1.shader_test117
-rw-r--r--shaders/skia/865-1.shader_test130
-rw-r--r--shaders/skia/865.shader_test446
-rw-r--r--shaders/skia/868-1.shader_test126
-rw-r--r--shaders/skia/868.shader_test396
-rw-r--r--shaders/skia/871-1.shader_test93
-rw-r--r--shaders/skia/874-1.shader_test110
-rw-r--r--shaders/skia/874.shader_test238
-rw-r--r--shaders/skia/877-1.shader_test129
-rw-r--r--shaders/skia/877.shader_test234
-rw-r--r--shaders/skia/88-1.shader_test69
-rw-r--r--shaders/skia/88-10.shader_test44
-rw-r--r--shaders/skia/88-11.shader_test140
-rw-r--r--shaders/skia/88-12.shader_test86
-rw-r--r--shaders/skia/88-13.shader_test32
-rw-r--r--shaders/skia/88-2.shader_test80
-rw-r--r--shaders/skia/88-20.shader_test74
-rw-r--r--shaders/skia/88-22.shader_test116
-rw-r--r--shaders/skia/88-23.shader_test132
-rw-r--r--shaders/skia/88-24.shader_test86
-rw-r--r--shaders/skia/88-25.shader_test114
-rw-r--r--shaders/skia/88-26.shader_test127
-rw-r--r--shaders/skia/88-28.shader_test48
-rw-r--r--shaders/skia/88-29.shader_test329
-rw-r--r--shaders/skia/88-30.shader_test206
-rw-r--r--shaders/skia/88-31.shader_test86
-rw-r--r--shaders/skia/88-4.shader_test145
-rw-r--r--shaders/skia/88-6.shader_test47
-rw-r--r--shaders/skia/88-7.shader_test97
-rw-r--r--shaders/skia/88-8.shader_test45
-rw-r--r--shaders/skia/88-9.shader_test78
-rw-r--r--shaders/skia/88.shader_test90
-rw-r--r--shaders/skia/880-1.shader_test105
-rw-r--r--shaders/skia/880.shader_test281
-rw-r--r--shaders/skia/883.shader_test518
-rw-r--r--shaders/skia/886-1.shader_test119
-rw-r--r--shaders/skia/886.shader_test29
-rw-r--r--shaders/skia/889-1.shader_test130
-rw-r--r--shaders/skia/889.shader_test40
-rw-r--r--shaders/skia/892-1.shader_test129
-rw-r--r--shaders/skia/892.shader_test56
-rw-r--r--shaders/skia/895-1.shader_test115
-rw-r--r--shaders/skia/895.shader_test120
-rw-r--r--shaders/skia/898-1.shader_test112
-rw-r--r--shaders/skia/901.shader_test374
-rw-r--r--shaders/skia/904-1.shader_test127
-rw-r--r--shaders/skia/904.shader_test173
-rw-r--r--shaders/skia/907-1.shader_test110
-rw-r--r--shaders/skia/91-1.shader_test55
-rw-r--r--shaders/skia/91-10.shader_test41
-rw-r--r--shaders/skia/91-11.shader_test140
-rw-r--r--shaders/skia/91-13.shader_test63
-rw-r--r--shaders/skia/91-2.shader_test105
-rw-r--r--shaders/skia/91-22.shader_test127
-rw-r--r--shaders/skia/91-23.shader_test143
-rw-r--r--shaders/skia/91-24.shader_test86
-rw-r--r--shaders/skia/91-25.shader_test92
-rw-r--r--shaders/skia/91-26.shader_test69
-rw-r--r--shaders/skia/91-27.shader_test33
-rw-r--r--shaders/skia/91-28.shader_test88
-rw-r--r--shaders/skia/91-29.shader_test204
-rw-r--r--shaders/skia/91-30.shader_test86
-rw-r--r--shaders/skia/91-31.shader_test44
-rw-r--r--shaders/skia/91-4.shader_test68
-rw-r--r--shaders/skia/91-6.shader_test42
-rw-r--r--shaders/skia/91-7.shader_test149
-rw-r--r--shaders/skia/91-8.shader_test45
-rw-r--r--shaders/skia/91-9.shader_test82
-rw-r--r--shaders/skia/91.shader_test90
-rw-r--r--shaders/skia/913-1.shader_test117
-rw-r--r--shaders/skia/913.shader_test222
-rw-r--r--shaders/skia/916-1.shader_test101
-rw-r--r--shaders/skia/916.shader_test315
-rw-r--r--shaders/skia/919-1.shader_test109
-rw-r--r--shaders/skia/919.shader_test113
-rw-r--r--shaders/skia/922-1.shader_test128
-rw-r--r--shaders/skia/922.shader_test232
-rw-r--r--shaders/skia/925-1.shader_test144
-rw-r--r--shaders/skia/925.shader_test22
-rw-r--r--shaders/skia/928-1.shader_test125
-rw-r--r--shaders/skia/928.shader_test165
-rw-r--r--shaders/skia/931-1.shader_test98
-rw-r--r--shaders/skia/931.shader_test44
-rw-r--r--shaders/skia/934-1.shader_test127
-rw-r--r--shaders/skia/934.shader_test152
-rw-r--r--shaders/skia/937-1.shader_test107
-rw-r--r--shaders/skia/937.shader_test26
-rw-r--r--shaders/skia/94-1.shader_test68
-rw-r--r--shaders/skia/94-10.shader_test44
-rw-r--r--shaders/skia/94-11.shader_test140
-rw-r--r--shaders/skia/94-12.shader_test98
-rw-r--r--shaders/skia/94-2.shader_test112
-rw-r--r--shaders/skia/94-21.shader_test129
-rw-r--r--shaders/skia/94-23.shader_test139
-rw-r--r--shaders/skia/94-24.shader_test206
-rw-r--r--shaders/skia/94-25.shader_test76
-rw-r--r--shaders/skia/94-26.shader_test41
-rw-r--r--shaders/skia/94-4.shader_test162
-rw-r--r--shaders/skia/94-6.shader_test36
-rw-r--r--shaders/skia/94-8.shader_test45
-rw-r--r--shaders/skia/94-9.shader_test89
-rw-r--r--shaders/skia/94.shader_test95
-rw-r--r--shaders/skia/940-1.shader_test106
-rw-r--r--shaders/skia/940.shader_test97
-rw-r--r--shaders/skia/943-1.shader_test113
-rw-r--r--shaders/skia/943.shader_test490
-rw-r--r--shaders/skia/946-1.shader_test112
-rw-r--r--shaders/skia/946.shader_test33
-rw-r--r--shaders/skia/949-1.shader_test124
-rw-r--r--shaders/skia/949.shader_test428
-rw-r--r--shaders/skia/952-1.shader_test133
-rw-r--r--shaders/skia/952.shader_test196
-rw-r--r--shaders/skia/955-1.shader_test119
-rw-r--r--shaders/skia/955.shader_test124
-rw-r--r--shaders/skia/958-1.shader_test114
-rw-r--r--shaders/skia/958.shader_test170
-rw-r--r--shaders/skia/961.shader_test582
-rw-r--r--shaders/skia/964-1.shader_test108
-rw-r--r--shaders/skia/964.shader_test134
-rw-r--r--shaders/skia/967-1.shader_test113
-rw-r--r--shaders/skia/967.shader_test129
-rw-r--r--shaders/skia/97-1.shader_test123
-rw-r--r--shaders/skia/97-10.shader_test98
-rw-r--r--shaders/skia/97-16.shader_test94
-rw-r--r--shaders/skia/97-18.shader_test135
-rw-r--r--shaders/skia/97-20.shader_test324
-rw-r--r--shaders/skia/97-21.shader_test222
-rw-r--r--shaders/skia/97-22.shader_test76
-rw-r--r--shaders/skia/97-3.shader_test85
-rw-r--r--shaders/skia/97-6.shader_test45
-rw-r--r--shaders/skia/97-7.shader_test78
-rw-r--r--shaders/skia/97-8.shader_test41
-rw-r--r--shaders/skia/97-9.shader_test140
-rw-r--r--shaders/skia/97.shader_test68
-rw-r--r--shaders/skia/970-1.shader_test94
-rw-r--r--shaders/skia/973-1.shader_test127
-rw-r--r--shaders/skia/976-1.shader_test117
-rw-r--r--shaders/skia/979-1.shader_test138
-rw-r--r--shaders/skia/979.shader_test302
-rw-r--r--shaders/skia/982-1.shader_test122
-rw-r--r--shaders/skia/982.shader_test453
-rw-r--r--shaders/skia/985-1.shader_test132
-rw-r--r--shaders/skia/988-1.shader_test90
-rw-r--r--shaders/skia/988.shader_test155
-rw-r--r--shaders/skia/991-1.shader_test126
-rw-r--r--shaders/skia/991.shader_test291
-rw-r--r--shaders/skia/994-1.shader_test132
-rw-r--r--shaders/skia/994.shader_test185
-rw-r--r--shaders/skia/997-1.shader_test140
-rw-r--r--shaders/skia/997.shader_test650
3047 files changed, 340631 insertions, 0 deletions
diff --git a/shaders/skia/1-1.shader_test b/shaders/skia/1-1.shader_test
new file mode 100644
index 0000000..55a3677
--- /dev/null
+++ b/shaders/skia/1-1.shader_test
@@ -0,0 +1,52 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+noperspective in float vcoverage_Stage0;
+vec4 TextureEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ float coverage = vcoverage_Stage0;
+ outputCoverage_Stage0 = vec4(coverage);
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TextureEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1 * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in float coverage;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+noperspective out float vcoverage_Stage0;
+void main() {
+ vec2 position = position;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ vcoverage_Stage0 = coverage;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1-10.shader_test b/shaders/skia/1-10.shader_test
new file mode 100644
index 0000000..26e967f
--- /dev/null
+++ b/shaders/skia/1-10.shader_test
@@ -0,0 +1,75 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform mat3 ucolorSpaceMatrix_Stage1_c0_c0;
+uniform vec3 ucolorSpaceTranslate_Stage1_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+uniform sampler2D uTextureSampler_2_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_1_Stage1, vTransformedCoords_1_Stage0) * _input;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c0_c0_c2_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_2_Stage1, vTransformedCoords_2_Stage0) * _input;
+ return _output;
+}
+vec4 YUVtoRGBEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 planes[3];
+ planes[0] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0));
+ planes[1] = TextureEffect_Stage1_c0_c0_c1_c0(vec4(1.0));
+ planes[2] = TextureEffect_Stage1_c0_c0_c2_c0(vec4(1.0));
+ vec4 color = vec4(planes[0].x, planes[1].x, planes[2].x, 1.0);
+ color.xyz = clamp(color.xyz * ucolorSpaceMatrix_Stage1_c0_c0 + ucolorSpaceTranslate_Stage1_c0_c0, 0.0, 1.0);
+ _output = color;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = YUVtoRGBEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1-1066.shader_test b/shaders/skia/1-1066.shader_test
new file mode 100644
index 0000000..7509b11
--- /dev/null
+++ b/shaders/skia/1-1066.shader_test
@@ -0,0 +1,32 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+noperspective in vec4 vcolor_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ {
+ sk_FragColor = outputColor_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 vertex;
+in vec4 color;
+noperspective out vec4 vcolor_Stage0;
+void main() {
+ vcolor_Stage0 = color;
+ vec2 vertex = vertex;
+ gl_Position = vec4(vertex.x, vertex.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1-1073.shader_test b/shaders/skia/1-1073.shader_test
new file mode 100644
index 0000000..9727509
--- /dev/null
+++ b/shaders/skia/1-1073.shader_test
@@ -0,0 +1,40 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform sampler2D uTextureSampler_0_Stage0;
+flat in vec4 vcolor_Stage0;
+noperspective in vec2 vlocalCoord_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ vec2 texCoord;
+ texCoord = vlocalCoord_Stage0;
+ outputColor_Stage0 = texture(uTextureSampler_0_Stage0, texCoord) * outputColor_Stage0;
+ }
+ {
+ sk_FragColor = outputColor_Stage0;
+ sk_FragColor = sk_FragColor.wwww;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+flat out vec4 vcolor_Stage0;
+noperspective out vec2 vlocalCoord_Stage0;
+void main() {
+ vcolor_Stage0 = color;
+ vlocalCoord_Stage0 = localCoord;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1-108.shader_test b/shaders/skia/1-108.shader_test
new file mode 100644
index 0000000..c2d95ce
--- /dev/null
+++ b/shaders/skia/1-108.shader_test
@@ -0,0 +1,46 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uCoordTransformMatrix_0_Stage0;
+uniform sampler2D uTextureSampler_0_Stage1;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0(vec4 _input, vec2 _coords) {
+ _coords = _coords * uCoordTransformMatrix_0_Stage0.xz + uCoordTransformMatrix_0_Stage0.yw;
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, _coords) * _input;
+ return _output;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TextureEffect_Stage1_c0_c0(vec4(1.0), gl_FragCoord.xy);
+ }
+ {
+ sk_FragColor = outputColor_Stage0 * output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1-121.shader_test b/shaders/skia/1-121.shader_test
new file mode 100644
index 0000000..d6551df
--- /dev/null
+++ b/shaders/skia/1-121.shader_test
@@ -0,0 +1,63 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 urectH_Stage1;
+uniform float uinvSixSigma_Stage1;
+uniform vec4 urectUniform_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+flat in vec4 vcolor_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ float xCoverage, yCoverage;
+ {
+ float x, y;
+ {
+ x = max(urectH_Stage1.x - gl_FragCoord.x, gl_FragCoord.x - urectH_Stage1.z);
+ y = max(urectH_Stage1.y - gl_FragCoord.y, gl_FragCoord.y - urectH_Stage1.w);
+ }
+ xCoverage = texture(uTextureSampler_0_Stage1, vec2(x * uinvSixSigma_Stage1, 0.5)).w;
+ yCoverage = texture(uTextureSampler_0_Stage1, vec2(y * uinvSixSigma_Stage1, 0.5)).w;
+ output_Stage1 = vec4(xCoverage) * yCoverage;
+ }
+ output_Stage1 = vec4(xCoverage) * yCoverage;
+ }
+ vec4 output_Stage2;
+ {
+ float alpha;
+ {
+ alpha = float(all(greaterThan(vec4(gl_FragCoord.xy, urectUniform_Stage2.zw), vec4(urectUniform_Stage2.xy, gl_FragCoord.xy))) ? 1 : 0);
+ }
+ {
+ alpha = 1.0 - alpha;
+ }
+ output_Stage2 = output_Stage1 * alpha;
+ }
+ {
+ sk_FragColor = outputColor_Stage0 * output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 position;
+in vec4 color;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1-132.shader_test b/shaders/skia/1-132.shader_test
new file mode 100644
index 0000000..51e1955
--- /dev/null
+++ b/shaders/skia/1-132.shader_test
@@ -0,0 +1,34 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+noperspective in vec4 vcolor_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ {
+ sk_FragColor = outputColor_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 position;
+in vec4 inColor;
+noperspective out vec4 vcolor_Stage0;
+void main() {
+ vec4 color = inColor;
+ vcolor_Stage0 = color;
+ vec2 pos2 = position;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_PointSize = 1.0;
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1-14.shader_test b/shaders/skia/1-14.shader_test
new file mode 100644
index 0000000..b19a6df
--- /dev/null
+++ b/shaders/skia/1-14.shader_test
@@ -0,0 +1,36 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 ucolor_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage2;
+ {
+ {
+ output_Stage2 = ucolor_Stage2;
+ }
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1-140.shader_test b/shaders/skia/1-140.shader_test
new file mode 100644
index 0000000..49e42d2
--- /dev/null
+++ b/shaders/skia/1-140.shader_test
@@ -0,0 +1,22 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+uniform vec4 uColor_Stage0;
+void main() {
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 inPosition;
+void main() {
+ vec2 pos2 = (uViewM_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1-145.shader_test b/shaders/skia/1-145.shader_test
new file mode 100644
index 0000000..3cd4ac9
--- /dev/null
+++ b/shaders/skia/1-145.shader_test
@@ -0,0 +1,76 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_0_Stage0;
+ float t = -1.0;
+ {
+ {
+ float r0 = ufocalParams_Stage1_c0_c0_c0_c0.x;
+ {
+ t = length(p) - r0;
+ }
+ }
+ }
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1-148.shader_test b/shaders/skia/1-148.shader_test
new file mode 100644
index 0000000..ea1ca2d
--- /dev/null
+++ b/shaders/skia/1-148.shader_test
@@ -0,0 +1,86 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform float ubias_Stage1_c0_c0_c0_c0;
+uniform float uscale_Stage1_c0_c0_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 SweepGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float angle;
+ {
+ angle = atan(-vTransformedCoords_0_Stage0.y, -vTransformedCoords_0_Stage0.x);
+ }
+ float t = ((angle * 0.15915493667125702 + 0.5) + ubias_Stage1_c0_c0_c0_c0) * uscale_Stage1_c0_c0_c0_c0;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = SweepGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_1_Stage0.x);
+ uint y = uint(vTransformedCoords_1_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ output_Stage2 = vec4(clamp(output_Stage2.xyz + value * 0.0039215688593685627, 0.0, output_Stage2.w), output_Stage2.w);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1-149.shader_test b/shaders/skia/1-149.shader_test
new file mode 100644
index 0000000..d4afbd6
--- /dev/null
+++ b/shaders/skia/1-149.shader_test
@@ -0,0 +1,92 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_0_Stage0;
+ float t = -1.0;
+ {
+ {
+ float r0 = ufocalParams_Stage1_c0_c0_c0_c0.x;
+ {
+ t = length(p) - r0;
+ }
+ }
+ }
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_1_Stage0.x);
+ uint y = uint(vTransformedCoords_1_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ output_Stage2 = vec4(clamp(output_Stage2.xyz + value * 0.0039215688593685627, 0.0, output_Stage2.w), output_Stage2.w);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1-150.shader_test b/shaders/skia/1-150.shader_test
new file mode 100644
index 0000000..b51f964
--- /dev/null
+++ b/shaders/skia/1-150.shader_test
@@ -0,0 +1,80 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 RadialGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = length(vTransformedCoords_0_Stage0);
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = RadialGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_1_Stage0.x);
+ uint y = uint(vTransformedCoords_1_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ output_Stage2 = vec4(clamp(output_Stage2.xyz + value * 0.0039215688593685627, 0.0, output_Stage2.w), output_Stage2.w);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1-153.shader_test b/shaders/skia/1-153.shader_test
new file mode 100644
index 0000000..1caaba5
--- /dev/null
+++ b/shaders/skia/1-153.shader_test
@@ -0,0 +1,44 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform sampler2D uTextureSampler_0_Stage0;
+noperspective in vec3 vinShadowParams_Stage0;
+noperspective in vec4 vinColor_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ vec3 shadowParams;
+ shadowParams = vinShadowParams_Stage0;
+ outputColor_Stage0 = vinColor_Stage0;
+ float d = length(shadowParams.xy);
+ vec2 uv = vec2(shadowParams.z * (1.0 - d), 0.5);
+ float factor = texture(uTextureSampler_0_Stage0, uv).w;
+ outputCoverage_Stage0 = vec4(factor);
+ }
+ {
+ sk_FragColor = outputColor_Stage0 * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 inPosition;
+in vec4 inColor;
+in vec3 inShadowParams;
+noperspective out vec3 vinShadowParams_Stage0;
+noperspective out vec4 vinColor_Stage0;
+void main() {
+ vinShadowParams_Stage0 = inShadowParams;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = inPosition;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1-158.shader_test b/shaders/skia/1-158.shader_test
new file mode 100644
index 0000000..36cbad6
--- /dev/null
+++ b/shaders/skia/1-158.shader_test
@@ -0,0 +1,77 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+noperspective in float vcoverage_Stage0;
+vec4 TextureEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+vec4 TextureEffect_Stage2_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage2, vTransformedCoords_1_Stage0) * _input;
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+vec4 ComposeOne_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_dst_in(_input, TextureEffect_Stage2_c1_c0_c0_c0(vec4(1.0)));
+ return _output;
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ float coverage = vcoverage_Stage0;
+ outputCoverage_Stage0 = vec4(coverage);
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TextureEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_src_in(outputCoverage_Stage0, ComposeOne_Stage2_c1_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage1 * output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in float coverage;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+noperspective out float vcoverage_Stage0;
+void main() {
+ vec2 position = position;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ vcoverage_Stage0 = coverage;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1-159.shader_test b/shaders/skia/1-159.shader_test
new file mode 100644
index 0000000..78a72e6
--- /dev/null
+++ b/shaders/skia/1-159.shader_test
@@ -0,0 +1,139 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 ustart_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c0_c0_c1_c0;
+flat in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 varccoord_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c0_c0_c1_c0;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ t.x = fract(t.x);
+ }
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+vec4 ComposeOne_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_dst_in(_input, TiledGradientEffect_Stage1_c0_c0_c0_c0(vec4(1.0)));
+ return _output;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ float x_plus_1 = varccoord_Stage0.x, y = varccoord_Stage0.y;
+ float coverage;
+ if (0.0 == x_plus_1) {
+ coverage = y;
+ } else {
+ float fn = x_plus_1 * (x_plus_1 - 2.0);
+ fn = ((y) * (y) + (fn));
+ float fnwidth = fwidth(fn);
+ float d = fn / fnwidth;
+ coverage = clamp(0.5 - d, 0.0, 1.0);
+ }
+ outputCoverage_Stage0 = vec4(coverage);
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_src_in(outputCoverage_Stage0, ComposeOne_Stage1_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = outputColor_Stage0 * output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec4 radii_selector;
+in vec4 corner_and_radius_outsets;
+in vec4 aa_bloat_and_coverage;
+in vec4 skew;
+in vec2 translate;
+in vec4 radii_x;
+in vec4 radii_y;
+in vec4 color;
+in vec4 local_rect;
+flat out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 varccoord_Stage0;
+void main() {
+ vcolor_Stage0 = color;
+ vec2 corner = corner_and_radius_outsets.xy;
+ vec2 radius_outset = corner_and_radius_outsets.zw;
+ vec2 aa_bloat_direction = aa_bloat_and_coverage.xy;
+ float coverage = aa_bloat_and_coverage.z;
+ float is_linear_coverage = aa_bloat_and_coverage.w;
+ vec2 pixellength = inversesqrt(vec2(dot(skew.xz, skew.xz), dot(skew.yw, skew.yw)));
+ vec4 normalized_axis_dirs = skew * pixellength.xyxy;
+ vec2 axiswidths = abs(normalized_axis_dirs.xy) + abs(normalized_axis_dirs.zw);
+ vec2 aa_bloatradius = (axiswidths * pixellength) * 0.5;
+ vec4 radii_and_neighbors = radii_selector * mat4(radii_x, radii_y, radii_x.yxwz, radii_y.wzyx);
+ vec2 radii = radii_and_neighbors.xy;
+ vec2 neighbor_radii = radii_and_neighbors.zw;
+ if (any(greaterThan(aa_bloatradius, vec2(1.0)))) {
+ corner = max(abs(corner), aa_bloatradius) * sign(corner);
+ coverage /= max(aa_bloatradius.x, 1.0) * max(aa_bloatradius.y, 1.0);
+ radii = vec2(0.0);
+ }
+ if (any(lessThan(radii, aa_bloatradius * 1.25))) {
+ radii = aa_bloatradius;
+ radius_outset = floor(abs(radius_outset)) * radius_outset;
+ is_linear_coverage = 1.0;
+ } else {
+ radii = clamp(radii, pixellength, 2.0 - pixellength);
+ neighbor_radii = clamp(neighbor_radii, pixellength, 2.0 - pixellength);
+ vec2 spacing = (2.0 - radii) - neighbor_radii;
+ vec2 extra_pad = max(pixellength * 0.0625 - spacing, vec2(0.0));
+ radii -= extra_pad * 0.5;
+ }
+ vec2 aa_outset = aa_bloat_direction * aa_bloatradius;
+ vec2 vertexpos = (corner + radius_outset * radii) + aa_outset;
+ vec2 localcoord = (local_rect.xy * (1.0 - vertexpos) + local_rect.zw * (1.0 + vertexpos)) * 0.5;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localcoord, 1.0)).xy;
+ mat2 skewmatrix = mat2(skew.xy, skew.zw);
+ vec2 devcoord = vertexpos * skewmatrix + translate;
+ if (0.0 != is_linear_coverage) {
+ varccoord_Stage0.xy = vec2(0.0, coverage);
+ } else {
+ vec2 arccoord = (1.0 - abs(radius_outset)) + (aa_outset / radii) * corner;
+ varccoord_Stage0.xy = vec2(arccoord.x + 1.0, arccoord.y);
+ }
+ gl_Position = vec4(devcoord.x, devcoord.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1-164.shader_test b/shaders/skia/1-164.shader_test
new file mode 100644
index 0000000..4d4e59b
--- /dev/null
+++ b/shaders/skia/1-164.shader_test
@@ -0,0 +1,128 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform float ubias_Stage1_c0_c0_c0_c0;
+uniform float uscale_Stage1_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+flat in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec4 varccoord_Stage0;
+vec4 SweepGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float angle;
+ {
+ angle = atan(-vTransformedCoords_0_Stage0.y, -vTransformedCoords_0_Stage0.x);
+ }
+ float t = ((angle * 0.15915493667125702 + 0.5) + ubias_Stage1_c0_c0_c0_c0) * uscale_Stage1_c0_c0_c0_c0;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = SweepGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ outputCoverage_Stage0 = vec4(1.0);
+ if (vec2(0.0) != varccoord_Stage0.xy) {
+ float fn = dot(varccoord_Stage0.xy, varccoord_Stage0.xy) - 1.0;
+ if (fn > 0.0) {
+ outputCoverage_Stage0 = vec4(0.0);
+ }
+ }
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1 * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec4 radii_selector;
+in vec4 corner_and_radius_outsets;
+in vec4 skew;
+in vec2 translate;
+in vec4 radii_x;
+in vec4 radii_y;
+in vec4 color;
+in vec4 local_rect;
+flat out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec4 varccoord_Stage0;
+void main() {
+ vcolor_Stage0 = color;
+ vec2 corner = corner_and_radius_outsets.xy;
+ vec2 radius_outset = corner_and_radius_outsets.zw;
+ vec2 radii;
+ radii.x = dot(radii_selector, radii_x);
+ radii.y = dot(radii_selector, radii_y);
+ bool is_arc_section = radii.x > 0.0;
+ radii = abs(radii);
+ vec2 vertexpos = corner + radius_outset * radii;
+ vec2 localcoord = (local_rect.xy * (1.0 - vertexpos) + local_rect.zw * (1.0 + vertexpos)) * 0.5;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localcoord, 1.0)).xy;
+ mat2 skewmatrix = mat2(skew.xy, skew.zw);
+ vec2 devcoord = vertexpos * skewmatrix + translate;
+ if (is_arc_section) {
+ varccoord_Stage0.xy = 1.0 - abs(radius_outset);
+ mat2 derivatives = inverse(skewmatrix);
+ varccoord_Stage0.zw = derivatives * (((varccoord_Stage0.xy / radii) * corner) * 2.0);
+ } else {
+ varccoord_Stage0 = vec4(0.0);
+ }
+ gl_Position = vec4(devcoord.x, devcoord.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1-172.shader_test b/shaders/skia/1-172.shader_test
new file mode 100644
index 0000000..7ecaf15
--- /dev/null
+++ b/shaders/skia/1-172.shader_test
@@ -0,0 +1,72 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uinnerRect_Stage2;
+uniform vec2 uradiusPlusHalf_Stage2;
+uniform sampler2D uTextureSampler_0_Stage0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTextureCoords_Stage0;
+flat in int vTexIndex_Stage0;
+noperspective in vec4 vinColor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 TextureEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ vec4 texColor;
+ {
+ texColor = texture(uTextureSampler_0_Stage0, vTextureCoords_Stage0);
+ }
+ outputCoverage_Stage0 = texColor;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TextureEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ vec2 dxy0 = uinnerRect_Stage2.xy - gl_FragCoord.xy;
+ vec2 dxy1 = gl_FragCoord.xy - uinnerRect_Stage2.zw;
+ vec2 dxy = max(max(dxy0, dxy1), 0.0);
+ float alpha = clamp(uradiusPlusHalf_Stage2.x - length(dxy), 0.0, 1.0);
+ output_Stage2 = outputCoverage_Stage0 * alpha;
+ }
+ {
+ sk_FragColor = output_Stage1 * output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform vec2 uAtlasSizeInv_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in uvec2 inTextureCoords;
+noperspective out vec2 vTextureCoords_Stage0;
+flat out int vTexIndex_Stage0;
+noperspective out vec4 vinColor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ ivec2 signedCoords = ivec2(int(inTextureCoords.x), int(inTextureCoords.y));
+ vec2 unormTexCoords = vec2(float(signedCoords.x / 2), float(signedCoords.y / 2));
+ vTextureCoords_Stage0 = unormTexCoords * uAtlasSizeInv_Stage0;
+ vTexIndex_Stage0 = 0;
+ vinColor_Stage0 = inColor;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(inPosition.x, inPosition.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1-178.shader_test b/shaders/skia/1-178.shader_test
new file mode 100644
index 0000000..b59b5d2
--- /dev/null
+++ b/shaders/skia/1-178.shader_test
@@ -0,0 +1,55 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 ugColor_Stage1_c0_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 runtime_shader_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = _input;
+ _output = vec4(vTransformedCoords_0_Stage0 * 0.0039215688593685627, ugColor_Stage1_c0_c0.z, 1.0);
+ return _output;
+}
+vec4 ClampFragmentProcessor_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ float alpha = clamp(_input.w, 0.0, 1.0);
+ _output = vec4(clamp(_input.xyz, 0.0, alpha), alpha);
+ }
+ return _output;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampFragmentProcessor_Stage1_c1_c0(runtime_shader_Stage1_c0_c0(outputColor_Stage0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1-179.shader_test b/shaders/skia/1-179.shader_test
new file mode 100644
index 0000000..aa1d356
--- /dev/null
+++ b/shaders/skia/1-179.shader_test
@@ -0,0 +1,62 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 ugColor_Stage1_c0_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+float scale_Stage1_c0_c0(float x) {
+ return x / 255.0;
+}
+vec4 blackAndWhite_Stage1_c0_c0(vec4 raw) {
+ float value = (raw.x * 0.2199999988079071 + raw.y * 0.67000001668930054) + raw.z * 0.10999999940395355;
+ return vec4(vec3(value), raw.w);
+}
+vec4 runtime_shader_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = _input;
+ _output = blackAndWhite_Stage1_c0_c0(vec4(scale_Stage1_c0_c0(vTransformedCoords_0_Stage0.x), scale_Stage1_c0_c0(vTransformedCoords_0_Stage0.y), ugColor_Stage1_c0_c0.z, 1.0));
+ return _output;
+}
+vec4 ClampFragmentProcessor_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ float alpha = clamp(_input.w, 0.0, 1.0);
+ _output = vec4(clamp(_input.xyz, 0.0, alpha), alpha);
+ }
+ return _output;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampFragmentProcessor_Stage1_c1_c0(runtime_shader_Stage1_c0_c0(outputColor_Stage0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1-181.shader_test b/shaders/skia/1-181.shader_test
new file mode 100644
index 0000000..3b07273
--- /dev/null
+++ b/shaders/skia/1-181.shader_test
@@ -0,0 +1,42 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 urectUniform_Stage1;
+flat in vec4 vcolor_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ float alpha;
+ {
+ alpha = float(all(greaterThan(vec4(gl_FragCoord.xy, urectUniform_Stage1.zw), vec4(urectUniform_Stage1.xy, gl_FragCoord.xy))) ? 1 : 0);
+ }
+ output_Stage1 = vec4(alpha);
+ }
+ {
+ sk_FragColor = outputColor_Stage0 * output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 position;
+in vec4 color;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1-196.shader_test b/shaders/skia/1-196.shader_test
new file mode 100644
index 0000000..ce11b1e
--- /dev/null
+++ b/shaders/skia/1-196.shader_test
@@ -0,0 +1,39 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform sampler2D uTextureSampler_0_Stage0;
+noperspective in vec2 vlocalCoord_Stage0;
+vec4 color_xform_Stage0(vec4 color) {
+ color.xyz *= color.w;
+ return color;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vec4(1.0);
+ vec2 texCoord;
+ texCoord = vlocalCoord_Stage0;
+ outputColor_Stage0 = color_xform_Stage0(texture(uTextureSampler_0_Stage0, texCoord));
+ }
+ {
+ sk_FragColor = outputColor_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vlocalCoord_Stage0;
+void main() {
+ vlocalCoord_Stage0 = localCoord;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1-2.shader_test b/shaders/skia/1-2.shader_test
new file mode 100644
index 0000000..59920bd
--- /dev/null
+++ b/shaders/skia/1-2.shader_test
@@ -0,0 +1,46 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+noperspective in vec4 vinCircleEdge_Stage0;
+noperspective in vec4 vinColor_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ vec4 circleEdge;
+ circleEdge = vinCircleEdge_Stage0;
+ outputColor_Stage0 = vinColor_Stage0;
+ float d = length(circleEdge.xy);
+ float distanceToOuterEdge = circleEdge.z * (1.0 - d);
+ float edgeAlpha = clamp(distanceToOuterEdge, 0.0, 1.0);
+ float distanceToInnerEdge = circleEdge.z * (d - circleEdge.w);
+ float innerAlpha = clamp(distanceToInnerEdge, 0.0, 1.0);
+ edgeAlpha *= innerAlpha;
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ {
+ sk_FragColor = outputColor_Stage0 * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 inPosition;
+in vec4 inColor;
+in vec4 inCircleEdge;
+noperspective out vec4 vinCircleEdge_Stage0;
+noperspective out vec4 vinColor_Stage0;
+void main() {
+ vinCircleEdge_Stage0 = inCircleEdge;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = inPosition;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1-20.shader_test b/shaders/skia/1-20.shader_test
new file mode 100644
index 0000000..7e4ffbc
--- /dev/null
+++ b/shaders/skia/1-20.shader_test
@@ -0,0 +1,67 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform mat3 ucolorSpaceMatrix_Stage1;
+uniform vec3 ucolorSpaceTranslate_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+uniform sampler2D uTextureSampler_2_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+vec4 TextureEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_1_Stage1, vTransformedCoords_1_Stage0) * _input;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c2_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_2_Stage1, vTransformedCoords_2_Stage0) * _input;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ vec4 planes[3];
+ planes[0] = TextureEffect_Stage1_c0_c0(vec4(1.0));
+ planes[1] = TextureEffect_Stage1_c1_c0(vec4(1.0));
+ planes[2] = TextureEffect_Stage1_c2_c0(vec4(1.0));
+ vec4 color = vec4(planes[0].w, planes[1].x, planes[1].y, planes[2].w);
+ color.xyz = clamp(color.xyz * ucolorSpaceMatrix_Stage1 + ucolorSpaceTranslate_Stage1, 0.0, 1.0);
+ color.xyz *= color.w;
+ output_Stage1 = color;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1-203.shader_test b/shaders/skia/1-203.shader_test
new file mode 100644
index 0000000..a09864a
--- /dev/null
+++ b/shaders/skia/1-203.shader_test
@@ -0,0 +1,59 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform sampler2D uTextureSampler_0_Stage0;
+flat in vec4 vcolor_Stage0;
+in vec2 vlocalCoord_Stage0;
+in float vcoverage_Stage0;
+flat in vec4 vgeomDomain_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ vec2 texCoord;
+ texCoord = vlocalCoord_Stage0;
+ outputColor_Stage0 = texture(uTextureSampler_0_Stage0, texCoord) * outputColor_Stage0;
+ float coverage = vcoverage_Stage0 * gl_FragCoord.w;
+ vec4 geoDomain;
+ geoDomain = vgeomDomain_Stage0;
+ if (coverage < 0.5) {
+ vec4 dists4 = clamp(vec4(1.0, 1.0, -1.0, -1.0) * (gl_FragCoord.xyxy - geoDomain), 0.0, 1.0);
+ vec2 dists2 = dists4.xy * dists4.zw;
+ coverage = min(coverage, dists2.x * dists2.y);
+ }
+ outputCoverage_Stage0 = vec4(coverage);
+ }
+ {
+ sk_FragColor = outputColor_Stage0 * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec4 positionWithCoverage;
+in vec4 color;
+in vec2 localCoord;
+in vec4 geomDomain;
+flat out vec4 vcolor_Stage0;
+out vec2 vlocalCoord_Stage0;
+out float vcoverage_Stage0;
+flat out vec4 vgeomDomain_Stage0;
+void main() {
+ vec3 position = positionWithCoverage.xyz;
+ vcolor_Stage0 = color;
+ vlocalCoord_Stage0 = localCoord;
+ vcoverage_Stage0 = positionWithCoverage.w * positionWithCoverage.z;
+ vgeomDomain_Stage0 = geomDomain;
+ gl_Position = vec4(position.x, position.y, 0.0, position.z);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1-21.shader_test b/shaders/skia/1-21.shader_test
new file mode 100644
index 0000000..b586515
--- /dev/null
+++ b/shaders/skia/1-21.shader_test
@@ -0,0 +1,42 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * outputColor_Stage0;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ sk_FragColor = sk_FragColor.wwww;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1-227.shader_test b/shaders/skia/1-227.shader_test
new file mode 100644
index 0000000..4b30f79
--- /dev/null
+++ b/shaders/skia/1-227.shader_test
@@ -0,0 +1,92 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 ubaseFrequency_Stage1_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+float perlinnoise_Stage1_c0_c0(float chanCoord, vec2 noiseVec) {
+ vec4 floorVal;
+ floorVal.xy = floor(noiseVec);
+ floorVal.zw = floorVal.xy + vec2(1.0);
+ vec2 fractVal = fract(noiseVec);
+ vec2 noiseSmooth = (fractVal * fractVal) * (vec2(3.0) - vec2(2.0) * fractVal);
+ floorVal = fract(floor(mod(floorVal, 256.0)) / vec4(256.0));
+ vec2 latticeIdx;
+ latticeIdx.x = texture(uTextureSampler_0_Stage1, vec2(floorVal.x, 0.5)).x;
+ latticeIdx.y = texture(uTextureSampler_0_Stage1, vec2(floorVal.z, 0.5)).x;
+ vec4 bcoords = fract(latticeIdx.xyxy + floorVal.yyww);
+ vec2 uv;
+ vec4 lattice = texture(uTextureSampler_1_Stage1, vec2(bcoords.x, chanCoord)).zyxw;
+ uv.x = dot((lattice.yw + lattice.xz * vec2(0.00390625)) * vec2(2.0) - vec2(1.0), fractVal);
+ fractVal.x -= 1.0;
+ lattice = texture(uTextureSampler_1_Stage1, vec2(bcoords.y, chanCoord)).zyxw;
+ uv.y = dot((lattice.yw + lattice.xz * vec2(0.00390625)) * vec2(2.0) - vec2(1.0), fractVal);
+ vec2 ab;
+ ab.x = mix(uv.x, uv.y, noiseSmooth.x);
+ fractVal.y -= 1.0;
+ lattice = texture(uTextureSampler_1_Stage1, vec2(bcoords.w, chanCoord)).zyxw;
+ uv.y = dot((lattice.yw + lattice.xz * vec2(0.00390625)) * vec2(2.0) - vec2(1.0), fractVal);
+ fractVal.x += 1.0;
+ lattice = texture(uTextureSampler_1_Stage1, vec2(bcoords.z, chanCoord)).zyxw;
+ uv.x = dot((lattice.yw + lattice.xz * vec2(0.00390625)) * vec2(2.0) - vec2(1.0), fractVal);
+ ab.y = mix(uv.x, uv.y, noiseSmooth.x);
+ return mix(ab.x, ab.y, noiseSmooth.y);
+}
+vec4 PerlinNoise_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 noiseVec = floor(vTransformedCoords_0_Stage0) * ubaseFrequency_Stage1_c0_c0;
+ _output = vec4(0.0);
+ float ratio = 1.0;
+ for (int octave = 0;octave < 2; ++octave) {
+ _output += vec4(perlinnoise_Stage1_c0_c0(0.125, noiseVec), perlinnoise_Stage1_c0_c0(0.375, noiseVec), perlinnoise_Stage1_c0_c0(0.625, noiseVec), perlinnoise_Stage1_c0_c0(0.875, noiseVec)) * ratio;
+ noiseVec *= vec2(2.0);
+ ratio *= 0.5;
+ }
+ _output = _output * vec4(0.5) + vec4(0.5);
+ _output = clamp(_output, 0.0, 1.0);
+ _output = vec4(_output.xyz * _output.www, _output.w);
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_dst_in(outputColor_Stage0, PerlinNoise_Stage1_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1-23.shader_test b/shaders/skia/1-23.shader_test
new file mode 100644
index 0000000..e2ea8af
--- /dev/null
+++ b/shaders/skia/1-23.shader_test
@@ -0,0 +1,63 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 RadialGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = length(vTransformedCoords_0_Stage0);
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = RadialGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TiledGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1-247.shader_test b/shaders/skia/1-247.shader_test
new file mode 100644
index 0000000..b145d14
--- /dev/null
+++ b/shaders/skia/1-247.shader_test
@@ -0,0 +1,36 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+noperspective in vec4 vcolor_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ {
+ sk_FragColor = outputColor_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 position;
+in vec4 inColor;
+noperspective out vec4 vcolor_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1-25.shader_test b/shaders/skia/1-25.shader_test
new file mode 100644
index 0000000..d1335eb
--- /dev/null
+++ b/shaders/skia/1-25.shader_test
@@ -0,0 +1,85 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+float _vtx_attr_0;
+uniform vec4 uColor_Stage0;
+uniform vec4 uCoordTransformMatrix_1_Stage0;
+uniform vec4 uCoordTransformMatrix_2_Stage0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in float v_vtx_attr0_Stage0;
+vec4 TextureEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input, vec2 _coords) {
+ _coords = _coords * uCoordTransformMatrix_1_Stage0.xz + uCoordTransformMatrix_1_Stage0.yw;
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, _coords) * _input;
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0_c0_c0(vec4 _input, vec2 _coords) {
+ vec4 _output;
+ _output = TextureEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0, 1.0, 1.0, 1.0), _coords);
+ return _output;
+}
+vec4 TextureEffect_Stage1_c0_c0_c1_c0_c0_c0(vec4 _input, vec2 _coords) {
+ _coords = _coords * uCoordTransformMatrix_2_Stage0.xz + uCoordTransformMatrix_2_Stage0.yw;
+ vec4 _output;
+ _output = texture(uTextureSampler_1_Stage1, _coords) * _input;
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0_c1_c0(vec4 _input, vec2 _coords) {
+ vec4 _output;
+ _output = TextureEffect_Stage1_c0_c0_c1_c0_c0_c0(vec4(1.0, 1.0, 1.0, 1.0), _coords);
+ return _output;
+}
+vec4 runtime_shader_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = _input;
+ vec4 col0 = OverrideInputFragmentProcessor_Stage1_c0_c0_c0_c0(vec4(1.0), vTransformedCoords_0_Stage0);
+ vec4 col1 = OverrideInputFragmentProcessor_Stage1_c0_c0_c1_c0(vec4(1.0), vTransformedCoords_0_Stage0);
+ _output = mix(col0, col1, _vtx_attr_0);
+ return _output;
+}
+vec4 ClampFragmentProcessor_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ float alpha = clamp(_input.w, 0.0, 1.0);
+ _output = vec4(clamp(_input.xyz, 0.0, alpha), alpha);
+ }
+ return _output;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = uColor_Stage0;
+ _vtx_attr_0 = v_vtx_attr0_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampFragmentProcessor_Stage1_c1_c0(runtime_shader_Stage1_c0_c0(outputColor_Stage0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in float _vtx_attr0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out float v_vtx_attr0_Stage0;
+void main() {
+ vec2 pos2 = position;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(position, 1.0)).xy;
+ v_vtx_attr0_Stage0 = _vtx_attr0;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1-255.shader_test b/shaders/skia/1-255.shader_test
new file mode 100644
index 0000000..4aaf496
--- /dev/null
+++ b/shaders/skia/1-255.shader_test
@@ -0,0 +1,76 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 ucolor0_Stage2;
+uniform vec4 ucolor1_Stage2;
+uniform vec4 ucolor2_Stage2;
+uniform vec4 ucolor3_Stage2;
+uniform vec4 ucolor4_Stage2;
+uniform vec4 ucolor5_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TextureEffect_Stage1_c0_c0(vec4(1.0));
+ output_Stage1.xyz *= outputColor_Stage0.xyz;
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ float alpha = 255.0 * output_Stage2.w;
+ if (alpha < 0.5) {
+ output_Stage2 = ucolor0_Stage2;
+ } else if (alpha < 1.5) {
+ output_Stage2 = ucolor1_Stage2;
+ } else if (alpha < 2.5) {
+ output_Stage2 = ucolor2_Stage2;
+ } else if (alpha < 3.5) {
+ output_Stage2 = ucolor3_Stage2;
+ } else if (alpha < 4.5) {
+ output_Stage2 = ucolor4_Stage2;
+ } else {
+ output_Stage2 = ucolor5_Stage2;
+ }
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1-258.shader_test b/shaders/skia/1-258.shader_test
new file mode 100644
index 0000000..44adab2
--- /dev/null
+++ b/shaders/skia/1-258.shader_test
@@ -0,0 +1,75 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uclamp_Stage1_c0_c0;
+uniform mat3 ucolorSpaceMatrix_Stage1;
+uniform vec3 ucolorSpaceTranslate_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+uniform sampler2D uTextureSampler_2_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+vec4 TextureEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 inCoord = vTransformedCoords_0_Stage0;
+ vec2 subsetCoord;
+ subsetCoord.x = inCoord.x;
+ subsetCoord.y = inCoord.y;
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage1_c0_c0.x, uclamp_Stage1_c0_c0.z);
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage1_c0_c0.y, uclamp_Stage1_c0_c0.w);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ _output = _input * textureColor;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_1_Stage1, vTransformedCoords_1_Stage0) * _input;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c2_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_2_Stage1, vTransformedCoords_2_Stage0) * _input;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ vec4 planes[3];
+ planes[0] = TextureEffect_Stage1_c0_c0(vec4(1.0));
+ planes[1] = TextureEffect_Stage1_c1_c0(vec4(1.0));
+ planes[2] = TextureEffect_Stage1_c2_c0(vec4(1.0));
+ vec4 color = vec4(planes[0].x, planes[1].x, planes[2].x, 1.0);
+ color.xyz = clamp(color.xyz * ucolorSpaceMatrix_Stage1 + ucolorSpaceTranslate_Stage1, 0.0, 1.0);
+ output_Stage1 = color;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1-26.shader_test b/shaders/skia/1-26.shader_test
new file mode 100644
index 0000000..0c7f765
--- /dev/null
+++ b/shaders/skia/1-26.shader_test
@@ -0,0 +1,42 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform sampler2D uTextureSampler_0_Stage1;
+in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TextureEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec3 position;
+in vec4 color;
+in vec2 localCoord;
+out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, position.z);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1-269.shader_test b/shaders/skia/1-269.shader_test
new file mode 100644
index 0000000..a9bf376
--- /dev/null
+++ b/shaders/skia/1-269.shader_test
@@ -0,0 +1,93 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform float ubias_Stage1_c0_c0_c0_c0;
+uniform float uscale_Stage1_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 SweepGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float angle;
+ {
+ angle = atan(-vTransformedCoords_0_Stage0.y, -vTransformedCoords_0_Stage0.x);
+ }
+ float t = ((angle * 0.15915493667125702 + 0.5) + ubias_Stage1_c0_c0_c0_c0) * uscale_Stage1_c0_c0_c0_c0;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = SweepGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1-27.shader_test b/shaders/skia/1-27.shader_test
new file mode 100644
index 0000000..51f5bd0
--- /dev/null
+++ b/shaders/skia/1-27.shader_test
@@ -0,0 +1,57 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+vec4 _vtx_attr_0;
+uniform vec4 uColor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec4 v_vtx_attr0_Stage0;
+vec4 runtime_shader_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = _input;
+ _output = _vtx_attr_0;
+ return _output;
+}
+vec4 ClampFragmentProcessor_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ float alpha = clamp(_input.w, 0.0, 1.0);
+ _output = vec4(clamp(_input.xyz, 0.0, alpha), alpha);
+ }
+ return _output;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = uColor_Stage0;
+ _vtx_attr_0 = v_vtx_attr0_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampFragmentProcessor_Stage1_c1_c0(runtime_shader_Stage1_c0_c0(outputColor_Stage0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 _vtx_attr0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec4 v_vtx_attr0_Stage0;
+void main() {
+ vec2 pos2 = position;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(position, 1.0)).xy;
+ v_vtx_attr0_Stage0 = _vtx_attr0;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1-28.shader_test b/shaders/skia/1-28.shader_test
new file mode 100644
index 0000000..f89b417
--- /dev/null
+++ b/shaders/skia/1-28.shader_test
@@ -0,0 +1,35 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+noperspective in vec4 vcolor_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ {
+ sk_FragColor = outputColor_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 position;
+in vec4 inColor;
+noperspective out vec4 vcolor_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = position;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1-289.shader_test b/shaders/skia/1-289.shader_test
new file mode 100644
index 0000000..fe1ccfe
--- /dev/null
+++ b/shaders/skia/1-289.shader_test
@@ -0,0 +1,77 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uCoordTransformMatrix_1_Stage0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0_c0_c0(vec4 _input, vec2 _coords) {
+ _coords = _coords * uCoordTransformMatrix_1_Stage0.xz + uCoordTransformMatrix_1_Stage0.yw;
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, _coords) * _input;
+ return _output;
+}
+vec4 Bicubic_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coord = vTransformedCoords_0_Stage0 - vec2(0.5);
+ vec2 f = fract(coord);
+ coord += 0.5 - f;
+ vec4 wx = mat4(0.055555555555555552, 0.88888888888888884, 0.055555555555555552, 0.0, -0.5, 0.0, 0.5, 0.0, 0.83333333333333337, -2.0, 1.5, -0.33333333333333331, -0.3888888888888889, 1.1666666666666667, -1.1666666666666667, 0.3888888888888889) * vec4(1.0, f.x, f.x * f.x, (f.x * f.x) * f.x);
+ vec4 wy = mat4(0.055555555555555552, 0.88888888888888884, 0.055555555555555552, 0.0, -0.5, 0.0, 0.5, 0.0, 0.83333333333333337, -2.0, 1.5, -0.33333333333333331, -0.3888888888888889, 1.1666666666666667, -1.1666666666666667, 0.3888888888888889) * vec4(1.0, f.y, f.y * f.y, (f.y * f.y) * f.y);
+ vec4 rowColors[4];
+ rowColors[0] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(-1.0, -1.0));
+ rowColors[1] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(0.0, -1.0));
+ rowColors[2] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(1.0, -1.0));
+ rowColors[3] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(2.0, -1.0));
+ vec4 s0 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ rowColors[0] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(-1.0, 0.0));
+ rowColors[1] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord);
+ rowColors[2] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(1.0, 0.0));
+ rowColors[3] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(2.0, 0.0));
+ vec4 s1 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ rowColors[0] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(-1.0, 1.0));
+ rowColors[1] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(0.0, 1.0));
+ rowColors[2] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(1.0, 1.0));
+ rowColors[3] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(2.0, 1.0));
+ vec4 s2 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ rowColors[0] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(-1.0, 2.0));
+ rowColors[1] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(0.0, 2.0));
+ rowColors[2] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(1.0, 2.0));
+ rowColors[3] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(2.0, 2.0));
+ vec4 s3 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ vec4 bicubicColor = ((wy.x * s0 + wy.y * s1) + wy.z * s2) + wy.w * s3;
+ bicubicColor = clamp(bicubicColor, 0.0, 1.0);
+ _output = bicubicColor * _input;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = Bicubic_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1-299.shader_test b/shaders/skia/1-299.shader_test
new file mode 100644
index 0000000..acf9432
--- /dev/null
+++ b/shaders/skia/1-299.shader_test
@@ -0,0 +1,64 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+flat in vec4 vcolor_Stage0;
+noperspective in vec4 varccoord_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ outputCoverage_Stage0 = vec4(1.0);
+ if (vec2(0.0) != varccoord_Stage0.xy) {
+ float fn = dot(varccoord_Stage0.xy, varccoord_Stage0.xy) - 1.0;
+ if (fn > 0.0) {
+ outputCoverage_Stage0 = vec4(0.0);
+ }
+ }
+ }
+ {
+ sk_FragColor = outputColor_Stage0 * outputCoverage_Stage0;
+ sk_FragColor = sk_FragColor.wwww;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec4 radii_selector;
+in vec4 corner_and_radius_outsets;
+in vec4 skew;
+in vec2 translate;
+in vec4 radii_x;
+in vec4 radii_y;
+in vec4 color;
+flat out vec4 vcolor_Stage0;
+noperspective out vec4 varccoord_Stage0;
+void main() {
+ vcolor_Stage0 = color;
+ vec2 corner = corner_and_radius_outsets.xy;
+ vec2 radius_outset = corner_and_radius_outsets.zw;
+ vec2 radii;
+ radii.x = dot(radii_selector, radii_x);
+ radii.y = dot(radii_selector, radii_y);
+ bool is_arc_section = radii.x > 0.0;
+ radii = abs(radii);
+ vec2 vertexpos = corner + radius_outset * radii;
+ mat2 skewmatrix = mat2(skew.xy, skew.zw);
+ vec2 devcoord = vertexpos * skewmatrix + translate;
+ if (is_arc_section) {
+ varccoord_Stage0.xy = 1.0 - abs(radius_outset);
+ mat2 derivatives = inverse(skewmatrix);
+ varccoord_Stage0.zw = derivatives * (((varccoord_Stage0.xy / radii) * corner) * 2.0);
+ } else {
+ varccoord_Stage0 = vec4(0.0);
+ }
+ gl_Position = vec4(devcoord.x, devcoord.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1-31.shader_test b/shaders/skia/1-31.shader_test
new file mode 100644
index 0000000..0643807
--- /dev/null
+++ b/shaders/skia/1-31.shader_test
@@ -0,0 +1,48 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform float ualpha_Stage1;
+uniform sampler2D uTextureSampler_0_Stage0;
+noperspective in vec2 vTextureCoords_Stage0;
+flat in int vTexIndex_Stage0;
+noperspective in vec4 vinColor_Stage0;
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ vec4 texColor;
+ {
+ texColor = texture(uTextureSampler_0_Stage0, vTextureCoords_Stage0);
+ }
+ outputCoverage_Stage0 = texColor;
+ }
+ {
+ outputCoverage_Stage0.w = max(max(outputCoverage_Stage0.x, outputCoverage_Stage0.y), outputCoverage_Stage0.z);
+ sk_FragColor = ualpha_Stage1 * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform vec2 uAtlasSizeInv_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in uvec2 inTextureCoords;
+noperspective out vec2 vTextureCoords_Stage0;
+flat out int vTexIndex_Stage0;
+noperspective out vec4 vinColor_Stage0;
+void main() {
+ ivec2 signedCoords = ivec2(int(inTextureCoords.x), int(inTextureCoords.y));
+ vec2 unormTexCoords = vec2(float(signedCoords.x / 2), float(signedCoords.y / 2));
+ vTextureCoords_Stage0 = unormTexCoords * uAtlasSizeInv_Stage0;
+ vTexIndex_Stage0 = 0;
+ vinColor_Stage0 = inColor;
+ gl_Position = vec4(inPosition.x, inPosition.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1-336.shader_test b/shaders/skia/1-336.shader_test
new file mode 100644
index 0000000..78f47e7
--- /dev/null
+++ b/shaders/skia/1-336.shader_test
@@ -0,0 +1,60 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform float ucontrast_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TextureEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ vec4 color = output_Stage1;
+ float nonZeroAlpha = max(color.w, 9.9999997473787516e-05);
+ color = vec4(color.xyz / nonZeroAlpha, nonZeroAlpha);
+ color.xyz = color.xyz * color.xyz;
+ if (ucontrast_Stage2 != 0.0) {
+ float m = (1.0 + ucontrast_Stage2) / (1.0 - ucontrast_Stage2);
+ float off = -0.5 * m + 0.5;
+ color = m * color + off;
+ }
+ color = clamp(color, 0.0, 1.0);
+ color.xyz = sqrt(color.xyz);
+ color.w = output_Stage1.w;
+ color.xyz *= color.w;
+ output_Stage2 = color;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1-379.shader_test b/shaders/skia/1-379.shader_test
new file mode 100644
index 0000000..3c2c5b3
--- /dev/null
+++ b/shaders/skia/1-379.shader_test
@@ -0,0 +1,94 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_0_Stage0;
+ float t = -1.0;
+ float v = 1.0;
+ {
+ {
+ float invR1 = ufocalParams_Stage1_c0_c0_c0_c0.x;
+ float fx = ufocalParams_Stage1_c0_c0_c0_c0.y;
+ float x_t = -1.0;
+ {
+ float temp = p.x * p.x - p.y * p.y;
+ if (temp >= 0.0) {
+ {
+ x_t = sqrt(temp) - p.x * invR1;
+ }
+ }
+ }
+ {
+ if (x_t <= 0.0) {
+ v = -1.0;
+ }
+ }
+ {
+ {
+ t = x_t + fx;
+ }
+ }
+ }
+ }
+ _output = vec4(t, v, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1-382.shader_test b/shaders/skia/1-382.shader_test
new file mode 100644
index 0000000..fa626d1
--- /dev/null
+++ b/shaders/skia/1-382.shader_test
@@ -0,0 +1,109 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_0_Stage0;
+ float t = -1.0;
+ float v = 1.0;
+ {
+ {
+ float invR1 = ufocalParams_Stage1_c0_c0_c0_c0.x;
+ float fx = ufocalParams_Stage1_c0_c0_c0_c0.y;
+ float x_t = -1.0;
+ {
+ float temp = p.x * p.x - p.y * p.y;
+ if (temp >= 0.0) {
+ {
+ x_t = sqrt(temp) - p.x * invR1;
+ }
+ }
+ }
+ {
+ if (x_t <= 0.0) {
+ v = -1.0;
+ }
+ }
+ {
+ {
+ t = x_t + fx;
+ }
+ }
+ }
+ }
+ _output = vec4(t, v, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TiledGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_1_Stage0.x);
+ uint y = uint(vTransformedCoords_1_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ output_Stage2 = vec4(clamp(output_Stage2.xyz + value * 0.0039215688593685627, 0.0, output_Stage2.w), output_Stage2.w);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1-384.shader_test b/shaders/skia/1-384.shader_test
new file mode 100644
index 0000000..b083702
--- /dev/null
+++ b/shaders/skia/1-384.shader_test
@@ -0,0 +1,98 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_0_Stage0;
+ float t = -1.0;
+ {
+ {
+ float invR1 = ufocalParams_Stage1_c0_c0_c0_c0.x;
+ float fx = ufocalParams_Stage1_c0_c0_c0_c0.y;
+ float x_t = -1.0;
+ {
+ x_t = length(p) - p.x * invR1;
+ }
+ {
+ {
+ t = x_t + fx;
+ }
+ }
+ }
+ }
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TiledGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_1_Stage0.x);
+ uint y = uint(vTransformedCoords_1_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ output_Stage2 = vec4(clamp(output_Stage2.xyz + value * 0.0039215688593685627, 0.0, output_Stage2.w), output_Stage2.w);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1-385.shader_test b/shaders/skia/1-385.shader_test
new file mode 100644
index 0000000..dfab289
--- /dev/null
+++ b/shaders/skia/1-385.shader_test
@@ -0,0 +1,107 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_0_Stage0;
+ float t = -1.0;
+ float v = 1.0;
+ {
+ {
+ float invR1 = ufocalParams_Stage1_c0_c0_c0_c0.x;
+ float fx = ufocalParams_Stage1_c0_c0_c0_c0.y;
+ float x_t = -1.0;
+ {
+ float temp = p.x * p.x - p.y * p.y;
+ if (temp >= 0.0) {
+ {
+ x_t = sqrt(temp) - p.x * invR1;
+ }
+ }
+ }
+ {
+ if (x_t <= 0.0) {
+ v = -1.0;
+ }
+ }
+ {
+ {
+ t = x_t + fx;
+ }
+ }
+ }
+ }
+ _output = vec4(t, v, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else {
+ {
+ t.x = fract(t.x);
+ }
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TiledGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_1_Stage0.x);
+ uint y = uint(vTransformedCoords_1_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ output_Stage2 = vec4(clamp(output_Stage2.xyz + value * 0.0039215688593685627, 0.0, output_Stage2.w), output_Stage2.w);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1-387.shader_test b/shaders/skia/1-387.shader_test
new file mode 100644
index 0000000..a0d15ac
--- /dev/null
+++ b/shaders/skia/1-387.shader_test
@@ -0,0 +1,96 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_0_Stage0;
+ float t = -1.0;
+ {
+ {
+ float invR1 = ufocalParams_Stage1_c0_c0_c0_c0.x;
+ float fx = ufocalParams_Stage1_c0_c0_c0_c0.y;
+ float x_t = -1.0;
+ {
+ x_t = length(p) - p.x * invR1;
+ }
+ {
+ {
+ t = x_t + fx;
+ }
+ }
+ }
+ }
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else {
+ {
+ t.x = fract(t.x);
+ }
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TiledGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_1_Stage0.x);
+ uint y = uint(vTransformedCoords_1_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ output_Stage2 = vec4(clamp(output_Stage2.xyz + value * 0.0039215688593685627, 0.0, output_Stage2.w), output_Stage2.w);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1-388.shader_test b/shaders/skia/1-388.shader_test
new file mode 100644
index 0000000..8b521a3
--- /dev/null
+++ b/shaders/skia/1-388.shader_test
@@ -0,0 +1,110 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_0_Stage0;
+ float t = -1.0;
+ float v = 1.0;
+ {
+ {
+ float invR1 = ufocalParams_Stage1_c0_c0_c0_c0.x;
+ float fx = ufocalParams_Stage1_c0_c0_c0_c0.y;
+ float x_t = -1.0;
+ {
+ float temp = p.x * p.x - p.y * p.y;
+ if (temp >= 0.0) {
+ {
+ x_t = sqrt(temp) - p.x * invR1;
+ }
+ }
+ }
+ {
+ if (x_t <= 0.0) {
+ v = -1.0;
+ }
+ }
+ {
+ {
+ t = x_t + fx;
+ }
+ }
+ }
+ }
+ _output = vec4(t, v, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_1_Stage0.x);
+ uint y = uint(vTransformedCoords_1_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ output_Stage2 = vec4(clamp(output_Stage2.xyz + value * 0.0039215688593685627, 0.0, output_Stage2.w), output_Stage2.w);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1-397.shader_test b/shaders/skia/1-397.shader_test
new file mode 100644
index 0000000..3b0319d
--- /dev/null
+++ b/shaders/skia/1-397.shader_test
@@ -0,0 +1,92 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1-398.shader_test b/shaders/skia/1-398.shader_test
new file mode 100644
index 0000000..7c1a695
--- /dev/null
+++ b/shaders/skia/1-398.shader_test
@@ -0,0 +1,108 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_1_Stage0.x);
+ uint y = uint(vTransformedCoords_1_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ output_Stage2 = vec4(clamp(output_Stage2.xyz + value * 0.0039215688593685627, 0.0, output_Stage2.w), output_Stage2.w);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1-4.shader_test b/shaders/skia/1-4.shader_test
new file mode 100644
index 0000000..6ece0aa
--- /dev/null
+++ b/shaders/skia/1-4.shader_test
@@ -0,0 +1,31 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+noperspective in vec4 vcolor_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ {
+ sk_FragColor = outputColor_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 position;
+in vec4 color;
+noperspective out vec4 vcolor_Stage0;
+void main() {
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1-403.shader_test b/shaders/skia/1-403.shader_test
new file mode 100644
index 0000000..e064ffe
--- /dev/null
+++ b/shaders/skia/1-403.shader_test
@@ -0,0 +1,147 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform float ubias_Stage1_c0_c0_c0_c0;
+uniform float uscale_Stage1_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale8_9_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale10_11_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias8_9_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias10_11_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+flat in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec4 varccoord_Stage0;
+vec4 SweepGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float angle;
+ {
+ angle = atan(-vTransformedCoords_0_Stage0.y, -vTransformedCoords_0_Stage0.x);
+ }
+ float t = ((angle * 0.15915493667125702 + 0.5) + ubias_Stage1_c0_c0_c0_c0) * uscale_Stage1_c0_c0_c0_c0;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.w) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c1_c0;
+ }
+ }
+ } else {
+ {
+ if (t < uthresholds9_13_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale8_9_Stage1_c0_c0_c1_c0;
+ bias = ubias8_9_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale10_11_Stage1_c0_c0_c1_c0;
+ bias = ubias10_11_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = SweepGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ outputCoverage_Stage0 = vec4(1.0);
+ if (vec2(0.0) != varccoord_Stage0.xy) {
+ float fn = dot(varccoord_Stage0.xy, varccoord_Stage0.xy) - 1.0;
+ if (fn > 0.0) {
+ outputCoverage_Stage0 = vec4(0.0);
+ }
+ }
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1 * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec4 radii_selector;
+in vec4 corner_and_radius_outsets;
+in vec4 skew;
+in vec2 translate;
+in vec4 radii_x;
+in vec4 radii_y;
+in vec4 color;
+in vec4 local_rect;
+flat out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec4 varccoord_Stage0;
+void main() {
+ vcolor_Stage0 = color;
+ vec2 corner = corner_and_radius_outsets.xy;
+ vec2 radius_outset = corner_and_radius_outsets.zw;
+ vec2 radii;
+ radii.x = dot(radii_selector, radii_x);
+ radii.y = dot(radii_selector, radii_y);
+ bool is_arc_section = radii.x > 0.0;
+ radii = abs(radii);
+ vec2 vertexpos = corner + radius_outset * radii;
+ vec2 localcoord = (local_rect.xy * (1.0 - vertexpos) + local_rect.zw * (1.0 + vertexpos)) * 0.5;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localcoord, 1.0)).xy;
+ mat2 skewmatrix = mat2(skew.xy, skew.zw);
+ vec2 devcoord = vertexpos * skewmatrix + translate;
+ if (is_arc_section) {
+ varccoord_Stage0.xy = 1.0 - abs(radius_outset);
+ mat2 derivatives = inverse(skewmatrix);
+ varccoord_Stage0.zw = derivatives * (((varccoord_Stage0.xy / radii) * corner) * 2.0);
+ } else {
+ varccoord_Stage0 = vec4(0.0);
+ }
+ gl_Position = vec4(devcoord.x, devcoord.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1-404.shader_test b/shaders/skia/1-404.shader_test
new file mode 100644
index 0000000..0b52e96
--- /dev/null
+++ b/shaders/skia/1-404.shader_test
@@ -0,0 +1,163 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform float ubias_Stage1_c0_c0_c0_c0;
+uniform float uscale_Stage1_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale8_9_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale10_11_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias8_9_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias10_11_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+flat in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec4 varccoord_Stage0;
+vec4 SweepGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float angle;
+ {
+ angle = atan(-vTransformedCoords_0_Stage0.y, -vTransformedCoords_0_Stage0.x);
+ }
+ float t = ((angle * 0.15915493667125702 + 0.5) + ubias_Stage1_c0_c0_c0_c0) * uscale_Stage1_c0_c0_c0_c0;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.w) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c1_c0;
+ }
+ }
+ } else {
+ {
+ if (t < uthresholds9_13_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale8_9_Stage1_c0_c0_c1_c0;
+ bias = ubias8_9_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale10_11_Stage1_c0_c0_c1_c0;
+ bias = ubias10_11_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = SweepGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ outputCoverage_Stage0 = vec4(1.0);
+ if (vec2(0.0) != varccoord_Stage0.xy) {
+ float fn = dot(varccoord_Stage0.xy, varccoord_Stage0.xy) - 1.0;
+ if (fn > 0.0) {
+ outputCoverage_Stage0 = vec4(0.0);
+ }
+ }
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_1_Stage0.x);
+ uint y = uint(vTransformedCoords_1_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ output_Stage2 = vec4(clamp(output_Stage2.xyz + value * 0.0039215688593685627, 0.0, output_Stage2.w), output_Stage2.w);
+ }
+ {
+ sk_FragColor = output_Stage2 * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec4 radii_selector;
+in vec4 corner_and_radius_outsets;
+in vec4 skew;
+in vec2 translate;
+in vec4 radii_x;
+in vec4 radii_y;
+in vec4 color;
+in vec4 local_rect;
+flat out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec4 varccoord_Stage0;
+void main() {
+ vcolor_Stage0 = color;
+ vec2 corner = corner_and_radius_outsets.xy;
+ vec2 radius_outset = corner_and_radius_outsets.zw;
+ vec2 radii;
+ radii.x = dot(radii_selector, radii_x);
+ radii.y = dot(radii_selector, radii_y);
+ bool is_arc_section = radii.x > 0.0;
+ radii = abs(radii);
+ vec2 vertexpos = corner + radius_outset * radii;
+ vec2 localcoord = (local_rect.xy * (1.0 - vertexpos) + local_rect.zw * (1.0 + vertexpos)) * 0.5;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localcoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localcoord, 1.0)).xy;
+ mat2 skewmatrix = mat2(skew.xy, skew.zw);
+ vec2 devcoord = vertexpos * skewmatrix + translate;
+ if (is_arc_section) {
+ varccoord_Stage0.xy = 1.0 - abs(radius_outset);
+ mat2 derivatives = inverse(skewmatrix);
+ varccoord_Stage0.zw = derivatives * (((varccoord_Stage0.xy / radii) * corner) * 2.0);
+ } else {
+ varccoord_Stage0 = vec4(0.0);
+ }
+ gl_Position = vec4(devcoord.x, devcoord.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1-405.shader_test b/shaders/skia/1-405.shader_test
new file mode 100644
index 0000000..a9bbbd5
--- /dev/null
+++ b/shaders/skia/1-405.shader_test
@@ -0,0 +1,94 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 uscale01_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias01_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale23_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias23_Stage1_c0_c0_c1_c0;
+uniform float uthreshold_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 RadialGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = length(vTransformedCoords_0_Stage0);
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 DualIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthreshold_Stage1_c0_c0_c1_c0) {
+ scale = uscale01_Stage1_c0_c0_c1_c0;
+ bias = ubias01_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale23_Stage1_c0_c0_c1_c0;
+ bias = ubias23_Stage1_c0_c0_c1_c0;
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = RadialGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = DualIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_1_Stage0.x);
+ uint y = uint(vTransformedCoords_1_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ output_Stage2 = vec4(clamp(output_Stage2.xyz + value * 0.0039215688593685627, 0.0, output_Stage2.w), output_Stage2.w);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1-408.shader_test b/shaders/skia/1-408.shader_test
new file mode 100644
index 0000000..1a4eb29
--- /dev/null
+++ b/shaders/skia/1-408.shader_test
@@ -0,0 +1,87 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 uscale01_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias01_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale23_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias23_Stage1_c0_c0_c1_c0;
+uniform float uthreshold_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_0_Stage0;
+ float t = -1.0;
+ {
+ {
+ float r0 = ufocalParams_Stage1_c0_c0_c0_c0.x;
+ {
+ t = -length(p) - r0;
+ }
+ }
+ }
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 DualIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthreshold_Stage1_c0_c0_c1_c0) {
+ scale = uscale01_Stage1_c0_c0_c1_c0;
+ bias = ubias01_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale23_Stage1_c0_c0_c1_c0;
+ bias = ubias23_Stage1_c0_c0_c1_c0;
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = DualIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1-41.shader_test b/shaders/skia/1-41.shader_test
new file mode 100644
index 0000000..1d4ea7e
--- /dev/null
+++ b/shaders/skia/1-41.shader_test
@@ -0,0 +1,41 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ {
+ sk_FragColor = outputColor_Stage0 * output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1-411.shader_test b/shaders/skia/1-411.shader_test
new file mode 100644
index 0000000..fab82c7
--- /dev/null
+++ b/shaders/skia/1-411.shader_test
@@ -0,0 +1,86 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+in float vcoverage_Stage0;
+flat in vec4 vgeomDomain_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ float coverage = vcoverage_Stage0 * gl_FragCoord.w;
+ vec4 geoDomain;
+ geoDomain = vgeomDomain_Stage0;
+ if (coverage < 0.5) {
+ vec4 dists4 = clamp(vec4(1.0, 1.0, -1.0, -1.0) * (gl_FragCoord.xyxy - geoDomain), 0.0, 1.0);
+ vec2 dists2 = dists4.xy * dists4.zw;
+ coverage = min(coverage, dists2.x * dists2.y);
+ }
+ outputCoverage_Stage0 = vec4(coverage);
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1 * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec4 positionWithCoverage;
+in vec4 color;
+in vec2 localCoord;
+in vec4 geomDomain;
+out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+out float vcoverage_Stage0;
+flat out vec4 vgeomDomain_Stage0;
+void main() {
+ vec3 position = positionWithCoverage.xyz;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ vcoverage_Stage0 = positionWithCoverage.w * positionWithCoverage.z;
+ vgeomDomain_Stage0 = geomDomain;
+ gl_Position = vec4(position.x, position.y, 0.0, position.z);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1-412.shader_test b/shaders/skia/1-412.shader_test
new file mode 100644
index 0000000..b21b25f
--- /dev/null
+++ b/shaders/skia/1-412.shader_test
@@ -0,0 +1,102 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+in vec2 vTransformedCoords_0_Stage0;
+in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+in float vcoverage_Stage0;
+flat in vec4 vgeomDomain_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ float coverage = vcoverage_Stage0 * gl_FragCoord.w;
+ vec4 geoDomain;
+ geoDomain = vgeomDomain_Stage0;
+ if (coverage < 0.5) {
+ vec4 dists4 = clamp(vec4(1.0, 1.0, -1.0, -1.0) * (gl_FragCoord.xyxy - geoDomain), 0.0, 1.0);
+ vec2 dists2 = dists4.xy * dists4.zw;
+ coverage = min(coverage, dists2.x * dists2.y);
+ }
+ outputCoverage_Stage0 = vec4(coverage);
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_1_Stage0.x);
+ uint y = uint(vTransformedCoords_1_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ output_Stage2 = vec4(clamp(output_Stage2.xyz + value * 0.0039215688593685627, 0.0, output_Stage2.w), output_Stage2.w);
+ }
+ {
+ sk_FragColor = output_Stage2 * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec4 positionWithCoverage;
+in vec4 color;
+in vec2 localCoord;
+in vec4 geomDomain;
+out vec2 vTransformedCoords_0_Stage0;
+out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+out float vcoverage_Stage0;
+flat out vec4 vgeomDomain_Stage0;
+void main() {
+ vec3 position = positionWithCoverage.xyz;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ vcoverage_Stage0 = positionWithCoverage.w * positionWithCoverage.z;
+ vgeomDomain_Stage0 = geomDomain;
+ gl_Position = vec4(position.x, position.y, 0.0, position.z);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1-413.shader_test b/shaders/skia/1-413.shader_test
new file mode 100644
index 0000000..8fe7ee1
--- /dev/null
+++ b/shaders/skia/1-413.shader_test
@@ -0,0 +1,65 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+noperspective in vec3 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 vTransformedCoords_0_Stage0_ensure2D = vTransformedCoords_0_Stage0.xy / vTransformedCoords_0_Stage0.z;
+ float t = vTransformedCoords_0_Stage0_ensure2D.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec3 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0);
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1-414.shader_test b/shaders/skia/1-414.shader_test
new file mode 100644
index 0000000..cc8cc52
--- /dev/null
+++ b/shaders/skia/1-414.shader_test
@@ -0,0 +1,81 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+noperspective in vec3 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 vTransformedCoords_0_Stage0_ensure2D = vTransformedCoords_0_Stage0.xy / vTransformedCoords_0_Stage0.z;
+ float t = vTransformedCoords_0_Stage0_ensure2D.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_1_Stage0.x);
+ uint y = uint(vTransformedCoords_1_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ output_Stage2 = vec4(clamp(output_Stage2.xyz + value * 0.0039215688593685627, 0.0, output_Stage2.w), output_Stage2.w);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec3 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0);
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1-442.shader_test b/shaders/skia/1-442.shader_test
new file mode 100644
index 0000000..1a383f9
--- /dev/null
+++ b/shaders/skia/1-442.shader_test
@@ -0,0 +1,41 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+in vec2 vbboxcoord_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ float x = abs(vbboxcoord_Stage0.x), y = abs(vbboxcoord_Stage0.y);
+ float fn = (pow(x, 5.0832038853381789) + pow(y, 5.0832038853381789)) - 1.0;
+ float fnwidth = fwidth(fn);
+ fnwidth += 1.000000013351432e-10;
+ float coverage = clamp(0.5 - fn / fnwidth, 0.0, 1.0);
+ outputColor_Stage0 = vec4(0.50999999046325684, 0.41999998688697815, 0.70999997854232788, 1.0) * 0.88999998569488525;
+ outputCoverage_Stage0 = vec4(coverage);
+ }
+ {
+ sk_FragColor = outputColor_Stage0 * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uviewmatrix_Stage0;
+in vec2 bboxcoord;
+out vec2 vbboxcoord_Stage0;
+void main() {
+ mat2 R = mat2(cos(0.05000000074505806), sin(0.05000000074505806), -sin(0.05000000074505806), cos(0.05000000074505806));
+ vbboxcoord_Stage0 = bboxcoord * 1.25;
+ vec3 vertexpos = vec3((bboxcoord * 100.0) * R + 100.0, 1.0);
+ vertexpos = uviewmatrix_Stage0 * vertexpos;
+ gl_Position = vec4(vertexpos.x, vertexpos.y, 0.0, vertexpos.z);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1-443.shader_test b/shaders/skia/1-443.shader_test
new file mode 100644
index 0000000..b91016e
--- /dev/null
+++ b/shaders/skia/1-443.shader_test
@@ -0,0 +1,46 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uCoordTransformMatrix_0_Stage0;
+uniform sampler2D uTextureSampler_0_Stage1;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0(vec4 _input, vec2 _coords) {
+ _coords = _coords * uCoordTransformMatrix_0_Stage0.xz + uCoordTransformMatrix_0_Stage0.yw;
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, _coords) * _input;
+ return _output;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = (TextureEffect_Stage1_c0_c0(vec4(1.0), vec2(gl_FragCoord.x, gl_FragCoord.y)) + TextureEffect_Stage1_c0_c0(vec4(1.0), vec2(gl_FragCoord.x, 512.0 - gl_FragCoord.y))) / 2.0;
+ }
+ {
+ sk_FragColor = outputColor_Stage0 * output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1-446.shader_test b/shaders/skia/1-446.shader_test
new file mode 100644
index 0000000..ff1dcd4
--- /dev/null
+++ b/shaders/skia/1-446.shader_test
@@ -0,0 +1,74 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec3 uDistanceAdjust_Stage0;
+uniform float ualpha_Stage1;
+uniform sampler2D uTextureSampler_0_Stage0;
+noperspective in vec4 vinColor_Stage0;
+noperspective in vec2 vTextureCoords_Stage0;
+flat in int vTexIndex_Stage0;
+noperspective in vec2 vIntTextureCoords_Stage0;
+noperspective in float vDelta_Stage0;
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ vec2 uv = vTextureCoords_Stage0;
+ float st_grad_len = abs(-dFdy(vIntTextureCoords_Stage0.y));
+ vec2 offset = vec2(st_grad_len * vDelta_Stage0, 0.0);
+ vec4 texColor;
+ {
+ texColor = texture(uTextureSampler_0_Stage0, uv);
+ }
+ vec3 distance;
+ distance.y = texColor.x;
+ vec2 uv_adjusted = uv - offset;
+ {
+ texColor = texture(uTextureSampler_0_Stage0, uv_adjusted);
+ }
+ distance.x = texColor.x;
+ uv_adjusted = uv + offset;
+ {
+ texColor = texture(uTextureSampler_0_Stage0, uv_adjusted);
+ }
+ distance.z = texColor.x;
+ distance = vec3(7.96875) * (distance - vec3(0.50196081399917603));
+ distance -= uDistanceAdjust_Stage0;
+ float afwidth;
+ afwidth = 0.64999997615814209 * st_grad_len;
+ outputCoverage_Stage0 = vec4(smoothstep(vec3(-afwidth), vec3(afwidth), distance), 1.0);
+ }
+ {
+ outputCoverage_Stage0.w = max(max(outputCoverage_Stage0.x, outputCoverage_Stage0.y), outputCoverage_Stage0.z);
+ sk_FragColor = ualpha_Stage1 * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform vec2 uAtlasDimensionsInv_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in uvec2 inTextureCoords;
+noperspective out vec4 vinColor_Stage0;
+noperspective out vec2 vTextureCoords_Stage0;
+flat out int vTexIndex_Stage0;
+noperspective out vec2 vIntTextureCoords_Stage0;
+noperspective out float vDelta_Stage0;
+void main() {
+ vinColor_Stage0 = inColor;
+ ivec2 signedCoords = ivec2(int(inTextureCoords.x), int(inTextureCoords.y));
+ vec2 unormTexCoords = vec2(float(signedCoords.x / 2), float(signedCoords.y / 2));
+ vTextureCoords_Stage0 = unormTexCoords * uAtlasDimensionsInv_Stage0;
+ vTexIndex_Stage0 = 0;
+ vIntTextureCoords_Stage0 = unormTexCoords;
+ vDelta_Stage0 = uAtlasDimensionsInv_Stage0.x / 3.0;
+ gl_Position = vec4(inPosition.x, inPosition.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1-453.shader_test b/shaders/skia/1-453.shader_test
new file mode 100644
index 0000000..75f37d3
--- /dev/null
+++ b/shaders/skia/1-453.shader_test
@@ -0,0 +1,58 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform sampler2D uTextureSampler_0_Stage0;
+uniform sampler2D uTextureSampler_1_Stage0;
+uniform sampler2D uTextureSampler_2_Stage0;
+uniform sampler2D uTextureSampler_3_Stage0;
+noperspective in vec2 vTextureCoords_Stage0;
+flat in int vTexIndex_Stage0;
+noperspective in vec4 vinColor_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vinColor_Stage0;
+ vec4 texColor;
+ if (vTexIndex_Stage0 == 0) {
+ texColor = texture(uTextureSampler_0_Stage0, vTextureCoords_Stage0);
+ } else if (vTexIndex_Stage0 == 1) {
+ texColor = texture(uTextureSampler_1_Stage0, vTextureCoords_Stage0);
+ } else if (vTexIndex_Stage0 == 2) {
+ texColor = texture(uTextureSampler_2_Stage0, vTextureCoords_Stage0);
+ } else {
+ texColor = texture(uTextureSampler_3_Stage0, vTextureCoords_Stage0);
+ }
+ outputCoverage_Stage0 = texColor;
+ }
+ {
+ sk_FragColor = outputColor_Stage0 * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform vec2 uAtlasSizeInv_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in uvec2 inTextureCoords;
+noperspective out vec2 vTextureCoords_Stage0;
+flat out int vTexIndex_Stage0;
+noperspective out vec4 vinColor_Stage0;
+void main() {
+ ivec2 signedCoords = ivec2(int(inTextureCoords.x), int(inTextureCoords.y));
+ vec2 unormTexCoords = vec2(float(signedCoords.x / 2), float(signedCoords.y / 2));
+ int texIdx = 2 * (signedCoords.x & 1) + (signedCoords.y & 1);
+ vTextureCoords_Stage0 = unormTexCoords * uAtlasSizeInv_Stage0;
+ vTexIndex_Stage0 = texIdx;
+ vinColor_Stage0 = inColor;
+ gl_Position = vec4(inPosition.x, inPosition.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1-476.shader_test b/shaders/skia/1-476.shader_test
new file mode 100644
index 0000000..ff76a08
--- /dev/null
+++ b/shaders/skia/1-476.shader_test
@@ -0,0 +1,88 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+noperspective in vec3 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 RadialGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 vTransformedCoords_0_Stage0_ensure2D = vTransformedCoords_0_Stage0.xy / vTransformedCoords_0_Stage0.z;
+ float t = length(vTransformedCoords_0_Stage0_ensure2D);
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = RadialGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec3 localCoord;
+noperspective out vec3 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = uCoordTransformMatrix_0_Stage0 * localCoord;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1-492.shader_test b/shaders/skia/1-492.shader_test
new file mode 100644
index 0000000..45bc759
--- /dev/null
+++ b/shaders/skia/1-492.shader_test
@@ -0,0 +1,45 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_KHR_blend_equation_advanced : require
+out vec4 sk_FragColor;
+layout (blend_support_all_equations) out ;
+noperspective in vec4 vinCircleEdge_Stage0;
+noperspective in vec4 vinColor_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ vec4 circleEdge;
+ circleEdge = vinCircleEdge_Stage0;
+ outputColor_Stage0 = vinColor_Stage0;
+ float d = length(circleEdge.xy);
+ float distanceToOuterEdge = circleEdge.z * (1.0 - d);
+ float edgeAlpha = clamp(distanceToOuterEdge, 0.0, 1.0);
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ {
+ sk_FragColor = outputCoverage_Stage0 * outputColor_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 inPosition;
+in vec4 inColor;
+in vec4 inCircleEdge;
+noperspective out vec4 vinCircleEdge_Stage0;
+noperspective out vec4 vinColor_Stage0;
+void main() {
+ vinCircleEdge_Stage0 = inCircleEdge;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = inPosition;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1-5.shader_test b/shaders/skia/1-5.shader_test
new file mode 100644
index 0000000..c5790ce
--- /dev/null
+++ b/shaders/skia/1-5.shader_test
@@ -0,0 +1,35 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform sampler2DRect uTextureSampler_0_Stage0;
+noperspective in vec2 vlocalCoord_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vec4(1.0);
+ vec2 texCoord;
+ texCoord = vlocalCoord_Stage0;
+ outputColor_Stage0 = texture(uTextureSampler_0_Stage0, texCoord);
+ }
+ {
+ sk_FragColor = outputColor_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vlocalCoord_Stage0;
+void main() {
+ vlocalCoord_Stage0 = localCoord;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1-503.shader_test b/shaders/skia/1-503.shader_test
new file mode 100644
index 0000000..7bb40f4
--- /dev/null
+++ b/shaders/skia/1-503.shader_test
@@ -0,0 +1,103 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale8_9_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale10_11_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias8_9_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias10_11_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 RadialGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = length(vTransformedCoords_0_Stage0);
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.w) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c1_c0;
+ }
+ }
+ } else {
+ {
+ if (t < uthresholds9_13_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale8_9_Stage1_c0_c0_c1_c0;
+ bias = ubias8_9_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale10_11_Stage1_c0_c0_c1_c0;
+ bias = ubias10_11_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = RadialGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ t.x = fract(t.x);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TiledGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1-508.shader_test b/shaders/skia/1-508.shader_test
new file mode 100644
index 0000000..f87da69
--- /dev/null
+++ b/shaders/skia/1-508.shader_test
@@ -0,0 +1,67 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 TextureEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = TextureEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = OverrideInputFragmentProcessor_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_src_over(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec2 inLocalCoord;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 color = inColor;
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1-510.shader_test b/shaders/skia/1-510.shader_test
new file mode 100644
index 0000000..6c21bd6
--- /dev/null
+++ b/shaders/skia/1-510.shader_test
@@ -0,0 +1,81 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage0;
+noperspective in vec2 vTextureCoords_Stage0;
+flat in int vTexIndex_Stage0;
+noperspective in vec4 vinColor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ vec4 texColor;
+ {
+ texColor = texture(uTextureSampler_0_Stage0, vTextureCoords_Stage0);
+ }
+ outputCoverage_Stage0 = texColor;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TiledGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1 * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform vec2 uAtlasSizeInv_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in uvec2 inTextureCoords;
+noperspective out vec2 vTextureCoords_Stage0;
+flat out int vTexIndex_Stage0;
+noperspective out vec4 vinColor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ ivec2 signedCoords = ivec2(int(inTextureCoords.x), int(inTextureCoords.y));
+ vec2 unormTexCoords = vec2(float(signedCoords.x / 2), float(signedCoords.y / 2));
+ vTextureCoords_Stage0 = unormTexCoords * uAtlasSizeInv_Stage0;
+ vTexIndex_Stage0 = 0;
+ vinColor_Stage0 = inColor;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(inPosition.x, inPosition.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1-556.shader_test b/shaders/skia/1-556.shader_test
new file mode 100644
index 0000000..7f1a37b
--- /dev/null
+++ b/shaders/skia/1-556.shader_test
@@ -0,0 +1,57 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform sampler2D uTextureSampler_0_Stage0;
+noperspective in vec2 vTextureCoords_Stage0;
+flat in int vTexIndex_Stage0;
+noperspective in vec2 vIntTextureCoords_Stage0;
+noperspective in vec4 vinColor_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vinColor_Stage0;
+ vec2 uv = vTextureCoords_Stage0;
+ vec4 texColor;
+ {
+ texColor = texture(uTextureSampler_0_Stage0, uv);
+ }
+ float distance = 7.96875 * (texColor.x - 0.50196081399917603);
+ float afwidth;
+ afwidth = abs(0.64999997615814209 * -dFdy(vIntTextureCoords_Stage0.y));
+ float val = smoothstep(-afwidth, afwidth, distance);
+ outputCoverage_Stage0 = vec4(val);
+ }
+ {
+ sk_FragColor = outputColor_Stage0 * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform vec2 uAtlasDimensionsInv_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in uvec2 inTextureCoords;
+noperspective out vec2 vTextureCoords_Stage0;
+flat out int vTexIndex_Stage0;
+noperspective out vec2 vIntTextureCoords_Stage0;
+noperspective out vec4 vinColor_Stage0;
+void main() {
+ ivec2 signedCoords = ivec2(int(inTextureCoords.x), int(inTextureCoords.y));
+ vec2 unormTexCoords = vec2(float(signedCoords.x / 2), float(signedCoords.y / 2));
+ vTextureCoords_Stage0 = unormTexCoords * uAtlasDimensionsInv_Stage0;
+ vTexIndex_Stage0 = 0;
+ vIntTextureCoords_Stage0 = unormTexCoords;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = inPosition;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1-575.shader_test b/shaders/skia/1-575.shader_test
new file mode 100644
index 0000000..7082c8d
--- /dev/null
+++ b/shaders/skia/1-575.shader_test
@@ -0,0 +1,51 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec3 uedges_Stage1[3];
+flat in vec4 vcolor_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ float alpha = 1.0;
+ float edge;
+ edge = dot(uedges_Stage1[0], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage1[1], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage1[2], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ output_Stage1 = vec4(alpha);
+ }
+ {
+ sk_FragColor = outputColor_Stage0 * output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 inPosition;
+in vec2 inLocalCoords;
+in vec4 color;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vcolor_Stage0 = color;
+ vec2 pos2 = inPosition;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1-596.shader_test b/shaders/skia/1-596.shader_test
new file mode 100644
index 0000000..ab0a8b3
--- /dev/null
+++ b/shaders/skia/1-596.shader_test
@@ -0,0 +1,66 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ return _output;
+}
+vec4 TextureEffect_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_1_Stage1, vTransformedCoords_1_Stage0) * _input;
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_src_in(OverrideInputFragmentProcessor_Stage1_c0_c0(inputColor), TextureEffect_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1-597.shader_test b/shaders/skia/1-597.shader_test
new file mode 100644
index 0000000..ffa33e4
--- /dev/null
+++ b/shaders/skia/1-597.shader_test
@@ -0,0 +1,96 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c1_c0_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c1_c0_c0_c0;
+uniform vec4 ustart_Stage1_c1_c0_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c1_c0_c0_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ return _output;
+}
+vec4 LinearGradientLayout_Stage1_c1_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_1_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c1_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c1_c0_c0_c0_c1_c0 + t * uend_Stage1_c1_c0_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c1_c0_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c1_c0_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c1_c0_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c1_c0_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = ClampedGradientEffect_Stage1_c1_c0_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ return _output;
+}
+vec4 blend_dst_over(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src + dst;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_dst_over(OverrideInputFragmentProcessor_Stage1_c0_c0(inputColor), OverrideInputFragmentProcessor_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1-62.shader_test b/shaders/skia/1-62.shader_test
new file mode 100644
index 0000000..d524080
--- /dev/null
+++ b/shaders/skia/1-62.shader_test
@@ -0,0 +1,56 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform float uDistanceAdjust_Stage0;
+uniform sampler2D uTextureSampler_0_Stage0;
+noperspective in vec4 vinColor_Stage0;
+noperspective in vec2 vTextureCoords_Stage0;
+flat in int vTexIndex_Stage0;
+noperspective in vec2 vIntTextureCoords_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vinColor_Stage0;
+ vec2 uv = vTextureCoords_Stage0;
+ vec4 texColor;
+ {
+ texColor = texture(uTextureSampler_0_Stage0, uv);
+ }
+ float distance = 7.96875 * (texColor.x - 0.50196081399917603);
+ distance -= uDistanceAdjust_Stage0;
+ float val = distance > 0.0 ? 1.0 : 0.0;
+ outputCoverage_Stage0 = vec4(val);
+ }
+ {
+ sk_FragColor = outputColor_Stage0 * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform vec2 uAtlasDimensionsInv_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in uvec2 inTextureCoords;
+noperspective out vec4 vinColor_Stage0;
+noperspective out vec2 vTextureCoords_Stage0;
+flat out int vTexIndex_Stage0;
+noperspective out vec2 vIntTextureCoords_Stage0;
+void main() {
+ vinColor_Stage0 = inColor;
+ ivec2 signedCoords = ivec2(int(inTextureCoords.x), int(inTextureCoords.y));
+ vec2 unormTexCoords = vec2(float(signedCoords.x / 2), float(signedCoords.y / 2));
+ vTextureCoords_Stage0 = unormTexCoords * uAtlasDimensionsInv_Stage0;
+ vTexIndex_Stage0 = 0;
+ vIntTextureCoords_Stage0 = unormTexCoords;
+ gl_Position = vec4(inPosition.x, inPosition.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1-625.shader_test b/shaders/skia/1-625.shader_test
new file mode 100644
index 0000000..7ada465
--- /dev/null
+++ b/shaders/skia/1-625.shader_test
@@ -0,0 +1,82 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform mat4 um_Stage2_c2_c0;
+uniform vec4 uv_Stage2_c2_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+vec4 RGBToHSLFilterEffect_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 c = _input;
+ vec4 p = c.y < c.z ? vec4(c.zy, -1.0, 0.66666668653488159) : vec4(c.yz, 0.0, -0.3333333432674408);
+ vec4 q = c.x < p.x ? vec4(p.x, c.x, p.yw) : vec4(c.x, p.x, p.yz);
+ float pmV = q.x;
+ float pmC = pmV - min(q.y, q.z);
+ float pmL = pmV - pmC * 0.5;
+ float H = abs(q.w + (q.y - q.z) / (pmC * 6.0 + 9.9999997473787516e-05));
+ float S = pmC / ((c.w + 9.9999997473787516e-05) - abs(pmL * 2.0 - c.w));
+ float L = pmL / (c.w + 9.9999997473787516e-05);
+ _output = vec4(H, S, L, c.w);
+ return _output;
+}
+vec4 ColorMatrixFragmentProcessor_Stage2_c2_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = _input;
+ _output = um_Stage2_c2_c0 * inputColor + uv_Stage2_c2_c0;
+ {
+ _output.w = clamp(_output.w, 0.0, 1.0);
+ }
+ return _output;
+}
+vec4 HSLToRGBFilterEffect_Stage2_c3_c0(vec4 _input) {
+ vec4 _output;
+ vec3 hsl = _input.xyz;
+ float C = (1.0 - abs(2.0 * hsl.z - 1.0)) * hsl.y;
+ vec3 p = hsl.xxx + vec3(0.0, 0.66666668653488159, 0.3333333432674408);
+ vec3 q = clamp(abs(fract(p) * 6.0 - 3.0) - 1.0, 0.0, 1.0);
+ vec3 rgb = (q - 0.5) * C + hsl.z;
+ _output = clamp(vec4(rgb, _input.w), 0.0, 1.0);
+ _output.xyz *= _output.w;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TextureEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = HSLToRGBFilterEffect_Stage2_c3_c0(ColorMatrixFragmentProcessor_Stage2_c2_c0(RGBToHSLFilterEffect_Stage2_c1_c0(output_Stage1)));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1-626.shader_test b/shaders/skia/1-626.shader_test
new file mode 100644
index 0000000..c978b86
--- /dev/null
+++ b/shaders/skia/1-626.shader_test
@@ -0,0 +1,106 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale8_9_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale10_11_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias8_9_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias10_11_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.w) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c1_c0;
+ }
+ }
+ } else {
+ {
+ if (t < uthresholds9_13_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale8_9_Stage1_c0_c0_c1_c0;
+ bias = ubias8_9_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale10_11_Stage1_c0_c0_c1_c0;
+ bias = ubias10_11_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1-63.shader_test b/shaders/skia/1-63.shader_test
new file mode 100644
index 0000000..76b5fd6
--- /dev/null
+++ b/shaders/skia/1-63.shader_test
@@ -0,0 +1,79 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage0;
+noperspective in vec2 vTextureCoords_Stage0;
+flat in int vTexIndex_Stage0;
+noperspective in vec4 vinColor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 RadialGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = length(vTransformedCoords_0_Stage0);
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = RadialGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ t.x = fract(t.x);
+ }
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ vec4 texColor;
+ {
+ texColor = texture(uTextureSampler_0_Stage0, vTextureCoords_Stage0);
+ }
+ outputCoverage_Stage0 = texColor;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TiledGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1 * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform vec2 uAtlasSizeInv_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in uvec2 inTextureCoords;
+noperspective out vec2 vTextureCoords_Stage0;
+flat out int vTexIndex_Stage0;
+noperspective out vec4 vinColor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ ivec2 signedCoords = ivec2(int(inTextureCoords.x), int(inTextureCoords.y));
+ vec2 unormTexCoords = vec2(float(signedCoords.x / 2), float(signedCoords.y / 2));
+ vTextureCoords_Stage0 = unormTexCoords * uAtlasSizeInv_Stage0;
+ vTexIndex_Stage0 = 0;
+ vinColor_Stage0 = inColor;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(inPosition.x, inPosition.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1-632.shader_test b/shaders/skia/1-632.shader_test
new file mode 100644
index 0000000..0a8bb23
--- /dev/null
+++ b/shaders/skia/1-632.shader_test
@@ -0,0 +1,65 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform mat4 um_Stage2;
+uniform vec4 uv_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TextureEffect_Stage1_c0_c0(vec4(1.0));
+ output_Stage1.xyz *= outputColor_Stage0.xyz;
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ vec4 output_Stage2;
+ {
+ vec4 inputColor = output_Stage1;
+ {
+ float nonZeroAlpha = max(inputColor.w, 9.9999997473787516e-05);
+ inputColor = vec4(inputColor.xyz / nonZeroAlpha, inputColor.w);
+ }
+ output_Stage2 = um_Stage2 * inputColor + uv_Stage2;
+ {
+ output_Stage2 = clamp(output_Stage2, 0.0, 1.0);
+ }
+ {
+ output_Stage2.xyz *= output_Stage2.w;
+ }
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1-638.shader_test b/shaders/skia/1-638.shader_test
new file mode 100644
index 0000000..4a5a65e
--- /dev/null
+++ b/shaders/skia/1-638.shader_test
@@ -0,0 +1,27 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = (!gl_FrontFacing) ? vec4(0.0, 1.0, 0.0, 1.0) : vec4(1.0, 0.0, 0.0, 1.0);
+ }
+ {
+ sk_FragColor = outputColor_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 position;
+void main() {
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1-65.shader_test b/shaders/skia/1-65.shader_test
new file mode 100644
index 0000000..2787e0d
--- /dev/null
+++ b/shaders/skia/1-65.shader_test
@@ -0,0 +1,75 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec3 uDistanceAdjust_Stage0;
+uniform float ualpha_Stage1;
+uniform sampler2D uTextureSampler_0_Stage0;
+noperspective in vec4 vinColor_Stage0;
+noperspective in vec2 vTextureCoords_Stage0;
+flat in int vTexIndex_Stage0;
+noperspective in vec2 vIntTextureCoords_Stage0;
+noperspective in float vDelta_Stage0;
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ vec2 uv = vTextureCoords_Stage0;
+ vec2 st_grad = -dFdy(vIntTextureCoords_Stage0);
+ vec2 offset = vDelta_Stage0 * vec2(st_grad.y, -st_grad.x);
+ float st_grad_len = length(st_grad);
+ vec4 texColor;
+ {
+ texColor = texture(uTextureSampler_0_Stage0, uv);
+ }
+ vec3 distance;
+ distance.y = texColor.x;
+ vec2 uv_adjusted = uv - offset;
+ {
+ texColor = texture(uTextureSampler_0_Stage0, uv_adjusted);
+ }
+ distance.x = texColor.x;
+ uv_adjusted = uv + offset;
+ {
+ texColor = texture(uTextureSampler_0_Stage0, uv_adjusted);
+ }
+ distance.z = texColor.x;
+ distance = vec3(7.96875) * (distance - vec3(0.50196081399917603));
+ distance -= uDistanceAdjust_Stage0;
+ float afwidth;
+ afwidth = 0.64999997615814209 * st_grad_len;
+ outputCoverage_Stage0 = vec4(smoothstep(vec3(-afwidth), vec3(afwidth), distance), 1.0);
+ }
+ {
+ outputCoverage_Stage0.w = max(max(outputCoverage_Stage0.x, outputCoverage_Stage0.y), outputCoverage_Stage0.z);
+ sk_FragColor = ualpha_Stage1 * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform vec2 uAtlasDimensionsInv_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in uvec2 inTextureCoords;
+noperspective out vec4 vinColor_Stage0;
+noperspective out vec2 vTextureCoords_Stage0;
+flat out int vTexIndex_Stage0;
+noperspective out vec2 vIntTextureCoords_Stage0;
+noperspective out float vDelta_Stage0;
+void main() {
+ vinColor_Stage0 = inColor;
+ ivec2 signedCoords = ivec2(int(inTextureCoords.x), int(inTextureCoords.y));
+ vec2 unormTexCoords = vec2(float(signedCoords.x / 2), float(signedCoords.y / 2));
+ vTextureCoords_Stage0 = unormTexCoords * uAtlasDimensionsInv_Stage0;
+ vTexIndex_Stage0 = 0;
+ vIntTextureCoords_Stage0 = unormTexCoords;
+ vDelta_Stage0 = uAtlasDimensionsInv_Stage0.x / 3.0;
+ gl_Position = vec4(inPosition.x, inPosition.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1-650.shader_test b/shaders/skia/1-650.shader_test
new file mode 100644
index 0000000..6a014e6
--- /dev/null
+++ b/shaders/skia/1-650.shader_test
@@ -0,0 +1,61 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 ucircle_Stage1_c0_c0;
+uniform vec4 ucircle_Stage1_c1_c0;
+flat in vec4 vcolor_Stage0;
+vec4 CircleEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ float d;
+ {
+ d = (1.0 - length((ucircle_Stage1_c0_c0.xy - gl_FragCoord.xy) * ucircle_Stage1_c0_c0.w)) * ucircle_Stage1_c0_c0.z;
+ }
+ {
+ _output = _input * clamp(d, 0.0, 1.0);
+ }
+ return _output;
+}
+vec4 CircleEffect_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ float d;
+ {
+ d = (1.0 - length((ucircle_Stage1_c1_c0.xy - gl_FragCoord.xy) * ucircle_Stage1_c1_c0.w)) * ucircle_Stage1_c1_c0.z;
+ }
+ {
+ _output = _input * clamp(d, 0.0, 1.0);
+ }
+ return _output;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = CircleEffect_Stage1_c1_c0(CircleEffect_Stage1_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = outputColor_Stage0 * output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 position;
+in vec4 color;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1-651.shader_test b/shaders/skia/1-651.shader_test
new file mode 100644
index 0000000..4d8a91a
--- /dev/null
+++ b/shaders/skia/1-651.shader_test
@@ -0,0 +1,81 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+noperspective in vec4 vinCircleEdge_Stage0;
+noperspective in vec3 vinClipPlane_Stage0;
+noperspective in vec3 vinIsectPlane_Stage0;
+noperspective in vec3 vinUnionPlane_Stage0;
+noperspective in vec4 vinRoundCapCenters_Stage0;
+flat in float vcapRadius_Stage0;
+noperspective in vec4 vinColor_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ vec4 circleEdge;
+ circleEdge = vinCircleEdge_Stage0;
+ vec3 clipPlane;
+ clipPlane = vinClipPlane_Stage0;
+ vec3 isectPlane;
+ isectPlane = vinIsectPlane_Stage0;
+ vec3 unionPlane;
+ unionPlane = vinUnionPlane_Stage0;
+ vec4 roundCapCenters;
+ roundCapCenters = vinRoundCapCenters_Stage0;
+ outputColor_Stage0 = vinColor_Stage0;
+ float d = length(circleEdge.xy);
+ float distanceToOuterEdge = circleEdge.z * (1.0 - d);
+ float edgeAlpha = clamp(distanceToOuterEdge, 0.0, 1.0);
+ float distanceToInnerEdge = circleEdge.z * (d - circleEdge.w);
+ float innerAlpha = clamp(distanceToInnerEdge, 0.0, 1.0);
+ edgeAlpha *= innerAlpha;
+ float clip = clamp(circleEdge.z * dot(circleEdge.xy, clipPlane.xy) + clipPlane.z, 0.0, 1.0);
+ clip *= clamp(circleEdge.z * dot(circleEdge.xy, isectPlane.xy) + isectPlane.z, 0.0, 1.0);
+ clip = clamp(clip + clamp(circleEdge.z * dot(circleEdge.xy, unionPlane.xy) + unionPlane.z, 0.0, 1.0), 0.0, 1.0);
+ edgeAlpha *= clip;
+ float dcap1 = circleEdge.z * (vcapRadius_Stage0 - length(circleEdge.xy - roundCapCenters.xy));
+ float dcap2 = circleEdge.z * (vcapRadius_Stage0 - length(circleEdge.xy - roundCapCenters.zw));
+ float capAlpha = (1.0 - clip) * (max(dcap1, 0.0) + max(dcap2, 0.0));
+ edgeAlpha = min(edgeAlpha + capAlpha, 1.0);
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ {
+ sk_FragColor = outputColor_Stage0 * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 inPosition;
+in vec4 inColor;
+in vec4 inCircleEdge;
+in vec3 inClipPlane;
+in vec3 inIsectPlane;
+in vec3 inUnionPlane;
+in vec4 inRoundCapCenters;
+noperspective out vec4 vinCircleEdge_Stage0;
+noperspective out vec3 vinClipPlane_Stage0;
+noperspective out vec3 vinIsectPlane_Stage0;
+noperspective out vec3 vinUnionPlane_Stage0;
+noperspective out vec4 vinRoundCapCenters_Stage0;
+flat out float vcapRadius_Stage0;
+noperspective out vec4 vinColor_Stage0;
+void main() {
+ vinCircleEdge_Stage0 = inCircleEdge;
+ vinClipPlane_Stage0 = inClipPlane;
+ vinIsectPlane_Stage0 = inIsectPlane;
+ vinUnionPlane_Stage0 = inUnionPlane;
+ vinRoundCapCenters_Stage0 = inRoundCapCenters;
+ vcapRadius_Stage0 = (1.0 - inCircleEdge.w) / 2.0;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = inPosition;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1-66.shader_test b/shaders/skia/1-66.shader_test
new file mode 100644
index 0000000..7d37aec
--- /dev/null
+++ b/shaders/skia/1-66.shader_test
@@ -0,0 +1,38 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ {
+ sk_FragColor = output_Stage1;
+ sk_FragColor = sk_FragColor.wwww;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1-671.shader_test b/shaders/skia/1-671.shader_test
new file mode 100644
index 0000000..95b63a2
--- /dev/null
+++ b/shaders/skia/1-671.shader_test
@@ -0,0 +1,52 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uellipse_Stage1;
+noperspective in vec4 vcolor_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec2 d = gl_FragCoord.xy - uellipse_Stage1.xy;
+ vec2 Z = d * uellipse_Stage1.zw;
+ float implicit = dot(Z, d) - 1.0;
+ float grad_dot = 4.0 * dot(Z, Z);
+ {
+ grad_dot = max(grad_dot, 1.1754999560161448e-38);
+ }
+ float approx_dist = implicit * inversesqrt(grad_dot);
+ float alpha;
+ {
+ alpha = approx_dist > 0.0 ? 0.0 : 1.0;
+ }
+ output_Stage1 = vec4(alpha);
+ }
+ {
+ sk_FragColor = outputColor_Stage0 * output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 inPosition;
+in vec4 inColor;
+noperspective out vec4 vcolor_Stage0;
+void main() {
+ vec4 color = inColor;
+ vcolor_Stage0 = color;
+ vec2 pos2 = inPosition;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1-677.shader_test b/shaders/skia/1-677.shader_test
new file mode 100644
index 0000000..14302c3
--- /dev/null
+++ b/shaders/skia/1-677.shader_test
@@ -0,0 +1,40 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+noperspective in vec4 vcolor_Stage0;
+noperspective in float vinCoverage_Stage0;
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ float alpha = 1.0;
+ alpha = vinCoverage_Stage0;
+ outputCoverage_Stage0 = vec4(alpha);
+ }
+ {
+ sk_FragColor = outputCoverage_Stage0;
+ sk_FragColor = sk_FragColor.wwww;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 inPosition;
+in vec4 inColor;
+in float inCoverage;
+noperspective out vec4 vcolor_Stage0;
+noperspective out float vinCoverage_Stage0;
+void main() {
+ vec4 color = inColor;
+ vcolor_Stage0 = color;
+ vec2 pos2 = inPosition;
+ vinCoverage_Stage0 = inCoverage;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1-680.shader_test b/shaders/skia/1-680.shader_test
new file mode 100644
index 0000000..1120010
--- /dev/null
+++ b/shaders/skia/1-680.shader_test
@@ -0,0 +1,52 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 ucircleData_Stage1;
+uniform vec4 ucircle_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+flat in vec4 vcolor_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec2 vec = vec2((gl_FragCoord.x - ucircleData_Stage1.x) * ucircleData_Stage1.w, (gl_FragCoord.y - ucircleData_Stage1.y) * ucircleData_Stage1.w);
+ float dist = length(vec) + (0.5 - ucircleData_Stage1.z) * ucircleData_Stage1.w;
+ output_Stage1 = vec4(texture(uTextureSampler_0_Stage1, vec2(dist, 0.5)).w);
+ }
+ vec4 output_Stage2;
+ {
+ float d;
+ {
+ d = (length((ucircle_Stage2.xy - gl_FragCoord.xy) * ucircle_Stage2.w) - 1.0) * ucircle_Stage2.z;
+ }
+ {
+ output_Stage2 = output_Stage1 * clamp(d, 0.0, 1.0);
+ }
+ }
+ {
+ sk_FragColor = outputColor_Stage0 * output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 position;
+in vec4 color;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1-681.shader_test b/shaders/skia/1-681.shader_test
new file mode 100644
index 0000000..740d5ac
--- /dev/null
+++ b/shaders/skia/1-681.shader_test
@@ -0,0 +1,57 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 urectH_Stage1;
+uniform float uinvSixSigma_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+flat in vec4 vcolor_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ float xCoverage, yCoverage;
+ {
+ float l, r, t, b;
+ {
+ l = gl_FragCoord.x - urectH_Stage1.x;
+ r = urectH_Stage1.z - gl_FragCoord.x;
+ t = gl_FragCoord.y - urectH_Stage1.y;
+ b = urectH_Stage1.w - gl_FragCoord.y;
+ }
+ float il = 1.0 + l * uinvSixSigma_Stage1;
+ float ir = 1.0 + r * uinvSixSigma_Stage1;
+ float it = 1.0 + t * uinvSixSigma_Stage1;
+ float ib = 1.0 + b * uinvSixSigma_Stage1;
+ xCoverage = (1.0 - texture(uTextureSampler_0_Stage1, vec2(il, 0.5)).w) - texture(uTextureSampler_0_Stage1, vec2(ir, 0.5)).w;
+ yCoverage = (1.0 - texture(uTextureSampler_0_Stage1, vec2(it, 0.5)).w) - texture(uTextureSampler_0_Stage1, vec2(ib, 0.5)).w;
+ }
+ output_Stage1 = vec4(xCoverage) * yCoverage;
+ }
+ {
+ sk_FragColor = outputColor_Stage0 * output_Stage1;
+ sk_FragColor = sk_FragColor.wwww;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 position;
+in vec4 color;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1-7.shader_test b/shaders/skia/1-7.shader_test
new file mode 100644
index 0000000..baf3abc
--- /dev/null
+++ b/shaders/skia/1-7.shader_test
@@ -0,0 +1,66 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform mat3 ucolorSpaceMatrix_Stage1;
+uniform vec3 ucolorSpaceTranslate_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+uniform sampler2D uTextureSampler_2_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+vec4 TextureEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_1_Stage1, vTransformedCoords_1_Stage0) * _input;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c2_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_2_Stage1, vTransformedCoords_2_Stage0) * _input;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ vec4 planes[3];
+ planes[0] = TextureEffect_Stage1_c0_c0(vec4(1.0));
+ planes[1] = TextureEffect_Stage1_c1_c0(vec4(1.0));
+ planes[2] = TextureEffect_Stage1_c2_c0(vec4(1.0));
+ vec4 color = vec4(planes[0].x, planes[1].x, planes[2].x, 1.0);
+ color.xyz = clamp(color.xyz * ucolorSpaceMatrix_Stage1 + ucolorSpaceTranslate_Stage1, 0.0, 1.0);
+ output_Stage1 = color;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1-703.shader_test b/shaders/skia/1-703.shader_test
new file mode 100644
index 0000000..369852f
--- /dev/null
+++ b/shaders/skia/1-703.shader_test
@@ -0,0 +1,67 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+vec4 ComposeOne_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_dst_in(_input, TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0)));
+ return _output;
+}
+vec4 TextureEffect_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_1_Stage1, vTransformedCoords_1_Stage0) * _input;
+ return _output;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TextureEffect_Stage1_c1_c0(ComposeOne_Stage1_c0_c0(outputColor_Stage0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1-705.shader_test b/shaders/skia/1-705.shader_test
new file mode 100644
index 0000000..e85ece7
--- /dev/null
+++ b/shaders/skia/1-705.shader_test
@@ -0,0 +1,50 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uclamp_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec2 inCoord = vTransformedCoords_0_Stage0;
+ vec2 subsetCoord;
+ subsetCoord.x = inCoord.x;
+ subsetCoord.y = inCoord.y;
+ vec2 clampedCoord;
+ clampedCoord.x = subsetCoord.x;
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage1.y, uclamp_Stage1.w);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ output_Stage1 = outputColor_Stage0 * textureColor;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1-725.shader_test b/shaders/skia/1-725.shader_test
new file mode 100644
index 0000000..d0359ba
--- /dev/null
+++ b/shaders/skia/1-725.shader_test
@@ -0,0 +1,51 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 urectF_Stage1;
+uniform float uinvSixSigma_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+flat in vec4 vcolor_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ float xCoverage, yCoverage;
+ {
+ float x, y;
+ {
+ x = max(urectF_Stage1.x - gl_FragCoord.x, gl_FragCoord.x - urectF_Stage1.z);
+ y = max(urectF_Stage1.y - gl_FragCoord.y, gl_FragCoord.y - urectF_Stage1.w);
+ }
+ xCoverage = texture(uTextureSampler_0_Stage1, vec2(x * uinvSixSigma_Stage1, 0.5)).w;
+ yCoverage = texture(uTextureSampler_0_Stage1, vec2(y * uinvSixSigma_Stage1, 0.5)).w;
+ output_Stage1 = vec4(xCoverage) * yCoverage;
+ }
+ output_Stage1 = vec4(xCoverage) * yCoverage;
+ }
+ {
+ sk_FragColor = outputColor_Stage0 * output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 position;
+in vec4 color;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1-73.shader_test b/shaders/skia/1-73.shader_test
new file mode 100644
index 0000000..688a2ef
--- /dev/null
+++ b/shaders/skia/1-73.shader_test
@@ -0,0 +1,51 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uclamp_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+flat in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec2 inCoord = vTransformedCoords_0_Stage0;
+ vec2 subsetCoord;
+ subsetCoord.x = inCoord.x;
+ subsetCoord.y = inCoord.y;
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage1.x, uclamp_Stage1.z);
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage1.y, uclamp_Stage1.w);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ output_Stage1 = outputColor_Stage0 * textureColor;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec2 inLocalCoords;
+in vec4 color;
+flat out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vcolor_Stage0 = color;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoords, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1-733.shader_test b/shaders/skia/1-733.shader_test
new file mode 100644
index 0000000..fdf779e
--- /dev/null
+++ b/shaders/skia/1-733.shader_test
@@ -0,0 +1,31 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+flat in vec4 vcolor_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ {
+ sk_FragColor = outputColor_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec3 position;
+in vec4 color;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, position.z);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1-736.shader_test b/shaders/skia/1-736.shader_test
new file mode 100644
index 0000000..d68b7fe
--- /dev/null
+++ b/shaders/skia/1-736.shader_test
@@ -0,0 +1,125 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform float ubias_Stage1_c0_c0_c0_c0;
+uniform float uscale_Stage1_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale8_9_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale10_11_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias8_9_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias10_11_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+noperspective in vec4 vinCircleEdge_Stage0;
+noperspective in vec4 vinColor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 SweepGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float angle;
+ {
+ angle = atan(-vTransformedCoords_0_Stage0.y, -vTransformedCoords_0_Stage0.x);
+ }
+ float t = ((angle * 0.15915493667125702 + 0.5) + ubias_Stage1_c0_c0_c0_c0) * uscale_Stage1_c0_c0_c0_c0;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.w) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c1_c0;
+ }
+ }
+ } else {
+ {
+ if (t < uthresholds9_13_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale8_9_Stage1_c0_c0_c1_c0;
+ bias = ubias8_9_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale10_11_Stage1_c0_c0_c1_c0;
+ bias = ubias10_11_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = SweepGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ vec4 circleEdge;
+ circleEdge = vinCircleEdge_Stage0;
+ float d = length(circleEdge.xy);
+ float distanceToOuterEdge = circleEdge.z * (1.0 - d);
+ float edgeAlpha = clamp(distanceToOuterEdge, 0.0, 1.0);
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1 * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec4 inCircleEdge;
+noperspective out vec4 vinCircleEdge_Stage0;
+noperspective out vec4 vinColor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vinCircleEdge_Stage0 = inCircleEdge;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1-737.shader_test b/shaders/skia/1-737.shader_test
new file mode 100644
index 0000000..118f773
--- /dev/null
+++ b/shaders/skia/1-737.shader_test
@@ -0,0 +1,74 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+noperspective in vec4 vinCircleEdge_Stage0;
+noperspective in vec3 vinClipPlane_Stage0;
+noperspective in vec3 vinIsectPlane_Stage0;
+noperspective in vec4 vinRoundCapCenters_Stage0;
+flat in float vcapRadius_Stage0;
+noperspective in vec4 vinColor_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ vec4 circleEdge;
+ circleEdge = vinCircleEdge_Stage0;
+ vec3 clipPlane;
+ clipPlane = vinClipPlane_Stage0;
+ vec3 isectPlane;
+ isectPlane = vinIsectPlane_Stage0;
+ vec4 roundCapCenters;
+ roundCapCenters = vinRoundCapCenters_Stage0;
+ outputColor_Stage0 = vinColor_Stage0;
+ float d = length(circleEdge.xy);
+ float distanceToOuterEdge = circleEdge.z * (1.0 - d);
+ float edgeAlpha = clamp(distanceToOuterEdge, 0.0, 1.0);
+ float distanceToInnerEdge = circleEdge.z * (d - circleEdge.w);
+ float innerAlpha = clamp(distanceToInnerEdge, 0.0, 1.0);
+ edgeAlpha *= innerAlpha;
+ float clip = clamp(circleEdge.z * dot(circleEdge.xy, clipPlane.xy) + clipPlane.z, 0.0, 1.0);
+ clip *= clamp(circleEdge.z * dot(circleEdge.xy, isectPlane.xy) + isectPlane.z, 0.0, 1.0);
+ edgeAlpha *= clip;
+ float dcap1 = circleEdge.z * (vcapRadius_Stage0 - length(circleEdge.xy - roundCapCenters.xy));
+ float dcap2 = circleEdge.z * (vcapRadius_Stage0 - length(circleEdge.xy - roundCapCenters.zw));
+ float capAlpha = (1.0 - clip) * (max(dcap1, 0.0) + max(dcap2, 0.0));
+ edgeAlpha = min(edgeAlpha + capAlpha, 1.0);
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ {
+ sk_FragColor = outputColor_Stage0 * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 inPosition;
+in vec4 inColor;
+in vec4 inCircleEdge;
+in vec3 inClipPlane;
+in vec3 inIsectPlane;
+in vec4 inRoundCapCenters;
+noperspective out vec4 vinCircleEdge_Stage0;
+noperspective out vec3 vinClipPlane_Stage0;
+noperspective out vec3 vinIsectPlane_Stage0;
+noperspective out vec4 vinRoundCapCenters_Stage0;
+flat out float vcapRadius_Stage0;
+noperspective out vec4 vinColor_Stage0;
+void main() {
+ vinCircleEdge_Stage0 = inCircleEdge;
+ vinClipPlane_Stage0 = inClipPlane;
+ vinIsectPlane_Stage0 = inIsectPlane;
+ vinRoundCapCenters_Stage0 = inRoundCapCenters;
+ vcapRadius_Stage0 = (1.0 - inCircleEdge.w) / 2.0;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = inPosition;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1-760.shader_test b/shaders/skia/1-760.shader_test
new file mode 100644
index 0000000..2a92e0f
--- /dev/null
+++ b/shaders/skia/1-760.shader_test
@@ -0,0 +1,85 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform mat4 um_Stage2;
+uniform vec4 uv_Stage2;
+uniform vec4 urectH_Stage3;
+uniform float uinvSixSigma_Stage3;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage3;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TextureEffect_Stage1_c0_c0(vec4(1.0));
+ output_Stage1.xyz *= outputColor_Stage0.xyz;
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ vec4 output_Stage2;
+ {
+ vec4 inputColor = output_Stage1;
+ {
+ float nonZeroAlpha = max(inputColor.w, 9.9999997473787516e-05);
+ inputColor = vec4(inputColor.xyz / nonZeroAlpha, inputColor.w);
+ }
+ output_Stage2 = um_Stage2 * inputColor + uv_Stage2;
+ {
+ output_Stage2 = clamp(output_Stage2, 0.0, 1.0);
+ }
+ {
+ output_Stage2.xyz *= output_Stage2.w;
+ }
+ }
+ vec4 output_Stage3;
+ {
+ float xCoverage, yCoverage;
+ {
+ float x, y;
+ {
+ x = max(urectH_Stage3.x - gl_FragCoord.x, gl_FragCoord.x - urectH_Stage3.z);
+ y = max(urectH_Stage3.y - gl_FragCoord.y, gl_FragCoord.y - urectH_Stage3.w);
+ }
+ xCoverage = texture(uTextureSampler_0_Stage3, vec2(x * uinvSixSigma_Stage3, 0.5)).w;
+ yCoverage = texture(uTextureSampler_0_Stage3, vec2(y * uinvSixSigma_Stage3, 0.5)).w;
+ output_Stage3 = vec4(xCoverage) * yCoverage;
+ }
+ output_Stage3 = vec4(xCoverage) * yCoverage;
+ }
+ {
+ sk_FragColor = output_Stage2 * output_Stage3;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1-780.shader_test b/shaders/skia/1-780.shader_test
new file mode 100644
index 0000000..43f5bf2
--- /dev/null
+++ b/shaders/skia/1-780.shader_test
@@ -0,0 +1,33 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform sampler2DRect uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1-8.shader_test b/shaders/skia/1-8.shader_test
new file mode 100644
index 0000000..dcf2500
--- /dev/null
+++ b/shaders/skia/1-8.shader_test
@@ -0,0 +1,55 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform mat3 ucolorSpaceMatrix_Stage1;
+uniform vec3 ucolorSpaceTranslate_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 TextureEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_1_Stage1, vTransformedCoords_1_Stage0) * _input;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ vec4 planes[2];
+ planes[0] = TextureEffect_Stage1_c0_c0(vec4(1.0));
+ planes[1] = TextureEffect_Stage1_c1_c0(vec4(1.0));
+ vec4 color = vec4(planes[0].x, planes[1].x, planes[1].y, 1.0);
+ color.xyz = clamp(color.xyz * ucolorSpaceMatrix_Stage1 + ucolorSpaceTranslate_Stage1, 0.0, 1.0);
+ output_Stage1 = color;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1-80.shader_test b/shaders/skia/1-80.shader_test
new file mode 100644
index 0000000..0b8f30c
--- /dev/null
+++ b/shaders/skia/1-80.shader_test
@@ -0,0 +1,42 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform sampler2D uTextureSampler_0_Stage0;
+noperspective in vec2 vlocalCoord_Stage0;
+flat in vec4 vtexDomain_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vec4(1.0);
+ vec2 texCoord;
+ texCoord = vlocalCoord_Stage0;
+ vec4 domain;
+ domain = vtexDomain_Stage0;
+ texCoord = clamp(texCoord, domain.xy, domain.zw);
+ outputColor_Stage0 = texture(uTextureSampler_0_Stage0, texCoord);
+ }
+ {
+ sk_FragColor = outputColor_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 position;
+in vec2 localCoord;
+in vec4 texDomain;
+noperspective out vec2 vlocalCoord_Stage0;
+flat out vec4 vtexDomain_Stage0;
+void main() {
+ vlocalCoord_Stage0 = localCoord;
+ vtexDomain_Stage0 = texDomain;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1-803.shader_test b/shaders/skia/1-803.shader_test
new file mode 100644
index 0000000..225f15d
--- /dev/null
+++ b/shaders/skia/1-803.shader_test
@@ -0,0 +1,54 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 runtime_shader_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = _input;
+ _output = vec4(vTransformedCoords_0_Stage0 - 0.5, 0.0, 1.0);
+ return _output;
+}
+vec4 ClampFragmentProcessor_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ float alpha = clamp(_input.w, 0.0, 1.0);
+ _output = vec4(clamp(_input.xyz, 0.0, alpha), alpha);
+ }
+ return _output;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampFragmentProcessor_Stage1_c1_c0(runtime_shader_Stage1_c0_c0(outputColor_Stage0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1-81.shader_test b/shaders/skia/1-81.shader_test
new file mode 100644
index 0000000..e0006d8
--- /dev/null
+++ b/shaders/skia/1-81.shader_test
@@ -0,0 +1,75 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 uscale01_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias01_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale23_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias23_Stage1_c0_c0_c1_c0;
+uniform float uthreshold_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 RadialGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = length(vTransformedCoords_0_Stage0);
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 DualIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthreshold_Stage1_c0_c0_c1_c0) {
+ scale = uscale01_Stage1_c0_c0_c1_c0;
+ bias = ubias01_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale23_Stage1_c0_c0_c1_c0;
+ bias = ubias23_Stage1_c0_c0_c1_c0;
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = RadialGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = DualIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1-831.shader_test b/shaders/skia/1-831.shader_test
new file mode 100644
index 0000000..6a03b48
--- /dev/null
+++ b/shaders/skia/1-831.shader_test
@@ -0,0 +1,37 @@
+[require]
+GLSL ES >= 3.10
+
+[fragment shader]
+#version 310 es
+
+precision mediump float;
+precision mediump sampler2D;
+out mediump vec4 sk_FragColor;
+uniform sampler2D uTextureSampler_0_Stage1;
+in highp vec2 vTransformedCoords_0_Stage0;
+void main() {
+ mediump vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 310 es
+
+precision mediump float;
+precision mediump sampler2D;
+uniform highp vec4 sk_RTAdjust;
+uniform highp mat3 uCoordTransformMatrix_0_Stage0;
+in highp vec2 position;
+in highp vec2 localCoord;
+out highp vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1-834.shader_test b/shaders/skia/1-834.shader_test
new file mode 100644
index 0000000..ebcbec6
--- /dev/null
+++ b/shaders/skia/1-834.shader_test
@@ -0,0 +1,48 @@
+[require]
+GLSL ES >= 3.10
+
+[fragment shader]
+#version 310 es
+
+precision mediump float;
+precision mediump sampler2D;
+out mediump vec4 sk_FragColor;
+uniform mediump mat4 um_Stage2;
+uniform mediump vec4 uv_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+in highp vec2 vTransformedCoords_0_Stage0;
+void main() {
+ mediump vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ mediump vec4 output_Stage2;
+ {
+ mediump vec4 inputColor = output_Stage1;
+ output_Stage2 = um_Stage2 * inputColor + uv_Stage2;
+ {
+ output_Stage2 = clamp(output_Stage2, 0.0, 1.0);
+ }
+ }
+ {
+ sk_FragColor = output_Stage2;
+ sk_FragColor = sk_FragColor.wwww;
+ }
+}
+
+[vertex shader]
+#version 310 es
+
+precision mediump float;
+precision mediump sampler2D;
+uniform highp vec4 sk_RTAdjust;
+uniform highp mat3 uCoordTransformMatrix_0_Stage0;
+in highp vec2 position;
+in highp vec2 localCoord;
+out highp vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1-844.shader_test b/shaders/skia/1-844.shader_test
new file mode 100644
index 0000000..6ee4f79
--- /dev/null
+++ b/shaders/skia/1-844.shader_test
@@ -0,0 +1,62 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform float uSrcTF_Stage1[7];
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 TextureEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+float src_tf_Stage1(float x) {
+ float G = uSrcTF_Stage1[0];
+ float A = uSrcTF_Stage1[1];
+ float B = uSrcTF_Stage1[2];
+ float C = uSrcTF_Stage1[3];
+ float D = uSrcTF_Stage1[4];
+ float E = uSrcTF_Stage1[5];
+ float F = uSrcTF_Stage1[6];
+ float s = sign(x);
+ x = abs(x);
+ x = x < D ? C * x + F : pow(A * x + B, G) + E;
+ return s * x;
+}
+vec4 color_xform_Stage1(vec4 color) {
+ float nonZeroAlpha = max(color.w, 9.9999997473787516e-05);
+ color = vec4(color.xyz / nonZeroAlpha, nonZeroAlpha);
+ color.x = src_tf_Stage1(color.x);
+ color.y = src_tf_Stage1(color.y);
+ color.z = src_tf_Stage1(color.z);
+ color.xyz *= color.w;
+ return color;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = color_xform_Stage1(TextureEffect_Stage1_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ sk_FragColor = sk_FragColor.wwww;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1-850.shader_test b/shaders/skia/1-850.shader_test
new file mode 100644
index 0000000..e54d182
--- /dev/null
+++ b/shaders/skia/1-850.shader_test
@@ -0,0 +1,43 @@
+[require]
+GLSL ES >= 3.10
+
+[fragment shader]
+#version 310 es
+
+precision mediump float;
+precision mediump sampler2D;
+out mediump vec4 sk_FragColor;
+uniform sampler2D uTextureSampler_0_Stage0;
+flat in mediump vec4 vcolor_Stage0;
+in highp vec2 vlocalCoord_Stage0;
+void main() {
+ mediump vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ highp vec2 texCoord;
+ texCoord = vlocalCoord_Stage0;
+ outputColor_Stage0 = texture(uTextureSampler_0_Stage0, texCoord) * outputColor_Stage0;
+ }
+ {
+ sk_FragColor = outputColor_Stage0;
+ }
+}
+
+[vertex shader]
+#version 310 es
+
+precision mediump float;
+precision mediump sampler2D;
+uniform highp vec4 sk_RTAdjust;
+in highp vec2 position;
+in mediump vec4 color;
+in highp vec2 localCoord;
+flat out mediump vec4 vcolor_Stage0;
+out highp vec2 vlocalCoord_Stage0;
+void main() {
+ vcolor_Stage0 = color;
+ vlocalCoord_Stage0 = localCoord;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1-854.shader_test b/shaders/skia/1-854.shader_test
new file mode 100644
index 0000000..8129f87
--- /dev/null
+++ b/shaders/skia/1-854.shader_test
@@ -0,0 +1,48 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+noperspective in vec2 vEllipseOffsets_Stage0;
+noperspective in vec4 vEllipseRadii_Stage0;
+noperspective in vec4 vinColor_Stage0;
+void main() {
+ {
+ vec2 offset = vEllipseOffsets_Stage0;
+ offset *= vEllipseRadii_Stage0.xy;
+ float test = dot(offset, offset) - 1.0;
+ vec2 grad = (2.0 * offset) * vEllipseRadii_Stage0.xy;
+ float grad_dot = dot(grad, grad);
+ grad_dot = max(grad_dot, 1.1754999560161448e-38);
+ float invlen = inversesqrt(grad_dot);
+ float edgeAlpha = clamp(0.5 - test * invlen, 0.0, 1.0);
+ offset = vEllipseOffsets_Stage0 * vEllipseRadii_Stage0.zw;
+ test = dot(offset, offset) - 1.0;
+ grad = (2.0 * offset) * vEllipseRadii_Stage0.zw;
+ grad_dot = dot(grad, grad);
+ invlen = inversesqrt(grad_dot);
+ edgeAlpha *= clamp(0.5 + test * invlen, 0.0, 1.0);
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 inPosition;
+in vec4 inColor;
+in vec2 inEllipseOffset;
+in vec4 inEllipseRadii;
+noperspective out vec2 vEllipseOffsets_Stage0;
+noperspective out vec4 vEllipseRadii_Stage0;
+noperspective out vec4 vinColor_Stage0;
+void main() {
+ vEllipseOffsets_Stage0 = inEllipseOffset;
+ vEllipseRadii_Stage0 = inEllipseRadii;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = inPosition;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1-855.shader_test b/shaders/skia/1-855.shader_test
new file mode 100644
index 0000000..15eb2cf
--- /dev/null
+++ b/shaders/skia/1-855.shader_test
@@ -0,0 +1,37 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1-856.shader_test b/shaders/skia/1-856.shader_test
new file mode 100644
index 0000000..9796cb0
--- /dev/null
+++ b/shaders/skia/1-856.shader_test
@@ -0,0 +1,51 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform float uPixelSize_Stage2;
+uniform vec2 uRange_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = vec4(1.0, 1.0, 1.0, 1.0);
+ vec2 coord = vTransformedCoords_1_Stage0;
+ coord.y -= uPixelSize_Stage2;
+ for (int i = 0;i < 3; i++) {
+ output_Stage2 = min(output_Stage2, texture(uTextureSampler_0_Stage2, coord));
+ coord.y += uPixelSize_Stage2;
+ }
+ output_Stage2 *= output_Stage1;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1-857.shader_test b/shaders/skia/1-857.shader_test
new file mode 100644
index 0000000..f3a788d
--- /dev/null
+++ b/shaders/skia/1-857.shader_test
@@ -0,0 +1,39 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+void main() {
+ {
+ sk_FragColor = vec4(1.0, 1.0, 1.0, 1.0);
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 attr0;
+in float attr1;
+in vec2 attr2;
+in float attr3;
+in vec2 attr4;
+in float attr5;
+in vec2 attr6;
+in float attr7;
+in vec2 attr8;
+in float attr9;
+in vec2 attr10;
+in float attr11;
+in vec2 attr12;
+in float attr13;
+in vec2 attr14;
+in float attr15;
+void main() {
+ vec2 pos2 = attr0;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1-860.shader_test b/shaders/skia/1-860.shader_test
new file mode 100644
index 0000000..2d0e683
--- /dev/null
+++ b/shaders/skia/1-860.shader_test
@@ -0,0 +1,43 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * outputColor_Stage0;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec2 inLocalCoord;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 color = inColor;
+ vcolor_Stage0 = color;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1-88.shader_test b/shaders/skia/1-88.shader_test
new file mode 100644
index 0000000..28e3e9e
--- /dev/null
+++ b/shaders/skia/1-88.shader_test
@@ -0,0 +1,80 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_1_Stage0.x);
+ uint y = uint(vTransformedCoords_1_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ output_Stage2 = vec4(clamp(output_Stage2.xyz + value * 0.0039215688593685627, 0.0, output_Stage2.w), output_Stage2.w);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1-888.shader_test b/shaders/skia/1-888.shader_test
new file mode 100644
index 0000000..94bd97a
--- /dev/null
+++ b/shaders/skia/1-888.shader_test
@@ -0,0 +1,26 @@
+[require]
+GLSL >= 1.40
+
+[vertex shader]
+#version 140
+
+in vec2 a_vertex;
+uniform vec4 u_texCoordXform;
+uniform vec4 u_posXform;
+noperspective out vec2 v_texCoord;
+void main() {
+ v_texCoord = a_vertex * u_texCoordXform.xy + u_texCoordXform.zw;
+ gl_Position.xy = a_vertex * u_posXform.xy + u_posXform.zw;
+ gl_Position.zw = vec2(0.0, 1.0);
+}
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+noperspective in vec2 v_texCoord;
+uniform sampler2D u_texture;
+void main() {
+ sk_FragColor = texture(u_texture, v_texCoord);
+}
+
diff --git a/shaders/skia/1-91.shader_test b/shaders/skia/1-91.shader_test
new file mode 100644
index 0000000..94e4d0b
--- /dev/null
+++ b/shaders/skia/1-91.shader_test
@@ -0,0 +1,58 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform float uDistanceAdjust_Stage0;
+uniform sampler2D uTextureSampler_0_Stage0;
+noperspective in vec4 vinColor_Stage0;
+noperspective in vec2 vTextureCoords_Stage0;
+flat in int vTexIndex_Stage0;
+noperspective in vec2 vIntTextureCoords_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vinColor_Stage0;
+ vec2 uv = vTextureCoords_Stage0;
+ vec4 texColor;
+ {
+ texColor = texture(uTextureSampler_0_Stage0, uv);
+ }
+ float distance = 7.96875 * (texColor.x - 0.50196081399917603);
+ distance -= uDistanceAdjust_Stage0;
+ float afwidth;
+ afwidth = abs(0.64999997615814209 * -dFdy(vIntTextureCoords_Stage0.y));
+ float val = smoothstep(-afwidth, afwidth, distance);
+ outputCoverage_Stage0 = vec4(val);
+ }
+ {
+ sk_FragColor = outputColor_Stage0 * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform vec2 uAtlasDimensionsInv_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in uvec2 inTextureCoords;
+noperspective out vec4 vinColor_Stage0;
+noperspective out vec2 vTextureCoords_Stage0;
+flat out int vTexIndex_Stage0;
+noperspective out vec2 vIntTextureCoords_Stage0;
+void main() {
+ vinColor_Stage0 = inColor;
+ ivec2 signedCoords = ivec2(int(inTextureCoords.x), int(inTextureCoords.y));
+ vec2 unormTexCoords = vec2(float(signedCoords.x / 2), float(signedCoords.y / 2));
+ vTextureCoords_Stage0 = unormTexCoords * uAtlasDimensionsInv_Stage0;
+ vTexIndex_Stage0 = 0;
+ vIntTextureCoords_Stage0 = unormTexCoords;
+ gl_Position = vec4(inPosition.x, inPosition.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1.shader_test b/shaders/skia/1.shader_test
new file mode 100644
index 0000000..0dc24af
--- /dev/null
+++ b/shaders/skia/1.shader_test
@@ -0,0 +1,31 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+flat in vec4 vcolor_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ {
+ sk_FragColor = outputColor_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 position;
+in vec4 color;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/10-1.shader_test b/shaders/skia/10-1.shader_test
new file mode 100644
index 0000000..79801f8
--- /dev/null
+++ b/shaders/skia/10-1.shader_test
@@ -0,0 +1,126 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 usubset_Stage1_c0_c0;
+uniform vec4 uclamp_Stage1_c0_c0;
+uniform vec4 usubset_Stage1_c1_c0;
+uniform vec4 uclamp_Stage1_c1_c0;
+uniform vec4 usubset_Stage1_c2_c0;
+uniform vec4 uclamp_Stage1_c2_c0;
+uniform mat3 ucolorSpaceMatrix_Stage1;
+uniform vec3 ucolorSpaceTranslate_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+uniform sampler2D uTextureSampler_2_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+vec4 TextureEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 inCoord = vTransformedCoords_0_Stage0;
+ vec2 subsetCoord;
+ {
+ float w = usubset_Stage1_c0_c0.z - usubset_Stage1_c0_c0.x;
+ float w2 = 2.0 * w;
+ float m = mod(inCoord.x - usubset_Stage1_c0_c0.x, w2);
+ subsetCoord.x = mix(m, w2 - m, step(w, m)) + usubset_Stage1_c0_c0.x;
+ }
+ {
+ float w = usubset_Stage1_c0_c0.w - usubset_Stage1_c0_c0.y;
+ float w2 = 2.0 * w;
+ float m = mod(inCoord.y - usubset_Stage1_c0_c0.y, w2);
+ subsetCoord.y = mix(m, w2 - m, step(w, m)) + usubset_Stage1_c0_c0.y;
+ }
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage1_c0_c0.x, uclamp_Stage1_c0_c0.z);
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage1_c0_c0.y, uclamp_Stage1_c0_c0.w);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ _output = _input * textureColor;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 inCoord = vTransformedCoords_1_Stage0;
+ vec2 subsetCoord;
+ {
+ float w = usubset_Stage1_c1_c0.z - usubset_Stage1_c1_c0.x;
+ float w2 = 2.0 * w;
+ float m = mod(inCoord.x - usubset_Stage1_c1_c0.x, w2);
+ subsetCoord.x = mix(m, w2 - m, step(w, m)) + usubset_Stage1_c1_c0.x;
+ }
+ {
+ float w = usubset_Stage1_c1_c0.w - usubset_Stage1_c1_c0.y;
+ float w2 = 2.0 * w;
+ float m = mod(inCoord.y - usubset_Stage1_c1_c0.y, w2);
+ subsetCoord.y = mix(m, w2 - m, step(w, m)) + usubset_Stage1_c1_c0.y;
+ }
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage1_c1_c0.x, uclamp_Stage1_c1_c0.z);
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage1_c1_c0.y, uclamp_Stage1_c1_c0.w);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ _output = _input * textureColor;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c2_c0(vec4 _input) {
+ vec4 _output;
+ vec2 inCoord = vTransformedCoords_2_Stage0;
+ vec2 subsetCoord;
+ {
+ float w = usubset_Stage1_c2_c0.z - usubset_Stage1_c2_c0.x;
+ float w2 = 2.0 * w;
+ float m = mod(inCoord.x - usubset_Stage1_c2_c0.x, w2);
+ subsetCoord.x = mix(m, w2 - m, step(w, m)) + usubset_Stage1_c2_c0.x;
+ }
+ {
+ float w = usubset_Stage1_c2_c0.w - usubset_Stage1_c2_c0.y;
+ float w2 = 2.0 * w;
+ float m = mod(inCoord.y - usubset_Stage1_c2_c0.y, w2);
+ subsetCoord.y = mix(m, w2 - m, step(w, m)) + usubset_Stage1_c2_c0.y;
+ }
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage1_c2_c0.x, uclamp_Stage1_c2_c0.z);
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage1_c2_c0.y, uclamp_Stage1_c2_c0.w);
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ _output = _input * textureColor;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ vec4 planes[3];
+ planes[0] = TextureEffect_Stage1_c0_c0(vec4(1.0));
+ planes[1] = TextureEffect_Stage1_c1_c0(vec4(1.0));
+ planes[2] = TextureEffect_Stage1_c2_c0(vec4(1.0));
+ vec4 color = vec4(planes[0].x, planes[1].x, planes[2].x, 1.0);
+ color.xyz = clamp(color.xyz * ucolorSpaceMatrix_Stage1 + ucolorSpaceTranslate_Stage1, 0.0, 1.0);
+ output_Stage1 = color;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/10-105.shader_test b/shaders/skia/10-105.shader_test
new file mode 100644
index 0000000..ded4307
--- /dev/null
+++ b/shaders/skia/10-105.shader_test
@@ -0,0 +1,32 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uColor_Stage0;
+uniform float uCoverage_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = uColor_Stage0;
+ outputCoverage_Stage0 = vec4(uCoverage_Stage0);
+ }
+ {
+ sk_FragColor = outputColor_Stage0 * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 inPosition;
+void main() {
+ vec2 pos2 = inPosition;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/10-109.shader_test b/shaders/skia/10-109.shader_test
new file mode 100644
index 0000000..790860b
--- /dev/null
+++ b/shaders/skia/10-109.shader_test
@@ -0,0 +1,33 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uColor_Stage0;
+uniform float uCoverage_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = uColor_Stage0;
+ outputCoverage_Stage0 = vec4(uCoverage_Stage0);
+ }
+ {
+ sk_FragColor = outputColor_Stage0 * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 inPosition;
+void main() {
+ vec2 pos2 = (uViewM_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/10-115.shader_test b/shaders/skia/10-115.shader_test
new file mode 100644
index 0000000..b6ca3e7
--- /dev/null
+++ b/shaders/skia/10-115.shader_test
@@ -0,0 +1,54 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uColor_Stage0;
+uniform float uCoverage_Stage0;
+noperspective in vec4 vConicCoeffs_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = uColor_Stage0;
+ float edgeAlpha;
+ vec3 dklmdx;
+ vec3 dklmdy;
+ float dfdx;
+ float dfdy;
+ vec2 gF;
+ float gFM;
+ float func;
+ dklmdx = dFdx(vConicCoeffs_Stage0.xyz);
+ dklmdy = -dFdy(vConicCoeffs_Stage0.xyz);
+ dfdx = ((2.0 * vConicCoeffs_Stage0.x) * dklmdx.x - vConicCoeffs_Stage0.y * dklmdx.z) - vConicCoeffs_Stage0.z * dklmdx.y;
+ dfdy = ((2.0 * vConicCoeffs_Stage0.x) * dklmdy.x - vConicCoeffs_Stage0.y * dklmdy.z) - vConicCoeffs_Stage0.z * dklmdy.y;
+ gF = vec2(dfdx, dfdy);
+ gFM = sqrt(dot(gF, gF));
+ func = vConicCoeffs_Stage0.x * vConicCoeffs_Stage0.x - vConicCoeffs_Stage0.y * vConicCoeffs_Stage0.z;
+ func = abs(func);
+ edgeAlpha = func / gFM;
+ edgeAlpha = max(1.0 - edgeAlpha, 0.0);
+ outputCoverage_Stage0 = vec4(uCoverage_Stage0 * edgeAlpha);
+ }
+ {
+ sk_FragColor = outputColor_Stage0 * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 inPosition;
+in vec4 inConicCoeffs;
+noperspective out vec4 vConicCoeffs_Stage0;
+void main() {
+ vConicCoeffs_Stage0 = inConicCoeffs;
+ vec2 pos2 = inPosition;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/10-12.shader_test b/shaders/skia/10-12.shader_test
new file mode 100644
index 0000000..4bba85d
--- /dev/null
+++ b/shaders/skia/10-12.shader_test
@@ -0,0 +1,33 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+noperspective in vec4 vcolor_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ {
+ sk_FragColor = outputColor_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 position;
+in vec4 inColor;
+noperspective out vec4 vcolor_Stage0;
+void main() {
+ vec4 color = inColor;
+ vcolor_Stage0 = color;
+ vec2 pos2 = position;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/10-120.shader_test b/shaders/skia/10-120.shader_test
new file mode 100644
index 0000000..ad439c5
--- /dev/null
+++ b/shaders/skia/10-120.shader_test
@@ -0,0 +1,46 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform sampler2D uTextureSampler_0_Stage0;
+noperspective in vec2 vtextureCoords_Stage0;
+flat in vec4 vtextureDomain_Stage0;
+flat in vec4 vcolor_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ vec2 textureCoords;
+ textureCoords = vtextureCoords_Stage0;
+ vec4 textureDomain;
+ textureDomain = vtextureDomain_Stage0;
+ outputColor_Stage0 = vcolor_Stage0;
+ outputColor_Stage0 = texture(uTextureSampler_0_Stage0, clamp(textureCoords, textureDomain.xy, textureDomain.zw)) * outputColor_Stage0;
+ }
+ {
+ sk_FragColor = outputColor_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 position;
+in vec2 textureCoords;
+in vec4 textureDomain;
+in vec4 color;
+noperspective out vec2 vtextureCoords_Stage0;
+flat out vec4 vtextureDomain_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vec2 pos2 = position;
+ vtextureCoords_Stage0 = textureCoords;
+ vtextureDomain_Stage0 = textureDomain;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/10-121.shader_test b/shaders/skia/10-121.shader_test
new file mode 100644
index 0000000..e7dd0d6
--- /dev/null
+++ b/shaders/skia/10-121.shader_test
@@ -0,0 +1,41 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform float uPixelSize_Stage1;
+uniform vec2 uRange_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0;
+ coord.y -= 2.0 * uPixelSize_Stage1;
+ for (int i = 0;i < 5; i++) {
+ output_Stage1 = max(output_Stage1, texture(uTextureSampler_0_Stage1, coord));
+ coord.y += uPixelSize_Stage1;
+ }
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/10-122.shader_test b/shaders/skia/10-122.shader_test
new file mode 100644
index 0000000..d6b7208
--- /dev/null
+++ b/shaders/skia/10-122.shader_test
@@ -0,0 +1,79 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage2_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c1_c0;
+ }
+ return _output;
+}
+vec4 blend_src(vec4 src, vec4 dst) {
+ return src;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_src(ConstColorProcessor_Stage2_c1_c0(vec4(1.0)), output_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/10-123.shader_test b/shaders/skia/10-123.shader_test
new file mode 100644
index 0000000..b85fbfa
--- /dev/null
+++ b/shaders/skia/10-123.shader_test
@@ -0,0 +1,158 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform float ubias_Stage1_c0_c0_c0_c0;
+uniform float uscale_Stage1_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+uniform float uweight_Stage2;
+uniform mat4 um_Stage2_c1_c0_c1_c0;
+uniform vec4 uv_Stage2_c1_c0_c1_c0;
+uniform mat4 um_Stage2_c2_c0_c1_c0;
+uniform vec4 uv_Stage2_c2_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 SweepGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float angle;
+ {
+ angle = atan(-vTransformedCoords_0_Stage0.y, -vTransformedCoords_0_Stage0.x);
+ }
+ float t = ((angle * 0.15915493667125702 + 0.5) + ubias_Stage1_c0_c0_c0_c0) * uscale_Stage1_c0_c0_c0_c0;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = SweepGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 LumaColorFilterEffect_Stage2_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float luma = clamp(dot(vec3(0.2125999927520752, 0.71520000696182251, 0.072200000286102295), _input.xyz), 0.0, 1.0);
+ _output = vec4(0.0, 0.0, 0.0, luma);
+ return _output;
+}
+vec4 ColorMatrixFragmentProcessor_Stage2_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = _input;
+ {
+ float nonZeroAlpha = max(inputColor.w, 9.9999997473787516e-05);
+ inputColor = vec4(inputColor.xyz / nonZeroAlpha, inputColor.w);
+ }
+ _output = um_Stage2_c1_c0_c1_c0 * inputColor + uv_Stage2_c1_c0_c1_c0;
+ {
+ _output = clamp(_output, 0.0, 1.0);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 Series_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = ColorMatrixFragmentProcessor_Stage2_c1_c0_c1_c0(LumaColorFilterEffect_Stage2_c1_c0_c0_c0(_input));
+ return _output;
+}
+vec4 LumaColorFilterEffect_Stage2_c2_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float luma = clamp(dot(vec3(0.2125999927520752, 0.71520000696182251, 0.072200000286102295), _input.xyz), 0.0, 1.0);
+ _output = vec4(0.0, 0.0, 0.0, luma);
+ return _output;
+}
+vec4 ColorMatrixFragmentProcessor_Stage2_c2_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = _input;
+ {
+ float nonZeroAlpha = max(inputColor.w, 9.9999997473787516e-05);
+ inputColor = vec4(inputColor.xyz / nonZeroAlpha, inputColor.w);
+ }
+ _output = um_Stage2_c2_c0_c1_c0 * inputColor + uv_Stage2_c2_c0_c1_c0;
+ {
+ _output = clamp(_output, 0.0, 1.0);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 Series_Stage2_c2_c0(vec4 _input) {
+ vec4 _output;
+ _output = ColorMatrixFragmentProcessor_Stage2_c2_c0_c1_c0(LumaColorFilterEffect_Stage2_c2_c0_c0_c0(_input));
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ vec4 in0 = Series_Stage2_c1_c0(output_Stage1);
+ vec4 in1 = Series_Stage2_c2_c0(output_Stage1);
+ output_Stage2 = mix(in0, in1, uweight_Stage2);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/10-124.shader_test b/shaders/skia/10-124.shader_test
new file mode 100644
index 0000000..d5650ea
--- /dev/null
+++ b/shaders/skia/10-124.shader_test
@@ -0,0 +1,51 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uColor_Stage0;
+uniform vec4 ucolor_Stage1;
+uniform sampler2D uTextureSampler_0_Stage0;
+noperspective in vec2 vTextureCoords_Stage0;
+flat in int vTexIndex_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = uColor_Stage0;
+ vec4 texColor;
+ {
+ texColor = texture(uTextureSampler_0_Stage0, vTextureCoords_Stage0);
+ }
+ outputColor_Stage0 = outputColor_Stage0 * texColor;
+ }
+ vec4 output_Stage1;
+ {
+ {
+ output_Stage1 = outputColor_Stage0 * ucolor_Stage1;
+ }
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform vec2 uAtlasSizeInv_Stage0;
+in vec2 inPosition;
+in uvec2 inTextureCoords;
+noperspective out vec2 vTextureCoords_Stage0;
+flat out int vTexIndex_Stage0;
+void main() {
+ ivec2 signedCoords = ivec2(int(inTextureCoords.x), int(inTextureCoords.y));
+ vec2 unormTexCoords = vec2(float(signedCoords.x / 2), float(signedCoords.y / 2));
+ vTextureCoords_Stage0 = unormTexCoords * uAtlasSizeInv_Stage0;
+ vTexIndex_Stage0 = 0;
+ gl_Position = vec4(inPosition.x, inPosition.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/10-126.shader_test b/shaders/skia/10-126.shader_test
new file mode 100644
index 0000000..58fb1dc
--- /dev/null
+++ b/shaders/skia/10-126.shader_test
@@ -0,0 +1,198 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform vec4 uKernel_Stage1[3];
+uniform vec2 uKernelOffset_Stage1;
+uniform float uGain_Stage1;
+uniform float uBias_Stage1;
+uniform vec4 uTexDom_Stage1;
+uniform vec3 uDecalParams_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ vec4 sum = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0 - uKernelOffset_Stage1 * uImageIncrement_Stage1;
+ vec4 c;
+ {
+ float k = uKernel_Stage1[0].x;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[0].y;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[0].z;
+ {
+ vec2 origCoord = coord + vec2(2.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[0].w;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[1].x;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[1].y;
+ {
+ vec2 origCoord = coord + vec2(2.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[1].z;
+ {
+ vec2 origCoord = coord + vec2(0.0, 2.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[1].w;
+ {
+ vec2 origCoord = coord + vec2(1.0, 2.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[2].x;
+ {
+ vec2 origCoord = coord + vec2(2.0, 2.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ output_Stage1 = sum * uGain_Stage1 + uBias_Stage1;
+ output_Stage1.w = clamp(output_Stage1.w, 0.0, 1.0);
+ output_Stage1.xyz = clamp(output_Stage1.xyz, 0.0, output_Stage1.w);
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/10-129.shader_test b/shaders/skia/10-129.shader_test
new file mode 100644
index 0000000..b881919
--- /dev/null
+++ b/shaders/skia/10-129.shader_test
@@ -0,0 +1,64 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 ucolor_Stage1_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ return _output;
+}
+vec4 ConstColorProcessor_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = _input.w * ucolor_Stage1_c1_c0;
+ }
+ return _output;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_src_over(OverrideInputFragmentProcessor_Stage1_c0_c0(inputColor), ConstColorProcessor_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/10-133.shader_test b/shaders/skia/10-133.shader_test
new file mode 100644
index 0000000..294a6d1
--- /dev/null
+++ b/shaders/skia/10-133.shader_test
@@ -0,0 +1,137 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform float uSurfaceScale_Stage1;
+uniform vec3 uLightColor_Stage1;
+uniform float uKD_Stage1;
+uniform vec3 uLightLocation_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 light_Stage1(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ float colorScale = uKD_Stage1 * dot(normal, surfaceToLight);
+ return vec4(lightColor * clamp(colorScale, 0.0, 1.0), 1.0);
+}
+float sobel_Stage1(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage1(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage1(float m[9], float surfaceScale) {
+ return pointToNormal_Stage1(sobel_Stage1(0.0, 0.0, m[3], m[4], m[6], m[7], 0.66666698455810547), sobel_Stage1(m[3], m[6], m[4], m[7], 0.0, 0.0, 0.66666698455810547), surfaceScale);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ vec2 coord = vTransformedCoords_0_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp0 = textureColor;
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp1 = textureColor;
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp2 = textureColor;
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp3 = textureColor;
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp4 = textureColor;
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp5 = textureColor;
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp6 = textureColor;
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp7 = textureColor;
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp8 = textureColor;
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = normalize(uLightLocation_Stage1 - vec3(gl_FragCoord.xy, uSurfaceScale_Stage1 * m[4]));
+ output_Stage1 = light_Stage1(normal_Stage1(m, uSurfaceScale_Stage1), surfaceToLight, uLightColor_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/10-134.shader_test b/shaders/skia/10-134.shader_test
new file mode 100644
index 0000000..ee5ec0f
--- /dev/null
+++ b/shaders/skia/10-134.shader_test
@@ -0,0 +1,86 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec2 uDstTextureUpperLeft_Stage1;
+uniform vec2 uDstTextureCoordScale_Stage1;
+uniform sampler2D uTextureSampler_0_Stage0;
+uniform sampler2D uDstTextureSampler_Stage1;
+noperspective in vec2 vTextureCoords_Stage0;
+flat in int vTexIndex_Stage0;
+noperspective in vec4 vinColor_Stage0;
+float _blend_color_luminance(vec3 color) {
+ return dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), color);
+}
+vec3 _blend_set_color_luminance(vec3 hueSatColor, float alpha, vec3 lumColor) {
+ float lum = _blend_color_luminance(lumColor);
+ vec3 result = (lum - _blend_color_luminance(hueSatColor)) + hueSatColor;
+ float minComp = min(min(result.x, result.y), result.z);
+ float maxComp = max(max(result.x, result.y), result.z);
+ if (minComp < 0.0 && lum != minComp) {
+ result = lum + ((result - lum) * lum) / (lum - minComp);
+ }
+ if (maxComp > alpha && maxComp != lum) {
+ return lum + ((result - lum) * (alpha - lum)) / (maxComp - lum);
+ }
+ return result;
+}
+vec4 blend_luminosity(vec4 src, vec4 dst) {
+ float alpha = dst.w * src.w;
+ vec3 sda = src.xyz * dst.w;
+ vec3 dsa = dst.xyz * src.w;
+ return vec4((((_blend_set_color_luminance(dsa, alpha, sda) + dst.xyz) - dsa) + src.xyz) - sda, (src.w + dst.w) - alpha);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vinColor_Stage0;
+ vec4 texColor;
+ {
+ texColor = texture(uTextureSampler_0_Stage0, vTextureCoords_Stage0);
+ }
+ outputCoverage_Stage0 = texColor;
+ }
+ {
+ if (all(lessThanEqual(outputCoverage_Stage0.xyz, vec3(0.0)))) {
+ discard;
+ }
+ vec2 _dstTexCoord = (gl_FragCoord.xy - uDstTextureUpperLeft_Stage1) * uDstTextureCoordScale_Stage1;
+ _dstTexCoord.y = 1.0 - _dstTexCoord.y;
+ vec4 _dstColor = texture(uDstTextureSampler_Stage1, _dstTexCoord);
+ sk_FragColor = blend_luminosity(outputColor_Stage0, _dstColor);
+ float lerpRed = mix(_dstColor.w, sk_FragColor.w, outputCoverage_Stage0.x);
+ float lerpBlue = mix(_dstColor.w, sk_FragColor.w, outputCoverage_Stage0.y);
+ float lerpGreen = mix(_dstColor.w, sk_FragColor.w, outputCoverage_Stage0.z);
+ sk_FragColor = outputCoverage_Stage0 * sk_FragColor + (vec4(1.0) - outputCoverage_Stage0) * _dstColor;
+ sk_FragColor.w = max(max(lerpRed, lerpBlue), lerpGreen);
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform vec2 uAtlasSizeInv_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in uvec2 inTextureCoords;
+noperspective out vec2 vTextureCoords_Stage0;
+flat out int vTexIndex_Stage0;
+noperspective out vec4 vinColor_Stage0;
+void main() {
+ ivec2 signedCoords = ivec2(int(inTextureCoords.x), int(inTextureCoords.y));
+ vec2 unormTexCoords = vec2(float(signedCoords.x / 2), float(signedCoords.y / 2));
+ vTextureCoords_Stage0 = unormTexCoords * uAtlasSizeInv_Stage0;
+ vTexIndex_Stage0 = 0;
+ vinColor_Stage0 = inColor;
+ gl_Position = vec4(inPosition.x, inPosition.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/10-136.shader_test b/shaders/skia/10-136.shader_test
new file mode 100644
index 0000000..c85c954
--- /dev/null
+++ b/shaders/skia/10-136.shader_test
@@ -0,0 +1,53 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 ucolor_Stage1;
+uniform sampler2D uTextureSampler_0_Stage0;
+noperspective in vec2 vtextureCoords_Stage0;
+flat in vec4 vtextureDomain_Stage0;
+flat in vec4 vcolor_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ vec2 textureCoords;
+ textureCoords = vtextureCoords_Stage0;
+ vec4 textureDomain;
+ textureDomain = vtextureDomain_Stage0;
+ outputColor_Stage0 = vcolor_Stage0;
+ outputColor_Stage0 = texture(uTextureSampler_0_Stage0, clamp(textureCoords, textureDomain.xy, textureDomain.zw)) * outputColor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ {
+ output_Stage1 = outputColor_Stage0 * ucolor_Stage1;
+ }
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 position;
+in vec2 textureCoords;
+in vec4 textureDomain;
+in vec4 color;
+noperspective out vec2 vtextureCoords_Stage0;
+flat out vec4 vtextureDomain_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vec2 pos2 = position;
+ vtextureCoords_Stage0 = textureCoords;
+ vtextureDomain_Stage0 = textureDomain;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/10-14.shader_test b/shaders/skia/10-14.shader_test
new file mode 100644
index 0000000..cb97d97
--- /dev/null
+++ b/shaders/skia/10-14.shader_test
@@ -0,0 +1,56 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 TextureEffect_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+vec4 ConfigConversionEffect_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = floor(_input * 255.0 + 0.5) / 255.0;
+ {
+ _output.xyz = _output.w <= 0.0 ? vec3(0.0) : floor((_output.xyz / _output.w) * 255.0 + 0.5) / 255.0;
+ }
+ return _output;
+}
+vec4 Series_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = ConfigConversionEffect_Stage1_c0_c0_c1_c0(TextureEffect_Stage1_c0_c0_c0_c0(_input));
+ return _output;
+}
+vec4 Swizzle_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = _input.zyxw;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = Swizzle_Stage1_c1_c0(Series_Stage1_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/10-140.shader_test b/shaders/skia/10-140.shader_test
new file mode 100644
index 0000000..40b001c
--- /dev/null
+++ b/shaders/skia/10-140.shader_test
@@ -0,0 +1,43 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform sampler2D uTextureSampler_0_Stage0;
+noperspective in vec2 vlocalCoord_Stage0;
+noperspective in float vcoverage_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vec4(1.0);
+ vec2 texCoord;
+ texCoord = vlocalCoord_Stage0;
+ outputColor_Stage0 = texture(uTextureSampler_0_Stage0, texCoord);
+ float coverage = vcoverage_Stage0;
+ outputCoverage_Stage0 = vec4(coverage);
+ }
+ {
+ sk_FragColor = outputColor_Stage0 * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 position;
+in float coverage;
+in vec2 localCoord;
+noperspective out vec2 vlocalCoord_Stage0;
+noperspective out float vcoverage_Stage0;
+void main() {
+ vec2 position = position;
+ vlocalCoord_Stage0 = localCoord;
+ vcoverage_Stage0 = coverage;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/10-141.shader_test b/shaders/skia/10-141.shader_test
new file mode 100644
index 0000000..9640ce6
--- /dev/null
+++ b/shaders/skia/10-141.shader_test
@@ -0,0 +1,66 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uclamp_Stage1_c0_c0;
+uniform vec4 ucolor_Stage2_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 inCoord = vTransformedCoords_0_Stage0;
+ vec2 subsetCoord;
+ subsetCoord.x = inCoord.x;
+ subsetCoord.y = inCoord.y;
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage1_c0_c0.x, uclamp_Stage1_c0_c0.z);
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage1_c0_c0.y, uclamp_Stage1_c0_c0.w);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ _output = _input * textureColor;
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c1_c0;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TextureEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_src_in(ConstColorProcessor_Stage2_c1_c0(vec4(1.0)), output_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/10-148.shader_test b/shaders/skia/10-148.shader_test
new file mode 100644
index 0000000..b89f54d
--- /dev/null
+++ b/shaders/skia/10-148.shader_test
@@ -0,0 +1,123 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform vec2 uBounds_Stage1;
+uniform vec4 uKernel_Stage1[5];
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0 - 8.0 * uImageIncrement_Stage1;
+ vec2 coordSampled = vec2(0.0, 0.0);
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1.x && coord.x <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].x;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1.x && coord.x <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].y;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1.x && coord.x <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].z;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1.x && coord.x <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].w;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1.x && coord.x <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].x;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1.x && coord.x <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].y;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1.x && coord.x <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].z;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1.x && coord.x <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].w;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1.x && coord.x <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].x;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1.x && coord.x <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].y;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1.x && coord.x <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].z;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1.x && coord.x <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].w;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1.x && coord.x <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].x;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1.x && coord.x <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].y;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1.x && coord.x <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].z;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1.x && coord.x <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].w;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1.x && coord.x <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[4].x;
+ }
+ coord += uImageIncrement_Stage1;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/10-149.shader_test b/shaders/skia/10-149.shader_test
new file mode 100644
index 0000000..97da931
--- /dev/null
+++ b/shaders/skia/10-149.shader_test
@@ -0,0 +1,106 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform vec2 uBounds_Stage1;
+uniform vec4 uKernel_Stage1[5];
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0 - 8.0 * uImageIncrement_Stage1;
+ vec2 coordSampled = vec2(0.0, 0.0);
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[4].x;
+ coord += uImageIncrement_Stage1;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/10-15.shader_test b/shaders/skia/10-15.shader_test
new file mode 100644
index 0000000..5d0c2ed
--- /dev/null
+++ b/shaders/skia/10-15.shader_test
@@ -0,0 +1,30 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uColor_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = uColor_Stage0;
+ }
+ {
+ sk_FragColor = outputColor_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 inPosition;
+void main() {
+ vec2 pos2 = (uViewM_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/10-152.shader_test b/shaders/skia/10-152.shader_test
new file mode 100644
index 0000000..70d4865
--- /dev/null
+++ b/shaders/skia/10-152.shader_test
@@ -0,0 +1,73 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform vec2 uBounds_Stage1;
+uniform vec4 uKernel_Stage1[2];
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0 - 3.0 * uImageIncrement_Stage1;
+ vec2 coordSampled = vec2(0.0, 0.0);
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1.x && coord.x <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].x;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1.x && coord.x <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].y;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1.x && coord.x <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].z;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1.x && coord.x <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].w;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1.x && coord.x <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].x;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1.x && coord.x <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].y;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1.x && coord.x <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].z;
+ }
+ coord += uImageIncrement_Stage1;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/10-161.shader_test b/shaders/skia/10-161.shader_test
new file mode 100644
index 0000000..20c90b0
--- /dev/null
+++ b/shaders/skia/10-161.shader_test
@@ -0,0 +1,90 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+flat in vec4 vcolor_Stage0;
+noperspective in vec2 varccoord_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ float x_plus_1 = varccoord_Stage0.x, y = varccoord_Stage0.y;
+ float coverage;
+ if (0.0 == x_plus_1) {
+ coverage = y;
+ } else {
+ float fn = x_plus_1 * (x_plus_1 - 2.0);
+ fn = ((y) * (y) + (fn));
+ float fnwidth = fwidth(fn);
+ float d = fn / fnwidth;
+ coverage = clamp(0.5 - d, 0.0, 1.0);
+ }
+ outputCoverage_Stage0 = vec4(coverage);
+ }
+ {
+ sk_FragColor = (1.0 - outputColor_Stage0.w) * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec4 radii_selector;
+in vec4 corner_and_radius_outsets;
+in vec4 aa_bloat_and_coverage;
+in vec4 skew;
+in vec2 translate;
+in vec4 radii_x;
+in vec4 radii_y;
+in vec4 color;
+flat out vec4 vcolor_Stage0;
+noperspective out vec2 varccoord_Stage0;
+void main() {
+ vcolor_Stage0 = color;
+ vec2 corner = corner_and_radius_outsets.xy;
+ vec2 radius_outset = corner_and_radius_outsets.zw;
+ vec2 aa_bloat_direction = aa_bloat_and_coverage.xy;
+ float coverage = aa_bloat_and_coverage.z;
+ float is_linear_coverage = aa_bloat_and_coverage.w;
+ vec2 pixellength = inversesqrt(vec2(dot(skew.xz, skew.xz), dot(skew.yw, skew.yw)));
+ vec4 normalized_axis_dirs = skew * pixellength.xyxy;
+ vec2 axiswidths = abs(normalized_axis_dirs.xy) + abs(normalized_axis_dirs.zw);
+ vec2 aa_bloatradius = (axiswidths * pixellength) * 0.5;
+ vec4 radii_and_neighbors = radii_selector * mat4(radii_x, radii_y, radii_x.yxwz, radii_y.wzyx);
+ vec2 radii = radii_and_neighbors.xy;
+ vec2 neighbor_radii = radii_and_neighbors.zw;
+ if (any(greaterThan(aa_bloatradius, vec2(1.0)))) {
+ corner = max(abs(corner), aa_bloatradius) * sign(corner);
+ coverage /= max(aa_bloatradius.x, 1.0) * max(aa_bloatradius.y, 1.0);
+ radii = vec2(0.0);
+ }
+ if (any(lessThan(radii, aa_bloatradius * 1.25))) {
+ radii = aa_bloatradius;
+ radius_outset = floor(abs(radius_outset)) * radius_outset;
+ is_linear_coverage = 1.0;
+ } else {
+ radii = clamp(radii, pixellength, 2.0 - pixellength);
+ neighbor_radii = clamp(neighbor_radii, pixellength, 2.0 - pixellength);
+ vec2 spacing = (2.0 - radii) - neighbor_radii;
+ vec2 extra_pad = max(pixellength * 0.0625 - spacing, vec2(0.0));
+ radii -= extra_pad * 0.5;
+ }
+ vec2 aa_outset = aa_bloat_direction * aa_bloatradius;
+ vec2 vertexpos = (corner + radius_outset * radii) + aa_outset;
+ mat2 skewmatrix = mat2(skew.xy, skew.zw);
+ vec2 devcoord = vertexpos * skewmatrix + translate;
+ if (0.0 != is_linear_coverage) {
+ varccoord_Stage0.xy = vec2(0.0, coverage);
+ } else {
+ vec2 arccoord = (1.0 - abs(radius_outset)) + (aa_outset / radii) * corner;
+ varccoord_Stage0.xy = vec2(arccoord.x + 1.0, arccoord.y);
+ }
+ gl_Position = vec4(devcoord.x, devcoord.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/10-163.shader_test b/shaders/skia/10-163.shader_test
new file mode 100644
index 0000000..5cf3da8
--- /dev/null
+++ b/shaders/skia/10-163.shader_test
@@ -0,0 +1,319 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform vec4 uKernel_Stage1[7];
+uniform vec2 uKernelOffset_Stage1;
+uniform float uGain_Stage1;
+uniform float uBias_Stage1;
+uniform vec4 uTexDom_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ vec4 sum = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0 - uKernelOffset_Stage1 * uImageIncrement_Stage1;
+ vec4 c;
+ {
+ float k = uKernel_Stage1[0].x;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = mod(origCoord - uTexDom_Stage1.xy, uTexDom_Stage1.zw - uTexDom_Stage1.xy) + uTexDom_Stage1.xy;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[0].y;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = mod(origCoord - uTexDom_Stage1.xy, uTexDom_Stage1.zw - uTexDom_Stage1.xy) + uTexDom_Stage1.xy;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[0].z;
+ {
+ vec2 origCoord = coord + vec2(2.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = mod(origCoord - uTexDom_Stage1.xy, uTexDom_Stage1.zw - uTexDom_Stage1.xy) + uTexDom_Stage1.xy;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[0].w;
+ {
+ vec2 origCoord = coord + vec2(3.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = mod(origCoord - uTexDom_Stage1.xy, uTexDom_Stage1.zw - uTexDom_Stage1.xy) + uTexDom_Stage1.xy;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[1].x;
+ {
+ vec2 origCoord = coord + vec2(4.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = mod(origCoord - uTexDom_Stage1.xy, uTexDom_Stage1.zw - uTexDom_Stage1.xy) + uTexDom_Stage1.xy;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[1].y;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = mod(origCoord - uTexDom_Stage1.xy, uTexDom_Stage1.zw - uTexDom_Stage1.xy) + uTexDom_Stage1.xy;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[1].z;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = mod(origCoord - uTexDom_Stage1.xy, uTexDom_Stage1.zw - uTexDom_Stage1.xy) + uTexDom_Stage1.xy;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[1].w;
+ {
+ vec2 origCoord = coord + vec2(2.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = mod(origCoord - uTexDom_Stage1.xy, uTexDom_Stage1.zw - uTexDom_Stage1.xy) + uTexDom_Stage1.xy;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[2].x;
+ {
+ vec2 origCoord = coord + vec2(3.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = mod(origCoord - uTexDom_Stage1.xy, uTexDom_Stage1.zw - uTexDom_Stage1.xy) + uTexDom_Stage1.xy;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[2].y;
+ {
+ vec2 origCoord = coord + vec2(4.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = mod(origCoord - uTexDom_Stage1.xy, uTexDom_Stage1.zw - uTexDom_Stage1.xy) + uTexDom_Stage1.xy;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[2].z;
+ {
+ vec2 origCoord = coord + vec2(0.0, 2.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = mod(origCoord - uTexDom_Stage1.xy, uTexDom_Stage1.zw - uTexDom_Stage1.xy) + uTexDom_Stage1.xy;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[2].w;
+ {
+ vec2 origCoord = coord + vec2(1.0, 2.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = mod(origCoord - uTexDom_Stage1.xy, uTexDom_Stage1.zw - uTexDom_Stage1.xy) + uTexDom_Stage1.xy;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[3].x;
+ {
+ vec2 origCoord = coord + vec2(2.0, 2.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = mod(origCoord - uTexDom_Stage1.xy, uTexDom_Stage1.zw - uTexDom_Stage1.xy) + uTexDom_Stage1.xy;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[3].y;
+ {
+ vec2 origCoord = coord + vec2(3.0, 2.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = mod(origCoord - uTexDom_Stage1.xy, uTexDom_Stage1.zw - uTexDom_Stage1.xy) + uTexDom_Stage1.xy;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[3].z;
+ {
+ vec2 origCoord = coord + vec2(4.0, 2.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = mod(origCoord - uTexDom_Stage1.xy, uTexDom_Stage1.zw - uTexDom_Stage1.xy) + uTexDom_Stage1.xy;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[3].w;
+ {
+ vec2 origCoord = coord + vec2(0.0, 3.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = mod(origCoord - uTexDom_Stage1.xy, uTexDom_Stage1.zw - uTexDom_Stage1.xy) + uTexDom_Stage1.xy;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[4].x;
+ {
+ vec2 origCoord = coord + vec2(1.0, 3.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = mod(origCoord - uTexDom_Stage1.xy, uTexDom_Stage1.zw - uTexDom_Stage1.xy) + uTexDom_Stage1.xy;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[4].y;
+ {
+ vec2 origCoord = coord + vec2(2.0, 3.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = mod(origCoord - uTexDom_Stage1.xy, uTexDom_Stage1.zw - uTexDom_Stage1.xy) + uTexDom_Stage1.xy;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[4].z;
+ {
+ vec2 origCoord = coord + vec2(3.0, 3.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = mod(origCoord - uTexDom_Stage1.xy, uTexDom_Stage1.zw - uTexDom_Stage1.xy) + uTexDom_Stage1.xy;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[4].w;
+ {
+ vec2 origCoord = coord + vec2(4.0, 3.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = mod(origCoord - uTexDom_Stage1.xy, uTexDom_Stage1.zw - uTexDom_Stage1.xy) + uTexDom_Stage1.xy;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[5].x;
+ {
+ vec2 origCoord = coord + vec2(0.0, 4.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = mod(origCoord - uTexDom_Stage1.xy, uTexDom_Stage1.zw - uTexDom_Stage1.xy) + uTexDom_Stage1.xy;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[5].y;
+ {
+ vec2 origCoord = coord + vec2(1.0, 4.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = mod(origCoord - uTexDom_Stage1.xy, uTexDom_Stage1.zw - uTexDom_Stage1.xy) + uTexDom_Stage1.xy;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[5].z;
+ {
+ vec2 origCoord = coord + vec2(2.0, 4.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = mod(origCoord - uTexDom_Stage1.xy, uTexDom_Stage1.zw - uTexDom_Stage1.xy) + uTexDom_Stage1.xy;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[5].w;
+ {
+ vec2 origCoord = coord + vec2(3.0, 4.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = mod(origCoord - uTexDom_Stage1.xy, uTexDom_Stage1.zw - uTexDom_Stage1.xy) + uTexDom_Stage1.xy;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[6].x;
+ {
+ vec2 origCoord = coord + vec2(4.0, 4.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = mod(origCoord - uTexDom_Stage1.xy, uTexDom_Stage1.zw - uTexDom_Stage1.xy) + uTexDom_Stage1.xy;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ output_Stage1 = sum * uGain_Stage1 + uBias_Stage1;
+ output_Stage1.w = clamp(output_Stage1.w, 0.0, 1.0);
+ output_Stage1.xyz = clamp(output_Stage1.xyz, 0.0, output_Stage1.w);
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/10-18.shader_test b/shaders/skia/10-18.shader_test
new file mode 100644
index 0000000..bf0002b
--- /dev/null
+++ b/shaders/skia/10-18.shader_test
@@ -0,0 +1,63 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TiledGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/10-184.shader_test b/shaders/skia/10-184.shader_test
new file mode 100644
index 0000000..299887f
--- /dev/null
+++ b/shaders/skia/10-184.shader_test
@@ -0,0 +1,92 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uscale01_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias01_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale23_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias23_Stage1_c0_c0_c1_c0;
+uniform float uthreshold_Stage1_c0_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage0;
+noperspective in vec2 vTextureCoords_Stage0;
+flat in int vTexIndex_Stage0;
+noperspective in vec4 vinColor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 DualIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthreshold_Stage1_c0_c0_c1_c0) {
+ scale = uscale01_Stage1_c0_c0_c1_c0;
+ bias = ubias01_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale23_Stage1_c0_c0_c1_c0;
+ bias = ubias23_Stage1_c0_c0_c1_c0;
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = DualIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ vec4 texColor;
+ {
+ texColor = texture(uTextureSampler_0_Stage0, vTextureCoords_Stage0);
+ }
+ outputCoverage_Stage0 = texColor;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TiledGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1 * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform vec2 uAtlasSizeInv_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in uvec2 inTextureCoords;
+noperspective out vec2 vTextureCoords_Stage0;
+flat out int vTexIndex_Stage0;
+noperspective out vec4 vinColor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ ivec2 signedCoords = ivec2(int(inTextureCoords.x), int(inTextureCoords.y));
+ vec2 unormTexCoords = vec2(float(signedCoords.x / 2), float(signedCoords.y / 2));
+ vTextureCoords_Stage0 = unormTexCoords * uAtlasSizeInv_Stage0;
+ vTexIndex_Stage0 = 0;
+ vinColor_Stage0 = inColor;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(inPosition.x, inPosition.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/10-187.shader_test b/shaders/skia/10-187.shader_test
new file mode 100644
index 0000000..6d58364
--- /dev/null
+++ b/shaders/skia/10-187.shader_test
@@ -0,0 +1,91 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 uscale01_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias01_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale23_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias23_Stage1_c0_c0_c1_c0;
+uniform float uthreshold_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 DualIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthreshold_Stage1_c0_c0_c1_c0) {
+ scale = uscale01_Stage1_c0_c0_c1_c0;
+ bias = ubias01_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale23_Stage1_c0_c0_c1_c0;
+ bias = ubias23_Stage1_c0_c0_c1_c0;
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = DualIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_1_Stage0.x);
+ uint y = uint(vTransformedCoords_1_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ output_Stage2 = vec4(clamp(output_Stage2.xyz + value * 0.0039215688593685627, 0.0, output_Stage2.w), output_Stage2.w);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/10-19.shader_test b/shaders/skia/10-19.shader_test
new file mode 100644
index 0000000..50f4022
--- /dev/null
+++ b/shaders/skia/10-19.shader_test
@@ -0,0 +1,93 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uCoordTransformMatrix_1_Stage0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0_c0_c0(vec4 _input, vec2 _coords) {
+ _coords = _coords * uCoordTransformMatrix_1_Stage0.xz + uCoordTransformMatrix_1_Stage0.yw;
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, _coords) * _input;
+ return _output;
+}
+vec4 Bicubic_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coord = vTransformedCoords_0_Stage0 - vec2(0.5);
+ vec2 f = fract(coord);
+ coord += 0.5 - f;
+ vec4 wx = mat4(0.055555555555555552, 0.88888888888888884, 0.055555555555555552, 0.0, -0.5, 0.0, 0.5, 0.0, 0.83333333333333337, -2.0, 1.5, -0.33333333333333331, -0.3888888888888889, 1.1666666666666667, -1.1666666666666667, 0.3888888888888889) * vec4(1.0, f.x, f.x * f.x, (f.x * f.x) * f.x);
+ vec4 wy = mat4(0.055555555555555552, 0.88888888888888884, 0.055555555555555552, 0.0, -0.5, 0.0, 0.5, 0.0, 0.83333333333333337, -2.0, 1.5, -0.33333333333333331, -0.3888888888888889, 1.1666666666666667, -1.1666666666666667, 0.3888888888888889) * vec4(1.0, f.y, f.y * f.y, (f.y * f.y) * f.y);
+ vec4 rowColors[4];
+ rowColors[0] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(-1.0, -1.0));
+ rowColors[1] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(0.0, -1.0));
+ rowColors[2] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(1.0, -1.0));
+ rowColors[3] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(2.0, -1.0));
+ vec4 s0 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ rowColors[0] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(-1.0, 0.0));
+ rowColors[1] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord);
+ rowColors[2] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(1.0, 0.0));
+ rowColors[3] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(2.0, 0.0));
+ vec4 s1 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ rowColors[0] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(-1.0, 1.0));
+ rowColors[1] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(0.0, 1.0));
+ rowColors[2] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(1.0, 1.0));
+ rowColors[3] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(2.0, 1.0));
+ vec4 s2 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ rowColors[0] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(-1.0, 2.0));
+ rowColors[1] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(0.0, 2.0));
+ rowColors[2] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(1.0, 2.0));
+ rowColors[3] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(2.0, 2.0));
+ vec4 s3 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ vec4 bicubicColor = ((wy.x * s0 + wy.y * s1) + wy.z * s2) + wy.w * s3;
+ bicubicColor = clamp(bicubicColor, 0.0, 1.0);
+ _output = bicubicColor * _input;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = Bicubic_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_2_Stage0.x);
+ uint y = uint(vTransformedCoords_2_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ output_Stage2 = vec4(clamp(output_Stage2.xyz + value * 0.0039215688593685627, 0.0, output_Stage2.w), output_Stage2.w);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/10-190.shader_test b/shaders/skia/10-190.shader_test
new file mode 100644
index 0000000..35cf2b9
--- /dev/null
+++ b/shaders/skia/10-190.shader_test
@@ -0,0 +1,62 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uColor_Stage0;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 RadialGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = length(vTransformedCoords_0_Stage0);
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = RadialGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec2 pos2 = (uViewM_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/10-192.shader_test b/shaders/skia/10-192.shader_test
new file mode 100644
index 0000000..9cf6ba0
--- /dev/null
+++ b/shaders/skia/10-192.shader_test
@@ -0,0 +1,96 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_0_Stage0;
+ float t = -1.0;
+ float v = 1.0;
+ {
+ {
+ float invR1 = ufocalParams_Stage1_c0_c0_c0_c0.x;
+ float x_t = -1.0;
+ {
+ float temp = p.x * p.x - p.y * p.y;
+ if (temp >= 0.0) {
+ {
+ x_t = -sqrt(temp) - p.x * invR1;
+ }
+ }
+ }
+ {
+ if (x_t <= 0.0) {
+ v = -1.0;
+ }
+ }
+ {
+ {
+ t = x_t;
+ }
+ }
+ {
+ t = 1.0 - t;
+ }
+ }
+ }
+ _output = vec4(t, v, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/10-193.shader_test b/shaders/skia/10-193.shader_test
new file mode 100644
index 0000000..cdd3ef3
--- /dev/null
+++ b/shaders/skia/10-193.shader_test
@@ -0,0 +1,82 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_0_Stage0;
+ float t = -1.0;
+ {
+ {
+ float invR1 = ufocalParams_Stage1_c0_c0_c0_c0.x;
+ float x_t = -1.0;
+ {
+ x_t = length(p) - p.x * invR1;
+ }
+ {
+ {
+ t = x_t;
+ }
+ }
+ }
+ }
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/10-194.shader_test b/shaders/skia/10-194.shader_test
new file mode 100644
index 0000000..2a3a339
--- /dev/null
+++ b/shaders/skia/10-194.shader_test
@@ -0,0 +1,79 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 RadialGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = length(vTransformedCoords_0_Stage0);
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = RadialGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TiledGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_1_Stage0.x);
+ uint y = uint(vTransformedCoords_1_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ output_Stage2 = vec4(clamp(output_Stage2.xyz + value * 0.0039215688593685627, 0.0, output_Stage2.w), output_Stage2.w);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/10-195.shader_test b/shaders/skia/10-195.shader_test
new file mode 100644
index 0000000..244141a
--- /dev/null
+++ b/shaders/skia/10-195.shader_test
@@ -0,0 +1,111 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_0_Stage0;
+ float t = -1.0;
+ float v = 1.0;
+ {
+ {
+ float invR1 = ufocalParams_Stage1_c0_c0_c0_c0.x;
+ float x_t = -1.0;
+ {
+ float temp = p.x * p.x - p.y * p.y;
+ if (temp >= 0.0) {
+ {
+ x_t = -sqrt(temp) - p.x * invR1;
+ }
+ }
+ }
+ {
+ if (x_t <= 0.0) {
+ v = -1.0;
+ }
+ }
+ {
+ {
+ t = x_t;
+ }
+ }
+ {
+ t = 1.0 - t;
+ }
+ }
+ }
+ _output = vec4(t, v, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TiledGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_1_Stage0.x);
+ uint y = uint(vTransformedCoords_1_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ output_Stage2 = vec4(clamp(output_Stage2.xyz + value * 0.0039215688593685627, 0.0, output_Stage2.w), output_Stage2.w);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/10-196.shader_test b/shaders/skia/10-196.shader_test
new file mode 100644
index 0000000..4d1e1f8
--- /dev/null
+++ b/shaders/skia/10-196.shader_test
@@ -0,0 +1,97 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_0_Stage0;
+ float t = -1.0;
+ {
+ {
+ float invR1 = ufocalParams_Stage1_c0_c0_c0_c0.x;
+ float x_t = -1.0;
+ {
+ x_t = length(p) - p.x * invR1;
+ }
+ {
+ {
+ t = x_t;
+ }
+ }
+ }
+ }
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TiledGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_1_Stage0.x);
+ uint y = uint(vTransformedCoords_1_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ output_Stage2 = vec4(clamp(output_Stage2.xyz + value * 0.0039215688593685627, 0.0, output_Stage2.w), output_Stage2.w);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/10-197.shader_test b/shaders/skia/10-197.shader_test
new file mode 100644
index 0000000..1ff108c
--- /dev/null
+++ b/shaders/skia/10-197.shader_test
@@ -0,0 +1,77 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 RadialGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = length(vTransformedCoords_0_Stage0);
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = RadialGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ t.x = fract(t.x);
+ }
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TiledGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_1_Stage0.x);
+ uint y = uint(vTransformedCoords_1_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ output_Stage2 = vec4(clamp(output_Stage2.xyz + value * 0.0039215688593685627, 0.0, output_Stage2.w), output_Stage2.w);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/10-198.shader_test b/shaders/skia/10-198.shader_test
new file mode 100644
index 0000000..71a674b
--- /dev/null
+++ b/shaders/skia/10-198.shader_test
@@ -0,0 +1,109 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_0_Stage0;
+ float t = -1.0;
+ float v = 1.0;
+ {
+ {
+ float invR1 = ufocalParams_Stage1_c0_c0_c0_c0.x;
+ float x_t = -1.0;
+ {
+ float temp = p.x * p.x - p.y * p.y;
+ if (temp >= 0.0) {
+ {
+ x_t = -sqrt(temp) - p.x * invR1;
+ }
+ }
+ }
+ {
+ if (x_t <= 0.0) {
+ v = -1.0;
+ }
+ }
+ {
+ {
+ t = x_t;
+ }
+ }
+ {
+ t = 1.0 - t;
+ }
+ }
+ }
+ _output = vec4(t, v, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else {
+ {
+ t.x = fract(t.x);
+ }
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TiledGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_1_Stage0.x);
+ uint y = uint(vTransformedCoords_1_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ output_Stage2 = vec4(clamp(output_Stage2.xyz + value * 0.0039215688593685627, 0.0, output_Stage2.w), output_Stage2.w);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/10-199.shader_test b/shaders/skia/10-199.shader_test
new file mode 100644
index 0000000..966fae7
--- /dev/null
+++ b/shaders/skia/10-199.shader_test
@@ -0,0 +1,95 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_0_Stage0;
+ float t = -1.0;
+ {
+ {
+ float invR1 = ufocalParams_Stage1_c0_c0_c0_c0.x;
+ float x_t = -1.0;
+ {
+ x_t = length(p) - p.x * invR1;
+ }
+ {
+ {
+ t = x_t;
+ }
+ }
+ }
+ }
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else {
+ {
+ t.x = fract(t.x);
+ }
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TiledGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_1_Stage0.x);
+ uint y = uint(vTransformedCoords_1_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ output_Stage2 = vec4(clamp(output_Stage2.xyz + value * 0.0039215688593685627, 0.0, output_Stage2.w), output_Stage2.w);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/10-2.shader_test b/shaders/skia/10-2.shader_test
new file mode 100644
index 0000000..a8e82d3
--- /dev/null
+++ b/shaders/skia/10-2.shader_test
@@ -0,0 +1,66 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform mat3 ucolorSpaceMatrix_Stage1;
+uniform vec3 ucolorSpaceTranslate_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+uniform sampler2D uTextureSampler_2_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+vec4 TextureEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_1_Stage1, vTransformedCoords_1_Stage0) * _input;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c2_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_2_Stage1, vTransformedCoords_2_Stage0) * _input;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ vec4 planes[3];
+ planes[0] = TextureEffect_Stage1_c0_c0(vec4(1.0));
+ planes[1] = TextureEffect_Stage1_c1_c0(vec4(1.0));
+ planes[2] = TextureEffect_Stage1_c2_c0(vec4(1.0));
+ vec4 color = vec4(planes[1].x, planes[2].x, planes[0].x, 1.0);
+ color.xyz = clamp(color.xyz * ucolorSpaceMatrix_Stage1 + ucolorSpaceTranslate_Stage1, 0.0, 1.0);
+ output_Stage1 = color;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/10-201.shader_test b/shaders/skia/10-201.shader_test
new file mode 100644
index 0000000..b4e99fc
--- /dev/null
+++ b/shaders/skia/10-201.shader_test
@@ -0,0 +1,112 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_0_Stage0;
+ float t = -1.0;
+ float v = 1.0;
+ {
+ {
+ float invR1 = ufocalParams_Stage1_c0_c0_c0_c0.x;
+ float x_t = -1.0;
+ {
+ float temp = p.x * p.x - p.y * p.y;
+ if (temp >= 0.0) {
+ {
+ x_t = -sqrt(temp) - p.x * invR1;
+ }
+ }
+ }
+ {
+ if (x_t <= 0.0) {
+ v = -1.0;
+ }
+ }
+ {
+ {
+ t = x_t;
+ }
+ }
+ {
+ t = 1.0 - t;
+ }
+ }
+ }
+ _output = vec4(t, v, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_1_Stage0.x);
+ uint y = uint(vTransformedCoords_1_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ output_Stage2 = vec4(clamp(output_Stage2.xyz + value * 0.0039215688593685627, 0.0, output_Stage2.w), output_Stage2.w);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/10-202.shader_test b/shaders/skia/10-202.shader_test
new file mode 100644
index 0000000..95e3e9e
--- /dev/null
+++ b/shaders/skia/10-202.shader_test
@@ -0,0 +1,98 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_0_Stage0;
+ float t = -1.0;
+ {
+ {
+ float invR1 = ufocalParams_Stage1_c0_c0_c0_c0.x;
+ float x_t = -1.0;
+ {
+ x_t = length(p) - p.x * invR1;
+ }
+ {
+ {
+ t = x_t;
+ }
+ }
+ }
+ }
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_1_Stage0.x);
+ uint y = uint(vTransformedCoords_1_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ output_Stage2 = vec4(clamp(output_Stage2.xyz + value * 0.0039215688593685627, 0.0, output_Stage2.w), output_Stage2.w);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/10-206.shader_test b/shaders/skia/10-206.shader_test
new file mode 100644
index 0000000..c52f7fb
--- /dev/null
+++ b/shaders/skia/10-206.shader_test
@@ -0,0 +1,105 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+in float vcoverage_Stage0;
+flat in vec4 vgeomDomain_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_0_Stage0;
+ float t = -1.0;
+ {
+ {
+ float invR1 = ufocalParams_Stage1_c0_c0_c0_c0.x;
+ float fx = ufocalParams_Stage1_c0_c0_c0_c0.y;
+ float x_t = -1.0;
+ {
+ x_t = length(p) - p.x * invR1;
+ }
+ {
+ {
+ t = x_t + fx;
+ }
+ }
+ }
+ }
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ float coverage = vcoverage_Stage0 * gl_FragCoord.w;
+ vec4 geoDomain;
+ geoDomain = vgeomDomain_Stage0;
+ if (coverage < 0.5) {
+ vec4 dists4 = clamp(vec4(1.0, 1.0, -1.0, -1.0) * (gl_FragCoord.xyxy - geoDomain), 0.0, 1.0);
+ vec2 dists2 = dists4.xy * dists4.zw;
+ coverage = min(coverage, dists2.x * dists2.y);
+ }
+ outputCoverage_Stage0 = vec4(coverage);
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1 * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec4 positionWithCoverage;
+in vec4 color;
+in vec2 localCoord;
+in vec4 geomDomain;
+out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+out float vcoverage_Stage0;
+flat out vec4 vgeomDomain_Stage0;
+void main() {
+ vec3 position = positionWithCoverage.xyz;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ vcoverage_Stage0 = positionWithCoverage.w * positionWithCoverage.z;
+ vgeomDomain_Stage0 = geomDomain;
+ gl_Position = vec4(position.x, position.y, 0.0, position.z);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/10-207.shader_test b/shaders/skia/10-207.shader_test
new file mode 100644
index 0000000..4cee986
--- /dev/null
+++ b/shaders/skia/10-207.shader_test
@@ -0,0 +1,121 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+in vec2 vTransformedCoords_0_Stage0;
+in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+in float vcoverage_Stage0;
+flat in vec4 vgeomDomain_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_0_Stage0;
+ float t = -1.0;
+ {
+ {
+ float invR1 = ufocalParams_Stage1_c0_c0_c0_c0.x;
+ float fx = ufocalParams_Stage1_c0_c0_c0_c0.y;
+ float x_t = -1.0;
+ {
+ x_t = length(p) - p.x * invR1;
+ }
+ {
+ {
+ t = x_t + fx;
+ }
+ }
+ }
+ }
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ float coverage = vcoverage_Stage0 * gl_FragCoord.w;
+ vec4 geoDomain;
+ geoDomain = vgeomDomain_Stage0;
+ if (coverage < 0.5) {
+ vec4 dists4 = clamp(vec4(1.0, 1.0, -1.0, -1.0) * (gl_FragCoord.xyxy - geoDomain), 0.0, 1.0);
+ vec2 dists2 = dists4.xy * dists4.zw;
+ coverage = min(coverage, dists2.x * dists2.y);
+ }
+ outputCoverage_Stage0 = vec4(coverage);
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_1_Stage0.x);
+ uint y = uint(vTransformedCoords_1_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ output_Stage2 = vec4(clamp(output_Stage2.xyz + value * 0.0039215688593685627, 0.0, output_Stage2.w), output_Stage2.w);
+ }
+ {
+ sk_FragColor = output_Stage2 * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec4 positionWithCoverage;
+in vec4 color;
+in vec2 localCoord;
+in vec4 geomDomain;
+out vec2 vTransformedCoords_0_Stage0;
+out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+out float vcoverage_Stage0;
+flat out vec4 vgeomDomain_Stage0;
+void main() {
+ vec3 position = positionWithCoverage.xyz;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ vcoverage_Stage0 = positionWithCoverage.w * positionWithCoverage.z;
+ vgeomDomain_Stage0 = geomDomain;
+ gl_Position = vec4(position.x, position.y, 0.0, position.z);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/10-208.shader_test b/shaders/skia/10-208.shader_test
new file mode 100644
index 0000000..08248d9
--- /dev/null
+++ b/shaders/skia/10-208.shader_test
@@ -0,0 +1,84 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+noperspective in vec3 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 vTransformedCoords_0_Stage0_ensure2D = vTransformedCoords_0_Stage0.xy / vTransformedCoords_0_Stage0.z;
+ vec2 p = vTransformedCoords_0_Stage0_ensure2D;
+ float t = -1.0;
+ {
+ {
+ float invR1 = ufocalParams_Stage1_c0_c0_c0_c0.x;
+ float fx = ufocalParams_Stage1_c0_c0_c0_c0.y;
+ float x_t = -1.0;
+ {
+ x_t = length(p) - p.x * invR1;
+ }
+ {
+ {
+ t = x_t + fx;
+ }
+ }
+ }
+ }
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec3 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0);
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/10-209.shader_test b/shaders/skia/10-209.shader_test
new file mode 100644
index 0000000..1126d97
--- /dev/null
+++ b/shaders/skia/10-209.shader_test
@@ -0,0 +1,100 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+noperspective in vec3 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 vTransformedCoords_0_Stage0_ensure2D = vTransformedCoords_0_Stage0.xy / vTransformedCoords_0_Stage0.z;
+ vec2 p = vTransformedCoords_0_Stage0_ensure2D;
+ float t = -1.0;
+ {
+ {
+ float invR1 = ufocalParams_Stage1_c0_c0_c0_c0.x;
+ float fx = ufocalParams_Stage1_c0_c0_c0_c0.y;
+ float x_t = -1.0;
+ {
+ x_t = length(p) - p.x * invR1;
+ }
+ {
+ {
+ t = x_t + fx;
+ }
+ }
+ }
+ }
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_1_Stage0.x);
+ uint y = uint(vTransformedCoords_1_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ output_Stage2 = vec4(clamp(output_Stage2.xyz + value * 0.0039215688593685627, 0.0, output_Stage2.w), output_Stage2.w);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec3 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0);
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/10-224.shader_test b/shaders/skia/10-224.shader_test
new file mode 100644
index 0000000..4ddfc88
--- /dev/null
+++ b/shaders/skia/10-224.shader_test
@@ -0,0 +1,106 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 uscale01_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias01_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale23_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias23_Stage1_c0_c0_c1_c0;
+uniform float uthreshold_Stage1_c0_c0_c1_c0;
+uniform vec3 uedges_Stage3[4];
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec3 vTransformedCoords_0_Stage0;
+noperspective in vec3 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 RadialGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 vTransformedCoords_0_Stage0_ensure2D = vTransformedCoords_0_Stage0.xy / vTransformedCoords_0_Stage0.z;
+ float t = length(vTransformedCoords_0_Stage0_ensure2D);
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 DualIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthreshold_Stage1_c0_c0_c1_c0) {
+ scale = uscale01_Stage1_c0_c0_c1_c0;
+ bias = ubias01_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale23_Stage1_c0_c0_c1_c0;
+ bias = ubias23_Stage1_c0_c0_c1_c0;
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = RadialGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = DualIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = textureProj(uTextureSampler_0_Stage2, vTransformedCoords_1_Stage0);
+ }
+ vec4 output_Stage3;
+ {
+ float alpha = 1.0;
+ float edge;
+ edge = dot(uedges_Stage3[0], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage3[1], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage3[2], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage3[3], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ output_Stage3 = output_Stage2 * alpha;
+ }
+ {
+ sk_FragColor = output_Stage1 * output_Stage3;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec3 localCoord;
+noperspective out vec3 vTransformedCoords_0_Stage0;
+noperspective out vec3 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = uCoordTransformMatrix_0_Stage0 * localCoord;
+ vTransformedCoords_1_Stage0 = uCoordTransformMatrix_1_Stage0 * localCoord;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/10-225.shader_test b/shaders/skia/10-225.shader_test
new file mode 100644
index 0000000..cdc8b28
--- /dev/null
+++ b/shaders/skia/10-225.shader_test
@@ -0,0 +1,57 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = outputColor_Stage0;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_0_Stage0.x);
+ uint y = uint(vTransformedCoords_0_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ output_Stage1 = vec4(clamp(output_Stage1.xyz + value * 0.0039215688593685627, 0.0, output_Stage1.w), output_Stage1.w);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = texture(uTextureSampler_0_Stage2, vTransformedCoords_1_Stage0);
+ }
+ {
+ sk_FragColor = output_Stage1 * output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/10-23.shader_test b/shaders/skia/10-23.shader_test
new file mode 100644
index 0000000..cbff8e9
--- /dev/null
+++ b/shaders/skia/10-23.shader_test
@@ -0,0 +1,33 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uColor_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = uColor_Stage0;
+ }
+ {
+ sk_FragColor = outputColor_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 inPosition;
+void main() {
+ vec2 pos2 = inPosition;
+ {
+ vec2 _posTmp = pos2;
+ _posTmp = floor(_posTmp) + vec2(0.5, 0.5);
+ gl_Position = vec4(_posTmp, 0.0, 1.0);
+ }
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/10-233.shader_test b/shaders/skia/10-233.shader_test
new file mode 100644
index 0000000..035daf1
--- /dev/null
+++ b/shaders/skia/10-233.shader_test
@@ -0,0 +1,81 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_KHR_blend_equation_advanced : require
+out vec4 sk_FragColor;
+layout (blend_support_all_equations) out ;
+uniform float uDstTF_Stage2[7];
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+float dst_tf_Stage2(float x) {
+ float G = uDstTF_Stage2[0];
+ float A = uDstTF_Stage2[1];
+ float B = uDstTF_Stage2[2];
+ float C = uDstTF_Stage2[3];
+ float D = uDstTF_Stage2[4];
+ float E = uDstTF_Stage2[5];
+ float F = uDstTF_Stage2[6];
+ float s = sign(x);
+ x = abs(x);
+ x = x < D ? C * x + F : pow(A * x + B, G) + E;
+ return s * x;
+}
+vec4 color_xform_Stage2(vec4 color) {
+ float nonZeroAlpha = max(color.w, 9.9999997473787516e-05);
+ color = vec4(color.xyz / nonZeroAlpha, nonZeroAlpha);
+ color.x = dst_tf_Stage2(color.x);
+ color.y = dst_tf_Stage2(color.y);
+ color.z = dst_tf_Stage2(color.z);
+ color.xyz *= color.w;
+ return color;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_dst_in(outputColor_Stage0, TextureEffect_Stage1_c0_c0(vec4(1.0)));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = color_xform_Stage2(output_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/10-238.shader_test b/shaders/skia/10-238.shader_test
new file mode 100644
index 0000000..cff4950
--- /dev/null
+++ b/shaders/skia/10-238.shader_test
@@ -0,0 +1,67 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 TextureEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = TextureEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = OverrideInputFragmentProcessor_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 blend_src(vec4 src, vec4 dst) {
+ return src;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_src(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec2 inLocalCoord;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 color = inColor;
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/10-239.shader_test b/shaders/skia/10-239.shader_test
new file mode 100644
index 0000000..6ab2b59
--- /dev/null
+++ b/shaders/skia/10-239.shader_test
@@ -0,0 +1,84 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 ucolor_Stage2_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 TextureEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = TextureEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = OverrideInputFragmentProcessor_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c1_c0;
+ }
+ return _output;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 blend_modulate(vec4 src, vec4 dst) {
+ return src * dst;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_src_over(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_modulate(ConstColorProcessor_Stage2_c1_c0(vec4(1.0)), output_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 inColor;
+in vec2 inLocalCoord;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/10-241.shader_test b/shaders/skia/10-241.shader_test
new file mode 100644
index 0000000..44e99aa
--- /dev/null
+++ b/shaders/skia/10-241.shader_test
@@ -0,0 +1,56 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uScale_Stage1;
+uniform vec4 uTexDom_Stage1;
+uniform vec3 uDecalParams_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ vec4 dColor = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ dColor.xyz = dColor.w < 9.9999999747524271e-07 ? vec3(0.0) : clamp(dColor.xyz / dColor.w, 0.0, 1.0);
+ vec2 cCoords = vTransformedCoords_1_Stage0 + uScale_Stage1 * (dColor.xz - vec2(0.5));
+ {
+ vec2 origCoord = cCoords;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ output_Stage1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/10-250.shader_test b/shaders/skia/10-250.shader_test
new file mode 100644
index 0000000..3d8577c
--- /dev/null
+++ b/shaders/skia/10-250.shader_test
@@ -0,0 +1,52 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec3 uedges_Stage1[3];
+flat in vec4 vcolor_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ float alpha = 1.0;
+ float edge;
+ edge = dot(uedges_Stage1[0], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage1[1], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage1[2], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ alpha = 1.0 - alpha;
+ output_Stage1 = vec4(alpha);
+ }
+ {
+ sk_FragColor = outputColor_Stage0 * output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 inPosition;
+in vec2 inLocalCoords;
+in vec4 color;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vcolor_Stage0 = color;
+ vec2 pos2 = inPosition;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/10-254.shader_test b/shaders/skia/10-254.shader_test
new file mode 100644
index 0000000..101bf8b
--- /dev/null
+++ b/shaders/skia/10-254.shader_test
@@ -0,0 +1,84 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 uscale01_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias01_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale23_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias23_Stage1_c0_c0_c1_c0;
+uniform float uthreshold_Stage1_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 DualIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthreshold_Stage1_c0_c0_c1_c0) {
+ scale = uscale01_Stage1_c0_c0_c1_c0;
+ bias = ubias01_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale23_Stage1_c0_c0_c1_c0;
+ bias = ubias23_Stage1_c0_c0_c1_c0;
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = DualIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+void main() {
+ {
+ ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ {
+ output_Stage2 = ucolor_Stage2;
+ }
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/10-257.shader_test b/shaders/skia/10-257.shader_test
new file mode 100644
index 0000000..60cbda0
--- /dev/null
+++ b/shaders/skia/10-257.shader_test
@@ -0,0 +1,82 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform mat4 um_Stage2;
+uniform vec4 uv_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+noperspective in float vcoverage_Stage0;
+flat in vec4 vgeomDomain_Stage0;
+vec4 TextureEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ float coverage = vcoverage_Stage0;
+ vec4 geoDomain;
+ geoDomain = vgeomDomain_Stage0;
+ if (coverage < 0.5) {
+ vec4 dists4 = clamp(vec4(1.0, 1.0, -1.0, -1.0) * (gl_FragCoord.xyxy - geoDomain), 0.0, 1.0);
+ vec2 dists2 = dists4.xy * dists4.zw;
+ coverage = min(coverage, dists2.x * dists2.y);
+ }
+ outputCoverage_Stage0 = vec4(coverage);
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TextureEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ vec4 inputColor = output_Stage1;
+ {
+ float nonZeroAlpha = max(inputColor.w, 9.9999997473787516e-05);
+ inputColor = vec4(inputColor.xyz / nonZeroAlpha, inputColor.w);
+ }
+ output_Stage2 = um_Stage2 * inputColor + uv_Stage2;
+ {
+ output_Stage2 = clamp(output_Stage2, 0.0, 1.0);
+ }
+ {
+ output_Stage2.xyz *= output_Stage2.w;
+ }
+ }
+ {
+ sk_FragColor = output_Stage2 * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in float coverage;
+in vec4 color;
+in vec2 localCoord;
+in vec4 geomDomain;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+noperspective out float vcoverage_Stage0;
+flat out vec4 vgeomDomain_Stage0;
+void main() {
+ vec2 position = position;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ vcoverage_Stage0 = coverage;
+ vgeomDomain_Stage0 = geomDomain;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/10-259.shader_test b/shaders/skia/10-259.shader_test
new file mode 100644
index 0000000..0b5a404
--- /dev/null
+++ b/shaders/skia/10-259.shader_test
@@ -0,0 +1,88 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 ustart_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c0_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c0_c0_c1_c0;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+vec4 ComposeOne_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_dst_in(_input, TiledGradientEffect_Stage1_c0_c0_c0_c0(vec4(1.0)));
+ return _output;
+}
+vec4 TextureEffect_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_1_Stage0) * _input;
+ return _output;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TextureEffect_Stage1_c1_c0(ComposeOne_Stage1_c0_c0(outputColor_Stage0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/10-263.shader_test b/shaders/skia/10-263.shader_test
new file mode 100644
index 0000000..3a04eca
--- /dev/null
+++ b/shaders/skia/10-263.shader_test
@@ -0,0 +1,97 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c1_c0_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c1_c0_c0_c0;
+uniform vec4 ustart_Stage1_c1_c0_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c1_c0_c0_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+vec4 LinearGradientLayout_Stage1_c1_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_1_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c1_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c1_c0_c0_c0_c1_c0 + t * uend_Stage1_c1_c0_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c1_c0_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c1_c0_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c1_c0_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c1_c0_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+vec4 ComposeOne_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_dst_in(_input, ClampedGradientEffect_Stage1_c1_c0_c0_c0(vec4(1.0)));
+ return _output;
+}
+vec4 blend_dst_over(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src + dst;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_dst_over(TextureEffect_Stage1_c0_c0(inputColor), ComposeOne_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/10-264.shader_test b/shaders/skia/10-264.shader_test
new file mode 100644
index 0000000..35148d9
--- /dev/null
+++ b/shaders/skia/10-264.shader_test
@@ -0,0 +1,118 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 uleftBorderColor_Stage1_c1_c0_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c1_c0_c0_c0;
+uniform vec4 ustart_Stage1_c1_c0_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c1_c0_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = ClampedGradientEffect_Stage1_c0_c0_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ return _output;
+}
+vec4 LinearGradientLayout_Stage1_c1_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_1_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c1_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c1_c0_c0_c0_c1_c0 + t * uend_Stage1_c1_c0_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c1_c0_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c1_c0_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c1_c0_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c1_c0_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = ClampedGradientEffect_Stage1_c1_c0_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ return _output;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_src_over(OverrideInputFragmentProcessor_Stage1_c0_c0(inputColor), OverrideInputFragmentProcessor_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/10-27.shader_test b/shaders/skia/10-27.shader_test
new file mode 100644
index 0000000..fa06e99
--- /dev/null
+++ b/shaders/skia/10-27.shader_test
@@ -0,0 +1,107 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform vec2 uBounds_Stage1;
+uniform vec4 uKernel_Stage1[5];
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0 - 8.0 * uImageIncrement_Stage1;
+ vec2 coordSampled = vec2(0.0, 0.0);
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[4].x;
+ coord += uImageIncrement_Stage1;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ sk_FragColor = sk_FragColor.wwww;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/10-28.shader_test b/shaders/skia/10-28.shader_test
new file mode 100644
index 0000000..aa654eb
--- /dev/null
+++ b/shaders/skia/10-28.shader_test
@@ -0,0 +1,166 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale8_9_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale10_11_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias8_9_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias10_11_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage2_c1_c0;
+uniform vec2 uDstTextureUpperLeft_Stage3;
+uniform vec2 uDstTextureCoordScale_Stage3;
+uniform sampler2D uTextureSampler_0_Stage0;
+uniform sampler2D uDstTextureSampler_Stage3;
+noperspective in vec2 vTextureCoords_Stage0;
+flat in int vTexIndex_Stage0;
+noperspective in vec4 vinColor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.w) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c1_c0;
+ }
+ }
+ } else {
+ {
+ if (t < uthresholds9_13_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale8_9_Stage1_c0_c0_c1_c0;
+ bias = ubias8_9_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale10_11_Stage1_c0_c0_c1_c0;
+ bias = ubias10_11_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c1_c0;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+vec4 blend_modulate(vec4 src, vec4 dst) {
+ return src * dst;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vinColor_Stage0;
+ vec4 texColor;
+ {
+ texColor = texture(uTextureSampler_0_Stage0, vTextureCoords_Stage0);
+ }
+ outputCoverage_Stage0 = texColor;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_dst_in(outputColor_Stage0, ClampedGradientEffect_Stage1_c0_c0(vec4(1.0)));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_modulate(ConstColorProcessor_Stage2_c1_c0(vec4(1.0)), output_Stage1);
+ }
+ {
+ if (all(lessThanEqual(outputCoverage_Stage0.xyz, vec3(0.0)))) {
+ discard;
+ }
+ vec2 _dstTexCoord = (gl_FragCoord.xy - uDstTextureUpperLeft_Stage3) * uDstTextureCoordScale_Stage3;
+ _dstTexCoord.y = 1.0 - _dstTexCoord.y;
+ vec4 _dstColor = texture(uDstTextureSampler_Stage3, _dstTexCoord);
+ sk_FragColor = blend_src_over(output_Stage2, _dstColor);
+ float lerpRed = mix(_dstColor.w, sk_FragColor.w, outputCoverage_Stage0.x);
+ float lerpBlue = mix(_dstColor.w, sk_FragColor.w, outputCoverage_Stage0.y);
+ float lerpGreen = mix(_dstColor.w, sk_FragColor.w, outputCoverage_Stage0.z);
+ sk_FragColor = outputCoverage_Stage0 * sk_FragColor + (vec4(1.0) - outputCoverage_Stage0) * _dstColor;
+ sk_FragColor.w = max(max(lerpRed, lerpBlue), lerpGreen);
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform vec2 uAtlasSizeInv_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in uvec2 inTextureCoords;
+noperspective out vec2 vTextureCoords_Stage0;
+flat out int vTexIndex_Stage0;
+noperspective out vec4 vinColor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ ivec2 signedCoords = ivec2(int(inTextureCoords.x), int(inTextureCoords.y));
+ vec2 unormTexCoords = vec2(float(signedCoords.x / 2), float(signedCoords.y / 2));
+ vTextureCoords_Stage0 = unormTexCoords * uAtlasSizeInv_Stage0;
+ vTexIndex_Stage0 = 0;
+ vinColor_Stage0 = inColor;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(inPosition.x, inPosition.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/10-282.shader_test b/shaders/skia/10-282.shader_test
new file mode 100644
index 0000000..8793935
--- /dev/null
+++ b/shaders/skia/10-282.shader_test
@@ -0,0 +1,110 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform float uweight_Stage1;
+uniform vec4 uleftBorderColor_Stage1_c1_c0_c0_c0_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c1_c0_c0_c0_c0_c0;
+uniform vec4 ustart_Stage1_c1_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c1_c0_c0_c0_c0_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ return _output;
+}
+vec4 RadialGradientLayout_Stage1_c1_c0_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = length(vTransformedCoords_1_Stage0);
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c1_c0_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c1_c0_c0_c0_c0_c0_c1_c0 + t * uend_Stage1_c1_c0_c0_c0_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c1_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = RadialGradientLayout_Stage1_c1_c0_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c1_c0_c0_c0_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c1_c0_c0_c0_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c1_c0_c0_c0_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = ClampedGradientEffect_Stage1_c1_c0_c0_c0_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ return _output;
+}
+vec4 TextureEffect_Stage1_c1_c0_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_1_Stage1, vTransformedCoords_2_Stage0) * _input;
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = TextureEffect_Stage1_c1_c0_c1_c0_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ return _output;
+}
+vec4 blend_modulate(vec4 src, vec4 dst) {
+ return src * dst;
+}
+vec4 ComposeTwo_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_modulate(OverrideInputFragmentProcessor_Stage1_c1_c0_c0_c0(inputColor), OverrideInputFragmentProcessor_Stage1_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = mix(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), ComposeTwo_Stage1_c1_c0(vec4(1.0)), uweight_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/10-284.shader_test b/shaders/skia/10-284.shader_test
new file mode 100644
index 0000000..b3c9a97
--- /dev/null
+++ b/shaders/skia/10-284.shader_test
@@ -0,0 +1,75 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uscale01_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias01_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale23_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias23_Stage1_c0_c0_c1_c0;
+uniform float uthreshold_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 DualIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthreshold_Stage1_c0_c0_c1_c0) {
+ scale = uscale01_Stage1_c0_c0_c1_c0;
+ bias = ubias01_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale23_Stage1_c0_c0_c1_c0;
+ bias = ubias23_Stage1_c0_c0_c1_c0;
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ t.x = fract(t.x);
+ }
+ _output = DualIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TiledGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/10-285.shader_test b/shaders/skia/10-285.shader_test
new file mode 100644
index 0000000..69129bd
--- /dev/null
+++ b/shaders/skia/10-285.shader_test
@@ -0,0 +1,89 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uclamp_Stage1_c0_c0;
+uniform mat4 um_Stage2_c1_c0;
+uniform vec4 uv_Stage2_c1_c0;
+uniform vec4 ucolor_Stage2_c2_c0_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 inCoord = vTransformedCoords_0_Stage0;
+ vec2 subsetCoord;
+ subsetCoord.x = inCoord.x;
+ subsetCoord.y = inCoord.y;
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage1_c0_c0.x, uclamp_Stage1_c0_c0.z);
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage1_c0_c0.y, uclamp_Stage1_c0_c0.w);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ _output = _input * textureColor;
+ return _output;
+}
+vec4 ColorMatrixFragmentProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = _input;
+ {
+ float nonZeroAlpha = max(inputColor.w, 9.9999997473787516e-05);
+ inputColor = vec4(inputColor.xyz / nonZeroAlpha, inputColor.w);
+ }
+ _output = um_Stage2_c1_c0 * inputColor + uv_Stage2_c1_c0;
+ {
+ _output = clamp(_output, 0.0, 1.0);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c2_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c2_c0_c0_c0;
+ }
+ return _output;
+}
+vec4 blend_src(vec4 src, vec4 dst) {
+ return src;
+}
+vec4 ComposeOne_Stage2_c2_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_src(ConstColorProcessor_Stage2_c2_c0_c0_c0(vec4(1.0)), _input);
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TextureEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = ComposeOne_Stage2_c2_c0(ColorMatrixFragmentProcessor_Stage2_c1_c0(output_Stage1));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/10-287.shader_test b/shaders/skia/10-287.shader_test
new file mode 100644
index 0000000..6e421e5
--- /dev/null
+++ b/shaders/skia/10-287.shader_test
@@ -0,0 +1,68 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uColor_Stage0;
+uniform vec4 ucolor_Stage1;
+uniform mat4 um_Stage2;
+uniform vec4 uv_Stage2;
+uniform sampler2D uTextureSampler_0_Stage0;
+noperspective in vec2 vTextureCoords_Stage0;
+flat in int vTexIndex_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = uColor_Stage0;
+ vec4 texColor;
+ {
+ texColor = texture(uTextureSampler_0_Stage0, vTextureCoords_Stage0);
+ }
+ outputColor_Stage0 = outputColor_Stage0 * texColor;
+ }
+ vec4 output_Stage1;
+ {
+ {
+ output_Stage1 = outputColor_Stage0 * ucolor_Stage1;
+ }
+ }
+ vec4 output_Stage2;
+ {
+ vec4 inputColor = output_Stage1;
+ {
+ float nonZeroAlpha = max(inputColor.w, 9.9999997473787516e-05);
+ inputColor = vec4(inputColor.xyz / nonZeroAlpha, inputColor.w);
+ }
+ output_Stage2 = um_Stage2 * inputColor + uv_Stage2;
+ {
+ output_Stage2 = clamp(output_Stage2, 0.0, 1.0);
+ }
+ {
+ output_Stage2.xyz *= output_Stage2.w;
+ }
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform vec2 uAtlasSizeInv_Stage0;
+in vec2 inPosition;
+in uvec2 inTextureCoords;
+noperspective out vec2 vTextureCoords_Stage0;
+flat out int vTexIndex_Stage0;
+void main() {
+ ivec2 signedCoords = ivec2(int(inTextureCoords.x), int(inTextureCoords.y));
+ vec2 unormTexCoords = vec2(float(signedCoords.x / 2), float(signedCoords.y / 2));
+ vTextureCoords_Stage0 = unormTexCoords * uAtlasSizeInv_Stage0;
+ vTexIndex_Stage0 = 0;
+ gl_Position = vec4(inPosition.x, inPosition.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/10-288.shader_test b/shaders/skia/10-288.shader_test
new file mode 100644
index 0000000..c17d6f7
--- /dev/null
+++ b/shaders/skia/10-288.shader_test
@@ -0,0 +1,29 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = gl_FrontFacing ? vec4(0.0, 1.0, 0.0, 1.0) : vec4(1.0, 0.0, 0.0, 1.0);
+ outputCoverage_Stage0 = vec4(min(gl_FragCoord.y, 1.0));
+ }
+ {
+ sk_FragColor = outputColor_Stage0 * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 position;
+void main() {
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/10-290.shader_test b/shaders/skia/10-290.shader_test
new file mode 100644
index 0000000..094d531
--- /dev/null
+++ b/shaders/skia/10-290.shader_test
@@ -0,0 +1,113 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform vec4 uKernel_Stage1[7];
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0 - 12.0 * uImageIncrement_Stage1;
+ vec2 coordSampled = vec2(0.0, 0.0);
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[4].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[4].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[4].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[4].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[5].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[5].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[5].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[5].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[6].x;
+ coord += uImageIncrement_Stage1;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ sk_FragColor = sk_FragColor.wwww;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/10-30.shader_test b/shaders/skia/10-30.shader_test
new file mode 100644
index 0000000..30e8329
--- /dev/null
+++ b/shaders/skia/10-30.shader_test
@@ -0,0 +1,68 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 usubset_Stage1;
+uniform vec4 uclamp_Stage1;
+uniform vec4 unorm_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+flat in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec2 inCoord = vTransformedCoords_0_Stage0;
+ inCoord *= unorm_Stage1.xy;
+ float extraRepeatCoordX;
+ float repeatCoordWeightX;
+ vec2 subsetCoord;
+ {
+ float w = usubset_Stage1.z - usubset_Stage1.x;
+ float w2 = 2.0 * w;
+ float d = inCoord.x - usubset_Stage1.x;
+ float m = mod(d, w2);
+ float o = mix(m, w2 - m, step(w, m));
+ subsetCoord.x = o + usubset_Stage1.x;
+ extraRepeatCoordX = (w - o) + usubset_Stage1.x;
+ float hw = w / 2.0;
+ float n = mod(d - hw, w2);
+ repeatCoordWeightX = clamp((mix(n, w2 - n, step(w, n)) - hw) + 0.5, 0.0, 1.0);
+ }
+ subsetCoord.y = inCoord.y;
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage1.x, uclamp_Stage1.z);
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage1.y, uclamp_Stage1.w);
+ extraRepeatCoordX = clamp(extraRepeatCoordX, uclamp_Stage1.x, uclamp_Stage1.z);
+ vec4 textureColor = mix(texture(uTextureSampler_0_Stage1, clampedCoord * unorm_Stage1.zw), texture(uTextureSampler_0_Stage1, vec2(extraRepeatCoordX, clampedCoord.y) * unorm_Stage1.zw), repeatCoordWeightX);
+ output_Stage1 = outputColor_Stage0 * textureColor;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec2 inLocalCoords;
+in vec4 color;
+flat out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vcolor_Stage0 = color;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoords, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/10-306.shader_test b/shaders/skia/10-306.shader_test
new file mode 100644
index 0000000..85d0ba5
--- /dev/null
+++ b/shaders/skia/10-306.shader_test
@@ -0,0 +1,101 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform vec4 uKernel_Stage1[6];
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0 - 10.0 * uImageIncrement_Stage1;
+ vec2 coordSampled = vec2(0.0, 0.0);
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[4].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[4].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[4].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[4].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[5].x;
+ coord += uImageIncrement_Stage1;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ sk_FragColor = sk_FragColor.wwww;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/10-307.shader_test b/shaders/skia/10-307.shader_test
new file mode 100644
index 0000000..7a3df46
--- /dev/null
+++ b/shaders/skia/10-307.shader_test
@@ -0,0 +1,55 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uColor_Stage0;
+uniform float ucornerRadius_Stage1;
+uniform vec4 uproxyRect_Stage1;
+uniform float ublurRadius_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = uColor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec2 translatedFragPos = gl_FragCoord.xy - uproxyRect_Stage1.xy;
+ float threshold = ucornerRadius_Stage1 + 2.0 * ublurRadius_Stage1;
+ vec2 middle = (uproxyRect_Stage1.zw - uproxyRect_Stage1.xy) - 2.0 * threshold;
+ if (translatedFragPos.x >= threshold && translatedFragPos.x < middle.x + threshold) {
+ translatedFragPos.x = threshold;
+ } else if (translatedFragPos.x >= middle.x + threshold) {
+ translatedFragPos.x -= middle.x - 1.0;
+ }
+ if (translatedFragPos.y > threshold && translatedFragPos.y < middle.y + threshold) {
+ translatedFragPos.y = threshold;
+ } else if (translatedFragPos.y >= middle.y + threshold) {
+ translatedFragPos.y -= middle.y - 1.0;
+ }
+ vec2 proxyDims = vec2(2.0 * threshold + 1.0);
+ vec2 texCoord = translatedFragPos / proxyDims;
+ output_Stage1 = texture(uTextureSampler_0_Stage1, texCoord);
+ }
+ {
+ sk_FragColor = outputColor_Stage0 * output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 position;
+void main() {
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/10-308.shader_test b/shaders/skia/10-308.shader_test
new file mode 100644
index 0000000..d8a460a
--- /dev/null
+++ b/shaders/skia/10-308.shader_test
@@ -0,0 +1,67 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_KHR_blend_equation_advanced : require
+out vec4 sk_FragColor;
+layout (blend_support_all_equations) out ;
+uniform mat4 um_Stage2;
+uniform vec4 uv_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TextureEffect_Stage1_c0_c0(vec4(1.0));
+ output_Stage1.xyz *= outputColor_Stage0.xyz;
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ vec4 output_Stage2;
+ {
+ vec4 inputColor = output_Stage1;
+ {
+ float nonZeroAlpha = max(inputColor.w, 9.9999997473787516e-05);
+ inputColor = vec4(inputColor.xyz / nonZeroAlpha, inputColor.w);
+ }
+ output_Stage2 = um_Stage2 * inputColor + uv_Stage2;
+ {
+ output_Stage2 = clamp(output_Stage2, 0.0, 1.0);
+ }
+ {
+ output_Stage2.xyz *= output_Stage2.w;
+ }
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/10-31.shader_test b/shaders/skia/10-31.shader_test
new file mode 100644
index 0000000..eeed79c
--- /dev/null
+++ b/shaders/skia/10-31.shader_test
@@ -0,0 +1,59 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 usubset_Stage1;
+uniform vec4 uclamp_Stage1;
+uniform vec4 unorm_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+flat in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec2 inCoord = vTransformedCoords_0_Stage0;
+ inCoord *= unorm_Stage1.xy;
+ vec2 subsetCoord;
+ subsetCoord.x = mod(inCoord.x - usubset_Stage1.x, usubset_Stage1.z - usubset_Stage1.x) + usubset_Stage1.x;
+ subsetCoord.y = inCoord.y;
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage1.x, uclamp_Stage1.z);
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage1.y, uclamp_Stage1.w);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord * unorm_Stage1.zw);
+ float errX = subsetCoord.x - clampedCoord.x;
+ float repeatCoordX = errX > 0.0 ? uclamp_Stage1.x : uclamp_Stage1.z;
+ if (errX != 0.0) {
+ textureColor = mix(textureColor, texture(uTextureSampler_0_Stage1, vec2(repeatCoordX, clampedCoord.y) * unorm_Stage1.zw), abs(errX));
+ }
+ output_Stage1 = outputColor_Stage0 * textureColor;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec2 inLocalCoords;
+in vec4 color;
+flat out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vcolor_Stage0 = color;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoords, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/10-325.shader_test b/shaders/skia/10-325.shader_test
new file mode 100644
index 0000000..bf02673
--- /dev/null
+++ b/shaders/skia/10-325.shader_test
@@ -0,0 +1,38 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uColor_Stage0;
+noperspective in vec4 vHairQuadEdge_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = uColor_Stage0;
+ float edgeAlpha;
+ edgeAlpha = vHairQuadEdge_Stage0.x * vHairQuadEdge_Stage0.x - vHairQuadEdge_Stage0.y;
+ edgeAlpha = edgeAlpha < 0.0 ? 1.0 : 0.0;
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ {
+ sk_FragColor = outputColor_Stage0 * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 inPosition;
+in vec4 inHairQuadEdge;
+noperspective out vec4 vHairQuadEdge_Stage0;
+void main() {
+ vHairQuadEdge_Stage0 = inHairQuadEdge;
+ vec2 pos2 = inPosition;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/10-326.shader_test b/shaders/skia/10-326.shader_test
new file mode 100644
index 0000000..d2a517c
--- /dev/null
+++ b/shaders/skia/10-326.shader_test
@@ -0,0 +1,38 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uColor_Stage0;
+noperspective in vec4 vConicCoeffs_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = uColor_Stage0;
+ float edgeAlpha;
+ edgeAlpha = vConicCoeffs_Stage0.x * vConicCoeffs_Stage0.x - vConicCoeffs_Stage0.y * vConicCoeffs_Stage0.z;
+ edgeAlpha = edgeAlpha < 0.0 ? 1.0 : 0.0;
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ {
+ sk_FragColor = outputColor_Stage0 * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 inPosition;
+in vec4 inConicCoeffs;
+noperspective out vec4 vConicCoeffs_Stage0;
+void main() {
+ vConicCoeffs_Stage0 = inConicCoeffs;
+ vec2 pos2 = inPosition;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/10-328.shader_test b/shaders/skia/10-328.shader_test
new file mode 100644
index 0000000..7ff9866
--- /dev/null
+++ b/shaders/skia/10-328.shader_test
@@ -0,0 +1,153 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform vec2 uBounds_Stage1;
+uniform vec4 uKernel_Stage1[6];
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0 - 11.0 * uImageIncrement_Stage1;
+ vec2 coordSampled = vec2(0.0, 0.0);
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1.x && coord.x <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].x;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1.x && coord.x <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].y;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1.x && coord.x <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].z;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1.x && coord.x <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].w;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1.x && coord.x <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].x;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1.x && coord.x <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].y;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1.x && coord.x <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].z;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1.x && coord.x <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].w;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1.x && coord.x <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].x;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1.x && coord.x <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].y;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1.x && coord.x <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].z;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1.x && coord.x <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].w;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1.x && coord.x <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].x;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1.x && coord.x <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].y;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1.x && coord.x <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].z;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1.x && coord.x <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].w;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1.x && coord.x <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[4].x;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1.x && coord.x <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[4].y;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1.x && coord.x <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[4].z;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1.x && coord.x <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[4].w;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1.x && coord.x <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[5].x;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1.x && coord.x <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[5].y;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1.x && coord.x <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[5].z;
+ }
+ coord += uImageIncrement_Stage1;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/10-33.shader_test b/shaders/skia/10-33.shader_test
new file mode 100644
index 0000000..e116720
--- /dev/null
+++ b/shaders/skia/10-33.shader_test
@@ -0,0 +1,52 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 usubset_Stage1;
+uniform vec4 uclamp_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+flat in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec2 inCoord = vTransformedCoords_0_Stage0;
+ vec2 subsetCoord;
+ subsetCoord.x = mod(inCoord.x - usubset_Stage1.x, usubset_Stage1.z - usubset_Stage1.x) + usubset_Stage1.x;
+ subsetCoord.y = inCoord.y;
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage1.x, uclamp_Stage1.z);
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage1.y, uclamp_Stage1.w);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ output_Stage1 = outputColor_Stage0 * textureColor;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec2 inLocalCoords;
+in vec4 color;
+flat out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vcolor_Stage0 = color;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoords, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/10-346.shader_test b/shaders/skia/10-346.shader_test
new file mode 100644
index 0000000..6f77a5e
--- /dev/null
+++ b/shaders/skia/10-346.shader_test
@@ -0,0 +1,71 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 ucolor_Stage1_c0_c0;
+uniform mat4 um_Stage2;
+uniform vec4 uv_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 ConstColorProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = _input.w * ucolor_Stage1_c0_c0;
+ }
+ return _output;
+}
+vec4 TextureEffect_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TextureEffect_Stage1_c1_c0(ConstColorProcessor_Stage1_c0_c0(outputColor_Stage0));
+ }
+ vec4 output_Stage2;
+ {
+ vec4 inputColor = output_Stage1;
+ {
+ float nonZeroAlpha = max(inputColor.w, 9.9999997473787516e-05);
+ inputColor = vec4(inputColor.xyz / nonZeroAlpha, inputColor.w);
+ }
+ output_Stage2 = um_Stage2 * inputColor + uv_Stage2;
+ {
+ output_Stage2 = clamp(output_Stage2, 0.0, 1.0);
+ }
+ {
+ output_Stage2.xyz *= output_Stage2.w;
+ }
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/10-351.shader_test b/shaders/skia/10-351.shader_test
new file mode 100644
index 0000000..477cc0f
--- /dev/null
+++ b/shaders/skia/10-351.shader_test
@@ -0,0 +1,46 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 TextureEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+vec4 ConfigConversionEffect_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = floor(_input * 255.0 + 0.5) / 255.0;
+ {
+ _output.xyz = floor((_output.xyz * _output.w) * 255.0 + 0.5) / 255.0;
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ConfigConversionEffect_Stage1_c1_c0(TextureEffect_Stage1_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/10-359.shader_test b/shaders/skia/10-359.shader_test
new file mode 100644
index 0000000..91d2dba
--- /dev/null
+++ b/shaders/skia/10-359.shader_test
@@ -0,0 +1,55 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 ugColors_Stage1_c0_c0[2];
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 runtime_shader_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = _input;
+ _output = ugColors_Stage1_c0_c0[1];
+ return _output;
+}
+vec4 ClampFragmentProcessor_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ float alpha = clamp(_input.w, 0.0, 1.0);
+ _output = vec4(clamp(_input.xyz, 0.0, alpha), alpha);
+ }
+ return _output;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampFragmentProcessor_Stage1_c1_c0(runtime_shader_Stage1_c0_c0(outputColor_Stage0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/10-36.shader_test b/shaders/skia/10-36.shader_test
new file mode 100644
index 0000000..8732307
--- /dev/null
+++ b/shaders/skia/10-36.shader_test
@@ -0,0 +1,90 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 uscale01_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias01_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale23_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias23_Stage1_c0_c0_c1_c0;
+uniform float uthreshold_Stage1_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage2_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 RadialGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = length(vTransformedCoords_0_Stage0);
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 DualIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthreshold_Stage1_c0_c0_c1_c0) {
+ scale = uscale01_Stage1_c0_c0_c1_c0;
+ bias = ubias01_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale23_Stage1_c0_c0_c1_c0;
+ bias = ubias23_Stage1_c0_c0_c1_c0;
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = RadialGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = DualIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c1_c0;
+ }
+ return _output;
+}
+vec4 blend_dst_out(vec4 src, vec4 dst) {
+ return (1.0 - src.w) * dst;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_dst_out(ConstColorProcessor_Stage2_c1_c0(vec4(1.0)), output_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/10-365.shader_test b/shaders/skia/10-365.shader_test
new file mode 100644
index 0000000..5213357
--- /dev/null
+++ b/shaders/skia/10-365.shader_test
@@ -0,0 +1,108 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 ubaseFrequency_Stage2_c0_c0;
+uniform vec2 ustitchData_Stage2_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+uniform sampler2D uTextureSampler_1_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+float perlinnoise_Stage2_c0_c0(float chanCoord, vec2 noiseVec, vec2 stitchData) {
+ vec4 floorVal;
+ floorVal.xy = floor(noiseVec);
+ floorVal.zw = floorVal.xy + vec2(1.0);
+ vec2 fractVal = fract(noiseVec);
+ vec2 noiseSmooth = (fractVal * fractVal) * (vec2(3.0) - vec2(2.0) * fractVal);
+ if (floorVal.x >= stitchData.x) {
+ floorVal.x -= stitchData.x;
+ }
+ if (floorVal.y >= stitchData.y) {
+ floorVal.y -= stitchData.y;
+ }
+ if (floorVal.z >= stitchData.x) {
+ floorVal.z -= stitchData.x;
+ }
+ if (floorVal.w >= stitchData.y) {
+ floorVal.w -= stitchData.y;
+ }
+ floorVal = fract(floor(mod(floorVal, 256.0)) / vec4(256.0));
+ vec2 latticeIdx;
+ latticeIdx.x = texture(uTextureSampler_0_Stage2, vec2(floorVal.x, 0.5)).x;
+ latticeIdx.y = texture(uTextureSampler_0_Stage2, vec2(floorVal.z, 0.5)).x;
+ vec4 bcoords = fract(latticeIdx.xyxy + floorVal.yyww);
+ vec2 uv;
+ vec4 lattice = texture(uTextureSampler_1_Stage2, vec2(bcoords.x, chanCoord)).zyxw;
+ uv.x = dot((lattice.yw + lattice.xz * vec2(0.00390625)) * vec2(2.0) - vec2(1.0), fractVal);
+ fractVal.x -= 1.0;
+ lattice = texture(uTextureSampler_1_Stage2, vec2(bcoords.y, chanCoord)).zyxw;
+ uv.y = dot((lattice.yw + lattice.xz * vec2(0.00390625)) * vec2(2.0) - vec2(1.0), fractVal);
+ vec2 ab;
+ ab.x = mix(uv.x, uv.y, noiseSmooth.x);
+ fractVal.y -= 1.0;
+ lattice = texture(uTextureSampler_1_Stage2, vec2(bcoords.w, chanCoord)).zyxw;
+ uv.y = dot((lattice.yw + lattice.xz * vec2(0.00390625)) * vec2(2.0) - vec2(1.0), fractVal);
+ fractVal.x += 1.0;
+ lattice = texture(uTextureSampler_1_Stage2, vec2(bcoords.z, chanCoord)).zyxw;
+ uv.x = dot((lattice.yw + lattice.xz * vec2(0.00390625)) * vec2(2.0) - vec2(1.0), fractVal);
+ ab.y = mix(uv.x, uv.y, noiseSmooth.x);
+ return mix(ab.x, ab.y, noiseSmooth.y);
+}
+vec4 PerlinNoise_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 noiseVec = floor(vTransformedCoords_1_Stage0) * ubaseFrequency_Stage2_c0_c0;
+ _output = vec4(0.0);
+ vec2 stitchData = ustitchData_Stage2_c0_c0;
+ float ratio = 1.0;
+ for (int octave = 0;octave < 10; ++octave) {
+ _output += vec4(perlinnoise_Stage2_c0_c0(0.125, noiseVec, stitchData), perlinnoise_Stage2_c0_c0(0.375, noiseVec, stitchData), perlinnoise_Stage2_c0_c0(0.625, noiseVec, stitchData), perlinnoise_Stage2_c0_c0(0.875, noiseVec, stitchData)) * ratio;
+ noiseVec *= vec2(2.0);
+ ratio *= 0.5;
+ stitchData *= vec2(2.0);
+ }
+ _output = _output * vec4(0.5) + vec4(0.5);
+ _output = clamp(_output, 0.0, 1.0);
+ _output = vec4(_output.xyz * _output.www, _output.w);
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_dst_in(output_Stage1, PerlinNoise_Stage2_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/10-366.shader_test b/shaders/skia/10-366.shader_test
new file mode 100644
index 0000000..87691a6
--- /dev/null
+++ b/shaders/skia/10-366.shader_test
@@ -0,0 +1,51 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform float uPixelSize_Stage2;
+uniform vec2 uRange_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = vec4(1.0, 1.0, 1.0, 1.0);
+ vec2 coord = vTransformedCoords_1_Stage0;
+ coord.y -= 8.0 * uPixelSize_Stage2;
+ for (int i = 0;i < 17; i++) {
+ output_Stage2 = min(output_Stage2, texture(uTextureSampler_0_Stage2, coord));
+ coord.y += uPixelSize_Stage2;
+ }
+ output_Stage2 *= output_Stage1;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/10-37.shader_test b/shaders/skia/10-37.shader_test
new file mode 100644
index 0000000..f09f559
--- /dev/null
+++ b/shaders/skia/10-37.shader_test
@@ -0,0 +1,102 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 uscale01_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias01_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale23_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias23_Stage1_c0_c0_c1_c0;
+uniform float uthreshold_Stage1_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage2_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 RadialGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = length(vTransformedCoords_0_Stage0);
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 DualIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthreshold_Stage1_c0_c0_c1_c0) {
+ scale = uscale01_Stage1_c0_c0_c1_c0;
+ bias = ubias01_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale23_Stage1_c0_c0_c1_c0;
+ bias = ubias23_Stage1_c0_c0_c1_c0;
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = RadialGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = DualIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c1_c0;
+ }
+ return _output;
+}
+float _guarded_divide(float n, float d) {
+ return n / d;
+}
+float _color_burn_component(float sc, float sa, float dc, float da) {
+ if (da == dc) {
+ return (sa * da + sc * (1.0 - da)) + dc * (1.0 - sa);
+ } else if (sc == 0.0) {
+ return dc * (1.0 - sa);
+ }
+ float d = max(0.0, da - _guarded_divide((da - dc) * sa, sc));
+ return (d * sa + sc * (1.0 - da)) + dc * (1.0 - sa);
+}
+vec4 blend_color_burn(vec4 src, vec4 dst) {
+ return vec4(_color_burn_component(src.x, src.w, dst.x, dst.w), _color_burn_component(src.y, src.w, dst.y, dst.w), _color_burn_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_color_burn(ConstColorProcessor_Stage2_c1_c0(vec4(1.0)), output_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/10-376.shader_test b/shaders/skia/10-376.shader_test
new file mode 100644
index 0000000..e6f6a93
--- /dev/null
+++ b/shaders/skia/10-376.shader_test
@@ -0,0 +1,36 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform sampler2D uTextureSampler_0_Stage0;
+noperspective in vec2 vlocalCoord_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vec4(1.0);
+ vec2 texCoord;
+ texCoord = vlocalCoord_Stage0;
+ outputColor_Stage0 = texture(uTextureSampler_0_Stage0, texCoord);
+ outputColor_Stage0 = clamp(outputColor_Stage0, 0.0, 1.0);
+ }
+ {
+ sk_FragColor = outputColor_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vlocalCoord_Stage0;
+void main() {
+ vlocalCoord_Stage0 = localCoord;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/10-38.shader_test b/shaders/skia/10-38.shader_test
new file mode 100644
index 0000000..a77cfd4
--- /dev/null
+++ b/shaders/skia/10-38.shader_test
@@ -0,0 +1,67 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/10-40.shader_test b/shaders/skia/10-40.shader_test
new file mode 100644
index 0000000..d535377
--- /dev/null
+++ b/shaders/skia/10-40.shader_test
@@ -0,0 +1,42 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uColor_Stage0;
+noperspective in vec4 vHairQuadEdge_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = uColor_Stage0;
+ float edgeAlpha;
+ vec2 duvdx = dFdx(vHairQuadEdge_Stage0.xy);
+ vec2 duvdy = -dFdy(vHairQuadEdge_Stage0.xy);
+ vec2 gF = vec2((2.0 * vHairQuadEdge_Stage0.x) * duvdx.x - duvdx.y, (2.0 * vHairQuadEdge_Stage0.x) * duvdy.x - duvdy.y);
+ edgeAlpha = vHairQuadEdge_Stage0.x * vHairQuadEdge_Stage0.x - vHairQuadEdge_Stage0.y;
+ edgeAlpha = sqrt((edgeAlpha * edgeAlpha) / dot(gF, gF));
+ edgeAlpha = max(1.0 - edgeAlpha, 0.0);
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ {
+ sk_FragColor = outputColor_Stage0 * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 inPosition;
+in vec4 inHairQuadEdge;
+noperspective out vec4 vHairQuadEdge_Stage0;
+void main() {
+ vHairQuadEdge_Stage0 = inHairQuadEdge;
+ vec2 pos2 = inPosition;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/10-42.shader_test b/shaders/skia/10-42.shader_test
new file mode 100644
index 0000000..8804ee4
--- /dev/null
+++ b/shaders/skia/10-42.shader_test
@@ -0,0 +1,53 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uColor_Stage0;
+noperspective in vec4 vConicCoeffs_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = uColor_Stage0;
+ float edgeAlpha;
+ vec3 dklmdx;
+ vec3 dklmdy;
+ float dfdx;
+ float dfdy;
+ vec2 gF;
+ float gFM;
+ float func;
+ dklmdx = dFdx(vConicCoeffs_Stage0.xyz);
+ dklmdy = -dFdy(vConicCoeffs_Stage0.xyz);
+ dfdx = ((2.0 * vConicCoeffs_Stage0.x) * dklmdx.x - vConicCoeffs_Stage0.y * dklmdx.z) - vConicCoeffs_Stage0.z * dklmdx.y;
+ dfdy = ((2.0 * vConicCoeffs_Stage0.x) * dklmdy.x - vConicCoeffs_Stage0.y * dklmdy.z) - vConicCoeffs_Stage0.z * dklmdy.y;
+ gF = vec2(dfdx, dfdy);
+ gFM = sqrt(dot(gF, gF));
+ func = vConicCoeffs_Stage0.x * vConicCoeffs_Stage0.x - vConicCoeffs_Stage0.y * vConicCoeffs_Stage0.z;
+ func = abs(func);
+ edgeAlpha = func / gFM;
+ edgeAlpha = max(1.0 - edgeAlpha, 0.0);
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ {
+ sk_FragColor = outputColor_Stage0 * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 inPosition;
+in vec4 inConicCoeffs;
+noperspective out vec4 vConicCoeffs_Stage0;
+void main() {
+ vConicCoeffs_Stage0 = inConicCoeffs;
+ vec2 pos2 = inPosition;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/10-46.shader_test b/shaders/skia/10-46.shader_test
new file mode 100644
index 0000000..e2ff9c1
--- /dev/null
+++ b/shaders/skia/10-46.shader_test
@@ -0,0 +1,73 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = texture(uTextureSampler_0_Stage2, vTransformedCoords_1_Stage0);
+ }
+ {
+ sk_FragColor = output_Stage1 * output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/10-47.shader_test b/shaders/skia/10-47.shader_test
new file mode 100644
index 0000000..02cb1e2
--- /dev/null
+++ b/shaders/skia/10-47.shader_test
@@ -0,0 +1,92 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform mat4 um_Stage2_c1_c0;
+uniform vec4 uv_Stage2_c1_c0;
+uniform float uDstTF_Stage2_c2_c0[7];
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+vec4 ColorMatrixFragmentProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = _input;
+ {
+ float nonZeroAlpha = max(inputColor.w, 9.9999997473787516e-05);
+ inputColor = vec4(inputColor.xyz / nonZeroAlpha, inputColor.w);
+ }
+ _output = um_Stage2_c1_c0 * inputColor + uv_Stage2_c1_c0;
+ {
+ _output = clamp(_output, 0.0, 1.0);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+float dst_tf_Stage2_c2_c0(float x) {
+ float G = uDstTF_Stage2_c2_c0[0];
+ float A = uDstTF_Stage2_c2_c0[1];
+ float B = uDstTF_Stage2_c2_c0[2];
+ float C = uDstTF_Stage2_c2_c0[3];
+ float D = uDstTF_Stage2_c2_c0[4];
+ float E = uDstTF_Stage2_c2_c0[5];
+ float F = uDstTF_Stage2_c2_c0[6];
+ float s = sign(x);
+ x = abs(x);
+ x = x < D ? C * x + F : pow(A * x + B, G) + E;
+ return s * x;
+}
+vec4 color_xform_Stage2_c2_c0(vec4 color) {
+ float nonZeroAlpha = max(color.w, 9.9999997473787516e-05);
+ color = vec4(color.xyz / nonZeroAlpha, nonZeroAlpha);
+ color.x = dst_tf_Stage2_c2_c0(color.x);
+ color.y = dst_tf_Stage2_c2_c0(color.y);
+ color.z = dst_tf_Stage2_c2_c0(color.z);
+ color.xyz *= color.w;
+ return color;
+}
+vec4 ColorSpaceXform_Stage2_c2_c0(vec4 _input) {
+ vec4 _output;
+ _output = color_xform_Stage2_c2_c0(_input);
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TextureEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = ColorSpaceXform_Stage2_c2_c0(ColorMatrixFragmentProcessor_Stage2_c1_c0(output_Stage1));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/10-52.shader_test b/shaders/skia/10-52.shader_test
new file mode 100644
index 0000000..81ea4c3
--- /dev/null
+++ b/shaders/skia/10-52.shader_test
@@ -0,0 +1,67 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uColor_Stage0;
+uniform float ucornerRadius_Stage1;
+uniform vec4 uproxyRect_Stage1;
+uniform float ublurRadius_Stage1;
+uniform vec4 urectUniform_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = uColor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec2 translatedFragPos = gl_FragCoord.xy - uproxyRect_Stage1.xy;
+ float threshold = ucornerRadius_Stage1 + 2.0 * ublurRadius_Stage1;
+ vec2 middle = (uproxyRect_Stage1.zw - uproxyRect_Stage1.xy) - 2.0 * threshold;
+ if (translatedFragPos.x >= threshold && translatedFragPos.x < middle.x + threshold) {
+ translatedFragPos.x = threshold;
+ } else if (translatedFragPos.x >= middle.x + threshold) {
+ translatedFragPos.x -= middle.x - 1.0;
+ }
+ if (translatedFragPos.y > threshold && translatedFragPos.y < middle.y + threshold) {
+ translatedFragPos.y = threshold;
+ } else if (translatedFragPos.y >= middle.y + threshold) {
+ translatedFragPos.y -= middle.y - 1.0;
+ }
+ vec2 proxyDims = vec2(2.0 * threshold + 1.0);
+ vec2 texCoord = translatedFragPos / proxyDims;
+ output_Stage1 = texture(uTextureSampler_0_Stage1, texCoord);
+ }
+ vec4 output_Stage2;
+ {
+ float alpha;
+ {
+ alpha = float(all(greaterThan(vec4(gl_FragCoord.xy, urectUniform_Stage2.zw), vec4(urectUniform_Stage2.xy, gl_FragCoord.xy))) ? 1 : 0);
+ }
+ {
+ alpha = 1.0 - alpha;
+ }
+ output_Stage2 = output_Stage1 * alpha;
+ }
+ {
+ sk_FragColor = outputColor_Stage0 * output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 position;
+void main() {
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/10-54.shader_test b/shaders/skia/10-54.shader_test
new file mode 100644
index 0000000..e9d00ba
--- /dev/null
+++ b/shaders/skia/10-54.shader_test
@@ -0,0 +1,55 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uCoordTransformMatrix_1_Stage0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage2_c0_c0(vec4 _input, vec2 _coords) {
+ _coords = _coords * uCoordTransformMatrix_1_Stage0.xz + uCoordTransformMatrix_1_Stage0.yw;
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage2, _coords) * _input;
+ return _output;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = TextureEffect_Stage2_c0_c0(output_Stage1, gl_FragCoord.xy);
+ }
+ {
+ sk_FragColor = outputColor_Stage0 * output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/10-6.shader_test b/shaders/skia/10-6.shader_test
new file mode 100644
index 0000000..3dfadb7
--- /dev/null
+++ b/shaders/skia/10-6.shader_test
@@ -0,0 +1,50 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 TextureEffect_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage2, vTransformedCoords_1_Stage0) * _input;
+ return _output;
+}
+vec4 blend_dst(vec4 src, vec4 dst) {
+ return dst;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_dst(output_Stage1, TextureEffect_Stage2_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/10-63.shader_test b/shaders/skia/10-63.shader_test
new file mode 100644
index 0000000..c4b7bae
--- /dev/null
+++ b/shaders/skia/10-63.shader_test
@@ -0,0 +1,86 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+vec4 ComposeOne_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_dst_in(_input, TextureEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0)));
+ return _output;
+}
+vec4 ComposeOne_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_src_in(_input, ComposeOne_Stage1_c0_c0_c0_c0(vec4(1.0)));
+ return _output;
+}
+vec4 TextureEffect_Stage1_c1_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_1_Stage1, vTransformedCoords_1_Stage0) * _input;
+ return _output;
+}
+vec4 ComposeOne_Stage1_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_dst_in(_input, TextureEffect_Stage1_c1_c0_c0_c0_c0_c0(vec4(1.0)));
+ return _output;
+}
+vec4 ComposeOne_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_src_in(_input, ComposeOne_Stage1_c1_c0_c0_c0(vec4(1.0)));
+ return _output;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(vec4(1.0).xyz, 1.0);
+ output_Stage1 = blend_src_over(ComposeOne_Stage1_c0_c0(inputColor), ComposeOne_Stage1_c1_c0(inputColor));
+ }
+ {
+ sk_FragColor = outputColor_Stage0 * output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/10-65.shader_test b/shaders/skia/10-65.shader_test
new file mode 100644
index 0000000..fa96a86
--- /dev/null
+++ b/shaders/skia/10-65.shader_test
@@ -0,0 +1,151 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform float ubias_Stage1_c0_c0_c0_c0;
+uniform float uscale_Stage1_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+uniform vec2 uDstTextureUpperLeft_Stage2;
+uniform vec2 uDstTextureCoordScale_Stage2;
+uniform sampler2D uDstTextureSampler_Stage2;
+flat in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec4 varccoord_Stage0;
+vec4 SweepGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float angle;
+ {
+ angle = atan(-vTransformedCoords_0_Stage0.y, -vTransformedCoords_0_Stage0.x);
+ }
+ float t = ((angle * 0.15915493667125702 + 0.5) + ubias_Stage1_c0_c0_c0_c0) * uscale_Stage1_c0_c0_c0_c0;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = SweepGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+vec4 blend_plus(vec4 src, vec4 dst) {
+ return min(src + dst, 1.0);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ outputCoverage_Stage0 = vec4(1.0);
+ if (vec2(0.0) != varccoord_Stage0.xy) {
+ float fn = dot(varccoord_Stage0.xy, varccoord_Stage0.xy) - 1.0;
+ if (fn > 0.0) {
+ outputCoverage_Stage0 = vec4(0.0);
+ }
+ }
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_dst_in(outputColor_Stage0, ClampedGradientEffect_Stage1_c0_c0(vec4(1.0)));
+ }
+ {
+ if (all(lessThanEqual(outputCoverage_Stage0.xyz, vec3(0.0)))) {
+ discard;
+ }
+ vec2 _dstTexCoord = (gl_FragCoord.xy - uDstTextureUpperLeft_Stage2) * uDstTextureCoordScale_Stage2;
+ _dstTexCoord.y = 1.0 - _dstTexCoord.y;
+ vec4 _dstColor = texture(uDstTextureSampler_Stage2, _dstTexCoord);
+ sk_FragColor = blend_plus(output_Stage1, _dstColor);
+ sk_FragColor = outputCoverage_Stage0 * sk_FragColor + (vec4(1.0) - outputCoverage_Stage0) * _dstColor;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec4 radii_selector;
+in vec4 corner_and_radius_outsets;
+in vec4 skew;
+in vec2 translate;
+in vec4 radii_x;
+in vec4 radii_y;
+in vec4 color;
+in vec4 local_rect;
+flat out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec4 varccoord_Stage0;
+void main() {
+ vcolor_Stage0 = color;
+ vec2 corner = corner_and_radius_outsets.xy;
+ vec2 radius_outset = corner_and_radius_outsets.zw;
+ vec2 radii;
+ radii.x = dot(radii_selector, radii_x);
+ radii.y = dot(radii_selector, radii_y);
+ bool is_arc_section = radii.x > 0.0;
+ radii = abs(radii);
+ vec2 vertexpos = corner + radius_outset * radii;
+ vec2 localcoord = (local_rect.xy * (1.0 - vertexpos) + local_rect.zw * (1.0 + vertexpos)) * 0.5;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localcoord, 1.0)).xy;
+ mat2 skewmatrix = mat2(skew.xy, skew.zw);
+ vec2 devcoord = vertexpos * skewmatrix + translate;
+ if (is_arc_section) {
+ varccoord_Stage0.xy = 1.0 - abs(radius_outset);
+ mat2 derivatives = inverse(skewmatrix);
+ varccoord_Stage0.zw = derivatives * (((varccoord_Stage0.xy / radii) * corner) * 2.0);
+ } else {
+ varccoord_Stage0 = vec4(0.0);
+ }
+ gl_Position = vec4(devcoord.x, devcoord.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/10-68.shader_test b/shaders/skia/10-68.shader_test
new file mode 100644
index 0000000..7d6364d
--- /dev/null
+++ b/shaders/skia/10-68.shader_test
@@ -0,0 +1,127 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform float ubias_Stage1_c0_c0_c0_c0;
+uniform float uscale_Stage1_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale8_9_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale10_11_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale12_13_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale14_15_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias8_9_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias10_11_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias12_13_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias14_15_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 SweepGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float angle;
+ {
+ angle = atan(-vTransformedCoords_0_Stage0.y, -vTransformedCoords_0_Stage0.x);
+ }
+ float t = ((angle * 0.15915493667125702 + 0.5) + ubias_Stage1_c0_c0_c0_c0) * uscale_Stage1_c0_c0_c0_c0;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.w) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c1_c0;
+ }
+ }
+ } else {
+ if (t < uthresholds9_13_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds9_13_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale8_9_Stage1_c0_c0_c1_c0;
+ bias = ubias8_9_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale10_11_Stage1_c0_c0_c1_c0;
+ bias = ubias10_11_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds9_13_Stage1_c0_c0_c1_c0.z) {
+ scale = uscale12_13_Stage1_c0_c0_c1_c0;
+ bias = ubias12_13_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale14_15_Stage1_c0_c0_c1_c0;
+ bias = ubias14_15_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = SweepGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/10-7.shader_test b/shaders/skia/10-7.shader_test
new file mode 100644
index 0000000..4ccdefe
--- /dev/null
+++ b/shaders/skia/10-7.shader_test
@@ -0,0 +1,94 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform mat4 um_Stage1_c1_c0;
+uniform vec4 uv_Stage1_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = TextureEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ return _output;
+}
+vec4 TextureEffect_Stage1_c0_c0_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_1_Stage1, vTransformedCoords_1_Stage0) * _input;
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = TextureEffect_Stage1_c0_c0_c1_c0_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ return _output;
+}
+vec4 blend_difference(vec4 src, vec4 dst) {
+ return vec4((src.xyz + dst.xyz) - 2.0 * min(src.xyz * dst.w, dst.xyz * src.w), src.w + (1.0 - src.w) * dst.w);
+}
+vec4 ComposeTwo_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_difference(OverrideInputFragmentProcessor_Stage1_c0_c0_c0_c0(inputColor), OverrideInputFragmentProcessor_Stage1_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 ColorMatrixFragmentProcessor_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = _input;
+ {
+ float nonZeroAlpha = max(inputColor.w, 9.9999997473787516e-05);
+ inputColor = vec4(inputColor.xyz / nonZeroAlpha, inputColor.w);
+ }
+ _output = um_Stage1_c1_c0 * inputColor + uv_Stage1_c1_c0;
+ {
+ _output = clamp(_output, 0.0, 1.0);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ColorMatrixFragmentProcessor_Stage1_c1_c0(ComposeTwo_Stage1_c0_c0(outputColor_Stage0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/10-70.shader_test b/shaders/skia/10-70.shader_test
new file mode 100644
index 0000000..8ea49be
--- /dev/null
+++ b/shaders/skia/10-70.shader_test
@@ -0,0 +1,47 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 urectUniform_Stage1;
+flat in vec4 vcolor_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ float alpha;
+ {
+ float xSub, ySub;
+ xSub = min(gl_FragCoord.x - urectUniform_Stage1.x, 0.0);
+ xSub += min(urectUniform_Stage1.z - gl_FragCoord.x, 0.0);
+ ySub = min(gl_FragCoord.y - urectUniform_Stage1.y, 0.0);
+ ySub += min(urectUniform_Stage1.w - gl_FragCoord.y, 0.0);
+ alpha = (1.0 + max(xSub, -1.0)) * (1.0 + max(ySub, -1.0));
+ }
+ output_Stage1 = vec4(alpha);
+ }
+ {
+ sk_FragColor = outputColor_Stage0 * output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 position;
+in vec4 color;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/10-73.shader_test b/shaders/skia/10-73.shader_test
new file mode 100644
index 0000000..d00a06a
--- /dev/null
+++ b/shaders/skia/10-73.shader_test
@@ -0,0 +1,81 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+uniform vec4 uinnerRect_Stage2;
+uniform vec2 uinvRadiiXY_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ vec2 dxy0 = uinnerRect_Stage2.xy - gl_FragCoord.xy;
+ vec2 dxy1 = gl_FragCoord.xy - uinnerRect_Stage2.zw;
+ vec2 dxy = max(max(dxy0, dxy1), 0.0);
+ vec2 Z = dxy * uinvRadiiXY_Stage2;
+ float implicit = dot(Z, dxy) - 1.0;
+ float grad_dot = 4.0 * dot(Z, Z);
+ grad_dot = max(grad_dot, 9.9999997473787516e-05);
+ float approx_dist = implicit * inversesqrt(grad_dot);
+ float alpha = clamp(0.5 - approx_dist, 0.0, 1.0);
+ output_Stage2 = vec4(alpha);
+ }
+ {
+ sk_FragColor = output_Stage1 * output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/10-76.shader_test b/shaders/skia/10-76.shader_test
new file mode 100644
index 0000000..1646d44
--- /dev/null
+++ b/shaders/skia/10-76.shader_test
@@ -0,0 +1,77 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uCoordTransformMatrix_1_Stage0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0_c0_c0(vec4 _input, vec2 _coords) {
+ _coords = _coords * uCoordTransformMatrix_1_Stage0.xz + uCoordTransformMatrix_1_Stage0.yw;
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, _coords) * _input;
+ return _output;
+}
+vec4 Bicubic_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coord = vTransformedCoords_0_Stage0 - vec2(0.5);
+ vec2 f = fract(coord);
+ coord += 0.5 - f;
+ vec4 wx = mat4(0.055555555555555552, 0.88888888888888884, 0.055555555555555552, 0.0, -0.5, 0.0, 0.5, 0.0, 0.83333333333333337, -2.0, 1.5, -0.33333333333333331, -0.3888888888888889, 1.1666666666666667, -1.1666666666666667, 0.3888888888888889) * vec4(1.0, f.x, f.x * f.x, (f.x * f.x) * f.x);
+ vec4 wy = mat4(0.055555555555555552, 0.88888888888888884, 0.055555555555555552, 0.0, -0.5, 0.0, 0.5, 0.0, 0.83333333333333337, -2.0, 1.5, -0.33333333333333331, -0.3888888888888889, 1.1666666666666667, -1.1666666666666667, 0.3888888888888889) * vec4(1.0, f.y, f.y * f.y, (f.y * f.y) * f.y);
+ vec4 rowColors[4];
+ rowColors[0] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(-1.0, -1.0));
+ rowColors[1] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(0.0, -1.0));
+ rowColors[2] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(1.0, -1.0));
+ rowColors[3] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(2.0, -1.0));
+ vec4 s0 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ rowColors[0] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(-1.0, 0.0));
+ rowColors[1] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord);
+ rowColors[2] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(1.0, 0.0));
+ rowColors[3] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(2.0, 0.0));
+ vec4 s1 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ rowColors[0] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(-1.0, 1.0));
+ rowColors[1] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(0.0, 1.0));
+ rowColors[2] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(1.0, 1.0));
+ rowColors[3] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(2.0, 1.0));
+ vec4 s2 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ rowColors[0] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(-1.0, 2.0));
+ rowColors[1] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(0.0, 2.0));
+ rowColors[2] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(1.0, 2.0));
+ rowColors[3] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(2.0, 2.0));
+ vec4 s3 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ vec4 bicubicColor = ((wy.x * s0 + wy.y * s1) + wy.z * s2) + wy.w * s3;
+ bicubicColor.xyz = max(vec3(0.0), min(bicubicColor.xyz, bicubicColor.www));
+ _output = bicubicColor * _input;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = Bicubic_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/10-78.shader_test b/shaders/skia/10-78.shader_test
new file mode 100644
index 0000000..e3b4716
--- /dev/null
+++ b/shaders/skia/10-78.shader_test
@@ -0,0 +1,81 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 uscale01_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias01_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale23_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias23_Stage1_c0_c0_c1_c0;
+uniform float uthreshold_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in float vcoverage_Stage0;
+vec4 RadialGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = length(vTransformedCoords_0_Stage0);
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 DualIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthreshold_Stage1_c0_c0_c1_c0) {
+ scale = uscale01_Stage1_c0_c0_c1_c0;
+ bias = ubias01_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale23_Stage1_c0_c0_c1_c0;
+ bias = ubias23_Stage1_c0_c0_c1_c0;
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = RadialGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = DualIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ float coverage = vcoverage_Stage0;
+ outputCoverage_Stage0 = vec4(coverage);
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1 * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in float coverage;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out float vcoverage_Stage0;
+void main() {
+ vec2 position = position;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcoverage_Stage0 = coverage;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/10-8.shader_test b/shaders/skia/10-8.shader_test
new file mode 100644
index 0000000..0721dcc
--- /dev/null
+++ b/shaders/skia/10-8.shader_test
@@ -0,0 +1,63 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uclamp_Stage1_c0_c0_c0_c0;
+uniform mat3 ucolorSpaceMatrix_Stage1_c0_c0;
+uniform vec3 ucolorSpaceTranslate_Stage1_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 inCoord = vTransformedCoords_0_Stage0;
+ vec2 subsetCoord;
+ subsetCoord.x = inCoord.x;
+ subsetCoord.y = inCoord.y;
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage1_c0_c0_c0_c0.x, uclamp_Stage1_c0_c0_c0_c0.z);
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage1_c0_c0_c0_c0.y, uclamp_Stage1_c0_c0_c0_c0.w);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ _output = _input * textureColor;
+ return _output;
+}
+vec4 YUVtoRGBEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 planes[1];
+ planes[0] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0));
+ vec4 color = vec4(planes[0].y, planes[0].x, planes[0].z, planes[0].w);
+ color.xyz = clamp(color.xyz * ucolorSpaceMatrix_Stage1_c0_c0 + ucolorSpaceTranslate_Stage1_c0_c0, 0.0, 1.0);
+ color.xyz *= color.w;
+ _output = color;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = YUVtoRGBEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/10-85.shader_test b/shaders/skia/10-85.shader_test
new file mode 100644
index 0000000..8c7964a
--- /dev/null
+++ b/shaders/skia/10-85.shader_test
@@ -0,0 +1,31 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uColor_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = uColor_Stage0;
+ }
+ {
+ sk_FragColor = outputColor_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 position;
+void main() {
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_PointSize = 1.0;
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/10-86.shader_test b/shaders/skia/10-86.shader_test
new file mode 100644
index 0000000..e560cb0
--- /dev/null
+++ b/shaders/skia/10-86.shader_test
@@ -0,0 +1,30 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uColor_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = uColor_Stage0;
+ }
+ {
+ sk_FragColor = outputColor_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 position;
+void main() {
+ vec2 pos2 = position;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_PointSize = 1.0;
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/10-9.shader_test b/shaders/skia/10-9.shader_test
new file mode 100644
index 0000000..dbe0c72
--- /dev/null
+++ b/shaders/skia/10-9.shader_test
@@ -0,0 +1,78 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform mat3 ucolorSpaceMatrix_Stage1;
+uniform vec3 ucolorSpaceTranslate_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+uniform sampler2D uTextureSampler_2_Stage1;
+uniform sampler2D uTextureSampler_3_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+noperspective in vec2 vTransformedCoords_3_Stage0;
+vec4 TextureEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_1_Stage1, vTransformedCoords_1_Stage0) * _input;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c2_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_2_Stage1, vTransformedCoords_2_Stage0) * _input;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c3_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_3_Stage1, vTransformedCoords_3_Stage0) * _input;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ vec4 planes[4];
+ planes[0] = TextureEffect_Stage1_c0_c0(vec4(1.0));
+ planes[1] = TextureEffect_Stage1_c1_c0(vec4(1.0));
+ planes[2] = TextureEffect_Stage1_c2_c0(vec4(1.0));
+ planes[3] = TextureEffect_Stage1_c3_c0(vec4(1.0));
+ vec4 color = vec4(planes[0].x, planes[2].x, planes[1].x, planes[3].w);
+ color.xyz = clamp(color.xyz * ucolorSpaceMatrix_Stage1 + ucolorSpaceTranslate_Stage1, 0.0, 1.0);
+ color.xyz *= color.w;
+ output_Stage1 = color;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+uniform mat3 uCoordTransformMatrix_3_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+noperspective out vec2 vTransformedCoords_3_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_3_Stage0 = (uCoordTransformMatrix_3_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/10-95.shader_test b/shaders/skia/10-95.shader_test
new file mode 100644
index 0000000..9c4635d
--- /dev/null
+++ b/shaders/skia/10-95.shader_test
@@ -0,0 +1,40 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uColor_Stage0;
+uniform sampler2D uTextureSampler_0_Stage1;
+in vec2 vTransformedCoords_0_Stage0;
+vec4 TextureEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TextureEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec3 pos3 = uViewM_Stage0 * vec3(inPosition, 1.0);
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos3.x, pos3.y, 0.0, pos3.z);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/10-96.shader_test b/shaders/skia/10-96.shader_test
new file mode 100644
index 0000000..8fb93b6
--- /dev/null
+++ b/shaders/skia/10-96.shader_test
@@ -0,0 +1,80 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform sampler2D uTextureSampler_0_Stage0;
+uniform sampler2D uTextureSampler_0_Stage1;
+in vec2 vTextureCoords_Stage0;
+flat in int vTexIndex_Stage0;
+in vec2 vIntTextureCoords_Stage0;
+in vec4 vinColor_Stage0;
+in vec2 vTransformedCoords_0_Stage0;
+vec4 TextureEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ vec2 uv = vTextureCoords_Stage0;
+ vec4 texColor;
+ {
+ texColor = texture(uTextureSampler_0_Stage0, uv);
+ }
+ float distance = 7.96875 * (texColor.x - 0.50196081399917603);
+ float afwidth;
+ vec2 dist_grad = vec2(dFdx(distance), -dFdy(distance));
+ float dg_len2 = dot(dist_grad, dist_grad);
+ if (dg_len2 < 9.9999997473787516e-05) {
+ dist_grad = vec2(0.70709997415542603, 0.70709997415542603);
+ } else {
+ dist_grad = dist_grad * inversesqrt(dg_len2);
+ }
+ vec2 Jdx = dFdx(vIntTextureCoords_Stage0);
+ vec2 Jdy = -dFdy(vIntTextureCoords_Stage0);
+ vec2 grad = vec2(dist_grad.x * Jdx.x + dist_grad.y * Jdy.x, dist_grad.x * Jdx.y + dist_grad.y * Jdy.y);
+ afwidth = 0.64999997615814209 * length(grad);
+ float val = smoothstep(-afwidth, afwidth, distance);
+ outputCoverage_Stage0 = vec4(val);
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TextureEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1 * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform vec2 uAtlasDimensionsInv_Stage0;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in uvec2 inTextureCoords;
+out vec2 vTextureCoords_Stage0;
+flat out int vTexIndex_Stage0;
+out vec2 vIntTextureCoords_Stage0;
+out vec4 vinColor_Stage0;
+out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ ivec2 signedCoords = ivec2(int(inTextureCoords.x), int(inTextureCoords.y));
+ vec2 unormTexCoords = vec2(float(signedCoords.x / 2), float(signedCoords.y / 2));
+ vTextureCoords_Stage0 = unormTexCoords * uAtlasDimensionsInv_Stage0;
+ vTexIndex_Stage0 = 0;
+ vIntTextureCoords_Stage0 = unormTexCoords;
+ vinColor_Stage0 = inColor;
+ vec3 pos3 = uViewM_Stage0 * vec3(inPosition, 1.0);
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos3.x, pos3.y, 0.0, pos3.z);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/10-98.shader_test b/shaders/skia/10-98.shader_test
new file mode 100644
index 0000000..602c66f
--- /dev/null
+++ b/shaders/skia/10-98.shader_test
@@ -0,0 +1,106 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 ubaseFrequency_Stage1_c0_c0;
+uniform vec2 ustitchData_Stage1_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+float perlinnoise_Stage1_c0_c0(float chanCoord, vec2 noiseVec, vec2 stitchData) {
+ vec4 floorVal;
+ floorVal.xy = floor(noiseVec);
+ floorVal.zw = floorVal.xy + vec2(1.0);
+ vec2 fractVal = fract(noiseVec);
+ vec2 noiseSmooth = (fractVal * fractVal) * (vec2(3.0) - vec2(2.0) * fractVal);
+ if (floorVal.x >= stitchData.x) {
+ floorVal.x -= stitchData.x;
+ }
+ if (floorVal.y >= stitchData.y) {
+ floorVal.y -= stitchData.y;
+ }
+ if (floorVal.z >= stitchData.x) {
+ floorVal.z -= stitchData.x;
+ }
+ if (floorVal.w >= stitchData.y) {
+ floorVal.w -= stitchData.y;
+ }
+ floorVal = fract(floor(mod(floorVal, 256.0)) / vec4(256.0));
+ vec2 latticeIdx;
+ latticeIdx.x = texture(uTextureSampler_0_Stage1, vec2(floorVal.x, 0.5)).x;
+ latticeIdx.y = texture(uTextureSampler_0_Stage1, vec2(floorVal.z, 0.5)).x;
+ vec4 bcoords = fract(latticeIdx.xyxy + floorVal.yyww);
+ vec2 uv;
+ vec4 lattice = texture(uTextureSampler_1_Stage1, vec2(bcoords.x, chanCoord)).zyxw;
+ uv.x = dot((lattice.yw + lattice.xz * vec2(0.00390625)) * vec2(2.0) - vec2(1.0), fractVal);
+ fractVal.x -= 1.0;
+ lattice = texture(uTextureSampler_1_Stage1, vec2(bcoords.y, chanCoord)).zyxw;
+ uv.y = dot((lattice.yw + lattice.xz * vec2(0.00390625)) * vec2(2.0) - vec2(1.0), fractVal);
+ vec2 ab;
+ ab.x = mix(uv.x, uv.y, noiseSmooth.x);
+ fractVal.y -= 1.0;
+ lattice = texture(uTextureSampler_1_Stage1, vec2(bcoords.w, chanCoord)).zyxw;
+ uv.y = dot((lattice.yw + lattice.xz * vec2(0.00390625)) * vec2(2.0) - vec2(1.0), fractVal);
+ fractVal.x += 1.0;
+ lattice = texture(uTextureSampler_1_Stage1, vec2(bcoords.z, chanCoord)).zyxw;
+ uv.x = dot((lattice.yw + lattice.xz * vec2(0.00390625)) * vec2(2.0) - vec2(1.0), fractVal);
+ ab.y = mix(uv.x, uv.y, noiseSmooth.x);
+ return mix(ab.x, ab.y, noiseSmooth.y);
+}
+vec4 PerlinNoise_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 noiseVec = floor(vTransformedCoords_0_Stage0) * ubaseFrequency_Stage1_c0_c0;
+ _output = vec4(0.0);
+ vec2 stitchData = ustitchData_Stage1_c0_c0;
+ float ratio = 1.0;
+ for (int octave = 0;octave < 1; ++octave) {
+ _output += abs(vec4(perlinnoise_Stage1_c0_c0(0.125, noiseVec, stitchData), perlinnoise_Stage1_c0_c0(0.375, noiseVec, stitchData), perlinnoise_Stage1_c0_c0(0.625, noiseVec, stitchData), perlinnoise_Stage1_c0_c0(0.875, noiseVec, stitchData))) * ratio;
+ noiseVec *= vec2(2.0);
+ ratio *= 0.5;
+ stitchData *= vec2(2.0);
+ }
+ _output = clamp(_output, 0.0, 1.0);
+ _output = vec4(_output.xyz * _output.www, _output.w);
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_dst_in(outputColor_Stage0, PerlinNoise_Stage1_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/10.shader_test b/shaders/skia/10.shader_test
new file mode 100644
index 0000000..058c5b6
--- /dev/null
+++ b/shaders/skia/10.shader_test
@@ -0,0 +1,62 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 usubset_Stage1_c0_c0;
+uniform vec4 uclamp_Stage1_c0_c0;
+uniform sampler2DRect uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 inCoord = vTransformedCoords_0_Stage0;
+ vec2 subsetCoord;
+ subsetCoord.x = mod(inCoord.x - usubset_Stage1_c0_c0.x, usubset_Stage1_c0_c0.z - usubset_Stage1_c0_c0.x) + usubset_Stage1_c0_c0.x;
+ {
+ float w = usubset_Stage1_c0_c0.w - usubset_Stage1_c0_c0.y;
+ float w2 = 2.0 * w;
+ float m = mod(inCoord.y - usubset_Stage1_c0_c0.y, w2);
+ subsetCoord.y = mix(m, w2 - m, step(w, m)) + usubset_Stage1_c0_c0.y;
+ }
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage1_c0_c0.x, uclamp_Stage1_c0_c0.z);
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage1_c0_c0.y, uclamp_Stage1_c0_c0.w);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float errX = subsetCoord.x - clampedCoord.x;
+ float repeatCoordX = errX > 0.0 ? uclamp_Stage1_c0_c0.x : uclamp_Stage1_c0_c0.z;
+ if (errX != 0.0) {
+ textureColor = mix(textureColor, texture(uTextureSampler_0_Stage1, vec2(repeatCoordX, clampedCoord.y)), abs(errX));
+ }
+ _output = _input * textureColor;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TextureEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/100-1.shader_test b/shaders/skia/100-1.shader_test
new file mode 100644
index 0000000..cb71eae
--- /dev/null
+++ b/shaders/skia/100-1.shader_test
@@ -0,0 +1,123 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform float uSrcTF_Stage1_c0_c0[7];
+uniform mat3 uColorXform_Stage1_c0_c0;
+uniform float uDstTF_Stage1_c0_c0[7];
+uniform mat3 ucolorSpaceMatrix_Stage1_c0_c0_c0_c0;
+uniform vec3 ucolorSpaceTranslate_Stage1_c0_c0_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+uniform sampler2D uTextureSampler_2_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_1_Stage1, vTransformedCoords_1_Stage0) * _input;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c0_c0_c0_c0_c2_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_2_Stage1, vTransformedCoords_2_Stage0) * _input;
+ return _output;
+}
+vec4 YUVtoRGBEffect_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 planes[3];
+ planes[0] = TextureEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ planes[1] = TextureEffect_Stage1_c0_c0_c0_c0_c1_c0(vec4(1.0));
+ planes[2] = TextureEffect_Stage1_c0_c0_c0_c0_c2_c0(vec4(1.0));
+ vec4 color = vec4(planes[0].x, planes[2].x, planes[1].x, 1.0);
+ color.xyz = clamp(color.xyz * ucolorSpaceMatrix_Stage1_c0_c0_c0_c0 + ucolorSpaceTranslate_Stage1_c0_c0_c0_c0, 0.0, 1.0);
+ _output = color;
+ return _output;
+}
+float src_tf_Stage1_c0_c0(float x) {
+ float G = uSrcTF_Stage1_c0_c0[0];
+ float A = uSrcTF_Stage1_c0_c0[1];
+ float B = uSrcTF_Stage1_c0_c0[2];
+ float C = uSrcTF_Stage1_c0_c0[3];
+ float D = uSrcTF_Stage1_c0_c0[4];
+ float E = uSrcTF_Stage1_c0_c0[5];
+ float F = uSrcTF_Stage1_c0_c0[6];
+ float s = sign(x);
+ x = abs(x);
+ x = x < D ? C * x + F : pow(A * x + B, G) + E;
+ return s * x;
+}
+float dst_tf_Stage1_c0_c0(float x) {
+ float G = uDstTF_Stage1_c0_c0[0];
+ float A = uDstTF_Stage1_c0_c0[1];
+ float B = uDstTF_Stage1_c0_c0[2];
+ float C = uDstTF_Stage1_c0_c0[3];
+ float D = uDstTF_Stage1_c0_c0[4];
+ float E = uDstTF_Stage1_c0_c0[5];
+ float F = uDstTF_Stage1_c0_c0[6];
+ float s = sign(x);
+ x = abs(x);
+ x = x < D ? C * x + F : pow(A * x + B, G) + E;
+ return s * x;
+}
+vec4 gamut_xform_Stage1_c0_c0(vec4 color) {
+ color.xyz = uColorXform_Stage1_c0_c0 * color.xyz;
+ return color;
+}
+vec4 color_xform_Stage1_c0_c0(vec4 color) {
+ color.x = src_tf_Stage1_c0_c0(color.x);
+ color.y = src_tf_Stage1_c0_c0(color.y);
+ color.z = src_tf_Stage1_c0_c0(color.z);
+ color = gamut_xform_Stage1_c0_c0(color);
+ color.x = dst_tf_Stage1_c0_c0(color.x);
+ color.y = dst_tf_Stage1_c0_c0(color.y);
+ color.z = dst_tf_Stage1_c0_c0(color.z);
+ return color;
+}
+vec4 ColorSpaceXform_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = color_xform_Stage1_c0_c0(YUVtoRGBEffect_Stage1_c0_c0_c0_c0(vec4(1.0))) * _input;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ColorSpaceXform_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/100-10.shader_test b/shaders/skia/100-10.shader_test
new file mode 100644
index 0000000..cbec593
--- /dev/null
+++ b/shaders/skia/100-10.shader_test
@@ -0,0 +1,98 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+uniform vec2 uDstTextureUpperLeft_Stage2;
+uniform vec2 uDstTextureCoordScale_Stage2;
+uniform sampler2D uTextureSampler_0_Stage0;
+uniform sampler2D uDstTextureSampler_Stage2;
+noperspective in vec2 vTextureCoords_Stage0;
+flat in int vTexIndex_Stage0;
+noperspective in vec4 vinColor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ t.x = fract(t.x);
+ }
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 blend_dst_over(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src + dst;
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ vec4 texColor;
+ {
+ texColor = texture(uTextureSampler_0_Stage0, vTextureCoords_Stage0);
+ }
+ outputCoverage_Stage0 = texColor;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TiledGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ if (all(lessThanEqual(outputCoverage_Stage0.xyz, vec3(0.0)))) {
+ discard;
+ }
+ vec2 _dstTexCoord = (gl_FragCoord.xy - uDstTextureUpperLeft_Stage2) * uDstTextureCoordScale_Stage2;
+ _dstTexCoord.y = 1.0 - _dstTexCoord.y;
+ vec4 _dstColor = texture(uDstTextureSampler_Stage2, _dstTexCoord);
+ sk_FragColor = blend_dst_over(output_Stage1, _dstColor);
+ float lerpRed = mix(_dstColor.w, sk_FragColor.w, outputCoverage_Stage0.x);
+ float lerpBlue = mix(_dstColor.w, sk_FragColor.w, outputCoverage_Stage0.y);
+ float lerpGreen = mix(_dstColor.w, sk_FragColor.w, outputCoverage_Stage0.z);
+ sk_FragColor = outputCoverage_Stage0 * sk_FragColor + (vec4(1.0) - outputCoverage_Stage0) * _dstColor;
+ sk_FragColor.w = max(max(lerpRed, lerpBlue), lerpGreen);
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform vec2 uAtlasSizeInv_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in uvec2 inTextureCoords;
+noperspective out vec2 vTextureCoords_Stage0;
+flat out int vTexIndex_Stage0;
+noperspective out vec4 vinColor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ ivec2 signedCoords = ivec2(int(inTextureCoords.x), int(inTextureCoords.y));
+ vec2 unormTexCoords = vec2(float(signedCoords.x / 2), float(signedCoords.y / 2));
+ vTextureCoords_Stage0 = unormTexCoords * uAtlasSizeInv_Stage0;
+ vTexIndex_Stage0 = 0;
+ vinColor_Stage0 = inColor;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(inPosition.x, inPosition.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/100-18.shader_test b/shaders/skia/100-18.shader_test
new file mode 100644
index 0000000..0127741
--- /dev/null
+++ b/shaders/skia/100-18.shader_test
@@ -0,0 +1,207 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform float uSurfaceScale_Stage1;
+uniform vec3 uLightColor_Stage1;
+uniform float uKD_Stage1;
+uniform vec4 uTexDom_Stage1;
+uniform vec3 uDecalParams_Stage1;
+uniform vec3 uLightDirection_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in float vinCoverage_Stage0;
+vec4 light_Stage1(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ float colorScale = uKD_Stage1 * dot(normal, surfaceToLight);
+ return vec4(lightColor * clamp(colorScale, 0.0, 1.0), 1.0);
+}
+float sobel_Stage1(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage1(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage1(float m[9], float surfaceScale) {
+ return pointToNormal_Stage1(sobel_Stage1(m[1], m[2], m[4], m[5], m[7], m[8], 0.5), sobel_Stage1(0.0, 0.0, m[1], m[7], m[2], m[8], 0.33333298563957214), surfaceScale);
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ float alpha = 1.0;
+ alpha = vinCoverage_Stage0;
+ outputCoverage_Stage0 = vec4(alpha);
+ }
+ vec4 output_Stage1;
+ {
+ vec2 coord = vTransformedCoords_0_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp0 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp5 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp6 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp7 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp8 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = uLightDirection_Stage1;
+ output_Stage1 = light_Stage1(normal_Stage1(m, uSurfaceScale_Stage1), surfaceToLight, uLightColor_Stage1);
+ output_Stage1 *= outputCoverage_Stage0;
+ }
+ {
+ sk_FragColor = 1.0 - output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in float inCoverage;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out float vinCoverage_Stage0;
+void main() {
+ vec4 color = inColor;
+ vcolor_Stage0 = color;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ vinCoverage_Stage0 = inCoverage;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/100-19.shader_test b/shaders/skia/100-19.shader_test
new file mode 100644
index 0000000..e33c002
--- /dev/null
+++ b/shaders/skia/100-19.shader_test
@@ -0,0 +1,51 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform float uPixelSize_Stage2;
+uniform vec2 uRange_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_1_Stage0;
+ coord.y -= 5.0 * uPixelSize_Stage2;
+ for (int i = 0;i < 11; i++) {
+ output_Stage2 = max(output_Stage2, texture(uTextureSampler_0_Stage2, coord));
+ coord.y += uPixelSize_Stage2;
+ }
+ output_Stage2 *= output_Stage1;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/100-20.shader_test b/shaders/skia/100-20.shader_test
new file mode 100644
index 0000000..85a34df
--- /dev/null
+++ b/shaders/skia/100-20.shader_test
@@ -0,0 +1,70 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uCoordTransformMatrix_2_Stage0;
+uniform vec4 uclamp_Stage2_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 TextureEffect_Stage2_c0_c0(vec4 _input, vec2 _coords) {
+ _coords = _coords * uCoordTransformMatrix_2_Stage0.xz + uCoordTransformMatrix_2_Stage0.yw;
+ vec4 _output;
+ vec2 inCoord = _coords;
+ vec2 subsetCoord;
+ subsetCoord.x = inCoord.x;
+ subsetCoord.y = inCoord.y;
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage2_c0_c0.x, uclamp_Stage2_c0_c0.z);
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage2_c0_c0.y, uclamp_Stage2_c0_c0.w);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ _output = _input * textureColor;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ float coord = vTransformedCoords_1_Stage0.x - 0.5;
+ float f = fract(coord);
+ coord += 0.5 - f;
+ float f2 = f * f;
+ vec4 w = mat4(0.055555555555555552, 0.88888888888888884, 0.055555555555555552, 0.0, -0.5, 0.0, 0.5, 0.0, 0.83333333333333337, -2.0, 1.5, -0.33333333333333331, -0.3888888888888889, 1.1666666666666667, -1.1666666666666667, 0.3888888888888889) * vec4(1.0, f, f2, f2 * f);
+ vec4 c[4];
+ c[0] = TextureEffect_Stage2_c0_c0(vec4(1.0), vec2(coord + -1.0, vTransformedCoords_1_Stage0.y));
+ c[1] = TextureEffect_Stage2_c0_c0(vec4(1.0), vec2(coord, vTransformedCoords_1_Stage0.y));
+ c[2] = TextureEffect_Stage2_c0_c0(vec4(1.0), vec2(coord + 1.0, vTransformedCoords_1_Stage0.y));
+ c[3] = TextureEffect_Stage2_c0_c0(vec4(1.0), vec2(coord + 2.0, vTransformedCoords_1_Stage0.y));
+ vec4 bicubicColor = ((c[0] * w.x + c[1] * w.y) + c[2] * w.z) + c[3] * w.w;
+ bicubicColor.xyz = max(vec3(0.0), min(bicubicColor.xyz, bicubicColor.www));
+ output_Stage2 = bicubicColor * output_Stage1;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/100-3.shader_test b/shaders/skia/100-3.shader_test
new file mode 100644
index 0000000..fc8d585
--- /dev/null
+++ b/shaders/skia/100-3.shader_test
@@ -0,0 +1,132 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.w) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ } else {
+ {
+ if (t < uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = OverrideInputFragmentProcessor_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 blend_dst_over(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src + dst;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_dst_over(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 inColor;
+in vec2 inLocalCoord;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/100-5.shader_test b/shaders/skia/100-5.shader_test
new file mode 100644
index 0000000..c8fd3bc
--- /dev/null
+++ b/shaders/skia/100-5.shader_test
@@ -0,0 +1,56 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec3 uedges_Stage1[4];
+noperspective in vec4 vcolor_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ float alpha = 1.0;
+ float edge;
+ edge = dot(uedges_Stage1[0], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage1[1], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage1[2], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage1[3], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ output_Stage1 = vec4(alpha);
+ }
+ {
+ sk_FragColor = outputColor_Stage0 * output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform vec4 uColor_Stage0;
+in vec2 inPosition;
+in float inCoverage;
+noperspective out vec4 vcolor_Stage0;
+void main() {
+ vec4 color = uColor_Stage0;
+ color = color * inCoverage;
+ vcolor_Stage0 = color;
+ vec2 pos2 = inPosition;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/100-6.shader_test b/shaders/skia/100-6.shader_test
new file mode 100644
index 0000000..6136c1b
--- /dev/null
+++ b/shaders/skia/100-6.shader_test
@@ -0,0 +1,48 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uinnerRect_Stage1;
+uniform vec4 uinvRadiiLTRB_Stage1;
+flat in vec4 vcolor_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec2 dxy0 = uinnerRect_Stage1.xy - gl_FragCoord.xy;
+ vec2 dxy1 = gl_FragCoord.xy - uinnerRect_Stage1.zw;
+ vec2 dxy = max(max(dxy0, dxy1), 0.0);
+ vec2 Z = max(max(dxy0 * uinvRadiiLTRB_Stage1.xy, dxy1 * uinvRadiiLTRB_Stage1.zw), 0.0);
+ float implicit = dot(Z, dxy) - 1.0;
+ float grad_dot = 4.0 * dot(Z, Z);
+ grad_dot = max(grad_dot, 9.9999997473787516e-05);
+ float approx_dist = implicit * inversesqrt(grad_dot);
+ float alpha = clamp(0.5 + approx_dist, 0.0, 1.0);
+ output_Stage1 = vec4(alpha);
+ }
+ {
+ sk_FragColor = outputColor_Stage0 * output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 position;
+in vec4 color;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/100-7.shader_test b/shaders/skia/100-7.shader_test
new file mode 100644
index 0000000..fb3683a
--- /dev/null
+++ b/shaders/skia/100-7.shader_test
@@ -0,0 +1,82 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage2_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c1_c0;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_dst_in(ConstColorProcessor_Stage2_c1_c0(vec4(1.0)), output_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/100-8.shader_test b/shaders/skia/100-8.shader_test
new file mode 100644
index 0000000..0f951e8
--- /dev/null
+++ b/shaders/skia/100-8.shader_test
@@ -0,0 +1,44 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform float uPixelSize_Stage1;
+uniform vec2 uRange_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = vec4(1.0, 1.0, 1.0, 1.0);
+ vec2 coord = vTransformedCoords_0_Stage0;
+ coord.y -= 16.0 * uPixelSize_Stage1;
+ float highBound = min(uRange_Stage1.y, coord.y + 32.0 * uPixelSize_Stage1);
+ coord.y = max(uRange_Stage1.x, coord.y);
+ for (int i = 0;i < 33; i++) {
+ output_Stage1 = min(output_Stage1, texture(uTextureSampler_0_Stage1, coord));
+ coord.y += uPixelSize_Stage1;
+ coord.y = min(highBound, coord.y);
+ }
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/100-9.shader_test b/shaders/skia/100-9.shader_test
new file mode 100644
index 0000000..3aed470
--- /dev/null
+++ b/shaders/skia/100-9.shader_test
@@ -0,0 +1,140 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform float uSurfaceScale_Stage1;
+uniform vec3 uLightColor_Stage1;
+uniform float uKS_Stage1;
+uniform float uShininess_Stage1;
+uniform vec3 uLightLocation_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 light_Stage1(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ vec3 halfDir = normalize(surfaceToLight + vec3(0.0, 0.0, 1.0));
+ float colorScale = uKS_Stage1 * pow(dot(normal, halfDir), uShininess_Stage1);
+ vec3 color = lightColor * clamp(colorScale, 0.0, 1.0);
+ return vec4(color, max(max(color.x, color.y), color.z));
+}
+float sobel_Stage1(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage1(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage1(float m[9], float surfaceScale) {
+ return pointToNormal_Stage1(sobel_Stage1(m[0], m[2], m[3], m[5], m[6], m[8], 0.25), sobel_Stage1(m[0], m[6], m[1], m[7], m[2], m[8], 0.25), surfaceScale);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ vec2 coord = vTransformedCoords_0_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp0 = textureColor;
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp1 = textureColor;
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp2 = textureColor;
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp3 = textureColor;
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp4 = textureColor;
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp5 = textureColor;
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp6 = textureColor;
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp7 = textureColor;
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp8 = textureColor;
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = normalize(uLightLocation_Stage1 - vec3(gl_FragCoord.xy, uSurfaceScale_Stage1 * m[4]));
+ output_Stage1 = light_Stage1(normal_Stage1(m, uSurfaceScale_Stage1), surfaceToLight, uLightColor_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/100.shader_test b/shaders/skia/100.shader_test
new file mode 100644
index 0000000..5a703d7
--- /dev/null
+++ b/shaders/skia/100.shader_test
@@ -0,0 +1,68 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uborder_Stage1;
+uniform vec4 usubset_Stage1;
+uniform vec4 unorm_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 TextureEffect_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage2, vTransformedCoords_1_Stage0) * _input;
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ vec2 inCoord = vTransformedCoords_0_Stage0;
+ inCoord *= unorm_Stage1.xy;
+ vec2 subsetCoord;
+ subsetCoord.x = inCoord.x;
+ subsetCoord.y = inCoord.y;
+ vec2 clampedCoord;
+ clampedCoord.x = subsetCoord.x;
+ clampedCoord.y = subsetCoord.y;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord * unorm_Stage1.zw);
+ if (inCoord.x < usubset_Stage1.x || inCoord.x > usubset_Stage1.z) {
+ textureColor = uborder_Stage1;
+ }
+ if (inCoord.y < usubset_Stage1.y || inCoord.y > usubset_Stage1.w) {
+ textureColor = uborder_Stage1;
+ }
+ output_Stage1 = textureColor;
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_src_in(output_Stage1, TextureEffect_Stage2_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1000-1.shader_test b/shaders/skia/1000-1.shader_test
new file mode 100644
index 0000000..4d61503
--- /dev/null
+++ b/shaders/skia/1000-1.shader_test
@@ -0,0 +1,87 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 ufocalParams_Stage2_c0_c0_c0_c0;
+uniform vec4 ustart_Stage2_c0_c0_c1_c0;
+uniform vec4 uend_Stage2_c0_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage2_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_1_Stage0;
+ float t = -1.0;
+ {
+ {
+ float r0 = ufocalParams_Stage2_c0_c0_c0_c0.x;
+ {
+ t = -length(p) - r0;
+ }
+ }
+ }
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage2_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage2_c0_c0_c1_c0 + t * uend_Stage2_c0_c0_c1_c0;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage2_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else {
+ {
+ t.x = fract(t.x);
+ }
+ _output = SingleIntervalGradientColorizer_Stage2_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_dst_in(output_Stage1, TiledGradientEffect_Stage2_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1003-1.shader_test b/shaders/skia/1003-1.shader_test
new file mode 100644
index 0000000..586e5d7
--- /dev/null
+++ b/shaders/skia/1003-1.shader_test
@@ -0,0 +1,113 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage2_c0_c0;
+uniform vec4 urightBorderColor_Stage2_c0_c0;
+uniform vec2 ufocalParams_Stage2_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage2_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage2_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage2_c0_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage2_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_1_Stage0;
+ float t = -1.0;
+ {
+ {
+ float r0 = ufocalParams_Stage2_c0_c0_c0_c0.x;
+ {
+ t = -length(p) - r0;
+ }
+ }
+ }
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage2_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage2_c0_c0_c1_c0;
+ bias = ubias0_1_Stage2_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage2_c0_c0_c1_c0;
+ bias = ubias2_3_Stage2_c0_c0_c1_c0;
+ }
+ } else {
+ {
+ scale = uscale4_5_Stage2_c0_c0_c1_c0;
+ bias = ubias4_5_Stage2_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage2_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage2_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage2_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage2_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_dst_in(output_Stage1, ClampedGradientEffect_Stage2_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1003.shader_test b/shaders/skia/1003.shader_test
new file mode 100644
index 0000000..c119e5c
--- /dev/null
+++ b/shaders/skia/1003.shader_test
@@ -0,0 +1,284 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_KHR_blend_equation_advanced : require
+out vec4 sk_FragColor;
+layout (blend_support_all_equations) out ;
+uniform vec2 uImageIncrement_Stage1_c0_c0_c1_c0;
+uniform float uSurfaceScale_Stage1_c0_c0_c1_c0;
+uniform vec3 uLightColor_Stage1_c0_c0_c1_c0;
+uniform float uKS_Stage1_c0_c0_c1_c0;
+uniform float uShininess_Stage1_c0_c0_c1_c0;
+uniform vec4 uTexDom_Stage1_c0_c0_c1_c0;
+uniform vec3 uDecalParams_Stage1_c0_c0_c1_c0;
+uniform vec3 uLightLocation_Stage1_c0_c0_c1_c0;
+uniform mat4 um_Stage1_c1_c0;
+uniform vec4 uv_Stage1_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vEllipseOffsets_Stage0;
+noperspective in vec4 vEllipseRadii_Stage0;
+noperspective in vec4 vinColor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 Dither_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = _input;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_0_Stage0.x);
+ uint y = uint(vTransformedCoords_0_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ _output = vec4(clamp(_output.xyz + value * 0.066666670143604279, 0.0, _output.w), _output.w);
+ return _output;
+}
+vec4 light_Stage1_c0_c0_c1_c0(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ vec3 halfDir = normalize(surfaceToLight + vec3(0.0, 0.0, 1.0));
+ float colorScale = uKS_Stage1_c0_c0_c1_c0 * pow(dot(normal, halfDir), uShininess_Stage1_c0_c0_c1_c0);
+ vec3 color = lightColor * clamp(colorScale, 0.0, 1.0);
+ return vec4(color, max(max(color.x, color.y), color.z));
+}
+float sobel_Stage1_c0_c0_c1_c0(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage1_c0_c0_c1_c0(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage1_c0_c0_c1_c0(float m[9], float surfaceScale) {
+ return pointToNormal_Stage1_c0_c0_c1_c0(sobel_Stage1_c0_c0_c1_c0(0.0, 0.0, m[3], m[5], m[6], m[8], 0.33333298563957214), sobel_Stage1_c0_c0_c1_c0(0.0, 0.0, m[4], m[7], m[5], m[8], 0.5), surfaceScale);
+}
+vec4 SpecularLighting_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coord = vTransformedCoords_1_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage1_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c1_c0.xy, uTexDom_Stage1_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp0 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c1_c0.xy, uTexDom_Stage1_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c1_c0.xy, uTexDom_Stage1_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage1_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c1_c0.xy, uTexDom_Stage1_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c1_c0.xy, uTexDom_Stage1_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c1_c0.xy, uTexDom_Stage1_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp5 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage1_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c1_c0.xy, uTexDom_Stage1_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp6 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage1_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c1_c0.xy, uTexDom_Stage1_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp7 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage1_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c1_c0.xy, uTexDom_Stage1_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp8 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = normalize(uLightLocation_Stage1_c0_c0_c1_c0 - vec3(gl_FragCoord.xy, uSurfaceScale_Stage1_c0_c0_c1_c0 * m[4]));
+ _output = light_Stage1_c0_c0_c1_c0(normal_Stage1_c0_c0_c1_c0(m, uSurfaceScale_Stage1_c0_c0_c1_c0), surfaceToLight, uLightColor_Stage1_c0_c0_c1_c0);
+ _output *= _input;
+ return _output;
+}
+vec4 blend_dst_over(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src + dst;
+}
+vec4 ComposeTwo_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_dst_over(Dither_Stage1_c0_c0_c0_c0(inputColor), SpecularLighting_Stage1_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 ColorMatrixFragmentProcessor_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = _input;
+ {
+ float nonZeroAlpha = max(inputColor.w, 9.9999997473787516e-05);
+ inputColor = vec4(inputColor.xyz / nonZeroAlpha, inputColor.w);
+ }
+ _output = um_Stage1_c1_c0 * inputColor + uv_Stage1_c1_c0;
+ {
+ _output.w = clamp(_output.w, 0.0, 1.0);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_multiply(vec4 src, vec4 dst) {
+ return vec4(((1.0 - src.w) * dst.xyz + (1.0 - dst.w) * src.xyz) + src.xyz * dst.xyz, src.w + (1.0 - src.w) * dst.w);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vinColor_Stage0;
+ vec2 offset = vEllipseOffsets_Stage0;
+ offset *= vEllipseRadii_Stage0.xy;
+ float test = dot(offset, offset) - 1.0;
+ vec2 grad = (2.0 * offset) * vEllipseRadii_Stage0.xy;
+ float grad_dot = dot(grad, grad);
+ grad_dot = max(grad_dot, 1.1754999560161448e-38);
+ float invlen = inversesqrt(grad_dot);
+ float edgeAlpha = clamp(0.5 - test * invlen, 0.0, 1.0);
+ offset = vEllipseOffsets_Stage0 * vEllipseRadii_Stage0.zw;
+ test = dot(offset, offset) - 1.0;
+ grad = (2.0 * offset) * vEllipseRadii_Stage0.zw;
+ grad_dot = dot(grad, grad);
+ invlen = inversesqrt(grad_dot);
+ edgeAlpha *= clamp(0.5 + test * invlen, 0.0, 1.0);
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_multiply(ComposeTwo_Stage1_c0_c0(inputColor), ColorMatrixFragmentProcessor_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ sk_FragColor = outputCoverage_Stage0 * output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec2 inEllipseOffset;
+in vec4 inEllipseRadii;
+noperspective out vec2 vEllipseOffsets_Stage0;
+noperspective out vec4 vEllipseRadii_Stage0;
+noperspective out vec4 vinColor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vEllipseOffsets_Stage0 = inEllipseOffset;
+ vEllipseRadii_Stage0 = inEllipseRadii;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1006-1.shader_test b/shaders/skia/1006-1.shader_test
new file mode 100644
index 0000000..509ee37
--- /dev/null
+++ b/shaders/skia/1006-1.shader_test
@@ -0,0 +1,127 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage2_c0_c0;
+uniform vec4 urightBorderColor_Stage2_c0_c0;
+uniform vec2 ufocalParams_Stage2_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale8_9_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias8_9_Stage2_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage2_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage2_c0_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage2_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_1_Stage0;
+ float t = -1.0;
+ {
+ {
+ float r0 = ufocalParams_Stage2_c0_c0_c0_c0.x;
+ {
+ t = -length(p) - r0;
+ }
+ }
+ }
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage2_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.w) {
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage2_c0_c0_c1_c0;
+ bias = ubias0_1_Stage2_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage2_c0_c0_c1_c0;
+ bias = ubias2_3_Stage2_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage2_c0_c0_c1_c0;
+ bias = ubias4_5_Stage2_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage2_c0_c0_c1_c0;
+ bias = ubias6_7_Stage2_c0_c0_c1_c0;
+ }
+ }
+ } else {
+ {
+ {
+ scale = uscale8_9_Stage2_c0_c0_c1_c0;
+ bias = ubias8_9_Stage2_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage2_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage2_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage2_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage2_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_dst_in(output_Stage1, ClampedGradientEffect_Stage2_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1006.shader_test b/shaders/skia/1006.shader_test
new file mode 100644
index 0000000..283e71d
--- /dev/null
+++ b/shaders/skia/1006.shader_test
@@ -0,0 +1,57 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+uniform vec4 ucircleData_Stage1;
+uniform vec4 urectUniform_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec4 vinCircleEdge_Stage0;
+noperspective in vec3 vinClipPlane_Stage0;
+noperspective in vec4 vinColor_Stage0;
+void main() {
+ {
+ vec4 circleEdge;
+ circleEdge = vinCircleEdge_Stage0;
+ vec3 clipPlane;
+ clipPlane = vinClipPlane_Stage0;
+ float d = length(circleEdge.xy);
+ float distanceToOuterEdge = circleEdge.z * (1.0 - d);
+ float edgeAlpha = clamp(distanceToOuterEdge, 0.0, 1.0);
+ float clip = clamp(circleEdge.z * dot(circleEdge.xy, clipPlane.xy) + clipPlane.z, 0.0, 1.0);
+ edgeAlpha *= clip;
+ }
+ {
+ {
+ float xSub, ySub;
+ xSub = min(gl_FragCoord.x - urectUniform_Stage2.x, 0.0);
+ xSub += min(urectUniform_Stage2.z - gl_FragCoord.x, 0.0);
+ ySub = min(gl_FragCoord.y - urectUniform_Stage2.y, 0.0);
+ ySub += min(urectUniform_Stage2.w - gl_FragCoord.y, 0.0);
+ }
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 inPosition;
+in vec4 inColor;
+in vec4 inCircleEdge;
+in vec3 inClipPlane;
+noperspective out vec4 vinCircleEdge_Stage0;
+noperspective out vec3 vinClipPlane_Stage0;
+noperspective out vec4 vinColor_Stage0;
+void main() {
+ vinCircleEdge_Stage0 = inCircleEdge;
+ vinClipPlane_Stage0 = inClipPlane;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = inPosition;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1009-1.shader_test b/shaders/skia/1009-1.shader_test
new file mode 100644
index 0000000..863d49d
--- /dev/null
+++ b/shaders/skia/1009-1.shader_test
@@ -0,0 +1,90 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage2_c0_c0;
+uniform vec4 urightBorderColor_Stage2_c0_c0;
+uniform vec2 ufocalParams_Stage2_c0_c0_c0_c0;
+uniform vec4 ustart_Stage2_c0_c0_c1_c0;
+uniform vec4 uend_Stage2_c0_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage2_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_1_Stage0;
+ float t = -1.0;
+ {
+ {
+ float r0 = ufocalParams_Stage2_c0_c0_c0_c0.x;
+ {
+ t = length(p) - r0;
+ }
+ }
+ }
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage2_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage2_c0_c0_c1_c0 + t * uend_Stage2_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage2_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage2_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage2_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage2_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_dst_in(output_Stage1, ClampedGradientEffect_Stage2_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1009.shader_test b/shaders/skia/1009.shader_test
new file mode 100644
index 0000000..95127c5
--- /dev/null
+++ b/shaders/skia/1009.shader_test
@@ -0,0 +1,375 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uColor_Stage0;
+uniform vec4 urectH_Stage1_c0_c0_c0_c0_c0_c0;
+uniform float uinvSixSigma_Stage1_c0_c0_c0_c0_c0_c0;
+uniform vec2 uImageIncrement_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec2 uBounds_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 uKernel_Stage1_c0_c0_c0_c0_c1_c0[6];
+uniform float uPixelSize_Stage1_c0_c0_c1_c0;
+uniform vec2 uRange_Stage1_c0_c0_c1_c0;
+uniform vec4 ucircleData_Stage1_c1_c0_c0_c0;
+uniform vec2 ubaseFrequency_Stage1_c1_c0_c1_c0_c0_c0;
+uniform float uz_Stage1_c1_c0_c1_c0_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+uniform sampler2D uTextureSampler_2_Stage1;
+uniform sampler2D uTextureSampler_3_Stage1;
+uniform sampler2D uTextureSampler_4_Stage1;
+uniform sampler2D uTextureSampler_5_Stage1;
+uniform sampler2D uTextureSampler_6_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+noperspective in vec2 vTransformedCoords_3_Stage0;
+vec4 RectBlurEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float xCoverage, yCoverage;
+ {
+ float x, y;
+ {
+ x = max(urectH_Stage1_c0_c0_c0_c0_c0_c0.x - gl_FragCoord.x, gl_FragCoord.x - urectH_Stage1_c0_c0_c0_c0_c0_c0.z);
+ y = max(urectH_Stage1_c0_c0_c0_c0_c0_c0.y - gl_FragCoord.y, gl_FragCoord.y - urectH_Stage1_c0_c0_c0_c0_c0_c0.w);
+ }
+ xCoverage = texture(uTextureSampler_0_Stage1, vec2(x * uinvSixSigma_Stage1_c0_c0_c0_c0_c0_c0, 0.5)).w;
+ yCoverage = texture(uTextureSampler_0_Stage1, vec2(y * uinvSixSigma_Stage1_c0_c0_c0_c0_c0_c0, 0.5)).w;
+ _output = (_input * xCoverage) * yCoverage;
+ }
+ _output = (_input * xCoverage) * yCoverage;
+ return _output;
+}
+vec4 GaussianConvolution_Stage1_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0 - 11.0 * uImageIncrement_Stage1_c0_c0_c0_c0_c1_c0;
+ vec2 coordSampled = vec2(0.0, 0.0);
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1_c0_c0_c0_c0_c1_c0.x, uBounds_Stage1_c0_c0_c0_c0_c1_c0.y);
+ _output += texture(uTextureSampler_1_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c0_c0_c1_c0[0].x;
+ coord += uImageIncrement_Stage1_c0_c0_c0_c0_c1_c0;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1_c0_c0_c0_c0_c1_c0.x, uBounds_Stage1_c0_c0_c0_c0_c1_c0.y);
+ _output += texture(uTextureSampler_1_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c0_c0_c1_c0[0].y;
+ coord += uImageIncrement_Stage1_c0_c0_c0_c0_c1_c0;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1_c0_c0_c0_c0_c1_c0.x, uBounds_Stage1_c0_c0_c0_c0_c1_c0.y);
+ _output += texture(uTextureSampler_1_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c0_c0_c1_c0[0].z;
+ coord += uImageIncrement_Stage1_c0_c0_c0_c0_c1_c0;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1_c0_c0_c0_c0_c1_c0.x, uBounds_Stage1_c0_c0_c0_c0_c1_c0.y);
+ _output += texture(uTextureSampler_1_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c0_c0_c1_c0[0].w;
+ coord += uImageIncrement_Stage1_c0_c0_c0_c0_c1_c0;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1_c0_c0_c0_c0_c1_c0.x, uBounds_Stage1_c0_c0_c0_c0_c1_c0.y);
+ _output += texture(uTextureSampler_1_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c0_c0_c1_c0[1].x;
+ coord += uImageIncrement_Stage1_c0_c0_c0_c0_c1_c0;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1_c0_c0_c0_c0_c1_c0.x, uBounds_Stage1_c0_c0_c0_c0_c1_c0.y);
+ _output += texture(uTextureSampler_1_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c0_c0_c1_c0[1].y;
+ coord += uImageIncrement_Stage1_c0_c0_c0_c0_c1_c0;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1_c0_c0_c0_c0_c1_c0.x, uBounds_Stage1_c0_c0_c0_c0_c1_c0.y);
+ _output += texture(uTextureSampler_1_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c0_c0_c1_c0[1].z;
+ coord += uImageIncrement_Stage1_c0_c0_c0_c0_c1_c0;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1_c0_c0_c0_c0_c1_c0.x, uBounds_Stage1_c0_c0_c0_c0_c1_c0.y);
+ _output += texture(uTextureSampler_1_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c0_c0_c1_c0[1].w;
+ coord += uImageIncrement_Stage1_c0_c0_c0_c0_c1_c0;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1_c0_c0_c0_c0_c1_c0.x, uBounds_Stage1_c0_c0_c0_c0_c1_c0.y);
+ _output += texture(uTextureSampler_1_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c0_c0_c1_c0[2].x;
+ coord += uImageIncrement_Stage1_c0_c0_c0_c0_c1_c0;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1_c0_c0_c0_c0_c1_c0.x, uBounds_Stage1_c0_c0_c0_c0_c1_c0.y);
+ _output += texture(uTextureSampler_1_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c0_c0_c1_c0[2].y;
+ coord += uImageIncrement_Stage1_c0_c0_c0_c0_c1_c0;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1_c0_c0_c0_c0_c1_c0.x, uBounds_Stage1_c0_c0_c0_c0_c1_c0.y);
+ _output += texture(uTextureSampler_1_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c0_c0_c1_c0[2].z;
+ coord += uImageIncrement_Stage1_c0_c0_c0_c0_c1_c0;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1_c0_c0_c0_c0_c1_c0.x, uBounds_Stage1_c0_c0_c0_c0_c1_c0.y);
+ _output += texture(uTextureSampler_1_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c0_c0_c1_c0[2].w;
+ coord += uImageIncrement_Stage1_c0_c0_c0_c0_c1_c0;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1_c0_c0_c0_c0_c1_c0.x, uBounds_Stage1_c0_c0_c0_c0_c1_c0.y);
+ _output += texture(uTextureSampler_1_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c0_c0_c1_c0[3].x;
+ coord += uImageIncrement_Stage1_c0_c0_c0_c0_c1_c0;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1_c0_c0_c0_c0_c1_c0.x, uBounds_Stage1_c0_c0_c0_c0_c1_c0.y);
+ _output += texture(uTextureSampler_1_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c0_c0_c1_c0[3].y;
+ coord += uImageIncrement_Stage1_c0_c0_c0_c0_c1_c0;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1_c0_c0_c0_c0_c1_c0.x, uBounds_Stage1_c0_c0_c0_c0_c1_c0.y);
+ _output += texture(uTextureSampler_1_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c0_c0_c1_c0[3].z;
+ coord += uImageIncrement_Stage1_c0_c0_c0_c0_c1_c0;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1_c0_c0_c0_c0_c1_c0.x, uBounds_Stage1_c0_c0_c0_c0_c1_c0.y);
+ _output += texture(uTextureSampler_1_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c0_c0_c1_c0[3].w;
+ coord += uImageIncrement_Stage1_c0_c0_c0_c0_c1_c0;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1_c0_c0_c0_c0_c1_c0.x, uBounds_Stage1_c0_c0_c0_c0_c1_c0.y);
+ _output += texture(uTextureSampler_1_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c0_c0_c1_c0[4].x;
+ coord += uImageIncrement_Stage1_c0_c0_c0_c0_c1_c0;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1_c0_c0_c0_c0_c1_c0.x, uBounds_Stage1_c0_c0_c0_c0_c1_c0.y);
+ _output += texture(uTextureSampler_1_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c0_c0_c1_c0[4].y;
+ coord += uImageIncrement_Stage1_c0_c0_c0_c0_c1_c0;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1_c0_c0_c0_c0_c1_c0.x, uBounds_Stage1_c0_c0_c0_c0_c1_c0.y);
+ _output += texture(uTextureSampler_1_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c0_c0_c1_c0[4].z;
+ coord += uImageIncrement_Stage1_c0_c0_c0_c0_c1_c0;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1_c0_c0_c0_c0_c1_c0.x, uBounds_Stage1_c0_c0_c0_c0_c1_c0.y);
+ _output += texture(uTextureSampler_1_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c0_c0_c1_c0[4].w;
+ coord += uImageIncrement_Stage1_c0_c0_c0_c0_c1_c0;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1_c0_c0_c0_c0_c1_c0.x, uBounds_Stage1_c0_c0_c0_c0_c1_c0.y);
+ _output += texture(uTextureSampler_1_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c0_c0_c1_c0[5].x;
+ coord += uImageIncrement_Stage1_c0_c0_c0_c0_c1_c0;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1_c0_c0_c0_c0_c1_c0.x, uBounds_Stage1_c0_c0_c0_c0_c1_c0.y);
+ _output += texture(uTextureSampler_1_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c0_c0_c1_c0[5].y;
+ coord += uImageIncrement_Stage1_c0_c0_c0_c0_c1_c0;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1_c0_c0_c0_c0_c1_c0.x, uBounds_Stage1_c0_c0_c0_c0_c1_c0.y);
+ _output += texture(uTextureSampler_1_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c0_c0_c1_c0[5].z;
+ coord += uImageIncrement_Stage1_c0_c0_c0_c0_c1_c0;
+ _output *= _input;
+ return _output;
+}
+vec4 blend_plus(vec4 src, vec4 dst) {
+ return min(src + dst, 1.0);
+}
+vec4 ComposeTwo_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_plus(RectBlurEffect_Stage1_c0_c0_c0_c0_c0_c0(inputColor), GaussianConvolution_Stage1_c0_c0_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 Morphology_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_1_Stage0;
+ coord.x -= 10.0 * uPixelSize_Stage1_c0_c0_c1_c0;
+ for (int i = 0;i < 21; i++) {
+ _output = max(_output, texture(uTextureSampler_2_Stage1, coord));
+ coord.x += uPixelSize_Stage1_c0_c0_c1_c0;
+ }
+ _output *= _input;
+ return _output;
+}
+float _guarded_divide(float n, float d) {
+ return n / d;
+}
+float _color_dodge_component(float sc, float sa, float dc, float da) {
+ if (dc == 0.0) {
+ return sc * (1.0 - da);
+ } else {
+ float d = sa - sc;
+ if (d == 0.0) {
+ return (sa * da + sc * (1.0 - da)) + dc * (1.0 - sa);
+ }
+ d = min(da, _guarded_divide(dc * sa, d));
+ return (d * sa + sc * (1.0 - da)) + dc * (1.0 - sa);
+ }
+}
+vec4 blend_color_dodge(vec4 src, vec4 dst) {
+ return vec4(_color_dodge_component(src.x, src.w, dst.x, dst.w), _color_dodge_component(src.y, src.w, dst.y, dst.w), _color_dodge_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+}
+vec4 ComposeTwo_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_color_dodge(ComposeTwo_Stage1_c0_c0_c0_c0(inputColor), Morphology_Stage1_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 CircleBlurFragmentProcessor_Stage1_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 vec = vec2((gl_FragCoord.x - ucircleData_Stage1_c1_c0_c0_c0.x) * ucircleData_Stage1_c1_c0_c0_c0.w, (gl_FragCoord.y - ucircleData_Stage1_c1_c0_c0_c0.y) * ucircleData_Stage1_c1_c0_c0_c0.w);
+ float dist = length(vec) + (0.5 - ucircleData_Stage1_c1_c0_c0_c0.z) * ucircleData_Stage1_c1_c0_c0_c0.w;
+ _output = _input * texture(uTextureSampler_3_Stage1, vec2(dist, 0.5)).w;
+ return _output;
+}
+vec3 fade_Stage1_c1_c0_c1_c0_c0_c0(vec3 t) {
+ return ((t * t) * t) * (t * (t * 6.0 - 15.0) + 10.0);
+}
+float perm_Stage1_c1_c0_c1_c0_c0_c0(float x) {
+ return texture(uTextureSampler_4_Stage1, vec2(fract(x / 256.0), 0.0)).x * 255.0;
+}
+float grad_Stage1_c1_c0_c1_c0_c0_c0(float x, vec3 p) {
+ return dot(texture(uTextureSampler_5_Stage1, vec2(fract(x / 16.0), 0.0)).xyz * 255.0 - vec3(1.0), p);
+}
+float lerp_Stage1_c1_c0_c1_c0_c0_c0(float a, float b, float w) {
+ return a + w * (b - a);
+}
+float noise_Stage1_c1_c0_c1_c0_c0_c0(vec3 p) {
+ vec3 P = mod(floor(p), 256.0);
+ p -= floor(p);
+ vec3 f = fade_Stage1_c1_c0_c1_c0_c0_c0(p);
+ float A = perm_Stage1_c1_c0_c1_c0_c0_c0(P.x) + P.y;
+ float AA = perm_Stage1_c1_c0_c1_c0_c0_c0(A) + P.z;
+ float AB = perm_Stage1_c1_c0_c1_c0_c0_c0(A + 1.0) + P.z;
+ float B = perm_Stage1_c1_c0_c1_c0_c0_c0(P.x + 1.0) + P.y;
+ float BA = perm_Stage1_c1_c0_c1_c0_c0_c0(B) + P.z;
+ float BB = perm_Stage1_c1_c0_c1_c0_c0_c0(B + 1.0) + P.z;
+ float result = lerp_Stage1_c1_c0_c1_c0_c0_c0(lerp_Stage1_c1_c0_c1_c0_c0_c0(lerp_Stage1_c1_c0_c1_c0_c0_c0(grad_Stage1_c1_c0_c1_c0_c0_c0(perm_Stage1_c1_c0_c1_c0_c0_c0(AA), p), grad_Stage1_c1_c0_c1_c0_c0_c0(perm_Stage1_c1_c0_c1_c0_c0_c0(BA), p + vec3(-1.0, 0.0, 0.0)), f.x), lerp_Stage1_c1_c0_c1_c0_c0_c0(grad_Stage1_c1_c0_c1_c0_c0_c0(perm_Stage1_c1_c0_c1_c0_c0_c0(AB), p + vec3(0.0, -1.0, 0.0)), grad_Stage1_c1_c0_c1_c0_c0_c0(perm_Stage1_c1_c0_c1_c0_c0_c0(BB), p + vec3(-1.0, -1.0, 0.0)), f.x), f.y), lerp_Stage1_c1_c0_c1_c0_c0_c0(lerp_Stage1_c1_c0_c1_c0_c0_c0(grad_Stage1_c1_c0_c1_c0_c0_c0(perm_Stage1_c1_c0_c1_c0_c0_c0(AA + 1.0), p + vec3(0.0, 0.0, -1.0)), grad_Stage1_c1_c0_c1_c0_c0_c0(perm_Stage1_c1_c0_c1_c0_c0_c0(BA + 1.0), p + vec3(-1.0, 0.0, -1.0)), f.x), lerp_Stage1_c1_c0_c1_c0_c0_c0(grad_Stage1_c1_c0_c1_c0_c0_c0(perm_Stage1_c1_c0_c1_c0_c0_c0(AB + 1.0), p + vec3(0.0, -1.0, -1.0)), grad_Stage1_c1_c0_c1_c0_c0_c0(perm_Stage1_c1_c0_c1_c0_c0_c0(BB + 1.0), p + vec3(-1.0, -1.0, -1.0)), f.x), f.y), f.z);
+ return result;
+}
+float noiseOctaves_Stage1_c1_c0_c1_c0_c0_c0(vec3 p) {
+ float result = 0.0;
+ float ratio = 1.0;
+ for (float i = 0.0;i < 10.0; i++) {
+ result += noise_Stage1_c1_c0_c1_c0_c0_c0(p) / ratio;
+ p *= 2.0;
+ ratio *= 2.0;
+ }
+ return (result + 1.0) / 2.0;
+}
+vec4 ImprovedPerlinNoise_Stage1_c1_c0_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coords = vTransformedCoords_2_Stage0 * ubaseFrequency_Stage1_c1_c0_c1_c0_c0_c0;
+ float r = noiseOctaves_Stage1_c1_c0_c1_c0_c0_c0(vec3(coords, uz_Stage1_c1_c0_c1_c0_c0_c0));
+ float g = noiseOctaves_Stage1_c1_c0_c1_c0_c0_c0(vec3(coords, uz_Stage1_c1_c0_c1_c0_c0_c0));
+ float b = noiseOctaves_Stage1_c1_c0_c1_c0_c0_c0(vec3(coords, uz_Stage1_c1_c0_c1_c0_c0_c0));
+ float a = noiseOctaves_Stage1_c1_c0_c1_c0_c0_c0(vec3(coords, uz_Stage1_c1_c0_c1_c0_c0_c0));
+ _output = vec4(r, g, b, a);
+ _output = clamp(_output, 0.0, 1.0);
+ _output = vec4(_output.xyz * _output.www, _output.w);
+ return _output;
+}
+vec4 TextureEffect_Stage1_c1_c0_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_6_Stage1, vTransformedCoords_3_Stage0) * _input;
+ return _output;
+}
+float _soft_light_component(float sc, float sa, float dc, float da) {
+ if (2.0 * sc <= sa) {
+ return (_guarded_divide((dc * dc) * (sa - 2.0 * sc), da) + (1.0 - da) * sc) + dc * ((-sa + 2.0 * sc) + 1.0);
+ } else if (4.0 * dc <= da) {
+ float DSqd = dc * dc;
+ float DCub = DSqd * dc;
+ float DaSqd = da * da;
+ float DaCub = DaSqd * da;
+ return _guarded_divide(((DaSqd * (sc - dc * ((3.0 * sa - 6.0 * sc) - 1.0)) + ((12.0 * da) * DSqd) * (sa - 2.0 * sc)) - (16.0 * DCub) * (sa - 2.0 * sc)) - DaCub * sc, DaSqd);
+ }
+ return ((dc * ((sa - 2.0 * sc) + 1.0) + sc) - sqrt(da * dc) * (sa - 2.0 * sc)) - da * sc;
+}
+vec4 blend_soft_light(vec4 src, vec4 dst) {
+ if (dst.w == 0.0) {
+ return src;
+ }
+ return vec4(_soft_light_component(src.x, src.w, dst.x, dst.w), _soft_light_component(src.y, src.w, dst.y, dst.w), _soft_light_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+}
+vec4 ComposeTwo_Stage1_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_soft_light(ImprovedPerlinNoise_Stage1_c1_c0_c1_c0_c0_c0(inputColor), TextureEffect_Stage1_c1_c0_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 ComposeTwo_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_color_dodge(CircleBlurFragmentProcessor_Stage1_c1_c0_c0_c0(inputColor), ComposeTwo_Stage1_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+float _blend_color_saturation(vec3 color) {
+ return max(max(color.x, color.y), color.z) - min(min(color.x, color.y), color.z);
+}
+vec3 _blend_set_color_saturation_helper(vec3 minMidMax, float sat) {
+ if (minMidMax.x < minMidMax.z) {
+ return vec3(0.0, (sat * (minMidMax.y - minMidMax.x)) / (minMidMax.z - minMidMax.x), sat);
+ }
+ return vec3(0.0);
+}
+vec3 _blend_set_color_saturation(vec3 hueLumColor, vec3 satColor) {
+ float sat = _blend_color_saturation(satColor);
+ if (hueLumColor.x <= hueLumColor.y) {
+ if (hueLumColor.y <= hueLumColor.z) {
+ hueLumColor.xyz = _blend_set_color_saturation_helper(hueLumColor, sat);
+ } else if (hueLumColor.x <= hueLumColor.z) {
+ hueLumColor.xzy = _blend_set_color_saturation_helper(hueLumColor.xzy, sat);
+ } else {
+ hueLumColor.zxy = _blend_set_color_saturation_helper(hueLumColor.zxy, sat);
+ }
+ } else if (hueLumColor.x <= hueLumColor.z) {
+ hueLumColor.yxz = _blend_set_color_saturation_helper(hueLumColor.yxz, sat);
+ } else if (hueLumColor.y <= hueLumColor.z) {
+ hueLumColor.yzx = _blend_set_color_saturation_helper(hueLumColor.yzx, sat);
+ } else {
+ hueLumColor.zyx = _blend_set_color_saturation_helper(hueLumColor.zyx, sat);
+ }
+ return hueLumColor;
+}
+float _blend_color_luminance(vec3 color) {
+ return dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), color);
+}
+vec3 _blend_set_color_luminance(vec3 hueSatColor, float alpha, vec3 lumColor) {
+ float lum = _blend_color_luminance(lumColor);
+ vec3 result = (lum - _blend_color_luminance(hueSatColor)) + hueSatColor;
+ float minComp = min(min(result.x, result.y), result.z);
+ float maxComp = max(max(result.x, result.y), result.z);
+ if (minComp < 0.0 && lum != minComp) {
+ result = lum + ((result - lum) * lum) / (lum - minComp);
+ }
+ if (maxComp > alpha && maxComp != lum) {
+ return lum + ((result - lum) * (alpha - lum)) / (maxComp - lum);
+ }
+ return result;
+}
+vec4 blend_hue(vec4 src, vec4 dst) {
+ float alpha = dst.w * src.w;
+ vec3 sda = src.xyz * dst.w;
+ vec3 dsa = dst.xyz * src.w;
+ return vec4((((_blend_set_color_luminance(_blend_set_color_saturation(sda, dsa), alpha, dsa) + dst.xyz) - dsa) + src.xyz) - sda, (src.w + dst.w) - alpha);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = uColor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_hue(ComposeTwo_Stage1_c0_c0(inputColor), ComposeTwo_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+uniform mat3 uCoordTransformMatrix_3_Stage0;
+in vec2 position;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+noperspective out vec2 vTransformedCoords_3_Stage0;
+void main() {
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(position, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(position, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(position, 1.0)).xy;
+ vTransformedCoords_3_Stage0 = (uCoordTransformMatrix_3_Stage0 * vec3(position, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1015-1.shader_test b/shaders/skia/1015-1.shader_test
new file mode 100644
index 0000000..5a4ef99
--- /dev/null
+++ b/shaders/skia/1015-1.shader_test
@@ -0,0 +1,89 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 ufocalParams_Stage2_c0_c0_c0_c0;
+uniform vec4 ustart_Stage2_c0_c0_c1_c0;
+uniform vec4 uend_Stage2_c0_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage2_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_1_Stage0;
+ float t = -1.0;
+ {
+ {
+ float r0 = ufocalParams_Stage2_c0_c0_c0_c0.x;
+ {
+ t = length(p) - r0;
+ }
+ }
+ }
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage2_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage2_c0_c0_c1_c0 + t * uend_Stage2_c0_c0_c1_c0;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage2_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = SingleIntervalGradientColorizer_Stage2_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_dst_in(output_Stage1, TiledGradientEffect_Stage2_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1018-1.shader_test b/shaders/skia/1018-1.shader_test
new file mode 100644
index 0000000..01df5f1
--- /dev/null
+++ b/shaders/skia/1018-1.shader_test
@@ -0,0 +1,116 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 ufocalParams_Stage2_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage2_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage2_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage2_c0_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage2_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_1_Stage0;
+ float t = -1.0;
+ float v = 1.0;
+ {
+ {
+ float r0_2 = ufocalParams_Stage2_c0_c0_c0_c0.y;
+ t = r0_2 - p.y * p.y;
+ if (t >= 0.0) {
+ t = p.x + sqrt(t);
+ } else {
+ v = -1.0;
+ }
+ }
+ }
+ _output = vec4(t, v, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage2_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage2_c0_c0_c1_c0;
+ bias = ubias0_1_Stage2_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage2_c0_c0_c1_c0;
+ bias = ubias2_3_Stage2_c0_c0_c1_c0;
+ }
+ } else {
+ {
+ scale = uscale4_5_Stage2_c0_c0_c1_c0;
+ bias = ubias4_5_Stage2_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage2_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage2_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_dst_in(output_Stage1, TiledGradientEffect_Stage2_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1018.shader_test b/shaders/skia/1018.shader_test
new file mode 100644
index 0000000..4bc65d1
--- /dev/null
+++ b/shaders/skia/1018.shader_test
@@ -0,0 +1,79 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_KHR_blend_equation_advanced : require
+out vec4 sk_FragColor;
+layout (blend_support_all_equations) out ;
+uniform vec4 uinnerRect_Stage1_c0_c0;
+uniform vec2 uinvRadiiXY_Stage1_c0_c0;
+uniform vec4 uellipse_Stage1_c1_c0;
+noperspective in vec4 vcolor_Stage0;
+vec4 EllipticalRRect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 dxy0 = uinnerRect_Stage1_c0_c0.xy - gl_FragCoord.xy;
+ vec2 dxy1 = gl_FragCoord.xy - uinnerRect_Stage1_c0_c0.zw;
+ vec2 dxy = max(max(dxy0, dxy1), 0.0);
+ vec2 Z = dxy * uinvRadiiXY_Stage1_c0_c0;
+ float implicit = dot(Z, dxy) - 1.0;
+ float grad_dot = 4.0 * dot(Z, Z);
+ grad_dot = max(grad_dot, 9.9999997473787516e-05);
+ float approx_dist = implicit * inversesqrt(grad_dot);
+ float alpha = clamp(0.5 + approx_dist, 0.0, 1.0);
+ _output = _input * alpha;
+ return _output;
+}
+vec4 EllipseEffect_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 d = gl_FragCoord.xy - uellipse_Stage1_c1_c0.xy;
+ vec2 Z = d * uellipse_Stage1_c1_c0.zw;
+ float implicit = dot(Z, d) - 1.0;
+ float grad_dot = 4.0 * dot(Z, Z);
+ {
+ grad_dot = max(grad_dot, 1.1754999560161448e-38);
+ }
+ float approx_dist = implicit * inversesqrt(grad_dot);
+ float alpha;
+ {
+ alpha = clamp(0.5 - approx_dist, 0.0, 1.0);
+ }
+ _output = _input * alpha;
+ return _output;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_src_over(EllipticalRRect_Stage1_c0_c0(inputColor), EllipseEffect_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+noperspective out vec4 vcolor_Stage0;
+void main() {
+ vec4 color = inColor;
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1021-1.shader_test b/shaders/skia/1021-1.shader_test
new file mode 100644
index 0000000..abe2ac6
--- /dev/null
+++ b/shaders/skia/1021-1.shader_test
@@ -0,0 +1,114 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 ufocalParams_Stage2_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage2_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage2_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage2_c0_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage2_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_1_Stage0;
+ float t = -1.0;
+ float v = 1.0;
+ {
+ {
+ float r0_2 = ufocalParams_Stage2_c0_c0_c0_c0.y;
+ t = r0_2 - p.y * p.y;
+ if (t >= 0.0) {
+ t = p.x + sqrt(t);
+ } else {
+ v = -1.0;
+ }
+ }
+ }
+ _output = vec4(t, v, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage2_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage2_c0_c0_c1_c0;
+ bias = ubias0_1_Stage2_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage2_c0_c0_c1_c0;
+ bias = ubias2_3_Stage2_c0_c0_c1_c0;
+ }
+ } else {
+ {
+ scale = uscale4_5_Stage2_c0_c0_c1_c0;
+ bias = ubias4_5_Stage2_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage2_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else {
+ {
+ t.x = fract(t.x);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage2_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_dst_in(output_Stage1, TiledGradientEffect_Stage2_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1021.shader_test b/shaders/skia/1021.shader_test
new file mode 100644
index 0000000..77f7b06
--- /dev/null
+++ b/shaders/skia/1021.shader_test
@@ -0,0 +1,87 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+noperspective in vec4 vcolor_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = floor(vec4(255.0) + 0.5) / 255.0;
+ {
+ output_Stage1.xyz = floor((output_Stage1.xyz * output_Stage1.w) * 255.0 + 0.5) / 255.0;
+ }
+ }
+ {
+ sk_FragColor = 1.0 - output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform float uSrcTF_Stage0[7];
+uniform mat3 uColorXform_Stage0;
+uniform float uDstTF_Stage0[7];
+uniform mat3 uViewM_Stage0;
+in vec2 position;
+in vec4 inColor;
+noperspective out vec4 vcolor_Stage0;
+float src_tf_Stage0(float x) {
+ float G = uSrcTF_Stage0[0];
+ float A = uSrcTF_Stage0[1];
+ float B = uSrcTF_Stage0[2];
+ float C = uSrcTF_Stage0[3];
+ float D = uSrcTF_Stage0[4];
+ float E = uSrcTF_Stage0[5];
+ float F = uSrcTF_Stage0[6];
+ float s = sign(x);
+ x = abs(x);
+ x = x < D ? C * x + F : pow(A * x + B, G) + E;
+ return s * x;
+}
+float dst_tf_Stage0(float x) {
+ float G = uDstTF_Stage0[0];
+ float A = uDstTF_Stage0[1];
+ float B = uDstTF_Stage0[2];
+ float C = uDstTF_Stage0[3];
+ float D = uDstTF_Stage0[4];
+ float E = uDstTF_Stage0[5];
+ float F = uDstTF_Stage0[6];
+ float s = sign(x);
+ x = abs(x);
+ x = x < D ? C * x + F : pow(A * x + B, G) + E;
+ return s * x;
+}
+vec4 gamut_xform_Stage0(vec4 color) {
+ color.xyz = uColorXform_Stage0 * color.xyz;
+ return color;
+}
+vec4 color_xform_Stage0(vec4 color) {
+ float nonZeroAlpha = max(color.w, 9.9999997473787516e-05);
+ color = vec4(color.xyz / nonZeroAlpha, nonZeroAlpha);
+ color.x = src_tf_Stage0(color.x);
+ color.y = src_tf_Stage0(color.y);
+ color.z = src_tf_Stage0(color.z);
+ color = gamut_xform_Stage0(color);
+ color.x = dst_tf_Stage0(color.x);
+ color.y = dst_tf_Stage0(color.y);
+ color.z = dst_tf_Stage0(color.z);
+ color.xyz *= color.w;
+ return color;
+}
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = color_xform_Stage0(color);
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_PointSize = 1.0;
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1024-1.shader_test b/shaders/skia/1024-1.shader_test
new file mode 100644
index 0000000..54b4c92
--- /dev/null
+++ b/shaders/skia/1024-1.shader_test
@@ -0,0 +1,135 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 ufocalParams_Stage2_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage2_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage2_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage2_c0_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage2_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_1_Stage0;
+ float t = -1.0;
+ float v = 1.0;
+ {
+ {
+ float invR1 = ufocalParams_Stage2_c0_c0_c0_c0.x;
+ float fx = ufocalParams_Stage2_c0_c0_c0_c0.y;
+ float x_t = -1.0;
+ {
+ float temp = p.x * p.x - p.y * p.y;
+ if (temp >= 0.0) {
+ {
+ x_t = -sqrt(temp) - p.x * invR1;
+ }
+ }
+ }
+ {
+ if (x_t <= 0.0) {
+ v = -1.0;
+ }
+ }
+ {
+ {
+ t = -x_t + fx;
+ }
+ }
+ }
+ }
+ _output = vec4(t, v, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage2_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage2_c0_c0_c1_c0;
+ bias = ubias0_1_Stage2_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage2_c0_c0_c1_c0;
+ bias = ubias2_3_Stage2_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage2_c0_c0_c1_c0;
+ bias = ubias4_5_Stage2_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage2_c0_c0_c1_c0;
+ bias = ubias6_7_Stage2_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage2_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage2_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_dst_in(output_Stage1, TiledGradientEffect_Stage2_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1024.shader_test b/shaders/skia/1024.shader_test
new file mode 100644
index 0000000..03d5502
--- /dev/null
+++ b/shaders/skia/1024.shader_test
@@ -0,0 +1,50 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+noperspective in vec2 vEllipseOffsets0_Stage0;
+noperspective in vec2 vEllipseOffsets1_Stage0;
+noperspective in vec4 vinColor_Stage0;
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ vec2 scaledOffset = vEllipseOffsets0_Stage0;
+ float test = dot(scaledOffset, scaledOffset) - 1.0;
+ vec2 duvdx = dFdx(vEllipseOffsets0_Stage0);
+ vec2 duvdy = dFdy(vEllipseOffsets0_Stage0);
+ vec2 grad = vec2(vEllipseOffsets0_Stage0.x * duvdx.x + vEllipseOffsets0_Stage0.y * duvdx.y, vEllipseOffsets0_Stage0.x * duvdy.x + vEllipseOffsets0_Stage0.y * duvdy.y);
+ float grad_dot = 4.0 * dot(grad, grad);
+ grad_dot = max(grad_dot, 1.1754999560161448e-38);
+ float invlen = inversesqrt(grad_dot);
+ float edgeAlpha = clamp(0.5 - test * invlen, 0.0, 1.0);
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ {
+ sk_FragColor = 1.0 - outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec2 inEllipseOffsets0;
+in vec2 inEllipseOffsets1;
+noperspective out vec2 vEllipseOffsets0_Stage0;
+noperspective out vec2 vEllipseOffsets1_Stage0;
+noperspective out vec4 vinColor_Stage0;
+void main() {
+ vEllipseOffsets0_Stage0 = inEllipseOffsets0;
+ vEllipseOffsets1_Stage0 = inEllipseOffsets1;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = (uViewM_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1027-1.shader_test b/shaders/skia/1027-1.shader_test
new file mode 100644
index 0000000..91a4d54
--- /dev/null
+++ b/shaders/skia/1027-1.shader_test
@@ -0,0 +1,99 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage2_c0_c0;
+uniform vec4 urightBorderColor_Stage2_c0_c0;
+uniform vec2 ufocalParams_Stage2_c0_c0_c0_c0;
+uniform vec4 ustart_Stage2_c0_c0_c1_c0;
+uniform vec4 uend_Stage2_c0_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage2_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_1_Stage0;
+ float t = -1.0;
+ {
+ {
+ float invR1 = ufocalParams_Stage2_c0_c0_c0_c0.x;
+ float x_t = -1.0;
+ {
+ x_t = length(p) - p.x * invR1;
+ }
+ {
+ {
+ t = x_t;
+ }
+ }
+ {
+ t = 1.0 - t;
+ }
+ }
+ }
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage2_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage2_c0_c0_c1_c0 + t * uend_Stage2_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage2_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage2_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage2_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage2_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_dst_in(output_Stage1, ClampedGradientEffect_Stage2_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1027.shader_test b/shaders/skia/1027.shader_test
new file mode 100644
index 0000000..922fc82
--- /dev/null
+++ b/shaders/skia/1027.shader_test
@@ -0,0 +1,82 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uColor_Stage0;
+uniform vec4 uCoordTransformMatrix_1_Stage0;
+uniform float uCoverage_Stage0;
+uniform vec4 uclamp_Stage1_c0_c0;
+uniform mat4 um_Stage2;
+uniform vec4 uv_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 TextureEffect_Stage1_c0_c0(vec4 _input, vec2 _coords) {
+ _coords = _coords * uCoordTransformMatrix_1_Stage0.xz + uCoordTransformMatrix_1_Stage0.yw;
+ vec4 _output;
+ vec2 inCoord = _coords;
+ vec2 subsetCoord;
+ subsetCoord.x = inCoord.x;
+ subsetCoord.y = inCoord.y;
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage1_c0_c0.x, uclamp_Stage1_c0_c0.z);
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage1_c0_c0.y, uclamp_Stage1_c0_c0.w);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ _output = _input * textureColor;
+ return _output;
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ outputCoverage_Stage0 = vec4(uCoverage_Stage0);
+ }
+ vec4 output_Stage1;
+ {
+ float coord = vTransformedCoords_0_Stage0.y - 0.5;
+ float f = fract(coord);
+ coord += 0.5 - f;
+ float f2 = f * f;
+ vec4 w = mat4(0.055555555555555552, 0.88888888888888884, 0.055555555555555552, 0.0, -0.5, 0.0, 0.5, 0.0, 0.83333333333333337, -2.0, 1.5, -0.33333333333333331, -0.3888888888888889, 1.1666666666666667, -1.1666666666666667, 0.3888888888888889) * vec4(1.0, f, f2, f2 * f);
+ vec4 c[4];
+ c[0] = TextureEffect_Stage1_c0_c0(vec4(1.0), vec2(vTransformedCoords_0_Stage0.x, coord + -1.0));
+ c[1] = TextureEffect_Stage1_c0_c0(vec4(1.0), vec2(vTransformedCoords_0_Stage0.x, coord));
+ c[2] = TextureEffect_Stage1_c0_c0(vec4(1.0), vec2(vTransformedCoords_0_Stage0.x, coord + 1.0));
+ c[3] = TextureEffect_Stage1_c0_c0(vec4(1.0), vec2(vTransformedCoords_0_Stage0.x, coord + 2.0));
+ vec4 bicubicColor = ((c[0] * w.x + c[1] * w.y) + c[2] * w.z) + c[3] * w.w;
+ bicubicColor.xyz = max(vec3(0.0), min(bicubicColor.xyz, bicubicColor.www));
+ output_Stage1 = bicubicColor * outputCoverage_Stage0;
+ }
+ vec4 output_Stage2;
+ {
+ vec4 inputColor = output_Stage1;
+ {
+ float nonZeroAlpha = max(inputColor.w, 9.9999997473787516e-05);
+ inputColor = vec4(inputColor.xyz / nonZeroAlpha, inputColor.w);
+ }
+ output_Stage2 = um_Stage2 * inputColor + uv_Stage2;
+ {
+ output_Stage2.w = clamp(output_Stage2.w, 0.0, 1.0);
+ }
+ }
+ {
+ sk_FragColor = vec4(0.0);
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec2 pos2 = (uViewM_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/103-15.shader_test b/shaders/skia/103-15.shader_test
new file mode 100644
index 0000000..03e25a0
--- /dev/null
+++ b/shaders/skia/103-15.shader_test
@@ -0,0 +1,322 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_KHR_blend_equation_advanced : require
+out vec4 sk_FragColor;
+layout (blend_support_all_equations) out ;
+uniform vec4 uboundsUniform_Stage1;
+uniform float uxInvZoom_Stage1;
+uniform float uyInvZoom_Stage1;
+uniform float uxInvInset_Stage1;
+uniform float uyInvInset_Stage1;
+uniform vec2 uoffset_Stage1;
+uniform vec4 uleftBorderColor_Stage2_c0_c0;
+uniform vec4 urightBorderColor_Stage2_c0_c0;
+uniform vec2 ufocalParams_Stage2_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage2_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage2_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage2_c0_c0_c1_c0;
+uniform vec4 uleftBorderColor_Stage3_c1_c0;
+uniform vec4 urightBorderColor_Stage3_c1_c0;
+uniform vec2 ufocalParams_Stage3_c1_c0_c0_c0;
+uniform vec4 uscale0_1_Stage3_c1_c0_c1_c0;
+uniform vec4 uscale2_3_Stage3_c1_c0_c1_c0;
+uniform vec4 uscale4_5_Stage3_c1_c0_c1_c0;
+uniform vec4 ubias0_1_Stage3_c1_c0_c1_c0;
+uniform vec4 ubias2_3_Stage3_c1_c0_c1_c0;
+uniform vec4 ubias4_5_Stage3_c1_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage3_c1_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage3_c1_c0_c1_c0;
+uniform vec2 uImageIncrement_Stage4_c2_c0;
+uniform vec4 uKernel_Stage4_c2_c0[2];
+uniform vec4 urectUniform_Stage4_c3_c0;
+uniform vec4 uellipse_Stage5;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage4;
+uniform sampler2D uTextureSampler_0_Stage6;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+noperspective in vec2 vTransformedCoords_3_Stage0;
+noperspective in vec2 vTransformedCoords_4_Stage0;
+noperspective in float vinCoverage_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage2_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_1_Stage0;
+ float t = -1.0;
+ {
+ {
+ float r0 = ufocalParams_Stage2_c0_c0_c0_c0.x;
+ {
+ t = length(p) - r0;
+ }
+ }
+ }
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage2_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage2_c0_c0_c1_c0;
+ bias = ubias0_1_Stage2_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage2_c0_c0_c1_c0;
+ bias = ubias2_3_Stage2_c0_c0_c1_c0;
+ }
+ } else {
+ {
+ scale = uscale4_5_Stage2_c0_c0_c1_c0;
+ bias = ubias4_5_Stage2_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage2_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage2_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage2_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage2_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 TwoPointConicalGradientLayout_Stage3_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_2_Stage0;
+ float t = -1.0;
+ float v = 1.0;
+ {
+ {
+ float invR1 = ufocalParams_Stage3_c1_c0_c0_c0.x;
+ float x_t = -1.0;
+ {
+ float temp = p.x * p.x - p.y * p.y;
+ if (temp >= 0.0) {
+ {
+ x_t = sqrt(temp) - p.x * invR1;
+ }
+ }
+ }
+ {
+ if (x_t <= 0.0) {
+ v = -1.0;
+ }
+ }
+ {
+ {
+ t = x_t;
+ }
+ }
+ }
+ }
+ _output = vec4(t, v, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage3_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage3_c1_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage3_c1_c0_c1_c0.x) {
+ scale = uscale0_1_Stage3_c1_c0_c1_c0;
+ bias = ubias0_1_Stage3_c1_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage3_c1_c0_c1_c0;
+ bias = ubias2_3_Stage3_c1_c0_c1_c0;
+ }
+ } else {
+ {
+ scale = uscale4_5_Stage3_c1_c0_c1_c0;
+ bias = ubias4_5_Stage3_c1_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage3_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage3_c1_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage3_c1_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage3_c1_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage3_c1_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 GaussianConvolution_Stage4_c2_c0(vec4 _input) {
+ vec4 _output;
+ _output = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_3_Stage0 - 2.0 * uImageIncrement_Stage4_c2_c0;
+ vec2 coordSampled = vec2(0.0, 0.0);
+ coordSampled = coord;
+ _output += texture(uTextureSampler_0_Stage4, coordSampled) * uKernel_Stage4_c2_c0[0].x;
+ coord += uImageIncrement_Stage4_c2_c0;
+ coordSampled = coord;
+ _output += texture(uTextureSampler_0_Stage4, coordSampled) * uKernel_Stage4_c2_c0[0].y;
+ coord += uImageIncrement_Stage4_c2_c0;
+ coordSampled = coord;
+ _output += texture(uTextureSampler_0_Stage4, coordSampled) * uKernel_Stage4_c2_c0[0].z;
+ coord += uImageIncrement_Stage4_c2_c0;
+ coordSampled = coord;
+ _output += texture(uTextureSampler_0_Stage4, coordSampled) * uKernel_Stage4_c2_c0[0].w;
+ coord += uImageIncrement_Stage4_c2_c0;
+ coordSampled = coord;
+ _output += texture(uTextureSampler_0_Stage4, coordSampled) * uKernel_Stage4_c2_c0[1].x;
+ coord += uImageIncrement_Stage4_c2_c0;
+ _output *= _input;
+ return _output;
+}
+vec4 AARectEffect_Stage4_c3_c0(vec4 _input) {
+ vec4 _output;
+ float alpha;
+ {
+ float xSub, ySub;
+ xSub = min(gl_FragCoord.x - urectUniform_Stage4_c3_c0.x, 0.0);
+ xSub += min(urectUniform_Stage4_c3_c0.z - gl_FragCoord.x, 0.0);
+ ySub = min(gl_FragCoord.y - urectUniform_Stage4_c3_c0.y, 0.0);
+ ySub += min(urectUniform_Stage4_c3_c0.w - gl_FragCoord.y, 0.0);
+ alpha = (1.0 + max(xSub, -1.0)) * (1.0 + max(ySub, -1.0));
+ }
+ _output = _input * alpha;
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+vec4 blend_dst_atop(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src + src.w * dst;
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ float alpha = 1.0;
+ alpha = vinCoverage_Stage0;
+ outputCoverage_Stage0 = vec4(alpha);
+ }
+ vec4 output_Stage1;
+ {
+ vec2 coord = vTransformedCoords_0_Stage0;
+ vec2 zoom_coord = uoffset_Stage1 + coord * vec2(uxInvZoom_Stage1, uyInvZoom_Stage1);
+ vec2 delta = (coord - uboundsUniform_Stage1.xy) * uboundsUniform_Stage1.zw;
+ delta = min(delta, vec2(1.0, 1.0) - delta);
+ delta *= vec2(uxInvInset_Stage1, uyInvInset_Stage1);
+ float weight = 0.0;
+ if (delta.x < 2.0 && delta.y < 2.0) {
+ delta = vec2(2.0, 2.0) - delta;
+ float dist = length(delta);
+ dist = max(2.0 - dist, 0.0);
+ weight = min(dist * dist, 1.0);
+ } else {
+ vec2 delta_squared = delta * delta;
+ weight = min(min(delta_squared.x, delta_squared.y), 1.0);
+ }
+ output_Stage1 = texture(uTextureSampler_0_Stage1, mix(coord, zoom_coord, weight));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_dst_in(outputCoverage_Stage0, ClampedGradientEffect_Stage2_c0_c0(vec4(1.0)));
+ }
+ vec4 output_Stage3;
+ {
+ output_Stage3 = blend_dst_in(output_Stage2, ClampedGradientEffect_Stage3_c1_c0(vec4(1.0)));
+ }
+ vec4 output_Stage4;
+ {
+ vec4 inputColor = vec4(output_Stage3.xyz, 1.0);
+ output_Stage4 = blend_dst_atop(GaussianConvolution_Stage4_c2_c0(inputColor), AARectEffect_Stage4_c3_c0(inputColor));
+ output_Stage4 *= output_Stage3.w;
+ }
+ vec4 output_Stage5;
+ {
+ vec2 d = gl_FragCoord.xy - uellipse_Stage5.xy;
+ vec2 Z = d * uellipse_Stage5.zw;
+ float implicit = dot(Z, d) - 1.0;
+ float grad_dot = 4.0 * dot(Z, Z);
+ {
+ grad_dot = max(grad_dot, 1.1754999560161448e-38);
+ }
+ float approx_dist = implicit * inversesqrt(grad_dot);
+ float alpha;
+ {
+ alpha = clamp(0.5 - approx_dist, 0.0, 1.0);
+ }
+ output_Stage5 = output_Stage4 * alpha;
+ }
+ vec4 output_Stage6;
+ {
+ output_Stage6 = texture(uTextureSampler_0_Stage6, vTransformedCoords_4_Stage0) * output_Stage5;
+ }
+ {
+ sk_FragColor = output_Stage6 * output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+uniform mat3 uCoordTransformMatrix_3_Stage0;
+uniform mat3 uCoordTransformMatrix_4_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in float inCoverage;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+noperspective out vec2 vTransformedCoords_3_Stage0;
+noperspective out vec2 vTransformedCoords_4_Stage0;
+noperspective out float vinCoverage_Stage0;
+void main() {
+ vec4 color = inColor;
+ vcolor_Stage0 = color;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_3_Stage0 = (uCoordTransformMatrix_3_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_4_Stage0 = (uCoordTransformMatrix_4_Stage0 * vec3(inPosition, 1.0)).xy;
+ vinCoverage_Stage0 = inCoverage;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/103-16.shader_test b/shaders/skia/103-16.shader_test
new file mode 100644
index 0000000..5348793
--- /dev/null
+++ b/shaders/skia/103-16.shader_test
@@ -0,0 +1,51 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform float uPixelSize_Stage2;
+uniform vec2 uRange_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_1_Stage0;
+ coord.x -= 7.0 * uPixelSize_Stage2;
+ for (int i = 0;i < 15; i++) {
+ output_Stage2 = max(output_Stage2, texture(uTextureSampler_0_Stage2, coord));
+ coord.x += uPixelSize_Stage2;
+ }
+ output_Stage2 *= output_Stage1;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/103-17.shader_test b/shaders/skia/103-17.shader_test
new file mode 100644
index 0000000..3974cf2
--- /dev/null
+++ b/shaders/skia/103-17.shader_test
@@ -0,0 +1,74 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uellipse_Stage2_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec3 vTransformedCoords_1_Stage0;
+vec4 EllipseEffect_Stage2_c0_c0(vec4 _input, vec2 _coords) {
+ vec4 _output;
+ vec2 d = gl_FragCoord.xy - uellipse_Stage2_c0_c0.xy;
+ vec2 Z = d * uellipse_Stage2_c0_c0.zw;
+ float implicit = dot(Z, d) - 1.0;
+ float grad_dot = 4.0 * dot(Z, Z);
+ {
+ grad_dot = max(grad_dot, 1.1754999560161448e-38);
+ }
+ float approx_dist = implicit * inversesqrt(grad_dot);
+ float alpha;
+ {
+ alpha = clamp(0.5 + approx_dist, 0.0, 1.0);
+ }
+ _output = _input * alpha;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ vec2 vTransformedCoords_1_Stage0_ensure2D = vTransformedCoords_1_Stage0.xy / vTransformedCoords_1_Stage0.z;
+ float coord = vTransformedCoords_1_Stage0_ensure2D.x - 0.5;
+ float f = fract(coord);
+ coord += 0.5 - f;
+ float f2 = f * f;
+ vec4 w = mat4(0.055555555555555552, 0.88888888888888884, 0.055555555555555552, 0.0, -0.5, 0.0, 0.5, 0.0, 0.83333333333333337, -2.0, 1.5, -0.33333333333333331, -0.3888888888888889, 1.1666666666666667, -1.1666666666666667, 0.3888888888888889) * vec4(1.0, f, f2, f2 * f);
+ vec4 c[4];
+ c[0] = EllipseEffect_Stage2_c0_c0(vec4(1.0), vec2(coord + -1.0, vTransformedCoords_1_Stage0_ensure2D.y));
+ c[1] = EllipseEffect_Stage2_c0_c0(vec4(1.0), vec2(coord, vTransformedCoords_1_Stage0_ensure2D.y));
+ c[2] = EllipseEffect_Stage2_c0_c0(vec4(1.0), vec2(coord + 1.0, vTransformedCoords_1_Stage0_ensure2D.y));
+ c[3] = EllipseEffect_Stage2_c0_c0(vec4(1.0), vec2(coord + 2.0, vTransformedCoords_1_Stage0_ensure2D.y));
+ vec4 bicubicColor = ((c[0] * w.x + c[1] * w.y) + c[2] * w.z) + c[3] * w.w;
+ bicubicColor = clamp(bicubicColor, 0.0, 1.0);
+ output_Stage2 = bicubicColor * output_Stage1;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec3 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0);
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/103-2.shader_test b/shaders/skia/103-2.shader_test
new file mode 100644
index 0000000..b3aa80f
--- /dev/null
+++ b/shaders/skia/103-2.shader_test
@@ -0,0 +1,61 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 ucolor_Stage1_c0_c0_c0_c0;
+noperspective in vec4 vcolor_Stage0;
+vec4 ConstColorProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = _input.w * ucolor_Stage1_c0_c0_c0_c0;
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = ConstColorProcessor_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 blend_dst_over(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src + dst;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_dst_over(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 position;
+in vec4 inColor;
+noperspective out vec4 vcolor_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/103-4.shader_test b/shaders/skia/103-4.shader_test
new file mode 100644
index 0000000..ac6b666
--- /dev/null
+++ b/shaders/skia/103-4.shader_test
@@ -0,0 +1,69 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec3 uedges_Stage1[4];
+noperspective in vec4 vQuadEdge_Stage0;
+noperspective in vec4 vinColor_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vinColor_Stage0;
+ float edgeAlpha;
+ vec2 duvdx = dFdx(vQuadEdge_Stage0.xy);
+ vec2 duvdy = -dFdy(vQuadEdge_Stage0.xy);
+ if (vQuadEdge_Stage0.z > 0.0 && vQuadEdge_Stage0.w > 0.0) {
+ edgeAlpha = min(min(vQuadEdge_Stage0.z, vQuadEdge_Stage0.w) + 0.5, 1.0);
+ } else {
+ vec2 gF = vec2((2.0 * vQuadEdge_Stage0.x) * duvdx.x - duvdx.y, (2.0 * vQuadEdge_Stage0.x) * duvdy.x - duvdy.y);
+ edgeAlpha = vQuadEdge_Stage0.x * vQuadEdge_Stage0.x - vQuadEdge_Stage0.y;
+ edgeAlpha = clamp(0.5 - edgeAlpha / length(gF), 0.0, 1.0);
+ }
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ vec4 output_Stage1;
+ {
+ float alpha = 1.0;
+ float edge;
+ edge = dot(uedges_Stage1[0], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage1[1], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage1[2], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage1[3], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ output_Stage1 = outputCoverage_Stage0 * alpha;
+ }
+ {
+ sk_FragColor = outputColor_Stage0 * output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 inPosition;
+in vec4 inColor;
+in vec4 inQuadEdge;
+noperspective out vec4 vQuadEdge_Stage0;
+noperspective out vec4 vinColor_Stage0;
+void main() {
+ vQuadEdge_Stage0 = inQuadEdge;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = inPosition;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/103-5.shader_test b/shaders/skia/103-5.shader_test
new file mode 100644
index 0000000..a942415
--- /dev/null
+++ b/shaders/skia/103-5.shader_test
@@ -0,0 +1,86 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage2_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c1_c0;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_dst_in(outputColor_Stage0, ClampedGradientEffect_Stage1_c0_c0(vec4(1.0)));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_dst_in(ConstColorProcessor_Stage2_c1_c0(vec4(1.0)), output_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/103-6.shader_test b/shaders/skia/103-6.shader_test
new file mode 100644
index 0000000..ef601d0
--- /dev/null
+++ b/shaders/skia/103-6.shader_test
@@ -0,0 +1,41 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform float uPixelSize_Stage1;
+uniform vec2 uRange_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = vec4(1.0, 1.0, 1.0, 1.0);
+ vec2 coord = vTransformedCoords_0_Stage0;
+ coord.y -= 16.0 * uPixelSize_Stage1;
+ for (int i = 0;i < 33; i++) {
+ output_Stage1 = min(output_Stage1, texture(uTextureSampler_0_Stage1, coord));
+ coord.y += uPixelSize_Stage1;
+ }
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/103-7.shader_test b/shaders/skia/103-7.shader_test
new file mode 100644
index 0000000..101fd91
--- /dev/null
+++ b/shaders/skia/103-7.shader_test
@@ -0,0 +1,140 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform float uSurfaceScale_Stage1;
+uniform vec3 uLightColor_Stage1;
+uniform float uKS_Stage1;
+uniform float uShininess_Stage1;
+uniform vec3 uLightLocation_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 light_Stage1(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ vec3 halfDir = normalize(surfaceToLight + vec3(0.0, 0.0, 1.0));
+ float colorScale = uKS_Stage1 * pow(dot(normal, halfDir), uShininess_Stage1);
+ vec3 color = lightColor * clamp(colorScale, 0.0, 1.0);
+ return vec4(color, max(max(color.x, color.y), color.z));
+}
+float sobel_Stage1(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage1(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage1(float m[9], float surfaceScale) {
+ return pointToNormal_Stage1(sobel_Stage1(m[0], m[1], m[3], m[4], m[6], m[7], 0.5), sobel_Stage1(m[0], m[6], m[1], m[7], 0.0, 0.0, 0.33333298563957214), surfaceScale);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ vec2 coord = vTransformedCoords_0_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp0 = textureColor;
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp1 = textureColor;
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp2 = textureColor;
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp3 = textureColor;
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp4 = textureColor;
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp5 = textureColor;
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp6 = textureColor;
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp7 = textureColor;
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp8 = textureColor;
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = normalize(uLightLocation_Stage1 - vec3(gl_FragCoord.xy, uSurfaceScale_Stage1 * m[4]));
+ output_Stage1 = light_Stage1(normal_Stage1(m, uSurfaceScale_Stage1), surfaceToLight, uLightColor_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/103-8.shader_test b/shaders/skia/103-8.shader_test
new file mode 100644
index 0000000..e1d88ed
--- /dev/null
+++ b/shaders/skia/103-8.shader_test
@@ -0,0 +1,98 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+uniform vec2 uDstTextureUpperLeft_Stage2;
+uniform vec2 uDstTextureCoordScale_Stage2;
+uniform sampler2D uTextureSampler_0_Stage0;
+uniform sampler2D uDstTextureSampler_Stage2;
+noperspective in vec2 vTextureCoords_Stage0;
+flat in int vTexIndex_Stage0;
+noperspective in vec4 vinColor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ t.x = fract(t.x);
+ }
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ vec4 texColor;
+ {
+ texColor = texture(uTextureSampler_0_Stage0, vTextureCoords_Stage0);
+ }
+ outputCoverage_Stage0 = texColor;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TiledGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ if (all(lessThanEqual(outputCoverage_Stage0.xyz, vec3(0.0)))) {
+ discard;
+ }
+ vec2 _dstTexCoord = (gl_FragCoord.xy - uDstTextureUpperLeft_Stage2) * uDstTextureCoordScale_Stage2;
+ _dstTexCoord.y = 1.0 - _dstTexCoord.y;
+ vec4 _dstColor = texture(uDstTextureSampler_Stage2, _dstTexCoord);
+ sk_FragColor = blend_src_in(output_Stage1, _dstColor);
+ float lerpRed = mix(_dstColor.w, sk_FragColor.w, outputCoverage_Stage0.x);
+ float lerpBlue = mix(_dstColor.w, sk_FragColor.w, outputCoverage_Stage0.y);
+ float lerpGreen = mix(_dstColor.w, sk_FragColor.w, outputCoverage_Stage0.z);
+ sk_FragColor = outputCoverage_Stage0 * sk_FragColor + (vec4(1.0) - outputCoverage_Stage0) * _dstColor;
+ sk_FragColor.w = max(max(lerpRed, lerpBlue), lerpGreen);
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform vec2 uAtlasSizeInv_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in uvec2 inTextureCoords;
+noperspective out vec2 vTextureCoords_Stage0;
+flat out int vTexIndex_Stage0;
+noperspective out vec4 vinColor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ ivec2 signedCoords = ivec2(int(inTextureCoords.x), int(inTextureCoords.y));
+ vec2 unormTexCoords = vec2(float(signedCoords.x / 2), float(signedCoords.y / 2));
+ vTextureCoords_Stage0 = unormTexCoords * uAtlasSizeInv_Stage0;
+ vTexIndex_Stage0 = 0;
+ vinColor_Stage0 = inColor;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(inPosition.x, inPosition.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/103.shader_test b/shaders/skia/103.shader_test
new file mode 100644
index 0000000..22332df
--- /dev/null
+++ b/shaders/skia/103.shader_test
@@ -0,0 +1,127 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform float uSrcTF_Stage1_c0_c0[7];
+uniform mat3 uColorXform_Stage1_c0_c0;
+uniform float uDstTF_Stage1_c0_c0[7];
+uniform mat3 ucolorSpaceMatrix_Stage1_c0_c0_c0_c0;
+uniform vec3 ucolorSpaceTranslate_Stage1_c0_c0_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+uniform sampler2D uTextureSampler_2_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_1_Stage1, vTransformedCoords_1_Stage0) * _input;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c0_c0_c0_c0_c2_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_2_Stage1, vTransformedCoords_2_Stage0) * _input;
+ return _output;
+}
+vec4 YUVtoRGBEffect_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 planes[3];
+ planes[0] = TextureEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ planes[1] = TextureEffect_Stage1_c0_c0_c0_c0_c1_c0(vec4(1.0));
+ planes[2] = TextureEffect_Stage1_c0_c0_c0_c0_c2_c0(vec4(1.0));
+ vec4 color = vec4(planes[0].x, planes[1].x, planes[1].y, planes[2].w);
+ color.xyz = clamp(color.xyz * ucolorSpaceMatrix_Stage1_c0_c0_c0_c0 + ucolorSpaceTranslate_Stage1_c0_c0_c0_c0, 0.0, 1.0);
+ color.xyz *= color.w;
+ _output = color;
+ return _output;
+}
+float src_tf_Stage1_c0_c0(float x) {
+ float G = uSrcTF_Stage1_c0_c0[0];
+ float A = uSrcTF_Stage1_c0_c0[1];
+ float B = uSrcTF_Stage1_c0_c0[2];
+ float C = uSrcTF_Stage1_c0_c0[3];
+ float D = uSrcTF_Stage1_c0_c0[4];
+ float E = uSrcTF_Stage1_c0_c0[5];
+ float F = uSrcTF_Stage1_c0_c0[6];
+ float s = sign(x);
+ x = abs(x);
+ x = x < D ? C * x + F : pow(A * x + B, G) + E;
+ return s * x;
+}
+float dst_tf_Stage1_c0_c0(float x) {
+ float G = uDstTF_Stage1_c0_c0[0];
+ float A = uDstTF_Stage1_c0_c0[1];
+ float B = uDstTF_Stage1_c0_c0[2];
+ float C = uDstTF_Stage1_c0_c0[3];
+ float D = uDstTF_Stage1_c0_c0[4];
+ float E = uDstTF_Stage1_c0_c0[5];
+ float F = uDstTF_Stage1_c0_c0[6];
+ float s = sign(x);
+ x = abs(x);
+ x = x < D ? C * x + F : pow(A * x + B, G) + E;
+ return s * x;
+}
+vec4 gamut_xform_Stage1_c0_c0(vec4 color) {
+ color.xyz = uColorXform_Stage1_c0_c0 * color.xyz;
+ return color;
+}
+vec4 color_xform_Stage1_c0_c0(vec4 color) {
+ float nonZeroAlpha = max(color.w, 9.9999997473787516e-05);
+ color = vec4(color.xyz / nonZeroAlpha, nonZeroAlpha);
+ color.x = src_tf_Stage1_c0_c0(color.x);
+ color.y = src_tf_Stage1_c0_c0(color.y);
+ color.z = src_tf_Stage1_c0_c0(color.z);
+ color = gamut_xform_Stage1_c0_c0(color);
+ color.x = dst_tf_Stage1_c0_c0(color.x);
+ color.y = dst_tf_Stage1_c0_c0(color.y);
+ color.z = dst_tf_Stage1_c0_c0(color.z);
+ color.xyz *= color.w;
+ return color;
+}
+vec4 ColorSpaceXform_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = color_xform_Stage1_c0_c0(YUVtoRGBEffect_Stage1_c0_c0_c0_c0(vec4(1.0))) * _input;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ColorSpaceXform_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1030.shader_test b/shaders/skia/1030.shader_test
new file mode 100644
index 0000000..ed88083
--- /dev/null
+++ b/shaders/skia/1030.shader_test
@@ -0,0 +1,26 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+uniform vec4 uColor_Stage0;
+void main() {
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 inPosition;
+void main() {
+ vec2 pos2 = (uViewM_Stage0 * vec3(inPosition, 1.0)).xy;
+ {
+ vec2 _posTmp = pos2;
+ _posTmp = floor(_posTmp) + vec2(0.5, 0.5);
+ gl_Position = vec4(_posTmp, 0.0, 1.0);
+ }
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1033.shader_test b/shaders/skia/1033.shader_test
new file mode 100644
index 0000000..d35e5a7
--- /dev/null
+++ b/shaders/skia/1033.shader_test
@@ -0,0 +1,329 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uCoordTransformMatrix_2_Stage0;
+uniform vec2 ubaseFrequency_Stage1;
+uniform float uz_Stage1;
+uniform vec2 ufocalParams_Stage2_c0_c0_c0_c0;
+uniform vec4 uscale01_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias01_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale23_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias23_Stage2_c0_c0_c1_c0;
+uniform float uthreshold_Stage2_c0_c0_c1_c0;
+uniform vec2 uImageIncrement_Stage3_c1_c0;
+uniform float uSurfaceScale_Stage3_c1_c0;
+uniform vec3 uLightColor_Stage3_c1_c0;
+uniform float uKS_Stage3_c1_c0;
+uniform float uShininess_Stage3_c1_c0;
+uniform vec4 uTexDom_Stage3_c1_c0;
+uniform vec3 uDecalParams_Stage3_c1_c0;
+uniform vec3 uLightLocation_Stage3_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+uniform sampler2D uTextureSampler_0_Stage3;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec3 fade_Stage1(vec3 t) {
+ return ((t * t) * t) * (t * (t * 6.0 - 15.0) + 10.0);
+}
+float perm_Stage1(float x) {
+ return texture(uTextureSampler_0_Stage1, vec2(fract(x / 256.0), 0.0)).x * 255.0;
+}
+float grad_Stage1(float x, vec3 p) {
+ return dot(texture(uTextureSampler_1_Stage1, vec2(fract(x / 16.0), 0.0)).xyz * 255.0 - vec3(1.0), p);
+}
+float lerp_Stage1(float a, float b, float w) {
+ return a + w * (b - a);
+}
+float noise_Stage1(vec3 p) {
+ vec3 P = mod(floor(p), 256.0);
+ p -= floor(p);
+ vec3 f = fade_Stage1(p);
+ float A = perm_Stage1(P.x) + P.y;
+ float AA = perm_Stage1(A) + P.z;
+ float AB = perm_Stage1(A + 1.0) + P.z;
+ float B = perm_Stage1(P.x + 1.0) + P.y;
+ float BA = perm_Stage1(B) + P.z;
+ float BB = perm_Stage1(B + 1.0) + P.z;
+ float result = lerp_Stage1(lerp_Stage1(lerp_Stage1(grad_Stage1(perm_Stage1(AA), p), grad_Stage1(perm_Stage1(BA), p + vec3(-1.0, 0.0, 0.0)), f.x), lerp_Stage1(grad_Stage1(perm_Stage1(AB), p + vec3(0.0, -1.0, 0.0)), grad_Stage1(perm_Stage1(BB), p + vec3(-1.0, -1.0, 0.0)), f.x), f.y), lerp_Stage1(lerp_Stage1(grad_Stage1(perm_Stage1(AA + 1.0), p + vec3(0.0, 0.0, -1.0)), grad_Stage1(perm_Stage1(BA + 1.0), p + vec3(-1.0, 0.0, -1.0)), f.x), lerp_Stage1(grad_Stage1(perm_Stage1(AB + 1.0), p + vec3(0.0, -1.0, -1.0)), grad_Stage1(perm_Stage1(BB + 1.0), p + vec3(-1.0, -1.0, -1.0)), f.x), f.y), f.z);
+ return result;
+}
+float noiseOctaves_Stage1(vec3 p) {
+ float result = 0.0;
+ float ratio = 1.0;
+ for (float i = 0.0;i < 4.0; i++) {
+ result += noise_Stage1(p) / ratio;
+ p *= 2.0;
+ ratio *= 2.0;
+ }
+ return (result + 1.0) / 2.0;
+}
+vec4 TwoPointConicalGradientLayout_Stage2_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_1_Stage0;
+ float t = -1.0;
+ float v = 1.0;
+ {
+ {
+ float r0_2 = ufocalParams_Stage2_c0_c0_c0_c0.y;
+ t = r0_2 - p.y * p.y;
+ if (t >= 0.0) {
+ t = p.x + sqrt(t);
+ } else {
+ v = -1.0;
+ }
+ }
+ }
+ _output = vec4(t, v, 0.0, 0.0);
+ return _output;
+}
+vec4 DualIntervalGradientColorizer_Stage2_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthreshold_Stage2_c0_c0_c1_c0) {
+ scale = uscale01_Stage2_c0_c0_c1_c0;
+ bias = ubias01_Stage2_c0_c0_c1_c0;
+ } else {
+ scale = uscale23_Stage2_c0_c0_c1_c0;
+ bias = ubias23_Stage2_c0_c0_c1_c0;
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage2_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = DualIntervalGradientColorizer_Stage2_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 light_Stage3_c1_c0(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ vec3 halfDir = normalize(surfaceToLight + vec3(0.0, 0.0, 1.0));
+ float colorScale = uKS_Stage3_c1_c0 * pow(dot(normal, halfDir), uShininess_Stage3_c1_c0);
+ vec3 color = lightColor * clamp(colorScale, 0.0, 1.0);
+ return vec4(color, max(max(color.x, color.y), color.z));
+}
+float sobel_Stage3_c1_c0(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage3_c1_c0(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage3_c1_c0(float m[9], float surfaceScale) {
+ return pointToNormal_Stage3_c1_c0(sobel_Stage3_c1_c0(m[1], m[2], m[4], m[5], m[7], m[8], 0.5), sobel_Stage3_c1_c0(0.0, 0.0, m[1], m[7], m[2], m[8], 0.33333298563957214), surfaceScale);
+}
+vec4 SpecularLighting_Stage3_c1_c0(vec4 _input, vec2 _coords) {
+ _coords = _coords * uCoordTransformMatrix_2_Stage0.xz + uCoordTransformMatrix_2_Stage0.yw;
+ vec4 _output;
+ vec2 coord = _coords;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage3_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage3_c1_c0.xy, uTexDom_Stage3_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage3, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage3_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage3_c1_c0.y);
+ if (err > uDecalParams_Stage3_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage3_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp0 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage3_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage3_c1_c0.xy, uTexDom_Stage3_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage3, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage3_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage3_c1_c0.y);
+ if (err > uDecalParams_Stage3_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage3_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage3_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage3_c1_c0.xy, uTexDom_Stage3_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage3, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage3_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage3_c1_c0.y);
+ if (err > uDecalParams_Stage3_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage3_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage3_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage3_c1_c0.xy, uTexDom_Stage3_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage3, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage3_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage3_c1_c0.y);
+ if (err > uDecalParams_Stage3_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage3_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage3_c1_c0.xy, uTexDom_Stage3_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage3, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage3_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage3_c1_c0.y);
+ if (err > uDecalParams_Stage3_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage3_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage3_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage3_c1_c0.xy, uTexDom_Stage3_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage3, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage3_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage3_c1_c0.y);
+ if (err > uDecalParams_Stage3_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage3_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp5 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage3_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage3_c1_c0.xy, uTexDom_Stage3_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage3, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage3_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage3_c1_c0.y);
+ if (err > uDecalParams_Stage3_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage3_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp6 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage3_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage3_c1_c0.xy, uTexDom_Stage3_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage3, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage3_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage3_c1_c0.y);
+ if (err > uDecalParams_Stage3_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage3_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp7 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage3_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage3_c1_c0.xy, uTexDom_Stage3_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage3, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage3_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage3_c1_c0.y);
+ if (err > uDecalParams_Stage3_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage3_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp8 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = normalize(uLightLocation_Stage3_c1_c0 - vec3(gl_FragCoord.xy, uSurfaceScale_Stage3_c1_c0 * m[4]));
+ _output = light_Stage3_c1_c0(normal_Stage3_c1_c0(m, uSurfaceScale_Stage3_c1_c0), surfaceToLight, uLightColor_Stage3_c1_c0);
+ _output *= _input;
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ vec2 coords = vTransformedCoords_0_Stage0 * ubaseFrequency_Stage1;
+ float r = noiseOctaves_Stage1(vec3(coords, uz_Stage1));
+ float g = noiseOctaves_Stage1(vec3(coords, uz_Stage1));
+ float b = noiseOctaves_Stage1(vec3(coords, uz_Stage1));
+ float a = noiseOctaves_Stage1(vec3(coords, uz_Stage1));
+ output_Stage1 = vec4(r, g, b, a);
+ output_Stage1 = clamp(output_Stage1, 0.0, 1.0);
+ output_Stage1 = vec4(output_Stage1.xyz * output_Stage1.www, output_Stage1.w);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_dst_in(output_Stage1, TiledGradientEffect_Stage2_c0_c0(vec4(1.0)));
+ }
+ vec4 output_Stage3;
+ {
+ output_Stage3 = SpecularLighting_Stage3_c1_c0(output_Stage2, gl_FragCoord.xy);
+ }
+ {
+ sk_FragColor = output_Stage3;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vec4 color = inColor;
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1039.shader_test b/shaders/skia/1039.shader_test
new file mode 100644
index 0000000..55233b3
--- /dev/null
+++ b/shaders/skia/1039.shader_test
@@ -0,0 +1,421 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_KHR_blend_equation_advanced : require
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+layout (blend_support_all_equations) out ;
+uniform vec2 uImageIncrement_Stage1_c0_c0_c0_c0;
+uniform float uSurfaceScale_Stage1_c0_c0_c0_c0;
+uniform vec3 uLightColor_Stage1_c0_c0_c0_c0;
+uniform float uKD_Stage1_c0_c0_c0_c0;
+uniform vec4 uTexDom_Stage1_c0_c0_c0_c0;
+uniform vec3 uDecalParams_Stage1_c0_c0_c0_c0;
+uniform vec3 uLightLocation_Stage1_c0_c0_c0_c0;
+uniform float uExponent_Stage1_c0_c0_c0_c0;
+uniform float uCosInnerConeAngle_Stage1_c0_c0_c0_c0;
+uniform float uCosOuterConeAngle_Stage1_c0_c0_c0_c0;
+uniform float uConeScale_Stage1_c0_c0_c0_c0;
+uniform vec3 uS_Stage1_c0_c0_c0_c0;
+uniform float uinnerThreshold_Stage1_c0_c0_c1_c0_c0_c0;
+uniform float uouterThreshold_Stage1_c0_c0_c1_c0_c0_c0;
+uniform vec4 urectH_Stage1_c0_c0_c1_c0_c1_c0;
+uniform float uinvSixSigma_Stage1_c0_c0_c1_c0_c1_c0;
+uniform vec4 uboundsUniform_Stage1_c1_c0;
+uniform float uxInvZoom_Stage1_c1_c0;
+uniform float uyInvZoom_Stage1_c1_c0;
+uniform float uxInvInset_Stage1_c1_c0;
+uniform float uyInvInset_Stage1_c1_c0;
+uniform vec2 uoffset_Stage1_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+uniform sampler2D uTextureSampler_2_Stage1;
+uniform sampler2D uTextureSampler_3_Stage1;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+vec4 light_Stage1_c0_c0_c0_c0(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ float colorScale = uKD_Stage1_c0_c0_c0_c0 * dot(normal, surfaceToLight);
+ return vec4(lightColor * clamp(colorScale, 0.0, 1.0), 1.0);
+}
+float sobel_Stage1_c0_c0_c0_c0(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage1_c0_c0_c0_c0(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage1_c0_c0_c0_c0(float m[9], float surfaceScale) {
+ return pointToNormal_Stage1_c0_c0_c0_c0(sobel_Stage1_c0_c0_c0_c0(0.0, 0.0, m[3], m[4], m[6], m[7], 0.66666698455810547), sobel_Stage1_c0_c0_c0_c0(m[3], m[6], m[4], m[7], 0.0, 0.0, 0.66666698455810547), surfaceScale);
+}
+vec3 lightColor_Stage1_c0_c0_c0_c0(vec3 surfaceToLight) {
+ float cosAngle = -dot(surfaceToLight, uS_Stage1_c0_c0_c0_c0);
+ if (cosAngle < uCosOuterConeAngle_Stage1_c0_c0_c0_c0) {
+ return vec3(0.0);
+ }
+ float scale = pow(cosAngle, uExponent_Stage1_c0_c0_c0_c0);
+ if (cosAngle < uCosInnerConeAngle_Stage1_c0_c0_c0_c0) {
+ return ((uLightColor_Stage1_c0_c0_c0_c0 * scale) * (cosAngle - uCosOuterConeAngle_Stage1_c0_c0_c0_c0)) * uConeScale_Stage1_c0_c0_c0_c0;
+ }
+ return uLightColor_Stage1_c0_c0_c0_c0;
+}
+vec4 DiffuseLighting_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coord = vTransformedCoords_0_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage1_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp0 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage1_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp5 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage1_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp6 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage1_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp7 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage1_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp8 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = normalize(uLightLocation_Stage1_c0_c0_c0_c0 - vec3(gl_FragCoord.xy, uSurfaceScale_Stage1_c0_c0_c0_c0 * m[4]));
+ _output = light_Stage1_c0_c0_c0_c0(normal_Stage1_c0_c0_c0_c0(m, uSurfaceScale_Stage1_c0_c0_c0_c0), surfaceToLight, lightColor_Stage1_c0_c0_c0_c0(surfaceToLight));
+ _output *= _input;
+ return _output;
+}
+vec4 AlphaThresholdFragmentProcessor_Stage1_c0_c0_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 color = _input;
+ vec4 mask_color = texture(uTextureSampler_1_Stage1, vTransformedCoords_1_Stage0);
+ if (mask_color.w < 0.5) {
+ if (color.w > uouterThreshold_Stage1_c0_c0_c1_c0_c0_c0) {
+ float scale = uouterThreshold_Stage1_c0_c0_c1_c0_c0_c0 / color.w;
+ color.xyz *= scale;
+ color.w = uouterThreshold_Stage1_c0_c0_c1_c0_c0_c0;
+ }
+ } else if (color.w < uinnerThreshold_Stage1_c0_c0_c1_c0_c0_c0) {
+ float scale = uinnerThreshold_Stage1_c0_c0_c1_c0_c0_c0 / max(0.0010000000474974513, color.w);
+ color.xyz *= scale;
+ color.w = uinnerThreshold_Stage1_c0_c0_c1_c0_c0_c0;
+ }
+ _output = color;
+ return _output;
+}
+vec4 RectBlurEffect_Stage1_c0_c0_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float xCoverage, yCoverage;
+ {
+ float x, y;
+ {
+ x = max(urectH_Stage1_c0_c0_c1_c0_c1_c0.x - gl_FragCoord.x, gl_FragCoord.x - urectH_Stage1_c0_c0_c1_c0_c1_c0.z);
+ y = max(urectH_Stage1_c0_c0_c1_c0_c1_c0.y - gl_FragCoord.y, gl_FragCoord.y - urectH_Stage1_c0_c0_c1_c0_c1_c0.w);
+ }
+ xCoverage = texture(uTextureSampler_2_Stage1, vec2(x * uinvSixSigma_Stage1_c0_c0_c1_c0_c1_c0, 0.5)).w;
+ yCoverage = texture(uTextureSampler_2_Stage1, vec2(y * uinvSixSigma_Stage1_c0_c0_c1_c0_c1_c0, 0.5)).w;
+ _output = (_input * xCoverage) * yCoverage;
+ }
+ _output = (_input * xCoverage) * yCoverage;
+ return _output;
+}
+float _guarded_divide(float n, float d) {
+ return n / d;
+}
+float _soft_light_component(float sc, float sa, float dc, float da) {
+ if (2.0 * sc <= sa) {
+ return (_guarded_divide((dc * dc) * (sa - 2.0 * sc), da) + (1.0 - da) * sc) + dc * ((-sa + 2.0 * sc) + 1.0);
+ } else if (4.0 * dc <= da) {
+ float DSqd = dc * dc;
+ float DCub = DSqd * dc;
+ float DaSqd = da * da;
+ float DaCub = DaSqd * da;
+ return _guarded_divide(((DaSqd * (sc - dc * ((3.0 * sa - 6.0 * sc) - 1.0)) + ((12.0 * da) * DSqd) * (sa - 2.0 * sc)) - (16.0 * DCub) * (sa - 2.0 * sc)) - DaCub * sc, DaSqd);
+ }
+ return ((dc * ((sa - 2.0 * sc) + 1.0) + sc) - sqrt(da * dc) * (sa - 2.0 * sc)) - da * sc;
+}
+vec4 blend_soft_light(vec4 src, vec4 dst) {
+ if (dst.w == 0.0) {
+ return src;
+ }
+ return vec4(_soft_light_component(src.x, src.w, dst.x, dst.w), _soft_light_component(src.y, src.w, dst.y, dst.w), _soft_light_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+}
+vec4 ComposeTwo_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_soft_light(AlphaThresholdFragmentProcessor_Stage1_c0_c0_c1_c0_c0_c0(inputColor), RectBlurEffect_Stage1_c0_c0_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+float _blend_overlay_component(float sc, float sa, float dc, float da) {
+ if (2.0 * dc <= da) {
+ return (2.0 * sc) * dc;
+ }
+ return sa * da - (2.0 * (da - dc)) * (sa - sc);
+}
+vec4 blend_overlay(vec4 src, vec4 dst) {
+ vec4 result = vec4(_blend_overlay_component(src.x, src.w, dst.x, dst.w), _blend_overlay_component(src.y, src.w, dst.y, dst.w), _blend_overlay_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+ result.xyz += dst.xyz * (1.0 - src.w) + src.xyz * (1.0 - dst.w);
+ return result;
+}
+vec4 ComposeTwo_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_overlay(DiffuseLighting_Stage1_c0_c0_c0_c0(inputColor), ComposeTwo_Stage1_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 MagnifierEffect_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coord = vTransformedCoords_2_Stage0;
+ vec2 zoom_coord = uoffset_Stage1_c1_c0 + coord * vec2(uxInvZoom_Stage1_c1_c0, uyInvZoom_Stage1_c1_c0);
+ vec2 delta = (coord - uboundsUniform_Stage1_c1_c0.xy) * uboundsUniform_Stage1_c1_c0.zw;
+ delta = min(delta, vec2(1.0, 1.0) - delta);
+ delta *= vec2(uxInvInset_Stage1_c1_c0, uyInvInset_Stage1_c1_c0);
+ float weight = 0.0;
+ if (delta.x < 2.0 && delta.y < 2.0) {
+ delta = vec2(2.0, 2.0) - delta;
+ float dist = length(delta);
+ dist = max(2.0 - dist, 0.0);
+ weight = min(dist * dist, 1.0);
+ } else {
+ vec2 delta_squared = delta * delta;
+ weight = min(min(delta_squared.x, delta_squared.y), 1.0);
+ }
+ _output = texture(uTextureSampler_3_Stage1, mix(coord, zoom_coord, weight));
+ return _output;
+}
+float _blend_color_luminance(vec3 color) {
+ return dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), color);
+}
+vec3 _blend_set_color_luminance(vec3 hueSatColor, float alpha, vec3 lumColor) {
+ float lum = _blend_color_luminance(lumColor);
+ vec3 result = (lum - _blend_color_luminance(hueSatColor)) + hueSatColor;
+ float minComp = min(min(result.x, result.y), result.z);
+ float maxComp = max(max(result.x, result.y), result.z);
+ if (minComp < 0.0 && lum != minComp) {
+ result = lum + ((result - lum) * lum) / (lum - minComp);
+ }
+ if (maxComp > alpha && maxComp != lum) {
+ return lum + ((result - lum) * (alpha - lum)) / (maxComp - lum);
+ }
+ return result;
+}
+vec4 blend_color(vec4 src, vec4 dst) {
+ float alpha = dst.w * src.w;
+ vec3 sda = src.xyz * dst.w;
+ vec3 dsa = dst.xyz * src.w;
+ return vec4((((_blend_set_color_luminance(sda, alpha, dsa) + dst.xyz) - dsa) + src.xyz) - sda, (src.w + dst.w) - alpha);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_color(ComposeTwo_Stage1_c0_c0(inputColor), MagnifierEffect_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform float uSrcTF_Stage0[7];
+uniform mat3 uColorXform_Stage0;
+uniform float uDstTF_Stage0[7];
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+in vec2 position;
+in vec4 inColor;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+float src_tf_Stage0(float x) {
+ float G = uSrcTF_Stage0[0];
+ float A = uSrcTF_Stage0[1];
+ float B = uSrcTF_Stage0[2];
+ float C = uSrcTF_Stage0[3];
+ float D = uSrcTF_Stage0[4];
+ float E = uSrcTF_Stage0[5];
+ float F = uSrcTF_Stage0[6];
+ float s = sign(x);
+ x = abs(x);
+ x = x < D ? C * x + F : pow(A * x + B, G) + E;
+ return s * x;
+}
+float dst_tf_Stage0(float x) {
+ float G = uDstTF_Stage0[0];
+ float A = uDstTF_Stage0[1];
+ float B = uDstTF_Stage0[2];
+ float C = uDstTF_Stage0[3];
+ float D = uDstTF_Stage0[4];
+ float E = uDstTF_Stage0[5];
+ float F = uDstTF_Stage0[6];
+ float s = sign(x);
+ x = abs(x);
+ x = x < D ? C * x + F : pow(A * x + B, G) + E;
+ return s * x;
+}
+vec4 gamut_xform_Stage0(vec4 color) {
+ color.xyz = uColorXform_Stage0 * color.xyz;
+ return color;
+}
+vec4 color_xform_Stage0(vec4 color) {
+ float nonZeroAlpha = max(color.w, 9.9999997473787516e-05);
+ color = vec4(color.xyz / nonZeroAlpha, nonZeroAlpha);
+ color.x = src_tf_Stage0(color.x);
+ color.y = src_tf_Stage0(color.y);
+ color.z = src_tf_Stage0(color.z);
+ color = gamut_xform_Stage0(color);
+ color.x = dst_tf_Stage0(color.x);
+ color.y = dst_tf_Stage0(color.y);
+ color.z = dst_tf_Stage0(color.z);
+ color.xyz *= color.w;
+ return color;
+}
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = color_xform_Stage0(color);
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(position, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(position, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(position, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1042.shader_test b/shaders/skia/1042.shader_test
new file mode 100644
index 0000000..fdeeea8
--- /dev/null
+++ b/shaders/skia/1042.shader_test
@@ -0,0 +1,164 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_KHR_blend_equation_advanced : require
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+layout (blend_support_all_equations) out ;
+uniform vec4 uinnerRect_Stage1;
+uniform vec2 uradiusPlusHalf_Stage1;
+uniform vec2 ufocalParams_Stage2_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale8_9_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias8_9_Stage2_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage2_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage2_c0_c0_c1_c0;
+uniform vec3 uedges_Stage3[4];
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage2_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_0_Stage0;
+ float t = -1.0;
+ {
+ {
+ float invR1 = ufocalParams_Stage2_c0_c0_c0_c0.x;
+ float x_t = -1.0;
+ {
+ x_t = length(p) - p.x * invR1;
+ }
+ {
+ {
+ t = x_t;
+ }
+ }
+ }
+ }
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage2_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.w) {
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage2_c0_c0_c1_c0;
+ bias = ubias0_1_Stage2_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage2_c0_c0_c1_c0;
+ bias = ubias2_3_Stage2_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage2_c0_c0_c1_c0;
+ bias = ubias4_5_Stage2_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage2_c0_c0_c1_c0;
+ bias = ubias6_7_Stage2_c0_c0_c1_c0;
+ }
+ }
+ } else {
+ {
+ {
+ scale = uscale8_9_Stage2_c0_c0_c1_c0;
+ bias = ubias8_9_Stage2_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage2_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else {
+ {
+ t.x = fract(t.x);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage2_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec2 dxy0 = uinnerRect_Stage1.xy - gl_FragCoord.xy;
+ vec2 dxy1 = gl_FragCoord.xy - uinnerRect_Stage1.zw;
+ vec2 dxy = max(max(dxy0, dxy1), 0.0);
+ float alpha = clamp(uradiusPlusHalf_Stage1.x - length(dxy), 0.0, 1.0);
+ output_Stage1 = vec4(alpha);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_dst_in(output_Stage1, TiledGradientEffect_Stage2_c0_c0(vec4(1.0)));
+ }
+ vec4 output_Stage3;
+ {
+ float alpha = 1.0;
+ float edge;
+ edge = dot(uedges_Stage3[0], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage3[1], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage3[2], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage3[3], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ output_Stage3 = output_Stage2 * alpha;
+ }
+ {
+ sk_FragColor = output_Stage3 * outputColor_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec2 inLocalCoord;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 color = inColor;
+ vcolor_Stage0 = color;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1045.shader_test b/shaders/skia/1045.shader_test
new file mode 100644
index 0000000..95ac471
--- /dev/null
+++ b/shaders/skia/1045.shader_test
@@ -0,0 +1,93 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uColor_Stage0;
+uniform vec4 uleftBorderColor_Stage2_c0_c0;
+uniform vec4 urightBorderColor_Stage2_c0_c0;
+uniform vec4 uscale01_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias01_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale23_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias23_Stage2_c0_c0_c1_c0;
+uniform float uthreshold_Stage2_c0_c0_c1_c0;
+in vec2 vTransformedCoords_0_Stage0;
+vec4 RadialGradientLayout_Stage2_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = length(vTransformedCoords_0_Stage0);
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 DualIntervalGradientColorizer_Stage2_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthreshold_Stage2_c0_c0_c1_c0) {
+ scale = uscale01_Stage2_c0_c0_c1_c0;
+ bias = ubias01_Stage2_c0_c0_c1_c0;
+ } else {
+ scale = uscale23_Stage2_c0_c0_c1_c0;
+ bias = ubias23_Stage2_c0_c0_c1_c0;
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = RadialGradientLayout_Stage2_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage2_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage2_c0_c0;
+ } else {
+ _output = DualIntervalGradientColorizer_Stage2_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = uColor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ {
+ float alpha = clamp(1.0, 0.0, 1.0);
+ output_Stage1 = vec4(clamp(vec4(1.0).xyz, 0.0, alpha), alpha);
+ }
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_dst_in(output_Stage1, ClampedGradientEffect_Stage2_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = (vec4(1.0) - outputColor_Stage0) * output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec3 pos3 = uViewM_Stage0 * vec3(inPosition, 1.0);
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos3.x, pos3.y, 0.0, pos3.z);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1048.shader_test b/shaders/skia/1048.shader_test
new file mode 100644
index 0000000..31ef7de
--- /dev/null
+++ b/shaders/skia/1048.shader_test
@@ -0,0 +1,87 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_KHR_blend_equation_advanced : require
+out vec4 sk_FragColor;
+layout (blend_support_all_equations) out ;
+uniform vec4 uColor_Stage0;
+uniform vec2 ubaseFrequency_Stage1;
+uniform float uz_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+noperspective in vec3 vTransformedCoords_0_Stage0;
+vec3 fade_Stage1(vec3 t) {
+ return ((t * t) * t) * (t * (t * 6.0 - 15.0) + 10.0);
+}
+float perm_Stage1(float x) {
+ return texture(uTextureSampler_0_Stage1, vec2(fract(x / 256.0), 0.0)).x * 255.0;
+}
+float grad_Stage1(float x, vec3 p) {
+ return dot(texture(uTextureSampler_1_Stage1, vec2(fract(x / 16.0), 0.0)).xyz * 255.0 - vec3(1.0), p);
+}
+float lerp_Stage1(float a, float b, float w) {
+ return a + w * (b - a);
+}
+float noise_Stage1(vec3 p) {
+ vec3 P = mod(floor(p), 256.0);
+ p -= floor(p);
+ vec3 f = fade_Stage1(p);
+ float A = perm_Stage1(P.x) + P.y;
+ float AA = perm_Stage1(A) + P.z;
+ float AB = perm_Stage1(A + 1.0) + P.z;
+ float B = perm_Stage1(P.x + 1.0) + P.y;
+ float BA = perm_Stage1(B) + P.z;
+ float BB = perm_Stage1(B + 1.0) + P.z;
+ float result = lerp_Stage1(lerp_Stage1(lerp_Stage1(grad_Stage1(perm_Stage1(AA), p), grad_Stage1(perm_Stage1(BA), p + vec3(-1.0, 0.0, 0.0)), f.x), lerp_Stage1(grad_Stage1(perm_Stage1(AB), p + vec3(0.0, -1.0, 0.0)), grad_Stage1(perm_Stage1(BB), p + vec3(-1.0, -1.0, 0.0)), f.x), f.y), lerp_Stage1(lerp_Stage1(grad_Stage1(perm_Stage1(AA + 1.0), p + vec3(0.0, 0.0, -1.0)), grad_Stage1(perm_Stage1(BA + 1.0), p + vec3(-1.0, 0.0, -1.0)), f.x), lerp_Stage1(grad_Stage1(perm_Stage1(AB + 1.0), p + vec3(0.0, -1.0, -1.0)), grad_Stage1(perm_Stage1(BB + 1.0), p + vec3(-1.0, -1.0, -1.0)), f.x), f.y), f.z);
+ return result;
+}
+float noiseOctaves_Stage1(vec3 p) {
+ float result = 0.0;
+ float ratio = 1.0;
+ for (float i = 0.0;i < 5.0; i++) {
+ result += noise_Stage1(p) / ratio;
+ p *= 2.0;
+ ratio *= 2.0;
+ }
+ return (result + 1.0) / 2.0;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = uColor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec2 vTransformedCoords_0_Stage0_ensure2D = vTransformedCoords_0_Stage0.xy / vTransformedCoords_0_Stage0.z;
+ vec2 coords = vTransformedCoords_0_Stage0_ensure2D * ubaseFrequency_Stage1;
+ float r = noiseOctaves_Stage1(vec3(coords, uz_Stage1));
+ float g = noiseOctaves_Stage1(vec3(coords, uz_Stage1));
+ float b = noiseOctaves_Stage1(vec3(coords, uz_Stage1));
+ float a = noiseOctaves_Stage1(vec3(coords, uz_Stage1));
+ output_Stage1 = vec4(r, g, b, a);
+ output_Stage1 = clamp(output_Stage1, 0.0, 1.0);
+ output_Stage1 = vec4(output_Stage1.xyz * output_Stage1.www, output_Stage1.w);
+ }
+ {
+ sk_FragColor = output_Stage1 * outputColor_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+noperspective out vec3 vTransformedCoords_0_Stage0;
+void main() {
+ vec2 pos2 = (uViewM_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0);
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1051.shader_test b/shaders/skia/1051.shader_test
new file mode 100644
index 0000000..82716ca
--- /dev/null
+++ b/shaders/skia/1051.shader_test
@@ -0,0 +1,880 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uColor_Stage0;
+uniform vec2 uImageIncrement_Stage1_c0_c0_c0_c0;
+uniform vec4 uKernel_Stage1_c0_c0_c0_c0[6];
+uniform vec2 uKernelOffset_Stage1_c0_c0_c0_c0;
+uniform float uGain_Stage1_c0_c0_c0_c0;
+uniform float uBias_Stage1_c0_c0_c0_c0;
+uniform vec4 uTexDom_Stage1_c0_c0_c0_c0;
+uniform vec3 uDecalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 uboundsUniform_Stage1_c0_c0_c1_c0_c0_c0;
+uniform float uxInvZoom_Stage1_c0_c0_c1_c0_c0_c0;
+uniform float uyInvZoom_Stage1_c0_c0_c1_c0_c0_c0;
+uniform float uxInvInset_Stage1_c0_c0_c1_c0_c0_c0;
+uniform float uyInvInset_Stage1_c0_c0_c1_c0_c0_c0;
+uniform vec2 uoffset_Stage1_c0_c0_c1_c0_c0_c0;
+uniform vec4 ucircle_Stage1_c0_c0_c1_c0_c1_c0;
+uniform vec4 urectUniform_Stage1_c1_c0_c0_c0_c0_c0;
+uniform vec4 uinnerRect_Stage1_c1_c0_c0_c0_c1_c0;
+uniform vec4 uinvRadiiLTRB_Stage1_c1_c0_c0_c0_c1_c0;
+uniform vec2 uImageIncrement_Stage1_c1_c0_c1_c0;
+uniform vec4 uKernel_Stage1_c1_c0_c1_c0[3];
+uniform vec2 uKernelOffset_Stage1_c1_c0_c1_c0;
+uniform float uGain_Stage1_c1_c0_c1_c0;
+uniform float uBias_Stage1_c1_c0_c1_c0;
+uniform vec4 uTexDom_Stage1_c1_c0_c1_c0;
+uniform vec3 uDecalParams_Stage1_c1_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+uniform sampler2D uTextureSampler_2_Stage1;
+in vec2 vTransformedCoords_0_Stage0;
+in vec2 vTransformedCoords_1_Stage0;
+in vec2 vTransformedCoords_2_Stage0;
+vec4 MatrixConvolution_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 sum = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0 - uKernelOffset_Stage1_c0_c0_c0_c0 * uImageIncrement_Stage1_c0_c0_c0_c0;
+ vec4 c;
+ {
+ float k = uKernel_Stage1_c0_c0_c0_c0[0].x;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c0_c0[0].y;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c0_c0[0].z;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c0_c0[0].w;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c0_c0[1].x;
+ {
+ vec2 origCoord = coord + vec2(0.0, 2.0) * uImageIncrement_Stage1_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c0_c0[1].y;
+ {
+ vec2 origCoord = coord + vec2(1.0, 2.0) * uImageIncrement_Stage1_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c0_c0[1].z;
+ {
+ vec2 origCoord = coord + vec2(0.0, 3.0) * uImageIncrement_Stage1_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c0_c0[1].w;
+ {
+ vec2 origCoord = coord + vec2(1.0, 3.0) * uImageIncrement_Stage1_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c0_c0[2].x;
+ {
+ vec2 origCoord = coord + vec2(0.0, 4.0) * uImageIncrement_Stage1_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c0_c0[2].y;
+ {
+ vec2 origCoord = coord + vec2(1.0, 4.0) * uImageIncrement_Stage1_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c0_c0[2].z;
+ {
+ vec2 origCoord = coord + vec2(0.0, 5.0) * uImageIncrement_Stage1_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c0_c0[2].w;
+ {
+ vec2 origCoord = coord + vec2(1.0, 5.0) * uImageIncrement_Stage1_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c0_c0[3].x;
+ {
+ vec2 origCoord = coord + vec2(0.0, 6.0) * uImageIncrement_Stage1_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c0_c0[3].y;
+ {
+ vec2 origCoord = coord + vec2(1.0, 6.0) * uImageIncrement_Stage1_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c0_c0[3].z;
+ {
+ vec2 origCoord = coord + vec2(0.0, 7.0) * uImageIncrement_Stage1_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c0_c0[3].w;
+ {
+ vec2 origCoord = coord + vec2(1.0, 7.0) * uImageIncrement_Stage1_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c0_c0[4].x;
+ {
+ vec2 origCoord = coord + vec2(0.0, 8.0) * uImageIncrement_Stage1_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c0_c0[4].y;
+ {
+ vec2 origCoord = coord + vec2(1.0, 8.0) * uImageIncrement_Stage1_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c0_c0[4].z;
+ {
+ vec2 origCoord = coord + vec2(0.0, 9.0) * uImageIncrement_Stage1_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c0_c0[4].w;
+ {
+ vec2 origCoord = coord + vec2(1.0, 9.0) * uImageIncrement_Stage1_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c0_c0[5].x;
+ {
+ vec2 origCoord = coord + vec2(0.0, 10.0) * uImageIncrement_Stage1_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c0_c0[5].y;
+ {
+ vec2 origCoord = coord + vec2(1.0, 10.0) * uImageIncrement_Stage1_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c0_c0[5].z;
+ {
+ vec2 origCoord = coord + vec2(0.0, 11.0) * uImageIncrement_Stage1_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c0_c0[5].w;
+ {
+ vec2 origCoord = coord + vec2(1.0, 11.0) * uImageIncrement_Stage1_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ _output = sum * uGain_Stage1_c0_c0_c0_c0 + uBias_Stage1_c0_c0_c0_c0;
+ _output.w = clamp(_output.w, 0.0, 1.0);
+ _output.xyz = clamp(_output.xyz, 0.0, _output.w);
+ _output *= _input;
+ return _output;
+}
+vec4 MagnifierEffect_Stage1_c0_c0_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coord = vTransformedCoords_1_Stage0;
+ vec2 zoom_coord = uoffset_Stage1_c0_c0_c1_c0_c0_c0 + coord * vec2(uxInvZoom_Stage1_c0_c0_c1_c0_c0_c0, uyInvZoom_Stage1_c0_c0_c1_c0_c0_c0);
+ vec2 delta = (coord - uboundsUniform_Stage1_c0_c0_c1_c0_c0_c0.xy) * uboundsUniform_Stage1_c0_c0_c1_c0_c0_c0.zw;
+ delta = min(delta, vec2(1.0, 1.0) - delta);
+ delta *= vec2(uxInvInset_Stage1_c0_c0_c1_c0_c0_c0, uyInvInset_Stage1_c0_c0_c1_c0_c0_c0);
+ float weight = 0.0;
+ if (delta.x < 2.0 && delta.y < 2.0) {
+ delta = vec2(2.0, 2.0) - delta;
+ float dist = length(delta);
+ dist = max(2.0 - dist, 0.0);
+ weight = min(dist * dist, 1.0);
+ } else {
+ vec2 delta_squared = delta * delta;
+ weight = min(min(delta_squared.x, delta_squared.y), 1.0);
+ }
+ _output = texture(uTextureSampler_1_Stage1, mix(coord, zoom_coord, weight));
+ return _output;
+}
+vec4 CircleEffect_Stage1_c0_c0_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float d;
+ {
+ d = (length((ucircle_Stage1_c0_c0_c1_c0_c1_c0.xy - gl_FragCoord.xy) * ucircle_Stage1_c0_c0_c1_c0_c1_c0.w) - 1.0) * ucircle_Stage1_c0_c0_c1_c0_c1_c0.z;
+ }
+ {
+ _output = d > 0.5 ? _input : vec4(0.0);
+ }
+ return _output;
+}
+float _blend_color_luminance(vec3 color) {
+ return dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), color);
+}
+vec3 _blend_set_color_luminance(vec3 hueSatColor, float alpha, vec3 lumColor) {
+ float lum = _blend_color_luminance(lumColor);
+ vec3 result = (lum - _blend_color_luminance(hueSatColor)) + hueSatColor;
+ float minComp = min(min(result.x, result.y), result.z);
+ float maxComp = max(max(result.x, result.y), result.z);
+ if (minComp < 0.0 && lum != minComp) {
+ result = lum + ((result - lum) * lum) / (lum - minComp);
+ }
+ if (maxComp > alpha && maxComp != lum) {
+ return lum + ((result - lum) * (alpha - lum)) / (maxComp - lum);
+ }
+ return result;
+}
+vec4 blend_luminosity(vec4 src, vec4 dst) {
+ float alpha = dst.w * src.w;
+ vec3 sda = src.xyz * dst.w;
+ vec3 dsa = dst.xyz * src.w;
+ return vec4((((_blend_set_color_luminance(dsa, alpha, sda) + dst.xyz) - dsa) + src.xyz) - sda, (src.w + dst.w) - alpha);
+}
+vec4 ComposeTwo_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_luminosity(MagnifierEffect_Stage1_c0_c0_c1_c0_c0_c0(inputColor), CircleEffect_Stage1_c0_c0_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 blend_dst_over(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src + dst;
+}
+vec4 ComposeTwo_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_dst_over(MatrixConvolution_Stage1_c0_c0_c0_c0(inputColor), ComposeTwo_Stage1_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 AARectEffect_Stage1_c1_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float alpha;
+ {
+ float xSub, ySub;
+ xSub = min(gl_FragCoord.x - urectUniform_Stage1_c1_c0_c0_c0_c0_c0.x, 0.0);
+ xSub += min(urectUniform_Stage1_c1_c0_c0_c0_c0_c0.z - gl_FragCoord.x, 0.0);
+ ySub = min(gl_FragCoord.y - urectUniform_Stage1_c1_c0_c0_c0_c0_c0.y, 0.0);
+ ySub += min(urectUniform_Stage1_c1_c0_c0_c0_c0_c0.w - gl_FragCoord.y, 0.0);
+ alpha = (1.0 + max(xSub, -1.0)) * (1.0 + max(ySub, -1.0));
+ }
+ _output = _input * alpha;
+ return _output;
+}
+vec4 EllipticalRRect_Stage1_c1_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 dxy0 = uinnerRect_Stage1_c1_c0_c0_c0_c1_c0.xy - gl_FragCoord.xy;
+ vec2 dxy1 = gl_FragCoord.xy - uinnerRect_Stage1_c1_c0_c0_c0_c1_c0.zw;
+ vec2 dxy = max(max(dxy0, dxy1), 0.0);
+ vec2 Z = max(max(dxy0 * uinvRadiiLTRB_Stage1_c1_c0_c0_c0_c1_c0.xy, dxy1 * uinvRadiiLTRB_Stage1_c1_c0_c0_c0_c1_c0.zw), 0.0);
+ float implicit = dot(Z, dxy) - 1.0;
+ float grad_dot = 4.0 * dot(Z, Z);
+ grad_dot = max(grad_dot, 9.9999997473787516e-05);
+ float approx_dist = implicit * inversesqrt(grad_dot);
+ float alpha = clamp(0.5 + approx_dist, 0.0, 1.0);
+ _output = _input * alpha;
+ return _output;
+}
+vec4 ComposeTwo_Stage1_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_dst_over(AARectEffect_Stage1_c1_c0_c0_c0_c0_c0(inputColor), EllipticalRRect_Stage1_c1_c0_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 MatrixConvolution_Stage1_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 sum = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_2_Stage0 - uKernelOffset_Stage1_c1_c0_c1_c0 * uImageIncrement_Stage1_c1_c0_c1_c0;
+ vec4 c;
+ {
+ float k = uKernel_Stage1_c1_c0_c1_c0[0].x;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c1_c0.xy, uTexDom_Stage1_c1_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0_c1_c0[0].y;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1_c1_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c1_c0.xy, uTexDom_Stage1_c1_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0_c1_c0[0].z;
+ {
+ vec2 origCoord = coord + vec2(0.0, 2.0) * uImageIncrement_Stage1_c1_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c1_c0.xy, uTexDom_Stage1_c1_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0_c1_c0[0].w;
+ {
+ vec2 origCoord = coord + vec2(0.0, 3.0) * uImageIncrement_Stage1_c1_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c1_c0.xy, uTexDom_Stage1_c1_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0_c1_c0[1].x;
+ {
+ vec2 origCoord = coord + vec2(0.0, 4.0) * uImageIncrement_Stage1_c1_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c1_c0.xy, uTexDom_Stage1_c1_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0_c1_c0[1].y;
+ {
+ vec2 origCoord = coord + vec2(0.0, 5.0) * uImageIncrement_Stage1_c1_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c1_c0.xy, uTexDom_Stage1_c1_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0_c1_c0[1].z;
+ {
+ vec2 origCoord = coord + vec2(0.0, 6.0) * uImageIncrement_Stage1_c1_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c1_c0.xy, uTexDom_Stage1_c1_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0_c1_c0[1].w;
+ {
+ vec2 origCoord = coord + vec2(0.0, 7.0) * uImageIncrement_Stage1_c1_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c1_c0.xy, uTexDom_Stage1_c1_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0_c1_c0[2].x;
+ {
+ vec2 origCoord = coord + vec2(0.0, 8.0) * uImageIncrement_Stage1_c1_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c1_c0.xy, uTexDom_Stage1_c1_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0_c1_c0[2].y;
+ {
+ vec2 origCoord = coord + vec2(0.0, 9.0) * uImageIncrement_Stage1_c1_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c1_c0.xy, uTexDom_Stage1_c1_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0_c1_c0[2].z;
+ {
+ vec2 origCoord = coord + vec2(0.0, 10.0) * uImageIncrement_Stage1_c1_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c1_c0.xy, uTexDom_Stage1_c1_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ vec2 origCoord = vTransformedCoords_2_Stage0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c1_c0.xy, uTexDom_Stage1_c1_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ _output.w = c.w;
+ _output.xyz = clamp(sum.xyz * uGain_Stage1_c1_c0_c1_c0 + uBias_Stage1_c1_c0_c1_c0, 0.0, 1.0);
+ _output.xyz *= _output.w;
+ _output *= _input;
+ return _output;
+}
+vec4 blend_exclusion(vec4 src, vec4 dst) {
+ return vec4((dst.xyz + src.xyz) - (2.0 * dst.xyz) * src.xyz, src.w + (1.0 - src.w) * dst.w);
+}
+vec4 ComposeTwo_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_exclusion(ComposeTwo_Stage1_c1_c0_c0_c0(inputColor), MatrixConvolution_Stage1_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+float _blend_color_saturation(vec3 color) {
+ return max(max(color.x, color.y), color.z) - min(min(color.x, color.y), color.z);
+}
+vec3 _blend_set_color_saturation_helper(vec3 minMidMax, float sat) {
+ if (minMidMax.x < minMidMax.z) {
+ return vec3(0.0, (sat * (minMidMax.y - minMidMax.x)) / (minMidMax.z - minMidMax.x), sat);
+ }
+ return vec3(0.0);
+}
+vec3 _blend_set_color_saturation(vec3 hueLumColor, vec3 satColor) {
+ float sat = _blend_color_saturation(satColor);
+ if (hueLumColor.x <= hueLumColor.y) {
+ if (hueLumColor.y <= hueLumColor.z) {
+ hueLumColor.xyz = _blend_set_color_saturation_helper(hueLumColor, sat);
+ } else if (hueLumColor.x <= hueLumColor.z) {
+ hueLumColor.xzy = _blend_set_color_saturation_helper(hueLumColor.xzy, sat);
+ } else {
+ hueLumColor.zxy = _blend_set_color_saturation_helper(hueLumColor.zxy, sat);
+ }
+ } else if (hueLumColor.x <= hueLumColor.z) {
+ hueLumColor.yxz = _blend_set_color_saturation_helper(hueLumColor.yxz, sat);
+ } else if (hueLumColor.y <= hueLumColor.z) {
+ hueLumColor.yzx = _blend_set_color_saturation_helper(hueLumColor.yzx, sat);
+ } else {
+ hueLumColor.zyx = _blend_set_color_saturation_helper(hueLumColor.zyx, sat);
+ }
+ return hueLumColor;
+}
+vec4 blend_hue(vec4 src, vec4 dst) {
+ float alpha = dst.w * src.w;
+ vec3 sda = src.xyz * dst.w;
+ vec3 dsa = dst.xyz * src.w;
+ return vec4((((_blend_set_color_luminance(_blend_set_color_saturation(sda, dsa), alpha, dsa) + dst.xyz) - dsa) + src.xyz) - sda, (src.w + dst.w) - alpha);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = uColor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_hue(ComposeTwo_Stage1_c0_c0(inputColor), ComposeTwo_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+in vec2 inPosition;
+out vec2 vTransformedCoords_0_Stage0;
+out vec2 vTransformedCoords_1_Stage0;
+out vec2 vTransformedCoords_2_Stage0;
+void main() {
+ vec3 pos3 = uViewM_Stage0 * vec3(inPosition, 1.0);
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(inPosition, 1.0)).xy;
+ {
+ vec2 _posTmp = vec2(pos3.x / pos3.z, pos3.y / pos3.z);
+ _posTmp = floor(_posTmp) + vec2(0.5, 0.5);
+ gl_Position = vec4(_posTmp, 0.0, 1.0);
+ }
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1054.shader_test b/shaders/skia/1054.shader_test
new file mode 100644
index 0000000..44ccab1
--- /dev/null
+++ b/shaders/skia/1054.shader_test
@@ -0,0 +1,50 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+noperspective in vec4 vinCircleEdge_Stage0;
+noperspective in vec3 vinClipPlane_Stage0;
+noperspective in vec3 vinIsectPlane_Stage0;
+noperspective in vec4 vinColor_Stage0;
+void main() {
+ {
+ vec4 circleEdge;
+ circleEdge = vinCircleEdge_Stage0;
+ vec3 clipPlane;
+ clipPlane = vinClipPlane_Stage0;
+ vec3 isectPlane;
+ isectPlane = vinIsectPlane_Stage0;
+ float d = length(circleEdge.xy);
+ float distanceToOuterEdge = circleEdge.z * (1.0 - d);
+ float edgeAlpha = clamp(distanceToOuterEdge, 0.0, 1.0);
+ float clip = clamp(circleEdge.z * dot(circleEdge.xy, clipPlane.xy) + clipPlane.z, 0.0, 1.0);
+ clip *= clamp(circleEdge.z * dot(circleEdge.xy, isectPlane.xy) + isectPlane.z, 0.0, 1.0);
+ edgeAlpha *= clip;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 inPosition;
+in vec4 inColor;
+in vec4 inCircleEdge;
+in vec3 inClipPlane;
+in vec3 inIsectPlane;
+noperspective out vec4 vinCircleEdge_Stage0;
+noperspective out vec3 vinClipPlane_Stage0;
+noperspective out vec3 vinIsectPlane_Stage0;
+noperspective out vec4 vinColor_Stage0;
+void main() {
+ vinCircleEdge_Stage0 = inCircleEdge;
+ vinClipPlane_Stage0 = inClipPlane;
+ vinIsectPlane_Stage0 = inIsectPlane;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = inPosition;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/106-1.shader_test b/shaders/skia/106-1.shader_test
new file mode 100644
index 0000000..4e6b125
--- /dev/null
+++ b/shaders/skia/106-1.shader_test
@@ -0,0 +1,90 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform mat4 um_Stage2;
+uniform vec4 uv_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+uniform sampler2D uTextureSampler_2_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_1_Stage1, vTransformedCoords_1_Stage0) * _input;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c0_c0_c2_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_2_Stage1, vTransformedCoords_2_Stage0) * _input;
+ return _output;
+}
+vec4 YUVtoRGBEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 planes[3];
+ planes[0] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0));
+ planes[1] = TextureEffect_Stage1_c0_c0_c1_c0(vec4(1.0));
+ planes[2] = TextureEffect_Stage1_c0_c0_c2_c0(vec4(1.0));
+ vec4 color = vec4(planes[0].w, planes[1].x, planes[1].y, planes[2].w);
+ color.xyz *= color.w;
+ _output = color;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = YUVtoRGBEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ vec4 inputColor = output_Stage1;
+ {
+ float nonZeroAlpha = max(inputColor.w, 9.9999997473787516e-05);
+ inputColor = vec4(inputColor.xyz / nonZeroAlpha, inputColor.w);
+ }
+ output_Stage2 = um_Stage2 * inputColor + uv_Stage2;
+ {
+ output_Stage2 = clamp(output_Stage2, 0.0, 1.0);
+ }
+ {
+ output_Stage2.xyz *= output_Stage2.w;
+ }
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/106-14.shader_test b/shaders/skia/106-14.shader_test
new file mode 100644
index 0000000..6993f96
--- /dev/null
+++ b/shaders/skia/106-14.shader_test
@@ -0,0 +1,52 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+in vec2 vEllipseOffsets0_Stage0;
+in vec2 vEllipseOffsets1_Stage0;
+in vec4 vinColor_Stage0;
+void main() {
+ {
+ vec2 scaledOffset = vEllipseOffsets0_Stage0;
+ float test = dot(scaledOffset, scaledOffset) - 1.0;
+ vec2 duvdx = dFdx(vEllipseOffsets0_Stage0);
+ vec2 duvdy = dFdy(vEllipseOffsets0_Stage0);
+ vec2 grad = vec2(vEllipseOffsets0_Stage0.x * duvdx.x + vEllipseOffsets0_Stage0.y * duvdx.y, vEllipseOffsets0_Stage0.x * duvdy.x + vEllipseOffsets0_Stage0.y * duvdy.y);
+ float grad_dot = 4.0 * dot(grad, grad);
+ grad_dot = max(grad_dot, 1.1754999560161448e-38);
+ float invlen = inversesqrt(grad_dot);
+ float edgeAlpha = clamp(0.5 - test * invlen, 0.0, 1.0);
+ scaledOffset = vEllipseOffsets1_Stage0;
+ test = dot(scaledOffset, scaledOffset) - 1.0;
+ duvdx = dFdx(vEllipseOffsets1_Stage0);
+ duvdy = dFdy(vEllipseOffsets1_Stage0);
+ grad = vec2(vEllipseOffsets1_Stage0.x * duvdx.x + vEllipseOffsets1_Stage0.y * duvdx.y, vEllipseOffsets1_Stage0.x * duvdy.x + vEllipseOffsets1_Stage0.y * duvdy.y);
+ grad_dot = 4.0 * dot(grad, grad);
+ invlen = inversesqrt(grad_dot);
+ edgeAlpha *= clamp(0.5 + test * invlen, 0.0, 1.0);
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec2 inEllipseOffsets0;
+in vec2 inEllipseOffsets1;
+out vec2 vEllipseOffsets0_Stage0;
+out vec2 vEllipseOffsets1_Stage0;
+out vec4 vinColor_Stage0;
+void main() {
+ vEllipseOffsets0_Stage0 = inEllipseOffsets0;
+ vEllipseOffsets1_Stage0 = inEllipseOffsets1;
+ vinColor_Stage0 = inColor;
+ vec3 pos3 = uViewM_Stage0 * vec3(inPosition, 1.0);
+ gl_Position = vec4(pos3.x, pos3.y, 0.0, pos3.z);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/106-15.shader_test b/shaders/skia/106-15.shader_test
new file mode 100644
index 0000000..33bd6a1
--- /dev/null
+++ b/shaders/skia/106-15.shader_test
@@ -0,0 +1,51 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform float uPixelSize_Stage2;
+uniform vec2 uRange_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = vec4(1.0, 1.0, 1.0, 1.0);
+ vec2 coord = vTransformedCoords_1_Stage0;
+ coord.y -= 5.0 * uPixelSize_Stage2;
+ for (int i = 0;i < 11; i++) {
+ output_Stage2 = min(output_Stage2, texture(uTextureSampler_0_Stage2, coord));
+ coord.y += uPixelSize_Stage2;
+ }
+ output_Stage2 *= output_Stage1;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/106-2.shader_test b/shaders/skia/106-2.shader_test
new file mode 100644
index 0000000..02f13d9
--- /dev/null
+++ b/shaders/skia/106-2.shader_test
@@ -0,0 +1,152 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage2_c1_c0;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.w) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ } else {
+ {
+ if (t < uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = OverrideInputFragmentProcessor_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c1_c0;
+ }
+ return _output;
+}
+vec4 blend_dst_over(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src + dst;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 blend_darken(vec4 src, vec4 dst) {
+ vec4 result = blend_src_over(src, dst);
+ result.xyz = min(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
+ return result;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_dst_over(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_darken(ConstColorProcessor_Stage2_c1_c0(vec4(1.0)), output_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 inColor;
+in vec2 inLocalCoord;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/106-4.shader_test b/shaders/skia/106-4.shader_test
new file mode 100644
index 0000000..c3f4a74
--- /dev/null
+++ b/shaders/skia/106-4.shader_test
@@ -0,0 +1,51 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uColor_Stage0;
+uniform vec3 uedges_Stage1[4];
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = uColor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ float alpha = 1.0;
+ float edge;
+ edge = dot(uedges_Stage1[0], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage1[1], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage1[2], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage1[3], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ output_Stage1 = vec4(alpha);
+ }
+ {
+ sk_FragColor = outputColor_Stage0 * output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 inPosition;
+void main() {
+ vec2 pos2 = (uViewM_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/106-5.shader_test b/shaders/skia/106-5.shader_test
new file mode 100644
index 0000000..8cbf329
--- /dev/null
+++ b/shaders/skia/106-5.shader_test
@@ -0,0 +1,81 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage2_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c1_c0;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_dst_in(ConstColorProcessor_Stage2_c1_c0(vec4(1.0)), output_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/106-6.shader_test b/shaders/skia/106-6.shader_test
new file mode 100644
index 0000000..e289da8
--- /dev/null
+++ b/shaders/skia/106-6.shader_test
@@ -0,0 +1,140 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform float uSurfaceScale_Stage1;
+uniform vec3 uLightColor_Stage1;
+uniform float uKS_Stage1;
+uniform float uShininess_Stage1;
+uniform vec3 uLightLocation_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 light_Stage1(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ vec3 halfDir = normalize(surfaceToLight + vec3(0.0, 0.0, 1.0));
+ float colorScale = uKS_Stage1 * pow(dot(normal, halfDir), uShininess_Stage1);
+ vec3 color = lightColor * clamp(colorScale, 0.0, 1.0);
+ return vec4(color, max(max(color.x, color.y), color.z));
+}
+float sobel_Stage1(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage1(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage1(float m[9], float surfaceScale) {
+ return pointToNormal_Stage1(sobel_Stage1(m[1], m[2], m[4], m[5], 0.0, 0.0, 0.66666698455810547), sobel_Stage1(0.0, 0.0, m[1], m[4], m[2], m[5], 0.66666698455810547), surfaceScale);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ vec2 coord = vTransformedCoords_0_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp0 = textureColor;
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp1 = textureColor;
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp2 = textureColor;
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp3 = textureColor;
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp4 = textureColor;
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp5 = textureColor;
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp6 = textureColor;
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp7 = textureColor;
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp8 = textureColor;
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = normalize(uLightLocation_Stage1 - vec3(gl_FragCoord.xy, uSurfaceScale_Stage1 * m[4]));
+ output_Stage1 = light_Stage1(normal_Stage1(m, uSurfaceScale_Stage1), surfaceToLight, uLightColor_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/106-7.shader_test b/shaders/skia/106-7.shader_test
new file mode 100644
index 0000000..3f34040
--- /dev/null
+++ b/shaders/skia/106-7.shader_test
@@ -0,0 +1,101 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+uniform vec2 uDstTextureUpperLeft_Stage2;
+uniform vec2 uDstTextureCoordScale_Stage2;
+uniform sampler2D uTextureSampler_0_Stage0;
+uniform sampler2D uDstTextureSampler_Stage2;
+noperspective in vec2 vTextureCoords_Stage0;
+flat in int vTexIndex_Stage0;
+noperspective in vec4 vinColor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ t.x = fract(t.x);
+ }
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ vec4 texColor;
+ {
+ texColor = texture(uTextureSampler_0_Stage0, vTextureCoords_Stage0);
+ }
+ outputCoverage_Stage0 = texColor;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TiledGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ if (all(lessThanEqual(outputCoverage_Stage0.xyz, vec3(0.0)))) {
+ discard;
+ }
+ vec2 _dstTexCoord = (gl_FragCoord.xy - uDstTextureUpperLeft_Stage2) * uDstTextureCoordScale_Stage2;
+ _dstTexCoord.y = 1.0 - _dstTexCoord.y;
+ vec4 _dstColor = texture(uDstTextureSampler_Stage2, _dstTexCoord);
+ sk_FragColor = blend_dst_in(output_Stage1, _dstColor);
+ float lerpRed = mix(_dstColor.w, sk_FragColor.w, outputCoverage_Stage0.x);
+ float lerpBlue = mix(_dstColor.w, sk_FragColor.w, outputCoverage_Stage0.y);
+ float lerpGreen = mix(_dstColor.w, sk_FragColor.w, outputCoverage_Stage0.z);
+ sk_FragColor = outputCoverage_Stage0 * sk_FragColor + (vec4(1.0) - outputCoverage_Stage0) * _dstColor;
+ sk_FragColor.w = max(max(lerpRed, lerpBlue), lerpGreen);
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform vec2 uAtlasSizeInv_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in uvec2 inTextureCoords;
+noperspective out vec2 vTextureCoords_Stage0;
+flat out int vTexIndex_Stage0;
+noperspective out vec4 vinColor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ ivec2 signedCoords = ivec2(int(inTextureCoords.x), int(inTextureCoords.y));
+ vec2 unormTexCoords = vec2(float(signedCoords.x / 2), float(signedCoords.y / 2));
+ vTextureCoords_Stage0 = unormTexCoords * uAtlasSizeInv_Stage0;
+ vTexIndex_Stage0 = 0;
+ vinColor_Stage0 = inColor;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(inPosition.x, inPosition.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/106.shader_test b/shaders/skia/106.shader_test
new file mode 100644
index 0000000..e5c8450
--- /dev/null
+++ b/shaders/skia/106.shader_test
@@ -0,0 +1,138 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform float uSrcTF_Stage1_c0_c0[7];
+uniform mat3 uColorXform_Stage1_c0_c0;
+uniform float uDstTF_Stage1_c0_c0[7];
+uniform mat3 ucolorSpaceMatrix_Stage1_c0_c0_c0_c0;
+uniform vec3 ucolorSpaceTranslate_Stage1_c0_c0_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+uniform sampler2D uTextureSampler_2_Stage1;
+uniform sampler2D uTextureSampler_3_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+noperspective in vec2 vTransformedCoords_3_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_1_Stage1, vTransformedCoords_1_Stage0) * _input;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c0_c0_c0_c0_c2_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_2_Stage1, vTransformedCoords_2_Stage0) * _input;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c0_c0_c0_c0_c3_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_3_Stage1, vTransformedCoords_3_Stage0) * _input;
+ return _output;
+}
+vec4 YUVtoRGBEffect_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 planes[4];
+ planes[0] = TextureEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ planes[1] = TextureEffect_Stage1_c0_c0_c0_c0_c1_c0(vec4(1.0));
+ planes[2] = TextureEffect_Stage1_c0_c0_c0_c0_c2_c0(vec4(1.0));
+ planes[3] = TextureEffect_Stage1_c0_c0_c0_c0_c3_c0(vec4(1.0));
+ vec4 color = vec4(planes[0].x, planes[2].x, planes[1].x, planes[3].w);
+ color.xyz = clamp(color.xyz * ucolorSpaceMatrix_Stage1_c0_c0_c0_c0 + ucolorSpaceTranslate_Stage1_c0_c0_c0_c0, 0.0, 1.0);
+ color.xyz *= color.w;
+ _output = color;
+ return _output;
+}
+float src_tf_Stage1_c0_c0(float x) {
+ float G = uSrcTF_Stage1_c0_c0[0];
+ float A = uSrcTF_Stage1_c0_c0[1];
+ float B = uSrcTF_Stage1_c0_c0[2];
+ float C = uSrcTF_Stage1_c0_c0[3];
+ float D = uSrcTF_Stage1_c0_c0[4];
+ float E = uSrcTF_Stage1_c0_c0[5];
+ float F = uSrcTF_Stage1_c0_c0[6];
+ float s = sign(x);
+ x = abs(x);
+ x = x < D ? C * x + F : pow(A * x + B, G) + E;
+ return s * x;
+}
+float dst_tf_Stage1_c0_c0(float x) {
+ float G = uDstTF_Stage1_c0_c0[0];
+ float A = uDstTF_Stage1_c0_c0[1];
+ float B = uDstTF_Stage1_c0_c0[2];
+ float C = uDstTF_Stage1_c0_c0[3];
+ float D = uDstTF_Stage1_c0_c0[4];
+ float E = uDstTF_Stage1_c0_c0[5];
+ float F = uDstTF_Stage1_c0_c0[6];
+ float s = sign(x);
+ x = abs(x);
+ x = x < D ? C * x + F : pow(A * x + B, G) + E;
+ return s * x;
+}
+vec4 gamut_xform_Stage1_c0_c0(vec4 color) {
+ color.xyz = uColorXform_Stage1_c0_c0 * color.xyz;
+ return color;
+}
+vec4 color_xform_Stage1_c0_c0(vec4 color) {
+ float nonZeroAlpha = max(color.w, 9.9999997473787516e-05);
+ color = vec4(color.xyz / nonZeroAlpha, nonZeroAlpha);
+ color.x = src_tf_Stage1_c0_c0(color.x);
+ color.y = src_tf_Stage1_c0_c0(color.y);
+ color.z = src_tf_Stage1_c0_c0(color.z);
+ color = gamut_xform_Stage1_c0_c0(color);
+ color.x = dst_tf_Stage1_c0_c0(color.x);
+ color.y = dst_tf_Stage1_c0_c0(color.y);
+ color.z = dst_tf_Stage1_c0_c0(color.z);
+ color.xyz *= color.w;
+ return color;
+}
+vec4 ColorSpaceXform_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = color_xform_Stage1_c0_c0(YUVtoRGBEffect_Stage1_c0_c0_c0_c0(vec4(1.0))) * _input;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ColorSpaceXform_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+uniform mat3 uCoordTransformMatrix_3_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+noperspective out vec2 vTransformedCoords_3_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_3_Stage0 = (uCoordTransformMatrix_3_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1060.shader_test b/shaders/skia/1060.shader_test
new file mode 100644
index 0000000..ae0fb8d
--- /dev/null
+++ b/shaders/skia/1060.shader_test
@@ -0,0 +1,65 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 ucolor_Stage1;
+uniform sampler2D uTextureSampler_0_Stage0;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vtextureCoords_Stage0;
+flat in vec4 vtextureDomain_Stage0;
+flat in vec4 vcolor_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ vec2 textureCoords;
+ textureCoords = vtextureCoords_Stage0;
+ vec4 textureDomain;
+ textureDomain = vtextureDomain_Stage0;
+ outputColor_Stage0 = vcolor_Stage0;
+ outputColor_Stage0 = texture(uTextureSampler_0_Stage0, clamp(textureCoords, textureDomain.xy, textureDomain.zw)) * outputColor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ {
+ output_Stage1 = ucolor_Stage1;
+ }
+ }
+ vec4 output_Stage2;
+ {
+ float nonZeroAlpha = max(output_Stage1.w, 9.9999997473787516e-05);
+ vec4 coord = vec4(output_Stage1.xyz / nonZeroAlpha, nonZeroAlpha);
+ coord = coord * 0.9960939884185791 + vec4(0.0019529999699443579, 0.0019529999699443579, 0.0019529999699443579, 0.0019529999699443579);
+ output_Stage2.w = texture(uTextureSampler_0_Stage2, vec2(coord.w, 0.125)).w;
+ output_Stage2.x = texture(uTextureSampler_0_Stage2, vec2(coord.x, 0.375)).w;
+ output_Stage2.y = texture(uTextureSampler_0_Stage2, vec2(coord.y, 0.625)).w;
+ output_Stage2.z = texture(uTextureSampler_0_Stage2, vec2(coord.z, 0.875)).w;
+ output_Stage2.xyz *= output_Stage2.w;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 position;
+in vec2 textureCoords;
+in vec4 textureDomain;
+in vec4 color;
+noperspective out vec2 vtextureCoords_Stage0;
+flat out vec4 vtextureDomain_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vec2 pos2 = position;
+ vtextureCoords_Stage0 = textureCoords;
+ vtextureDomain_Stage0 = textureDomain;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1063.shader_test b/shaders/skia/1063.shader_test
new file mode 100644
index 0000000..6ee1cc7
--- /dev/null
+++ b/shaders/skia/1063.shader_test
@@ -0,0 +1,27 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+noperspective in vec4 vcolor_Stage0;
+void main() {
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 inPosition;
+in vec4 inColor;
+in float inCoverage;
+noperspective out vec4 vcolor_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color * inCoverage;
+ vcolor_Stage0 = color;
+ vec2 pos2 = inPosition;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1069.shader_test b/shaders/skia/1069.shader_test
new file mode 100644
index 0000000..457d6c6
--- /dev/null
+++ b/shaders/skia/1069.shader_test
@@ -0,0 +1,257 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_KHR_blend_equation_advanced : require
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+layout (blend_support_all_equations) out ;
+uniform vec4 urectH_Stage1_c0_c0_c1_c0_c0_c0;
+uniform float uinvSixSigma_Stage1_c0_c0_c1_c0_c0_c0;
+uniform vec4 uellipse_Stage1_c0_c0_c1_c0_c1_c0;
+uniform vec4 urectUniform_Stage1_c1_c0_c0_c0_c1_c0;
+uniform float uPixelSize_Stage1_c1_c0_c1_c0_c0_c0;
+uniform vec2 uRange_Stage1_c1_c0_c1_c0_c0_c0;
+uniform float uPixelSize_Stage1_c1_c0_c1_c0_c1_c0;
+uniform vec2 uRange_Stage1_c1_c0_c1_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+uniform sampler2D uTextureSampler_2_Stage1;
+uniform sampler2D uTextureSampler_3_Stage1;
+uniform sampler2D uTextureSampler_4_Stage1;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+vec4 ColorTableEffect_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float nonZeroAlpha = max(_input.w, 9.9999997473787516e-05);
+ vec4 coord = vec4(_input.xyz / nonZeroAlpha, nonZeroAlpha);
+ coord = coord * 0.9960939884185791 + vec4(0.0019529999699443579, 0.0019529999699443579, 0.0019529999699443579, 0.0019529999699443579);
+ _output.w = texture(uTextureSampler_0_Stage1, vec2(coord.w, 0.125)).w;
+ _output.x = texture(uTextureSampler_0_Stage1, vec2(coord.x, 0.375)).w;
+ _output.y = texture(uTextureSampler_0_Stage1, vec2(coord.y, 0.625)).w;
+ _output.z = texture(uTextureSampler_0_Stage1, vec2(coord.z, 0.875)).w;
+ _output.xyz *= _output.w;
+ return _output;
+}
+vec4 RectBlurEffect_Stage1_c0_c0_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float xCoverage, yCoverage;
+ {
+ float x, y;
+ {
+ x = max(urectH_Stage1_c0_c0_c1_c0_c0_c0.x - gl_FragCoord.x, gl_FragCoord.x - urectH_Stage1_c0_c0_c1_c0_c0_c0.z);
+ y = max(urectH_Stage1_c0_c0_c1_c0_c0_c0.y - gl_FragCoord.y, gl_FragCoord.y - urectH_Stage1_c0_c0_c1_c0_c0_c0.w);
+ }
+ xCoverage = texture(uTextureSampler_1_Stage1, vec2(x * uinvSixSigma_Stage1_c0_c0_c1_c0_c0_c0, 0.5)).w;
+ yCoverage = texture(uTextureSampler_1_Stage1, vec2(y * uinvSixSigma_Stage1_c0_c0_c1_c0_c0_c0, 0.5)).w;
+ _output = (_input * xCoverage) * yCoverage;
+ }
+ _output = (_input * xCoverage) * yCoverage;
+ return _output;
+}
+vec4 EllipseEffect_Stage1_c0_c0_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 d = gl_FragCoord.xy - uellipse_Stage1_c0_c0_c1_c0_c1_c0.xy;
+ vec2 Z = d * uellipse_Stage1_c0_c0_c1_c0_c1_c0.zw;
+ float implicit = dot(Z, d) - 1.0;
+ float grad_dot = 4.0 * dot(Z, Z);
+ {
+ grad_dot = max(grad_dot, 1.1754999560161448e-38);
+ }
+ float approx_dist = implicit * inversesqrt(grad_dot);
+ float alpha;
+ {
+ alpha = approx_dist > 0.0 ? 1.0 : 0.0;
+ }
+ _output = _input * alpha;
+ return _output;
+}
+vec4 blend_src_atop(vec4 src, vec4 dst) {
+ return dst.w * src + (1.0 - src.w) * dst;
+}
+vec4 ComposeTwo_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_src_atop(RectBlurEffect_Stage1_c0_c0_c1_c0_c0_c0(inputColor), EllipseEffect_Stage1_c0_c0_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 blend_dst_out(vec4 src, vec4 dst) {
+ return (1.0 - src.w) * dst;
+}
+vec4 ComposeTwo_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_dst_out(ColorTableEffect_Stage1_c0_c0_c0_c0(inputColor), ComposeTwo_Stage1_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c1_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_2_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+vec4 AARectEffect_Stage1_c1_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float alpha;
+ {
+ alpha = float(all(greaterThan(vec4(gl_FragCoord.xy, urectUniform_Stage1_c1_c0_c0_c0_c1_c0.zw), vec4(urectUniform_Stage1_c1_c0_c0_c0_c1_c0.xy, gl_FragCoord.xy))) ? 1 : 0);
+ }
+ {
+ alpha = 1.0 - alpha;
+ }
+ _output = _input * alpha;
+ return _output;
+}
+float _blend_color_luminance(vec3 color) {
+ return dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), color);
+}
+vec3 _blend_set_color_luminance(vec3 hueSatColor, float alpha, vec3 lumColor) {
+ float lum = _blend_color_luminance(lumColor);
+ vec3 result = (lum - _blend_color_luminance(hueSatColor)) + hueSatColor;
+ float minComp = min(min(result.x, result.y), result.z);
+ float maxComp = max(max(result.x, result.y), result.z);
+ if (minComp < 0.0 && lum != minComp) {
+ result = lum + ((result - lum) * lum) / (lum - minComp);
+ }
+ if (maxComp > alpha && maxComp != lum) {
+ return lum + ((result - lum) * (alpha - lum)) / (maxComp - lum);
+ }
+ return result;
+}
+vec4 blend_luminosity(vec4 src, vec4 dst) {
+ float alpha = dst.w * src.w;
+ vec3 sda = src.xyz * dst.w;
+ vec3 dsa = dst.xyz * src.w;
+ return vec4((((_blend_set_color_luminance(dsa, alpha, sda) + dst.xyz) - dsa) + src.xyz) - sda, (src.w + dst.w) - alpha);
+}
+vec4 ComposeTwo_Stage1_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_luminosity(TextureEffect_Stage1_c1_c0_c0_c0_c0_c0(inputColor), AARectEffect_Stage1_c1_c0_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 Morphology_Stage1_c1_c0_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_1_Stage0;
+ coord.x -= 6.0 * uPixelSize_Stage1_c1_c0_c1_c0_c0_c0;
+ for (int i = 0;i < 13; i++) {
+ _output = max(_output, texture(uTextureSampler_3_Stage1, coord));
+ coord.x += uPixelSize_Stage1_c1_c0_c1_c0_c0_c0;
+ }
+ _output *= _input;
+ return _output;
+}
+vec4 Morphology_Stage1_c1_c0_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_2_Stage0;
+ coord.y -= 7.0 * uPixelSize_Stage1_c1_c0_c1_c0_c1_c0;
+ for (int i = 0;i < 15; i++) {
+ _output = max(_output, texture(uTextureSampler_4_Stage1, coord));
+ coord.y += uPixelSize_Stage1_c1_c0_c1_c0_c1_c0;
+ }
+ _output *= _input;
+ return _output;
+}
+float _blend_color_saturation(vec3 color) {
+ return max(max(color.x, color.y), color.z) - min(min(color.x, color.y), color.z);
+}
+vec3 _blend_set_color_saturation_helper(vec3 minMidMax, float sat) {
+ if (minMidMax.x < minMidMax.z) {
+ return vec3(0.0, (sat * (minMidMax.y - minMidMax.x)) / (minMidMax.z - minMidMax.x), sat);
+ }
+ return vec3(0.0);
+}
+vec3 _blend_set_color_saturation(vec3 hueLumColor, vec3 satColor) {
+ float sat = _blend_color_saturation(satColor);
+ if (hueLumColor.x <= hueLumColor.y) {
+ if (hueLumColor.y <= hueLumColor.z) {
+ hueLumColor.xyz = _blend_set_color_saturation_helper(hueLumColor, sat);
+ } else if (hueLumColor.x <= hueLumColor.z) {
+ hueLumColor.xzy = _blend_set_color_saturation_helper(hueLumColor.xzy, sat);
+ } else {
+ hueLumColor.zxy = _blend_set_color_saturation_helper(hueLumColor.zxy, sat);
+ }
+ } else if (hueLumColor.x <= hueLumColor.z) {
+ hueLumColor.yxz = _blend_set_color_saturation_helper(hueLumColor.yxz, sat);
+ } else if (hueLumColor.y <= hueLumColor.z) {
+ hueLumColor.yzx = _blend_set_color_saturation_helper(hueLumColor.yzx, sat);
+ } else {
+ hueLumColor.zyx = _blend_set_color_saturation_helper(hueLumColor.zyx, sat);
+ }
+ return hueLumColor;
+}
+vec4 blend_hue(vec4 src, vec4 dst) {
+ float alpha = dst.w * src.w;
+ vec3 sda = src.xyz * dst.w;
+ vec3 dsa = dst.xyz * src.w;
+ return vec4((((_blend_set_color_luminance(_blend_set_color_saturation(sda, dsa), alpha, dsa) + dst.xyz) - dsa) + src.xyz) - sda, (src.w + dst.w) - alpha);
+}
+vec4 ComposeTwo_Stage1_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_hue(Morphology_Stage1_c1_c0_c1_c0_c0_c0(inputColor), Morphology_Stage1_c1_c0_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 blend_saturation(vec4 src, vec4 dst) {
+ float alpha = dst.w * src.w;
+ vec3 sda = src.xyz * dst.w;
+ vec3 dsa = dst.xyz * src.w;
+ return vec4((((_blend_set_color_luminance(_blend_set_color_saturation(dsa, sda), alpha, dsa) + dst.xyz) - dsa) + src.xyz) - sda, (src.w + dst.w) - alpha);
+}
+vec4 ComposeTwo_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_saturation(ComposeTwo_Stage1_c1_c0_c0_c0(inputColor), ComposeTwo_Stage1_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_dst_out(ComposeTwo_Stage1_c0_c0(inputColor), ComposeTwo_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+void main() {
+ vec4 color = inColor;
+ vcolor_Stage0 = color;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1072.shader_test b/shaders/skia/1072.shader_test
new file mode 100644
index 0000000..e2a2395
--- /dev/null
+++ b/shaders/skia/1072.shader_test
@@ -0,0 +1,65 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec3 uedges_Stage1[5];
+uniform vec4 ucolor_Stage2;
+noperspective in vec2 vEllipseOffsets_Stage0;
+noperspective in vec4 vEllipseRadii_Stage0;
+noperspective in vec4 vinColor_Stage0;
+void main() {
+ {
+ vec2 offset = vEllipseOffsets_Stage0;
+ vec2 grad = (2.0 * offset) * vEllipseRadii_Stage0.xy;
+ float grad_dot = dot(grad, grad);
+ grad_dot = max(grad_dot, 1.1754999560161448e-38);
+ }
+ {
+ float alpha = 1.0;
+ float edge;
+ edge = dot(uedges_Stage1[0], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage1[1], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage1[2], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage1[3], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage1[4], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ }
+ {
+ sk_FragColor = vec4(0.0);
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 inPosition;
+in vec4 inColor;
+in vec2 inEllipseOffset;
+in vec4 inEllipseRadii;
+noperspective out vec2 vEllipseOffsets_Stage0;
+noperspective out vec4 vEllipseRadii_Stage0;
+noperspective out vec4 vinColor_Stage0;
+void main() {
+ vEllipseOffsets_Stage0 = inEllipseOffset;
+ vEllipseRadii_Stage0 = inEllipseRadii;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = inPosition;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1075.shader_test b/shaders/skia/1075.shader_test
new file mode 100644
index 0000000..05726de
--- /dev/null
+++ b/shaders/skia/1075.shader_test
@@ -0,0 +1,160 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_KHR_blend_equation_advanced : require
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+layout (blend_support_all_equations) out ;
+uniform vec4 uinnerRect_Stage1;
+uniform vec4 uinvRadiiLTRB_Stage1;
+uniform vec4 uellipse_Stage2;
+uniform vec4 ucircleData_Stage3;
+uniform vec4 ucircleData_Stage4_c0_c0;
+uniform float uinnerThreshold_Stage4_c1_c0;
+uniform float uouterThreshold_Stage4_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage3;
+uniform sampler2D uTextureSampler_0_Stage4;
+uniform sampler2D uTextureSampler_1_Stage4;
+uniform sampler2D uTextureSampler_0_Stage5;
+noperspective in vec2 vEllipseOffsets_Stage0;
+noperspective in vec4 vEllipseRadii_Stage0;
+noperspective in vec4 vinColor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 CircleBlurFragmentProcessor_Stage4_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 vec = vec2((gl_FragCoord.x - ucircleData_Stage4_c0_c0.x) * ucircleData_Stage4_c0_c0.w, (gl_FragCoord.y - ucircleData_Stage4_c0_c0.y) * ucircleData_Stage4_c0_c0.w);
+ float dist = length(vec) + (0.5 - ucircleData_Stage4_c0_c0.z) * ucircleData_Stage4_c0_c0.w;
+ _output = _input * texture(uTextureSampler_0_Stage4, vec2(dist, 0.5)).w;
+ return _output;
+}
+vec4 AlphaThresholdFragmentProcessor_Stage4_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 color = _input;
+ vec4 mask_color = texture(uTextureSampler_1_Stage4, vTransformedCoords_0_Stage0);
+ if (mask_color.w < 0.5) {
+ if (color.w > uouterThreshold_Stage4_c1_c0) {
+ float scale = uouterThreshold_Stage4_c1_c0 / color.w;
+ color.xyz *= scale;
+ color.w = uouterThreshold_Stage4_c1_c0;
+ }
+ } else if (color.w < uinnerThreshold_Stage4_c1_c0) {
+ float scale = uinnerThreshold_Stage4_c1_c0 / max(0.0010000000474974513, color.w);
+ color.xyz *= scale;
+ color.w = uinnerThreshold_Stage4_c1_c0;
+ }
+ _output = color;
+ return _output;
+}
+float _guarded_divide(float n, float d) {
+ return n / d;
+}
+float _color_dodge_component(float sc, float sa, float dc, float da) {
+ if (dc == 0.0) {
+ return sc * (1.0 - da);
+ } else {
+ float d = sa - sc;
+ if (d == 0.0) {
+ return (sa * da + sc * (1.0 - da)) + dc * (1.0 - sa);
+ }
+ d = min(da, _guarded_divide(dc * sa, d));
+ return (d * sa + sc * (1.0 - da)) + dc * (1.0 - sa);
+ }
+}
+vec4 blend_color_dodge(vec4 src, vec4 dst) {
+ return vec4(_color_dodge_component(src.x, src.w, dst.x, dst.w), _color_dodge_component(src.y, src.w, dst.y, dst.w), _color_dodge_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vinColor_Stage0;
+ vec2 offset = vEllipseOffsets_Stage0;
+ float test = dot(offset, offset) - 1.0;
+ vec2 grad = (2.0 * offset) * vEllipseRadii_Stage0.xy;
+ float grad_dot = dot(grad, grad);
+ grad_dot = max(grad_dot, 1.1754999560161448e-38);
+ float invlen = inversesqrt(grad_dot);
+ float edgeAlpha = clamp(0.5 - test * invlen, 0.0, 1.0);
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ vec4 output_Stage1;
+ {
+ vec2 dxy0 = uinnerRect_Stage1.xy - gl_FragCoord.xy;
+ vec2 dxy1 = gl_FragCoord.xy - uinnerRect_Stage1.zw;
+ vec2 dxy = max(max(dxy0, dxy1), 0.0);
+ vec2 Z = max(max(dxy0 * uinvRadiiLTRB_Stage1.xy, dxy1 * uinvRadiiLTRB_Stage1.zw), 0.0);
+ float implicit = dot(Z, dxy) - 1.0;
+ float grad_dot = 4.0 * dot(Z, Z);
+ grad_dot = max(grad_dot, 9.9999997473787516e-05);
+ float approx_dist = implicit * inversesqrt(grad_dot);
+ float alpha = clamp(0.5 - approx_dist, 0.0, 1.0);
+ output_Stage1 = outputColor_Stage0 * alpha;
+ }
+ vec4 output_Stage2;
+ {
+ vec2 d = gl_FragCoord.xy - uellipse_Stage2.xy;
+ vec2 Z = d * uellipse_Stage2.zw;
+ float implicit = dot(Z, d) - 1.0;
+ float grad_dot = 4.0 * dot(Z, Z);
+ {
+ grad_dot = max(grad_dot, 1.1754999560161448e-38);
+ }
+ float approx_dist = implicit * inversesqrt(grad_dot);
+ float alpha;
+ {
+ alpha = clamp(0.5 - approx_dist, 0.0, 1.0);
+ }
+ output_Stage2 = outputCoverage_Stage0 * alpha;
+ }
+ vec4 output_Stage3;
+ {
+ vec2 vec = vec2((gl_FragCoord.x - ucircleData_Stage3.x) * ucircleData_Stage3.w, (gl_FragCoord.y - ucircleData_Stage3.y) * ucircleData_Stage3.w);
+ float dist = length(vec) + (0.5 - ucircleData_Stage3.z) * ucircleData_Stage3.w;
+ output_Stage3 = output_Stage2 * texture(uTextureSampler_0_Stage3, vec2(dist, 0.5)).w;
+ }
+ vec4 output_Stage4;
+ {
+ vec4 inputColor = vec4(output_Stage3.xyz, 1.0);
+ output_Stage4 = blend_color_dodge(CircleBlurFragmentProcessor_Stage4_c0_c0(inputColor), AlphaThresholdFragmentProcessor_Stage4_c1_c0(inputColor));
+ output_Stage4 *= output_Stage3.w;
+ }
+ vec4 output_Stage5;
+ {
+ output_Stage5 = texture(uTextureSampler_0_Stage5, vTransformedCoords_1_Stage0) * output_Stage4;
+ }
+ {
+ sk_FragColor = output_Stage5 * output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec2 inEllipseOffset;
+in vec4 inEllipseRadii;
+noperspective out vec2 vEllipseOffsets_Stage0;
+noperspective out vec4 vEllipseRadii_Stage0;
+noperspective out vec4 vinColor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vEllipseOffsets_Stage0 = inEllipseOffset;
+ vEllipseRadii_Stage0 = inEllipseRadii;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1078.shader_test b/shaders/skia/1078.shader_test
new file mode 100644
index 0000000..252186f
--- /dev/null
+++ b/shaders/skia/1078.shader_test
@@ -0,0 +1,25 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uColor_Stage0;
+void main() {
+ {
+ sk_FragColor = 1.0 - vec4(1.0);
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 inPosition;
+void main() {
+ vec2 pos2 = inPosition;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1081.shader_test b/shaders/skia/1081.shader_test
new file mode 100644
index 0000000..724f9b3
--- /dev/null
+++ b/shaders/skia/1081.shader_test
@@ -0,0 +1,53 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_KHR_blend_equation_advanced : require
+out vec4 sk_FragColor;
+layout (blend_support_all_equations) out ;
+uniform float uPixelSize_Stage1;
+uniform vec2 uRange_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+in vec4 vcolor_Stage0;
+in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = vec4(1.0, 1.0, 1.0, 1.0);
+ vec2 coord = vTransformedCoords_0_Stage0;
+ coord.y -= 8.0 * uPixelSize_Stage1;
+ for (int i = 0;i < 17; i++) {
+ output_Stage1 = min(output_Stage1, texture(uTextureSampler_0_Stage1, coord));
+ coord.y += uPixelSize_Stage1;
+ }
+ }
+ {
+ sk_FragColor = output_Stage1 * outputColor_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+out vec4 vcolor_Stage0;
+out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 color = inColor;
+ vcolor_Stage0 = color;
+ vec3 pos3 = uViewM_Stage0 * vec3(inPosition, 1.0);
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos3.x, pos3.y, 0.0, pos3.z);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1084.shader_test b/shaders/skia/1084.shader_test
new file mode 100644
index 0000000..43593e3
--- /dev/null
+++ b/shaders/skia/1084.shader_test
@@ -0,0 +1,40 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+noperspective in vec4 vQuadEdge_Stage0;
+noperspective in vec4 vinColor_Stage0;
+void main() {
+ {
+ float edgeAlpha;
+ vec2 duvdx = dFdx(vQuadEdge_Stage0.xy);
+ vec2 duvdy = dFdy(vQuadEdge_Stage0.xy);
+ if (vQuadEdge_Stage0.z > 0.0 && vQuadEdge_Stage0.w > 0.0) {
+ edgeAlpha = min(min(vQuadEdge_Stage0.z, vQuadEdge_Stage0.w) + 0.5, 1.0);
+ } else {
+ vec2 gF = vec2((2.0 * vQuadEdge_Stage0.x) * duvdx.x - duvdx.y, (2.0 * vQuadEdge_Stage0.x) * duvdy.x - duvdy.y);
+ edgeAlpha = vQuadEdge_Stage0.x * vQuadEdge_Stage0.x - vQuadEdge_Stage0.y;
+ edgeAlpha = clamp(0.5 - edgeAlpha / length(gF), 0.0, 1.0);
+ }
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 inPosition;
+in vec4 inColor;
+in vec4 inQuadEdge;
+noperspective out vec4 vQuadEdge_Stage0;
+noperspective out vec4 vinColor_Stage0;
+void main() {
+ vQuadEdge_Stage0 = inQuadEdge;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = inPosition;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/109-14.shader_test b/shaders/skia/109-14.shader_test
new file mode 100644
index 0000000..eb47f8f
--- /dev/null
+++ b/shaders/skia/109-14.shader_test
@@ -0,0 +1,31 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uColor_Stage0;
+uniform float uCoverage_Stage0;
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ outputCoverage_Stage0 = vec4(uCoverage_Stage0);
+ }
+ {
+ sk_FragColor = 1.0 - outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 inPosition;
+void main() {
+ vec3 pos3 = uViewM_Stage0 * vec3(inPosition, 1.0);
+ gl_Position = vec4(pos3.x, pos3.y, 0.0, pos3.z);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/109-15.shader_test b/shaders/skia/109-15.shader_test
new file mode 100644
index 0000000..db0a834
--- /dev/null
+++ b/shaders/skia/109-15.shader_test
@@ -0,0 +1,51 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform float uPixelSize_Stage2;
+uniform vec2 uRange_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = vec4(1.0, 1.0, 1.0, 1.0);
+ vec2 coord = vTransformedCoords_1_Stage0;
+ coord.y -= 7.0 * uPixelSize_Stage2;
+ for (int i = 0;i < 15; i++) {
+ output_Stage2 = min(output_Stage2, texture(uTextureSampler_0_Stage2, coord));
+ coord.y += uPixelSize_Stage2;
+ }
+ output_Stage2 *= output_Stage1;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/109-16.shader_test b/shaders/skia/109-16.shader_test
new file mode 100644
index 0000000..7d18b2a
--- /dev/null
+++ b/shaders/skia/109-16.shader_test
@@ -0,0 +1,67 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 ucircle_Stage2_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 CircleEffect_Stage2_c0_c0(vec4 _input, vec2 _coords) {
+ vec4 _output;
+ float d;
+ {
+ d = (1.0 - length((ucircle_Stage2_c0_c0.xy - gl_FragCoord.xy) * ucircle_Stage2_c0_c0.w)) * ucircle_Stage2_c0_c0.z;
+ }
+ {
+ _output = d > 0.5 ? _input : vec4(0.0);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ float coord = vTransformedCoords_1_Stage0.y - 0.5;
+ float f = fract(coord);
+ coord += 0.5 - f;
+ float f2 = f * f;
+ vec4 w = mat4(0.055555555555555552, 0.88888888888888884, 0.055555555555555552, 0.0, -0.5, 0.0, 0.5, 0.0, 0.83333333333333337, -2.0, 1.5, -0.33333333333333331, -0.3888888888888889, 1.1666666666666667, -1.1666666666666667, 0.3888888888888889) * vec4(1.0, f, f2, f2 * f);
+ vec4 c[4];
+ c[0] = CircleEffect_Stage2_c0_c0(vec4(1.0), vec2(vTransformedCoords_1_Stage0.x, coord + -1.0));
+ c[1] = CircleEffect_Stage2_c0_c0(vec4(1.0), vec2(vTransformedCoords_1_Stage0.x, coord));
+ c[2] = CircleEffect_Stage2_c0_c0(vec4(1.0), vec2(vTransformedCoords_1_Stage0.x, coord + 1.0));
+ c[3] = CircleEffect_Stage2_c0_c0(vec4(1.0), vec2(vTransformedCoords_1_Stage0.x, coord + 2.0));
+ vec4 bicubicColor = ((c[0] * w.x + c[1] * w.y) + c[2] * w.z) + c[3] * w.w;
+ bicubicColor = clamp(bicubicColor, 0.0, 1.0);
+ output_Stage2 = bicubicColor * output_Stage1;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/109-17.shader_test b/shaders/skia/109-17.shader_test
new file mode 100644
index 0000000..2fd9a16
--- /dev/null
+++ b/shaders/skia/109-17.shader_test
@@ -0,0 +1,44 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform float uPixelSize_Stage1;
+uniform vec2 uRange_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = vec4(1.0, 1.0, 1.0, 1.0);
+ vec2 coord = vTransformedCoords_0_Stage0;
+ coord.y -= 3.0 * uPixelSize_Stage1;
+ float highBound = min(uRange_Stage1.y, coord.y + 6.0 * uPixelSize_Stage1);
+ coord.y = max(uRange_Stage1.x, coord.y);
+ for (int i = 0;i < 7; i++) {
+ output_Stage1 = min(output_Stage1, texture(uTextureSampler_0_Stage1, coord));
+ coord.y += uPixelSize_Stage1;
+ coord.y = min(highBound, coord.y);
+ }
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/109-2.shader_test b/shaders/skia/109-2.shader_test
new file mode 100644
index 0000000..29ecdda
--- /dev/null
+++ b/shaders/skia/109-2.shader_test
@@ -0,0 +1,81 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 ucolor_Stage1_c0_c0_c0_c0;
+uniform vec4 ucolor_Stage2_c1_c0;
+noperspective in vec4 vcolor_Stage0;
+vec4 ConstColorProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = _input.w * ucolor_Stage1_c0_c0_c0_c0;
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = ConstColorProcessor_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c1_c0;
+ }
+ return _output;
+}
+vec4 blend_dst_over(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src + dst;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 blend_darken(vec4 src, vec4 dst) {
+ vec4 result = blend_src_over(src, dst);
+ result.xyz = min(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
+ return result;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_dst_over(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_darken(ConstColorProcessor_Stage2_c1_c0(vec4(1.0)), output_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 position;
+in vec4 inColor;
+noperspective out vec4 vcolor_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/109-4.shader_test b/shaders/skia/109-4.shader_test
new file mode 100644
index 0000000..2d396b4
--- /dev/null
+++ b/shaders/skia/109-4.shader_test
@@ -0,0 +1,71 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec3 uedges_Stage1[4];
+flat in vec4 vcolor_Stage0;
+noperspective in float vcoverage_Stage0;
+flat in vec4 vgeomDomain_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ float coverage = vcoverage_Stage0;
+ vec4 geoDomain;
+ geoDomain = vgeomDomain_Stage0;
+ if (coverage < 0.5) {
+ vec4 dists4 = clamp(vec4(1.0, 1.0, -1.0, -1.0) * (gl_FragCoord.xyxy - geoDomain), 0.0, 1.0);
+ vec2 dists2 = dists4.xy * dists4.zw;
+ coverage = min(coverage, dists2.x * dists2.y);
+ }
+ outputCoverage_Stage0 = vec4(coverage);
+ }
+ vec4 output_Stage1;
+ {
+ float alpha = 1.0;
+ float edge;
+ edge = dot(uedges_Stage1[0], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage1[1], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage1[2], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage1[3], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ output_Stage1 = outputCoverage_Stage0 * alpha;
+ }
+ {
+ sk_FragColor = outputColor_Stage0 * output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 position;
+in float coverage;
+in vec4 color;
+in vec4 geomDomain;
+flat out vec4 vcolor_Stage0;
+noperspective out float vcoverage_Stage0;
+flat out vec4 vgeomDomain_Stage0;
+void main() {
+ vec2 position = position;
+ vcolor_Stage0 = color;
+ vcoverage_Stage0 = coverage;
+ vgeomDomain_Stage0 = geomDomain;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/109-5.shader_test b/shaders/skia/109-5.shader_test
new file mode 100644
index 0000000..a9e18b1
--- /dev/null
+++ b/shaders/skia/109-5.shader_test
@@ -0,0 +1,85 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage2_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c1_c0;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_dst_in(ConstColorProcessor_Stage2_c1_c0(vec4(1.0)), output_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/109-6.shader_test b/shaders/skia/109-6.shader_test
new file mode 100644
index 0000000..c1e9c35
--- /dev/null
+++ b/shaders/skia/109-6.shader_test
@@ -0,0 +1,140 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform float uSurfaceScale_Stage1;
+uniform vec3 uLightColor_Stage1;
+uniform float uKS_Stage1;
+uniform float uShininess_Stage1;
+uniform vec3 uLightLocation_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 light_Stage1(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ vec3 halfDir = normalize(surfaceToLight + vec3(0.0, 0.0, 1.0));
+ float colorScale = uKS_Stage1 * pow(dot(normal, halfDir), uShininess_Stage1);
+ vec3 color = lightColor * clamp(colorScale, 0.0, 1.0);
+ return vec4(color, max(max(color.x, color.y), color.z));
+}
+float sobel_Stage1(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage1(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage1(float m[9], float surfaceScale) {
+ return pointToNormal_Stage1(sobel_Stage1(m[0], m[2], m[3], m[5], 0.0, 0.0, 0.33333298563957214), sobel_Stage1(m[0], m[3], m[1], m[4], m[2], m[5], 0.5), surfaceScale);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ vec2 coord = vTransformedCoords_0_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp0 = textureColor;
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp1 = textureColor;
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp2 = textureColor;
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp3 = textureColor;
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp4 = textureColor;
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp5 = textureColor;
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp6 = textureColor;
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp7 = textureColor;
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp8 = textureColor;
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = normalize(uLightLocation_Stage1 - vec3(gl_FragCoord.xy, uSurfaceScale_Stage1 * m[4]));
+ output_Stage1 = light_Stage1(normal_Stage1(m, uSurfaceScale_Stage1), surfaceToLight, uLightColor_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/109-7.shader_test b/shaders/skia/109-7.shader_test
new file mode 100644
index 0000000..ecc82e2
--- /dev/null
+++ b/shaders/skia/109-7.shader_test
@@ -0,0 +1,98 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+uniform vec2 uDstTextureUpperLeft_Stage2;
+uniform vec2 uDstTextureCoordScale_Stage2;
+uniform sampler2D uTextureSampler_0_Stage0;
+uniform sampler2D uDstTextureSampler_Stage2;
+noperspective in vec2 vTextureCoords_Stage0;
+flat in int vTexIndex_Stage0;
+noperspective in vec4 vinColor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ t.x = fract(t.x);
+ }
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 blend_src_out(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src;
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ vec4 texColor;
+ {
+ texColor = texture(uTextureSampler_0_Stage0, vTextureCoords_Stage0);
+ }
+ outputCoverage_Stage0 = texColor;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TiledGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ if (all(lessThanEqual(outputCoverage_Stage0.xyz, vec3(0.0)))) {
+ discard;
+ }
+ vec2 _dstTexCoord = (gl_FragCoord.xy - uDstTextureUpperLeft_Stage2) * uDstTextureCoordScale_Stage2;
+ _dstTexCoord.y = 1.0 - _dstTexCoord.y;
+ vec4 _dstColor = texture(uDstTextureSampler_Stage2, _dstTexCoord);
+ sk_FragColor = blend_src_out(output_Stage1, _dstColor);
+ float lerpRed = mix(_dstColor.w, sk_FragColor.w, outputCoverage_Stage0.x);
+ float lerpBlue = mix(_dstColor.w, sk_FragColor.w, outputCoverage_Stage0.y);
+ float lerpGreen = mix(_dstColor.w, sk_FragColor.w, outputCoverage_Stage0.z);
+ sk_FragColor = outputCoverage_Stage0 * sk_FragColor + (vec4(1.0) - outputCoverage_Stage0) * _dstColor;
+ sk_FragColor.w = max(max(lerpRed, lerpBlue), lerpGreen);
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform vec2 uAtlasSizeInv_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in uvec2 inTextureCoords;
+noperspective out vec2 vTextureCoords_Stage0;
+flat out int vTexIndex_Stage0;
+noperspective out vec4 vinColor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ ivec2 signedCoords = ivec2(int(inTextureCoords.x), int(inTextureCoords.y));
+ vec2 unormTexCoords = vec2(float(signedCoords.x / 2), float(signedCoords.y / 2));
+ vTextureCoords_Stage0 = unormTexCoords * uAtlasSizeInv_Stage0;
+ vTexIndex_Stage0 = 0;
+ vinColor_Stage0 = inColor;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(inPosition.x, inPosition.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/109.shader_test b/shaders/skia/109.shader_test
new file mode 100644
index 0000000..e7bd1c4
--- /dev/null
+++ b/shaders/skia/109.shader_test
@@ -0,0 +1,112 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform float uSrcTF_Stage1_c0_c0[7];
+uniform mat3 uColorXform_Stage1_c0_c0;
+uniform float uDstTF_Stage1_c0_c0[7];
+uniform mat3 ucolorSpaceMatrix_Stage1_c0_c0_c0_c0;
+uniform vec3 ucolorSpaceTranslate_Stage1_c0_c0_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_1_Stage1, vTransformedCoords_1_Stage0) * _input;
+ return _output;
+}
+vec4 YUVtoRGBEffect_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 planes[2];
+ planes[0] = TextureEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ planes[1] = TextureEffect_Stage1_c0_c0_c0_c0_c1_c0(vec4(1.0));
+ vec4 color = vec4(planes[0].x, planes[1].y, planes[1].x, 1.0);
+ color.xyz = clamp(color.xyz * ucolorSpaceMatrix_Stage1_c0_c0_c0_c0 + ucolorSpaceTranslate_Stage1_c0_c0_c0_c0, 0.0, 1.0);
+ _output = color;
+ return _output;
+}
+float src_tf_Stage1_c0_c0(float x) {
+ float G = uSrcTF_Stage1_c0_c0[0];
+ float A = uSrcTF_Stage1_c0_c0[1];
+ float B = uSrcTF_Stage1_c0_c0[2];
+ float C = uSrcTF_Stage1_c0_c0[3];
+ float D = uSrcTF_Stage1_c0_c0[4];
+ float E = uSrcTF_Stage1_c0_c0[5];
+ float F = uSrcTF_Stage1_c0_c0[6];
+ float s = sign(x);
+ x = abs(x);
+ x = x < D ? C * x + F : pow(A * x + B, G) + E;
+ return s * x;
+}
+float dst_tf_Stage1_c0_c0(float x) {
+ float G = uDstTF_Stage1_c0_c0[0];
+ float A = uDstTF_Stage1_c0_c0[1];
+ float B = uDstTF_Stage1_c0_c0[2];
+ float C = uDstTF_Stage1_c0_c0[3];
+ float D = uDstTF_Stage1_c0_c0[4];
+ float E = uDstTF_Stage1_c0_c0[5];
+ float F = uDstTF_Stage1_c0_c0[6];
+ float s = sign(x);
+ x = abs(x);
+ x = x < D ? C * x + F : pow(A * x + B, G) + E;
+ return s * x;
+}
+vec4 gamut_xform_Stage1_c0_c0(vec4 color) {
+ color.xyz = uColorXform_Stage1_c0_c0 * color.xyz;
+ return color;
+}
+vec4 color_xform_Stage1_c0_c0(vec4 color) {
+ color.x = src_tf_Stage1_c0_c0(color.x);
+ color.y = src_tf_Stage1_c0_c0(color.y);
+ color.z = src_tf_Stage1_c0_c0(color.z);
+ color = gamut_xform_Stage1_c0_c0(color);
+ color.x = dst_tf_Stage1_c0_c0(color.x);
+ color.y = dst_tf_Stage1_c0_c0(color.y);
+ color.z = dst_tf_Stage1_c0_c0(color.z);
+ return color;
+}
+vec4 ColorSpaceXform_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = color_xform_Stage1_c0_c0(YUVtoRGBEffect_Stage1_c0_c0_c0_c0(vec4(1.0))) * _input;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ColorSpaceXform_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1090.shader_test b/shaders/skia/1090.shader_test
new file mode 100644
index 0000000..ef65873
--- /dev/null
+++ b/shaders/skia/1090.shader_test
@@ -0,0 +1,96 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+uniform vec2 uScale_Stage1;
+uniform vec4 uTexDom_Stage1;
+uniform vec3 uDecalParams_Stage1;
+uniform float ucornerRadius_Stage2;
+uniform vec4 uproxyRect_Stage2;
+uniform float ublurRadius_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vEllipseOffsets_Stage0;
+noperspective in vec4 vEllipseRadii_Stage0;
+noperspective in vec4 vinColor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+void main() {
+ {
+ vec2 offset = vEllipseOffsets_Stage0;
+ offset *= vEllipseRadii_Stage0.xy;
+ float test = dot(offset, offset) - 1.0;
+ vec2 grad = (2.0 * offset) * vEllipseRadii_Stage0.xy;
+ float grad_dot = dot(grad, grad);
+ grad_dot = max(grad_dot, 1.1754999560161448e-38);
+ float invlen = inversesqrt(grad_dot);
+ float edgeAlpha = clamp(0.5 - test * invlen, 0.0, 1.0);
+ offset = vEllipseOffsets_Stage0 * vEllipseRadii_Stage0.zw;
+ test = dot(offset, offset) - 1.0;
+ grad = (2.0 * offset) * vEllipseRadii_Stage0.zw;
+ grad_dot = dot(grad, grad);
+ invlen = inversesqrt(grad_dot);
+ edgeAlpha *= clamp(0.5 + test * invlen, 0.0, 1.0);
+ }
+ {
+ vec4 dColor = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ dColor.xyz = dColor.w < 9.9999999747524271e-07 ? vec3(0.0) : clamp(dColor.xyz / dColor.w, 0.0, 1.0);
+ vec2 cCoords = vTransformedCoords_1_Stage0 + uScale_Stage1 * (dColor.zy - vec2(0.5));
+ {
+ vec2 origCoord = cCoords;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ }
+ }
+ {
+ vec2 translatedFragPos = gl_FragCoord.xy - uproxyRect_Stage2.xy;
+ float threshold = ucornerRadius_Stage2 + 2.0 * ublurRadius_Stage2;
+ vec2 middle = (uproxyRect_Stage2.zw - uproxyRect_Stage2.xy) - 2.0 * threshold;
+ if (translatedFragPos.x >= threshold && translatedFragPos.x < middle.x + threshold) {
+ translatedFragPos.x = threshold;
+ } else if (translatedFragPos.x >= middle.x + threshold) {
+ translatedFragPos.x -= middle.x - 1.0;
+ }
+ if (translatedFragPos.y > threshold && translatedFragPos.y < middle.y + threshold) {
+ translatedFragPos.y = threshold;
+ } else if (translatedFragPos.y >= middle.y + threshold) {
+ translatedFragPos.y -= middle.y - 1.0;
+ }
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec2 inEllipseOffset;
+in vec4 inEllipseRadii;
+noperspective out vec2 vEllipseOffsets_Stage0;
+noperspective out vec4 vEllipseRadii_Stage0;
+noperspective out vec4 vinColor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vEllipseOffsets_Stage0 = inEllipseOffset;
+ vEllipseRadii_Stage0 = inEllipseRadii;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1093.shader_test b/shaders/skia/1093.shader_test
new file mode 100644
index 0000000..88a883f
--- /dev/null
+++ b/shaders/skia/1093.shader_test
@@ -0,0 +1,45 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+noperspective in vec2 vEllipseOffsets0_Stage0;
+noperspective in vec2 vEllipseOffsets1_Stage0;
+noperspective in vec4 vinColor_Stage0;
+void main() {
+ {
+ vec2 scaledOffset = vEllipseOffsets0_Stage0;
+ float test = dot(scaledOffset, scaledOffset) - 1.0;
+ vec2 duvdx = dFdx(vEllipseOffsets0_Stage0);
+ vec2 duvdy = dFdy(vEllipseOffsets0_Stage0);
+ vec2 grad = vec2(vEllipseOffsets0_Stage0.x * duvdx.x + vEllipseOffsets0_Stage0.y * duvdx.y, vEllipseOffsets0_Stage0.x * duvdy.x + vEllipseOffsets0_Stage0.y * duvdy.y);
+ float grad_dot = 4.0 * dot(grad, grad);
+ grad_dot = max(grad_dot, 1.1754999560161448e-38);
+ float invlen = inversesqrt(grad_dot);
+ float edgeAlpha = clamp(1.0 - test * invlen, 0.0, 1.0);
+ edgeAlpha *= clamp(1.0 + test * invlen, 0.0, 1.0);
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec2 inEllipseOffsets0;
+in vec2 inEllipseOffsets1;
+noperspective out vec2 vEllipseOffsets0_Stage0;
+noperspective out vec2 vEllipseOffsets1_Stage0;
+noperspective out vec4 vinColor_Stage0;
+void main() {
+ vEllipseOffsets0_Stage0 = inEllipseOffsets0;
+ vEllipseOffsets1_Stage0 = inEllipseOffsets1;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = (uViewM_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1099.shader_test b/shaders/skia/1099.shader_test
new file mode 100644
index 0000000..ab5afa7
--- /dev/null
+++ b/shaders/skia/1099.shader_test
@@ -0,0 +1,232 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_KHR_blend_equation_advanced : require
+out vec4 sk_FragColor;
+layout (blend_support_all_equations) out ;
+uniform vec4 urectH_Stage1_c0_c0_c0_c0_c0_c0;
+uniform float uinvSixSigma_Stage1_c0_c0_c0_c0_c0_c0;
+uniform vec4 uinnerRect_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec2 uinvRadiiXY_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 ucircle_Stage1_c0_c0_c1_c0_c0_c0;
+uniform vec2 ubaseFrequency_Stage1_c0_c0_c1_c0_c1_c0;
+uniform float uz_Stage1_c0_c0_c1_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+uniform sampler2D uTextureSampler_2_Stage1;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec3 vTransformedCoords_0_Stage0;
+vec4 RectBlurEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float xCoverage, yCoverage;
+ {
+ float x, y;
+ {
+ x = max(urectH_Stage1_c0_c0_c0_c0_c0_c0.x - gl_FragCoord.x, gl_FragCoord.x - urectH_Stage1_c0_c0_c0_c0_c0_c0.z);
+ y = max(urectH_Stage1_c0_c0_c0_c0_c0_c0.y - gl_FragCoord.y, gl_FragCoord.y - urectH_Stage1_c0_c0_c0_c0_c0_c0.w);
+ }
+ xCoverage = texture(uTextureSampler_0_Stage1, vec2(x * uinvSixSigma_Stage1_c0_c0_c0_c0_c0_c0, 0.5)).w;
+ yCoverage = texture(uTextureSampler_0_Stage1, vec2(y * uinvSixSigma_Stage1_c0_c0_c0_c0_c0_c0, 0.5)).w;
+ _output = (_input * xCoverage) * yCoverage;
+ }
+ _output = (_input * xCoverage) * yCoverage;
+ return _output;
+}
+vec4 EllipticalRRect_Stage1_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 dxy0 = uinnerRect_Stage1_c0_c0_c0_c0_c1_c0.xy - gl_FragCoord.xy;
+ vec2 dxy1 = gl_FragCoord.xy - uinnerRect_Stage1_c0_c0_c0_c0_c1_c0.zw;
+ vec2 dxy = max(max(dxy0, dxy1), 0.0);
+ vec2 Z = dxy * uinvRadiiXY_Stage1_c0_c0_c0_c0_c1_c0;
+ float implicit = dot(Z, dxy) - 1.0;
+ float grad_dot = 4.0 * dot(Z, Z);
+ grad_dot = max(grad_dot, 9.9999997473787516e-05);
+ float approx_dist = implicit * inversesqrt(grad_dot);
+ float alpha = clamp(0.5 + approx_dist, 0.0, 1.0);
+ _output = _input * alpha;
+ return _output;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 ComposeTwo_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_src_over(RectBlurEffect_Stage1_c0_c0_c0_c0_c0_c0(inputColor), EllipticalRRect_Stage1_c0_c0_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 CircleEffect_Stage1_c0_c0_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float d;
+ {
+ d = (length((ucircle_Stage1_c0_c0_c1_c0_c0_c0.xy - gl_FragCoord.xy) * ucircle_Stage1_c0_c0_c1_c0_c0_c0.w) - 1.0) * ucircle_Stage1_c0_c0_c1_c0_c0_c0.z;
+ }
+ {
+ _output = _input * clamp(d, 0.0, 1.0);
+ }
+ return _output;
+}
+vec3 fade_Stage1_c0_c0_c1_c0_c1_c0(vec3 t) {
+ return ((t * t) * t) * (t * (t * 6.0 - 15.0) + 10.0);
+}
+float perm_Stage1_c0_c0_c1_c0_c1_c0(float x) {
+ return texture(uTextureSampler_1_Stage1, vec2(fract(x / 256.0), 0.0)).x * 255.0;
+}
+float grad_Stage1_c0_c0_c1_c0_c1_c0(float x, vec3 p) {
+ return dot(texture(uTextureSampler_2_Stage1, vec2(fract(x / 16.0), 0.0)).xyz * 255.0 - vec3(1.0), p);
+}
+float lerp_Stage1_c0_c0_c1_c0_c1_c0(float a, float b, float w) {
+ return a + w * (b - a);
+}
+float noise_Stage1_c0_c0_c1_c0_c1_c0(vec3 p) {
+ vec3 P = mod(floor(p), 256.0);
+ p -= floor(p);
+ vec3 f = fade_Stage1_c0_c0_c1_c0_c1_c0(p);
+ float A = perm_Stage1_c0_c0_c1_c0_c1_c0(P.x) + P.y;
+ float AA = perm_Stage1_c0_c0_c1_c0_c1_c0(A) + P.z;
+ float AB = perm_Stage1_c0_c0_c1_c0_c1_c0(A + 1.0) + P.z;
+ float B = perm_Stage1_c0_c0_c1_c0_c1_c0(P.x + 1.0) + P.y;
+ float BA = perm_Stage1_c0_c0_c1_c0_c1_c0(B) + P.z;
+ float BB = perm_Stage1_c0_c0_c1_c0_c1_c0(B + 1.0) + P.z;
+ float result = lerp_Stage1_c0_c0_c1_c0_c1_c0(lerp_Stage1_c0_c0_c1_c0_c1_c0(lerp_Stage1_c0_c0_c1_c0_c1_c0(grad_Stage1_c0_c0_c1_c0_c1_c0(perm_Stage1_c0_c0_c1_c0_c1_c0(AA), p), grad_Stage1_c0_c0_c1_c0_c1_c0(perm_Stage1_c0_c0_c1_c0_c1_c0(BA), p + vec3(-1.0, 0.0, 0.0)), f.x), lerp_Stage1_c0_c0_c1_c0_c1_c0(grad_Stage1_c0_c0_c1_c0_c1_c0(perm_Stage1_c0_c0_c1_c0_c1_c0(AB), p + vec3(0.0, -1.0, 0.0)), grad_Stage1_c0_c0_c1_c0_c1_c0(perm_Stage1_c0_c0_c1_c0_c1_c0(BB), p + vec3(-1.0, -1.0, 0.0)), f.x), f.y), lerp_Stage1_c0_c0_c1_c0_c1_c0(lerp_Stage1_c0_c0_c1_c0_c1_c0(grad_Stage1_c0_c0_c1_c0_c1_c0(perm_Stage1_c0_c0_c1_c0_c1_c0(AA + 1.0), p + vec3(0.0, 0.0, -1.0)), grad_Stage1_c0_c0_c1_c0_c1_c0(perm_Stage1_c0_c0_c1_c0_c1_c0(BA + 1.0), p + vec3(-1.0, 0.0, -1.0)), f.x), lerp_Stage1_c0_c0_c1_c0_c1_c0(grad_Stage1_c0_c0_c1_c0_c1_c0(perm_Stage1_c0_c0_c1_c0_c1_c0(AB + 1.0), p + vec3(0.0, -1.0, -1.0)), grad_Stage1_c0_c0_c1_c0_c1_c0(perm_Stage1_c0_c0_c1_c0_c1_c0(BB + 1.0), p + vec3(-1.0, -1.0, -1.0)), f.x), f.y), f.z);
+ return result;
+}
+float noiseOctaves_Stage1_c0_c0_c1_c0_c1_c0(vec3 p) {
+ float result = 0.0;
+ float ratio = 1.0;
+ for (float i = 0.0;i < 3.0; i++) {
+ result += noise_Stage1_c0_c0_c1_c0_c1_c0(p) / ratio;
+ p *= 2.0;
+ ratio *= 2.0;
+ }
+ return (result + 1.0) / 2.0;
+}
+vec4 ImprovedPerlinNoise_Stage1_c0_c0_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 vTransformedCoords_0_Stage0_ensure2D = vTransformedCoords_0_Stage0.xy / vTransformedCoords_0_Stage0.z;
+ vec2 coords = vTransformedCoords_0_Stage0_ensure2D * ubaseFrequency_Stage1_c0_c0_c1_c0_c1_c0;
+ float r = noiseOctaves_Stage1_c0_c0_c1_c0_c1_c0(vec3(coords, uz_Stage1_c0_c0_c1_c0_c1_c0));
+ float g = noiseOctaves_Stage1_c0_c0_c1_c0_c1_c0(vec3(coords, uz_Stage1_c0_c0_c1_c0_c1_c0));
+ float b = noiseOctaves_Stage1_c0_c0_c1_c0_c1_c0(vec3(coords, uz_Stage1_c0_c0_c1_c0_c1_c0));
+ float a = noiseOctaves_Stage1_c0_c0_c1_c0_c1_c0(vec3(coords, uz_Stage1_c0_c0_c1_c0_c1_c0));
+ _output = vec4(r, g, b, a);
+ _output = clamp(_output, 0.0, 1.0);
+ _output = vec4(_output.xyz * _output.www, _output.w);
+ return _output;
+}
+vec4 blend_dst_over(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src + dst;
+}
+vec4 ComposeTwo_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_dst_over(CircleEffect_Stage1_c0_c0_c1_c0_c0_c0(inputColor), ImprovedPerlinNoise_Stage1_c0_c0_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+float _blend_color_saturation(vec3 color) {
+ return max(max(color.x, color.y), color.z) - min(min(color.x, color.y), color.z);
+}
+vec3 _blend_set_color_saturation_helper(vec3 minMidMax, float sat) {
+ if (minMidMax.x < minMidMax.z) {
+ return vec3(0.0, (sat * (minMidMax.y - minMidMax.x)) / (minMidMax.z - minMidMax.x), sat);
+ }
+ return vec3(0.0);
+}
+vec3 _blend_set_color_saturation(vec3 hueLumColor, vec3 satColor) {
+ float sat = _blend_color_saturation(satColor);
+ if (hueLumColor.x <= hueLumColor.y) {
+ if (hueLumColor.y <= hueLumColor.z) {
+ hueLumColor.xyz = _blend_set_color_saturation_helper(hueLumColor, sat);
+ } else if (hueLumColor.x <= hueLumColor.z) {
+ hueLumColor.xzy = _blend_set_color_saturation_helper(hueLumColor.xzy, sat);
+ } else {
+ hueLumColor.zxy = _blend_set_color_saturation_helper(hueLumColor.zxy, sat);
+ }
+ } else if (hueLumColor.x <= hueLumColor.z) {
+ hueLumColor.yxz = _blend_set_color_saturation_helper(hueLumColor.yxz, sat);
+ } else if (hueLumColor.y <= hueLumColor.z) {
+ hueLumColor.yzx = _blend_set_color_saturation_helper(hueLumColor.yzx, sat);
+ } else {
+ hueLumColor.zyx = _blend_set_color_saturation_helper(hueLumColor.zyx, sat);
+ }
+ return hueLumColor;
+}
+float _blend_color_luminance(vec3 color) {
+ return dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), color);
+}
+vec3 _blend_set_color_luminance(vec3 hueSatColor, float alpha, vec3 lumColor) {
+ float lum = _blend_color_luminance(lumColor);
+ vec3 result = (lum - _blend_color_luminance(hueSatColor)) + hueSatColor;
+ float minComp = min(min(result.x, result.y), result.z);
+ float maxComp = max(max(result.x, result.y), result.z);
+ if (minComp < 0.0 && lum != minComp) {
+ result = lum + ((result - lum) * lum) / (lum - minComp);
+ }
+ if (maxComp > alpha && maxComp != lum) {
+ return lum + ((result - lum) * (alpha - lum)) / (maxComp - lum);
+ }
+ return result;
+}
+vec4 blend_saturation(vec4 src, vec4 dst) {
+ float alpha = dst.w * src.w;
+ vec3 sda = src.xyz * dst.w;
+ vec3 dsa = dst.xyz * src.w;
+ return vec4((((_blend_set_color_luminance(_blend_set_color_saturation(dsa, sda), alpha, dsa) + dst.xyz) - dsa) + src.xyz) - sda, (src.w + dst.w) - alpha);
+}
+vec4 ComposeTwo_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_saturation(ComposeTwo_Stage1_c0_c0_c0_c0(inputColor), ComposeTwo_Stage1_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 ClampFragmentProcessor_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = clamp(_input, 0.0, 1.0);
+ }
+ return _output;
+}
+vec4 blend_screen(vec4 src, vec4 dst) {
+ return src + (1.0 - src) * dst;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_screen(ComposeTwo_Stage1_c0_c0(inputColor), ClampFragmentProcessor_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec3 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 color = inColor;
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0);
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1105.shader_test b/shaders/skia/1105.shader_test
new file mode 100644
index 0000000..25eb7ce
--- /dev/null
+++ b/shaders/skia/1105.shader_test
@@ -0,0 +1,85 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uColor_Stage0;
+uniform vec2 uImageIncrement_Stage1;
+uniform vec2 uBounds_Stage1;
+uniform vec4 uKernel_Stage1[3];
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0 - 4.0 * uImageIncrement_Stage1;
+ vec2 coordSampled = vec2(0.0, 0.0);
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage1.x && coord.y <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].x;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage1.x && coord.y <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].y;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage1.x && coord.y <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].z;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage1.x && coord.y <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].w;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage1.x && coord.y <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].x;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage1.x && coord.y <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].y;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage1.x && coord.y <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].z;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage1.x && coord.y <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].w;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage1.x && coord.y <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].x;
+ }
+ coord += uImageIncrement_Stage1;
+ }
+ {
+ sk_FragColor = vec4(0.0);
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec2 pos2 = (uViewM_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1108.shader_test b/shaders/skia/1108.shader_test
new file mode 100644
index 0000000..7786bd2
--- /dev/null
+++ b/shaders/skia/1108.shader_test
@@ -0,0 +1,59 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+noperspective in vec2 vEllipseOffsets0_Stage0;
+noperspective in vec2 vEllipseOffsets1_Stage0;
+noperspective in vec4 vinColor_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vinColor_Stage0;
+ vec2 scaledOffset = vEllipseOffsets0_Stage0;
+ float test = dot(scaledOffset, scaledOffset) - 1.0;
+ vec2 duvdx = dFdx(vEllipseOffsets0_Stage0);
+ vec2 duvdy = -dFdy(vEllipseOffsets0_Stage0);
+ vec2 grad = vec2(vEllipseOffsets0_Stage0.x * duvdx.x + vEllipseOffsets0_Stage0.y * duvdx.y, vEllipseOffsets0_Stage0.x * duvdy.x + vEllipseOffsets0_Stage0.y * duvdy.y);
+ float grad_dot = 4.0 * dot(grad, grad);
+ grad_dot = max(grad_dot, 1.1754999560161448e-38);
+ float invlen = inversesqrt(grad_dot);
+ float edgeAlpha = clamp(0.5 - test * invlen, 0.0, 1.0);
+ scaledOffset = vEllipseOffsets1_Stage0;
+ test = dot(scaledOffset, scaledOffset) - 1.0;
+ duvdx = dFdx(vEllipseOffsets1_Stage0);
+ duvdy = -dFdy(vEllipseOffsets1_Stage0);
+ grad = vec2(vEllipseOffsets1_Stage0.x * duvdx.x + vEllipseOffsets1_Stage0.y * duvdx.y, vEllipseOffsets1_Stage0.x * duvdy.x + vEllipseOffsets1_Stage0.y * duvdy.y);
+ grad_dot = 4.0 * dot(grad, grad);
+ invlen = inversesqrt(grad_dot);
+ edgeAlpha *= clamp(0.5 + test * invlen, 0.0, 1.0);
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ {
+ sk_FragColor = (vec4(1.0) - outputColor_Stage0) * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 inPosition;
+in vec4 inColor;
+in vec2 inEllipseOffsets0;
+in vec2 inEllipseOffsets1;
+noperspective out vec2 vEllipseOffsets0_Stage0;
+noperspective out vec2 vEllipseOffsets1_Stage0;
+noperspective out vec4 vinColor_Stage0;
+void main() {
+ vEllipseOffsets0_Stage0 = inEllipseOffsets0;
+ vEllipseOffsets1_Stage0 = inEllipseOffsets1;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = inPosition;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1111.shader_test b/shaders/skia/1111.shader_test
new file mode 100644
index 0000000..3e8c3fd
--- /dev/null
+++ b/shaders/skia/1111.shader_test
@@ -0,0 +1,206 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform vec2 uBounds_Stage1;
+uniform vec4 uKernel_Stage1[4];
+uniform float uPixelSize_Stage3;
+uniform vec2 uRange_Stage3;
+uniform vec2 ubaseFrequency_Stage4;
+uniform float uz_Stage4;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage3;
+uniform sampler2D uTextureSampler_0_Stage4;
+uniform sampler2D uTextureSampler_1_Stage4;
+noperspective in vec4 vQuadEdge_Stage0;
+noperspective in vec4 vinColor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+vec4 Big_Ole_Key_Stage2_c0_c0(vec4 _input, vec2 _coords) {
+ vec4 _output;
+ _output = _input;
+ return _output;
+}
+vec3 fade_Stage4(vec3 t) {
+ return ((t * t) * t) * (t * (t * 6.0 - 15.0) + 10.0);
+}
+float perm_Stage4(float x) {
+ return texture(uTextureSampler_0_Stage4, vec2(fract(x / 256.0), 0.0)).x * 255.0;
+}
+float grad_Stage4(float x, vec3 p) {
+ return dot(texture(uTextureSampler_1_Stage4, vec2(fract(x / 16.0), 0.0)).xyz * 255.0 - vec3(1.0), p);
+}
+float lerp_Stage4(float a, float b, float w) {
+ return a + w * (b - a);
+}
+float noise_Stage4(vec3 p) {
+ vec3 P = mod(floor(p), 256.0);
+ p -= floor(p);
+ vec3 f = fade_Stage4(p);
+ float A = perm_Stage4(P.x) + P.y;
+ float AA = perm_Stage4(A) + P.z;
+ float AB = perm_Stage4(A + 1.0) + P.z;
+ float B = perm_Stage4(P.x + 1.0) + P.y;
+ float BA = perm_Stage4(B) + P.z;
+ float BB = perm_Stage4(B + 1.0) + P.z;
+ float result = lerp_Stage4(lerp_Stage4(lerp_Stage4(grad_Stage4(perm_Stage4(AA), p), grad_Stage4(perm_Stage4(BA), p + vec3(-1.0, 0.0, 0.0)), f.x), lerp_Stage4(grad_Stage4(perm_Stage4(AB), p + vec3(0.0, -1.0, 0.0)), grad_Stage4(perm_Stage4(BB), p + vec3(-1.0, -1.0, 0.0)), f.x), f.y), lerp_Stage4(lerp_Stage4(grad_Stage4(perm_Stage4(AA + 1.0), p + vec3(0.0, 0.0, -1.0)), grad_Stage4(perm_Stage4(BA + 1.0), p + vec3(-1.0, 0.0, -1.0)), f.x), lerp_Stage4(grad_Stage4(perm_Stage4(AB + 1.0), p + vec3(0.0, -1.0, -1.0)), grad_Stage4(perm_Stage4(BB + 1.0), p + vec3(-1.0, -1.0, -1.0)), f.x), f.y), f.z);
+ return result;
+}
+float noiseOctaves_Stage4(vec3 p) {
+ float result = 0.0;
+ float ratio = 1.0;
+ for (float i = 0.0;i < 6.0; i++) {
+ result += noise_Stage4(p) / ratio;
+ p *= 2.0;
+ ratio *= 2.0;
+ }
+ return (result + 1.0) / 2.0;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vinColor_Stage0;
+ float edgeAlpha;
+ vec2 duvdx = dFdx(vQuadEdge_Stage0.xy);
+ vec2 duvdy = dFdy(vQuadEdge_Stage0.xy);
+ if (vQuadEdge_Stage0.z > 0.0 && vQuadEdge_Stage0.w > 0.0) {
+ edgeAlpha = min(min(vQuadEdge_Stage0.z, vQuadEdge_Stage0.w) + 0.5, 1.0);
+ } else {
+ vec2 gF = vec2((2.0 * vQuadEdge_Stage0.x) * duvdx.x - duvdx.y, (2.0 * vQuadEdge_Stage0.x) * duvdy.x - duvdy.y);
+ edgeAlpha = vQuadEdge_Stage0.x * vQuadEdge_Stage0.x - vQuadEdge_Stage0.y;
+ edgeAlpha = clamp(0.5 - edgeAlpha / length(gF), 0.0, 1.0);
+ }
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0 - 6.0 * uImageIncrement_Stage1;
+ vec2 coordSampled = vec2(0.0, 0.0);
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage1.x, uBounds_Stage1.y - uBounds_Stage1.x) + uBounds_Stage1.x;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage1.x, uBounds_Stage1.y - uBounds_Stage1.x) + uBounds_Stage1.x;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage1.x, uBounds_Stage1.y - uBounds_Stage1.x) + uBounds_Stage1.x;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage1.x, uBounds_Stage1.y - uBounds_Stage1.x) + uBounds_Stage1.x;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage1.x, uBounds_Stage1.y - uBounds_Stage1.x) + uBounds_Stage1.x;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage1.x, uBounds_Stage1.y - uBounds_Stage1.x) + uBounds_Stage1.x;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage1.x, uBounds_Stage1.y - uBounds_Stage1.x) + uBounds_Stage1.x;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage1.x, uBounds_Stage1.y - uBounds_Stage1.x) + uBounds_Stage1.x;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage1.x, uBounds_Stage1.y - uBounds_Stage1.x) + uBounds_Stage1.x;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage1.x, uBounds_Stage1.y - uBounds_Stage1.x) + uBounds_Stage1.x;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage1.x, uBounds_Stage1.y - uBounds_Stage1.x) + uBounds_Stage1.x;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage1.x, uBounds_Stage1.y - uBounds_Stage1.x) + uBounds_Stage1.x;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage1.x, uBounds_Stage1.y - uBounds_Stage1.x) + uBounds_Stage1.x;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].x;
+ coord += uImageIncrement_Stage1;
+ output_Stage1 *= outputColor_Stage0;
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = Big_Ole_Key_Stage2_c0_c0(output_Stage1, gl_FragCoord.xy);
+ }
+ vec4 output_Stage3;
+ {
+ output_Stage3 = vec4(1.0, 1.0, 1.0, 1.0);
+ vec2 coord = vTransformedCoords_1_Stage0;
+ coord.x -= uPixelSize_Stage3;
+ for (int i = 0;i < 3; i++) {
+ output_Stage3 = min(output_Stage3, texture(uTextureSampler_0_Stage3, coord));
+ coord.x += uPixelSize_Stage3;
+ }
+ output_Stage3 *= output_Stage2;
+ }
+ vec4 output_Stage4;
+ {
+ vec2 coords = vTransformedCoords_2_Stage0 * ubaseFrequency_Stage4;
+ float r = noiseOctaves_Stage4(vec3(coords, uz_Stage4));
+ float g = noiseOctaves_Stage4(vec3(coords, uz_Stage4));
+ float b = noiseOctaves_Stage4(vec3(coords, uz_Stage4));
+ float a = noiseOctaves_Stage4(vec3(coords, uz_Stage4));
+ output_Stage4 = vec4(r, g, b, a);
+ output_Stage4 = clamp(output_Stage4, 0.0, 1.0);
+ output_Stage4 = vec4(output_Stage4.xyz * output_Stage4.www, output_Stage4.w);
+ }
+ vec4 output_Stage5;
+ {
+ {
+ output_Stage5 = clamp(output_Stage4, 0.0, 1.0);
+ }
+ }
+ vec4 output_Stage6;
+ {
+ {
+ output_Stage6 = clamp(output_Stage5, 0.0, 1.0);
+ }
+ }
+ {
+ sk_FragColor = output_Stage3 * output_Stage6;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec4 inQuadEdge;
+noperspective out vec4 vQuadEdge_Stage0;
+noperspective out vec4 vinColor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+void main() {
+ vQuadEdge_Stage0 = inQuadEdge;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1114.shader_test b/shaders/skia/1114.shader_test
new file mode 100644
index 0000000..320ffed
--- /dev/null
+++ b/shaders/skia/1114.shader_test
@@ -0,0 +1,627 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1_c0_c0_c0_c0_c1_c0;
+uniform float uSurfaceScale_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec3 uLightColor_Stage1_c0_c0_c0_c0_c1_c0;
+uniform float uKD_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 uTexDom_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec3 uDecalParams_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec3 uLightDirection_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage1_c0_c0_c1_c0_c0_c0;
+uniform vec2 ubaseFrequency_Stage1_c0_c0_c1_c0_c1_c0;
+uniform float uz_Stage1_c0_c0_c1_c0_c1_c0;
+uniform vec4 ucolor_Stage1_c1_c0_c0_c0_c0_c0;
+uniform vec2 uImageIncrement_Stage1_c1_c0_c0_c0_c1_c0;
+uniform float uSurfaceScale_Stage1_c1_c0_c0_c0_c1_c0;
+uniform vec3 uLightColor_Stage1_c1_c0_c0_c0_c1_c0;
+uniform float uKS_Stage1_c1_c0_c0_c0_c1_c0;
+uniform float uShininess_Stage1_c1_c0_c0_c0_c1_c0;
+uniform vec4 uTexDom_Stage1_c1_c0_c0_c0_c1_c0;
+uniform vec3 uDecalParams_Stage1_c1_c0_c0_c0_c1_c0;
+uniform vec3 uLightLocation_Stage1_c1_c0_c0_c0_c1_c0;
+uniform float uExponent_Stage1_c1_c0_c0_c0_c1_c0;
+uniform float uCosInnerConeAngle_Stage1_c1_c0_c0_c0_c1_c0;
+uniform float uCosOuterConeAngle_Stage1_c1_c0_c0_c0_c1_c0;
+uniform float uConeScale_Stage1_c1_c0_c0_c0_c1_c0;
+uniform vec3 uS_Stage1_c1_c0_c0_c0_c1_c0;
+uniform vec4 ucircle_Stage1_c1_c0_c1_c0_c0_c0;
+uniform vec4 uinnerRect_Stage1_c1_c0_c1_c0_c1_c0;
+uniform vec4 uinvRadiiLTRB_Stage1_c1_c0_c1_c0_c1_c0;
+uniform vec2 uDstTextureUpperLeft_Stage2;
+uniform vec2 uDstTextureCoordScale_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+uniform sampler2D uTextureSampler_2_Stage1;
+uniform sampler2D uTextureSampler_3_Stage1;
+uniform sampler2D uDstTextureSampler_Stage2;
+noperspective in vec4 vQuadEdge_Stage0;
+noperspective in vec4 vinColor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+vec4 ConfigConversionEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = floor(_input * 255.0 + 0.5) / 255.0;
+ {
+ _output.xyz = floor((_output.xyz * _output.w) * 255.0 + 0.5) / 255.0;
+ }
+ return _output;
+}
+vec4 light_Stage1_c0_c0_c0_c0_c1_c0(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ float colorScale = uKD_Stage1_c0_c0_c0_c0_c1_c0 * dot(normal, surfaceToLight);
+ return vec4(lightColor * clamp(colorScale, 0.0, 1.0), 1.0);
+}
+float sobel_Stage1_c0_c0_c0_c0_c1_c0(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage1_c0_c0_c0_c0_c1_c0(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage1_c0_c0_c0_c0_c1_c0(float m[9], float surfaceScale) {
+ return pointToNormal_Stage1_c0_c0_c0_c0_c1_c0(sobel_Stage1_c0_c0_c0_c0_c1_c0(m[0], m[1], m[3], m[4], m[6], m[7], 0.5), sobel_Stage1_c0_c0_c0_c0_c1_c0(m[0], m[6], m[1], m[7], 0.0, 0.0, 0.33333298563957214), surfaceScale);
+}
+vec4 DiffuseLighting_Stage1_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coord = vTransformedCoords_0_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage1_c0_c0_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0_c1_c0.xy, uTexDom_Stage1_c0_c0_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp0 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1_c0_c0_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0_c1_c0.xy, uTexDom_Stage1_c0_c0_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1_c0_c0_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0_c1_c0.xy, uTexDom_Stage1_c0_c0_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage1_c0_c0_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0_c1_c0.xy, uTexDom_Stage1_c0_c0_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0_c1_c0.xy, uTexDom_Stage1_c0_c0_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1_c0_c0_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0_c1_c0.xy, uTexDom_Stage1_c0_c0_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp5 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage1_c0_c0_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0_c1_c0.xy, uTexDom_Stage1_c0_c0_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp6 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage1_c0_c0_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0_c1_c0.xy, uTexDom_Stage1_c0_c0_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp7 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage1_c0_c0_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0_c1_c0.xy, uTexDom_Stage1_c0_c0_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp8 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = uLightDirection_Stage1_c0_c0_c0_c0_c1_c0;
+ _output = light_Stage1_c0_c0_c0_c0_c1_c0(normal_Stage1_c0_c0_c0_c0_c1_c0(m, uSurfaceScale_Stage1_c0_c0_c0_c0_c1_c0), surfaceToLight, uLightColor_Stage1_c0_c0_c0_c0_c1_c0);
+ _output *= _input;
+ return _output;
+}
+float _blend_color_luminance(vec3 color) {
+ return dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), color);
+}
+vec3 _blend_set_color_luminance(vec3 hueSatColor, float alpha, vec3 lumColor) {
+ float lum = _blend_color_luminance(lumColor);
+ vec3 result = (lum - _blend_color_luminance(hueSatColor)) + hueSatColor;
+ float minComp = min(min(result.x, result.y), result.z);
+ float maxComp = max(max(result.x, result.y), result.z);
+ if (minComp < 0.0 && lum != minComp) {
+ result = lum + ((result - lum) * lum) / (lum - minComp);
+ }
+ if (maxComp > alpha && maxComp != lum) {
+ return lum + ((result - lum) * (alpha - lum)) / (maxComp - lum);
+ }
+ return result;
+}
+vec4 blend_luminosity(vec4 src, vec4 dst) {
+ float alpha = dst.w * src.w;
+ vec3 sda = src.xyz * dst.w;
+ vec3 dsa = dst.xyz * src.w;
+ return vec4((((_blend_set_color_luminance(dsa, alpha, sda) + dst.xyz) - dsa) + src.xyz) - sda, (src.w + dst.w) - alpha);
+}
+vec4 ComposeTwo_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_luminosity(ConfigConversionEffect_Stage1_c0_c0_c0_c0_c0_c0(inputColor), DiffuseLighting_Stage1_c0_c0_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 ConstColorProcessor_Stage1_c0_c0_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage1_c0_c0_c1_c0_c0_c0;
+ }
+ return _output;
+}
+vec3 fade_Stage1_c0_c0_c1_c0_c1_c0(vec3 t) {
+ return ((t * t) * t) * (t * (t * 6.0 - 15.0) + 10.0);
+}
+float perm_Stage1_c0_c0_c1_c0_c1_c0(float x) {
+ return texture(uTextureSampler_1_Stage1, vec2(fract(x / 256.0), 0.0)).x * 255.0;
+}
+float grad_Stage1_c0_c0_c1_c0_c1_c0(float x, vec3 p) {
+ return dot(texture(uTextureSampler_2_Stage1, vec2(fract(x / 16.0), 0.0)).xyz * 255.0 - vec3(1.0), p);
+}
+float lerp_Stage1_c0_c0_c1_c0_c1_c0(float a, float b, float w) {
+ return a + w * (b - a);
+}
+float noise_Stage1_c0_c0_c1_c0_c1_c0(vec3 p) {
+ vec3 P = mod(floor(p), 256.0);
+ p -= floor(p);
+ vec3 f = fade_Stage1_c0_c0_c1_c0_c1_c0(p);
+ float A = perm_Stage1_c0_c0_c1_c0_c1_c0(P.x) + P.y;
+ float AA = perm_Stage1_c0_c0_c1_c0_c1_c0(A) + P.z;
+ float AB = perm_Stage1_c0_c0_c1_c0_c1_c0(A + 1.0) + P.z;
+ float B = perm_Stage1_c0_c0_c1_c0_c1_c0(P.x + 1.0) + P.y;
+ float BA = perm_Stage1_c0_c0_c1_c0_c1_c0(B) + P.z;
+ float BB = perm_Stage1_c0_c0_c1_c0_c1_c0(B + 1.0) + P.z;
+ float result = lerp_Stage1_c0_c0_c1_c0_c1_c0(lerp_Stage1_c0_c0_c1_c0_c1_c0(lerp_Stage1_c0_c0_c1_c0_c1_c0(grad_Stage1_c0_c0_c1_c0_c1_c0(perm_Stage1_c0_c0_c1_c0_c1_c0(AA), p), grad_Stage1_c0_c0_c1_c0_c1_c0(perm_Stage1_c0_c0_c1_c0_c1_c0(BA), p + vec3(-1.0, 0.0, 0.0)), f.x), lerp_Stage1_c0_c0_c1_c0_c1_c0(grad_Stage1_c0_c0_c1_c0_c1_c0(perm_Stage1_c0_c0_c1_c0_c1_c0(AB), p + vec3(0.0, -1.0, 0.0)), grad_Stage1_c0_c0_c1_c0_c1_c0(perm_Stage1_c0_c0_c1_c0_c1_c0(BB), p + vec3(-1.0, -1.0, 0.0)), f.x), f.y), lerp_Stage1_c0_c0_c1_c0_c1_c0(lerp_Stage1_c0_c0_c1_c0_c1_c0(grad_Stage1_c0_c0_c1_c0_c1_c0(perm_Stage1_c0_c0_c1_c0_c1_c0(AA + 1.0), p + vec3(0.0, 0.0, -1.0)), grad_Stage1_c0_c0_c1_c0_c1_c0(perm_Stage1_c0_c0_c1_c0_c1_c0(BA + 1.0), p + vec3(-1.0, 0.0, -1.0)), f.x), lerp_Stage1_c0_c0_c1_c0_c1_c0(grad_Stage1_c0_c0_c1_c0_c1_c0(perm_Stage1_c0_c0_c1_c0_c1_c0(AB + 1.0), p + vec3(0.0, -1.0, -1.0)), grad_Stage1_c0_c0_c1_c0_c1_c0(perm_Stage1_c0_c0_c1_c0_c1_c0(BB + 1.0), p + vec3(-1.0, -1.0, -1.0)), f.x), f.y), f.z);
+ return result;
+}
+float noiseOctaves_Stage1_c0_c0_c1_c0_c1_c0(vec3 p) {
+ float result = 0.0;
+ float ratio = 1.0;
+ for (float i = 0.0;i < 8.0; i++) {
+ result += noise_Stage1_c0_c0_c1_c0_c1_c0(p) / ratio;
+ p *= 2.0;
+ ratio *= 2.0;
+ }
+ return (result + 1.0) / 2.0;
+}
+vec4 ImprovedPerlinNoise_Stage1_c0_c0_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coords = vTransformedCoords_1_Stage0 * ubaseFrequency_Stage1_c0_c0_c1_c0_c1_c0;
+ float r = noiseOctaves_Stage1_c0_c0_c1_c0_c1_c0(vec3(coords, uz_Stage1_c0_c0_c1_c0_c1_c0));
+ float g = noiseOctaves_Stage1_c0_c0_c1_c0_c1_c0(vec3(coords, uz_Stage1_c0_c0_c1_c0_c1_c0));
+ float b = noiseOctaves_Stage1_c0_c0_c1_c0_c1_c0(vec3(coords, uz_Stage1_c0_c0_c1_c0_c1_c0));
+ float a = noiseOctaves_Stage1_c0_c0_c1_c0_c1_c0(vec3(coords, uz_Stage1_c0_c0_c1_c0_c1_c0));
+ _output = vec4(r, g, b, a);
+ _output = clamp(_output, 0.0, 1.0);
+ _output = vec4(_output.xyz * _output.www, _output.w);
+ return _output;
+}
+float _guarded_divide(float n, float d) {
+ return n / d;
+}
+float _soft_light_component(float sc, float sa, float dc, float da) {
+ if (2.0 * sc <= sa) {
+ return (_guarded_divide((dc * dc) * (sa - 2.0 * sc), da) + (1.0 - da) * sc) + dc * ((-sa + 2.0 * sc) + 1.0);
+ } else if (4.0 * dc <= da) {
+ float DSqd = dc * dc;
+ float DCub = DSqd * dc;
+ float DaSqd = da * da;
+ float DaCub = DaSqd * da;
+ return _guarded_divide(((DaSqd * (sc - dc * ((3.0 * sa - 6.0 * sc) - 1.0)) + ((12.0 * da) * DSqd) * (sa - 2.0 * sc)) - (16.0 * DCub) * (sa - 2.0 * sc)) - DaCub * sc, DaSqd);
+ }
+ return ((dc * ((sa - 2.0 * sc) + 1.0) + sc) - sqrt(da * dc) * (sa - 2.0 * sc)) - da * sc;
+}
+vec4 blend_soft_light(vec4 src, vec4 dst) {
+ if (dst.w == 0.0) {
+ return src;
+ }
+ return vec4(_soft_light_component(src.x, src.w, dst.x, dst.w), _soft_light_component(src.y, src.w, dst.y, dst.w), _soft_light_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+}
+vec4 ComposeTwo_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_soft_light(ConstColorProcessor_Stage1_c0_c0_c1_c0_c0_c0(inputColor), ImprovedPerlinNoise_Stage1_c0_c0_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 blend_plus(vec4 src, vec4 dst) {
+ return min(src + dst, 1.0);
+}
+vec4 ComposeTwo_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_plus(ComposeTwo_Stage1_c0_c0_c0_c0(inputColor), ComposeTwo_Stage1_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 ConstColorProcessor_Stage1_c1_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage1_c1_c0_c0_c0_c0_c0;
+ }
+ return _output;
+}
+vec4 light_Stage1_c1_c0_c0_c0_c1_c0(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ vec3 halfDir = normalize(surfaceToLight + vec3(0.0, 0.0, 1.0));
+ float colorScale = uKS_Stage1_c1_c0_c0_c0_c1_c0 * pow(dot(normal, halfDir), uShininess_Stage1_c1_c0_c0_c0_c1_c0);
+ vec3 color = lightColor * clamp(colorScale, 0.0, 1.0);
+ return vec4(color, max(max(color.x, color.y), color.z));
+}
+float sobel_Stage1_c1_c0_c0_c0_c1_c0(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage1_c1_c0_c0_c0_c1_c0(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage1_c1_c0_c0_c0_c1_c0(float m[9], float surfaceScale) {
+ return pointToNormal_Stage1_c1_c0_c0_c0_c1_c0(sobel_Stage1_c1_c0_c0_c0_c1_c0(m[0], m[2], m[3], m[5], m[6], m[8], 0.25), sobel_Stage1_c1_c0_c0_c0_c1_c0(m[0], m[6], m[1], m[7], m[2], m[8], 0.25), surfaceScale);
+}
+vec3 lightColor_Stage1_c1_c0_c0_c0_c1_c0(vec3 surfaceToLight) {
+ float cosAngle = -dot(surfaceToLight, uS_Stage1_c1_c0_c0_c0_c1_c0);
+ if (cosAngle < uCosOuterConeAngle_Stage1_c1_c0_c0_c0_c1_c0) {
+ return vec3(0.0);
+ }
+ float scale = pow(cosAngle, uExponent_Stage1_c1_c0_c0_c0_c1_c0);
+ if (cosAngle < uCosInnerConeAngle_Stage1_c1_c0_c0_c0_c1_c0) {
+ return ((uLightColor_Stage1_c1_c0_c0_c0_c1_c0 * scale) * (cosAngle - uCosOuterConeAngle_Stage1_c1_c0_c0_c0_c1_c0)) * uConeScale_Stage1_c1_c0_c0_c0_c1_c0;
+ }
+ return uLightColor_Stage1_c1_c0_c0_c0_c1_c0;
+}
+vec4 SpecularLighting_Stage1_c1_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coord = vTransformedCoords_2_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage1_c1_c0_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0_c1_c0.xy, uTexDom_Stage1_c1_c0_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_3_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp0 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1_c1_c0_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0_c1_c0.xy, uTexDom_Stage1_c1_c0_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_3_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1_c1_c0_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0_c1_c0.xy, uTexDom_Stage1_c1_c0_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_3_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage1_c1_c0_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0_c1_c0.xy, uTexDom_Stage1_c1_c0_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_3_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0_c1_c0.xy, uTexDom_Stage1_c1_c0_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_3_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1_c1_c0_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0_c1_c0.xy, uTexDom_Stage1_c1_c0_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_3_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp5 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage1_c1_c0_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0_c1_c0.xy, uTexDom_Stage1_c1_c0_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_3_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp6 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage1_c1_c0_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0_c1_c0.xy, uTexDom_Stage1_c1_c0_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_3_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp7 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage1_c1_c0_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0_c1_c0.xy, uTexDom_Stage1_c1_c0_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_3_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp8 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = normalize(uLightLocation_Stage1_c1_c0_c0_c0_c1_c0 - vec3(gl_FragCoord.xy, uSurfaceScale_Stage1_c1_c0_c0_c0_c1_c0 * m[4]));
+ _output = light_Stage1_c1_c0_c0_c0_c1_c0(normal_Stage1_c1_c0_c0_c0_c1_c0(m, uSurfaceScale_Stage1_c1_c0_c0_c0_c1_c0), surfaceToLight, lightColor_Stage1_c1_c0_c0_c0_c1_c0(surfaceToLight));
+ _output *= _input;
+ return _output;
+}
+vec4 blend_multiply(vec4 src, vec4 dst) {
+ return vec4(((1.0 - src.w) * dst.xyz + (1.0 - dst.w) * src.xyz) + src.xyz * dst.xyz, src.w + (1.0 - src.w) * dst.w);
+}
+vec4 ComposeTwo_Stage1_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_multiply(ConstColorProcessor_Stage1_c1_c0_c0_c0_c0_c0(inputColor), SpecularLighting_Stage1_c1_c0_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 CircleEffect_Stage1_c1_c0_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float d;
+ {
+ d = (length((ucircle_Stage1_c1_c0_c1_c0_c0_c0.xy - gl_FragCoord.xy) * ucircle_Stage1_c1_c0_c1_c0_c0_c0.w) - 1.0) * ucircle_Stage1_c1_c0_c1_c0_c0_c0.z;
+ }
+ {
+ _output = _input * clamp(d, 0.0, 1.0);
+ }
+ return _output;
+}
+vec4 EllipticalRRect_Stage1_c1_c0_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 dxy0 = uinnerRect_Stage1_c1_c0_c1_c0_c1_c0.xy - gl_FragCoord.xy;
+ vec2 dxy1 = gl_FragCoord.xy - uinnerRect_Stage1_c1_c0_c1_c0_c1_c0.zw;
+ vec2 dxy = max(max(dxy0, dxy1), 0.0);
+ vec2 Z = max(max(dxy0 * uinvRadiiLTRB_Stage1_c1_c0_c1_c0_c1_c0.xy, dxy1 * uinvRadiiLTRB_Stage1_c1_c0_c1_c0_c1_c0.zw), 0.0);
+ float implicit = dot(Z, dxy) - 1.0;
+ float grad_dot = 4.0 * dot(Z, Z);
+ grad_dot = max(grad_dot, 9.9999997473787516e-05);
+ float approx_dist = implicit * inversesqrt(grad_dot);
+ float alpha = clamp(0.5 - approx_dist, 0.0, 1.0);
+ _output = _input * alpha;
+ return _output;
+}
+vec4 blend_src_out(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src;
+}
+vec4 ComposeTwo_Stage1_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_src_out(CircleEffect_Stage1_c1_c0_c1_c0_c0_c0(inputColor), EllipticalRRect_Stage1_c1_c0_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 blend_xor(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src + (1.0 - src.w) * dst;
+}
+vec4 ComposeTwo_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_xor(ComposeTwo_Stage1_c1_c0_c0_c0(inputColor), ComposeTwo_Stage1_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 blend_dst_over(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src + dst;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vinColor_Stage0;
+ float edgeAlpha;
+ vec2 duvdx = dFdx(vQuadEdge_Stage0.xy);
+ vec2 duvdy = dFdy(vQuadEdge_Stage0.xy);
+ if (vQuadEdge_Stage0.z > 0.0 && vQuadEdge_Stage0.w > 0.0) {
+ edgeAlpha = min(min(vQuadEdge_Stage0.z, vQuadEdge_Stage0.w) + 0.5, 1.0);
+ } else {
+ vec2 gF = vec2((2.0 * vQuadEdge_Stage0.x) * duvdx.x - duvdx.y, (2.0 * vQuadEdge_Stage0.x) * duvdy.x - duvdy.y);
+ edgeAlpha = vQuadEdge_Stage0.x * vQuadEdge_Stage0.x - vQuadEdge_Stage0.y;
+ edgeAlpha = clamp(0.5 - edgeAlpha / length(gF), 0.0, 1.0);
+ }
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_dst_over(ComposeTwo_Stage1_c0_c0(inputColor), ComposeTwo_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ if (all(lessThanEqual(outputCoverage_Stage0.xyz, vec3(0.0)))) {
+ discard;
+ }
+ vec2 _dstTexCoord = (gl_FragCoord.xy - uDstTextureUpperLeft_Stage2) * uDstTextureCoordScale_Stage2;
+ vec4 _dstColor = texture(uDstTextureSampler_Stage2, _dstTexCoord);
+ sk_FragColor = blend_src_out(output_Stage1, _dstColor);
+ sk_FragColor = outputCoverage_Stage0 * sk_FragColor + (vec4(1.0) - outputCoverage_Stage0) * _dstColor;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec4 inQuadEdge;
+noperspective out vec4 vQuadEdge_Stage0;
+noperspective out vec4 vinColor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+void main() {
+ vQuadEdge_Stage0 = inQuadEdge;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1117.shader_test b/shaders/skia/1117.shader_test
new file mode 100644
index 0000000..fcfd66d
--- /dev/null
+++ b/shaders/skia/1117.shader_test
@@ -0,0 +1,216 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_KHR_blend_equation_advanced : require
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+layout (blend_support_all_equations) out ;
+uniform mat4 um_Stage1_c0_c0_c0_c0;
+uniform vec4 uv_Stage1_c0_c0_c0_c0;
+uniform vec2 uImageIncrement_Stage1_c0_c0_c1_c0_c0_c0;
+uniform vec2 uBounds_Stage1_c0_c0_c1_c0_c0_c0;
+uniform vec4 uKernel_Stage1_c0_c0_c1_c0_c0_c0[1];
+uniform vec2 uScale_Stage1_c0_c0_c1_c0_c1_c0;
+uniform vec4 uTexDom_Stage1_c0_c0_c1_c0_c1_c0;
+uniform vec3 uDecalParams_Stage1_c0_c0_c1_c0_c1_c0;
+uniform vec4 urectUniform_Stage1_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+uniform sampler2D uTextureSampler_2_Stage1;
+noperspective in vec2 vEllipseOffsets0_Stage0;
+noperspective in vec2 vEllipseOffsets1_Stage0;
+noperspective in vec4 vinColor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+vec4 ColorMatrixFragmentProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = _input;
+ {
+ float nonZeroAlpha = max(inputColor.w, 9.9999997473787516e-05);
+ inputColor = vec4(inputColor.xyz / nonZeroAlpha, inputColor.w);
+ }
+ _output = um_Stage1_c0_c0_c0_c0 * inputColor + uv_Stage1_c0_c0_c0_c0;
+ {
+ _output.w = clamp(_output.w, 0.0, 1.0);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 GaussianConvolution_Stage1_c0_c0_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0 - uImageIncrement_Stage1_c0_c0_c1_c0_c0_c0;
+ vec2 coordSampled = vec2(0.0, 0.0);
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage1_c0_c0_c1_c0_c0_c0.x, uBounds_Stage1_c0_c0_c1_c0_c0_c0.y - uBounds_Stage1_c0_c0_c1_c0_c0_c0.x) + uBounds_Stage1_c0_c0_c1_c0_c0_c0.x;
+ _output += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c1_c0_c0_c0[0].x;
+ coord += uImageIncrement_Stage1_c0_c0_c1_c0_c0_c0;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage1_c0_c0_c1_c0_c0_c0.x, uBounds_Stage1_c0_c0_c1_c0_c0_c0.y - uBounds_Stage1_c0_c0_c1_c0_c0_c0.x) + uBounds_Stage1_c0_c0_c1_c0_c0_c0.x;
+ _output += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c1_c0_c0_c0[0].y;
+ coord += uImageIncrement_Stage1_c0_c0_c1_c0_c0_c0;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage1_c0_c0_c1_c0_c0_c0.x, uBounds_Stage1_c0_c0_c1_c0_c0_c0.y - uBounds_Stage1_c0_c0_c1_c0_c0_c0.x) + uBounds_Stage1_c0_c0_c1_c0_c0_c0.x;
+ _output += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c1_c0_c0_c0[0].z;
+ coord += uImageIncrement_Stage1_c0_c0_c1_c0_c0_c0;
+ _output *= _input;
+ return _output;
+}
+vec4 DisplacementMap_Stage1_c0_c0_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 dColor = texture(uTextureSampler_1_Stage1, vTransformedCoords_1_Stage0);
+ dColor.xyz = dColor.w < 9.9999999747524271e-07 ? vec3(0.0) : clamp(dColor.xyz / dColor.w, 0.0, 1.0);
+ vec2 cCoords = vTransformedCoords_2_Stage0 + uScale_Stage1_c0_c0_c1_c0_c1_c0 * (dColor.zw - vec2(0.5));
+ {
+ vec2 origCoord = cCoords;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c1_c0_c1_c0.xy, uTexDom_Stage1_c0_c0_c1_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c1_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c1_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c1_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c1_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ _output = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ return _output;
+}
+float _blend_color_luminance(vec3 color) {
+ return dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), color);
+}
+vec3 _blend_set_color_luminance(vec3 hueSatColor, float alpha, vec3 lumColor) {
+ float lum = _blend_color_luminance(lumColor);
+ vec3 result = (lum - _blend_color_luminance(hueSatColor)) + hueSatColor;
+ float minComp = min(min(result.x, result.y), result.z);
+ float maxComp = max(max(result.x, result.y), result.z);
+ if (minComp < 0.0 && lum != minComp) {
+ result = lum + ((result - lum) * lum) / (lum - minComp);
+ }
+ if (maxComp > alpha && maxComp != lum) {
+ return lum + ((result - lum) * (alpha - lum)) / (maxComp - lum);
+ }
+ return result;
+}
+vec4 blend_color(vec4 src, vec4 dst) {
+ float alpha = dst.w * src.w;
+ vec3 sda = src.xyz * dst.w;
+ vec3 dsa = dst.xyz * src.w;
+ return vec4((((_blend_set_color_luminance(sda, alpha, dsa) + dst.xyz) - dsa) + src.xyz) - sda, (src.w + dst.w) - alpha);
+}
+vec4 ComposeTwo_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_color(GaussianConvolution_Stage1_c0_c0_c1_c0_c0_c0(inputColor), DisplacementMap_Stage1_c0_c0_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+float _blend_overlay_component(float sc, float sa, float dc, float da) {
+ if (2.0 * dc <= da) {
+ return (2.0 * sc) * dc;
+ }
+ return sa * da - (2.0 * (da - dc)) * (sa - sc);
+}
+vec4 blend_overlay(vec4 src, vec4 dst) {
+ vec4 result = vec4(_blend_overlay_component(src.x, src.w, dst.x, dst.w), _blend_overlay_component(src.y, src.w, dst.y, dst.w), _blend_overlay_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+ result.xyz += dst.xyz * (1.0 - src.w) + src.xyz * (1.0 - dst.w);
+ return result;
+}
+vec4 ComposeTwo_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_overlay(ColorMatrixFragmentProcessor_Stage1_c0_c0_c0_c0(inputColor), ComposeTwo_Stage1_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 AARectEffect_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ float alpha;
+ {
+ alpha = float(all(greaterThan(vec4(gl_FragCoord.xy, urectUniform_Stage1_c1_c0.zw), vec4(urectUniform_Stage1_c1_c0.xy, gl_FragCoord.xy))) ? 1 : 0);
+ }
+ _output = _input * alpha;
+ return _output;
+}
+float _guarded_divide(float n, float d) {
+ return n / d;
+}
+float _color_dodge_component(float sc, float sa, float dc, float da) {
+ if (dc == 0.0) {
+ return sc * (1.0 - da);
+ } else {
+ float d = sa - sc;
+ if (d == 0.0) {
+ return (sa * da + sc * (1.0 - da)) + dc * (1.0 - sa);
+ }
+ d = min(da, _guarded_divide(dc * sa, d));
+ return (d * sa + sc * (1.0 - da)) + dc * (1.0 - sa);
+ }
+}
+vec4 blend_color_dodge(vec4 src, vec4 dst) {
+ return vec4(_color_dodge_component(src.x, src.w, dst.x, dst.w), _color_dodge_component(src.y, src.w, dst.y, dst.w), _color_dodge_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vinColor_Stage0;
+ vec2 scaledOffset = vEllipseOffsets0_Stage0;
+ float test = dot(scaledOffset, scaledOffset) - 1.0;
+ vec2 duvdx = dFdx(vEllipseOffsets0_Stage0);
+ vec2 duvdy = -dFdy(vEllipseOffsets0_Stage0);
+ vec2 grad = vec2(vEllipseOffsets0_Stage0.x * duvdx.x + vEllipseOffsets0_Stage0.y * duvdx.y, vEllipseOffsets0_Stage0.x * duvdy.x + vEllipseOffsets0_Stage0.y * duvdy.y);
+ float grad_dot = 4.0 * dot(grad, grad);
+ grad_dot = max(grad_dot, 1.1754999560161448e-38);
+ float invlen = inversesqrt(grad_dot);
+ float edgeAlpha = clamp(0.5 - test * invlen, 0.0, 1.0);
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_color_dodge(ComposeTwo_Stage1_c0_c0(inputColor), AARectEffect_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ sk_FragColor = outputCoverage_Stage0 * output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec2 inEllipseOffsets0;
+in vec2 inEllipseOffsets1;
+noperspective out vec2 vEllipseOffsets0_Stage0;
+noperspective out vec2 vEllipseOffsets1_Stage0;
+noperspective out vec4 vinColor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+void main() {
+ vEllipseOffsets0_Stage0 = inEllipseOffsets0;
+ vEllipseOffsets1_Stage0 = inEllipseOffsets1;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = (uViewM_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/112-1.shader_test b/shaders/skia/112-1.shader_test
new file mode 100644
index 0000000..32cf988
--- /dev/null
+++ b/shaders/skia/112-1.shader_test
@@ -0,0 +1,68 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform mat4 um_Stage2;
+uniform vec4 uv_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+vec4 YUVtoRGBEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 planes[1];
+ planes[0] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0));
+ vec4 color = vec4(planes[0].y, planes[0].x, planes[0].z, planes[0].w);
+ color.xyz *= color.w;
+ _output = color;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = YUVtoRGBEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ vec4 inputColor = output_Stage1;
+ {
+ float nonZeroAlpha = max(inputColor.w, 9.9999997473787516e-05);
+ inputColor = vec4(inputColor.xyz / nonZeroAlpha, inputColor.w);
+ }
+ output_Stage2 = um_Stage2 * inputColor + uv_Stage2;
+ {
+ output_Stage2 = clamp(output_Stage2, 0.0, 1.0);
+ }
+ {
+ output_Stage2.xyz *= output_Stage2.w;
+ }
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/112-14.shader_test b/shaders/skia/112-14.shader_test
new file mode 100644
index 0000000..9813b34
--- /dev/null
+++ b/shaders/skia/112-14.shader_test
@@ -0,0 +1,156 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform float uPixelSize_Stage1;
+uniform vec2 uRange_Stage1;
+uniform vec2 ubaseFrequency_Stage2;
+uniform float uz_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+uniform sampler2D uTextureSampler_1_Stage2;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec3 fade_Stage2(vec3 t) {
+ return ((t * t) * t) * (t * (t * 6.0 - 15.0) + 10.0);
+}
+float perm_Stage2(float x) {
+ return texture(uTextureSampler_0_Stage2, vec2(fract(x / 256.0), 0.0)).x * 255.0;
+}
+float grad_Stage2(float x, vec3 p) {
+ return dot(texture(uTextureSampler_1_Stage2, vec2(fract(x / 16.0), 0.0)).xyz * 255.0 - vec3(1.0), p);
+}
+float lerp_Stage2(float a, float b, float w) {
+ return a + w * (b - a);
+}
+float noise_Stage2(vec3 p) {
+ vec3 P = mod(floor(p), 256.0);
+ p -= floor(p);
+ vec3 f = fade_Stage2(p);
+ float A = perm_Stage2(P.x) + P.y;
+ float AA = perm_Stage2(A) + P.z;
+ float AB = perm_Stage2(A + 1.0) + P.z;
+ float B = perm_Stage2(P.x + 1.0) + P.y;
+ float BA = perm_Stage2(B) + P.z;
+ float BB = perm_Stage2(B + 1.0) + P.z;
+ float result = lerp_Stage2(lerp_Stage2(lerp_Stage2(grad_Stage2(perm_Stage2(AA), p), grad_Stage2(perm_Stage2(BA), p + vec3(-1.0, 0.0, 0.0)), f.x), lerp_Stage2(grad_Stage2(perm_Stage2(AB), p + vec3(0.0, -1.0, 0.0)), grad_Stage2(perm_Stage2(BB), p + vec3(-1.0, -1.0, 0.0)), f.x), f.y), lerp_Stage2(lerp_Stage2(grad_Stage2(perm_Stage2(AA + 1.0), p + vec3(0.0, 0.0, -1.0)), grad_Stage2(perm_Stage2(BA + 1.0), p + vec3(-1.0, 0.0, -1.0)), f.x), lerp_Stage2(grad_Stage2(perm_Stage2(AB + 1.0), p + vec3(0.0, -1.0, -1.0)), grad_Stage2(perm_Stage2(BB + 1.0), p + vec3(-1.0, -1.0, -1.0)), f.x), f.y), f.z);
+ return result;
+}
+float noiseOctaves_Stage2(vec3 p) {
+ float result = 0.0;
+ float ratio = 1.0;
+ for (float i = 0.0;i < 2.0; i++) {
+ result += noise_Stage2(p) / ratio;
+ p *= 2.0;
+ ratio *= 2.0;
+ }
+ return (result + 1.0) / 2.0;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = vec4(1.0, 1.0, 1.0, 1.0);
+ vec2 coord = vTransformedCoords_0_Stage0;
+ coord.y -= 10.0 * uPixelSize_Stage1;
+ for (int i = 0;i < 21; i++) {
+ output_Stage1 = min(output_Stage1, texture(uTextureSampler_0_Stage1, coord));
+ coord.y += uPixelSize_Stage1;
+ }
+ output_Stage1 *= outputColor_Stage0;
+ }
+ vec4 output_Stage2;
+ {
+ vec2 coords = vTransformedCoords_1_Stage0 * ubaseFrequency_Stage2;
+ float r = noiseOctaves_Stage2(vec3(coords, uz_Stage2));
+ float g = noiseOctaves_Stage2(vec3(coords, uz_Stage2));
+ float b = noiseOctaves_Stage2(vec3(coords, uz_Stage2));
+ float a = noiseOctaves_Stage2(vec3(coords, uz_Stage2));
+ output_Stage2 = vec4(r, g, b, a);
+ output_Stage2 = clamp(output_Stage2, 0.0, 1.0);
+ output_Stage2 = vec4(output_Stage2.xyz * output_Stage2.www, output_Stage2.w);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform float uSrcTF_Stage0[7];
+uniform mat3 uColorXform_Stage0;
+uniform float uDstTF_Stage0[7];
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 inColor;
+in vec2 inLocalCoord;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+float src_tf_Stage0(float x) {
+ float G = uSrcTF_Stage0[0];
+ float A = uSrcTF_Stage0[1];
+ float B = uSrcTF_Stage0[2];
+ float C = uSrcTF_Stage0[3];
+ float D = uSrcTF_Stage0[4];
+ float E = uSrcTF_Stage0[5];
+ float F = uSrcTF_Stage0[6];
+ float s = sign(x);
+ x = abs(x);
+ x = x < D ? C * x + F : pow(A * x + B, G) + E;
+ return s * x;
+}
+float dst_tf_Stage0(float x) {
+ float G = uDstTF_Stage0[0];
+ float A = uDstTF_Stage0[1];
+ float B = uDstTF_Stage0[2];
+ float C = uDstTF_Stage0[3];
+ float D = uDstTF_Stage0[4];
+ float E = uDstTF_Stage0[5];
+ float F = uDstTF_Stage0[6];
+ float s = sign(x);
+ x = abs(x);
+ x = x < D ? C * x + F : pow(A * x + B, G) + E;
+ return s * x;
+}
+vec4 gamut_xform_Stage0(vec4 color) {
+ color.xyz = uColorXform_Stage0 * color.xyz;
+ return color;
+}
+vec4 color_xform_Stage0(vec4 color) {
+ float nonZeroAlpha = max(color.w, 9.9999997473787516e-05);
+ color = vec4(color.xyz / nonZeroAlpha, nonZeroAlpha);
+ color.x = src_tf_Stage0(color.x);
+ color.y = src_tf_Stage0(color.y);
+ color.z = src_tf_Stage0(color.z);
+ color = gamut_xform_Stage0(color);
+ color.x = dst_tf_Stage0(color.x);
+ color.y = dst_tf_Stage0(color.y);
+ color.z = dst_tf_Stage0(color.z);
+ color.xyz *= color.w;
+ return color;
+}
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = color_xform_Stage0(color);
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/112-15.shader_test b/shaders/skia/112-15.shader_test
new file mode 100644
index 0000000..468c19f
--- /dev/null
+++ b/shaders/skia/112-15.shader_test
@@ -0,0 +1,51 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform float uPixelSize_Stage2;
+uniform vec2 uRange_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_1_Stage0;
+ coord.x -= 4.0 * uPixelSize_Stage2;
+ for (int i = 0;i < 9; i++) {
+ output_Stage2 = max(output_Stage2, texture(uTextureSampler_0_Stage2, coord));
+ coord.x += uPixelSize_Stage2;
+ }
+ output_Stage2 *= output_Stage1;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/112-16.shader_test b/shaders/skia/112-16.shader_test
new file mode 100644
index 0000000..f957358
--- /dev/null
+++ b/shaders/skia/112-16.shader_test
@@ -0,0 +1,77 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uCoordTransformMatrix_2_Stage0;
+uniform vec4 usubset_Stage2_c0_c0;
+uniform vec4 uclamp_Stage2_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec3 vTransformedCoords_1_Stage0;
+vec4 TextureEffect_Stage2_c0_c0(vec4 _input, vec2 _coords) {
+ _coords = _coords * uCoordTransformMatrix_2_Stage0.xz + uCoordTransformMatrix_2_Stage0.yw;
+ vec4 _output;
+ vec2 inCoord = _coords;
+ vec2 subsetCoord;
+ {
+ float w = usubset_Stage2_c0_c0.z - usubset_Stage2_c0_c0.x;
+ float w2 = 2.0 * w;
+ float m = mod(inCoord.x - usubset_Stage2_c0_c0.x, w2);
+ subsetCoord.x = mix(m, w2 - m, step(w, m)) + usubset_Stage2_c0_c0.x;
+ }
+ subsetCoord.y = mod(inCoord.y - usubset_Stage2_c0_c0.y, usubset_Stage2_c0_c0.w - usubset_Stage2_c0_c0.y) + usubset_Stage2_c0_c0.y;
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage2_c0_c0.x, uclamp_Stage2_c0_c0.z);
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage2_c0_c0.y, uclamp_Stage2_c0_c0.w);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ _output = _input * textureColor;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ vec2 vTransformedCoords_1_Stage0_ensure2D = vTransformedCoords_1_Stage0.xy / vTransformedCoords_1_Stage0.z;
+ float coord = vTransformedCoords_1_Stage0_ensure2D.x - 0.5;
+ float f = fract(coord);
+ coord += 0.5 - f;
+ float f2 = f * f;
+ vec4 w = mat4(0.055555555555555552, 0.88888888888888884, 0.055555555555555552, 0.0, -0.5, 0.0, 0.5, 0.0, 0.83333333333333337, -2.0, 1.5, -0.33333333333333331, -0.3888888888888889, 1.1666666666666667, -1.1666666666666667, 0.3888888888888889) * vec4(1.0, f, f2, f2 * f);
+ vec4 c[4];
+ c[0] = TextureEffect_Stage2_c0_c0(vec4(1.0), vec2(coord + -1.0, vTransformedCoords_1_Stage0_ensure2D.y));
+ c[1] = TextureEffect_Stage2_c0_c0(vec4(1.0), vec2(coord, vTransformedCoords_1_Stage0_ensure2D.y));
+ c[2] = TextureEffect_Stage2_c0_c0(vec4(1.0), vec2(coord + 1.0, vTransformedCoords_1_Stage0_ensure2D.y));
+ c[3] = TextureEffect_Stage2_c0_c0(vec4(1.0), vec2(coord + 2.0, vTransformedCoords_1_Stage0_ensure2D.y));
+ vec4 bicubicColor = ((c[0] * w.x + c[1] * w.y) + c[2] * w.z) + c[3] * w.w;
+ bicubicColor.xyz = max(vec3(0.0), min(bicubicColor.xyz, bicubicColor.www));
+ output_Stage2 = bicubicColor * output_Stage1;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec3 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0);
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/112-17.shader_test b/shaders/skia/112-17.shader_test
new file mode 100644
index 0000000..0d10a67
--- /dev/null
+++ b/shaders/skia/112-17.shader_test
@@ -0,0 +1,41 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform float uPixelSize_Stage1;
+uniform vec2 uRange_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = vec4(1.0, 1.0, 1.0, 1.0);
+ vec2 coord = vTransformedCoords_0_Stage0;
+ coord.y -= 3.0 * uPixelSize_Stage1;
+ for (int i = 0;i < 7; i++) {
+ output_Stage1 = min(output_Stage1, texture(uTextureSampler_0_Stage1, coord));
+ coord.y += uPixelSize_Stage1;
+ }
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/112-2.shader_test b/shaders/skia/112-2.shader_test
new file mode 100644
index 0000000..e89eaf3
--- /dev/null
+++ b/shaders/skia/112-2.shader_test
@@ -0,0 +1,145 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage2;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.w) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ } else {
+ {
+ if (t < uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+vec4 ComposeOne_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_dst_in(_input, TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0)));
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = ComposeOne_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 blend_dst_over(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src + dst;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_dst_over(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ {
+ output_Stage2 = output_Stage1 * ucolor_Stage2;
+ }
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 inColor;
+in vec2 inLocalCoord;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/112-4.shader_test b/shaders/skia/112-4.shader_test
new file mode 100644
index 0000000..4f32b25
--- /dev/null
+++ b/shaders/skia/112-4.shader_test
@@ -0,0 +1,52 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec3 uedges_Stage1[4];
+flat in vec4 vcolor_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ float alpha = 1.0;
+ float edge;
+ edge = dot(uedges_Stage1[0], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage1[1], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage1[2], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage1[3], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ output_Stage1 = vec4(alpha);
+ }
+ {
+ sk_FragColor = outputColor_Stage0 * output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 position;
+in vec4 color;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/112-5.shader_test b/shaders/skia/112-5.shader_test
new file mode 100644
index 0000000..5f4c8c2
--- /dev/null
+++ b/shaders/skia/112-5.shader_test
@@ -0,0 +1,89 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage2_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c1_c0;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_dst_in(outputColor_Stage0, ClampedGradientEffect_Stage1_c0_c0(vec4(1.0)));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_dst_in(ConstColorProcessor_Stage2_c1_c0(vec4(1.0)), output_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/112-6.shader_test b/shaders/skia/112-6.shader_test
new file mode 100644
index 0000000..9ea957d
--- /dev/null
+++ b/shaders/skia/112-6.shader_test
@@ -0,0 +1,140 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform float uSurfaceScale_Stage1;
+uniform vec3 uLightColor_Stage1;
+uniform float uKS_Stage1;
+uniform float uShininess_Stage1;
+uniform vec3 uLightLocation_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 light_Stage1(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ vec3 halfDir = normalize(surfaceToLight + vec3(0.0, 0.0, 1.0));
+ float colorScale = uKS_Stage1 * pow(dot(normal, halfDir), uShininess_Stage1);
+ vec3 color = lightColor * clamp(colorScale, 0.0, 1.0);
+ return vec4(color, max(max(color.x, color.y), color.z));
+}
+float sobel_Stage1(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage1(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage1(float m[9], float surfaceScale) {
+ return pointToNormal_Stage1(sobel_Stage1(m[0], m[1], m[3], m[4], 0.0, 0.0, 0.66666698455810547), sobel_Stage1(m[0], m[3], m[1], m[4], 0.0, 0.0, 0.66666698455810547), surfaceScale);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ vec2 coord = vTransformedCoords_0_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp0 = textureColor;
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp1 = textureColor;
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp2 = textureColor;
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp3 = textureColor;
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp4 = textureColor;
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp5 = textureColor;
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp6 = textureColor;
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp7 = textureColor;
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp8 = textureColor;
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = normalize(uLightLocation_Stage1 - vec3(gl_FragCoord.xy, uSurfaceScale_Stage1 * m[4]));
+ output_Stage1 = light_Stage1(normal_Stage1(m, uSurfaceScale_Stage1), surfaceToLight, uLightColor_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/112-7.shader_test b/shaders/skia/112-7.shader_test
new file mode 100644
index 0000000..cdad56b
--- /dev/null
+++ b/shaders/skia/112-7.shader_test
@@ -0,0 +1,98 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+uniform vec2 uDstTextureUpperLeft_Stage2;
+uniform vec2 uDstTextureCoordScale_Stage2;
+uniform sampler2D uTextureSampler_0_Stage0;
+uniform sampler2D uDstTextureSampler_Stage2;
+noperspective in vec2 vTextureCoords_Stage0;
+flat in int vTexIndex_Stage0;
+noperspective in vec4 vinColor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ t.x = fract(t.x);
+ }
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 blend_dst_out(vec4 src, vec4 dst) {
+ return (1.0 - src.w) * dst;
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ vec4 texColor;
+ {
+ texColor = texture(uTextureSampler_0_Stage0, vTextureCoords_Stage0);
+ }
+ outputCoverage_Stage0 = texColor;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TiledGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ if (all(lessThanEqual(outputCoverage_Stage0.xyz, vec3(0.0)))) {
+ discard;
+ }
+ vec2 _dstTexCoord = (gl_FragCoord.xy - uDstTextureUpperLeft_Stage2) * uDstTextureCoordScale_Stage2;
+ _dstTexCoord.y = 1.0 - _dstTexCoord.y;
+ vec4 _dstColor = texture(uDstTextureSampler_Stage2, _dstTexCoord);
+ sk_FragColor = blend_dst_out(output_Stage1, _dstColor);
+ float lerpRed = mix(_dstColor.w, sk_FragColor.w, outputCoverage_Stage0.x);
+ float lerpBlue = mix(_dstColor.w, sk_FragColor.w, outputCoverage_Stage0.y);
+ float lerpGreen = mix(_dstColor.w, sk_FragColor.w, outputCoverage_Stage0.z);
+ sk_FragColor = outputCoverage_Stage0 * sk_FragColor + (vec4(1.0) - outputCoverage_Stage0) * _dstColor;
+ sk_FragColor.w = max(max(lerpRed, lerpBlue), lerpGreen);
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform vec2 uAtlasSizeInv_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in uvec2 inTextureCoords;
+noperspective out vec2 vTextureCoords_Stage0;
+flat out int vTexIndex_Stage0;
+noperspective out vec4 vinColor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ ivec2 signedCoords = ivec2(int(inTextureCoords.x), int(inTextureCoords.y));
+ vec2 unormTexCoords = vec2(float(signedCoords.x / 2), float(signedCoords.y / 2));
+ vTextureCoords_Stage0 = unormTexCoords * uAtlasSizeInv_Stage0;
+ vTexIndex_Stage0 = 0;
+ vinColor_Stage0 = inColor;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(inPosition.x, inPosition.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/112.shader_test b/shaders/skia/112.shader_test
new file mode 100644
index 0000000..4af9e5e
--- /dev/null
+++ b/shaders/skia/112.shader_test
@@ -0,0 +1,141 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform float uSrcTF_Stage1_c0_c0[7];
+uniform mat3 uColorXform_Stage1_c0_c0;
+uniform float uDstTF_Stage1_c0_c0[7];
+uniform mat4 um_Stage2;
+uniform vec4 uv_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+uniform sampler2D uTextureSampler_2_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_1_Stage1, vTransformedCoords_1_Stage0) * _input;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c0_c0_c0_c0_c2_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_2_Stage1, vTransformedCoords_2_Stage0) * _input;
+ return _output;
+}
+vec4 YUVtoRGBEffect_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 planes[3];
+ planes[0] = TextureEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ planes[1] = TextureEffect_Stage1_c0_c0_c0_c0_c1_c0(vec4(1.0));
+ planes[2] = TextureEffect_Stage1_c0_c0_c0_c0_c2_c0(vec4(1.0));
+ vec4 color = vec4(planes[0].w, planes[1].x, planes[1].y, planes[2].w);
+ color.xyz *= color.w;
+ _output = color;
+ return _output;
+}
+float src_tf_Stage1_c0_c0(float x) {
+ float G = uSrcTF_Stage1_c0_c0[0];
+ float A = uSrcTF_Stage1_c0_c0[1];
+ float B = uSrcTF_Stage1_c0_c0[2];
+ float C = uSrcTF_Stage1_c0_c0[3];
+ float D = uSrcTF_Stage1_c0_c0[4];
+ float E = uSrcTF_Stage1_c0_c0[5];
+ float F = uSrcTF_Stage1_c0_c0[6];
+ float s = sign(x);
+ x = abs(x);
+ x = x < D ? C * x + F : pow(A * x + B, G) + E;
+ return s * x;
+}
+float dst_tf_Stage1_c0_c0(float x) {
+ float G = uDstTF_Stage1_c0_c0[0];
+ float A = uDstTF_Stage1_c0_c0[1];
+ float B = uDstTF_Stage1_c0_c0[2];
+ float C = uDstTF_Stage1_c0_c0[3];
+ float D = uDstTF_Stage1_c0_c0[4];
+ float E = uDstTF_Stage1_c0_c0[5];
+ float F = uDstTF_Stage1_c0_c0[6];
+ float s = sign(x);
+ x = abs(x);
+ x = x < D ? C * x + F : pow(A * x + B, G) + E;
+ return s * x;
+}
+vec4 gamut_xform_Stage1_c0_c0(vec4 color) {
+ color.xyz = uColorXform_Stage1_c0_c0 * color.xyz;
+ return color;
+}
+vec4 color_xform_Stage1_c0_c0(vec4 color) {
+ float nonZeroAlpha = max(color.w, 9.9999997473787516e-05);
+ color = vec4(color.xyz / nonZeroAlpha, nonZeroAlpha);
+ color.x = src_tf_Stage1_c0_c0(color.x);
+ color.y = src_tf_Stage1_c0_c0(color.y);
+ color.z = src_tf_Stage1_c0_c0(color.z);
+ color = gamut_xform_Stage1_c0_c0(color);
+ color.x = dst_tf_Stage1_c0_c0(color.x);
+ color.y = dst_tf_Stage1_c0_c0(color.y);
+ color.z = dst_tf_Stage1_c0_c0(color.z);
+ color.xyz *= color.w;
+ return color;
+}
+vec4 ColorSpaceXform_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = color_xform_Stage1_c0_c0(YUVtoRGBEffect_Stage1_c0_c0_c0_c0(vec4(1.0))) * _input;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ColorSpaceXform_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ vec4 inputColor = output_Stage1;
+ {
+ float nonZeroAlpha = max(inputColor.w, 9.9999997473787516e-05);
+ inputColor = vec4(inputColor.xyz / nonZeroAlpha, inputColor.w);
+ }
+ output_Stage2 = um_Stage2 * inputColor + uv_Stage2;
+ {
+ output_Stage2 = clamp(output_Stage2, 0.0, 1.0);
+ }
+ {
+ output_Stage2.xyz *= output_Stage2.w;
+ }
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1123.shader_test b/shaders/skia/1123.shader_test
new file mode 100644
index 0000000..6c4403a
--- /dev/null
+++ b/shaders/skia/1123.shader_test
@@ -0,0 +1,209 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+uniform vec2 uImageIncrement_Stage1;
+uniform float uSurfaceScale_Stage1;
+uniform vec3 uLightColor_Stage1;
+uniform float uKD_Stage1;
+uniform vec4 uTexDom_Stage1;
+uniform vec3 uDecalParams_Stage1;
+uniform vec3 uLightLocation_Stage1;
+uniform float uExponent_Stage1;
+uniform float uCosInnerConeAngle_Stage1;
+uniform float uCosOuterConeAngle_Stage1;
+uniform float uConeScale_Stage1;
+uniform vec3 uS_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+in vec4 vcolor_Stage0;
+in vec2 vTransformedCoords_0_Stage0;
+vec4 light_Stage1(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ float colorScale = uKD_Stage1 * dot(normal, surfaceToLight);
+ return vec4(lightColor * clamp(colorScale, 0.0, 1.0), 1.0);
+}
+float sobel_Stage1(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage1(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage1(float m[9], float surfaceScale) {
+ return pointToNormal_Stage1(sobel_Stage1(m[0], m[2], m[3], m[5], m[6], m[8], 0.25), sobel_Stage1(m[0], m[6], m[1], m[7], m[2], m[8], 0.25), surfaceScale);
+}
+vec3 lightColor_Stage1(vec3 surfaceToLight) {
+ float cosAngle = -dot(surfaceToLight, uS_Stage1);
+ if (cosAngle < uCosOuterConeAngle_Stage1) {
+ return vec3(0.0);
+ }
+ float scale = pow(cosAngle, uExponent_Stage1);
+ if (cosAngle < uCosInnerConeAngle_Stage1) {
+ return ((uLightColor_Stage1 * scale) * (cosAngle - uCosOuterConeAngle_Stage1)) * uConeScale_Stage1;
+ }
+ return uLightColor_Stage1;
+}
+void main() {
+ {
+ vec2 coord = vTransformedCoords_0_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp0 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp5 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp6 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp7 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp8 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = normalize(uLightLocation_Stage1 - vec3(gl_FragCoord.xy, uSurfaceScale_Stage1 * m[4]));
+ light_Stage1(normal_Stage1(m, uSurfaceScale_Stage1), surfaceToLight, lightColor_Stage1(surfaceToLight));
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec2 inLocalCoord;
+out vec4 vcolor_Stage0;
+out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 color = inColor;
+ vcolor_Stage0 = color;
+ vec3 pos3 = uViewM_Stage0 * vec3(inPosition, 1.0);
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos3.x, pos3.y, 0.0, pos3.z);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1126.shader_test b/shaders/skia/1126.shader_test
new file mode 100644
index 0000000..2f17c95
--- /dev/null
+++ b/shaders/skia/1126.shader_test
@@ -0,0 +1,35 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_KHR_blend_equation_advanced : require
+out vec4 sk_FragColor;
+layout (blend_support_all_equations) out ;
+noperspective in vec4 vcolor_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ {
+ sk_FragColor = outputColor_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 inPosition;
+in vec4 inColor;
+noperspective out vec4 vcolor_Stage0;
+void main() {
+ vec4 color = inColor;
+ vcolor_Stage0 = color;
+ vec2 pos2 = inPosition;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1129.shader_test b/shaders/skia/1129.shader_test
new file mode 100644
index 0000000..894e7d0
--- /dev/null
+++ b/shaders/skia/1129.shader_test
@@ -0,0 +1,429 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uinnerRect_Stage1_c0_c0_c0_c0_c0_c0;
+uniform vec2 uinvRadiiXY_Stage1_c0_c0_c0_c0_c0_c0;
+uniform vec2 uScale_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 uTexDom_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec3 uDecalParams_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec3 uedges_Stage1_c0_c0_c1_c0[3];
+uniform vec3 uedges_Stage1_c1_c0_c0_c0_c0_c0[4];
+uniform vec2 uImageIncrement_Stage1_c1_c0_c0_c0_c1_c0;
+uniform float uSurfaceScale_Stage1_c1_c0_c0_c0_c1_c0;
+uniform vec3 uLightColor_Stage1_c1_c0_c0_c0_c1_c0;
+uniform float uKD_Stage1_c1_c0_c0_c0_c1_c0;
+uniform vec4 uTexDom_Stage1_c1_c0_c0_c0_c1_c0;
+uniform vec3 uDecalParams_Stage1_c1_c0_c0_c0_c1_c0;
+uniform vec3 uLightDirection_Stage1_c1_c0_c0_c0_c1_c0;
+uniform vec4 uinnerRect_Stage1_c1_c0_c1_c0_c0_c0;
+uniform vec2 uradiusPlusHalf_Stage1_c1_c0_c1_c0_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+uniform sampler2D uTextureSampler_2_Stage1;
+uniform sampler2D uTextureSampler_3_Stage1;
+noperspective in vec2 vTextureCoords_Stage0;
+flat in int vTexIndex_Stage0;
+noperspective in vec4 vinColor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+vec4 EllipticalRRect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 dxy0 = uinnerRect_Stage1_c0_c0_c0_c0_c0_c0.xy - gl_FragCoord.xy;
+ vec2 dxy1 = gl_FragCoord.xy - uinnerRect_Stage1_c0_c0_c0_c0_c0_c0.zw;
+ vec2 dxy = max(max(dxy0, dxy1), 0.0);
+ vec2 Z = dxy * uinvRadiiXY_Stage1_c0_c0_c0_c0_c0_c0;
+ float implicit = dot(Z, dxy) - 1.0;
+ float grad_dot = 4.0 * dot(Z, Z);
+ grad_dot = max(grad_dot, 9.9999997473787516e-05);
+ float approx_dist = implicit * inversesqrt(grad_dot);
+ float alpha = clamp(0.5 - approx_dist, 0.0, 1.0);
+ _output = _input * alpha;
+ return _output;
+}
+vec4 DisplacementMap_Stage1_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 dColor = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ dColor.xyz = dColor.w < 9.9999999747524271e-07 ? vec3(0.0) : clamp(dColor.xyz / dColor.w, 0.0, 1.0);
+ vec2 cCoords = vTransformedCoords_1_Stage0 + uScale_Stage1_c0_c0_c0_c0_c1_c0 * (dColor.yz - vec2(0.5));
+ {
+ vec2 origCoord = cCoords;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0_c1_c0.xy, uTexDom_Stage1_c0_c0_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ _output = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ return _output;
+}
+vec4 blend_multiply(vec4 src, vec4 dst) {
+ return vec4(((1.0 - src.w) * dst.xyz + (1.0 - dst.w) * src.xyz) + src.xyz * dst.xyz, src.w + (1.0 - src.w) * dst.w);
+}
+vec4 ComposeTwo_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_multiply(EllipticalRRect_Stage1_c0_c0_c0_c0_c0_c0(inputColor), DisplacementMap_Stage1_c0_c0_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 ConvexPoly_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float alpha = 1.0;
+ float edge;
+ edge = dot(uedges_Stage1_c0_c0_c1_c0[0], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage1_c0_c0_c1_c0[1], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage1_c0_c0_c1_c0[2], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ _output = _input * alpha;
+ return _output;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 ComposeTwo_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_src_over(ComposeTwo_Stage1_c0_c0_c0_c0(inputColor), ConvexPoly_Stage1_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 ConvexPoly_Stage1_c1_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float alpha = 1.0;
+ float edge;
+ edge = dot(uedges_Stage1_c1_c0_c0_c0_c0_c0[0], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage1_c1_c0_c0_c0_c0_c0[1], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage1_c1_c0_c0_c0_c0_c0[2], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage1_c1_c0_c0_c0_c0_c0[3], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ _output = _input * alpha;
+ return _output;
+}
+vec4 light_Stage1_c1_c0_c0_c0_c1_c0(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ float colorScale = uKD_Stage1_c1_c0_c0_c0_c1_c0 * dot(normal, surfaceToLight);
+ return vec4(lightColor * clamp(colorScale, 0.0, 1.0), 1.0);
+}
+float sobel_Stage1_c1_c0_c0_c0_c1_c0(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage1_c1_c0_c0_c0_c1_c0(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage1_c1_c0_c0_c0_c1_c0(float m[9], float surfaceScale) {
+ return pointToNormal_Stage1_c1_c0_c0_c0_c1_c0(sobel_Stage1_c1_c0_c0_c0_c1_c0(m[0], m[1], m[3], m[4], m[6], m[7], 0.5), sobel_Stage1_c1_c0_c0_c0_c1_c0(m[0], m[6], m[1], m[7], 0.0, 0.0, 0.33333298563957214), surfaceScale);
+}
+vec4 DiffuseLighting_Stage1_c1_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coord = vTransformedCoords_2_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage1_c1_c0_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0_c1_c0.xy, uTexDom_Stage1_c1_c0_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp0 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1_c1_c0_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0_c1_c0.xy, uTexDom_Stage1_c1_c0_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1_c1_c0_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0_c1_c0.xy, uTexDom_Stage1_c1_c0_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage1_c1_c0_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0_c1_c0.xy, uTexDom_Stage1_c1_c0_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0_c1_c0.xy, uTexDom_Stage1_c1_c0_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1_c1_c0_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0_c1_c0.xy, uTexDom_Stage1_c1_c0_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp5 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage1_c1_c0_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0_c1_c0.xy, uTexDom_Stage1_c1_c0_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp6 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage1_c1_c0_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0_c1_c0.xy, uTexDom_Stage1_c1_c0_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp7 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage1_c1_c0_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0_c1_c0.xy, uTexDom_Stage1_c1_c0_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp8 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = uLightDirection_Stage1_c1_c0_c0_c0_c1_c0;
+ _output = light_Stage1_c1_c0_c0_c0_c1_c0(normal_Stage1_c1_c0_c0_c0_c1_c0(m, uSurfaceScale_Stage1_c1_c0_c0_c0_c1_c0), surfaceToLight, uLightColor_Stage1_c1_c0_c0_c0_c1_c0);
+ _output *= _input;
+ return _output;
+}
+float _guarded_divide(float n, float d) {
+ return n / d;
+}
+float _color_dodge_component(float sc, float sa, float dc, float da) {
+ if (dc == 0.0) {
+ return sc * (1.0 - da);
+ } else {
+ float d = sa - sc;
+ if (d == 0.0) {
+ return (sa * da + sc * (1.0 - da)) + dc * (1.0 - sa);
+ }
+ d = min(da, _guarded_divide(dc * sa, d));
+ return (d * sa + sc * (1.0 - da)) + dc * (1.0 - sa);
+ }
+}
+vec4 blend_color_dodge(vec4 src, vec4 dst) {
+ return vec4(_color_dodge_component(src.x, src.w, dst.x, dst.w), _color_dodge_component(src.y, src.w, dst.y, dst.w), _color_dodge_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+}
+vec4 ComposeTwo_Stage1_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_color_dodge(ConvexPoly_Stage1_c1_c0_c0_c0_c0_c0(inputColor), DiffuseLighting_Stage1_c1_c0_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 CircularRRect_Stage1_c1_c0_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 dxy0 = uinnerRect_Stage1_c1_c0_c1_c0_c0_c0.xy - gl_FragCoord.xy;
+ vec2 dxy1 = gl_FragCoord.xy - uinnerRect_Stage1_c1_c0_c1_c0_c0_c0.zw;
+ vec2 dxy = max(max(dxy0, dxy1), 0.0);
+ float alpha = clamp(uradiusPlusHalf_Stage1_c1_c0_c1_c0_c0_c0.x - length(dxy), 0.0, 1.0);
+ _output = _input * alpha;
+ return _output;
+}
+vec4 ColorTableEffect_Stage1_c1_c0_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float nonZeroAlpha = max(_input.w, 9.9999997473787516e-05);
+ vec4 coord = vec4(_input.xyz / nonZeroAlpha, nonZeroAlpha);
+ coord = coord * 0.9960939884185791 + vec4(0.0019529999699443579, 0.0019529999699443579, 0.0019529999699443579, 0.0019529999699443579);
+ _output.w = texture(uTextureSampler_3_Stage1, vec2(coord.w, 0.125)).w;
+ _output.x = texture(uTextureSampler_3_Stage1, vec2(coord.x, 0.375)).w;
+ _output.y = texture(uTextureSampler_3_Stage1, vec2(coord.y, 0.625)).w;
+ _output.z = texture(uTextureSampler_3_Stage1, vec2(coord.z, 0.875)).w;
+ _output.xyz *= _output.w;
+ return _output;
+}
+float _color_burn_component(float sc, float sa, float dc, float da) {
+ if (da == dc) {
+ return (sa * da + sc * (1.0 - da)) + dc * (1.0 - sa);
+ } else if (sc == 0.0) {
+ return dc * (1.0 - sa);
+ }
+ float d = max(0.0, da - _guarded_divide((da - dc) * sa, sc));
+ return (d * sa + sc * (1.0 - da)) + dc * (1.0 - sa);
+}
+vec4 blend_color_burn(vec4 src, vec4 dst) {
+ return vec4(_color_burn_component(src.x, src.w, dst.x, dst.w), _color_burn_component(src.y, src.w, dst.y, dst.w), _color_burn_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+}
+vec4 ComposeTwo_Stage1_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_color_burn(CircularRRect_Stage1_c1_c0_c1_c0_c0_c0(inputColor), ColorTableEffect_Stage1_c1_c0_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+float _blend_color_luminance(vec3 color) {
+ return dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), color);
+}
+vec3 _blend_set_color_luminance(vec3 hueSatColor, float alpha, vec3 lumColor) {
+ float lum = _blend_color_luminance(lumColor);
+ vec3 result = (lum - _blend_color_luminance(hueSatColor)) + hueSatColor;
+ float minComp = min(min(result.x, result.y), result.z);
+ float maxComp = max(max(result.x, result.y), result.z);
+ if (minComp < 0.0 && lum != minComp) {
+ result = lum + ((result - lum) * lum) / (lum - minComp);
+ }
+ if (maxComp > alpha && maxComp != lum) {
+ return lum + ((result - lum) * (alpha - lum)) / (maxComp - lum);
+ }
+ return result;
+}
+vec4 blend_luminosity(vec4 src, vec4 dst) {
+ float alpha = dst.w * src.w;
+ vec3 sda = src.xyz * dst.w;
+ vec3 dsa = dst.xyz * src.w;
+ return vec4((((_blend_set_color_luminance(dsa, alpha, sda) + dst.xyz) - dsa) + src.xyz) - sda, (src.w + dst.w) - alpha);
+}
+vec4 ComposeTwo_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_luminosity(ComposeTwo_Stage1_c1_c0_c0_c0(inputColor), ComposeTwo_Stage1_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 blend_difference(vec4 src, vec4 dst) {
+ return vec4((src.xyz + dst.xyz) - 2.0 * min(src.xyz * dst.w, dst.xyz * src.w), src.w + (1.0 - src.w) * dst.w);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vinColor_Stage0;
+ vec4 texColor;
+ {
+ texColor = texture(uTextureSampler_0_Stage0, vTextureCoords_Stage0);
+ }
+ outputCoverage_Stage0 = texColor;
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_difference(ComposeTwo_Stage1_c0_c0(inputColor), ComposeTwo_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ sk_FragColor = output_Stage1 * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform vec2 uAtlasSizeInv_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in uvec2 inTextureCoords;
+noperspective out vec2 vTextureCoords_Stage0;
+flat out int vTexIndex_Stage0;
+noperspective out vec4 vinColor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+void main() {
+ ivec2 signedCoords = ivec2(int(inTextureCoords.x), int(inTextureCoords.y));
+ vec2 unormTexCoords = vec2(float(signedCoords.x / 2), float(signedCoords.y / 2));
+ vTextureCoords_Stage0 = unormTexCoords * uAtlasSizeInv_Stage0;
+ vTexIndex_Stage0 = 0;
+ vinColor_Stage0 = inColor;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(inPosition.x, inPosition.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1132.shader_test b/shaders/skia/1132.shader_test
new file mode 100644
index 0000000..fbffa12
--- /dev/null
+++ b/shaders/skia/1132.shader_test
@@ -0,0 +1,65 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 ucolor_Stage1_c0_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 ConstColorProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage1_c0_c0;
+ }
+ return _output;
+}
+vec4 Dither_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = _input;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_0_Stage0.x);
+ uint y = uint(vTransformedCoords_0_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ _output = vec4(clamp(_output.xyz + value * 0.0039215688593685627, 0.0, _output.w), _output.w);
+ return _output;
+}
+float _blend_overlay_component(float sc, float sa, float dc, float da) {
+ if (2.0 * dc <= da) {
+ return (2.0 * sc) * dc;
+ }
+ return sa * da - (2.0 * (da - dc)) * (sa - sc);
+}
+vec4 blend_overlay(vec4 src, vec4 dst) {
+ vec4 result = vec4(_blend_overlay_component(src.x, src.w, dst.x, dst.w), _blend_overlay_component(src.y, src.w, dst.y, dst.w), _blend_overlay_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+ result.xyz += dst.xyz * (1.0 - src.w) + src.xyz * (1.0 - dst.w);
+ return result;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(vec4(1.0).xyz, 1.0);
+ output_Stage1 = blend_overlay(ConstColorProcessor_Stage1_c0_c0(inputColor), Dither_Stage1_c1_c0(inputColor));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1135.shader_test b/shaders/skia/1135.shader_test
new file mode 100644
index 0000000..808a0b2
--- /dev/null
+++ b/shaders/skia/1135.shader_test
@@ -0,0 +1,263 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1_c0_c0_c0_c0;
+uniform float uSurfaceScale_Stage1_c0_c0_c0_c0;
+uniform vec3 uLightColor_Stage1_c0_c0_c0_c0;
+uniform float uKS_Stage1_c0_c0_c0_c0;
+uniform float uShininess_Stage1_c0_c0_c0_c0;
+uniform vec4 uTexDom_Stage1_c0_c0_c0_c0;
+uniform vec3 uDecalParams_Stage1_c0_c0_c0_c0;
+uniform vec3 uLightDirection_Stage1_c0_c0_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+noperspective in vec2 vEllipseOffsets_Stage0;
+noperspective in vec4 vEllipseRadii_Stage0;
+noperspective in vec4 vinColor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 light_Stage1_c0_c0_c0_c0(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ vec3 halfDir = normalize(surfaceToLight + vec3(0.0, 0.0, 1.0));
+ float colorScale = uKS_Stage1_c0_c0_c0_c0 * pow(dot(normal, halfDir), uShininess_Stage1_c0_c0_c0_c0);
+ vec3 color = lightColor * clamp(colorScale, 0.0, 1.0);
+ return vec4(color, max(max(color.x, color.y), color.z));
+}
+float sobel_Stage1_c0_c0_c0_c0(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage1_c0_c0_c0_c0(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage1_c0_c0_c0_c0(float m[9], float surfaceScale) {
+ return pointToNormal_Stage1_c0_c0_c0_c0(sobel_Stage1_c0_c0_c0_c0(0.0, 0.0, m[3], m[4], m[6], m[7], 0.66666698455810547), sobel_Stage1_c0_c0_c0_c0(m[3], m[6], m[4], m[7], 0.0, 0.0, 0.66666698455810547), surfaceScale);
+}
+vec4 SpecularLighting_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coord = vTransformedCoords_0_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage1_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp0 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage1_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp5 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage1_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp6 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage1_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp7 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage1_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp8 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = uLightDirection_Stage1_c0_c0_c0_c0;
+ _output = light_Stage1_c0_c0_c0_c0(normal_Stage1_c0_c0_c0_c0(m, uSurfaceScale_Stage1_c0_c0_c0_c0), surfaceToLight, uLightColor_Stage1_c0_c0_c0_c0);
+ _output *= _input;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_1_Stage1, vTransformedCoords_1_Stage0) * _input;
+ return _output;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 blend_lighten(vec4 src, vec4 dst) {
+ vec4 result = blend_src_over(src, dst);
+ result.xyz = max(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
+ return result;
+}
+vec4 ComposeTwo_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_lighten(SpecularLighting_Stage1_c0_c0_c0_c0(inputColor), TextureEffect_Stage1_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 ConfigConversionEffect_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = floor(_input * 255.0 + 0.5) / 255.0;
+ {
+ _output.xyz = floor((_output.xyz * _output.w) * 255.0 + 0.5) / 255.0;
+ }
+ return _output;
+}
+vec4 blend_modulate(vec4 src, vec4 dst) {
+ return src * dst;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vinColor_Stage0;
+ vec2 offset = vEllipseOffsets_Stage0;
+ float test = dot(offset, offset) - 1.0;
+ vec2 grad = (2.0 * offset) * vEllipseRadii_Stage0.xy;
+ float grad_dot = dot(grad, grad);
+ grad_dot = max(grad_dot, 1.1754999560161448e-38);
+ float invlen = inversesqrt(grad_dot);
+ float edgeAlpha = clamp(0.5 - test * invlen, 0.0, 1.0);
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_modulate(ComposeTwo_Stage1_c0_c0(inputColor), ConfigConversionEffect_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ sk_FragColor = (1.0 - output_Stage1.w) * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec2 inEllipseOffset;
+in vec4 inEllipseRadii;
+noperspective out vec2 vEllipseOffsets_Stage0;
+noperspective out vec4 vEllipseRadii_Stage0;
+noperspective out vec4 vinColor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vEllipseOffsets_Stage0 = inEllipseOffset;
+ vEllipseRadii_Stage0 = inEllipseRadii;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1138.shader_test b/shaders/skia/1138.shader_test
new file mode 100644
index 0000000..f036b90
--- /dev/null
+++ b/shaders/skia/1138.shader_test
@@ -0,0 +1,261 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform float uSrcTF_Stage0[7];
+uniform mat3 uColorXform_Stage0;
+uniform float uDstTF_Stage0[7];
+uniform vec4 ucircle_Stage1;
+uniform vec4 urectUniform_Stage2;
+uniform vec4 uboundsUniform_Stage3;
+uniform float uxInvZoom_Stage3;
+uniform float uyInvZoom_Stage3;
+uniform float uxInvInset_Stage3;
+uniform float uyInvInset_Stage3;
+uniform vec2 uoffset_Stage3;
+uniform vec2 ubaseFrequency_Stage4;
+uniform float uz_Stage4;
+uniform vec4 uscale0_1_Stage5_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage5_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage5_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage5_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage5_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage5_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage5_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage5_c0_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage0;
+uniform sampler2D uTextureSampler_0_Stage3;
+uniform sampler2D uTextureSampler_0_Stage4;
+uniform sampler2D uTextureSampler_1_Stage4;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+noperspective in vec2 vtextureCoords_Stage0;
+flat in vec4 vtextureDomain_Stage0;
+flat in vec4 vcolor_Stage0;
+float src_tf_Stage0(float x) {
+ float G = uSrcTF_Stage0[0];
+ float A = uSrcTF_Stage0[1];
+ float B = uSrcTF_Stage0[2];
+ float C = uSrcTF_Stage0[3];
+ float D = uSrcTF_Stage0[4];
+ float E = uSrcTF_Stage0[5];
+ float F = uSrcTF_Stage0[6];
+ float s = sign(x);
+ x = abs(x);
+ x = x < D ? C * x + F : pow(A * x + B, G) + E;
+ return s * x;
+}
+float dst_tf_Stage0(float x) {
+ float G = uDstTF_Stage0[0];
+ float A = uDstTF_Stage0[1];
+ float B = uDstTF_Stage0[2];
+ float C = uDstTF_Stage0[3];
+ float D = uDstTF_Stage0[4];
+ float E = uDstTF_Stage0[5];
+ float F = uDstTF_Stage0[6];
+ float s = sign(x);
+ x = abs(x);
+ x = x < D ? C * x + F : pow(A * x + B, G) + E;
+ return s * x;
+}
+vec4 gamut_xform_Stage0(vec4 color) {
+ color.xyz = uColorXform_Stage0 * color.xyz;
+ return color;
+}
+vec4 color_xform_Stage0(vec4 color) {
+ float nonZeroAlpha = max(color.w, 9.9999997473787516e-05);
+ color = vec4(color.xyz / nonZeroAlpha, nonZeroAlpha);
+ color.x = src_tf_Stage0(color.x);
+ color.y = src_tf_Stage0(color.y);
+ color.z = src_tf_Stage0(color.z);
+ color = gamut_xform_Stage0(color);
+ color.x = dst_tf_Stage0(color.x);
+ color.y = dst_tf_Stage0(color.y);
+ color.z = dst_tf_Stage0(color.z);
+ color.xyz *= color.w;
+ return color;
+}
+vec3 fade_Stage4(vec3 t) {
+ return ((t * t) * t) * (t * (t * 6.0 - 15.0) + 10.0);
+}
+float perm_Stage4(float x) {
+ return texture(uTextureSampler_0_Stage4, vec2(fract(x / 256.0), 0.0)).x * 255.0;
+}
+float grad_Stage4(float x, vec3 p) {
+ return dot(texture(uTextureSampler_1_Stage4, vec2(fract(x / 16.0), 0.0)).xyz * 255.0 - vec3(1.0), p);
+}
+float lerp_Stage4(float a, float b, float w) {
+ return a + w * (b - a);
+}
+float noise_Stage4(vec3 p) {
+ vec3 P = mod(floor(p), 256.0);
+ p -= floor(p);
+ vec3 f = fade_Stage4(p);
+ float A = perm_Stage4(P.x) + P.y;
+ float AA = perm_Stage4(A) + P.z;
+ float AB = perm_Stage4(A + 1.0) + P.z;
+ float B = perm_Stage4(P.x + 1.0) + P.y;
+ float BA = perm_Stage4(B) + P.z;
+ float BB = perm_Stage4(B + 1.0) + P.z;
+ float result = lerp_Stage4(lerp_Stage4(lerp_Stage4(grad_Stage4(perm_Stage4(AA), p), grad_Stage4(perm_Stage4(BA), p + vec3(-1.0, 0.0, 0.0)), f.x), lerp_Stage4(grad_Stage4(perm_Stage4(AB), p + vec3(0.0, -1.0, 0.0)), grad_Stage4(perm_Stage4(BB), p + vec3(-1.0, -1.0, 0.0)), f.x), f.y), lerp_Stage4(lerp_Stage4(grad_Stage4(perm_Stage4(AA + 1.0), p + vec3(0.0, 0.0, -1.0)), grad_Stage4(perm_Stage4(BA + 1.0), p + vec3(-1.0, 0.0, -1.0)), f.x), lerp_Stage4(grad_Stage4(perm_Stage4(AB + 1.0), p + vec3(0.0, -1.0, -1.0)), grad_Stage4(perm_Stage4(BB + 1.0), p + vec3(-1.0, -1.0, -1.0)), f.x), f.y), f.z);
+ return result;
+}
+float noiseOctaves_Stage4(vec3 p) {
+ float result = 0.0;
+ float ratio = 1.0;
+ for (float i = 0.0;i < 10.0; i++) {
+ result += noise_Stage4(p) / ratio;
+ p *= 2.0;
+ ratio *= 2.0;
+ }
+ return (result + 1.0) / 2.0;
+}
+vec4 RadialGradientLayout_Stage5_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = length(vTransformedCoords_2_Stage0);
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage5_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage5_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage5_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage5_c0_c0_c1_c0;
+ bias = ubias0_1_Stage5_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage5_c0_c0_c1_c0;
+ bias = ubias2_3_Stage5_c0_c0_c1_c0;
+ }
+ } else {
+ {
+ scale = uscale4_5_Stage5_c0_c0_c1_c0;
+ bias = ubias4_5_Stage5_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage5_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = RadialGradientLayout_Stage5_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ t.x = fract(t.x);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage5_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ vec2 textureCoords;
+ textureCoords = vtextureCoords_Stage0;
+ vec4 textureDomain;
+ textureDomain = vtextureDomain_Stage0;
+ outputColor_Stage0 = vcolor_Stage0;
+ outputColor_Stage0 = color_xform_Stage0(texture(uTextureSampler_0_Stage0, clamp(textureCoords, textureDomain.xy, textureDomain.zw))) * outputColor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ float d;
+ {
+ d = (1.0 - length((ucircle_Stage1.xy - gl_FragCoord.xy) * ucircle_Stage1.w)) * ucircle_Stage1.z;
+ }
+ {
+ output_Stage1 = outputColor_Stage0 * clamp(d, 0.0, 1.0);
+ }
+ }
+ {
+ {
+ float xSub, ySub;
+ xSub = min(gl_FragCoord.x - urectUniform_Stage2.x, 0.0);
+ xSub += min(urectUniform_Stage2.z - gl_FragCoord.x, 0.0);
+ ySub = min(gl_FragCoord.y - urectUniform_Stage2.y, 0.0);
+ ySub += min(urectUniform_Stage2.w - gl_FragCoord.y, 0.0);
+ }
+ }
+ {
+ vec2 coord = vTransformedCoords_0_Stage0;
+ vec2 delta = (coord - uboundsUniform_Stage3.xy) * uboundsUniform_Stage3.zw;
+ delta = min(delta, vec2(1.0, 1.0) - delta);
+ delta *= vec2(uxInvInset_Stage3, uyInvInset_Stage3);
+ if (delta.x < 2.0 && delta.y < 2.0) {
+ delta = vec2(2.0, 2.0) - delta;
+ float dist = length(delta);
+ dist = max(2.0 - dist, 0.0);
+ }
+ }
+ vec4 output_Stage4;
+ {
+ vec2 coords = vTransformedCoords_1_Stage0 * ubaseFrequency_Stage4;
+ float r = noiseOctaves_Stage4(vec3(coords, uz_Stage4));
+ float g = noiseOctaves_Stage4(vec3(coords, uz_Stage4));
+ float b = noiseOctaves_Stage4(vec3(coords, uz_Stage4));
+ float a = noiseOctaves_Stage4(vec3(coords, uz_Stage4));
+ output_Stage4 = vec4(r, g, b, a);
+ output_Stage4 = clamp(output_Stage4, 0.0, 1.0);
+ output_Stage4 = vec4(output_Stage4.xyz * output_Stage4.www, output_Stage4.w);
+ }
+ vec4 output_Stage5;
+ {
+ output_Stage5 = blend_dst_in(output_Stage4, TiledGradientEffect_Stage5_c0_c0(vec4(1.0)));
+ }
+ vec4 output_Stage6;
+ {
+ {
+ float alpha = clamp(output_Stage5.w, 0.0, 1.0);
+ output_Stage6 = vec4(clamp(output_Stage5.xyz, 0.0, alpha), alpha);
+ }
+ }
+ {
+ sk_FragColor = output_Stage1 * output_Stage6;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+in vec2 position;
+in vec2 textureCoords;
+in vec4 textureDomain;
+in vec4 color;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+noperspective out vec2 vtextureCoords_Stage0;
+flat out vec4 vtextureDomain_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vec2 pos2 = position;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(textureCoords, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(textureCoords, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(textureCoords, 1.0)).xy;
+ vtextureCoords_Stage0 = textureCoords;
+ vtextureDomain_Stage0 = textureDomain;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1141.shader_test b/shaders/skia/1141.shader_test
new file mode 100644
index 0000000..c7a5dcd
--- /dev/null
+++ b/shaders/skia/1141.shader_test
@@ -0,0 +1,674 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform mat4 um_Stage1;
+uniform vec4 uv_Stage1;
+uniform vec2 uImageIncrement_Stage2_c0_c0;
+uniform float uSurfaceScale_Stage2_c0_c0;
+uniform vec3 uLightColor_Stage2_c0_c0;
+uniform float uKD_Stage2_c0_c0;
+uniform vec4 uTexDom_Stage2_c0_c0;
+uniform vec3 uDecalParams_Stage2_c0_c0;
+uniform vec3 uLightLocation_Stage2_c0_c0;
+uniform float uExponent_Stage2_c0_c0;
+uniform float uCosInnerConeAngle_Stage2_c0_c0;
+uniform float uCosOuterConeAngle_Stage2_c0_c0;
+uniform float uConeScale_Stage2_c0_c0;
+uniform vec3 uS_Stage2_c0_c0;
+uniform vec4 uleftBorderColor_Stage3_c1_c0;
+uniform vec4 urightBorderColor_Stage3_c1_c0;
+uniform float ubias_Stage3_c1_c0_c0_c0;
+uniform float uscale_Stage3_c1_c0_c0_c0;
+uniform vec4 uscale0_1_Stage3_c1_c0_c1_c0;
+uniform vec4 uscale2_3_Stage3_c1_c0_c1_c0;
+uniform vec4 uscale4_5_Stage3_c1_c0_c1_c0;
+uniform vec4 uscale6_7_Stage3_c1_c0_c1_c0;
+uniform vec4 ubias0_1_Stage3_c1_c0_c1_c0;
+uniform vec4 ubias2_3_Stage3_c1_c0_c1_c0;
+uniform vec4 ubias4_5_Stage3_c1_c0_c1_c0;
+uniform vec4 ubias6_7_Stage3_c1_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage3_c1_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage3_c1_c0_c1_c0;
+uniform float uPixelSize_Stage4_c2_c0;
+uniform vec2 uRange_Stage4_c2_c0;
+uniform vec2 uScale_Stage4_c3_c0;
+uniform vec4 uTexDom_Stage4_c3_c0;
+uniform vec3 uDecalParams_Stage4_c3_c0;
+uniform vec2 uImageIncrement_Stage5;
+uniform float uSurfaceScale_Stage5;
+uniform vec3 uLightColor_Stage5;
+uniform float uKS_Stage5;
+uniform float uShininess_Stage5;
+uniform vec4 uTexDom_Stage5;
+uniform vec3 uDecalParams_Stage5;
+uniform vec3 uLightLocation_Stage5;
+uniform float uExponent_Stage5;
+uniform float uCosInnerConeAngle_Stage5;
+uniform float uCosOuterConeAngle_Stage5;
+uniform float uConeScale_Stage5;
+uniform vec3 uS_Stage5;
+uniform vec2 uImageIncrement_Stage6;
+uniform vec4 uKernel_Stage6[2];
+uniform vec2 uKernelOffset_Stage6;
+uniform float uGain_Stage6;
+uniform float uBias_Stage6;
+uniform sampler2D uTextureSampler_0_Stage2;
+uniform sampler2D uTextureSampler_0_Stage4;
+uniform sampler2D uTextureSampler_1_Stage4;
+uniform sampler2D uTextureSampler_2_Stage4;
+uniform sampler2D uTextureSampler_0_Stage5;
+uniform sampler2D uTextureSampler_0_Stage6;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+noperspective in vec2 vTransformedCoords_3_Stage0;
+noperspective in vec2 vTransformedCoords_4_Stage0;
+noperspective in vec2 vTransformedCoords_5_Stage0;
+noperspective in vec2 vTransformedCoords_6_Stage0;
+vec4 light_Stage2_c0_c0(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ float colorScale = uKD_Stage2_c0_c0 * dot(normal, surfaceToLight);
+ return vec4(lightColor * clamp(colorScale, 0.0, 1.0), 1.0);
+}
+float sobel_Stage2_c0_c0(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage2_c0_c0(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage2_c0_c0(float m[9], float surfaceScale) {
+ return pointToNormal_Stage2_c0_c0(sobel_Stage2_c0_c0(0.0, 0.0, m[4], m[5], m[7], m[8], 0.66666698455810547), sobel_Stage2_c0_c0(0.0, 0.0, m[4], m[7], m[5], m[8], 0.66666698455810547), surfaceScale);
+}
+vec3 lightColor_Stage2_c0_c0(vec3 surfaceToLight) {
+ float cosAngle = -dot(surfaceToLight, uS_Stage2_c0_c0);
+ if (cosAngle < uCosOuterConeAngle_Stage2_c0_c0) {
+ return vec3(0.0);
+ }
+ float scale = pow(cosAngle, uExponent_Stage2_c0_c0);
+ if (cosAngle < uCosInnerConeAngle_Stage2_c0_c0) {
+ return ((uLightColor_Stage2_c0_c0 * scale) * (cosAngle - uCosOuterConeAngle_Stage2_c0_c0)) * uConeScale_Stage2_c0_c0;
+ }
+ return uLightColor_Stage2_c0_c0;
+}
+vec4 DiffuseLighting_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coord = vTransformedCoords_0_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c0_c0.y);
+ if (err > uDecalParams_Stage2_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp0 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c0_c0.y);
+ if (err > uDecalParams_Stage2_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c0_c0.y);
+ if (err > uDecalParams_Stage2_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c0_c0.y);
+ if (err > uDecalParams_Stage2_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c0_c0.y);
+ if (err > uDecalParams_Stage2_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c0_c0.y);
+ if (err > uDecalParams_Stage2_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp5 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c0_c0.y);
+ if (err > uDecalParams_Stage2_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp6 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c0_c0.y);
+ if (err > uDecalParams_Stage2_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp7 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c0_c0.y);
+ if (err > uDecalParams_Stage2_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp8 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = normalize(uLightLocation_Stage2_c0_c0 - vec3(gl_FragCoord.xy, uSurfaceScale_Stage2_c0_c0 * m[4]));
+ _output = light_Stage2_c0_c0(normal_Stage2_c0_c0(m, uSurfaceScale_Stage2_c0_c0), surfaceToLight, lightColor_Stage2_c0_c0(surfaceToLight));
+ _output *= _input;
+ return _output;
+}
+vec4 SweepGradientLayout_Stage3_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float angle;
+ {
+ angle = atan(-vTransformedCoords_1_Stage0.y, -vTransformedCoords_1_Stage0.x);
+ }
+ float t = ((angle * 0.15915493667125702 + 0.5) + ubias_Stage3_c1_c0_c0_c0) * uscale_Stage3_c1_c0_c0_c0;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage3_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage3_c1_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage3_c1_c0_c1_c0.x) {
+ scale = uscale0_1_Stage3_c1_c0_c1_c0;
+ bias = ubias0_1_Stage3_c1_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage3_c1_c0_c1_c0;
+ bias = ubias2_3_Stage3_c1_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage3_c1_c0_c1_c0.z) {
+ scale = uscale4_5_Stage3_c1_c0_c1_c0;
+ bias = ubias4_5_Stage3_c1_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage3_c1_c0_c1_c0;
+ bias = ubias6_7_Stage3_c1_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage3_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = SweepGradientLayout_Stage3_c1_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage3_c1_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage3_c1_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage3_c1_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 Morphology_Stage4_c2_c0(vec4 _input) {
+ vec4 _output;
+ _output = vec4(1.0, 1.0, 1.0, 1.0);
+ vec2 coord = vTransformedCoords_2_Stage0;
+ coord.y -= 6.0 * uPixelSize_Stage4_c2_c0;
+ for (int i = 0;i < 13; i++) {
+ _output = min(_output, texture(uTextureSampler_0_Stage4, coord));
+ coord.y += uPixelSize_Stage4_c2_c0;
+ }
+ _output *= _input;
+ return _output;
+}
+vec4 DisplacementMap_Stage4_c3_c0(vec4 _input) {
+ vec4 _output;
+ vec4 dColor = texture(uTextureSampler_1_Stage4, vTransformedCoords_3_Stage0);
+ dColor.xyz = dColor.w < 9.9999999747524271e-07 ? vec3(0.0) : clamp(dColor.xyz / dColor.w, 0.0, 1.0);
+ vec2 cCoords = vTransformedCoords_4_Stage0 + uScale_Stage4_c3_c0 * (dColor.zz - vec2(0.5));
+ {
+ vec2 origCoord = cCoords;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage4_c3_c0.xy, uTexDom_Stage4_c3_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_2_Stage4, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage4_c3_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage4_c3_c0.y);
+ if (err > uDecalParams_Stage4_c3_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage4_c3_c0.z < 1.0) {
+ err = 0.0;
+ }
+ _output = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ return _output;
+}
+vec4 light_Stage5(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ vec3 halfDir = normalize(surfaceToLight + vec3(0.0, 0.0, 1.0));
+ float colorScale = uKS_Stage5 * pow(dot(normal, halfDir), uShininess_Stage5);
+ vec3 color = lightColor * clamp(colorScale, 0.0, 1.0);
+ return vec4(color, max(max(color.x, color.y), color.z));
+}
+float sobel_Stage5(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage5(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage5(float m[9], float surfaceScale) {
+ return pointToNormal_Stage5(sobel_Stage5(m[0], m[1], m[3], m[4], 0.0, 0.0, 0.66666698455810547), sobel_Stage5(m[0], m[3], m[1], m[4], 0.0, 0.0, 0.66666698455810547), surfaceScale);
+}
+vec3 lightColor_Stage5(vec3 surfaceToLight) {
+ float cosAngle = -dot(surfaceToLight, uS_Stage5);
+ if (cosAngle < uCosOuterConeAngle_Stage5) {
+ return vec3(0.0);
+ }
+ float scale = pow(cosAngle, uExponent_Stage5);
+ if (cosAngle < uCosInnerConeAngle_Stage5) {
+ return ((uLightColor_Stage5 * scale) * (cosAngle - uCosOuterConeAngle_Stage5)) * uConeScale_Stage5;
+ }
+ return uLightColor_Stage5;
+}
+vec4 blend_src(vec4 src, vec4 dst) {
+ return src;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+vec4 blend_dst_atop(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src + src.w * dst;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(1.0);
+ {
+ float nonZeroAlpha = max(1.0, 9.9999997473787516e-05);
+ inputColor = vec4(vec4(1.0).xyz / nonZeroAlpha, 1.0);
+ }
+ output_Stage1 = um_Stage1 * inputColor + uv_Stage1;
+ {
+ output_Stage1 = clamp(output_Stage1, 0.0, 1.0);
+ }
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_src(DiffuseLighting_Stage2_c0_c0(vec4(1.0)), output_Stage1);
+ }
+ vec4 output_Stage3;
+ {
+ output_Stage3 = blend_dst_in(output_Stage2, ClampedGradientEffect_Stage3_c1_c0(vec4(1.0)));
+ }
+ vec4 output_Stage4;
+ {
+ vec4 inputColor = vec4(output_Stage3.xyz, 1.0);
+ output_Stage4 = blend_dst_atop(Morphology_Stage4_c2_c0(inputColor), DisplacementMap_Stage4_c3_c0(inputColor));
+ output_Stage4 *= output_Stage3.w;
+ }
+ vec4 output_Stage5;
+ {
+ vec2 coord = vTransformedCoords_5_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage5;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage5.xy, uTexDom_Stage5.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage5, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage5.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage5.y);
+ if (err > uDecalParams_Stage5.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage5.z < 1.0) {
+ err = 0.0;
+ }
+ temp0 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage5;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage5.xy, uTexDom_Stage5.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage5, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage5.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage5.y);
+ if (err > uDecalParams_Stage5.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage5.z < 1.0) {
+ err = 0.0;
+ }
+ temp1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage5;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage5.xy, uTexDom_Stage5.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage5, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage5.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage5.y);
+ if (err > uDecalParams_Stage5.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage5.z < 1.0) {
+ err = 0.0;
+ }
+ temp2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage5;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage5.xy, uTexDom_Stage5.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage5, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage5.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage5.y);
+ if (err > uDecalParams_Stage5.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage5.z < 1.0) {
+ err = 0.0;
+ }
+ temp3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage5.xy, uTexDom_Stage5.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage5, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage5.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage5.y);
+ if (err > uDecalParams_Stage5.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage5.z < 1.0) {
+ err = 0.0;
+ }
+ temp4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage5;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage5.xy, uTexDom_Stage5.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage5, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage5.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage5.y);
+ if (err > uDecalParams_Stage5.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage5.z < 1.0) {
+ err = 0.0;
+ }
+ temp5 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage5;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage5.xy, uTexDom_Stage5.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage5, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage5.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage5.y);
+ if (err > uDecalParams_Stage5.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage5.z < 1.0) {
+ err = 0.0;
+ }
+ temp6 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage5;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage5.xy, uTexDom_Stage5.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage5, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage5.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage5.y);
+ if (err > uDecalParams_Stage5.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage5.z < 1.0) {
+ err = 0.0;
+ }
+ temp7 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage5;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage5.xy, uTexDom_Stage5.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage5, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage5.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage5.y);
+ if (err > uDecalParams_Stage5.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage5.z < 1.0) {
+ err = 0.0;
+ }
+ temp8 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = normalize(uLightLocation_Stage5 - vec3(gl_FragCoord.xy, uSurfaceScale_Stage5 * m[4]));
+ output_Stage5 = light_Stage5(normal_Stage5(m, uSurfaceScale_Stage5), surfaceToLight, lightColor_Stage5(surfaceToLight));
+ output_Stage5 *= output_Stage4;
+ }
+ vec4 output_Stage6;
+ {
+ vec4 sum = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_6_Stage0 - uKernelOffset_Stage6 * uImageIncrement_Stage6;
+ vec4 c;
+ {
+ float k = uKernel_Stage6[0].x;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage6, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage6[0].y;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage6;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage6, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage6[0].z;
+ {
+ vec2 origCoord = coord + vec2(2.0, 0.0) * uImageIncrement_Stage6;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage6, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage6[0].w;
+ {
+ vec2 origCoord = coord + vec2(3.0, 0.0) * uImageIncrement_Stage6;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage6, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage6[1].x;
+ {
+ vec2 origCoord = coord + vec2(4.0, 0.0) * uImageIncrement_Stage6;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage6, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage6[1].y;
+ {
+ vec2 origCoord = coord + vec2(5.0, 0.0) * uImageIncrement_Stage6;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage6, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage6[1].z;
+ {
+ vec2 origCoord = coord + vec2(6.0, 0.0) * uImageIncrement_Stage6;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage6, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage6[1].w;
+ {
+ vec2 origCoord = coord + vec2(7.0, 0.0) * uImageIncrement_Stage6;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage6, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ output_Stage6 = sum * uGain_Stage6 + uBias_Stage6;
+ output_Stage6.w = clamp(output_Stage6.w, 0.0, 1.0);
+ output_Stage6.xyz = clamp(output_Stage6.xyz, 0.0, output_Stage6.w);
+ output_Stage6 *= output_Stage5;
+ }
+ {
+ sk_FragColor = output_Stage6;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+uniform mat3 uCoordTransformMatrix_3_Stage0;
+uniform mat3 uCoordTransformMatrix_4_Stage0;
+uniform mat3 uCoordTransformMatrix_5_Stage0;
+uniform mat3 uCoordTransformMatrix_6_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec2 inLocalCoord;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+noperspective out vec2 vTransformedCoords_3_Stage0;
+noperspective out vec2 vTransformedCoords_4_Stage0;
+noperspective out vec2 vTransformedCoords_5_Stage0;
+noperspective out vec2 vTransformedCoords_6_Stage0;
+void main() {
+ vec4 color = inColor;
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ vTransformedCoords_3_Stage0 = (uCoordTransformMatrix_3_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ vTransformedCoords_4_Stage0 = (uCoordTransformMatrix_4_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ vTransformedCoords_5_Stage0 = (uCoordTransformMatrix_5_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ vTransformedCoords_6_Stage0 = (uCoordTransformMatrix_6_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1144.shader_test b/shaders/skia/1144.shader_test
new file mode 100644
index 0000000..7f38606
--- /dev/null
+++ b/shaders/skia/1144.shader_test
@@ -0,0 +1,44 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+uniform vec4 ucircle_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vEllipseOffsets_Stage0;
+noperspective in vec4 vEllipseRadii_Stage0;
+noperspective in vec4 vinColor_Stage0;
+noperspective in vec3 vTransformedCoords_0_Stage0;
+void main() {
+ {
+ vec2 offset = vEllipseOffsets_Stage0;
+ vec2 grad = (2.0 * offset) * vEllipseRadii_Stage0.xy;
+ float grad_dot = dot(grad, grad);
+ grad_dot = max(grad_dot, 1.1754999560161448e-38);
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec2 inEllipseOffset;
+in vec4 inEllipseRadii;
+noperspective out vec2 vEllipseOffsets_Stage0;
+noperspective out vec4 vEllipseRadii_Stage0;
+noperspective out vec4 vinColor_Stage0;
+noperspective out vec3 vTransformedCoords_0_Stage0;
+void main() {
+ vEllipseOffsets_Stage0 = inEllipseOffset;
+ vEllipseRadii_Stage0 = inEllipseRadii;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0);
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1147.shader_test b/shaders/skia/1147.shader_test
new file mode 100644
index 0000000..e3b968a
--- /dev/null
+++ b/shaders/skia/1147.shader_test
@@ -0,0 +1,189 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uColor_Stage0;
+uniform vec2 uScale_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 uTexDom_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec3 uDecalParams_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec3 uedges_Stage1_c0_c0_c1_c0[6];
+uniform vec4 uboundsUniform_Stage1_c1_c0_c0_c0;
+uniform float uxInvZoom_Stage1_c1_c0_c0_c0;
+uniform float uyInvZoom_Stage1_c1_c0_c0_c0;
+uniform float uxInvInset_Stage1_c1_c0_c0_c0;
+uniform float uyInvInset_Stage1_c1_c0_c0_c0;
+uniform vec2 uoffset_Stage1_c1_c0_c0_c0;
+uniform vec3 uedges_Stage1_c1_c0_c1_c0[5];
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+uniform sampler2D uTextureSampler_2_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+vec4 Big_Ole_Key_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = _input;
+ return _output;
+}
+vec4 DisplacementMap_Stage1_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 dColor = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ dColor.xyz = dColor.w < 9.9999999747524271e-07 ? vec3(0.0) : clamp(dColor.xyz / dColor.w, 0.0, 1.0);
+ vec2 cCoords = vTransformedCoords_1_Stage0 + uScale_Stage1_c0_c0_c0_c0_c1_c0 * (dColor.zz - vec2(0.5));
+ {
+ vec2 origCoord = cCoords;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0_c1_c0.xy, uTexDom_Stage1_c0_c0_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ _output = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ return _output;
+}
+vec4 blend_src_out(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src;
+}
+vec4 ComposeTwo_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_src_out(Big_Ole_Key_Stage1_c0_c0_c0_c0_c0_c0(inputColor), DisplacementMap_Stage1_c0_c0_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 ConvexPoly_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float alpha = 1.0;
+ float edge;
+ edge = dot(uedges_Stage1_c0_c0_c1_c0[0], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage1_c0_c0_c1_c0[1], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage1_c0_c0_c1_c0[2], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage1_c0_c0_c1_c0[3], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage1_c0_c0_c1_c0[4], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage1_c0_c0_c1_c0[5], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ alpha = 1.0 - alpha;
+ _output = _input * alpha;
+ return _output;
+}
+vec4 blend_exclusion(vec4 src, vec4 dst) {
+ return vec4((dst.xyz + src.xyz) - (2.0 * dst.xyz) * src.xyz, src.w + (1.0 - src.w) * dst.w);
+}
+vec4 ComposeTwo_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_exclusion(ComposeTwo_Stage1_c0_c0_c0_c0(inputColor), ConvexPoly_Stage1_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 MagnifierEffect_Stage1_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coord = vTransformedCoords_2_Stage0;
+ vec2 zoom_coord = uoffset_Stage1_c1_c0_c0_c0 + coord * vec2(uxInvZoom_Stage1_c1_c0_c0_c0, uyInvZoom_Stage1_c1_c0_c0_c0);
+ vec2 delta = (coord - uboundsUniform_Stage1_c1_c0_c0_c0.xy) * uboundsUniform_Stage1_c1_c0_c0_c0.zw;
+ delta = min(delta, vec2(1.0, 1.0) - delta);
+ delta *= vec2(uxInvInset_Stage1_c1_c0_c0_c0, uyInvInset_Stage1_c1_c0_c0_c0);
+ float weight = 0.0;
+ if (delta.x < 2.0 && delta.y < 2.0) {
+ delta = vec2(2.0, 2.0) - delta;
+ float dist = length(delta);
+ dist = max(2.0 - dist, 0.0);
+ weight = min(dist * dist, 1.0);
+ } else {
+ vec2 delta_squared = delta * delta;
+ weight = min(min(delta_squared.x, delta_squared.y), 1.0);
+ }
+ _output = texture(uTextureSampler_2_Stage1, mix(coord, zoom_coord, weight));
+ return _output;
+}
+vec4 ConvexPoly_Stage1_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float alpha = 1.0;
+ float edge;
+ edge = dot(uedges_Stage1_c1_c0_c1_c0[0], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage1_c1_c0_c1_c0[1], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage1_c1_c0_c1_c0[2], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage1_c1_c0_c1_c0[3], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage1_c1_c0_c1_c0[4], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ alpha = 1.0 - alpha;
+ _output = _input * alpha;
+ return _output;
+}
+vec4 blend_dst_over(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src + dst;
+}
+vec4 ComposeTwo_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_dst_over(MagnifierEffect_Stage1_c1_c0_c0_c0(inputColor), ConvexPoly_Stage1_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 blend_dst_out(vec4 src, vec4 dst) {
+ return (1.0 - src.w) * dst;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = uColor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_dst_out(ComposeTwo_Stage1_c0_c0(inputColor), ComposeTwo_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+in vec2 inPosition;
+in vec2 inLocalCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+void main() {
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/115-1.shader_test b/shaders/skia/115-1.shader_test
new file mode 100644
index 0000000..09d37dd
--- /dev/null
+++ b/shaders/skia/115-1.shader_test
@@ -0,0 +1,68 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform mat4 um_Stage2;
+uniform vec4 uv_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+vec4 YUVtoRGBEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 planes[1];
+ planes[0] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0));
+ vec4 color = vec4(planes[0].x, planes[0].y, planes[0].z, planes[0].w);
+ color.xyz *= color.w;
+ _output = color;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = YUVtoRGBEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ vec4 inputColor = output_Stage1;
+ {
+ float nonZeroAlpha = max(inputColor.w, 9.9999997473787516e-05);
+ inputColor = vec4(inputColor.xyz / nonZeroAlpha, inputColor.w);
+ }
+ output_Stage2 = um_Stage2 * inputColor + uv_Stage2;
+ {
+ output_Stage2 = clamp(output_Stage2, 0.0, 1.0);
+ }
+ {
+ output_Stage2.xyz *= output_Stage2.w;
+ }
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/115-14.shader_test b/shaders/skia/115-14.shader_test
new file mode 100644
index 0000000..b6c60de
--- /dev/null
+++ b/shaders/skia/115-14.shader_test
@@ -0,0 +1,131 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform vec2 uBounds_Stage1;
+uniform vec4 uKernel_Stage1[6];
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0 - 11.0 * uImageIncrement_Stage1;
+ vec2 coordSampled = vec2(0.0, 0.0);
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[4].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[4].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[4].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[4].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[5].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[5].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[5].z;
+ coord += uImageIncrement_Stage1;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ sk_FragColor = sk_FragColor.wwww;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/115-15.shader_test b/shaders/skia/115-15.shader_test
new file mode 100644
index 0000000..7d80ac5
--- /dev/null
+++ b/shaders/skia/115-15.shader_test
@@ -0,0 +1,51 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform float uPixelSize_Stage2;
+uniform vec2 uRange_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_1_Stage0;
+ coord.x -= 3.0 * uPixelSize_Stage2;
+ for (int i = 0;i < 7; i++) {
+ output_Stage2 = max(output_Stage2, texture(uTextureSampler_0_Stage2, coord));
+ coord.x += uPixelSize_Stage2;
+ }
+ output_Stage2 *= output_Stage1;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/115-2.shader_test b/shaders/skia/115-2.shader_test
new file mode 100644
index 0000000..bb1f1b3
--- /dev/null
+++ b/shaders/skia/115-2.shader_test
@@ -0,0 +1,68 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 ucolor_Stage1_c0_c0_c0_c0;
+uniform vec4 ucolor_Stage2;
+noperspective in vec4 vcolor_Stage0;
+vec4 ConstColorProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = _input.w * ucolor_Stage1_c0_c0_c0_c0;
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = ConstColorProcessor_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 blend_dst_over(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src + dst;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_dst_over(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ {
+ output_Stage2 = output_Stage1 * ucolor_Stage2;
+ }
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 position;
+in vec4 inColor;
+noperspective out vec4 vcolor_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/115-4.shader_test b/shaders/skia/115-4.shader_test
new file mode 100644
index 0000000..5834622
--- /dev/null
+++ b/shaders/skia/115-4.shader_test
@@ -0,0 +1,111 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec3 uedges_Stage1[4];
+flat in vec4 vcolor_Stage0;
+noperspective in vec2 varccoord_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ float x_plus_1 = varccoord_Stage0.x, y = varccoord_Stage0.y;
+ float coverage;
+ if (0.0 == x_plus_1) {
+ coverage = y;
+ } else {
+ float fn = x_plus_1 * (x_plus_1 - 2.0);
+ fn = ((y) * (y) + (fn));
+ float fnwidth = fwidth(fn);
+ float d = fn / fnwidth;
+ coverage = clamp(0.5 - d, 0.0, 1.0);
+ }
+ outputCoverage_Stage0 = vec4(coverage);
+ }
+ vec4 output_Stage1;
+ {
+ float alpha = 1.0;
+ float edge;
+ edge = dot(uedges_Stage1[0], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage1[1], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage1[2], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage1[3], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ output_Stage1 = outputCoverage_Stage0 * alpha;
+ }
+ {
+ sk_FragColor = outputColor_Stage0 * output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec4 radii_selector;
+in vec4 corner_and_radius_outsets;
+in vec4 aa_bloat_and_coverage;
+in vec4 skew;
+in vec2 translate;
+in vec4 radii_x;
+in vec4 radii_y;
+in vec4 color;
+flat out vec4 vcolor_Stage0;
+noperspective out vec2 varccoord_Stage0;
+void main() {
+ vcolor_Stage0 = color;
+ vec2 corner = corner_and_radius_outsets.xy;
+ vec2 radius_outset = corner_and_radius_outsets.zw;
+ vec2 aa_bloat_direction = aa_bloat_and_coverage.xy;
+ float coverage = aa_bloat_and_coverage.z;
+ float is_linear_coverage = aa_bloat_and_coverage.w;
+ vec2 pixellength = inversesqrt(vec2(dot(skew.xz, skew.xz), dot(skew.yw, skew.yw)));
+ vec4 normalized_axis_dirs = skew * pixellength.xyxy;
+ vec2 axiswidths = abs(normalized_axis_dirs.xy) + abs(normalized_axis_dirs.zw);
+ vec2 aa_bloatradius = (axiswidths * pixellength) * 0.5;
+ vec4 radii_and_neighbors = radii_selector * mat4(radii_x, radii_y, radii_x.yxwz, radii_y.wzyx);
+ vec2 radii = radii_and_neighbors.xy;
+ vec2 neighbor_radii = radii_and_neighbors.zw;
+ if (any(greaterThan(aa_bloatradius, vec2(1.0)))) {
+ corner = max(abs(corner), aa_bloatradius) * sign(corner);
+ coverage /= max(aa_bloatradius.x, 1.0) * max(aa_bloatradius.y, 1.0);
+ radii = vec2(0.0);
+ }
+ if (any(lessThan(radii, aa_bloatradius * 1.25))) {
+ radii = aa_bloatradius;
+ radius_outset = floor(abs(radius_outset)) * radius_outset;
+ is_linear_coverage = 1.0;
+ } else {
+ radii = clamp(radii, pixellength, 2.0 - pixellength);
+ neighbor_radii = clamp(neighbor_radii, pixellength, 2.0 - pixellength);
+ vec2 spacing = (2.0 - radii) - neighbor_radii;
+ vec2 extra_pad = max(pixellength * 0.0625 - spacing, vec2(0.0));
+ radii -= extra_pad * 0.5;
+ }
+ vec2 aa_outset = aa_bloat_direction * aa_bloatradius;
+ vec2 vertexpos = (corner + radius_outset * radii) + aa_outset;
+ mat2 skewmatrix = mat2(skew.xy, skew.zw);
+ vec2 devcoord = vertexpos * skewmatrix + translate;
+ if (0.0 != is_linear_coverage) {
+ varccoord_Stage0.xy = vec2(0.0, coverage);
+ } else {
+ vec2 arccoord = (1.0 - abs(radius_outset)) + (aa_outset / radii) * corner;
+ varccoord_Stage0.xy = vec2(arccoord.x + 1.0, arccoord.y);
+ }
+ gl_Position = vec4(devcoord.x, devcoord.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/115-5.shader_test b/shaders/skia/115-5.shader_test
new file mode 100644
index 0000000..5fbf96f
--- /dev/null
+++ b/shaders/skia/115-5.shader_test
@@ -0,0 +1,75 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage2_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c1_c0;
+ }
+ return _output;
+}
+vec4 blend_src_out(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_src_out(ConstColorProcessor_Stage2_c1_c0(vec4(1.0)), output_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/115-6.shader_test b/shaders/skia/115-6.shader_test
new file mode 100644
index 0000000..e4ffdeb
--- /dev/null
+++ b/shaders/skia/115-6.shader_test
@@ -0,0 +1,138 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform float uSurfaceScale_Stage1;
+uniform vec3 uLightColor_Stage1;
+uniform float uKS_Stage1;
+uniform float uShininess_Stage1;
+uniform vec3 uLightDirection_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 light_Stage1(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ vec3 halfDir = normalize(surfaceToLight + vec3(0.0, 0.0, 1.0));
+ float colorScale = uKS_Stage1 * pow(dot(normal, halfDir), uShininess_Stage1);
+ vec3 color = lightColor * clamp(colorScale, 0.0, 1.0);
+ return vec4(color, max(max(color.x, color.y), color.z));
+}
+float sobel_Stage1(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage1(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage1(float m[9], float surfaceScale) {
+ return pointToNormal_Stage1(sobel_Stage1(0.0, 0.0, m[4], m[5], m[7], m[8], 0.66666698455810547), sobel_Stage1(0.0, 0.0, m[4], m[7], m[5], m[8], 0.66666698455810547), surfaceScale);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ vec2 coord = vTransformedCoords_0_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp0 = textureColor;
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp1 = textureColor;
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp2 = textureColor;
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp3 = textureColor;
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp4 = textureColor;
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp5 = textureColor;
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp6 = textureColor;
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp7 = textureColor;
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp8 = textureColor;
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = uLightDirection_Stage1;
+ output_Stage1 = light_Stage1(normal_Stage1(m, uSurfaceScale_Stage1), surfaceToLight, uLightColor_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/115-7.shader_test b/shaders/skia/115-7.shader_test
new file mode 100644
index 0000000..428e133
--- /dev/null
+++ b/shaders/skia/115-7.shader_test
@@ -0,0 +1,98 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+uniform vec2 uDstTextureUpperLeft_Stage2;
+uniform vec2 uDstTextureCoordScale_Stage2;
+uniform sampler2D uTextureSampler_0_Stage0;
+uniform sampler2D uDstTextureSampler_Stage2;
+noperspective in vec2 vTextureCoords_Stage0;
+flat in int vTexIndex_Stage0;
+noperspective in vec4 vinColor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ t.x = fract(t.x);
+ }
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 blend_src_atop(vec4 src, vec4 dst) {
+ return dst.w * src + (1.0 - src.w) * dst;
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ vec4 texColor;
+ {
+ texColor = texture(uTextureSampler_0_Stage0, vTextureCoords_Stage0);
+ }
+ outputCoverage_Stage0 = texColor;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TiledGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ if (all(lessThanEqual(outputCoverage_Stage0.xyz, vec3(0.0)))) {
+ discard;
+ }
+ vec2 _dstTexCoord = (gl_FragCoord.xy - uDstTextureUpperLeft_Stage2) * uDstTextureCoordScale_Stage2;
+ _dstTexCoord.y = 1.0 - _dstTexCoord.y;
+ vec4 _dstColor = texture(uDstTextureSampler_Stage2, _dstTexCoord);
+ sk_FragColor = blend_src_atop(output_Stage1, _dstColor);
+ float lerpRed = mix(_dstColor.w, sk_FragColor.w, outputCoverage_Stage0.x);
+ float lerpBlue = mix(_dstColor.w, sk_FragColor.w, outputCoverage_Stage0.y);
+ float lerpGreen = mix(_dstColor.w, sk_FragColor.w, outputCoverage_Stage0.z);
+ sk_FragColor = outputCoverage_Stage0 * sk_FragColor + (vec4(1.0) - outputCoverage_Stage0) * _dstColor;
+ sk_FragColor.w = max(max(lerpRed, lerpBlue), lerpGreen);
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform vec2 uAtlasSizeInv_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in uvec2 inTextureCoords;
+noperspective out vec2 vTextureCoords_Stage0;
+flat out int vTexIndex_Stage0;
+noperspective out vec4 vinColor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ ivec2 signedCoords = ivec2(int(inTextureCoords.x), int(inTextureCoords.y));
+ vec2 unormTexCoords = vec2(float(signedCoords.x / 2), float(signedCoords.y / 2));
+ vTextureCoords_Stage0 = unormTexCoords * uAtlasSizeInv_Stage0;
+ vTexIndex_Stage0 = 0;
+ vinColor_Stage0 = inColor;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(inPosition.x, inPosition.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/115.shader_test b/shaders/skia/115.shader_test
new file mode 100644
index 0000000..4dac3f3
--- /dev/null
+++ b/shaders/skia/115.shader_test
@@ -0,0 +1,59 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform mat4 um_Stage2;
+uniform vec4 uv_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TextureEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ vec4 inputColor = output_Stage1;
+ {
+ float nonZeroAlpha = max(inputColor.w, 9.9999997473787516e-05);
+ inputColor = vec4(inputColor.xyz / nonZeroAlpha, inputColor.w);
+ }
+ output_Stage2 = um_Stage2 * inputColor + uv_Stage2;
+ {
+ output_Stage2 = clamp(output_Stage2, 0.0, 1.0);
+ }
+ {
+ output_Stage2.xyz *= output_Stage2.w;
+ }
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1150.shader_test b/shaders/skia/1150.shader_test
new file mode 100644
index 0000000..e140283
--- /dev/null
+++ b/shaders/skia/1150.shader_test
@@ -0,0 +1,96 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_KHR_blend_equation_advanced : require
+out vec4 sk_FragColor;
+layout (blend_support_all_equations) out ;
+uniform vec4 ucircle_Stage1;
+uniform vec4 ucolor_Stage2;
+uniform vec4 ucircle_Stage3;
+noperspective in vec2 vEllipseOffsets_Stage0;
+noperspective in vec4 vEllipseRadii_Stage0;
+noperspective in vec4 vinColor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vinColor_Stage0;
+ vec2 offset = vEllipseOffsets_Stage0;
+ float test = dot(offset, offset) - 1.0;
+ vec2 grad = (2.0 * offset) * vEllipseRadii_Stage0.xy;
+ float grad_dot = dot(grad, grad);
+ grad_dot = max(grad_dot, 1.1754999560161448e-38);
+ float invlen = inversesqrt(grad_dot);
+ float edgeAlpha = clamp(0.5 - test * invlen, 0.0, 1.0);
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ vec4 output_Stage1;
+ {
+ float d;
+ {
+ d = (length((ucircle_Stage1.xy - gl_FragCoord.xy) * ucircle_Stage1.w) - 1.0) * ucircle_Stage1.z;
+ }
+ {
+ output_Stage1 = d > 0.5 ? outputColor_Stage0 : vec4(0.0);
+ }
+ }
+ vec4 output_Stage2;
+ {
+ {
+ output_Stage2 = output_Stage1.w * ucolor_Stage2;
+ }
+ }
+ vec4 output_Stage3;
+ {
+ float d;
+ {
+ d = (length((ucircle_Stage3.xy - gl_FragCoord.xy) * ucircle_Stage3.w) - 1.0) * ucircle_Stage3.z;
+ }
+ {
+ output_Stage3 = d > 0.5 ? output_Stage2 : vec4(0.0);
+ }
+ }
+ vec4 output_Stage4;
+ {
+ output_Stage4 = output_Stage3;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_0_Stage0.x);
+ uint y = uint(vTransformedCoords_0_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ output_Stage4 = vec4(clamp(output_Stage4.xyz + value * 0.01587301678955555, 0.0, output_Stage4.w), output_Stage4.w);
+ }
+ {
+ sk_FragColor = outputCoverage_Stage0 * output_Stage4;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec2 inEllipseOffset;
+in vec4 inEllipseRadii;
+noperspective out vec2 vEllipseOffsets_Stage0;
+noperspective out vec4 vEllipseRadii_Stage0;
+noperspective out vec4 vinColor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vEllipseOffsets_Stage0 = inEllipseOffset;
+ vEllipseRadii_Stage0 = inEllipseRadii;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1153.shader_test b/shaders/skia/1153.shader_test
new file mode 100644
index 0000000..e741b36
--- /dev/null
+++ b/shaders/skia/1153.shader_test
@@ -0,0 +1,435 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_KHR_blend_equation_advanced : require
+out vec4 sk_FragColor;
+layout (blend_support_all_equations) out ;
+uniform vec2 uImageIncrement_Stage1_c0_c0_c0_c0;
+uniform float uSurfaceScale_Stage1_c0_c0_c0_c0;
+uniform vec3 uLightColor_Stage1_c0_c0_c0_c0;
+uniform float uKS_Stage1_c0_c0_c0_c0;
+uniform float uShininess_Stage1_c0_c0_c0_c0;
+uniform vec4 uTexDom_Stage1_c0_c0_c0_c0;
+uniform vec3 uDecalParams_Stage1_c0_c0_c0_c0;
+uniform vec3 uLightDirection_Stage1_c0_c0_c0_c0;
+uniform vec2 uScale_Stage1_c0_c0_c1_c0_c0_c0;
+uniform vec4 uTexDom_Stage1_c0_c0_c1_c0_c0_c0;
+uniform vec3 uDecalParams_Stage1_c0_c0_c1_c0_c0_c0;
+uniform vec2 ubaseFrequency_Stage1_c1_c0_c0_c0_c1_c0;
+uniform float uz_Stage1_c1_c0_c0_c0_c1_c0;
+uniform vec2 uScale_Stage1_c1_c0_c1_c0;
+uniform vec4 uTexDom_Stage1_c1_c0_c1_c0;
+uniform vec3 uDecalParams_Stage1_c1_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+uniform sampler2D uTextureSampler_2_Stage1;
+uniform sampler2D uTextureSampler_3_Stage1;
+uniform sampler2D uTextureSampler_4_Stage1;
+uniform sampler2D uTextureSampler_5_Stage1;
+uniform sampler2D uTextureSampler_6_Stage1;
+uniform sampler2D uTextureSampler_7_Stage1;
+noperspective in vec2 vEllipseOffsets_Stage0;
+noperspective in vec4 vEllipseRadii_Stage0;
+noperspective in vec4 vinColor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+noperspective in vec3 vTransformedCoords_3_Stage0;
+noperspective in vec2 vTransformedCoords_4_Stage0;
+noperspective in vec2 vTransformedCoords_5_Stage0;
+noperspective in vec2 vTransformedCoords_6_Stage0;
+vec4 light_Stage1_c0_c0_c0_c0(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ vec3 halfDir = normalize(surfaceToLight + vec3(0.0, 0.0, 1.0));
+ float colorScale = uKS_Stage1_c0_c0_c0_c0 * pow(dot(normal, halfDir), uShininess_Stage1_c0_c0_c0_c0);
+ vec3 color = lightColor * clamp(colorScale, 0.0, 1.0);
+ return vec4(color, max(max(color.x, color.y), color.z));
+}
+float sobel_Stage1_c0_c0_c0_c0(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage1_c0_c0_c0_c0(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage1_c0_c0_c0_c0(float m[9], float surfaceScale) {
+ return pointToNormal_Stage1_c0_c0_c0_c0(sobel_Stage1_c0_c0_c0_c0(m[0], m[1], m[3], m[4], 0.0, 0.0, 0.66666698455810547), sobel_Stage1_c0_c0_c0_c0(m[0], m[3], m[1], m[4], 0.0, 0.0, 0.66666698455810547), surfaceScale);
+}
+vec4 SpecularLighting_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coord = vTransformedCoords_0_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage1_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp0 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage1_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp5 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage1_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp6 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage1_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp7 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage1_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp8 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = uLightDirection_Stage1_c0_c0_c0_c0;
+ _output = light_Stage1_c0_c0_c0_c0(normal_Stage1_c0_c0_c0_c0(m, uSurfaceScale_Stage1_c0_c0_c0_c0), surfaceToLight, uLightColor_Stage1_c0_c0_c0_c0);
+ _output *= _input;
+ return _output;
+}
+vec4 DisplacementMap_Stage1_c0_c0_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 dColor = texture(uTextureSampler_1_Stage1, vTransformedCoords_1_Stage0);
+ dColor.xyz = dColor.w < 9.9999999747524271e-07 ? vec3(0.0) : clamp(dColor.xyz / dColor.w, 0.0, 1.0);
+ vec2 cCoords = vTransformedCoords_2_Stage0 + uScale_Stage1_c0_c0_c1_c0_c0_c0 * (dColor.yz - vec2(0.5));
+ {
+ vec2 origCoord = cCoords;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c1_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c1_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c1_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c1_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c1_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c1_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ _output = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ return _output;
+}
+vec4 TextureEffect_Stage1_c0_c0_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = textureProj(uTextureSampler_3_Stage1, vTransformedCoords_3_Stage0) * _input;
+ return _output;
+}
+vec4 blend_multiply(vec4 src, vec4 dst) {
+ return vec4(((1.0 - src.w) * dst.xyz + (1.0 - dst.w) * src.xyz) + src.xyz * dst.xyz, src.w + (1.0 - src.w) * dst.w);
+}
+vec4 ComposeTwo_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_multiply(DisplacementMap_Stage1_c0_c0_c1_c0_c0_c0(inputColor), TextureEffect_Stage1_c0_c0_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 blend_exclusion(vec4 src, vec4 dst) {
+ return vec4((dst.xyz + src.xyz) - (2.0 * dst.xyz) * src.xyz, src.w + (1.0 - src.w) * dst.w);
+}
+vec4 ComposeTwo_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_exclusion(SpecularLighting_Stage1_c0_c0_c0_c0(inputColor), ComposeTwo_Stage1_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 Big_Ole_Key_Stage1_c1_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = _input;
+ return _output;
+}
+vec3 fade_Stage1_c1_c0_c0_c0_c1_c0(vec3 t) {
+ return ((t * t) * t) * (t * (t * 6.0 - 15.0) + 10.0);
+}
+float perm_Stage1_c1_c0_c0_c0_c1_c0(float x) {
+ return texture(uTextureSampler_4_Stage1, vec2(fract(x / 256.0), 0.0)).x * 255.0;
+}
+float grad_Stage1_c1_c0_c0_c0_c1_c0(float x, vec3 p) {
+ return dot(texture(uTextureSampler_5_Stage1, vec2(fract(x / 16.0), 0.0)).xyz * 255.0 - vec3(1.0), p);
+}
+float lerp_Stage1_c1_c0_c0_c0_c1_c0(float a, float b, float w) {
+ return a + w * (b - a);
+}
+float noise_Stage1_c1_c0_c0_c0_c1_c0(vec3 p) {
+ vec3 P = mod(floor(p), 256.0);
+ p -= floor(p);
+ vec3 f = fade_Stage1_c1_c0_c0_c0_c1_c0(p);
+ float A = perm_Stage1_c1_c0_c0_c0_c1_c0(P.x) + P.y;
+ float AA = perm_Stage1_c1_c0_c0_c0_c1_c0(A) + P.z;
+ float AB = perm_Stage1_c1_c0_c0_c0_c1_c0(A + 1.0) + P.z;
+ float B = perm_Stage1_c1_c0_c0_c0_c1_c0(P.x + 1.0) + P.y;
+ float BA = perm_Stage1_c1_c0_c0_c0_c1_c0(B) + P.z;
+ float BB = perm_Stage1_c1_c0_c0_c0_c1_c0(B + 1.0) + P.z;
+ float result = lerp_Stage1_c1_c0_c0_c0_c1_c0(lerp_Stage1_c1_c0_c0_c0_c1_c0(lerp_Stage1_c1_c0_c0_c0_c1_c0(grad_Stage1_c1_c0_c0_c0_c1_c0(perm_Stage1_c1_c0_c0_c0_c1_c0(AA), p), grad_Stage1_c1_c0_c0_c0_c1_c0(perm_Stage1_c1_c0_c0_c0_c1_c0(BA), p + vec3(-1.0, 0.0, 0.0)), f.x), lerp_Stage1_c1_c0_c0_c0_c1_c0(grad_Stage1_c1_c0_c0_c0_c1_c0(perm_Stage1_c1_c0_c0_c0_c1_c0(AB), p + vec3(0.0, -1.0, 0.0)), grad_Stage1_c1_c0_c0_c0_c1_c0(perm_Stage1_c1_c0_c0_c0_c1_c0(BB), p + vec3(-1.0, -1.0, 0.0)), f.x), f.y), lerp_Stage1_c1_c0_c0_c0_c1_c0(lerp_Stage1_c1_c0_c0_c0_c1_c0(grad_Stage1_c1_c0_c0_c0_c1_c0(perm_Stage1_c1_c0_c0_c0_c1_c0(AA + 1.0), p + vec3(0.0, 0.0, -1.0)), grad_Stage1_c1_c0_c0_c0_c1_c0(perm_Stage1_c1_c0_c0_c0_c1_c0(BA + 1.0), p + vec3(-1.0, 0.0, -1.0)), f.x), lerp_Stage1_c1_c0_c0_c0_c1_c0(grad_Stage1_c1_c0_c0_c0_c1_c0(perm_Stage1_c1_c0_c0_c0_c1_c0(AB + 1.0), p + vec3(0.0, -1.0, -1.0)), grad_Stage1_c1_c0_c0_c0_c1_c0(perm_Stage1_c1_c0_c0_c0_c1_c0(BB + 1.0), p + vec3(-1.0, -1.0, -1.0)), f.x), f.y), f.z);
+ return result;
+}
+float noiseOctaves_Stage1_c1_c0_c0_c0_c1_c0(vec3 p) {
+ float result = 0.0;
+ float ratio = 1.0;
+ for (float i = 0.0;i < 10.0; i++) {
+ result += noise_Stage1_c1_c0_c0_c0_c1_c0(p) / ratio;
+ p *= 2.0;
+ ratio *= 2.0;
+ }
+ return (result + 1.0) / 2.0;
+}
+vec4 ImprovedPerlinNoise_Stage1_c1_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coords = vTransformedCoords_4_Stage0 * ubaseFrequency_Stage1_c1_c0_c0_c0_c1_c0;
+ float r = noiseOctaves_Stage1_c1_c0_c0_c0_c1_c0(vec3(coords, uz_Stage1_c1_c0_c0_c0_c1_c0));
+ float g = noiseOctaves_Stage1_c1_c0_c0_c0_c1_c0(vec3(coords, uz_Stage1_c1_c0_c0_c0_c1_c0));
+ float b = noiseOctaves_Stage1_c1_c0_c0_c0_c1_c0(vec3(coords, uz_Stage1_c1_c0_c0_c0_c1_c0));
+ float a = noiseOctaves_Stage1_c1_c0_c0_c0_c1_c0(vec3(coords, uz_Stage1_c1_c0_c0_c0_c1_c0));
+ _output = vec4(r, g, b, a);
+ _output = clamp(_output, 0.0, 1.0);
+ _output = vec4(_output.xyz * _output.www, _output.w);
+ return _output;
+}
+float _blend_overlay_component(float sc, float sa, float dc, float da) {
+ if (2.0 * dc <= da) {
+ return (2.0 * sc) * dc;
+ }
+ return sa * da - (2.0 * (da - dc)) * (sa - sc);
+}
+vec4 blend_overlay(vec4 src, vec4 dst) {
+ vec4 result = vec4(_blend_overlay_component(src.x, src.w, dst.x, dst.w), _blend_overlay_component(src.y, src.w, dst.y, dst.w), _blend_overlay_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+ result.xyz += dst.xyz * (1.0 - src.w) + src.xyz * (1.0 - dst.w);
+ return result;
+}
+vec4 ComposeTwo_Stage1_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_overlay(Big_Ole_Key_Stage1_c1_c0_c0_c0_c0_c0(inputColor), ImprovedPerlinNoise_Stage1_c1_c0_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 DisplacementMap_Stage1_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 dColor = texture(uTextureSampler_6_Stage1, vTransformedCoords_5_Stage0);
+ dColor.xyz = dColor.w < 9.9999999747524271e-07 ? vec3(0.0) : clamp(dColor.xyz / dColor.w, 0.0, 1.0);
+ vec2 cCoords = vTransformedCoords_6_Stage0 + uScale_Stage1_c1_c0_c1_c0 * (dColor.wz - vec2(0.5));
+ {
+ vec2 origCoord = cCoords;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c1_c0.xy, uTexDom_Stage1_c1_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_7_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ _output = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ return _output;
+}
+vec4 blend_src_atop(vec4 src, vec4 dst) {
+ return dst.w * src + (1.0 - src.w) * dst;
+}
+vec4 ComposeTwo_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_src_atop(ComposeTwo_Stage1_c1_c0_c0_c0(inputColor), DisplacementMap_Stage1_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+float _blend_color_luminance(vec3 color) {
+ return dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), color);
+}
+vec3 _blend_set_color_luminance(vec3 hueSatColor, float alpha, vec3 lumColor) {
+ float lum = _blend_color_luminance(lumColor);
+ vec3 result = (lum - _blend_color_luminance(hueSatColor)) + hueSatColor;
+ float minComp = min(min(result.x, result.y), result.z);
+ float maxComp = max(max(result.x, result.y), result.z);
+ if (minComp < 0.0 && lum != minComp) {
+ result = lum + ((result - lum) * lum) / (lum - minComp);
+ }
+ if (maxComp > alpha && maxComp != lum) {
+ return lum + ((result - lum) * (alpha - lum)) / (maxComp - lum);
+ }
+ return result;
+}
+vec4 blend_color(vec4 src, vec4 dst) {
+ float alpha = dst.w * src.w;
+ vec3 sda = src.xyz * dst.w;
+ vec3 dsa = dst.xyz * src.w;
+ return vec4((((_blend_set_color_luminance(sda, alpha, dsa) + dst.xyz) - dsa) + src.xyz) - sda, (src.w + dst.w) - alpha);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vinColor_Stage0;
+ vec2 offset = vEllipseOffsets_Stage0;
+ float test = dot(offset, offset) - 1.0;
+ vec2 grad = (2.0 * offset) * vEllipseRadii_Stage0.xy;
+ float grad_dot = dot(grad, grad);
+ grad_dot = max(grad_dot, 1.1754999560161448e-38);
+ float invlen = inversesqrt(grad_dot);
+ float edgeAlpha = clamp(0.5 - test * invlen, 0.0, 1.0);
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_color(ComposeTwo_Stage1_c0_c0(inputColor), ComposeTwo_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ sk_FragColor = outputCoverage_Stage0 * output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+uniform mat3 uCoordTransformMatrix_3_Stage0;
+uniform mat3 uCoordTransformMatrix_4_Stage0;
+uniform mat3 uCoordTransformMatrix_5_Stage0;
+uniform mat3 uCoordTransformMatrix_6_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec2 inEllipseOffset;
+in vec4 inEllipseRadii;
+noperspective out vec2 vEllipseOffsets_Stage0;
+noperspective out vec4 vEllipseRadii_Stage0;
+noperspective out vec4 vinColor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+noperspective out vec3 vTransformedCoords_3_Stage0;
+noperspective out vec2 vTransformedCoords_4_Stage0;
+noperspective out vec2 vTransformedCoords_5_Stage0;
+noperspective out vec2 vTransformedCoords_6_Stage0;
+void main() {
+ vEllipseOffsets_Stage0 = inEllipseOffset;
+ vEllipseRadii_Stage0 = inEllipseRadii;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_3_Stage0 = uCoordTransformMatrix_3_Stage0 * vec3(inPosition, 1.0);
+ vTransformedCoords_4_Stage0 = (uCoordTransformMatrix_4_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_5_Stage0 = (uCoordTransformMatrix_5_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_6_Stage0 = (uCoordTransformMatrix_6_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1156.shader_test b/shaders/skia/1156.shader_test
new file mode 100644
index 0000000..d608007
--- /dev/null
+++ b/shaders/skia/1156.shader_test
@@ -0,0 +1,309 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_KHR_blend_equation_advanced : require
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+layout (blend_support_all_equations) out ;
+uniform float ucornerRadius_Stage1;
+uniform vec4 uproxyRect_Stage1;
+uniform float ublurRadius_Stage1;
+uniform vec3 uedges_Stage2_c0_c0[7];
+uniform vec4 uleftBorderColor_Stage3_c1_c0;
+uniform vec4 urightBorderColor_Stage3_c1_c0;
+uniform float ubias_Stage3_c1_c0_c0_c0;
+uniform float uscale_Stage3_c1_c0_c0_c0;
+uniform vec4 uscale0_1_Stage3_c1_c0_c1_c0;
+uniform vec4 uscale2_3_Stage3_c1_c0_c1_c0;
+uniform vec4 uscale4_5_Stage3_c1_c0_c1_c0;
+uniform vec4 uscale6_7_Stage3_c1_c0_c1_c0;
+uniform vec4 uscale8_9_Stage3_c1_c0_c1_c0;
+uniform vec4 ubias0_1_Stage3_c1_c0_c1_c0;
+uniform vec4 ubias2_3_Stage3_c1_c0_c1_c0;
+uniform vec4 ubias4_5_Stage3_c1_c0_c1_c0;
+uniform vec4 ubias6_7_Stage3_c1_c0_c1_c0;
+uniform vec4 ubias8_9_Stage3_c1_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage3_c1_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage3_c1_c0_c1_c0;
+uniform vec4 ucolor_Stage4_c2_c0;
+uniform vec4 uleftBorderColor_Stage5_c3_c0;
+uniform vec4 urightBorderColor_Stage5_c3_c0;
+uniform float ubias_Stage5_c3_c0_c0_c0;
+uniform float uscale_Stage5_c3_c0_c0_c0;
+uniform vec4 uscale01_Stage5_c3_c0_c1_c0;
+uniform vec4 ubias01_Stage5_c3_c0_c1_c0;
+uniform vec4 uscale23_Stage5_c3_c0_c1_c0;
+uniform vec4 ubias23_Stage5_c3_c0_c1_c0;
+uniform float uthreshold_Stage5_c3_c0_c1_c0;
+uniform float uPixelSize_Stage6;
+uniform vec2 uRange_Stage6;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage6;
+noperspective in vec2 vEllipseOffsets_Stage0;
+noperspective in vec4 vEllipseRadii_Stage0;
+noperspective in vec4 vinColor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+vec4 ConvexPoly_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ float alpha = 1.0;
+ float edge;
+ edge = dot(uedges_Stage2_c0_c0[0], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage2_c0_c0[1], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage2_c0_c0[2], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage2_c0_c0[3], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage2_c0_c0[4], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage2_c0_c0[5], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage2_c0_c0[6], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ alpha = 1.0 - alpha;
+ _output = _input * alpha;
+ return _output;
+}
+vec4 SweepGradientLayout_Stage3_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float angle;
+ {
+ angle = atan(-vTransformedCoords_0_Stage0.y, -vTransformedCoords_0_Stage0.x);
+ }
+ float t = ((angle * 0.15915493667125702 + 0.5) + ubias_Stage3_c1_c0_c0_c0) * uscale_Stage3_c1_c0_c0_c0;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage3_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthresholds1_7_Stage3_c1_c0_c1_c0.w) {
+ if (t < uthresholds1_7_Stage3_c1_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage3_c1_c0_c1_c0.x) {
+ scale = uscale0_1_Stage3_c1_c0_c1_c0;
+ bias = ubias0_1_Stage3_c1_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage3_c1_c0_c1_c0;
+ bias = ubias2_3_Stage3_c1_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage3_c1_c0_c1_c0.z) {
+ scale = uscale4_5_Stage3_c1_c0_c1_c0;
+ bias = ubias4_5_Stage3_c1_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage3_c1_c0_c1_c0;
+ bias = ubias6_7_Stage3_c1_c0_c1_c0;
+ }
+ }
+ } else {
+ {
+ {
+ scale = uscale8_9_Stage3_c1_c0_c1_c0;
+ bias = ubias8_9_Stage3_c1_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage3_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = SweepGradientLayout_Stage3_c1_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage3_c1_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage3_c1_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage3_c1_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 ConstColorProcessor_Stage4_c2_c0(vec4 _input, vec2 _coords) {
+ vec4 _output;
+ {
+ _output = _input.w * ucolor_Stage4_c2_c0;
+ }
+ return _output;
+}
+vec4 SweepGradientLayout_Stage5_c3_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float angle;
+ {
+ angle = atan(-vTransformedCoords_1_Stage0.y, -vTransformedCoords_1_Stage0.x);
+ }
+ float t = ((angle * 0.15915493667125702 + 0.5) + ubias_Stage5_c3_c0_c0_c0) * uscale_Stage5_c3_c0_c0_c0;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 DualIntervalGradientColorizer_Stage5_c3_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthreshold_Stage5_c3_c0_c1_c0) {
+ scale = uscale01_Stage5_c3_c0_c1_c0;
+ bias = ubias01_Stage5_c3_c0_c1_c0;
+ } else {
+ scale = uscale23_Stage5_c3_c0_c1_c0;
+ bias = ubias23_Stage5_c3_c0_c1_c0;
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage5_c3_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = SweepGradientLayout_Stage5_c3_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage5_c3_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage5_c3_c0;
+ } else {
+ _output = DualIntervalGradientColorizer_Stage5_c3_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+float _guarded_divide(float n, float d) {
+ return n / d;
+}
+float _color_dodge_component(float sc, float sa, float dc, float da) {
+ if (dc == 0.0) {
+ return sc * (1.0 - da);
+ } else {
+ float d = sa - sc;
+ if (d == 0.0) {
+ return (sa * da + sc * (1.0 - da)) + dc * (1.0 - sa);
+ }
+ d = min(da, _guarded_divide(dc * sa, d));
+ return (d * sa + sc * (1.0 - da)) + dc * (1.0 - sa);
+ }
+}
+vec4 blend_color_dodge(vec4 src, vec4 dst) {
+ return vec4(_color_dodge_component(src.x, src.w, dst.x, dst.w), _color_dodge_component(src.y, src.w, dst.y, dst.w), _color_dodge_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vinColor_Stage0;
+ vec2 offset = vEllipseOffsets_Stage0;
+ offset *= vEllipseRadii_Stage0.xy;
+ float test = dot(offset, offset) - 1.0;
+ vec2 grad = (2.0 * offset) * vEllipseRadii_Stage0.xy;
+ float grad_dot = dot(grad, grad);
+ grad_dot = max(grad_dot, 1.1754999560161448e-38);
+ float invlen = inversesqrt(grad_dot);
+ float edgeAlpha = clamp(0.5 - test * invlen, 0.0, 1.0);
+ offset = vEllipseOffsets_Stage0 * vEllipseRadii_Stage0.zw;
+ test = dot(offset, offset) - 1.0;
+ grad = (2.0 * offset) * vEllipseRadii_Stage0.zw;
+ grad_dot = dot(grad, grad);
+ invlen = inversesqrt(grad_dot);
+ edgeAlpha *= clamp(0.5 + test * invlen, 0.0, 1.0);
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ vec4 output_Stage1;
+ {
+ vec2 translatedFragPos = gl_FragCoord.xy - uproxyRect_Stage1.xy;
+ float threshold = ucornerRadius_Stage1 + 2.0 * ublurRadius_Stage1;
+ vec2 middle = (uproxyRect_Stage1.zw - uproxyRect_Stage1.xy) - 2.0 * threshold;
+ if (translatedFragPos.x >= threshold && translatedFragPos.x < middle.x + threshold) {
+ translatedFragPos.x = threshold;
+ } else if (translatedFragPos.x >= middle.x + threshold) {
+ translatedFragPos.x -= middle.x - 1.0;
+ }
+ if (translatedFragPos.y > threshold && translatedFragPos.y < middle.y + threshold) {
+ translatedFragPos.y = threshold;
+ } else if (translatedFragPos.y >= middle.y + threshold) {
+ translatedFragPos.y -= middle.y - 1.0;
+ }
+ vec2 proxyDims = vec2(2.0 * threshold + 1.0);
+ vec2 texCoord = translatedFragPos / proxyDims;
+ output_Stage1 = outputColor_Stage0 * texture(uTextureSampler_0_Stage1, texCoord);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_color_dodge(output_Stage1, ConvexPoly_Stage2_c0_c0(vec4(1.0)));
+ }
+ vec4 output_Stage3;
+ {
+ output_Stage3 = blend_dst_in(output_Stage2, ClampedGradientEffect_Stage3_c1_c0(vec4(1.0)));
+ }
+ vec4 output_Stage4;
+ {
+ output_Stage4 = ConstColorProcessor_Stage4_c2_c0(output_Stage3, gl_FragCoord.xy);
+ }
+ vec4 output_Stage5;
+ {
+ output_Stage5 = blend_dst_in(output_Stage4, ClampedGradientEffect_Stage5_c3_c0(vec4(1.0)));
+ }
+ vec4 output_Stage6;
+ {
+ output_Stage6 = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_2_Stage0;
+ coord.x -= 2.0 * uPixelSize_Stage6;
+ for (int i = 0;i < 5; i++) {
+ output_Stage6 = max(output_Stage6, texture(uTextureSampler_0_Stage6, coord));
+ coord.x += uPixelSize_Stage6;
+ }
+ output_Stage6 *= outputCoverage_Stage0;
+ }
+ {
+ sk_FragColor = output_Stage6 * output_Stage5;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec2 inEllipseOffset;
+in vec4 inEllipseRadii;
+noperspective out vec2 vEllipseOffsets_Stage0;
+noperspective out vec4 vEllipseRadii_Stage0;
+noperspective out vec4 vinColor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+void main() {
+ vEllipseOffsets_Stage0 = inEllipseOffset;
+ vEllipseRadii_Stage0 = inEllipseRadii;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1159.shader_test b/shaders/skia/1159.shader_test
new file mode 100644
index 0000000..4325474
--- /dev/null
+++ b/shaders/skia/1159.shader_test
@@ -0,0 +1,42 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uColor_Stage0;
+noperspective in vec3 vDashParams_Stage0;
+noperspective in vec4 vRectParams_Stage0;
+void main() {
+ {
+ float xShifted = vDashParams_Stage0.x - floor(vDashParams_Stage0.x / vDashParams_Stage0.z) * vDashParams_Stage0.z;
+ vec2 fragPosShifted = vec2(xShifted, vDashParams_Stage0.y);
+ float xSub, ySub;
+ xSub = min(fragPosShifted.x - vRectParams_Stage0.x, 0.0);
+ xSub += min(vRectParams_Stage0.z - fragPosShifted.x, 0.0);
+ ySub = min(fragPosShifted.y - vRectParams_Stage0.y, 0.0);
+ ySub += min(vRectParams_Stage0.w - fragPosShifted.y, 0.0);
+ }
+ {
+ sk_FragColor = vec4(0.0);
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 inPosition;
+in vec3 inDashParams;
+in vec4 inRect;
+noperspective out vec3 vDashParams_Stage0;
+noperspective out vec4 vRectParams_Stage0;
+void main() {
+ vDashParams_Stage0 = inDashParams;
+ vRectParams_Stage0 = inRect;
+ vec2 pos2 = inPosition;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1162.shader_test b/shaders/skia/1162.shader_test
new file mode 100644
index 0000000..4f5c098
--- /dev/null
+++ b/shaders/skia/1162.shader_test
@@ -0,0 +1,207 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 urectH_Stage1_c0_c0_c1_c0;
+uniform float uinvSixSigma_Stage1_c0_c0_c1_c0;
+uniform vec3 uedges_Stage1_c1_c0_c0_c0_c1_c0[2];
+uniform mat4 um_Stage1_c1_c0_c1_c0_c0_c0;
+uniform vec4 uv_Stage1_c1_c0_c1_c0_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+noperspective in vec2 vEllipseOffsets0_Stage0;
+noperspective in vec2 vEllipseOffsets1_Stage0;
+noperspective in vec4 vinColor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 TextureEffect_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+vec4 RectBlurEffect_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float xCoverage, yCoverage;
+ {
+ float x, y;
+ {
+ x = max(urectH_Stage1_c0_c0_c1_c0.x - gl_FragCoord.x, gl_FragCoord.x - urectH_Stage1_c0_c0_c1_c0.z);
+ y = max(urectH_Stage1_c0_c0_c1_c0.y - gl_FragCoord.y, gl_FragCoord.y - urectH_Stage1_c0_c0_c1_c0.w);
+ }
+ xCoverage = texture(uTextureSampler_1_Stage1, vec2(x * uinvSixSigma_Stage1_c0_c0_c1_c0, 0.5)).w;
+ yCoverage = texture(uTextureSampler_1_Stage1, vec2(y * uinvSixSigma_Stage1_c0_c0_c1_c0, 0.5)).w;
+ _output = (_input * xCoverage) * yCoverage;
+ }
+ _output = (_input * xCoverage) * yCoverage;
+ return _output;
+}
+vec4 blend_modulate(vec4 src, vec4 dst) {
+ return src * dst;
+}
+vec4 ComposeTwo_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_modulate(TextureEffect_Stage1_c0_c0_c0_c0(inputColor), RectBlurEffect_Stage1_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 Big_Ole_Key_Stage1_c1_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = _input;
+ return _output;
+}
+vec4 ConvexPoly_Stage1_c1_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float alpha = 1.0;
+ float edge;
+ edge = dot(uedges_Stage1_c1_c0_c0_c0_c1_c0[0], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage1_c1_c0_c0_c0_c1_c0[1], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ _output = _input * alpha;
+ return _output;
+}
+float _blend_color_luminance(vec3 color) {
+ return dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), color);
+}
+vec3 _blend_set_color_luminance(vec3 hueSatColor, float alpha, vec3 lumColor) {
+ float lum = _blend_color_luminance(lumColor);
+ vec3 result = (lum - _blend_color_luminance(hueSatColor)) + hueSatColor;
+ float minComp = min(min(result.x, result.y), result.z);
+ float maxComp = max(max(result.x, result.y), result.z);
+ if (minComp < 0.0 && lum != minComp) {
+ result = lum + ((result - lum) * lum) / (lum - minComp);
+ }
+ if (maxComp > alpha && maxComp != lum) {
+ return lum + ((result - lum) * (alpha - lum)) / (maxComp - lum);
+ }
+ return result;
+}
+vec4 blend_color(vec4 src, vec4 dst) {
+ float alpha = dst.w * src.w;
+ vec3 sda = src.xyz * dst.w;
+ vec3 dsa = dst.xyz * src.w;
+ return vec4((((_blend_set_color_luminance(sda, alpha, dsa) + dst.xyz) - dsa) + src.xyz) - sda, (src.w + dst.w) - alpha);
+}
+vec4 ComposeTwo_Stage1_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_color(Big_Ole_Key_Stage1_c1_c0_c0_c0_c0_c0(inputColor), ConvexPoly_Stage1_c1_c0_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 ColorMatrixFragmentProcessor_Stage1_c1_c0_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = _input;
+ {
+ float nonZeroAlpha = max(inputColor.w, 9.9999997473787516e-05);
+ inputColor = vec4(inputColor.xyz / nonZeroAlpha, inputColor.w);
+ }
+ _output = um_Stage1_c1_c0_c1_c0_c0_c0 * inputColor + uv_Stage1_c1_c0_c1_c0_c0_c0;
+ {
+ _output = clamp(_output, 0.0, 1.0);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 Big_Ole_Key_Stage1_c1_c0_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = _input;
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+vec4 ComposeTwo_Stage1_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_dst_in(ColorMatrixFragmentProcessor_Stage1_c1_c0_c1_c0_c0_c0(inputColor), Big_Ole_Key_Stage1_c1_c0_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 blend_difference(vec4 src, vec4 dst) {
+ return vec4((src.xyz + dst.xyz) - 2.0 * min(src.xyz * dst.w, dst.xyz * src.w), src.w + (1.0 - src.w) * dst.w);
+}
+vec4 ComposeTwo_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_difference(ComposeTwo_Stage1_c1_c0_c0_c0(inputColor), ComposeTwo_Stage1_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+float _blend_overlay_component(float sc, float sa, float dc, float da) {
+ if (2.0 * dc <= da) {
+ return (2.0 * sc) * dc;
+ }
+ return sa * da - (2.0 * (da - dc)) * (sa - sc);
+}
+vec4 blend_overlay(vec4 src, vec4 dst) {
+ vec4 result = vec4(_blend_overlay_component(src.x, src.w, dst.x, dst.w), _blend_overlay_component(src.y, src.w, dst.y, dst.w), _blend_overlay_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+ result.xyz += dst.xyz * (1.0 - src.w) + src.xyz * (1.0 - dst.w);
+ return result;
+}
+vec4 blend_hard_light(vec4 src, vec4 dst) {
+ return blend_overlay(dst, src);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vinColor_Stage0;
+ vec2 scaledOffset = vEllipseOffsets0_Stage0;
+ float test = dot(scaledOffset, scaledOffset) - 1.0;
+ vec2 duvdx = dFdx(vEllipseOffsets0_Stage0);
+ vec2 duvdy = -dFdy(vEllipseOffsets0_Stage0);
+ vec2 grad = vec2(vEllipseOffsets0_Stage0.x * duvdx.x + vEllipseOffsets0_Stage0.y * duvdx.y, vEllipseOffsets0_Stage0.x * duvdy.x + vEllipseOffsets0_Stage0.y * duvdy.y);
+ float grad_dot = 4.0 * dot(grad, grad);
+ grad_dot = max(grad_dot, 1.1754999560161448e-38);
+ float invlen = inversesqrt(grad_dot);
+ float edgeAlpha = clamp(0.5 - test * invlen, 0.0, 1.0);
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_hard_light(ComposeTwo_Stage1_c0_c0(inputColor), ComposeTwo_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ sk_FragColor = output_Stage1 * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec2 inEllipseOffsets0;
+in vec2 inEllipseOffsets1;
+noperspective out vec2 vEllipseOffsets0_Stage0;
+noperspective out vec2 vEllipseOffsets1_Stage0;
+noperspective out vec4 vinColor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vEllipseOffsets0_Stage0 = inEllipseOffsets0;
+ vEllipseOffsets1_Stage0 = inEllipseOffsets1;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = (uViewM_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1168.shader_test b/shaders/skia/1168.shader_test
new file mode 100644
index 0000000..779fda0
--- /dev/null
+++ b/shaders/skia/1168.shader_test
@@ -0,0 +1,30 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uColor_Stage0;
+void main() {
+ {
+ sk_FragColor = 1.0 - vec4(1.0);
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 inPosition;
+void main() {
+ vec2 pos2 = (uViewM_Stage0 * vec3(inPosition, 1.0)).xy;
+ {
+ vec2 _posTmp = pos2;
+ _posTmp = floor(_posTmp) + vec2(0.5, 0.5);
+ gl_Position = vec4(_posTmp, 0.0, 1.0);
+ }
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1171.shader_test b/shaders/skia/1171.shader_test
new file mode 100644
index 0000000..ef083dd
--- /dev/null
+++ b/shaders/skia/1171.shader_test
@@ -0,0 +1,56 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uinnerRect_Stage1;
+uniform vec2 uinvRadiiXY_Stage1;
+noperspective in vec4 vcolor_Stage0;
+noperspective in float vinCoverage_Stage0;
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ float alpha = 1.0;
+ alpha = vinCoverage_Stage0;
+ outputCoverage_Stage0 = vec4(alpha);
+ }
+ vec4 output_Stage1;
+ {
+ vec2 dxy0 = uinnerRect_Stage1.xy - gl_FragCoord.xy;
+ vec2 dxy1 = gl_FragCoord.xy - uinnerRect_Stage1.zw;
+ vec2 dxy = max(max(dxy0, dxy1), 0.0);
+ vec2 Z = dxy * uinvRadiiXY_Stage1;
+ float implicit = dot(Z, dxy) - 1.0;
+ float grad_dot = 4.0 * dot(Z, Z);
+ grad_dot = max(grad_dot, 9.9999997473787516e-05);
+ float approx_dist = implicit * inversesqrt(grad_dot);
+ float alpha = clamp(0.5 + approx_dist, 0.0, 1.0);
+ output_Stage1 = outputCoverage_Stage0 * alpha;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 inPosition;
+in vec4 inColor;
+in float inCoverage;
+noperspective out vec4 vcolor_Stage0;
+noperspective out float vinCoverage_Stage0;
+void main() {
+ vec4 color = inColor;
+ vcolor_Stage0 = color;
+ vec2 pos2 = inPosition;
+ vinCoverage_Stage0 = inCoverage;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1174.shader_test b/shaders/skia/1174.shader_test
new file mode 100644
index 0000000..c8513f2
--- /dev/null
+++ b/shaders/skia/1174.shader_test
@@ -0,0 +1,159 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uColor_Stage0;
+uniform vec4 ucircleData_Stage1_c0_c0_c0_c0;
+uniform vec2 uScale_Stage1_c0_c0_c1_c0;
+uniform vec4 uTexDom_Stage1_c0_c0_c1_c0;
+uniform vec3 uDecalParams_Stage1_c0_c0_c1_c0;
+uniform vec2 uScale_Stage1_c1_c0;
+uniform vec4 uTexDom_Stage1_c1_c0;
+uniform vec3 uDecalParams_Stage1_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+uniform sampler2D uTextureSampler_2_Stage1;
+uniform sampler2D uTextureSampler_3_Stage1;
+uniform sampler2D uTextureSampler_4_Stage1;
+noperspective in vec3 vDashParam_Stage0;
+noperspective in vec2 vCircleParams_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+noperspective in vec2 vTransformedCoords_3_Stage0;
+vec4 CircleBlurFragmentProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 vec = vec2((gl_FragCoord.x - ucircleData_Stage1_c0_c0_c0_c0.x) * ucircleData_Stage1_c0_c0_c0_c0.w, (gl_FragCoord.y - ucircleData_Stage1_c0_c0_c0_c0.y) * ucircleData_Stage1_c0_c0_c0_c0.w);
+ float dist = length(vec) + (0.5 - ucircleData_Stage1_c0_c0_c0_c0.z) * ucircleData_Stage1_c0_c0_c0_c0.w;
+ _output = _input * texture(uTextureSampler_0_Stage1, vec2(dist, 0.5)).w;
+ return _output;
+}
+vec4 DisplacementMap_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 dColor = texture(uTextureSampler_1_Stage1, vTransformedCoords_0_Stage0);
+ dColor.xyz = dColor.w < 9.9999999747524271e-07 ? vec3(0.0) : clamp(dColor.xyz / dColor.w, 0.0, 1.0);
+ vec2 cCoords = vTransformedCoords_1_Stage0 + uScale_Stage1_c0_c0_c1_c0 * (dColor.yz - vec2(0.5));
+ {
+ vec2 origCoord = cCoords;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c1_c0.xy, uTexDom_Stage1_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ _output = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ return _output;
+}
+float _guarded_divide(float n, float d) {
+ return n / d;
+}
+float _soft_light_component(float sc, float sa, float dc, float da) {
+ if (2.0 * sc <= sa) {
+ return (_guarded_divide((dc * dc) * (sa - 2.0 * sc), da) + (1.0 - da) * sc) + dc * ((-sa + 2.0 * sc) + 1.0);
+ } else if (4.0 * dc <= da) {
+ float DSqd = dc * dc;
+ float DCub = DSqd * dc;
+ float DaSqd = da * da;
+ float DaCub = DaSqd * da;
+ return _guarded_divide(((DaSqd * (sc - dc * ((3.0 * sa - 6.0 * sc) - 1.0)) + ((12.0 * da) * DSqd) * (sa - 2.0 * sc)) - (16.0 * DCub) * (sa - 2.0 * sc)) - DaCub * sc, DaSqd);
+ }
+ return ((dc * ((sa - 2.0 * sc) + 1.0) + sc) - sqrt(da * dc) * (sa - 2.0 * sc)) - da * sc;
+}
+vec4 blend_soft_light(vec4 src, vec4 dst) {
+ if (dst.w == 0.0) {
+ return src;
+ }
+ return vec4(_soft_light_component(src.x, src.w, dst.x, dst.w), _soft_light_component(src.y, src.w, dst.y, dst.w), _soft_light_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+}
+vec4 ComposeTwo_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_soft_light(CircleBlurFragmentProcessor_Stage1_c0_c0_c0_c0(inputColor), DisplacementMap_Stage1_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 DisplacementMap_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 dColor = texture(uTextureSampler_3_Stage1, vTransformedCoords_2_Stage0);
+ dColor.xyz = dColor.w < 9.9999999747524271e-07 ? vec3(0.0) : clamp(dColor.xyz / dColor.w, 0.0, 1.0);
+ vec2 cCoords = vTransformedCoords_3_Stage0 + uScale_Stage1_c1_c0 * (dColor.wz - vec2(0.5));
+ {
+ vec2 origCoord = cCoords;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0.xy, uTexDom_Stage1_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_4_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ _output = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ return _output;
+}
+vec4 blend_dst_out(vec4 src, vec4 dst) {
+ return (1.0 - src.w) * dst;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = uColor_Stage0;
+ float xShifted = vDashParam_Stage0.x - floor(vDashParam_Stage0.x / vDashParam_Stage0.z) * vDashParam_Stage0.z;
+ vec2 fragPosShifted = vec2(xShifted, vDashParam_Stage0.y);
+ vec2 center = vec2(vCircleParams_Stage0.y, 0.0);
+ float dist = length(center - fragPosShifted);
+ float alpha = 1.0;
+ alpha *= dist < vCircleParams_Stage0.x + 0.5 ? 1.0 : 0.0;
+ outputCoverage_Stage0 = vec4(alpha);
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_dst_out(ComposeTwo_Stage1_c0_c0(inputColor), DisplacementMap_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ sk_FragColor = output_Stage1 * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+uniform mat3 uCoordTransformMatrix_3_Stage0;
+in vec2 inPosition;
+in vec3 inDashParams;
+in vec2 inCircleParams;
+noperspective out vec3 vDashParam_Stage0;
+noperspective out vec2 vCircleParams_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+noperspective out vec2 vTransformedCoords_3_Stage0;
+void main() {
+ vDashParam_Stage0 = inDashParams;
+ vCircleParams_Stage0 = inCircleParams;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_3_Stage0 = (uCoordTransformMatrix_3_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1177.shader_test b/shaders/skia/1177.shader_test
new file mode 100644
index 0000000..df66869
--- /dev/null
+++ b/shaders/skia/1177.shader_test
@@ -0,0 +1,31 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+noperspective in vec4 vcolor_Stage0;
+void main() {
+ {
+ sk_FragColor = vec4(0.0);
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec2 inLocalCoord;
+noperspective out vec4 vcolor_Stage0;
+void main() {
+ vec4 color = inColor;
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/118-15.shader_test b/shaders/skia/118-15.shader_test
new file mode 100644
index 0000000..f8b036c
--- /dev/null
+++ b/shaders/skia/118-15.shader_test
@@ -0,0 +1,51 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform float uPixelSize_Stage2;
+uniform vec2 uRange_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = vec4(1.0, 1.0, 1.0, 1.0);
+ vec2 coord = vTransformedCoords_1_Stage0;
+ coord.x -= 5.0 * uPixelSize_Stage2;
+ for (int i = 0;i < 11; i++) {
+ output_Stage2 = min(output_Stage2, texture(uTextureSampler_0_Stage2, coord));
+ coord.x += uPixelSize_Stage2;
+ }
+ output_Stage2 *= output_Stage1;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/118-2.shader_test b/shaders/skia/118-2.shader_test
new file mode 100644
index 0000000..99b5263
--- /dev/null
+++ b/shaders/skia/118-2.shader_test
@@ -0,0 +1,165 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage2;
+uniform vec4 ucolor_Stage3_c1_c0;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.w) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ } else {
+ {
+ if (t < uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+vec4 ComposeOne_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_dst_in(_input, TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0)));
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = ComposeOne_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 ConstColorProcessor_Stage3_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage3_c1_c0;
+ }
+ return _output;
+}
+vec4 blend_dst_over(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src + dst;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 blend_darken(vec4 src, vec4 dst) {
+ vec4 result = blend_src_over(src, dst);
+ result.xyz = min(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
+ return result;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_dst_over(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ {
+ output_Stage2 = output_Stage1 * ucolor_Stage2;
+ }
+ }
+ vec4 output_Stage3;
+ {
+ output_Stage3 = blend_darken(ConstColorProcessor_Stage3_c1_c0(vec4(1.0)), output_Stage2);
+ }
+ {
+ sk_FragColor = output_Stage3;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 inColor;
+in vec2 inLocalCoord;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/118-4.shader_test b/shaders/skia/118-4.shader_test
new file mode 100644
index 0000000..d62f4ed
--- /dev/null
+++ b/shaders/skia/118-4.shader_test
@@ -0,0 +1,84 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec3 uedges_Stage1[4];
+flat in vec4 vcolor_Stage0;
+noperspective in vec4 varccoord_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ outputCoverage_Stage0 = vec4(1.0);
+ if (vec2(0.0) != varccoord_Stage0.xy) {
+ float fn = dot(varccoord_Stage0.xy, varccoord_Stage0.xy) - 1.0;
+ if (fn > 0.0) {
+ outputCoverage_Stage0 = vec4(0.0);
+ }
+ }
+ }
+ vec4 output_Stage1;
+ {
+ float alpha = 1.0;
+ float edge;
+ edge = dot(uedges_Stage1[0], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage1[1], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage1[2], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage1[3], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ output_Stage1 = outputCoverage_Stage0 * alpha;
+ }
+ {
+ sk_FragColor = outputColor_Stage0 * output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec4 radii_selector;
+in vec4 corner_and_radius_outsets;
+in vec4 skew;
+in vec2 translate;
+in vec4 radii_x;
+in vec4 radii_y;
+in vec4 color;
+flat out vec4 vcolor_Stage0;
+noperspective out vec4 varccoord_Stage0;
+void main() {
+ vcolor_Stage0 = color;
+ vec2 corner = corner_and_radius_outsets.xy;
+ vec2 radius_outset = corner_and_radius_outsets.zw;
+ vec2 radii;
+ radii.x = dot(radii_selector, radii_x);
+ radii.y = dot(radii_selector, radii_y);
+ bool is_arc_section = radii.x > 0.0;
+ radii = abs(radii);
+ vec2 vertexpos = corner + radius_outset * radii;
+ mat2 skewmatrix = mat2(skew.xy, skew.zw);
+ vec2 devcoord = vertexpos * skewmatrix + translate;
+ if (is_arc_section) {
+ varccoord_Stage0.xy = 1.0 - abs(radius_outset);
+ mat2 derivatives = inverse(skewmatrix);
+ varccoord_Stage0.zw = derivatives * (((varccoord_Stage0.xy / radii) * corner) * 2.0);
+ } else {
+ varccoord_Stage0 = vec4(0.0);
+ }
+ gl_Position = vec4(devcoord.x, devcoord.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/118-5.shader_test b/shaders/skia/118-5.shader_test
new file mode 100644
index 0000000..f558faa
--- /dev/null
+++ b/shaders/skia/118-5.shader_test
@@ -0,0 +1,79 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage2_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c1_c0;
+ }
+ return _output;
+}
+vec4 blend_src_out(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_src_out(ConstColorProcessor_Stage2_c1_c0(vec4(1.0)), output_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/118-6.shader_test b/shaders/skia/118-6.shader_test
new file mode 100644
index 0000000..2f3101a
--- /dev/null
+++ b/shaders/skia/118-6.shader_test
@@ -0,0 +1,138 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform float uSurfaceScale_Stage1;
+uniform vec3 uLightColor_Stage1;
+uniform float uKS_Stage1;
+uniform float uShininess_Stage1;
+uniform vec3 uLightDirection_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 light_Stage1(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ vec3 halfDir = normalize(surfaceToLight + vec3(0.0, 0.0, 1.0));
+ float colorScale = uKS_Stage1 * pow(dot(normal, halfDir), uShininess_Stage1);
+ vec3 color = lightColor * clamp(colorScale, 0.0, 1.0);
+ return vec4(color, max(max(color.x, color.y), color.z));
+}
+float sobel_Stage1(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage1(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage1(float m[9], float surfaceScale) {
+ return pointToNormal_Stage1(sobel_Stage1(0.0, 0.0, m[3], m[5], m[6], m[8], 0.33333298563957214), sobel_Stage1(0.0, 0.0, m[4], m[7], m[5], m[8], 0.5), surfaceScale);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ vec2 coord = vTransformedCoords_0_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp0 = textureColor;
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp1 = textureColor;
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp2 = textureColor;
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp3 = textureColor;
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp4 = textureColor;
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp5 = textureColor;
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp6 = textureColor;
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp7 = textureColor;
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp8 = textureColor;
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = uLightDirection_Stage1;
+ output_Stage1 = light_Stage1(normal_Stage1(m, uSurfaceScale_Stage1), surfaceToLight, uLightColor_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/118-7.shader_test b/shaders/skia/118-7.shader_test
new file mode 100644
index 0000000..d81ed10
--- /dev/null
+++ b/shaders/skia/118-7.shader_test
@@ -0,0 +1,98 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+uniform vec2 uDstTextureUpperLeft_Stage2;
+uniform vec2 uDstTextureCoordScale_Stage2;
+uniform sampler2D uTextureSampler_0_Stage0;
+uniform sampler2D uDstTextureSampler_Stage2;
+noperspective in vec2 vTextureCoords_Stage0;
+flat in int vTexIndex_Stage0;
+noperspective in vec4 vinColor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ t.x = fract(t.x);
+ }
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 blend_dst_atop(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src + src.w * dst;
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ vec4 texColor;
+ {
+ texColor = texture(uTextureSampler_0_Stage0, vTextureCoords_Stage0);
+ }
+ outputCoverage_Stage0 = texColor;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TiledGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ if (all(lessThanEqual(outputCoverage_Stage0.xyz, vec3(0.0)))) {
+ discard;
+ }
+ vec2 _dstTexCoord = (gl_FragCoord.xy - uDstTextureUpperLeft_Stage2) * uDstTextureCoordScale_Stage2;
+ _dstTexCoord.y = 1.0 - _dstTexCoord.y;
+ vec4 _dstColor = texture(uDstTextureSampler_Stage2, _dstTexCoord);
+ sk_FragColor = blend_dst_atop(output_Stage1, _dstColor);
+ float lerpRed = mix(_dstColor.w, sk_FragColor.w, outputCoverage_Stage0.x);
+ float lerpBlue = mix(_dstColor.w, sk_FragColor.w, outputCoverage_Stage0.y);
+ float lerpGreen = mix(_dstColor.w, sk_FragColor.w, outputCoverage_Stage0.z);
+ sk_FragColor = outputCoverage_Stage0 * sk_FragColor + (vec4(1.0) - outputCoverage_Stage0) * _dstColor;
+ sk_FragColor.w = max(max(lerpRed, lerpBlue), lerpGreen);
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform vec2 uAtlasSizeInv_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in uvec2 inTextureCoords;
+noperspective out vec2 vTextureCoords_Stage0;
+flat out int vTexIndex_Stage0;
+noperspective out vec4 vinColor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ ivec2 signedCoords = ivec2(int(inTextureCoords.x), int(inTextureCoords.y));
+ vec2 unormTexCoords = vec2(float(signedCoords.x / 2), float(signedCoords.y / 2));
+ vTextureCoords_Stage0 = unormTexCoords * uAtlasSizeInv_Stage0;
+ vTexIndex_Stage0 = 0;
+ vinColor_Stage0 = inColor;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(inPosition.x, inPosition.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/118.shader_test b/shaders/skia/118.shader_test
new file mode 100644
index 0000000..955bc1e
--- /dev/null
+++ b/shaders/skia/118.shader_test
@@ -0,0 +1,119 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform float uSrcTF_Stage1_c0_c0[7];
+uniform mat3 uColorXform_Stage1_c0_c0;
+uniform float uDstTF_Stage1_c0_c0[7];
+uniform mat4 um_Stage2;
+uniform vec4 uv_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+vec4 YUVtoRGBEffect_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 planes[1];
+ planes[0] = TextureEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ vec4 color = vec4(planes[0].y, planes[0].x, planes[0].z, planes[0].w);
+ color.xyz *= color.w;
+ _output = color;
+ return _output;
+}
+float src_tf_Stage1_c0_c0(float x) {
+ float G = uSrcTF_Stage1_c0_c0[0];
+ float A = uSrcTF_Stage1_c0_c0[1];
+ float B = uSrcTF_Stage1_c0_c0[2];
+ float C = uSrcTF_Stage1_c0_c0[3];
+ float D = uSrcTF_Stage1_c0_c0[4];
+ float E = uSrcTF_Stage1_c0_c0[5];
+ float F = uSrcTF_Stage1_c0_c0[6];
+ float s = sign(x);
+ x = abs(x);
+ x = x < D ? C * x + F : pow(A * x + B, G) + E;
+ return s * x;
+}
+float dst_tf_Stage1_c0_c0(float x) {
+ float G = uDstTF_Stage1_c0_c0[0];
+ float A = uDstTF_Stage1_c0_c0[1];
+ float B = uDstTF_Stage1_c0_c0[2];
+ float C = uDstTF_Stage1_c0_c0[3];
+ float D = uDstTF_Stage1_c0_c0[4];
+ float E = uDstTF_Stage1_c0_c0[5];
+ float F = uDstTF_Stage1_c0_c0[6];
+ float s = sign(x);
+ x = abs(x);
+ x = x < D ? C * x + F : pow(A * x + B, G) + E;
+ return s * x;
+}
+vec4 gamut_xform_Stage1_c0_c0(vec4 color) {
+ color.xyz = uColorXform_Stage1_c0_c0 * color.xyz;
+ return color;
+}
+vec4 color_xform_Stage1_c0_c0(vec4 color) {
+ float nonZeroAlpha = max(color.w, 9.9999997473787516e-05);
+ color = vec4(color.xyz / nonZeroAlpha, nonZeroAlpha);
+ color.x = src_tf_Stage1_c0_c0(color.x);
+ color.y = src_tf_Stage1_c0_c0(color.y);
+ color.z = src_tf_Stage1_c0_c0(color.z);
+ color = gamut_xform_Stage1_c0_c0(color);
+ color.x = dst_tf_Stage1_c0_c0(color.x);
+ color.y = dst_tf_Stage1_c0_c0(color.y);
+ color.z = dst_tf_Stage1_c0_c0(color.z);
+ color.xyz *= color.w;
+ return color;
+}
+vec4 ColorSpaceXform_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = color_xform_Stage1_c0_c0(YUVtoRGBEffect_Stage1_c0_c0_c0_c0(vec4(1.0))) * _input;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ColorSpaceXform_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ vec4 inputColor = output_Stage1;
+ {
+ float nonZeroAlpha = max(inputColor.w, 9.9999997473787516e-05);
+ inputColor = vec4(inputColor.xyz / nonZeroAlpha, inputColor.w);
+ }
+ output_Stage2 = um_Stage2 * inputColor + uv_Stage2;
+ {
+ output_Stage2 = clamp(output_Stage2, 0.0, 1.0);
+ }
+ {
+ output_Stage2.xyz *= output_Stage2.w;
+ }
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1180.shader_test b/shaders/skia/1180.shader_test
new file mode 100644
index 0000000..041faa4
--- /dev/null
+++ b/shaders/skia/1180.shader_test
@@ -0,0 +1,101 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_KHR_blend_equation_advanced : require
+out vec4 sk_FragColor;
+layout (blend_support_all_equations) out ;
+uniform vec4 uColor_Stage0;
+uniform vec3 uedges_Stage1_c0_c0[6];
+uniform vec4 ucolor_Stage1_c1_c0_c0_c0;
+vec4 ConvexPoly_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ float alpha = 1.0;
+ float edge;
+ edge = dot(uedges_Stage1_c0_c0[0], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage1_c0_c0[1], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage1_c0_c0[2], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage1_c0_c0[3], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage1_c0_c0[4], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage1_c0_c0[5], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ alpha = 1.0 - alpha;
+ _output = _input * alpha;
+ return _output;
+}
+vec4 ConstColorProcessor_Stage1_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage1_c1_c0_c0_c0;
+ }
+ return _output;
+}
+vec4 Big_Ole_Key_Stage1_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = _input;
+ return _output;
+}
+float _guarded_divide(float n, float d) {
+ return n / d;
+}
+float _color_burn_component(float sc, float sa, float dc, float da) {
+ if (da == dc) {
+ return (sa * da + sc * (1.0 - da)) + dc * (1.0 - sa);
+ } else if (sc == 0.0) {
+ return dc * (1.0 - sa);
+ }
+ float d = max(0.0, da - _guarded_divide((da - dc) * sa, sc));
+ return (d * sa + sc * (1.0 - da)) + dc * (1.0 - sa);
+}
+vec4 blend_color_burn(vec4 src, vec4 dst) {
+ return vec4(_color_burn_component(src.x, src.w, dst.x, dst.w), _color_burn_component(src.y, src.w, dst.y, dst.w), _color_burn_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+}
+vec4 ComposeTwo_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_color_burn(ConstColorProcessor_Stage1_c1_c0_c0_c0(inputColor), Big_Ole_Key_Stage1_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = uColor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_color_burn(ConvexPoly_Stage1_c0_c0(inputColor), ComposeTwo_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 position;
+void main() {
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_PointSize = 1.0;
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1183.shader_test b/shaders/skia/1183.shader_test
new file mode 100644
index 0000000..d78340c
--- /dev/null
+++ b/shaders/skia/1183.shader_test
@@ -0,0 +1,153 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 ucircleData_Stage1_c0_c0;
+uniform mat4 um_Stage1_c1_c0;
+uniform vec4 uv_Stage1_c1_c0;
+uniform vec4 urectH_Stage2;
+uniform float uinvSixSigma_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vEllipseOffsets_Stage0;
+noperspective in vec4 vEllipseRadii_Stage0;
+noperspective in vec4 vinColor_Stage0;
+vec4 CircleBlurFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 vec = vec2((gl_FragCoord.x - ucircleData_Stage1_c0_c0.x) * ucircleData_Stage1_c0_c0.w, (gl_FragCoord.y - ucircleData_Stage1_c0_c0.y) * ucircleData_Stage1_c0_c0.w);
+ float dist = length(vec) + (0.5 - ucircleData_Stage1_c0_c0.z) * ucircleData_Stage1_c0_c0.w;
+ _output = _input * texture(uTextureSampler_0_Stage1, vec2(dist, 0.5)).w;
+ return _output;
+}
+vec4 ColorMatrixFragmentProcessor_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = _input;
+ _output = um_Stage1_c1_c0 * inputColor + uv_Stage1_c1_c0;
+ {
+ _output.w = clamp(_output.w, 0.0, 1.0);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+float _blend_color_saturation(vec3 color) {
+ return max(max(color.x, color.y), color.z) - min(min(color.x, color.y), color.z);
+}
+vec3 _blend_set_color_saturation_helper(vec3 minMidMax, float sat) {
+ if (minMidMax.x < minMidMax.z) {
+ return vec3(0.0, (sat * (minMidMax.y - minMidMax.x)) / (minMidMax.z - minMidMax.x), sat);
+ }
+ return vec3(0.0);
+}
+vec3 _blend_set_color_saturation(vec3 hueLumColor, vec3 satColor) {
+ float sat = _blend_color_saturation(satColor);
+ if (hueLumColor.x <= hueLumColor.y) {
+ if (hueLumColor.y <= hueLumColor.z) {
+ hueLumColor.xyz = _blend_set_color_saturation_helper(hueLumColor, sat);
+ } else if (hueLumColor.x <= hueLumColor.z) {
+ hueLumColor.xzy = _blend_set_color_saturation_helper(hueLumColor.xzy, sat);
+ } else {
+ hueLumColor.zxy = _blend_set_color_saturation_helper(hueLumColor.zxy, sat);
+ }
+ } else if (hueLumColor.x <= hueLumColor.z) {
+ hueLumColor.yxz = _blend_set_color_saturation_helper(hueLumColor.yxz, sat);
+ } else if (hueLumColor.y <= hueLumColor.z) {
+ hueLumColor.yzx = _blend_set_color_saturation_helper(hueLumColor.yzx, sat);
+ } else {
+ hueLumColor.zyx = _blend_set_color_saturation_helper(hueLumColor.zyx, sat);
+ }
+ return hueLumColor;
+}
+float _blend_color_luminance(vec3 color) {
+ return dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), color);
+}
+vec3 _blend_set_color_luminance(vec3 hueSatColor, float alpha, vec3 lumColor) {
+ float lum = _blend_color_luminance(lumColor);
+ vec3 result = (lum - _blend_color_luminance(hueSatColor)) + hueSatColor;
+ float minComp = min(min(result.x, result.y), result.z);
+ float maxComp = max(max(result.x, result.y), result.z);
+ if (minComp < 0.0 && lum != minComp) {
+ result = lum + ((result - lum) * lum) / (lum - minComp);
+ }
+ if (maxComp > alpha && maxComp != lum) {
+ return lum + ((result - lum) * (alpha - lum)) / (maxComp - lum);
+ }
+ return result;
+}
+vec4 blend_hue(vec4 src, vec4 dst) {
+ float alpha = dst.w * src.w;
+ vec3 sda = src.xyz * dst.w;
+ vec3 dsa = dst.xyz * src.w;
+ return vec4((((_blend_set_color_luminance(_blend_set_color_saturation(sda, dsa), alpha, dsa) + dst.xyz) - dsa) + src.xyz) - sda, (src.w + dst.w) - alpha);
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ vec2 offset = vEllipseOffsets_Stage0;
+ offset *= vEllipseRadii_Stage0.xy;
+ float test = dot(offset, offset) - 1.0;
+ vec2 grad = (2.0 * offset) * vEllipseRadii_Stage0.xy;
+ float grad_dot = dot(grad, grad);
+ grad_dot = max(grad_dot, 1.1754999560161448e-38);
+ float invlen = inversesqrt(grad_dot);
+ float edgeAlpha = clamp(0.5 - test * invlen, 0.0, 1.0);
+ offset = vEllipseOffsets_Stage0 * vEllipseRadii_Stage0.zw;
+ test = dot(offset, offset) - 1.0;
+ grad = (2.0 * offset) * vEllipseRadii_Stage0.zw;
+ grad_dot = dot(grad, grad);
+ invlen = inversesqrt(grad_dot);
+ edgeAlpha *= clamp(0.5 + test * invlen, 0.0, 1.0);
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputCoverage_Stage0.xyz, 1.0);
+ output_Stage1 = blend_hue(CircleBlurFragmentProcessor_Stage1_c0_c0(inputColor), ColorMatrixFragmentProcessor_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputCoverage_Stage0.w;
+ }
+ vec4 output_Stage2;
+ {
+ float xCoverage, yCoverage;
+ {
+ float x, y;
+ {
+ x = max(urectH_Stage2.x - gl_FragCoord.x, gl_FragCoord.x - urectH_Stage2.z);
+ y = max(urectH_Stage2.y - gl_FragCoord.y, gl_FragCoord.y - urectH_Stage2.w);
+ }
+ xCoverage = texture(uTextureSampler_0_Stage2, vec2(x * uinvSixSigma_Stage2, 0.5)).w;
+ yCoverage = texture(uTextureSampler_0_Stage2, vec2(y * uinvSixSigma_Stage2, 0.5)).w;
+ output_Stage2 = (output_Stage1 * xCoverage) * yCoverage;
+ }
+ output_Stage2 = (output_Stage1 * xCoverage) * yCoverage;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 inPosition;
+in vec4 inColor;
+in vec2 inEllipseOffset;
+in vec4 inEllipseRadii;
+noperspective out vec2 vEllipseOffsets_Stage0;
+noperspective out vec4 vEllipseRadii_Stage0;
+noperspective out vec4 vinColor_Stage0;
+void main() {
+ vEllipseOffsets_Stage0 = inEllipseOffset;
+ vEllipseRadii_Stage0 = inEllipseRadii;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = inPosition;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1189.shader_test b/shaders/skia/1189.shader_test
new file mode 100644
index 0000000..26eeed7
--- /dev/null
+++ b/shaders/skia/1189.shader_test
@@ -0,0 +1,28 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+noperspective in vec4 vinCircleEdge_Stage0;
+noperspective in vec4 vinColor_Stage0;
+void main() {
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 inPosition;
+in vec4 inColor;
+in vec4 inCircleEdge;
+noperspective out vec4 vinCircleEdge_Stage0;
+noperspective out vec4 vinColor_Stage0;
+void main() {
+ vinCircleEdge_Stage0 = inCircleEdge;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = inPosition;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1192.shader_test b/shaders/skia/1192.shader_test
new file mode 100644
index 0000000..3c95692
--- /dev/null
+++ b/shaders/skia/1192.shader_test
@@ -0,0 +1,210 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_KHR_blend_equation_advanced : require
+out vec4 sk_FragColor;
+layout (blend_support_all_equations) out ;
+uniform vec4 urectUniform_Stage1;
+uniform vec2 ubaseFrequency_Stage2_c0_c0;
+uniform vec2 ustitchData_Stage2_c0_c0;
+uniform vec2 uScale_Stage3;
+uniform vec4 uTexDom_Stage3;
+uniform vec3 uDecalParams_Stage3;
+uniform vec4 uellipse_Stage4_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage2;
+uniform sampler2D uTextureSampler_1_Stage2;
+uniform sampler2D uTextureSampler_0_Stage3;
+uniform sampler2D uTextureSampler_1_Stage3;
+noperspective in vec2 vEllipseOffsets0_Stage0;
+noperspective in vec2 vEllipseOffsets1_Stage0;
+noperspective in vec4 vinColor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+noperspective in vec2 vTransformedCoords_3_Stage0;
+float perlinnoise_Stage2_c0_c0(float chanCoord, vec2 noiseVec, vec2 stitchData) {
+ vec4 floorVal;
+ floorVal.xy = floor(noiseVec);
+ floorVal.zw = floorVal.xy + vec2(1.0);
+ vec2 fractVal = fract(noiseVec);
+ vec2 noiseSmooth = (fractVal * fractVal) * (vec2(3.0) - vec2(2.0) * fractVal);
+ if (floorVal.x >= stitchData.x) {
+ floorVal.x -= stitchData.x;
+ }
+ if (floorVal.y >= stitchData.y) {
+ floorVal.y -= stitchData.y;
+ }
+ if (floorVal.z >= stitchData.x) {
+ floorVal.z -= stitchData.x;
+ }
+ if (floorVal.w >= stitchData.y) {
+ floorVal.w -= stitchData.y;
+ }
+ floorVal = fract(floor(mod(floorVal, 256.0)) / vec4(256.0));
+ vec2 latticeIdx;
+ latticeIdx.x = texture(uTextureSampler_0_Stage2, vec2(floorVal.x, 0.5)).x;
+ latticeIdx.y = texture(uTextureSampler_0_Stage2, vec2(floorVal.z, 0.5)).x;
+ vec4 bcoords = fract(latticeIdx.xyxy + floorVal.yyww);
+ vec2 uv;
+ vec4 lattice = texture(uTextureSampler_1_Stage2, vec2(bcoords.x, chanCoord)).zyxw;
+ uv.x = dot((lattice.yw + lattice.xz * vec2(0.00390625)) * vec2(2.0) - vec2(1.0), fractVal);
+ fractVal.x -= 1.0;
+ lattice = texture(uTextureSampler_1_Stage2, vec2(bcoords.y, chanCoord)).zyxw;
+ uv.y = dot((lattice.yw + lattice.xz * vec2(0.00390625)) * vec2(2.0) - vec2(1.0), fractVal);
+ vec2 ab;
+ ab.x = mix(uv.x, uv.y, noiseSmooth.x);
+ fractVal.y -= 1.0;
+ lattice = texture(uTextureSampler_1_Stage2, vec2(bcoords.w, chanCoord)).zyxw;
+ uv.y = dot((lattice.yw + lattice.xz * vec2(0.00390625)) * vec2(2.0) - vec2(1.0), fractVal);
+ fractVal.x += 1.0;
+ lattice = texture(uTextureSampler_1_Stage2, vec2(bcoords.z, chanCoord)).zyxw;
+ uv.x = dot((lattice.yw + lattice.xz * vec2(0.00390625)) * vec2(2.0) - vec2(1.0), fractVal);
+ ab.y = mix(uv.x, uv.y, noiseSmooth.x);
+ return mix(ab.x, ab.y, noiseSmooth.y);
+}
+vec4 PerlinNoise_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 noiseVec = floor(vTransformedCoords_0_Stage0) * ubaseFrequency_Stage2_c0_c0;
+ _output = vec4(0.0);
+ vec2 stitchData = ustitchData_Stage2_c0_c0;
+ float ratio = 1.0;
+ for (int octave = 0;octave < 9; ++octave) {
+ _output += vec4(perlinnoise_Stage2_c0_c0(0.125, noiseVec, stitchData), perlinnoise_Stage2_c0_c0(0.375, noiseVec, stitchData), perlinnoise_Stage2_c0_c0(0.625, noiseVec, stitchData), perlinnoise_Stage2_c0_c0(0.875, noiseVec, stitchData)) * ratio;
+ noiseVec *= vec2(2.0);
+ ratio *= 0.5;
+ stitchData *= vec2(2.0);
+ }
+ _output = _output * vec4(0.5) + vec4(0.5);
+ _output = clamp(_output, 0.0, 1.0);
+ _output = vec4(_output.xyz * _output.www, _output.w);
+ return _output;
+}
+vec4 EllipseEffect_Stage4_c1_c0(vec4 _input, vec2 _coords) {
+ vec4 _output;
+ vec2 d = gl_FragCoord.xy - uellipse_Stage4_c1_c0.xy;
+ vec2 Z = d * uellipse_Stage4_c1_c0.zw;
+ float implicit = dot(Z, d) - 1.0;
+ float grad_dot = 4.0 * dot(Z, Z);
+ {
+ grad_dot = max(grad_dot, 1.1754999560161448e-38);
+ }
+ float approx_dist = implicit * inversesqrt(grad_dot);
+ float alpha;
+ {
+ alpha = approx_dist > 0.0 ? 0.0 : 1.0;
+ }
+ _output = _input * alpha;
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vinColor_Stage0;
+ vec2 duvdx = dFdx(vEllipseOffsets0_Stage0);
+ vec2 duvdy = dFdy(vEllipseOffsets0_Stage0);
+ vec2 grad = vec2(vEllipseOffsets0_Stage0.x * duvdx.x + vEllipseOffsets0_Stage0.y * duvdx.y, vEllipseOffsets0_Stage0.x * duvdy.x + vEllipseOffsets0_Stage0.y * duvdy.y);
+ float grad_dot = 4.0 * dot(grad, grad);
+ grad_dot = max(grad_dot, 1.1754999560161448e-38);
+ }
+ vec4 output_Stage1;
+ {
+ float alpha;
+ {
+ float xSub, ySub;
+ xSub = min(gl_FragCoord.x - urectUniform_Stage1.x, 0.0);
+ xSub += min(urectUniform_Stage1.z - gl_FragCoord.x, 0.0);
+ ySub = min(gl_FragCoord.y - urectUniform_Stage1.y, 0.0);
+ ySub += min(urectUniform_Stage1.w - gl_FragCoord.y, 0.0);
+ alpha = (1.0 + max(xSub, -1.0)) * (1.0 + max(ySub, -1.0));
+ }
+ {
+ alpha = 1.0 - alpha;
+ }
+ output_Stage1 = outputColor_Stage0 * alpha;
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_dst_in(output_Stage1, PerlinNoise_Stage2_c0_c0(vec4(1.0)));
+ }
+ vec4 output_Stage3;
+ {
+ vec4 dColor = texture(uTextureSampler_0_Stage3, vTransformedCoords_1_Stage0);
+ dColor.xyz = dColor.w < 9.9999999747524271e-07 ? vec3(0.0) : clamp(dColor.xyz / dColor.w, 0.0, 1.0);
+ vec2 cCoords = vTransformedCoords_2_Stage0 + uScale_Stage3 * (dColor.ww - vec2(0.5));
+ {
+ vec2 origCoord = cCoords;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage3.xy, uTexDom_Stage3.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage3, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage3.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage3.y);
+ if (err > uDecalParams_Stage3.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage3.z < 1.0) {
+ err = 0.0;
+ }
+ output_Stage3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ }
+ vec4 output_Stage4;
+ {
+ output_Stage4 = EllipseEffect_Stage4_c1_c0(output_Stage3, gl_FragCoord.xy);
+ }
+ vec4 output_Stage5;
+ {
+ output_Stage5 = output_Stage4;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_3_Stage0.x);
+ uint y = uint(vTransformedCoords_3_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ output_Stage5 = vec4(clamp(output_Stage5.xyz + value * 0.066666670143604279, 0.0, output_Stage5.w), output_Stage5.w);
+ }
+ {
+ sk_FragColor = output_Stage5 * output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+uniform mat3 uCoordTransformMatrix_3_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec2 inEllipseOffsets0;
+in vec2 inEllipseOffsets1;
+noperspective out vec2 vEllipseOffsets0_Stage0;
+noperspective out vec2 vEllipseOffsets1_Stage0;
+noperspective out vec4 vinColor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+noperspective out vec2 vTransformedCoords_3_Stage0;
+void main() {
+ vEllipseOffsets0_Stage0 = inEllipseOffsets0;
+ vEllipseOffsets1_Stage0 = inEllipseOffsets1;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = (uViewM_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_3_Stage0 = (uCoordTransformMatrix_3_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1195.shader_test b/shaders/skia/1195.shader_test
new file mode 100644
index 0000000..ad33781
--- /dev/null
+++ b/shaders/skia/1195.shader_test
@@ -0,0 +1,27 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+flat in vec4 vcolor_Stage0;
+void main() {
+ {
+ sk_FragColor = 1.0 - vec4(1.0);
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 position;
+in vec4 color;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1198.shader_test b/shaders/skia/1198.shader_test
new file mode 100644
index 0000000..39aa156
--- /dev/null
+++ b/shaders/skia/1198.shader_test
@@ -0,0 +1,105 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 ucircleData_Stage1;
+uniform vec4 urectUniform_Stage2_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec4 vcolor_Stage0;
+noperspective in float vinCoverage_Stage0;
+vec4 AARectEffect_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ float alpha;
+ {
+ float xSub, ySub;
+ xSub = min(gl_FragCoord.x - urectUniform_Stage2_c0_c0.x, 0.0);
+ xSub += min(urectUniform_Stage2_c0_c0.z - gl_FragCoord.x, 0.0);
+ ySub = min(gl_FragCoord.y - urectUniform_Stage2_c0_c0.y, 0.0);
+ ySub += min(urectUniform_Stage2_c0_c0.w - gl_FragCoord.y, 0.0);
+ alpha = (1.0 + max(xSub, -1.0)) * (1.0 + max(ySub, -1.0));
+ }
+ {
+ alpha = 1.0 - alpha;
+ }
+ _output = _input * alpha;
+ return _output;
+}
+vec4 ConfigConversionEffect_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = floor(_input * 255.0 + 0.5) / 255.0;
+ {
+ _output.xyz = floor((_output.xyz * _output.w) * 255.0 + 0.5) / 255.0;
+ }
+ return _output;
+}
+float _blend_color_luminance(vec3 color) {
+ return dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), color);
+}
+vec3 _blend_set_color_luminance(vec3 hueSatColor, float alpha, vec3 lumColor) {
+ float lum = _blend_color_luminance(lumColor);
+ vec3 result = (lum - _blend_color_luminance(hueSatColor)) + hueSatColor;
+ float minComp = min(min(result.x, result.y), result.z);
+ float maxComp = max(max(result.x, result.y), result.z);
+ if (minComp < 0.0 && lum != minComp) {
+ result = lum + ((result - lum) * lum) / (lum - minComp);
+ }
+ if (maxComp > alpha && maxComp != lum) {
+ return lum + ((result - lum) * (alpha - lum)) / (maxComp - lum);
+ }
+ return result;
+}
+vec4 blend_luminosity(vec4 src, vec4 dst) {
+ float alpha = dst.w * src.w;
+ vec3 sda = src.xyz * dst.w;
+ vec3 dsa = dst.xyz * src.w;
+ return vec4((((_blend_set_color_luminance(dsa, alpha, sda) + dst.xyz) - dsa) + src.xyz) - sda, (src.w + dst.w) - alpha);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ float alpha = 1.0;
+ alpha = vinCoverage_Stage0;
+ outputCoverage_Stage0 = vec4(alpha);
+ }
+ vec4 output_Stage1;
+ {
+ vec2 vec = vec2((gl_FragCoord.x - ucircleData_Stage1.x) * ucircleData_Stage1.w, (gl_FragCoord.y - ucircleData_Stage1.y) * ucircleData_Stage1.w);
+ float dist = length(vec) + (0.5 - ucircleData_Stage1.z) * ucircleData_Stage1.w;
+ output_Stage1 = outputColor_Stage0 * texture(uTextureSampler_0_Stage1, vec2(dist, 0.5)).w;
+ }
+ vec4 output_Stage2;
+ {
+ vec4 inputColor = vec4(outputCoverage_Stage0.xyz, 1.0);
+ output_Stage2 = blend_luminosity(AARectEffect_Stage2_c0_c0(inputColor), ConfigConversionEffect_Stage2_c1_c0(inputColor));
+ output_Stage2 *= outputCoverage_Stage0.w;
+ }
+ {
+ sk_FragColor = (vec4(1.0) - output_Stage1) * output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 inPosition;
+in vec4 inColor;
+in float inCoverage;
+noperspective out vec4 vcolor_Stage0;
+noperspective out float vinCoverage_Stage0;
+void main() {
+ vec4 color = inColor;
+ vcolor_Stage0 = color;
+ vec2 pos2 = inPosition;
+ vinCoverage_Stage0 = inCoverage;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1204.shader_test b/shaders/skia/1204.shader_test
new file mode 100644
index 0000000..ecd7f99
--- /dev/null
+++ b/shaders/skia/1204.shader_test
@@ -0,0 +1,366 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1_c0_c0_c0_c0;
+uniform float uSurfaceScale_Stage1_c0_c0_c0_c0;
+uniform vec3 uLightColor_Stage1_c0_c0_c0_c0;
+uniform float uKS_Stage1_c0_c0_c0_c0;
+uniform float uShininess_Stage1_c0_c0_c0_c0;
+uniform vec4 uTexDom_Stage1_c0_c0_c0_c0;
+uniform vec3 uDecalParams_Stage1_c0_c0_c0_c0;
+uniform vec3 uLightLocation_Stage1_c0_c0_c0_c0;
+uniform vec4 uboundsUniform_Stage1_c0_c0_c1_c0_c0_c0;
+uniform float uxInvZoom_Stage1_c0_c0_c1_c0_c0_c0;
+uniform float uyInvZoom_Stage1_c0_c0_c1_c0_c0_c0;
+uniform float uxInvInset_Stage1_c0_c0_c1_c0_c0_c0;
+uniform float uyInvInset_Stage1_c0_c0_c1_c0_c0_c0;
+uniform vec2 uoffset_Stage1_c0_c0_c1_c0_c0_c0;
+uniform vec4 urectH_Stage1_c1_c0_c0_c0_c1_c0;
+uniform float uinvSixSigma_Stage1_c1_c0_c0_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+uniform sampler2D uTextureSampler_2_Stage1;
+uniform sampler2D uTextureSampler_3_Stage1;
+uniform sampler2D uTextureSampler_4_Stage1;
+uniform sampler2D uTextureSampler_5_Stage1;
+noperspective in vec4 vinCircleEdge_Stage0;
+noperspective in vec3 vinClipPlane_Stage0;
+noperspective in vec4 vinColor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+noperspective in vec2 vTransformedCoords_3_Stage0;
+noperspective in vec3 vTransformedCoords_4_Stage0;
+vec4 light_Stage1_c0_c0_c0_c0(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ vec3 halfDir = normalize(surfaceToLight + vec3(0.0, 0.0, 1.0));
+ float colorScale = uKS_Stage1_c0_c0_c0_c0 * pow(dot(normal, halfDir), uShininess_Stage1_c0_c0_c0_c0);
+ vec3 color = lightColor * clamp(colorScale, 0.0, 1.0);
+ return vec4(color, max(max(color.x, color.y), color.z));
+}
+float sobel_Stage1_c0_c0_c0_c0(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage1_c0_c0_c0_c0(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage1_c0_c0_c0_c0(float m[9], float surfaceScale) {
+ return pointToNormal_Stage1_c0_c0_c0_c0(sobel_Stage1_c0_c0_c0_c0(m[0], m[2], m[3], m[5], 0.0, 0.0, 0.33333298563957214), sobel_Stage1_c0_c0_c0_c0(m[0], m[3], m[1], m[4], m[2], m[5], 0.5), surfaceScale);
+}
+vec4 SpecularLighting_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coord = vTransformedCoords_0_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage1_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp0 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage1_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp5 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage1_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp6 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage1_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp7 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage1_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp8 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = normalize(uLightLocation_Stage1_c0_c0_c0_c0 - vec3(gl_FragCoord.xy, uSurfaceScale_Stage1_c0_c0_c0_c0 * m[4]));
+ _output = light_Stage1_c0_c0_c0_c0(normal_Stage1_c0_c0_c0_c0(m, uSurfaceScale_Stage1_c0_c0_c0_c0), surfaceToLight, uLightColor_Stage1_c0_c0_c0_c0);
+ _output *= _input;
+ return _output;
+}
+vec4 MagnifierEffect_Stage1_c0_c0_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coord = vTransformedCoords_1_Stage0;
+ vec2 zoom_coord = uoffset_Stage1_c0_c0_c1_c0_c0_c0 + coord * vec2(uxInvZoom_Stage1_c0_c0_c1_c0_c0_c0, uyInvZoom_Stage1_c0_c0_c1_c0_c0_c0);
+ vec2 delta = (coord - uboundsUniform_Stage1_c0_c0_c1_c0_c0_c0.xy) * uboundsUniform_Stage1_c0_c0_c1_c0_c0_c0.zw;
+ delta = min(delta, vec2(1.0, 1.0) - delta);
+ delta *= vec2(uxInvInset_Stage1_c0_c0_c1_c0_c0_c0, uyInvInset_Stage1_c0_c0_c1_c0_c0_c0);
+ float weight = 0.0;
+ if (delta.x < 2.0 && delta.y < 2.0) {
+ delta = vec2(2.0, 2.0) - delta;
+ float dist = length(delta);
+ dist = max(2.0 - dist, 0.0);
+ weight = min(dist * dist, 1.0);
+ } else {
+ vec2 delta_squared = delta * delta;
+ weight = min(min(delta_squared.x, delta_squared.y), 1.0);
+ }
+ _output = texture(uTextureSampler_1_Stage1, mix(coord, zoom_coord, weight));
+ return _output;
+}
+vec4 TextureEffect_Stage1_c0_c0_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_2_Stage1, vTransformedCoords_2_Stage0) * _input;
+ return _output;
+}
+vec4 blend_src_atop(vec4 src, vec4 dst) {
+ return dst.w * src + (1.0 - src.w) * dst;
+}
+vec4 ComposeTwo_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_src_atop(MagnifierEffect_Stage1_c0_c0_c1_c0_c0_c0(inputColor), TextureEffect_Stage1_c0_c0_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 blend_modulate(vec4 src, vec4 dst) {
+ return src * dst;
+}
+vec4 ComposeTwo_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_modulate(SpecularLighting_Stage1_c0_c0_c0_c0(inputColor), ComposeTwo_Stage1_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c1_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_3_Stage1, vTransformedCoords_3_Stage0) * _input;
+ return _output;
+}
+vec4 RectBlurEffect_Stage1_c1_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float xCoverage, yCoverage;
+ {
+ float x, y;
+ {
+ x = max(urectH_Stage1_c1_c0_c0_c0_c1_c0.x - gl_FragCoord.x, gl_FragCoord.x - urectH_Stage1_c1_c0_c0_c0_c1_c0.z);
+ y = max(urectH_Stage1_c1_c0_c0_c0_c1_c0.y - gl_FragCoord.y, gl_FragCoord.y - urectH_Stage1_c1_c0_c0_c0_c1_c0.w);
+ }
+ xCoverage = texture(uTextureSampler_4_Stage1, vec2(x * uinvSixSigma_Stage1_c1_c0_c0_c0_c1_c0, 0.5)).w;
+ yCoverage = texture(uTextureSampler_4_Stage1, vec2(y * uinvSixSigma_Stage1_c1_c0_c0_c0_c1_c0, 0.5)).w;
+ _output = (_input * xCoverage) * yCoverage;
+ }
+ _output = (_input * xCoverage) * yCoverage;
+ return _output;
+}
+vec4 blend_exclusion(vec4 src, vec4 dst) {
+ return vec4((dst.xyz + src.xyz) - (2.0 * dst.xyz) * src.xyz, src.w + (1.0 - src.w) * dst.w);
+}
+vec4 ComposeTwo_Stage1_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_exclusion(TextureEffect_Stage1_c1_c0_c0_c0_c0_c0(inputColor), RectBlurEffect_Stage1_c1_c0_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = textureProj(uTextureSampler_5_Stage1, vTransformedCoords_4_Stage0) * _input;
+ return _output;
+}
+vec4 ComposeTwo_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_src_atop(ComposeTwo_Stage1_c1_c0_c0_c0(inputColor), TextureEffect_Stage1_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+float _guarded_divide(float n, float d) {
+ return n / d;
+}
+float _color_dodge_component(float sc, float sa, float dc, float da) {
+ if (dc == 0.0) {
+ return sc * (1.0 - da);
+ } else {
+ float d = sa - sc;
+ if (d == 0.0) {
+ return (sa * da + sc * (1.0 - da)) + dc * (1.0 - sa);
+ }
+ d = min(da, _guarded_divide(dc * sa, d));
+ return (d * sa + sc * (1.0 - da)) + dc * (1.0 - sa);
+ }
+}
+vec4 blend_color_dodge(vec4 src, vec4 dst) {
+ return vec4(_color_dodge_component(src.x, src.w, dst.x, dst.w), _color_dodge_component(src.y, src.w, dst.y, dst.w), _color_dodge_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ vec4 circleEdge;
+ circleEdge = vinCircleEdge_Stage0;
+ vec3 clipPlane;
+ clipPlane = vinClipPlane_Stage0;
+ outputColor_Stage0 = vinColor_Stage0;
+ float d = length(circleEdge.xy);
+ float distanceToOuterEdge = circleEdge.z * (1.0 - d);
+ float edgeAlpha = clamp(distanceToOuterEdge, 0.0, 1.0);
+ float clip = clamp(circleEdge.z * dot(circleEdge.xy, clipPlane.xy) + clipPlane.z, 0.0, 1.0);
+ edgeAlpha *= clip;
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_color_dodge(ComposeTwo_Stage1_c0_c0(inputColor), ComposeTwo_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ sk_FragColor = output_Stage1 * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+uniform mat3 uCoordTransformMatrix_3_Stage0;
+uniform mat3 uCoordTransformMatrix_4_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec4 inCircleEdge;
+in vec3 inClipPlane;
+noperspective out vec4 vinCircleEdge_Stage0;
+noperspective out vec3 vinClipPlane_Stage0;
+noperspective out vec4 vinColor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+noperspective out vec2 vTransformedCoords_3_Stage0;
+noperspective out vec3 vTransformedCoords_4_Stage0;
+void main() {
+ vinCircleEdge_Stage0 = inCircleEdge;
+ vinClipPlane_Stage0 = inClipPlane;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_3_Stage0 = (uCoordTransformMatrix_3_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_4_Stage0 = uCoordTransformMatrix_4_Stage0 * vec3(inPosition, 1.0);
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1207.shader_test b/shaders/skia/1207.shader_test
new file mode 100644
index 0000000..84cd895
--- /dev/null
+++ b/shaders/skia/1207.shader_test
@@ -0,0 +1,75 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+noperspective in vec4 vcolor_Stage0;
+void main() {
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform float uSrcTF_Stage0[7];
+uniform mat3 uColorXform_Stage0;
+uniform float uDstTF_Stage0[7];
+uniform mat3 uViewM_Stage0;
+in vec2 position;
+in vec4 inColor;
+noperspective out vec4 vcolor_Stage0;
+float src_tf_Stage0(float x) {
+ float G = uSrcTF_Stage0[0];
+ float A = uSrcTF_Stage0[1];
+ float B = uSrcTF_Stage0[2];
+ float C = uSrcTF_Stage0[3];
+ float D = uSrcTF_Stage0[4];
+ float E = uSrcTF_Stage0[5];
+ float F = uSrcTF_Stage0[6];
+ float s = sign(x);
+ x = abs(x);
+ x = x < D ? C * x + F : pow(A * x + B, G) + E;
+ return s * x;
+}
+float dst_tf_Stage0(float x) {
+ float G = uDstTF_Stage0[0];
+ float A = uDstTF_Stage0[1];
+ float B = uDstTF_Stage0[2];
+ float C = uDstTF_Stage0[3];
+ float D = uDstTF_Stage0[4];
+ float E = uDstTF_Stage0[5];
+ float F = uDstTF_Stage0[6];
+ float s = sign(x);
+ x = abs(x);
+ x = x < D ? C * x + F : pow(A * x + B, G) + E;
+ return s * x;
+}
+vec4 gamut_xform_Stage0(vec4 color) {
+ color.xyz = uColorXform_Stage0 * color.xyz;
+ return color;
+}
+vec4 color_xform_Stage0(vec4 color) {
+ float nonZeroAlpha = max(color.w, 9.9999997473787516e-05);
+ color = vec4(color.xyz / nonZeroAlpha, nonZeroAlpha);
+ color.x = src_tf_Stage0(color.x);
+ color.y = src_tf_Stage0(color.y);
+ color.z = src_tf_Stage0(color.z);
+ color = gamut_xform_Stage0(color);
+ color.x = dst_tf_Stage0(color.x);
+ color.y = dst_tf_Stage0(color.y);
+ color.z = dst_tf_Stage0(color.z);
+ color.xyz *= color.w;
+ return color;
+}
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = color_xform_Stage0(color);
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/121-14.shader_test b/shaders/skia/121-14.shader_test
new file mode 100644
index 0000000..50540cb
--- /dev/null
+++ b/shaders/skia/121-14.shader_test
@@ -0,0 +1,215 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform mat4 um_Stage1;
+uniform vec4 uv_Stage1;
+uniform vec2 ufocalParams_Stage2_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage2_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage2_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage2_c0_c0_c1_c0;
+uniform vec2 uImageIncrement_Stage4_c1_c0;
+uniform vec2 uBounds_Stage4_c1_c0;
+uniform vec4 uKernel_Stage4_c1_c0[2];
+uniform sampler2D uTextureSampler_0_Stage4;
+noperspective in vec2 vEllipseOffsets0_Stage0;
+noperspective in vec2 vEllipseOffsets1_Stage0;
+noperspective in vec4 vinColor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage2_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_0_Stage0;
+ float t = -1.0;
+ float v = 1.0;
+ {
+ {
+ float r0_2 = ufocalParams_Stage2_c0_c0_c0_c0.y;
+ t = r0_2 - p.y * p.y;
+ if (t >= 0.0) {
+ t = p.x + sqrt(t);
+ } else {
+ v = -1.0;
+ }
+ }
+ }
+ _output = vec4(t, v, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage2_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage2_c0_c0_c1_c0;
+ bias = ubias0_1_Stage2_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage2_c0_c0_c1_c0;
+ bias = ubias2_3_Stage2_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage2_c0_c0_c1_c0;
+ bias = ubias4_5_Stage2_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage2_c0_c0_c1_c0;
+ bias = ubias6_7_Stage2_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage2_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else {
+ {
+ t.x = fract(t.x);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage2_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 GaussianConvolution_Stage4_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_1_Stage0 - 3.0 * uImageIncrement_Stage4_c1_c0;
+ vec2 coordSampled = vec2(0.0, 0.0);
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage4_c1_c0.x, uBounds_Stage4_c1_c0.y - uBounds_Stage4_c1_c0.x) + uBounds_Stage4_c1_c0.x;
+ _output += texture(uTextureSampler_0_Stage4, coordSampled) * uKernel_Stage4_c1_c0[0].x;
+ coord += uImageIncrement_Stage4_c1_c0;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage4_c1_c0.x, uBounds_Stage4_c1_c0.y - uBounds_Stage4_c1_c0.x) + uBounds_Stage4_c1_c0.x;
+ _output += texture(uTextureSampler_0_Stage4, coordSampled) * uKernel_Stage4_c1_c0[0].y;
+ coord += uImageIncrement_Stage4_c1_c0;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage4_c1_c0.x, uBounds_Stage4_c1_c0.y - uBounds_Stage4_c1_c0.x) + uBounds_Stage4_c1_c0.x;
+ _output += texture(uTextureSampler_0_Stage4, coordSampled) * uKernel_Stage4_c1_c0[0].z;
+ coord += uImageIncrement_Stage4_c1_c0;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage4_c1_c0.x, uBounds_Stage4_c1_c0.y - uBounds_Stage4_c1_c0.x) + uBounds_Stage4_c1_c0.x;
+ _output += texture(uTextureSampler_0_Stage4, coordSampled) * uKernel_Stage4_c1_c0[0].w;
+ coord += uImageIncrement_Stage4_c1_c0;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage4_c1_c0.x, uBounds_Stage4_c1_c0.y - uBounds_Stage4_c1_c0.x) + uBounds_Stage4_c1_c0.x;
+ _output += texture(uTextureSampler_0_Stage4, coordSampled) * uKernel_Stage4_c1_c0[1].x;
+ coord += uImageIncrement_Stage4_c1_c0;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage4_c1_c0.x, uBounds_Stage4_c1_c0.y - uBounds_Stage4_c1_c0.x) + uBounds_Stage4_c1_c0.x;
+ _output += texture(uTextureSampler_0_Stage4, coordSampled) * uKernel_Stage4_c1_c0[1].y;
+ coord += uImageIncrement_Stage4_c1_c0;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage4_c1_c0.x, uBounds_Stage4_c1_c0.y - uBounds_Stage4_c1_c0.x) + uBounds_Stage4_c1_c0.x;
+ _output += texture(uTextureSampler_0_Stage4, coordSampled) * uKernel_Stage4_c1_c0[1].z;
+ coord += uImageIncrement_Stage4_c1_c0;
+ _output *= _input;
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+float _blend_overlay_component(float sc, float sa, float dc, float da) {
+ if (2.0 * dc <= da) {
+ return (2.0 * sc) * dc;
+ }
+ return sa * da - (2.0 * (da - dc)) * (sa - sc);
+}
+vec4 blend_overlay(vec4 src, vec4 dst) {
+ vec4 result = vec4(_blend_overlay_component(src.x, src.w, dst.x, dst.w), _blend_overlay_component(src.y, src.w, dst.y, dst.w), _blend_overlay_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+ result.xyz += dst.xyz * (1.0 - src.w) + src.xyz * (1.0 - dst.w);
+ return result;
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ vec2 scaledOffset = vEllipseOffsets0_Stage0;
+ float test = dot(scaledOffset, scaledOffset) - 1.0;
+ vec2 duvdx = dFdx(vEllipseOffsets0_Stage0);
+ vec2 duvdy = -dFdy(vEllipseOffsets0_Stage0);
+ vec2 grad = vec2(vEllipseOffsets0_Stage0.x * duvdx.x + vEllipseOffsets0_Stage0.y * duvdx.y, vEllipseOffsets0_Stage0.x * duvdy.x + vEllipseOffsets0_Stage0.y * duvdy.y);
+ float grad_dot = 4.0 * dot(grad, grad);
+ grad_dot = max(grad_dot, 1.1754999560161448e-38);
+ float invlen = inversesqrt(grad_dot);
+ float edgeAlpha = clamp(0.5 - test * invlen, 0.0, 1.0);
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = outputCoverage_Stage0;
+ {
+ float nonZeroAlpha = max(inputColor.w, 9.9999997473787516e-05);
+ inputColor = vec4(inputColor.xyz / nonZeroAlpha, inputColor.w);
+ }
+ output_Stage1 = um_Stage1 * inputColor + uv_Stage1;
+ {
+ output_Stage1.w = clamp(output_Stage1.w, 0.0, 1.0);
+ }
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_dst_in(output_Stage1, TiledGradientEffect_Stage2_c0_c0(vec4(1.0)));
+ }
+ vec4 output_Stage3;
+ {
+ output_Stage3 = floor(output_Stage2 * 255.0 + 0.5) / 255.0;
+ {
+ output_Stage3.xyz = output_Stage3.w <= 0.0 ? vec3(0.0) : floor((output_Stage3.xyz / output_Stage3.w) * 255.0 + 0.5) / 255.0;
+ }
+ }
+ {
+ blend_overlay(GaussianConvolution_Stage4_c1_c0(vec4(1.0)), output_Stage3);
+ }
+ {
+ sk_FragColor = vec4(0.0);
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec2 inEllipseOffsets0;
+in vec2 inEllipseOffsets1;
+noperspective out vec2 vEllipseOffsets0_Stage0;
+noperspective out vec2 vEllipseOffsets1_Stage0;
+noperspective out vec4 vinColor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vEllipseOffsets0_Stage0 = inEllipseOffsets0;
+ vEllipseOffsets1_Stage0 = inEllipseOffsets1;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = (uViewM_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/121-15.shader_test b/shaders/skia/121-15.shader_test
new file mode 100644
index 0000000..5bfabc1
--- /dev/null
+++ b/shaders/skia/121-15.shader_test
@@ -0,0 +1,51 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform float uPixelSize_Stage2;
+uniform vec2 uRange_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = vec4(1.0, 1.0, 1.0, 1.0);
+ vec2 coord = vTransformedCoords_1_Stage0;
+ coord.x -= 6.0 * uPixelSize_Stage2;
+ for (int i = 0;i < 13; i++) {
+ output_Stage2 = min(output_Stage2, texture(uTextureSampler_0_Stage2, coord));
+ coord.x += uPixelSize_Stage2;
+ }
+ output_Stage2 *= output_Stage1;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/121-16.shader_test b/shaders/skia/121-16.shader_test
new file mode 100644
index 0000000..36811ad
--- /dev/null
+++ b/shaders/skia/121-16.shader_test
@@ -0,0 +1,49 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec3 uedges_Stage2[2];
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ float alpha = 1.0;
+ float edge;
+ edge = dot(uedges_Stage2[0], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage2[1], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ alpha = 1.0 - alpha;
+ output_Stage2 = output_Stage1 * alpha;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/121-2.shader_test b/shaders/skia/121-2.shader_test
new file mode 100644
index 0000000..a279a21
--- /dev/null
+++ b/shaders/skia/121-2.shader_test
@@ -0,0 +1,88 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 ucolor_Stage1_c0_c0_c0_c0;
+uniform vec4 ucolor_Stage2;
+uniform vec4 ucolor_Stage3_c1_c0;
+noperspective in vec4 vcolor_Stage0;
+vec4 ConstColorProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = _input.w * ucolor_Stage1_c0_c0_c0_c0;
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = ConstColorProcessor_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 ConstColorProcessor_Stage3_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage3_c1_c0;
+ }
+ return _output;
+}
+vec4 blend_dst_over(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src + dst;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 blend_darken(vec4 src, vec4 dst) {
+ vec4 result = blend_src_over(src, dst);
+ result.xyz = min(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
+ return result;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_dst_over(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ {
+ output_Stage2 = output_Stage1 * ucolor_Stage2;
+ }
+ }
+ vec4 output_Stage3;
+ {
+ output_Stage3 = blend_darken(ConstColorProcessor_Stage3_c1_c0(vec4(1.0)), output_Stage2);
+ }
+ {
+ sk_FragColor = output_Stage3;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 position;
+in vec4 inColor;
+noperspective out vec4 vcolor_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/121-4.shader_test b/shaders/skia/121-4.shader_test
new file mode 100644
index 0000000..2bcfdf4
--- /dev/null
+++ b/shaders/skia/121-4.shader_test
@@ -0,0 +1,51 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+flat in vec4 vcolor_Stage0;
+in float vcoverage_Stage0;
+flat in vec4 vgeomDomain_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ float coverage = vcoverage_Stage0 * gl_FragCoord.w;
+ vec4 geoDomain;
+ geoDomain = vgeomDomain_Stage0;
+ if (coverage < 0.5) {
+ vec4 dists4 = clamp(vec4(1.0, 1.0, -1.0, -1.0) * (gl_FragCoord.xyxy - geoDomain), 0.0, 1.0);
+ vec2 dists2 = dists4.xy * dists4.zw;
+ coverage = min(coverage, dists2.x * dists2.y);
+ }
+ outputCoverage_Stage0 = vec4(coverage);
+ }
+ {
+ sk_FragColor = outputColor_Stage0 * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec4 positionWithCoverage;
+in vec4 color;
+in vec4 geomDomain;
+flat out vec4 vcolor_Stage0;
+out float vcoverage_Stage0;
+flat out vec4 vgeomDomain_Stage0;
+void main() {
+ vec3 position = positionWithCoverage.xyz;
+ vcolor_Stage0 = color;
+ vcoverage_Stage0 = positionWithCoverage.w * positionWithCoverage.z;
+ vgeomDomain_Stage0 = geomDomain;
+ gl_Position = vec4(position.x, position.y, 0.0, position.z);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/121-5.shader_test b/shaders/skia/121-5.shader_test
new file mode 100644
index 0000000..d0cf823
--- /dev/null
+++ b/shaders/skia/121-5.shader_test
@@ -0,0 +1,89 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage2_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c1_c0;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+vec4 blend_src_out(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_dst_in(outputColor_Stage0, ClampedGradientEffect_Stage1_c0_c0(vec4(1.0)));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_src_out(ConstColorProcessor_Stage2_c1_c0(vec4(1.0)), output_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/121-6.shader_test b/shaders/skia/121-6.shader_test
new file mode 100644
index 0000000..742323c
--- /dev/null
+++ b/shaders/skia/121-6.shader_test
@@ -0,0 +1,138 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform float uSurfaceScale_Stage1;
+uniform vec3 uLightColor_Stage1;
+uniform float uKS_Stage1;
+uniform float uShininess_Stage1;
+uniform vec3 uLightDirection_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 light_Stage1(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ vec3 halfDir = normalize(surfaceToLight + vec3(0.0, 0.0, 1.0));
+ float colorScale = uKS_Stage1 * pow(dot(normal, halfDir), uShininess_Stage1);
+ vec3 color = lightColor * clamp(colorScale, 0.0, 1.0);
+ return vec4(color, max(max(color.x, color.y), color.z));
+}
+float sobel_Stage1(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage1(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage1(float m[9], float surfaceScale) {
+ return pointToNormal_Stage1(sobel_Stage1(0.0, 0.0, m[3], m[4], m[6], m[7], 0.66666698455810547), sobel_Stage1(m[3], m[6], m[4], m[7], 0.0, 0.0, 0.66666698455810547), surfaceScale);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ vec2 coord = vTransformedCoords_0_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp0 = textureColor;
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp1 = textureColor;
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp2 = textureColor;
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp3 = textureColor;
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp4 = textureColor;
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp5 = textureColor;
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp6 = textureColor;
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp7 = textureColor;
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp8 = textureColor;
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = uLightDirection_Stage1;
+ output_Stage1 = light_Stage1(normal_Stage1(m, uSurfaceScale_Stage1), surfaceToLight, uLightColor_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/121-7.shader_test b/shaders/skia/121-7.shader_test
new file mode 100644
index 0000000..2c104e0
--- /dev/null
+++ b/shaders/skia/121-7.shader_test
@@ -0,0 +1,98 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+uniform vec2 uDstTextureUpperLeft_Stage2;
+uniform vec2 uDstTextureCoordScale_Stage2;
+uniform sampler2D uTextureSampler_0_Stage0;
+uniform sampler2D uDstTextureSampler_Stage2;
+noperspective in vec2 vTextureCoords_Stage0;
+flat in int vTexIndex_Stage0;
+noperspective in vec4 vinColor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ t.x = fract(t.x);
+ }
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 blend_xor(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src + (1.0 - src.w) * dst;
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ vec4 texColor;
+ {
+ texColor = texture(uTextureSampler_0_Stage0, vTextureCoords_Stage0);
+ }
+ outputCoverage_Stage0 = texColor;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TiledGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ if (all(lessThanEqual(outputCoverage_Stage0.xyz, vec3(0.0)))) {
+ discard;
+ }
+ vec2 _dstTexCoord = (gl_FragCoord.xy - uDstTextureUpperLeft_Stage2) * uDstTextureCoordScale_Stage2;
+ _dstTexCoord.y = 1.0 - _dstTexCoord.y;
+ vec4 _dstColor = texture(uDstTextureSampler_Stage2, _dstTexCoord);
+ sk_FragColor = blend_xor(output_Stage1, _dstColor);
+ float lerpRed = mix(_dstColor.w, sk_FragColor.w, outputCoverage_Stage0.x);
+ float lerpBlue = mix(_dstColor.w, sk_FragColor.w, outputCoverage_Stage0.y);
+ float lerpGreen = mix(_dstColor.w, sk_FragColor.w, outputCoverage_Stage0.z);
+ sk_FragColor = outputCoverage_Stage0 * sk_FragColor + (vec4(1.0) - outputCoverage_Stage0) * _dstColor;
+ sk_FragColor.w = max(max(lerpRed, lerpBlue), lerpGreen);
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform vec2 uAtlasSizeInv_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in uvec2 inTextureCoords;
+noperspective out vec2 vTextureCoords_Stage0;
+flat out int vTexIndex_Stage0;
+noperspective out vec4 vinColor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ ivec2 signedCoords = ivec2(int(inTextureCoords.x), int(inTextureCoords.y));
+ vec2 unormTexCoords = vec2(float(signedCoords.x / 2), float(signedCoords.y / 2));
+ vTextureCoords_Stage0 = unormTexCoords * uAtlasSizeInv_Stage0;
+ vTexIndex_Stage0 = 0;
+ vinColor_Stage0 = inColor;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(inPosition.x, inPosition.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/121.shader_test b/shaders/skia/121.shader_test
new file mode 100644
index 0000000..9a1da9a
--- /dev/null
+++ b/shaders/skia/121.shader_test
@@ -0,0 +1,119 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform float uSrcTF_Stage1_c0_c0[7];
+uniform mat3 uColorXform_Stage1_c0_c0;
+uniform float uDstTF_Stage1_c0_c0[7];
+uniform mat4 um_Stage2;
+uniform vec4 uv_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+vec4 YUVtoRGBEffect_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 planes[1];
+ planes[0] = TextureEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ vec4 color = vec4(planes[0].x, planes[0].y, planes[0].z, planes[0].w);
+ color.xyz *= color.w;
+ _output = color;
+ return _output;
+}
+float src_tf_Stage1_c0_c0(float x) {
+ float G = uSrcTF_Stage1_c0_c0[0];
+ float A = uSrcTF_Stage1_c0_c0[1];
+ float B = uSrcTF_Stage1_c0_c0[2];
+ float C = uSrcTF_Stage1_c0_c0[3];
+ float D = uSrcTF_Stage1_c0_c0[4];
+ float E = uSrcTF_Stage1_c0_c0[5];
+ float F = uSrcTF_Stage1_c0_c0[6];
+ float s = sign(x);
+ x = abs(x);
+ x = x < D ? C * x + F : pow(A * x + B, G) + E;
+ return s * x;
+}
+float dst_tf_Stage1_c0_c0(float x) {
+ float G = uDstTF_Stage1_c0_c0[0];
+ float A = uDstTF_Stage1_c0_c0[1];
+ float B = uDstTF_Stage1_c0_c0[2];
+ float C = uDstTF_Stage1_c0_c0[3];
+ float D = uDstTF_Stage1_c0_c0[4];
+ float E = uDstTF_Stage1_c0_c0[5];
+ float F = uDstTF_Stage1_c0_c0[6];
+ float s = sign(x);
+ x = abs(x);
+ x = x < D ? C * x + F : pow(A * x + B, G) + E;
+ return s * x;
+}
+vec4 gamut_xform_Stage1_c0_c0(vec4 color) {
+ color.xyz = uColorXform_Stage1_c0_c0 * color.xyz;
+ return color;
+}
+vec4 color_xform_Stage1_c0_c0(vec4 color) {
+ float nonZeroAlpha = max(color.w, 9.9999997473787516e-05);
+ color = vec4(color.xyz / nonZeroAlpha, nonZeroAlpha);
+ color.x = src_tf_Stage1_c0_c0(color.x);
+ color.y = src_tf_Stage1_c0_c0(color.y);
+ color.z = src_tf_Stage1_c0_c0(color.z);
+ color = gamut_xform_Stage1_c0_c0(color);
+ color.x = dst_tf_Stage1_c0_c0(color.x);
+ color.y = dst_tf_Stage1_c0_c0(color.y);
+ color.z = dst_tf_Stage1_c0_c0(color.z);
+ color.xyz *= color.w;
+ return color;
+}
+vec4 ColorSpaceXform_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = color_xform_Stage1_c0_c0(YUVtoRGBEffect_Stage1_c0_c0_c0_c0(vec4(1.0))) * _input;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ColorSpaceXform_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ vec4 inputColor = output_Stage1;
+ {
+ float nonZeroAlpha = max(inputColor.w, 9.9999997473787516e-05);
+ inputColor = vec4(inputColor.xyz / nonZeroAlpha, inputColor.w);
+ }
+ output_Stage2 = um_Stage2 * inputColor + uv_Stage2;
+ {
+ output_Stage2 = clamp(output_Stage2, 0.0, 1.0);
+ }
+ {
+ output_Stage2.xyz *= output_Stage2.w;
+ }
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1210.shader_test b/shaders/skia/1210.shader_test
new file mode 100644
index 0000000..13545d4
--- /dev/null
+++ b/shaders/skia/1210.shader_test
@@ -0,0 +1,88 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uColor_Stage0;
+uniform vec4 uinnerRect_Stage1_c0_c0;
+uniform vec2 uradiusPlusHalf_Stage1_c0_c0;
+uniform vec4 urectUniform_Stage1_c1_c0;
+noperspective in vec3 vDashParam_Stage0;
+noperspective in vec2 vCircleParams_Stage0;
+vec4 CircularRRect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 dxy0 = uinnerRect_Stage1_c0_c0.xy - gl_FragCoord.xy;
+ vec2 dxy1 = gl_FragCoord.xy - uinnerRect_Stage1_c0_c0.zw;
+ vec2 dxy = max(max(dxy0, dxy1), 0.0);
+ float alpha = clamp(uradiusPlusHalf_Stage1_c0_c0.x - length(dxy), 0.0, 1.0);
+ alpha = 1.0 - alpha;
+ _output = _input * alpha;
+ return _output;
+}
+vec4 AARectEffect_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ float alpha;
+ {
+ alpha = float(all(greaterThan(vec4(gl_FragCoord.xy, urectUniform_Stage1_c1_c0.zw), vec4(urectUniform_Stage1_c1_c0.xy, gl_FragCoord.xy))) ? 1 : 0);
+ }
+ _output = _input * alpha;
+ return _output;
+}
+float _blend_overlay_component(float sc, float sa, float dc, float da) {
+ if (2.0 * dc <= da) {
+ return (2.0 * sc) * dc;
+ }
+ return sa * da - (2.0 * (da - dc)) * (sa - sc);
+}
+vec4 blend_overlay(vec4 src, vec4 dst) {
+ vec4 result = vec4(_blend_overlay_component(src.x, src.w, dst.x, dst.w), _blend_overlay_component(src.y, src.w, dst.y, dst.w), _blend_overlay_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+ result.xyz += dst.xyz * (1.0 - src.w) + src.xyz * (1.0 - dst.w);
+ return result;
+}
+vec4 blend_hard_light(vec4 src, vec4 dst) {
+ return blend_overlay(dst, src);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = uColor_Stage0;
+ float xShifted = vDashParam_Stage0.x - floor(vDashParam_Stage0.x / vDashParam_Stage0.z) * vDashParam_Stage0.z;
+ vec2 fragPosShifted = vec2(xShifted, vDashParam_Stage0.y);
+ vec2 center = vec2(vCircleParams_Stage0.y, 0.0);
+ float dist = length(center - fragPosShifted);
+ float diff = dist - vCircleParams_Stage0.x;
+ diff = 1.0 - diff;
+ float alpha = clamp(diff, 0.0, 1.0);
+ outputCoverage_Stage0 = vec4(alpha);
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_hard_light(CircularRRect_Stage1_c0_c0(inputColor), AARectEffect_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ sk_FragColor = output_Stage1 * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 inPosition;
+in vec3 inDashParams;
+in vec2 inCircleParams;
+noperspective out vec3 vDashParam_Stage0;
+noperspective out vec2 vCircleParams_Stage0;
+void main() {
+ vDashParam_Stage0 = inDashParams;
+ vCircleParams_Stage0 = inCircleParams;
+ vec2 pos2 = inPosition;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1213.shader_test b/shaders/skia/1213.shader_test
new file mode 100644
index 0000000..1355455
--- /dev/null
+++ b/shaders/skia/1213.shader_test
@@ -0,0 +1,308 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uColor_Stage0;
+uniform vec2 uImageIncrement_Stage1;
+uniform float uSurfaceScale_Stage1;
+uniform vec3 uLightColor_Stage1;
+uniform float uKD_Stage1;
+uniform vec4 uTexDom_Stage1;
+uniform vec3 uDecalParams_Stage1;
+uniform vec3 uLightLocation_Stage1;
+uniform float uExponent_Stage1;
+uniform float uCosInnerConeAngle_Stage1;
+uniform float uCosOuterConeAngle_Stage1;
+uniform float uConeScale_Stage1;
+uniform vec3 uS_Stage1;
+uniform vec4 uleftBorderColor_Stage2_c0_c0;
+uniform vec4 urightBorderColor_Stage2_c0_c0;
+uniform vec4 uscale0_1_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale8_9_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias8_9_Stage2_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage2_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage2_c0_c0_c1_c0;
+uniform vec4 uinnerRect_Stage3;
+uniform vec2 uradiusPlusHalf_Stage3;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 light_Stage1(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ float colorScale = uKD_Stage1 * dot(normal, surfaceToLight);
+ return vec4(lightColor * clamp(colorScale, 0.0, 1.0), 1.0);
+}
+float sobel_Stage1(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage1(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage1(float m[9], float surfaceScale) {
+ return pointToNormal_Stage1(sobel_Stage1(m[0], m[2], m[3], m[5], m[6], m[8], 0.25), sobel_Stage1(m[0], m[6], m[1], m[7], m[2], m[8], 0.25), surfaceScale);
+}
+vec3 lightColor_Stage1(vec3 surfaceToLight) {
+ float cosAngle = -dot(surfaceToLight, uS_Stage1);
+ if (cosAngle < uCosOuterConeAngle_Stage1) {
+ return vec3(0.0);
+ }
+ float scale = pow(cosAngle, uExponent_Stage1);
+ if (cosAngle < uCosInnerConeAngle_Stage1) {
+ return ((uLightColor_Stage1 * scale) * (cosAngle - uCosOuterConeAngle_Stage1)) * uConeScale_Stage1;
+ }
+ return uLightColor_Stage1;
+}
+vec4 LinearGradientLayout_Stage2_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_1_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage2_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.w) {
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage2_c0_c0_c1_c0;
+ bias = ubias0_1_Stage2_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage2_c0_c0_c1_c0;
+ bias = ubias2_3_Stage2_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage2_c0_c0_c1_c0;
+ bias = ubias4_5_Stage2_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage2_c0_c0_c1_c0;
+ bias = ubias6_7_Stage2_c0_c0_c1_c0;
+ }
+ }
+ } else {
+ {
+ {
+ scale = uscale8_9_Stage2_c0_c0_c1_c0;
+ bias = ubias8_9_Stage2_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage2_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage2_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage2_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage2_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = uColor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec2 coord = vTransformedCoords_0_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp0 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp5 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp6 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp7 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp8 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = normalize(uLightLocation_Stage1 - vec3(gl_FragCoord.xy, uSurfaceScale_Stage1 * m[4]));
+ output_Stage1 = light_Stage1(normal_Stage1(m, uSurfaceScale_Stage1), surfaceToLight, lightColor_Stage1(surfaceToLight));
+ output_Stage1 *= outputColor_Stage0;
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_dst_in(output_Stage1, ClampedGradientEffect_Stage2_c0_c0(vec4(1.0)));
+ }
+ vec4 output_Stage3;
+ {
+ vec2 dxy0 = uinnerRect_Stage3.xy - gl_FragCoord.xy;
+ vec2 dxy1 = gl_FragCoord.xy - uinnerRect_Stage3.zw;
+ vec2 dxy = max(max(dxy0, dxy1), 0.0);
+ float alpha = clamp(uradiusPlusHalf_Stage3.x - length(dxy), 0.0, 1.0);
+ output_Stage3 = output_Stage2 * alpha;
+ }
+ {
+ sk_FragColor = output_Stage3;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 inPosition;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vec2 pos2 = (uViewM_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1216.shader_test b/shaders/skia/1216.shader_test
new file mode 100644
index 0000000..afed44c
--- /dev/null
+++ b/shaders/skia/1216.shader_test
@@ -0,0 +1,224 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_KHR_blend_equation_advanced : require
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+layout (blend_support_all_equations) out ;
+uniform vec2 uImageIncrement_Stage1;
+uniform float uSurfaceScale_Stage1;
+uniform vec3 uLightColor_Stage1;
+uniform float uKD_Stage1;
+uniform vec4 uTexDom_Stage1;
+uniform vec3 uDecalParams_Stage1;
+uniform vec3 uLightLocation_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vEllipseOffsets0_Stage0;
+noperspective in vec2 vEllipseOffsets1_Stage0;
+noperspective in vec4 vinColor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 light_Stage1(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ float colorScale = uKD_Stage1 * dot(normal, surfaceToLight);
+ return vec4(lightColor * clamp(colorScale, 0.0, 1.0), 1.0);
+}
+float sobel_Stage1(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage1(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage1(float m[9], float surfaceScale) {
+ return pointToNormal_Stage1(sobel_Stage1(0.0, 0.0, m[4], m[5], m[7], m[8], 0.66666698455810547), sobel_Stage1(0.0, 0.0, m[4], m[7], m[5], m[8], 0.66666698455810547), surfaceScale);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vinColor_Stage0;
+ vec2 scaledOffset = vEllipseOffsets0_Stage0;
+ float test = dot(scaledOffset, scaledOffset) - 1.0;
+ vec2 duvdx = dFdx(vEllipseOffsets0_Stage0);
+ vec2 duvdy = -dFdy(vEllipseOffsets0_Stage0);
+ vec2 grad = vec2(vEllipseOffsets0_Stage0.x * duvdx.x + vEllipseOffsets0_Stage0.y * duvdx.y, vEllipseOffsets0_Stage0.x * duvdy.x + vEllipseOffsets0_Stage0.y * duvdy.y);
+ float grad_dot = 4.0 * dot(grad, grad);
+ grad_dot = max(grad_dot, 1.1754999560161448e-38);
+ float invlen = inversesqrt(grad_dot);
+ float edgeAlpha = clamp(0.5 - test * invlen, 0.0, 1.0);
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ vec4 output_Stage1;
+ {
+ vec2 coord = vTransformedCoords_0_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp0 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp5 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp6 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp7 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp8 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = normalize(uLightLocation_Stage1 - vec3(gl_FragCoord.xy, uSurfaceScale_Stage1 * m[4]));
+ output_Stage1 = light_Stage1(normal_Stage1(m, uSurfaceScale_Stage1), surfaceToLight, uLightColor_Stage1);
+ output_Stage1 *= outputColor_Stage0;
+ }
+ {
+ sk_FragColor = outputCoverage_Stage0 * output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec2 inEllipseOffsets0;
+in vec2 inEllipseOffsets1;
+noperspective out vec2 vEllipseOffsets0_Stage0;
+noperspective out vec2 vEllipseOffsets1_Stage0;
+noperspective out vec4 vinColor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vEllipseOffsets0_Stage0 = inEllipseOffsets0;
+ vEllipseOffsets1_Stage0 = inEllipseOffsets1;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = (uViewM_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1222.shader_test b/shaders/skia/1222.shader_test
new file mode 100644
index 0000000..b6de6db
--- /dev/null
+++ b/shaders/skia/1222.shader_test
@@ -0,0 +1,198 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_KHR_blend_equation_advanced : require
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+layout (blend_support_all_equations) out ;
+uniform vec4 uColor_Stage0;
+uniform vec4 uboundsUniform_Stage1;
+uniform float uxInvZoom_Stage1;
+uniform float uyInvZoom_Stage1;
+uniform float uxInvInset_Stage1;
+uniform float uyInvInset_Stage1;
+uniform vec2 uoffset_Stage1;
+uniform vec2 ubaseFrequency_Stage2;
+uniform float uz_Stage2;
+uniform vec4 uellipse_Stage4;
+uniform mat4 um_Stage5;
+uniform vec4 uv_Stage5;
+uniform vec4 uleftBorderColor_Stage6_c0_c0;
+uniform vec4 urightBorderColor_Stage6_c0_c0;
+uniform vec4 uscale01_Stage6_c0_c0_c1_c0;
+uniform vec4 ubias01_Stage6_c0_c0_c1_c0;
+uniform vec4 uscale23_Stage6_c0_c0_c1_c0;
+uniform vec4 ubias23_Stage6_c0_c0_c1_c0;
+uniform float uthreshold_Stage6_c0_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+uniform sampler2D uTextureSampler_1_Stage2;
+uniform sampler2D uTextureSampler_0_Stage3;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+noperspective in vec2 vTransformedCoords_3_Stage0;
+vec3 fade_Stage2(vec3 t) {
+ return ((t * t) * t) * (t * (t * 6.0 - 15.0) + 10.0);
+}
+float perm_Stage2(float x) {
+ return texture(uTextureSampler_0_Stage2, vec2(fract(x / 256.0), 0.0)).x * 255.0;
+}
+float grad_Stage2(float x, vec3 p) {
+ return dot(texture(uTextureSampler_1_Stage2, vec2(fract(x / 16.0), 0.0)).xyz * 255.0 - vec3(1.0), p);
+}
+float lerp_Stage2(float a, float b, float w) {
+ return a + w * (b - a);
+}
+float noise_Stage2(vec3 p) {
+ vec3 P = mod(floor(p), 256.0);
+ p -= floor(p);
+ vec3 f = fade_Stage2(p);
+ float A = perm_Stage2(P.x) + P.y;
+ float AA = perm_Stage2(A) + P.z;
+ float AB = perm_Stage2(A + 1.0) + P.z;
+ float B = perm_Stage2(P.x + 1.0) + P.y;
+ float BA = perm_Stage2(B) + P.z;
+ float BB = perm_Stage2(B + 1.0) + P.z;
+ float result = lerp_Stage2(lerp_Stage2(lerp_Stage2(grad_Stage2(perm_Stage2(AA), p), grad_Stage2(perm_Stage2(BA), p + vec3(-1.0, 0.0, 0.0)), f.x), lerp_Stage2(grad_Stage2(perm_Stage2(AB), p + vec3(0.0, -1.0, 0.0)), grad_Stage2(perm_Stage2(BB), p + vec3(-1.0, -1.0, 0.0)), f.x), f.y), lerp_Stage2(lerp_Stage2(grad_Stage2(perm_Stage2(AA + 1.0), p + vec3(0.0, 0.0, -1.0)), grad_Stage2(perm_Stage2(BA + 1.0), p + vec3(-1.0, 0.0, -1.0)), f.x), lerp_Stage2(grad_Stage2(perm_Stage2(AB + 1.0), p + vec3(0.0, -1.0, -1.0)), grad_Stage2(perm_Stage2(BB + 1.0), p + vec3(-1.0, -1.0, -1.0)), f.x), f.y), f.z);
+ return result;
+}
+float noiseOctaves_Stage2(vec3 p) {
+ float result = 0.0;
+ float ratio = 1.0;
+ for (float i = 0.0;i < 5.0; i++) {
+ result += noise_Stage2(p) / ratio;
+ p *= 2.0;
+ ratio *= 2.0;
+ }
+ return (result + 1.0) / 2.0;
+}
+vec4 RadialGradientLayout_Stage6_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = length(vTransformedCoords_3_Stage0);
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 DualIntervalGradientColorizer_Stage6_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthreshold_Stage6_c0_c0_c1_c0) {
+ scale = uscale01_Stage6_c0_c0_c1_c0;
+ bias = ubias01_Stage6_c0_c0_c1_c0;
+ } else {
+ scale = uscale23_Stage6_c0_c0_c1_c0;
+ bias = ubias23_Stage6_c0_c0_c1_c0;
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage6_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = RadialGradientLayout_Stage6_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage6_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage6_c0_c0;
+ } else {
+ _output = DualIntervalGradientColorizer_Stage6_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ {
+ vec2 coord = vTransformedCoords_0_Stage0;
+ vec2 delta = (coord - uboundsUniform_Stage1.xy) * uboundsUniform_Stage1.zw;
+ delta = min(delta, vec2(1.0, 1.0) - delta);
+ delta *= vec2(uxInvInset_Stage1, uyInvInset_Stage1);
+ if (delta.x < 2.0 && delta.y < 2.0) {
+ delta = vec2(2.0, 2.0) - delta;
+ float dist = length(delta);
+ dist = max(2.0 - dist, 0.0);
+ }
+ }
+ vec4 output_Stage2;
+ {
+ vec2 coords = vTransformedCoords_1_Stage0 * ubaseFrequency_Stage2;
+ float r = noiseOctaves_Stage2(vec3(coords, uz_Stage2));
+ float g = noiseOctaves_Stage2(vec3(coords, uz_Stage2));
+ float b = noiseOctaves_Stage2(vec3(coords, uz_Stage2));
+ float a = noiseOctaves_Stage2(vec3(coords, uz_Stage2));
+ output_Stage2 = vec4(r, g, b, a);
+ output_Stage2 = clamp(output_Stage2, 0.0, 1.0);
+ output_Stage2 = vec4(output_Stage2.xyz * output_Stage2.www, output_Stage2.w);
+ }
+ vec4 output_Stage3;
+ {
+ output_Stage3 = texture(uTextureSampler_0_Stage3, vTransformedCoords_2_Stage0) * output_Stage2;
+ }
+ vec4 output_Stage4;
+ {
+ vec2 d = gl_FragCoord.xy - uellipse_Stage4.xy;
+ vec2 Z = d * uellipse_Stage4.zw;
+ float implicit = dot(Z, d) - 1.0;
+ float grad_dot = 4.0 * dot(Z, Z);
+ {
+ grad_dot = max(grad_dot, 1.1754999560161448e-38);
+ }
+ float approx_dist = implicit * inversesqrt(grad_dot);
+ float alpha;
+ {
+ alpha = approx_dist > 0.0 ? 1.0 : 0.0;
+ }
+ output_Stage4 = output_Stage3 * alpha;
+ }
+ vec4 output_Stage5;
+ {
+ vec4 inputColor = output_Stage4;
+ output_Stage5 = um_Stage5 * inputColor + uv_Stage5;
+ {
+ output_Stage5 = clamp(output_Stage5, 0.0, 1.0);
+ }
+ }
+ vec4 output_Stage6;
+ {
+ output_Stage6 = blend_dst_in(vec4(1.0), ClampedGradientEffect_Stage6_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage6 * output_Stage5;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+uniform mat3 uCoordTransformMatrix_3_Stage0;
+in vec2 inPosition;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+noperspective out vec2 vTransformedCoords_3_Stage0;
+void main() {
+ vec2 pos2 = (uViewM_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_3_Stage0 = (uCoordTransformMatrix_3_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1225.shader_test b/shaders/skia/1225.shader_test
new file mode 100644
index 0000000..ed34ea3
--- /dev/null
+++ b/shaders/skia/1225.shader_test
@@ -0,0 +1,21 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+uniform vec4 uColor_Stage0;
+void main() {
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 position;
+void main() {
+ vec2 pos2 = position;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1228.shader_test b/shaders/skia/1228.shader_test
new file mode 100644
index 0000000..5cc0fae
--- /dev/null
+++ b/shaders/skia/1228.shader_test
@@ -0,0 +1,36 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_KHR_blend_equation_advanced : require
+out vec4 sk_FragColor;
+layout (blend_support_all_equations) out ;
+noperspective in vec4 vcolor_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ {
+ sk_FragColor = outputColor_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+noperspective out vec4 vcolor_Stage0;
+void main() {
+ vec4 color = inColor;
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1231.shader_test b/shaders/skia/1231.shader_test
new file mode 100644
index 0000000..47d8934
--- /dev/null
+++ b/shaders/skia/1231.shader_test
@@ -0,0 +1,137 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+uniform vec2 ubaseFrequency_Stage1_c0_c0;
+uniform vec2 ustitchData_Stage1_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+in vec2 vTextureCoords_Stage0;
+flat in int vTexIndex_Stage0;
+in vec2 vIntTextureCoords_Stage0;
+in vec4 vinColor_Stage0;
+in vec3 vTransformedCoords_0_Stage0;
+float perlinnoise_Stage1_c0_c0(float chanCoord, vec2 noiseVec, vec2 stitchData) {
+ vec4 floorVal;
+ floorVal.xy = floor(noiseVec);
+ floorVal.zw = floorVal.xy + vec2(1.0);
+ vec2 fractVal = fract(noiseVec);
+ vec2 noiseSmooth = (fractVal * fractVal) * (vec2(3.0) - vec2(2.0) * fractVal);
+ if (floorVal.x >= stitchData.x) {
+ floorVal.x -= stitchData.x;
+ }
+ if (floorVal.y >= stitchData.y) {
+ floorVal.y -= stitchData.y;
+ }
+ if (floorVal.z >= stitchData.x) {
+ floorVal.z -= stitchData.x;
+ }
+ if (floorVal.w >= stitchData.y) {
+ floorVal.w -= stitchData.y;
+ }
+ floorVal = fract(floor(mod(floorVal, 256.0)) / vec4(256.0));
+ vec2 latticeIdx;
+ latticeIdx.x = texture(uTextureSampler_0_Stage1, vec2(floorVal.x, 0.5)).x;
+ latticeIdx.y = texture(uTextureSampler_0_Stage1, vec2(floorVal.z, 0.5)).x;
+ vec4 bcoords = fract(latticeIdx.xyxy + floorVal.yyww);
+ vec2 uv;
+ vec4 lattice = texture(uTextureSampler_1_Stage1, vec2(bcoords.x, chanCoord)).zyxw;
+ uv.x = dot((lattice.yw + lattice.xz * vec2(0.00390625)) * vec2(2.0) - vec2(1.0), fractVal);
+ fractVal.x -= 1.0;
+ lattice = texture(uTextureSampler_1_Stage1, vec2(bcoords.y, chanCoord)).zyxw;
+ uv.y = dot((lattice.yw + lattice.xz * vec2(0.00390625)) * vec2(2.0) - vec2(1.0), fractVal);
+ vec2 ab;
+ ab.x = mix(uv.x, uv.y, noiseSmooth.x);
+ fractVal.y -= 1.0;
+ lattice = texture(uTextureSampler_1_Stage1, vec2(bcoords.w, chanCoord)).zyxw;
+ uv.y = dot((lattice.yw + lattice.xz * vec2(0.00390625)) * vec2(2.0) - vec2(1.0), fractVal);
+ fractVal.x += 1.0;
+ lattice = texture(uTextureSampler_1_Stage1, vec2(bcoords.z, chanCoord)).zyxw;
+ uv.x = dot((lattice.yw + lattice.xz * vec2(0.00390625)) * vec2(2.0) - vec2(1.0), fractVal);
+ ab.y = mix(uv.x, uv.y, noiseSmooth.x);
+ return mix(ab.x, ab.y, noiseSmooth.y);
+}
+vec4 PerlinNoise_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 vTransformedCoords_0_Stage0_ensure2D = vTransformedCoords_0_Stage0.xy / vTransformedCoords_0_Stage0.z;
+ vec2 noiseVec = floor(vTransformedCoords_0_Stage0_ensure2D) * ubaseFrequency_Stage1_c0_c0;
+ _output = vec4(0.0);
+ vec2 stitchData = ustitchData_Stage1_c0_c0;
+ float ratio = 1.0;
+ for (int octave = 0;octave < 7; ++octave) {
+ _output += vec4(perlinnoise_Stage1_c0_c0(0.125, noiseVec, stitchData), perlinnoise_Stage1_c0_c0(0.375, noiseVec, stitchData), perlinnoise_Stage1_c0_c0(0.625, noiseVec, stitchData), perlinnoise_Stage1_c0_c0(0.875, noiseVec, stitchData)) * ratio;
+ noiseVec *= vec2(2.0);
+ ratio *= 0.5;
+ stitchData *= vec2(2.0);
+ }
+ _output = _output * vec4(0.5) + vec4(0.5);
+ _output = clamp(_output, 0.0, 1.0);
+ _output = vec4(_output.xyz * _output.www, _output.w);
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ vec2 uv = vTextureCoords_Stage0;
+ vec4 texColor;
+ {
+ texColor = texture(uTextureSampler_0_Stage0, uv);
+ }
+ float distance = 7.96875 * (texColor.x - 0.50196081399917603);
+ float afwidth;
+ vec2 dist_grad = vec2(dFdx(distance), -dFdy(distance));
+ float dg_len2 = dot(dist_grad, dist_grad);
+ if (dg_len2 < 9.9999997473787516e-05) {
+ dist_grad = vec2(0.70709997415542603, 0.70709997415542603);
+ } else {
+ dist_grad = dist_grad * inversesqrt(dg_len2);
+ }
+ vec2 Jdx = dFdx(vIntTextureCoords_Stage0);
+ vec2 Jdy = -dFdy(vIntTextureCoords_Stage0);
+ vec2 grad = vec2(dist_grad.x * Jdx.x + dist_grad.y * Jdy.x, dist_grad.x * Jdx.y + dist_grad.y * Jdy.y);
+ afwidth = 0.64999997615814209 * length(grad);
+ float val = smoothstep(-afwidth, afwidth, distance);
+ outputCoverage_Stage0 = vec4(val);
+ }
+ {
+ blend_dst_in(outputCoverage_Stage0, PerlinNoise_Stage1_c0_c0(vec4(1.0)));
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform vec2 uAtlasDimensionsInv_Stage0;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in uvec2 inTextureCoords;
+out vec2 vTextureCoords_Stage0;
+flat out int vTexIndex_Stage0;
+out vec2 vIntTextureCoords_Stage0;
+out vec4 vinColor_Stage0;
+out vec3 vTransformedCoords_0_Stage0;
+void main() {
+ ivec2 signedCoords = ivec2(int(inTextureCoords.x), int(inTextureCoords.y));
+ vec2 unormTexCoords = vec2(float(signedCoords.x / 2), float(signedCoords.y / 2));
+ vTextureCoords_Stage0 = unormTexCoords * uAtlasDimensionsInv_Stage0;
+ vTexIndex_Stage0 = 0;
+ vIntTextureCoords_Stage0 = unormTexCoords;
+ vinColor_Stage0 = inColor;
+ vec3 pos3 = uViewM_Stage0 * vec3(inPosition, 1.0);
+ vTransformedCoords_0_Stage0 = uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0);
+ gl_Position = vec4(pos3.x, pos3.y, 0.0, pos3.z);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1234.shader_test b/shaders/skia/1234.shader_test
new file mode 100644
index 0000000..debfced
--- /dev/null
+++ b/shaders/skia/1234.shader_test
@@ -0,0 +1,198 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+uniform vec2 ufocalParams_Stage2_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage2_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage2_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage2_c0_c0_c1_c0;
+uniform vec4 uellipse_Stage3;
+uniform vec4 uellipse_Stage4;
+uniform float uPixelSize_Stage5;
+uniform vec2 uRange_Stage5;
+uniform sampler2D uTextureSampler_0_Stage5;
+noperspective in vec4 vinCircleEdge_Stage0;
+noperspective in vec4 vinColor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage2_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_0_Stage0;
+ float t = -1.0;
+ float v = 1.0;
+ {
+ {
+ float invR1 = ufocalParams_Stage2_c0_c0_c0_c0.x;
+ float fx = ufocalParams_Stage2_c0_c0_c0_c0.y;
+ float x_t = -1.0;
+ {
+ float temp = p.x * p.x - p.y * p.y;
+ if (temp >= 0.0) {
+ {
+ x_t = -sqrt(temp) - p.x * invR1;
+ }
+ }
+ }
+ {
+ if (x_t <= 0.0) {
+ v = -1.0;
+ }
+ }
+ {
+ {
+ t = -x_t + fx;
+ }
+ }
+ }
+ }
+ _output = vec4(t, v, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage2_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage2_c0_c0_c1_c0;
+ bias = ubias0_1_Stage2_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage2_c0_c0_c1_c0;
+ bias = ubias2_3_Stage2_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage2_c0_c0_c1_c0;
+ bias = ubias4_5_Stage2_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage2_c0_c0_c1_c0;
+ bias = ubias6_7_Stage2_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage2_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else {
+ {
+ t.x = fract(t.x);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage2_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ vec4 circleEdge;
+ circleEdge = vinCircleEdge_Stage0;
+ float d = length(circleEdge.xy);
+ float distanceToOuterEdge = circleEdge.z * (1.0 - d);
+ float edgeAlpha = clamp(distanceToOuterEdge, 0.0, 1.0);
+ float distanceToInnerEdge = circleEdge.z * (d - circleEdge.w);
+ float innerAlpha = clamp(distanceToInnerEdge, 0.0, 1.0);
+ edgeAlpha *= innerAlpha;
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = outputCoverage_Stage0;
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_dst_in(output_Stage1, TiledGradientEffect_Stage2_c0_c0(vec4(1.0)));
+ }
+ vec4 output_Stage3;
+ {
+ vec2 d = gl_FragCoord.xy - uellipse_Stage3.xy;
+ vec2 Z = d * uellipse_Stage3.zw;
+ float implicit = dot(Z, d) - 1.0;
+ float grad_dot = 4.0 * dot(Z, Z);
+ {
+ grad_dot = max(grad_dot, 1.1754999560161448e-38);
+ }
+ float approx_dist = implicit * inversesqrt(grad_dot);
+ float alpha;
+ {
+ alpha = clamp(0.5 + approx_dist, 0.0, 1.0);
+ }
+ output_Stage3 = output_Stage2 * alpha;
+ }
+ vec4 output_Stage4;
+ {
+ vec2 d = gl_FragCoord.xy - uellipse_Stage4.xy;
+ vec2 Z = d * uellipse_Stage4.zw;
+ float implicit = dot(Z, d) - 1.0;
+ float grad_dot = 4.0 * dot(Z, Z);
+ {
+ grad_dot = max(grad_dot, 1.1754999560161448e-38);
+ }
+ float approx_dist = implicit * inversesqrt(grad_dot);
+ float alpha;
+ {
+ alpha = clamp(0.5 - approx_dist, 0.0, 1.0);
+ }
+ output_Stage4 = output_Stage3 * alpha;
+ }
+ vec4 output_Stage5;
+ {
+ output_Stage5 = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_1_Stage0;
+ coord.x -= 10.0 * uPixelSize_Stage5;
+ for (int i = 0;i < 21; i++) {
+ output_Stage5 = max(output_Stage5, texture(uTextureSampler_0_Stage5, coord));
+ coord.x += uPixelSize_Stage5;
+ }
+ output_Stage5 *= output_Stage4;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec4 inCircleEdge;
+noperspective out vec4 vinCircleEdge_Stage0;
+noperspective out vec4 vinColor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vinCircleEdge_Stage0 = inCircleEdge;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1237.shader_test b/shaders/skia/1237.shader_test
new file mode 100644
index 0000000..80e3a20
--- /dev/null
+++ b/shaders/skia/1237.shader_test
@@ -0,0 +1,322 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1_c0_c0;
+uniform vec4 uKernel_Stage1_c0_c0[4];
+uniform vec2 uKernelOffset_Stage1_c0_c0;
+uniform float uGain_Stage1_c0_c0;
+uniform float uBias_Stage1_c0_c0;
+uniform vec4 uTexDom_Stage1_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+noperspective in vec4 vQuadEdge_Stage0;
+noperspective in vec4 vinColor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 MatrixConvolution_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 sum = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0 - uKernelOffset_Stage1_c0_c0 * uImageIncrement_Stage1_c0_c0;
+ vec4 c;
+ {
+ float k = uKernel_Stage1_c0_c0[0].x;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0.xy, uTexDom_Stage1_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0[0].y;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0.xy, uTexDom_Stage1_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0[0].z;
+ {
+ vec2 origCoord = coord + vec2(2.0, 0.0) * uImageIncrement_Stage1_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0.xy, uTexDom_Stage1_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0[0].w;
+ {
+ vec2 origCoord = coord + vec2(3.0, 0.0) * uImageIncrement_Stage1_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0.xy, uTexDom_Stage1_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0[1].x;
+ {
+ vec2 origCoord = coord + vec2(4.0, 0.0) * uImageIncrement_Stage1_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0.xy, uTexDom_Stage1_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0[1].y;
+ {
+ vec2 origCoord = coord + vec2(5.0, 0.0) * uImageIncrement_Stage1_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0.xy, uTexDom_Stage1_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0[1].z;
+ {
+ vec2 origCoord = coord + vec2(6.0, 0.0) * uImageIncrement_Stage1_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0.xy, uTexDom_Stage1_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0[1].w;
+ {
+ vec2 origCoord = coord + vec2(7.0, 0.0) * uImageIncrement_Stage1_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0.xy, uTexDom_Stage1_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0[2].x;
+ {
+ vec2 origCoord = coord + vec2(8.0, 0.0) * uImageIncrement_Stage1_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0.xy, uTexDom_Stage1_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0[2].y;
+ {
+ vec2 origCoord = coord + vec2(9.0, 0.0) * uImageIncrement_Stage1_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0.xy, uTexDom_Stage1_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0[2].z;
+ {
+ vec2 origCoord = coord + vec2(10.0, 0.0) * uImageIncrement_Stage1_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0.xy, uTexDom_Stage1_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0[2].w;
+ {
+ vec2 origCoord = coord + vec2(11.0, 0.0) * uImageIncrement_Stage1_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0.xy, uTexDom_Stage1_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0[3].x;
+ {
+ vec2 origCoord = coord + vec2(12.0, 0.0) * uImageIncrement_Stage1_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0.xy, uTexDom_Stage1_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0[3].y;
+ {
+ vec2 origCoord = coord + vec2(13.0, 0.0) * uImageIncrement_Stage1_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0.xy, uTexDom_Stage1_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0[3].z;
+ {
+ vec2 origCoord = coord + vec2(14.0, 0.0) * uImageIncrement_Stage1_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0.xy, uTexDom_Stage1_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0[3].w;
+ {
+ vec2 origCoord = coord + vec2(15.0, 0.0) * uImageIncrement_Stage1_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0.xy, uTexDom_Stage1_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ vec2 origCoord = vTransformedCoords_0_Stage0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0.xy, uTexDom_Stage1_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ _output.w = c.w;
+ _output.xyz = clamp(sum.xyz * uGain_Stage1_c0_c0 + uBias_Stage1_c0_c0, 0.0, 1.0);
+ _output.xyz *= _output.w;
+ _output *= _input;
+ return _output;
+}
+vec4 ColorTableEffect_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ float nonZeroAlpha = max(_input.w, 9.9999997473787516e-05);
+ vec4 coord = vec4(_input.xyz / nonZeroAlpha, nonZeroAlpha);
+ coord = coord * 0.9960939884185791 + vec4(0.0019529999699443579, 0.0019529999699443579, 0.0019529999699443579, 0.0019529999699443579);
+ _output.w = texture(uTextureSampler_1_Stage1, vec2(coord.w, 0.125)).w;
+ _output.x = texture(uTextureSampler_1_Stage1, vec2(coord.x, 0.375)).w;
+ _output.y = texture(uTextureSampler_1_Stage1, vec2(coord.y, 0.625)).w;
+ _output.z = texture(uTextureSampler_1_Stage1, vec2(coord.z, 0.875)).w;
+ _output.xyz *= _output.w;
+ return _output;
+}
+float _guarded_divide(float n, float d) {
+ return n / d;
+}
+float _color_dodge_component(float sc, float sa, float dc, float da) {
+ if (dc == 0.0) {
+ return sc * (1.0 - da);
+ } else {
+ float d = sa - sc;
+ if (d == 0.0) {
+ return (sa * da + sc * (1.0 - da)) + dc * (1.0 - sa);
+ }
+ d = min(da, _guarded_divide(dc * sa, d));
+ return (d * sa + sc * (1.0 - da)) + dc * (1.0 - sa);
+ }
+}
+vec4 blend_color_dodge(vec4 src, vec4 dst) {
+ return vec4(_color_dodge_component(src.x, src.w, dst.x, dst.w), _color_dodge_component(src.y, src.w, dst.y, dst.w), _color_dodge_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vinColor_Stage0;
+ float edgeAlpha;
+ vec2 duvdx = dFdx(vQuadEdge_Stage0.xy);
+ vec2 duvdy = dFdy(vQuadEdge_Stage0.xy);
+ if (vQuadEdge_Stage0.z > 0.0 && vQuadEdge_Stage0.w > 0.0) {
+ edgeAlpha = min(min(vQuadEdge_Stage0.z, vQuadEdge_Stage0.w) + 0.5, 1.0);
+ } else {
+ vec2 gF = vec2((2.0 * vQuadEdge_Stage0.x) * duvdx.x - duvdx.y, (2.0 * vQuadEdge_Stage0.x) * duvdy.x - duvdy.y);
+ edgeAlpha = vQuadEdge_Stage0.x * vQuadEdge_Stage0.x - vQuadEdge_Stage0.y;
+ edgeAlpha = clamp(0.5 - edgeAlpha / length(gF), 0.0, 1.0);
+ }
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_color_dodge(MatrixConvolution_Stage1_c0_c0(inputColor), ColorTableEffect_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ sk_FragColor = output_Stage1 * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec4 inQuadEdge;
+noperspective out vec4 vQuadEdge_Stage0;
+noperspective out vec4 vinColor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vQuadEdge_Stage0 = inQuadEdge;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/124-14.shader_test b/shaders/skia/124-14.shader_test
new file mode 100644
index 0000000..fa0ac9c
--- /dev/null
+++ b/shaders/skia/124-14.shader_test
@@ -0,0 +1,92 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform float uSrcTF_Stage0[7];
+uniform mat3 uColorXform_Stage0;
+uniform float uDstTF_Stage0[7];
+uniform sampler2D uTextureSampler_0_Stage0;
+noperspective in vec2 vtextureCoords_Stage0;
+flat in vec4 vtextureDomain_Stage0;
+flat in vec4 vcolor_Stage0;
+float src_tf_Stage0(float x) {
+ float G = uSrcTF_Stage0[0];
+ float A = uSrcTF_Stage0[1];
+ float B = uSrcTF_Stage0[2];
+ float C = uSrcTF_Stage0[3];
+ float D = uSrcTF_Stage0[4];
+ float E = uSrcTF_Stage0[5];
+ float F = uSrcTF_Stage0[6];
+ float s = sign(x);
+ x = abs(x);
+ x = x < D ? C * x + F : pow(A * x + B, G) + E;
+ return s * x;
+}
+float dst_tf_Stage0(float x) {
+ float G = uDstTF_Stage0[0];
+ float A = uDstTF_Stage0[1];
+ float B = uDstTF_Stage0[2];
+ float C = uDstTF_Stage0[3];
+ float D = uDstTF_Stage0[4];
+ float E = uDstTF_Stage0[5];
+ float F = uDstTF_Stage0[6];
+ float s = sign(x);
+ x = abs(x);
+ x = x < D ? C * x + F : pow(A * x + B, G) + E;
+ return s * x;
+}
+vec4 gamut_xform_Stage0(vec4 color) {
+ color.xyz = uColorXform_Stage0 * color.xyz;
+ return color;
+}
+vec4 color_xform_Stage0(vec4 color) {
+ float nonZeroAlpha = max(color.w, 9.9999997473787516e-05);
+ color = vec4(color.xyz / nonZeroAlpha, nonZeroAlpha);
+ color.x = src_tf_Stage0(color.x);
+ color.y = src_tf_Stage0(color.y);
+ color.z = src_tf_Stage0(color.z);
+ color = gamut_xform_Stage0(color);
+ color.x = dst_tf_Stage0(color.x);
+ color.y = dst_tf_Stage0(color.y);
+ color.z = dst_tf_Stage0(color.z);
+ color.xyz *= color.w;
+ return color;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ vec2 textureCoords;
+ textureCoords = vtextureCoords_Stage0;
+ vec4 textureDomain;
+ textureDomain = vtextureDomain_Stage0;
+ outputColor_Stage0 = vcolor_Stage0;
+ outputColor_Stage0 = color_xform_Stage0(texture(uTextureSampler_0_Stage0, clamp(textureCoords, textureDomain.xy, textureDomain.zw))) * outputColor_Stage0;
+ }
+ {
+ sk_FragColor = outputColor_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 position;
+in vec2 textureCoords;
+in vec4 textureDomain;
+in vec4 color;
+noperspective out vec2 vtextureCoords_Stage0;
+flat out vec4 vtextureDomain_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vec2 pos2 = position;
+ vtextureCoords_Stage0 = textureCoords;
+ vtextureDomain_Stage0 = textureDomain;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/124-15.shader_test b/shaders/skia/124-15.shader_test
new file mode 100644
index 0000000..6db644d
--- /dev/null
+++ b/shaders/skia/124-15.shader_test
@@ -0,0 +1,51 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform float uPixelSize_Stage2;
+uniform vec2 uRange_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = vec4(1.0, 1.0, 1.0, 1.0);
+ vec2 coord = vTransformedCoords_1_Stage0;
+ coord.x -= 3.0 * uPixelSize_Stage2;
+ for (int i = 0;i < 7; i++) {
+ output_Stage2 = min(output_Stage2, texture(uTextureSampler_0_Stage2, coord));
+ coord.x += uPixelSize_Stage2;
+ }
+ output_Stage2 *= output_Stage1;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/124-16.shader_test b/shaders/skia/124-16.shader_test
new file mode 100644
index 0000000..473b11a
--- /dev/null
+++ b/shaders/skia/124-16.shader_test
@@ -0,0 +1,63 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec3 uedges_Stage2[7];
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ float alpha = 1.0;
+ float edge;
+ edge = dot(uedges_Stage2[0], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage2[1], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage2[2], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage2[3], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage2[4], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage2[5], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage2[6], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ output_Stage2 = output_Stage1 * alpha;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/124-2.shader_test b/shaders/skia/124-2.shader_test
new file mode 100644
index 0000000..9ebc966
--- /dev/null
+++ b/shaders/skia/124-2.shader_test
@@ -0,0 +1,132 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.w) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ } else {
+ {
+ if (t < uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = OverrideInputFragmentProcessor_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_src_in(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 inColor;
+in vec2 inLocalCoord;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/124-4.shader_test b/shaders/skia/124-4.shader_test
new file mode 100644
index 0000000..bb21be5
--- /dev/null
+++ b/shaders/skia/124-4.shader_test
@@ -0,0 +1,30 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uColor_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = uColor_Stage0;
+ }
+ {
+ sk_FragColor = outputColor_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 inPosition;
+void main() {
+ vec3 pos3 = uViewM_Stage0 * vec3(inPosition, 1.0);
+ gl_Position = vec4(pos3.x, pos3.y, 0.0, pos3.z);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/124-5.shader_test b/shaders/skia/124-5.shader_test
new file mode 100644
index 0000000..68d092e
--- /dev/null
+++ b/shaders/skia/124-5.shader_test
@@ -0,0 +1,78 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage2_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c1_c0;
+ }
+ return _output;
+}
+vec4 blend_src_out(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_src_out(ConstColorProcessor_Stage2_c1_c0(vec4(1.0)), output_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/124-6.shader_test b/shaders/skia/124-6.shader_test
new file mode 100644
index 0000000..73144ea
--- /dev/null
+++ b/shaders/skia/124-6.shader_test
@@ -0,0 +1,138 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform float uSurfaceScale_Stage1;
+uniform vec3 uLightColor_Stage1;
+uniform float uKS_Stage1;
+uniform float uShininess_Stage1;
+uniform vec3 uLightDirection_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 light_Stage1(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ vec3 halfDir = normalize(surfaceToLight + vec3(0.0, 0.0, 1.0));
+ float colorScale = uKS_Stage1 * pow(dot(normal, halfDir), uShininess_Stage1);
+ vec3 color = lightColor * clamp(colorScale, 0.0, 1.0);
+ return vec4(color, max(max(color.x, color.y), color.z));
+}
+float sobel_Stage1(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage1(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage1(float m[9], float surfaceScale) {
+ return pointToNormal_Stage1(sobel_Stage1(m[1], m[2], m[4], m[5], m[7], m[8], 0.5), sobel_Stage1(0.0, 0.0, m[1], m[7], m[2], m[8], 0.33333298563957214), surfaceScale);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ vec2 coord = vTransformedCoords_0_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp0 = textureColor;
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp1 = textureColor;
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp2 = textureColor;
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp3 = textureColor;
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp4 = textureColor;
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp5 = textureColor;
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp6 = textureColor;
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp7 = textureColor;
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp8 = textureColor;
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = uLightDirection_Stage1;
+ output_Stage1 = light_Stage1(normal_Stage1(m, uSurfaceScale_Stage1), surfaceToLight, uLightColor_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/124-7.shader_test b/shaders/skia/124-7.shader_test
new file mode 100644
index 0000000..8983269
--- /dev/null
+++ b/shaders/skia/124-7.shader_test
@@ -0,0 +1,98 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+uniform vec2 uDstTextureUpperLeft_Stage2;
+uniform vec2 uDstTextureCoordScale_Stage2;
+uniform sampler2D uTextureSampler_0_Stage0;
+uniform sampler2D uDstTextureSampler_Stage2;
+noperspective in vec2 vTextureCoords_Stage0;
+flat in int vTexIndex_Stage0;
+noperspective in vec4 vinColor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ t.x = fract(t.x);
+ }
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 blend_plus(vec4 src, vec4 dst) {
+ return min(src + dst, 1.0);
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ vec4 texColor;
+ {
+ texColor = texture(uTextureSampler_0_Stage0, vTextureCoords_Stage0);
+ }
+ outputCoverage_Stage0 = texColor;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TiledGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ if (all(lessThanEqual(outputCoverage_Stage0.xyz, vec3(0.0)))) {
+ discard;
+ }
+ vec2 _dstTexCoord = (gl_FragCoord.xy - uDstTextureUpperLeft_Stage2) * uDstTextureCoordScale_Stage2;
+ _dstTexCoord.y = 1.0 - _dstTexCoord.y;
+ vec4 _dstColor = texture(uDstTextureSampler_Stage2, _dstTexCoord);
+ sk_FragColor = blend_plus(output_Stage1, _dstColor);
+ float lerpRed = mix(_dstColor.w, sk_FragColor.w, outputCoverage_Stage0.x);
+ float lerpBlue = mix(_dstColor.w, sk_FragColor.w, outputCoverage_Stage0.y);
+ float lerpGreen = mix(_dstColor.w, sk_FragColor.w, outputCoverage_Stage0.z);
+ sk_FragColor = outputCoverage_Stage0 * sk_FragColor + (vec4(1.0) - outputCoverage_Stage0) * _dstColor;
+ sk_FragColor.w = max(max(lerpRed, lerpBlue), lerpGreen);
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform vec2 uAtlasSizeInv_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in uvec2 inTextureCoords;
+noperspective out vec2 vTextureCoords_Stage0;
+flat out int vTexIndex_Stage0;
+noperspective out vec4 vinColor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ ivec2 signedCoords = ivec2(int(inTextureCoords.x), int(inTextureCoords.y));
+ vec2 unormTexCoords = vec2(float(signedCoords.x / 2), float(signedCoords.y / 2));
+ vTextureCoords_Stage0 = unormTexCoords * uAtlasSizeInv_Stage0;
+ vTexIndex_Stage0 = 0;
+ vinColor_Stage0 = inColor;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(inPosition.x, inPosition.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/124.shader_test b/shaders/skia/124.shader_test
new file mode 100644
index 0000000..1d78ed6
--- /dev/null
+++ b/shaders/skia/124.shader_test
@@ -0,0 +1,141 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform float uSrcTF_Stage1_c0_c0[7];
+uniform mat3 uColorXform_Stage1_c0_c0;
+uniform float uDstTF_Stage1_c0_c0[7];
+uniform mat4 um_Stage2;
+uniform vec4 uv_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+uniform sampler2D uTextureSampler_2_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_1_Stage1, vTransformedCoords_1_Stage0) * _input;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c0_c0_c0_c0_c2_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_2_Stage1, vTransformedCoords_2_Stage0) * _input;
+ return _output;
+}
+vec4 YUVtoRGBEffect_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 planes[3];
+ planes[0] = TextureEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ planes[1] = TextureEffect_Stage1_c0_c0_c0_c0_c1_c0(vec4(1.0));
+ planes[2] = TextureEffect_Stage1_c0_c0_c0_c0_c2_c0(vec4(1.0));
+ vec4 color = vec4(planes[0].x, planes[1].x, planes[1].y, planes[2].w);
+ color.xyz *= color.w;
+ _output = color;
+ return _output;
+}
+float src_tf_Stage1_c0_c0(float x) {
+ float G = uSrcTF_Stage1_c0_c0[0];
+ float A = uSrcTF_Stage1_c0_c0[1];
+ float B = uSrcTF_Stage1_c0_c0[2];
+ float C = uSrcTF_Stage1_c0_c0[3];
+ float D = uSrcTF_Stage1_c0_c0[4];
+ float E = uSrcTF_Stage1_c0_c0[5];
+ float F = uSrcTF_Stage1_c0_c0[6];
+ float s = sign(x);
+ x = abs(x);
+ x = x < D ? C * x + F : pow(A * x + B, G) + E;
+ return s * x;
+}
+float dst_tf_Stage1_c0_c0(float x) {
+ float G = uDstTF_Stage1_c0_c0[0];
+ float A = uDstTF_Stage1_c0_c0[1];
+ float B = uDstTF_Stage1_c0_c0[2];
+ float C = uDstTF_Stage1_c0_c0[3];
+ float D = uDstTF_Stage1_c0_c0[4];
+ float E = uDstTF_Stage1_c0_c0[5];
+ float F = uDstTF_Stage1_c0_c0[6];
+ float s = sign(x);
+ x = abs(x);
+ x = x < D ? C * x + F : pow(A * x + B, G) + E;
+ return s * x;
+}
+vec4 gamut_xform_Stage1_c0_c0(vec4 color) {
+ color.xyz = uColorXform_Stage1_c0_c0 * color.xyz;
+ return color;
+}
+vec4 color_xform_Stage1_c0_c0(vec4 color) {
+ float nonZeroAlpha = max(color.w, 9.9999997473787516e-05);
+ color = vec4(color.xyz / nonZeroAlpha, nonZeroAlpha);
+ color.x = src_tf_Stage1_c0_c0(color.x);
+ color.y = src_tf_Stage1_c0_c0(color.y);
+ color.z = src_tf_Stage1_c0_c0(color.z);
+ color = gamut_xform_Stage1_c0_c0(color);
+ color.x = dst_tf_Stage1_c0_c0(color.x);
+ color.y = dst_tf_Stage1_c0_c0(color.y);
+ color.z = dst_tf_Stage1_c0_c0(color.z);
+ color.xyz *= color.w;
+ return color;
+}
+vec4 ColorSpaceXform_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = color_xform_Stage1_c0_c0(YUVtoRGBEffect_Stage1_c0_c0_c0_c0(vec4(1.0))) * _input;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ColorSpaceXform_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ vec4 inputColor = output_Stage1;
+ {
+ float nonZeroAlpha = max(inputColor.w, 9.9999997473787516e-05);
+ inputColor = vec4(inputColor.xyz / nonZeroAlpha, inputColor.w);
+ }
+ output_Stage2 = um_Stage2 * inputColor + uv_Stage2;
+ {
+ output_Stage2 = clamp(output_Stage2, 0.0, 1.0);
+ }
+ {
+ output_Stage2.xyz *= output_Stage2.w;
+ }
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1240.shader_test b/shaders/skia/1240.shader_test
new file mode 100644
index 0000000..6c9ca08
--- /dev/null
+++ b/shaders/skia/1240.shader_test
@@ -0,0 +1,220 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_KHR_blend_equation_advanced : require
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+layout (blend_support_all_equations) out ;
+uniform float ucornerRadius_Stage1_c0_c0_c0_c0_c0_c0;
+uniform vec4 uproxyRect_Stage1_c0_c0_c0_c0_c0_c0;
+uniform float ublurRadius_Stage1_c0_c0_c0_c0_c0_c0;
+uniform vec2 uScale_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 uTexDom_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec3 uDecalParams_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 uboundsUniform_Stage1_c0_c0_c1_c0_c0_c0;
+uniform float uxInvZoom_Stage1_c0_c0_c1_c0_c0_c0;
+uniform float uyInvZoom_Stage1_c0_c0_c1_c0_c0_c0;
+uniform float uxInvInset_Stage1_c0_c0_c1_c0_c0_c0;
+uniform float uyInvInset_Stage1_c0_c0_c1_c0_c0_c0;
+uniform vec2 uoffset_Stage1_c0_c0_c1_c0_c0_c0;
+uniform float ucornerRadius_Stage1_c0_c0_c1_c0_c1_c0;
+uniform vec4 uproxyRect_Stage1_c0_c0_c1_c0_c1_c0;
+uniform float ublurRadius_Stage1_c0_c0_c1_c0_c1_c0;
+uniform vec4 urectH_Stage1_c1_c0;
+uniform float uinvSixSigma_Stage1_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+uniform sampler2D uTextureSampler_2_Stage1;
+uniform sampler2D uTextureSampler_3_Stage1;
+uniform sampler2D uTextureSampler_4_Stage1;
+uniform sampler2D uTextureSampler_5_Stage1;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+noperspective in float vinCoverage_Stage0;
+vec4 RRectBlurEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 translatedFragPos = gl_FragCoord.xy - uproxyRect_Stage1_c0_c0_c0_c0_c0_c0.xy;
+ float threshold = ucornerRadius_Stage1_c0_c0_c0_c0_c0_c0 + 2.0 * ublurRadius_Stage1_c0_c0_c0_c0_c0_c0;
+ vec2 middle = (uproxyRect_Stage1_c0_c0_c0_c0_c0_c0.zw - uproxyRect_Stage1_c0_c0_c0_c0_c0_c0.xy) - 2.0 * threshold;
+ if (translatedFragPos.x >= threshold && translatedFragPos.x < middle.x + threshold) {
+ translatedFragPos.x = threshold;
+ } else if (translatedFragPos.x >= middle.x + threshold) {
+ translatedFragPos.x -= middle.x - 1.0;
+ }
+ if (translatedFragPos.y > threshold && translatedFragPos.y < middle.y + threshold) {
+ translatedFragPos.y = threshold;
+ } else if (translatedFragPos.y >= middle.y + threshold) {
+ translatedFragPos.y -= middle.y - 1.0;
+ }
+ vec2 proxyDims = vec2(2.0 * threshold + 1.0);
+ vec2 texCoord = translatedFragPos / proxyDims;
+ _output = _input * texture(uTextureSampler_0_Stage1, texCoord);
+ return _output;
+}
+vec4 DisplacementMap_Stage1_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 dColor = texture(uTextureSampler_1_Stage1, vTransformedCoords_0_Stage0);
+ dColor.xyz = dColor.w < 9.9999999747524271e-07 ? vec3(0.0) : clamp(dColor.xyz / dColor.w, 0.0, 1.0);
+ vec2 cCoords = vTransformedCoords_1_Stage0 + uScale_Stage1_c0_c0_c0_c0_c1_c0 * (dColor.zw - vec2(0.5));
+ {
+ vec2 origCoord = cCoords;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0_c1_c0.xy, uTexDom_Stage1_c0_c0_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ _output = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ return _output;
+}
+vec4 blend_dst_atop(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src + src.w * dst;
+}
+vec4 ComposeTwo_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_dst_atop(RRectBlurEffect_Stage1_c0_c0_c0_c0_c0_c0(inputColor), DisplacementMap_Stage1_c0_c0_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 MagnifierEffect_Stage1_c0_c0_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coord = vTransformedCoords_2_Stage0;
+ vec2 zoom_coord = uoffset_Stage1_c0_c0_c1_c0_c0_c0 + coord * vec2(uxInvZoom_Stage1_c0_c0_c1_c0_c0_c0, uyInvZoom_Stage1_c0_c0_c1_c0_c0_c0);
+ vec2 delta = (coord - uboundsUniform_Stage1_c0_c0_c1_c0_c0_c0.xy) * uboundsUniform_Stage1_c0_c0_c1_c0_c0_c0.zw;
+ delta = min(delta, vec2(1.0, 1.0) - delta);
+ delta *= vec2(uxInvInset_Stage1_c0_c0_c1_c0_c0_c0, uyInvInset_Stage1_c0_c0_c1_c0_c0_c0);
+ float weight = 0.0;
+ if (delta.x < 2.0 && delta.y < 2.0) {
+ delta = vec2(2.0, 2.0) - delta;
+ float dist = length(delta);
+ dist = max(2.0 - dist, 0.0);
+ weight = min(dist * dist, 1.0);
+ } else {
+ vec2 delta_squared = delta * delta;
+ weight = min(min(delta_squared.x, delta_squared.y), 1.0);
+ }
+ _output = texture(uTextureSampler_3_Stage1, mix(coord, zoom_coord, weight));
+ return _output;
+}
+vec4 RRectBlurEffect_Stage1_c0_c0_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 translatedFragPos = gl_FragCoord.xy - uproxyRect_Stage1_c0_c0_c1_c0_c1_c0.xy;
+ float threshold = ucornerRadius_Stage1_c0_c0_c1_c0_c1_c0 + 2.0 * ublurRadius_Stage1_c0_c0_c1_c0_c1_c0;
+ vec2 middle = (uproxyRect_Stage1_c0_c0_c1_c0_c1_c0.zw - uproxyRect_Stage1_c0_c0_c1_c0_c1_c0.xy) - 2.0 * threshold;
+ if (translatedFragPos.x >= threshold && translatedFragPos.x < middle.x + threshold) {
+ translatedFragPos.x = threshold;
+ } else if (translatedFragPos.x >= middle.x + threshold) {
+ translatedFragPos.x -= middle.x - 1.0;
+ }
+ if (translatedFragPos.y > threshold && translatedFragPos.y < middle.y + threshold) {
+ translatedFragPos.y = threshold;
+ } else if (translatedFragPos.y >= middle.y + threshold) {
+ translatedFragPos.y -= middle.y - 1.0;
+ }
+ vec2 proxyDims = vec2(2.0 * threshold + 1.0);
+ vec2 texCoord = translatedFragPos / proxyDims;
+ _output = _input * texture(uTextureSampler_4_Stage1, texCoord);
+ return _output;
+}
+vec4 blend_exclusion(vec4 src, vec4 dst) {
+ return vec4((dst.xyz + src.xyz) - (2.0 * dst.xyz) * src.xyz, src.w + (1.0 - src.w) * dst.w);
+}
+vec4 ComposeTwo_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_exclusion(MagnifierEffect_Stage1_c0_c0_c1_c0_c0_c0(inputColor), RRectBlurEffect_Stage1_c0_c0_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 blend_darken(vec4 src, vec4 dst) {
+ vec4 result = blend_src_over(src, dst);
+ result.xyz = min(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
+ return result;
+}
+vec4 ComposeTwo_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_darken(ComposeTwo_Stage1_c0_c0_c0_c0(inputColor), ComposeTwo_Stage1_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 RectBlurEffect_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ float xCoverage, yCoverage;
+ {
+ float x, y;
+ {
+ x = max(urectH_Stage1_c1_c0.x - gl_FragCoord.x, gl_FragCoord.x - urectH_Stage1_c1_c0.z);
+ y = max(urectH_Stage1_c1_c0.y - gl_FragCoord.y, gl_FragCoord.y - urectH_Stage1_c1_c0.w);
+ }
+ xCoverage = texture(uTextureSampler_5_Stage1, vec2(x * uinvSixSigma_Stage1_c1_c0, 0.5)).w;
+ yCoverage = texture(uTextureSampler_5_Stage1, vec2(y * uinvSixSigma_Stage1_c1_c0, 0.5)).w;
+ _output = (_input * xCoverage) * yCoverage;
+ }
+ _output = (_input * xCoverage) * yCoverage;
+ return _output;
+}
+vec4 blend_src_atop(vec4 src, vec4 dst) {
+ return dst.w * src + (1.0 - src.w) * dst;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ float alpha = 1.0;
+ alpha = vinCoverage_Stage0;
+ outputCoverage_Stage0 = vec4(alpha);
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_src_atop(ComposeTwo_Stage1_c0_c0(inputColor), RectBlurEffect_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ sk_FragColor = outputCoverage_Stage0 * output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in float inCoverage;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+noperspective out float vinCoverage_Stage0;
+void main() {
+ vec4 color = inColor;
+ vcolor_Stage0 = color;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(inPosition, 1.0)).xy;
+ vinCoverage_Stage0 = inCoverage;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1243.shader_test b/shaders/skia/1243.shader_test
new file mode 100644
index 0000000..ac7ee0f
--- /dev/null
+++ b/shaders/skia/1243.shader_test
@@ -0,0 +1,339 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_KHR_blend_equation_advanced : require
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+layout (blend_support_all_equations) out ;
+uniform vec4 uColor_Stage0;
+uniform vec4 uCoordTransformMatrix_2_Stage0;
+uniform float uPixelSize_Stage1;
+uniform vec2 uRange_Stage1;
+uniform vec4 ucircleData_Stage2;
+uniform float ucornerRadius_Stage3_c1_c0;
+uniform vec4 uproxyRect_Stage3_c1_c0;
+uniform float ublurRadius_Stage3_c1_c0;
+uniform vec2 uImageIncrement_Stage4_c2_c0;
+uniform float uSurfaceScale_Stage4_c2_c0;
+uniform vec3 uLightColor_Stage4_c2_c0;
+uniform float uKS_Stage4_c2_c0;
+uniform float uShininess_Stage4_c2_c0;
+uniform vec4 uTexDom_Stage4_c2_c0;
+uniform vec3 uDecalParams_Stage4_c2_c0;
+uniform vec3 uLightDirection_Stage4_c2_c0;
+uniform vec4 ucolor0_Stage5;
+uniform vec4 ucolor1_Stage5;
+uniform vec4 ucolor2_Stage5;
+uniform vec4 ucolor3_Stage5;
+uniform vec4 ucolor4_Stage5;
+uniform vec4 ucolor5_Stage5;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+uniform sampler2D uTextureSampler_0_Stage3;
+uniform sampler2D uTextureSampler_1_Stage3;
+uniform sampler2D uTextureSampler_0_Stage4;
+noperspective in vec3 vDashParam_Stage0;
+noperspective in vec2 vCircleParams_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_3_Stage0;
+vec4 ColorTableEffect_Stage3_c0_c0(vec4 _input) {
+ vec4 _output;
+ float nonZeroAlpha = max(_input.w, 9.9999997473787516e-05);
+ vec4 coord = vec4(_input.xyz / nonZeroAlpha, nonZeroAlpha);
+ coord = coord * 0.9960939884185791 + vec4(0.0019529999699443579, 0.0019529999699443579, 0.0019529999699443579, 0.0019529999699443579);
+ _output.w = texture(uTextureSampler_0_Stage3, vec2(coord.w, 0.125)).w;
+ _output.x = texture(uTextureSampler_0_Stage3, vec2(coord.x, 0.375)).w;
+ _output.y = texture(uTextureSampler_0_Stage3, vec2(coord.y, 0.625)).w;
+ _output.z = texture(uTextureSampler_0_Stage3, vec2(coord.z, 0.875)).w;
+ _output.xyz *= _output.w;
+ return _output;
+}
+vec4 RRectBlurEffect_Stage3_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 translatedFragPos = gl_FragCoord.xy - uproxyRect_Stage3_c1_c0.xy;
+ float threshold = ucornerRadius_Stage3_c1_c0 + 2.0 * ublurRadius_Stage3_c1_c0;
+ vec2 middle = (uproxyRect_Stage3_c1_c0.zw - uproxyRect_Stage3_c1_c0.xy) - 2.0 * threshold;
+ if (translatedFragPos.x >= threshold && translatedFragPos.x < middle.x + threshold) {
+ translatedFragPos.x = threshold;
+ } else if (translatedFragPos.x >= middle.x + threshold) {
+ translatedFragPos.x -= middle.x - 1.0;
+ }
+ if (translatedFragPos.y > threshold && translatedFragPos.y < middle.y + threshold) {
+ translatedFragPos.y = threshold;
+ } else if (translatedFragPos.y >= middle.y + threshold) {
+ translatedFragPos.y -= middle.y - 1.0;
+ }
+ vec2 proxyDims = vec2(2.0 * threshold + 1.0);
+ vec2 texCoord = translatedFragPos / proxyDims;
+ _output = _input * texture(uTextureSampler_1_Stage3, texCoord);
+ return _output;
+}
+vec4 light_Stage4_c2_c0(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ vec3 halfDir = normalize(surfaceToLight + vec3(0.0, 0.0, 1.0));
+ float colorScale = uKS_Stage4_c2_c0 * pow(dot(normal, halfDir), uShininess_Stage4_c2_c0);
+ vec3 color = lightColor * clamp(colorScale, 0.0, 1.0);
+ return vec4(color, max(max(color.x, color.y), color.z));
+}
+float sobel_Stage4_c2_c0(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage4_c2_c0(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage4_c2_c0(float m[9], float surfaceScale) {
+ return pointToNormal_Stage4_c2_c0(sobel_Stage4_c2_c0(0.0, 0.0, m[4], m[5], m[7], m[8], 0.66666698455810547), sobel_Stage4_c2_c0(0.0, 0.0, m[4], m[7], m[5], m[8], 0.66666698455810547), surfaceScale);
+}
+vec4 SpecularLighting_Stage4_c2_c0(vec4 _input, vec2 _coords) {
+ _coords = _coords * uCoordTransformMatrix_2_Stage0.xz + uCoordTransformMatrix_2_Stage0.yw;
+ vec4 _output;
+ vec2 coord = _coords;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage4_c2_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage4_c2_c0.xy, uTexDom_Stage4_c2_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage4, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage4_c2_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage4_c2_c0.y);
+ if (err > uDecalParams_Stage4_c2_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage4_c2_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp0 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage4_c2_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage4_c2_c0.xy, uTexDom_Stage4_c2_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage4, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage4_c2_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage4_c2_c0.y);
+ if (err > uDecalParams_Stage4_c2_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage4_c2_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage4_c2_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage4_c2_c0.xy, uTexDom_Stage4_c2_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage4, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage4_c2_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage4_c2_c0.y);
+ if (err > uDecalParams_Stage4_c2_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage4_c2_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage4_c2_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage4_c2_c0.xy, uTexDom_Stage4_c2_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage4, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage4_c2_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage4_c2_c0.y);
+ if (err > uDecalParams_Stage4_c2_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage4_c2_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage4_c2_c0.xy, uTexDom_Stage4_c2_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage4, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage4_c2_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage4_c2_c0.y);
+ if (err > uDecalParams_Stage4_c2_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage4_c2_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage4_c2_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage4_c2_c0.xy, uTexDom_Stage4_c2_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage4, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage4_c2_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage4_c2_c0.y);
+ if (err > uDecalParams_Stage4_c2_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage4_c2_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp5 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage4_c2_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage4_c2_c0.xy, uTexDom_Stage4_c2_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage4, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage4_c2_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage4_c2_c0.y);
+ if (err > uDecalParams_Stage4_c2_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage4_c2_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp6 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage4_c2_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage4_c2_c0.xy, uTexDom_Stage4_c2_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage4, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage4_c2_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage4_c2_c0.y);
+ if (err > uDecalParams_Stage4_c2_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage4_c2_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp7 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage4_c2_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage4_c2_c0.xy, uTexDom_Stage4_c2_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage4, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage4_c2_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage4_c2_c0.y);
+ if (err > uDecalParams_Stage4_c2_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage4_c2_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp8 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = uLightDirection_Stage4_c2_c0;
+ _output = light_Stage4_c2_c0(normal_Stage4_c2_c0(m, uSurfaceScale_Stage4_c2_c0), surfaceToLight, uLightColor_Stage4_c2_c0);
+ _output *= _input;
+ return _output;
+}
+vec4 blend_xor(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src + (1.0 - src.w) * dst;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = uColor_Stage0;
+ float xShifted = vDashParam_Stage0.x - floor(vDashParam_Stage0.x / vDashParam_Stage0.z) * vDashParam_Stage0.z;
+ vec2 fragPosShifted = vec2(xShifted, vDashParam_Stage0.y);
+ vec2 center = vec2(vCircleParams_Stage0.y, 0.0);
+ float dist = length(center - fragPosShifted);
+ float alpha = 1.0;
+ alpha *= dist < vCircleParams_Stage0.x + 0.5 ? 1.0 : 0.0;
+ outputCoverage_Stage0 = vec4(alpha);
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = vec4(1.0, 1.0, 1.0, 1.0);
+ vec2 coord = vTransformedCoords_0_Stage0;
+ coord.x -= 5.0 * uPixelSize_Stage1;
+ for (int i = 0;i < 11; i++) {
+ output_Stage1 = min(output_Stage1, texture(uTextureSampler_0_Stage1, coord));
+ coord.x += uPixelSize_Stage1;
+ }
+ output_Stage1 *= outputColor_Stage0;
+ }
+ vec4 output_Stage2;
+ {
+ vec2 vec = vec2((gl_FragCoord.x - ucircleData_Stage2.x) * ucircleData_Stage2.w, (gl_FragCoord.y - ucircleData_Stage2.y) * ucircleData_Stage2.w);
+ float dist = length(vec) + (0.5 - ucircleData_Stage2.z) * ucircleData_Stage2.w;
+ output_Stage2 = output_Stage1 * texture(uTextureSampler_0_Stage2, vec2(dist, 0.5)).w;
+ }
+ vec4 output_Stage3;
+ {
+ vec4 inputColor = vec4(output_Stage2.xyz, 1.0);
+ output_Stage3 = blend_xor(ColorTableEffect_Stage3_c0_c0(inputColor), RRectBlurEffect_Stage3_c1_c0(inputColor));
+ output_Stage3 *= output_Stage2.w;
+ }
+ vec4 output_Stage4;
+ {
+ float coord = vTransformedCoords_1_Stage0.y - 0.5;
+ float f = fract(coord);
+ coord += 0.5 - f;
+ float f2 = f * f;
+ vec4 w = mat4(0.055555555555555552, 0.88888888888888884, 0.055555555555555552, 0.0, -0.5, 0.0, 0.5, 0.0, 0.83333333333333337, -2.0, 1.5, -0.33333333333333331, -0.3888888888888889, 1.1666666666666667, -1.1666666666666667, 0.3888888888888889) * vec4(1.0, f, f2, f2 * f);
+ vec4 c[4];
+ c[0] = SpecularLighting_Stage4_c2_c0(vec4(1.0), vec2(vTransformedCoords_1_Stage0.x, coord + -1.0));
+ c[1] = SpecularLighting_Stage4_c2_c0(vec4(1.0), vec2(vTransformedCoords_1_Stage0.x, coord));
+ c[2] = SpecularLighting_Stage4_c2_c0(vec4(1.0), vec2(vTransformedCoords_1_Stage0.x, coord + 1.0));
+ c[3] = SpecularLighting_Stage4_c2_c0(vec4(1.0), vec2(vTransformedCoords_1_Stage0.x, coord + 2.0));
+ vec4 bicubicColor = ((c[0] * w.x + c[1] * w.y) + c[2] * w.z) + c[3] * w.w;
+ bicubicColor = clamp(bicubicColor, 0.0, 1.0);
+ output_Stage4 = bicubicColor * output_Stage3;
+ }
+ vec4 output_Stage5;
+ {
+ output_Stage5 = output_Stage4;
+ float alpha = 255.0 * output_Stage5.w;
+ if (alpha < 0.5) {
+ output_Stage5 = ucolor0_Stage5;
+ } else if (alpha < 1.5) {
+ output_Stage5 = ucolor1_Stage5;
+ } else if (alpha < 2.5) {
+ output_Stage5 = ucolor2_Stage5;
+ } else if (alpha < 3.5) {
+ output_Stage5 = ucolor3_Stage5;
+ } else if (alpha < 4.5) {
+ output_Stage5 = ucolor4_Stage5;
+ } else {
+ output_Stage5 = ucolor5_Stage5;
+ }
+ }
+ {
+ sk_FragColor = outputCoverage_Stage0 * output_Stage5;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_3_Stage0;
+in vec2 inPosition;
+in vec3 inDashParams;
+in vec2 inCircleParams;
+noperspective out vec3 vDashParam_Stage0;
+noperspective out vec2 vCircleParams_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_3_Stage0;
+void main() {
+ vDashParam_Stage0 = inDashParams;
+ vCircleParams_Stage0 = inCircleParams;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_3_Stage0 = (uCoordTransformMatrix_3_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1246.shader_test b/shaders/skia/1246.shader_test
new file mode 100644
index 0000000..3727674
--- /dev/null
+++ b/shaders/skia/1246.shader_test
@@ -0,0 +1,157 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uColor_Stage0;
+uniform vec2 uImageIncrement_Stage1;
+uniform vec2 uBounds_Stage1;
+uniform vec4 uKernel_Stage1[7];
+uniform vec4 uinnerRect_Stage2;
+uniform vec2 uradiusPlusHalf_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = uColor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0 - 12.0 * uImageIncrement_Stage1;
+ vec2 coordSampled = vec2(0.0, 0.0);
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1.x, uBounds_Stage1.y - uBounds_Stage1.x) + uBounds_Stage1.x;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1.x, uBounds_Stage1.y - uBounds_Stage1.x) + uBounds_Stage1.x;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1.x, uBounds_Stage1.y - uBounds_Stage1.x) + uBounds_Stage1.x;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1.x, uBounds_Stage1.y - uBounds_Stage1.x) + uBounds_Stage1.x;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1.x, uBounds_Stage1.y - uBounds_Stage1.x) + uBounds_Stage1.x;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1.x, uBounds_Stage1.y - uBounds_Stage1.x) + uBounds_Stage1.x;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1.x, uBounds_Stage1.y - uBounds_Stage1.x) + uBounds_Stage1.x;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1.x, uBounds_Stage1.y - uBounds_Stage1.x) + uBounds_Stage1.x;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1.x, uBounds_Stage1.y - uBounds_Stage1.x) + uBounds_Stage1.x;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1.x, uBounds_Stage1.y - uBounds_Stage1.x) + uBounds_Stage1.x;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1.x, uBounds_Stage1.y - uBounds_Stage1.x) + uBounds_Stage1.x;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1.x, uBounds_Stage1.y - uBounds_Stage1.x) + uBounds_Stage1.x;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1.x, uBounds_Stage1.y - uBounds_Stage1.x) + uBounds_Stage1.x;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1.x, uBounds_Stage1.y - uBounds_Stage1.x) + uBounds_Stage1.x;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1.x, uBounds_Stage1.y - uBounds_Stage1.x) + uBounds_Stage1.x;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1.x, uBounds_Stage1.y - uBounds_Stage1.x) + uBounds_Stage1.x;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1.x, uBounds_Stage1.y - uBounds_Stage1.x) + uBounds_Stage1.x;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[4].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1.x, uBounds_Stage1.y - uBounds_Stage1.x) + uBounds_Stage1.x;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[4].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1.x, uBounds_Stage1.y - uBounds_Stage1.x) + uBounds_Stage1.x;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[4].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1.x, uBounds_Stage1.y - uBounds_Stage1.x) + uBounds_Stage1.x;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[4].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1.x, uBounds_Stage1.y - uBounds_Stage1.x) + uBounds_Stage1.x;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[5].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1.x, uBounds_Stage1.y - uBounds_Stage1.x) + uBounds_Stage1.x;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[5].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1.x, uBounds_Stage1.y - uBounds_Stage1.x) + uBounds_Stage1.x;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[5].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1.x, uBounds_Stage1.y - uBounds_Stage1.x) + uBounds_Stage1.x;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[5].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1.x, uBounds_Stage1.y - uBounds_Stage1.x) + uBounds_Stage1.x;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[6].x;
+ coord += uImageIncrement_Stage1;
+ output_Stage1 *= outputColor_Stage0;
+ }
+ vec4 output_Stage2;
+ {
+ vec2 dxy0 = uinnerRect_Stage2.xy - gl_FragCoord.xy;
+ vec2 dxy1 = gl_FragCoord.xy - uinnerRect_Stage2.zw;
+ vec2 dxy = max(max(dxy0, dxy1), 0.0);
+ float alpha = clamp(uradiusPlusHalf_Stage2.x - length(dxy), 0.0, 1.0);
+ output_Stage2 = output_Stage1 * alpha;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec2 pos2 = (uViewM_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1249.shader_test b/shaders/skia/1249.shader_test
new file mode 100644
index 0000000..e1fd520
--- /dev/null
+++ b/shaders/skia/1249.shader_test
@@ -0,0 +1,138 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_KHR_blend_equation_advanced : require
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+layout (blend_support_all_equations) out ;
+uniform vec4 uColor_Stage0;
+uniform vec3 uedges_Stage1_c0_c0[2];
+uniform vec4 uleftBorderColor_Stage2_c1_c0;
+uniform vec4 urightBorderColor_Stage2_c1_c0;
+uniform vec4 uscale0_1_Stage2_c1_c0_c1_c0;
+uniform vec4 uscale2_3_Stage2_c1_c0_c1_c0;
+uniform vec4 uscale4_5_Stage2_c1_c0_c1_c0;
+uniform vec4 uscale6_7_Stage2_c1_c0_c1_c0;
+uniform vec4 ubias0_1_Stage2_c1_c0_c1_c0;
+uniform vec4 ubias2_3_Stage2_c1_c0_c1_c0;
+uniform vec4 ubias4_5_Stage2_c1_c0_c1_c0;
+uniform vec4 ubias6_7_Stage2_c1_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage2_c1_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage2_c1_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage3;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 ConvexPoly_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ float alpha = 1.0;
+ float edge;
+ edge = dot(uedges_Stage1_c0_c0[0], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage1_c0_c0[1], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ _output = _input * alpha;
+ return _output;
+}
+vec4 LinearGradientLayout_Stage2_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage2_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage2_c1_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage2_c1_c0_c1_c0.x) {
+ scale = uscale0_1_Stage2_c1_c0_c1_c0;
+ bias = ubias0_1_Stage2_c1_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage2_c1_c0_c1_c0;
+ bias = ubias2_3_Stage2_c1_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage2_c1_c0_c1_c0.z) {
+ scale = uscale4_5_Stage2_c1_c0_c1_c0;
+ bias = ubias4_5_Stage2_c1_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage2_c1_c0_c1_c0;
+ bias = ubias6_7_Stage2_c1_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage2_c1_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage2_c1_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage2_c1_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage2_c1_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_src_out(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = uColor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_src_out(outputColor_Stage0, ConvexPoly_Stage1_c0_c0(vec4(1.0)));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_dst_in(output_Stage1, ClampedGradientEffect_Stage2_c1_c0(vec4(1.0)));
+ }
+ vec4 output_Stage3;
+ {
+ output_Stage3 = texture(uTextureSampler_0_Stage3, vTransformedCoords_1_Stage0) * output_Stage2;
+ }
+ {
+ sk_FragColor = output_Stage3;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 inLocalCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vec2 pos2 = position;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_PointSize = 1.0;
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1252.shader_test b/shaders/skia/1252.shader_test
new file mode 100644
index 0000000..3e53ba9
--- /dev/null
+++ b/shaders/skia/1252.shader_test
@@ -0,0 +1,136 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform float ubias_Stage1_c0_c0_c0_c0;
+uniform float uscale_Stage1_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vEllipseOffsets0_Stage0;
+noperspective in vec2 vEllipseOffsets1_Stage0;
+noperspective in vec4 vinColor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 SweepGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float angle;
+ {
+ angle = atan(-vTransformedCoords_0_Stage0.y, -vTransformedCoords_0_Stage0.x);
+ }
+ float t = ((angle * 0.15915493667125702 + 0.5) + ubias_Stage1_c0_c0_c0_c0) * uscale_Stage1_c0_c0_c0_c0;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = SweepGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ vec2 scaledOffset = vEllipseOffsets0_Stage0;
+ float test = dot(scaledOffset, scaledOffset) - 1.0;
+ vec2 duvdx = dFdx(vEllipseOffsets0_Stage0);
+ vec2 duvdy = -dFdy(vEllipseOffsets0_Stage0);
+ vec2 grad = vec2(vEllipseOffsets0_Stage0.x * duvdx.x + vEllipseOffsets0_Stage0.y * duvdx.y, vEllipseOffsets0_Stage0.x * duvdy.x + vEllipseOffsets0_Stage0.y * duvdy.y);
+ float grad_dot = 4.0 * dot(grad, grad);
+ grad_dot = max(grad_dot, 1.1754999560161448e-38);
+ float invlen = inversesqrt(grad_dot);
+ float edgeAlpha = clamp(0.5 - test * invlen, 0.0, 1.0);
+ scaledOffset = vEllipseOffsets1_Stage0;
+ test = dot(scaledOffset, scaledOffset) - 1.0;
+ duvdx = dFdx(vEllipseOffsets1_Stage0);
+ duvdy = -dFdy(vEllipseOffsets1_Stage0);
+ grad = vec2(vEllipseOffsets1_Stage0.x * duvdx.x + vEllipseOffsets1_Stage0.y * duvdx.y, vEllipseOffsets1_Stage0.x * duvdy.x + vEllipseOffsets1_Stage0.y * duvdy.y);
+ grad_dot = 4.0 * dot(grad, grad);
+ invlen = inversesqrt(grad_dot);
+ edgeAlpha *= clamp(0.5 + test * invlen, 0.0, 1.0);
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_dst_in(outputCoverage_Stage0, ClampedGradientEffect_Stage1_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = 1.0 - output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec2 inEllipseOffsets0;
+in vec2 inEllipseOffsets1;
+noperspective out vec2 vEllipseOffsets0_Stage0;
+noperspective out vec2 vEllipseOffsets1_Stage0;
+noperspective out vec4 vinColor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vEllipseOffsets0_Stage0 = inEllipseOffsets0;
+ vEllipseOffsets1_Stage0 = inEllipseOffsets1;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1255.shader_test b/shaders/skia/1255.shader_test
new file mode 100644
index 0000000..879b8ad
--- /dev/null
+++ b/shaders/skia/1255.shader_test
@@ -0,0 +1,306 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform float uinnerThreshold_Stage2;
+uniform float uouterThreshold_Stage2;
+uniform float uinnerThreshold_Stage3;
+uniform float uouterThreshold_Stage3;
+uniform vec2 uImageIncrement_Stage4;
+uniform float uSurfaceScale_Stage4;
+uniform vec3 uLightColor_Stage4;
+uniform float uKD_Stage4;
+uniform vec4 uTexDom_Stage4;
+uniform vec3 uDecalParams_Stage4;
+uniform vec3 uLightLocation_Stage4;
+uniform mat4 um_Stage5;
+uniform vec4 uv_Stage5;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+uniform sampler2D uTextureSampler_0_Stage3;
+uniform sampler2D uTextureSampler_0_Stage4;
+noperspective in vec4 vQuadEdge_Stage0;
+noperspective in vec4 vinColor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+noperspective in vec2 vTransformedCoords_3_Stage0;
+vec4 light_Stage4(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ float colorScale = uKD_Stage4 * dot(normal, surfaceToLight);
+ return vec4(lightColor * clamp(colorScale, 0.0, 1.0), 1.0);
+}
+float sobel_Stage4(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage4(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage4(float m[9], float surfaceScale) {
+ return pointToNormal_Stage4(sobel_Stage4(0.0, 0.0, m[4], m[5], m[7], m[8], 0.66666698455810547), sobel_Stage4(0.0, 0.0, m[4], m[7], m[5], m[8], 0.66666698455810547), surfaceScale);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vinColor_Stage0;
+ float edgeAlpha;
+ vec2 duvdx = dFdx(vQuadEdge_Stage0.xy);
+ vec2 duvdy = dFdy(vQuadEdge_Stage0.xy);
+ if (vQuadEdge_Stage0.z > 0.0 && vQuadEdge_Stage0.w > 0.0) {
+ edgeAlpha = min(min(vQuadEdge_Stage0.z, vQuadEdge_Stage0.w) + 0.5, 1.0);
+ } else {
+ vec2 gF = vec2((2.0 * vQuadEdge_Stage0.x) * duvdx.x - duvdx.y, (2.0 * vQuadEdge_Stage0.x) * duvdy.x - duvdy.y);
+ edgeAlpha = vQuadEdge_Stage0.x * vQuadEdge_Stage0.x - vQuadEdge_Stage0.y;
+ edgeAlpha = clamp(0.5 - edgeAlpha / length(gF), 0.0, 1.0);
+ }
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ vec4 output_Stage1;
+ {
+ float nonZeroAlpha = max(outputCoverage_Stage0.w, 9.9999997473787516e-05);
+ vec4 coord = vec4(outputCoverage_Stage0.xyz / nonZeroAlpha, nonZeroAlpha);
+ coord = coord * 0.9960939884185791 + vec4(0.0019529999699443579, 0.0019529999699443579, 0.0019529999699443579, 0.0019529999699443579);
+ output_Stage1.w = texture(uTextureSampler_0_Stage1, vec2(coord.w, 0.125)).w;
+ output_Stage1.x = texture(uTextureSampler_0_Stage1, vec2(coord.x, 0.375)).w;
+ output_Stage1.y = texture(uTextureSampler_0_Stage1, vec2(coord.y, 0.625)).w;
+ output_Stage1.z = texture(uTextureSampler_0_Stage1, vec2(coord.z, 0.875)).w;
+ output_Stage1.xyz *= output_Stage1.w;
+ }
+ vec4 output_Stage2;
+ {
+ vec4 color = output_Stage1;
+ vec4 mask_color = texture(uTextureSampler_0_Stage2, vTransformedCoords_0_Stage0);
+ if (mask_color.w < 0.5) {
+ if (color.w > uouterThreshold_Stage2) {
+ float scale = uouterThreshold_Stage2 / color.w;
+ color.xyz *= scale;
+ color.w = uouterThreshold_Stage2;
+ }
+ } else if (color.w < uinnerThreshold_Stage2) {
+ float scale = uinnerThreshold_Stage2 / max(0.0010000000474974513, color.w);
+ color.xyz *= scale;
+ color.w = uinnerThreshold_Stage2;
+ }
+ output_Stage2 = color;
+ }
+ vec4 output_Stage3;
+ {
+ vec4 color = output_Stage2;
+ vec4 mask_color = texture(uTextureSampler_0_Stage3, vTransformedCoords_1_Stage0);
+ if (mask_color.w < 0.5) {
+ if (color.w > uouterThreshold_Stage3) {
+ float scale = uouterThreshold_Stage3 / color.w;
+ color.xyz *= scale;
+ color.w = uouterThreshold_Stage3;
+ }
+ } else if (color.w < uinnerThreshold_Stage3) {
+ float scale = uinnerThreshold_Stage3 / max(0.0010000000474974513, color.w);
+ color.xyz *= scale;
+ color.w = uinnerThreshold_Stage3;
+ }
+ output_Stage3 = color;
+ }
+ vec4 output_Stage4;
+ {
+ vec2 coord = vTransformedCoords_2_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage4;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage4.xy, uTexDom_Stage4.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage4, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage4.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage4.y);
+ if (err > uDecalParams_Stage4.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage4.z < 1.0) {
+ err = 0.0;
+ }
+ temp0 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage4;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage4.xy, uTexDom_Stage4.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage4, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage4.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage4.y);
+ if (err > uDecalParams_Stage4.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage4.z < 1.0) {
+ err = 0.0;
+ }
+ temp1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage4;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage4.xy, uTexDom_Stage4.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage4, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage4.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage4.y);
+ if (err > uDecalParams_Stage4.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage4.z < 1.0) {
+ err = 0.0;
+ }
+ temp2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage4;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage4.xy, uTexDom_Stage4.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage4, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage4.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage4.y);
+ if (err > uDecalParams_Stage4.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage4.z < 1.0) {
+ err = 0.0;
+ }
+ temp3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage4.xy, uTexDom_Stage4.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage4, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage4.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage4.y);
+ if (err > uDecalParams_Stage4.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage4.z < 1.0) {
+ err = 0.0;
+ }
+ temp4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage4;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage4.xy, uTexDom_Stage4.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage4, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage4.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage4.y);
+ if (err > uDecalParams_Stage4.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage4.z < 1.0) {
+ err = 0.0;
+ }
+ temp5 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage4;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage4.xy, uTexDom_Stage4.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage4, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage4.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage4.y);
+ if (err > uDecalParams_Stage4.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage4.z < 1.0) {
+ err = 0.0;
+ }
+ temp6 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage4;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage4.xy, uTexDom_Stage4.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage4, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage4.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage4.y);
+ if (err > uDecalParams_Stage4.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage4.z < 1.0) {
+ err = 0.0;
+ }
+ temp7 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage4;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage4.xy, uTexDom_Stage4.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage4, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage4.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage4.y);
+ if (err > uDecalParams_Stage4.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage4.z < 1.0) {
+ err = 0.0;
+ }
+ temp8 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = normalize(uLightLocation_Stage4 - vec3(gl_FragCoord.xy, uSurfaceScale_Stage4 * m[4]));
+ output_Stage4 = light_Stage4(normal_Stage4(m, uSurfaceScale_Stage4), surfaceToLight, uLightColor_Stage4);
+ output_Stage4 *= output_Stage3;
+ }
+ vec4 output_Stage5;
+ {
+ vec4 inputColor = output_Stage4;
+ {
+ float nonZeroAlpha = max(inputColor.w, 9.9999997473787516e-05);
+ inputColor = vec4(inputColor.xyz / nonZeroAlpha, inputColor.w);
+ }
+ output_Stage5 = um_Stage5 * inputColor + uv_Stage5;
+ {
+ output_Stage5.w = clamp(output_Stage5.w, 0.0, 1.0);
+ }
+ }
+ vec4 output_Stage6;
+ {
+ output_Stage6 = output_Stage5;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_3_Stage0.x);
+ uint y = uint(vTransformedCoords_3_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ output_Stage6 = vec4(clamp(output_Stage6.xyz + value * 0.01587301678955555, 0.0, output_Stage6.w), output_Stage6.w);
+ }
+ {
+ sk_FragColor = outputColor_Stage0 * output_Stage6;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+uniform mat3 uCoordTransformMatrix_3_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec4 inQuadEdge;
+noperspective out vec4 vQuadEdge_Stage0;
+noperspective out vec4 vinColor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+noperspective out vec2 vTransformedCoords_3_Stage0;
+void main() {
+ vQuadEdge_Stage0 = inQuadEdge;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_3_Stage0 = (uCoordTransformMatrix_3_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1258.shader_test b/shaders/skia/1258.shader_test
new file mode 100644
index 0000000..ff3b966
--- /dev/null
+++ b/shaders/skia/1258.shader_test
@@ -0,0 +1,54 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+noperspective in vec2 vEllipseOffsets_Stage0;
+noperspective in vec4 vEllipseRadii_Stage0;
+noperspective in vec4 vinColor_Stage0;
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ vec2 offset = vEllipseOffsets_Stage0;
+ offset *= vEllipseRadii_Stage0.xy;
+ float test = dot(offset, offset) - 1.0;
+ vec2 grad = (2.0 * offset) * vEllipseRadii_Stage0.xy;
+ float grad_dot = dot(grad, grad);
+ grad_dot = max(grad_dot, 1.1754999560161448e-38);
+ float invlen = inversesqrt(grad_dot);
+ float edgeAlpha = clamp(0.5 - test * invlen, 0.0, 1.0);
+ offset = vEllipseOffsets_Stage0 * vEllipseRadii_Stage0.zw;
+ test = dot(offset, offset) - 1.0;
+ grad = (2.0 * offset) * vEllipseRadii_Stage0.zw;
+ grad_dot = dot(grad, grad);
+ invlen = inversesqrt(grad_dot);
+ edgeAlpha *= clamp(0.5 + test * invlen, 0.0, 1.0);
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ {
+ sk_FragColor = 1.0 - outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 inPosition;
+in vec4 inColor;
+in vec2 inEllipseOffset;
+in vec4 inEllipseRadii;
+noperspective out vec2 vEllipseOffsets_Stage0;
+noperspective out vec4 vEllipseRadii_Stage0;
+noperspective out vec4 vinColor_Stage0;
+void main() {
+ vEllipseOffsets_Stage0 = inEllipseOffset;
+ vEllipseRadii_Stage0 = inEllipseRadii;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = inPosition;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1261.shader_test b/shaders/skia/1261.shader_test
new file mode 100644
index 0000000..ba24c70
--- /dev/null
+++ b/shaders/skia/1261.shader_test
@@ -0,0 +1,42 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uColor_Stage0;
+noperspective in vec3 vDashParams_Stage0;
+noperspective in vec4 vRectParams_Stage0;
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ float xShifted = vDashParams_Stage0.x - floor(vDashParams_Stage0.x / vDashParams_Stage0.z) * vDashParams_Stage0.z;
+ vec2 fragPosShifted = vec2(xShifted, vDashParams_Stage0.y);
+ float alpha = 1.0;
+ alpha *= fragPosShifted.x - vRectParams_Stage0.x > -0.5 ? 1.0 : 0.0;
+ alpha *= vRectParams_Stage0.z - fragPosShifted.x >= -0.5 ? 1.0 : 0.0;
+ outputCoverage_Stage0 = vec4(alpha);
+ }
+ {
+ sk_FragColor = outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 inPosition;
+in vec3 inDashParams;
+in vec4 inRect;
+noperspective out vec3 vDashParams_Stage0;
+noperspective out vec4 vRectParams_Stage0;
+void main() {
+ vDashParams_Stage0 = inDashParams;
+ vRectParams_Stage0 = inRect;
+ vec2 pos2 = inPosition;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1264.shader_test b/shaders/skia/1264.shader_test
new file mode 100644
index 0000000..b5e999c
--- /dev/null
+++ b/shaders/skia/1264.shader_test
@@ -0,0 +1,46 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+noperspective in vec4 vQuadEdge_Stage0;
+noperspective in vec4 vinColor_Stage0;
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ float edgeAlpha;
+ vec2 duvdx = dFdx(vQuadEdge_Stage0.xy);
+ vec2 duvdy = dFdy(vQuadEdge_Stage0.xy);
+ if (vQuadEdge_Stage0.z > 0.0 && vQuadEdge_Stage0.w > 0.0) {
+ edgeAlpha = min(min(vQuadEdge_Stage0.z, vQuadEdge_Stage0.w) + 0.5, 1.0);
+ } else {
+ vec2 gF = vec2((2.0 * vQuadEdge_Stage0.x) * duvdx.x - duvdx.y, (2.0 * vQuadEdge_Stage0.x) * duvdy.x - duvdy.y);
+ edgeAlpha = vQuadEdge_Stage0.x * vQuadEdge_Stage0.x - vQuadEdge_Stage0.y;
+ edgeAlpha = clamp(0.5 - edgeAlpha / length(gF), 0.0, 1.0);
+ }
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ {
+ sk_FragColor = 1.0 - outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 inPosition;
+in vec4 inColor;
+in vec4 inQuadEdge;
+noperspective out vec4 vQuadEdge_Stage0;
+noperspective out vec4 vinColor_Stage0;
+void main() {
+ vQuadEdge_Stage0 = inQuadEdge;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = inPosition;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1267.shader_test b/shaders/skia/1267.shader_test
new file mode 100644
index 0000000..23460e2
--- /dev/null
+++ b/shaders/skia/1267.shader_test
@@ -0,0 +1,485 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uScale_Stage1_c0_c0_c0_c0_c0_c0;
+uniform vec4 uTexDom_Stage1_c0_c0_c0_c0_c0_c0;
+uniform vec3 uDecalParams_Stage1_c0_c0_c0_c0_c0_c0;
+uniform vec2 uImageIncrement_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 uKernel_Stage1_c0_c0_c0_c0_c1_c0[6];
+uniform vec4 uinnerRect_Stage1_c0_c0_c1_c0_c0_c0;
+uniform vec4 uinvRadiiLTRB_Stage1_c0_c0_c1_c0_c0_c0;
+uniform vec4 urectH_Stage1_c0_c0_c1_c0_c1_c0;
+uniform float uinvSixSigma_Stage1_c0_c0_c1_c0_c1_c0;
+uniform vec2 uImageIncrement_Stage1_c1_c0;
+uniform float uSurfaceScale_Stage1_c1_c0;
+uniform vec3 uLightColor_Stage1_c1_c0;
+uniform float uKS_Stage1_c1_c0;
+uniform float uShininess_Stage1_c1_c0;
+uniform vec4 uTexDom_Stage1_c1_c0;
+uniform vec3 uDecalParams_Stage1_c1_c0;
+uniform vec3 uLightLocation_Stage1_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+uniform sampler2D uTextureSampler_2_Stage1;
+uniform sampler2D uTextureSampler_3_Stage1;
+uniform sampler2D uTextureSampler_4_Stage1;
+in vec4 vcolor_Stage0;
+in vec2 vTransformedCoords_0_Stage0;
+in vec2 vTransformedCoords_1_Stage0;
+in vec2 vTransformedCoords_2_Stage0;
+in vec2 vTransformedCoords_3_Stage0;
+vec4 DisplacementMap_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 dColor = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ dColor.xyz = dColor.w < 9.9999999747524271e-07 ? vec3(0.0) : clamp(dColor.xyz / dColor.w, 0.0, 1.0);
+ vec2 cCoords = vTransformedCoords_1_Stage0 + uScale_Stage1_c0_c0_c0_c0_c0_c0 * (dColor.yw - vec2(0.5));
+ {
+ vec2 origCoord = cCoords;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ _output = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ return _output;
+}
+vec4 GaussianConvolution_Stage1_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_2_Stage0 - 10.0 * uImageIncrement_Stage1_c0_c0_c0_c0_c1_c0;
+ vec2 coordSampled = vec2(0.0, 0.0);
+ coordSampled = coord;
+ _output += texture(uTextureSampler_2_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c0_c0_c1_c0[0].x;
+ coord += uImageIncrement_Stage1_c0_c0_c0_c0_c1_c0;
+ coordSampled = coord;
+ _output += texture(uTextureSampler_2_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c0_c0_c1_c0[0].y;
+ coord += uImageIncrement_Stage1_c0_c0_c0_c0_c1_c0;
+ coordSampled = coord;
+ _output += texture(uTextureSampler_2_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c0_c0_c1_c0[0].z;
+ coord += uImageIncrement_Stage1_c0_c0_c0_c0_c1_c0;
+ coordSampled = coord;
+ _output += texture(uTextureSampler_2_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c0_c0_c1_c0[0].w;
+ coord += uImageIncrement_Stage1_c0_c0_c0_c0_c1_c0;
+ coordSampled = coord;
+ _output += texture(uTextureSampler_2_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c0_c0_c1_c0[1].x;
+ coord += uImageIncrement_Stage1_c0_c0_c0_c0_c1_c0;
+ coordSampled = coord;
+ _output += texture(uTextureSampler_2_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c0_c0_c1_c0[1].y;
+ coord += uImageIncrement_Stage1_c0_c0_c0_c0_c1_c0;
+ coordSampled = coord;
+ _output += texture(uTextureSampler_2_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c0_c0_c1_c0[1].z;
+ coord += uImageIncrement_Stage1_c0_c0_c0_c0_c1_c0;
+ coordSampled = coord;
+ _output += texture(uTextureSampler_2_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c0_c0_c1_c0[1].w;
+ coord += uImageIncrement_Stage1_c0_c0_c0_c0_c1_c0;
+ coordSampled = coord;
+ _output += texture(uTextureSampler_2_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c0_c0_c1_c0[2].x;
+ coord += uImageIncrement_Stage1_c0_c0_c0_c0_c1_c0;
+ coordSampled = coord;
+ _output += texture(uTextureSampler_2_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c0_c0_c1_c0[2].y;
+ coord += uImageIncrement_Stage1_c0_c0_c0_c0_c1_c0;
+ coordSampled = coord;
+ _output += texture(uTextureSampler_2_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c0_c0_c1_c0[2].z;
+ coord += uImageIncrement_Stage1_c0_c0_c0_c0_c1_c0;
+ coordSampled = coord;
+ _output += texture(uTextureSampler_2_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c0_c0_c1_c0[2].w;
+ coord += uImageIncrement_Stage1_c0_c0_c0_c0_c1_c0;
+ coordSampled = coord;
+ _output += texture(uTextureSampler_2_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c0_c0_c1_c0[3].x;
+ coord += uImageIncrement_Stage1_c0_c0_c0_c0_c1_c0;
+ coordSampled = coord;
+ _output += texture(uTextureSampler_2_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c0_c0_c1_c0[3].y;
+ coord += uImageIncrement_Stage1_c0_c0_c0_c0_c1_c0;
+ coordSampled = coord;
+ _output += texture(uTextureSampler_2_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c0_c0_c1_c0[3].z;
+ coord += uImageIncrement_Stage1_c0_c0_c0_c0_c1_c0;
+ coordSampled = coord;
+ _output += texture(uTextureSampler_2_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c0_c0_c1_c0[3].w;
+ coord += uImageIncrement_Stage1_c0_c0_c0_c0_c1_c0;
+ coordSampled = coord;
+ _output += texture(uTextureSampler_2_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c0_c0_c1_c0[4].x;
+ coord += uImageIncrement_Stage1_c0_c0_c0_c0_c1_c0;
+ coordSampled = coord;
+ _output += texture(uTextureSampler_2_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c0_c0_c1_c0[4].y;
+ coord += uImageIncrement_Stage1_c0_c0_c0_c0_c1_c0;
+ coordSampled = coord;
+ _output += texture(uTextureSampler_2_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c0_c0_c1_c0[4].z;
+ coord += uImageIncrement_Stage1_c0_c0_c0_c0_c1_c0;
+ coordSampled = coord;
+ _output += texture(uTextureSampler_2_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c0_c0_c1_c0[4].w;
+ coord += uImageIncrement_Stage1_c0_c0_c0_c0_c1_c0;
+ coordSampled = coord;
+ _output += texture(uTextureSampler_2_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c0_c0_c1_c0[5].x;
+ coord += uImageIncrement_Stage1_c0_c0_c0_c0_c1_c0;
+ _output *= _input;
+ return _output;
+}
+vec4 blend_xor(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src + (1.0 - src.w) * dst;
+}
+vec4 ComposeTwo_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_xor(DisplacementMap_Stage1_c0_c0_c0_c0_c0_c0(inputColor), GaussianConvolution_Stage1_c0_c0_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 EllipticalRRect_Stage1_c0_c0_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 dxy0 = uinnerRect_Stage1_c0_c0_c1_c0_c0_c0.xy - gl_FragCoord.xy;
+ vec2 dxy1 = gl_FragCoord.xy - uinnerRect_Stage1_c0_c0_c1_c0_c0_c0.zw;
+ vec2 dxy = max(max(dxy0, dxy1), 0.0);
+ vec2 Z = max(max(dxy0 * uinvRadiiLTRB_Stage1_c0_c0_c1_c0_c0_c0.xy, dxy1 * uinvRadiiLTRB_Stage1_c0_c0_c1_c0_c0_c0.zw), 0.0);
+ float implicit = dot(Z, dxy) - 1.0;
+ float grad_dot = 4.0 * dot(Z, Z);
+ grad_dot = max(grad_dot, 9.9999997473787516e-05);
+ float approx_dist = implicit * inversesqrt(grad_dot);
+ float alpha = clamp(0.5 + approx_dist, 0.0, 1.0);
+ _output = _input * alpha;
+ return _output;
+}
+vec4 RectBlurEffect_Stage1_c0_c0_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float xCoverage, yCoverage;
+ {
+ float x, y;
+ {
+ x = max(urectH_Stage1_c0_c0_c1_c0_c1_c0.x - gl_FragCoord.x, gl_FragCoord.x - urectH_Stage1_c0_c0_c1_c0_c1_c0.z);
+ y = max(urectH_Stage1_c0_c0_c1_c0_c1_c0.y - gl_FragCoord.y, gl_FragCoord.y - urectH_Stage1_c0_c0_c1_c0_c1_c0.w);
+ }
+ xCoverage = texture(uTextureSampler_3_Stage1, vec2(x * uinvSixSigma_Stage1_c0_c0_c1_c0_c1_c0, 0.5)).w;
+ yCoverage = texture(uTextureSampler_3_Stage1, vec2(y * uinvSixSigma_Stage1_c0_c0_c1_c0_c1_c0, 0.5)).w;
+ _output = (_input * xCoverage) * yCoverage;
+ }
+ _output = (_input * xCoverage) * yCoverage;
+ return _output;
+}
+float _blend_color_saturation(vec3 color) {
+ return max(max(color.x, color.y), color.z) - min(min(color.x, color.y), color.z);
+}
+vec3 _blend_set_color_saturation_helper(vec3 minMidMax, float sat) {
+ if (minMidMax.x < minMidMax.z) {
+ return vec3(0.0, (sat * (minMidMax.y - minMidMax.x)) / (minMidMax.z - minMidMax.x), sat);
+ }
+ return vec3(0.0);
+}
+vec3 _blend_set_color_saturation(vec3 hueLumColor, vec3 satColor) {
+ float sat = _blend_color_saturation(satColor);
+ if (hueLumColor.x <= hueLumColor.y) {
+ if (hueLumColor.y <= hueLumColor.z) {
+ hueLumColor.xyz = _blend_set_color_saturation_helper(hueLumColor, sat);
+ } else if (hueLumColor.x <= hueLumColor.z) {
+ hueLumColor.xzy = _blend_set_color_saturation_helper(hueLumColor.xzy, sat);
+ } else {
+ hueLumColor.zxy = _blend_set_color_saturation_helper(hueLumColor.zxy, sat);
+ }
+ } else if (hueLumColor.x <= hueLumColor.z) {
+ hueLumColor.yxz = _blend_set_color_saturation_helper(hueLumColor.yxz, sat);
+ } else if (hueLumColor.y <= hueLumColor.z) {
+ hueLumColor.yzx = _blend_set_color_saturation_helper(hueLumColor.yzx, sat);
+ } else {
+ hueLumColor.zyx = _blend_set_color_saturation_helper(hueLumColor.zyx, sat);
+ }
+ return hueLumColor;
+}
+float _blend_color_luminance(vec3 color) {
+ return dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), color);
+}
+vec3 _blend_set_color_luminance(vec3 hueSatColor, float alpha, vec3 lumColor) {
+ float lum = _blend_color_luminance(lumColor);
+ vec3 result = (lum - _blend_color_luminance(hueSatColor)) + hueSatColor;
+ float minComp = min(min(result.x, result.y), result.z);
+ float maxComp = max(max(result.x, result.y), result.z);
+ if (minComp < 0.0 && lum != minComp) {
+ result = lum + ((result - lum) * lum) / (lum - minComp);
+ }
+ if (maxComp > alpha && maxComp != lum) {
+ return lum + ((result - lum) * (alpha - lum)) / (maxComp - lum);
+ }
+ return result;
+}
+vec4 blend_saturation(vec4 src, vec4 dst) {
+ float alpha = dst.w * src.w;
+ vec3 sda = src.xyz * dst.w;
+ vec3 dsa = dst.xyz * src.w;
+ return vec4((((_blend_set_color_luminance(_blend_set_color_saturation(dsa, sda), alpha, dsa) + dst.xyz) - dsa) + src.xyz) - sda, (src.w + dst.w) - alpha);
+}
+vec4 ComposeTwo_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_saturation(EllipticalRRect_Stage1_c0_c0_c1_c0_c0_c0(inputColor), RectBlurEffect_Stage1_c0_c0_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 blend_multiply(vec4 src, vec4 dst) {
+ return vec4(((1.0 - src.w) * dst.xyz + (1.0 - dst.w) * src.xyz) + src.xyz * dst.xyz, src.w + (1.0 - src.w) * dst.w);
+}
+vec4 ComposeTwo_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_multiply(ComposeTwo_Stage1_c0_c0_c0_c0(inputColor), ComposeTwo_Stage1_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 light_Stage1_c1_c0(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ vec3 halfDir = normalize(surfaceToLight + vec3(0.0, 0.0, 1.0));
+ float colorScale = uKS_Stage1_c1_c0 * pow(dot(normal, halfDir), uShininess_Stage1_c1_c0);
+ vec3 color = lightColor * clamp(colorScale, 0.0, 1.0);
+ return vec4(color, max(max(color.x, color.y), color.z));
+}
+float sobel_Stage1_c1_c0(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage1_c1_c0(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage1_c1_c0(float m[9], float surfaceScale) {
+ return pointToNormal_Stage1_c1_c0(sobel_Stage1_c1_c0(m[0], m[2], m[3], m[5], m[6], m[8], 0.25), sobel_Stage1_c1_c0(m[0], m[6], m[1], m[7], m[2], m[8], 0.25), surfaceScale);
+}
+vec4 SpecularLighting_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coord = vTransformedCoords_3_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage1_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0.xy, uTexDom_Stage1_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_4_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp0 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0.xy, uTexDom_Stage1_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_4_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0.xy, uTexDom_Stage1_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_4_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage1_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0.xy, uTexDom_Stage1_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_4_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0.xy, uTexDom_Stage1_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_4_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0.xy, uTexDom_Stage1_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_4_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp5 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage1_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0.xy, uTexDom_Stage1_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_4_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp6 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage1_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0.xy, uTexDom_Stage1_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_4_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp7 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage1_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0.xy, uTexDom_Stage1_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_4_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp8 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = normalize(uLightLocation_Stage1_c1_c0 - vec3(gl_FragCoord.xy, uSurfaceScale_Stage1_c1_c0 * m[4]));
+ _output = light_Stage1_c1_c0(normal_Stage1_c1_c0(m, uSurfaceScale_Stage1_c1_c0), surfaceToLight, uLightColor_Stage1_c1_c0);
+ _output *= _input;
+ return _output;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_xor(ComposeTwo_Stage1_c0_c0(inputColor), SpecularLighting_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform float uSrcTF_Stage0[7];
+uniform mat3 uColorXform_Stage0;
+uniform float uDstTF_Stage0[7];
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+uniform mat3 uCoordTransformMatrix_3_Stage0;
+in vec2 position;
+in vec4 inColor;
+in vec2 inLocalCoord;
+out vec4 vcolor_Stage0;
+out vec2 vTransformedCoords_0_Stage0;
+out vec2 vTransformedCoords_1_Stage0;
+out vec2 vTransformedCoords_2_Stage0;
+out vec2 vTransformedCoords_3_Stage0;
+float src_tf_Stage0(float x) {
+ float G = uSrcTF_Stage0[0];
+ float A = uSrcTF_Stage0[1];
+ float B = uSrcTF_Stage0[2];
+ float C = uSrcTF_Stage0[3];
+ float D = uSrcTF_Stage0[4];
+ float E = uSrcTF_Stage0[5];
+ float F = uSrcTF_Stage0[6];
+ float s = sign(x);
+ x = abs(x);
+ x = x < D ? C * x + F : pow(A * x + B, G) + E;
+ return s * x;
+}
+float dst_tf_Stage0(float x) {
+ float G = uDstTF_Stage0[0];
+ float A = uDstTF_Stage0[1];
+ float B = uDstTF_Stage0[2];
+ float C = uDstTF_Stage0[3];
+ float D = uDstTF_Stage0[4];
+ float E = uDstTF_Stage0[5];
+ float F = uDstTF_Stage0[6];
+ float s = sign(x);
+ x = abs(x);
+ x = x < D ? C * x + F : pow(A * x + B, G) + E;
+ return s * x;
+}
+vec4 gamut_xform_Stage0(vec4 color) {
+ color.xyz = uColorXform_Stage0 * color.xyz;
+ return color;
+}
+vec4 color_xform_Stage0(vec4 color) {
+ float nonZeroAlpha = max(color.w, 9.9999997473787516e-05);
+ color = vec4(color.xyz / nonZeroAlpha, nonZeroAlpha);
+ color.x = src_tf_Stage0(color.x);
+ color.y = src_tf_Stage0(color.y);
+ color.z = src_tf_Stage0(color.z);
+ color = gamut_xform_Stage0(color);
+ color.x = dst_tf_Stage0(color.x);
+ color.y = dst_tf_Stage0(color.y);
+ color.z = dst_tf_Stage0(color.z);
+ color.xyz *= color.w;
+ return color;
+}
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = color_xform_Stage0(color);
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec3 pos3 = uViewM_Stage0 * vec3(position, 1.0);
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ vTransformedCoords_3_Stage0 = (uCoordTransformMatrix_3_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos3.x, pos3.y, 0.0, pos3.z);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/127-1.shader_test b/shaders/skia/127-1.shader_test
new file mode 100644
index 0000000..2066b2a
--- /dev/null
+++ b/shaders/skia/127-1.shader_test
@@ -0,0 +1,78 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform mat4 um_Stage2;
+uniform vec4 uv_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_1_Stage1, vTransformedCoords_1_Stage0) * _input;
+ return _output;
+}
+vec4 YUVtoRGBEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 planes[2];
+ planes[0] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0));
+ planes[1] = TextureEffect_Stage1_c0_c0_c1_c0(vec4(1.0));
+ vec4 color = vec4(planes[0].w, planes[1].x, planes[1].y, 1.0);
+ _output = color;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = YUVtoRGBEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ vec4 inputColor = output_Stage1;
+ {
+ float nonZeroAlpha = max(inputColor.w, 9.9999997473787516e-05);
+ inputColor = vec4(inputColor.xyz / nonZeroAlpha, inputColor.w);
+ }
+ output_Stage2 = um_Stage2 * inputColor + uv_Stage2;
+ {
+ output_Stage2 = clamp(output_Stage2, 0.0, 1.0);
+ }
+ {
+ output_Stage2.xyz *= output_Stage2.w;
+ }
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/127-14.shader_test b/shaders/skia/127-14.shader_test
new file mode 100644
index 0000000..9c9eb72
--- /dev/null
+++ b/shaders/skia/127-14.shader_test
@@ -0,0 +1,86 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform float uSrcTF_Stage0[7];
+uniform mat3 uColorXform_Stage0;
+uniform float uDstTF_Stage0[7];
+uniform sampler2D uTextureSampler_0_Stage0;
+flat in vec4 vcolor_Stage0;
+noperspective in vec2 vlocalCoord_Stage0;
+float src_tf_Stage0(float x) {
+ float G = uSrcTF_Stage0[0];
+ float A = uSrcTF_Stage0[1];
+ float B = uSrcTF_Stage0[2];
+ float C = uSrcTF_Stage0[3];
+ float D = uSrcTF_Stage0[4];
+ float E = uSrcTF_Stage0[5];
+ float F = uSrcTF_Stage0[6];
+ float s = sign(x);
+ x = abs(x);
+ x = x < D ? C * x + F : pow(A * x + B, G) + E;
+ return s * x;
+}
+float dst_tf_Stage0(float x) {
+ float G = uDstTF_Stage0[0];
+ float A = uDstTF_Stage0[1];
+ float B = uDstTF_Stage0[2];
+ float C = uDstTF_Stage0[3];
+ float D = uDstTF_Stage0[4];
+ float E = uDstTF_Stage0[5];
+ float F = uDstTF_Stage0[6];
+ float s = sign(x);
+ x = abs(x);
+ x = x < D ? C * x + F : pow(A * x + B, G) + E;
+ return s * x;
+}
+vec4 gamut_xform_Stage0(vec4 color) {
+ color.xyz = uColorXform_Stage0 * color.xyz;
+ return color;
+}
+vec4 color_xform_Stage0(vec4 color) {
+ float nonZeroAlpha = max(color.w, 9.9999997473787516e-05);
+ color = vec4(color.xyz / nonZeroAlpha, nonZeroAlpha);
+ color.x = src_tf_Stage0(color.x);
+ color.y = src_tf_Stage0(color.y);
+ color.z = src_tf_Stage0(color.z);
+ color = gamut_xform_Stage0(color);
+ color.x = dst_tf_Stage0(color.x);
+ color.y = dst_tf_Stage0(color.y);
+ color.z = dst_tf_Stage0(color.z);
+ color.xyz *= color.w;
+ return color;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ vec2 texCoord;
+ texCoord = vlocalCoord_Stage0;
+ outputColor_Stage0 = color_xform_Stage0(texture(uTextureSampler_0_Stage0, texCoord)) * outputColor_Stage0;
+ outputColor_Stage0 = clamp(outputColor_Stage0, 0.0, 1.0);
+ }
+ {
+ sk_FragColor = outputColor_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+flat out vec4 vcolor_Stage0;
+noperspective out vec2 vlocalCoord_Stage0;
+void main() {
+ vcolor_Stage0 = color;
+ vlocalCoord_Stage0 = localCoord;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/127-15.shader_test b/shaders/skia/127-15.shader_test
new file mode 100644
index 0000000..cf6acc9
--- /dev/null
+++ b/shaders/skia/127-15.shader_test
@@ -0,0 +1,51 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform float uPixelSize_Stage2;
+uniform vec2 uRange_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_1_Stage0;
+ coord.y -= 3.0 * uPixelSize_Stage2;
+ for (int i = 0;i < 7; i++) {
+ output_Stage2 = max(output_Stage2, texture(uTextureSampler_0_Stage2, coord));
+ coord.y += uPixelSize_Stage2;
+ }
+ output_Stage2 *= output_Stage1;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/127-16.shader_test b/shaders/skia/127-16.shader_test
new file mode 100644
index 0000000..b8544b8
--- /dev/null
+++ b/shaders/skia/127-16.shader_test
@@ -0,0 +1,60 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec3 uedges_Stage2[6];
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ float alpha = 1.0;
+ float edge;
+ edge = dot(uedges_Stage2[0], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage2[1], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage2[2], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage2[3], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage2[4], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage2[5], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ output_Stage2 = output_Stage1 * alpha;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/127-2.shader_test b/shaders/skia/127-2.shader_test
new file mode 100644
index 0000000..e2a23de
--- /dev/null
+++ b/shaders/skia/127-2.shader_test
@@ -0,0 +1,61 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 ucolor_Stage1_c0_c0_c0_c0;
+noperspective in vec4 vcolor_Stage0;
+vec4 ConstColorProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = _input.w * ucolor_Stage1_c0_c0_c0_c0;
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = ConstColorProcessor_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_src_in(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 position;
+in vec4 inColor;
+noperspective out vec4 vcolor_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/127-4.shader_test b/shaders/skia/127-4.shader_test
new file mode 100644
index 0000000..0c54b7a
--- /dev/null
+++ b/shaders/skia/127-4.shader_test
@@ -0,0 +1,68 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform sampler2D uTextureSampler_0_Stage0;
+in vec2 vTextureCoords_Stage0;
+flat in int vTexIndex_Stage0;
+in vec2 vIntTextureCoords_Stage0;
+in vec4 vinColor_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vinColor_Stage0;
+ vec2 uv = vTextureCoords_Stage0;
+ vec4 texColor;
+ {
+ texColor = texture(uTextureSampler_0_Stage0, uv);
+ }
+ float distance = 7.96875 * (texColor.x - 0.50196081399917603);
+ float afwidth;
+ vec2 dist_grad = vec2(dFdx(distance), -dFdy(distance));
+ float dg_len2 = dot(dist_grad, dist_grad);
+ if (dg_len2 < 9.9999997473787516e-05) {
+ dist_grad = vec2(0.70709997415542603, 0.70709997415542603);
+ } else {
+ dist_grad = dist_grad * inversesqrt(dg_len2);
+ }
+ vec2 Jdx = dFdx(vIntTextureCoords_Stage0);
+ vec2 Jdy = -dFdy(vIntTextureCoords_Stage0);
+ vec2 grad = vec2(dist_grad.x * Jdx.x + dist_grad.y * Jdy.x, dist_grad.x * Jdx.y + dist_grad.y * Jdy.y);
+ afwidth = 0.64999997615814209 * length(grad);
+ float val = smoothstep(-afwidth, afwidth, distance);
+ outputCoverage_Stage0 = vec4(val);
+ }
+ {
+ sk_FragColor = outputColor_Stage0 * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform vec2 uAtlasDimensionsInv_Stage0;
+uniform mat3 uViewM_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in uvec2 inTextureCoords;
+out vec2 vTextureCoords_Stage0;
+flat out int vTexIndex_Stage0;
+out vec2 vIntTextureCoords_Stage0;
+out vec4 vinColor_Stage0;
+void main() {
+ ivec2 signedCoords = ivec2(int(inTextureCoords.x), int(inTextureCoords.y));
+ vec2 unormTexCoords = vec2(float(signedCoords.x / 2), float(signedCoords.y / 2));
+ vTextureCoords_Stage0 = unormTexCoords * uAtlasDimensionsInv_Stage0;
+ vTexIndex_Stage0 = 0;
+ vIntTextureCoords_Stage0 = unormTexCoords;
+ vinColor_Stage0 = inColor;
+ vec3 pos3 = uViewM_Stage0 * vec3(inPosition, 1.0);
+ gl_Position = vec4(pos3.x, pos3.y, 0.0, pos3.z);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/127-5.shader_test b/shaders/skia/127-5.shader_test
new file mode 100644
index 0000000..d6634c4
--- /dev/null
+++ b/shaders/skia/127-5.shader_test
@@ -0,0 +1,82 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage2_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c1_c0;
+ }
+ return _output;
+}
+vec4 blend_src_out(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_src_out(ConstColorProcessor_Stage2_c1_c0(vec4(1.0)), output_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/127-6.shader_test b/shaders/skia/127-6.shader_test
new file mode 100644
index 0000000..dd9518d
--- /dev/null
+++ b/shaders/skia/127-6.shader_test
@@ -0,0 +1,138 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform float uSurfaceScale_Stage1;
+uniform vec3 uLightColor_Stage1;
+uniform float uKS_Stage1;
+uniform float uShininess_Stage1;
+uniform vec3 uLightDirection_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 light_Stage1(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ vec3 halfDir = normalize(surfaceToLight + vec3(0.0, 0.0, 1.0));
+ float colorScale = uKS_Stage1 * pow(dot(normal, halfDir), uShininess_Stage1);
+ vec3 color = lightColor * clamp(colorScale, 0.0, 1.0);
+ return vec4(color, max(max(color.x, color.y), color.z));
+}
+float sobel_Stage1(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage1(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage1(float m[9], float surfaceScale) {
+ return pointToNormal_Stage1(sobel_Stage1(m[0], m[2], m[3], m[5], m[6], m[8], 0.25), sobel_Stage1(m[0], m[6], m[1], m[7], m[2], m[8], 0.25), surfaceScale);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ vec2 coord = vTransformedCoords_0_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp0 = textureColor;
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp1 = textureColor;
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp2 = textureColor;
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp3 = textureColor;
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp4 = textureColor;
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp5 = textureColor;
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp6 = textureColor;
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp7 = textureColor;
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp8 = textureColor;
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = uLightDirection_Stage1;
+ output_Stage1 = light_Stage1(normal_Stage1(m, uSurfaceScale_Stage1), surfaceToLight, uLightColor_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/127-7.shader_test b/shaders/skia/127-7.shader_test
new file mode 100644
index 0000000..5780f59
--- /dev/null
+++ b/shaders/skia/127-7.shader_test
@@ -0,0 +1,98 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+uniform vec2 uDstTextureUpperLeft_Stage2;
+uniform vec2 uDstTextureCoordScale_Stage2;
+uniform sampler2D uTextureSampler_0_Stage0;
+uniform sampler2D uDstTextureSampler_Stage2;
+noperspective in vec2 vTextureCoords_Stage0;
+flat in int vTexIndex_Stage0;
+noperspective in vec4 vinColor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ t.x = fract(t.x);
+ }
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 blend_modulate(vec4 src, vec4 dst) {
+ return src * dst;
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ vec4 texColor;
+ {
+ texColor = texture(uTextureSampler_0_Stage0, vTextureCoords_Stage0);
+ }
+ outputCoverage_Stage0 = texColor;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TiledGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ if (all(lessThanEqual(outputCoverage_Stage0.xyz, vec3(0.0)))) {
+ discard;
+ }
+ vec2 _dstTexCoord = (gl_FragCoord.xy - uDstTextureUpperLeft_Stage2) * uDstTextureCoordScale_Stage2;
+ _dstTexCoord.y = 1.0 - _dstTexCoord.y;
+ vec4 _dstColor = texture(uDstTextureSampler_Stage2, _dstTexCoord);
+ sk_FragColor = blend_modulate(output_Stage1, _dstColor);
+ float lerpRed = mix(_dstColor.w, sk_FragColor.w, outputCoverage_Stage0.x);
+ float lerpBlue = mix(_dstColor.w, sk_FragColor.w, outputCoverage_Stage0.y);
+ float lerpGreen = mix(_dstColor.w, sk_FragColor.w, outputCoverage_Stage0.z);
+ sk_FragColor = outputCoverage_Stage0 * sk_FragColor + (vec4(1.0) - outputCoverage_Stage0) * _dstColor;
+ sk_FragColor.w = max(max(lerpRed, lerpBlue), lerpGreen);
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform vec2 uAtlasSizeInv_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in uvec2 inTextureCoords;
+noperspective out vec2 vTextureCoords_Stage0;
+flat out int vTexIndex_Stage0;
+noperspective out vec4 vinColor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ ivec2 signedCoords = ivec2(int(inTextureCoords.x), int(inTextureCoords.y));
+ vec2 unormTexCoords = vec2(float(signedCoords.x / 2), float(signedCoords.y / 2));
+ vTextureCoords_Stage0 = unormTexCoords * uAtlasSizeInv_Stage0;
+ vTexIndex_Stage0 = 0;
+ vinColor_Stage0 = inColor;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(inPosition.x, inPosition.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/127.shader_test b/shaders/skia/127.shader_test
new file mode 100644
index 0000000..1101f17
--- /dev/null
+++ b/shaders/skia/127.shader_test
@@ -0,0 +1,141 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform float uSrcTF_Stage1_c0_c0[7];
+uniform mat3 uColorXform_Stage1_c0_c0;
+uniform float uDstTF_Stage1_c0_c0[7];
+uniform mat4 um_Stage2;
+uniform vec4 uv_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+uniform sampler2D uTextureSampler_2_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_1_Stage1, vTransformedCoords_1_Stage0) * _input;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c0_c0_c0_c0_c2_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_2_Stage1, vTransformedCoords_2_Stage0) * _input;
+ return _output;
+}
+vec4 YUVtoRGBEffect_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 planes[3];
+ planes[0] = TextureEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ planes[1] = TextureEffect_Stage1_c0_c0_c0_c0_c1_c0(vec4(1.0));
+ planes[2] = TextureEffect_Stage1_c0_c0_c0_c0_c2_c0(vec4(1.0));
+ vec4 color = vec4(planes[0].x, planes[1].y, planes[1].x, planes[2].w);
+ color.xyz *= color.w;
+ _output = color;
+ return _output;
+}
+float src_tf_Stage1_c0_c0(float x) {
+ float G = uSrcTF_Stage1_c0_c0[0];
+ float A = uSrcTF_Stage1_c0_c0[1];
+ float B = uSrcTF_Stage1_c0_c0[2];
+ float C = uSrcTF_Stage1_c0_c0[3];
+ float D = uSrcTF_Stage1_c0_c0[4];
+ float E = uSrcTF_Stage1_c0_c0[5];
+ float F = uSrcTF_Stage1_c0_c0[6];
+ float s = sign(x);
+ x = abs(x);
+ x = x < D ? C * x + F : pow(A * x + B, G) + E;
+ return s * x;
+}
+float dst_tf_Stage1_c0_c0(float x) {
+ float G = uDstTF_Stage1_c0_c0[0];
+ float A = uDstTF_Stage1_c0_c0[1];
+ float B = uDstTF_Stage1_c0_c0[2];
+ float C = uDstTF_Stage1_c0_c0[3];
+ float D = uDstTF_Stage1_c0_c0[4];
+ float E = uDstTF_Stage1_c0_c0[5];
+ float F = uDstTF_Stage1_c0_c0[6];
+ float s = sign(x);
+ x = abs(x);
+ x = x < D ? C * x + F : pow(A * x + B, G) + E;
+ return s * x;
+}
+vec4 gamut_xform_Stage1_c0_c0(vec4 color) {
+ color.xyz = uColorXform_Stage1_c0_c0 * color.xyz;
+ return color;
+}
+vec4 color_xform_Stage1_c0_c0(vec4 color) {
+ float nonZeroAlpha = max(color.w, 9.9999997473787516e-05);
+ color = vec4(color.xyz / nonZeroAlpha, nonZeroAlpha);
+ color.x = src_tf_Stage1_c0_c0(color.x);
+ color.y = src_tf_Stage1_c0_c0(color.y);
+ color.z = src_tf_Stage1_c0_c0(color.z);
+ color = gamut_xform_Stage1_c0_c0(color);
+ color.x = dst_tf_Stage1_c0_c0(color.x);
+ color.y = dst_tf_Stage1_c0_c0(color.y);
+ color.z = dst_tf_Stage1_c0_c0(color.z);
+ color.xyz *= color.w;
+ return color;
+}
+vec4 ColorSpaceXform_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = color_xform_Stage1_c0_c0(YUVtoRGBEffect_Stage1_c0_c0_c0_c0(vec4(1.0))) * _input;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ColorSpaceXform_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ vec4 inputColor = output_Stage1;
+ {
+ float nonZeroAlpha = max(inputColor.w, 9.9999997473787516e-05);
+ inputColor = vec4(inputColor.xyz / nonZeroAlpha, inputColor.w);
+ }
+ output_Stage2 = um_Stage2 * inputColor + uv_Stage2;
+ {
+ output_Stage2 = clamp(output_Stage2, 0.0, 1.0);
+ }
+ {
+ output_Stage2.xyz *= output_Stage2.w;
+ }
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1270.shader_test b/shaders/skia/1270.shader_test
new file mode 100644
index 0000000..bf5294d
--- /dev/null
+++ b/shaders/skia/1270.shader_test
@@ -0,0 +1,353 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 ucircle_Stage1_c0_c0_c0_c0;
+uniform vec2 uImageIncrement_Stage1_c0_c0_c1_c0;
+uniform vec4 uKernel_Stage1_c0_c0_c1_c0[5];
+uniform vec2 uKernelOffset_Stage1_c0_c0_c1_c0;
+uniform float uGain_Stage1_c0_c0_c1_c0;
+uniform float uBias_Stage1_c0_c0_c1_c0;
+uniform vec4 uTexDom_Stage1_c0_c0_c1_c0;
+uniform vec4 urectH_Stage1_c1_c0;
+uniform float uinvSixSigma_Stage1_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+in vec4 vcolor_Stage0;
+in vec2 vTransformedCoords_0_Stage0;
+vec4 CircleEffect_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float d;
+ {
+ d = (1.0 - length((ucircle_Stage1_c0_c0_c0_c0.xy - gl_FragCoord.xy) * ucircle_Stage1_c0_c0_c0_c0.w)) * ucircle_Stage1_c0_c0_c0_c0.z;
+ }
+ {
+ _output = _input * clamp(d, 0.0, 1.0);
+ }
+ return _output;
+}
+vec4 MatrixConvolution_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 sum = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0 - uKernelOffset_Stage1_c0_c0_c1_c0 * uImageIncrement_Stage1_c0_c0_c1_c0;
+ vec4 c;
+ {
+ float k = uKernel_Stage1_c0_c0_c1_c0[0].x;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c1_c0.xy, uTexDom_Stage1_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c1_c0[0].y;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c1_c0.xy, uTexDom_Stage1_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c1_c0[0].z;
+ {
+ vec2 origCoord = coord + vec2(2.0, 0.0) * uImageIncrement_Stage1_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c1_c0.xy, uTexDom_Stage1_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c1_c0[0].w;
+ {
+ vec2 origCoord = coord + vec2(3.0, 0.0) * uImageIncrement_Stage1_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c1_c0.xy, uTexDom_Stage1_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c1_c0[1].x;
+ {
+ vec2 origCoord = coord + vec2(4.0, 0.0) * uImageIncrement_Stage1_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c1_c0.xy, uTexDom_Stage1_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c1_c0[1].y;
+ {
+ vec2 origCoord = coord + vec2(5.0, 0.0) * uImageIncrement_Stage1_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c1_c0.xy, uTexDom_Stage1_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c1_c0[1].z;
+ {
+ vec2 origCoord = coord + vec2(6.0, 0.0) * uImageIncrement_Stage1_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c1_c0.xy, uTexDom_Stage1_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c1_c0[1].w;
+ {
+ vec2 origCoord = coord + vec2(7.0, 0.0) * uImageIncrement_Stage1_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c1_c0.xy, uTexDom_Stage1_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c1_c0[2].x;
+ {
+ vec2 origCoord = coord + vec2(8.0, 0.0) * uImageIncrement_Stage1_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c1_c0.xy, uTexDom_Stage1_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c1_c0[2].y;
+ {
+ vec2 origCoord = coord + vec2(9.0, 0.0) * uImageIncrement_Stage1_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c1_c0.xy, uTexDom_Stage1_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c1_c0[2].z;
+ {
+ vec2 origCoord = coord + vec2(10.0, 0.0) * uImageIncrement_Stage1_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c1_c0.xy, uTexDom_Stage1_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c1_c0[2].w;
+ {
+ vec2 origCoord = coord + vec2(11.0, 0.0) * uImageIncrement_Stage1_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c1_c0.xy, uTexDom_Stage1_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c1_c0[3].x;
+ {
+ vec2 origCoord = coord + vec2(12.0, 0.0) * uImageIncrement_Stage1_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c1_c0.xy, uTexDom_Stage1_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c1_c0[3].y;
+ {
+ vec2 origCoord = coord + vec2(13.0, 0.0) * uImageIncrement_Stage1_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c1_c0.xy, uTexDom_Stage1_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c1_c0[3].z;
+ {
+ vec2 origCoord = coord + vec2(14.0, 0.0) * uImageIncrement_Stage1_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c1_c0.xy, uTexDom_Stage1_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c1_c0[3].w;
+ {
+ vec2 origCoord = coord + vec2(15.0, 0.0) * uImageIncrement_Stage1_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c1_c0.xy, uTexDom_Stage1_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c1_c0[4].x;
+ {
+ vec2 origCoord = coord + vec2(16.0, 0.0) * uImageIncrement_Stage1_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c1_c0.xy, uTexDom_Stage1_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ vec2 origCoord = vTransformedCoords_0_Stage0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c1_c0.xy, uTexDom_Stage1_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ _output.w = c.w;
+ _output.xyz = clamp(sum.xyz * uGain_Stage1_c0_c0_c1_c0 + uBias_Stage1_c0_c0_c1_c0, 0.0, 1.0);
+ _output.xyz *= _output.w;
+ _output *= _input;
+ return _output;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 ComposeTwo_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_src_over(CircleEffect_Stage1_c0_c0_c0_c0(inputColor), MatrixConvolution_Stage1_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 RectBlurEffect_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ float xCoverage, yCoverage;
+ {
+ float x, y;
+ {
+ x = max(urectH_Stage1_c1_c0.x - gl_FragCoord.x, gl_FragCoord.x - urectH_Stage1_c1_c0.z);
+ y = max(urectH_Stage1_c1_c0.y - gl_FragCoord.y, gl_FragCoord.y - urectH_Stage1_c1_c0.w);
+ }
+ xCoverage = texture(uTextureSampler_1_Stage1, vec2(x * uinvSixSigma_Stage1_c1_c0, 0.5)).w;
+ yCoverage = texture(uTextureSampler_1_Stage1, vec2(y * uinvSixSigma_Stage1_c1_c0, 0.5)).w;
+ _output = (_input * xCoverage) * yCoverage;
+ }
+ _output = (_input * xCoverage) * yCoverage;
+ return _output;
+}
+float _guarded_divide(float n, float d) {
+ return n / d;
+}
+float _soft_light_component(float sc, float sa, float dc, float da) {
+ if (2.0 * sc <= sa) {
+ return (_guarded_divide((dc * dc) * (sa - 2.0 * sc), da) + (1.0 - da) * sc) + dc * ((-sa + 2.0 * sc) + 1.0);
+ } else if (4.0 * dc <= da) {
+ float DSqd = dc * dc;
+ float DCub = DSqd * dc;
+ float DaSqd = da * da;
+ float DaCub = DaSqd * da;
+ return _guarded_divide(((DaSqd * (sc - dc * ((3.0 * sa - 6.0 * sc) - 1.0)) + ((12.0 * da) * DSqd) * (sa - 2.0 * sc)) - (16.0 * DCub) * (sa - 2.0 * sc)) - DaCub * sc, DaSqd);
+ }
+ return ((dc * ((sa - 2.0 * sc) + 1.0) + sc) - sqrt(da * dc) * (sa - 2.0 * sc)) - da * sc;
+}
+vec4 blend_soft_light(vec4 src, vec4 dst) {
+ if (dst.w == 0.0) {
+ return src;
+ }
+ return vec4(_soft_light_component(src.x, src.w, dst.x, dst.w), _soft_light_component(src.y, src.w, dst.y, dst.w), _soft_light_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_soft_light(ComposeTwo_Stage1_c0_c0(inputColor), RectBlurEffect_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec2 inLocalCoord;
+out vec4 vcolor_Stage0;
+out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 color = inColor;
+ vcolor_Stage0 = color;
+ vec3 pos3 = uViewM_Stage0 * vec3(inPosition, 1.0);
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos3.x, pos3.y, 0.0, pos3.z);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1273.shader_test b/shaders/skia/1273.shader_test
new file mode 100644
index 0000000..c1f2b5c
--- /dev/null
+++ b/shaders/skia/1273.shader_test
@@ -0,0 +1,29 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+noperspective in vec4 vcolor_Stage0;
+void main() {
+ {
+ sk_FragColor = vec4(1.0);
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 inPosition;
+in vec4 inColor;
+noperspective out vec4 vcolor_Stage0;
+void main() {
+ vec4 color = inColor;
+ vcolor_Stage0 = color;
+ vec2 pos2 = inPosition;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1276.shader_test b/shaders/skia/1276.shader_test
new file mode 100644
index 0000000..d79fd6d
--- /dev/null
+++ b/shaders/skia/1276.shader_test
@@ -0,0 +1,46 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform sampler2D uTextureSampler_0_Stage0;
+noperspective in vec2 vtextureCoords_Stage0;
+flat in vec4 vtextureDomain_Stage0;
+flat in vec4 vcolor_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ vec2 textureCoords;
+ textureCoords = vtextureCoords_Stage0;
+ vec4 textureDomain;
+ textureDomain = vtextureDomain_Stage0;
+ outputColor_Stage0 = vcolor_Stage0;
+ outputColor_Stage0 = texture(uTextureSampler_0_Stage0, clamp(textureCoords, textureDomain.xy, textureDomain.zw)) * outputColor_Stage0;
+ }
+ {
+ sk_FragColor = 1.0 - vec4(1.0);
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 position;
+in vec2 textureCoords;
+in vec4 textureDomain;
+in vec4 color;
+noperspective out vec2 vtextureCoords_Stage0;
+flat out vec4 vtextureDomain_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vec2 pos2 = position;
+ vtextureCoords_Stage0 = textureCoords;
+ vtextureDomain_Stage0 = textureDomain;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1279.shader_test b/shaders/skia/1279.shader_test
new file mode 100644
index 0000000..627f5fd
--- /dev/null
+++ b/shaders/skia/1279.shader_test
@@ -0,0 +1,134 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_KHR_blend_equation_advanced : require
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+layout (blend_support_all_equations) out ;
+uniform vec4 uellipse_Stage1;
+uniform vec4 ucolor0_Stage2;
+uniform vec4 ucolor1_Stage2;
+uniform vec4 ucolor2_Stage2;
+uniform vec4 ucolor3_Stage2;
+uniform vec4 ucolor4_Stage2;
+uniform vec4 ucolor5_Stage2;
+uniform float uPixelSize_Stage5;
+uniform vec2 uRange_Stage5;
+uniform sampler2D uTextureSampler_0_Stage5;
+noperspective in vec2 vEllipseOffsets_Stage0;
+noperspective in vec4 vEllipseRadii_Stage0;
+noperspective in vec4 vinColor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vinColor_Stage0;
+ vec2 offset = vEllipseOffsets_Stage0;
+ offset *= vEllipseRadii_Stage0.xy;
+ float test = dot(offset, offset) - 1.0;
+ vec2 grad = (2.0 * offset) * vEllipseRadii_Stage0.xy;
+ float grad_dot = dot(grad, grad);
+ grad_dot = max(grad_dot, 1.1754999560161448e-38);
+ float invlen = inversesqrt(grad_dot);
+ float edgeAlpha = clamp(0.5 - test * invlen, 0.0, 1.0);
+ offset = vEllipseOffsets_Stage0 * vEllipseRadii_Stage0.zw;
+ test = dot(offset, offset) - 1.0;
+ grad = (2.0 * offset) * vEllipseRadii_Stage0.zw;
+ grad_dot = dot(grad, grad);
+ invlen = inversesqrt(grad_dot);
+ edgeAlpha *= clamp(0.5 + test * invlen, 0.0, 1.0);
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ vec4 output_Stage1;
+ {
+ vec2 d = gl_FragCoord.xy - uellipse_Stage1.xy;
+ vec2 Z = d * uellipse_Stage1.zw;
+ float implicit = dot(Z, d) - 1.0;
+ float grad_dot = 4.0 * dot(Z, Z);
+ {
+ grad_dot = max(grad_dot, 1.1754999560161448e-38);
+ }
+ float approx_dist = implicit * inversesqrt(grad_dot);
+ float alpha;
+ {
+ alpha = clamp(0.5 - approx_dist, 0.0, 1.0);
+ }
+ output_Stage1 = outputColor_Stage0 * alpha;
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = outputCoverage_Stage0;
+ float alpha = 255.0 * output_Stage2.w;
+ if (alpha < 0.5) {
+ output_Stage2 = ucolor0_Stage2;
+ } else if (alpha < 1.5) {
+ output_Stage2 = ucolor1_Stage2;
+ } else if (alpha < 2.5) {
+ output_Stage2 = ucolor2_Stage2;
+ } else if (alpha < 3.5) {
+ output_Stage2 = ucolor3_Stage2;
+ } else if (alpha < 4.5) {
+ output_Stage2 = ucolor4_Stage2;
+ } else {
+ output_Stage2 = ucolor5_Stage2;
+ }
+ }
+ vec4 output_Stage3;
+ {
+ output_Stage3 = floor(output_Stage2 * 255.0 + 0.5) / 255.0;
+ {
+ output_Stage3.xyz = output_Stage3.w <= 0.0 ? vec3(0.0) : floor((output_Stage3.xyz / output_Stage3.w) * 255.0 + 0.5) / 255.0;
+ }
+ }
+ vec4 output_Stage4;
+ {
+ output_Stage4 = output_Stage3;
+ }
+ vec4 output_Stage5;
+ {
+ output_Stage5 = vec4(1.0, 1.0, 1.0, 1.0);
+ vec2 coord = vTransformedCoords_1_Stage0;
+ coord.y -= uPixelSize_Stage5;
+ for (int i = 0;i < 3; i++) {
+ output_Stage5 = min(output_Stage5, texture(uTextureSampler_0_Stage5, coord));
+ coord.y += uPixelSize_Stage5;
+ }
+ output_Stage5 *= output_Stage4;
+ }
+ {
+ sk_FragColor = output_Stage5 * output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec2 inEllipseOffset;
+in vec4 inEllipseRadii;
+noperspective out vec2 vEllipseOffsets_Stage0;
+noperspective out vec4 vEllipseRadii_Stage0;
+noperspective out vec4 vinColor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vEllipseOffsets_Stage0 = inEllipseOffset;
+ vEllipseRadii_Stage0 = inEllipseRadii;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1282.shader_test b/shaders/skia/1282.shader_test
new file mode 100644
index 0000000..7f9a611
--- /dev/null
+++ b/shaders/skia/1282.shader_test
@@ -0,0 +1,134 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uColor_Stage0;
+uniform float ucornerRadius_Stage2;
+uniform vec4 uproxyRect_Stage2;
+uniform float ublurRadius_Stage2;
+uniform vec2 uImageIncrement_Stage3;
+uniform vec2 uBounds_Stage3;
+uniform vec4 uKernel_Stage3[3];
+uniform vec4 ucircle_Stage4;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+uniform sampler2D uTextureSampler_0_Stage3;
+in vec2 vTransformedCoords_0_Stage0;
+in vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = uColor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ vec2 translatedFragPos = gl_FragCoord.xy - uproxyRect_Stage2.xy;
+ float threshold = ucornerRadius_Stage2 + 2.0 * ublurRadius_Stage2;
+ vec2 middle = (uproxyRect_Stage2.zw - uproxyRect_Stage2.xy) - 2.0 * threshold;
+ if (translatedFragPos.x >= threshold && translatedFragPos.x < middle.x + threshold) {
+ translatedFragPos.x = threshold;
+ } else if (translatedFragPos.x >= middle.x + threshold) {
+ translatedFragPos.x -= middle.x - 1.0;
+ }
+ if (translatedFragPos.y > threshold && translatedFragPos.y < middle.y + threshold) {
+ translatedFragPos.y = threshold;
+ } else if (translatedFragPos.y >= middle.y + threshold) {
+ translatedFragPos.y -= middle.y - 1.0;
+ }
+ vec2 proxyDims = vec2(2.0 * threshold + 1.0);
+ vec2 texCoord = translatedFragPos / proxyDims;
+ output_Stage2 = output_Stage1 * texture(uTextureSampler_0_Stage2, texCoord);
+ }
+ vec4 output_Stage3;
+ {
+ output_Stage3 = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_1_Stage0 - 5.0 * uImageIncrement_Stage3;
+ vec2 coordSampled = vec2(0.0, 0.0);
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage3.x, uBounds_Stage3.y);
+ output_Stage3 += texture(uTextureSampler_0_Stage3, coordSampled) * uKernel_Stage3[0].x;
+ coord += uImageIncrement_Stage3;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage3.x, uBounds_Stage3.y);
+ output_Stage3 += texture(uTextureSampler_0_Stage3, coordSampled) * uKernel_Stage3[0].y;
+ coord += uImageIncrement_Stage3;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage3.x, uBounds_Stage3.y);
+ output_Stage3 += texture(uTextureSampler_0_Stage3, coordSampled) * uKernel_Stage3[0].z;
+ coord += uImageIncrement_Stage3;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage3.x, uBounds_Stage3.y);
+ output_Stage3 += texture(uTextureSampler_0_Stage3, coordSampled) * uKernel_Stage3[0].w;
+ coord += uImageIncrement_Stage3;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage3.x, uBounds_Stage3.y);
+ output_Stage3 += texture(uTextureSampler_0_Stage3, coordSampled) * uKernel_Stage3[1].x;
+ coord += uImageIncrement_Stage3;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage3.x, uBounds_Stage3.y);
+ output_Stage3 += texture(uTextureSampler_0_Stage3, coordSampled) * uKernel_Stage3[1].y;
+ coord += uImageIncrement_Stage3;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage3.x, uBounds_Stage3.y);
+ output_Stage3 += texture(uTextureSampler_0_Stage3, coordSampled) * uKernel_Stage3[1].z;
+ coord += uImageIncrement_Stage3;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage3.x, uBounds_Stage3.y);
+ output_Stage3 += texture(uTextureSampler_0_Stage3, coordSampled) * uKernel_Stage3[1].w;
+ coord += uImageIncrement_Stage3;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage3.x, uBounds_Stage3.y);
+ output_Stage3 += texture(uTextureSampler_0_Stage3, coordSampled) * uKernel_Stage3[2].x;
+ coord += uImageIncrement_Stage3;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage3.x, uBounds_Stage3.y);
+ output_Stage3 += texture(uTextureSampler_0_Stage3, coordSampled) * uKernel_Stage3[2].y;
+ coord += uImageIncrement_Stage3;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage3.x, uBounds_Stage3.y);
+ output_Stage3 += texture(uTextureSampler_0_Stage3, coordSampled) * uKernel_Stage3[2].z;
+ coord += uImageIncrement_Stage3;
+ output_Stage3 *= output_Stage2;
+ }
+ vec4 output_Stage4;
+ {
+ float d;
+ {
+ d = (1.0 - length((ucircle_Stage4.xy - gl_FragCoord.xy) * ucircle_Stage4.w)) * ucircle_Stage4.z;
+ }
+ {
+ output_Stage4 = output_Stage3 * clamp(d, 0.0, 1.0);
+ }
+ }
+ {
+ sk_FragColor = (vec4(1.0) - outputColor_Stage0) * output_Stage4;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 inPosition;
+out vec2 vTransformedCoords_0_Stage0;
+out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vec3 pos3 = uViewM_Stage0 * vec3(inPosition, 1.0);
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos3.x, pos3.y, 0.0, pos3.z);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1285.shader_test b/shaders/skia/1285.shader_test
new file mode 100644
index 0000000..4687673
--- /dev/null
+++ b/shaders/skia/1285.shader_test
@@ -0,0 +1,253 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uColor_Stage0;
+uniform vec3 uedges_Stage1[3];
+uniform vec4 uleftBorderColor_Stage2_c0_c0;
+uniform vec4 urightBorderColor_Stage2_c0_c0;
+uniform float ubias_Stage2_c0_c0_c0_c0;
+uniform float uscale_Stage2_c0_c0_c0_c0;
+uniform vec4 ustart_Stage2_c0_c0_c1_c0;
+uniform vec4 uend_Stage2_c0_c0_c1_c0;
+uniform vec4 uboundsUniform_Stage3;
+uniform float uxInvZoom_Stage3;
+uniform float uyInvZoom_Stage3;
+uniform float uxInvInset_Stage3;
+uniform float uyInvInset_Stage3;
+uniform vec2 uoffset_Stage3;
+uniform vec2 ubaseFrequency_Stage4;
+uniform float uz_Stage4;
+uniform vec4 ucolor_Stage5;
+uniform vec2 ufocalParams_Stage6_c1_c0_c0_c0;
+uniform vec4 uscale0_1_Stage6_c1_c0_c1_c0;
+uniform vec4 uscale2_3_Stage6_c1_c0_c1_c0;
+uniform vec4 uscale4_5_Stage6_c1_c0_c1_c0;
+uniform vec4 ubias0_1_Stage6_c1_c0_c1_c0;
+uniform vec4 ubias2_3_Stage6_c1_c0_c1_c0;
+uniform vec4 ubias4_5_Stage6_c1_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage6_c1_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage6_c1_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage3;
+uniform sampler2D uTextureSampler_0_Stage4;
+uniform sampler2D uTextureSampler_1_Stage4;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+noperspective in vec2 vTransformedCoords_3_Stage0;
+vec4 SweepGradientLayout_Stage2_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float angle;
+ {
+ angle = atan(-vTransformedCoords_0_Stage0.y, -vTransformedCoords_0_Stage0.x);
+ }
+ float t = ((angle * 0.15915493667125702 + 0.5) + ubias_Stage2_c0_c0_c0_c0) * uscale_Stage2_c0_c0_c0_c0;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage2_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage2_c0_c0_c1_c0 + t * uend_Stage2_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = SweepGradientLayout_Stage2_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage2_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage2_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage2_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec3 fade_Stage4(vec3 t) {
+ return ((t * t) * t) * (t * (t * 6.0 - 15.0) + 10.0);
+}
+float perm_Stage4(float x) {
+ return texture(uTextureSampler_0_Stage4, vec2(fract(x / 256.0), 0.0)).x * 255.0;
+}
+float grad_Stage4(float x, vec3 p) {
+ return dot(texture(uTextureSampler_1_Stage4, vec2(fract(x / 16.0), 0.0)).xyz * 255.0 - vec3(1.0), p);
+}
+float lerp_Stage4(float a, float b, float w) {
+ return a + w * (b - a);
+}
+float noise_Stage4(vec3 p) {
+ vec3 P = mod(floor(p), 256.0);
+ p -= floor(p);
+ vec3 f = fade_Stage4(p);
+ float A = perm_Stage4(P.x) + P.y;
+ float AA = perm_Stage4(A) + P.z;
+ float AB = perm_Stage4(A + 1.0) + P.z;
+ float B = perm_Stage4(P.x + 1.0) + P.y;
+ float BA = perm_Stage4(B) + P.z;
+ float BB = perm_Stage4(B + 1.0) + P.z;
+ float result = lerp_Stage4(lerp_Stage4(lerp_Stage4(grad_Stage4(perm_Stage4(AA), p), grad_Stage4(perm_Stage4(BA), p + vec3(-1.0, 0.0, 0.0)), f.x), lerp_Stage4(grad_Stage4(perm_Stage4(AB), p + vec3(0.0, -1.0, 0.0)), grad_Stage4(perm_Stage4(BB), p + vec3(-1.0, -1.0, 0.0)), f.x), f.y), lerp_Stage4(lerp_Stage4(grad_Stage4(perm_Stage4(AA + 1.0), p + vec3(0.0, 0.0, -1.0)), grad_Stage4(perm_Stage4(BA + 1.0), p + vec3(-1.0, 0.0, -1.0)), f.x), lerp_Stage4(grad_Stage4(perm_Stage4(AB + 1.0), p + vec3(0.0, -1.0, -1.0)), grad_Stage4(perm_Stage4(BB + 1.0), p + vec3(-1.0, -1.0, -1.0)), f.x), f.y), f.z);
+ return result;
+}
+float noiseOctaves_Stage4(vec3 p) {
+ float result = 0.0;
+ float ratio = 1.0;
+ for (float i = 0.0;i < 9.0; i++) {
+ result += noise_Stage4(p) / ratio;
+ p *= 2.0;
+ ratio *= 2.0;
+ }
+ return (result + 1.0) / 2.0;
+}
+vec4 TwoPointConicalGradientLayout_Stage6_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_3_Stage0;
+ float t = -1.0;
+ {
+ {
+ float r0 = ufocalParams_Stage6_c1_c0_c0_c0.x;
+ {
+ t = -length(p) - r0;
+ }
+ }
+ }
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage6_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage6_c1_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage6_c1_c0_c1_c0.x) {
+ scale = uscale0_1_Stage6_c1_c0_c1_c0;
+ bias = ubias0_1_Stage6_c1_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage6_c1_c0_c1_c0;
+ bias = ubias2_3_Stage6_c1_c0_c1_c0;
+ }
+ } else {
+ {
+ scale = uscale4_5_Stage6_c1_c0_c1_c0;
+ bias = ubias4_5_Stage6_c1_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage6_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage6_c1_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else {
+ {
+ t.x = fract(t.x);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage6_c1_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = uColor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ float alpha = 1.0;
+ float edge;
+ edge = dot(uedges_Stage1[0], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage1[1], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage1[2], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ alpha = 1.0 - alpha;
+ output_Stage1 = outputColor_Stage0 * alpha;
+ }
+ {
+ blend_dst_in(output_Stage1, ClampedGradientEffect_Stage2_c0_c0(vec4(1.0)));
+ }
+ {
+ vec2 coord = vTransformedCoords_1_Stage0;
+ vec2 delta = (coord - uboundsUniform_Stage3.xy) * uboundsUniform_Stage3.zw;
+ delta = min(delta, vec2(1.0, 1.0) - delta);
+ delta *= vec2(uxInvInset_Stage3, uyInvInset_Stage3);
+ if (delta.x < 2.0 && delta.y < 2.0) {
+ delta = vec2(2.0, 2.0) - delta;
+ float dist = length(delta);
+ dist = max(2.0 - dist, 0.0);
+ }
+ }
+ vec4 output_Stage4;
+ {
+ vec2 coords = vTransformedCoords_2_Stage0 * ubaseFrequency_Stage4;
+ float r = noiseOctaves_Stage4(vec3(coords, uz_Stage4));
+ float g = noiseOctaves_Stage4(vec3(coords, uz_Stage4));
+ float b = noiseOctaves_Stage4(vec3(coords, uz_Stage4));
+ float a = noiseOctaves_Stage4(vec3(coords, uz_Stage4));
+ output_Stage4 = vec4(r, g, b, a);
+ output_Stage4 = clamp(output_Stage4, 0.0, 1.0);
+ output_Stage4 = vec4(output_Stage4.xyz * output_Stage4.www, output_Stage4.w);
+ }
+ vec4 output_Stage5;
+ {
+ {
+ output_Stage5 = ucolor_Stage5;
+ }
+ }
+ vec4 output_Stage6;
+ {
+ output_Stage6 = blend_dst_in(vec4(1.0), TiledGradientEffect_Stage6_c1_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage5 * output_Stage6;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+uniform mat3 uCoordTransformMatrix_3_Stage0;
+in vec2 inPosition;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+noperspective out vec2 vTransformedCoords_3_Stage0;
+void main() {
+ vec2 pos2 = (uViewM_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_3_Stage0 = (uCoordTransformMatrix_3_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1288.shader_test b/shaders/skia/1288.shader_test
new file mode 100644
index 0000000..a8bc265
--- /dev/null
+++ b/shaders/skia/1288.shader_test
@@ -0,0 +1,168 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uColor_Stage0;
+uniform vec3 uedges_Stage1[3];
+uniform vec4 uleftBorderColor_Stage2_c0_c0;
+uniform vec4 urightBorderColor_Stage2_c0_c0;
+uniform float ubias_Stage2_c0_c0_c0_c0;
+uniform float uscale_Stage2_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage2_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage2_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage2_c0_c0_c1_c0;
+uniform vec4 uleftBorderColor_Stage3_c1_c0;
+uniform vec4 urightBorderColor_Stage3_c1_c0;
+uniform vec4 uscale01_Stage3_c1_c0_c1_c0;
+uniform vec4 ubias01_Stage3_c1_c0_c1_c0;
+uniform vec4 uscale23_Stage3_c1_c0_c1_c0;
+uniform vec4 ubias23_Stage3_c1_c0_c1_c0;
+uniform float uthreshold_Stage3_c1_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 SweepGradientLayout_Stage2_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float angle;
+ {
+ angle = atan(-vTransformedCoords_0_Stage0.y, -vTransformedCoords_0_Stage0.x);
+ }
+ float t = ((angle * 0.15915493667125702 + 0.5) + ubias_Stage2_c0_c0_c0_c0) * uscale_Stage2_c0_c0_c0_c0;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage2_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage2_c0_c0_c1_c0;
+ bias = ubias0_1_Stage2_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage2_c0_c0_c1_c0;
+ bias = ubias2_3_Stage2_c0_c0_c1_c0;
+ }
+ } else {
+ {
+ scale = uscale4_5_Stage2_c0_c0_c1_c0;
+ bias = ubias4_5_Stage2_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = SweepGradientLayout_Stage2_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage2_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage2_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage2_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 LinearGradientLayout_Stage3_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_1_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 DualIntervalGradientColorizer_Stage3_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthreshold_Stage3_c1_c0_c1_c0) {
+ scale = uscale01_Stage3_c1_c0_c1_c0;
+ bias = ubias01_Stage3_c1_c0_c1_c0;
+ } else {
+ scale = uscale23_Stage3_c1_c0_c1_c0;
+ bias = ubias23_Stage3_c1_c0_c1_c0;
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage3_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage3_c1_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage3_c1_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage3_c1_c0;
+ } else {
+ _output = DualIntervalGradientColorizer_Stage3_c1_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ float alpha = 1.0;
+ float edge;
+ edge = dot(uedges_Stage1[0], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage1[1], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage1[2], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ output_Stage1 = vec4(alpha);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_dst_in(output_Stage1, ClampedGradientEffect_Stage2_c0_c0(vec4(1.0)));
+ }
+ vec4 output_Stage3;
+ {
+ output_Stage3 = blend_dst_in(output_Stage2, ClampedGradientEffect_Stage3_c1_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = 1.0 - output_Stage3;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 inPosition;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vec2 pos2 = (uViewM_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1291.shader_test b/shaders/skia/1291.shader_test
new file mode 100644
index 0000000..267752c
--- /dev/null
+++ b/shaders/skia/1291.shader_test
@@ -0,0 +1,272 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_KHR_blend_equation_advanced : require
+out vec4 sk_FragColor;
+layout (blend_support_all_equations) out ;
+uniform vec4 uColor_Stage0;
+uniform vec4 ucircleData_Stage1;
+uniform vec2 uImageIncrement_Stage2;
+uniform vec2 uBounds_Stage2;
+uniform vec4 uKernel_Stage2[2];
+uniform vec2 uImageIncrement_Stage4;
+uniform float uSurfaceScale_Stage4;
+uniform vec3 uLightColor_Stage4;
+uniform float uKS_Stage4;
+uniform float uShininess_Stage4;
+uniform vec4 uTexDom_Stage4;
+uniform vec3 uDecalParams_Stage4;
+uniform vec3 uLightLocation_Stage4;
+uniform float ucornerRadius_Stage5;
+uniform vec4 uproxyRect_Stage5;
+uniform float ublurRadius_Stage5;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+uniform sampler2D uTextureSampler_0_Stage4;
+uniform sampler2D uTextureSampler_0_Stage5;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 light_Stage4(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ vec3 halfDir = normalize(surfaceToLight + vec3(0.0, 0.0, 1.0));
+ float colorScale = uKS_Stage4 * pow(dot(normal, halfDir), uShininess_Stage4);
+ vec3 color = lightColor * clamp(colorScale, 0.0, 1.0);
+ return vec4(color, max(max(color.x, color.y), color.z));
+}
+float sobel_Stage4(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage4(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage4(float m[9], float surfaceScale) {
+ return pointToNormal_Stage4(sobel_Stage4(0.0, 0.0, m[3], m[4], m[6], m[7], 0.66666698455810547), sobel_Stage4(m[3], m[6], m[4], m[7], 0.0, 0.0, 0.66666698455810547), surfaceScale);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = uColor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec2 vec = vec2((gl_FragCoord.x - ucircleData_Stage1.x) * ucircleData_Stage1.w, (gl_FragCoord.y - ucircleData_Stage1.y) * ucircleData_Stage1.w);
+ float dist = length(vec) + (0.5 - ucircleData_Stage1.z) * ucircleData_Stage1.w;
+ output_Stage1 = outputColor_Stage0 * texture(uTextureSampler_0_Stage1, vec2(dist, 0.5)).w;
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0 - 2.0 * uImageIncrement_Stage2;
+ vec2 coordSampled = vec2(0.0, 0.0);
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage2.x, uBounds_Stage2.y - uBounds_Stage2.x) + uBounds_Stage2.x;
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[0].x;
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage2.x, uBounds_Stage2.y - uBounds_Stage2.x) + uBounds_Stage2.x;
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[0].y;
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage2.x, uBounds_Stage2.y - uBounds_Stage2.x) + uBounds_Stage2.x;
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[0].z;
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage2.x, uBounds_Stage2.y - uBounds_Stage2.x) + uBounds_Stage2.x;
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[0].w;
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage2.x, uBounds_Stage2.y - uBounds_Stage2.x) + uBounds_Stage2.x;
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[1].x;
+ coord += uImageIncrement_Stage2;
+ output_Stage2 *= output_Stage1;
+ }
+ vec4 output_Stage3;
+ {
+ output_Stage3 = output_Stage2;
+ }
+ vec4 output_Stage4;
+ {
+ vec2 coord = vTransformedCoords_1_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage4;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage4.xy, uTexDom_Stage4.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage4, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage4.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage4.y);
+ if (err > uDecalParams_Stage4.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage4.z < 1.0) {
+ err = 0.0;
+ }
+ temp0 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage4;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage4.xy, uTexDom_Stage4.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage4, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage4.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage4.y);
+ if (err > uDecalParams_Stage4.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage4.z < 1.0) {
+ err = 0.0;
+ }
+ temp1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage4;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage4.xy, uTexDom_Stage4.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage4, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage4.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage4.y);
+ if (err > uDecalParams_Stage4.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage4.z < 1.0) {
+ err = 0.0;
+ }
+ temp2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage4;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage4.xy, uTexDom_Stage4.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage4, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage4.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage4.y);
+ if (err > uDecalParams_Stage4.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage4.z < 1.0) {
+ err = 0.0;
+ }
+ temp3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage4.xy, uTexDom_Stage4.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage4, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage4.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage4.y);
+ if (err > uDecalParams_Stage4.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage4.z < 1.0) {
+ err = 0.0;
+ }
+ temp4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage4;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage4.xy, uTexDom_Stage4.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage4, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage4.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage4.y);
+ if (err > uDecalParams_Stage4.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage4.z < 1.0) {
+ err = 0.0;
+ }
+ temp5 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage4;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage4.xy, uTexDom_Stage4.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage4, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage4.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage4.y);
+ if (err > uDecalParams_Stage4.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage4.z < 1.0) {
+ err = 0.0;
+ }
+ temp6 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage4;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage4.xy, uTexDom_Stage4.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage4, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage4.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage4.y);
+ if (err > uDecalParams_Stage4.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage4.z < 1.0) {
+ err = 0.0;
+ }
+ temp7 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage4;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage4.xy, uTexDom_Stage4.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage4, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage4.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage4.y);
+ if (err > uDecalParams_Stage4.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage4.z < 1.0) {
+ err = 0.0;
+ }
+ temp8 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = normalize(uLightLocation_Stage4 - vec3(gl_FragCoord.xy, uSurfaceScale_Stage4 * m[4]));
+ output_Stage4 = light_Stage4(normal_Stage4(m, uSurfaceScale_Stage4), surfaceToLight, uLightColor_Stage4);
+ output_Stage4 *= output_Stage3;
+ }
+ vec4 output_Stage5;
+ {
+ vec2 translatedFragPos = gl_FragCoord.xy - uproxyRect_Stage5.xy;
+ float threshold = ucornerRadius_Stage5 + 2.0 * ublurRadius_Stage5;
+ vec2 middle = (uproxyRect_Stage5.zw - uproxyRect_Stage5.xy) - 2.0 * threshold;
+ if (translatedFragPos.x >= threshold && translatedFragPos.x < middle.x + threshold) {
+ translatedFragPos.x = threshold;
+ } else if (translatedFragPos.x >= middle.x + threshold) {
+ translatedFragPos.x -= middle.x - 1.0;
+ }
+ if (translatedFragPos.y > threshold && translatedFragPos.y < middle.y + threshold) {
+ translatedFragPos.y = threshold;
+ } else if (translatedFragPos.y >= middle.y + threshold) {
+ translatedFragPos.y -= middle.y - 1.0;
+ }
+ vec2 proxyDims = vec2(2.0 * threshold + 1.0);
+ vec2 texCoord = translatedFragPos / proxyDims;
+ output_Stage5 = texture(uTextureSampler_0_Stage5, texCoord);
+ }
+ {
+ sk_FragColor = output_Stage5 * output_Stage4;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vec2 pos2 = position;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(position, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(position, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1294.shader_test b/shaders/skia/1294.shader_test
new file mode 100644
index 0000000..7b7318d
--- /dev/null
+++ b/shaders/skia/1294.shader_test
@@ -0,0 +1,316 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uCoordTransformMatrix_2_Stage0;
+uniform vec2 ubaseFrequency_Stage1_c0_c0;
+uniform vec2 ustitchData_Stage1_c0_c0;
+uniform vec2 ubaseFrequency_Stage2_c1_c0;
+uniform vec2 ustitchData_Stage2_c1_c0;
+uniform vec4 uboundsUniform_Stage3_c2_c0;
+uniform float uxInvZoom_Stage3_c2_c0;
+uniform float uyInvZoom_Stage3_c2_c0;
+uniform float uxInvInset_Stage3_c2_c0;
+uniform float uyInvInset_Stage3_c2_c0;
+uniform vec2 uoffset_Stage3_c2_c0;
+uniform vec4 uleftBorderColor_Stage4_c3_c0;
+uniform vec4 urightBorderColor_Stage4_c3_c0;
+uniform float ubias_Stage4_c3_c0_c0_c0;
+uniform float uscale_Stage4_c3_c0_c0_c0;
+uniform vec4 uscale0_1_Stage4_c3_c0_c1_c0;
+uniform vec4 uscale2_3_Stage4_c3_c0_c1_c0;
+uniform vec4 uscale4_5_Stage4_c3_c0_c1_c0;
+uniform vec4 uscale6_7_Stage4_c3_c0_c1_c0;
+uniform vec4 uscale8_9_Stage4_c3_c0_c1_c0;
+uniform vec4 ubias0_1_Stage4_c3_c0_c1_c0;
+uniform vec4 ubias2_3_Stage4_c3_c0_c1_c0;
+uniform vec4 ubias4_5_Stage4_c3_c0_c1_c0;
+uniform vec4 ubias6_7_Stage4_c3_c0_c1_c0;
+uniform vec4 ubias8_9_Stage4_c3_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage4_c3_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage4_c3_c0_c1_c0;
+uniform float uinnerThreshold_Stage5;
+uniform float uouterThreshold_Stage5;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+uniform sampler2D uTextureSampler_1_Stage2;
+uniform sampler2D uTextureSampler_0_Stage3;
+uniform sampler2D uTextureSampler_0_Stage5;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_3_Stage0;
+noperspective in vec2 vTransformedCoords_4_Stage0;
+flat in vec4 vcolor_Stage0;
+float perlinnoise_Stage1_c0_c0(float chanCoord, vec2 noiseVec, vec2 stitchData) {
+ vec4 floorVal;
+ floorVal.xy = floor(noiseVec);
+ floorVal.zw = floorVal.xy + vec2(1.0);
+ vec2 fractVal = fract(noiseVec);
+ vec2 noiseSmooth = (fractVal * fractVal) * (vec2(3.0) - vec2(2.0) * fractVal);
+ if (floorVal.x >= stitchData.x) {
+ floorVal.x -= stitchData.x;
+ }
+ if (floorVal.y >= stitchData.y) {
+ floorVal.y -= stitchData.y;
+ }
+ if (floorVal.z >= stitchData.x) {
+ floorVal.z -= stitchData.x;
+ }
+ if (floorVal.w >= stitchData.y) {
+ floorVal.w -= stitchData.y;
+ }
+ floorVal = fract(floor(mod(floorVal, 256.0)) / vec4(256.0));
+ vec2 latticeIdx;
+ latticeIdx.x = texture(uTextureSampler_0_Stage1, vec2(floorVal.x, 0.5)).x;
+ latticeIdx.y = texture(uTextureSampler_0_Stage1, vec2(floorVal.z, 0.5)).x;
+ vec4 bcoords = fract(latticeIdx.xyxy + floorVal.yyww);
+ vec2 uv;
+ vec4 lattice = texture(uTextureSampler_1_Stage1, vec2(bcoords.x, chanCoord)).zyxw;
+ uv.x = dot((lattice.yw + lattice.xz * vec2(0.00390625)) * vec2(2.0) - vec2(1.0), fractVal);
+ fractVal.x -= 1.0;
+ lattice = texture(uTextureSampler_1_Stage1, vec2(bcoords.y, chanCoord)).zyxw;
+ uv.y = dot((lattice.yw + lattice.xz * vec2(0.00390625)) * vec2(2.0) - vec2(1.0), fractVal);
+ vec2 ab;
+ ab.x = mix(uv.x, uv.y, noiseSmooth.x);
+ fractVal.y -= 1.0;
+ lattice = texture(uTextureSampler_1_Stage1, vec2(bcoords.w, chanCoord)).zyxw;
+ uv.y = dot((lattice.yw + lattice.xz * vec2(0.00390625)) * vec2(2.0) - vec2(1.0), fractVal);
+ fractVal.x += 1.0;
+ lattice = texture(uTextureSampler_1_Stage1, vec2(bcoords.z, chanCoord)).zyxw;
+ uv.x = dot((lattice.yw + lattice.xz * vec2(0.00390625)) * vec2(2.0) - vec2(1.0), fractVal);
+ ab.y = mix(uv.x, uv.y, noiseSmooth.x);
+ return mix(ab.x, ab.y, noiseSmooth.y);
+}
+vec4 PerlinNoise_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 noiseVec = floor(vTransformedCoords_0_Stage0) * ubaseFrequency_Stage1_c0_c0;
+ _output = vec4(0.0);
+ vec2 stitchData = ustitchData_Stage1_c0_c0;
+ float ratio = 1.0;
+ for (int octave = 0;octave < 5; ++octave) {
+ _output += abs(vec4(perlinnoise_Stage1_c0_c0(0.125, noiseVec, stitchData), perlinnoise_Stage1_c0_c0(0.375, noiseVec, stitchData), perlinnoise_Stage1_c0_c0(0.625, noiseVec, stitchData), perlinnoise_Stage1_c0_c0(0.875, noiseVec, stitchData))) * ratio;
+ noiseVec *= vec2(2.0);
+ ratio *= 0.5;
+ stitchData *= vec2(2.0);
+ }
+ _output = clamp(_output, 0.0, 1.0);
+ _output = vec4(_output.xyz * _output.www, _output.w);
+ return _output;
+}
+float perlinnoise_Stage2_c1_c0(float chanCoord, vec2 noiseVec, vec2 stitchData) {
+ vec4 floorVal;
+ floorVal.xy = floor(noiseVec);
+ floorVal.zw = floorVal.xy + vec2(1.0);
+ vec2 fractVal = fract(noiseVec);
+ vec2 noiseSmooth = (fractVal * fractVal) * (vec2(3.0) - vec2(2.0) * fractVal);
+ if (floorVal.x >= stitchData.x) {
+ floorVal.x -= stitchData.x;
+ }
+ if (floorVal.y >= stitchData.y) {
+ floorVal.y -= stitchData.y;
+ }
+ if (floorVal.z >= stitchData.x) {
+ floorVal.z -= stitchData.x;
+ }
+ if (floorVal.w >= stitchData.y) {
+ floorVal.w -= stitchData.y;
+ }
+ floorVal = fract(floor(mod(floorVal, 256.0)) / vec4(256.0));
+ vec2 latticeIdx;
+ latticeIdx.x = texture(uTextureSampler_0_Stage2, vec2(floorVal.x, 0.5)).x;
+ latticeIdx.y = texture(uTextureSampler_0_Stage2, vec2(floorVal.z, 0.5)).x;
+ vec4 bcoords = fract(latticeIdx.xyxy + floorVal.yyww);
+ vec2 uv;
+ vec4 lattice = texture(uTextureSampler_1_Stage2, vec2(bcoords.x, chanCoord)).zyxw;
+ uv.x = dot((lattice.yw + lattice.xz * vec2(0.00390625)) * vec2(2.0) - vec2(1.0), fractVal);
+ fractVal.x -= 1.0;
+ lattice = texture(uTextureSampler_1_Stage2, vec2(bcoords.y, chanCoord)).zyxw;
+ uv.y = dot((lattice.yw + lattice.xz * vec2(0.00390625)) * vec2(2.0) - vec2(1.0), fractVal);
+ vec2 ab;
+ ab.x = mix(uv.x, uv.y, noiseSmooth.x);
+ fractVal.y -= 1.0;
+ lattice = texture(uTextureSampler_1_Stage2, vec2(bcoords.w, chanCoord)).zyxw;
+ uv.y = dot((lattice.yw + lattice.xz * vec2(0.00390625)) * vec2(2.0) - vec2(1.0), fractVal);
+ fractVal.x += 1.0;
+ lattice = texture(uTextureSampler_1_Stage2, vec2(bcoords.z, chanCoord)).zyxw;
+ uv.x = dot((lattice.yw + lattice.xz * vec2(0.00390625)) * vec2(2.0) - vec2(1.0), fractVal);
+ ab.y = mix(uv.x, uv.y, noiseSmooth.x);
+ return mix(ab.x, ab.y, noiseSmooth.y);
+}
+vec4 PerlinNoise_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 noiseVec = floor(vTransformedCoords_1_Stage0) * ubaseFrequency_Stage2_c1_c0;
+ _output = vec4(0.0);
+ vec2 stitchData = ustitchData_Stage2_c1_c0;
+ float ratio = 1.0;
+ for (int octave = 0;octave < 9; ++octave) {
+ _output += vec4(perlinnoise_Stage2_c1_c0(0.125, noiseVec, stitchData), perlinnoise_Stage2_c1_c0(0.375, noiseVec, stitchData), perlinnoise_Stage2_c1_c0(0.625, noiseVec, stitchData), perlinnoise_Stage2_c1_c0(0.875, noiseVec, stitchData)) * ratio;
+ noiseVec *= vec2(2.0);
+ ratio *= 0.5;
+ stitchData *= vec2(2.0);
+ }
+ _output = _output * vec4(0.5) + vec4(0.5);
+ _output = clamp(_output, 0.0, 1.0);
+ _output = vec4(_output.xyz * _output.www, _output.w);
+ return _output;
+}
+vec4 MagnifierEffect_Stage3_c2_c0(vec4 _input, vec2 _coords) {
+ _coords = _coords * uCoordTransformMatrix_2_Stage0.xz + uCoordTransformMatrix_2_Stage0.yw;
+ vec4 _output;
+ vec2 coord = _coords;
+ vec2 zoom_coord = uoffset_Stage3_c2_c0 + coord * vec2(uxInvZoom_Stage3_c2_c0, uyInvZoom_Stage3_c2_c0);
+ vec2 delta = (coord - uboundsUniform_Stage3_c2_c0.xy) * uboundsUniform_Stage3_c2_c0.zw;
+ delta = min(delta, vec2(1.0, 1.0) - delta);
+ delta *= vec2(uxInvInset_Stage3_c2_c0, uyInvInset_Stage3_c2_c0);
+ float weight = 0.0;
+ if (delta.x < 2.0 && delta.y < 2.0) {
+ delta = vec2(2.0, 2.0) - delta;
+ float dist = length(delta);
+ dist = max(2.0 - dist, 0.0);
+ weight = min(dist * dist, 1.0);
+ } else {
+ vec2 delta_squared = delta * delta;
+ weight = min(min(delta_squared.x, delta_squared.y), 1.0);
+ }
+ _output = texture(uTextureSampler_0_Stage3, mix(coord, zoom_coord, weight));
+ return _output;
+}
+vec4 SweepGradientLayout_Stage4_c3_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float angle;
+ {
+ angle = atan(-vTransformedCoords_3_Stage0.y, -vTransformedCoords_3_Stage0.x);
+ }
+ float t = ((angle * 0.15915493667125702 + 0.5) + ubias_Stage4_c3_c0_c0_c0) * uscale_Stage4_c3_c0_c0_c0;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage4_c3_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthresholds1_7_Stage4_c3_c0_c1_c0.w) {
+ if (t < uthresholds1_7_Stage4_c3_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage4_c3_c0_c1_c0.x) {
+ scale = uscale0_1_Stage4_c3_c0_c1_c0;
+ bias = ubias0_1_Stage4_c3_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage4_c3_c0_c1_c0;
+ bias = ubias2_3_Stage4_c3_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage4_c3_c0_c1_c0.z) {
+ scale = uscale4_5_Stage4_c3_c0_c1_c0;
+ bias = ubias4_5_Stage4_c3_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage4_c3_c0_c1_c0;
+ bias = ubias6_7_Stage4_c3_c0_c1_c0;
+ }
+ }
+ } else {
+ {
+ {
+ scale = uscale8_9_Stage4_c3_c0_c1_c0;
+ bias = ubias8_9_Stage4_c3_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage4_c3_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = SweepGradientLayout_Stage4_c3_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage4_c3_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage4_c3_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage4_c3_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_dst_in(outputColor_Stage0, PerlinNoise_Stage1_c0_c0(vec4(1.0)));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_dst_in(output_Stage1, PerlinNoise_Stage2_c1_c0(vec4(1.0)));
+ }
+ vec4 output_Stage3;
+ {
+ output_Stage3 = MagnifierEffect_Stage3_c2_c0(output_Stage2, gl_FragCoord.xy);
+ }
+ vec4 output_Stage4;
+ {
+ output_Stage4 = blend_dst_in(output_Stage3, ClampedGradientEffect_Stage4_c3_c0(vec4(1.0)));
+ }
+ vec4 output_Stage5;
+ {
+ vec4 color = output_Stage4;
+ vec4 mask_color = texture(uTextureSampler_0_Stage5, vTransformedCoords_4_Stage0);
+ if (mask_color.w < 0.5) {
+ if (color.w > uouterThreshold_Stage5) {
+ float scale = uouterThreshold_Stage5 / color.w;
+ color.xyz *= scale;
+ color.w = uouterThreshold_Stage5;
+ }
+ } else if (color.w < uinnerThreshold_Stage5) {
+ float scale = uinnerThreshold_Stage5 / max(0.0010000000474974513, color.w);
+ color.xyz *= scale;
+ color.w = uinnerThreshold_Stage5;
+ }
+ output_Stage5 = color;
+ }
+ {
+ sk_FragColor = output_Stage5;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_3_Stage0;
+uniform mat3 uCoordTransformMatrix_4_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_3_Stage0;
+noperspective out vec2 vTransformedCoords_4_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_3_Stage0 = (uCoordTransformMatrix_3_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_4_Stage0 = (uCoordTransformMatrix_4_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1297.shader_test b/shaders/skia/1297.shader_test
new file mode 100644
index 0000000..da4c7d8
--- /dev/null
+++ b/shaders/skia/1297.shader_test
@@ -0,0 +1,492 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1_c0_c0;
+uniform vec4 uKernel_Stage1_c0_c0[2];
+uniform vec2 uImageIncrement_Stage1_c1_c0_c0_c0_c0_c0;
+uniform float uSurfaceScale_Stage1_c1_c0_c0_c0_c0_c0;
+uniform vec3 uLightColor_Stage1_c1_c0_c0_c0_c0_c0;
+uniform float uKD_Stage1_c1_c0_c0_c0_c0_c0;
+uniform vec4 uTexDom_Stage1_c1_c0_c0_c0_c0_c0;
+uniform vec3 uDecalParams_Stage1_c1_c0_c0_c0_c0_c0;
+uniform vec3 uLightDirection_Stage1_c1_c0_c0_c0_c0_c0;
+uniform vec2 uImageIncrement_Stage1_c1_c0_c1_c0_c1_c0;
+uniform float uSurfaceScale_Stage1_c1_c0_c1_c0_c1_c0;
+uniform vec3 uLightColor_Stage1_c1_c0_c1_c0_c1_c0;
+uniform float uKD_Stage1_c1_c0_c1_c0_c1_c0;
+uniform vec4 uTexDom_Stage1_c1_c0_c1_c0_c1_c0;
+uniform vec3 uDecalParams_Stage1_c1_c0_c1_c0_c1_c0;
+uniform vec3 uLightLocation_Stage1_c1_c0_c1_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+uniform sampler2D uTextureSampler_2_Stage1;
+noperspective in vec4 vinCircleEdge_Stage0;
+noperspective in vec4 vinColor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+vec4 GaussianConvolution_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0 - 2.0 * uImageIncrement_Stage1_c0_c0;
+ vec2 coordSampled = vec2(0.0, 0.0);
+ coordSampled = coord;
+ _output += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1_c0_c0[0].x;
+ coord += uImageIncrement_Stage1_c0_c0;
+ coordSampled = coord;
+ _output += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1_c0_c0[0].y;
+ coord += uImageIncrement_Stage1_c0_c0;
+ coordSampled = coord;
+ _output += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1_c0_c0[0].z;
+ coord += uImageIncrement_Stage1_c0_c0;
+ coordSampled = coord;
+ _output += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1_c0_c0[0].w;
+ coord += uImageIncrement_Stage1_c0_c0;
+ coordSampled = coord;
+ _output += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1_c0_c0[1].x;
+ coord += uImageIncrement_Stage1_c0_c0;
+ _output *= _input;
+ return _output;
+}
+vec4 light_Stage1_c1_c0_c0_c0_c0_c0(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ float colorScale = uKD_Stage1_c1_c0_c0_c0_c0_c0 * dot(normal, surfaceToLight);
+ return vec4(lightColor * clamp(colorScale, 0.0, 1.0), 1.0);
+}
+float sobel_Stage1_c1_c0_c0_c0_c0_c0(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage1_c1_c0_c0_c0_c0_c0(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage1_c1_c0_c0_c0_c0_c0(float m[9], float surfaceScale) {
+ return pointToNormal_Stage1_c1_c0_c0_c0_c0_c0(sobel_Stage1_c1_c0_c0_c0_c0_c0(m[1], m[2], m[4], m[5], m[7], m[8], 0.5), sobel_Stage1_c1_c0_c0_c0_c0_c0(0.0, 0.0, m[1], m[7], m[2], m[8], 0.33333298563957214), surfaceScale);
+}
+vec4 DiffuseLighting_Stage1_c1_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coord = vTransformedCoords_1_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage1_c1_c0_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0_c0_c0.xy, uTexDom_Stage1_c1_c0_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp0 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1_c1_c0_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0_c0_c0.xy, uTexDom_Stage1_c1_c0_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1_c1_c0_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0_c0_c0.xy, uTexDom_Stage1_c1_c0_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage1_c1_c0_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0_c0_c0.xy, uTexDom_Stage1_c1_c0_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0_c0_c0.xy, uTexDom_Stage1_c1_c0_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1_c1_c0_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0_c0_c0.xy, uTexDom_Stage1_c1_c0_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp5 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage1_c1_c0_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0_c0_c0.xy, uTexDom_Stage1_c1_c0_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp6 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage1_c1_c0_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0_c0_c0.xy, uTexDom_Stage1_c1_c0_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp7 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage1_c1_c0_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0_c0_c0.xy, uTexDom_Stage1_c1_c0_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp8 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = uLightDirection_Stage1_c1_c0_c0_c0_c0_c0;
+ _output = light_Stage1_c1_c0_c0_c0_c0_c0(normal_Stage1_c1_c0_c0_c0_c0_c0(m, uSurfaceScale_Stage1_c1_c0_c0_c0_c0_c0), surfaceToLight, uLightColor_Stage1_c1_c0_c0_c0_c0_c0);
+ _output *= _input;
+ return _output;
+}
+vec4 ClampFragmentProcessor_Stage1_c1_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ float alpha = clamp(_input.w, 0.0, 1.0);
+ _output = vec4(clamp(_input.xyz, 0.0, alpha), alpha);
+ }
+ return _output;
+}
+float _blend_color_luminance(vec3 color) {
+ return dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), color);
+}
+vec3 _blend_set_color_luminance(vec3 hueSatColor, float alpha, vec3 lumColor) {
+ float lum = _blend_color_luminance(lumColor);
+ vec3 result = (lum - _blend_color_luminance(hueSatColor)) + hueSatColor;
+ float minComp = min(min(result.x, result.y), result.z);
+ float maxComp = max(max(result.x, result.y), result.z);
+ if (minComp < 0.0 && lum != minComp) {
+ result = lum + ((result - lum) * lum) / (lum - minComp);
+ }
+ if (maxComp > alpha && maxComp != lum) {
+ return lum + ((result - lum) * (alpha - lum)) / (maxComp - lum);
+ }
+ return result;
+}
+vec4 blend_color(vec4 src, vec4 dst) {
+ float alpha = dst.w * src.w;
+ vec3 sda = src.xyz * dst.w;
+ vec3 dsa = dst.xyz * src.w;
+ return vec4((((_blend_set_color_luminance(sda, alpha, dsa) + dst.xyz) - dsa) + src.xyz) - sda, (src.w + dst.w) - alpha);
+}
+vec4 ComposeTwo_Stage1_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_color(DiffuseLighting_Stage1_c1_c0_c0_c0_c0_c0(inputColor), ClampFragmentProcessor_Stage1_c1_c0_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 ClampFragmentProcessor_Stage1_c1_c0_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = clamp(_input, 0.0, 1.0);
+ }
+ return _output;
+}
+vec4 light_Stage1_c1_c0_c1_c0_c1_c0(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ float colorScale = uKD_Stage1_c1_c0_c1_c0_c1_c0 * dot(normal, surfaceToLight);
+ return vec4(lightColor * clamp(colorScale, 0.0, 1.0), 1.0);
+}
+float sobel_Stage1_c1_c0_c1_c0_c1_c0(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage1_c1_c0_c1_c0_c1_c0(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage1_c1_c0_c1_c0_c1_c0(float m[9], float surfaceScale) {
+ return pointToNormal_Stage1_c1_c0_c1_c0_c1_c0(sobel_Stage1_c1_c0_c1_c0_c1_c0(0.0, 0.0, m[3], m[4], m[6], m[7], 0.66666698455810547), sobel_Stage1_c1_c0_c1_c0_c1_c0(m[3], m[6], m[4], m[7], 0.0, 0.0, 0.66666698455810547), surfaceScale);
+}
+vec4 DiffuseLighting_Stage1_c1_c0_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coord = vTransformedCoords_2_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage1_c1_c0_c1_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c1_c0_c1_c0.xy, uTexDom_Stage1_c1_c0_c1_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c1_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c1_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c1_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c1_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp0 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1_c1_c0_c1_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c1_c0_c1_c0.xy, uTexDom_Stage1_c1_c0_c1_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c1_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c1_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c1_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c1_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1_c1_c0_c1_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c1_c0_c1_c0.xy, uTexDom_Stage1_c1_c0_c1_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c1_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c1_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c1_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c1_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage1_c1_c0_c1_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c1_c0_c1_c0.xy, uTexDom_Stage1_c1_c0_c1_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c1_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c1_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c1_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c1_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c1_c0_c1_c0.xy, uTexDom_Stage1_c1_c0_c1_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c1_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c1_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c1_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c1_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1_c1_c0_c1_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c1_c0_c1_c0.xy, uTexDom_Stage1_c1_c0_c1_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c1_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c1_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c1_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c1_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp5 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage1_c1_c0_c1_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c1_c0_c1_c0.xy, uTexDom_Stage1_c1_c0_c1_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c1_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c1_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c1_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c1_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp6 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage1_c1_c0_c1_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c1_c0_c1_c0.xy, uTexDom_Stage1_c1_c0_c1_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c1_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c1_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c1_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c1_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp7 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage1_c1_c0_c1_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c1_c0_c1_c0.xy, uTexDom_Stage1_c1_c0_c1_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c1_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c1_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c1_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c1_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp8 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = normalize(uLightLocation_Stage1_c1_c0_c1_c0_c1_c0 - vec3(gl_FragCoord.xy, uSurfaceScale_Stage1_c1_c0_c1_c0_c1_c0 * m[4]));
+ _output = light_Stage1_c1_c0_c1_c0_c1_c0(normal_Stage1_c1_c0_c1_c0_c1_c0(m, uSurfaceScale_Stage1_c1_c0_c1_c0_c1_c0), surfaceToLight, uLightColor_Stage1_c1_c0_c1_c0_c1_c0);
+ _output *= _input;
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+vec4 ComposeTwo_Stage1_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_dst_in(ClampFragmentProcessor_Stage1_c1_c0_c1_c0_c0_c0(inputColor), DiffuseLighting_Stage1_c1_c0_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 ComposeTwo_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_src_over(ComposeTwo_Stage1_c1_c0_c0_c0(inputColor), ComposeTwo_Stage1_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 blend_luminosity(vec4 src, vec4 dst) {
+ float alpha = dst.w * src.w;
+ vec3 sda = src.xyz * dst.w;
+ vec3 dsa = dst.xyz * src.w;
+ return vec4((((_blend_set_color_luminance(dsa, alpha, sda) + dst.xyz) - dsa) + src.xyz) - sda, (src.w + dst.w) - alpha);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ vec4 circleEdge;
+ circleEdge = vinCircleEdge_Stage0;
+ outputColor_Stage0 = vinColor_Stage0;
+ float d = length(circleEdge.xy);
+ float distanceToOuterEdge = circleEdge.z * (1.0 - d);
+ float edgeAlpha = clamp(distanceToOuterEdge, 0.0, 1.0);
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_luminosity(GaussianConvolution_Stage1_c0_c0(inputColor), ComposeTwo_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ sk_FragColor = output_Stage1 * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec4 inCircleEdge;
+noperspective out vec4 vinCircleEdge_Stage0;
+noperspective out vec4 vinColor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+void main() {
+ vinCircleEdge_Stage0 = inCircleEdge;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/13-1.shader_test b/shaders/skia/13-1.shader_test
new file mode 100644
index 0000000..5e2df14
--- /dev/null
+++ b/shaders/skia/13-1.shader_test
@@ -0,0 +1,118 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uborder_Stage1_c0_c0;
+uniform vec4 usubset_Stage1_c0_c0;
+uniform vec4 unorm_Stage1_c0_c0;
+uniform vec4 uborder_Stage1_c1_c0;
+uniform vec4 usubset_Stage1_c1_c0;
+uniform vec4 uclamp_Stage1_c1_c0;
+uniform vec4 unorm_Stage1_c1_c0;
+uniform vec4 uborder_Stage1_c2_c0;
+uniform vec4 usubset_Stage1_c2_c0;
+uniform vec4 uclamp_Stage1_c2_c0;
+uniform vec4 unorm_Stage1_c2_c0;
+uniform mat3 ucolorSpaceMatrix_Stage1;
+uniform vec3 ucolorSpaceTranslate_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+uniform sampler2D uTextureSampler_2_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+vec4 TextureEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 inCoord = vTransformedCoords_0_Stage0;
+ inCoord *= unorm_Stage1_c0_c0.xy;
+ vec2 subsetCoord;
+ subsetCoord.x = inCoord.x;
+ subsetCoord.y = inCoord.y;
+ vec2 clampedCoord;
+ clampedCoord.x = subsetCoord.x;
+ clampedCoord.y = subsetCoord.y;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord * unorm_Stage1_c0_c0.zw);
+ if (inCoord.x < usubset_Stage1_c0_c0.x || inCoord.x > usubset_Stage1_c0_c0.z) {
+ textureColor = uborder_Stage1_c0_c0;
+ }
+ if (inCoord.y < usubset_Stage1_c0_c0.y || inCoord.y > usubset_Stage1_c0_c0.w) {
+ textureColor = uborder_Stage1_c0_c0;
+ }
+ _output = _input * textureColor;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 inCoord = vTransformedCoords_1_Stage0;
+ inCoord *= unorm_Stage1_c1_c0.xy;
+ vec2 subsetCoord;
+ subsetCoord.x = inCoord.x;
+ subsetCoord.y = inCoord.y;
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage1_c1_c0.x, uclamp_Stage1_c1_c0.z);
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage1_c1_c0.y, uclamp_Stage1_c1_c0.w);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord * unorm_Stage1_c1_c0.zw);
+ float errX = subsetCoord.x - clampedCoord.x;
+ float errY = subsetCoord.y - clampedCoord.y;
+ textureColor = mix(textureColor, uborder_Stage1_c1_c0, min(abs(errX), 1.0));
+ textureColor = mix(textureColor, uborder_Stage1_c1_c0, min(abs(errY), 1.0));
+ _output = _input * textureColor;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c2_c0(vec4 _input) {
+ vec4 _output;
+ vec2 inCoord = vTransformedCoords_2_Stage0;
+ inCoord *= unorm_Stage1_c2_c0.xy;
+ vec2 subsetCoord;
+ subsetCoord.x = inCoord.x;
+ subsetCoord.y = inCoord.y;
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage1_c2_c0.x, uclamp_Stage1_c2_c0.z);
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage1_c2_c0.y, uclamp_Stage1_c2_c0.w);
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord * unorm_Stage1_c2_c0.zw);
+ float errX = subsetCoord.x - clampedCoord.x;
+ float errY = subsetCoord.y - clampedCoord.y;
+ textureColor = mix(textureColor, uborder_Stage1_c2_c0, min(abs(errX), 1.0));
+ textureColor = mix(textureColor, uborder_Stage1_c2_c0, min(abs(errY), 1.0));
+ _output = _input * textureColor;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ vec4 planes[3];
+ planes[0] = TextureEffect_Stage1_c0_c0(vec4(1.0));
+ planes[1] = TextureEffect_Stage1_c1_c0(vec4(1.0));
+ planes[2] = TextureEffect_Stage1_c2_c0(vec4(1.0));
+ vec4 color = vec4(planes[0].x, planes[1].x, planes[2].x, 1.0);
+ color.xyz = clamp(color.xyz * ucolorSpaceMatrix_Stage1 + ucolorSpaceTranslate_Stage1, 0.0, 1.0);
+ output_Stage1 = color;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/13-100.shader_test b/shaders/skia/13-100.shader_test
new file mode 100644
index 0000000..74cdb74
--- /dev/null
+++ b/shaders/skia/13-100.shader_test
@@ -0,0 +1,137 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform float uSurfaceScale_Stage1;
+uniform vec3 uLightColor_Stage1;
+uniform float uKD_Stage1;
+uniform vec3 uLightLocation_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 light_Stage1(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ float colorScale = uKD_Stage1 * dot(normal, surfaceToLight);
+ return vec4(lightColor * clamp(colorScale, 0.0, 1.0), 1.0);
+}
+float sobel_Stage1(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage1(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage1(float m[9], float surfaceScale) {
+ return pointToNormal_Stage1(sobel_Stage1(m[1], m[2], m[4], m[5], m[7], m[8], 0.5), sobel_Stage1(0.0, 0.0, m[1], m[7], m[2], m[8], 0.33333298563957214), surfaceScale);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ vec2 coord = vTransformedCoords_0_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp0 = textureColor;
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp1 = textureColor;
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp2 = textureColor;
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp3 = textureColor;
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp4 = textureColor;
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp5 = textureColor;
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp6 = textureColor;
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp7 = textureColor;
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp8 = textureColor;
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = normalize(uLightLocation_Stage1 - vec3(gl_FragCoord.xy, uSurfaceScale_Stage1 * m[4]));
+ output_Stage1 = light_Stage1(normal_Stage1(m, uSurfaceScale_Stage1), surfaceToLight, uLightColor_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/13-101.shader_test b/shaders/skia/13-101.shader_test
new file mode 100644
index 0000000..d4d6642
--- /dev/null
+++ b/shaders/skia/13-101.shader_test
@@ -0,0 +1,67 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec2 uDstTextureUpperLeft_Stage1;
+uniform vec2 uDstTextureCoordScale_Stage1;
+uniform sampler2D uTextureSampler_0_Stage0;
+uniform sampler2D uDstTextureSampler_Stage1;
+noperspective in vec2 vTextureCoords_Stage0;
+flat in int vTexIndex_Stage0;
+noperspective in vec4 vinColor_Stage0;
+vec4 blend_dst(vec4 src, vec4 dst) {
+ return dst;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vinColor_Stage0;
+ vec4 texColor;
+ {
+ texColor = texture(uTextureSampler_0_Stage0, vTextureCoords_Stage0);
+ }
+ outputCoverage_Stage0 = texColor;
+ }
+ {
+ if (all(lessThanEqual(outputCoverage_Stage0.xyz, vec3(0.0)))) {
+ discard;
+ }
+ vec2 _dstTexCoord = (gl_FragCoord.xy - uDstTextureUpperLeft_Stage1) * uDstTextureCoordScale_Stage1;
+ _dstTexCoord.y = 1.0 - _dstTexCoord.y;
+ vec4 _dstColor = texture(uDstTextureSampler_Stage1, _dstTexCoord);
+ sk_FragColor = blend_dst(outputColor_Stage0, _dstColor);
+ float lerpRed = mix(_dstColor.w, sk_FragColor.w, outputCoverage_Stage0.x);
+ float lerpBlue = mix(_dstColor.w, sk_FragColor.w, outputCoverage_Stage0.y);
+ float lerpGreen = mix(_dstColor.w, sk_FragColor.w, outputCoverage_Stage0.z);
+ sk_FragColor = outputCoverage_Stage0 * sk_FragColor + (vec4(1.0) - outputCoverage_Stage0) * _dstColor;
+ sk_FragColor.w = max(max(lerpRed, lerpBlue), lerpGreen);
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform vec2 uAtlasSizeInv_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in uvec2 inTextureCoords;
+noperspective out vec2 vTextureCoords_Stage0;
+flat out int vTexIndex_Stage0;
+noperspective out vec4 vinColor_Stage0;
+void main() {
+ ivec2 signedCoords = ivec2(int(inTextureCoords.x), int(inTextureCoords.y));
+ vec2 unormTexCoords = vec2(float(signedCoords.x / 2), float(signedCoords.y / 2));
+ vTextureCoords_Stage0 = unormTexCoords * uAtlasSizeInv_Stage0;
+ vTexIndex_Stage0 = 0;
+ vinColor_Stage0 = inColor;
+ gl_Position = vec4(inPosition.x, inPosition.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/13-11.shader_test b/shaders/skia/13-11.shader_test
new file mode 100644
index 0000000..71ba74b
--- /dev/null
+++ b/shaders/skia/13-11.shader_test
@@ -0,0 +1,55 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 ucolor_Stage1_c0_c0;
+noperspective in vec4 vcolor_Stage0;
+vec4 ConstColorProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage1_c0_c0;
+ }
+ return _output;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 blend_darken(vec4 src, vec4 dst) {
+ vec4 result = blend_src_over(src, dst);
+ result.xyz = min(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
+ return result;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_darken(ConstColorProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 position;
+in vec4 inColor;
+noperspective out vec4 vcolor_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = position;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/13-110.shader_test b/shaders/skia/13-110.shader_test
new file mode 100644
index 0000000..77300f8
--- /dev/null
+++ b/shaders/skia/13-110.shader_test
@@ -0,0 +1,116 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uCoordTransformMatrix_1_Stage0;
+uniform vec4 uCoordTransformMatrix_2_Stage0;
+uniform vec4 uCoordTransformMatrix_3_Stage0;
+uniform vec4 uCoordTransformMatrix_4_Stage0;
+uniform mat3 ucolorSpaceMatrix_Stage1_c0_c0_c0_c0;
+uniform vec3 ucolorSpaceTranslate_Stage1_c0_c0_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+uniform sampler2D uTextureSampler_2_Stage1;
+uniform sampler2D uTextureSampler_3_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input, vec2 _coords) {
+ _coords = _coords * uCoordTransformMatrix_1_Stage0.xz + uCoordTransformMatrix_1_Stage0.yw;
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, _coords) * _input;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c0_c0_c0_c0_c1_c0(vec4 _input, vec2 _coords) {
+ _coords = _coords * uCoordTransformMatrix_2_Stage0.xz + uCoordTransformMatrix_2_Stage0.yw;
+ vec4 _output;
+ _output = texture(uTextureSampler_1_Stage1, _coords) * _input;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c0_c0_c0_c0_c2_c0(vec4 _input, vec2 _coords) {
+ _coords = _coords * uCoordTransformMatrix_3_Stage0.xz + uCoordTransformMatrix_3_Stage0.yw;
+ vec4 _output;
+ _output = texture(uTextureSampler_2_Stage1, _coords) * _input;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c0_c0_c0_c0_c3_c0(vec4 _input, vec2 _coords) {
+ _coords = _coords * uCoordTransformMatrix_4_Stage0.xz + uCoordTransformMatrix_4_Stage0.yw;
+ vec4 _output;
+ _output = texture(uTextureSampler_3_Stage1, _coords) * _input;
+ return _output;
+}
+vec4 YUVtoRGBEffect_Stage1_c0_c0_c0_c0(vec4 _input, vec2 _coords) {
+ vec4 _output;
+ vec4 planes[4];
+ planes[0] = TextureEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0), _coords);
+ planes[1] = TextureEffect_Stage1_c0_c0_c0_c0_c1_c0(vec4(1.0), _coords);
+ planes[2] = TextureEffect_Stage1_c0_c0_c0_c0_c2_c0(vec4(1.0), _coords);
+ planes[3] = TextureEffect_Stage1_c0_c0_c0_c0_c3_c0(vec4(1.0), _coords);
+ vec4 color = vec4(planes[0].x, planes[1].x, planes[2].x, planes[3].x);
+ color.xyz = clamp(color.xyz * ucolorSpaceMatrix_Stage1_c0_c0_c0_c0 + ucolorSpaceTranslate_Stage1_c0_c0_c0_c0, 0.0, 1.0);
+ color.xyz *= color.w;
+ _output = color;
+ return _output;
+}
+vec4 Bicubic_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coord = vTransformedCoords_0_Stage0 - vec2(0.5);
+ vec2 f = fract(coord);
+ coord += 0.5 - f;
+ vec4 wx = mat4(0.055555555555555552, 0.88888888888888884, 0.055555555555555552, 0.0, -0.5, 0.0, 0.5, 0.0, 0.83333333333333337, -2.0, 1.5, -0.33333333333333331, -0.3888888888888889, 1.1666666666666667, -1.1666666666666667, 0.3888888888888889) * vec4(1.0, f.x, f.x * f.x, (f.x * f.x) * f.x);
+ vec4 wy = mat4(0.055555555555555552, 0.88888888888888884, 0.055555555555555552, 0.0, -0.5, 0.0, 0.5, 0.0, 0.83333333333333337, -2.0, 1.5, -0.33333333333333331, -0.3888888888888889, 1.1666666666666667, -1.1666666666666667, 0.3888888888888889) * vec4(1.0, f.y, f.y * f.y, (f.y * f.y) * f.y);
+ vec4 rowColors[4];
+ rowColors[0] = YUVtoRGBEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(-1.0, -1.0));
+ rowColors[1] = YUVtoRGBEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(0.0, -1.0));
+ rowColors[2] = YUVtoRGBEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(1.0, -1.0));
+ rowColors[3] = YUVtoRGBEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(2.0, -1.0));
+ vec4 s0 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ rowColors[0] = YUVtoRGBEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(-1.0, 0.0));
+ rowColors[1] = YUVtoRGBEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord);
+ rowColors[2] = YUVtoRGBEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(1.0, 0.0));
+ rowColors[3] = YUVtoRGBEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(2.0, 0.0));
+ vec4 s1 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ rowColors[0] = YUVtoRGBEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(-1.0, 1.0));
+ rowColors[1] = YUVtoRGBEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(0.0, 1.0));
+ rowColors[2] = YUVtoRGBEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(1.0, 1.0));
+ rowColors[3] = YUVtoRGBEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(2.0, 1.0));
+ vec4 s2 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ rowColors[0] = YUVtoRGBEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(-1.0, 2.0));
+ rowColors[1] = YUVtoRGBEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(0.0, 2.0));
+ rowColors[2] = YUVtoRGBEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(1.0, 2.0));
+ rowColors[3] = YUVtoRGBEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(2.0, 2.0));
+ vec4 s3 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ vec4 bicubicColor = ((wy.x * s0 + wy.y * s1) + wy.z * s2) + wy.w * s3;
+ bicubicColor.xyz = max(vec3(0.0), min(bicubicColor.xyz, bicubicColor.www));
+ _output = bicubicColor * _input;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = Bicubic_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/13-113.shader_test b/shaders/skia/13-113.shader_test
new file mode 100644
index 0000000..45e18f7
--- /dev/null
+++ b/shaders/skia/13-113.shader_test
@@ -0,0 +1,123 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform vec2 uBounds_Stage1;
+uniform vec4 uKernel_Stage1[5];
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0 - 8.0 * uImageIncrement_Stage1;
+ vec2 coordSampled = vec2(0.0, 0.0);
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage1.x && coord.y <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].x;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage1.x && coord.y <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].y;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage1.x && coord.y <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].z;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage1.x && coord.y <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].w;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage1.x && coord.y <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].x;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage1.x && coord.y <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].y;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage1.x && coord.y <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].z;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage1.x && coord.y <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].w;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage1.x && coord.y <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].x;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage1.x && coord.y <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].y;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage1.x && coord.y <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].z;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage1.x && coord.y <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].w;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage1.x && coord.y <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].x;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage1.x && coord.y <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].y;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage1.x && coord.y <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].z;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage1.x && coord.y <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].w;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage1.x && coord.y <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[4].x;
+ }
+ coord += uImageIncrement_Stage1;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/13-116.shader_test b/shaders/skia/13-116.shader_test
new file mode 100644
index 0000000..92cdc90
--- /dev/null
+++ b/shaders/skia/13-116.shader_test
@@ -0,0 +1,58 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform vec4 uKernel_Stage1[2];
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0 - 3.0 * uImageIncrement_Stage1;
+ vec2 coordSampled = vec2(0.0, 0.0);
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].z;
+ coord += uImageIncrement_Stage1;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/13-121.shader_test b/shaders/skia/13-121.shader_test
new file mode 100644
index 0000000..d0cc1ea
--- /dev/null
+++ b/shaders/skia/13-121.shader_test
@@ -0,0 +1,90 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 RadialGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = length(vTransformedCoords_0_Stage0);
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = RadialGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/13-126.shader_test b/shaders/skia/13-126.shader_test
new file mode 100644
index 0000000..cfbeb7a
--- /dev/null
+++ b/shaders/skia/13-126.shader_test
@@ -0,0 +1,318 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform vec4 uKernel_Stage1[7];
+uniform vec2 uKernelOffset_Stage1;
+uniform float uGain_Stage1;
+uniform float uBias_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ vec4 sum = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0 - uKernelOffset_Stage1 * uImageIncrement_Stage1;
+ vec4 c;
+ {
+ float k = uKernel_Stage1[0].x;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[0].y;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[0].z;
+ {
+ vec2 origCoord = coord + vec2(2.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[0].w;
+ {
+ vec2 origCoord = coord + vec2(3.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[1].x;
+ {
+ vec2 origCoord = coord + vec2(4.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[1].y;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[1].z;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[1].w;
+ {
+ vec2 origCoord = coord + vec2(2.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[2].x;
+ {
+ vec2 origCoord = coord + vec2(3.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[2].y;
+ {
+ vec2 origCoord = coord + vec2(4.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[2].z;
+ {
+ vec2 origCoord = coord + vec2(0.0, 2.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[2].w;
+ {
+ vec2 origCoord = coord + vec2(1.0, 2.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[3].x;
+ {
+ vec2 origCoord = coord + vec2(2.0, 2.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[3].y;
+ {
+ vec2 origCoord = coord + vec2(3.0, 2.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[3].z;
+ {
+ vec2 origCoord = coord + vec2(4.0, 2.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[3].w;
+ {
+ vec2 origCoord = coord + vec2(0.0, 3.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[4].x;
+ {
+ vec2 origCoord = coord + vec2(1.0, 3.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[4].y;
+ {
+ vec2 origCoord = coord + vec2(2.0, 3.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[4].z;
+ {
+ vec2 origCoord = coord + vec2(3.0, 3.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[4].w;
+ {
+ vec2 origCoord = coord + vec2(4.0, 3.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[5].x;
+ {
+ vec2 origCoord = coord + vec2(0.0, 4.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[5].y;
+ {
+ vec2 origCoord = coord + vec2(1.0, 4.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[5].z;
+ {
+ vec2 origCoord = coord + vec2(2.0, 4.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[5].w;
+ {
+ vec2 origCoord = coord + vec2(3.0, 4.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[6].x;
+ {
+ vec2 origCoord = coord + vec2(4.0, 4.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ output_Stage1 = sum * uGain_Stage1 + uBias_Stage1;
+ output_Stage1.w = clamp(output_Stage1.w, 0.0, 1.0);
+ output_Stage1.xyz = clamp(output_Stage1.xyz, 0.0, output_Stage1.w);
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/13-127.shader_test b/shaders/skia/13-127.shader_test
new file mode 100644
index 0000000..dc0d57a
--- /dev/null
+++ b/shaders/skia/13-127.shader_test
@@ -0,0 +1,63 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform vec2 uBounds_Stage1;
+uniform vec4 uKernel_Stage1[2];
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0 - 2.0 * uImageIncrement_Stage1;
+ vec2 coordSampled = vec2(0.0, 0.0);
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage1.x && coord.y <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].x;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage1.x && coord.y <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].y;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage1.x && coord.y <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].z;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage1.x && coord.y <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].w;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage1.x && coord.y <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].x;
+ }
+ coord += uImageIncrement_Stage1;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/13-13.shader_test b/shaders/skia/13-13.shader_test
new file mode 100644
index 0000000..ae4f1b0
--- /dev/null
+++ b/shaders/skia/13-13.shader_test
@@ -0,0 +1,63 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+flat in vec4 vcolor_Stage0;
+noperspective in vec4 varccoord_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ outputCoverage_Stage0 = vec4(1.0);
+ if (vec2(0.0) != varccoord_Stage0.xy) {
+ float fn = dot(varccoord_Stage0.xy, varccoord_Stage0.xy) - 1.0;
+ if (fn > 0.0) {
+ outputCoverage_Stage0 = vec4(0.0);
+ }
+ }
+ }
+ {
+ sk_FragColor = outputColor_Stage0 * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec4 radii_selector;
+in vec4 corner_and_radius_outsets;
+in vec4 skew;
+in vec2 translate;
+in vec4 radii_x;
+in vec4 radii_y;
+in vec4 color;
+flat out vec4 vcolor_Stage0;
+noperspective out vec4 varccoord_Stage0;
+void main() {
+ vcolor_Stage0 = color;
+ vec2 corner = corner_and_radius_outsets.xy;
+ vec2 radius_outset = corner_and_radius_outsets.zw;
+ vec2 radii;
+ radii.x = dot(radii_selector, radii_x);
+ radii.y = dot(radii_selector, radii_y);
+ bool is_arc_section = radii.x > 0.0;
+ radii = abs(radii);
+ vec2 vertexpos = corner + radius_outset * radii;
+ mat2 skewmatrix = mat2(skew.xy, skew.zw);
+ vec2 devcoord = vertexpos * skewmatrix + translate;
+ if (is_arc_section) {
+ varccoord_Stage0.xy = 1.0 - abs(radius_outset);
+ mat2 derivatives = inverse(skewmatrix);
+ varccoord_Stage0.zw = derivatives * (((varccoord_Stage0.xy / radii) * corner) * 2.0);
+ } else {
+ varccoord_Stage0 = vec4(0.0);
+ }
+ gl_Position = vec4(devcoord.x, devcoord.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/13-135.shader_test b/shaders/skia/13-135.shader_test
new file mode 100644
index 0000000..e4b6f1f
--- /dev/null
+++ b/shaders/skia/13-135.shader_test
@@ -0,0 +1,61 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform float ucontrast_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TextureEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ vec4 color = output_Stage1;
+ float nonZeroAlpha = max(color.w, 9.9999997473787516e-05);
+ color = vec4(color.xyz / nonZeroAlpha, nonZeroAlpha);
+ color.xyz = color.xyz * color.xyz;
+ color = vec4(1.0, 1.0, 1.0, 1.0) - color;
+ if (ucontrast_Stage2 != 0.0) {
+ float m = (1.0 + ucontrast_Stage2) / (1.0 - ucontrast_Stage2);
+ float off = -0.5 * m + 0.5;
+ color = m * color + off;
+ }
+ color = clamp(color, 0.0, 1.0);
+ color.xyz = sqrt(color.xyz);
+ color.w = output_Stage1.w;
+ color.xyz *= color.w;
+ output_Stage2 = color;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/13-136.shader_test b/shaders/skia/13-136.shader_test
new file mode 100644
index 0000000..0ca5d96
--- /dev/null
+++ b/shaders/skia/13-136.shader_test
@@ -0,0 +1,72 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uscale01_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias01_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale23_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias23_Stage1_c0_c0_c1_c0;
+uniform float uthreshold_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 DualIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthreshold_Stage1_c0_c0_c1_c0) {
+ scale = uscale01_Stage1_c0_c0_c1_c0;
+ bias = ubias01_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale23_Stage1_c0_c0_c1_c0;
+ bias = ubias23_Stage1_c0_c0_c1_c0;
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ t.x = fract(t.x);
+ }
+ _output = DualIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TiledGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/13-14.shader_test b/shaders/skia/13-14.shader_test
new file mode 100644
index 0000000..e8965be
--- /dev/null
+++ b/shaders/skia/13-14.shader_test
@@ -0,0 +1,37 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uColor_Stage0;
+noperspective in float vinCoverage_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = uColor_Stage0;
+ float alpha = 1.0;
+ alpha = vinCoverage_Stage0;
+ outputCoverage_Stage0 = vec4(alpha);
+ }
+ {
+ sk_FragColor = outputColor_Stage0 * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 inPosition;
+in float inCoverage;
+noperspective out float vinCoverage_Stage0;
+void main() {
+ vec2 pos2 = inPosition;
+ vinCoverage_Stage0 = inCoverage;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/13-140.shader_test b/shaders/skia/13-140.shader_test
new file mode 100644
index 0000000..cdbdcae
--- /dev/null
+++ b/shaders/skia/13-140.shader_test
@@ -0,0 +1,111 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uscale01_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias01_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale23_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias23_Stage1_c0_c0_c1_c0;
+uniform float uthreshold_Stage1_c0_c0_c1_c0;
+uniform vec2 uDstTextureUpperLeft_Stage2;
+uniform vec2 uDstTextureCoordScale_Stage2;
+uniform sampler2D uTextureSampler_0_Stage0;
+uniform sampler2D uDstTextureSampler_Stage2;
+noperspective in vec2 vTextureCoords_Stage0;
+flat in int vTexIndex_Stage0;
+noperspective in vec4 vinColor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 DualIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthreshold_Stage1_c0_c0_c1_c0) {
+ scale = uscale01_Stage1_c0_c0_c1_c0;
+ bias = ubias01_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale23_Stage1_c0_c0_c1_c0;
+ bias = ubias23_Stage1_c0_c0_c1_c0;
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = DualIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ vec4 texColor;
+ {
+ texColor = texture(uTextureSampler_0_Stage0, vTextureCoords_Stage0);
+ }
+ outputCoverage_Stage0 = texColor;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TiledGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ if (all(lessThanEqual(outputCoverage_Stage0.xyz, vec3(0.0)))) {
+ discard;
+ }
+ vec2 _dstTexCoord = (gl_FragCoord.xy - uDstTextureUpperLeft_Stage2) * uDstTextureCoordScale_Stage2;
+ _dstTexCoord.y = 1.0 - _dstTexCoord.y;
+ vec4 _dstColor = texture(uDstTextureSampler_Stage2, _dstTexCoord);
+ sk_FragColor = blend_src_over(output_Stage1, _dstColor);
+ float lerpRed = mix(_dstColor.w, sk_FragColor.w, outputCoverage_Stage0.x);
+ float lerpBlue = mix(_dstColor.w, sk_FragColor.w, outputCoverage_Stage0.y);
+ float lerpGreen = mix(_dstColor.w, sk_FragColor.w, outputCoverage_Stage0.z);
+ sk_FragColor = outputCoverage_Stage0 * sk_FragColor + (vec4(1.0) - outputCoverage_Stage0) * _dstColor;
+ sk_FragColor.w = max(max(lerpRed, lerpBlue), lerpGreen);
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform vec2 uAtlasSizeInv_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in uvec2 inTextureCoords;
+noperspective out vec2 vTextureCoords_Stage0;
+flat out int vTexIndex_Stage0;
+noperspective out vec4 vinColor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ ivec2 signedCoords = ivec2(int(inTextureCoords.x), int(inTextureCoords.y));
+ vec2 unormTexCoords = vec2(float(signedCoords.x / 2), float(signedCoords.y / 2));
+ vTextureCoords_Stage0 = unormTexCoords * uAtlasSizeInv_Stage0;
+ vTexIndex_Stage0 = 0;
+ vinColor_Stage0 = inColor;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(inPosition.x, inPosition.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/13-144.shader_test b/shaders/skia/13-144.shader_test
new file mode 100644
index 0000000..6f3c753
--- /dev/null
+++ b/shaders/skia/13-144.shader_test
@@ -0,0 +1,117 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_0_Stage0;
+ float t = -1.0;
+ float v = 1.0;
+ {
+ {
+ float invR1 = ufocalParams_Stage1_c0_c0_c0_c0.x;
+ float fx = ufocalParams_Stage1_c0_c0_c0_c0.y;
+ float x_t = -1.0;
+ {
+ float temp = p.x * p.x - p.y * p.y;
+ if (temp >= 0.0) {
+ {
+ x_t = sqrt(temp) - p.x * invR1;
+ }
+ }
+ }
+ {
+ if (x_t <= 0.0) {
+ v = -1.0;
+ }
+ }
+ {
+ {
+ t = x_t + fx;
+ }
+ }
+ }
+ }
+ _output = vec4(t, v, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/13-145.shader_test b/shaders/skia/13-145.shader_test
new file mode 100644
index 0000000..3e83b22
--- /dev/null
+++ b/shaders/skia/13-145.shader_test
@@ -0,0 +1,80 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_0_Stage0;
+ float t = -1.0;
+ float v = 1.0;
+ {
+ {
+ float r0_2 = ufocalParams_Stage1_c0_c0_c0_c0.y;
+ t = r0_2 - p.y * p.y;
+ if (t >= 0.0) {
+ t = p.x + sqrt(t);
+ } else {
+ v = -1.0;
+ }
+ }
+ }
+ _output = vec4(t, v, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/13-146.shader_test b/shaders/skia/13-146.shader_test
new file mode 100644
index 0000000..a09405c
--- /dev/null
+++ b/shaders/skia/13-146.shader_test
@@ -0,0 +1,85 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_0_Stage0;
+ float t = -1.0;
+ {
+ {
+ float invR1 = ufocalParams_Stage1_c0_c0_c0_c0.x;
+ float x_t = -1.0;
+ {
+ x_t = length(p) - p.x * invR1;
+ }
+ {
+ {
+ t = x_t;
+ }
+ }
+ {
+ t = 1.0 - t;
+ }
+ }
+ }
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/13-147.shader_test b/shaders/skia/13-147.shader_test
new file mode 100644
index 0000000..1518e97
--- /dev/null
+++ b/shaders/skia/13-147.shader_test
@@ -0,0 +1,132 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_0_Stage0;
+ float t = -1.0;
+ float v = 1.0;
+ {
+ {
+ float invR1 = ufocalParams_Stage1_c0_c0_c0_c0.x;
+ float fx = ufocalParams_Stage1_c0_c0_c0_c0.y;
+ float x_t = -1.0;
+ {
+ float temp = p.x * p.x - p.y * p.y;
+ if (temp >= 0.0) {
+ {
+ x_t = sqrt(temp) - p.x * invR1;
+ }
+ }
+ }
+ {
+ if (x_t <= 0.0) {
+ v = -1.0;
+ }
+ }
+ {
+ {
+ t = x_t + fx;
+ }
+ }
+ }
+ }
+ _output = vec4(t, v, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TiledGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_1_Stage0.x);
+ uint y = uint(vTransformedCoords_1_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ output_Stage2 = vec4(clamp(output_Stage2.xyz + value * 0.0039215688593685627, 0.0, output_Stage2.w), output_Stage2.w);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/13-148.shader_test b/shaders/skia/13-148.shader_test
new file mode 100644
index 0000000..283e7bc
--- /dev/null
+++ b/shaders/skia/13-148.shader_test
@@ -0,0 +1,95 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_0_Stage0;
+ float t = -1.0;
+ float v = 1.0;
+ {
+ {
+ float r0_2 = ufocalParams_Stage1_c0_c0_c0_c0.y;
+ t = r0_2 - p.y * p.y;
+ if (t >= 0.0) {
+ t = p.x + sqrt(t);
+ } else {
+ v = -1.0;
+ }
+ }
+ }
+ _output = vec4(t, v, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TiledGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_1_Stage0.x);
+ uint y = uint(vTransformedCoords_1_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ output_Stage2 = vec4(clamp(output_Stage2.xyz + value * 0.0039215688593685627, 0.0, output_Stage2.w), output_Stage2.w);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/13-149.shader_test b/shaders/skia/13-149.shader_test
new file mode 100644
index 0000000..8f87264
--- /dev/null
+++ b/shaders/skia/13-149.shader_test
@@ -0,0 +1,100 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_0_Stage0;
+ float t = -1.0;
+ {
+ {
+ float invR1 = ufocalParams_Stage1_c0_c0_c0_c0.x;
+ float x_t = -1.0;
+ {
+ x_t = length(p) - p.x * invR1;
+ }
+ {
+ {
+ t = x_t;
+ }
+ }
+ {
+ t = 1.0 - t;
+ }
+ }
+ }
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TiledGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_1_Stage0.x);
+ uint y = uint(vTransformedCoords_1_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ output_Stage2 = vec4(clamp(output_Stage2.xyz + value * 0.0039215688593685627, 0.0, output_Stage2.w), output_Stage2.w);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/13-150.shader_test b/shaders/skia/13-150.shader_test
new file mode 100644
index 0000000..27c4f70
--- /dev/null
+++ b/shaders/skia/13-150.shader_test
@@ -0,0 +1,130 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_0_Stage0;
+ float t = -1.0;
+ float v = 1.0;
+ {
+ {
+ float invR1 = ufocalParams_Stage1_c0_c0_c0_c0.x;
+ float fx = ufocalParams_Stage1_c0_c0_c0_c0.y;
+ float x_t = -1.0;
+ {
+ float temp = p.x * p.x - p.y * p.y;
+ if (temp >= 0.0) {
+ {
+ x_t = sqrt(temp) - p.x * invR1;
+ }
+ }
+ }
+ {
+ if (x_t <= 0.0) {
+ v = -1.0;
+ }
+ }
+ {
+ {
+ t = x_t + fx;
+ }
+ }
+ }
+ }
+ _output = vec4(t, v, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else {
+ {
+ t.x = fract(t.x);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TiledGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_1_Stage0.x);
+ uint y = uint(vTransformedCoords_1_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ output_Stage2 = vec4(clamp(output_Stage2.xyz + value * 0.0039215688593685627, 0.0, output_Stage2.w), output_Stage2.w);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/13-151.shader_test b/shaders/skia/13-151.shader_test
new file mode 100644
index 0000000..1f019fe
--- /dev/null
+++ b/shaders/skia/13-151.shader_test
@@ -0,0 +1,93 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_0_Stage0;
+ float t = -1.0;
+ float v = 1.0;
+ {
+ {
+ float r0_2 = ufocalParams_Stage1_c0_c0_c0_c0.y;
+ t = r0_2 - p.y * p.y;
+ if (t >= 0.0) {
+ t = p.x + sqrt(t);
+ } else {
+ v = -1.0;
+ }
+ }
+ }
+ _output = vec4(t, v, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else {
+ {
+ t.x = fract(t.x);
+ }
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TiledGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_1_Stage0.x);
+ uint y = uint(vTransformedCoords_1_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ output_Stage2 = vec4(clamp(output_Stage2.xyz + value * 0.0039215688593685627, 0.0, output_Stage2.w), output_Stage2.w);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/13-152.shader_test b/shaders/skia/13-152.shader_test
new file mode 100644
index 0000000..49a96da
--- /dev/null
+++ b/shaders/skia/13-152.shader_test
@@ -0,0 +1,98 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_0_Stage0;
+ float t = -1.0;
+ {
+ {
+ float invR1 = ufocalParams_Stage1_c0_c0_c0_c0.x;
+ float x_t = -1.0;
+ {
+ x_t = length(p) - p.x * invR1;
+ }
+ {
+ {
+ t = x_t;
+ }
+ }
+ {
+ t = 1.0 - t;
+ }
+ }
+ }
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else {
+ {
+ t.x = fract(t.x);
+ }
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TiledGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_1_Stage0.x);
+ uint y = uint(vTransformedCoords_1_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ output_Stage2 = vec4(clamp(output_Stage2.xyz + value * 0.0039215688593685627, 0.0, output_Stage2.w), output_Stage2.w);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/13-153.shader_test b/shaders/skia/13-153.shader_test
new file mode 100644
index 0000000..eb3f726
--- /dev/null
+++ b/shaders/skia/13-153.shader_test
@@ -0,0 +1,133 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_0_Stage0;
+ float t = -1.0;
+ float v = 1.0;
+ {
+ {
+ float invR1 = ufocalParams_Stage1_c0_c0_c0_c0.x;
+ float fx = ufocalParams_Stage1_c0_c0_c0_c0.y;
+ float x_t = -1.0;
+ {
+ float temp = p.x * p.x - p.y * p.y;
+ if (temp >= 0.0) {
+ {
+ x_t = sqrt(temp) - p.x * invR1;
+ }
+ }
+ }
+ {
+ if (x_t <= 0.0) {
+ v = -1.0;
+ }
+ }
+ {
+ {
+ t = x_t + fx;
+ }
+ }
+ }
+ }
+ _output = vec4(t, v, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_1_Stage0.x);
+ uint y = uint(vTransformedCoords_1_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ output_Stage2 = vec4(clamp(output_Stage2.xyz + value * 0.0039215688593685627, 0.0, output_Stage2.w), output_Stage2.w);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/13-154.shader_test b/shaders/skia/13-154.shader_test
new file mode 100644
index 0000000..5986236
--- /dev/null
+++ b/shaders/skia/13-154.shader_test
@@ -0,0 +1,96 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_0_Stage0;
+ float t = -1.0;
+ float v = 1.0;
+ {
+ {
+ float r0_2 = ufocalParams_Stage1_c0_c0_c0_c0.y;
+ t = r0_2 - p.y * p.y;
+ if (t >= 0.0) {
+ t = p.x + sqrt(t);
+ } else {
+ v = -1.0;
+ }
+ }
+ }
+ _output = vec4(t, v, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_1_Stage0.x);
+ uint y = uint(vTransformedCoords_1_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ output_Stage2 = vec4(clamp(output_Stage2.xyz + value * 0.0039215688593685627, 0.0, output_Stage2.w), output_Stage2.w);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/13-155.shader_test b/shaders/skia/13-155.shader_test
new file mode 100644
index 0000000..3e52b38
--- /dev/null
+++ b/shaders/skia/13-155.shader_test
@@ -0,0 +1,101 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_0_Stage0;
+ float t = -1.0;
+ {
+ {
+ float invR1 = ufocalParams_Stage1_c0_c0_c0_c0.x;
+ float x_t = -1.0;
+ {
+ x_t = length(p) - p.x * invR1;
+ }
+ {
+ {
+ t = x_t;
+ }
+ }
+ {
+ t = 1.0 - t;
+ }
+ }
+ }
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_1_Stage0.x);
+ uint y = uint(vTransformedCoords_1_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ output_Stage2 = vec4(clamp(output_Stage2.xyz + value * 0.0039215688593685627, 0.0, output_Stage2.w), output_Stage2.w);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/13-157.shader_test b/shaders/skia/13-157.shader_test
new file mode 100644
index 0000000..208d586
--- /dev/null
+++ b/shaders/skia/13-157.shader_test
@@ -0,0 +1,98 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform float ubias_Stage1_c0_c0_c0_c0;
+uniform float uscale_Stage1_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 SweepGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float angle;
+ {
+ angle = atan(-vTransformedCoords_0_Stage0.y, -vTransformedCoords_0_Stage0.x);
+ }
+ float t = ((angle * 0.15915493667125702 + 0.5) + ubias_Stage1_c0_c0_c0_c0) * uscale_Stage1_c0_c0_c0_c0;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = SweepGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/13-159.shader_test b/shaders/skia/13-159.shader_test
new file mode 100644
index 0000000..d129eed
--- /dev/null
+++ b/shaders/skia/13-159.shader_test
@@ -0,0 +1,116 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+in float vcoverage_Stage0;
+flat in vec4 vgeomDomain_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_0_Stage0;
+ float t = -1.0;
+ float v = 1.0;
+ {
+ {
+ float invR1 = ufocalParams_Stage1_c0_c0_c0_c0.x;
+ float fx = ufocalParams_Stage1_c0_c0_c0_c0.y;
+ float x_t = -1.0;
+ {
+ float temp = p.x * p.x - p.y * p.y;
+ if (temp >= 0.0) {
+ {
+ x_t = -sqrt(temp) - p.x * invR1;
+ }
+ }
+ }
+ {
+ if (x_t <= 0.0) {
+ v = -1.0;
+ }
+ }
+ {
+ {
+ t = -x_t + fx;
+ }
+ }
+ }
+ }
+ _output = vec4(t, v, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ float coverage = vcoverage_Stage0 * gl_FragCoord.w;
+ vec4 geoDomain;
+ geoDomain = vgeomDomain_Stage0;
+ if (coverage < 0.5) {
+ vec4 dists4 = clamp(vec4(1.0, 1.0, -1.0, -1.0) * (gl_FragCoord.xyxy - geoDomain), 0.0, 1.0);
+ vec2 dists2 = dists4.xy * dists4.zw;
+ coverage = min(coverage, dists2.x * dists2.y);
+ }
+ outputCoverage_Stage0 = vec4(coverage);
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1 * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec4 positionWithCoverage;
+in vec4 color;
+in vec2 localCoord;
+in vec4 geomDomain;
+out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+out float vcoverage_Stage0;
+flat out vec4 vgeomDomain_Stage0;
+void main() {
+ vec3 position = positionWithCoverage.xyz;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ vcoverage_Stage0 = positionWithCoverage.w * positionWithCoverage.z;
+ vgeomDomain_Stage0 = geomDomain;
+ gl_Position = vec4(position.x, position.y, 0.0, position.z);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/13-160.shader_test b/shaders/skia/13-160.shader_test
new file mode 100644
index 0000000..d49b695
--- /dev/null
+++ b/shaders/skia/13-160.shader_test
@@ -0,0 +1,132 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+in vec2 vTransformedCoords_0_Stage0;
+in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+in float vcoverage_Stage0;
+flat in vec4 vgeomDomain_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_0_Stage0;
+ float t = -1.0;
+ float v = 1.0;
+ {
+ {
+ float invR1 = ufocalParams_Stage1_c0_c0_c0_c0.x;
+ float fx = ufocalParams_Stage1_c0_c0_c0_c0.y;
+ float x_t = -1.0;
+ {
+ float temp = p.x * p.x - p.y * p.y;
+ if (temp >= 0.0) {
+ {
+ x_t = -sqrt(temp) - p.x * invR1;
+ }
+ }
+ }
+ {
+ if (x_t <= 0.0) {
+ v = -1.0;
+ }
+ }
+ {
+ {
+ t = -x_t + fx;
+ }
+ }
+ }
+ }
+ _output = vec4(t, v, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ float coverage = vcoverage_Stage0 * gl_FragCoord.w;
+ vec4 geoDomain;
+ geoDomain = vgeomDomain_Stage0;
+ if (coverage < 0.5) {
+ vec4 dists4 = clamp(vec4(1.0, 1.0, -1.0, -1.0) * (gl_FragCoord.xyxy - geoDomain), 0.0, 1.0);
+ vec2 dists2 = dists4.xy * dists4.zw;
+ coverage = min(coverage, dists2.x * dists2.y);
+ }
+ outputCoverage_Stage0 = vec4(coverage);
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_1_Stage0.x);
+ uint y = uint(vTransformedCoords_1_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ output_Stage2 = vec4(clamp(output_Stage2.xyz + value * 0.0039215688593685627, 0.0, output_Stage2.w), output_Stage2.w);
+ }
+ {
+ sk_FragColor = output_Stage2 * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec4 positionWithCoverage;
+in vec4 color;
+in vec2 localCoord;
+in vec4 geomDomain;
+out vec2 vTransformedCoords_0_Stage0;
+out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+out float vcoverage_Stage0;
+flat out vec4 vgeomDomain_Stage0;
+void main() {
+ vec3 position = positionWithCoverage.xyz;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ vcoverage_Stage0 = positionWithCoverage.w * positionWithCoverage.z;
+ vgeomDomain_Stage0 = geomDomain;
+ gl_Position = vec4(position.x, position.y, 0.0, position.z);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/13-161.shader_test b/shaders/skia/13-161.shader_test
new file mode 100644
index 0000000..0a48467
--- /dev/null
+++ b/shaders/skia/13-161.shader_test
@@ -0,0 +1,95 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+noperspective in vec3 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 vTransformedCoords_0_Stage0_ensure2D = vTransformedCoords_0_Stage0.xy / vTransformedCoords_0_Stage0.z;
+ vec2 p = vTransformedCoords_0_Stage0_ensure2D;
+ float t = -1.0;
+ float v = 1.0;
+ {
+ {
+ float invR1 = ufocalParams_Stage1_c0_c0_c0_c0.x;
+ float fx = ufocalParams_Stage1_c0_c0_c0_c0.y;
+ float x_t = -1.0;
+ {
+ float temp = p.x * p.x - p.y * p.y;
+ if (temp >= 0.0) {
+ {
+ x_t = -sqrt(temp) - p.x * invR1;
+ }
+ }
+ }
+ {
+ if (x_t <= 0.0) {
+ v = -1.0;
+ }
+ }
+ {
+ {
+ t = -x_t + fx;
+ }
+ }
+ }
+ }
+ _output = vec4(t, v, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec3 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0);
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/13-162.shader_test b/shaders/skia/13-162.shader_test
new file mode 100644
index 0000000..47f12dc
--- /dev/null
+++ b/shaders/skia/13-162.shader_test
@@ -0,0 +1,111 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+noperspective in vec3 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 vTransformedCoords_0_Stage0_ensure2D = vTransformedCoords_0_Stage0.xy / vTransformedCoords_0_Stage0.z;
+ vec2 p = vTransformedCoords_0_Stage0_ensure2D;
+ float t = -1.0;
+ float v = 1.0;
+ {
+ {
+ float invR1 = ufocalParams_Stage1_c0_c0_c0_c0.x;
+ float fx = ufocalParams_Stage1_c0_c0_c0_c0.y;
+ float x_t = -1.0;
+ {
+ float temp = p.x * p.x - p.y * p.y;
+ if (temp >= 0.0) {
+ {
+ x_t = -sqrt(temp) - p.x * invR1;
+ }
+ }
+ }
+ {
+ if (x_t <= 0.0) {
+ v = -1.0;
+ }
+ }
+ {
+ {
+ t = -x_t + fx;
+ }
+ }
+ }
+ }
+ _output = vec4(t, v, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_1_Stage0.x);
+ uint y = uint(vTransformedCoords_1_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ output_Stage2 = vec4(clamp(output_Stage2.xyz + value * 0.0039215688593685627, 0.0, output_Stage2.w), output_Stage2.w);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec3 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0);
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/13-169.shader_test b/shaders/skia/13-169.shader_test
new file mode 100644
index 0000000..ce45ee9
--- /dev/null
+++ b/shaders/skia/13-169.shader_test
@@ -0,0 +1,41 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec3 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = textureProj(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ {
+ sk_FragColor = outputColor_Stage0 * output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec3 localCoord;
+noperspective out vec3 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = uCoordTransformMatrix_0_Stage0 * localCoord;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/13-17.shader_test b/shaders/skia/13-17.shader_test
new file mode 100644
index 0000000..eb45bb6
--- /dev/null
+++ b/shaders/skia/13-17.shader_test
@@ -0,0 +1,64 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 RadialGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = length(vTransformedCoords_0_Stage0);
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = RadialGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/13-170.shader_test b/shaders/skia/13-170.shader_test
new file mode 100644
index 0000000..8f1c844
--- /dev/null
+++ b/shaders/skia/13-170.shader_test
@@ -0,0 +1,38 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uColor_Stage0;
+in float vinCoverage_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = uColor_Stage0;
+ float alpha = 1.0;
+ alpha = vinCoverage_Stage0;
+ outputCoverage_Stage0 = vec4(alpha);
+ }
+ {
+ sk_FragColor = outputColor_Stage0 * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 inPosition;
+in float inCoverage;
+out float vinCoverage_Stage0;
+void main() {
+ vec3 pos3 = uViewM_Stage0 * vec3(inPosition, 1.0);
+ vinCoverage_Stage0 = inCoverage;
+ gl_Position = vec4(pos3.x, pos3.y, 0.0, pos3.z);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/13-174.shader_test b/shaders/skia/13-174.shader_test
new file mode 100644
index 0000000..7509289
--- /dev/null
+++ b/shaders/skia/13-174.shader_test
@@ -0,0 +1,97 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 uscale01_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias01_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale23_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias23_Stage1_c0_c0_c1_c0;
+uniform float uthreshold_Stage1_c0_c0_c1_c0;
+uniform vec3 uedges_Stage2[4];
+noperspective in vec3 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 RadialGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 vTransformedCoords_0_Stage0_ensure2D = vTransformedCoords_0_Stage0.xy / vTransformedCoords_0_Stage0.z;
+ float t = length(vTransformedCoords_0_Stage0_ensure2D);
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 DualIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthreshold_Stage1_c0_c0_c1_c0) {
+ scale = uscale01_Stage1_c0_c0_c1_c0;
+ bias = ubias01_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale23_Stage1_c0_c0_c1_c0;
+ bias = ubias23_Stage1_c0_c0_c1_c0;
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = RadialGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = DualIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ float alpha = 1.0;
+ float edge;
+ edge = dot(uedges_Stage2[0], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage2[1], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage2[2], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage2[3], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ output_Stage2 = vec4(alpha);
+ }
+ {
+ sk_FragColor = output_Stage1 * output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec3 localCoord;
+noperspective out vec3 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = uCoordTransformMatrix_0_Stage0 * localCoord;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/13-175.shader_test b/shaders/skia/13-175.shader_test
new file mode 100644
index 0000000..b658efc
--- /dev/null
+++ b/shaders/skia/13-175.shader_test
@@ -0,0 +1,64 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform sampler2D uTextureSampler_0_Stage0;
+noperspective in vec2 vTextureCoords_Stage0;
+flat in int vTexIndex_Stage0;
+noperspective in vec4 vinColor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vinColor_Stage0;
+ vec4 texColor;
+ {
+ texColor = texture(uTextureSampler_0_Stage0, vTextureCoords_Stage0);
+ }
+ outputCoverage_Stage0 = texColor;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = outputColor_Stage0;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_0_Stage0.x);
+ uint y = uint(vTransformedCoords_0_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ output_Stage1 = vec4(clamp(output_Stage1.xyz + value * 0.0039215688593685627, 0.0, output_Stage1.w), output_Stage1.w);
+ }
+ {
+ sk_FragColor = output_Stage1 * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform vec2 uAtlasSizeInv_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in uvec2 inTextureCoords;
+noperspective out vec2 vTextureCoords_Stage0;
+flat out int vTexIndex_Stage0;
+noperspective out vec4 vinColor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ ivec2 signedCoords = ivec2(int(inTextureCoords.x), int(inTextureCoords.y));
+ vec2 unormTexCoords = vec2(float(signedCoords.x / 2), float(signedCoords.y / 2));
+ vTextureCoords_Stage0 = unormTexCoords * uAtlasSizeInv_Stage0;
+ vTexIndex_Stage0 = 0;
+ vinColor_Stage0 = inColor;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(inPosition.x, inPosition.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/13-176.shader_test b/shaders/skia/13-176.shader_test
new file mode 100644
index 0000000..a818cd5
--- /dev/null
+++ b/shaders/skia/13-176.shader_test
@@ -0,0 +1,50 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_KHR_blend_equation_advanced : require
+out vec4 sk_FragColor;
+layout (blend_support_all_equations) out ;
+noperspective in vec4 vQuadEdge_Stage0;
+noperspective in vec4 vinColor_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vinColor_Stage0;
+ float edgeAlpha;
+ vec2 duvdx = dFdx(vQuadEdge_Stage0.xy);
+ vec2 duvdy = -dFdy(vQuadEdge_Stage0.xy);
+ if (vQuadEdge_Stage0.z > 0.0 && vQuadEdge_Stage0.w > 0.0) {
+ edgeAlpha = min(min(vQuadEdge_Stage0.z, vQuadEdge_Stage0.w) + 0.5, 1.0);
+ } else {
+ vec2 gF = vec2((2.0 * vQuadEdge_Stage0.x) * duvdx.x - duvdx.y, (2.0 * vQuadEdge_Stage0.x) * duvdy.x - duvdy.y);
+ edgeAlpha = vQuadEdge_Stage0.x * vQuadEdge_Stage0.x - vQuadEdge_Stage0.y;
+ edgeAlpha = clamp(0.5 - edgeAlpha / length(gF), 0.0, 1.0);
+ }
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ {
+ sk_FragColor = outputCoverage_Stage0 * outputColor_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 inPosition;
+in vec4 inColor;
+in vec4 inQuadEdge;
+noperspective out vec4 vQuadEdge_Stage0;
+noperspective out vec4 vinColor_Stage0;
+void main() {
+ vQuadEdge_Stage0 = inQuadEdge;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = inPosition;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/13-177.shader_test b/shaders/skia/13-177.shader_test
new file mode 100644
index 0000000..a2418a9
--- /dev/null
+++ b/shaders/skia/13-177.shader_test
@@ -0,0 +1,64 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 urectUniform_Stage1;
+uniform vec4 urectUniform_Stage2;
+flat in vec4 vcolor_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ float alpha;
+ {
+ float xSub, ySub;
+ xSub = min(gl_FragCoord.x - urectUniform_Stage1.x, 0.0);
+ xSub += min(urectUniform_Stage1.z - gl_FragCoord.x, 0.0);
+ ySub = min(gl_FragCoord.y - urectUniform_Stage1.y, 0.0);
+ ySub += min(urectUniform_Stage1.w - gl_FragCoord.y, 0.0);
+ alpha = (1.0 + max(xSub, -1.0)) * (1.0 + max(ySub, -1.0));
+ }
+ {
+ alpha = 1.0 - alpha;
+ }
+ output_Stage1 = vec4(alpha);
+ }
+ vec4 output_Stage2;
+ {
+ float alpha;
+ {
+ float xSub, ySub;
+ xSub = min(gl_FragCoord.x - urectUniform_Stage2.x, 0.0);
+ xSub += min(urectUniform_Stage2.z - gl_FragCoord.x, 0.0);
+ ySub = min(gl_FragCoord.y - urectUniform_Stage2.y, 0.0);
+ ySub += min(urectUniform_Stage2.w - gl_FragCoord.y, 0.0);
+ alpha = (1.0 + max(xSub, -1.0)) * (1.0 + max(ySub, -1.0));
+ }
+ output_Stage2 = output_Stage1 * alpha;
+ }
+ {
+ sk_FragColor = outputColor_Stage0 * output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 position;
+in vec4 color;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/13-180.shader_test b/shaders/skia/13-180.shader_test
new file mode 100644
index 0000000..aa98bd8
--- /dev/null
+++ b/shaders/skia/13-180.shader_test
@@ -0,0 +1,86 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+noperspective in float vcoverage_Stage0;
+flat in vec4 vgeomDomain_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ float coverage = vcoverage_Stage0;
+ vec4 geoDomain;
+ geoDomain = vgeomDomain_Stage0;
+ if (coverage < 0.5) {
+ vec4 dists4 = clamp(vec4(1.0, 1.0, -1.0, -1.0) * (gl_FragCoord.xyxy - geoDomain), 0.0, 1.0);
+ vec2 dists2 = dists4.xy * dists4.zw;
+ coverage = min(coverage, dists2.x * dists2.y);
+ }
+ outputCoverage_Stage0 = vec4(coverage);
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TiledGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1 * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in float coverage;
+in vec4 color;
+in vec2 localCoord;
+in vec4 geomDomain;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+noperspective out float vcoverage_Stage0;
+flat out vec4 vgeomDomain_Stage0;
+void main() {
+ vec2 position = position;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ vcoverage_Stage0 = coverage;
+ vgeomDomain_Stage0 = geomDomain;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/13-185.shader_test b/shaders/skia/13-185.shader_test
new file mode 100644
index 0000000..95a2256
--- /dev/null
+++ b/shaders/skia/13-185.shader_test
@@ -0,0 +1,35 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+noperspective in vec4 vcolor_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ {
+ sk_FragColor = outputColor_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec2 inLocalCoord;
+noperspective out vec4 vcolor_Stage0;
+void main() {
+ vec4 color = inColor;
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/13-186.shader_test b/shaders/skia/13-186.shader_test
new file mode 100644
index 0000000..9ab878e
--- /dev/null
+++ b/shaders/skia/13-186.shader_test
@@ -0,0 +1,80 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 ucolor_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 TextureEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+vec4 ComposeOne_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_dst_in(_input, TextureEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0)));
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = ComposeOne_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_src_over(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ {
+ output_Stage2 = output_Stage1 * ucolor_Stage2;
+ }
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec2 inLocalCoord;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 color = inColor;
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/13-187.shader_test b/shaders/skia/13-187.shader_test
new file mode 100644
index 0000000..2c49716
--- /dev/null
+++ b/shaders/skia/13-187.shader_test
@@ -0,0 +1,56 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uScale_Stage1;
+uniform vec4 uTexDom_Stage1;
+uniform vec3 uDecalParams_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ vec4 dColor = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ dColor.xyz = dColor.w < 9.9999999747524271e-07 ? vec3(0.0) : clamp(dColor.xyz / dColor.w, 0.0, 1.0);
+ vec2 cCoords = vTransformedCoords_1_Stage0 + uScale_Stage1 * (dColor.yw - vec2(0.5));
+ {
+ vec2 origCoord = cCoords;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ output_Stage1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/13-190.shader_test b/shaders/skia/13-190.shader_test
new file mode 100644
index 0000000..6ad5d56
--- /dev/null
+++ b/shaders/skia/13-190.shader_test
@@ -0,0 +1,45 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uColor_Stage0;
+noperspective in vec3 vDashParam_Stage0;
+noperspective in vec2 vCircleParams_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = uColor_Stage0;
+ float xShifted = vDashParam_Stage0.x - floor(vDashParam_Stage0.x / vDashParam_Stage0.z) * vDashParam_Stage0.z;
+ vec2 fragPosShifted = vec2(xShifted, vDashParam_Stage0.y);
+ vec2 center = vec2(vCircleParams_Stage0.y, 0.0);
+ float dist = length(center - fragPosShifted);
+ float alpha = 1.0;
+ alpha *= dist < vCircleParams_Stage0.x + 0.5 ? 1.0 : 0.0;
+ outputCoverage_Stage0 = vec4(alpha);
+ }
+ {
+ sk_FragColor = outputColor_Stage0 * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 inPosition;
+in vec3 inDashParams;
+in vec2 inCircleParams;
+noperspective out vec3 vDashParam_Stage0;
+noperspective out vec2 vCircleParams_Stage0;
+void main() {
+ vDashParam_Stage0 = inDashParams;
+ vCircleParams_Stage0 = inCircleParams;
+ vec2 pos2 = inPosition;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/13-197.shader_test b/shaders/skia/13-197.shader_test
new file mode 100644
index 0000000..abbfd63
--- /dev/null
+++ b/shaders/skia/13-197.shader_test
@@ -0,0 +1,66 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec3 uedges_Stage1[3];
+uniform sampler2D uTextureSampler_0_Stage0;
+noperspective in vec2 vTextureCoords_Stage0;
+flat in int vTexIndex_Stage0;
+noperspective in vec4 vinColor_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vinColor_Stage0;
+ vec4 texColor;
+ {
+ texColor = texture(uTextureSampler_0_Stage0, vTextureCoords_Stage0);
+ }
+ outputCoverage_Stage0 = texColor;
+ }
+ vec4 output_Stage1;
+ {
+ float alpha = 1.0;
+ float edge;
+ edge = dot(uedges_Stage1[0], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage1[1], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage1[2], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ output_Stage1 = outputCoverage_Stage0 * alpha;
+ }
+ {
+ sk_FragColor = outputColor_Stage0 * output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform vec2 uAtlasSizeInv_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in uvec2 inTextureCoords;
+noperspective out vec2 vTextureCoords_Stage0;
+flat out int vTexIndex_Stage0;
+noperspective out vec4 vinColor_Stage0;
+void main() {
+ ivec2 signedCoords = ivec2(int(inTextureCoords.x), int(inTextureCoords.y));
+ vec2 unormTexCoords = vec2(float(signedCoords.x / 2), float(signedCoords.y / 2));
+ vTextureCoords_Stage0 = unormTexCoords * uAtlasSizeInv_Stage0;
+ vTexIndex_Stage0 = 0;
+ vinColor_Stage0 = inColor;
+ gl_Position = vec4(inPosition.x, inPosition.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/13-2.shader_test b/shaders/skia/13-2.shader_test
new file mode 100644
index 0000000..6c2d5e5
--- /dev/null
+++ b/shaders/skia/13-2.shader_test
@@ -0,0 +1,66 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform mat3 ucolorSpaceMatrix_Stage1;
+uniform vec3 ucolorSpaceTranslate_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+uniform sampler2D uTextureSampler_2_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+vec4 TextureEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_1_Stage1, vTransformedCoords_1_Stage0) * _input;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c2_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_2_Stage1, vTransformedCoords_2_Stage0) * _input;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ vec4 planes[3];
+ planes[0] = TextureEffect_Stage1_c0_c0(vec4(1.0));
+ planes[1] = TextureEffect_Stage1_c1_c0(vec4(1.0));
+ planes[2] = TextureEffect_Stage1_c2_c0(vec4(1.0));
+ vec4 color = vec4(planes[2].x, planes[0].x, planes[1].x, 1.0);
+ color.xyz = clamp(color.xyz * ucolorSpaceMatrix_Stage1 + ucolorSpaceTranslate_Stage1, 0.0, 1.0);
+ output_Stage1 = color;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/13-200.shader_test b/shaders/skia/13-200.shader_test
new file mode 100644
index 0000000..2427587
--- /dev/null
+++ b/shaders/skia/13-200.shader_test
@@ -0,0 +1,85 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 uscale01_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias01_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale23_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias23_Stage1_c0_c0_c1_c0;
+uniform float uthreshold_Stage1_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 DualIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthreshold_Stage1_c0_c0_c1_c0) {
+ scale = uscale01_Stage1_c0_c0_c1_c0;
+ bias = ubias01_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale23_Stage1_c0_c0_c1_c0;
+ bias = ubias23_Stage1_c0_c0_c1_c0;
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = DualIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ {
+ output_Stage2 = output_Stage1 * ucolor_Stage2;
+ }
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/13-201.shader_test b/shaders/skia/13-201.shader_test
new file mode 100644
index 0000000..4cb886b
--- /dev/null
+++ b/shaders/skia/13-201.shader_test
@@ -0,0 +1,56 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform sampler2D uTextureSampler_0_Stage0;
+noperspective in vec2 vlocalCoord_Stage0;
+noperspective in float vcoverage_Stage0;
+flat in vec4 vgeomDomain_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vec4(1.0);
+ vec2 texCoord;
+ texCoord = vlocalCoord_Stage0;
+ outputColor_Stage0 = texture(uTextureSampler_0_Stage0, texCoord);
+ float coverage = vcoverage_Stage0;
+ vec4 geoDomain;
+ geoDomain = vgeomDomain_Stage0;
+ if (coverage < 0.5) {
+ vec4 dists4 = clamp(vec4(1.0, 1.0, -1.0, -1.0) * (gl_FragCoord.xyxy - geoDomain), 0.0, 1.0);
+ vec2 dists2 = dists4.xy * dists4.zw;
+ coverage = min(coverage, dists2.x * dists2.y);
+ }
+ outputCoverage_Stage0 = vec4(coverage);
+ }
+ {
+ sk_FragColor = outputColor_Stage0 * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 position;
+in float coverage;
+in vec2 localCoord;
+in vec4 geomDomain;
+noperspective out vec2 vlocalCoord_Stage0;
+noperspective out float vcoverage_Stage0;
+flat out vec4 vgeomDomain_Stage0;
+void main() {
+ vec2 position = position;
+ vlocalCoord_Stage0 = localCoord;
+ vcoverage_Stage0 = coverage;
+ vgeomDomain_Stage0 = geomDomain;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/13-202.shader_test b/shaders/skia/13-202.shader_test
new file mode 100644
index 0000000..76b478f
--- /dev/null
+++ b/shaders/skia/13-202.shader_test
@@ -0,0 +1,106 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform mat3 ucolorSpaceMatrix_Stage1_c0_c0;
+uniform vec3 ucolorSpaceTranslate_Stage1_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+uniform sampler2D uTextureSampler_2_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+flat in vec4 vcolor_Stage0;
+noperspective in float vcoverage_Stage0;
+flat in vec4 vgeomDomain_Stage0;
+vec4 TextureEffect_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_1_Stage1, vTransformedCoords_1_Stage0) * _input;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c0_c0_c2_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_2_Stage1, vTransformedCoords_2_Stage0) * _input;
+ return _output;
+}
+vec4 YUVtoRGBEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 planes[3];
+ planes[0] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0));
+ planes[1] = TextureEffect_Stage1_c0_c0_c1_c0(vec4(1.0));
+ planes[2] = TextureEffect_Stage1_c0_c0_c2_c0(vec4(1.0));
+ vec4 color = vec4(planes[0].x, planes[1].x, planes[2].x, 1.0);
+ color.xyz = clamp(color.xyz * ucolorSpaceMatrix_Stage1_c0_c0 + ucolorSpaceTranslate_Stage1_c0_c0, 0.0, 1.0);
+ _output = color;
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ float coverage = vcoverage_Stage0;
+ vec4 geoDomain;
+ geoDomain = vgeomDomain_Stage0;
+ if (coverage < 0.5) {
+ vec4 dists4 = clamp(vec4(1.0, 1.0, -1.0, -1.0) * (gl_FragCoord.xyxy - geoDomain), 0.0, 1.0);
+ vec2 dists2 = dists4.xy * dists4.zw;
+ coverage = min(coverage, dists2.x * dists2.y);
+ }
+ outputCoverage_Stage0 = vec4(coverage);
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_dst_in(outputColor_Stage0, YUVtoRGBEffect_Stage1_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage1 * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+in vec2 position;
+in float coverage;
+in vec4 color;
+in vec2 localCoord;
+in vec4 geomDomain;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+flat out vec4 vcolor_Stage0;
+noperspective out float vcoverage_Stage0;
+flat out vec4 vgeomDomain_Stage0;
+void main() {
+ vec2 position = position;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ vcoverage_Stage0 = coverage;
+ vgeomDomain_Stage0 = geomDomain;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/13-203.shader_test b/shaders/skia/13-203.shader_test
new file mode 100644
index 0000000..f08c995
--- /dev/null
+++ b/shaders/skia/13-203.shader_test
@@ -0,0 +1,88 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 ustart_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c0_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec4 vcolor_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c0_c0_c1_c0;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+vec4 ComposeOne_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_dst_in(_input, TiledGradientEffect_Stage1_c0_c0_c0_c0(vec4(1.0)));
+ return _output;
+}
+vec4 TextureEffect_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_1_Stage0) * _input;
+ return _output;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TextureEffect_Stage1_c1_c0(ComposeOne_Stage1_c0_c0(outputColor_Stage0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/13-205.shader_test b/shaders/skia/13-205.shader_test
new file mode 100644
index 0000000..40bc5bd
--- /dev/null
+++ b/shaders/skia/13-205.shader_test
@@ -0,0 +1,124 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 uleftBorderColor_Stage1_c1_c0_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c1_c0_c0_c0;
+uniform vec4 ustart_Stage1_c1_c0_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c1_c0_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+vec4 ComposeOne_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_dst_in(_input, ClampedGradientEffect_Stage1_c0_c0_c0_c0(vec4(1.0)));
+ return _output;
+}
+vec4 LinearGradientLayout_Stage1_c1_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_1_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c1_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c1_c0_c0_c0_c1_c0 + t * uend_Stage1_c1_c0_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c1_c0_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c1_c0_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c1_c0_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c1_c0_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 ComposeOne_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_dst_in(_input, ClampedGradientEffect_Stage1_c1_c0_c0_c0(vec4(1.0)));
+ return _output;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_src_over(ComposeOne_Stage1_c0_c0(inputColor), ComposeOne_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/13-209.shader_test b/shaders/skia/13-209.shader_test
new file mode 100644
index 0000000..001a4f1
--- /dev/null
+++ b/shaders/skia/13-209.shader_test
@@ -0,0 +1,55 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uCoordTransformMatrix_0_Stage0;
+uniform vec4 uinnerRect_Stage2;
+uniform vec2 uradiusPlusHalf_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0(vec4 _input, vec2 _coords) {
+ _coords = _coords * uCoordTransformMatrix_0_Stage0.xz + uCoordTransformMatrix_0_Stage0.yw;
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, _coords) * _input;
+ return _output;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TextureEffect_Stage1_c0_c0(vec4(1.0), gl_FragCoord.xy);
+ }
+ vec4 output_Stage2;
+ {
+ vec2 dxy0 = uinnerRect_Stage2.xy - gl_FragCoord.xy;
+ vec2 dxy1 = gl_FragCoord.xy - uinnerRect_Stage2.zw;
+ vec2 dxy = max(max(dxy0, dxy1), 0.0);
+ float alpha = clamp(uradiusPlusHalf_Stage2.x - length(dxy), 0.0, 1.0);
+ output_Stage2 = output_Stage1 * alpha;
+ }
+ {
+ sk_FragColor = outputColor_Stage0 * output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 position;
+in vec4 color;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/13-21.shader_test b/shaders/skia/13-21.shader_test
new file mode 100644
index 0000000..f8c61fd
--- /dev/null
+++ b/shaders/skia/13-21.shader_test
@@ -0,0 +1,43 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uclamp_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ vec2 inCoord = vTransformedCoords_0_Stage0;
+ vec2 subsetCoord;
+ subsetCoord.x = inCoord.x;
+ subsetCoord.y = inCoord.y;
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage1.x, uclamp_Stage1.z);
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage1.y, uclamp_Stage1.w);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ output_Stage1 = textureColor;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ sk_FragColor = sk_FragColor.wwww;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/13-211.shader_test b/shaders/skia/13-211.shader_test
new file mode 100644
index 0000000..d78defd
--- /dev/null
+++ b/shaders/skia/13-211.shader_test
@@ -0,0 +1,59 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uCoordTransformMatrix_0_Stage0;
+uniform vec4 urectUniform_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0(vec4 _input, vec2 _coords) {
+ _coords = _coords * uCoordTransformMatrix_0_Stage0.xz + uCoordTransformMatrix_0_Stage0.yw;
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, _coords) * _input;
+ return _output;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TextureEffect_Stage1_c0_c0(vec4(1.0), gl_FragCoord.xy);
+ }
+ vec4 output_Stage2;
+ {
+ float alpha;
+ {
+ float xSub, ySub;
+ xSub = min(gl_FragCoord.x - urectUniform_Stage2.x, 0.0);
+ xSub += min(urectUniform_Stage2.z - gl_FragCoord.x, 0.0);
+ ySub = min(gl_FragCoord.y - urectUniform_Stage2.y, 0.0);
+ ySub += min(urectUniform_Stage2.w - gl_FragCoord.y, 0.0);
+ alpha = (1.0 + max(xSub, -1.0)) * (1.0 + max(ySub, -1.0));
+ }
+ output_Stage2 = output_Stage1 * alpha;
+ }
+ {
+ sk_FragColor = outputColor_Stage0 * output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 position;
+in vec4 color;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/13-22.shader_test b/shaders/skia/13-22.shader_test
new file mode 100644
index 0000000..bc712df
--- /dev/null
+++ b/shaders/skia/13-22.shader_test
@@ -0,0 +1,158 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale8_9_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale10_11_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias8_9_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias10_11_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage2_c1_c0;
+uniform vec2 uDstTextureUpperLeft_Stage3;
+uniform vec2 uDstTextureCoordScale_Stage3;
+uniform sampler2D uTextureSampler_0_Stage0;
+uniform sampler2D uDstTextureSampler_Stage3;
+noperspective in vec2 vTextureCoords_Stage0;
+flat in int vTexIndex_Stage0;
+noperspective in vec4 vinColor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.w) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c1_c0;
+ }
+ }
+ } else {
+ {
+ if (t < uthresholds9_13_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale8_9_Stage1_c0_c0_c1_c0;
+ bias = ubias8_9_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale10_11_Stage1_c0_c0_c1_c0;
+ bias = ubias10_11_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c1_c0;
+ }
+ return _output;
+}
+vec4 blend_modulate(vec4 src, vec4 dst) {
+ return src * dst;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ vec4 texColor;
+ {
+ texColor = texture(uTextureSampler_0_Stage0, vTextureCoords_Stage0);
+ }
+ outputCoverage_Stage0 = texColor;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_modulate(ConstColorProcessor_Stage2_c1_c0(vec4(1.0)), output_Stage1);
+ }
+ {
+ if (all(lessThanEqual(outputCoverage_Stage0.xyz, vec3(0.0)))) {
+ discard;
+ }
+ vec2 _dstTexCoord = (gl_FragCoord.xy - uDstTextureUpperLeft_Stage3) * uDstTextureCoordScale_Stage3;
+ _dstTexCoord.y = 1.0 - _dstTexCoord.y;
+ vec4 _dstColor = texture(uDstTextureSampler_Stage3, _dstTexCoord);
+ sk_FragColor = blend_src_over(output_Stage2, _dstColor);
+ float lerpRed = mix(_dstColor.w, sk_FragColor.w, outputCoverage_Stage0.x);
+ float lerpBlue = mix(_dstColor.w, sk_FragColor.w, outputCoverage_Stage0.y);
+ float lerpGreen = mix(_dstColor.w, sk_FragColor.w, outputCoverage_Stage0.z);
+ sk_FragColor = outputCoverage_Stage0 * sk_FragColor + (vec4(1.0) - outputCoverage_Stage0) * _dstColor;
+ sk_FragColor.w = max(max(lerpRed, lerpBlue), lerpGreen);
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform vec2 uAtlasSizeInv_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in uvec2 inTextureCoords;
+noperspective out vec2 vTextureCoords_Stage0;
+flat out int vTexIndex_Stage0;
+noperspective out vec4 vinColor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ ivec2 signedCoords = ivec2(int(inTextureCoords.x), int(inTextureCoords.y));
+ vec2 unormTexCoords = vec2(float(signedCoords.x / 2), float(signedCoords.y / 2));
+ vTextureCoords_Stage0 = unormTexCoords * uAtlasSizeInv_Stage0;
+ vTexIndex_Stage0 = 0;
+ vinColor_Stage0 = inColor;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(inPosition.x, inPosition.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/13-220.shader_test b/shaders/skia/13-220.shader_test
new file mode 100644
index 0000000..7fee911
--- /dev/null
+++ b/shaders/skia/13-220.shader_test
@@ -0,0 +1,93 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c0_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 RadialGradientLayout_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = length(vTransformedCoords_0_Stage0);
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = RadialGradientLayout_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = ClampedGradientEffect_Stage1_c0_c0_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ return _output;
+}
+vec4 TextureEffect_Stage1_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_1_Stage0) * _input;
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = TextureEffect_Stage1_c1_c0_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ return _output;
+}
+vec4 blend_modulate(vec4 src, vec4 dst) {
+ return src * dst;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_modulate(OverrideInputFragmentProcessor_Stage1_c0_c0(inputColor), OverrideInputFragmentProcessor_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/13-222.shader_test b/shaders/skia/13-222.shader_test
new file mode 100644
index 0000000..76fc993
--- /dev/null
+++ b/shaders/skia/13-222.shader_test
@@ -0,0 +1,102 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uscale01_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias01_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale23_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias23_Stage1_c0_c0_c0_c0_c1_c0;
+uniform float uthreshold_Stage1_c0_c0_c0_c0_c1_c0;
+uniform mat4 um_Stage1_c1_c0;
+uniform vec4 uv_Stage1_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 DualIntervalGradientColorizer_Stage1_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthreshold_Stage1_c0_c0_c0_c0_c1_c0) {
+ scale = uscale01_Stage1_c0_c0_c0_c0_c1_c0;
+ bias = ubias01_Stage1_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale23_Stage1_c0_c0_c0_c0_c1_c0;
+ bias = ubias23_Stage1_c0_c0_c0_c0_c1_c0;
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ t.x = fract(t.x);
+ }
+ _output = DualIntervalGradientColorizer_Stage1_c0_c0_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = TiledGradientEffect_Stage1_c0_c0_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ return _output;
+}
+vec4 ColorMatrixFragmentProcessor_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = _input;
+ {
+ float nonZeroAlpha = max(inputColor.w, 9.9999997473787516e-05);
+ inputColor = vec4(inputColor.xyz / nonZeroAlpha, inputColor.w);
+ }
+ _output = um_Stage1_c1_c0 * inputColor + uv_Stage1_c1_c0;
+ {
+ _output = clamp(_output, 0.0, 1.0);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ColorMatrixFragmentProcessor_Stage1_c1_c0(OverrideInputFragmentProcessor_Stage1_c0_c0(outputColor_Stage0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/13-225.shader_test b/shaders/skia/13-225.shader_test
new file mode 100644
index 0000000..36b87a2
--- /dev/null
+++ b/shaders/skia/13-225.shader_test
@@ -0,0 +1,84 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uColor_Stage0;
+uniform mat4 um_Stage1_c0_c0;
+uniform vec4 uv_Stage1_c0_c0;
+uniform mat4 um_Stage1_c1_c0;
+uniform vec4 uv_Stage1_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage0;
+noperspective in vec2 vTextureCoords_Stage0;
+flat in int vTexIndex_Stage0;
+vec4 ColorMatrixFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = _input;
+ {
+ float nonZeroAlpha = max(inputColor.w, 9.9999997473787516e-05);
+ inputColor = vec4(inputColor.xyz / nonZeroAlpha, inputColor.w);
+ }
+ _output = um_Stage1_c0_c0 * inputColor + uv_Stage1_c0_c0;
+ {
+ _output = clamp(_output, 0.0, 1.0);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 ColorMatrixFragmentProcessor_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = _input;
+ {
+ float nonZeroAlpha = max(inputColor.w, 9.9999997473787516e-05);
+ inputColor = vec4(inputColor.xyz / nonZeroAlpha, inputColor.w);
+ }
+ _output = um_Stage1_c1_c0 * inputColor + uv_Stage1_c1_c0;
+ {
+ _output = clamp(_output, 0.0, 1.0);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = uColor_Stage0;
+ vec4 texColor;
+ {
+ texColor = texture(uTextureSampler_0_Stage0, vTextureCoords_Stage0);
+ }
+ outputColor_Stage0 = outputColor_Stage0 * texColor;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ColorMatrixFragmentProcessor_Stage1_c1_c0(ColorMatrixFragmentProcessor_Stage1_c0_c0(outputColor_Stage0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform vec2 uAtlasSizeInv_Stage0;
+in vec2 inPosition;
+in uvec2 inTextureCoords;
+noperspective out vec2 vTextureCoords_Stage0;
+flat out int vTexIndex_Stage0;
+void main() {
+ ivec2 signedCoords = ivec2(int(inTextureCoords.x), int(inTextureCoords.y));
+ vec2 unormTexCoords = vec2(float(signedCoords.x / 2), float(signedCoords.y / 2));
+ vTextureCoords_Stage0 = unormTexCoords * uAtlasSizeInv_Stage0;
+ vTexIndex_Stage0 = 0;
+ gl_Position = vec4(inPosition.x, inPosition.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/13-227.shader_test b/shaders/skia/13-227.shader_test
new file mode 100644
index 0000000..57af424
--- /dev/null
+++ b/shaders/skia/13-227.shader_test
@@ -0,0 +1,139 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform vec2 uBounds_Stage1;
+uniform vec4 uKernel_Stage1[7];
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0 - 12.0 * uImageIncrement_Stage1;
+ vec2 coordSampled = vec2(0.0, 0.0);
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[4].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[4].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[4].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[4].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[5].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[5].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[5].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[5].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[6].x;
+ coord += uImageIncrement_Stage1;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ sk_FragColor = sk_FragColor.wwww;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/13-23.shader_test b/shaders/skia/13-23.shader_test
new file mode 100644
index 0000000..5eebacc
--- /dev/null
+++ b/shaders/skia/13-23.shader_test
@@ -0,0 +1,57 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 usubset_Stage1;
+uniform vec4 uclamp_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+flat in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec2 inCoord = vTransformedCoords_0_Stage0;
+ vec2 subsetCoord;
+ {
+ float w = usubset_Stage1.z - usubset_Stage1.x;
+ float w2 = 2.0 * w;
+ float m = mod(inCoord.x - usubset_Stage1.x, w2);
+ subsetCoord.x = mix(m, w2 - m, step(w, m)) + usubset_Stage1.x;
+ }
+ subsetCoord.y = inCoord.y;
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage1.x, uclamp_Stage1.z);
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage1.y, uclamp_Stage1.w);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ output_Stage1 = outputColor_Stage0 * textureColor;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec2 inLocalCoords;
+in vec4 color;
+flat out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vcolor_Stage0 = color;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoords, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/13-236.shader_test b/shaders/skia/13-236.shader_test
new file mode 100644
index 0000000..7b73240
--- /dev/null
+++ b/shaders/skia/13-236.shader_test
@@ -0,0 +1,123 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform vec2 uBounds_Stage1;
+uniform vec4 uKernel_Stage1[6];
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0 - 10.0 * uImageIncrement_Stage1;
+ vec2 coordSampled = vec2(0.0, 0.0);
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[4].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[4].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[4].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[4].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[5].x;
+ coord += uImageIncrement_Stage1;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ sk_FragColor = sk_FragColor.wwww;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/13-237.shader_test b/shaders/skia/13-237.shader_test
new file mode 100644
index 0000000..ea6e209
--- /dev/null
+++ b/shaders/skia/13-237.shader_test
@@ -0,0 +1,129 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uColor_Stage0;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+uniform float ucornerRadius_Stage2;
+uniform vec4 uproxyRect_Stage2;
+uniform float ublurRadius_Stage2;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_0_Stage0;
+ float t = -1.0;
+ {
+ {
+ float invR1 = ufocalParams_Stage1_c0_c0_c0_c0.x;
+ float fx = ufocalParams_Stage1_c0_c0_c0_c0.y;
+ float x_t = -1.0;
+ {
+ x_t = length(p) - p.x * invR1;
+ }
+ {
+ {
+ t = x_t + fx;
+ }
+ }
+ }
+ }
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ vec2 translatedFragPos = gl_FragCoord.xy - uproxyRect_Stage2.xy;
+ float threshold = ucornerRadius_Stage2 + 2.0 * ublurRadius_Stage2;
+ vec2 middle = (uproxyRect_Stage2.zw - uproxyRect_Stage2.xy) - 2.0 * threshold;
+ if (translatedFragPos.x >= threshold && translatedFragPos.x < middle.x + threshold) {
+ translatedFragPos.x = threshold;
+ } else if (translatedFragPos.x >= middle.x + threshold) {
+ translatedFragPos.x -= middle.x - 1.0;
+ }
+ if (translatedFragPos.y > threshold && translatedFragPos.y < middle.y + threshold) {
+ translatedFragPos.y = threshold;
+ } else if (translatedFragPos.y >= middle.y + threshold) {
+ translatedFragPos.y -= middle.y - 1.0;
+ }
+ vec2 proxyDims = vec2(2.0 * threshold + 1.0);
+ vec2 texCoord = translatedFragPos / proxyDims;
+ output_Stage2 = texture(uTextureSampler_0_Stage2, texCoord);
+ }
+ {
+ sk_FragColor = output_Stage1 * output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(position, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/13-253.shader_test b/shaders/skia/13-253.shader_test
new file mode 100644
index 0000000..a90bbd0
--- /dev/null
+++ b/shaders/skia/13-253.shader_test
@@ -0,0 +1,42 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uColor_Stage0;
+noperspective in vec4 vHairQuadEdge_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = uColor_Stage0;
+ float edgeAlpha;
+ vec2 duvdx = dFdx(vHairQuadEdge_Stage0.xy);
+ vec2 duvdy = -dFdy(vHairQuadEdge_Stage0.xy);
+ vec2 gF = vec2((2.0 * vHairQuadEdge_Stage0.x) * duvdx.x - duvdx.y, (2.0 * vHairQuadEdge_Stage0.x) * duvdy.x - duvdy.y);
+ edgeAlpha = vHairQuadEdge_Stage0.x * vHairQuadEdge_Stage0.x - vHairQuadEdge_Stage0.y;
+ edgeAlpha = edgeAlpha / sqrt(dot(gF, gF));
+ edgeAlpha = clamp(0.5 - edgeAlpha, 0.0, 1.0);
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ {
+ sk_FragColor = outputColor_Stage0 * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 inPosition;
+in vec4 inHairQuadEdge;
+noperspective out vec4 vHairQuadEdge_Stage0;
+void main() {
+ vHairQuadEdge_Stage0 = inHairQuadEdge;
+ vec2 pos2 = inPosition;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/13-254.shader_test b/shaders/skia/13-254.shader_test
new file mode 100644
index 0000000..a74e901
--- /dev/null
+++ b/shaders/skia/13-254.shader_test
@@ -0,0 +1,52 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uColor_Stage0;
+noperspective in vec4 vConicCoeffs_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = uColor_Stage0;
+ float edgeAlpha;
+ vec3 dklmdx;
+ vec3 dklmdy;
+ float dfdx;
+ float dfdy;
+ vec2 gF;
+ float gFM;
+ float func;
+ dklmdx = dFdx(vConicCoeffs_Stage0.xyz);
+ dklmdy = -dFdy(vConicCoeffs_Stage0.xyz);
+ dfdx = ((2.0 * vConicCoeffs_Stage0.x) * dklmdx.x - vConicCoeffs_Stage0.y * dklmdx.z) - vConicCoeffs_Stage0.z * dklmdx.y;
+ dfdy = ((2.0 * vConicCoeffs_Stage0.x) * dklmdy.x - vConicCoeffs_Stage0.y * dklmdy.z) - vConicCoeffs_Stage0.z * dklmdy.y;
+ gF = vec2(dfdx, dfdy);
+ gFM = sqrt(dot(gF, gF));
+ func = vConicCoeffs_Stage0.x * vConicCoeffs_Stage0.x - vConicCoeffs_Stage0.y * vConicCoeffs_Stage0.z;
+ edgeAlpha = func / gFM;
+ edgeAlpha = clamp(0.5 - edgeAlpha, 0.0, 1.0);
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ {
+ sk_FragColor = outputColor_Stage0 * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 inPosition;
+in vec4 inConicCoeffs;
+noperspective out vec4 vConicCoeffs_Stage0;
+void main() {
+ vConicCoeffs_Stage0 = inConicCoeffs;
+ vec2 pos2 = inPosition;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/13-256.shader_test b/shaders/skia/13-256.shader_test
new file mode 100644
index 0000000..0e6c264
--- /dev/null
+++ b/shaders/skia/13-256.shader_test
@@ -0,0 +1,130 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform vec2 uBounds_Stage1;
+uniform vec4 uKernel_Stage1[6];
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0 - 11.0 * uImageIncrement_Stage1;
+ vec2 coordSampled = vec2(0.0, 0.0);
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[4].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[4].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[4].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[4].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[5].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[5].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[5].z;
+ coord += uImageIncrement_Stage1;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/13-262.shader_test b/shaders/skia/13-262.shader_test
new file mode 100644
index 0000000..4be1d5e
--- /dev/null
+++ b/shaders/skia/13-262.shader_test
@@ -0,0 +1,77 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uCoordTransformMatrix_1_Stage0;
+uniform vec4 uclamp_Stage1_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 TextureEffect_Stage1_c0_c0(vec4 _input, vec2 _coords) {
+ _coords = _coords * uCoordTransformMatrix_1_Stage0.xz + uCoordTransformMatrix_1_Stage0.yw;
+ vec4 _output;
+ vec2 inCoord = _coords;
+ vec2 subsetCoord;
+ subsetCoord.x = inCoord.x;
+ subsetCoord.y = inCoord.y;
+ vec2 clampedCoord;
+ clampedCoord.x = subsetCoord.x;
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage1_c0_c0.y, uclamp_Stage1_c0_c0.w);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ _output = _input * textureColor;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ vec2 coord = vTransformedCoords_0_Stage0 - vec2(0.5);
+ vec2 f = fract(coord);
+ coord += 0.5 - f;
+ vec4 wx = mat4(0.055555555555555552, 0.88888888888888884, 0.055555555555555552, 0.0, -0.5, 0.0, 0.5, 0.0, 0.83333333333333337, -2.0, 1.5, -0.33333333333333331, -0.3888888888888889, 1.1666666666666667, -1.1666666666666667, 0.3888888888888889) * vec4(1.0, f.x, f.x * f.x, (f.x * f.x) * f.x);
+ vec4 wy = mat4(0.055555555555555552, 0.88888888888888884, 0.055555555555555552, 0.0, -0.5, 0.0, 0.5, 0.0, 0.83333333333333337, -2.0, 1.5, -0.33333333333333331, -0.3888888888888889, 1.1666666666666667, -1.1666666666666667, 0.3888888888888889) * vec4(1.0, f.y, f.y * f.y, (f.y * f.y) * f.y);
+ vec4 rowColors[4];
+ rowColors[0] = TextureEffect_Stage1_c0_c0(vec4(1.0), coord + vec2(-1.0, -1.0));
+ rowColors[1] = TextureEffect_Stage1_c0_c0(vec4(1.0), coord + vec2(0.0, -1.0));
+ rowColors[2] = TextureEffect_Stage1_c0_c0(vec4(1.0), coord + vec2(1.0, -1.0));
+ rowColors[3] = TextureEffect_Stage1_c0_c0(vec4(1.0), coord + vec2(2.0, -1.0));
+ vec4 s0 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ rowColors[0] = TextureEffect_Stage1_c0_c0(vec4(1.0), coord + vec2(-1.0, 0.0));
+ rowColors[1] = TextureEffect_Stage1_c0_c0(vec4(1.0), coord);
+ rowColors[2] = TextureEffect_Stage1_c0_c0(vec4(1.0), coord + vec2(1.0, 0.0));
+ rowColors[3] = TextureEffect_Stage1_c0_c0(vec4(1.0), coord + vec2(2.0, 0.0));
+ vec4 s1 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ rowColors[0] = TextureEffect_Stage1_c0_c0(vec4(1.0), coord + vec2(-1.0, 1.0));
+ rowColors[1] = TextureEffect_Stage1_c0_c0(vec4(1.0), coord + vec2(0.0, 1.0));
+ rowColors[2] = TextureEffect_Stage1_c0_c0(vec4(1.0), coord + vec2(1.0, 1.0));
+ rowColors[3] = TextureEffect_Stage1_c0_c0(vec4(1.0), coord + vec2(2.0, 1.0));
+ vec4 s2 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ rowColors[0] = TextureEffect_Stage1_c0_c0(vec4(1.0), coord + vec2(-1.0, 2.0));
+ rowColors[1] = TextureEffect_Stage1_c0_c0(vec4(1.0), coord + vec2(0.0, 2.0));
+ rowColors[2] = TextureEffect_Stage1_c0_c0(vec4(1.0), coord + vec2(1.0, 2.0));
+ rowColors[3] = TextureEffect_Stage1_c0_c0(vec4(1.0), coord + vec2(2.0, 2.0));
+ vec4 s3 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ vec4 bicubicColor = ((wy.x * s0 + wy.y * s1) + wy.z * s2) + wy.w * s3;
+ bicubicColor.xyz = max(vec3(0.0), min(bicubicColor.xyz, bicubicColor.www));
+ output_Stage1 = bicubicColor;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/13-269.shader_test b/shaders/skia/13-269.shader_test
new file mode 100644
index 0000000..4a9d9fc
--- /dev/null
+++ b/shaders/skia/13-269.shader_test
@@ -0,0 +1,98 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform vec2 uBounds_Stage1;
+uniform vec4 uKernel_Stage1[4];
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0 - 7.0 * uImageIncrement_Stage1;
+ vec2 coordSampled = vec2(0.0, 0.0);
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].z;
+ coord += uImageIncrement_Stage1;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/13-274.shader_test b/shaders/skia/13-274.shader_test
new file mode 100644
index 0000000..be7fb6a
--- /dev/null
+++ b/shaders/skia/13-274.shader_test
@@ -0,0 +1,56 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 TextureEffect_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+vec4 ConfigConversionEffect_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = floor(_input * 255.0 + 0.5) / 255.0;
+ {
+ _output.xyz = floor((_output.xyz * _output.w) * 255.0 + 0.5) / 255.0;
+ }
+ return _output;
+}
+vec4 Series_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = ConfigConversionEffect_Stage1_c0_c0_c1_c0(TextureEffect_Stage1_c0_c0_c0_c0(_input));
+ return _output;
+}
+vec4 Swizzle_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = _input.zyxw;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = Swizzle_Stage1_c1_c0(Series_Stage1_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/13-28.shader_test b/shaders/skia/13-28.shader_test
new file mode 100644
index 0000000..5884423
--- /dev/null
+++ b/shaders/skia/13-28.shader_test
@@ -0,0 +1,90 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 uscale01_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias01_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale23_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias23_Stage1_c0_c0_c1_c0;
+uniform float uthreshold_Stage1_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage2_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 RadialGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = length(vTransformedCoords_0_Stage0);
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 DualIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthreshold_Stage1_c0_c0_c1_c0) {
+ scale = uscale01_Stage1_c0_c0_c1_c0;
+ bias = ubias01_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale23_Stage1_c0_c0_c1_c0;
+ bias = ubias23_Stage1_c0_c0_c1_c0;
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = RadialGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = DualIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c1_c0;
+ }
+ return _output;
+}
+vec4 blend_src_atop(vec4 src, vec4 dst) {
+ return dst.w * src + (1.0 - src.w) * dst;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_src_atop(ConstColorProcessor_Stage2_c1_c0(vec4(1.0)), output_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/13-284.shader_test b/shaders/skia/13-284.shader_test
new file mode 100644
index 0000000..370c1d8
--- /dev/null
+++ b/shaders/skia/13-284.shader_test
@@ -0,0 +1,46 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform sampler2D uTextureSampler_0_Stage0;
+noperspective in vec2 vTextureCoords_Stage0;
+flat in int vTexIndex_Stage0;
+noperspective in vec4 vinColor_Stage0;
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ vec4 texColor;
+ {
+ texColor = texture(uTextureSampler_0_Stage0, vTextureCoords_Stage0);
+ }
+ outputCoverage_Stage0 = texColor;
+ }
+ {
+ sk_FragColor = 1.0 - outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform vec2 uAtlasSizeInv_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in uvec2 inTextureCoords;
+noperspective out vec2 vTextureCoords_Stage0;
+flat out int vTexIndex_Stage0;
+noperspective out vec4 vinColor_Stage0;
+void main() {
+ ivec2 signedCoords = ivec2(int(inTextureCoords.x), int(inTextureCoords.y));
+ vec2 unormTexCoords = vec2(float(signedCoords.x / 2), float(signedCoords.y / 2));
+ vTextureCoords_Stage0 = unormTexCoords * uAtlasSizeInv_Stage0;
+ vTexIndex_Stage0 = 0;
+ vinColor_Stage0 = inColor;
+ gl_Position = vec4(inPosition.x, inPosition.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/13-285.shader_test b/shaders/skia/13-285.shader_test
new file mode 100644
index 0000000..e5ffabb
--- /dev/null
+++ b/shaders/skia/13-285.shader_test
@@ -0,0 +1,109 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 ubaseFrequency_Stage2_c0_c0;
+uniform vec2 ustitchData_Stage2_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+uniform sampler2D uTextureSampler_1_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec3 vTransformedCoords_1_Stage0;
+float perlinnoise_Stage2_c0_c0(float chanCoord, vec2 noiseVec, vec2 stitchData) {
+ vec4 floorVal;
+ floorVal.xy = floor(noiseVec);
+ floorVal.zw = floorVal.xy + vec2(1.0);
+ vec2 fractVal = fract(noiseVec);
+ vec2 noiseSmooth = (fractVal * fractVal) * (vec2(3.0) - vec2(2.0) * fractVal);
+ if (floorVal.x >= stitchData.x) {
+ floorVal.x -= stitchData.x;
+ }
+ if (floorVal.y >= stitchData.y) {
+ floorVal.y -= stitchData.y;
+ }
+ if (floorVal.z >= stitchData.x) {
+ floorVal.z -= stitchData.x;
+ }
+ if (floorVal.w >= stitchData.y) {
+ floorVal.w -= stitchData.y;
+ }
+ floorVal = fract(floor(mod(floorVal, 256.0)) / vec4(256.0));
+ vec2 latticeIdx;
+ latticeIdx.x = texture(uTextureSampler_0_Stage2, vec2(floorVal.x, 0.5)).x;
+ latticeIdx.y = texture(uTextureSampler_0_Stage2, vec2(floorVal.z, 0.5)).x;
+ vec4 bcoords = fract(latticeIdx.xyxy + floorVal.yyww);
+ vec2 uv;
+ vec4 lattice = texture(uTextureSampler_1_Stage2, vec2(bcoords.x, chanCoord)).zyxw;
+ uv.x = dot((lattice.yw + lattice.xz * vec2(0.00390625)) * vec2(2.0) - vec2(1.0), fractVal);
+ fractVal.x -= 1.0;
+ lattice = texture(uTextureSampler_1_Stage2, vec2(bcoords.y, chanCoord)).zyxw;
+ uv.y = dot((lattice.yw + lattice.xz * vec2(0.00390625)) * vec2(2.0) - vec2(1.0), fractVal);
+ vec2 ab;
+ ab.x = mix(uv.x, uv.y, noiseSmooth.x);
+ fractVal.y -= 1.0;
+ lattice = texture(uTextureSampler_1_Stage2, vec2(bcoords.w, chanCoord)).zyxw;
+ uv.y = dot((lattice.yw + lattice.xz * vec2(0.00390625)) * vec2(2.0) - vec2(1.0), fractVal);
+ fractVal.x += 1.0;
+ lattice = texture(uTextureSampler_1_Stage2, vec2(bcoords.z, chanCoord)).zyxw;
+ uv.x = dot((lattice.yw + lattice.xz * vec2(0.00390625)) * vec2(2.0) - vec2(1.0), fractVal);
+ ab.y = mix(uv.x, uv.y, noiseSmooth.x);
+ return mix(ab.x, ab.y, noiseSmooth.y);
+}
+vec4 PerlinNoise_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 vTransformedCoords_1_Stage0_ensure2D = vTransformedCoords_1_Stage0.xy / vTransformedCoords_1_Stage0.z;
+ vec2 noiseVec = floor(vTransformedCoords_1_Stage0_ensure2D) * ubaseFrequency_Stage2_c0_c0;
+ _output = vec4(0.0);
+ vec2 stitchData = ustitchData_Stage2_c0_c0;
+ float ratio = 1.0;
+ for (int octave = 0;octave < 8; ++octave) {
+ _output += vec4(perlinnoise_Stage2_c0_c0(0.125, noiseVec, stitchData), perlinnoise_Stage2_c0_c0(0.375, noiseVec, stitchData), perlinnoise_Stage2_c0_c0(0.625, noiseVec, stitchData), perlinnoise_Stage2_c0_c0(0.875, noiseVec, stitchData)) * ratio;
+ noiseVec *= vec2(2.0);
+ ratio *= 0.5;
+ stitchData *= vec2(2.0);
+ }
+ _output = _output * vec4(0.5) + vec4(0.5);
+ _output = clamp(_output, 0.0, 1.0);
+ _output = vec4(_output.xyz * _output.www, _output.w);
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_dst_in(output_Stage1, PerlinNoise_Stage2_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec3 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0);
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/13-29.shader_test b/shaders/skia/13-29.shader_test
new file mode 100644
index 0000000..51e1bdd
--- /dev/null
+++ b/shaders/skia/13-29.shader_test
@@ -0,0 +1,90 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 uscale01_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias01_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale23_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias23_Stage1_c0_c0_c1_c0;
+uniform float uthreshold_Stage1_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage2_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 RadialGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = length(vTransformedCoords_0_Stage0);
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 DualIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthreshold_Stage1_c0_c0_c1_c0) {
+ scale = uscale01_Stage1_c0_c0_c1_c0;
+ bias = ubias01_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale23_Stage1_c0_c0_c1_c0;
+ bias = ubias23_Stage1_c0_c0_c1_c0;
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = RadialGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = DualIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c1_c0;
+ }
+ return _output;
+}
+vec4 blend_exclusion(vec4 src, vec4 dst) {
+ return vec4((dst.xyz + src.xyz) - (2.0 * dst.xyz) * src.xyz, src.w + (1.0 - src.w) * dst.w);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_exclusion(ConstColorProcessor_Stage2_c1_c0(vec4(1.0)), output_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/13-3.shader_test b/shaders/skia/13-3.shader_test
new file mode 100644
index 0000000..24363c8
--- /dev/null
+++ b/shaders/skia/13-3.shader_test
@@ -0,0 +1,52 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_dst_in(outputColor_Stage0, TextureEffect_Stage1_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/13-32.shader_test b/shaders/skia/13-32.shader_test
new file mode 100644
index 0000000..4b43c49
--- /dev/null
+++ b/shaders/skia/13-32.shader_test
@@ -0,0 +1,47 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uColor_Stage0;
+noperspective in vec3 vDashParams_Stage0;
+noperspective in vec4 vRectParams_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = uColor_Stage0;
+ float xShifted = vDashParams_Stage0.x - floor(vDashParams_Stage0.x / vDashParams_Stage0.z) * vDashParams_Stage0.z;
+ vec2 fragPosShifted = vec2(xShifted, vDashParams_Stage0.y);
+ float xSub, ySub;
+ xSub = min(fragPosShifted.x - vRectParams_Stage0.x, 0.0);
+ xSub += min(vRectParams_Stage0.z - fragPosShifted.x, 0.0);
+ ySub = min(fragPosShifted.y - vRectParams_Stage0.y, 0.0);
+ ySub += min(vRectParams_Stage0.w - fragPosShifted.y, 0.0);
+ float alpha = (1.0 + max(xSub, -1.0)) * (1.0 + max(ySub, -1.0));
+ outputCoverage_Stage0 = vec4(alpha);
+ }
+ {
+ sk_FragColor = outputColor_Stage0 * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 inPosition;
+in vec3 inDashParams;
+in vec4 inRect;
+noperspective out vec3 vDashParams_Stage0;
+noperspective out vec4 vRectParams_Stage0;
+void main() {
+ vDashParams_Stage0 = inDashParams;
+ vRectParams_Stage0 = inRect;
+ vec2 pos2 = inPosition;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/13-37.shader_test b/shaders/skia/13-37.shader_test
new file mode 100644
index 0000000..8875d5e
--- /dev/null
+++ b/shaders/skia/13-37.shader_test
@@ -0,0 +1,69 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform float uSrcTF_Stage2[7];
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+float src_tf_Stage2(float x) {
+ float G = uSrcTF_Stage2[0];
+ float A = uSrcTF_Stage2[1];
+ float B = uSrcTF_Stage2[2];
+ float C = uSrcTF_Stage2[3];
+ float D = uSrcTF_Stage2[4];
+ float E = uSrcTF_Stage2[5];
+ float F = uSrcTF_Stage2[6];
+ float s = sign(x);
+ x = abs(x);
+ x = x < D ? C * x + F : pow(A * x + B, G) + E;
+ return s * x;
+}
+vec4 color_xform_Stage2(vec4 color) {
+ float nonZeroAlpha = max(color.w, 9.9999997473787516e-05);
+ color = vec4(color.xyz / nonZeroAlpha, nonZeroAlpha);
+ color.x = src_tf_Stage2(color.x);
+ color.y = src_tf_Stage2(color.y);
+ color.z = src_tf_Stage2(color.z);
+ color.xyz *= color.w;
+ return color;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TextureEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = color_xform_Stage2(output_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/13-38.shader_test b/shaders/skia/13-38.shader_test
new file mode 100644
index 0000000..a6a3c6c
--- /dev/null
+++ b/shaders/skia/13-38.shader_test
@@ -0,0 +1,78 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec2 uDstTextureUpperLeft_Stage1;
+uniform vec2 uDstTextureCoordScale_Stage1;
+uniform sampler2D uDstTextureSampler_Stage1;
+flat in vec4 vcolor_Stage0;
+noperspective in vec4 varccoord_Stage0;
+vec4 blend_src(vec4 src, vec4 dst) {
+ return src;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ outputCoverage_Stage0 = vec4(1.0);
+ if (vec2(0.0) != varccoord_Stage0.xy) {
+ float fn = dot(varccoord_Stage0.xy, varccoord_Stage0.xy) - 1.0;
+ if (fn > 0.0) {
+ outputCoverage_Stage0 = vec4(0.0);
+ }
+ }
+ }
+ {
+ if (all(lessThanEqual(outputCoverage_Stage0.xyz, vec3(0.0)))) {
+ discard;
+ }
+ vec2 _dstTexCoord = (gl_FragCoord.xy - uDstTextureUpperLeft_Stage1) * uDstTextureCoordScale_Stage1;
+ _dstTexCoord.y = 1.0 - _dstTexCoord.y;
+ vec4 _dstColor = texture(uDstTextureSampler_Stage1, _dstTexCoord);
+ sk_FragColor = blend_src(outputColor_Stage0, _dstColor);
+ sk_FragColor = outputCoverage_Stage0 * sk_FragColor + (vec4(1.0) - outputCoverage_Stage0) * _dstColor;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec4 radii_selector;
+in vec4 corner_and_radius_outsets;
+in vec4 skew;
+in vec2 translate;
+in vec4 radii_x;
+in vec4 radii_y;
+in vec4 color;
+flat out vec4 vcolor_Stage0;
+noperspective out vec4 varccoord_Stage0;
+void main() {
+ vcolor_Stage0 = color;
+ vec2 corner = corner_and_radius_outsets.xy;
+ vec2 radius_outset = corner_and_radius_outsets.zw;
+ vec2 radii;
+ radii.x = dot(radii_selector, radii_x);
+ radii.y = dot(radii_selector, radii_y);
+ bool is_arc_section = radii.x > 0.0;
+ radii = abs(radii);
+ vec2 vertexpos = corner + radius_outset * radii;
+ mat2 skewmatrix = mat2(skew.xy, skew.zw);
+ vec2 devcoord = vertexpos * skewmatrix + translate;
+ if (is_arc_section) {
+ varccoord_Stage0.xy = 1.0 - abs(radius_outset);
+ mat2 derivatives = inverse(skewmatrix);
+ varccoord_Stage0.zw = derivatives * (((varccoord_Stage0.xy / radii) * corner) * 2.0);
+ } else {
+ varccoord_Stage0 = vec4(0.0);
+ }
+ gl_Position = vec4(devcoord.x, devcoord.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/13-39.shader_test b/shaders/skia/13-39.shader_test
new file mode 100644
index 0000000..fbe796c
--- /dev/null
+++ b/shaders/skia/13-39.shader_test
@@ -0,0 +1,163 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform vec2 uBounds_Stage1;
+uniform vec4 uKernel_Stage1[7];
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0 - 12.0 * uImageIncrement_Stage1;
+ vec2 coordSampled = vec2(0.0, 0.0);
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage1.x && coord.y <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].x;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage1.x && coord.y <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].y;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage1.x && coord.y <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].z;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage1.x && coord.y <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].w;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage1.x && coord.y <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].x;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage1.x && coord.y <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].y;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage1.x && coord.y <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].z;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage1.x && coord.y <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].w;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage1.x && coord.y <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].x;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage1.x && coord.y <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].y;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage1.x && coord.y <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].z;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage1.x && coord.y <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].w;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage1.x && coord.y <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].x;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage1.x && coord.y <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].y;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage1.x && coord.y <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].z;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage1.x && coord.y <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].w;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage1.x && coord.y <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[4].x;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage1.x && coord.y <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[4].y;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage1.x && coord.y <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[4].z;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage1.x && coord.y <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[4].w;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage1.x && coord.y <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[5].x;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage1.x && coord.y <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[5].y;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage1.x && coord.y <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[5].z;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage1.x && coord.y <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[5].w;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage1.x && coord.y <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[6].x;
+ }
+ coord += uImageIncrement_Stage1;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/13-41.shader_test b/shaders/skia/13-41.shader_test
new file mode 100644
index 0000000..8b5ccd3
--- /dev/null
+++ b/shaders/skia/13-41.shader_test
@@ -0,0 +1,59 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uinnerRect_Stage1_c0_c0;
+uniform vec2 uradiusPlusHalf_Stage1_c0_c0;
+uniform vec4 uinnerRect_Stage1_c1_c0;
+uniform vec2 uradiusPlusHalf_Stage1_c1_c0;
+flat in vec4 vcolor_Stage0;
+vec4 CircularRRect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 dxy0 = uinnerRect_Stage1_c0_c0.xy - gl_FragCoord.xy;
+ vec2 dxy1 = gl_FragCoord.xy - uinnerRect_Stage1_c0_c0.zw;
+ vec2 dxy = max(max(dxy0, dxy1), 0.0);
+ float alpha = clamp(uradiusPlusHalf_Stage1_c0_c0.x - length(dxy), 0.0, 1.0);
+ _output = _input * alpha;
+ return _output;
+}
+vec4 CircularRRect_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 dxy0 = uinnerRect_Stage1_c1_c0.xy - gl_FragCoord.xy;
+ vec2 dxy1 = gl_FragCoord.xy - uinnerRect_Stage1_c1_c0.zw;
+ vec2 dxy = max(max(dxy0, dxy1), 0.0);
+ float alpha = clamp(uradiusPlusHalf_Stage1_c1_c0.x - length(dxy), 0.0, 1.0);
+ _output = _input * alpha;
+ return _output;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = CircularRRect_Stage1_c1_c0(CircularRRect_Stage1_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = outputColor_Stage0 * output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 position;
+in vec4 color;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/13-49.shader_test b/shaders/skia/13-49.shader_test
new file mode 100644
index 0000000..29b1080
--- /dev/null
+++ b/shaders/skia/13-49.shader_test
@@ -0,0 +1,80 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+noperspective in vec4 vinCircleEdge_Stage0;
+noperspective in vec4 vinColor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 RadialGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = length(vTransformedCoords_0_Stage0);
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = RadialGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ vec4 circleEdge;
+ circleEdge = vinCircleEdge_Stage0;
+ float d = length(circleEdge.xy);
+ float distanceToOuterEdge = circleEdge.z * (1.0 - d);
+ float edgeAlpha = clamp(distanceToOuterEdge, 0.0, 1.0);
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1 * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec4 inCircleEdge;
+noperspective out vec4 vinCircleEdge_Stage0;
+noperspective out vec4 vinColor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vinCircleEdge_Stage0 = inCircleEdge;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/13-5.shader_test b/shaders/skia/13-5.shader_test
new file mode 100644
index 0000000..e7a3dc0
--- /dev/null
+++ b/shaders/skia/13-5.shader_test
@@ -0,0 +1,50 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 TextureEffect_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage2, vTransformedCoords_1_Stage0) * _input;
+ return _output;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_src_over(output_Stage1, TextureEffect_Stage2_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/13-50.shader_test b/shaders/skia/13-50.shader_test
new file mode 100644
index 0000000..375b10e
--- /dev/null
+++ b/shaders/skia/13-50.shader_test
@@ -0,0 +1,66 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 urectUniform_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_dst_in(outputColor_Stage0, TextureEffect_Stage1_c0_c0(vec4(1.0)));
+ }
+ vec4 output_Stage2;
+ {
+ float alpha;
+ {
+ alpha = float(all(greaterThan(vec4(gl_FragCoord.xy, urectUniform_Stage2.zw), vec4(urectUniform_Stage2.xy, gl_FragCoord.xy))) ? 1 : 0);
+ }
+ {
+ alpha = 1.0 - alpha;
+ }
+ output_Stage2 = vec4(alpha);
+ }
+ {
+ sk_FragColor = output_Stage1 * output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/13-51.shader_test b/shaders/skia/13-51.shader_test
new file mode 100644
index 0000000..a943287
--- /dev/null
+++ b/shaders/skia/13-51.shader_test
@@ -0,0 +1,50 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uellipse_Stage1;
+flat in vec4 vcolor_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec2 d = gl_FragCoord.xy - uellipse_Stage1.xy;
+ vec2 Z = d * uellipse_Stage1.zw;
+ float implicit = dot(Z, d) - 1.0;
+ float grad_dot = 4.0 * dot(Z, Z);
+ {
+ grad_dot = max(grad_dot, 1.1754999560161448e-38);
+ }
+ float approx_dist = implicit * inversesqrt(grad_dot);
+ float alpha;
+ {
+ alpha = clamp(0.5 - approx_dist, 0.0, 1.0);
+ }
+ output_Stage1 = vec4(alpha);
+ }
+ {
+ sk_FragColor = outputColor_Stage0 * output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 position;
+in vec4 color;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/13-55.shader_test b/shaders/skia/13-55.shader_test
new file mode 100644
index 0000000..0904f7c
--- /dev/null
+++ b/shaders/skia/13-55.shader_test
@@ -0,0 +1,86 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uCoordTransformMatrix_1_Stage0;
+uniform vec4 uclamp_Stage1_c0_c0_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0_c0_c0(vec4 _input, vec2 _coords) {
+ _coords = _coords * uCoordTransformMatrix_1_Stage0.xz + uCoordTransformMatrix_1_Stage0.yw;
+ vec4 _output;
+ vec2 inCoord = _coords;
+ vec2 subsetCoord;
+ subsetCoord.x = inCoord.x;
+ subsetCoord.y = inCoord.y;
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage1_c0_c0_c0_c0.x, uclamp_Stage1_c0_c0_c0_c0.z);
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage1_c0_c0_c0_c0.y, uclamp_Stage1_c0_c0_c0_c0.w);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ _output = _input * textureColor;
+ return _output;
+}
+vec4 Bicubic_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coord = vTransformedCoords_0_Stage0 - vec2(0.5);
+ vec2 f = fract(coord);
+ coord += 0.5 - f;
+ vec4 wx = mat4(0.055555555555555552, 0.88888888888888884, 0.055555555555555552, 0.0, -0.5, 0.0, 0.5, 0.0, 0.83333333333333337, -2.0, 1.5, -0.33333333333333331, -0.3888888888888889, 1.1666666666666667, -1.1666666666666667, 0.3888888888888889) * vec4(1.0, f.x, f.x * f.x, (f.x * f.x) * f.x);
+ vec4 wy = mat4(0.055555555555555552, 0.88888888888888884, 0.055555555555555552, 0.0, -0.5, 0.0, 0.5, 0.0, 0.83333333333333337, -2.0, 1.5, -0.33333333333333331, -0.3888888888888889, 1.1666666666666667, -1.1666666666666667, 0.3888888888888889) * vec4(1.0, f.y, f.y * f.y, (f.y * f.y) * f.y);
+ vec4 rowColors[4];
+ rowColors[0] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(-1.0, -1.0));
+ rowColors[1] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(0.0, -1.0));
+ rowColors[2] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(1.0, -1.0));
+ rowColors[3] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(2.0, -1.0));
+ vec4 s0 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ rowColors[0] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(-1.0, 0.0));
+ rowColors[1] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord);
+ rowColors[2] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(1.0, 0.0));
+ rowColors[3] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(2.0, 0.0));
+ vec4 s1 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ rowColors[0] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(-1.0, 1.0));
+ rowColors[1] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(0.0, 1.0));
+ rowColors[2] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(1.0, 1.0));
+ rowColors[3] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(2.0, 1.0));
+ vec4 s2 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ rowColors[0] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(-1.0, 2.0));
+ rowColors[1] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(0.0, 2.0));
+ rowColors[2] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(1.0, 2.0));
+ rowColors[3] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(2.0, 2.0));
+ vec4 s3 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ vec4 bicubicColor = ((wy.x * s0 + wy.y * s1) + wy.z * s2) + wy.w * s3;
+ bicubicColor.xyz = max(vec3(0.0), min(bicubicColor.xyz, bicubicColor.www));
+ _output = bicubicColor * _input;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = Bicubic_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/13-58.shader_test b/shaders/skia/13-58.shader_test
new file mode 100644
index 0000000..f0bb7c9
--- /dev/null
+++ b/shaders/skia/13-58.shader_test
@@ -0,0 +1,46 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 TextureEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+vec4 ConfigConversionEffect_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = floor(_input * 255.0 + 0.5) / 255.0;
+ {
+ _output.xyz = _output.w <= 0.0 ? vec3(0.0) : floor((_output.xyz / _output.w) * 255.0 + 0.5) / 255.0;
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ConfigConversionEffect_Stage1_c1_c0(TextureEffect_Stage1_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/13-68.shader_test b/shaders/skia/13-68.shader_test
new file mode 100644
index 0000000..dddd0c2
--- /dev/null
+++ b/shaders/skia/13-68.shader_test
@@ -0,0 +1,92 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec3 position;
+in vec4 color;
+in vec2 localCoord;
+out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, position.z);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/13-69.shader_test b/shaders/skia/13-69.shader_test
new file mode 100644
index 0000000..110a4f2
--- /dev/null
+++ b/shaders/skia/13-69.shader_test
@@ -0,0 +1,114 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+in float vcoverage_Stage0;
+flat in vec4 vgeomDomain_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ float coverage = vcoverage_Stage0 * gl_FragCoord.w;
+ vec4 geoDomain;
+ geoDomain = vgeomDomain_Stage0;
+ if (coverage < 0.5) {
+ vec4 dists4 = clamp(vec4(1.0, 1.0, -1.0, -1.0) * (gl_FragCoord.xyxy - geoDomain), 0.0, 1.0);
+ vec2 dists2 = dists4.xy * dists4.zw;
+ coverage = min(coverage, dists2.x * dists2.y);
+ }
+ outputCoverage_Stage0 = vec4(coverage);
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1 * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec4 positionWithCoverage;
+in vec4 color;
+in vec2 localCoord;
+in vec4 geomDomain;
+out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+out float vcoverage_Stage0;
+flat out vec4 vgeomDomain_Stage0;
+void main() {
+ vec3 position = positionWithCoverage.xyz;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ vcoverage_Stage0 = positionWithCoverage.w * positionWithCoverage.z;
+ vgeomDomain_Stage0 = geomDomain;
+ gl_Position = vec4(position.x, position.y, 0.0, position.z);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/13-7.shader_test b/shaders/skia/13-7.shader_test
new file mode 100644
index 0000000..d02e4e4
--- /dev/null
+++ b/shaders/skia/13-7.shader_test
@@ -0,0 +1,63 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uclamp_Stage1_c0_c0_c0_c0;
+uniform mat3 ucolorSpaceMatrix_Stage1_c0_c0;
+uniform vec3 ucolorSpaceTranslate_Stage1_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 inCoord = vTransformedCoords_0_Stage0;
+ vec2 subsetCoord;
+ subsetCoord.x = inCoord.x;
+ subsetCoord.y = inCoord.y;
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage1_c0_c0_c0_c0.x, uclamp_Stage1_c0_c0_c0_c0.z);
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage1_c0_c0_c0_c0.y, uclamp_Stage1_c0_c0_c0_c0.w);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ _output = _input * textureColor;
+ return _output;
+}
+vec4 YUVtoRGBEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 planes[1];
+ planes[0] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0));
+ vec4 color = vec4(planes[0].x, planes[0].y, planes[0].z, planes[0].w);
+ color.xyz = clamp(color.xyz * ucolorSpaceMatrix_Stage1_c0_c0 + ucolorSpaceTranslate_Stage1_c0_c0, 0.0, 1.0);
+ color.xyz *= color.w;
+ _output = color;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = YUVtoRGBEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/13-71.shader_test b/shaders/skia/13-71.shader_test
new file mode 100644
index 0000000..ecb3f77
--- /dev/null
+++ b/shaders/skia/13-71.shader_test
@@ -0,0 +1,91 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 ubaseFrequency_Stage1_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+float perlinnoise_Stage1_c0_c0(float chanCoord, vec2 noiseVec) {
+ vec4 floorVal;
+ floorVal.xy = floor(noiseVec);
+ floorVal.zw = floorVal.xy + vec2(1.0);
+ vec2 fractVal = fract(noiseVec);
+ vec2 noiseSmooth = (fractVal * fractVal) * (vec2(3.0) - vec2(2.0) * fractVal);
+ floorVal = fract(floor(mod(floorVal, 256.0)) / vec4(256.0));
+ vec2 latticeIdx;
+ latticeIdx.x = texture(uTextureSampler_0_Stage1, vec2(floorVal.x, 0.5)).x;
+ latticeIdx.y = texture(uTextureSampler_0_Stage1, vec2(floorVal.z, 0.5)).x;
+ vec4 bcoords = fract(latticeIdx.xyxy + floorVal.yyww);
+ vec2 uv;
+ vec4 lattice = texture(uTextureSampler_1_Stage1, vec2(bcoords.x, chanCoord)).zyxw;
+ uv.x = dot((lattice.yw + lattice.xz * vec2(0.00390625)) * vec2(2.0) - vec2(1.0), fractVal);
+ fractVal.x -= 1.0;
+ lattice = texture(uTextureSampler_1_Stage1, vec2(bcoords.y, chanCoord)).zyxw;
+ uv.y = dot((lattice.yw + lattice.xz * vec2(0.00390625)) * vec2(2.0) - vec2(1.0), fractVal);
+ vec2 ab;
+ ab.x = mix(uv.x, uv.y, noiseSmooth.x);
+ fractVal.y -= 1.0;
+ lattice = texture(uTextureSampler_1_Stage1, vec2(bcoords.w, chanCoord)).zyxw;
+ uv.y = dot((lattice.yw + lattice.xz * vec2(0.00390625)) * vec2(2.0) - vec2(1.0), fractVal);
+ fractVal.x += 1.0;
+ lattice = texture(uTextureSampler_1_Stage1, vec2(bcoords.z, chanCoord)).zyxw;
+ uv.x = dot((lattice.yw + lattice.xz * vec2(0.00390625)) * vec2(2.0) - vec2(1.0), fractVal);
+ ab.y = mix(uv.x, uv.y, noiseSmooth.x);
+ return mix(ab.x, ab.y, noiseSmooth.y);
+}
+vec4 PerlinNoise_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 noiseVec = floor(vTransformedCoords_0_Stage0) * ubaseFrequency_Stage1_c0_c0;
+ _output = vec4(0.0);
+ float ratio = 1.0;
+ for (int octave = 0;octave < 5; ++octave) {
+ _output += abs(vec4(perlinnoise_Stage1_c0_c0(0.125, noiseVec), perlinnoise_Stage1_c0_c0(0.375, noiseVec), perlinnoise_Stage1_c0_c0(0.625, noiseVec), perlinnoise_Stage1_c0_c0(0.875, noiseVec))) * ratio;
+ noiseVec *= vec2(2.0);
+ ratio *= 0.5;
+ }
+ _output = clamp(_output, 0.0, 1.0);
+ _output = vec4(_output.xyz * _output.www, _output.w);
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_dst_in(outputColor_Stage0, PerlinNoise_Stage1_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/13-8.shader_test b/shaders/skia/13-8.shader_test
new file mode 100644
index 0000000..e0ec050
--- /dev/null
+++ b/shaders/skia/13-8.shader_test
@@ -0,0 +1,45 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform mat3 ucolorSpaceMatrix_Stage1;
+uniform vec3 ucolorSpaceTranslate_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 TextureEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ vec4 planes[1];
+ planes[0] = TextureEffect_Stage1_c0_c0(vec4(1.0));
+ vec4 color = vec4(planes[0].y, planes[0].z, planes[0].x, planes[0].w);
+ color.xyz = clamp(color.xyz * ucolorSpaceMatrix_Stage1 + ucolorSpaceTranslate_Stage1, 0.0, 1.0);
+ color.xyz *= color.w;
+ output_Stage1 = color;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/13-82.shader_test b/shaders/skia/13-82.shader_test
new file mode 100644
index 0000000..a7b788b
--- /dev/null
+++ b/shaders/skia/13-82.shader_test
@@ -0,0 +1,41 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uColor_Stage0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec3 vTransformedCoords_0_Stage0;
+vec4 TextureEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = textureProj(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TextureEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 inLocalCoord;
+noperspective out vec3 vTransformedCoords_0_Stage0;
+void main() {
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0);
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/13-83.shader_test b/shaders/skia/13-83.shader_test
new file mode 100644
index 0000000..15ca5ec
--- /dev/null
+++ b/shaders/skia/13-83.shader_test
@@ -0,0 +1,41 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uColor_Stage0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 TextureEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TextureEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 inLocalCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/13-9.shader_test b/shaders/skia/13-9.shader_test
new file mode 100644
index 0000000..0513277
--- /dev/null
+++ b/shaders/skia/13-9.shader_test
@@ -0,0 +1,76 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform mat3 ucolorSpaceMatrix_Stage1_c0_c0;
+uniform vec3 ucolorSpaceTranslate_Stage1_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+uniform sampler2D uTextureSampler_2_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_1_Stage1, vTransformedCoords_1_Stage0) * _input;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c0_c0_c2_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_2_Stage1, vTransformedCoords_2_Stage0) * _input;
+ return _output;
+}
+vec4 YUVtoRGBEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 planes[3];
+ planes[0] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0));
+ planes[1] = TextureEffect_Stage1_c0_c0_c1_c0(vec4(1.0));
+ planes[2] = TextureEffect_Stage1_c0_c0_c2_c0(vec4(1.0));
+ vec4 color = vec4(planes[0].x, planes[1].x, planes[1].y, planes[2].w);
+ color.xyz = clamp(color.xyz * ucolorSpaceMatrix_Stage1_c0_c0 + ucolorSpaceTranslate_Stage1_c0_c0, 0.0, 1.0);
+ color.xyz *= color.w;
+ _output = color;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = YUVtoRGBEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/13-90.shader_test b/shaders/skia/13-90.shader_test
new file mode 100644
index 0000000..1efe0cf
--- /dev/null
+++ b/shaders/skia/13-90.shader_test
@@ -0,0 +1,44 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform float uPixelSize_Stage1;
+uniform vec2 uRange_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0;
+ coord.x -= 2.0 * uPixelSize_Stage1;
+ float highBound = min(uRange_Stage1.y, coord.x + 4.0 * uPixelSize_Stage1);
+ coord.x = max(uRange_Stage1.x, coord.x);
+ for (int i = 0;i < 5; i++) {
+ output_Stage1 = max(output_Stage1, texture(uTextureSampler_0_Stage1, coord));
+ coord.x += uPixelSize_Stage1;
+ coord.x = min(highBound, coord.x);
+ }
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/13-91.shader_test b/shaders/skia/13-91.shader_test
new file mode 100644
index 0000000..47fe2ca
--- /dev/null
+++ b/shaders/skia/13-91.shader_test
@@ -0,0 +1,89 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage2_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c1_c0;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+vec4 blend_src(vec4 src, vec4 dst) {
+ return src;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_dst_in(outputColor_Stage0, ClampedGradientEffect_Stage1_c0_c0(vec4(1.0)));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_src(ConstColorProcessor_Stage2_c1_c0(vec4(1.0)), output_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/13-93.shader_test b/shaders/skia/13-93.shader_test
new file mode 100644
index 0000000..03828ea
--- /dev/null
+++ b/shaders/skia/13-93.shader_test
@@ -0,0 +1,143 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform vec4 uKernel_Stage1[3];
+uniform vec2 uKernelOffset_Stage1;
+uniform float uGain_Stage1;
+uniform float uBias_Stage1;
+uniform vec4 uTexDom_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ vec4 sum = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0 - uKernelOffset_Stage1 * uImageIncrement_Stage1;
+ vec4 c;
+ {
+ float k = uKernel_Stage1[0].x;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = mod(origCoord - uTexDom_Stage1.xy, uTexDom_Stage1.zw - uTexDom_Stage1.xy) + uTexDom_Stage1.xy;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[0].y;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = mod(origCoord - uTexDom_Stage1.xy, uTexDom_Stage1.zw - uTexDom_Stage1.xy) + uTexDom_Stage1.xy;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[0].z;
+ {
+ vec2 origCoord = coord + vec2(2.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = mod(origCoord - uTexDom_Stage1.xy, uTexDom_Stage1.zw - uTexDom_Stage1.xy) + uTexDom_Stage1.xy;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[0].w;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = mod(origCoord - uTexDom_Stage1.xy, uTexDom_Stage1.zw - uTexDom_Stage1.xy) + uTexDom_Stage1.xy;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[1].x;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = mod(origCoord - uTexDom_Stage1.xy, uTexDom_Stage1.zw - uTexDom_Stage1.xy) + uTexDom_Stage1.xy;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[1].y;
+ {
+ vec2 origCoord = coord + vec2(2.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = mod(origCoord - uTexDom_Stage1.xy, uTexDom_Stage1.zw - uTexDom_Stage1.xy) + uTexDom_Stage1.xy;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[1].z;
+ {
+ vec2 origCoord = coord + vec2(0.0, 2.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = mod(origCoord - uTexDom_Stage1.xy, uTexDom_Stage1.zw - uTexDom_Stage1.xy) + uTexDom_Stage1.xy;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[1].w;
+ {
+ vec2 origCoord = coord + vec2(1.0, 2.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = mod(origCoord - uTexDom_Stage1.xy, uTexDom_Stage1.zw - uTexDom_Stage1.xy) + uTexDom_Stage1.xy;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[2].x;
+ {
+ vec2 origCoord = coord + vec2(2.0, 2.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = mod(origCoord - uTexDom_Stage1.xy, uTexDom_Stage1.zw - uTexDom_Stage1.xy) + uTexDom_Stage1.xy;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ output_Stage1 = sum * uGain_Stage1 + uBias_Stage1;
+ output_Stage1.w = clamp(output_Stage1.w, 0.0, 1.0);
+ output_Stage1.xyz = clamp(output_Stage1.xyz, 0.0, output_Stage1.w);
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/13-95.shader_test b/shaders/skia/13-95.shader_test
new file mode 100644
index 0000000..f5ba875
--- /dev/null
+++ b/shaders/skia/13-95.shader_test
@@ -0,0 +1,145 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 uscale01_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias01_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale23_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias23_Stage1_c0_c0_c1_c0;
+uniform float uthreshold_Stage1_c0_c0_c1_c0;
+flat in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 varccoord_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 DualIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthreshold_Stage1_c0_c0_c1_c0) {
+ scale = uscale01_Stage1_c0_c0_c1_c0;
+ bias = ubias01_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale23_Stage1_c0_c0_c1_c0;
+ bias = ubias23_Stage1_c0_c0_c1_c0;
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = DualIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ float x_plus_1 = varccoord_Stage0.x, y = varccoord_Stage0.y;
+ float coverage;
+ if (0.0 == x_plus_1) {
+ coverage = y;
+ } else {
+ float fn = x_plus_1 * (x_plus_1 - 2.0);
+ fn = ((y) * (y) + (fn));
+ float fnwidth = fwidth(fn);
+ float d = fn / fnwidth;
+ coverage = clamp(0.5 - d, 0.0, 1.0);
+ }
+ outputCoverage_Stage0 = vec4(coverage);
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ float luma = clamp(dot(vec3(0.2125999927520752, 0.71520000696182251, 0.072200000286102295), output_Stage1.xyz), 0.0, 1.0);
+ output_Stage2 = vec4(0.0, 0.0, 0.0, luma);
+ }
+ {
+ sk_FragColor = output_Stage2 * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec4 radii_selector;
+in vec4 corner_and_radius_outsets;
+in vec4 aa_bloat_and_coverage;
+in vec4 skew;
+in vec2 translate;
+in vec4 radii_x;
+in vec4 radii_y;
+in vec4 color;
+in vec4 local_rect;
+flat out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 varccoord_Stage0;
+void main() {
+ vcolor_Stage0 = color;
+ vec2 corner = corner_and_radius_outsets.xy;
+ vec2 radius_outset = corner_and_radius_outsets.zw;
+ vec2 aa_bloat_direction = aa_bloat_and_coverage.xy;
+ float coverage = aa_bloat_and_coverage.z;
+ float is_linear_coverage = aa_bloat_and_coverage.w;
+ vec2 pixellength = inversesqrt(vec2(dot(skew.xz, skew.xz), dot(skew.yw, skew.yw)));
+ vec4 normalized_axis_dirs = skew * pixellength.xyxy;
+ vec2 axiswidths = abs(normalized_axis_dirs.xy) + abs(normalized_axis_dirs.zw);
+ vec2 aa_bloatradius = (axiswidths * pixellength) * 0.5;
+ vec4 radii_and_neighbors = radii_selector * mat4(radii_x, radii_y, radii_x.yxwz, radii_y.wzyx);
+ vec2 radii = radii_and_neighbors.xy;
+ vec2 neighbor_radii = radii_and_neighbors.zw;
+ if (any(greaterThan(aa_bloatradius, vec2(1.0)))) {
+ corner = max(abs(corner), aa_bloatradius) * sign(corner);
+ coverage /= max(aa_bloatradius.x, 1.0) * max(aa_bloatradius.y, 1.0);
+ radii = vec2(0.0);
+ }
+ if (any(lessThan(radii, aa_bloatradius * 1.25))) {
+ radii = aa_bloatradius;
+ radius_outset = floor(abs(radius_outset)) * radius_outset;
+ is_linear_coverage = 1.0;
+ } else {
+ radii = clamp(radii, pixellength, 2.0 - pixellength);
+ neighbor_radii = clamp(neighbor_radii, pixellength, 2.0 - pixellength);
+ vec2 spacing = (2.0 - radii) - neighbor_radii;
+ vec2 extra_pad = max(pixellength * 0.0625 - spacing, vec2(0.0));
+ radii -= extra_pad * 0.5;
+ }
+ vec2 aa_outset = aa_bloat_direction * aa_bloatradius;
+ vec2 vertexpos = (corner + radius_outset * radii) + aa_outset;
+ vec2 localcoord = (local_rect.xy * (1.0 - vertexpos) + local_rect.zw * (1.0 + vertexpos)) * 0.5;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localcoord, 1.0)).xy;
+ mat2 skewmatrix = mat2(skew.xy, skew.zw);
+ vec2 devcoord = vertexpos * skewmatrix + translate;
+ if (0.0 != is_linear_coverage) {
+ varccoord_Stage0.xy = vec2(0.0, coverage);
+ } else {
+ vec2 arccoord = (1.0 - abs(radius_outset)) + (aa_outset / radii) * corner;
+ varccoord_Stage0.xy = vec2(arccoord.x + 1.0, arccoord.y);
+ }
+ gl_Position = vec4(devcoord.x, devcoord.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/13.shader_test b/shaders/skia/13.shader_test
new file mode 100644
index 0000000..65eb7a2
--- /dev/null
+++ b/shaders/skia/13.shader_test
@@ -0,0 +1,42 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform sampler2DRect uTextureSampler_0_Stage0;
+noperspective in vec2 vlocalCoord_Stage0;
+flat in vec4 vtexDomain_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vec4(1.0);
+ vec2 texCoord;
+ texCoord = vlocalCoord_Stage0;
+ vec4 domain;
+ domain = vtexDomain_Stage0;
+ texCoord = clamp(texCoord, domain.xy, domain.zw);
+ outputColor_Stage0 = texture(uTextureSampler_0_Stage0, texCoord);
+ }
+ {
+ sk_FragColor = outputColor_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 position;
+in vec2 localCoord;
+in vec4 texDomain;
+noperspective out vec2 vlocalCoord_Stage0;
+flat out vec4 vtexDomain_Stage0;
+void main() {
+ vlocalCoord_Stage0 = localCoord;
+ vtexDomain_Stage0 = texDomain;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/130-1.shader_test b/shaders/skia/130-1.shader_test
new file mode 100644
index 0000000..c8c5ff3
--- /dev/null
+++ b/shaders/skia/130-1.shader_test
@@ -0,0 +1,68 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform mat4 um_Stage2;
+uniform vec4 uv_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+vec4 YUVtoRGBEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 planes[1];
+ planes[0] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0));
+ vec4 color = vec4(planes[0].y, planes[0].z, planes[0].x, planes[0].w);
+ color.xyz *= color.w;
+ _output = color;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = YUVtoRGBEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ vec4 inputColor = output_Stage1;
+ {
+ float nonZeroAlpha = max(inputColor.w, 9.9999997473787516e-05);
+ inputColor = vec4(inputColor.xyz / nonZeroAlpha, inputColor.w);
+ }
+ output_Stage2 = um_Stage2 * inputColor + uv_Stage2;
+ {
+ output_Stage2 = clamp(output_Stage2, 0.0, 1.0);
+ }
+ {
+ output_Stage2.xyz *= output_Stage2.w;
+ }
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/130-14.shader_test b/shaders/skia/130-14.shader_test
new file mode 100644
index 0000000..e6303cf
--- /dev/null
+++ b/shaders/skia/130-14.shader_test
@@ -0,0 +1,82 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 ColorTableEffect_Stage2_c0_c0(vec4 _input, vec2 _coords) {
+ vec4 _output;
+ float nonZeroAlpha = max(_input.w, 9.9999997473787516e-05);
+ vec4 coord = vec4(_input.xyz / nonZeroAlpha, nonZeroAlpha);
+ coord = coord * 0.9960939884185791 + vec4(0.0019529999699443579, 0.0019529999699443579, 0.0019529999699443579, 0.0019529999699443579);
+ _output.w = texture(uTextureSampler_0_Stage2, vec2(coord.w, 0.125)).w;
+ _output.x = texture(uTextureSampler_0_Stage2, vec2(coord.x, 0.375)).w;
+ _output.y = texture(uTextureSampler_0_Stage2, vec2(coord.y, 0.625)).w;
+ _output.z = texture(uTextureSampler_0_Stage2, vec2(coord.z, 0.875)).w;
+ _output.xyz *= _output.w;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ vec2 coord = vTransformedCoords_1_Stage0 - vec2(0.5);
+ vec2 f = fract(coord);
+ coord += 0.5 - f;
+ vec4 wx = mat4(0.055555555555555552, 0.88888888888888884, 0.055555555555555552, 0.0, -0.5, 0.0, 0.5, 0.0, 0.83333333333333337, -2.0, 1.5, -0.33333333333333331, -0.3888888888888889, 1.1666666666666667, -1.1666666666666667, 0.3888888888888889) * vec4(1.0, f.x, f.x * f.x, (f.x * f.x) * f.x);
+ vec4 wy = mat4(0.055555555555555552, 0.88888888888888884, 0.055555555555555552, 0.0, -0.5, 0.0, 0.5, 0.0, 0.83333333333333337, -2.0, 1.5, -0.33333333333333331, -0.3888888888888889, 1.1666666666666667, -1.1666666666666667, 0.3888888888888889) * vec4(1.0, f.y, f.y * f.y, (f.y * f.y) * f.y);
+ vec4 rowColors[4];
+ rowColors[0] = ColorTableEffect_Stage2_c0_c0(vec4(1.0), coord + vec2(-1.0, -1.0));
+ rowColors[1] = ColorTableEffect_Stage2_c0_c0(vec4(1.0), coord + vec2(0.0, -1.0));
+ rowColors[2] = ColorTableEffect_Stage2_c0_c0(vec4(1.0), coord + vec2(1.0, -1.0));
+ rowColors[3] = ColorTableEffect_Stage2_c0_c0(vec4(1.0), coord + vec2(2.0, -1.0));
+ vec4 s0 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ rowColors[0] = ColorTableEffect_Stage2_c0_c0(vec4(1.0), coord + vec2(-1.0, 0.0));
+ rowColors[1] = ColorTableEffect_Stage2_c0_c0(vec4(1.0), coord);
+ rowColors[2] = ColorTableEffect_Stage2_c0_c0(vec4(1.0), coord + vec2(1.0, 0.0));
+ rowColors[3] = ColorTableEffect_Stage2_c0_c0(vec4(1.0), coord + vec2(2.0, 0.0));
+ vec4 s1 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ rowColors[0] = ColorTableEffect_Stage2_c0_c0(vec4(1.0), coord + vec2(-1.0, 1.0));
+ rowColors[1] = ColorTableEffect_Stage2_c0_c0(vec4(1.0), coord + vec2(0.0, 1.0));
+ rowColors[2] = ColorTableEffect_Stage2_c0_c0(vec4(1.0), coord + vec2(1.0, 1.0));
+ rowColors[3] = ColorTableEffect_Stage2_c0_c0(vec4(1.0), coord + vec2(2.0, 1.0));
+ vec4 s2 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ rowColors[0] = ColorTableEffect_Stage2_c0_c0(vec4(1.0), coord + vec2(-1.0, 2.0));
+ rowColors[1] = ColorTableEffect_Stage2_c0_c0(vec4(1.0), coord + vec2(0.0, 2.0));
+ rowColors[2] = ColorTableEffect_Stage2_c0_c0(vec4(1.0), coord + vec2(1.0, 2.0));
+ rowColors[3] = ColorTableEffect_Stage2_c0_c0(vec4(1.0), coord + vec2(2.0, 2.0));
+ vec4 s3 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ vec4 bicubicColor = ((wy.x * s0 + wy.y * s1) + wy.z * s2) + wy.w * s3;
+ bicubicColor = clamp(bicubicColor, 0.0, 1.0);
+ output_Stage2 = bicubicColor * output_Stage1;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/130-15.shader_test b/shaders/skia/130-15.shader_test
new file mode 100644
index 0000000..0c0a870
--- /dev/null
+++ b/shaders/skia/130-15.shader_test
@@ -0,0 +1,116 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage2;
+uniform vec4 uKernel_Stage2[6];
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_1_Stage0 - 11.0 * uImageIncrement_Stage2;
+ vec2 coordSampled = vec2(0.0, 0.0);
+ coordSampled = coord;
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[0].x;
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[0].y;
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[0].z;
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[0].w;
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[1].x;
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[1].y;
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[1].z;
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[1].w;
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[2].x;
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[2].y;
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[2].z;
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[2].w;
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[3].x;
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[3].y;
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[3].z;
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[3].w;
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[4].x;
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[4].y;
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[4].z;
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[4].w;
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[5].x;
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[5].y;
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[5].z;
+ coord += uImageIncrement_Stage2;
+ output_Stage2 *= output_Stage1;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/130-2.shader_test b/shaders/skia/130-2.shader_test
new file mode 100644
index 0000000..8a7c1b7
--- /dev/null
+++ b/shaders/skia/130-2.shader_test
@@ -0,0 +1,152 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage2_c1_c0;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.w) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ } else {
+ {
+ if (t < uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = OverrideInputFragmentProcessor_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c1_c0;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 blend_darken(vec4 src, vec4 dst) {
+ vec4 result = blend_src_over(src, dst);
+ result.xyz = min(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
+ return result;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_src_in(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_darken(ConstColorProcessor_Stage2_c1_c0(vec4(1.0)), output_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 inColor;
+in vec2 inLocalCoord;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/130-4.shader_test b/shaders/skia/130-4.shader_test
new file mode 100644
index 0000000..7559710
--- /dev/null
+++ b/shaders/skia/130-4.shader_test
@@ -0,0 +1,62 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+flat in vec4 vcolor_Stage0;
+in vec2 varccoord_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ outputCoverage_Stage0 = vec4(1.0);
+ if (vec2(0.0) != varccoord_Stage0) {
+ float fn = dot(varccoord_Stage0, varccoord_Stage0) - 1.0;
+ if (fn > 0.0) {
+ outputCoverage_Stage0 = vec4(0.0);
+ }
+ }
+ }
+ {
+ sk_FragColor = outputColor_Stage0 * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec4 radii_selector;
+in vec4 corner_and_radius_outsets;
+in vec3 persp_x;
+in vec3 persp_y;
+in vec3 persp_z;
+in vec4 radii_x;
+in vec4 radii_y;
+in vec4 color;
+flat out vec4 vcolor_Stage0;
+out vec2 varccoord_Stage0;
+void main() {
+ vcolor_Stage0 = color;
+ vec2 corner = corner_and_radius_outsets.xy;
+ vec2 radius_outset = corner_and_radius_outsets.zw;
+ vec2 radii;
+ radii.x = dot(radii_selector, radii_x);
+ radii.y = dot(radii_selector, radii_y);
+ bool is_arc_section = radii.x > 0.0;
+ radii = abs(radii);
+ vec2 vertexpos = corner + radius_outset * radii;
+ mat3 persp_matrix = mat3(persp_x, persp_y, persp_z);
+ vec3 devcoord = vec3(vertexpos, 1.0) * persp_matrix;
+ if (is_arc_section) {
+ varccoord_Stage0.xy = 1.0 - abs(radius_outset);
+ } else {
+ varccoord_Stage0 = vec2(0.0);
+ }
+ gl_Position = vec4(devcoord.x, devcoord.y, 0.0, devcoord.z);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/130-5.shader_test b/shaders/skia/130-5.shader_test
new file mode 100644
index 0000000..78c98d5
--- /dev/null
+++ b/shaders/skia/130-5.shader_test
@@ -0,0 +1,92 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage2_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c1_c0;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+vec4 blend_src_out(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_dst_in(outputColor_Stage0, ClampedGradientEffect_Stage1_c0_c0(vec4(1.0)));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_src_out(ConstColorProcessor_Stage2_c1_c0(vec4(1.0)), output_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/130-6.shader_test b/shaders/skia/130-6.shader_test
new file mode 100644
index 0000000..55c6b24
--- /dev/null
+++ b/shaders/skia/130-6.shader_test
@@ -0,0 +1,138 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform float uSurfaceScale_Stage1;
+uniform vec3 uLightColor_Stage1;
+uniform float uKS_Stage1;
+uniform float uShininess_Stage1;
+uniform vec3 uLightDirection_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 light_Stage1(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ vec3 halfDir = normalize(surfaceToLight + vec3(0.0, 0.0, 1.0));
+ float colorScale = uKS_Stage1 * pow(dot(normal, halfDir), uShininess_Stage1);
+ vec3 color = lightColor * clamp(colorScale, 0.0, 1.0);
+ return vec4(color, max(max(color.x, color.y), color.z));
+}
+float sobel_Stage1(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage1(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage1(float m[9], float surfaceScale) {
+ return pointToNormal_Stage1(sobel_Stage1(m[0], m[1], m[3], m[4], m[6], m[7], 0.5), sobel_Stage1(m[0], m[6], m[1], m[7], 0.0, 0.0, 0.33333298563957214), surfaceScale);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ vec2 coord = vTransformedCoords_0_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp0 = textureColor;
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp1 = textureColor;
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp2 = textureColor;
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp3 = textureColor;
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp4 = textureColor;
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp5 = textureColor;
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp6 = textureColor;
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp7 = textureColor;
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp8 = textureColor;
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = uLightDirection_Stage1;
+ output_Stage1 = light_Stage1(normal_Stage1(m, uSurfaceScale_Stage1), surfaceToLight, uLightColor_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/130-7.shader_test b/shaders/skia/130-7.shader_test
new file mode 100644
index 0000000..8eaf539
--- /dev/null
+++ b/shaders/skia/130-7.shader_test
@@ -0,0 +1,98 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+uniform vec2 uDstTextureUpperLeft_Stage2;
+uniform vec2 uDstTextureCoordScale_Stage2;
+uniform sampler2D uTextureSampler_0_Stage0;
+uniform sampler2D uDstTextureSampler_Stage2;
+noperspective in vec2 vTextureCoords_Stage0;
+flat in int vTexIndex_Stage0;
+noperspective in vec4 vinColor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ t.x = fract(t.x);
+ }
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 blend_screen(vec4 src, vec4 dst) {
+ return src + (1.0 - src) * dst;
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ vec4 texColor;
+ {
+ texColor = texture(uTextureSampler_0_Stage0, vTextureCoords_Stage0);
+ }
+ outputCoverage_Stage0 = texColor;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TiledGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ if (all(lessThanEqual(outputCoverage_Stage0.xyz, vec3(0.0)))) {
+ discard;
+ }
+ vec2 _dstTexCoord = (gl_FragCoord.xy - uDstTextureUpperLeft_Stage2) * uDstTextureCoordScale_Stage2;
+ _dstTexCoord.y = 1.0 - _dstTexCoord.y;
+ vec4 _dstColor = texture(uDstTextureSampler_Stage2, _dstTexCoord);
+ sk_FragColor = blend_screen(output_Stage1, _dstColor);
+ float lerpRed = mix(_dstColor.w, sk_FragColor.w, outputCoverage_Stage0.x);
+ float lerpBlue = mix(_dstColor.w, sk_FragColor.w, outputCoverage_Stage0.y);
+ float lerpGreen = mix(_dstColor.w, sk_FragColor.w, outputCoverage_Stage0.z);
+ sk_FragColor = outputCoverage_Stage0 * sk_FragColor + (vec4(1.0) - outputCoverage_Stage0) * _dstColor;
+ sk_FragColor.w = max(max(lerpRed, lerpBlue), lerpGreen);
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform vec2 uAtlasSizeInv_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in uvec2 inTextureCoords;
+noperspective out vec2 vTextureCoords_Stage0;
+flat out int vTexIndex_Stage0;
+noperspective out vec4 vinColor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ ivec2 signedCoords = ivec2(int(inTextureCoords.x), int(inTextureCoords.y));
+ vec2 unormTexCoords = vec2(float(signedCoords.x / 2), float(signedCoords.y / 2));
+ vTextureCoords_Stage0 = unormTexCoords * uAtlasSizeInv_Stage0;
+ vTexIndex_Stage0 = 0;
+ vinColor_Stage0 = inColor;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(inPosition.x, inPosition.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/130.shader_test b/shaders/skia/130.shader_test
new file mode 100644
index 0000000..b3ed69e
--- /dev/null
+++ b/shaders/skia/130.shader_test
@@ -0,0 +1,152 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform float uSrcTF_Stage1_c0_c0[7];
+uniform mat3 uColorXform_Stage1_c0_c0;
+uniform float uDstTF_Stage1_c0_c0[7];
+uniform mat4 um_Stage2;
+uniform vec4 uv_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+uniform sampler2D uTextureSampler_2_Stage1;
+uniform sampler2D uTextureSampler_3_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+noperspective in vec2 vTransformedCoords_3_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_1_Stage1, vTransformedCoords_1_Stage0) * _input;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c0_c0_c0_c0_c2_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_2_Stage1, vTransformedCoords_2_Stage0) * _input;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c0_c0_c0_c0_c3_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_3_Stage1, vTransformedCoords_3_Stage0) * _input;
+ return _output;
+}
+vec4 YUVtoRGBEffect_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 planes[4];
+ planes[0] = TextureEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ planes[1] = TextureEffect_Stage1_c0_c0_c0_c0_c1_c0(vec4(1.0));
+ planes[2] = TextureEffect_Stage1_c0_c0_c0_c0_c2_c0(vec4(1.0));
+ planes[3] = TextureEffect_Stage1_c0_c0_c0_c0_c3_c0(vec4(1.0));
+ vec4 color = vec4(planes[0].x, planes[2].x, planes[1].x, planes[3].w);
+ color.xyz *= color.w;
+ _output = color;
+ return _output;
+}
+float src_tf_Stage1_c0_c0(float x) {
+ float G = uSrcTF_Stage1_c0_c0[0];
+ float A = uSrcTF_Stage1_c0_c0[1];
+ float B = uSrcTF_Stage1_c0_c0[2];
+ float C = uSrcTF_Stage1_c0_c0[3];
+ float D = uSrcTF_Stage1_c0_c0[4];
+ float E = uSrcTF_Stage1_c0_c0[5];
+ float F = uSrcTF_Stage1_c0_c0[6];
+ float s = sign(x);
+ x = abs(x);
+ x = x < D ? C * x + F : pow(A * x + B, G) + E;
+ return s * x;
+}
+float dst_tf_Stage1_c0_c0(float x) {
+ float G = uDstTF_Stage1_c0_c0[0];
+ float A = uDstTF_Stage1_c0_c0[1];
+ float B = uDstTF_Stage1_c0_c0[2];
+ float C = uDstTF_Stage1_c0_c0[3];
+ float D = uDstTF_Stage1_c0_c0[4];
+ float E = uDstTF_Stage1_c0_c0[5];
+ float F = uDstTF_Stage1_c0_c0[6];
+ float s = sign(x);
+ x = abs(x);
+ x = x < D ? C * x + F : pow(A * x + B, G) + E;
+ return s * x;
+}
+vec4 gamut_xform_Stage1_c0_c0(vec4 color) {
+ color.xyz = uColorXform_Stage1_c0_c0 * color.xyz;
+ return color;
+}
+vec4 color_xform_Stage1_c0_c0(vec4 color) {
+ float nonZeroAlpha = max(color.w, 9.9999997473787516e-05);
+ color = vec4(color.xyz / nonZeroAlpha, nonZeroAlpha);
+ color.x = src_tf_Stage1_c0_c0(color.x);
+ color.y = src_tf_Stage1_c0_c0(color.y);
+ color.z = src_tf_Stage1_c0_c0(color.z);
+ color = gamut_xform_Stage1_c0_c0(color);
+ color.x = dst_tf_Stage1_c0_c0(color.x);
+ color.y = dst_tf_Stage1_c0_c0(color.y);
+ color.z = dst_tf_Stage1_c0_c0(color.z);
+ color.xyz *= color.w;
+ return color;
+}
+vec4 ColorSpaceXform_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = color_xform_Stage1_c0_c0(YUVtoRGBEffect_Stage1_c0_c0_c0_c0(vec4(1.0))) * _input;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ColorSpaceXform_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ vec4 inputColor = output_Stage1;
+ {
+ float nonZeroAlpha = max(inputColor.w, 9.9999997473787516e-05);
+ inputColor = vec4(inputColor.xyz / nonZeroAlpha, inputColor.w);
+ }
+ output_Stage2 = um_Stage2 * inputColor + uv_Stage2;
+ {
+ output_Stage2 = clamp(output_Stage2, 0.0, 1.0);
+ }
+ {
+ output_Stage2.xyz *= output_Stage2.w;
+ }
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+uniform mat3 uCoordTransformMatrix_3_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+noperspective out vec2 vTransformedCoords_3_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_3_Stage0 = (uCoordTransformMatrix_3_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1300.shader_test b/shaders/skia/1300.shader_test
new file mode 100644
index 0000000..f550500
--- /dev/null
+++ b/shaders/skia/1300.shader_test
@@ -0,0 +1,38 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+uniform vec4 uColor_Stage0;
+noperspective in vec3 vDashParams_Stage0;
+noperspective in vec4 vRectParams_Stage0;
+void main() {
+ {
+ float xShifted = vDashParams_Stage0.x - floor(vDashParams_Stage0.x / vDashParams_Stage0.z) * vDashParams_Stage0.z;
+ vec2 fragPosShifted = vec2(xShifted, vDashParams_Stage0.y);
+ float xSub, ySub;
+ xSub = min(fragPosShifted.x - vRectParams_Stage0.x, 0.0);
+ xSub += min(vRectParams_Stage0.z - fragPosShifted.x, 0.0);
+ ySub = min(fragPosShifted.y - vRectParams_Stage0.y, 0.0);
+ ySub += min(vRectParams_Stage0.w - fragPosShifted.y, 0.0);
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 inPosition;
+in vec3 inDashParams;
+in vec4 inRect;
+noperspective out vec3 vDashParams_Stage0;
+noperspective out vec4 vRectParams_Stage0;
+void main() {
+ vDashParams_Stage0 = inDashParams;
+ vRectParams_Stage0 = inRect;
+ vec2 pos2 = inPosition;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1306.shader_test b/shaders/skia/1306.shader_test
new file mode 100644
index 0000000..341097c
--- /dev/null
+++ b/shaders/skia/1306.shader_test
@@ -0,0 +1,43 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+noperspective in vec4 vcolor_Stage0;
+noperspective in float vinCoverage_Stage0;
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ float alpha = 1.0;
+ alpha = vinCoverage_Stage0;
+ outputCoverage_Stage0 = vec4(alpha);
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = outputCoverage_Stage0;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 inPosition;
+in vec4 inColor;
+in float inCoverage;
+noperspective out vec4 vcolor_Stage0;
+noperspective out float vinCoverage_Stage0;
+void main() {
+ vec4 color = inColor;
+ vcolor_Stage0 = color;
+ vec2 pos2 = inPosition;
+ vinCoverage_Stage0 = inCoverage;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1309.shader_test b/shaders/skia/1309.shader_test
new file mode 100644
index 0000000..e3a6855
--- /dev/null
+++ b/shaders/skia/1309.shader_test
@@ -0,0 +1,149 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_KHR_blend_equation_advanced : require
+out vec4 sk_FragColor;
+layout (blend_support_all_equations) out ;
+uniform vec4 uColor_Stage0;
+uniform vec4 ucolor_Stage1_c0_c0_c0_c0;
+uniform vec4 uellipse_Stage1_c0_c0_c1_c0;
+uniform vec4 uinnerRect_Stage1_c1_c0_c0_c0_c1_c0;
+uniform vec2 uradiusPlusHalf_Stage1_c1_c0_c0_c0_c1_c0;
+uniform mat4 um_Stage1_c1_c0_c1_c0;
+uniform vec4 uv_Stage1_c1_c0_c1_c0;
+vec4 ConstColorProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage1_c0_c0_c0_c0;
+ }
+ return _output;
+}
+vec4 EllipseEffect_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 d = gl_FragCoord.xy - uellipse_Stage1_c0_c0_c1_c0.xy;
+ vec2 Z = d * uellipse_Stage1_c0_c0_c1_c0.zw;
+ float implicit = dot(Z, d) - 1.0;
+ float grad_dot = 4.0 * dot(Z, Z);
+ {
+ grad_dot = max(grad_dot, 1.1754999560161448e-38);
+ }
+ float approx_dist = implicit * inversesqrt(grad_dot);
+ float alpha;
+ {
+ alpha = approx_dist > 0.0 ? 1.0 : 0.0;
+ }
+ _output = _input * alpha;
+ return _output;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 ComposeTwo_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_src_over(ConstColorProcessor_Stage1_c0_c0_c0_c0(inputColor), EllipseEffect_Stage1_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 ConfigConversionEffect_Stage1_c1_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = floor(_input * 255.0 + 0.5) / 255.0;
+ {
+ _output.xyz = floor((_output.xyz * _output.w) * 255.0 + 0.5) / 255.0;
+ }
+ return _output;
+}
+vec4 CircularRRect_Stage1_c1_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 dxy0 = uinnerRect_Stage1_c1_c0_c0_c0_c1_c0.xy - gl_FragCoord.xy;
+ vec2 dxy1 = gl_FragCoord.xy - uinnerRect_Stage1_c1_c0_c0_c0_c1_c0.zw;
+ vec2 dxy = max(max(dxy0, dxy1), 0.0);
+ float alpha = clamp(uradiusPlusHalf_Stage1_c1_c0_c0_c0_c1_c0.x - length(dxy), 0.0, 1.0);
+ _output = _input * alpha;
+ return _output;
+}
+vec4 ComposeTwo_Stage1_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_src_over(ConfigConversionEffect_Stage1_c1_c0_c0_c0_c0_c0(inputColor), CircularRRect_Stage1_c1_c0_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 ColorMatrixFragmentProcessor_Stage1_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = _input;
+ {
+ float nonZeroAlpha = max(inputColor.w, 9.9999997473787516e-05);
+ inputColor = vec4(inputColor.xyz / nonZeroAlpha, inputColor.w);
+ }
+ _output = um_Stage1_c1_c0_c1_c0 * inputColor + uv_Stage1_c1_c0_c1_c0;
+ {
+ _output = clamp(_output, 0.0, 1.0);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_plus(vec4 src, vec4 dst) {
+ return min(src + dst, 1.0);
+}
+vec4 ComposeTwo_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_plus(ComposeTwo_Stage1_c1_c0_c0_c0(inputColor), ColorMatrixFragmentProcessor_Stage1_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+float _blend_color_luminance(vec3 color) {
+ return dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), color);
+}
+vec3 _blend_set_color_luminance(vec3 hueSatColor, float alpha, vec3 lumColor) {
+ float lum = _blend_color_luminance(lumColor);
+ vec3 result = (lum - _blend_color_luminance(hueSatColor)) + hueSatColor;
+ float minComp = min(min(result.x, result.y), result.z);
+ float maxComp = max(max(result.x, result.y), result.z);
+ if (minComp < 0.0 && lum != minComp) {
+ result = lum + ((result - lum) * lum) / (lum - minComp);
+ }
+ if (maxComp > alpha && maxComp != lum) {
+ return lum + ((result - lum) * (alpha - lum)) / (maxComp - lum);
+ }
+ return result;
+}
+vec4 blend_luminosity(vec4 src, vec4 dst) {
+ float alpha = dst.w * src.w;
+ vec3 sda = src.xyz * dst.w;
+ vec3 dsa = dst.xyz * src.w;
+ return vec4((((_blend_set_color_luminance(dsa, alpha, sda) + dst.xyz) - dsa) + src.xyz) - sda, (src.w + dst.w) - alpha);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = uColor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_luminosity(ComposeTwo_Stage1_c0_c0(inputColor), ComposeTwo_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 inPosition;
+void main() {
+ vec2 pos2 = inPosition;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1312.shader_test b/shaders/skia/1312.shader_test
new file mode 100644
index 0000000..9d32bd5
--- /dev/null
+++ b/shaders/skia/1312.shader_test
@@ -0,0 +1,101 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_KHR_blend_equation_advanced : require
+out vec4 sk_FragColor;
+layout (blend_support_all_equations) out ;
+uniform float ucornerRadius_Stage1;
+uniform vec4 uproxyRect_Stage1;
+uniform float ublurRadius_Stage1;
+uniform vec4 uboundsUniform_Stage2;
+uniform float uxInvZoom_Stage2;
+uniform float uyInvZoom_Stage2;
+uniform float uxInvInset_Stage2;
+uniform float uyInvInset_Stage2;
+uniform vec2 uoffset_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec4 vQuadEdge_Stage0;
+noperspective in vec4 vinColor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vinColor_Stage0;
+ float edgeAlpha;
+ vec2 duvdx = dFdx(vQuadEdge_Stage0.xy);
+ vec2 duvdy = dFdy(vQuadEdge_Stage0.xy);
+ if (vQuadEdge_Stage0.z > 0.0 && vQuadEdge_Stage0.w > 0.0) {
+ edgeAlpha = min(min(vQuadEdge_Stage0.z, vQuadEdge_Stage0.w) + 0.5, 1.0);
+ } else {
+ vec2 gF = vec2((2.0 * vQuadEdge_Stage0.x) * duvdx.x - duvdx.y, (2.0 * vQuadEdge_Stage0.x) * duvdy.x - duvdy.y);
+ edgeAlpha = vQuadEdge_Stage0.x * vQuadEdge_Stage0.x - vQuadEdge_Stage0.y;
+ edgeAlpha = clamp(0.5 - edgeAlpha / length(gF), 0.0, 1.0);
+ }
+ }
+ vec4 output_Stage1;
+ {
+ vec2 translatedFragPos = gl_FragCoord.xy - uproxyRect_Stage1.xy;
+ float threshold = ucornerRadius_Stage1 + 2.0 * ublurRadius_Stage1;
+ vec2 middle = (uproxyRect_Stage1.zw - uproxyRect_Stage1.xy) - 2.0 * threshold;
+ if (translatedFragPos.x >= threshold && translatedFragPos.x < middle.x + threshold) {
+ translatedFragPos.x = threshold;
+ } else if (translatedFragPos.x >= middle.x + threshold) {
+ translatedFragPos.x -= middle.x - 1.0;
+ }
+ if (translatedFragPos.y > threshold && translatedFragPos.y < middle.y + threshold) {
+ translatedFragPos.y = threshold;
+ } else if (translatedFragPos.y >= middle.y + threshold) {
+ translatedFragPos.y -= middle.y - 1.0;
+ }
+ vec2 proxyDims = vec2(2.0 * threshold + 1.0);
+ vec2 texCoord = translatedFragPos / proxyDims;
+ output_Stage1 = outputColor_Stage0 * texture(uTextureSampler_0_Stage1, texCoord);
+ }
+ vec4 output_Stage2;
+ {
+ vec2 coord = vTransformedCoords_0_Stage0;
+ vec2 zoom_coord = uoffset_Stage2 + coord * vec2(uxInvZoom_Stage2, uyInvZoom_Stage2);
+ vec2 delta = (coord - uboundsUniform_Stage2.xy) * uboundsUniform_Stage2.zw;
+ delta = min(delta, vec2(1.0, 1.0) - delta);
+ delta *= vec2(uxInvInset_Stage2, uyInvInset_Stage2);
+ float weight = 0.0;
+ if (delta.x < 2.0 && delta.y < 2.0) {
+ delta = vec2(2.0, 2.0) - delta;
+ float dist = length(delta);
+ dist = max(2.0 - dist, 0.0);
+ weight = min(dist * dist, 1.0);
+ } else {
+ vec2 delta_squared = delta * delta;
+ weight = min(min(delta_squared.x, delta_squared.y), 1.0);
+ }
+ output_Stage2 = texture(uTextureSampler_0_Stage2, mix(coord, zoom_coord, weight));
+ }
+ {
+ sk_FragColor = output_Stage2 * output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec4 inQuadEdge;
+noperspective out vec4 vQuadEdge_Stage0;
+noperspective out vec4 vinColor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vQuadEdge_Stage0 = inQuadEdge;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1315.shader_test b/shaders/skia/1315.shader_test
new file mode 100644
index 0000000..cf61a90
--- /dev/null
+++ b/shaders/skia/1315.shader_test
@@ -0,0 +1,126 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+uniform vec4 uColor_Stage0;
+uniform vec4 ucircle_Stage2;
+uniform vec3 uedges_Stage3[1];
+uniform vec4 uleftBorderColor_Stage4_c0_c0;
+uniform vec4 urightBorderColor_Stage4_c0_c0;
+uniform vec4 uscale0_1_Stage4_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage4_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage4_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage4_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage4_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage4_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage4_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage4_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage4_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage4_c0_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+in vec2 vTransformedCoords_0_Stage0;
+in vec2 vTransformedCoords_1_Stage0;
+vec4 LinearGradientLayout_Stage4_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_1_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage4_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage4_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage4_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage4_c0_c0_c1_c0;
+ bias = ubias0_1_Stage4_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage4_c0_c0_c1_c0;
+ bias = ubias2_3_Stage4_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage4_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage4_c0_c0_c1_c0;
+ bias = ubias4_5_Stage4_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage4_c0_c0_c1_c0;
+ bias = ubias6_7_Stage4_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage4_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage4_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage4_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage4_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage4_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ float d;
+ {
+ d = (1.0 - length((ucircle_Stage2.xy - gl_FragCoord.xy) * ucircle_Stage2.w)) * ucircle_Stage2.z;
+ }
+ {
+ output_Stage2 = output_Stage1 * clamp(d, 0.0, 1.0);
+ }
+ }
+ vec4 output_Stage3;
+ {
+ float alpha = 1.0;
+ float edge;
+ edge = dot(uedges_Stage3[0], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ alpha = 1.0 - alpha;
+ output_Stage3 = output_Stage2 * alpha;
+ }
+ {
+ blend_dst_in(output_Stage3, ClampedGradientEffect_Stage4_c0_c0(vec4(1.0)));
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 inPosition;
+in vec2 inLocalCoord;
+out vec2 vTransformedCoords_0_Stage0;
+out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vec3 pos3 = uViewM_Stage0 * vec3(inPosition, 1.0);
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos3.x, pos3.y, 0.0, pos3.z);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1318.shader_test b/shaders/skia/1318.shader_test
new file mode 100644
index 0000000..9a7e69d
--- /dev/null
+++ b/shaders/skia/1318.shader_test
@@ -0,0 +1,183 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_KHR_blend_equation_advanced : require
+out vec4 sk_FragColor;
+layout (blend_support_all_equations) out ;
+uniform vec4 ucircle_Stage1_c0_c0_c0_c0_c0_c0;
+uniform vec4 uboundsUniform_Stage1_c0_c0_c0_c0_c1_c0;
+uniform float uxInvZoom_Stage1_c0_c0_c0_c0_c1_c0;
+uniform float uyInvZoom_Stage1_c0_c0_c0_c0_c1_c0;
+uniform float uxInvInset_Stage1_c0_c0_c0_c0_c1_c0;
+uniform float uyInvInset_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec2 uoffset_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 uinnerRect_Stage1_c0_c0_c1_c0_c0_c0;
+uniform vec4 uinvRadiiLTRB_Stage1_c0_c0_c1_c0_c0_c0;
+uniform vec4 ucircle_Stage1_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec4 vinCircleEdge_Stage0;
+noperspective in vec3 vinClipPlane_Stage0;
+noperspective in vec3 vinUnionPlane_Stage0;
+noperspective in vec4 vinColor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 CircleEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float d;
+ {
+ d = (1.0 - length((ucircle_Stage1_c0_c0_c0_c0_c0_c0.xy - gl_FragCoord.xy) * ucircle_Stage1_c0_c0_c0_c0_c0_c0.w)) * ucircle_Stage1_c0_c0_c0_c0_c0_c0.z;
+ }
+ {
+ _output = _input * clamp(d, 0.0, 1.0);
+ }
+ return _output;
+}
+vec4 MagnifierEffect_Stage1_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coord = vTransformedCoords_0_Stage0;
+ vec2 zoom_coord = uoffset_Stage1_c0_c0_c0_c0_c1_c0 + coord * vec2(uxInvZoom_Stage1_c0_c0_c0_c0_c1_c0, uyInvZoom_Stage1_c0_c0_c0_c0_c1_c0);
+ vec2 delta = (coord - uboundsUniform_Stage1_c0_c0_c0_c0_c1_c0.xy) * uboundsUniform_Stage1_c0_c0_c0_c0_c1_c0.zw;
+ delta = min(delta, vec2(1.0, 1.0) - delta);
+ delta *= vec2(uxInvInset_Stage1_c0_c0_c0_c0_c1_c0, uyInvInset_Stage1_c0_c0_c0_c0_c1_c0);
+ float weight = 0.0;
+ if (delta.x < 2.0 && delta.y < 2.0) {
+ delta = vec2(2.0, 2.0) - delta;
+ float dist = length(delta);
+ dist = max(2.0 - dist, 0.0);
+ weight = min(dist * dist, 1.0);
+ } else {
+ vec2 delta_squared = delta * delta;
+ weight = min(min(delta_squared.x, delta_squared.y), 1.0);
+ }
+ _output = texture(uTextureSampler_0_Stage1, mix(coord, zoom_coord, weight));
+ return _output;
+}
+float _blend_overlay_component(float sc, float sa, float dc, float da) {
+ if (2.0 * dc <= da) {
+ return (2.0 * sc) * dc;
+ }
+ return sa * da - (2.0 * (da - dc)) * (sa - sc);
+}
+vec4 blend_overlay(vec4 src, vec4 dst) {
+ vec4 result = vec4(_blend_overlay_component(src.x, src.w, dst.x, dst.w), _blend_overlay_component(src.y, src.w, dst.y, dst.w), _blend_overlay_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+ result.xyz += dst.xyz * (1.0 - src.w) + src.xyz * (1.0 - dst.w);
+ return result;
+}
+vec4 ComposeTwo_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_overlay(CircleEffect_Stage1_c0_c0_c0_c0_c0_c0(inputColor), MagnifierEffect_Stage1_c0_c0_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 EllipticalRRect_Stage1_c0_c0_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 dxy0 = uinnerRect_Stage1_c0_c0_c1_c0_c0_c0.xy - gl_FragCoord.xy;
+ vec2 dxy1 = gl_FragCoord.xy - uinnerRect_Stage1_c0_c0_c1_c0_c0_c0.zw;
+ vec2 dxy = max(max(dxy0, dxy1), 0.0);
+ vec2 Z = max(max(dxy0 * uinvRadiiLTRB_Stage1_c0_c0_c1_c0_c0_c0.xy, dxy1 * uinvRadiiLTRB_Stage1_c0_c0_c1_c0_c0_c0.zw), 0.0);
+ float implicit = dot(Z, dxy) - 1.0;
+ float grad_dot = 4.0 * dot(Z, Z);
+ grad_dot = max(grad_dot, 9.9999997473787516e-05);
+ float approx_dist = implicit * inversesqrt(grad_dot);
+ float alpha = clamp(0.5 - approx_dist, 0.0, 1.0);
+ _output = _input * alpha;
+ return _output;
+}
+vec4 Big_Ole_Key_Stage1_c0_c0_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = _input;
+ return _output;
+}
+vec4 blend_src_atop(vec4 src, vec4 dst) {
+ return dst.w * src + (1.0 - src.w) * dst;
+}
+vec4 ComposeTwo_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_src_atop(EllipticalRRect_Stage1_c0_c0_c1_c0_c0_c0(inputColor), Big_Ole_Key_Stage1_c0_c0_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 blend_multiply(vec4 src, vec4 dst) {
+ return vec4(((1.0 - src.w) * dst.xyz + (1.0 - dst.w) * src.xyz) + src.xyz * dst.xyz, src.w + (1.0 - src.w) * dst.w);
+}
+vec4 ComposeTwo_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_multiply(ComposeTwo_Stage1_c0_c0_c0_c0(inputColor), ComposeTwo_Stage1_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 CircleEffect_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ float d;
+ {
+ d = (length((ucircle_Stage1_c1_c0.xy - gl_FragCoord.xy) * ucircle_Stage1_c1_c0.w) - 1.0) * ucircle_Stage1_c1_c0.z;
+ }
+ {
+ _output = _input * clamp(d, 0.0, 1.0);
+ }
+ return _output;
+}
+vec4 blend_screen(vec4 src, vec4 dst) {
+ return src + (1.0 - src) * dst;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ vec4 circleEdge;
+ circleEdge = vinCircleEdge_Stage0;
+ vec3 clipPlane;
+ clipPlane = vinClipPlane_Stage0;
+ vec3 unionPlane;
+ unionPlane = vinUnionPlane_Stage0;
+ outputColor_Stage0 = vinColor_Stage0;
+ float d = length(circleEdge.xy);
+ float distanceToOuterEdge = circleEdge.z * (1.0 - d);
+ float edgeAlpha = clamp(distanceToOuterEdge, 0.0, 1.0);
+ float clip = clamp(circleEdge.z * dot(circleEdge.xy, clipPlane.xy) + clipPlane.z, 0.0, 1.0);
+ clip = clamp(clip + clamp(circleEdge.z * dot(circleEdge.xy, unionPlane.xy) + unionPlane.z, 0.0, 1.0), 0.0, 1.0);
+ edgeAlpha *= clip;
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_screen(ComposeTwo_Stage1_c0_c0(inputColor), CircleEffect_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ sk_FragColor = outputCoverage_Stage0 * output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec4 inCircleEdge;
+in vec3 inClipPlane;
+in vec3 inUnionPlane;
+noperspective out vec4 vinCircleEdge_Stage0;
+noperspective out vec3 vinClipPlane_Stage0;
+noperspective out vec3 vinUnionPlane_Stage0;
+noperspective out vec4 vinColor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vinCircleEdge_Stage0 = inCircleEdge;
+ vinClipPlane_Stage0 = inClipPlane;
+ vinUnionPlane_Stage0 = inUnionPlane;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1327.shader_test b/shaders/skia/1327.shader_test
new file mode 100644
index 0000000..8e02a85
--- /dev/null
+++ b/shaders/skia/1327.shader_test
@@ -0,0 +1,361 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_KHR_blend_equation_advanced : require
+out vec4 sk_FragColor;
+layout (blend_support_all_equations) out ;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+uniform vec2 uImageIncrement_Stage2;
+uniform float uSurfaceScale_Stage2;
+uniform vec3 uLightColor_Stage2;
+uniform float uKS_Stage2;
+uniform float uShininess_Stage2;
+uniform vec4 uTexDom_Stage2;
+uniform vec3 uDecalParams_Stage2;
+uniform vec3 uLightLocation_Stage2;
+uniform vec4 urectH_Stage4_c1_c0;
+uniform float uinvSixSigma_Stage4_c1_c0;
+uniform vec2 uScale_Stage4_c2_c0;
+uniform vec4 uTexDom_Stage4_c2_c0;
+uniform vec3 uDecalParams_Stage4_c2_c0;
+uniform vec4 ucircle_Stage5;
+uniform sampler2D uTextureSampler_0_Stage2;
+uniform sampler2D uTextureSampler_0_Stage4;
+uniform sampler2D uTextureSampler_1_Stage4;
+uniform sampler2D uTextureSampler_2_Stage4;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+noperspective in vec2 vTransformedCoords_3_Stage0;
+noperspective in float vinCoverage_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 light_Stage2(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ vec3 halfDir = normalize(surfaceToLight + vec3(0.0, 0.0, 1.0));
+ float colorScale = uKS_Stage2 * pow(dot(normal, halfDir), uShininess_Stage2);
+ vec3 color = lightColor * clamp(colorScale, 0.0, 1.0);
+ return vec4(color, max(max(color.x, color.y), color.z));
+}
+float sobel_Stage2(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage2(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage2(float m[9], float surfaceScale) {
+ return pointToNormal_Stage2(sobel_Stage2(m[0], m[1], m[3], m[4], 0.0, 0.0, 0.66666698455810547), sobel_Stage2(m[0], m[3], m[1], m[4], 0.0, 0.0, 0.66666698455810547), surfaceScale);
+}
+vec4 RectBlurEffect_Stage4_c1_c0(vec4 _input) {
+ vec4 _output;
+ float xCoverage, yCoverage;
+ {
+ float x, y;
+ {
+ x = max(urectH_Stage4_c1_c0.x - gl_FragCoord.x, gl_FragCoord.x - urectH_Stage4_c1_c0.z);
+ y = max(urectH_Stage4_c1_c0.y - gl_FragCoord.y, gl_FragCoord.y - urectH_Stage4_c1_c0.w);
+ }
+ xCoverage = texture(uTextureSampler_0_Stage4, vec2(x * uinvSixSigma_Stage4_c1_c0, 0.5)).w;
+ yCoverage = texture(uTextureSampler_0_Stage4, vec2(y * uinvSixSigma_Stage4_c1_c0, 0.5)).w;
+ _output = (_input * xCoverage) * yCoverage;
+ }
+ _output = (_input * xCoverage) * yCoverage;
+ return _output;
+}
+vec4 DisplacementMap_Stage4_c2_c0(vec4 _input) {
+ vec4 _output;
+ vec4 dColor = texture(uTextureSampler_1_Stage4, vTransformedCoords_2_Stage0);
+ dColor.xyz = dColor.w < 9.9999999747524271e-07 ? vec3(0.0) : clamp(dColor.xyz / dColor.w, 0.0, 1.0);
+ vec2 cCoords = vTransformedCoords_3_Stage0 + uScale_Stage4_c2_c0 * (dColor.yz - vec2(0.5));
+ {
+ vec2 origCoord = cCoords;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage4_c2_c0.xy, uTexDom_Stage4_c2_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_2_Stage4, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage4_c2_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage4_c2_c0.y);
+ if (err > uDecalParams_Stage4_c2_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage4_c2_c0.z < 1.0) {
+ err = 0.0;
+ }
+ _output = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+vec4 blend_src_atop(vec4 src, vec4 dst) {
+ return dst.w * src + (1.0 - src.w) * dst;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ float alpha = 1.0;
+ alpha = vinCoverage_Stage0;
+ outputCoverage_Stage0 = vec4(alpha);
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_dst_in(outputColor_Stage0, ClampedGradientEffect_Stage1_c0_c0(vec4(1.0)));
+ }
+ vec4 output_Stage2;
+ {
+ vec2 coord = vTransformedCoords_1_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp0 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp5 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp6 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp7 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp8 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = normalize(uLightLocation_Stage2 - vec3(gl_FragCoord.xy, uSurfaceScale_Stage2 * m[4]));
+ output_Stage2 = light_Stage2(normal_Stage2(m, uSurfaceScale_Stage2), surfaceToLight, uLightColor_Stage2);
+ output_Stage2 *= output_Stage1;
+ }
+ vec4 output_Stage3;
+ {
+ output_Stage3 = floor(output_Stage2 * 255.0 + 0.5) / 255.0;
+ {
+ output_Stage3.xyz = floor((output_Stage3.xyz * output_Stage3.w) * 255.0 + 0.5) / 255.0;
+ }
+ }
+ vec4 output_Stage4;
+ {
+ vec4 inputColor = vec4(output_Stage3.xyz, 1.0);
+ output_Stage4 = blend_src_atop(RectBlurEffect_Stage4_c1_c0(inputColor), DisplacementMap_Stage4_c2_c0(inputColor));
+ output_Stage4 *= output_Stage3.w;
+ }
+ vec4 output_Stage5;
+ {
+ float d;
+ {
+ d = (length((ucircle_Stage5.xy - gl_FragCoord.xy) * ucircle_Stage5.w) - 1.0) * ucircle_Stage5.z;
+ }
+ {
+ output_Stage5 = output_Stage4 * clamp(d, 0.0, 1.0);
+ }
+ }
+ {
+ sk_FragColor = outputCoverage_Stage0 * output_Stage5;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+uniform mat3 uCoordTransformMatrix_3_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in float inCoverage;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+noperspective out vec2 vTransformedCoords_3_Stage0;
+noperspective out float vinCoverage_Stage0;
+void main() {
+ vec4 color = inColor;
+ vcolor_Stage0 = color;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_3_Stage0 = (uCoordTransformMatrix_3_Stage0 * vec3(inPosition, 1.0)).xy;
+ vinCoverage_Stage0 = inCoverage;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/133-13.shader_test b/shaders/skia/133-13.shader_test
new file mode 100644
index 0000000..80bf44b
--- /dev/null
+++ b/shaders/skia/133-13.shader_test
@@ -0,0 +1,125 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_KHR_blend_equation_advanced : require
+out vec4 sk_FragColor;
+layout (blend_support_all_equations) out ;
+uniform vec4 uColor_Stage0;
+uniform vec4 urectH_Stage1_c1_c0_c0_c0_c0_c0;
+uniform float uinvSixSigma_Stage1_c1_c0_c0_c0_c0_c0;
+uniform vec4 uellipse_Stage1_c1_c0_c0_c0_c1_c0;
+uniform vec3 uedges_Stage1_c1_c0_c1_c0[2];
+uniform sampler2D uTextureSampler_0_Stage1;
+vec4 ConfigConversionEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = floor(_input * 255.0 + 0.5) / 255.0;
+ {
+ _output.xyz = floor((_output.xyz * _output.w) * 255.0 + 0.5) / 255.0;
+ }
+ return _output;
+}
+vec4 RectBlurEffect_Stage1_c1_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float xCoverage, yCoverage;
+ {
+ float x, y;
+ {
+ x = max(urectH_Stage1_c1_c0_c0_c0_c0_c0.x - gl_FragCoord.x, gl_FragCoord.x - urectH_Stage1_c1_c0_c0_c0_c0_c0.z);
+ y = max(urectH_Stage1_c1_c0_c0_c0_c0_c0.y - gl_FragCoord.y, gl_FragCoord.y - urectH_Stage1_c1_c0_c0_c0_c0_c0.w);
+ }
+ xCoverage = texture(uTextureSampler_0_Stage1, vec2(x * uinvSixSigma_Stage1_c1_c0_c0_c0_c0_c0, 0.5)).w;
+ yCoverage = texture(uTextureSampler_0_Stage1, vec2(y * uinvSixSigma_Stage1_c1_c0_c0_c0_c0_c0, 0.5)).w;
+ _output = (_input * xCoverage) * yCoverage;
+ }
+ _output = (_input * xCoverage) * yCoverage;
+ return _output;
+}
+vec4 EllipseEffect_Stage1_c1_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 d = gl_FragCoord.xy - uellipse_Stage1_c1_c0_c0_c0_c1_c0.xy;
+ vec2 Z = d * uellipse_Stage1_c1_c0_c0_c0_c1_c0.zw;
+ float implicit = dot(Z, d) - 1.0;
+ float grad_dot = 4.0 * dot(Z, Z);
+ {
+ grad_dot = max(grad_dot, 1.1754999560161448e-38);
+ }
+ float approx_dist = implicit * inversesqrt(grad_dot);
+ float alpha;
+ {
+ alpha = clamp(0.5 + approx_dist, 0.0, 1.0);
+ }
+ _output = _input * alpha;
+ return _output;
+}
+vec4 blend_dst_over(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src + dst;
+}
+vec4 ComposeTwo_Stage1_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_dst_over(RectBlurEffect_Stage1_c1_c0_c0_c0_c0_c0(inputColor), EllipseEffect_Stage1_c1_c0_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 ConvexPoly_Stage1_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float alpha = 1.0;
+ float edge;
+ edge = dot(uedges_Stage1_c1_c0_c1_c0[0], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage1_c1_c0_c1_c0[1], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ alpha = 1.0 - alpha;
+ _output = _input * alpha;
+ return _output;
+}
+vec4 blend_multiply(vec4 src, vec4 dst) {
+ return vec4(((1.0 - src.w) * dst.xyz + (1.0 - dst.w) * src.xyz) + src.xyz * dst.xyz, src.w + (1.0 - src.w) * dst.w);
+}
+vec4 ComposeTwo_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_multiply(ComposeTwo_Stage1_c1_c0_c0_c0(inputColor), ConvexPoly_Stage1_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 blend_screen(vec4 src, vec4 dst) {
+ return src + (1.0 - src) * dst;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = uColor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_screen(ConfigConversionEffect_Stage1_c0_c0(inputColor), ComposeTwo_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 inPosition;
+void main() {
+ vec2 pos2 = (uViewM_Stage0 * vec3(inPosition, 1.0)).xy;
+ {
+ vec2 _posTmp = pos2;
+ _posTmp = floor(_posTmp) + vec2(0.5, 0.5);
+ gl_Position = vec4(_posTmp, 0.0, 1.0);
+ }
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/133-14.shader_test b/shaders/skia/133-14.shader_test
new file mode 100644
index 0000000..ad7e3ca
--- /dev/null
+++ b/shaders/skia/133-14.shader_test
@@ -0,0 +1,74 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 urectH_Stage2_c0_c0;
+uniform float uinvSixSigma_Stage2_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 RectBlurEffect_Stage2_c0_c0(vec4 _input, vec2 _coords) {
+ vec4 _output;
+ float xCoverage, yCoverage;
+ {
+ float x, y;
+ {
+ x = max(urectH_Stage2_c0_c0.x - gl_FragCoord.x, gl_FragCoord.x - urectH_Stage2_c0_c0.z);
+ y = max(urectH_Stage2_c0_c0.y - gl_FragCoord.y, gl_FragCoord.y - urectH_Stage2_c0_c0.w);
+ }
+ xCoverage = texture(uTextureSampler_0_Stage2, vec2(x * uinvSixSigma_Stage2_c0_c0, 0.5)).w;
+ yCoverage = texture(uTextureSampler_0_Stage2, vec2(y * uinvSixSigma_Stage2_c0_c0, 0.5)).w;
+ _output = (_input * xCoverage) * yCoverage;
+ }
+ _output = (_input * xCoverage) * yCoverage;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ float coord = vTransformedCoords_1_Stage0.x - 0.5;
+ float f = fract(coord);
+ coord += 0.5 - f;
+ float f2 = f * f;
+ vec4 w = mat4(0.055555555555555552, 0.88888888888888884, 0.055555555555555552, 0.0, -0.5, 0.0, 0.5, 0.0, 0.83333333333333337, -2.0, 1.5, -0.33333333333333331, -0.3888888888888889, 1.1666666666666667, -1.1666666666666667, 0.3888888888888889) * vec4(1.0, f, f2, f2 * f);
+ vec4 c[4];
+ c[0] = RectBlurEffect_Stage2_c0_c0(vec4(1.0), vec2(coord + -1.0, vTransformedCoords_1_Stage0.y));
+ c[1] = RectBlurEffect_Stage2_c0_c0(vec4(1.0), vec2(coord, vTransformedCoords_1_Stage0.y));
+ c[2] = RectBlurEffect_Stage2_c0_c0(vec4(1.0), vec2(coord + 1.0, vTransformedCoords_1_Stage0.y));
+ c[3] = RectBlurEffect_Stage2_c0_c0(vec4(1.0), vec2(coord + 2.0, vTransformedCoords_1_Stage0.y));
+ vec4 bicubicColor = ((c[0] * w.x + c[1] * w.y) + c[2] * w.z) + c[3] * w.w;
+ bicubicColor = clamp(bicubicColor, 0.0, 1.0);
+ output_Stage2 = bicubicColor * output_Stage1;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/133-15.shader_test b/shaders/skia/133-15.shader_test
new file mode 100644
index 0000000..87a0181
--- /dev/null
+++ b/shaders/skia/133-15.shader_test
@@ -0,0 +1,83 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage2;
+uniform vec2 uBounds_Stage2;
+uniform vec4 uKernel_Stage2[2];
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_1_Stage0 - 3.0 * uImageIncrement_Stage2;
+ vec2 coordSampled = vec2(0.0, 0.0);
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage2.x && coord.y <= uBounds_Stage2.y) {
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[0].x;
+ }
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage2.x && coord.y <= uBounds_Stage2.y) {
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[0].y;
+ }
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage2.x && coord.y <= uBounds_Stage2.y) {
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[0].z;
+ }
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage2.x && coord.y <= uBounds_Stage2.y) {
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[0].w;
+ }
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage2.x && coord.y <= uBounds_Stage2.y) {
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[1].x;
+ }
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage2.x && coord.y <= uBounds_Stage2.y) {
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[1].y;
+ }
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage2.x && coord.y <= uBounds_Stage2.y) {
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[1].z;
+ }
+ coord += uImageIncrement_Stage2;
+ output_Stage2 *= output_Stage1;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/133-16.shader_test b/shaders/skia/133-16.shader_test
new file mode 100644
index 0000000..c33c0b1
--- /dev/null
+++ b/shaders/skia/133-16.shader_test
@@ -0,0 +1,91 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 ubaseFrequency_Stage1_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+float perlinnoise_Stage1_c0_c0(float chanCoord, vec2 noiseVec) {
+ vec4 floorVal;
+ floorVal.xy = floor(noiseVec);
+ floorVal.zw = floorVal.xy + vec2(1.0);
+ vec2 fractVal = fract(noiseVec);
+ vec2 noiseSmooth = (fractVal * fractVal) * (vec2(3.0) - vec2(2.0) * fractVal);
+ floorVal = fract(floor(mod(floorVal, 256.0)) / vec4(256.0));
+ vec2 latticeIdx;
+ latticeIdx.x = texture(uTextureSampler_0_Stage1, vec2(floorVal.x, 0.5)).x;
+ latticeIdx.y = texture(uTextureSampler_0_Stage1, vec2(floorVal.z, 0.5)).x;
+ vec4 bcoords = fract(latticeIdx.xyxy + floorVal.yyww);
+ vec2 uv;
+ vec4 lattice = texture(uTextureSampler_1_Stage1, vec2(bcoords.x, chanCoord)).zyxw;
+ uv.x = dot((lattice.yw + lattice.xz * vec2(0.00390625)) * vec2(2.0) - vec2(1.0), fractVal);
+ fractVal.x -= 1.0;
+ lattice = texture(uTextureSampler_1_Stage1, vec2(bcoords.y, chanCoord)).zyxw;
+ uv.y = dot((lattice.yw + lattice.xz * vec2(0.00390625)) * vec2(2.0) - vec2(1.0), fractVal);
+ vec2 ab;
+ ab.x = mix(uv.x, uv.y, noiseSmooth.x);
+ fractVal.y -= 1.0;
+ lattice = texture(uTextureSampler_1_Stage1, vec2(bcoords.w, chanCoord)).zyxw;
+ uv.y = dot((lattice.yw + lattice.xz * vec2(0.00390625)) * vec2(2.0) - vec2(1.0), fractVal);
+ fractVal.x += 1.0;
+ lattice = texture(uTextureSampler_1_Stage1, vec2(bcoords.z, chanCoord)).zyxw;
+ uv.x = dot((lattice.yw + lattice.xz * vec2(0.00390625)) * vec2(2.0) - vec2(1.0), fractVal);
+ ab.y = mix(uv.x, uv.y, noiseSmooth.x);
+ return mix(ab.x, ab.y, noiseSmooth.y);
+}
+vec4 PerlinNoise_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 noiseVec = floor(vTransformedCoords_0_Stage0) * ubaseFrequency_Stage1_c0_c0;
+ _output = vec4(0.0);
+ float ratio = 1.0;
+ for (int octave = 0;octave < 1; ++octave) {
+ _output += abs(vec4(perlinnoise_Stage1_c0_c0(0.125, noiseVec), perlinnoise_Stage1_c0_c0(0.375, noiseVec), perlinnoise_Stage1_c0_c0(0.625, noiseVec), perlinnoise_Stage1_c0_c0(0.875, noiseVec))) * ratio;
+ noiseVec *= vec2(2.0);
+ ratio *= 0.5;
+ }
+ _output = clamp(_output, 0.0, 1.0);
+ _output = vec4(_output.xyz * _output.www, _output.w);
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_dst_in(outputColor_Stage0, PerlinNoise_Stage1_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/133-2.shader_test b/shaders/skia/133-2.shader_test
new file mode 100644
index 0000000..a407664
--- /dev/null
+++ b/shaders/skia/133-2.shader_test
@@ -0,0 +1,81 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 ucolor_Stage1_c0_c0_c0_c0;
+uniform vec4 ucolor_Stage2_c1_c0;
+noperspective in vec4 vcolor_Stage0;
+vec4 ConstColorProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = _input.w * ucolor_Stage1_c0_c0_c0_c0;
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = ConstColorProcessor_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c1_c0;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 blend_darken(vec4 src, vec4 dst) {
+ vec4 result = blend_src_over(src, dst);
+ result.xyz = min(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
+ return result;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_src_in(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_darken(ConstColorProcessor_Stage2_c1_c0(vec4(1.0)), output_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 position;
+in vec4 inColor;
+noperspective out vec4 vcolor_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/133-4.shader_test b/shaders/skia/133-4.shader_test
new file mode 100644
index 0000000..b97f8cd
--- /dev/null
+++ b/shaders/skia/133-4.shader_test
@@ -0,0 +1,51 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uColor_Stage0;
+uniform vec3 uedges_Stage1[4];
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = uColor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ float alpha = 1.0;
+ float edge;
+ edge = dot(uedges_Stage1[0], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage1[1], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage1[2], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage1[3], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ output_Stage1 = vec4(alpha);
+ }
+ {
+ sk_FragColor = outputColor_Stage0 * output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 inPosition;
+void main() {
+ vec3 pos3 = uViewM_Stage0 * vec3(inPosition, 1.0);
+ gl_Position = vec4(pos3.x, pos3.y, 0.0, pos3.z);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/133-5.shader_test b/shaders/skia/133-5.shader_test
new file mode 100644
index 0000000..d4a31cc
--- /dev/null
+++ b/shaders/skia/133-5.shader_test
@@ -0,0 +1,75 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage2_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c1_c0;
+ }
+ return _output;
+}
+vec4 blend_dst_out(vec4 src, vec4 dst) {
+ return (1.0 - src.w) * dst;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_dst_out(ConstColorProcessor_Stage2_c1_c0(vec4(1.0)), output_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/133-6.shader_test b/shaders/skia/133-6.shader_test
new file mode 100644
index 0000000..8d02e9e
--- /dev/null
+++ b/shaders/skia/133-6.shader_test
@@ -0,0 +1,138 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform float uSurfaceScale_Stage1;
+uniform vec3 uLightColor_Stage1;
+uniform float uKS_Stage1;
+uniform float uShininess_Stage1;
+uniform vec3 uLightDirection_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 light_Stage1(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ vec3 halfDir = normalize(surfaceToLight + vec3(0.0, 0.0, 1.0));
+ float colorScale = uKS_Stage1 * pow(dot(normal, halfDir), uShininess_Stage1);
+ vec3 color = lightColor * clamp(colorScale, 0.0, 1.0);
+ return vec4(color, max(max(color.x, color.y), color.z));
+}
+float sobel_Stage1(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage1(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage1(float m[9], float surfaceScale) {
+ return pointToNormal_Stage1(sobel_Stage1(m[1], m[2], m[4], m[5], 0.0, 0.0, 0.66666698455810547), sobel_Stage1(0.0, 0.0, m[1], m[4], m[2], m[5], 0.66666698455810547), surfaceScale);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ vec2 coord = vTransformedCoords_0_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp0 = textureColor;
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp1 = textureColor;
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp2 = textureColor;
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp3 = textureColor;
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp4 = textureColor;
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp5 = textureColor;
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp6 = textureColor;
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp7 = textureColor;
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp8 = textureColor;
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = uLightDirection_Stage1;
+ output_Stage1 = light_Stage1(normal_Stage1(m, uSurfaceScale_Stage1), surfaceToLight, uLightColor_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/133-7.shader_test b/shaders/skia/133-7.shader_test
new file mode 100644
index 0000000..1b96168
--- /dev/null
+++ b/shaders/skia/133-7.shader_test
@@ -0,0 +1,106 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+uniform vec2 uDstTextureUpperLeft_Stage2;
+uniform vec2 uDstTextureCoordScale_Stage2;
+uniform sampler2D uTextureSampler_0_Stage0;
+uniform sampler2D uDstTextureSampler_Stage2;
+noperspective in vec2 vTextureCoords_Stage0;
+flat in int vTexIndex_Stage0;
+noperspective in vec4 vinColor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ t.x = fract(t.x);
+ }
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+float _blend_overlay_component(float sc, float sa, float dc, float da) {
+ if (2.0 * dc <= da) {
+ return (2.0 * sc) * dc;
+ }
+ return sa * da - (2.0 * (da - dc)) * (sa - sc);
+}
+vec4 blend_overlay(vec4 src, vec4 dst) {
+ vec4 result = vec4(_blend_overlay_component(src.x, src.w, dst.x, dst.w), _blend_overlay_component(src.y, src.w, dst.y, dst.w), _blend_overlay_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+ result.xyz += dst.xyz * (1.0 - src.w) + src.xyz * (1.0 - dst.w);
+ return result;
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ vec4 texColor;
+ {
+ texColor = texture(uTextureSampler_0_Stage0, vTextureCoords_Stage0);
+ }
+ outputCoverage_Stage0 = texColor;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TiledGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ if (all(lessThanEqual(outputCoverage_Stage0.xyz, vec3(0.0)))) {
+ discard;
+ }
+ vec2 _dstTexCoord = (gl_FragCoord.xy - uDstTextureUpperLeft_Stage2) * uDstTextureCoordScale_Stage2;
+ _dstTexCoord.y = 1.0 - _dstTexCoord.y;
+ vec4 _dstColor = texture(uDstTextureSampler_Stage2, _dstTexCoord);
+ sk_FragColor = blend_overlay(output_Stage1, _dstColor);
+ float lerpRed = mix(_dstColor.w, sk_FragColor.w, outputCoverage_Stage0.x);
+ float lerpBlue = mix(_dstColor.w, sk_FragColor.w, outputCoverage_Stage0.y);
+ float lerpGreen = mix(_dstColor.w, sk_FragColor.w, outputCoverage_Stage0.z);
+ sk_FragColor = outputCoverage_Stage0 * sk_FragColor + (vec4(1.0) - outputCoverage_Stage0) * _dstColor;
+ sk_FragColor.w = max(max(lerpRed, lerpBlue), lerpGreen);
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform vec2 uAtlasSizeInv_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in uvec2 inTextureCoords;
+noperspective out vec2 vTextureCoords_Stage0;
+flat out int vTexIndex_Stage0;
+noperspective out vec4 vinColor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ ivec2 signedCoords = ivec2(int(inTextureCoords.x), int(inTextureCoords.y));
+ vec2 unormTexCoords = vec2(float(signedCoords.x / 2), float(signedCoords.y / 2));
+ vTextureCoords_Stage0 = unormTexCoords * uAtlasSizeInv_Stage0;
+ vTexIndex_Stage0 = 0;
+ vinColor_Stage0 = inColor;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(inPosition.x, inPosition.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/133.shader_test b/shaders/skia/133.shader_test
new file mode 100644
index 0000000..b76d3d8
--- /dev/null
+++ b/shaders/skia/133.shader_test
@@ -0,0 +1,126 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform float uSrcTF_Stage1_c0_c0[7];
+uniform mat3 uColorXform_Stage1_c0_c0;
+uniform float uDstTF_Stage1_c0_c0[7];
+uniform mat4 um_Stage2;
+uniform vec4 uv_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_1_Stage1, vTransformedCoords_1_Stage0) * _input;
+ return _output;
+}
+vec4 YUVtoRGBEffect_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 planes[2];
+ planes[0] = TextureEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ planes[1] = TextureEffect_Stage1_c0_c0_c0_c0_c1_c0(vec4(1.0));
+ vec4 color = vec4(planes[0].w, planes[1].x, planes[1].y, 1.0);
+ _output = color;
+ return _output;
+}
+float src_tf_Stage1_c0_c0(float x) {
+ float G = uSrcTF_Stage1_c0_c0[0];
+ float A = uSrcTF_Stage1_c0_c0[1];
+ float B = uSrcTF_Stage1_c0_c0[2];
+ float C = uSrcTF_Stage1_c0_c0[3];
+ float D = uSrcTF_Stage1_c0_c0[4];
+ float E = uSrcTF_Stage1_c0_c0[5];
+ float F = uSrcTF_Stage1_c0_c0[6];
+ float s = sign(x);
+ x = abs(x);
+ x = x < D ? C * x + F : pow(A * x + B, G) + E;
+ return s * x;
+}
+float dst_tf_Stage1_c0_c0(float x) {
+ float G = uDstTF_Stage1_c0_c0[0];
+ float A = uDstTF_Stage1_c0_c0[1];
+ float B = uDstTF_Stage1_c0_c0[2];
+ float C = uDstTF_Stage1_c0_c0[3];
+ float D = uDstTF_Stage1_c0_c0[4];
+ float E = uDstTF_Stage1_c0_c0[5];
+ float F = uDstTF_Stage1_c0_c0[6];
+ float s = sign(x);
+ x = abs(x);
+ x = x < D ? C * x + F : pow(A * x + B, G) + E;
+ return s * x;
+}
+vec4 gamut_xform_Stage1_c0_c0(vec4 color) {
+ color.xyz = uColorXform_Stage1_c0_c0 * color.xyz;
+ return color;
+}
+vec4 color_xform_Stage1_c0_c0(vec4 color) {
+ color.x = src_tf_Stage1_c0_c0(color.x);
+ color.y = src_tf_Stage1_c0_c0(color.y);
+ color.z = src_tf_Stage1_c0_c0(color.z);
+ color = gamut_xform_Stage1_c0_c0(color);
+ color.x = dst_tf_Stage1_c0_c0(color.x);
+ color.y = dst_tf_Stage1_c0_c0(color.y);
+ color.z = dst_tf_Stage1_c0_c0(color.z);
+ return color;
+}
+vec4 ColorSpaceXform_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = color_xform_Stage1_c0_c0(YUVtoRGBEffect_Stage1_c0_c0_c0_c0(vec4(1.0))) * _input;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ColorSpaceXform_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ vec4 inputColor = output_Stage1;
+ {
+ float nonZeroAlpha = max(inputColor.w, 9.9999997473787516e-05);
+ inputColor = vec4(inputColor.xyz / nonZeroAlpha, inputColor.w);
+ }
+ output_Stage2 = um_Stage2 * inputColor + uv_Stage2;
+ {
+ output_Stage2 = clamp(output_Stage2, 0.0, 1.0);
+ }
+ {
+ output_Stage2.xyz *= output_Stage2.w;
+ }
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1339.shader_test b/shaders/skia/1339.shader_test
new file mode 100644
index 0000000..e72b842
--- /dev/null
+++ b/shaders/skia/1339.shader_test
@@ -0,0 +1,98 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_KHR_blend_equation_advanced : require
+out vec4 sk_FragColor;
+layout (blend_support_all_equations) out ;
+uniform vec2 uImageIncrement_Stage2;
+uniform vec2 uBounds_Stage2;
+uniform vec4 uKernel_Stage2[2];
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vEllipseOffsets_Stage0;
+noperspective in vec4 vEllipseRadii_Stage0;
+noperspective in vec4 vinColor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vinColor_Stage0;
+ vec2 offset = vEllipseOffsets_Stage0;
+ float test = dot(offset, offset) - 1.0;
+ vec2 grad = (2.0 * offset) * vEllipseRadii_Stage0.xy;
+ float grad_dot = dot(grad, grad);
+ grad_dot = max(grad_dot, 1.1754999560161448e-38);
+ float invlen = inversesqrt(grad_dot);
+ float edgeAlpha = clamp(0.5 - test * invlen, 0.0, 1.0);
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = outputCoverage_Stage0;
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0 - 3.0 * uImageIncrement_Stage2;
+ vec2 coordSampled = vec2(0.0, 0.0);
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage2.x, uBounds_Stage2.y);
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[0].x;
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage2.x, uBounds_Stage2.y);
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[0].y;
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage2.x, uBounds_Stage2.y);
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[0].z;
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage2.x, uBounds_Stage2.y);
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[0].w;
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage2.x, uBounds_Stage2.y);
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[1].x;
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage2.x, uBounds_Stage2.y);
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[1].y;
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage2.x, uBounds_Stage2.y);
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[1].z;
+ coord += uImageIncrement_Stage2;
+ output_Stage2 *= output_Stage1;
+ }
+ {
+ sk_FragColor = output_Stage2 * outputColor_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec2 inEllipseOffset;
+in vec4 inEllipseRadii;
+noperspective out vec2 vEllipseOffsets_Stage0;
+noperspective out vec4 vEllipseRadii_Stage0;
+noperspective out vec4 vinColor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vEllipseOffsets_Stage0 = inEllipseOffset;
+ vEllipseRadii_Stage0 = inEllipseRadii;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1342.shader_test b/shaders/skia/1342.shader_test
new file mode 100644
index 0000000..ca502ba
--- /dev/null
+++ b/shaders/skia/1342.shader_test
@@ -0,0 +1,32 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_KHR_blend_equation_advanced : require
+out vec4 sk_FragColor;
+layout (blend_support_all_equations) out ;
+uniform vec4 uColor_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = uColor_Stage0;
+ }
+ {
+ sk_FragColor = outputColor_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 inPosition;
+void main() {
+ vec2 pos2 = (uViewM_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1345.shader_test b/shaders/skia/1345.shader_test
new file mode 100644
index 0000000..1bc63d3
--- /dev/null
+++ b/shaders/skia/1345.shader_test
@@ -0,0 +1,97 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+uniform float uSrcTF_Stage0[7];
+uniform mat3 uColorXform_Stage0;
+uniform float uDstTF_Stage0[7];
+uniform vec4 uinnerRect_Stage1;
+uniform vec4 uinvRadiiLTRB_Stage1;
+uniform sampler2D uTextureSampler_0_Stage0;
+noperspective in vec2 vtextureCoords_Stage0;
+flat in vec4 vtextureDomain_Stage0;
+flat in vec4 vcolor_Stage0;
+float src_tf_Stage0(float x) {
+ float G = uSrcTF_Stage0[0];
+ float A = uSrcTF_Stage0[1];
+ float B = uSrcTF_Stage0[2];
+ float C = uSrcTF_Stage0[3];
+ float D = uSrcTF_Stage0[4];
+ float E = uSrcTF_Stage0[5];
+ float F = uSrcTF_Stage0[6];
+ float s = sign(x);
+ x = abs(x);
+ x = x < D ? C * x + F : pow(A * x + B, G) + E;
+ return s * x;
+}
+float dst_tf_Stage0(float x) {
+ float G = uDstTF_Stage0[0];
+ float A = uDstTF_Stage0[1];
+ float B = uDstTF_Stage0[2];
+ float C = uDstTF_Stage0[3];
+ float D = uDstTF_Stage0[4];
+ float E = uDstTF_Stage0[5];
+ float F = uDstTF_Stage0[6];
+ float s = sign(x);
+ x = abs(x);
+ x = x < D ? C * x + F : pow(A * x + B, G) + E;
+ return s * x;
+}
+vec4 gamut_xform_Stage0(vec4 color) {
+ color.xyz = uColorXform_Stage0 * color.xyz;
+ return color;
+}
+vec4 color_xform_Stage0(vec4 color) {
+ float nonZeroAlpha = max(color.w, 9.9999997473787516e-05);
+ color = vec4(color.xyz / nonZeroAlpha, nonZeroAlpha);
+ color.x = src_tf_Stage0(color.x);
+ color.y = src_tf_Stage0(color.y);
+ color.z = src_tf_Stage0(color.z);
+ color = gamut_xform_Stage0(color);
+ color.x = dst_tf_Stage0(color.x);
+ color.y = dst_tf_Stage0(color.y);
+ color.z = dst_tf_Stage0(color.z);
+ color.xyz *= color.w;
+ return color;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ vec2 textureCoords;
+ textureCoords = vtextureCoords_Stage0;
+ vec4 textureDomain;
+ textureDomain = vtextureDomain_Stage0;
+ outputColor_Stage0 = vcolor_Stage0;
+ outputColor_Stage0 = color_xform_Stage0(texture(uTextureSampler_0_Stage0, clamp(textureCoords, textureDomain.xy, textureDomain.zw))) * outputColor_Stage0;
+ }
+ {
+ vec2 dxy0 = uinnerRect_Stage1.xy - gl_FragCoord.xy;
+ vec2 dxy1 = gl_FragCoord.xy - uinnerRect_Stage1.zw;
+ vec2 Z = max(max(dxy0 * uinvRadiiLTRB_Stage1.xy, dxy1 * uinvRadiiLTRB_Stage1.zw), 0.0);
+ float grad_dot = 4.0 * dot(Z, Z);
+ grad_dot = max(grad_dot, 9.9999997473787516e-05);
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 position;
+in vec2 textureCoords;
+in vec4 textureDomain;
+in vec4 color;
+noperspective out vec2 vtextureCoords_Stage0;
+flat out vec4 vtextureDomain_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vec2 pos2 = position;
+ vtextureCoords_Stage0 = textureCoords;
+ vtextureDomain_Stage0 = textureDomain;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1348.shader_test b/shaders/skia/1348.shader_test
new file mode 100644
index 0000000..e81e91f
--- /dev/null
+++ b/shaders/skia/1348.shader_test
@@ -0,0 +1,191 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_KHR_blend_equation_advanced : require
+out vec4 sk_FragColor;
+layout (blend_support_all_equations) out ;
+uniform vec4 uinnerRect_Stage1_c0_c0_c0_c0_c0_c0;
+uniform vec2 uradiusPlusHalf_Stage1_c0_c0_c0_c0_c0_c0;
+uniform float uPixelSize_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec2 uRange_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec3 uedges_Stage1_c0_c0_c1_c0[5];
+uniform float ucornerRadius_Stage1_c1_c0_c0_c0;
+uniform vec4 uproxyRect_Stage1_c1_c0_c0_c0;
+uniform float ublurRadius_Stage1_c1_c0_c0_c0;
+uniform mat4 um_Stage1_c1_c0_c1_c0_c0_c0;
+uniform vec4 uv_Stage1_c1_c0_c1_c0_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+noperspective in vec4 vinCircleEdge_Stage0;
+noperspective in vec4 vinColor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 CircularRRect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 dxy0 = uinnerRect_Stage1_c0_c0_c0_c0_c0_c0.xy - gl_FragCoord.xy;
+ vec2 dxy1 = gl_FragCoord.xy - uinnerRect_Stage1_c0_c0_c0_c0_c0_c0.zw;
+ vec2 dxy = max(max(dxy0, dxy1), 0.0);
+ float alpha = clamp(uradiusPlusHalf_Stage1_c0_c0_c0_c0_c0_c0.x - length(dxy), 0.0, 1.0);
+ _output = _input * alpha;
+ return _output;
+}
+vec4 Morphology_Stage1_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = vec4(1.0, 1.0, 1.0, 1.0);
+ vec2 coord = vTransformedCoords_0_Stage0;
+ coord.x -= 7.0 * uPixelSize_Stage1_c0_c0_c0_c0_c1_c0;
+ for (int i = 0;i < 15; i++) {
+ _output = min(_output, texture(uTextureSampler_0_Stage1, coord));
+ coord.x += uPixelSize_Stage1_c0_c0_c0_c0_c1_c0;
+ }
+ _output *= _input;
+ return _output;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 blend_lighten(vec4 src, vec4 dst) {
+ vec4 result = blend_src_over(src, dst);
+ result.xyz = max(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
+ return result;
+}
+vec4 ComposeTwo_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_lighten(CircularRRect_Stage1_c0_c0_c0_c0_c0_c0(inputColor), Morphology_Stage1_c0_c0_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 ConvexPoly_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float alpha = 1.0;
+ float edge;
+ edge = dot(uedges_Stage1_c0_c0_c1_c0[0], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage1_c0_c0_c1_c0[1], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage1_c0_c0_c1_c0[2], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage1_c0_c0_c1_c0[3], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage1_c0_c0_c1_c0[4], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ _output = _input * alpha;
+ return _output;
+}
+vec4 blend_src_atop(vec4 src, vec4 dst) {
+ return dst.w * src + (1.0 - src.w) * dst;
+}
+vec4 ComposeTwo_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_src_atop(ComposeTwo_Stage1_c0_c0_c0_c0(inputColor), ConvexPoly_Stage1_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 RRectBlurEffect_Stage1_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 translatedFragPos = gl_FragCoord.xy - uproxyRect_Stage1_c1_c0_c0_c0.xy;
+ float threshold = ucornerRadius_Stage1_c1_c0_c0_c0 + 2.0 * ublurRadius_Stage1_c1_c0_c0_c0;
+ vec2 middle = (uproxyRect_Stage1_c1_c0_c0_c0.zw - uproxyRect_Stage1_c1_c0_c0_c0.xy) - 2.0 * threshold;
+ if (translatedFragPos.x >= threshold && translatedFragPos.x < middle.x + threshold) {
+ translatedFragPos.x = threshold;
+ } else if (translatedFragPos.x >= middle.x + threshold) {
+ translatedFragPos.x -= middle.x - 1.0;
+ }
+ if (translatedFragPos.y > threshold && translatedFragPos.y < middle.y + threshold) {
+ translatedFragPos.y = threshold;
+ } else if (translatedFragPos.y >= middle.y + threshold) {
+ translatedFragPos.y -= middle.y - 1.0;
+ }
+ vec2 proxyDims = vec2(2.0 * threshold + 1.0);
+ vec2 texCoord = translatedFragPos / proxyDims;
+ _output = _input * texture(uTextureSampler_1_Stage1, texCoord);
+ return _output;
+}
+vec4 ColorMatrixFragmentProcessor_Stage1_c1_c0_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = _input;
+ _output = um_Stage1_c1_c0_c1_c0_c0_c0 * inputColor + uv_Stage1_c1_c0_c1_c0_c0_c0;
+ {
+ _output.w = clamp(_output.w, 0.0, 1.0);
+ }
+ return _output;
+}
+vec4 ClampFragmentProcessor_Stage1_c1_c0_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = clamp(_input, 0.0, 1.0);
+ }
+ return _output;
+}
+vec4 blend_difference(vec4 src, vec4 dst) {
+ return vec4((src.xyz + dst.xyz) - 2.0 * min(src.xyz * dst.w, dst.xyz * src.w), src.w + (1.0 - src.w) * dst.w);
+}
+vec4 ComposeTwo_Stage1_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_difference(ColorMatrixFragmentProcessor_Stage1_c1_c0_c1_c0_c0_c0(inputColor), ClampFragmentProcessor_Stage1_c1_c0_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 ComposeTwo_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_src_atop(RRectBlurEffect_Stage1_c1_c0_c0_c0(inputColor), ComposeTwo_Stage1_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 blend_dst_over(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src + dst;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ vec4 circleEdge;
+ circleEdge = vinCircleEdge_Stage0;
+ outputColor_Stage0 = vinColor_Stage0;
+ float d = length(circleEdge.xy);
+ float distanceToOuterEdge = circleEdge.z * (1.0 - d);
+ float edgeAlpha = clamp(distanceToOuterEdge, 0.0, 1.0);
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_dst_over(ComposeTwo_Stage1_c0_c0(inputColor), ComposeTwo_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ sk_FragColor = outputCoverage_Stage0 * output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec4 inCircleEdge;
+noperspective out vec4 vinCircleEdge_Stage0;
+noperspective out vec4 vinColor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vinCircleEdge_Stage0 = inCircleEdge;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1351.shader_test b/shaders/skia/1351.shader_test
new file mode 100644
index 0000000..05d70f3
--- /dev/null
+++ b/shaders/skia/1351.shader_test
@@ -0,0 +1,97 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+uniform vec2 ubaseFrequency_Stage2_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage2;
+uniform sampler2D uTextureSampler_1_Stage2;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in float vinCoverage_Stage0;
+float perlinnoise_Stage2_c0_c0(float chanCoord, vec2 noiseVec) {
+ vec4 floorVal;
+ floorVal.xy = floor(noiseVec);
+ floorVal.zw = floorVal.xy + vec2(1.0);
+ vec2 fractVal = fract(noiseVec);
+ vec2 noiseSmooth = (fractVal * fractVal) * (vec2(3.0) - vec2(2.0) * fractVal);
+ floorVal = fract(floor(mod(floorVal, 256.0)) / vec4(256.0));
+ vec2 latticeIdx;
+ latticeIdx.x = texture(uTextureSampler_0_Stage2, vec2(floorVal.x, 0.5)).x;
+ latticeIdx.y = texture(uTextureSampler_0_Stage2, vec2(floorVal.z, 0.5)).x;
+ vec4 bcoords = fract(latticeIdx.xyxy + floorVal.yyww);
+ vec2 uv;
+ vec4 lattice = texture(uTextureSampler_1_Stage2, vec2(bcoords.x, chanCoord)).zyxw;
+ uv.x = dot((lattice.yw + lattice.xz * vec2(0.00390625)) * vec2(2.0) - vec2(1.0), fractVal);
+ fractVal.x -= 1.0;
+ lattice = texture(uTextureSampler_1_Stage2, vec2(bcoords.y, chanCoord)).zyxw;
+ uv.y = dot((lattice.yw + lattice.xz * vec2(0.00390625)) * vec2(2.0) - vec2(1.0), fractVal);
+ vec2 ab;
+ ab.x = mix(uv.x, uv.y, noiseSmooth.x);
+ fractVal.y -= 1.0;
+ lattice = texture(uTextureSampler_1_Stage2, vec2(bcoords.w, chanCoord)).zyxw;
+ uv.y = dot((lattice.yw + lattice.xz * vec2(0.00390625)) * vec2(2.0) - vec2(1.0), fractVal);
+ fractVal.x += 1.0;
+ lattice = texture(uTextureSampler_1_Stage2, vec2(bcoords.z, chanCoord)).zyxw;
+ uv.x = dot((lattice.yw + lattice.xz * vec2(0.00390625)) * vec2(2.0) - vec2(1.0), fractVal);
+ ab.y = mix(uv.x, uv.y, noiseSmooth.x);
+ return mix(ab.x, ab.y, noiseSmooth.y);
+}
+vec4 PerlinNoise_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 noiseVec = floor(vTransformedCoords_0_Stage0) * ubaseFrequency_Stage2_c0_c0;
+ _output = vec4(0.0);
+ float ratio = 1.0;
+ for (int octave = 0;octave < 2; ++octave) {
+ _output += abs(vec4(perlinnoise_Stage2_c0_c0(0.125, noiseVec), perlinnoise_Stage2_c0_c0(0.375, noiseVec), perlinnoise_Stage2_c0_c0(0.625, noiseVec), perlinnoise_Stage2_c0_c0(0.875, noiseVec))) * ratio;
+ noiseVec *= vec2(2.0);
+ ratio *= 0.5;
+ }
+ _output = clamp(_output, 0.0, 1.0);
+ _output = vec4(_output.xyz * _output.www, _output.w);
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ float alpha = 1.0;
+ alpha = vinCoverage_Stage0;
+ outputCoverage_Stage0 = vec4(alpha);
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = outputCoverage_Stage0;
+ }
+ {
+ blend_dst_in(output_Stage1, PerlinNoise_Stage2_c0_c0(vec4(1.0)));
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in float inCoverage;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out float vinCoverage_Stage0;
+void main() {
+ vec4 color = inColor;
+ vcolor_Stage0 = color;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ vinCoverage_Stage0 = inCoverage;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1354.shader_test b/shaders/skia/1354.shader_test
new file mode 100644
index 0000000..a54a10b
--- /dev/null
+++ b/shaders/skia/1354.shader_test
@@ -0,0 +1,458 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_KHR_blend_equation_advanced : require
+out vec4 sk_FragColor;
+layout (blend_support_all_equations) out ;
+uniform vec3 uedges_Stage1_c0_c0_c0_c0_c1_c0[5];
+uniform vec4 ucolor_Stage1_c0_c0_c1_c0_c0_c0;
+uniform vec4 ucolor0_Stage1_c0_c0_c1_c0_c1_c0;
+uniform vec4 ucolor1_Stage1_c0_c0_c1_c0_c1_c0;
+uniform vec4 ucolor2_Stage1_c0_c0_c1_c0_c1_c0;
+uniform vec4 ucolor3_Stage1_c0_c0_c1_c0_c1_c0;
+uniform vec4 ucolor4_Stage1_c0_c0_c1_c0_c1_c0;
+uniform vec4 ucolor5_Stage1_c0_c0_c1_c0_c1_c0;
+uniform vec2 ubaseFrequency_Stage1_c1_c0_c0_c0_c0_c0;
+uniform float uz_Stage1_c1_c0_c0_c0_c0_c0;
+uniform vec4 urectH_Stage1_c1_c0_c0_c0_c1_c0;
+uniform float uinvSixSigma_Stage1_c1_c0_c0_c0_c1_c0;
+uniform vec2 uImageIncrement_Stage1_c1_c0_c1_c0_c0_c0;
+uniform vec2 uBounds_Stage1_c1_c0_c1_c0_c0_c0;
+uniform vec4 uKernel_Stage1_c1_c0_c1_c0_c0_c0[6];
+uniform float uinnerThreshold_Stage1_c1_c0_c1_c0_c1_c0;
+uniform float uouterThreshold_Stage1_c1_c0_c1_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+uniform sampler2D uTextureSampler_2_Stage1;
+uniform sampler2D uTextureSampler_3_Stage1;
+uniform sampler2D uTextureSampler_4_Stage1;
+noperspective in vec2 vEllipseOffsets_Stage0;
+noperspective in vec4 vEllipseRadii_Stage0;
+noperspective in vec4 vinColor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+noperspective in vec2 vTransformedCoords_3_Stage0;
+vec4 ConfigConversionEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = floor(_input * 255.0 + 0.5) / 255.0;
+ {
+ _output.xyz = _output.w <= 0.0 ? vec3(0.0) : floor((_output.xyz / _output.w) * 255.0 + 0.5) / 255.0;
+ }
+ return _output;
+}
+vec4 ConvexPoly_Stage1_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float alpha = 1.0;
+ float edge;
+ edge = dot(uedges_Stage1_c0_c0_c0_c0_c1_c0[0], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage1_c0_c0_c0_c0_c1_c0[1], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage1_c0_c0_c0_c0_c1_c0[2], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage1_c0_c0_c0_c0_c1_c0[3], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage1_c0_c0_c0_c0_c1_c0[4], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ alpha = 1.0 - alpha;
+ _output = _input * alpha;
+ return _output;
+}
+float _blend_color_saturation(vec3 color) {
+ return max(max(color.x, color.y), color.z) - min(min(color.x, color.y), color.z);
+}
+vec3 _blend_set_color_saturation_helper(vec3 minMidMax, float sat) {
+ if (minMidMax.x < minMidMax.z) {
+ return vec3(0.0, (sat * (minMidMax.y - minMidMax.x)) / (minMidMax.z - minMidMax.x), sat);
+ }
+ return vec3(0.0);
+}
+vec3 _blend_set_color_saturation(vec3 hueLumColor, vec3 satColor) {
+ float sat = _blend_color_saturation(satColor);
+ if (hueLumColor.x <= hueLumColor.y) {
+ if (hueLumColor.y <= hueLumColor.z) {
+ hueLumColor.xyz = _blend_set_color_saturation_helper(hueLumColor, sat);
+ } else if (hueLumColor.x <= hueLumColor.z) {
+ hueLumColor.xzy = _blend_set_color_saturation_helper(hueLumColor.xzy, sat);
+ } else {
+ hueLumColor.zxy = _blend_set_color_saturation_helper(hueLumColor.zxy, sat);
+ }
+ } else if (hueLumColor.x <= hueLumColor.z) {
+ hueLumColor.yxz = _blend_set_color_saturation_helper(hueLumColor.yxz, sat);
+ } else if (hueLumColor.y <= hueLumColor.z) {
+ hueLumColor.yzx = _blend_set_color_saturation_helper(hueLumColor.yzx, sat);
+ } else {
+ hueLumColor.zyx = _blend_set_color_saturation_helper(hueLumColor.zyx, sat);
+ }
+ return hueLumColor;
+}
+float _blend_color_luminance(vec3 color) {
+ return dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), color);
+}
+vec3 _blend_set_color_luminance(vec3 hueSatColor, float alpha, vec3 lumColor) {
+ float lum = _blend_color_luminance(lumColor);
+ vec3 result = (lum - _blend_color_luminance(hueSatColor)) + hueSatColor;
+ float minComp = min(min(result.x, result.y), result.z);
+ float maxComp = max(max(result.x, result.y), result.z);
+ if (minComp < 0.0 && lum != minComp) {
+ result = lum + ((result - lum) * lum) / (lum - minComp);
+ }
+ if (maxComp > alpha && maxComp != lum) {
+ return lum + ((result - lum) * (alpha - lum)) / (maxComp - lum);
+ }
+ return result;
+}
+vec4 blend_saturation(vec4 src, vec4 dst) {
+ float alpha = dst.w * src.w;
+ vec3 sda = src.xyz * dst.w;
+ vec3 dsa = dst.xyz * src.w;
+ return vec4((((_blend_set_color_luminance(_blend_set_color_saturation(dsa, sda), alpha, dsa) + dst.xyz) - dsa) + src.xyz) - sda, (src.w + dst.w) - alpha);
+}
+vec4 ComposeTwo_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_saturation(ConfigConversionEffect_Stage1_c0_c0_c0_c0_c0_c0(inputColor), ConvexPoly_Stage1_c0_c0_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 ConstColorProcessor_Stage1_c0_c0_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = _input.w * ucolor_Stage1_c0_c0_c1_c0_c0_c0;
+ }
+ return _output;
+}
+vec4 Overdraw_Stage1_c0_c0_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = _input;
+ float alpha = 255.0 * _output.w;
+ if (alpha < 0.5) {
+ _output = ucolor0_Stage1_c0_c0_c1_c0_c1_c0;
+ } else if (alpha < 1.5) {
+ _output = ucolor1_Stage1_c0_c0_c1_c0_c1_c0;
+ } else if (alpha < 2.5) {
+ _output = ucolor2_Stage1_c0_c0_c1_c0_c1_c0;
+ } else if (alpha < 3.5) {
+ _output = ucolor3_Stage1_c0_c0_c1_c0_c1_c0;
+ } else if (alpha < 4.5) {
+ _output = ucolor4_Stage1_c0_c0_c1_c0_c1_c0;
+ } else {
+ _output = ucolor5_Stage1_c0_c0_c1_c0_c1_c0;
+ }
+ return _output;
+}
+vec4 blend_multiply(vec4 src, vec4 dst) {
+ return vec4(((1.0 - src.w) * dst.xyz + (1.0 - dst.w) * src.xyz) + src.xyz * dst.xyz, src.w + (1.0 - src.w) * dst.w);
+}
+vec4 ComposeTwo_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_multiply(ConstColorProcessor_Stage1_c0_c0_c1_c0_c0_c0(inputColor), Overdraw_Stage1_c0_c0_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 blend_xor(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src + (1.0 - src.w) * dst;
+}
+vec4 ComposeTwo_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_xor(ComposeTwo_Stage1_c0_c0_c0_c0(inputColor), ComposeTwo_Stage1_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec3 fade_Stage1_c1_c0_c0_c0_c0_c0(vec3 t) {
+ return ((t * t) * t) * (t * (t * 6.0 - 15.0) + 10.0);
+}
+float perm_Stage1_c1_c0_c0_c0_c0_c0(float x) {
+ return texture(uTextureSampler_0_Stage1, vec2(fract(x / 256.0), 0.0)).x * 255.0;
+}
+float grad_Stage1_c1_c0_c0_c0_c0_c0(float x, vec3 p) {
+ return dot(texture(uTextureSampler_1_Stage1, vec2(fract(x / 16.0), 0.0)).xyz * 255.0 - vec3(1.0), p);
+}
+float lerp_Stage1_c1_c0_c0_c0_c0_c0(float a, float b, float w) {
+ return a + w * (b - a);
+}
+float noise_Stage1_c1_c0_c0_c0_c0_c0(vec3 p) {
+ vec3 P = mod(floor(p), 256.0);
+ p -= floor(p);
+ vec3 f = fade_Stage1_c1_c0_c0_c0_c0_c0(p);
+ float A = perm_Stage1_c1_c0_c0_c0_c0_c0(P.x) + P.y;
+ float AA = perm_Stage1_c1_c0_c0_c0_c0_c0(A) + P.z;
+ float AB = perm_Stage1_c1_c0_c0_c0_c0_c0(A + 1.0) + P.z;
+ float B = perm_Stage1_c1_c0_c0_c0_c0_c0(P.x + 1.0) + P.y;
+ float BA = perm_Stage1_c1_c0_c0_c0_c0_c0(B) + P.z;
+ float BB = perm_Stage1_c1_c0_c0_c0_c0_c0(B + 1.0) + P.z;
+ float result = lerp_Stage1_c1_c0_c0_c0_c0_c0(lerp_Stage1_c1_c0_c0_c0_c0_c0(lerp_Stage1_c1_c0_c0_c0_c0_c0(grad_Stage1_c1_c0_c0_c0_c0_c0(perm_Stage1_c1_c0_c0_c0_c0_c0(AA), p), grad_Stage1_c1_c0_c0_c0_c0_c0(perm_Stage1_c1_c0_c0_c0_c0_c0(BA), p + vec3(-1.0, 0.0, 0.0)), f.x), lerp_Stage1_c1_c0_c0_c0_c0_c0(grad_Stage1_c1_c0_c0_c0_c0_c0(perm_Stage1_c1_c0_c0_c0_c0_c0(AB), p + vec3(0.0, -1.0, 0.0)), grad_Stage1_c1_c0_c0_c0_c0_c0(perm_Stage1_c1_c0_c0_c0_c0_c0(BB), p + vec3(-1.0, -1.0, 0.0)), f.x), f.y), lerp_Stage1_c1_c0_c0_c0_c0_c0(lerp_Stage1_c1_c0_c0_c0_c0_c0(grad_Stage1_c1_c0_c0_c0_c0_c0(perm_Stage1_c1_c0_c0_c0_c0_c0(AA + 1.0), p + vec3(0.0, 0.0, -1.0)), grad_Stage1_c1_c0_c0_c0_c0_c0(perm_Stage1_c1_c0_c0_c0_c0_c0(BA + 1.0), p + vec3(-1.0, 0.0, -1.0)), f.x), lerp_Stage1_c1_c0_c0_c0_c0_c0(grad_Stage1_c1_c0_c0_c0_c0_c0(perm_Stage1_c1_c0_c0_c0_c0_c0(AB + 1.0), p + vec3(0.0, -1.0, -1.0)), grad_Stage1_c1_c0_c0_c0_c0_c0(perm_Stage1_c1_c0_c0_c0_c0_c0(BB + 1.0), p + vec3(-1.0, -1.0, -1.0)), f.x), f.y), f.z);
+ return result;
+}
+float noiseOctaves_Stage1_c1_c0_c0_c0_c0_c0(vec3 p) {
+ float result = 0.0;
+ float ratio = 1.0;
+ for (float i = 0.0;i < 2.0; i++) {
+ result += noise_Stage1_c1_c0_c0_c0_c0_c0(p) / ratio;
+ p *= 2.0;
+ ratio *= 2.0;
+ }
+ return (result + 1.0) / 2.0;
+}
+vec4 ImprovedPerlinNoise_Stage1_c1_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coords = vTransformedCoords_1_Stage0 * ubaseFrequency_Stage1_c1_c0_c0_c0_c0_c0;
+ float r = noiseOctaves_Stage1_c1_c0_c0_c0_c0_c0(vec3(coords, uz_Stage1_c1_c0_c0_c0_c0_c0));
+ float g = noiseOctaves_Stage1_c1_c0_c0_c0_c0_c0(vec3(coords, uz_Stage1_c1_c0_c0_c0_c0_c0));
+ float b = noiseOctaves_Stage1_c1_c0_c0_c0_c0_c0(vec3(coords, uz_Stage1_c1_c0_c0_c0_c0_c0));
+ float a = noiseOctaves_Stage1_c1_c0_c0_c0_c0_c0(vec3(coords, uz_Stage1_c1_c0_c0_c0_c0_c0));
+ _output = vec4(r, g, b, a);
+ _output = clamp(_output, 0.0, 1.0);
+ _output = vec4(_output.xyz * _output.www, _output.w);
+ return _output;
+}
+vec4 RectBlurEffect_Stage1_c1_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float xCoverage, yCoverage;
+ {
+ float x, y;
+ {
+ x = max(urectH_Stage1_c1_c0_c0_c0_c1_c0.x - gl_FragCoord.x, gl_FragCoord.x - urectH_Stage1_c1_c0_c0_c0_c1_c0.z);
+ y = max(urectH_Stage1_c1_c0_c0_c0_c1_c0.y - gl_FragCoord.y, gl_FragCoord.y - urectH_Stage1_c1_c0_c0_c0_c1_c0.w);
+ }
+ xCoverage = texture(uTextureSampler_2_Stage1, vec2(x * uinvSixSigma_Stage1_c1_c0_c0_c0_c1_c0, 0.5)).w;
+ yCoverage = texture(uTextureSampler_2_Stage1, vec2(y * uinvSixSigma_Stage1_c1_c0_c0_c0_c1_c0, 0.5)).w;
+ _output = (_input * xCoverage) * yCoverage;
+ }
+ _output = (_input * xCoverage) * yCoverage;
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 ComposeTwo_Stage1_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_src_in(ImprovedPerlinNoise_Stage1_c1_c0_c0_c0_c0_c0(inputColor), RectBlurEffect_Stage1_c1_c0_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 GaussianConvolution_Stage1_c1_c0_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_2_Stage0 - 10.0 * uImageIncrement_Stage1_c1_c0_c1_c0_c0_c0;
+ vec2 coordSampled = vec2(0.0, 0.0);
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage1_c1_c0_c1_c0_c0_c0.x, uBounds_Stage1_c1_c0_c1_c0_c0_c0.y - uBounds_Stage1_c1_c0_c1_c0_c0_c0.x) + uBounds_Stage1_c1_c0_c1_c0_c0_c0.x;
+ _output += texture(uTextureSampler_3_Stage1, coordSampled) * uKernel_Stage1_c1_c0_c1_c0_c0_c0[0].x;
+ coord += uImageIncrement_Stage1_c1_c0_c1_c0_c0_c0;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage1_c1_c0_c1_c0_c0_c0.x, uBounds_Stage1_c1_c0_c1_c0_c0_c0.y - uBounds_Stage1_c1_c0_c1_c0_c0_c0.x) + uBounds_Stage1_c1_c0_c1_c0_c0_c0.x;
+ _output += texture(uTextureSampler_3_Stage1, coordSampled) * uKernel_Stage1_c1_c0_c1_c0_c0_c0[0].y;
+ coord += uImageIncrement_Stage1_c1_c0_c1_c0_c0_c0;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage1_c1_c0_c1_c0_c0_c0.x, uBounds_Stage1_c1_c0_c1_c0_c0_c0.y - uBounds_Stage1_c1_c0_c1_c0_c0_c0.x) + uBounds_Stage1_c1_c0_c1_c0_c0_c0.x;
+ _output += texture(uTextureSampler_3_Stage1, coordSampled) * uKernel_Stage1_c1_c0_c1_c0_c0_c0[0].z;
+ coord += uImageIncrement_Stage1_c1_c0_c1_c0_c0_c0;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage1_c1_c0_c1_c0_c0_c0.x, uBounds_Stage1_c1_c0_c1_c0_c0_c0.y - uBounds_Stage1_c1_c0_c1_c0_c0_c0.x) + uBounds_Stage1_c1_c0_c1_c0_c0_c0.x;
+ _output += texture(uTextureSampler_3_Stage1, coordSampled) * uKernel_Stage1_c1_c0_c1_c0_c0_c0[0].w;
+ coord += uImageIncrement_Stage1_c1_c0_c1_c0_c0_c0;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage1_c1_c0_c1_c0_c0_c0.x, uBounds_Stage1_c1_c0_c1_c0_c0_c0.y - uBounds_Stage1_c1_c0_c1_c0_c0_c0.x) + uBounds_Stage1_c1_c0_c1_c0_c0_c0.x;
+ _output += texture(uTextureSampler_3_Stage1, coordSampled) * uKernel_Stage1_c1_c0_c1_c0_c0_c0[1].x;
+ coord += uImageIncrement_Stage1_c1_c0_c1_c0_c0_c0;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage1_c1_c0_c1_c0_c0_c0.x, uBounds_Stage1_c1_c0_c1_c0_c0_c0.y - uBounds_Stage1_c1_c0_c1_c0_c0_c0.x) + uBounds_Stage1_c1_c0_c1_c0_c0_c0.x;
+ _output += texture(uTextureSampler_3_Stage1, coordSampled) * uKernel_Stage1_c1_c0_c1_c0_c0_c0[1].y;
+ coord += uImageIncrement_Stage1_c1_c0_c1_c0_c0_c0;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage1_c1_c0_c1_c0_c0_c0.x, uBounds_Stage1_c1_c0_c1_c0_c0_c0.y - uBounds_Stage1_c1_c0_c1_c0_c0_c0.x) + uBounds_Stage1_c1_c0_c1_c0_c0_c0.x;
+ _output += texture(uTextureSampler_3_Stage1, coordSampled) * uKernel_Stage1_c1_c0_c1_c0_c0_c0[1].z;
+ coord += uImageIncrement_Stage1_c1_c0_c1_c0_c0_c0;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage1_c1_c0_c1_c0_c0_c0.x, uBounds_Stage1_c1_c0_c1_c0_c0_c0.y - uBounds_Stage1_c1_c0_c1_c0_c0_c0.x) + uBounds_Stage1_c1_c0_c1_c0_c0_c0.x;
+ _output += texture(uTextureSampler_3_Stage1, coordSampled) * uKernel_Stage1_c1_c0_c1_c0_c0_c0[1].w;
+ coord += uImageIncrement_Stage1_c1_c0_c1_c0_c0_c0;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage1_c1_c0_c1_c0_c0_c0.x, uBounds_Stage1_c1_c0_c1_c0_c0_c0.y - uBounds_Stage1_c1_c0_c1_c0_c0_c0.x) + uBounds_Stage1_c1_c0_c1_c0_c0_c0.x;
+ _output += texture(uTextureSampler_3_Stage1, coordSampled) * uKernel_Stage1_c1_c0_c1_c0_c0_c0[2].x;
+ coord += uImageIncrement_Stage1_c1_c0_c1_c0_c0_c0;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage1_c1_c0_c1_c0_c0_c0.x, uBounds_Stage1_c1_c0_c1_c0_c0_c0.y - uBounds_Stage1_c1_c0_c1_c0_c0_c0.x) + uBounds_Stage1_c1_c0_c1_c0_c0_c0.x;
+ _output += texture(uTextureSampler_3_Stage1, coordSampled) * uKernel_Stage1_c1_c0_c1_c0_c0_c0[2].y;
+ coord += uImageIncrement_Stage1_c1_c0_c1_c0_c0_c0;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage1_c1_c0_c1_c0_c0_c0.x, uBounds_Stage1_c1_c0_c1_c0_c0_c0.y - uBounds_Stage1_c1_c0_c1_c0_c0_c0.x) + uBounds_Stage1_c1_c0_c1_c0_c0_c0.x;
+ _output += texture(uTextureSampler_3_Stage1, coordSampled) * uKernel_Stage1_c1_c0_c1_c0_c0_c0[2].z;
+ coord += uImageIncrement_Stage1_c1_c0_c1_c0_c0_c0;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage1_c1_c0_c1_c0_c0_c0.x, uBounds_Stage1_c1_c0_c1_c0_c0_c0.y - uBounds_Stage1_c1_c0_c1_c0_c0_c0.x) + uBounds_Stage1_c1_c0_c1_c0_c0_c0.x;
+ _output += texture(uTextureSampler_3_Stage1, coordSampled) * uKernel_Stage1_c1_c0_c1_c0_c0_c0[2].w;
+ coord += uImageIncrement_Stage1_c1_c0_c1_c0_c0_c0;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage1_c1_c0_c1_c0_c0_c0.x, uBounds_Stage1_c1_c0_c1_c0_c0_c0.y - uBounds_Stage1_c1_c0_c1_c0_c0_c0.x) + uBounds_Stage1_c1_c0_c1_c0_c0_c0.x;
+ _output += texture(uTextureSampler_3_Stage1, coordSampled) * uKernel_Stage1_c1_c0_c1_c0_c0_c0[3].x;
+ coord += uImageIncrement_Stage1_c1_c0_c1_c0_c0_c0;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage1_c1_c0_c1_c0_c0_c0.x, uBounds_Stage1_c1_c0_c1_c0_c0_c0.y - uBounds_Stage1_c1_c0_c1_c0_c0_c0.x) + uBounds_Stage1_c1_c0_c1_c0_c0_c0.x;
+ _output += texture(uTextureSampler_3_Stage1, coordSampled) * uKernel_Stage1_c1_c0_c1_c0_c0_c0[3].y;
+ coord += uImageIncrement_Stage1_c1_c0_c1_c0_c0_c0;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage1_c1_c0_c1_c0_c0_c0.x, uBounds_Stage1_c1_c0_c1_c0_c0_c0.y - uBounds_Stage1_c1_c0_c1_c0_c0_c0.x) + uBounds_Stage1_c1_c0_c1_c0_c0_c0.x;
+ _output += texture(uTextureSampler_3_Stage1, coordSampled) * uKernel_Stage1_c1_c0_c1_c0_c0_c0[3].z;
+ coord += uImageIncrement_Stage1_c1_c0_c1_c0_c0_c0;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage1_c1_c0_c1_c0_c0_c0.x, uBounds_Stage1_c1_c0_c1_c0_c0_c0.y - uBounds_Stage1_c1_c0_c1_c0_c0_c0.x) + uBounds_Stage1_c1_c0_c1_c0_c0_c0.x;
+ _output += texture(uTextureSampler_3_Stage1, coordSampled) * uKernel_Stage1_c1_c0_c1_c0_c0_c0[3].w;
+ coord += uImageIncrement_Stage1_c1_c0_c1_c0_c0_c0;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage1_c1_c0_c1_c0_c0_c0.x, uBounds_Stage1_c1_c0_c1_c0_c0_c0.y - uBounds_Stage1_c1_c0_c1_c0_c0_c0.x) + uBounds_Stage1_c1_c0_c1_c0_c0_c0.x;
+ _output += texture(uTextureSampler_3_Stage1, coordSampled) * uKernel_Stage1_c1_c0_c1_c0_c0_c0[4].x;
+ coord += uImageIncrement_Stage1_c1_c0_c1_c0_c0_c0;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage1_c1_c0_c1_c0_c0_c0.x, uBounds_Stage1_c1_c0_c1_c0_c0_c0.y - uBounds_Stage1_c1_c0_c1_c0_c0_c0.x) + uBounds_Stage1_c1_c0_c1_c0_c0_c0.x;
+ _output += texture(uTextureSampler_3_Stage1, coordSampled) * uKernel_Stage1_c1_c0_c1_c0_c0_c0[4].y;
+ coord += uImageIncrement_Stage1_c1_c0_c1_c0_c0_c0;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage1_c1_c0_c1_c0_c0_c0.x, uBounds_Stage1_c1_c0_c1_c0_c0_c0.y - uBounds_Stage1_c1_c0_c1_c0_c0_c0.x) + uBounds_Stage1_c1_c0_c1_c0_c0_c0.x;
+ _output += texture(uTextureSampler_3_Stage1, coordSampled) * uKernel_Stage1_c1_c0_c1_c0_c0_c0[4].z;
+ coord += uImageIncrement_Stage1_c1_c0_c1_c0_c0_c0;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage1_c1_c0_c1_c0_c0_c0.x, uBounds_Stage1_c1_c0_c1_c0_c0_c0.y - uBounds_Stage1_c1_c0_c1_c0_c0_c0.x) + uBounds_Stage1_c1_c0_c1_c0_c0_c0.x;
+ _output += texture(uTextureSampler_3_Stage1, coordSampled) * uKernel_Stage1_c1_c0_c1_c0_c0_c0[4].w;
+ coord += uImageIncrement_Stage1_c1_c0_c1_c0_c0_c0;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage1_c1_c0_c1_c0_c0_c0.x, uBounds_Stage1_c1_c0_c1_c0_c0_c0.y - uBounds_Stage1_c1_c0_c1_c0_c0_c0.x) + uBounds_Stage1_c1_c0_c1_c0_c0_c0.x;
+ _output += texture(uTextureSampler_3_Stage1, coordSampled) * uKernel_Stage1_c1_c0_c1_c0_c0_c0[5].x;
+ coord += uImageIncrement_Stage1_c1_c0_c1_c0_c0_c0;
+ _output *= _input;
+ return _output;
+}
+vec4 AlphaThresholdFragmentProcessor_Stage1_c1_c0_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 color = _input;
+ vec4 mask_color = texture(uTextureSampler_4_Stage1, vTransformedCoords_3_Stage0);
+ if (mask_color.w < 0.5) {
+ if (color.w > uouterThreshold_Stage1_c1_c0_c1_c0_c1_c0) {
+ float scale = uouterThreshold_Stage1_c1_c0_c1_c0_c1_c0 / color.w;
+ color.xyz *= scale;
+ color.w = uouterThreshold_Stage1_c1_c0_c1_c0_c1_c0;
+ }
+ } else if (color.w < uinnerThreshold_Stage1_c1_c0_c1_c0_c1_c0) {
+ float scale = uinnerThreshold_Stage1_c1_c0_c1_c0_c1_c0 / max(0.0010000000474974513, color.w);
+ color.xyz *= scale;
+ color.w = uinnerThreshold_Stage1_c1_c0_c1_c0_c1_c0;
+ }
+ _output = color;
+ return _output;
+}
+float _guarded_divide(float n, float d) {
+ return n / d;
+}
+float _color_dodge_component(float sc, float sa, float dc, float da) {
+ if (dc == 0.0) {
+ return sc * (1.0 - da);
+ } else {
+ float d = sa - sc;
+ if (d == 0.0) {
+ return (sa * da + sc * (1.0 - da)) + dc * (1.0 - sa);
+ }
+ d = min(da, _guarded_divide(dc * sa, d));
+ return (d * sa + sc * (1.0 - da)) + dc * (1.0 - sa);
+ }
+}
+vec4 blend_color_dodge(vec4 src, vec4 dst) {
+ return vec4(_color_dodge_component(src.x, src.w, dst.x, dst.w), _color_dodge_component(src.y, src.w, dst.y, dst.w), _color_dodge_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+}
+vec4 ComposeTwo_Stage1_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_color_dodge(GaussianConvolution_Stage1_c1_c0_c1_c0_c0_c0(inputColor), AlphaThresholdFragmentProcessor_Stage1_c1_c0_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 blend_darken(vec4 src, vec4 dst) {
+ vec4 result = blend_src_over(src, dst);
+ result.xyz = min(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
+ return result;
+}
+vec4 ComposeTwo_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_darken(ComposeTwo_Stage1_c1_c0_c0_c0(inputColor), ComposeTwo_Stage1_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 blend_hue(vec4 src, vec4 dst) {
+ float alpha = dst.w * src.w;
+ vec3 sda = src.xyz * dst.w;
+ vec3 dsa = dst.xyz * src.w;
+ return vec4((((_blend_set_color_luminance(_blend_set_color_saturation(sda, dsa), alpha, dsa) + dst.xyz) - dsa) + src.xyz) - sda, (src.w + dst.w) - alpha);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vinColor_Stage0;
+ vec2 offset = vEllipseOffsets_Stage0;
+ float test = dot(offset, offset) - 1.0;
+ vec2 grad = (2.0 * offset) * vEllipseRadii_Stage0.xy;
+ float grad_dot = dot(grad, grad);
+ grad_dot = max(grad_dot, 1.1754999560161448e-38);
+ float invlen = inversesqrt(grad_dot);
+ float edgeAlpha = clamp(0.5 - test * invlen, 0.0, 1.0);
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_hue(ComposeTwo_Stage1_c0_c0(inputColor), ComposeTwo_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ sk_FragColor = outputCoverage_Stage0 * output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+uniform mat3 uCoordTransformMatrix_3_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec2 inEllipseOffset;
+in vec4 inEllipseRadii;
+noperspective out vec2 vEllipseOffsets_Stage0;
+noperspective out vec4 vEllipseRadii_Stage0;
+noperspective out vec4 vinColor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+noperspective out vec2 vTransformedCoords_3_Stage0;
+void main() {
+ vEllipseOffsets_Stage0 = inEllipseOffset;
+ vEllipseRadii_Stage0 = inEllipseRadii;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_3_Stage0 = (uCoordTransformMatrix_3_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1357.shader_test b/shaders/skia/1357.shader_test
new file mode 100644
index 0000000..93995b7
--- /dev/null
+++ b/shaders/skia/1357.shader_test
@@ -0,0 +1,126 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_KHR_blend_equation_advanced : require
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+layout (blend_support_all_equations) out ;
+uniform vec2 uImageIncrement_Stage1_c0_c0;
+uniform vec4 uKernel_Stage1_c0_c0[2];
+uniform vec4 ucircleData_Stage1_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+in vec2 vTextureCoords_Stage0;
+flat in int vTexIndex_Stage0;
+in vec2 vIntTextureCoords_Stage0;
+in vec4 vinColor_Stage0;
+in vec2 vTransformedCoords_0_Stage0;
+vec4 GaussianConvolution_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0 - 3.0 * uImageIncrement_Stage1_c0_c0;
+ vec2 coordSampled = vec2(0.0, 0.0);
+ coordSampled = coord;
+ _output += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1_c0_c0[0].x;
+ coord += uImageIncrement_Stage1_c0_c0;
+ coordSampled = coord;
+ _output += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1_c0_c0[0].y;
+ coord += uImageIncrement_Stage1_c0_c0;
+ coordSampled = coord;
+ _output += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1_c0_c0[0].z;
+ coord += uImageIncrement_Stage1_c0_c0;
+ coordSampled = coord;
+ _output += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1_c0_c0[0].w;
+ coord += uImageIncrement_Stage1_c0_c0;
+ coordSampled = coord;
+ _output += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1_c0_c0[1].x;
+ coord += uImageIncrement_Stage1_c0_c0;
+ coordSampled = coord;
+ _output += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1_c0_c0[1].y;
+ coord += uImageIncrement_Stage1_c0_c0;
+ coordSampled = coord;
+ _output += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1_c0_c0[1].z;
+ coord += uImageIncrement_Stage1_c0_c0;
+ _output *= _input;
+ return _output;
+}
+vec4 CircleBlurFragmentProcessor_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 vec = vec2((gl_FragCoord.x - ucircleData_Stage1_c1_c0.x) * ucircleData_Stage1_c1_c0.w, (gl_FragCoord.y - ucircleData_Stage1_c1_c0.y) * ucircleData_Stage1_c1_c0.w);
+ float dist = length(vec) + (0.5 - ucircleData_Stage1_c1_c0.z) * ucircleData_Stage1_c1_c0.w;
+ _output = _input * texture(uTextureSampler_1_Stage1, vec2(dist, 0.5)).w;
+ return _output;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vinColor_Stage0;
+ vec2 uv = vTextureCoords_Stage0;
+ vec4 texColor;
+ {
+ texColor = texture(uTextureSampler_0_Stage0, uv);
+ }
+ float distance = 7.96875 * (texColor.x - 0.50196081399917603);
+ float afwidth;
+ vec2 dist_grad = vec2(dFdx(distance), -dFdy(distance));
+ float dg_len2 = dot(dist_grad, dist_grad);
+ if (dg_len2 < 9.9999997473787516e-05) {
+ dist_grad = vec2(0.70709997415542603, 0.70709997415542603);
+ } else {
+ dist_grad = dist_grad * inversesqrt(dg_len2);
+ }
+ vec2 Jdx = dFdx(vIntTextureCoords_Stage0);
+ vec2 Jdy = -dFdy(vIntTextureCoords_Stage0);
+ vec2 grad = vec2(dist_grad.x * Jdx.x + dist_grad.y * Jdy.x, dist_grad.x * Jdx.y + dist_grad.y * Jdy.y);
+ afwidth = 0.64999997615814209 * length(grad);
+ float val = smoothstep(-afwidth, afwidth, distance);
+ outputCoverage_Stage0 = vec4(val);
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_src_over(GaussianConvolution_Stage1_c0_c0(inputColor), CircleBlurFragmentProcessor_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ sk_FragColor = outputCoverage_Stage0 * output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform vec2 uAtlasDimensionsInv_Stage0;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in uvec2 inTextureCoords;
+out vec2 vTextureCoords_Stage0;
+flat out int vTexIndex_Stage0;
+out vec2 vIntTextureCoords_Stage0;
+out vec4 vinColor_Stage0;
+out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ ivec2 signedCoords = ivec2(int(inTextureCoords.x), int(inTextureCoords.y));
+ vec2 unormTexCoords = vec2(float(signedCoords.x / 2), float(signedCoords.y / 2));
+ vTextureCoords_Stage0 = unormTexCoords * uAtlasDimensionsInv_Stage0;
+ vTexIndex_Stage0 = 0;
+ vIntTextureCoords_Stage0 = unormTexCoords;
+ vinColor_Stage0 = inColor;
+ vec3 pos3 = uViewM_Stage0 * vec3(inPosition, 1.0);
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos3.x, pos3.y, 0.0, pos3.z);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/136-12.shader_test b/shaders/skia/136-12.shader_test
new file mode 100644
index 0000000..3edcd82
--- /dev/null
+++ b/shaders/skia/136-12.shader_test
@@ -0,0 +1,386 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_KHR_blend_equation_advanced : require
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+layout (blend_support_all_equations) out ;
+uniform vec4 uinnerRect_Stage1_c0_c0_c0_c0_c0_c0;
+uniform vec2 uradiusPlusHalf_Stage1_c0_c0_c0_c0_c0_c0;
+uniform vec4 urectUniform_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec2 uImageIncrement_Stage1_c0_c0_c1_c0;
+uniform float uSurfaceScale_Stage1_c0_c0_c1_c0;
+uniform vec3 uLightColor_Stage1_c0_c0_c1_c0;
+uniform float uKD_Stage1_c0_c0_c1_c0;
+uniform vec4 uTexDom_Stage1_c0_c0_c1_c0;
+uniform vec3 uDecalParams_Stage1_c0_c0_c1_c0;
+uniform vec3 uLightDirection_Stage1_c0_c0_c1_c0;
+uniform mat4 um_Stage1_c1_c0_c1_c0_c0_c0;
+uniform vec4 uv_Stage1_c1_c0_c1_c0_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in float vinCoverage_Stage0;
+vec4 CircularRRect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 dxy0 = uinnerRect_Stage1_c0_c0_c0_c0_c0_c0.xy - gl_FragCoord.xy;
+ vec2 dxy1 = gl_FragCoord.xy - uinnerRect_Stage1_c0_c0_c0_c0_c0_c0.zw;
+ vec2 dxy = max(max(dxy0, dxy1), 0.0);
+ float alpha = clamp(uradiusPlusHalf_Stage1_c0_c0_c0_c0_c0_c0.x - length(dxy), 0.0, 1.0);
+ _output = _input * alpha;
+ return _output;
+}
+vec4 AARectEffect_Stage1_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float alpha;
+ {
+ float xSub, ySub;
+ xSub = min(gl_FragCoord.x - urectUniform_Stage1_c0_c0_c0_c0_c1_c0.x, 0.0);
+ xSub += min(urectUniform_Stage1_c0_c0_c0_c0_c1_c0.z - gl_FragCoord.x, 0.0);
+ ySub = min(gl_FragCoord.y - urectUniform_Stage1_c0_c0_c0_c0_c1_c0.y, 0.0);
+ ySub += min(urectUniform_Stage1_c0_c0_c0_c0_c1_c0.w - gl_FragCoord.y, 0.0);
+ alpha = (1.0 + max(xSub, -1.0)) * (1.0 + max(ySub, -1.0));
+ }
+ _output = _input * alpha;
+ return _output;
+}
+float _blend_color_saturation(vec3 color) {
+ return max(max(color.x, color.y), color.z) - min(min(color.x, color.y), color.z);
+}
+vec3 _blend_set_color_saturation_helper(vec3 minMidMax, float sat) {
+ if (minMidMax.x < minMidMax.z) {
+ return vec3(0.0, (sat * (minMidMax.y - minMidMax.x)) / (minMidMax.z - minMidMax.x), sat);
+ }
+ return vec3(0.0);
+}
+vec3 _blend_set_color_saturation(vec3 hueLumColor, vec3 satColor) {
+ float sat = _blend_color_saturation(satColor);
+ if (hueLumColor.x <= hueLumColor.y) {
+ if (hueLumColor.y <= hueLumColor.z) {
+ hueLumColor.xyz = _blend_set_color_saturation_helper(hueLumColor, sat);
+ } else if (hueLumColor.x <= hueLumColor.z) {
+ hueLumColor.xzy = _blend_set_color_saturation_helper(hueLumColor.xzy, sat);
+ } else {
+ hueLumColor.zxy = _blend_set_color_saturation_helper(hueLumColor.zxy, sat);
+ }
+ } else if (hueLumColor.x <= hueLumColor.z) {
+ hueLumColor.yxz = _blend_set_color_saturation_helper(hueLumColor.yxz, sat);
+ } else if (hueLumColor.y <= hueLumColor.z) {
+ hueLumColor.yzx = _blend_set_color_saturation_helper(hueLumColor.yzx, sat);
+ } else {
+ hueLumColor.zyx = _blend_set_color_saturation_helper(hueLumColor.zyx, sat);
+ }
+ return hueLumColor;
+}
+float _blend_color_luminance(vec3 color) {
+ return dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), color);
+}
+vec3 _blend_set_color_luminance(vec3 hueSatColor, float alpha, vec3 lumColor) {
+ float lum = _blend_color_luminance(lumColor);
+ vec3 result = (lum - _blend_color_luminance(hueSatColor)) + hueSatColor;
+ float minComp = min(min(result.x, result.y), result.z);
+ float maxComp = max(max(result.x, result.y), result.z);
+ if (minComp < 0.0 && lum != minComp) {
+ result = lum + ((result - lum) * lum) / (lum - minComp);
+ }
+ if (maxComp > alpha && maxComp != lum) {
+ return lum + ((result - lum) * (alpha - lum)) / (maxComp - lum);
+ }
+ return result;
+}
+vec4 blend_saturation(vec4 src, vec4 dst) {
+ float alpha = dst.w * src.w;
+ vec3 sda = src.xyz * dst.w;
+ vec3 dsa = dst.xyz * src.w;
+ return vec4((((_blend_set_color_luminance(_blend_set_color_saturation(dsa, sda), alpha, dsa) + dst.xyz) - dsa) + src.xyz) - sda, (src.w + dst.w) - alpha);
+}
+vec4 ComposeTwo_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_saturation(CircularRRect_Stage1_c0_c0_c0_c0_c0_c0(inputColor), AARectEffect_Stage1_c0_c0_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 light_Stage1_c0_c0_c1_c0(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ float colorScale = uKD_Stage1_c0_c0_c1_c0 * dot(normal, surfaceToLight);
+ return vec4(lightColor * clamp(colorScale, 0.0, 1.0), 1.0);
+}
+float sobel_Stage1_c0_c0_c1_c0(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage1_c0_c0_c1_c0(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage1_c0_c0_c1_c0(float m[9], float surfaceScale) {
+ return pointToNormal_Stage1_c0_c0_c1_c0(sobel_Stage1_c0_c0_c1_c0(m[1], m[2], m[4], m[5], 0.0, 0.0, 0.66666698455810547), sobel_Stage1_c0_c0_c1_c0(0.0, 0.0, m[1], m[4], m[2], m[5], 0.66666698455810547), surfaceScale);
+}
+vec4 DiffuseLighting_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coord = vTransformedCoords_0_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage1_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c1_c0.xy, uTexDom_Stage1_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp0 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c1_c0.xy, uTexDom_Stage1_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c1_c0.xy, uTexDom_Stage1_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage1_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c1_c0.xy, uTexDom_Stage1_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c1_c0.xy, uTexDom_Stage1_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c1_c0.xy, uTexDom_Stage1_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp5 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage1_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c1_c0.xy, uTexDom_Stage1_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp6 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage1_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c1_c0.xy, uTexDom_Stage1_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp7 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage1_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c1_c0.xy, uTexDom_Stage1_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp8 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = uLightDirection_Stage1_c0_c0_c1_c0;
+ _output = light_Stage1_c0_c0_c1_c0(normal_Stage1_c0_c0_c1_c0(m, uSurfaceScale_Stage1_c0_c0_c1_c0), surfaceToLight, uLightColor_Stage1_c0_c0_c1_c0);
+ _output *= _input;
+ return _output;
+}
+vec4 blend_dst_atop(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src + src.w * dst;
+}
+vec4 ComposeTwo_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_dst_atop(ComposeTwo_Stage1_c0_c0_c0_c0(inputColor), DiffuseLighting_Stage1_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_1_Stage1, vTransformedCoords_1_Stage0) * _input;
+ return _output;
+}
+vec4 ColorMatrixFragmentProcessor_Stage1_c1_c0_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = _input;
+ {
+ float nonZeroAlpha = max(inputColor.w, 9.9999997473787516e-05);
+ inputColor = vec4(inputColor.xyz / nonZeroAlpha, inputColor.w);
+ }
+ _output = um_Stage1_c1_c0_c1_c0_c0_c0 * inputColor + uv_Stage1_c1_c0_c1_c0_c0_c0;
+ {
+ _output.w = clamp(_output.w, 0.0, 1.0);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 ConfigConversionEffect_Stage1_c1_c0_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = floor(_input * 255.0 + 0.5) / 255.0;
+ {
+ _output.xyz = floor((_output.xyz * _output.w) * 255.0 + 0.5) / 255.0;
+ }
+ return _output;
+}
+float _blend_overlay_component(float sc, float sa, float dc, float da) {
+ if (2.0 * dc <= da) {
+ return (2.0 * sc) * dc;
+ }
+ return sa * da - (2.0 * (da - dc)) * (sa - sc);
+}
+vec4 blend_overlay(vec4 src, vec4 dst) {
+ vec4 result = vec4(_blend_overlay_component(src.x, src.w, dst.x, dst.w), _blend_overlay_component(src.y, src.w, dst.y, dst.w), _blend_overlay_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+ result.xyz += dst.xyz * (1.0 - src.w) + src.xyz * (1.0 - dst.w);
+ return result;
+}
+vec4 blend_hard_light(vec4 src, vec4 dst) {
+ return blend_overlay(dst, src);
+}
+vec4 ComposeTwo_Stage1_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_hard_light(ColorMatrixFragmentProcessor_Stage1_c1_c0_c1_c0_c0_c0(inputColor), ConfigConversionEffect_Stage1_c1_c0_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 blend_src_out(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src;
+}
+vec4 ComposeTwo_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_src_out(TextureEffect_Stage1_c1_c0_c0_c0(inputColor), ComposeTwo_Stage1_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 blend_color(vec4 src, vec4 dst) {
+ float alpha = dst.w * src.w;
+ vec3 sda = src.xyz * dst.w;
+ vec3 dsa = dst.xyz * src.w;
+ return vec4((((_blend_set_color_luminance(sda, alpha, dsa) + dst.xyz) - dsa) + src.xyz) - sda, (src.w + dst.w) - alpha);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ float alpha = 1.0;
+ alpha = vinCoverage_Stage0;
+ outputCoverage_Stage0 = vec4(alpha);
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_color(ComposeTwo_Stage1_c0_c0(inputColor), ComposeTwo_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ sk_FragColor = outputCoverage_Stage0 * output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in float inCoverage;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out float vinCoverage_Stage0;
+void main() {
+ vec4 color = inColor;
+ vcolor_Stage0 = color;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(inPosition, 1.0)).xy;
+ vinCoverage_Stage0 = inCoverage;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/136-13.shader_test b/shaders/skia/136-13.shader_test
new file mode 100644
index 0000000..e7c373e
--- /dev/null
+++ b/shaders/skia/136-13.shader_test
@@ -0,0 +1,71 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uCoordTransformMatrix_2_Stage0;
+uniform vec4 usubset_Stage2_c0_c0;
+uniform vec4 uclamp_Stage2_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 TextureEffect_Stage2_c0_c0(vec4 _input, vec2 _coords) {
+ _coords = _coords * uCoordTransformMatrix_2_Stage0.xz + uCoordTransformMatrix_2_Stage0.yw;
+ vec4 _output;
+ vec2 inCoord = _coords;
+ vec2 subsetCoord;
+ subsetCoord.x = mod(inCoord.x - usubset_Stage2_c0_c0.x, usubset_Stage2_c0_c0.z - usubset_Stage2_c0_c0.x) + usubset_Stage2_c0_c0.x;
+ subsetCoord.y = inCoord.y;
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage2_c0_c0.x, uclamp_Stage2_c0_c0.z);
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage2_c0_c0.y, uclamp_Stage2_c0_c0.w);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ _output = _input * textureColor;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ float coord = vTransformedCoords_1_Stage0.x - 0.5;
+ float f = fract(coord);
+ coord += 0.5 - f;
+ float f2 = f * f;
+ vec4 w = mat4(0.055555555555555552, 0.88888888888888884, 0.055555555555555552, 0.0, -0.5, 0.0, 0.5, 0.0, 0.83333333333333337, -2.0, 1.5, -0.33333333333333331, -0.3888888888888889, 1.1666666666666667, -1.1666666666666667, 0.3888888888888889) * vec4(1.0, f, f2, f2 * f);
+ vec4 c[4];
+ c[0] = TextureEffect_Stage2_c0_c0(vec4(1.0), vec2(coord + -1.0, vTransformedCoords_1_Stage0.y));
+ c[1] = TextureEffect_Stage2_c0_c0(vec4(1.0), vec2(coord, vTransformedCoords_1_Stage0.y));
+ c[2] = TextureEffect_Stage2_c0_c0(vec4(1.0), vec2(coord + 1.0, vTransformedCoords_1_Stage0.y));
+ c[3] = TextureEffect_Stage2_c0_c0(vec4(1.0), vec2(coord + 2.0, vTransformedCoords_1_Stage0.y));
+ vec4 bicubicColor = ((c[0] * w.x + c[1] * w.y) + c[2] * w.z) + c[3] * w.w;
+ bicubicColor.xyz = max(vec3(0.0), min(bicubicColor.xyz, bicubicColor.www));
+ output_Stage2 = bicubicColor * output_Stage1;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/136-14.shader_test b/shaders/skia/136-14.shader_test
new file mode 100644
index 0000000..5c6f749
--- /dev/null
+++ b/shaders/skia/136-14.shader_test
@@ -0,0 +1,140 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage2;
+uniform vec2 uBounds_Stage2;
+uniform vec4 uKernel_Stage2[6];
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_1_Stage0 - 11.0 * uImageIncrement_Stage2;
+ vec2 coordSampled = vec2(0.0, 0.0);
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage2.x, uBounds_Stage2.y - uBounds_Stage2.x) + uBounds_Stage2.x;
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[0].x;
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage2.x, uBounds_Stage2.y - uBounds_Stage2.x) + uBounds_Stage2.x;
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[0].y;
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage2.x, uBounds_Stage2.y - uBounds_Stage2.x) + uBounds_Stage2.x;
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[0].z;
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage2.x, uBounds_Stage2.y - uBounds_Stage2.x) + uBounds_Stage2.x;
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[0].w;
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage2.x, uBounds_Stage2.y - uBounds_Stage2.x) + uBounds_Stage2.x;
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[1].x;
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage2.x, uBounds_Stage2.y - uBounds_Stage2.x) + uBounds_Stage2.x;
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[1].y;
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage2.x, uBounds_Stage2.y - uBounds_Stage2.x) + uBounds_Stage2.x;
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[1].z;
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage2.x, uBounds_Stage2.y - uBounds_Stage2.x) + uBounds_Stage2.x;
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[1].w;
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage2.x, uBounds_Stage2.y - uBounds_Stage2.x) + uBounds_Stage2.x;
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[2].x;
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage2.x, uBounds_Stage2.y - uBounds_Stage2.x) + uBounds_Stage2.x;
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[2].y;
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage2.x, uBounds_Stage2.y - uBounds_Stage2.x) + uBounds_Stage2.x;
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[2].z;
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage2.x, uBounds_Stage2.y - uBounds_Stage2.x) + uBounds_Stage2.x;
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[2].w;
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage2.x, uBounds_Stage2.y - uBounds_Stage2.x) + uBounds_Stage2.x;
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[3].x;
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage2.x, uBounds_Stage2.y - uBounds_Stage2.x) + uBounds_Stage2.x;
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[3].y;
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage2.x, uBounds_Stage2.y - uBounds_Stage2.x) + uBounds_Stage2.x;
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[3].z;
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage2.x, uBounds_Stage2.y - uBounds_Stage2.x) + uBounds_Stage2.x;
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[3].w;
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage2.x, uBounds_Stage2.y - uBounds_Stage2.x) + uBounds_Stage2.x;
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[4].x;
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage2.x, uBounds_Stage2.y - uBounds_Stage2.x) + uBounds_Stage2.x;
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[4].y;
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage2.x, uBounds_Stage2.y - uBounds_Stage2.x) + uBounds_Stage2.x;
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[4].z;
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage2.x, uBounds_Stage2.y - uBounds_Stage2.x) + uBounds_Stage2.x;
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[4].w;
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage2.x, uBounds_Stage2.y - uBounds_Stage2.x) + uBounds_Stage2.x;
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[5].x;
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage2.x, uBounds_Stage2.y - uBounds_Stage2.x) + uBounds_Stage2.x;
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[5].y;
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage2.x, uBounds_Stage2.y - uBounds_Stage2.x) + uBounds_Stage2.x;
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[5].z;
+ coord += uImageIncrement_Stage2;
+ output_Stage2 *= output_Stage1;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/136-2.shader_test b/shaders/skia/136-2.shader_test
new file mode 100644
index 0000000..389c6c7
--- /dev/null
+++ b/shaders/skia/136-2.shader_test
@@ -0,0 +1,142 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage2;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.w) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ } else {
+ {
+ if (t < uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+vec4 ComposeOne_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_dst_in(_input, TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0)));
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = ComposeOne_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_src_in(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ {
+ output_Stage2 = output_Stage1 * ucolor_Stage2;
+ }
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 inColor;
+in vec2 inLocalCoord;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/136-4.shader_test b/shaders/skia/136-4.shader_test
new file mode 100644
index 0000000..ed4bb6f
--- /dev/null
+++ b/shaders/skia/136-4.shader_test
@@ -0,0 +1,79 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage2_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c1_c0;
+ }
+ return _output;
+}
+vec4 blend_dst_out(vec4 src, vec4 dst) {
+ return (1.0 - src.w) * dst;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_dst_out(ConstColorProcessor_Stage2_c1_c0(vec4(1.0)), output_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/136-5.shader_test b/shaders/skia/136-5.shader_test
new file mode 100644
index 0000000..133e36c
--- /dev/null
+++ b/shaders/skia/136-5.shader_test
@@ -0,0 +1,138 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform float uSurfaceScale_Stage1;
+uniform vec3 uLightColor_Stage1;
+uniform float uKS_Stage1;
+uniform float uShininess_Stage1;
+uniform vec3 uLightDirection_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 light_Stage1(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ vec3 halfDir = normalize(surfaceToLight + vec3(0.0, 0.0, 1.0));
+ float colorScale = uKS_Stage1 * pow(dot(normal, halfDir), uShininess_Stage1);
+ vec3 color = lightColor * clamp(colorScale, 0.0, 1.0);
+ return vec4(color, max(max(color.x, color.y), color.z));
+}
+float sobel_Stage1(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage1(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage1(float m[9], float surfaceScale) {
+ return pointToNormal_Stage1(sobel_Stage1(m[0], m[2], m[3], m[5], 0.0, 0.0, 0.33333298563957214), sobel_Stage1(m[0], m[3], m[1], m[4], m[2], m[5], 0.5), surfaceScale);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ vec2 coord = vTransformedCoords_0_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp0 = textureColor;
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp1 = textureColor;
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp2 = textureColor;
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp3 = textureColor;
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp4 = textureColor;
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp5 = textureColor;
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp6 = textureColor;
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp7 = textureColor;
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp8 = textureColor;
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = uLightDirection_Stage1;
+ output_Stage1 = light_Stage1(normal_Stage1(m, uSurfaceScale_Stage1), surfaceToLight, uLightColor_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/136-6.shader_test b/shaders/skia/136-6.shader_test
new file mode 100644
index 0000000..64bdc20
--- /dev/null
+++ b/shaders/skia/136-6.shader_test
@@ -0,0 +1,103 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+uniform vec2 uDstTextureUpperLeft_Stage2;
+uniform vec2 uDstTextureCoordScale_Stage2;
+uniform sampler2D uTextureSampler_0_Stage0;
+uniform sampler2D uDstTextureSampler_Stage2;
+noperspective in vec2 vTextureCoords_Stage0;
+flat in int vTexIndex_Stage0;
+noperspective in vec4 vinColor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ t.x = fract(t.x);
+ }
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 blend_darken(vec4 src, vec4 dst) {
+ vec4 result = blend_src_over(src, dst);
+ result.xyz = min(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
+ return result;
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ vec4 texColor;
+ {
+ texColor = texture(uTextureSampler_0_Stage0, vTextureCoords_Stage0);
+ }
+ outputCoverage_Stage0 = texColor;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TiledGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ if (all(lessThanEqual(outputCoverage_Stage0.xyz, vec3(0.0)))) {
+ discard;
+ }
+ vec2 _dstTexCoord = (gl_FragCoord.xy - uDstTextureUpperLeft_Stage2) * uDstTextureCoordScale_Stage2;
+ _dstTexCoord.y = 1.0 - _dstTexCoord.y;
+ vec4 _dstColor = texture(uDstTextureSampler_Stage2, _dstTexCoord);
+ sk_FragColor = blend_darken(output_Stage1, _dstColor);
+ float lerpRed = mix(_dstColor.w, sk_FragColor.w, outputCoverage_Stage0.x);
+ float lerpBlue = mix(_dstColor.w, sk_FragColor.w, outputCoverage_Stage0.y);
+ float lerpGreen = mix(_dstColor.w, sk_FragColor.w, outputCoverage_Stage0.z);
+ sk_FragColor = outputCoverage_Stage0 * sk_FragColor + (vec4(1.0) - outputCoverage_Stage0) * _dstColor;
+ sk_FragColor.w = max(max(lerpRed, lerpBlue), lerpGreen);
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform vec2 uAtlasSizeInv_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in uvec2 inTextureCoords;
+noperspective out vec2 vTextureCoords_Stage0;
+flat out int vTexIndex_Stage0;
+noperspective out vec4 vinColor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ ivec2 signedCoords = ivec2(int(inTextureCoords.x), int(inTextureCoords.y));
+ vec2 unormTexCoords = vec2(float(signedCoords.x / 2), float(signedCoords.y / 2));
+ vTextureCoords_Stage0 = unormTexCoords * uAtlasSizeInv_Stage0;
+ vTexIndex_Stage0 = 0;
+ vinColor_Stage0 = inColor;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(inPosition.x, inPosition.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/136.shader_test b/shaders/skia/136.shader_test
new file mode 100644
index 0000000..f8a970d
--- /dev/null
+++ b/shaders/skia/136.shader_test
@@ -0,0 +1,119 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform float uSrcTF_Stage1_c0_c0[7];
+uniform mat3 uColorXform_Stage1_c0_c0;
+uniform float uDstTF_Stage1_c0_c0[7];
+uniform mat4 um_Stage2;
+uniform vec4 uv_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+vec4 YUVtoRGBEffect_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 planes[1];
+ planes[0] = TextureEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ vec4 color = vec4(planes[0].y, planes[0].z, planes[0].x, planes[0].w);
+ color.xyz *= color.w;
+ _output = color;
+ return _output;
+}
+float src_tf_Stage1_c0_c0(float x) {
+ float G = uSrcTF_Stage1_c0_c0[0];
+ float A = uSrcTF_Stage1_c0_c0[1];
+ float B = uSrcTF_Stage1_c0_c0[2];
+ float C = uSrcTF_Stage1_c0_c0[3];
+ float D = uSrcTF_Stage1_c0_c0[4];
+ float E = uSrcTF_Stage1_c0_c0[5];
+ float F = uSrcTF_Stage1_c0_c0[6];
+ float s = sign(x);
+ x = abs(x);
+ x = x < D ? C * x + F : pow(A * x + B, G) + E;
+ return s * x;
+}
+float dst_tf_Stage1_c0_c0(float x) {
+ float G = uDstTF_Stage1_c0_c0[0];
+ float A = uDstTF_Stage1_c0_c0[1];
+ float B = uDstTF_Stage1_c0_c0[2];
+ float C = uDstTF_Stage1_c0_c0[3];
+ float D = uDstTF_Stage1_c0_c0[4];
+ float E = uDstTF_Stage1_c0_c0[5];
+ float F = uDstTF_Stage1_c0_c0[6];
+ float s = sign(x);
+ x = abs(x);
+ x = x < D ? C * x + F : pow(A * x + B, G) + E;
+ return s * x;
+}
+vec4 gamut_xform_Stage1_c0_c0(vec4 color) {
+ color.xyz = uColorXform_Stage1_c0_c0 * color.xyz;
+ return color;
+}
+vec4 color_xform_Stage1_c0_c0(vec4 color) {
+ float nonZeroAlpha = max(color.w, 9.9999997473787516e-05);
+ color = vec4(color.xyz / nonZeroAlpha, nonZeroAlpha);
+ color.x = src_tf_Stage1_c0_c0(color.x);
+ color.y = src_tf_Stage1_c0_c0(color.y);
+ color.z = src_tf_Stage1_c0_c0(color.z);
+ color = gamut_xform_Stage1_c0_c0(color);
+ color.x = dst_tf_Stage1_c0_c0(color.x);
+ color.y = dst_tf_Stage1_c0_c0(color.y);
+ color.z = dst_tf_Stage1_c0_c0(color.z);
+ color.xyz *= color.w;
+ return color;
+}
+vec4 ColorSpaceXform_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = color_xform_Stage1_c0_c0(YUVtoRGBEffect_Stage1_c0_c0_c0_c0(vec4(1.0))) * _input;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ColorSpaceXform_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ vec4 inputColor = output_Stage1;
+ {
+ float nonZeroAlpha = max(inputColor.w, 9.9999997473787516e-05);
+ inputColor = vec4(inputColor.xyz / nonZeroAlpha, inputColor.w);
+ }
+ output_Stage2 = um_Stage2 * inputColor + uv_Stage2;
+ {
+ output_Stage2 = clamp(output_Stage2, 0.0, 1.0);
+ }
+ {
+ output_Stage2.xyz *= output_Stage2.w;
+ }
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1360.shader_test b/shaders/skia/1360.shader_test
new file mode 100644
index 0000000..1993ff9
--- /dev/null
+++ b/shaders/skia/1360.shader_test
@@ -0,0 +1,338 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_KHR_blend_equation_advanced : require
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+layout (blend_support_all_equations) out ;
+uniform vec2 uScale_Stage1;
+uniform vec4 uTexDom_Stage1;
+uniform vec3 uDecalParams_Stage1;
+uniform vec4 uinnerRect_Stage2_c0_c0;
+uniform vec2 uradiusPlusHalf_Stage2_c0_c0;
+uniform vec3 uedges_Stage2_c1_c0[5];
+uniform vec2 ubaseFrequency_Stage4;
+uniform float uz_Stage4;
+uniform vec2 uImageIncrement_Stage5;
+uniform vec4 uKernel_Stage5[2];
+uniform vec2 uKernelOffset_Stage5;
+uniform float uGain_Stage5;
+uniform float uBias_Stage5;
+uniform sampler2D uTextureSampler_0_Stage0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+uniform sampler2D uTextureSampler_0_Stage4;
+uniform sampler2D uTextureSampler_1_Stage4;
+uniform sampler2D uTextureSampler_0_Stage5;
+in vec2 vTextureCoords_Stage0;
+flat in int vTexIndex_Stage0;
+in vec2 vIntTextureCoords_Stage0;
+in vec4 vinColor_Stage0;
+in vec2 vTransformedCoords_0_Stage0;
+in vec2 vTransformedCoords_1_Stage0;
+in vec2 vTransformedCoords_2_Stage0;
+in vec2 vTransformedCoords_3_Stage0;
+vec4 CircularRRect_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 dxy0 = uinnerRect_Stage2_c0_c0.xy - gl_FragCoord.xy;
+ vec2 dxy1 = gl_FragCoord.xy - uinnerRect_Stage2_c0_c0.zw;
+ vec2 dxy = max(max(dxy0, dxy1), 0.0);
+ float alpha = clamp(uradiusPlusHalf_Stage2_c0_c0.x - length(dxy), 0.0, 1.0);
+ alpha = 1.0 - alpha;
+ _output = _input * alpha;
+ return _output;
+}
+vec4 ConvexPoly_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ float alpha = 1.0;
+ float edge;
+ edge = dot(uedges_Stage2_c1_c0[0], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage2_c1_c0[1], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage2_c1_c0[2], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage2_c1_c0[3], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage2_c1_c0[4], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ alpha = 1.0 - alpha;
+ _output = _input * alpha;
+ return _output;
+}
+vec3 fade_Stage4(vec3 t) {
+ return ((t * t) * t) * (t * (t * 6.0 - 15.0) + 10.0);
+}
+float perm_Stage4(float x) {
+ return texture(uTextureSampler_0_Stage4, vec2(fract(x / 256.0), 0.0)).x * 255.0;
+}
+float grad_Stage4(float x, vec3 p) {
+ return dot(texture(uTextureSampler_1_Stage4, vec2(fract(x / 16.0), 0.0)).xyz * 255.0 - vec3(1.0), p);
+}
+float lerp_Stage4(float a, float b, float w) {
+ return a + w * (b - a);
+}
+float noise_Stage4(vec3 p) {
+ vec3 P = mod(floor(p), 256.0);
+ p -= floor(p);
+ vec3 f = fade_Stage4(p);
+ float A = perm_Stage4(P.x) + P.y;
+ float AA = perm_Stage4(A) + P.z;
+ float AB = perm_Stage4(A + 1.0) + P.z;
+ float B = perm_Stage4(P.x + 1.0) + P.y;
+ float BA = perm_Stage4(B) + P.z;
+ float BB = perm_Stage4(B + 1.0) + P.z;
+ float result = lerp_Stage4(lerp_Stage4(lerp_Stage4(grad_Stage4(perm_Stage4(AA), p), grad_Stage4(perm_Stage4(BA), p + vec3(-1.0, 0.0, 0.0)), f.x), lerp_Stage4(grad_Stage4(perm_Stage4(AB), p + vec3(0.0, -1.0, 0.0)), grad_Stage4(perm_Stage4(BB), p + vec3(-1.0, -1.0, 0.0)), f.x), f.y), lerp_Stage4(lerp_Stage4(grad_Stage4(perm_Stage4(AA + 1.0), p + vec3(0.0, 0.0, -1.0)), grad_Stage4(perm_Stage4(BA + 1.0), p + vec3(-1.0, 0.0, -1.0)), f.x), lerp_Stage4(grad_Stage4(perm_Stage4(AB + 1.0), p + vec3(0.0, -1.0, -1.0)), grad_Stage4(perm_Stage4(BB + 1.0), p + vec3(-1.0, -1.0, -1.0)), f.x), f.y), f.z);
+ return result;
+}
+float noiseOctaves_Stage4(vec3 p) {
+ float result = 0.0;
+ float ratio = 1.0;
+ for (float i = 0.0;i < 5.0; i++) {
+ result += noise_Stage4(p) / ratio;
+ p *= 2.0;
+ ratio *= 2.0;
+ }
+ return (result + 1.0) / 2.0;
+}
+float _guarded_divide(float n, float d) {
+ return n / d;
+}
+float _color_dodge_component(float sc, float sa, float dc, float da) {
+ if (dc == 0.0) {
+ return sc * (1.0 - da);
+ } else {
+ float d = sa - sc;
+ if (d == 0.0) {
+ return (sa * da + sc * (1.0 - da)) + dc * (1.0 - sa);
+ }
+ d = min(da, _guarded_divide(dc * sa, d));
+ return (d * sa + sc * (1.0 - da)) + dc * (1.0 - sa);
+ }
+}
+vec4 blend_color_dodge(vec4 src, vec4 dst) {
+ return vec4(_color_dodge_component(src.x, src.w, dst.x, dst.w), _color_dodge_component(src.y, src.w, dst.y, dst.w), _color_dodge_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ vec2 uv = vTextureCoords_Stage0;
+ vec4 texColor;
+ {
+ texColor = texture(uTextureSampler_0_Stage0, uv);
+ }
+ float distance = 7.96875 * (texColor.x - 0.50196081399917603);
+ float afwidth;
+ vec2 dist_grad = vec2(dFdx(distance), -dFdy(distance));
+ float dg_len2 = dot(dist_grad, dist_grad);
+ if (dg_len2 < 9.9999997473787516e-05) {
+ dist_grad = vec2(0.70709997415542603, 0.70709997415542603);
+ } else {
+ dist_grad = dist_grad * inversesqrt(dg_len2);
+ }
+ vec2 Jdx = dFdx(vIntTextureCoords_Stage0);
+ vec2 Jdy = -dFdy(vIntTextureCoords_Stage0);
+ vec2 grad = vec2(dist_grad.x * Jdx.x + dist_grad.y * Jdy.x, dist_grad.x * Jdx.y + dist_grad.y * Jdy.y);
+ afwidth = 0.64999997615814209 * length(grad);
+ float val = smoothstep(-afwidth, afwidth, distance);
+ outputCoverage_Stage0 = vec4(val);
+ }
+ vec4 output_Stage1;
+ {
+ vec4 dColor = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ dColor.xyz = dColor.w < 9.9999999747524271e-07 ? vec3(0.0) : clamp(dColor.xyz / dColor.w, 0.0, 1.0);
+ vec2 cCoords = vTransformedCoords_1_Stage0 + uScale_Stage1 * (dColor.wy - vec2(0.5));
+ {
+ vec2 origCoord = cCoords;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ output_Stage1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ }
+ vec4 output_Stage2;
+ {
+ vec4 inputColor = vec4(output_Stage1.xyz, 1.0);
+ output_Stage2 = blend_color_dodge(CircularRRect_Stage2_c0_c0(inputColor), ConvexPoly_Stage2_c1_c0(inputColor));
+ output_Stage2 *= output_Stage1.w;
+ }
+ vec4 output_Stage4;
+ {
+ vec2 coords = vTransformedCoords_2_Stage0 * ubaseFrequency_Stage4;
+ float r = noiseOctaves_Stage4(vec3(coords, uz_Stage4));
+ float g = noiseOctaves_Stage4(vec3(coords, uz_Stage4));
+ float b = noiseOctaves_Stage4(vec3(coords, uz_Stage4));
+ float a = noiseOctaves_Stage4(vec3(coords, uz_Stage4));
+ output_Stage4 = vec4(r, g, b, a);
+ output_Stage4 = clamp(output_Stage4, 0.0, 1.0);
+ output_Stage4 = vec4(output_Stage4.xyz * output_Stage4.www, output_Stage4.w);
+ }
+ vec4 output_Stage5;
+ {
+ vec4 sum = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_3_Stage0 - uKernelOffset_Stage5 * uImageIncrement_Stage5;
+ vec4 c;
+ {
+ float k = uKernel_Stage5[0].x;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage5, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage5[0].y;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage5;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage5, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage5[0].z;
+ {
+ vec2 origCoord = coord + vec2(2.0, 0.0) * uImageIncrement_Stage5;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage5, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage5[0].w;
+ {
+ vec2 origCoord = coord + vec2(3.0, 0.0) * uImageIncrement_Stage5;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage5, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage5[1].x;
+ {
+ vec2 origCoord = coord + vec2(4.0, 0.0) * uImageIncrement_Stage5;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage5, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage5[1].y;
+ {
+ vec2 origCoord = coord + vec2(5.0, 0.0) * uImageIncrement_Stage5;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage5, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage5[1].z;
+ {
+ vec2 origCoord = coord + vec2(6.0, 0.0) * uImageIncrement_Stage5;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage5, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ vec2 origCoord = vTransformedCoords_3_Stage0;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage5, clampedCoord);
+ c = textureColor;
+ }
+ output_Stage5.w = c.w;
+ output_Stage5.xyz = clamp(sum.xyz * uGain_Stage5 + uBias_Stage5, 0.0, 1.0);
+ output_Stage5.xyz *= output_Stage5.w;
+ output_Stage5 *= output_Stage4;
+ }
+ vec4 output_Stage6;
+ {
+ output_Stage6 = output_Stage5;
+ }
+ {
+ sk_FragColor = outputCoverage_Stage0 * output_Stage6;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform vec2 uAtlasDimensionsInv_Stage0;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+uniform mat3 uCoordTransformMatrix_3_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in uvec2 inTextureCoords;
+out vec2 vTextureCoords_Stage0;
+flat out int vTexIndex_Stage0;
+out vec2 vIntTextureCoords_Stage0;
+out vec4 vinColor_Stage0;
+out vec2 vTransformedCoords_0_Stage0;
+out vec2 vTransformedCoords_1_Stage0;
+out vec2 vTransformedCoords_2_Stage0;
+out vec2 vTransformedCoords_3_Stage0;
+void main() {
+ ivec2 signedCoords = ivec2(int(inTextureCoords.x), int(inTextureCoords.y));
+ vec2 unormTexCoords = vec2(float(signedCoords.x / 2), float(signedCoords.y / 2));
+ vTextureCoords_Stage0 = unormTexCoords * uAtlasDimensionsInv_Stage0;
+ vTexIndex_Stage0 = 0;
+ vIntTextureCoords_Stage0 = unormTexCoords;
+ vinColor_Stage0 = inColor;
+ vec3 pos3 = uViewM_Stage0 * vec3(inPosition, 1.0);
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_3_Stage0 = (uCoordTransformMatrix_3_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos3.x, pos3.y, 0.0, pos3.z);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1366.shader_test b/shaders/skia/1366.shader_test
new file mode 100644
index 0000000..e3b9dad
--- /dev/null
+++ b/shaders/skia/1366.shader_test
@@ -0,0 +1,133 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_KHR_blend_equation_advanced : require
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+layout (blend_support_all_equations) out ;
+uniform vec2 ubaseFrequency_Stage1_c0_c0_c1_c0;
+uniform float uz_Stage1_c0_c0_c1_c0;
+uniform vec4 urectH_Stage1_c1_c0;
+uniform float uinvSixSigma_Stage1_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+uniform sampler2D uTextureSampler_2_Stage1;
+uniform sampler2D uTextureSampler_3_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 ColorTableEffect_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float nonZeroAlpha = max(_input.w, 9.9999997473787516e-05);
+ vec4 coord = vec4(_input.xyz / nonZeroAlpha, nonZeroAlpha);
+ coord = coord * 0.9960939884185791 + vec4(0.0019529999699443579, 0.0019529999699443579, 0.0019529999699443579, 0.0019529999699443579);
+ _output.w = texture(uTextureSampler_0_Stage1, vec2(coord.w, 0.125)).w;
+ _output.x = texture(uTextureSampler_0_Stage1, vec2(coord.x, 0.375)).w;
+ _output.y = texture(uTextureSampler_0_Stage1, vec2(coord.y, 0.625)).w;
+ _output.z = texture(uTextureSampler_0_Stage1, vec2(coord.z, 0.875)).w;
+ _output.xyz *= _output.w;
+ return _output;
+}
+vec3 fade_Stage1_c0_c0_c1_c0(vec3 t) {
+ return ((t * t) * t) * (t * (t * 6.0 - 15.0) + 10.0);
+}
+float perm_Stage1_c0_c0_c1_c0(float x) {
+ return texture(uTextureSampler_1_Stage1, vec2(fract(x / 256.0), 0.0)).x * 255.0;
+}
+float grad_Stage1_c0_c0_c1_c0(float x, vec3 p) {
+ return dot(texture(uTextureSampler_2_Stage1, vec2(fract(x / 16.0), 0.0)).xyz * 255.0 - vec3(1.0), p);
+}
+float lerp_Stage1_c0_c0_c1_c0(float a, float b, float w) {
+ return a + w * (b - a);
+}
+float noise_Stage1_c0_c0_c1_c0(vec3 p) {
+ vec3 P = mod(floor(p), 256.0);
+ p -= floor(p);
+ vec3 f = fade_Stage1_c0_c0_c1_c0(p);
+ float A = perm_Stage1_c0_c0_c1_c0(P.x) + P.y;
+ float AA = perm_Stage1_c0_c0_c1_c0(A) + P.z;
+ float AB = perm_Stage1_c0_c0_c1_c0(A + 1.0) + P.z;
+ float B = perm_Stage1_c0_c0_c1_c0(P.x + 1.0) + P.y;
+ float BA = perm_Stage1_c0_c0_c1_c0(B) + P.z;
+ float BB = perm_Stage1_c0_c0_c1_c0(B + 1.0) + P.z;
+ float result = lerp_Stage1_c0_c0_c1_c0(lerp_Stage1_c0_c0_c1_c0(lerp_Stage1_c0_c0_c1_c0(grad_Stage1_c0_c0_c1_c0(perm_Stage1_c0_c0_c1_c0(AA), p), grad_Stage1_c0_c0_c1_c0(perm_Stage1_c0_c0_c1_c0(BA), p + vec3(-1.0, 0.0, 0.0)), f.x), lerp_Stage1_c0_c0_c1_c0(grad_Stage1_c0_c0_c1_c0(perm_Stage1_c0_c0_c1_c0(AB), p + vec3(0.0, -1.0, 0.0)), grad_Stage1_c0_c0_c1_c0(perm_Stage1_c0_c0_c1_c0(BB), p + vec3(-1.0, -1.0, 0.0)), f.x), f.y), lerp_Stage1_c0_c0_c1_c0(lerp_Stage1_c0_c0_c1_c0(grad_Stage1_c0_c0_c1_c0(perm_Stage1_c0_c0_c1_c0(AA + 1.0), p + vec3(0.0, 0.0, -1.0)), grad_Stage1_c0_c0_c1_c0(perm_Stage1_c0_c0_c1_c0(BA + 1.0), p + vec3(-1.0, 0.0, -1.0)), f.x), lerp_Stage1_c0_c0_c1_c0(grad_Stage1_c0_c0_c1_c0(perm_Stage1_c0_c0_c1_c0(AB + 1.0), p + vec3(0.0, -1.0, -1.0)), grad_Stage1_c0_c0_c1_c0(perm_Stage1_c0_c0_c1_c0(BB + 1.0), p + vec3(-1.0, -1.0, -1.0)), f.x), f.y), f.z);
+ return result;
+}
+float noiseOctaves_Stage1_c0_c0_c1_c0(vec3 p) {
+ float result = 0.0;
+ float ratio = 1.0;
+ for (float i = 0.0;i < 7.0; i++) {
+ result += noise_Stage1_c0_c0_c1_c0(p) / ratio;
+ p *= 2.0;
+ ratio *= 2.0;
+ }
+ return (result + 1.0) / 2.0;
+}
+vec4 ImprovedPerlinNoise_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coords = vTransformedCoords_0_Stage0 * ubaseFrequency_Stage1_c0_c0_c1_c0;
+ float r = noiseOctaves_Stage1_c0_c0_c1_c0(vec3(coords, uz_Stage1_c0_c0_c1_c0));
+ float g = noiseOctaves_Stage1_c0_c0_c1_c0(vec3(coords, uz_Stage1_c0_c0_c1_c0));
+ float b = noiseOctaves_Stage1_c0_c0_c1_c0(vec3(coords, uz_Stage1_c0_c0_c1_c0));
+ float a = noiseOctaves_Stage1_c0_c0_c1_c0(vec3(coords, uz_Stage1_c0_c0_c1_c0));
+ _output = vec4(r, g, b, a);
+ _output = clamp(_output, 0.0, 1.0);
+ _output = vec4(_output.xyz * _output.www, _output.w);
+ return _output;
+}
+vec4 blend_difference(vec4 src, vec4 dst) {
+ return vec4((src.xyz + dst.xyz) - 2.0 * min(src.xyz * dst.w, dst.xyz * src.w), src.w + (1.0 - src.w) * dst.w);
+}
+vec4 ComposeTwo_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_difference(ColorTableEffect_Stage1_c0_c0_c0_c0(inputColor), ImprovedPerlinNoise_Stage1_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 RectBlurEffect_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ float xCoverage, yCoverage;
+ {
+ float x, y;
+ {
+ x = max(urectH_Stage1_c1_c0.x - gl_FragCoord.x, gl_FragCoord.x - urectH_Stage1_c1_c0.z);
+ y = max(urectH_Stage1_c1_c0.y - gl_FragCoord.y, gl_FragCoord.y - urectH_Stage1_c1_c0.w);
+ }
+ xCoverage = texture(uTextureSampler_3_Stage1, vec2(x * uinvSixSigma_Stage1_c1_c0, 0.5)).w;
+ yCoverage = texture(uTextureSampler_3_Stage1, vec2(y * uinvSixSigma_Stage1_c1_c0, 0.5)).w;
+ _output = (_input * xCoverage) * yCoverage;
+ }
+ _output = (_input * xCoverage) * yCoverage;
+ return _output;
+}
+vec4 blend_dst_out(vec4 src, vec4 dst) {
+ return (1.0 - src.w) * dst;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(vec4(1.0).xyz, 1.0);
+ output_Stage1 = blend_dst_out(ComposeTwo_Stage1_c0_c0(inputColor), RectBlurEffect_Stage1_c1_c0(inputColor));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1369.shader_test b/shaders/skia/1369.shader_test
new file mode 100644
index 0000000..c2de22d
--- /dev/null
+++ b/shaders/skia/1369.shader_test
@@ -0,0 +1,180 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_KHR_blend_equation_advanced : require
+out vec4 sk_FragColor;
+layout (blend_support_all_equations) out ;
+uniform vec4 uleftBorderColor_Stage2_c0_c0;
+uniform vec4 urightBorderColor_Stage2_c0_c0;
+uniform vec4 ustart_Stage2_c0_c0_c1_c0;
+uniform vec4 uend_Stage2_c0_c0_c1_c0;
+uniform vec4 uinnerRect_Stage3;
+uniform vec2 uinvRadiiXY_Stage3;
+uniform vec4 uleftBorderColor_Stage4_c1_c0;
+uniform vec4 urightBorderColor_Stage4_c1_c0;
+uniform vec4 uscale0_1_Stage4_c1_c0_c1_c0;
+uniform vec4 uscale2_3_Stage4_c1_c0_c1_c0;
+uniform vec4 uscale4_5_Stage4_c1_c0_c1_c0;
+uniform vec4 uscale6_7_Stage4_c1_c0_c1_c0;
+uniform vec4 uscale8_9_Stage4_c1_c0_c1_c0;
+uniform vec4 ubias0_1_Stage4_c1_c0_c1_c0;
+uniform vec4 ubias2_3_Stage4_c1_c0_c1_c0;
+uniform vec4 ubias4_5_Stage4_c1_c0_c1_c0;
+uniform vec4 ubias6_7_Stage4_c1_c0_c1_c0;
+uniform vec4 ubias8_9_Stage4_c1_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage4_c1_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage4_c1_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+vec4 LinearGradientLayout_Stage2_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_1_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage2_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage2_c0_c0_c1_c0 + t * uend_Stage2_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage2_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage2_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage2_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage2_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 LinearGradientLayout_Stage4_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_2_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage4_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthresholds1_7_Stage4_c1_c0_c1_c0.w) {
+ if (t < uthresholds1_7_Stage4_c1_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage4_c1_c0_c1_c0.x) {
+ scale = uscale0_1_Stage4_c1_c0_c1_c0;
+ bias = ubias0_1_Stage4_c1_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage4_c1_c0_c1_c0;
+ bias = ubias2_3_Stage4_c1_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage4_c1_c0_c1_c0.z) {
+ scale = uscale4_5_Stage4_c1_c0_c1_c0;
+ bias = ubias4_5_Stage4_c1_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage4_c1_c0_c1_c0;
+ bias = ubias6_7_Stage4_c1_c0_c1_c0;
+ }
+ }
+ } else {
+ {
+ {
+ scale = uscale8_9_Stage4_c1_c0_c1_c0;
+ bias = ubias8_9_Stage4_c1_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage4_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage4_c1_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage4_c1_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage4_c1_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage4_c1_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * outputColor_Stage0;
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_dst_in(output_Stage1, ClampedGradientEffect_Stage2_c0_c0(vec4(1.0)));
+ }
+ vec4 output_Stage3;
+ {
+ vec2 dxy0 = uinnerRect_Stage3.xy - gl_FragCoord.xy;
+ vec2 dxy1 = gl_FragCoord.xy - uinnerRect_Stage3.zw;
+ vec2 dxy = max(max(dxy0, dxy1), 0.0);
+ vec2 Z = dxy * uinvRadiiXY_Stage3;
+ float implicit = dot(Z, dxy) - 1.0;
+ float grad_dot = 4.0 * dot(Z, Z);
+ grad_dot = max(grad_dot, 9.9999997473787516e-05);
+ float approx_dist = implicit * inversesqrt(grad_dot);
+ float alpha = clamp(0.5 - approx_dist, 0.0, 1.0);
+ output_Stage3 = output_Stage2 * alpha;
+ }
+ vec4 output_Stage4;
+ {
+ output_Stage4 = blend_dst_in(output_Stage3, ClampedGradientEffect_Stage4_c1_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage4;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+void main() {
+ vec4 color = inColor;
+ vcolor_Stage0 = color;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1372.shader_test b/shaders/skia/1372.shader_test
new file mode 100644
index 0000000..81ca915
--- /dev/null
+++ b/shaders/skia/1372.shader_test
@@ -0,0 +1,51 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in float vinCoverage_Stage0;
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ float alpha = 1.0;
+ alpha = vinCoverage_Stage0;
+ outputCoverage_Stage0 = vec4(alpha);
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * outputCoverage_Stage0;
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = floor(output_Stage1 * 255.0 + 0.5) / 255.0;
+ {
+ output_Stage2.xyz = output_Stage2.w <= 0.0 ? vec3(0.0) : floor((output_Stage2.xyz / output_Stage2.w) * 255.0 + 0.5) / 255.0;
+ }
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in float inCoverage;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out float vinCoverage_Stage0;
+void main() {
+ vec4 color = inColor;
+ vcolor_Stage0 = color;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ vinCoverage_Stage0 = inCoverage;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1375.shader_test b/shaders/skia/1375.shader_test
new file mode 100644
index 0000000..9ee4b3a
--- /dev/null
+++ b/shaders/skia/1375.shader_test
@@ -0,0 +1,146 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uColor_Stage0;
+uniform vec2 ubaseFrequency_Stage1_c0_c0;
+uniform vec2 ustitchData_Stage1_c0_c0;
+uniform vec4 uinnerRect_Stage3_c1_c0;
+uniform vec2 uradiusPlusHalf_Stage3_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+float perlinnoise_Stage1_c0_c0(float chanCoord, vec2 noiseVec, vec2 stitchData) {
+ vec4 floorVal;
+ floorVal.xy = floor(noiseVec);
+ floorVal.zw = floorVal.xy + vec2(1.0);
+ vec2 fractVal = fract(noiseVec);
+ vec2 noiseSmooth = (fractVal * fractVal) * (vec2(3.0) - vec2(2.0) * fractVal);
+ if (floorVal.x >= stitchData.x) {
+ floorVal.x -= stitchData.x;
+ }
+ if (floorVal.y >= stitchData.y) {
+ floorVal.y -= stitchData.y;
+ }
+ if (floorVal.z >= stitchData.x) {
+ floorVal.z -= stitchData.x;
+ }
+ if (floorVal.w >= stitchData.y) {
+ floorVal.w -= stitchData.y;
+ }
+ floorVal = fract(floor(mod(floorVal, 256.0)) / vec4(256.0));
+ vec2 latticeIdx;
+ latticeIdx.x = texture(uTextureSampler_0_Stage1, vec2(floorVal.x, 0.5)).x;
+ latticeIdx.y = texture(uTextureSampler_0_Stage1, vec2(floorVal.z, 0.5)).x;
+ vec4 bcoords = fract(latticeIdx.xyxy + floorVal.yyww);
+ vec2 uv;
+ vec4 lattice = texture(uTextureSampler_1_Stage1, vec2(bcoords.x, chanCoord)).zyxw;
+ uv.x = dot((lattice.yw + lattice.xz * vec2(0.00390625)) * vec2(2.0) - vec2(1.0), fractVal);
+ fractVal.x -= 1.0;
+ lattice = texture(uTextureSampler_1_Stage1, vec2(bcoords.y, chanCoord)).zyxw;
+ uv.y = dot((lattice.yw + lattice.xz * vec2(0.00390625)) * vec2(2.0) - vec2(1.0), fractVal);
+ vec2 ab;
+ ab.x = mix(uv.x, uv.y, noiseSmooth.x);
+ fractVal.y -= 1.0;
+ lattice = texture(uTextureSampler_1_Stage1, vec2(bcoords.w, chanCoord)).zyxw;
+ uv.y = dot((lattice.yw + lattice.xz * vec2(0.00390625)) * vec2(2.0) - vec2(1.0), fractVal);
+ fractVal.x += 1.0;
+ lattice = texture(uTextureSampler_1_Stage1, vec2(bcoords.z, chanCoord)).zyxw;
+ uv.x = dot((lattice.yw + lattice.xz * vec2(0.00390625)) * vec2(2.0) - vec2(1.0), fractVal);
+ ab.y = mix(uv.x, uv.y, noiseSmooth.x);
+ return mix(ab.x, ab.y, noiseSmooth.y);
+}
+vec4 PerlinNoise_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 noiseVec = floor(vTransformedCoords_0_Stage0) * ubaseFrequency_Stage1_c0_c0;
+ _output = vec4(0.0);
+ vec2 stitchData = ustitchData_Stage1_c0_c0;
+ float ratio = 1.0;
+ for (int octave = 0;octave < 10; ++octave) {
+ _output += abs(vec4(perlinnoise_Stage1_c0_c0(0.125, noiseVec, stitchData), perlinnoise_Stage1_c0_c0(0.375, noiseVec, stitchData), perlinnoise_Stage1_c0_c0(0.625, noiseVec, stitchData), perlinnoise_Stage1_c0_c0(0.875, noiseVec, stitchData))) * ratio;
+ noiseVec *= vec2(2.0);
+ ratio *= 0.5;
+ stitchData *= vec2(2.0);
+ }
+ _output = clamp(_output, 0.0, 1.0);
+ _output = vec4(_output.xyz * _output.www, _output.w);
+ return _output;
+}
+vec4 CircularRRect_Stage3_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 dxy0 = uinnerRect_Stage3_c1_c0.xy - gl_FragCoord.xy;
+ vec2 dxy1 = gl_FragCoord.xy - uinnerRect_Stage3_c1_c0.zw;
+ vec2 dxy = max(max(dxy0, dxy1), 0.0);
+ float alpha = clamp(uradiusPlusHalf_Stage3_c1_c0.x - length(dxy), 0.0, 1.0);
+ alpha = 1.0 - alpha;
+ _output = _input * alpha;
+ return _output;
+}
+vec4 ClampFragmentProcessor_Stage3_c2_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = clamp(_input, 0.0, 1.0);
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+vec4 blend_src_out(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = uColor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_dst_in(outputColor_Stage0, PerlinNoise_Stage1_c0_c0(vec4(1.0)));
+ }
+ vec4 output_Stage2;
+ {
+ float nonZeroAlpha = max(output_Stage1.w, 9.9999997473787516e-05);
+ vec4 coord = vec4(output_Stage1.xyz / nonZeroAlpha, nonZeroAlpha);
+ coord = coord * 0.9960939884185791 + vec4(0.0019529999699443579, 0.0019529999699443579, 0.0019529999699443579, 0.0019529999699443579);
+ output_Stage2.w = texture(uTextureSampler_0_Stage2, vec2(coord.w, 0.125)).w;
+ output_Stage2.x = texture(uTextureSampler_0_Stage2, vec2(coord.x, 0.375)).w;
+ output_Stage2.y = texture(uTextureSampler_0_Stage2, vec2(coord.y, 0.625)).w;
+ output_Stage2.z = texture(uTextureSampler_0_Stage2, vec2(coord.z, 0.875)).w;
+ output_Stage2.xyz *= output_Stage2.w;
+ }
+ vec4 output_Stage3;
+ {
+ vec4 inputColor = vec4(output_Stage2.xyz, 1.0);
+ output_Stage3 = blend_src_out(CircularRRect_Stage3_c1_c0(inputColor), ClampFragmentProcessor_Stage3_c2_c0(inputColor));
+ output_Stage3 *= output_Stage2.w;
+ }
+ {
+ sk_FragColor = output_Stage3;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec2 inLocalCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1378.shader_test b/shaders/skia/1378.shader_test
new file mode 100644
index 0000000..e2ea2cf
--- /dev/null
+++ b/shaders/skia/1378.shader_test
@@ -0,0 +1,283 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 ucolor_Stage1_c0_c0_c0_c0;
+uniform vec2 uImageIncrement_Stage1_c0_c0_c1_c0;
+uniform float uSurfaceScale_Stage1_c0_c0_c1_c0;
+uniform vec3 uLightColor_Stage1_c0_c0_c1_c0;
+uniform float uKD_Stage1_c0_c0_c1_c0;
+uniform vec4 uTexDom_Stage1_c0_c0_c1_c0;
+uniform vec3 uDecalParams_Stage1_c0_c0_c1_c0;
+uniform vec3 uLightLocation_Stage1_c0_c0_c1_c0;
+uniform float ucornerRadius_Stage1_c1_c0;
+uniform vec4 uproxyRect_Stage1_c1_c0;
+uniform float ublurRadius_Stage1_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+noperspective in vec4 vQuadEdge_Stage0;
+noperspective in vec4 vinColor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 ConstColorProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage1_c0_c0_c0_c0;
+ }
+ return _output;
+}
+vec4 light_Stage1_c0_c0_c1_c0(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ float colorScale = uKD_Stage1_c0_c0_c1_c0 * dot(normal, surfaceToLight);
+ return vec4(lightColor * clamp(colorScale, 0.0, 1.0), 1.0);
+}
+float sobel_Stage1_c0_c0_c1_c0(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage1_c0_c0_c1_c0(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage1_c0_c0_c1_c0(float m[9], float surfaceScale) {
+ return pointToNormal_Stage1_c0_c0_c1_c0(sobel_Stage1_c0_c0_c1_c0(m[0], m[2], m[3], m[5], m[6], m[8], 0.25), sobel_Stage1_c0_c0_c1_c0(m[0], m[6], m[1], m[7], m[2], m[8], 0.25), surfaceScale);
+}
+vec4 DiffuseLighting_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coord = vTransformedCoords_0_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage1_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c1_c0.xy, uTexDom_Stage1_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp0 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c1_c0.xy, uTexDom_Stage1_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c1_c0.xy, uTexDom_Stage1_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage1_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c1_c0.xy, uTexDom_Stage1_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c1_c0.xy, uTexDom_Stage1_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c1_c0.xy, uTexDom_Stage1_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp5 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage1_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c1_c0.xy, uTexDom_Stage1_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp6 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage1_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c1_c0.xy, uTexDom_Stage1_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp7 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage1_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c1_c0.xy, uTexDom_Stage1_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp8 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = normalize(uLightLocation_Stage1_c0_c0_c1_c0 - vec3(gl_FragCoord.xy, uSurfaceScale_Stage1_c0_c0_c1_c0 * m[4]));
+ _output = light_Stage1_c0_c0_c1_c0(normal_Stage1_c0_c0_c1_c0(m, uSurfaceScale_Stage1_c0_c0_c1_c0), surfaceToLight, uLightColor_Stage1_c0_c0_c1_c0);
+ _output *= _input;
+ return _output;
+}
+vec4 blend_plus(vec4 src, vec4 dst) {
+ return min(src + dst, 1.0);
+}
+vec4 ComposeTwo_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_plus(ConstColorProcessor_Stage1_c0_c0_c0_c0(inputColor), DiffuseLighting_Stage1_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 RRectBlurEffect_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 translatedFragPos = gl_FragCoord.xy - uproxyRect_Stage1_c1_c0.xy;
+ float threshold = ucornerRadius_Stage1_c1_c0 + 2.0 * ublurRadius_Stage1_c1_c0;
+ vec2 middle = (uproxyRect_Stage1_c1_c0.zw - uproxyRect_Stage1_c1_c0.xy) - 2.0 * threshold;
+ if (translatedFragPos.x >= threshold && translatedFragPos.x < middle.x + threshold) {
+ translatedFragPos.x = threshold;
+ } else if (translatedFragPos.x >= middle.x + threshold) {
+ translatedFragPos.x -= middle.x - 1.0;
+ }
+ if (translatedFragPos.y > threshold && translatedFragPos.y < middle.y + threshold) {
+ translatedFragPos.y = threshold;
+ } else if (translatedFragPos.y >= middle.y + threshold) {
+ translatedFragPos.y -= middle.y - 1.0;
+ }
+ vec2 proxyDims = vec2(2.0 * threshold + 1.0);
+ vec2 texCoord = translatedFragPos / proxyDims;
+ _output = _input * texture(uTextureSampler_1_Stage1, texCoord);
+ return _output;
+}
+float _guarded_divide(float n, float d) {
+ return n / d;
+}
+float _color_dodge_component(float sc, float sa, float dc, float da) {
+ if (dc == 0.0) {
+ return sc * (1.0 - da);
+ } else {
+ float d = sa - sc;
+ if (d == 0.0) {
+ return (sa * da + sc * (1.0 - da)) + dc * (1.0 - sa);
+ }
+ d = min(da, _guarded_divide(dc * sa, d));
+ return (d * sa + sc * (1.0 - da)) + dc * (1.0 - sa);
+ }
+}
+vec4 blend_color_dodge(vec4 src, vec4 dst) {
+ return vec4(_color_dodge_component(src.x, src.w, dst.x, dst.w), _color_dodge_component(src.y, src.w, dst.y, dst.w), _color_dodge_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vinColor_Stage0;
+ float edgeAlpha;
+ vec2 duvdx = dFdx(vQuadEdge_Stage0.xy);
+ vec2 duvdy = dFdy(vQuadEdge_Stage0.xy);
+ if (vQuadEdge_Stage0.z > 0.0 && vQuadEdge_Stage0.w > 0.0) {
+ edgeAlpha = min(min(vQuadEdge_Stage0.z, vQuadEdge_Stage0.w) + 0.5, 1.0);
+ } else {
+ vec2 gF = vec2((2.0 * vQuadEdge_Stage0.x) * duvdx.x - duvdx.y, (2.0 * vQuadEdge_Stage0.x) * duvdy.x - duvdy.y);
+ edgeAlpha = vQuadEdge_Stage0.x * vQuadEdge_Stage0.x - vQuadEdge_Stage0.y;
+ edgeAlpha = clamp(0.5 - edgeAlpha / length(gF), 0.0, 1.0);
+ }
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_color_dodge(ComposeTwo_Stage1_c0_c0(inputColor), RRectBlurEffect_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ sk_FragColor = output_Stage1 * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec4 inQuadEdge;
+noperspective out vec4 vQuadEdge_Stage0;
+noperspective out vec4 vinColor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vQuadEdge_Stage0 = inQuadEdge;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1381.shader_test b/shaders/skia/1381.shader_test
new file mode 100644
index 0000000..6ec2dac
--- /dev/null
+++ b/shaders/skia/1381.shader_test
@@ -0,0 +1,228 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uColor_Stage0;
+uniform vec4 ucircleData_Stage1_c0_c0;
+uniform vec4 uellipse_Stage1_c1_c0_c0_c0_c0_c0;
+uniform vec4 urectH_Stage1_c1_c0_c0_c0_c1_c0;
+uniform float uinvSixSigma_Stage1_c1_c0_c0_c0_c1_c0;
+uniform vec2 uImageIncrement_Stage1_c1_c0_c1_c0_c0_c0;
+uniform vec2 uBounds_Stage1_c1_c0_c1_c0_c0_c0;
+uniform vec4 uKernel_Stage1_c1_c0_c1_c0_c0_c0[5];
+uniform vec4 urectH_Stage1_c1_c0_c1_c0_c1_c0;
+uniform float uinvSixSigma_Stage1_c1_c0_c1_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+uniform sampler2D uTextureSampler_2_Stage1;
+uniform sampler2D uTextureSampler_3_Stage1;
+in vec2 vTransformedCoords_0_Stage0;
+vec4 CircleBlurFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 vec = vec2((gl_FragCoord.x - ucircleData_Stage1_c0_c0.x) * ucircleData_Stage1_c0_c0.w, (gl_FragCoord.y - ucircleData_Stage1_c0_c0.y) * ucircleData_Stage1_c0_c0.w);
+ float dist = length(vec) + (0.5 - ucircleData_Stage1_c0_c0.z) * ucircleData_Stage1_c0_c0.w;
+ _output = _input * texture(uTextureSampler_0_Stage1, vec2(dist, 0.5)).w;
+ return _output;
+}
+vec4 EllipseEffect_Stage1_c1_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 d = gl_FragCoord.xy - uellipse_Stage1_c1_c0_c0_c0_c0_c0.xy;
+ vec2 Z = d * uellipse_Stage1_c1_c0_c0_c0_c0_c0.zw;
+ float implicit = dot(Z, d) - 1.0;
+ float grad_dot = 4.0 * dot(Z, Z);
+ {
+ grad_dot = max(grad_dot, 1.1754999560161448e-38);
+ }
+ float approx_dist = implicit * inversesqrt(grad_dot);
+ float alpha;
+ {
+ alpha = clamp(0.5 - approx_dist, 0.0, 1.0);
+ }
+ _output = _input * alpha;
+ return _output;
+}
+vec4 RectBlurEffect_Stage1_c1_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float xCoverage, yCoverage;
+ {
+ float x, y;
+ {
+ x = max(urectH_Stage1_c1_c0_c0_c0_c1_c0.x - gl_FragCoord.x, gl_FragCoord.x - urectH_Stage1_c1_c0_c0_c0_c1_c0.z);
+ y = max(urectH_Stage1_c1_c0_c0_c0_c1_c0.y - gl_FragCoord.y, gl_FragCoord.y - urectH_Stage1_c1_c0_c0_c0_c1_c0.w);
+ }
+ xCoverage = texture(uTextureSampler_1_Stage1, vec2(x * uinvSixSigma_Stage1_c1_c0_c0_c0_c1_c0, 0.5)).w;
+ yCoverage = texture(uTextureSampler_1_Stage1, vec2(y * uinvSixSigma_Stage1_c1_c0_c0_c0_c1_c0, 0.5)).w;
+ _output = (_input * xCoverage) * yCoverage;
+ }
+ _output = (_input * xCoverage) * yCoverage;
+ return _output;
+}
+vec4 blend_dst_out(vec4 src, vec4 dst) {
+ return (1.0 - src.w) * dst;
+}
+vec4 ComposeTwo_Stage1_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_dst_out(EllipseEffect_Stage1_c1_c0_c0_c0_c0_c0(inputColor), RectBlurEffect_Stage1_c1_c0_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 GaussianConvolution_Stage1_c1_c0_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0 - 9.0 * uImageIncrement_Stage1_c1_c0_c1_c0_c0_c0;
+ vec2 coordSampled = vec2(0.0, 0.0);
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1_c1_c0_c1_c0_c0_c0.x, uBounds_Stage1_c1_c0_c1_c0_c0_c0.y - uBounds_Stage1_c1_c0_c1_c0_c0_c0.x) + uBounds_Stage1_c1_c0_c1_c0_c0_c0.x;
+ _output += texture(uTextureSampler_2_Stage1, coordSampled) * uKernel_Stage1_c1_c0_c1_c0_c0_c0[0].x;
+ coord += uImageIncrement_Stage1_c1_c0_c1_c0_c0_c0;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1_c1_c0_c1_c0_c0_c0.x, uBounds_Stage1_c1_c0_c1_c0_c0_c0.y - uBounds_Stage1_c1_c0_c1_c0_c0_c0.x) + uBounds_Stage1_c1_c0_c1_c0_c0_c0.x;
+ _output += texture(uTextureSampler_2_Stage1, coordSampled) * uKernel_Stage1_c1_c0_c1_c0_c0_c0[0].y;
+ coord += uImageIncrement_Stage1_c1_c0_c1_c0_c0_c0;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1_c1_c0_c1_c0_c0_c0.x, uBounds_Stage1_c1_c0_c1_c0_c0_c0.y - uBounds_Stage1_c1_c0_c1_c0_c0_c0.x) + uBounds_Stage1_c1_c0_c1_c0_c0_c0.x;
+ _output += texture(uTextureSampler_2_Stage1, coordSampled) * uKernel_Stage1_c1_c0_c1_c0_c0_c0[0].z;
+ coord += uImageIncrement_Stage1_c1_c0_c1_c0_c0_c0;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1_c1_c0_c1_c0_c0_c0.x, uBounds_Stage1_c1_c0_c1_c0_c0_c0.y - uBounds_Stage1_c1_c0_c1_c0_c0_c0.x) + uBounds_Stage1_c1_c0_c1_c0_c0_c0.x;
+ _output += texture(uTextureSampler_2_Stage1, coordSampled) * uKernel_Stage1_c1_c0_c1_c0_c0_c0[0].w;
+ coord += uImageIncrement_Stage1_c1_c0_c1_c0_c0_c0;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1_c1_c0_c1_c0_c0_c0.x, uBounds_Stage1_c1_c0_c1_c0_c0_c0.y - uBounds_Stage1_c1_c0_c1_c0_c0_c0.x) + uBounds_Stage1_c1_c0_c1_c0_c0_c0.x;
+ _output += texture(uTextureSampler_2_Stage1, coordSampled) * uKernel_Stage1_c1_c0_c1_c0_c0_c0[1].x;
+ coord += uImageIncrement_Stage1_c1_c0_c1_c0_c0_c0;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1_c1_c0_c1_c0_c0_c0.x, uBounds_Stage1_c1_c0_c1_c0_c0_c0.y - uBounds_Stage1_c1_c0_c1_c0_c0_c0.x) + uBounds_Stage1_c1_c0_c1_c0_c0_c0.x;
+ _output += texture(uTextureSampler_2_Stage1, coordSampled) * uKernel_Stage1_c1_c0_c1_c0_c0_c0[1].y;
+ coord += uImageIncrement_Stage1_c1_c0_c1_c0_c0_c0;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1_c1_c0_c1_c0_c0_c0.x, uBounds_Stage1_c1_c0_c1_c0_c0_c0.y - uBounds_Stage1_c1_c0_c1_c0_c0_c0.x) + uBounds_Stage1_c1_c0_c1_c0_c0_c0.x;
+ _output += texture(uTextureSampler_2_Stage1, coordSampled) * uKernel_Stage1_c1_c0_c1_c0_c0_c0[1].z;
+ coord += uImageIncrement_Stage1_c1_c0_c1_c0_c0_c0;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1_c1_c0_c1_c0_c0_c0.x, uBounds_Stage1_c1_c0_c1_c0_c0_c0.y - uBounds_Stage1_c1_c0_c1_c0_c0_c0.x) + uBounds_Stage1_c1_c0_c1_c0_c0_c0.x;
+ _output += texture(uTextureSampler_2_Stage1, coordSampled) * uKernel_Stage1_c1_c0_c1_c0_c0_c0[1].w;
+ coord += uImageIncrement_Stage1_c1_c0_c1_c0_c0_c0;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1_c1_c0_c1_c0_c0_c0.x, uBounds_Stage1_c1_c0_c1_c0_c0_c0.y - uBounds_Stage1_c1_c0_c1_c0_c0_c0.x) + uBounds_Stage1_c1_c0_c1_c0_c0_c0.x;
+ _output += texture(uTextureSampler_2_Stage1, coordSampled) * uKernel_Stage1_c1_c0_c1_c0_c0_c0[2].x;
+ coord += uImageIncrement_Stage1_c1_c0_c1_c0_c0_c0;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1_c1_c0_c1_c0_c0_c0.x, uBounds_Stage1_c1_c0_c1_c0_c0_c0.y - uBounds_Stage1_c1_c0_c1_c0_c0_c0.x) + uBounds_Stage1_c1_c0_c1_c0_c0_c0.x;
+ _output += texture(uTextureSampler_2_Stage1, coordSampled) * uKernel_Stage1_c1_c0_c1_c0_c0_c0[2].y;
+ coord += uImageIncrement_Stage1_c1_c0_c1_c0_c0_c0;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1_c1_c0_c1_c0_c0_c0.x, uBounds_Stage1_c1_c0_c1_c0_c0_c0.y - uBounds_Stage1_c1_c0_c1_c0_c0_c0.x) + uBounds_Stage1_c1_c0_c1_c0_c0_c0.x;
+ _output += texture(uTextureSampler_2_Stage1, coordSampled) * uKernel_Stage1_c1_c0_c1_c0_c0_c0[2].z;
+ coord += uImageIncrement_Stage1_c1_c0_c1_c0_c0_c0;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1_c1_c0_c1_c0_c0_c0.x, uBounds_Stage1_c1_c0_c1_c0_c0_c0.y - uBounds_Stage1_c1_c0_c1_c0_c0_c0.x) + uBounds_Stage1_c1_c0_c1_c0_c0_c0.x;
+ _output += texture(uTextureSampler_2_Stage1, coordSampled) * uKernel_Stage1_c1_c0_c1_c0_c0_c0[2].w;
+ coord += uImageIncrement_Stage1_c1_c0_c1_c0_c0_c0;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1_c1_c0_c1_c0_c0_c0.x, uBounds_Stage1_c1_c0_c1_c0_c0_c0.y - uBounds_Stage1_c1_c0_c1_c0_c0_c0.x) + uBounds_Stage1_c1_c0_c1_c0_c0_c0.x;
+ _output += texture(uTextureSampler_2_Stage1, coordSampled) * uKernel_Stage1_c1_c0_c1_c0_c0_c0[3].x;
+ coord += uImageIncrement_Stage1_c1_c0_c1_c0_c0_c0;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1_c1_c0_c1_c0_c0_c0.x, uBounds_Stage1_c1_c0_c1_c0_c0_c0.y - uBounds_Stage1_c1_c0_c1_c0_c0_c0.x) + uBounds_Stage1_c1_c0_c1_c0_c0_c0.x;
+ _output += texture(uTextureSampler_2_Stage1, coordSampled) * uKernel_Stage1_c1_c0_c1_c0_c0_c0[3].y;
+ coord += uImageIncrement_Stage1_c1_c0_c1_c0_c0_c0;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1_c1_c0_c1_c0_c0_c0.x, uBounds_Stage1_c1_c0_c1_c0_c0_c0.y - uBounds_Stage1_c1_c0_c1_c0_c0_c0.x) + uBounds_Stage1_c1_c0_c1_c0_c0_c0.x;
+ _output += texture(uTextureSampler_2_Stage1, coordSampled) * uKernel_Stage1_c1_c0_c1_c0_c0_c0[3].z;
+ coord += uImageIncrement_Stage1_c1_c0_c1_c0_c0_c0;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1_c1_c0_c1_c0_c0_c0.x, uBounds_Stage1_c1_c0_c1_c0_c0_c0.y - uBounds_Stage1_c1_c0_c1_c0_c0_c0.x) + uBounds_Stage1_c1_c0_c1_c0_c0_c0.x;
+ _output += texture(uTextureSampler_2_Stage1, coordSampled) * uKernel_Stage1_c1_c0_c1_c0_c0_c0[3].w;
+ coord += uImageIncrement_Stage1_c1_c0_c1_c0_c0_c0;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1_c1_c0_c1_c0_c0_c0.x, uBounds_Stage1_c1_c0_c1_c0_c0_c0.y - uBounds_Stage1_c1_c0_c1_c0_c0_c0.x) + uBounds_Stage1_c1_c0_c1_c0_c0_c0.x;
+ _output += texture(uTextureSampler_2_Stage1, coordSampled) * uKernel_Stage1_c1_c0_c1_c0_c0_c0[4].x;
+ coord += uImageIncrement_Stage1_c1_c0_c1_c0_c0_c0;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1_c1_c0_c1_c0_c0_c0.x, uBounds_Stage1_c1_c0_c1_c0_c0_c0.y - uBounds_Stage1_c1_c0_c1_c0_c0_c0.x) + uBounds_Stage1_c1_c0_c1_c0_c0_c0.x;
+ _output += texture(uTextureSampler_2_Stage1, coordSampled) * uKernel_Stage1_c1_c0_c1_c0_c0_c0[4].y;
+ coord += uImageIncrement_Stage1_c1_c0_c1_c0_c0_c0;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1_c1_c0_c1_c0_c0_c0.x, uBounds_Stage1_c1_c0_c1_c0_c0_c0.y - uBounds_Stage1_c1_c0_c1_c0_c0_c0.x) + uBounds_Stage1_c1_c0_c1_c0_c0_c0.x;
+ _output += texture(uTextureSampler_2_Stage1, coordSampled) * uKernel_Stage1_c1_c0_c1_c0_c0_c0[4].z;
+ coord += uImageIncrement_Stage1_c1_c0_c1_c0_c0_c0;
+ _output *= _input;
+ return _output;
+}
+vec4 RectBlurEffect_Stage1_c1_c0_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float xCoverage, yCoverage;
+ {
+ float x, y;
+ {
+ x = max(urectH_Stage1_c1_c0_c1_c0_c1_c0.x - gl_FragCoord.x, gl_FragCoord.x - urectH_Stage1_c1_c0_c1_c0_c1_c0.z);
+ y = max(urectH_Stage1_c1_c0_c1_c0_c1_c0.y - gl_FragCoord.y, gl_FragCoord.y - urectH_Stage1_c1_c0_c1_c0_c1_c0.w);
+ }
+ xCoverage = texture(uTextureSampler_3_Stage1, vec2(x * uinvSixSigma_Stage1_c1_c0_c1_c0_c1_c0, 0.5)).w;
+ yCoverage = texture(uTextureSampler_3_Stage1, vec2(y * uinvSixSigma_Stage1_c1_c0_c1_c0_c1_c0, 0.5)).w;
+ _output = (_input * xCoverage) * yCoverage;
+ }
+ _output = (_input * xCoverage) * yCoverage;
+ return _output;
+}
+vec4 blend_exclusion(vec4 src, vec4 dst) {
+ return vec4((dst.xyz + src.xyz) - (2.0 * dst.xyz) * src.xyz, src.w + (1.0 - src.w) * dst.w);
+}
+vec4 ComposeTwo_Stage1_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_exclusion(GaussianConvolution_Stage1_c1_c0_c1_c0_c0_c0(inputColor), RectBlurEffect_Stage1_c1_c0_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 ComposeTwo_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_src_in(ComposeTwo_Stage1_c1_c0_c0_c0(inputColor), ComposeTwo_Stage1_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = uColor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_dst_in(CircleBlurFragmentProcessor_Stage1_c0_c0(inputColor), ComposeTwo_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec3 pos3 = uViewM_Stage0 * vec3(inPosition, 1.0);
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos3.x, pos3.y, 0.0, pos3.z);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1384.shader_test b/shaders/skia/1384.shader_test
new file mode 100644
index 0000000..73e012a
--- /dev/null
+++ b/shaders/skia/1384.shader_test
@@ -0,0 +1,386 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_KHR_blend_equation_advanced : require
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+layout (blend_support_all_equations) out ;
+uniform mat4 um_Stage1_c0_c0_c0_c0_c0_c0;
+uniform vec4 uv_Stage1_c0_c0_c0_c0_c0_c0;
+uniform mat4 um_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 uv_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 uboundsUniform_Stage1_c0_c0_c1_c0_c1_c0;
+uniform float uxInvZoom_Stage1_c0_c0_c1_c0_c1_c0;
+uniform float uyInvZoom_Stage1_c0_c0_c1_c0_c1_c0;
+uniform float uxInvInset_Stage1_c0_c0_c1_c0_c1_c0;
+uniform float uyInvInset_Stage1_c0_c0_c1_c0_c1_c0;
+uniform vec2 uoffset_Stage1_c0_c0_c1_c0_c1_c0;
+uniform vec2 uImageIncrement_Stage1_c1_c0_c0_c0_c0_c0;
+uniform vec4 uKernel_Stage1_c1_c0_c0_c0_c0_c0[2];
+uniform vec2 uKernelOffset_Stage1_c1_c0_c0_c0_c0_c0;
+uniform float uGain_Stage1_c1_c0_c0_c0_c0_c0;
+uniform float uBias_Stage1_c1_c0_c0_c0_c0_c0;
+uniform vec4 uTexDom_Stage1_c1_c0_c0_c0_c0_c0;
+uniform vec4 ucolor0_Stage1_c1_c0_c0_c0_c1_c0;
+uniform vec4 ucolor1_Stage1_c1_c0_c0_c0_c1_c0;
+uniform vec4 ucolor2_Stage1_c1_c0_c0_c0_c1_c0;
+uniform vec4 ucolor3_Stage1_c1_c0_c0_c0_c1_c0;
+uniform vec4 ucolor4_Stage1_c1_c0_c0_c0_c1_c0;
+uniform vec4 ucolor5_Stage1_c1_c0_c0_c0_c1_c0;
+uniform vec4 uinnerRect_Stage1_c1_c0_c1_c0_c0_c0;
+uniform vec2 uinvRadiiXY_Stage1_c1_c0_c1_c0_c0_c0;
+uniform float ucornerRadius_Stage1_c1_c0_c1_c0_c1_c0;
+uniform vec4 uproxyRect_Stage1_c1_c0_c1_c0_c1_c0;
+uniform float ublurRadius_Stage1_c1_c0_c1_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+uniform sampler2D uTextureSampler_2_Stage1;
+uniform sampler2D uTextureSampler_3_Stage1;
+noperspective in vec2 vEllipseOffsets_Stage0;
+noperspective in vec4 vEllipseRadii_Stage0;
+noperspective in vec4 vinColor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+vec4 ColorMatrixFragmentProcessor_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = _input;
+ {
+ float nonZeroAlpha = max(inputColor.w, 9.9999997473787516e-05);
+ inputColor = vec4(inputColor.xyz / nonZeroAlpha, inputColor.w);
+ }
+ _output = um_Stage1_c0_c0_c0_c0_c0_c0 * inputColor + uv_Stage1_c0_c0_c0_c0_c0_c0;
+ {
+ _output = clamp(_output, 0.0, 1.0);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 ColorMatrixFragmentProcessor_Stage1_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = _input;
+ _output = um_Stage1_c0_c0_c0_c0_c1_c0 * inputColor + uv_Stage1_c0_c0_c0_c0_c1_c0;
+ {
+ _output = clamp(_output, 0.0, 1.0);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_dst_out(vec4 src, vec4 dst) {
+ return (1.0 - src.w) * dst;
+}
+vec4 ComposeTwo_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_dst_out(ColorMatrixFragmentProcessor_Stage1_c0_c0_c0_c0_c0_c0(inputColor), ColorMatrixFragmentProcessor_Stage1_c0_c0_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 ColorTableEffect_Stage1_c0_c0_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float nonZeroAlpha = max(_input.w, 9.9999997473787516e-05);
+ vec4 coord = vec4(_input.xyz / nonZeroAlpha, nonZeroAlpha);
+ coord = coord * 0.9960939884185791 + vec4(0.0019529999699443579, 0.0019529999699443579, 0.0019529999699443579, 0.0019529999699443579);
+ _output.w = texture(uTextureSampler_0_Stage1, vec2(coord.w, 0.125)).w;
+ _output.x = texture(uTextureSampler_0_Stage1, vec2(coord.x, 0.375)).w;
+ _output.y = texture(uTextureSampler_0_Stage1, vec2(coord.y, 0.625)).w;
+ _output.z = texture(uTextureSampler_0_Stage1, vec2(coord.z, 0.875)).w;
+ _output.xyz *= _output.w;
+ return _output;
+}
+vec4 MagnifierEffect_Stage1_c0_c0_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coord = vTransformedCoords_0_Stage0;
+ vec2 zoom_coord = uoffset_Stage1_c0_c0_c1_c0_c1_c0 + coord * vec2(uxInvZoom_Stage1_c0_c0_c1_c0_c1_c0, uyInvZoom_Stage1_c0_c0_c1_c0_c1_c0);
+ vec2 delta = (coord - uboundsUniform_Stage1_c0_c0_c1_c0_c1_c0.xy) * uboundsUniform_Stage1_c0_c0_c1_c0_c1_c0.zw;
+ delta = min(delta, vec2(1.0, 1.0) - delta);
+ delta *= vec2(uxInvInset_Stage1_c0_c0_c1_c0_c1_c0, uyInvInset_Stage1_c0_c0_c1_c0_c1_c0);
+ float weight = 0.0;
+ if (delta.x < 2.0 && delta.y < 2.0) {
+ delta = vec2(2.0, 2.0) - delta;
+ float dist = length(delta);
+ dist = max(2.0 - dist, 0.0);
+ weight = min(dist * dist, 1.0);
+ } else {
+ vec2 delta_squared = delta * delta;
+ weight = min(min(delta_squared.x, delta_squared.y), 1.0);
+ }
+ _output = texture(uTextureSampler_1_Stage1, mix(coord, zoom_coord, weight));
+ return _output;
+}
+vec4 blend_screen(vec4 src, vec4 dst) {
+ return src + (1.0 - src) * dst;
+}
+vec4 ComposeTwo_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_screen(ColorTableEffect_Stage1_c0_c0_c1_c0_c0_c0(inputColor), MagnifierEffect_Stage1_c0_c0_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 blend_exclusion(vec4 src, vec4 dst) {
+ return vec4((dst.xyz + src.xyz) - (2.0 * dst.xyz) * src.xyz, src.w + (1.0 - src.w) * dst.w);
+}
+vec4 ComposeTwo_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_exclusion(ComposeTwo_Stage1_c0_c0_c0_c0(inputColor), ComposeTwo_Stage1_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 MatrixConvolution_Stage1_c1_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 sum = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_1_Stage0 - uKernelOffset_Stage1_c1_c0_c0_c0_c0_c0 * uImageIncrement_Stage1_c1_c0_c0_c0_c0_c0;
+ vec4 c;
+ {
+ float k = uKernel_Stage1_c1_c0_c0_c0_c0_c0[0].x;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0_c0_c0.xy, uTexDom_Stage1_c1_c0_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0_c0_c0_c0_c0[0].y;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1_c1_c0_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0_c0_c0.xy, uTexDom_Stage1_c1_c0_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0_c0_c0_c0_c0[0].z;
+ {
+ vec2 origCoord = coord + vec2(2.0, 0.0) * uImageIncrement_Stage1_c1_c0_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0_c0_c0.xy, uTexDom_Stage1_c1_c0_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0_c0_c0_c0_c0[0].w;
+ {
+ vec2 origCoord = coord + vec2(3.0, 0.0) * uImageIncrement_Stage1_c1_c0_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0_c0_c0.xy, uTexDom_Stage1_c1_c0_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0_c0_c0_c0_c0[1].x;
+ {
+ vec2 origCoord = coord + vec2(4.0, 0.0) * uImageIncrement_Stage1_c1_c0_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0_c0_c0.xy, uTexDom_Stage1_c1_c0_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0_c0_c0_c0_c0[1].y;
+ {
+ vec2 origCoord = coord + vec2(5.0, 0.0) * uImageIncrement_Stage1_c1_c0_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0_c0_c0.xy, uTexDom_Stage1_c1_c0_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ vec2 origCoord = vTransformedCoords_1_Stage0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0_c0_c0.xy, uTexDom_Stage1_c1_c0_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ _output.w = c.w;
+ _output.xyz = clamp(sum.xyz * uGain_Stage1_c1_c0_c0_c0_c0_c0 + uBias_Stage1_c1_c0_c0_c0_c0_c0, 0.0, 1.0);
+ _output.xyz *= _output.w;
+ _output *= _input;
+ return _output;
+}
+vec4 Overdraw_Stage1_c1_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = _input;
+ float alpha = 255.0 * _output.w;
+ if (alpha < 0.5) {
+ _output = ucolor0_Stage1_c1_c0_c0_c0_c1_c0;
+ } else if (alpha < 1.5) {
+ _output = ucolor1_Stage1_c1_c0_c0_c0_c1_c0;
+ } else if (alpha < 2.5) {
+ _output = ucolor2_Stage1_c1_c0_c0_c0_c1_c0;
+ } else if (alpha < 3.5) {
+ _output = ucolor3_Stage1_c1_c0_c0_c0_c1_c0;
+ } else if (alpha < 4.5) {
+ _output = ucolor4_Stage1_c1_c0_c0_c0_c1_c0;
+ } else {
+ _output = ucolor5_Stage1_c1_c0_c0_c0_c1_c0;
+ }
+ return _output;
+}
+vec4 blend_src_atop(vec4 src, vec4 dst) {
+ return dst.w * src + (1.0 - src.w) * dst;
+}
+vec4 ComposeTwo_Stage1_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_src_atop(MatrixConvolution_Stage1_c1_c0_c0_c0_c0_c0(inputColor), Overdraw_Stage1_c1_c0_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 EllipticalRRect_Stage1_c1_c0_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 dxy0 = uinnerRect_Stage1_c1_c0_c1_c0_c0_c0.xy - gl_FragCoord.xy;
+ vec2 dxy1 = gl_FragCoord.xy - uinnerRect_Stage1_c1_c0_c1_c0_c0_c0.zw;
+ vec2 dxy = max(max(dxy0, dxy1), 0.0);
+ vec2 Z = dxy * uinvRadiiXY_Stage1_c1_c0_c1_c0_c0_c0;
+ float implicit = dot(Z, dxy) - 1.0;
+ float grad_dot = 4.0 * dot(Z, Z);
+ grad_dot = max(grad_dot, 9.9999997473787516e-05);
+ float approx_dist = implicit * inversesqrt(grad_dot);
+ float alpha = clamp(0.5 - approx_dist, 0.0, 1.0);
+ _output = _input * alpha;
+ return _output;
+}
+vec4 RRectBlurEffect_Stage1_c1_c0_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 translatedFragPos = gl_FragCoord.xy - uproxyRect_Stage1_c1_c0_c1_c0_c1_c0.xy;
+ float threshold = ucornerRadius_Stage1_c1_c0_c1_c0_c1_c0 + 2.0 * ublurRadius_Stage1_c1_c0_c1_c0_c1_c0;
+ vec2 middle = (uproxyRect_Stage1_c1_c0_c1_c0_c1_c0.zw - uproxyRect_Stage1_c1_c0_c1_c0_c1_c0.xy) - 2.0 * threshold;
+ if (translatedFragPos.x >= threshold && translatedFragPos.x < middle.x + threshold) {
+ translatedFragPos.x = threshold;
+ } else if (translatedFragPos.x >= middle.x + threshold) {
+ translatedFragPos.x -= middle.x - 1.0;
+ }
+ if (translatedFragPos.y > threshold && translatedFragPos.y < middle.y + threshold) {
+ translatedFragPos.y = threshold;
+ } else if (translatedFragPos.y >= middle.y + threshold) {
+ translatedFragPos.y -= middle.y - 1.0;
+ }
+ vec2 proxyDims = vec2(2.0 * threshold + 1.0);
+ vec2 texCoord = translatedFragPos / proxyDims;
+ _output = _input * texture(uTextureSampler_3_Stage1, texCoord);
+ return _output;
+}
+vec4 blend_dst_atop(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src + src.w * dst;
+}
+vec4 ComposeTwo_Stage1_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_dst_atop(EllipticalRRect_Stage1_c1_c0_c1_c0_c0_c0(inputColor), RRectBlurEffect_Stage1_c1_c0_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 blend_lighten(vec4 src, vec4 dst) {
+ vec4 result = blend_src_over(src, dst);
+ result.xyz = max(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
+ return result;
+}
+vec4 ComposeTwo_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_lighten(ComposeTwo_Stage1_c1_c0_c0_c0(inputColor), ComposeTwo_Stage1_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 blend_src_out(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vinColor_Stage0;
+ vec2 offset = vEllipseOffsets_Stage0;
+ offset *= vEllipseRadii_Stage0.xy;
+ float test = dot(offset, offset) - 1.0;
+ vec2 grad = (2.0 * offset) * vEllipseRadii_Stage0.xy;
+ float grad_dot = dot(grad, grad);
+ grad_dot = max(grad_dot, 1.1754999560161448e-38);
+ float invlen = inversesqrt(grad_dot);
+ float edgeAlpha = clamp(0.5 - test * invlen, 0.0, 1.0);
+ offset = vEllipseOffsets_Stage0 * vEllipseRadii_Stage0.zw;
+ test = dot(offset, offset) - 1.0;
+ grad = (2.0 * offset) * vEllipseRadii_Stage0.zw;
+ grad_dot = dot(grad, grad);
+ invlen = inversesqrt(grad_dot);
+ edgeAlpha *= clamp(0.5 + test * invlen, 0.0, 1.0);
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_src_out(ComposeTwo_Stage1_c0_c0(inputColor), ComposeTwo_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ sk_FragColor = outputCoverage_Stage0 * output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec2 inEllipseOffset;
+in vec4 inEllipseRadii;
+noperspective out vec2 vEllipseOffsets_Stage0;
+noperspective out vec4 vEllipseRadii_Stage0;
+noperspective out vec4 vinColor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+void main() {
+ vEllipseOffsets_Stage0 = inEllipseOffset;
+ vEllipseRadii_Stage0 = inEllipseRadii;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1387.shader_test b/shaders/skia/1387.shader_test
new file mode 100644
index 0000000..8a7e843
--- /dev/null
+++ b/shaders/skia/1387.shader_test
@@ -0,0 +1,253 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform float uSrcTF_Stage0[7];
+uniform mat3 uColorXform_Stage0;
+uniform float uDstTF_Stage0[7];
+uniform vec2 uImageIncrement_Stage1;
+uniform vec4 uKernel_Stage1[2];
+uniform vec2 uKernelOffset_Stage1;
+uniform float uGain_Stage1;
+uniform float uBias_Stage1;
+uniform vec2 ubaseFrequency_Stage2;
+uniform float uz_Stage2;
+uniform sampler2D uTextureSampler_0_Stage0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+uniform sampler2D uTextureSampler_1_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vtextureCoords_Stage0;
+flat in vec4 vtextureDomain_Stage0;
+flat in vec4 vcolor_Stage0;
+float src_tf_Stage0(float x) {
+ float G = uSrcTF_Stage0[0];
+ float A = uSrcTF_Stage0[1];
+ float B = uSrcTF_Stage0[2];
+ float C = uSrcTF_Stage0[3];
+ float D = uSrcTF_Stage0[4];
+ float E = uSrcTF_Stage0[5];
+ float F = uSrcTF_Stage0[6];
+ float s = sign(x);
+ x = abs(x);
+ x = x < D ? C * x + F : pow(A * x + B, G) + E;
+ return s * x;
+}
+float dst_tf_Stage0(float x) {
+ float G = uDstTF_Stage0[0];
+ float A = uDstTF_Stage0[1];
+ float B = uDstTF_Stage0[2];
+ float C = uDstTF_Stage0[3];
+ float D = uDstTF_Stage0[4];
+ float E = uDstTF_Stage0[5];
+ float F = uDstTF_Stage0[6];
+ float s = sign(x);
+ x = abs(x);
+ x = x < D ? C * x + F : pow(A * x + B, G) + E;
+ return s * x;
+}
+vec4 gamut_xform_Stage0(vec4 color) {
+ color.xyz = uColorXform_Stage0 * color.xyz;
+ return color;
+}
+vec4 color_xform_Stage0(vec4 color) {
+ float nonZeroAlpha = max(color.w, 9.9999997473787516e-05);
+ color = vec4(color.xyz / nonZeroAlpha, nonZeroAlpha);
+ color.x = src_tf_Stage0(color.x);
+ color.y = src_tf_Stage0(color.y);
+ color.z = src_tf_Stage0(color.z);
+ color = gamut_xform_Stage0(color);
+ color.x = dst_tf_Stage0(color.x);
+ color.y = dst_tf_Stage0(color.y);
+ color.z = dst_tf_Stage0(color.z);
+ color.xyz *= color.w;
+ return color;
+}
+vec3 fade_Stage2(vec3 t) {
+ return ((t * t) * t) * (t * (t * 6.0 - 15.0) + 10.0);
+}
+float perm_Stage2(float x) {
+ return texture(uTextureSampler_0_Stage2, vec2(fract(x / 256.0), 0.0)).x * 255.0;
+}
+float grad_Stage2(float x, vec3 p) {
+ return dot(texture(uTextureSampler_1_Stage2, vec2(fract(x / 16.0), 0.0)).xyz * 255.0 - vec3(1.0), p);
+}
+float lerp_Stage2(float a, float b, float w) {
+ return a + w * (b - a);
+}
+float noise_Stage2(vec3 p) {
+ vec3 P = mod(floor(p), 256.0);
+ p -= floor(p);
+ vec3 f = fade_Stage2(p);
+ float A = perm_Stage2(P.x) + P.y;
+ float AA = perm_Stage2(A) + P.z;
+ float AB = perm_Stage2(A + 1.0) + P.z;
+ float B = perm_Stage2(P.x + 1.0) + P.y;
+ float BA = perm_Stage2(B) + P.z;
+ float BB = perm_Stage2(B + 1.0) + P.z;
+ float result = lerp_Stage2(lerp_Stage2(lerp_Stage2(grad_Stage2(perm_Stage2(AA), p), grad_Stage2(perm_Stage2(BA), p + vec3(-1.0, 0.0, 0.0)), f.x), lerp_Stage2(grad_Stage2(perm_Stage2(AB), p + vec3(0.0, -1.0, 0.0)), grad_Stage2(perm_Stage2(BB), p + vec3(-1.0, -1.0, 0.0)), f.x), f.y), lerp_Stage2(lerp_Stage2(grad_Stage2(perm_Stage2(AA + 1.0), p + vec3(0.0, 0.0, -1.0)), grad_Stage2(perm_Stage2(BA + 1.0), p + vec3(-1.0, 0.0, -1.0)), f.x), lerp_Stage2(grad_Stage2(perm_Stage2(AB + 1.0), p + vec3(0.0, -1.0, -1.0)), grad_Stage2(perm_Stage2(BB + 1.0), p + vec3(-1.0, -1.0, -1.0)), f.x), f.y), f.z);
+ return result;
+}
+float noiseOctaves_Stage2(vec3 p) {
+ float result = 0.0;
+ float ratio = 1.0;
+ for (float i = 0.0;i < 9.0; i++) {
+ result += noise_Stage2(p) / ratio;
+ p *= 2.0;
+ ratio *= 2.0;
+ }
+ return (result + 1.0) / 2.0;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ vec2 textureCoords;
+ textureCoords = vtextureCoords_Stage0;
+ vec4 textureDomain;
+ textureDomain = vtextureDomain_Stage0;
+ outputColor_Stage0 = vcolor_Stage0;
+ outputColor_Stage0 = color_xform_Stage0(texture(uTextureSampler_0_Stage0, clamp(textureCoords, textureDomain.xy, textureDomain.zw))) * outputColor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec4 sum = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0 - uKernelOffset_Stage1 * uImageIncrement_Stage1;
+ vec4 c;
+ {
+ float k = uKernel_Stage1[0].x;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[0].y;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[0].z;
+ {
+ vec2 origCoord = coord + vec2(2.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[0].w;
+ {
+ vec2 origCoord = coord + vec2(3.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[1].x;
+ {
+ vec2 origCoord = coord + vec2(4.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[1].y;
+ {
+ vec2 origCoord = coord + vec2(5.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[1].z;
+ {
+ vec2 origCoord = coord + vec2(6.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[1].w;
+ {
+ vec2 origCoord = coord + vec2(7.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ output_Stage1 = sum * uGain_Stage1 + uBias_Stage1;
+ output_Stage1.w = clamp(output_Stage1.w, 0.0, 1.0);
+ output_Stage1.xyz = clamp(output_Stage1.xyz, 0.0, output_Stage1.w);
+ }
+ vec4 output_Stage2;
+ {
+ vec2 coords = vTransformedCoords_1_Stage0 * ubaseFrequency_Stage2;
+ float r = noiseOctaves_Stage2(vec3(coords, uz_Stage2));
+ float g = noiseOctaves_Stage2(vec3(coords, uz_Stage2));
+ float b = noiseOctaves_Stage2(vec3(coords, uz_Stage2));
+ float a = noiseOctaves_Stage2(vec3(coords, uz_Stage2));
+ output_Stage2 = vec4(r, g, b, a);
+ output_Stage2 = clamp(output_Stage2, 0.0, 1.0);
+ output_Stage2 = vec4(output_Stage2.xyz * output_Stage2.www, output_Stage2.w);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 textureCoords;
+in vec4 textureDomain;
+in vec4 color;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vtextureCoords_Stage0;
+flat out vec4 vtextureDomain_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vec2 pos2 = position;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(textureCoords, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(textureCoords, 1.0)).xy;
+ vtextureCoords_Stage0 = textureCoords;
+ vtextureDomain_Stage0 = textureDomain;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/139-1.shader_test b/shaders/skia/139-1.shader_test
new file mode 100644
index 0000000..fa5dd46
--- /dev/null
+++ b/shaders/skia/139-1.shader_test
@@ -0,0 +1,68 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 ucolor_Stage1_c0_c0_c0_c0;
+uniform vec4 ucolor_Stage2;
+noperspective in vec4 vcolor_Stage0;
+vec4 ConstColorProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = _input.w * ucolor_Stage1_c0_c0_c0_c0;
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = ConstColorProcessor_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_src_in(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ {
+ output_Stage2 = output_Stage1 * ucolor_Stage2;
+ }
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 position;
+in vec4 inColor;
+noperspective out vec4 vcolor_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/139-11.shader_test b/shaders/skia/139-11.shader_test
new file mode 100644
index 0000000..f5464a9
--- /dev/null
+++ b/shaders/skia/139-11.shader_test
@@ -0,0 +1,38 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+noperspective in vec2 vEllipseOffsets_Stage0;
+noperspective in vec4 vEllipseRadii_Stage0;
+noperspective in vec4 vinColor_Stage0;
+void main() {
+ {
+ vec2 offset = vEllipseOffsets_Stage0;
+ vec2 grad = (2.0 * offset) * vEllipseRadii_Stage0.xy;
+ float grad_dot = dot(grad, grad);
+ grad_dot = max(grad_dot, 1.1754999560161448e-38);
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 inPosition;
+in vec4 inColor;
+in vec2 inEllipseOffset;
+in vec4 inEllipseRadii;
+noperspective out vec2 vEllipseOffsets_Stage0;
+noperspective out vec4 vEllipseRadii_Stage0;
+noperspective out vec4 vinColor_Stage0;
+void main() {
+ vEllipseOffsets_Stage0 = inEllipseOffset;
+ vEllipseRadii_Stage0 = inEllipseRadii;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = inPosition;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/139-12.shader_test b/shaders/skia/139-12.shader_test
new file mode 100644
index 0000000..8cf5892
--- /dev/null
+++ b/shaders/skia/139-12.shader_test
@@ -0,0 +1,81 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uCoordTransformMatrix_2_Stage0;
+uniform vec4 usubset_Stage2_c0_c0;
+uniform vec4 uclamp_Stage2_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 TextureEffect_Stage2_c0_c0(vec4 _input, vec2 _coords) {
+ _coords = _coords * uCoordTransformMatrix_2_Stage0.xz + uCoordTransformMatrix_2_Stage0.yw;
+ vec4 _output;
+ vec2 inCoord = _coords;
+ vec2 subsetCoord;
+ {
+ float w = usubset_Stage2_c0_c0.z - usubset_Stage2_c0_c0.x;
+ float w2 = 2.0 * w;
+ float m = mod(inCoord.x - usubset_Stage2_c0_c0.x, w2);
+ subsetCoord.x = mix(m, w2 - m, step(w, m)) + usubset_Stage2_c0_c0.x;
+ }
+ {
+ float w = usubset_Stage2_c0_c0.w - usubset_Stage2_c0_c0.y;
+ float w2 = 2.0 * w;
+ float m = mod(inCoord.y - usubset_Stage2_c0_c0.y, w2);
+ subsetCoord.y = mix(m, w2 - m, step(w, m)) + usubset_Stage2_c0_c0.y;
+ }
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage2_c0_c0.x, uclamp_Stage2_c0_c0.z);
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage2_c0_c0.y, uclamp_Stage2_c0_c0.w);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ _output = _input * textureColor;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ float coord = vTransformedCoords_1_Stage0.y - 0.5;
+ float f = fract(coord);
+ coord += 0.5 - f;
+ float f2 = f * f;
+ vec4 w = mat4(0.055555555555555552, 0.88888888888888884, 0.055555555555555552, 0.0, -0.5, 0.0, 0.5, 0.0, 0.83333333333333337, -2.0, 1.5, -0.33333333333333331, -0.3888888888888889, 1.1666666666666667, -1.1666666666666667, 0.3888888888888889) * vec4(1.0, f, f2, f2 * f);
+ vec4 c[4];
+ c[0] = TextureEffect_Stage2_c0_c0(vec4(1.0), vec2(vTransformedCoords_1_Stage0.x, coord + -1.0));
+ c[1] = TextureEffect_Stage2_c0_c0(vec4(1.0), vec2(vTransformedCoords_1_Stage0.x, coord));
+ c[2] = TextureEffect_Stage2_c0_c0(vec4(1.0), vec2(vTransformedCoords_1_Stage0.x, coord + 1.0));
+ c[3] = TextureEffect_Stage2_c0_c0(vec4(1.0), vec2(vTransformedCoords_1_Stage0.x, coord + 2.0));
+ vec4 bicubicColor = ((c[0] * w.x + c[1] * w.y) + c[2] * w.z) + c[3] * w.w;
+ bicubicColor.xyz = max(vec3(0.0), min(bicubicColor.xyz, bicubicColor.www));
+ output_Stage2 = bicubicColor * output_Stage1;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/139-13.shader_test b/shaders/skia/139-13.shader_test
new file mode 100644
index 0000000..8eb355b
--- /dev/null
+++ b/shaders/skia/139-13.shader_test
@@ -0,0 +1,163 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage2;
+uniform vec2 uBounds_Stage2;
+uniform vec4 uKernel_Stage2[6];
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_1_Stage0 - 11.0 * uImageIncrement_Stage2;
+ vec2 coordSampled = vec2(0.0, 0.0);
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage2.x && coord.x <= uBounds_Stage2.y) {
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[0].x;
+ }
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage2.x && coord.x <= uBounds_Stage2.y) {
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[0].y;
+ }
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage2.x && coord.x <= uBounds_Stage2.y) {
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[0].z;
+ }
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage2.x && coord.x <= uBounds_Stage2.y) {
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[0].w;
+ }
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage2.x && coord.x <= uBounds_Stage2.y) {
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[1].x;
+ }
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage2.x && coord.x <= uBounds_Stage2.y) {
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[1].y;
+ }
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage2.x && coord.x <= uBounds_Stage2.y) {
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[1].z;
+ }
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage2.x && coord.x <= uBounds_Stage2.y) {
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[1].w;
+ }
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage2.x && coord.x <= uBounds_Stage2.y) {
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[2].x;
+ }
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage2.x && coord.x <= uBounds_Stage2.y) {
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[2].y;
+ }
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage2.x && coord.x <= uBounds_Stage2.y) {
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[2].z;
+ }
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage2.x && coord.x <= uBounds_Stage2.y) {
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[2].w;
+ }
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage2.x && coord.x <= uBounds_Stage2.y) {
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[3].x;
+ }
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage2.x && coord.x <= uBounds_Stage2.y) {
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[3].y;
+ }
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage2.x && coord.x <= uBounds_Stage2.y) {
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[3].z;
+ }
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage2.x && coord.x <= uBounds_Stage2.y) {
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[3].w;
+ }
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage2.x && coord.x <= uBounds_Stage2.y) {
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[4].x;
+ }
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage2.x && coord.x <= uBounds_Stage2.y) {
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[4].y;
+ }
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage2.x && coord.x <= uBounds_Stage2.y) {
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[4].z;
+ }
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage2.x && coord.x <= uBounds_Stage2.y) {
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[4].w;
+ }
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage2.x && coord.x <= uBounds_Stage2.y) {
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[5].x;
+ }
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage2.x && coord.x <= uBounds_Stage2.y) {
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[5].y;
+ }
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage2.x && coord.x <= uBounds_Stage2.y) {
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[5].z;
+ }
+ coord += uImageIncrement_Stage2;
+ output_Stage2 *= output_Stage1;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/139-3.shader_test b/shaders/skia/139-3.shader_test
new file mode 100644
index 0000000..a0dbee3
--- /dev/null
+++ b/shaders/skia/139-3.shader_test
@@ -0,0 +1,89 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage2_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c1_c0;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+vec4 blend_dst_out(vec4 src, vec4 dst) {
+ return (1.0 - src.w) * dst;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_dst_in(outputColor_Stage0, ClampedGradientEffect_Stage1_c0_c0(vec4(1.0)));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_dst_out(ConstColorProcessor_Stage2_c1_c0(vec4(1.0)), output_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/139-4.shader_test b/shaders/skia/139-4.shader_test
new file mode 100644
index 0000000..64c8b2b
--- /dev/null
+++ b/shaders/skia/139-4.shader_test
@@ -0,0 +1,138 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform float uSurfaceScale_Stage1;
+uniform vec3 uLightColor_Stage1;
+uniform float uKS_Stage1;
+uniform float uShininess_Stage1;
+uniform vec3 uLightDirection_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 light_Stage1(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ vec3 halfDir = normalize(surfaceToLight + vec3(0.0, 0.0, 1.0));
+ float colorScale = uKS_Stage1 * pow(dot(normal, halfDir), uShininess_Stage1);
+ vec3 color = lightColor * clamp(colorScale, 0.0, 1.0);
+ return vec4(color, max(max(color.x, color.y), color.z));
+}
+float sobel_Stage1(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage1(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage1(float m[9], float surfaceScale) {
+ return pointToNormal_Stage1(sobel_Stage1(m[0], m[1], m[3], m[4], 0.0, 0.0, 0.66666698455810547), sobel_Stage1(m[0], m[3], m[1], m[4], 0.0, 0.0, 0.66666698455810547), surfaceScale);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ vec2 coord = vTransformedCoords_0_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp0 = textureColor;
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp1 = textureColor;
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp2 = textureColor;
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp3 = textureColor;
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp4 = textureColor;
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp5 = textureColor;
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp6 = textureColor;
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp7 = textureColor;
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp8 = textureColor;
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = uLightDirection_Stage1;
+ output_Stage1 = light_Stage1(normal_Stage1(m, uSurfaceScale_Stage1), surfaceToLight, uLightColor_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/139-5.shader_test b/shaders/skia/139-5.shader_test
new file mode 100644
index 0000000..efe459d
--- /dev/null
+++ b/shaders/skia/139-5.shader_test
@@ -0,0 +1,103 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+uniform vec2 uDstTextureUpperLeft_Stage2;
+uniform vec2 uDstTextureCoordScale_Stage2;
+uniform sampler2D uTextureSampler_0_Stage0;
+uniform sampler2D uDstTextureSampler_Stage2;
+noperspective in vec2 vTextureCoords_Stage0;
+flat in int vTexIndex_Stage0;
+noperspective in vec4 vinColor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ t.x = fract(t.x);
+ }
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 blend_lighten(vec4 src, vec4 dst) {
+ vec4 result = blend_src_over(src, dst);
+ result.xyz = max(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
+ return result;
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ vec4 texColor;
+ {
+ texColor = texture(uTextureSampler_0_Stage0, vTextureCoords_Stage0);
+ }
+ outputCoverage_Stage0 = texColor;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TiledGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ if (all(lessThanEqual(outputCoverage_Stage0.xyz, vec3(0.0)))) {
+ discard;
+ }
+ vec2 _dstTexCoord = (gl_FragCoord.xy - uDstTextureUpperLeft_Stage2) * uDstTextureCoordScale_Stage2;
+ _dstTexCoord.y = 1.0 - _dstTexCoord.y;
+ vec4 _dstColor = texture(uDstTextureSampler_Stage2, _dstTexCoord);
+ sk_FragColor = blend_lighten(output_Stage1, _dstColor);
+ float lerpRed = mix(_dstColor.w, sk_FragColor.w, outputCoverage_Stage0.x);
+ float lerpBlue = mix(_dstColor.w, sk_FragColor.w, outputCoverage_Stage0.y);
+ float lerpGreen = mix(_dstColor.w, sk_FragColor.w, outputCoverage_Stage0.z);
+ sk_FragColor = outputCoverage_Stage0 * sk_FragColor + (vec4(1.0) - outputCoverage_Stage0) * _dstColor;
+ sk_FragColor.w = max(max(lerpRed, lerpBlue), lerpGreen);
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform vec2 uAtlasSizeInv_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in uvec2 inTextureCoords;
+noperspective out vec2 vTextureCoords_Stage0;
+flat out int vTexIndex_Stage0;
+noperspective out vec4 vinColor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ ivec2 signedCoords = ivec2(int(inTextureCoords.x), int(inTextureCoords.y));
+ vec2 unormTexCoords = vec2(float(signedCoords.x / 2), float(signedCoords.y / 2));
+ vTextureCoords_Stage0 = unormTexCoords * uAtlasSizeInv_Stage0;
+ vTexIndex_Stage0 = 0;
+ vinColor_Stage0 = inColor;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(inPosition.x, inPosition.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/139.shader_test b/shaders/skia/139.shader_test
new file mode 100644
index 0000000..c69d90a
--- /dev/null
+++ b/shaders/skia/139.shader_test
@@ -0,0 +1,126 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform float uSrcTF_Stage1_c0_c0[7];
+uniform mat3 uColorXform_Stage1_c0_c0;
+uniform float uDstTF_Stage1_c0_c0[7];
+uniform mat4 um_Stage2;
+uniform vec4 uv_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_1_Stage1, vTransformedCoords_1_Stage0) * _input;
+ return _output;
+}
+vec4 YUVtoRGBEffect_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 planes[2];
+ planes[0] = TextureEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ planes[1] = TextureEffect_Stage1_c0_c0_c0_c0_c1_c0(vec4(1.0));
+ vec4 color = vec4(planes[0].x, planes[1].y, planes[1].x, 1.0);
+ _output = color;
+ return _output;
+}
+float src_tf_Stage1_c0_c0(float x) {
+ float G = uSrcTF_Stage1_c0_c0[0];
+ float A = uSrcTF_Stage1_c0_c0[1];
+ float B = uSrcTF_Stage1_c0_c0[2];
+ float C = uSrcTF_Stage1_c0_c0[3];
+ float D = uSrcTF_Stage1_c0_c0[4];
+ float E = uSrcTF_Stage1_c0_c0[5];
+ float F = uSrcTF_Stage1_c0_c0[6];
+ float s = sign(x);
+ x = abs(x);
+ x = x < D ? C * x + F : pow(A * x + B, G) + E;
+ return s * x;
+}
+float dst_tf_Stage1_c0_c0(float x) {
+ float G = uDstTF_Stage1_c0_c0[0];
+ float A = uDstTF_Stage1_c0_c0[1];
+ float B = uDstTF_Stage1_c0_c0[2];
+ float C = uDstTF_Stage1_c0_c0[3];
+ float D = uDstTF_Stage1_c0_c0[4];
+ float E = uDstTF_Stage1_c0_c0[5];
+ float F = uDstTF_Stage1_c0_c0[6];
+ float s = sign(x);
+ x = abs(x);
+ x = x < D ? C * x + F : pow(A * x + B, G) + E;
+ return s * x;
+}
+vec4 gamut_xform_Stage1_c0_c0(vec4 color) {
+ color.xyz = uColorXform_Stage1_c0_c0 * color.xyz;
+ return color;
+}
+vec4 color_xform_Stage1_c0_c0(vec4 color) {
+ color.x = src_tf_Stage1_c0_c0(color.x);
+ color.y = src_tf_Stage1_c0_c0(color.y);
+ color.z = src_tf_Stage1_c0_c0(color.z);
+ color = gamut_xform_Stage1_c0_c0(color);
+ color.x = dst_tf_Stage1_c0_c0(color.x);
+ color.y = dst_tf_Stage1_c0_c0(color.y);
+ color.z = dst_tf_Stage1_c0_c0(color.z);
+ return color;
+}
+vec4 ColorSpaceXform_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = color_xform_Stage1_c0_c0(YUVtoRGBEffect_Stage1_c0_c0_c0_c0(vec4(1.0))) * _input;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ColorSpaceXform_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ vec4 inputColor = output_Stage1;
+ {
+ float nonZeroAlpha = max(inputColor.w, 9.9999997473787516e-05);
+ inputColor = vec4(inputColor.xyz / nonZeroAlpha, inputColor.w);
+ }
+ output_Stage2 = um_Stage2 * inputColor + uv_Stage2;
+ {
+ output_Stage2 = clamp(output_Stage2, 0.0, 1.0);
+ }
+ {
+ output_Stage2.xyz *= output_Stage2.w;
+ }
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1390.shader_test b/shaders/skia/1390.shader_test
new file mode 100644
index 0000000..f7aac49
--- /dev/null
+++ b/shaders/skia/1390.shader_test
@@ -0,0 +1,98 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_KHR_blend_equation_advanced : require
+out vec4 sk_FragColor;
+layout (blend_support_all_equations) out ;
+uniform float ucornerRadius_Stage1_c0_c0_c0_c0;
+uniform vec4 uproxyRect_Stage1_c0_c0_c0_c0;
+uniform float ublurRadius_Stage1_c0_c0_c0_c0;
+uniform mat4 um_Stage1_c0_c0_c1_c0;
+uniform vec4 uv_Stage1_c0_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+vec4 RRectBlurEffect_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 translatedFragPos = gl_FragCoord.xy - uproxyRect_Stage1_c0_c0_c0_c0.xy;
+ float threshold = ucornerRadius_Stage1_c0_c0_c0_c0 + 2.0 * ublurRadius_Stage1_c0_c0_c0_c0;
+ vec2 middle = (uproxyRect_Stage1_c0_c0_c0_c0.zw - uproxyRect_Stage1_c0_c0_c0_c0.xy) - 2.0 * threshold;
+ if (translatedFragPos.x >= threshold && translatedFragPos.x < middle.x + threshold) {
+ translatedFragPos.x = threshold;
+ } else if (translatedFragPos.x >= middle.x + threshold) {
+ translatedFragPos.x -= middle.x - 1.0;
+ }
+ if (translatedFragPos.y > threshold && translatedFragPos.y < middle.y + threshold) {
+ translatedFragPos.y = threshold;
+ } else if (translatedFragPos.y >= middle.y + threshold) {
+ translatedFragPos.y -= middle.y - 1.0;
+ }
+ vec2 proxyDims = vec2(2.0 * threshold + 1.0);
+ vec2 texCoord = translatedFragPos / proxyDims;
+ _output = _input * texture(uTextureSampler_0_Stage1, texCoord);
+ return _output;
+}
+vec4 ColorMatrixFragmentProcessor_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = _input;
+ {
+ float nonZeroAlpha = max(inputColor.w, 9.9999997473787516e-05);
+ inputColor = vec4(inputColor.xyz / nonZeroAlpha, inputColor.w);
+ }
+ _output = um_Stage1_c0_c0_c1_c0 * inputColor + uv_Stage1_c0_c0_c1_c0;
+ {
+ _output.w = clamp(_output.w, 0.0, 1.0);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_dst_out(vec4 src, vec4 dst) {
+ return (1.0 - src.w) * dst;
+}
+vec4 ComposeTwo_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_dst_out(RRectBlurEffect_Stage1_c0_c0_c0_c0(inputColor), ColorMatrixFragmentProcessor_Stage1_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 ColorTableEffect_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ float nonZeroAlpha = max(_input.w, 9.9999997473787516e-05);
+ vec4 coord = vec4(_input.xyz / nonZeroAlpha, nonZeroAlpha);
+ coord = coord * 0.9960939884185791 + vec4(0.0019529999699443579, 0.0019529999699443579, 0.0019529999699443579, 0.0019529999699443579);
+ _output.w = texture(uTextureSampler_1_Stage1, vec2(coord.w, 0.125)).w;
+ _output.x = texture(uTextureSampler_1_Stage1, vec2(coord.x, 0.375)).w;
+ _output.y = texture(uTextureSampler_1_Stage1, vec2(coord.y, 0.625)).w;
+ _output.z = texture(uTextureSampler_1_Stage1, vec2(coord.z, 0.875)).w;
+ _output.xyz *= _output.w;
+ return _output;
+}
+vec4 blend_screen(vec4 src, vec4 dst) {
+ return src + (1.0 - src) * dst;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(vec4(1.0).xyz, 1.0);
+ output_Stage1 = blend_screen(ComposeTwo_Stage1_c0_c0(inputColor), ColorTableEffect_Stage1_c1_c0(inputColor));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 position;
+void main() {
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1393.shader_test b/shaders/skia/1393.shader_test
new file mode 100644
index 0000000..826b12f
--- /dev/null
+++ b/shaders/skia/1393.shader_test
@@ -0,0 +1,445 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_KHR_blend_equation_advanced : require
+out vec4 sk_FragColor;
+layout (blend_support_all_equations) out ;
+uniform float uSrcTF_Stage0[7];
+uniform mat3 uColorXform_Stage0;
+uniform float uDstTF_Stage0[7];
+uniform vec2 uScale_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 uTexDom_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec3 uDecalParams_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 ucircleData_Stage1_c0_c0_c1_c0_c1_c0;
+uniform vec2 uImageIncrement_Stage1_c1_c0_c0_c0_c0_c0;
+uniform vec4 uKernel_Stage1_c1_c0_c0_c0_c0_c0[3];
+uniform vec2 uKernelOffset_Stage1_c1_c0_c0_c0_c0_c0;
+uniform float uGain_Stage1_c1_c0_c0_c0_c0_c0;
+uniform float uBias_Stage1_c1_c0_c0_c0_c0_c0;
+uniform vec4 uTexDom_Stage1_c1_c0_c0_c0_c0_c0;
+uniform vec3 uDecalParams_Stage1_c1_c0_c0_c0_c0_c0;
+uniform float uinnerThreshold_Stage1_c1_c0_c1_c0;
+uniform float uouterThreshold_Stage1_c1_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+uniform sampler2D uTextureSampler_2_Stage1;
+uniform sampler2D uTextureSampler_3_Stage1;
+uniform sampler2D uTextureSampler_4_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+noperspective in vec2 vTransformedCoords_3_Stage0;
+noperspective in vec2 vtextureCoords_Stage0;
+flat in vec4 vtextureDomain_Stage0;
+flat in vec4 vcolor_Stage0;
+float src_tf_Stage0(float x) {
+ float G = uSrcTF_Stage0[0];
+ float A = uSrcTF_Stage0[1];
+ float B = uSrcTF_Stage0[2];
+ float C = uSrcTF_Stage0[3];
+ float D = uSrcTF_Stage0[4];
+ float E = uSrcTF_Stage0[5];
+ float F = uSrcTF_Stage0[6];
+ float s = sign(x);
+ x = abs(x);
+ x = x < D ? C * x + F : pow(A * x + B, G) + E;
+ return s * x;
+}
+float dst_tf_Stage0(float x) {
+ float G = uDstTF_Stage0[0];
+ float A = uDstTF_Stage0[1];
+ float B = uDstTF_Stage0[2];
+ float C = uDstTF_Stage0[3];
+ float D = uDstTF_Stage0[4];
+ float E = uDstTF_Stage0[5];
+ float F = uDstTF_Stage0[6];
+ float s = sign(x);
+ x = abs(x);
+ x = x < D ? C * x + F : pow(A * x + B, G) + E;
+ return s * x;
+}
+vec4 gamut_xform_Stage0(vec4 color) {
+ color.xyz = uColorXform_Stage0 * color.xyz;
+ return color;
+}
+vec4 color_xform_Stage0(vec4 color) {
+ float nonZeroAlpha = max(color.w, 9.9999997473787516e-05);
+ color = vec4(color.xyz / nonZeroAlpha, nonZeroAlpha);
+ color.x = src_tf_Stage0(color.x);
+ color.y = src_tf_Stage0(color.y);
+ color.z = src_tf_Stage0(color.z);
+ color = gamut_xform_Stage0(color);
+ color.x = dst_tf_Stage0(color.x);
+ color.y = dst_tf_Stage0(color.y);
+ color.z = dst_tf_Stage0(color.z);
+ color.xyz *= color.w;
+ return color;
+}
+vec4 ClampFragmentProcessor_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = clamp(_input, 0.0, 1.0);
+ }
+ return _output;
+}
+vec4 DisplacementMap_Stage1_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 dColor = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ dColor.xyz = dColor.w < 9.9999999747524271e-07 ? vec3(0.0) : clamp(dColor.xyz / dColor.w, 0.0, 1.0);
+ vec2 cCoords = vTransformedCoords_1_Stage0 + uScale_Stage1_c0_c0_c0_c0_c1_c0 * (dColor.zz - vec2(0.5));
+ {
+ vec2 origCoord = cCoords;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0_c1_c0.xy, uTexDom_Stage1_c0_c0_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ _output = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ return _output;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 ComposeTwo_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_src_over(ClampFragmentProcessor_Stage1_c0_c0_c0_c0_c0_c0(inputColor), DisplacementMap_Stage1_c0_c0_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 ClampFragmentProcessor_Stage1_c0_c0_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ float alpha = clamp(_input.w, 0.0, 1.0);
+ _output = vec4(clamp(_input.xyz, 0.0, alpha), alpha);
+ }
+ return _output;
+}
+vec4 CircleBlurFragmentProcessor_Stage1_c0_c0_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 vec = vec2((gl_FragCoord.x - ucircleData_Stage1_c0_c0_c1_c0_c1_c0.x) * ucircleData_Stage1_c0_c0_c1_c0_c1_c0.w, (gl_FragCoord.y - ucircleData_Stage1_c0_c0_c1_c0_c1_c0.y) * ucircleData_Stage1_c0_c0_c1_c0_c1_c0.w);
+ float dist = length(vec) + (0.5 - ucircleData_Stage1_c0_c0_c1_c0_c1_c0.z) * ucircleData_Stage1_c0_c0_c1_c0_c1_c0.w;
+ _output = _input * texture(uTextureSampler_2_Stage1, vec2(dist, 0.5)).w;
+ return _output;
+}
+vec4 blend_xor(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src + (1.0 - src.w) * dst;
+}
+vec4 ComposeTwo_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_xor(ClampFragmentProcessor_Stage1_c0_c0_c1_c0_c0_c0(inputColor), CircleBlurFragmentProcessor_Stage1_c0_c0_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 blend_multiply(vec4 src, vec4 dst) {
+ return vec4(((1.0 - src.w) * dst.xyz + (1.0 - dst.w) * src.xyz) + src.xyz * dst.xyz, src.w + (1.0 - src.w) * dst.w);
+}
+vec4 ComposeTwo_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_multiply(ComposeTwo_Stage1_c0_c0_c0_c0(inputColor), ComposeTwo_Stage1_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 MatrixConvolution_Stage1_c1_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 sum = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_2_Stage0 - uKernelOffset_Stage1_c1_c0_c0_c0_c0_c0 * uImageIncrement_Stage1_c1_c0_c0_c0_c0_c0;
+ vec4 c;
+ {
+ float k = uKernel_Stage1_c1_c0_c0_c0_c0_c0[0].x;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0_c0_c0.xy, uTexDom_Stage1_c1_c0_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_3_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0_c0_c0_c0_c0[0].y;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1_c1_c0_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0_c0_c0.xy, uTexDom_Stage1_c1_c0_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_3_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0_c0_c0_c0_c0[0].z;
+ {
+ vec2 origCoord = coord + vec2(2.0, 0.0) * uImageIncrement_Stage1_c1_c0_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0_c0_c0.xy, uTexDom_Stage1_c1_c0_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_3_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0_c0_c0_c0_c0[0].w;
+ {
+ vec2 origCoord = coord + vec2(3.0, 0.0) * uImageIncrement_Stage1_c1_c0_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0_c0_c0.xy, uTexDom_Stage1_c1_c0_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_3_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0_c0_c0_c0_c0[1].x;
+ {
+ vec2 origCoord = coord + vec2(4.0, 0.0) * uImageIncrement_Stage1_c1_c0_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0_c0_c0.xy, uTexDom_Stage1_c1_c0_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_3_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0_c0_c0_c0_c0[1].y;
+ {
+ vec2 origCoord = coord + vec2(5.0, 0.0) * uImageIncrement_Stage1_c1_c0_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0_c0_c0.xy, uTexDom_Stage1_c1_c0_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_3_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0_c0_c0_c0_c0[1].z;
+ {
+ vec2 origCoord = coord + vec2(6.0, 0.0) * uImageIncrement_Stage1_c1_c0_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0_c0_c0.xy, uTexDom_Stage1_c1_c0_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_3_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0_c0_c0_c0_c0[1].w;
+ {
+ vec2 origCoord = coord + vec2(7.0, 0.0) * uImageIncrement_Stage1_c1_c0_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0_c0_c0.xy, uTexDom_Stage1_c1_c0_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_3_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0_c0_c0_c0_c0[2].x;
+ {
+ vec2 origCoord = coord + vec2(8.0, 0.0) * uImageIncrement_Stage1_c1_c0_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0_c0_c0.xy, uTexDom_Stage1_c1_c0_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_3_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0_c0_c0_c0_c0[2].y;
+ {
+ vec2 origCoord = coord + vec2(9.0, 0.0) * uImageIncrement_Stage1_c1_c0_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0_c0_c0.xy, uTexDom_Stage1_c1_c0_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_3_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ _output = sum * uGain_Stage1_c1_c0_c0_c0_c0_c0 + uBias_Stage1_c1_c0_c0_c0_c0_c0;
+ _output.w = clamp(_output.w, 0.0, 1.0);
+ _output.xyz = clamp(_output.xyz, 0.0, _output.w);
+ _output *= _input;
+ return _output;
+}
+vec4 ConfigConversionEffect_Stage1_c1_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = floor(_input * 255.0 + 0.5) / 255.0;
+ {
+ _output.xyz = _output.w <= 0.0 ? vec3(0.0) : floor((_output.xyz / _output.w) * 255.0 + 0.5) / 255.0;
+ }
+ return _output;
+}
+vec4 blend_difference(vec4 src, vec4 dst) {
+ return vec4((src.xyz + dst.xyz) - 2.0 * min(src.xyz * dst.w, dst.xyz * src.w), src.w + (1.0 - src.w) * dst.w);
+}
+vec4 ComposeTwo_Stage1_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_difference(MatrixConvolution_Stage1_c1_c0_c0_c0_c0_c0(inputColor), ConfigConversionEffect_Stage1_c1_c0_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 AlphaThresholdFragmentProcessor_Stage1_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 color = _input;
+ vec4 mask_color = texture(uTextureSampler_4_Stage1, vTransformedCoords_3_Stage0);
+ if (mask_color.w < 0.5) {
+ if (color.w > uouterThreshold_Stage1_c1_c0_c1_c0) {
+ float scale = uouterThreshold_Stage1_c1_c0_c1_c0 / color.w;
+ color.xyz *= scale;
+ color.w = uouterThreshold_Stage1_c1_c0_c1_c0;
+ }
+ } else if (color.w < uinnerThreshold_Stage1_c1_c0_c1_c0) {
+ float scale = uinnerThreshold_Stage1_c1_c0_c1_c0 / max(0.0010000000474974513, color.w);
+ color.xyz *= scale;
+ color.w = uinnerThreshold_Stage1_c1_c0_c1_c0;
+ }
+ _output = color;
+ return _output;
+}
+vec4 ComposeTwo_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_multiply(ComposeTwo_Stage1_c1_c0_c0_c0(inputColor), AlphaThresholdFragmentProcessor_Stage1_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+float _guarded_divide(float n, float d) {
+ return n / d;
+}
+float _color_burn_component(float sc, float sa, float dc, float da) {
+ if (da == dc) {
+ return (sa * da + sc * (1.0 - da)) + dc * (1.0 - sa);
+ } else if (sc == 0.0) {
+ return dc * (1.0 - sa);
+ }
+ float d = max(0.0, da - _guarded_divide((da - dc) * sa, sc));
+ return (d * sa + sc * (1.0 - da)) + dc * (1.0 - sa);
+}
+vec4 blend_color_burn(vec4 src, vec4 dst) {
+ return vec4(_color_burn_component(src.x, src.w, dst.x, dst.w), _color_burn_component(src.y, src.w, dst.y, dst.w), _color_burn_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ vec2 textureCoords;
+ textureCoords = vtextureCoords_Stage0;
+ vec4 textureDomain;
+ textureDomain = vtextureDomain_Stage0;
+ outputColor_Stage0 = vcolor_Stage0;
+ outputColor_Stage0 = color_xform_Stage0(texture(uTextureSampler_0_Stage0, clamp(textureCoords, textureDomain.xy, textureDomain.zw))) * outputColor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_color_burn(ComposeTwo_Stage1_c0_c0(inputColor), ComposeTwo_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+uniform mat3 uCoordTransformMatrix_3_Stage0;
+in vec2 position;
+in vec2 textureCoords;
+in vec4 textureDomain;
+in vec4 color;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+noperspective out vec2 vTransformedCoords_3_Stage0;
+noperspective out vec2 vtextureCoords_Stage0;
+flat out vec4 vtextureDomain_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vec2 pos2 = position;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(textureCoords, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(textureCoords, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(textureCoords, 1.0)).xy;
+ vTransformedCoords_3_Stage0 = (uCoordTransformMatrix_3_Stage0 * vec3(textureCoords, 1.0)).xy;
+ vtextureCoords_Stage0 = textureCoords;
+ vtextureDomain_Stage0 = textureDomain;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1396.shader_test b/shaders/skia/1396.shader_test
new file mode 100644
index 0000000..9facdc4
--- /dev/null
+++ b/shaders/skia/1396.shader_test
@@ -0,0 +1,54 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform float uinnerThreshold_Stage1;
+uniform float uouterThreshold_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ vec4 color = vec4(1.0);
+ vec4 mask_color = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ if (mask_color.w < 0.5) {
+ if (1.0 > uouterThreshold_Stage1) {
+ float scale = uouterThreshold_Stage1;
+ color.xyz *= scale;
+ color.w = uouterThreshold_Stage1;
+ }
+ } else if (1.0 < uinnerThreshold_Stage1) {
+ float scale = uinnerThreshold_Stage1 / max(0.0010000000474974513, 1.0);
+ color.xyz *= scale;
+ color.w = uinnerThreshold_Stage1;
+ }
+ output_Stage1 = color;
+ }
+ {
+ sk_FragColor = 1.0 - output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec2 inLocalCoord;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 color = inColor;
+ vcolor_Stage0 = color;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1399.shader_test b/shaders/skia/1399.shader_test
new file mode 100644
index 0000000..41a1bee
--- /dev/null
+++ b/shaders/skia/1399.shader_test
@@ -0,0 +1,30 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+in vec4 vcolor_Stage0;
+void main() {
+ {
+ sk_FragColor = 1.0 - vec4(1.0);
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+out vec4 vcolor_Stage0;
+void main() {
+ vec4 color = inColor;
+ vcolor_Stage0 = color;
+ vec3 pos3 = uViewM_Stage0 * vec3(inPosition, 1.0);
+ gl_Position = vec4(pos3.x, pos3.y, 0.0, pos3.z);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1402.shader_test b/shaders/skia/1402.shader_test
new file mode 100644
index 0000000..4709631
--- /dev/null
+++ b/shaders/skia/1402.shader_test
@@ -0,0 +1,169 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform float uPixelSize_Stage2;
+uniform vec2 uRange_Stage2;
+uniform float uinnerThreshold_Stage3;
+uniform float uouterThreshold_Stage3;
+uniform vec2 ubaseFrequency_Stage4_c0_c0;
+uniform vec2 ustitchData_Stage4_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage2;
+uniform sampler2D uTextureSampler_0_Stage3;
+uniform sampler2D uTextureSampler_0_Stage4;
+uniform sampler2D uTextureSampler_1_Stage4;
+noperspective in vec2 vEllipseOffsets_Stage0;
+noperspective in vec4 vEllipseRadii_Stage0;
+noperspective in vec4 vinColor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+float perlinnoise_Stage4_c0_c0(float chanCoord, vec2 noiseVec, vec2 stitchData) {
+ vec4 floorVal;
+ floorVal.xy = floor(noiseVec);
+ floorVal.zw = floorVal.xy + vec2(1.0);
+ vec2 fractVal = fract(noiseVec);
+ vec2 noiseSmooth = (fractVal * fractVal) * (vec2(3.0) - vec2(2.0) * fractVal);
+ if (floorVal.x >= stitchData.x) {
+ floorVal.x -= stitchData.x;
+ }
+ if (floorVal.y >= stitchData.y) {
+ floorVal.y -= stitchData.y;
+ }
+ if (floorVal.z >= stitchData.x) {
+ floorVal.z -= stitchData.x;
+ }
+ if (floorVal.w >= stitchData.y) {
+ floorVal.w -= stitchData.y;
+ }
+ floorVal = fract(floor(mod(floorVal, 256.0)) / vec4(256.0));
+ vec2 latticeIdx;
+ latticeIdx.x = texture(uTextureSampler_0_Stage4, vec2(floorVal.x, 0.5)).x;
+ latticeIdx.y = texture(uTextureSampler_0_Stage4, vec2(floorVal.z, 0.5)).x;
+ vec4 bcoords = fract(latticeIdx.xyxy + floorVal.yyww);
+ vec2 uv;
+ vec4 lattice = texture(uTextureSampler_1_Stage4, vec2(bcoords.x, chanCoord)).zyxw;
+ uv.x = dot((lattice.yw + lattice.xz * vec2(0.00390625)) * vec2(2.0) - vec2(1.0), fractVal);
+ fractVal.x -= 1.0;
+ lattice = texture(uTextureSampler_1_Stage4, vec2(bcoords.y, chanCoord)).zyxw;
+ uv.y = dot((lattice.yw + lattice.xz * vec2(0.00390625)) * vec2(2.0) - vec2(1.0), fractVal);
+ vec2 ab;
+ ab.x = mix(uv.x, uv.y, noiseSmooth.x);
+ fractVal.y -= 1.0;
+ lattice = texture(uTextureSampler_1_Stage4, vec2(bcoords.w, chanCoord)).zyxw;
+ uv.y = dot((lattice.yw + lattice.xz * vec2(0.00390625)) * vec2(2.0) - vec2(1.0), fractVal);
+ fractVal.x += 1.0;
+ lattice = texture(uTextureSampler_1_Stage4, vec2(bcoords.z, chanCoord)).zyxw;
+ uv.x = dot((lattice.yw + lattice.xz * vec2(0.00390625)) * vec2(2.0) - vec2(1.0), fractVal);
+ ab.y = mix(uv.x, uv.y, noiseSmooth.x);
+ return mix(ab.x, ab.y, noiseSmooth.y);
+}
+vec4 PerlinNoise_Stage4_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 noiseVec = floor(vTransformedCoords_2_Stage0) * ubaseFrequency_Stage4_c0_c0;
+ _output = vec4(0.0);
+ vec2 stitchData = ustitchData_Stage4_c0_c0;
+ float ratio = 1.0;
+ for (int octave = 0;octave < 3; ++octave) {
+ _output += abs(vec4(perlinnoise_Stage4_c0_c0(0.125, noiseVec, stitchData), perlinnoise_Stage4_c0_c0(0.375, noiseVec, stitchData), perlinnoise_Stage4_c0_c0(0.625, noiseVec, stitchData), perlinnoise_Stage4_c0_c0(0.875, noiseVec, stitchData))) * ratio;
+ noiseVec *= vec2(2.0);
+ ratio *= 0.5;
+ stitchData *= vec2(2.0);
+ }
+ _output = clamp(_output, 0.0, 1.0);
+ _output = vec4(_output.xyz * _output.www, _output.w);
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vinColor_Stage0;
+ vec2 offset = vEllipseOffsets_Stage0;
+ float test = dot(offset, offset) - 1.0;
+ vec2 grad = (2.0 * offset) * vEllipseRadii_Stage0.xy;
+ float grad_dot = dot(grad, grad);
+ grad_dot = max(grad_dot, 1.1754999560161448e-38);
+ float invlen = inversesqrt(grad_dot);
+ float edgeAlpha = clamp(0.5 - test * invlen, 0.0, 1.0);
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = outputColor_Stage0;
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = vec4(1.0, 1.0, 1.0, 1.0);
+ vec2 coord = vTransformedCoords_0_Stage0;
+ coord.y -= 5.0 * uPixelSize_Stage2;
+ for (int i = 0;i < 11; i++) {
+ output_Stage2 = min(output_Stage2, texture(uTextureSampler_0_Stage2, coord));
+ coord.y += uPixelSize_Stage2;
+ }
+ output_Stage2 *= output_Stage1;
+ }
+ vec4 output_Stage3;
+ {
+ vec4 color = outputCoverage_Stage0;
+ vec4 mask_color = texture(uTextureSampler_0_Stage3, vTransformedCoords_1_Stage0);
+ if (mask_color.w < 0.5) {
+ if (color.w > uouterThreshold_Stage3) {
+ float scale = uouterThreshold_Stage3 / color.w;
+ color.xyz *= scale;
+ color.w = uouterThreshold_Stage3;
+ }
+ } else if (color.w < uinnerThreshold_Stage3) {
+ float scale = uinnerThreshold_Stage3 / max(0.0010000000474974513, color.w);
+ color.xyz *= scale;
+ color.w = uinnerThreshold_Stage3;
+ }
+ output_Stage3 = color;
+ }
+ vec4 output_Stage4;
+ {
+ output_Stage4 = blend_dst_in(output_Stage3, PerlinNoise_Stage4_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage2 * output_Stage4;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec2 inEllipseOffset;
+in vec4 inEllipseRadii;
+noperspective out vec2 vEllipseOffsets_Stage0;
+noperspective out vec4 vEllipseRadii_Stage0;
+noperspective out vec4 vinColor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+void main() {
+ vEllipseOffsets_Stage0 = inEllipseOffset;
+ vEllipseRadii_Stage0 = inEllipseRadii;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1405.shader_test b/shaders/skia/1405.shader_test
new file mode 100644
index 0000000..bee37f9
--- /dev/null
+++ b/shaders/skia/1405.shader_test
@@ -0,0 +1,95 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_KHR_blend_equation_advanced : require
+out vec4 sk_FragColor;
+layout (blend_support_all_equations) out ;
+uniform vec4 uColor_Stage0;
+uniform vec4 uscale01_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias01_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale23_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias23_Stage1_c0_c0_c1_c0;
+uniform float uthreshold_Stage1_c0_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 RadialGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = length(vTransformedCoords_0_Stage0);
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 DualIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthreshold_Stage1_c0_c0_c1_c0) {
+ scale = uscale01_Stage1_c0_c0_c1_c0;
+ bias = ubias01_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale23_Stage1_c0_c0_c1_c0;
+ bias = ubias23_Stage1_c0_c0_c1_c0;
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = RadialGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ t.x = fract(t.x);
+ }
+ _output = DualIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = uColor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_dst_in(outputColor_Stage0, TiledGradientEffect_Stage1_c0_c0(vec4(1.0)));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = texture(uTextureSampler_0_Stage2, vTransformedCoords_1_Stage0) * output_Stage1;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 inLocalCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vec2 pos2 = position;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_PointSize = 1.0;
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1408.shader_test b/shaders/skia/1408.shader_test
new file mode 100644
index 0000000..1789de3
--- /dev/null
+++ b/shaders/skia/1408.shader_test
@@ -0,0 +1,113 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uCoordTransformMatrix_1_Stage0;
+uniform vec4 uCoordTransformMatrix_2_Stage0;
+uniform vec4 usubset_Stage1_c0_c0;
+uniform vec4 uclamp_Stage1_c0_c0;
+uniform vec4 uboundsUniform_Stage2_c1_c0;
+uniform float uxInvZoom_Stage2_c1_c0;
+uniform float uyInvZoom_Stage2_c1_c0;
+uniform float uxInvInset_Stage2_c1_c0;
+uniform float uyInvInset_Stage2_c1_c0;
+uniform vec2 uoffset_Stage2_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec3 vTransformedCoords_0_Stage0;
+noperspective in float vinCoverage_Stage0;
+vec4 TextureEffect_Stage1_c0_c0(vec4 _input, vec2 _coords) {
+ _coords = _coords * uCoordTransformMatrix_1_Stage0.xz + uCoordTransformMatrix_1_Stage0.yw;
+ vec4 _output;
+ vec2 inCoord = _coords;
+ vec2 subsetCoord;
+ subsetCoord.x = mod(inCoord.x - usubset_Stage1_c0_c0.x, usubset_Stage1_c0_c0.z - usubset_Stage1_c0_c0.x) + usubset_Stage1_c0_c0.x;
+ subsetCoord.y = mod(inCoord.y - usubset_Stage1_c0_c0.y, usubset_Stage1_c0_c0.w - usubset_Stage1_c0_c0.y) + usubset_Stage1_c0_c0.y;
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage1_c0_c0.x, uclamp_Stage1_c0_c0.z);
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage1_c0_c0.y, uclamp_Stage1_c0_c0.w);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ _output = _input * textureColor;
+ return _output;
+}
+vec4 MagnifierEffect_Stage2_c1_c0(vec4 _input, vec2 _coords) {
+ _coords = _coords * uCoordTransformMatrix_2_Stage0.xz + uCoordTransformMatrix_2_Stage0.yw;
+ vec4 _output;
+ vec2 coord = _coords;
+ vec2 zoom_coord = uoffset_Stage2_c1_c0 + coord * vec2(uxInvZoom_Stage2_c1_c0, uyInvZoom_Stage2_c1_c0);
+ vec2 delta = (coord - uboundsUniform_Stage2_c1_c0.xy) * uboundsUniform_Stage2_c1_c0.zw;
+ delta = min(delta, vec2(1.0, 1.0) - delta);
+ delta *= vec2(uxInvInset_Stage2_c1_c0, uyInvInset_Stage2_c1_c0);
+ float weight = 0.0;
+ if (delta.x < 2.0 && delta.y < 2.0) {
+ delta = vec2(2.0, 2.0) - delta;
+ float dist = length(delta);
+ dist = max(2.0 - dist, 0.0);
+ weight = min(dist * dist, 1.0);
+ } else {
+ vec2 delta_squared = delta * delta;
+ weight = min(min(delta_squared.x, delta_squared.y), 1.0);
+ }
+ _output = texture(uTextureSampler_0_Stage2, mix(coord, zoom_coord, weight));
+ return _output;
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ float alpha = 1.0;
+ alpha = vinCoverage_Stage0;
+ outputCoverage_Stage0 = vec4(alpha);
+ }
+ vec4 output_Stage1;
+ {
+ vec2 vTransformedCoords_0_Stage0_ensure2D = vTransformedCoords_0_Stage0.xy / vTransformedCoords_0_Stage0.z;
+ float coord = vTransformedCoords_0_Stage0_ensure2D.y - 0.5;
+ float f = fract(coord);
+ coord += 0.5 - f;
+ float f2 = f * f;
+ vec4 w = mat4(0.055555555555555552, 0.88888888888888884, 0.055555555555555552, 0.0, -0.5, 0.0, 0.5, 0.0, 0.83333333333333337, -2.0, 1.5, -0.33333333333333331, -0.3888888888888889, 1.1666666666666667, -1.1666666666666667, 0.3888888888888889) * vec4(1.0, f, f2, f2 * f);
+ vec4 c[4];
+ c[0] = TextureEffect_Stage1_c0_c0(vec4(1.0), vec2(vTransformedCoords_0_Stage0_ensure2D.x, coord + -1.0));
+ c[1] = TextureEffect_Stage1_c0_c0(vec4(1.0), vec2(vTransformedCoords_0_Stage0_ensure2D.x, coord));
+ c[2] = TextureEffect_Stage1_c0_c0(vec4(1.0), vec2(vTransformedCoords_0_Stage0_ensure2D.x, coord + 1.0));
+ c[3] = TextureEffect_Stage1_c0_c0(vec4(1.0), vec2(vTransformedCoords_0_Stage0_ensure2D.x, coord + 2.0));
+ vec4 bicubicColor = ((c[0] * w.x + c[1] * w.y) + c[2] * w.z) + c[3] * w.w;
+ bicubicColor.xyz = max(vec3(0.0), min(bicubicColor.xyz, bicubicColor.www));
+ output_Stage1 = bicubicColor * outputCoverage_Stage0;
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = MagnifierEffect_Stage2_c1_c0(output_Stage1, gl_FragCoord.xy);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in float inCoverage;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec3 vTransformedCoords_0_Stage0;
+noperspective out float vinCoverage_Stage0;
+void main() {
+ vec4 color = inColor;
+ vcolor_Stage0 = color;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0);
+ vinCoverage_Stage0 = inCoverage;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1414.shader_test b/shaders/skia/1414.shader_test
new file mode 100644
index 0000000..09d0642
--- /dev/null
+++ b/shaders/skia/1414.shader_test
@@ -0,0 +1,164 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uColor_Stage0;
+uniform vec4 urectH_Stage1;
+uniform float uinvSixSigma_Stage1;
+uniform vec4 uboundsUniform_Stage2_c0_c0;
+uniform float uxInvZoom_Stage2_c0_c0;
+uniform float uyInvZoom_Stage2_c0_c0;
+uniform float uxInvInset_Stage2_c0_c0;
+uniform float uyInvInset_Stage2_c0_c0;
+uniform vec2 uoffset_Stage2_c0_c0;
+uniform vec4 uboundsUniform_Stage3;
+uniform float uxInvZoom_Stage3;
+uniform float uyInvZoom_Stage3;
+uniform float uxInvInset_Stage3;
+uniform float uyInvInset_Stage3;
+uniform vec2 uoffset_Stage3;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+uniform sampler2D uTextureSampler_0_Stage3;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 MagnifierEffect_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coord = vTransformedCoords_0_Stage0;
+ vec2 zoom_coord = uoffset_Stage2_c0_c0 + coord * vec2(uxInvZoom_Stage2_c0_c0, uyInvZoom_Stage2_c0_c0);
+ vec2 delta = (coord - uboundsUniform_Stage2_c0_c0.xy) * uboundsUniform_Stage2_c0_c0.zw;
+ delta = min(delta, vec2(1.0, 1.0) - delta);
+ delta *= vec2(uxInvInset_Stage2_c0_c0, uyInvInset_Stage2_c0_c0);
+ float weight = 0.0;
+ if (delta.x < 2.0 && delta.y < 2.0) {
+ delta = vec2(2.0, 2.0) - delta;
+ float dist = length(delta);
+ dist = max(2.0 - dist, 0.0);
+ weight = min(dist * dist, 1.0);
+ } else {
+ vec2 delta_squared = delta * delta;
+ weight = min(min(delta_squared.x, delta_squared.y), 1.0);
+ }
+ _output = texture(uTextureSampler_0_Stage2, mix(coord, zoom_coord, weight));
+ return _output;
+}
+float _blend_color_saturation(vec3 color) {
+ return max(max(color.x, color.y), color.z) - min(min(color.x, color.y), color.z);
+}
+vec3 _blend_set_color_saturation_helper(vec3 minMidMax, float sat) {
+ if (minMidMax.x < minMidMax.z) {
+ return vec3(0.0, (sat * (minMidMax.y - minMidMax.x)) / (minMidMax.z - minMidMax.x), sat);
+ }
+ return vec3(0.0);
+}
+vec3 _blend_set_color_saturation(vec3 hueLumColor, vec3 satColor) {
+ float sat = _blend_color_saturation(satColor);
+ if (hueLumColor.x <= hueLumColor.y) {
+ if (hueLumColor.y <= hueLumColor.z) {
+ hueLumColor.xyz = _blend_set_color_saturation_helper(hueLumColor, sat);
+ } else if (hueLumColor.x <= hueLumColor.z) {
+ hueLumColor.xzy = _blend_set_color_saturation_helper(hueLumColor.xzy, sat);
+ } else {
+ hueLumColor.zxy = _blend_set_color_saturation_helper(hueLumColor.zxy, sat);
+ }
+ } else if (hueLumColor.x <= hueLumColor.z) {
+ hueLumColor.yxz = _blend_set_color_saturation_helper(hueLumColor.yxz, sat);
+ } else if (hueLumColor.y <= hueLumColor.z) {
+ hueLumColor.yzx = _blend_set_color_saturation_helper(hueLumColor.yzx, sat);
+ } else {
+ hueLumColor.zyx = _blend_set_color_saturation_helper(hueLumColor.zyx, sat);
+ }
+ return hueLumColor;
+}
+float _blend_color_luminance(vec3 color) {
+ return dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), color);
+}
+vec3 _blend_set_color_luminance(vec3 hueSatColor, float alpha, vec3 lumColor) {
+ float lum = _blend_color_luminance(lumColor);
+ vec3 result = (lum - _blend_color_luminance(hueSatColor)) + hueSatColor;
+ float minComp = min(min(result.x, result.y), result.z);
+ float maxComp = max(max(result.x, result.y), result.z);
+ if (minComp < 0.0 && lum != minComp) {
+ result = lum + ((result - lum) * lum) / (lum - minComp);
+ }
+ if (maxComp > alpha && maxComp != lum) {
+ return lum + ((result - lum) * (alpha - lum)) / (maxComp - lum);
+ }
+ return result;
+}
+vec4 blend_saturation(vec4 src, vec4 dst) {
+ float alpha = dst.w * src.w;
+ vec3 sda = src.xyz * dst.w;
+ vec3 dsa = dst.xyz * src.w;
+ return vec4((((_blend_set_color_luminance(_blend_set_color_saturation(dsa, sda), alpha, dsa) + dst.xyz) - dsa) + src.xyz) - sda, (src.w + dst.w) - alpha);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = uColor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ float xCoverage, yCoverage;
+ {
+ float x, y;
+ {
+ x = max(urectH_Stage1.x - gl_FragCoord.x, gl_FragCoord.x - urectH_Stage1.z);
+ y = max(urectH_Stage1.y - gl_FragCoord.y, gl_FragCoord.y - urectH_Stage1.w);
+ }
+ xCoverage = texture(uTextureSampler_0_Stage1, vec2(x * uinvSixSigma_Stage1, 0.5)).w;
+ yCoverage = texture(uTextureSampler_0_Stage1, vec2(y * uinvSixSigma_Stage1, 0.5)).w;
+ output_Stage1 = (outputColor_Stage0 * xCoverage) * yCoverage;
+ }
+ output_Stage1 = (outputColor_Stage0 * xCoverage) * yCoverage;
+ }
+ {
+ blend_saturation(vec4(1.0), MagnifierEffect_Stage2_c0_c0(vec4(1.0)));
+ }
+ vec4 output_Stage3;
+ {
+ vec2 coord = vTransformedCoords_1_Stage0;
+ vec2 zoom_coord = uoffset_Stage3 + coord * vec2(uxInvZoom_Stage3, uyInvZoom_Stage3);
+ vec2 delta = (coord - uboundsUniform_Stage3.xy) * uboundsUniform_Stage3.zw;
+ delta = min(delta, vec2(1.0, 1.0) - delta);
+ delta *= vec2(uxInvInset_Stage3, uyInvInset_Stage3);
+ float weight = 0.0;
+ if (delta.x < 2.0 && delta.y < 2.0) {
+ delta = vec2(2.0, 2.0) - delta;
+ float dist = length(delta);
+ dist = max(2.0 - dist, 0.0);
+ weight = min(dist * dist, 1.0);
+ } else {
+ vec2 delta_squared = delta * delta;
+ weight = min(min(delta_squared.x, delta_squared.y), 1.0);
+ }
+ output_Stage3 = texture(uTextureSampler_0_Stage3, mix(coord, zoom_coord, weight));
+ }
+ {
+ sk_FragColor = output_Stage1 * output_Stage3;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 inPosition;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vec2 pos2 = (uViewM_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/142-1.shader_test b/shaders/skia/142-1.shader_test
new file mode 100644
index 0000000..f5eccbe
--- /dev/null
+++ b/shaders/skia/142-1.shader_test
@@ -0,0 +1,162 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage2;
+uniform vec4 ucolor_Stage3_c1_c0;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.w) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ } else {
+ {
+ if (t < uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+vec4 ComposeOne_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_dst_in(_input, TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0)));
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = ComposeOne_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 ConstColorProcessor_Stage3_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage3_c1_c0;
+ }
+ return _output;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 blend_darken(vec4 src, vec4 dst) {
+ vec4 result = blend_src_over(src, dst);
+ result.xyz = min(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
+ return result;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_src_in(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ {
+ output_Stage2 = output_Stage1 * ucolor_Stage2;
+ }
+ }
+ vec4 output_Stage3;
+ {
+ output_Stage3 = blend_darken(ConstColorProcessor_Stage3_c1_c0(vec4(1.0)), output_Stage2);
+ }
+ {
+ sk_FragColor = output_Stage3;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 inColor;
+in vec2 inLocalCoord;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/142-11.shader_test b/shaders/skia/142-11.shader_test
new file mode 100644
index 0000000..72b1967
--- /dev/null
+++ b/shaders/skia/142-11.shader_test
@@ -0,0 +1,321 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uinnerRect_Stage1_c0_c0;
+uniform vec2 uradiusPlusHalf_Stage1_c0_c0;
+uniform vec2 uImageIncrement_Stage1_c1_c0_c0_c0_c0_c0;
+uniform float uSurfaceScale_Stage1_c1_c0_c0_c0_c0_c0;
+uniform vec3 uLightColor_Stage1_c1_c0_c0_c0_c0_c0;
+uniform float uKS_Stage1_c1_c0_c0_c0_c0_c0;
+uniform float uShininess_Stage1_c1_c0_c0_c0_c0_c0;
+uniform vec4 uTexDom_Stage1_c1_c0_c0_c0_c0_c0;
+uniform vec3 uDecalParams_Stage1_c1_c0_c0_c0_c0_c0;
+uniform vec3 uLightLocation_Stage1_c1_c0_c0_c0_c0_c0;
+uniform float uPixelSize_Stage1_c1_c0_c0_c0_c1_c0;
+uniform vec2 uRange_Stage1_c1_c0_c0_c0_c1_c0;
+uniform vec4 uellipse_Stage1_c1_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+noperspective in vec2 vEllipseOffsets_Stage0;
+noperspective in vec4 vEllipseRadii_Stage0;
+noperspective in vec4 vinColor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 CircularRRect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 dxy0 = uinnerRect_Stage1_c0_c0.xy - gl_FragCoord.xy;
+ vec2 dxy1 = gl_FragCoord.xy - uinnerRect_Stage1_c0_c0.zw;
+ vec2 dxy = max(max(dxy0, dxy1), 0.0);
+ float alpha = clamp(uradiusPlusHalf_Stage1_c0_c0.x - length(dxy), 0.0, 1.0);
+ _output = _input * alpha;
+ return _output;
+}
+vec4 light_Stage1_c1_c0_c0_c0_c0_c0(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ vec3 halfDir = normalize(surfaceToLight + vec3(0.0, 0.0, 1.0));
+ float colorScale = uKS_Stage1_c1_c0_c0_c0_c0_c0 * pow(dot(normal, halfDir), uShininess_Stage1_c1_c0_c0_c0_c0_c0);
+ vec3 color = lightColor * clamp(colorScale, 0.0, 1.0);
+ return vec4(color, max(max(color.x, color.y), color.z));
+}
+float sobel_Stage1_c1_c0_c0_c0_c0_c0(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage1_c1_c0_c0_c0_c0_c0(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage1_c1_c0_c0_c0_c0_c0(float m[9], float surfaceScale) {
+ return pointToNormal_Stage1_c1_c0_c0_c0_c0_c0(sobel_Stage1_c1_c0_c0_c0_c0_c0(m[0], m[2], m[3], m[5], m[6], m[8], 0.25), sobel_Stage1_c1_c0_c0_c0_c0_c0(m[0], m[6], m[1], m[7], m[2], m[8], 0.25), surfaceScale);
+}
+vec4 SpecularLighting_Stage1_c1_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coord = vTransformedCoords_0_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage1_c1_c0_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0_c0_c0.xy, uTexDom_Stage1_c1_c0_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp0 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1_c1_c0_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0_c0_c0.xy, uTexDom_Stage1_c1_c0_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1_c1_c0_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0_c0_c0.xy, uTexDom_Stage1_c1_c0_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage1_c1_c0_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0_c0_c0.xy, uTexDom_Stage1_c1_c0_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0_c0_c0.xy, uTexDom_Stage1_c1_c0_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1_c1_c0_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0_c0_c0.xy, uTexDom_Stage1_c1_c0_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp5 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage1_c1_c0_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0_c0_c0.xy, uTexDom_Stage1_c1_c0_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp6 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage1_c1_c0_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0_c0_c0.xy, uTexDom_Stage1_c1_c0_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp7 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage1_c1_c0_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0_c0_c0.xy, uTexDom_Stage1_c1_c0_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp8 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = normalize(uLightLocation_Stage1_c1_c0_c0_c0_c0_c0 - vec3(gl_FragCoord.xy, uSurfaceScale_Stage1_c1_c0_c0_c0_c0_c0 * m[4]));
+ _output = light_Stage1_c1_c0_c0_c0_c0_c0(normal_Stage1_c1_c0_c0_c0_c0_c0(m, uSurfaceScale_Stage1_c1_c0_c0_c0_c0_c0), surfaceToLight, uLightColor_Stage1_c1_c0_c0_c0_c0_c0);
+ _output *= _input;
+ return _output;
+}
+vec4 Morphology_Stage1_c1_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_1_Stage0;
+ coord.x -= 4.0 * uPixelSize_Stage1_c1_c0_c0_c0_c1_c0;
+ for (int i = 0;i < 9; i++) {
+ _output = max(_output, texture(uTextureSampler_1_Stage1, coord));
+ coord.x += uPixelSize_Stage1_c1_c0_c0_c0_c1_c0;
+ }
+ _output *= _input;
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+vec4 ComposeTwo_Stage1_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_dst_in(SpecularLighting_Stage1_c1_c0_c0_c0_c0_c0(inputColor), Morphology_Stage1_c1_c0_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 EllipseEffect_Stage1_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 d = gl_FragCoord.xy - uellipse_Stage1_c1_c0_c1_c0.xy;
+ vec2 Z = d * uellipse_Stage1_c1_c0_c1_c0.zw;
+ float implicit = dot(Z, d) - 1.0;
+ float grad_dot = 4.0 * dot(Z, Z);
+ {
+ grad_dot = max(grad_dot, 1.1754999560161448e-38);
+ }
+ float approx_dist = implicit * inversesqrt(grad_dot);
+ float alpha;
+ {
+ alpha = approx_dist > 0.0 ? 1.0 : 0.0;
+ }
+ _output = _input * alpha;
+ return _output;
+}
+float _guarded_divide(float n, float d) {
+ return n / d;
+}
+float _soft_light_component(float sc, float sa, float dc, float da) {
+ if (2.0 * sc <= sa) {
+ return (_guarded_divide((dc * dc) * (sa - 2.0 * sc), da) + (1.0 - da) * sc) + dc * ((-sa + 2.0 * sc) + 1.0);
+ } else if (4.0 * dc <= da) {
+ float DSqd = dc * dc;
+ float DCub = DSqd * dc;
+ float DaSqd = da * da;
+ float DaCub = DaSqd * da;
+ return _guarded_divide(((DaSqd * (sc - dc * ((3.0 * sa - 6.0 * sc) - 1.0)) + ((12.0 * da) * DSqd) * (sa - 2.0 * sc)) - (16.0 * DCub) * (sa - 2.0 * sc)) - DaCub * sc, DaSqd);
+ }
+ return ((dc * ((sa - 2.0 * sc) + 1.0) + sc) - sqrt(da * dc) * (sa - 2.0 * sc)) - da * sc;
+}
+vec4 blend_soft_light(vec4 src, vec4 dst) {
+ if (dst.w == 0.0) {
+ return src;
+ }
+ return vec4(_soft_light_component(src.x, src.w, dst.x, dst.w), _soft_light_component(src.y, src.w, dst.y, dst.w), _soft_light_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+}
+vec4 ComposeTwo_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_soft_light(ComposeTwo_Stage1_c1_c0_c0_c0(inputColor), EllipseEffect_Stage1_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 blend_multiply(vec4 src, vec4 dst) {
+ return vec4(((1.0 - src.w) * dst.xyz + (1.0 - dst.w) * src.xyz) + src.xyz * dst.xyz, src.w + (1.0 - src.w) * dst.w);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vinColor_Stage0;
+ vec2 offset = vEllipseOffsets_Stage0;
+ float test = dot(offset, offset) - 1.0;
+ vec2 grad = (2.0 * offset) * vEllipseRadii_Stage0.xy;
+ float grad_dot = dot(grad, grad);
+ grad_dot = max(grad_dot, 1.1754999560161448e-38);
+ float invlen = inversesqrt(grad_dot);
+ float edgeAlpha = clamp(0.5 - test * invlen, 0.0, 1.0);
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_multiply(CircularRRect_Stage1_c0_c0(inputColor), ComposeTwo_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ sk_FragColor = output_Stage1 * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec2 inEllipseOffset;
+in vec4 inEllipseRadii;
+noperspective out vec2 vEllipseOffsets_Stage0;
+noperspective out vec4 vEllipseRadii_Stage0;
+noperspective out vec4 vinColor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vEllipseOffsets_Stage0 = inEllipseOffset;
+ vEllipseRadii_Stage0 = inEllipseRadii;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/142-12.shader_test b/shaders/skia/142-12.shader_test
new file mode 100644
index 0000000..94f72db
--- /dev/null
+++ b/shaders/skia/142-12.shader_test
@@ -0,0 +1,62 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uCoordTransformMatrix_2_Stage0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec3 vTransformedCoords_1_Stage0;
+vec4 TextureEffect_Stage2_c0_c0(vec4 _input, vec2 _coords) {
+ _coords = _coords * uCoordTransformMatrix_2_Stage0.xz + uCoordTransformMatrix_2_Stage0.yw;
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage2, _coords) * _input;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ vec2 vTransformedCoords_1_Stage0_ensure2D = vTransformedCoords_1_Stage0.xy / vTransformedCoords_1_Stage0.z;
+ float coord = vTransformedCoords_1_Stage0_ensure2D.y - 0.5;
+ float f = fract(coord);
+ coord += 0.5 - f;
+ float f2 = f * f;
+ vec4 w = mat4(0.055555555555555552, 0.88888888888888884, 0.055555555555555552, 0.0, -0.5, 0.0, 0.5, 0.0, 0.83333333333333337, -2.0, 1.5, -0.33333333333333331, -0.3888888888888889, 1.1666666666666667, -1.1666666666666667, 0.3888888888888889) * vec4(1.0, f, f2, f2 * f);
+ vec4 c[4];
+ c[0] = TextureEffect_Stage2_c0_c0(vec4(1.0), vec2(vTransformedCoords_1_Stage0_ensure2D.x, coord + -1.0));
+ c[1] = TextureEffect_Stage2_c0_c0(vec4(1.0), vec2(vTransformedCoords_1_Stage0_ensure2D.x, coord));
+ c[2] = TextureEffect_Stage2_c0_c0(vec4(1.0), vec2(vTransformedCoords_1_Stage0_ensure2D.x, coord + 1.0));
+ c[3] = TextureEffect_Stage2_c0_c0(vec4(1.0), vec2(vTransformedCoords_1_Stage0_ensure2D.x, coord + 2.0));
+ vec4 bicubicColor = ((c[0] * w.x + c[1] * w.y) + c[2] * w.z) + c[3] * w.w;
+ bicubicColor.xyz = max(vec3(0.0), min(bicubicColor.xyz, bicubicColor.www));
+ output_Stage2 = bicubicColor * output_Stage1;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec3 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0);
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/142-3.shader_test b/shaders/skia/142-3.shader_test
new file mode 100644
index 0000000..2c337dd
--- /dev/null
+++ b/shaders/skia/142-3.shader_test
@@ -0,0 +1,78 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage2_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c1_c0;
+ }
+ return _output;
+}
+vec4 blend_dst_out(vec4 src, vec4 dst) {
+ return (1.0 - src.w) * dst;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_dst_out(ConstColorProcessor_Stage2_c1_c0(vec4(1.0)), output_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/142-4.shader_test b/shaders/skia/142-4.shader_test
new file mode 100644
index 0000000..f42a8a4
--- /dev/null
+++ b/shaders/skia/142-4.shader_test
@@ -0,0 +1,156 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform float uSurfaceScale_Stage1;
+uniform vec3 uLightColor_Stage1;
+uniform float uKS_Stage1;
+uniform float uShininess_Stage1;
+uniform vec3 uLightLocation_Stage1;
+uniform float uExponent_Stage1;
+uniform float uCosInnerConeAngle_Stage1;
+uniform float uCosOuterConeAngle_Stage1;
+uniform float uConeScale_Stage1;
+uniform vec3 uS_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 light_Stage1(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ vec3 halfDir = normalize(surfaceToLight + vec3(0.0, 0.0, 1.0));
+ float colorScale = uKS_Stage1 * pow(dot(normal, halfDir), uShininess_Stage1);
+ vec3 color = lightColor * clamp(colorScale, 0.0, 1.0);
+ return vec4(color, max(max(color.x, color.y), color.z));
+}
+float sobel_Stage1(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage1(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage1(float m[9], float surfaceScale) {
+ return pointToNormal_Stage1(sobel_Stage1(0.0, 0.0, m[4], m[5], m[7], m[8], 0.66666698455810547), sobel_Stage1(0.0, 0.0, m[4], m[7], m[5], m[8], 0.66666698455810547), surfaceScale);
+}
+vec3 lightColor_Stage1(vec3 surfaceToLight) {
+ float cosAngle = -dot(surfaceToLight, uS_Stage1);
+ if (cosAngle < uCosOuterConeAngle_Stage1) {
+ return vec3(0.0);
+ }
+ float scale = pow(cosAngle, uExponent_Stage1);
+ if (cosAngle < uCosInnerConeAngle_Stage1) {
+ return ((uLightColor_Stage1 * scale) * (cosAngle - uCosOuterConeAngle_Stage1)) * uConeScale_Stage1;
+ }
+ return uLightColor_Stage1;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ vec2 coord = vTransformedCoords_0_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp0 = textureColor;
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp1 = textureColor;
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp2 = textureColor;
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp3 = textureColor;
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp4 = textureColor;
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp5 = textureColor;
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp6 = textureColor;
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp7 = textureColor;
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp8 = textureColor;
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = normalize(uLightLocation_Stage1 - vec3(gl_FragCoord.xy, uSurfaceScale_Stage1 * m[4]));
+ output_Stage1 = light_Stage1(normal_Stage1(m, uSurfaceScale_Stage1), surfaceToLight, lightColor_Stage1(surfaceToLight));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/142-5.shader_test b/shaders/skia/142-5.shader_test
new file mode 100644
index 0000000..5349991
--- /dev/null
+++ b/shaders/skia/142-5.shader_test
@@ -0,0 +1,113 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+uniform vec2 uDstTextureUpperLeft_Stage2;
+uniform vec2 uDstTextureCoordScale_Stage2;
+uniform sampler2D uTextureSampler_0_Stage0;
+uniform sampler2D uDstTextureSampler_Stage2;
+noperspective in vec2 vTextureCoords_Stage0;
+flat in int vTexIndex_Stage0;
+noperspective in vec4 vinColor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ t.x = fract(t.x);
+ }
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+float _guarded_divide(float n, float d) {
+ return n / d;
+}
+float _color_dodge_component(float sc, float sa, float dc, float da) {
+ if (dc == 0.0) {
+ return sc * (1.0 - da);
+ } else {
+ float d = sa - sc;
+ if (d == 0.0) {
+ return (sa * da + sc * (1.0 - da)) + dc * (1.0 - sa);
+ }
+ d = min(da, _guarded_divide(dc * sa, d));
+ return (d * sa + sc * (1.0 - da)) + dc * (1.0 - sa);
+ }
+}
+vec4 blend_color_dodge(vec4 src, vec4 dst) {
+ return vec4(_color_dodge_component(src.x, src.w, dst.x, dst.w), _color_dodge_component(src.y, src.w, dst.y, dst.w), _color_dodge_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ vec4 texColor;
+ {
+ texColor = texture(uTextureSampler_0_Stage0, vTextureCoords_Stage0);
+ }
+ outputCoverage_Stage0 = texColor;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TiledGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ if (all(lessThanEqual(outputCoverage_Stage0.xyz, vec3(0.0)))) {
+ discard;
+ }
+ vec2 _dstTexCoord = (gl_FragCoord.xy - uDstTextureUpperLeft_Stage2) * uDstTextureCoordScale_Stage2;
+ _dstTexCoord.y = 1.0 - _dstTexCoord.y;
+ vec4 _dstColor = texture(uDstTextureSampler_Stage2, _dstTexCoord);
+ sk_FragColor = blend_color_dodge(output_Stage1, _dstColor);
+ float lerpRed = mix(_dstColor.w, sk_FragColor.w, outputCoverage_Stage0.x);
+ float lerpBlue = mix(_dstColor.w, sk_FragColor.w, outputCoverage_Stage0.y);
+ float lerpGreen = mix(_dstColor.w, sk_FragColor.w, outputCoverage_Stage0.z);
+ sk_FragColor = outputCoverage_Stage0 * sk_FragColor + (vec4(1.0) - outputCoverage_Stage0) * _dstColor;
+ sk_FragColor.w = max(max(lerpRed, lerpBlue), lerpGreen);
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform vec2 uAtlasSizeInv_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in uvec2 inTextureCoords;
+noperspective out vec2 vTextureCoords_Stage0;
+flat out int vTexIndex_Stage0;
+noperspective out vec4 vinColor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ ivec2 signedCoords = ivec2(int(inTextureCoords.x), int(inTextureCoords.y));
+ vec2 unormTexCoords = vec2(float(signedCoords.x / 2), float(signedCoords.y / 2));
+ vTextureCoords_Stage0 = unormTexCoords * uAtlasSizeInv_Stage0;
+ vTexIndex_Stage0 = 0;
+ vinColor_Stage0 = inColor;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(inPosition.x, inPosition.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/142.shader_test b/shaders/skia/142.shader_test
new file mode 100644
index 0000000..ecf52e9
--- /dev/null
+++ b/shaders/skia/142.shader_test
@@ -0,0 +1,137 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform float uSrcTF_Stage1_c0_c0[7];
+uniform mat3 uColorXform_Stage1_c0_c0;
+uniform float uDstTF_Stage1_c0_c0[7];
+uniform mat4 um_Stage2;
+uniform vec4 uv_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+uniform sampler2D uTextureSampler_2_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_1_Stage1, vTransformedCoords_1_Stage0) * _input;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c0_c0_c0_c0_c2_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_2_Stage1, vTransformedCoords_2_Stage0) * _input;
+ return _output;
+}
+vec4 YUVtoRGBEffect_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 planes[3];
+ planes[0] = TextureEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ planes[1] = TextureEffect_Stage1_c0_c0_c0_c0_c1_c0(vec4(1.0));
+ planes[2] = TextureEffect_Stage1_c0_c0_c0_c0_c2_c0(vec4(1.0));
+ vec4 color = vec4(planes[0].x, planes[1].x, planes[2].x, 1.0);
+ _output = color;
+ return _output;
+}
+float src_tf_Stage1_c0_c0(float x) {
+ float G = uSrcTF_Stage1_c0_c0[0];
+ float A = uSrcTF_Stage1_c0_c0[1];
+ float B = uSrcTF_Stage1_c0_c0[2];
+ float C = uSrcTF_Stage1_c0_c0[3];
+ float D = uSrcTF_Stage1_c0_c0[4];
+ float E = uSrcTF_Stage1_c0_c0[5];
+ float F = uSrcTF_Stage1_c0_c0[6];
+ float s = sign(x);
+ x = abs(x);
+ x = x < D ? C * x + F : pow(A * x + B, G) + E;
+ return s * x;
+}
+float dst_tf_Stage1_c0_c0(float x) {
+ float G = uDstTF_Stage1_c0_c0[0];
+ float A = uDstTF_Stage1_c0_c0[1];
+ float B = uDstTF_Stage1_c0_c0[2];
+ float C = uDstTF_Stage1_c0_c0[3];
+ float D = uDstTF_Stage1_c0_c0[4];
+ float E = uDstTF_Stage1_c0_c0[5];
+ float F = uDstTF_Stage1_c0_c0[6];
+ float s = sign(x);
+ x = abs(x);
+ x = x < D ? C * x + F : pow(A * x + B, G) + E;
+ return s * x;
+}
+vec4 gamut_xform_Stage1_c0_c0(vec4 color) {
+ color.xyz = uColorXform_Stage1_c0_c0 * color.xyz;
+ return color;
+}
+vec4 color_xform_Stage1_c0_c0(vec4 color) {
+ color.x = src_tf_Stage1_c0_c0(color.x);
+ color.y = src_tf_Stage1_c0_c0(color.y);
+ color.z = src_tf_Stage1_c0_c0(color.z);
+ color = gamut_xform_Stage1_c0_c0(color);
+ color.x = dst_tf_Stage1_c0_c0(color.x);
+ color.y = dst_tf_Stage1_c0_c0(color.y);
+ color.z = dst_tf_Stage1_c0_c0(color.z);
+ return color;
+}
+vec4 ColorSpaceXform_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = color_xform_Stage1_c0_c0(YUVtoRGBEffect_Stage1_c0_c0_c0_c0(vec4(1.0))) * _input;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ColorSpaceXform_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ vec4 inputColor = output_Stage1;
+ {
+ float nonZeroAlpha = max(inputColor.w, 9.9999997473787516e-05);
+ inputColor = vec4(inputColor.xyz / nonZeroAlpha, inputColor.w);
+ }
+ output_Stage2 = um_Stage2 * inputColor + uv_Stage2;
+ {
+ output_Stage2 = clamp(output_Stage2, 0.0, 1.0);
+ }
+ {
+ output_Stage2.xyz *= output_Stage2.w;
+ }
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1423.shader_test b/shaders/skia/1423.shader_test
new file mode 100644
index 0000000..68469cf
--- /dev/null
+++ b/shaders/skia/1423.shader_test
@@ -0,0 +1,220 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform mat4 um_Stage1_c0_c0_c1_c0;
+uniform vec4 uv_Stage1_c0_c0_c1_c0;
+uniform vec4 ucircle_Stage1_c1_c0_c0_c0;
+uniform vec2 ubaseFrequency_Stage1_c1_c0_c1_c0;
+uniform float uz_Stage1_c1_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in float vinCoverage_Stage0;
+vec4 Dither_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = _input;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_0_Stage0.x);
+ uint y = uint(vTransformedCoords_0_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ _output = vec4(clamp(_output.xyz + value * 0.01587301678955555, 0.0, _output.w), _output.w);
+ return _output;
+}
+vec4 ColorMatrixFragmentProcessor_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = _input;
+ _output = um_Stage1_c0_c0_c1_c0 * inputColor + uv_Stage1_c0_c0_c1_c0;
+ {
+ _output.w = clamp(_output.w, 0.0, 1.0);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_modulate(vec4 src, vec4 dst) {
+ return src * dst;
+}
+vec4 ComposeTwo_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_modulate(Dither_Stage1_c0_c0_c0_c0(inputColor), ColorMatrixFragmentProcessor_Stage1_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 CircleEffect_Stage1_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float d;
+ {
+ d = (length((ucircle_Stage1_c1_c0_c0_c0.xy - gl_FragCoord.xy) * ucircle_Stage1_c1_c0_c0_c0.w) - 1.0) * ucircle_Stage1_c1_c0_c0_c0.z;
+ }
+ {
+ _output = d > 0.5 ? _input : vec4(0.0);
+ }
+ return _output;
+}
+vec3 fade_Stage1_c1_c0_c1_c0(vec3 t) {
+ return ((t * t) * t) * (t * (t * 6.0 - 15.0) + 10.0);
+}
+float perm_Stage1_c1_c0_c1_c0(float x) {
+ return texture(uTextureSampler_0_Stage1, vec2(fract(x / 256.0), 0.0)).x * 255.0;
+}
+float grad_Stage1_c1_c0_c1_c0(float x, vec3 p) {
+ return dot(texture(uTextureSampler_1_Stage1, vec2(fract(x / 16.0), 0.0)).xyz * 255.0 - vec3(1.0), p);
+}
+float lerp_Stage1_c1_c0_c1_c0(float a, float b, float w) {
+ return a + w * (b - a);
+}
+float noise_Stage1_c1_c0_c1_c0(vec3 p) {
+ vec3 P = mod(floor(p), 256.0);
+ p -= floor(p);
+ vec3 f = fade_Stage1_c1_c0_c1_c0(p);
+ float A = perm_Stage1_c1_c0_c1_c0(P.x) + P.y;
+ float AA = perm_Stage1_c1_c0_c1_c0(A) + P.z;
+ float AB = perm_Stage1_c1_c0_c1_c0(A + 1.0) + P.z;
+ float B = perm_Stage1_c1_c0_c1_c0(P.x + 1.0) + P.y;
+ float BA = perm_Stage1_c1_c0_c1_c0(B) + P.z;
+ float BB = perm_Stage1_c1_c0_c1_c0(B + 1.0) + P.z;
+ float result = lerp_Stage1_c1_c0_c1_c0(lerp_Stage1_c1_c0_c1_c0(lerp_Stage1_c1_c0_c1_c0(grad_Stage1_c1_c0_c1_c0(perm_Stage1_c1_c0_c1_c0(AA), p), grad_Stage1_c1_c0_c1_c0(perm_Stage1_c1_c0_c1_c0(BA), p + vec3(-1.0, 0.0, 0.0)), f.x), lerp_Stage1_c1_c0_c1_c0(grad_Stage1_c1_c0_c1_c0(perm_Stage1_c1_c0_c1_c0(AB), p + vec3(0.0, -1.0, 0.0)), grad_Stage1_c1_c0_c1_c0(perm_Stage1_c1_c0_c1_c0(BB), p + vec3(-1.0, -1.0, 0.0)), f.x), f.y), lerp_Stage1_c1_c0_c1_c0(lerp_Stage1_c1_c0_c1_c0(grad_Stage1_c1_c0_c1_c0(perm_Stage1_c1_c0_c1_c0(AA + 1.0), p + vec3(0.0, 0.0, -1.0)), grad_Stage1_c1_c0_c1_c0(perm_Stage1_c1_c0_c1_c0(BA + 1.0), p + vec3(-1.0, 0.0, -1.0)), f.x), lerp_Stage1_c1_c0_c1_c0(grad_Stage1_c1_c0_c1_c0(perm_Stage1_c1_c0_c1_c0(AB + 1.0), p + vec3(0.0, -1.0, -1.0)), grad_Stage1_c1_c0_c1_c0(perm_Stage1_c1_c0_c1_c0(BB + 1.0), p + vec3(-1.0, -1.0, -1.0)), f.x), f.y), f.z);
+ return result;
+}
+float noiseOctaves_Stage1_c1_c0_c1_c0(vec3 p) {
+ float result = 0.0;
+ float ratio = 1.0;
+ for (float i = 0.0;i < 8.0; i++) {
+ result += noise_Stage1_c1_c0_c1_c0(p) / ratio;
+ p *= 2.0;
+ ratio *= 2.0;
+ }
+ return (result + 1.0) / 2.0;
+}
+vec4 ImprovedPerlinNoise_Stage1_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coords = vTransformedCoords_1_Stage0 * ubaseFrequency_Stage1_c1_c0_c1_c0;
+ float r = noiseOctaves_Stage1_c1_c0_c1_c0(vec3(coords, uz_Stage1_c1_c0_c1_c0));
+ float g = noiseOctaves_Stage1_c1_c0_c1_c0(vec3(coords, uz_Stage1_c1_c0_c1_c0));
+ float b = noiseOctaves_Stage1_c1_c0_c1_c0(vec3(coords, uz_Stage1_c1_c0_c1_c0));
+ float a = noiseOctaves_Stage1_c1_c0_c1_c0(vec3(coords, uz_Stage1_c1_c0_c1_c0));
+ _output = vec4(r, g, b, a);
+ _output = clamp(_output, 0.0, 1.0);
+ _output = vec4(_output.xyz * _output.www, _output.w);
+ return _output;
+}
+float _blend_color_saturation(vec3 color) {
+ return max(max(color.x, color.y), color.z) - min(min(color.x, color.y), color.z);
+}
+vec3 _blend_set_color_saturation_helper(vec3 minMidMax, float sat) {
+ if (minMidMax.x < minMidMax.z) {
+ return vec3(0.0, (sat * (minMidMax.y - minMidMax.x)) / (minMidMax.z - minMidMax.x), sat);
+ }
+ return vec3(0.0);
+}
+vec3 _blend_set_color_saturation(vec3 hueLumColor, vec3 satColor) {
+ float sat = _blend_color_saturation(satColor);
+ if (hueLumColor.x <= hueLumColor.y) {
+ if (hueLumColor.y <= hueLumColor.z) {
+ hueLumColor.xyz = _blend_set_color_saturation_helper(hueLumColor, sat);
+ } else if (hueLumColor.x <= hueLumColor.z) {
+ hueLumColor.xzy = _blend_set_color_saturation_helper(hueLumColor.xzy, sat);
+ } else {
+ hueLumColor.zxy = _blend_set_color_saturation_helper(hueLumColor.zxy, sat);
+ }
+ } else if (hueLumColor.x <= hueLumColor.z) {
+ hueLumColor.yxz = _blend_set_color_saturation_helper(hueLumColor.yxz, sat);
+ } else if (hueLumColor.y <= hueLumColor.z) {
+ hueLumColor.yzx = _blend_set_color_saturation_helper(hueLumColor.yzx, sat);
+ } else {
+ hueLumColor.zyx = _blend_set_color_saturation_helper(hueLumColor.zyx, sat);
+ }
+ return hueLumColor;
+}
+float _blend_color_luminance(vec3 color) {
+ return dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), color);
+}
+vec3 _blend_set_color_luminance(vec3 hueSatColor, float alpha, vec3 lumColor) {
+ float lum = _blend_color_luminance(lumColor);
+ vec3 result = (lum - _blend_color_luminance(hueSatColor)) + hueSatColor;
+ float minComp = min(min(result.x, result.y), result.z);
+ float maxComp = max(max(result.x, result.y), result.z);
+ if (minComp < 0.0 && lum != minComp) {
+ result = lum + ((result - lum) * lum) / (lum - minComp);
+ }
+ if (maxComp > alpha && maxComp != lum) {
+ return lum + ((result - lum) * (alpha - lum)) / (maxComp - lum);
+ }
+ return result;
+}
+vec4 blend_saturation(vec4 src, vec4 dst) {
+ float alpha = dst.w * src.w;
+ vec3 sda = src.xyz * dst.w;
+ vec3 dsa = dst.xyz * src.w;
+ return vec4((((_blend_set_color_luminance(_blend_set_color_saturation(dsa, sda), alpha, dsa) + dst.xyz) - dsa) + src.xyz) - sda, (src.w + dst.w) - alpha);
+}
+vec4 ComposeTwo_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_saturation(CircleEffect_Stage1_c1_c0_c0_c0(inputColor), ImprovedPerlinNoise_Stage1_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 blend_lighten(vec4 src, vec4 dst) {
+ vec4 result = blend_src_over(src, dst);
+ result.xyz = max(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
+ return result;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ float alpha = 1.0;
+ alpha = vinCoverage_Stage0;
+ outputCoverage_Stage0 = vec4(alpha);
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_lighten(ComposeTwo_Stage1_c0_c0(inputColor), ComposeTwo_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ sk_FragColor = output_Stage1 * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in float inCoverage;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out float vinCoverage_Stage0;
+void main() {
+ vec4 color = inColor;
+ vcolor_Stage0 = color;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(inPosition, 1.0)).xy;
+ vinCoverage_Stage0 = inCoverage;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1426.shader_test b/shaders/skia/1426.shader_test
new file mode 100644
index 0000000..9560397
--- /dev/null
+++ b/shaders/skia/1426.shader_test
@@ -0,0 +1,74 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_KHR_blend_equation_advanced : require
+out vec4 sk_FragColor;
+layout (blend_support_all_equations) out ;
+uniform float uinnerThreshold_Stage1;
+uniform float uouterThreshold_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec4 vQuadEdge_Stage0;
+noperspective in vec4 vinColor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vinColor_Stage0;
+ float edgeAlpha;
+ vec2 duvdx = dFdx(vQuadEdge_Stage0.xy);
+ vec2 duvdy = -dFdy(vQuadEdge_Stage0.xy);
+ if (vQuadEdge_Stage0.z > 0.0 && vQuadEdge_Stage0.w > 0.0) {
+ edgeAlpha = min(min(vQuadEdge_Stage0.z, vQuadEdge_Stage0.w) + 0.5, 1.0);
+ } else {
+ vec2 gF = vec2((2.0 * vQuadEdge_Stage0.x) * duvdx.x - duvdx.y, (2.0 * vQuadEdge_Stage0.x) * duvdy.x - duvdy.y);
+ edgeAlpha = vQuadEdge_Stage0.x * vQuadEdge_Stage0.x - vQuadEdge_Stage0.y;
+ edgeAlpha = clamp(0.5 - edgeAlpha / length(gF), 0.0, 1.0);
+ }
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ vec4 output_Stage1;
+ {
+ vec4 color = outputColor_Stage0;
+ vec4 mask_color = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ if (mask_color.w < 0.5) {
+ if (color.w > uouterThreshold_Stage1) {
+ float scale = uouterThreshold_Stage1 / color.w;
+ color.xyz *= scale;
+ color.w = uouterThreshold_Stage1;
+ }
+ } else if (color.w < uinnerThreshold_Stage1) {
+ float scale = uinnerThreshold_Stage1 / max(0.0010000000474974513, color.w);
+ color.xyz *= scale;
+ color.w = uinnerThreshold_Stage1;
+ }
+ output_Stage1 = color;
+ }
+ {
+ sk_FragColor = outputCoverage_Stage0 * output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec4 inQuadEdge;
+noperspective out vec4 vQuadEdge_Stage0;
+noperspective out vec4 vinColor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vQuadEdge_Stage0 = inQuadEdge;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1429.shader_test b/shaders/skia/1429.shader_test
new file mode 100644
index 0000000..fdb1d27
--- /dev/null
+++ b/shaders/skia/1429.shader_test
@@ -0,0 +1,252 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uColor_Stage0;
+uniform float uCoverage_Stage0;
+uniform vec4 uinnerRect_Stage1_c0_c0_c0_c0;
+uniform vec2 uradiusPlusHalf_Stage1_c0_c0_c0_c0;
+uniform vec4 ucolor_Stage1_c0_c0_c1_c0;
+uniform float uinnerThreshold_Stage1_c1_c0_c0_c0_c0_c0;
+uniform float uouterThreshold_Stage1_c1_c0_c0_c0_c0_c0;
+uniform vec4 uinnerRect_Stage1_c1_c0_c0_c0_c1_c0;
+uniform vec2 uradiusPlusHalf_Stage1_c1_c0_c0_c0_c1_c0;
+uniform vec4 uinnerRect_Stage1_c1_c0_c1_c0_c0_c0;
+uniform vec2 uradiusPlusHalf_Stage1_c1_c0_c1_c0_c0_c0;
+uniform vec4 urectH_Stage1_c1_c0_c1_c0_c1_c0;
+uniform float uinvSixSigma_Stage1_c1_c0_c1_c0_c1_c0;
+uniform vec2 uDstTextureUpperLeft_Stage2;
+uniform vec2 uDstTextureCoordScale_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+uniform sampler2D uDstTextureSampler_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 CircularRRect_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 dxy0 = uinnerRect_Stage1_c0_c0_c0_c0.xy - gl_FragCoord.xy;
+ vec2 dxy1 = gl_FragCoord.xy - uinnerRect_Stage1_c0_c0_c0_c0.zw;
+ vec2 dxy = max(max(dxy0, dxy1), 0.0);
+ float alpha = clamp(uradiusPlusHalf_Stage1_c0_c0_c0_c0.x - length(dxy), 0.0, 1.0);
+ alpha = 1.0 - alpha;
+ _output = _input * alpha;
+ return _output;
+}
+vec4 ConstColorProcessor_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage1_c0_c0_c1_c0;
+ }
+ return _output;
+}
+vec4 blend_screen(vec4 src, vec4 dst) {
+ return src + (1.0 - src) * dst;
+}
+vec4 ComposeTwo_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_screen(CircularRRect_Stage1_c0_c0_c0_c0(inputColor), ConstColorProcessor_Stage1_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 AlphaThresholdFragmentProcessor_Stage1_c1_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 color = _input;
+ vec4 mask_color = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ if (mask_color.w < 0.5) {
+ if (color.w > uouterThreshold_Stage1_c1_c0_c0_c0_c0_c0) {
+ float scale = uouterThreshold_Stage1_c1_c0_c0_c0_c0_c0 / color.w;
+ color.xyz *= scale;
+ color.w = uouterThreshold_Stage1_c1_c0_c0_c0_c0_c0;
+ }
+ } else if (color.w < uinnerThreshold_Stage1_c1_c0_c0_c0_c0_c0) {
+ float scale = uinnerThreshold_Stage1_c1_c0_c0_c0_c0_c0 / max(0.0010000000474974513, color.w);
+ color.xyz *= scale;
+ color.w = uinnerThreshold_Stage1_c1_c0_c0_c0_c0_c0;
+ }
+ _output = color;
+ return _output;
+}
+vec4 CircularRRect_Stage1_c1_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 dxy0 = uinnerRect_Stage1_c1_c0_c0_c0_c1_c0.xy - gl_FragCoord.xy;
+ vec2 dxy1 = gl_FragCoord.xy - uinnerRect_Stage1_c1_c0_c0_c0_c1_c0.zw;
+ vec2 dxy = max(max(dxy0, dxy1), 0.0);
+ float alpha = clamp(uradiusPlusHalf_Stage1_c1_c0_c0_c0_c1_c0.x - length(dxy), 0.0, 1.0);
+ alpha = 1.0 - alpha;
+ _output = _input * alpha;
+ return _output;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 blend_lighten(vec4 src, vec4 dst) {
+ vec4 result = blend_src_over(src, dst);
+ result.xyz = max(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
+ return result;
+}
+vec4 ComposeTwo_Stage1_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_lighten(AlphaThresholdFragmentProcessor_Stage1_c1_c0_c0_c0_c0_c0(inputColor), CircularRRect_Stage1_c1_c0_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 CircularRRect_Stage1_c1_c0_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 dxy0 = uinnerRect_Stage1_c1_c0_c1_c0_c0_c0.xy - gl_FragCoord.xy;
+ vec2 dxy1 = gl_FragCoord.xy - uinnerRect_Stage1_c1_c0_c1_c0_c0_c0.zw;
+ vec2 dxy = max(max(dxy0, dxy1), 0.0);
+ float alpha = clamp(uradiusPlusHalf_Stage1_c1_c0_c1_c0_c0_c0.x - length(dxy), 0.0, 1.0);
+ alpha = 1.0 - alpha;
+ _output = _input * alpha;
+ return _output;
+}
+vec4 RectBlurEffect_Stage1_c1_c0_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float xCoverage, yCoverage;
+ {
+ float x, y;
+ {
+ x = max(urectH_Stage1_c1_c0_c1_c0_c1_c0.x - gl_FragCoord.x, gl_FragCoord.x - urectH_Stage1_c1_c0_c1_c0_c1_c0.z);
+ y = max(urectH_Stage1_c1_c0_c1_c0_c1_c0.y - gl_FragCoord.y, gl_FragCoord.y - urectH_Stage1_c1_c0_c1_c0_c1_c0.w);
+ }
+ xCoverage = texture(uTextureSampler_1_Stage1, vec2(x * uinvSixSigma_Stage1_c1_c0_c1_c0_c1_c0, 0.5)).w;
+ yCoverage = texture(uTextureSampler_1_Stage1, vec2(y * uinvSixSigma_Stage1_c1_c0_c1_c0_c1_c0, 0.5)).w;
+ _output = (_input * xCoverage) * yCoverage;
+ }
+ _output = (_input * xCoverage) * yCoverage;
+ return _output;
+}
+vec4 blend_dst_out(vec4 src, vec4 dst) {
+ return (1.0 - src.w) * dst;
+}
+vec4 ComposeTwo_Stage1_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_dst_out(CircularRRect_Stage1_c1_c0_c1_c0_c0_c0(inputColor), RectBlurEffect_Stage1_c1_c0_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+float _guarded_divide(float n, float d) {
+ return n / d;
+}
+float _soft_light_component(float sc, float sa, float dc, float da) {
+ if (2.0 * sc <= sa) {
+ return (_guarded_divide((dc * dc) * (sa - 2.0 * sc), da) + (1.0 - da) * sc) + dc * ((-sa + 2.0 * sc) + 1.0);
+ } else if (4.0 * dc <= da) {
+ float DSqd = dc * dc;
+ float DCub = DSqd * dc;
+ float DaSqd = da * da;
+ float DaCub = DaSqd * da;
+ return _guarded_divide(((DaSqd * (sc - dc * ((3.0 * sa - 6.0 * sc) - 1.0)) + ((12.0 * da) * DSqd) * (sa - 2.0 * sc)) - (16.0 * DCub) * (sa - 2.0 * sc)) - DaCub * sc, DaSqd);
+ }
+ return ((dc * ((sa - 2.0 * sc) + 1.0) + sc) - sqrt(da * dc) * (sa - 2.0 * sc)) - da * sc;
+}
+vec4 blend_soft_light(vec4 src, vec4 dst) {
+ if (dst.w == 0.0) {
+ return src;
+ }
+ return vec4(_soft_light_component(src.x, src.w, dst.x, dst.w), _soft_light_component(src.y, src.w, dst.y, dst.w), _soft_light_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+}
+vec4 ComposeTwo_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_soft_light(ComposeTwo_Stage1_c1_c0_c0_c0(inputColor), ComposeTwo_Stage1_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+float _blend_color_saturation(vec3 color) {
+ return max(max(color.x, color.y), color.z) - min(min(color.x, color.y), color.z);
+}
+vec3 _blend_set_color_saturation_helper(vec3 minMidMax, float sat) {
+ if (minMidMax.x < minMidMax.z) {
+ return vec3(0.0, (sat * (minMidMax.y - minMidMax.x)) / (minMidMax.z - minMidMax.x), sat);
+ }
+ return vec3(0.0);
+}
+vec3 _blend_set_color_saturation(vec3 hueLumColor, vec3 satColor) {
+ float sat = _blend_color_saturation(satColor);
+ if (hueLumColor.x <= hueLumColor.y) {
+ if (hueLumColor.y <= hueLumColor.z) {
+ hueLumColor.xyz = _blend_set_color_saturation_helper(hueLumColor, sat);
+ } else if (hueLumColor.x <= hueLumColor.z) {
+ hueLumColor.xzy = _blend_set_color_saturation_helper(hueLumColor.xzy, sat);
+ } else {
+ hueLumColor.zxy = _blend_set_color_saturation_helper(hueLumColor.zxy, sat);
+ }
+ } else if (hueLumColor.x <= hueLumColor.z) {
+ hueLumColor.yxz = _blend_set_color_saturation_helper(hueLumColor.yxz, sat);
+ } else if (hueLumColor.y <= hueLumColor.z) {
+ hueLumColor.yzx = _blend_set_color_saturation_helper(hueLumColor.yzx, sat);
+ } else {
+ hueLumColor.zyx = _blend_set_color_saturation_helper(hueLumColor.zyx, sat);
+ }
+ return hueLumColor;
+}
+float _blend_color_luminance(vec3 color) {
+ return dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), color);
+}
+vec3 _blend_set_color_luminance(vec3 hueSatColor, float alpha, vec3 lumColor) {
+ float lum = _blend_color_luminance(lumColor);
+ vec3 result = (lum - _blend_color_luminance(hueSatColor)) + hueSatColor;
+ float minComp = min(min(result.x, result.y), result.z);
+ float maxComp = max(max(result.x, result.y), result.z);
+ if (minComp < 0.0 && lum != minComp) {
+ result = lum + ((result - lum) * lum) / (lum - minComp);
+ }
+ if (maxComp > alpha && maxComp != lum) {
+ return lum + ((result - lum) * (alpha - lum)) / (maxComp - lum);
+ }
+ return result;
+}
+vec4 blend_hue(vec4 src, vec4 dst) {
+ float alpha = dst.w * src.w;
+ vec3 sda = src.xyz * dst.w;
+ vec3 dsa = dst.xyz * src.w;
+ return vec4((((_blend_set_color_luminance(_blend_set_color_saturation(sda, dsa), alpha, dsa) + dst.xyz) - dsa) + src.xyz) - sda, (src.w + dst.w) - alpha);
+}
+vec4 blend_src_out(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = uColor_Stage0;
+ outputCoverage_Stage0 = vec4(uCoverage_Stage0);
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_hue(ComposeTwo_Stage1_c0_c0(inputColor), ComposeTwo_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ if (all(lessThanEqual(outputCoverage_Stage0.xyz, vec3(0.0)))) {
+ discard;
+ }
+ vec2 _dstTexCoord = (gl_FragCoord.xy - uDstTextureUpperLeft_Stage2) * uDstTextureCoordScale_Stage2;
+ vec4 _dstColor = texture(uDstTextureSampler_Stage2, _dstTexCoord);
+ sk_FragColor = blend_src_out(output_Stage1, _dstColor);
+ sk_FragColor = outputCoverage_Stage0 * sk_FragColor + (vec4(1.0) - outputCoverage_Stage0) * _dstColor;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec2 pos2 = (uViewM_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1432.shader_test b/shaders/skia/1432.shader_test
new file mode 100644
index 0000000..043db7c
--- /dev/null
+++ b/shaders/skia/1432.shader_test
@@ -0,0 +1,107 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_KHR_blend_equation_advanced : require
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+layout (blend_support_all_equations) out ;
+uniform vec4 ucolor0_Stage1_c0_c0;
+uniform vec4 ucolor1_Stage1_c0_c0;
+uniform vec4 ucolor2_Stage1_c0_c0;
+uniform vec4 ucolor3_Stage1_c0_c0;
+uniform vec4 ucolor4_Stage1_c0_c0;
+uniform vec4 ucolor5_Stage1_c0_c0;
+uniform vec4 ucircleData_Stage1_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vEllipseOffsets_Stage0;
+noperspective in vec4 vEllipseRadii_Stage0;
+noperspective in vec4 vinColor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 Overdraw_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = _input;
+ float alpha = 255.0 * _output.w;
+ if (alpha < 0.5) {
+ _output = ucolor0_Stage1_c0_c0;
+ } else if (alpha < 1.5) {
+ _output = ucolor1_Stage1_c0_c0;
+ } else if (alpha < 2.5) {
+ _output = ucolor2_Stage1_c0_c0;
+ } else if (alpha < 3.5) {
+ _output = ucolor3_Stage1_c0_c0;
+ } else if (alpha < 4.5) {
+ _output = ucolor4_Stage1_c0_c0;
+ } else {
+ _output = ucolor5_Stage1_c0_c0;
+ }
+ return _output;
+}
+vec4 CircleBlurFragmentProcessor_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 vec = vec2((gl_FragCoord.x - ucircleData_Stage1_c1_c0.x) * ucircleData_Stage1_c1_c0.w, (gl_FragCoord.y - ucircleData_Stage1_c1_c0.y) * ucircleData_Stage1_c1_c0.w);
+ float dist = length(vec) + (0.5 - ucircleData_Stage1_c1_c0.z) * ucircleData_Stage1_c1_c0.w;
+ _output = _input * texture(uTextureSampler_0_Stage1, vec2(dist, 0.5)).w;
+ return _output;
+}
+vec4 blend_dst_atop(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src + src.w * dst;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vinColor_Stage0;
+ vec2 offset = vEllipseOffsets_Stage0;
+ offset *= vEllipseRadii_Stage0.xy;
+ float test = dot(offset, offset) - 1.0;
+ vec2 grad = (2.0 * offset) * vEllipseRadii_Stage0.xy;
+ float grad_dot = dot(grad, grad);
+ grad_dot = max(grad_dot, 1.1754999560161448e-38);
+ float invlen = inversesqrt(grad_dot);
+ float edgeAlpha = clamp(0.5 - test * invlen, 0.0, 1.0);
+ offset = vEllipseOffsets_Stage0 * vEllipseRadii_Stage0.zw;
+ test = dot(offset, offset) - 1.0;
+ grad = (2.0 * offset) * vEllipseRadii_Stage0.zw;
+ grad_dot = dot(grad, grad);
+ invlen = inversesqrt(grad_dot);
+ edgeAlpha *= clamp(0.5 + test * invlen, 0.0, 1.0);
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_dst_atop(Overdraw_Stage1_c0_c0(inputColor), CircleBlurFragmentProcessor_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ sk_FragColor = outputCoverage_Stage0 * output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec2 inEllipseOffset;
+in vec4 inEllipseRadii;
+noperspective out vec2 vEllipseOffsets_Stage0;
+noperspective out vec4 vEllipseRadii_Stage0;
+noperspective out vec4 vinColor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vEllipseOffsets_Stage0 = inEllipseOffset;
+ vEllipseRadii_Stage0 = inEllipseRadii;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1435.shader_test b/shaders/skia/1435.shader_test
new file mode 100644
index 0000000..856b1a1
--- /dev/null
+++ b/shaders/skia/1435.shader_test
@@ -0,0 +1,68 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uinnerRect_Stage1;
+uniform vec2 uinvRadiiXY_Stage1;
+noperspective in vec2 vEllipseOffsets0_Stage0;
+noperspective in vec2 vEllipseOffsets1_Stage0;
+noperspective in vec4 vinColor_Stage0;
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ vec2 scaledOffset = vEllipseOffsets0_Stage0;
+ float test = dot(scaledOffset, scaledOffset) - 1.0;
+ vec2 duvdx = dFdx(vEllipseOffsets0_Stage0);
+ vec2 duvdy = -dFdy(vEllipseOffsets0_Stage0);
+ vec2 grad = vec2(vEllipseOffsets0_Stage0.x * duvdx.x + vEllipseOffsets0_Stage0.y * duvdx.y, vEllipseOffsets0_Stage0.x * duvdy.x + vEllipseOffsets0_Stage0.y * duvdy.y);
+ float grad_dot = 4.0 * dot(grad, grad);
+ grad_dot = max(grad_dot, 1.1754999560161448e-38);
+ float invlen = inversesqrt(grad_dot);
+ float edgeAlpha = clamp(1.0 - test * invlen, 0.0, 1.0);
+ edgeAlpha *= clamp(1.0 + test * invlen, 0.0, 1.0);
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ vec4 output_Stage1;
+ {
+ vec2 dxy0 = uinnerRect_Stage1.xy - gl_FragCoord.xy;
+ vec2 dxy1 = gl_FragCoord.xy - uinnerRect_Stage1.zw;
+ vec2 dxy = max(max(dxy0, dxy1), 0.0);
+ vec2 Z = dxy * uinvRadiiXY_Stage1;
+ float implicit = dot(Z, dxy) - 1.0;
+ float grad_dot = 4.0 * dot(Z, Z);
+ grad_dot = max(grad_dot, 9.9999997473787516e-05);
+ float approx_dist = implicit * inversesqrt(grad_dot);
+ float alpha = clamp(0.5 - approx_dist, 0.0, 1.0);
+ output_Stage1 = outputCoverage_Stage0 * alpha;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec2 inEllipseOffsets0;
+in vec2 inEllipseOffsets1;
+noperspective out vec2 vEllipseOffsets0_Stage0;
+noperspective out vec2 vEllipseOffsets1_Stage0;
+noperspective out vec4 vinColor_Stage0;
+void main() {
+ vEllipseOffsets0_Stage0 = inEllipseOffsets0;
+ vEllipseOffsets1_Stage0 = inEllipseOffsets1;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = (uViewM_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1441.shader_test b/shaders/skia/1441.shader_test
new file mode 100644
index 0000000..10165da
--- /dev/null
+++ b/shaders/skia/1441.shader_test
@@ -0,0 +1,260 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uColor_Stage0;
+uniform vec2 uImageIncrement_Stage1_c0_c0_c0_c0_c0_c0;
+uniform vec2 uBounds_Stage1_c0_c0_c0_c0_c0_c0;
+uniform vec4 uKernel_Stage1_c0_c0_c0_c0_c0_c0[6];
+uniform vec4 ucircle_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 ucircleData_Stage1_c0_c0_c1_c0_c1_c0;
+uniform float uPixelSize_Stage1_c1_c0;
+uniform vec2 uRange_Stage1_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+uniform sampler2D uTextureSampler_2_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in float vinCoverage_Stage0;
+vec4 GaussianConvolution_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0 - 10.0 * uImageIncrement_Stage1_c0_c0_c0_c0_c0_c0;
+ vec2 coordSampled = vec2(0.0, 0.0);
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1_c0_c0_c0_c0_c0_c0.x, uBounds_Stage1_c0_c0_c0_c0_c0_c0.y - uBounds_Stage1_c0_c0_c0_c0_c0_c0.x) + uBounds_Stage1_c0_c0_c0_c0_c0_c0.x;
+ _output += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c0_c0_c0_c0[0].x;
+ coord += uImageIncrement_Stage1_c0_c0_c0_c0_c0_c0;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1_c0_c0_c0_c0_c0_c0.x, uBounds_Stage1_c0_c0_c0_c0_c0_c0.y - uBounds_Stage1_c0_c0_c0_c0_c0_c0.x) + uBounds_Stage1_c0_c0_c0_c0_c0_c0.x;
+ _output += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c0_c0_c0_c0[0].y;
+ coord += uImageIncrement_Stage1_c0_c0_c0_c0_c0_c0;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1_c0_c0_c0_c0_c0_c0.x, uBounds_Stage1_c0_c0_c0_c0_c0_c0.y - uBounds_Stage1_c0_c0_c0_c0_c0_c0.x) + uBounds_Stage1_c0_c0_c0_c0_c0_c0.x;
+ _output += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c0_c0_c0_c0[0].z;
+ coord += uImageIncrement_Stage1_c0_c0_c0_c0_c0_c0;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1_c0_c0_c0_c0_c0_c0.x, uBounds_Stage1_c0_c0_c0_c0_c0_c0.y - uBounds_Stage1_c0_c0_c0_c0_c0_c0.x) + uBounds_Stage1_c0_c0_c0_c0_c0_c0.x;
+ _output += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c0_c0_c0_c0[0].w;
+ coord += uImageIncrement_Stage1_c0_c0_c0_c0_c0_c0;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1_c0_c0_c0_c0_c0_c0.x, uBounds_Stage1_c0_c0_c0_c0_c0_c0.y - uBounds_Stage1_c0_c0_c0_c0_c0_c0.x) + uBounds_Stage1_c0_c0_c0_c0_c0_c0.x;
+ _output += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c0_c0_c0_c0[1].x;
+ coord += uImageIncrement_Stage1_c0_c0_c0_c0_c0_c0;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1_c0_c0_c0_c0_c0_c0.x, uBounds_Stage1_c0_c0_c0_c0_c0_c0.y - uBounds_Stage1_c0_c0_c0_c0_c0_c0.x) + uBounds_Stage1_c0_c0_c0_c0_c0_c0.x;
+ _output += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c0_c0_c0_c0[1].y;
+ coord += uImageIncrement_Stage1_c0_c0_c0_c0_c0_c0;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1_c0_c0_c0_c0_c0_c0.x, uBounds_Stage1_c0_c0_c0_c0_c0_c0.y - uBounds_Stage1_c0_c0_c0_c0_c0_c0.x) + uBounds_Stage1_c0_c0_c0_c0_c0_c0.x;
+ _output += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c0_c0_c0_c0[1].z;
+ coord += uImageIncrement_Stage1_c0_c0_c0_c0_c0_c0;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1_c0_c0_c0_c0_c0_c0.x, uBounds_Stage1_c0_c0_c0_c0_c0_c0.y - uBounds_Stage1_c0_c0_c0_c0_c0_c0.x) + uBounds_Stage1_c0_c0_c0_c0_c0_c0.x;
+ _output += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c0_c0_c0_c0[1].w;
+ coord += uImageIncrement_Stage1_c0_c0_c0_c0_c0_c0;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1_c0_c0_c0_c0_c0_c0.x, uBounds_Stage1_c0_c0_c0_c0_c0_c0.y - uBounds_Stage1_c0_c0_c0_c0_c0_c0.x) + uBounds_Stage1_c0_c0_c0_c0_c0_c0.x;
+ _output += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c0_c0_c0_c0[2].x;
+ coord += uImageIncrement_Stage1_c0_c0_c0_c0_c0_c0;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1_c0_c0_c0_c0_c0_c0.x, uBounds_Stage1_c0_c0_c0_c0_c0_c0.y - uBounds_Stage1_c0_c0_c0_c0_c0_c0.x) + uBounds_Stage1_c0_c0_c0_c0_c0_c0.x;
+ _output += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c0_c0_c0_c0[2].y;
+ coord += uImageIncrement_Stage1_c0_c0_c0_c0_c0_c0;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1_c0_c0_c0_c0_c0_c0.x, uBounds_Stage1_c0_c0_c0_c0_c0_c0.y - uBounds_Stage1_c0_c0_c0_c0_c0_c0.x) + uBounds_Stage1_c0_c0_c0_c0_c0_c0.x;
+ _output += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c0_c0_c0_c0[2].z;
+ coord += uImageIncrement_Stage1_c0_c0_c0_c0_c0_c0;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1_c0_c0_c0_c0_c0_c0.x, uBounds_Stage1_c0_c0_c0_c0_c0_c0.y - uBounds_Stage1_c0_c0_c0_c0_c0_c0.x) + uBounds_Stage1_c0_c0_c0_c0_c0_c0.x;
+ _output += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c0_c0_c0_c0[2].w;
+ coord += uImageIncrement_Stage1_c0_c0_c0_c0_c0_c0;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1_c0_c0_c0_c0_c0_c0.x, uBounds_Stage1_c0_c0_c0_c0_c0_c0.y - uBounds_Stage1_c0_c0_c0_c0_c0_c0.x) + uBounds_Stage1_c0_c0_c0_c0_c0_c0.x;
+ _output += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c0_c0_c0_c0[3].x;
+ coord += uImageIncrement_Stage1_c0_c0_c0_c0_c0_c0;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1_c0_c0_c0_c0_c0_c0.x, uBounds_Stage1_c0_c0_c0_c0_c0_c0.y - uBounds_Stage1_c0_c0_c0_c0_c0_c0.x) + uBounds_Stage1_c0_c0_c0_c0_c0_c0.x;
+ _output += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c0_c0_c0_c0[3].y;
+ coord += uImageIncrement_Stage1_c0_c0_c0_c0_c0_c0;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1_c0_c0_c0_c0_c0_c0.x, uBounds_Stage1_c0_c0_c0_c0_c0_c0.y - uBounds_Stage1_c0_c0_c0_c0_c0_c0.x) + uBounds_Stage1_c0_c0_c0_c0_c0_c0.x;
+ _output += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c0_c0_c0_c0[3].z;
+ coord += uImageIncrement_Stage1_c0_c0_c0_c0_c0_c0;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1_c0_c0_c0_c0_c0_c0.x, uBounds_Stage1_c0_c0_c0_c0_c0_c0.y - uBounds_Stage1_c0_c0_c0_c0_c0_c0.x) + uBounds_Stage1_c0_c0_c0_c0_c0_c0.x;
+ _output += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c0_c0_c0_c0[3].w;
+ coord += uImageIncrement_Stage1_c0_c0_c0_c0_c0_c0;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1_c0_c0_c0_c0_c0_c0.x, uBounds_Stage1_c0_c0_c0_c0_c0_c0.y - uBounds_Stage1_c0_c0_c0_c0_c0_c0.x) + uBounds_Stage1_c0_c0_c0_c0_c0_c0.x;
+ _output += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c0_c0_c0_c0[4].x;
+ coord += uImageIncrement_Stage1_c0_c0_c0_c0_c0_c0;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1_c0_c0_c0_c0_c0_c0.x, uBounds_Stage1_c0_c0_c0_c0_c0_c0.y - uBounds_Stage1_c0_c0_c0_c0_c0_c0.x) + uBounds_Stage1_c0_c0_c0_c0_c0_c0.x;
+ _output += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c0_c0_c0_c0[4].y;
+ coord += uImageIncrement_Stage1_c0_c0_c0_c0_c0_c0;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1_c0_c0_c0_c0_c0_c0.x, uBounds_Stage1_c0_c0_c0_c0_c0_c0.y - uBounds_Stage1_c0_c0_c0_c0_c0_c0.x) + uBounds_Stage1_c0_c0_c0_c0_c0_c0.x;
+ _output += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c0_c0_c0_c0[4].z;
+ coord += uImageIncrement_Stage1_c0_c0_c0_c0_c0_c0;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1_c0_c0_c0_c0_c0_c0.x, uBounds_Stage1_c0_c0_c0_c0_c0_c0.y - uBounds_Stage1_c0_c0_c0_c0_c0_c0.x) + uBounds_Stage1_c0_c0_c0_c0_c0_c0.x;
+ _output += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c0_c0_c0_c0[4].w;
+ coord += uImageIncrement_Stage1_c0_c0_c0_c0_c0_c0;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1_c0_c0_c0_c0_c0_c0.x, uBounds_Stage1_c0_c0_c0_c0_c0_c0.y - uBounds_Stage1_c0_c0_c0_c0_c0_c0.x) + uBounds_Stage1_c0_c0_c0_c0_c0_c0.x;
+ _output += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c0_c0_c0_c0[5].x;
+ coord += uImageIncrement_Stage1_c0_c0_c0_c0_c0_c0;
+ _output *= _input;
+ return _output;
+}
+vec4 CircleEffect_Stage1_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float d;
+ {
+ d = (1.0 - length((ucircle_Stage1_c0_c0_c0_c0_c1_c0.xy - gl_FragCoord.xy) * ucircle_Stage1_c0_c0_c0_c0_c1_c0.w)) * ucircle_Stage1_c0_c0_c0_c0_c1_c0.z;
+ }
+ {
+ _output = d > 0.5 ? _input : vec4(0.0);
+ }
+ return _output;
+}
+vec4 blend_multiply(vec4 src, vec4 dst) {
+ return vec4(((1.0 - src.w) * dst.xyz + (1.0 - dst.w) * src.xyz) + src.xyz * dst.xyz, src.w + (1.0 - src.w) * dst.w);
+}
+vec4 ComposeTwo_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_multiply(GaussianConvolution_Stage1_c0_c0_c0_c0_c0_c0(inputColor), CircleEffect_Stage1_c0_c0_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 ConfigConversionEffect_Stage1_c0_c0_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = floor(_input * 255.0 + 0.5) / 255.0;
+ {
+ _output.xyz = _output.w <= 0.0 ? vec3(0.0) : floor((_output.xyz / _output.w) * 255.0 + 0.5) / 255.0;
+ }
+ return _output;
+}
+vec4 CircleBlurFragmentProcessor_Stage1_c0_c0_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 vec = vec2((gl_FragCoord.x - ucircleData_Stage1_c0_c0_c1_c0_c1_c0.x) * ucircleData_Stage1_c0_c0_c1_c0_c1_c0.w, (gl_FragCoord.y - ucircleData_Stage1_c0_c0_c1_c0_c1_c0.y) * ucircleData_Stage1_c0_c0_c1_c0_c1_c0.w);
+ float dist = length(vec) + (0.5 - ucircleData_Stage1_c0_c0_c1_c0_c1_c0.z) * ucircleData_Stage1_c0_c0_c1_c0_c1_c0.w;
+ _output = _input * texture(uTextureSampler_1_Stage1, vec2(dist, 0.5)).w;
+ return _output;
+}
+float _blend_color_luminance(vec3 color) {
+ return dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), color);
+}
+vec3 _blend_set_color_luminance(vec3 hueSatColor, float alpha, vec3 lumColor) {
+ float lum = _blend_color_luminance(lumColor);
+ vec3 result = (lum - _blend_color_luminance(hueSatColor)) + hueSatColor;
+ float minComp = min(min(result.x, result.y), result.z);
+ float maxComp = max(max(result.x, result.y), result.z);
+ if (minComp < 0.0 && lum != minComp) {
+ result = lum + ((result - lum) * lum) / (lum - minComp);
+ }
+ if (maxComp > alpha && maxComp != lum) {
+ return lum + ((result - lum) * (alpha - lum)) / (maxComp - lum);
+ }
+ return result;
+}
+vec4 blend_luminosity(vec4 src, vec4 dst) {
+ float alpha = dst.w * src.w;
+ vec3 sda = src.xyz * dst.w;
+ vec3 dsa = dst.xyz * src.w;
+ return vec4((((_blend_set_color_luminance(dsa, alpha, sda) + dst.xyz) - dsa) + src.xyz) - sda, (src.w + dst.w) - alpha);
+}
+vec4 ComposeTwo_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_luminosity(ConfigConversionEffect_Stage1_c0_c0_c1_c0_c0_c0(inputColor), CircleBlurFragmentProcessor_Stage1_c0_c0_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 blend_dst_out(vec4 src, vec4 dst) {
+ return (1.0 - src.w) * dst;
+}
+vec4 ComposeTwo_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_dst_out(ComposeTwo_Stage1_c0_c0_c0_c0(inputColor), ComposeTwo_Stage1_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 Morphology_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_1_Stage0;
+ coord.x -= 6.0 * uPixelSize_Stage1_c1_c0;
+ for (int i = 0;i < 13; i++) {
+ _output = max(_output, texture(uTextureSampler_2_Stage1, coord));
+ coord.x += uPixelSize_Stage1_c1_c0;
+ }
+ _output *= _input;
+ return _output;
+}
+float _guarded_divide(float n, float d) {
+ return n / d;
+}
+float _color_dodge_component(float sc, float sa, float dc, float da) {
+ if (dc == 0.0) {
+ return sc * (1.0 - da);
+ } else {
+ float d = sa - sc;
+ if (d == 0.0) {
+ return (sa * da + sc * (1.0 - da)) + dc * (1.0 - sa);
+ }
+ d = min(da, _guarded_divide(dc * sa, d));
+ return (d * sa + sc * (1.0 - da)) + dc * (1.0 - sa);
+ }
+}
+vec4 blend_color_dodge(vec4 src, vec4 dst) {
+ return vec4(_color_dodge_component(src.x, src.w, dst.x, dst.w), _color_dodge_component(src.y, src.w, dst.y, dst.w), _color_dodge_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = uColor_Stage0;
+ float alpha = 1.0;
+ alpha = vinCoverage_Stage0;
+ outputCoverage_Stage0 = vec4(alpha);
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_color_dodge(ComposeTwo_Stage1_c0_c0(inputColor), Morphology_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ sk_FragColor = output_Stage1 * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 inPosition;
+in float inCoverage;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out float vinCoverage_Stage0;
+void main() {
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(inPosition, 1.0)).xy;
+ vinCoverage_Stage0 = inCoverage;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1447.shader_test b/shaders/skia/1447.shader_test
new file mode 100644
index 0000000..326e4f1
--- /dev/null
+++ b/shaders/skia/1447.shader_test
@@ -0,0 +1,67 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uCoordTransformMatrix_1_Stage0;
+uniform vec4 usubset_Stage1_c0_c0;
+uniform vec4 uclamp_Stage1_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 TextureEffect_Stage1_c0_c0(vec4 _input, vec2 _coords) {
+ _coords = _coords * uCoordTransformMatrix_1_Stage0.xz + uCoordTransformMatrix_1_Stage0.yw;
+ vec4 _output;
+ vec2 inCoord = _coords;
+ vec2 subsetCoord;
+ {
+ float w = usubset_Stage1_c0_c0.z - usubset_Stage1_c0_c0.x;
+ float w2 = 2.0 * w;
+ float m = mod(inCoord.x - usubset_Stage1_c0_c0.x, w2);
+ subsetCoord.x = mix(m, w2 - m, step(w, m)) + usubset_Stage1_c0_c0.x;
+ }
+ subsetCoord.y = inCoord.y;
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage1_c0_c0.x, uclamp_Stage1_c0_c0.z);
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage1_c0_c0.y, uclamp_Stage1_c0_c0.w);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ _output = _input * textureColor;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ float coord = vTransformedCoords_0_Stage0.y - 0.5;
+ float f = fract(coord);
+ coord += 0.5 - f;
+ float f2 = f * f;
+ vec4 w = mat4(0.055555555555555552, 0.88888888888888884, 0.055555555555555552, 0.0, -0.5, 0.0, 0.5, 0.0, 0.83333333333333337, -2.0, 1.5, -0.33333333333333331, -0.3888888888888889, 1.1666666666666667, -1.1666666666666667, 0.3888888888888889) * vec4(1.0, f, f2, f2 * f);
+ vec4 c[4];
+ c[0] = TextureEffect_Stage1_c0_c0(vec4(1.0), vec2(vTransformedCoords_0_Stage0.x, coord + -1.0));
+ c[1] = TextureEffect_Stage1_c0_c0(vec4(1.0), vec2(vTransformedCoords_0_Stage0.x, coord));
+ c[2] = TextureEffect_Stage1_c0_c0(vec4(1.0), vec2(vTransformedCoords_0_Stage0.x, coord + 1.0));
+ c[3] = TextureEffect_Stage1_c0_c0(vec4(1.0), vec2(vTransformedCoords_0_Stage0.x, coord + 2.0));
+ vec4 bicubicColor = ((c[0] * w.x + c[1] * w.y) + c[2] * w.z) + c[3] * w.w;
+ bicubicColor.xyz = max(vec3(0.0), min(bicubicColor.xyz, bicubicColor.www));
+ output_Stage1 = bicubicColor;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/145-10.shader_test b/shaders/skia/145-10.shader_test
new file mode 100644
index 0000000..bc56a35
--- /dev/null
+++ b/shaders/skia/145-10.shader_test
@@ -0,0 +1,99 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform vec2 uBounds_Stage1;
+uniform vec4 uKernel_Stage1[4];
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0 - 7.0 * uImageIncrement_Stage1;
+ vec2 coordSampled = vec2(0.0, 0.0);
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].z;
+ coord += uImageIncrement_Stage1;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ sk_FragColor = sk_FragColor.wwww;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/145-11.shader_test b/shaders/skia/145-11.shader_test
new file mode 100644
index 0000000..dc408c1
--- /dev/null
+++ b/shaders/skia/145-11.shader_test
@@ -0,0 +1,76 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uCoordTransformMatrix_2_Stage0;
+uniform vec4 usubset_Stage2_c0_c0;
+uniform vec4 uclamp_Stage2_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 TextureEffect_Stage2_c0_c0(vec4 _input, vec2 _coords) {
+ _coords = _coords * uCoordTransformMatrix_2_Stage0.xz + uCoordTransformMatrix_2_Stage0.yw;
+ vec4 _output;
+ vec2 inCoord = _coords;
+ vec2 subsetCoord;
+ subsetCoord.x = inCoord.x;
+ {
+ float w = usubset_Stage2_c0_c0.w - usubset_Stage2_c0_c0.y;
+ float w2 = 2.0 * w;
+ float m = mod(inCoord.y - usubset_Stage2_c0_c0.y, w2);
+ subsetCoord.y = mix(m, w2 - m, step(w, m)) + usubset_Stage2_c0_c0.y;
+ }
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage2_c0_c0.x, uclamp_Stage2_c0_c0.z);
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage2_c0_c0.y, uclamp_Stage2_c0_c0.w);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ _output = _input * textureColor;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ float coord = vTransformedCoords_1_Stage0.x - 0.5;
+ float f = fract(coord);
+ coord += 0.5 - f;
+ float f2 = f * f;
+ vec4 w = mat4(0.055555555555555552, 0.88888888888888884, 0.055555555555555552, 0.0, -0.5, 0.0, 0.5, 0.0, 0.83333333333333337, -2.0, 1.5, -0.33333333333333331, -0.3888888888888889, 1.1666666666666667, -1.1666666666666667, 0.3888888888888889) * vec4(1.0, f, f2, f2 * f);
+ vec4 c[4];
+ c[0] = TextureEffect_Stage2_c0_c0(vec4(1.0), vec2(coord + -1.0, vTransformedCoords_1_Stage0.y));
+ c[1] = TextureEffect_Stage2_c0_c0(vec4(1.0), vec2(coord, vTransformedCoords_1_Stage0.y));
+ c[2] = TextureEffect_Stage2_c0_c0(vec4(1.0), vec2(coord + 1.0, vTransformedCoords_1_Stage0.y));
+ c[3] = TextureEffect_Stage2_c0_c0(vec4(1.0), vec2(coord + 2.0, vTransformedCoords_1_Stage0.y));
+ vec4 bicubicColor = ((c[0] * w.x + c[1] * w.y) + c[2] * w.z) + c[3] * w.w;
+ bicubicColor.xyz = max(vec3(0.0), min(bicubicColor.xyz, bicubicColor.www));
+ output_Stage2 = bicubicColor * output_Stage1;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/145-2.shader_test b/shaders/skia/145-2.shader_test
new file mode 100644
index 0000000..3032d18
--- /dev/null
+++ b/shaders/skia/145-2.shader_test
@@ -0,0 +1,82 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage2_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c1_c0;
+ }
+ return _output;
+}
+vec4 blend_dst_out(vec4 src, vec4 dst) {
+ return (1.0 - src.w) * dst;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_dst_out(ConstColorProcessor_Stage2_c1_c0(vec4(1.0)), output_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/145-3.shader_test b/shaders/skia/145-3.shader_test
new file mode 100644
index 0000000..a5e84a5
--- /dev/null
+++ b/shaders/skia/145-3.shader_test
@@ -0,0 +1,156 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform float uSurfaceScale_Stage1;
+uniform vec3 uLightColor_Stage1;
+uniform float uKS_Stage1;
+uniform float uShininess_Stage1;
+uniform vec3 uLightLocation_Stage1;
+uniform float uExponent_Stage1;
+uniform float uCosInnerConeAngle_Stage1;
+uniform float uCosOuterConeAngle_Stage1;
+uniform float uConeScale_Stage1;
+uniform vec3 uS_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 light_Stage1(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ vec3 halfDir = normalize(surfaceToLight + vec3(0.0, 0.0, 1.0));
+ float colorScale = uKS_Stage1 * pow(dot(normal, halfDir), uShininess_Stage1);
+ vec3 color = lightColor * clamp(colorScale, 0.0, 1.0);
+ return vec4(color, max(max(color.x, color.y), color.z));
+}
+float sobel_Stage1(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage1(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage1(float m[9], float surfaceScale) {
+ return pointToNormal_Stage1(sobel_Stage1(0.0, 0.0, m[3], m[5], m[6], m[8], 0.33333298563957214), sobel_Stage1(0.0, 0.0, m[4], m[7], m[5], m[8], 0.5), surfaceScale);
+}
+vec3 lightColor_Stage1(vec3 surfaceToLight) {
+ float cosAngle = -dot(surfaceToLight, uS_Stage1);
+ if (cosAngle < uCosOuterConeAngle_Stage1) {
+ return vec3(0.0);
+ }
+ float scale = pow(cosAngle, uExponent_Stage1);
+ if (cosAngle < uCosInnerConeAngle_Stage1) {
+ return ((uLightColor_Stage1 * scale) * (cosAngle - uCosOuterConeAngle_Stage1)) * uConeScale_Stage1;
+ }
+ return uLightColor_Stage1;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ vec2 coord = vTransformedCoords_0_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp0 = textureColor;
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp1 = textureColor;
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp2 = textureColor;
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp3 = textureColor;
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp4 = textureColor;
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp5 = textureColor;
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp6 = textureColor;
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp7 = textureColor;
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp8 = textureColor;
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = normalize(uLightLocation_Stage1 - vec3(gl_FragCoord.xy, uSurfaceScale_Stage1 * m[4]));
+ output_Stage1 = light_Stage1(normal_Stage1(m, uSurfaceScale_Stage1), surfaceToLight, lightColor_Stage1(surfaceToLight));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/145-4.shader_test b/shaders/skia/145-4.shader_test
new file mode 100644
index 0000000..b79434f
--- /dev/null
+++ b/shaders/skia/145-4.shader_test
@@ -0,0 +1,110 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+uniform vec2 uDstTextureUpperLeft_Stage2;
+uniform vec2 uDstTextureCoordScale_Stage2;
+uniform sampler2D uTextureSampler_0_Stage0;
+uniform sampler2D uDstTextureSampler_Stage2;
+noperspective in vec2 vTextureCoords_Stage0;
+flat in int vTexIndex_Stage0;
+noperspective in vec4 vinColor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ t.x = fract(t.x);
+ }
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+float _guarded_divide(float n, float d) {
+ return n / d;
+}
+float _color_burn_component(float sc, float sa, float dc, float da) {
+ if (da == dc) {
+ return (sa * da + sc * (1.0 - da)) + dc * (1.0 - sa);
+ } else if (sc == 0.0) {
+ return dc * (1.0 - sa);
+ }
+ float d = max(0.0, da - _guarded_divide((da - dc) * sa, sc));
+ return (d * sa + sc * (1.0 - da)) + dc * (1.0 - sa);
+}
+vec4 blend_color_burn(vec4 src, vec4 dst) {
+ return vec4(_color_burn_component(src.x, src.w, dst.x, dst.w), _color_burn_component(src.y, src.w, dst.y, dst.w), _color_burn_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ vec4 texColor;
+ {
+ texColor = texture(uTextureSampler_0_Stage0, vTextureCoords_Stage0);
+ }
+ outputCoverage_Stage0 = texColor;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TiledGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ if (all(lessThanEqual(outputCoverage_Stage0.xyz, vec3(0.0)))) {
+ discard;
+ }
+ vec2 _dstTexCoord = (gl_FragCoord.xy - uDstTextureUpperLeft_Stage2) * uDstTextureCoordScale_Stage2;
+ _dstTexCoord.y = 1.0 - _dstTexCoord.y;
+ vec4 _dstColor = texture(uDstTextureSampler_Stage2, _dstTexCoord);
+ sk_FragColor = blend_color_burn(output_Stage1, _dstColor);
+ float lerpRed = mix(_dstColor.w, sk_FragColor.w, outputCoverage_Stage0.x);
+ float lerpBlue = mix(_dstColor.w, sk_FragColor.w, outputCoverage_Stage0.y);
+ float lerpGreen = mix(_dstColor.w, sk_FragColor.w, outputCoverage_Stage0.z);
+ sk_FragColor = outputCoverage_Stage0 * sk_FragColor + (vec4(1.0) - outputCoverage_Stage0) * _dstColor;
+ sk_FragColor.w = max(max(lerpRed, lerpBlue), lerpGreen);
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform vec2 uAtlasSizeInv_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in uvec2 inTextureCoords;
+noperspective out vec2 vTextureCoords_Stage0;
+flat out int vTexIndex_Stage0;
+noperspective out vec4 vinColor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ ivec2 signedCoords = ivec2(int(inTextureCoords.x), int(inTextureCoords.y));
+ vec2 unormTexCoords = vec2(float(signedCoords.x / 2), float(signedCoords.y / 2));
+ vTextureCoords_Stage0 = unormTexCoords * uAtlasSizeInv_Stage0;
+ vTexIndex_Stage0 = 0;
+ vinColor_Stage0 = inColor;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(inPosition.x, inPosition.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/145.shader_test b/shaders/skia/145.shader_test
new file mode 100644
index 0000000..3862430
--- /dev/null
+++ b/shaders/skia/145.shader_test
@@ -0,0 +1,88 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 ucolor_Stage1_c0_c0_c0_c0;
+uniform vec4 ucolor_Stage2;
+uniform vec4 ucolor_Stage3_c1_c0;
+noperspective in vec4 vcolor_Stage0;
+vec4 ConstColorProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = _input.w * ucolor_Stage1_c0_c0_c0_c0;
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = ConstColorProcessor_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 ConstColorProcessor_Stage3_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage3_c1_c0;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 blend_darken(vec4 src, vec4 dst) {
+ vec4 result = blend_src_over(src, dst);
+ result.xyz = min(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
+ return result;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_src_in(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ {
+ output_Stage2 = output_Stage1 * ucolor_Stage2;
+ }
+ }
+ vec4 output_Stage3;
+ {
+ output_Stage3 = blend_darken(ConstColorProcessor_Stage3_c1_c0(vec4(1.0)), output_Stage2);
+ }
+ {
+ sk_FragColor = output_Stage3;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 position;
+in vec4 inColor;
+noperspective out vec4 vcolor_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1450.shader_test b/shaders/skia/1450.shader_test
new file mode 100644
index 0000000..8a59756
--- /dev/null
+++ b/shaders/skia/1450.shader_test
@@ -0,0 +1,108 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_KHR_blend_equation_advanced : require
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+layout (blend_support_all_equations) out ;
+uniform vec4 uColor_Stage0;
+uniform float uCoverage_Stage0;
+uniform vec4 urectUniform_Stage1;
+uniform vec4 uboundsUniform_Stage3;
+uniform float uxInvZoom_Stage3;
+uniform float uyInvZoom_Stage3;
+uniform float uxInvInset_Stage3;
+uniform float uyInvInset_Stage3;
+uniform vec2 uoffset_Stage3;
+uniform float uinnerThreshold_Stage5;
+uniform float uouterThreshold_Stage5;
+uniform sampler2D uTextureSampler_0_Stage3;
+uniform sampler2D uTextureSampler_0_Stage4;
+uniform sampler2D uTextureSampler_0_Stage5;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = uColor_Stage0;
+ }
+ {
+ {
+ float xSub, ySub;
+ xSub = min(gl_FragCoord.x - urectUniform_Stage1.x, 0.0);
+ xSub += min(urectUniform_Stage1.z - gl_FragCoord.x, 0.0);
+ ySub = min(gl_FragCoord.y - urectUniform_Stage1.y, 0.0);
+ ySub += min(urectUniform_Stage1.w - gl_FragCoord.y, 0.0);
+ }
+ }
+ vec4 output_Stage3;
+ {
+ vec2 coord = vTransformedCoords_0_Stage0;
+ vec2 zoom_coord = uoffset_Stage3 + coord * vec2(uxInvZoom_Stage3, uyInvZoom_Stage3);
+ vec2 delta = (coord - uboundsUniform_Stage3.xy) * uboundsUniform_Stage3.zw;
+ delta = min(delta, vec2(1.0, 1.0) - delta);
+ delta *= vec2(uxInvInset_Stage3, uyInvInset_Stage3);
+ float weight = 0.0;
+ if (delta.x < 2.0 && delta.y < 2.0) {
+ delta = vec2(2.0, 2.0) - delta;
+ float dist = length(delta);
+ dist = max(2.0 - dist, 0.0);
+ weight = min(dist * dist, 1.0);
+ } else {
+ vec2 delta_squared = delta * delta;
+ weight = min(min(delta_squared.x, delta_squared.y), 1.0);
+ }
+ output_Stage3 = texture(uTextureSampler_0_Stage3, mix(coord, zoom_coord, weight));
+ }
+ vec4 output_Stage4;
+ {
+ output_Stage4 = texture(uTextureSampler_0_Stage4, vTransformedCoords_1_Stage0) * output_Stage3;
+ }
+ vec4 output_Stage5;
+ {
+ vec4 color = output_Stage4;
+ vec4 mask_color = texture(uTextureSampler_0_Stage5, vTransformedCoords_2_Stage0);
+ if (mask_color.w < 0.5) {
+ if (color.w > uouterThreshold_Stage5) {
+ float scale = uouterThreshold_Stage5 / color.w;
+ color.xyz *= scale;
+ color.w = uouterThreshold_Stage5;
+ }
+ } else if (color.w < uinnerThreshold_Stage5) {
+ float scale = uinnerThreshold_Stage5 / max(0.0010000000474974513, color.w);
+ color.xyz *= scale;
+ color.w = uinnerThreshold_Stage5;
+ }
+ output_Stage5 = color;
+ }
+ {
+ sk_FragColor = output_Stage5 * outputColor_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+in vec2 inPosition;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+void main() {
+ vec2 pos2 = (uViewM_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1453.shader_test b/shaders/skia/1453.shader_test
new file mode 100644
index 0000000..2966ed9
--- /dev/null
+++ b/shaders/skia/1453.shader_test
@@ -0,0 +1,704 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 ubaseFrequency_Stage1_c0_c0_c0_c0;
+uniform float uz_Stage1_c0_c0_c0_c0;
+uniform vec4 uboundsUniform_Stage1_c0_c0_c1_c0_c0_c0;
+uniform float uxInvZoom_Stage1_c0_c0_c1_c0_c0_c0;
+uniform float uyInvZoom_Stage1_c0_c0_c1_c0_c0_c0;
+uniform float uxInvInset_Stage1_c0_c0_c1_c0_c0_c0;
+uniform float uyInvInset_Stage1_c0_c0_c1_c0_c0_c0;
+uniform vec2 uoffset_Stage1_c0_c0_c1_c0_c0_c0;
+uniform vec2 ubaseFrequency_Stage1_c0_c0_c1_c0_c1_c0;
+uniform float uz_Stage1_c0_c0_c1_c0_c1_c0;
+uniform vec3 uedges_Stage1_c1_c0_c0_c0_c0_c0[4];
+uniform vec2 uImageIncrement_Stage1_c1_c0_c0_c0_c1_c0;
+uniform vec4 uKernel_Stage1_c1_c0_c0_c0_c1_c0[2];
+uniform vec2 uKernelOffset_Stage1_c1_c0_c0_c0_c1_c0;
+uniform float uGain_Stage1_c1_c0_c0_c0_c1_c0;
+uniform float uBias_Stage1_c1_c0_c0_c0_c1_c0;
+uniform vec4 uTexDom_Stage1_c1_c0_c0_c0_c1_c0;
+uniform vec3 uDecalParams_Stage1_c1_c0_c0_c0_c1_c0;
+uniform vec2 uScale_Stage1_c1_c0_c1_c0_c0_c0;
+uniform vec4 uTexDom_Stage1_c1_c0_c1_c0_c0_c0;
+uniform vec3 uDecalParams_Stage1_c1_c0_c1_c0_c0_c0;
+uniform vec2 uImageIncrement_Stage1_c1_c0_c1_c0_c1_c0;
+uniform vec4 uKernel_Stage1_c1_c0_c1_c0_c1_c0[5];
+uniform vec2 uKernelOffset_Stage1_c1_c0_c1_c0_c1_c0;
+uniform float uGain_Stage1_c1_c0_c1_c0_c1_c0;
+uniform float uBias_Stage1_c1_c0_c1_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+uniform sampler2D uTextureSampler_2_Stage1;
+uniform sampler2D uTextureSampler_3_Stage1;
+uniform sampler2D uTextureSampler_4_Stage1;
+uniform sampler2D uTextureSampler_5_Stage1;
+uniform sampler2D uTextureSampler_6_Stage1;
+uniform sampler2D uTextureSampler_7_Stage1;
+uniform sampler2D uTextureSampler_8_Stage1;
+noperspective in vec4 vinCircleEdge_Stage0;
+noperspective in vec3 vinClipPlane_Stage0;
+noperspective in vec3 vinUnionPlane_Stage0;
+noperspective in vec4 vinColor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+noperspective in vec2 vTransformedCoords_3_Stage0;
+noperspective in vec2 vTransformedCoords_4_Stage0;
+noperspective in vec2 vTransformedCoords_5_Stage0;
+noperspective in vec2 vTransformedCoords_6_Stage0;
+vec3 fade_Stage1_c0_c0_c0_c0(vec3 t) {
+ return ((t * t) * t) * (t * (t * 6.0 - 15.0) + 10.0);
+}
+float perm_Stage1_c0_c0_c0_c0(float x) {
+ return texture(uTextureSampler_0_Stage1, vec2(fract(x / 256.0), 0.0)).x * 255.0;
+}
+float grad_Stage1_c0_c0_c0_c0(float x, vec3 p) {
+ return dot(texture(uTextureSampler_1_Stage1, vec2(fract(x / 16.0), 0.0)).xyz * 255.0 - vec3(1.0), p);
+}
+float lerp_Stage1_c0_c0_c0_c0(float a, float b, float w) {
+ return a + w * (b - a);
+}
+float noise_Stage1_c0_c0_c0_c0(vec3 p) {
+ vec3 P = mod(floor(p), 256.0);
+ p -= floor(p);
+ vec3 f = fade_Stage1_c0_c0_c0_c0(p);
+ float A = perm_Stage1_c0_c0_c0_c0(P.x) + P.y;
+ float AA = perm_Stage1_c0_c0_c0_c0(A) + P.z;
+ float AB = perm_Stage1_c0_c0_c0_c0(A + 1.0) + P.z;
+ float B = perm_Stage1_c0_c0_c0_c0(P.x + 1.0) + P.y;
+ float BA = perm_Stage1_c0_c0_c0_c0(B) + P.z;
+ float BB = perm_Stage1_c0_c0_c0_c0(B + 1.0) + P.z;
+ float result = lerp_Stage1_c0_c0_c0_c0(lerp_Stage1_c0_c0_c0_c0(lerp_Stage1_c0_c0_c0_c0(grad_Stage1_c0_c0_c0_c0(perm_Stage1_c0_c0_c0_c0(AA), p), grad_Stage1_c0_c0_c0_c0(perm_Stage1_c0_c0_c0_c0(BA), p + vec3(-1.0, 0.0, 0.0)), f.x), lerp_Stage1_c0_c0_c0_c0(grad_Stage1_c0_c0_c0_c0(perm_Stage1_c0_c0_c0_c0(AB), p + vec3(0.0, -1.0, 0.0)), grad_Stage1_c0_c0_c0_c0(perm_Stage1_c0_c0_c0_c0(BB), p + vec3(-1.0, -1.0, 0.0)), f.x), f.y), lerp_Stage1_c0_c0_c0_c0(lerp_Stage1_c0_c0_c0_c0(grad_Stage1_c0_c0_c0_c0(perm_Stage1_c0_c0_c0_c0(AA + 1.0), p + vec3(0.0, 0.0, -1.0)), grad_Stage1_c0_c0_c0_c0(perm_Stage1_c0_c0_c0_c0(BA + 1.0), p + vec3(-1.0, 0.0, -1.0)), f.x), lerp_Stage1_c0_c0_c0_c0(grad_Stage1_c0_c0_c0_c0(perm_Stage1_c0_c0_c0_c0(AB + 1.0), p + vec3(0.0, -1.0, -1.0)), grad_Stage1_c0_c0_c0_c0(perm_Stage1_c0_c0_c0_c0(BB + 1.0), p + vec3(-1.0, -1.0, -1.0)), f.x), f.y), f.z);
+ return result;
+}
+float noiseOctaves_Stage1_c0_c0_c0_c0(vec3 p) {
+ float result = 0.0;
+ float ratio = 1.0;
+ for (float i = 0.0;i < 4.0; i++) {
+ result += noise_Stage1_c0_c0_c0_c0(p) / ratio;
+ p *= 2.0;
+ ratio *= 2.0;
+ }
+ return (result + 1.0) / 2.0;
+}
+vec4 ImprovedPerlinNoise_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coords = vTransformedCoords_0_Stage0 * ubaseFrequency_Stage1_c0_c0_c0_c0;
+ float r = noiseOctaves_Stage1_c0_c0_c0_c0(vec3(coords, uz_Stage1_c0_c0_c0_c0));
+ float g = noiseOctaves_Stage1_c0_c0_c0_c0(vec3(coords, uz_Stage1_c0_c0_c0_c0));
+ float b = noiseOctaves_Stage1_c0_c0_c0_c0(vec3(coords, uz_Stage1_c0_c0_c0_c0));
+ float a = noiseOctaves_Stage1_c0_c0_c0_c0(vec3(coords, uz_Stage1_c0_c0_c0_c0));
+ _output = vec4(r, g, b, a);
+ _output = clamp(_output, 0.0, 1.0);
+ _output = vec4(_output.xyz * _output.www, _output.w);
+ return _output;
+}
+vec4 MagnifierEffect_Stage1_c0_c0_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coord = vTransformedCoords_1_Stage0;
+ vec2 zoom_coord = uoffset_Stage1_c0_c0_c1_c0_c0_c0 + coord * vec2(uxInvZoom_Stage1_c0_c0_c1_c0_c0_c0, uyInvZoom_Stage1_c0_c0_c1_c0_c0_c0);
+ vec2 delta = (coord - uboundsUniform_Stage1_c0_c0_c1_c0_c0_c0.xy) * uboundsUniform_Stage1_c0_c0_c1_c0_c0_c0.zw;
+ delta = min(delta, vec2(1.0, 1.0) - delta);
+ delta *= vec2(uxInvInset_Stage1_c0_c0_c1_c0_c0_c0, uyInvInset_Stage1_c0_c0_c1_c0_c0_c0);
+ float weight = 0.0;
+ if (delta.x < 2.0 && delta.y < 2.0) {
+ delta = vec2(2.0, 2.0) - delta;
+ float dist = length(delta);
+ dist = max(2.0 - dist, 0.0);
+ weight = min(dist * dist, 1.0);
+ } else {
+ vec2 delta_squared = delta * delta;
+ weight = min(min(delta_squared.x, delta_squared.y), 1.0);
+ }
+ _output = texture(uTextureSampler_2_Stage1, mix(coord, zoom_coord, weight));
+ return _output;
+}
+vec3 fade_Stage1_c0_c0_c1_c0_c1_c0(vec3 t) {
+ return ((t * t) * t) * (t * (t * 6.0 - 15.0) + 10.0);
+}
+float perm_Stage1_c0_c0_c1_c0_c1_c0(float x) {
+ return texture(uTextureSampler_3_Stage1, vec2(fract(x / 256.0), 0.0)).x * 255.0;
+}
+float grad_Stage1_c0_c0_c1_c0_c1_c0(float x, vec3 p) {
+ return dot(texture(uTextureSampler_4_Stage1, vec2(fract(x / 16.0), 0.0)).xyz * 255.0 - vec3(1.0), p);
+}
+float lerp_Stage1_c0_c0_c1_c0_c1_c0(float a, float b, float w) {
+ return a + w * (b - a);
+}
+float noise_Stage1_c0_c0_c1_c0_c1_c0(vec3 p) {
+ vec3 P = mod(floor(p), 256.0);
+ p -= floor(p);
+ vec3 f = fade_Stage1_c0_c0_c1_c0_c1_c0(p);
+ float A = perm_Stage1_c0_c0_c1_c0_c1_c0(P.x) + P.y;
+ float AA = perm_Stage1_c0_c0_c1_c0_c1_c0(A) + P.z;
+ float AB = perm_Stage1_c0_c0_c1_c0_c1_c0(A + 1.0) + P.z;
+ float B = perm_Stage1_c0_c0_c1_c0_c1_c0(P.x + 1.0) + P.y;
+ float BA = perm_Stage1_c0_c0_c1_c0_c1_c0(B) + P.z;
+ float BB = perm_Stage1_c0_c0_c1_c0_c1_c0(B + 1.0) + P.z;
+ float result = lerp_Stage1_c0_c0_c1_c0_c1_c0(lerp_Stage1_c0_c0_c1_c0_c1_c0(lerp_Stage1_c0_c0_c1_c0_c1_c0(grad_Stage1_c0_c0_c1_c0_c1_c0(perm_Stage1_c0_c0_c1_c0_c1_c0(AA), p), grad_Stage1_c0_c0_c1_c0_c1_c0(perm_Stage1_c0_c0_c1_c0_c1_c0(BA), p + vec3(-1.0, 0.0, 0.0)), f.x), lerp_Stage1_c0_c0_c1_c0_c1_c0(grad_Stage1_c0_c0_c1_c0_c1_c0(perm_Stage1_c0_c0_c1_c0_c1_c0(AB), p + vec3(0.0, -1.0, 0.0)), grad_Stage1_c0_c0_c1_c0_c1_c0(perm_Stage1_c0_c0_c1_c0_c1_c0(BB), p + vec3(-1.0, -1.0, 0.0)), f.x), f.y), lerp_Stage1_c0_c0_c1_c0_c1_c0(lerp_Stage1_c0_c0_c1_c0_c1_c0(grad_Stage1_c0_c0_c1_c0_c1_c0(perm_Stage1_c0_c0_c1_c0_c1_c0(AA + 1.0), p + vec3(0.0, 0.0, -1.0)), grad_Stage1_c0_c0_c1_c0_c1_c0(perm_Stage1_c0_c0_c1_c0_c1_c0(BA + 1.0), p + vec3(-1.0, 0.0, -1.0)), f.x), lerp_Stage1_c0_c0_c1_c0_c1_c0(grad_Stage1_c0_c0_c1_c0_c1_c0(perm_Stage1_c0_c0_c1_c0_c1_c0(AB + 1.0), p + vec3(0.0, -1.0, -1.0)), grad_Stage1_c0_c0_c1_c0_c1_c0(perm_Stage1_c0_c0_c1_c0_c1_c0(BB + 1.0), p + vec3(-1.0, -1.0, -1.0)), f.x), f.y), f.z);
+ return result;
+}
+float noiseOctaves_Stage1_c0_c0_c1_c0_c1_c0(vec3 p) {
+ float result = 0.0;
+ float ratio = 1.0;
+ for (float i = 0.0;i < 3.0; i++) {
+ result += noise_Stage1_c0_c0_c1_c0_c1_c0(p) / ratio;
+ p *= 2.0;
+ ratio *= 2.0;
+ }
+ return (result + 1.0) / 2.0;
+}
+vec4 ImprovedPerlinNoise_Stage1_c0_c0_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coords = vTransformedCoords_2_Stage0 * ubaseFrequency_Stage1_c0_c0_c1_c0_c1_c0;
+ float r = noiseOctaves_Stage1_c0_c0_c1_c0_c1_c0(vec3(coords, uz_Stage1_c0_c0_c1_c0_c1_c0));
+ float g = noiseOctaves_Stage1_c0_c0_c1_c0_c1_c0(vec3(coords, uz_Stage1_c0_c0_c1_c0_c1_c0));
+ float b = noiseOctaves_Stage1_c0_c0_c1_c0_c1_c0(vec3(coords, uz_Stage1_c0_c0_c1_c0_c1_c0));
+ float a = noiseOctaves_Stage1_c0_c0_c1_c0_c1_c0(vec3(coords, uz_Stage1_c0_c0_c1_c0_c1_c0));
+ _output = vec4(r, g, b, a);
+ _output = clamp(_output, 0.0, 1.0);
+ _output = vec4(_output.xyz * _output.www, _output.w);
+ return _output;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 ComposeTwo_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_src_over(MagnifierEffect_Stage1_c0_c0_c1_c0_c0_c0(inputColor), ImprovedPerlinNoise_Stage1_c0_c0_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 blend_plus(vec4 src, vec4 dst) {
+ return min(src + dst, 1.0);
+}
+vec4 ComposeTwo_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_plus(ImprovedPerlinNoise_Stage1_c0_c0_c0_c0(inputColor), ComposeTwo_Stage1_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 ConvexPoly_Stage1_c1_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float alpha = 1.0;
+ float edge;
+ edge = dot(uedges_Stage1_c1_c0_c0_c0_c0_c0[0], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage1_c1_c0_c0_c0_c0_c0[1], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage1_c1_c0_c0_c0_c0_c0[2], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage1_c1_c0_c0_c0_c0_c0[3], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ _output = _input * alpha;
+ return _output;
+}
+vec4 MatrixConvolution_Stage1_c1_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 sum = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_3_Stage0 - uKernelOffset_Stage1_c1_c0_c0_c0_c1_c0 * uImageIncrement_Stage1_c1_c0_c0_c0_c1_c0;
+ vec4 c;
+ {
+ float k = uKernel_Stage1_c1_c0_c0_c0_c1_c0[0].x;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0_c1_c0.xy, uTexDom_Stage1_c1_c0_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_5_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0_c0_c0_c1_c0[0].y;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1_c1_c0_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0_c1_c0.xy, uTexDom_Stage1_c1_c0_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_5_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0_c0_c0_c1_c0[0].z;
+ {
+ vec2 origCoord = coord + vec2(2.0, 0.0) * uImageIncrement_Stage1_c1_c0_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0_c1_c0.xy, uTexDom_Stage1_c1_c0_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_5_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0_c0_c0_c1_c0[0].w;
+ {
+ vec2 origCoord = coord + vec2(3.0, 0.0) * uImageIncrement_Stage1_c1_c0_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0_c1_c0.xy, uTexDom_Stage1_c1_c0_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_5_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0_c0_c0_c1_c0[1].x;
+ {
+ vec2 origCoord = coord + vec2(4.0, 0.0) * uImageIncrement_Stage1_c1_c0_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0_c1_c0.xy, uTexDom_Stage1_c1_c0_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_5_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0_c0_c0_c1_c0[1].y;
+ {
+ vec2 origCoord = coord + vec2(5.0, 0.0) * uImageIncrement_Stage1_c1_c0_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0_c1_c0.xy, uTexDom_Stage1_c1_c0_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_5_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0_c0_c0_c1_c0[1].z;
+ {
+ vec2 origCoord = coord + vec2(6.0, 0.0) * uImageIncrement_Stage1_c1_c0_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0_c1_c0.xy, uTexDom_Stage1_c1_c0_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_5_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ _output = sum * uGain_Stage1_c1_c0_c0_c0_c1_c0 + uBias_Stage1_c1_c0_c0_c0_c1_c0;
+ _output.w = clamp(_output.w, 0.0, 1.0);
+ _output.xyz = clamp(_output.xyz, 0.0, _output.w);
+ _output *= _input;
+ return _output;
+}
+vec4 blend_darken(vec4 src, vec4 dst) {
+ vec4 result = blend_src_over(src, dst);
+ result.xyz = min(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
+ return result;
+}
+vec4 ComposeTwo_Stage1_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_darken(ConvexPoly_Stage1_c1_c0_c0_c0_c0_c0(inputColor), MatrixConvolution_Stage1_c1_c0_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 DisplacementMap_Stage1_c1_c0_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 dColor = texture(uTextureSampler_6_Stage1, vTransformedCoords_4_Stage0);
+ dColor.xyz = dColor.w < 9.9999999747524271e-07 ? vec3(0.0) : clamp(dColor.xyz / dColor.w, 0.0, 1.0);
+ vec2 cCoords = vTransformedCoords_5_Stage0 + uScale_Stage1_c1_c0_c1_c0_c0_c0 * (dColor.wz - vec2(0.5));
+ {
+ vec2 origCoord = cCoords;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c1_c0_c0_c0.xy, uTexDom_Stage1_c1_c0_c1_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_7_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c1_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c1_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c1_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c1_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ _output = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ return _output;
+}
+vec4 MatrixConvolution_Stage1_c1_c0_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 sum = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_6_Stage0 - uKernelOffset_Stage1_c1_c0_c1_c0_c1_c0 * uImageIncrement_Stage1_c1_c0_c1_c0_c1_c0;
+ vec4 c;
+ {
+ float k = uKernel_Stage1_c1_c0_c1_c0_c1_c0[0].x;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_8_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0_c1_c0_c1_c0[0].y;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1_c1_c0_c1_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_8_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0_c1_c0_c1_c0[0].z;
+ {
+ vec2 origCoord = coord + vec2(2.0, 0.0) * uImageIncrement_Stage1_c1_c0_c1_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_8_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0_c1_c0_c1_c0[0].w;
+ {
+ vec2 origCoord = coord + vec2(3.0, 0.0) * uImageIncrement_Stage1_c1_c0_c1_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_8_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0_c1_c0_c1_c0[1].x;
+ {
+ vec2 origCoord = coord + vec2(4.0, 0.0) * uImageIncrement_Stage1_c1_c0_c1_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_8_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0_c1_c0_c1_c0[1].y;
+ {
+ vec2 origCoord = coord + vec2(5.0, 0.0) * uImageIncrement_Stage1_c1_c0_c1_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_8_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0_c1_c0_c1_c0[1].z;
+ {
+ vec2 origCoord = coord + vec2(6.0, 0.0) * uImageIncrement_Stage1_c1_c0_c1_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_8_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0_c1_c0_c1_c0[1].w;
+ {
+ vec2 origCoord = coord + vec2(7.0, 0.0) * uImageIncrement_Stage1_c1_c0_c1_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_8_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0_c1_c0_c1_c0[2].x;
+ {
+ vec2 origCoord = coord + vec2(8.0, 0.0) * uImageIncrement_Stage1_c1_c0_c1_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_8_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0_c1_c0_c1_c0[2].y;
+ {
+ vec2 origCoord = coord + vec2(9.0, 0.0) * uImageIncrement_Stage1_c1_c0_c1_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_8_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0_c1_c0_c1_c0[2].z;
+ {
+ vec2 origCoord = coord + vec2(10.0, 0.0) * uImageIncrement_Stage1_c1_c0_c1_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_8_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0_c1_c0_c1_c0[2].w;
+ {
+ vec2 origCoord = coord + vec2(11.0, 0.0) * uImageIncrement_Stage1_c1_c0_c1_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_8_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0_c1_c0_c1_c0[3].x;
+ {
+ vec2 origCoord = coord + vec2(12.0, 0.0) * uImageIncrement_Stage1_c1_c0_c1_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_8_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0_c1_c0_c1_c0[3].y;
+ {
+ vec2 origCoord = coord + vec2(13.0, 0.0) * uImageIncrement_Stage1_c1_c0_c1_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_8_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0_c1_c0_c1_c0[3].z;
+ {
+ vec2 origCoord = coord + vec2(14.0, 0.0) * uImageIncrement_Stage1_c1_c0_c1_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_8_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0_c1_c0_c1_c0[3].w;
+ {
+ vec2 origCoord = coord + vec2(15.0, 0.0) * uImageIncrement_Stage1_c1_c0_c1_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_8_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0_c1_c0_c1_c0[4].x;
+ {
+ vec2 origCoord = coord + vec2(16.0, 0.0) * uImageIncrement_Stage1_c1_c0_c1_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_8_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ vec2 origCoord = vTransformedCoords_6_Stage0;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_8_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ _output.w = c.w;
+ _output.xyz = clamp(sum.xyz * uGain_Stage1_c1_c0_c1_c0_c1_c0 + uBias_Stage1_c1_c0_c1_c0_c1_c0, 0.0, 1.0);
+ _output.xyz *= _output.w;
+ _output *= _input;
+ return _output;
+}
+vec4 blend_modulate(vec4 src, vec4 dst) {
+ return src * dst;
+}
+vec4 ComposeTwo_Stage1_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_modulate(DisplacementMap_Stage1_c1_c0_c1_c0_c0_c0(inputColor), MatrixConvolution_Stage1_c1_c0_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 ComposeTwo_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_darken(ComposeTwo_Stage1_c1_c0_c0_c0(inputColor), ComposeTwo_Stage1_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 blend_src_atop(vec4 src, vec4 dst) {
+ return dst.w * src + (1.0 - src.w) * dst;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ vec4 circleEdge;
+ circleEdge = vinCircleEdge_Stage0;
+ vec3 clipPlane;
+ clipPlane = vinClipPlane_Stage0;
+ vec3 unionPlane;
+ unionPlane = vinUnionPlane_Stage0;
+ outputColor_Stage0 = vinColor_Stage0;
+ float d = length(circleEdge.xy);
+ float distanceToOuterEdge = circleEdge.z * (1.0 - d);
+ float edgeAlpha = clamp(distanceToOuterEdge, 0.0, 1.0);
+ float distanceToInnerEdge = circleEdge.z * (d - circleEdge.w);
+ float innerAlpha = clamp(distanceToInnerEdge, 0.0, 1.0);
+ edgeAlpha *= innerAlpha;
+ float clip = clamp(circleEdge.z * dot(circleEdge.xy, clipPlane.xy) + clipPlane.z, 0.0, 1.0);
+ clip = clamp(clip + clamp(circleEdge.z * dot(circleEdge.xy, unionPlane.xy) + unionPlane.z, 0.0, 1.0), 0.0, 1.0);
+ edgeAlpha *= clip;
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_src_atop(ComposeTwo_Stage1_c0_c0(inputColor), ComposeTwo_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ sk_FragColor = (1.0 - output_Stage1.w) * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+uniform mat3 uCoordTransformMatrix_3_Stage0;
+uniform mat3 uCoordTransformMatrix_4_Stage0;
+uniform mat3 uCoordTransformMatrix_5_Stage0;
+uniform mat3 uCoordTransformMatrix_6_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec4 inCircleEdge;
+in vec3 inClipPlane;
+in vec3 inUnionPlane;
+noperspective out vec4 vinCircleEdge_Stage0;
+noperspective out vec3 vinClipPlane_Stage0;
+noperspective out vec3 vinUnionPlane_Stage0;
+noperspective out vec4 vinColor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+noperspective out vec2 vTransformedCoords_3_Stage0;
+noperspective out vec2 vTransformedCoords_4_Stage0;
+noperspective out vec2 vTransformedCoords_5_Stage0;
+noperspective out vec2 vTransformedCoords_6_Stage0;
+void main() {
+ vinCircleEdge_Stage0 = inCircleEdge;
+ vinClipPlane_Stage0 = inClipPlane;
+ vinUnionPlane_Stage0 = inUnionPlane;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_3_Stage0 = (uCoordTransformMatrix_3_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_4_Stage0 = (uCoordTransformMatrix_4_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_5_Stage0 = (uCoordTransformMatrix_5_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_6_Stage0 = (uCoordTransformMatrix_6_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1459.shader_test b/shaders/skia/1459.shader_test
new file mode 100644
index 0000000..18667d6
--- /dev/null
+++ b/shaders/skia/1459.shader_test
@@ -0,0 +1,62 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_KHR_blend_equation_advanced : require
+out vec4 sk_FragColor;
+layout (blend_support_all_equations) out ;
+in vec2 vEllipseOffsets0_Stage0;
+in vec2 vEllipseOffsets1_Stage0;
+in vec4 vinColor_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vinColor_Stage0;
+ vec2 scaledOffset = vEllipseOffsets0_Stage0;
+ float test = dot(scaledOffset, scaledOffset) - 1.0;
+ vec2 duvdx = dFdx(vEllipseOffsets0_Stage0);
+ vec2 duvdy = dFdy(vEllipseOffsets0_Stage0);
+ vec2 grad = vec2(vEllipseOffsets0_Stage0.x * duvdx.x + vEllipseOffsets0_Stage0.y * duvdx.y, vEllipseOffsets0_Stage0.x * duvdy.x + vEllipseOffsets0_Stage0.y * duvdy.y);
+ float grad_dot = 4.0 * dot(grad, grad);
+ grad_dot = max(grad_dot, 1.1754999560161448e-38);
+ float invlen = inversesqrt(grad_dot);
+ float edgeAlpha = clamp(0.5 - test * invlen, 0.0, 1.0);
+ scaledOffset = vEllipseOffsets1_Stage0;
+ test = dot(scaledOffset, scaledOffset) - 1.0;
+ duvdx = dFdx(vEllipseOffsets1_Stage0);
+ duvdy = dFdy(vEllipseOffsets1_Stage0);
+ grad = vec2(vEllipseOffsets1_Stage0.x * duvdx.x + vEllipseOffsets1_Stage0.y * duvdx.y, vEllipseOffsets1_Stage0.x * duvdy.x + vEllipseOffsets1_Stage0.y * duvdy.y);
+ grad_dot = 4.0 * dot(grad, grad);
+ invlen = inversesqrt(grad_dot);
+ edgeAlpha *= clamp(0.5 + test * invlen, 0.0, 1.0);
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ {
+ sk_FragColor = outputCoverage_Stage0 * outputColor_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec2 inEllipseOffsets0;
+in vec2 inEllipseOffsets1;
+out vec2 vEllipseOffsets0_Stage0;
+out vec2 vEllipseOffsets1_Stage0;
+out vec4 vinColor_Stage0;
+void main() {
+ vEllipseOffsets0_Stage0 = inEllipseOffsets0;
+ vEllipseOffsets1_Stage0 = inEllipseOffsets1;
+ vinColor_Stage0 = inColor;
+ vec3 pos3 = uViewM_Stage0 * vec3(inPosition, 1.0);
+ gl_Position = vec4(pos3.x, pos3.y, 0.0, pos3.z);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1462.shader_test b/shaders/skia/1462.shader_test
new file mode 100644
index 0000000..f6985aa
--- /dev/null
+++ b/shaders/skia/1462.shader_test
@@ -0,0 +1,229 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_KHR_blend_equation_advanced : require
+out vec4 sk_FragColor;
+layout (blend_support_all_equations) out ;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+uniform mat4 um_Stage2;
+uniform vec4 uv_Stage2;
+uniform vec2 uScale_Stage3;
+uniform vec4 uTexDom_Stage3;
+uniform vec3 uDecalParams_Stage3;
+uniform vec4 uleftBorderColor_Stage4_c1_c0;
+uniform vec4 urightBorderColor_Stage4_c1_c0;
+uniform vec4 uscale0_1_Stage4_c1_c0_c1_c0;
+uniform vec4 uscale2_3_Stage4_c1_c0_c1_c0;
+uniform vec4 uscale4_5_Stage4_c1_c0_c1_c0;
+uniform vec4 ubias0_1_Stage4_c1_c0_c1_c0;
+uniform vec4 ubias2_3_Stage4_c1_c0_c1_c0;
+uniform vec4 ubias4_5_Stage4_c1_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage4_c1_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage4_c1_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage3;
+uniform sampler2D uTextureSampler_1_Stage3;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+noperspective in vec2 vTransformedCoords_3_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_0_Stage0;
+ float t = -1.0;
+ {
+ {
+ float r0 = ufocalParams_Stage1_c0_c0_c0_c0.x;
+ {
+ t = length(p) - r0;
+ }
+ }
+ }
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 RadialGradientLayout_Stage4_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = length(vTransformedCoords_3_Stage0);
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage4_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage4_c1_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage4_c1_c0_c1_c0.x) {
+ scale = uscale0_1_Stage4_c1_c0_c1_c0;
+ bias = ubias0_1_Stage4_c1_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage4_c1_c0_c1_c0;
+ bias = ubias2_3_Stage4_c1_c0_c1_c0;
+ }
+ } else {
+ {
+ scale = uscale4_5_Stage4_c1_c0_c1_c0;
+ bias = ubias4_5_Stage4_c1_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage4_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = RadialGradientLayout_Stage4_c1_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage4_c1_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage4_c1_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage4_c1_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_dst_in(outputColor_Stage0, ClampedGradientEffect_Stage1_c0_c0(vec4(1.0)));
+ }
+ vec4 output_Stage2;
+ {
+ vec4 inputColor = output_Stage1;
+ {
+ float nonZeroAlpha = max(inputColor.w, 9.9999997473787516e-05);
+ inputColor = vec4(inputColor.xyz / nonZeroAlpha, inputColor.w);
+ }
+ output_Stage2 = um_Stage2 * inputColor + uv_Stage2;
+ {
+ output_Stage2.w = clamp(output_Stage2.w, 0.0, 1.0);
+ }
+ {
+ output_Stage2.xyz *= output_Stage2.w;
+ }
+ }
+ vec4 output_Stage3;
+ {
+ vec4 dColor = texture(uTextureSampler_0_Stage3, vTransformedCoords_1_Stage0);
+ dColor.xyz = dColor.w < 9.9999999747524271e-07 ? vec3(0.0) : clamp(dColor.xyz / dColor.w, 0.0, 1.0);
+ vec2 cCoords = vTransformedCoords_2_Stage0 + uScale_Stage3 * (dColor.zz - vec2(0.5));
+ {
+ vec2 origCoord = cCoords;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage3.xy, uTexDom_Stage3.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage3, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage3.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage3.y);
+ if (err > uDecalParams_Stage3.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage3.z < 1.0) {
+ err = 0.0;
+ }
+ output_Stage3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ }
+ vec4 output_Stage4;
+ {
+ output_Stage4 = blend_dst_in(vec4(1.0), ClampedGradientEffect_Stage4_c1_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage4 * output_Stage3;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+uniform mat3 uCoordTransformMatrix_3_Stage0;
+in vec2 position;
+in vec4 inColor;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+noperspective out vec2 vTransformedCoords_3_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(position, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(position, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(position, 1.0)).xy;
+ vTransformedCoords_3_Stage0 = (uCoordTransformMatrix_3_Stage0 * vec3(position, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1465.shader_test b/shaders/skia/1465.shader_test
new file mode 100644
index 0000000..9be656e
--- /dev/null
+++ b/shaders/skia/1465.shader_test
@@ -0,0 +1,48 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+flat in vec4 vcolor_Stage0;
+noperspective in float vcoverage_Stage0;
+flat in vec4 vgeomDomain_Stage0;
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ float coverage = vcoverage_Stage0;
+ vec4 geoDomain;
+ geoDomain = vgeomDomain_Stage0;
+ if (coverage < 0.5) {
+ vec4 dists4 = clamp(vec4(1.0, 1.0, -1.0, -1.0) * (gl_FragCoord.xyxy - geoDomain), 0.0, 1.0);
+ vec2 dists2 = dists4.xy * dists4.zw;
+ coverage = min(coverage, dists2.x * dists2.y);
+ }
+ outputCoverage_Stage0 = vec4(coverage);
+ }
+ {
+ sk_FragColor = outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 position;
+in float coverage;
+in vec4 color;
+in vec4 geomDomain;
+flat out vec4 vcolor_Stage0;
+noperspective out float vcoverage_Stage0;
+flat out vec4 vgeomDomain_Stage0;
+void main() {
+ vec2 position = position;
+ vcolor_Stage0 = color;
+ vcoverage_Stage0 = coverage;
+ vgeomDomain_Stage0 = geomDomain;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1468.shader_test b/shaders/skia/1468.shader_test
new file mode 100644
index 0000000..5ea4e2c
--- /dev/null
+++ b/shaders/skia/1468.shader_test
@@ -0,0 +1,172 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_KHR_blend_equation_advanced : require
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+layout (blend_support_all_equations) out ;
+uniform vec4 uCoordTransformMatrix_0_Stage0;
+uniform vec4 uboundsUniform_Stage1_c0_c0;
+uniform float uxInvZoom_Stage1_c0_c0;
+uniform float uyInvZoom_Stage1_c0_c0;
+uniform float uxInvInset_Stage1_c0_c0;
+uniform float uyInvInset_Stage1_c0_c0;
+uniform vec2 uoffset_Stage1_c0_c0;
+uniform vec4 uscale0_1_Stage2_c1_c0_c1_c0;
+uniform vec4 uscale2_3_Stage2_c1_c0_c1_c0;
+uniform vec4 uscale4_5_Stage2_c1_c0_c1_c0;
+uniform vec4 uscale6_7_Stage2_c1_c0_c1_c0;
+uniform vec4 ubias0_1_Stage2_c1_c0_c1_c0;
+uniform vec4 ubias2_3_Stage2_c1_c0_c1_c0;
+uniform vec4 ubias4_5_Stage2_c1_c0_c1_c0;
+uniform vec4 ubias6_7_Stage2_c1_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage2_c1_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage2_c1_c0_c1_c0;
+uniform float uinnerThreshold_Stage3;
+uniform float uouterThreshold_Stage3;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage3;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+noperspective in float vinCoverage_Stage0;
+vec4 MagnifierEffect_Stage1_c0_c0(vec4 _input, vec2 _coords) {
+ _coords = _coords * uCoordTransformMatrix_0_Stage0.xz + uCoordTransformMatrix_0_Stage0.yw;
+ vec4 _output;
+ vec2 coord = _coords;
+ vec2 zoom_coord = uoffset_Stage1_c0_c0 + coord * vec2(uxInvZoom_Stage1_c0_c0, uyInvZoom_Stage1_c0_c0);
+ vec2 delta = (coord - uboundsUniform_Stage1_c0_c0.xy) * uboundsUniform_Stage1_c0_c0.zw;
+ delta = min(delta, vec2(1.0, 1.0) - delta);
+ delta *= vec2(uxInvInset_Stage1_c0_c0, uyInvInset_Stage1_c0_c0);
+ float weight = 0.0;
+ if (delta.x < 2.0 && delta.y < 2.0) {
+ delta = vec2(2.0, 2.0) - delta;
+ float dist = length(delta);
+ dist = max(2.0 - dist, 0.0);
+ weight = min(dist * dist, 1.0);
+ } else {
+ vec2 delta_squared = delta * delta;
+ weight = min(min(delta_squared.x, delta_squared.y), 1.0);
+ }
+ _output = texture(uTextureSampler_0_Stage1, mix(coord, zoom_coord, weight));
+ return _output;
+}
+vec4 RadialGradientLayout_Stage2_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = length(vTransformedCoords_1_Stage0);
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage2_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage2_c1_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage2_c1_c0_c1_c0.x) {
+ scale = uscale0_1_Stage2_c1_c0_c1_c0;
+ bias = ubias0_1_Stage2_c1_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage2_c1_c0_c1_c0;
+ bias = ubias2_3_Stage2_c1_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage2_c1_c0_c1_c0.z) {
+ scale = uscale4_5_Stage2_c1_c0_c1_c0;
+ bias = ubias4_5_Stage2_c1_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage2_c1_c0_c1_c0;
+ bias = ubias6_7_Stage2_c1_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = RadialGradientLayout_Stage2_c1_c0_c0_c0(vec4(1.0));
+ {
+ {
+ t.x = fract(t.x);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage2_c1_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ float alpha = 1.0;
+ alpha = vinCoverage_Stage0;
+ outputCoverage_Stage0 = vec4(alpha);
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = MagnifierEffect_Stage1_c0_c0(outputColor_Stage0, gl_FragCoord.xy);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_dst_in(output_Stage1, TiledGradientEffect_Stage2_c1_c0(vec4(1.0)));
+ }
+ vec4 output_Stage3;
+ {
+ vec4 color = outputCoverage_Stage0;
+ vec4 mask_color = texture(uTextureSampler_0_Stage3, vTransformedCoords_2_Stage0);
+ if (mask_color.w < 0.5) {
+ if (color.w > uouterThreshold_Stage3) {
+ float scale = uouterThreshold_Stage3 / color.w;
+ color.xyz *= scale;
+ color.w = uouterThreshold_Stage3;
+ }
+ } else if (color.w < uinnerThreshold_Stage3) {
+ float scale = uinnerThreshold_Stage3 / max(0.0010000000474974513, color.w);
+ color.xyz *= scale;
+ color.w = uinnerThreshold_Stage3;
+ }
+ output_Stage3 = color;
+ }
+ {
+ sk_FragColor = output_Stage3 * output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in float inCoverage;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+noperspective out float vinCoverage_Stage0;
+void main() {
+ vec4 color = inColor;
+ vcolor_Stage0 = color;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(inPosition, 1.0)).xy;
+ vinCoverage_Stage0 = inCoverage;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1471.shader_test b/shaders/skia/1471.shader_test
new file mode 100644
index 0000000..50dd279
--- /dev/null
+++ b/shaders/skia/1471.shader_test
@@ -0,0 +1,68 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 ucircleData_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vEllipseOffsets0_Stage0;
+noperspective in vec2 vEllipseOffsets1_Stage0;
+noperspective in vec4 vinColor_Stage0;
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ vec2 scaledOffset = vEllipseOffsets0_Stage0;
+ float test = dot(scaledOffset, scaledOffset) - 1.0;
+ vec2 duvdx = dFdx(vEllipseOffsets0_Stage0);
+ vec2 duvdy = -dFdy(vEllipseOffsets0_Stage0);
+ vec2 grad = vec2(vEllipseOffsets0_Stage0.x * duvdx.x + vEllipseOffsets0_Stage0.y * duvdx.y, vEllipseOffsets0_Stage0.x * duvdy.x + vEllipseOffsets0_Stage0.y * duvdy.y);
+ float grad_dot = 4.0 * dot(grad, grad);
+ grad_dot = max(grad_dot, 1.1754999560161448e-38);
+ float invlen = inversesqrt(grad_dot);
+ float edgeAlpha = clamp(0.5 - test * invlen, 0.0, 1.0);
+ scaledOffset = vEllipseOffsets1_Stage0;
+ test = dot(scaledOffset, scaledOffset) - 1.0;
+ duvdx = dFdx(vEllipseOffsets1_Stage0);
+ duvdy = -dFdy(vEllipseOffsets1_Stage0);
+ grad = vec2(vEllipseOffsets1_Stage0.x * duvdx.x + vEllipseOffsets1_Stage0.y * duvdx.y, vEllipseOffsets1_Stage0.x * duvdy.x + vEllipseOffsets1_Stage0.y * duvdy.y);
+ grad_dot = 4.0 * dot(grad, grad);
+ invlen = inversesqrt(grad_dot);
+ edgeAlpha *= clamp(0.5 + test * invlen, 0.0, 1.0);
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ vec4 output_Stage1;
+ {
+ vec2 vec = vec2((gl_FragCoord.x - ucircleData_Stage1.x) * ucircleData_Stage1.w, (gl_FragCoord.y - ucircleData_Stage1.y) * ucircleData_Stage1.w);
+ float dist = length(vec) + (0.5 - ucircleData_Stage1.z) * ucircleData_Stage1.w;
+ output_Stage1 = outputCoverage_Stage0 * texture(uTextureSampler_0_Stage1, vec2(dist, 0.5)).w;
+ }
+ {
+ sk_FragColor = 1.0 - output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec2 inEllipseOffsets0;
+in vec2 inEllipseOffsets1;
+noperspective out vec2 vEllipseOffsets0_Stage0;
+noperspective out vec2 vEllipseOffsets1_Stage0;
+noperspective out vec4 vinColor_Stage0;
+void main() {
+ vEllipseOffsets0_Stage0 = inEllipseOffsets0;
+ vEllipseOffsets1_Stage0 = inEllipseOffsets1;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = (uViewM_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1477.shader_test b/shaders/skia/1477.shader_test
new file mode 100644
index 0000000..0eab6d3
--- /dev/null
+++ b/shaders/skia/1477.shader_test
@@ -0,0 +1,424 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_KHR_blend_equation_advanced : require
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+layout (blend_support_all_equations) out ;
+uniform float uSrcTF_Stage0[7];
+uniform mat3 uColorXform_Stage0;
+uniform float uDstTF_Stage0[7];
+uniform vec2 uImageIncrement_Stage1_c0_c0_c0_c0;
+uniform float uSurfaceScale_Stage1_c0_c0_c0_c0;
+uniform vec3 uLightColor_Stage1_c0_c0_c0_c0;
+uniform float uKS_Stage1_c0_c0_c0_c0;
+uniform float uShininess_Stage1_c0_c0_c0_c0;
+uniform vec4 uTexDom_Stage1_c0_c0_c0_c0;
+uniform vec3 uDecalParams_Stage1_c0_c0_c0_c0;
+uniform vec3 uLightLocation_Stage1_c0_c0_c0_c0;
+uniform vec4 urectH_Stage1_c0_c0_c1_c0;
+uniform float uinvSixSigma_Stage1_c0_c0_c1_c0;
+uniform float uPixelSize_Stage1_c1_c0_c0_c0_c1_c0;
+uniform vec2 uRange_Stage1_c1_c0_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage1_c1_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+uniform sampler2D uTextureSampler_2_Stage1;
+uniform sampler2D uTextureSampler_3_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vtextureCoords_Stage0;
+flat in vec4 vtextureDomain_Stage0;
+flat in vec4 vcolor_Stage0;
+float src_tf_Stage0(float x) {
+ float G = uSrcTF_Stage0[0];
+ float A = uSrcTF_Stage0[1];
+ float B = uSrcTF_Stage0[2];
+ float C = uSrcTF_Stage0[3];
+ float D = uSrcTF_Stage0[4];
+ float E = uSrcTF_Stage0[5];
+ float F = uSrcTF_Stage0[6];
+ float s = sign(x);
+ x = abs(x);
+ x = x < D ? C * x + F : pow(A * x + B, G) + E;
+ return s * x;
+}
+float dst_tf_Stage0(float x) {
+ float G = uDstTF_Stage0[0];
+ float A = uDstTF_Stage0[1];
+ float B = uDstTF_Stage0[2];
+ float C = uDstTF_Stage0[3];
+ float D = uDstTF_Stage0[4];
+ float E = uDstTF_Stage0[5];
+ float F = uDstTF_Stage0[6];
+ float s = sign(x);
+ x = abs(x);
+ x = x < D ? C * x + F : pow(A * x + B, G) + E;
+ return s * x;
+}
+vec4 gamut_xform_Stage0(vec4 color) {
+ color.xyz = uColorXform_Stage0 * color.xyz;
+ return color;
+}
+vec4 color_xform_Stage0(vec4 color) {
+ float nonZeroAlpha = max(color.w, 9.9999997473787516e-05);
+ color = vec4(color.xyz / nonZeroAlpha, nonZeroAlpha);
+ color.x = src_tf_Stage0(color.x);
+ color.y = src_tf_Stage0(color.y);
+ color.z = src_tf_Stage0(color.z);
+ color = gamut_xform_Stage0(color);
+ color.x = dst_tf_Stage0(color.x);
+ color.y = dst_tf_Stage0(color.y);
+ color.z = dst_tf_Stage0(color.z);
+ color.xyz *= color.w;
+ return color;
+}
+vec4 light_Stage1_c0_c0_c0_c0(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ vec3 halfDir = normalize(surfaceToLight + vec3(0.0, 0.0, 1.0));
+ float colorScale = uKS_Stage1_c0_c0_c0_c0 * pow(dot(normal, halfDir), uShininess_Stage1_c0_c0_c0_c0);
+ vec3 color = lightColor * clamp(colorScale, 0.0, 1.0);
+ return vec4(color, max(max(color.x, color.y), color.z));
+}
+float sobel_Stage1_c0_c0_c0_c0(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage1_c0_c0_c0_c0(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage1_c0_c0_c0_c0(float m[9], float surfaceScale) {
+ return pointToNormal_Stage1_c0_c0_c0_c0(sobel_Stage1_c0_c0_c0_c0(m[0], m[1], m[3], m[4], 0.0, 0.0, 0.66666698455810547), sobel_Stage1_c0_c0_c0_c0(m[0], m[3], m[1], m[4], 0.0, 0.0, 0.66666698455810547), surfaceScale);
+}
+vec4 SpecularLighting_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coord = vTransformedCoords_0_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage1_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp0 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage1_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp5 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage1_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp6 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage1_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp7 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage1_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp8 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = normalize(uLightLocation_Stage1_c0_c0_c0_c0 - vec3(gl_FragCoord.xy, uSurfaceScale_Stage1_c0_c0_c0_c0 * m[4]));
+ _output = light_Stage1_c0_c0_c0_c0(normal_Stage1_c0_c0_c0_c0(m, uSurfaceScale_Stage1_c0_c0_c0_c0), surfaceToLight, uLightColor_Stage1_c0_c0_c0_c0);
+ _output *= _input;
+ return _output;
+}
+vec4 RectBlurEffect_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float xCoverage, yCoverage;
+ {
+ float x, y;
+ {
+ x = max(urectH_Stage1_c0_c0_c1_c0.x - gl_FragCoord.x, gl_FragCoord.x - urectH_Stage1_c0_c0_c1_c0.z);
+ y = max(urectH_Stage1_c0_c0_c1_c0.y - gl_FragCoord.y, gl_FragCoord.y - urectH_Stage1_c0_c0_c1_c0.w);
+ }
+ xCoverage = texture(uTextureSampler_1_Stage1, vec2(x * uinvSixSigma_Stage1_c0_c0_c1_c0, 0.5)).w;
+ yCoverage = texture(uTextureSampler_1_Stage1, vec2(y * uinvSixSigma_Stage1_c0_c0_c1_c0, 0.5)).w;
+ _output = (_input * xCoverage) * yCoverage;
+ }
+ _output = (_input * xCoverage) * yCoverage;
+ return _output;
+}
+float _blend_color_saturation(vec3 color) {
+ return max(max(color.x, color.y), color.z) - min(min(color.x, color.y), color.z);
+}
+vec3 _blend_set_color_saturation_helper(vec3 minMidMax, float sat) {
+ if (minMidMax.x < minMidMax.z) {
+ return vec3(0.0, (sat * (minMidMax.y - minMidMax.x)) / (minMidMax.z - minMidMax.x), sat);
+ }
+ return vec3(0.0);
+}
+vec3 _blend_set_color_saturation(vec3 hueLumColor, vec3 satColor) {
+ float sat = _blend_color_saturation(satColor);
+ if (hueLumColor.x <= hueLumColor.y) {
+ if (hueLumColor.y <= hueLumColor.z) {
+ hueLumColor.xyz = _blend_set_color_saturation_helper(hueLumColor, sat);
+ } else if (hueLumColor.x <= hueLumColor.z) {
+ hueLumColor.xzy = _blend_set_color_saturation_helper(hueLumColor.xzy, sat);
+ } else {
+ hueLumColor.zxy = _blend_set_color_saturation_helper(hueLumColor.zxy, sat);
+ }
+ } else if (hueLumColor.x <= hueLumColor.z) {
+ hueLumColor.yxz = _blend_set_color_saturation_helper(hueLumColor.yxz, sat);
+ } else if (hueLumColor.y <= hueLumColor.z) {
+ hueLumColor.yzx = _blend_set_color_saturation_helper(hueLumColor.yzx, sat);
+ } else {
+ hueLumColor.zyx = _blend_set_color_saturation_helper(hueLumColor.zyx, sat);
+ }
+ return hueLumColor;
+}
+float _blend_color_luminance(vec3 color) {
+ return dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), color);
+}
+vec3 _blend_set_color_luminance(vec3 hueSatColor, float alpha, vec3 lumColor) {
+ float lum = _blend_color_luminance(lumColor);
+ vec3 result = (lum - _blend_color_luminance(hueSatColor)) + hueSatColor;
+ float minComp = min(min(result.x, result.y), result.z);
+ float maxComp = max(max(result.x, result.y), result.z);
+ if (minComp < 0.0 && lum != minComp) {
+ result = lum + ((result - lum) * lum) / (lum - minComp);
+ }
+ if (maxComp > alpha && maxComp != lum) {
+ return lum + ((result - lum) * (alpha - lum)) / (maxComp - lum);
+ }
+ return result;
+}
+vec4 blend_hue(vec4 src, vec4 dst) {
+ float alpha = dst.w * src.w;
+ vec3 sda = src.xyz * dst.w;
+ vec3 dsa = dst.xyz * src.w;
+ return vec4((((_blend_set_color_luminance(_blend_set_color_saturation(sda, dsa), alpha, dsa) + dst.xyz) - dsa) + src.xyz) - sda, (src.w + dst.w) - alpha);
+}
+vec4 ComposeTwo_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_hue(SpecularLighting_Stage1_c0_c0_c0_c0(inputColor), RectBlurEffect_Stage1_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 ColorTableEffect_Stage1_c1_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float nonZeroAlpha = max(_input.w, 9.9999997473787516e-05);
+ vec4 coord = vec4(_input.xyz / nonZeroAlpha, nonZeroAlpha);
+ coord = coord * 0.9960939884185791 + vec4(0.0019529999699443579, 0.0019529999699443579, 0.0019529999699443579, 0.0019529999699443579);
+ _output.w = texture(uTextureSampler_2_Stage1, vec2(coord.w, 0.125)).w;
+ _output.x = texture(uTextureSampler_2_Stage1, vec2(coord.x, 0.375)).w;
+ _output.y = texture(uTextureSampler_2_Stage1, vec2(coord.y, 0.625)).w;
+ _output.z = texture(uTextureSampler_2_Stage1, vec2(coord.z, 0.875)).w;
+ _output.xyz *= _output.w;
+ return _output;
+}
+vec4 Morphology_Stage1_c1_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = vec4(1.0, 1.0, 1.0, 1.0);
+ vec2 coord = vTransformedCoords_1_Stage0;
+ coord.x -= 10.0 * uPixelSize_Stage1_c1_c0_c0_c0_c1_c0;
+ for (int i = 0;i < 21; i++) {
+ _output = min(_output, texture(uTextureSampler_3_Stage1, coord));
+ coord.x += uPixelSize_Stage1_c1_c0_c0_c0_c1_c0;
+ }
+ _output *= _input;
+ return _output;
+}
+vec4 blend_dst_over(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src + dst;
+}
+vec4 ComposeTwo_Stage1_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_dst_over(ColorTableEffect_Stage1_c1_c0_c0_c0_c0_c0(inputColor), Morphology_Stage1_c1_c0_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 ConstColorProcessor_Stage1_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage1_c1_c0_c1_c0;
+ }
+ return _output;
+}
+float _blend_overlay_component(float sc, float sa, float dc, float da) {
+ if (2.0 * dc <= da) {
+ return (2.0 * sc) * dc;
+ }
+ return sa * da - (2.0 * (da - dc)) * (sa - sc);
+}
+vec4 blend_overlay(vec4 src, vec4 dst) {
+ vec4 result = vec4(_blend_overlay_component(src.x, src.w, dst.x, dst.w), _blend_overlay_component(src.y, src.w, dst.y, dst.w), _blend_overlay_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+ result.xyz += dst.xyz * (1.0 - src.w) + src.xyz * (1.0 - dst.w);
+ return result;
+}
+vec4 blend_hard_light(vec4 src, vec4 dst) {
+ return blend_overlay(dst, src);
+}
+vec4 ComposeTwo_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_hard_light(ComposeTwo_Stage1_c1_c0_c0_c0(inputColor), ConstColorProcessor_Stage1_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 blend_xor(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src + (1.0 - src.w) * dst;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ vec2 textureCoords;
+ textureCoords = vtextureCoords_Stage0;
+ vec4 textureDomain;
+ textureDomain = vtextureDomain_Stage0;
+ outputColor_Stage0 = vcolor_Stage0;
+ outputColor_Stage0 = color_xform_Stage0(texture(uTextureSampler_0_Stage0, clamp(textureCoords, textureDomain.xy, textureDomain.zw))) * outputColor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_xor(ComposeTwo_Stage1_c0_c0(inputColor), ComposeTwo_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 textureCoords;
+in vec4 textureDomain;
+in vec4 color;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vtextureCoords_Stage0;
+flat out vec4 vtextureDomain_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vec2 pos2 = position;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(textureCoords, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(textureCoords, 1.0)).xy;
+ vtextureCoords_Stage0 = textureCoords;
+ vtextureDomain_Stage0 = textureDomain;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/148-10.shader_test b/shaders/skia/148-10.shader_test
new file mode 100644
index 0000000..3c8c812
--- /dev/null
+++ b/shaders/skia/148-10.shader_test
@@ -0,0 +1,62 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uCoordTransformMatrix_2_Stage0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec3 vTransformedCoords_1_Stage0;
+vec4 TextureEffect_Stage2_c0_c0(vec4 _input, vec2 _coords) {
+ _coords = _coords * uCoordTransformMatrix_2_Stage0.xz + uCoordTransformMatrix_2_Stage0.yw;
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage2, _coords) * _input;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ vec2 vTransformedCoords_1_Stage0_ensure2D = vTransformedCoords_1_Stage0.xy / vTransformedCoords_1_Stage0.z;
+ float coord = vTransformedCoords_1_Stage0_ensure2D.x - 0.5;
+ float f = fract(coord);
+ coord += 0.5 - f;
+ float f2 = f * f;
+ vec4 w = mat4(0.055555555555555552, 0.88888888888888884, 0.055555555555555552, 0.0, -0.5, 0.0, 0.5, 0.0, 0.83333333333333337, -2.0, 1.5, -0.33333333333333331, -0.3888888888888889, 1.1666666666666667, -1.1666666666666667, 0.3888888888888889) * vec4(1.0, f, f2, f2 * f);
+ vec4 c[4];
+ c[0] = TextureEffect_Stage2_c0_c0(vec4(1.0), vec2(coord + -1.0, vTransformedCoords_1_Stage0_ensure2D.y));
+ c[1] = TextureEffect_Stage2_c0_c0(vec4(1.0), vec2(coord, vTransformedCoords_1_Stage0_ensure2D.y));
+ c[2] = TextureEffect_Stage2_c0_c0(vec4(1.0), vec2(coord + 1.0, vTransformedCoords_1_Stage0_ensure2D.y));
+ c[3] = TextureEffect_Stage2_c0_c0(vec4(1.0), vec2(coord + 2.0, vTransformedCoords_1_Stage0_ensure2D.y));
+ vec4 bicubicColor = ((c[0] * w.x + c[1] * w.y) + c[2] * w.z) + c[3] * w.w;
+ bicubicColor.xyz = max(vec3(0.0), min(bicubicColor.xyz, bicubicColor.www));
+ output_Stage2 = bicubicColor * output_Stage1;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec3 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0);
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/148-2.shader_test b/shaders/skia/148-2.shader_test
new file mode 100644
index 0000000..6095ab5
--- /dev/null
+++ b/shaders/skia/148-2.shader_test
@@ -0,0 +1,92 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage2_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c1_c0;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+vec4 blend_dst_out(vec4 src, vec4 dst) {
+ return (1.0 - src.w) * dst;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_dst_in(outputColor_Stage0, ClampedGradientEffect_Stage1_c0_c0(vec4(1.0)));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_dst_out(ConstColorProcessor_Stage2_c1_c0(vec4(1.0)), output_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/148-3.shader_test b/shaders/skia/148-3.shader_test
new file mode 100644
index 0000000..2b9e250
--- /dev/null
+++ b/shaders/skia/148-3.shader_test
@@ -0,0 +1,156 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform float uSurfaceScale_Stage1;
+uniform vec3 uLightColor_Stage1;
+uniform float uKS_Stage1;
+uniform float uShininess_Stage1;
+uniform vec3 uLightLocation_Stage1;
+uniform float uExponent_Stage1;
+uniform float uCosInnerConeAngle_Stage1;
+uniform float uCosOuterConeAngle_Stage1;
+uniform float uConeScale_Stage1;
+uniform vec3 uS_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 light_Stage1(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ vec3 halfDir = normalize(surfaceToLight + vec3(0.0, 0.0, 1.0));
+ float colorScale = uKS_Stage1 * pow(dot(normal, halfDir), uShininess_Stage1);
+ vec3 color = lightColor * clamp(colorScale, 0.0, 1.0);
+ return vec4(color, max(max(color.x, color.y), color.z));
+}
+float sobel_Stage1(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage1(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage1(float m[9], float surfaceScale) {
+ return pointToNormal_Stage1(sobel_Stage1(0.0, 0.0, m[3], m[4], m[6], m[7], 0.66666698455810547), sobel_Stage1(m[3], m[6], m[4], m[7], 0.0, 0.0, 0.66666698455810547), surfaceScale);
+}
+vec3 lightColor_Stage1(vec3 surfaceToLight) {
+ float cosAngle = -dot(surfaceToLight, uS_Stage1);
+ if (cosAngle < uCosOuterConeAngle_Stage1) {
+ return vec3(0.0);
+ }
+ float scale = pow(cosAngle, uExponent_Stage1);
+ if (cosAngle < uCosInnerConeAngle_Stage1) {
+ return ((uLightColor_Stage1 * scale) * (cosAngle - uCosOuterConeAngle_Stage1)) * uConeScale_Stage1;
+ }
+ return uLightColor_Stage1;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ vec2 coord = vTransformedCoords_0_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp0 = textureColor;
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp1 = textureColor;
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp2 = textureColor;
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp3 = textureColor;
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp4 = textureColor;
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp5 = textureColor;
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp6 = textureColor;
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp7 = textureColor;
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp8 = textureColor;
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = normalize(uLightLocation_Stage1 - vec3(gl_FragCoord.xy, uSurfaceScale_Stage1 * m[4]));
+ output_Stage1 = light_Stage1(normal_Stage1(m, uSurfaceScale_Stage1), surfaceToLight, lightColor_Stage1(surfaceToLight));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/148-4.shader_test b/shaders/skia/148-4.shader_test
new file mode 100644
index 0000000..c6cae68
--- /dev/null
+++ b/shaders/skia/148-4.shader_test
@@ -0,0 +1,109 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+uniform vec2 uDstTextureUpperLeft_Stage2;
+uniform vec2 uDstTextureCoordScale_Stage2;
+uniform sampler2D uTextureSampler_0_Stage0;
+uniform sampler2D uDstTextureSampler_Stage2;
+noperspective in vec2 vTextureCoords_Stage0;
+flat in int vTexIndex_Stage0;
+noperspective in vec4 vinColor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ t.x = fract(t.x);
+ }
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+float _blend_overlay_component(float sc, float sa, float dc, float da) {
+ if (2.0 * dc <= da) {
+ return (2.0 * sc) * dc;
+ }
+ return sa * da - (2.0 * (da - dc)) * (sa - sc);
+}
+vec4 blend_overlay(vec4 src, vec4 dst) {
+ vec4 result = vec4(_blend_overlay_component(src.x, src.w, dst.x, dst.w), _blend_overlay_component(src.y, src.w, dst.y, dst.w), _blend_overlay_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+ result.xyz += dst.xyz * (1.0 - src.w) + src.xyz * (1.0 - dst.w);
+ return result;
+}
+vec4 blend_hard_light(vec4 src, vec4 dst) {
+ return blend_overlay(dst, src);
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ vec4 texColor;
+ {
+ texColor = texture(uTextureSampler_0_Stage0, vTextureCoords_Stage0);
+ }
+ outputCoverage_Stage0 = texColor;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TiledGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ if (all(lessThanEqual(outputCoverage_Stage0.xyz, vec3(0.0)))) {
+ discard;
+ }
+ vec2 _dstTexCoord = (gl_FragCoord.xy - uDstTextureUpperLeft_Stage2) * uDstTextureCoordScale_Stage2;
+ _dstTexCoord.y = 1.0 - _dstTexCoord.y;
+ vec4 _dstColor = texture(uDstTextureSampler_Stage2, _dstTexCoord);
+ sk_FragColor = blend_hard_light(output_Stage1, _dstColor);
+ float lerpRed = mix(_dstColor.w, sk_FragColor.w, outputCoverage_Stage0.x);
+ float lerpBlue = mix(_dstColor.w, sk_FragColor.w, outputCoverage_Stage0.y);
+ float lerpGreen = mix(_dstColor.w, sk_FragColor.w, outputCoverage_Stage0.z);
+ sk_FragColor = outputCoverage_Stage0 * sk_FragColor + (vec4(1.0) - outputCoverage_Stage0) * _dstColor;
+ sk_FragColor.w = max(max(lerpRed, lerpBlue), lerpGreen);
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform vec2 uAtlasSizeInv_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in uvec2 inTextureCoords;
+noperspective out vec2 vTextureCoords_Stage0;
+flat out int vTexIndex_Stage0;
+noperspective out vec4 vinColor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ ivec2 signedCoords = ivec2(int(inTextureCoords.x), int(inTextureCoords.y));
+ vec2 unormTexCoords = vec2(float(signedCoords.x / 2), float(signedCoords.y / 2));
+ vTextureCoords_Stage0 = unormTexCoords * uAtlasSizeInv_Stage0;
+ vTexIndex_Stage0 = 0;
+ vinColor_Stage0 = inColor;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(inPosition.x, inPosition.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/148.shader_test b/shaders/skia/148.shader_test
new file mode 100644
index 0000000..d60b430
--- /dev/null
+++ b/shaders/skia/148.shader_test
@@ -0,0 +1,135 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.w) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ } else {
+ {
+ if (t < uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = OverrideInputFragmentProcessor_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_dst_in(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 inColor;
+in vec2 inLocalCoord;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1480.shader_test b/shaders/skia/1480.shader_test
new file mode 100644
index 0000000..a24cc6e
--- /dev/null
+++ b/shaders/skia/1480.shader_test
@@ -0,0 +1,26 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uColor_Stage0;
+void main() {
+ {
+ sk_FragColor = 1.0 - vec4(1.0);
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 inPosition;
+void main() {
+ vec2 pos2 = (uViewM_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1483.shader_test b/shaders/skia/1483.shader_test
new file mode 100644
index 0000000..eb7b4e0
--- /dev/null
+++ b/shaders/skia/1483.shader_test
@@ -0,0 +1,455 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uColor_Stage0;
+uniform vec3 uedges_Stage1_c0_c0_c0_c0_c0_c0[2];
+uniform vec4 ucolor_Stage1_c0_c0_c1_c0;
+uniform vec2 uImageIncrement_Stage1_c1_c0;
+uniform vec4 uKernel_Stage1_c1_c0[6];
+uniform vec2 uKernelOffset_Stage1_c1_c0;
+uniform float uGain_Stage1_c1_c0;
+uniform float uBias_Stage1_c1_c0;
+uniform vec4 uTexDom_Stage1_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 ConvexPoly_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float alpha = 1.0;
+ float edge;
+ edge = dot(uedges_Stage1_c0_c0_c0_c0_c0_c0[0], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage1_c0_c0_c0_c0_c0_c0[1], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ _output = _input * alpha;
+ return _output;
+}
+vec4 ColorTableEffect_Stage1_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float nonZeroAlpha = max(_input.w, 9.9999997473787516e-05);
+ vec4 coord = vec4(_input.xyz / nonZeroAlpha, nonZeroAlpha);
+ coord = coord * 0.9960939884185791 + vec4(0.0019529999699443579, 0.0019529999699443579, 0.0019529999699443579, 0.0019529999699443579);
+ _output.w = texture(uTextureSampler_0_Stage1, vec2(coord.w, 0.125)).w;
+ _output.x = texture(uTextureSampler_0_Stage1, vec2(coord.x, 0.375)).w;
+ _output.y = texture(uTextureSampler_0_Stage1, vec2(coord.y, 0.625)).w;
+ _output.z = texture(uTextureSampler_0_Stage1, vec2(coord.z, 0.875)).w;
+ _output.xyz *= _output.w;
+ return _output;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 ComposeTwo_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_src_over(ConvexPoly_Stage1_c0_c0_c0_c0_c0_c0(inputColor), ColorTableEffect_Stage1_c0_c0_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 ConstColorProcessor_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage1_c0_c0_c1_c0;
+ }
+ return _output;
+}
+vec4 blend_modulate(vec4 src, vec4 dst) {
+ return src * dst;
+}
+vec4 ComposeTwo_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_modulate(ComposeTwo_Stage1_c0_c0_c0_c0(inputColor), ConstColorProcessor_Stage1_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 MatrixConvolution_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 sum = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0 - uKernelOffset_Stage1_c1_c0 * uImageIncrement_Stage1_c1_c0;
+ vec4 c;
+ {
+ float k = uKernel_Stage1_c1_c0[0].x;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0.xy, uTexDom_Stage1_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0[0].y;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0.xy, uTexDom_Stage1_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0[0].z;
+ {
+ vec2 origCoord = coord + vec2(2.0, 0.0) * uImageIncrement_Stage1_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0.xy, uTexDom_Stage1_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0[0].w;
+ {
+ vec2 origCoord = coord + vec2(3.0, 0.0) * uImageIncrement_Stage1_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0.xy, uTexDom_Stage1_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0[1].x;
+ {
+ vec2 origCoord = coord + vec2(4.0, 0.0) * uImageIncrement_Stage1_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0.xy, uTexDom_Stage1_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0[1].y;
+ {
+ vec2 origCoord = coord + vec2(5.0, 0.0) * uImageIncrement_Stage1_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0.xy, uTexDom_Stage1_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0[1].z;
+ {
+ vec2 origCoord = coord + vec2(6.0, 0.0) * uImageIncrement_Stage1_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0.xy, uTexDom_Stage1_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0[1].w;
+ {
+ vec2 origCoord = coord + vec2(7.0, 0.0) * uImageIncrement_Stage1_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0.xy, uTexDom_Stage1_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0[2].x;
+ {
+ vec2 origCoord = coord + vec2(8.0, 0.0) * uImageIncrement_Stage1_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0.xy, uTexDom_Stage1_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0[2].y;
+ {
+ vec2 origCoord = coord + vec2(9.0, 0.0) * uImageIncrement_Stage1_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0.xy, uTexDom_Stage1_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0[2].z;
+ {
+ vec2 origCoord = coord + vec2(10.0, 0.0) * uImageIncrement_Stage1_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0.xy, uTexDom_Stage1_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0[2].w;
+ {
+ vec2 origCoord = coord + vec2(11.0, 0.0) * uImageIncrement_Stage1_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0.xy, uTexDom_Stage1_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0[3].x;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0.xy, uTexDom_Stage1_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0[3].y;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0.xy, uTexDom_Stage1_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0[3].z;
+ {
+ vec2 origCoord = coord + vec2(2.0, 1.0) * uImageIncrement_Stage1_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0.xy, uTexDom_Stage1_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0[3].w;
+ {
+ vec2 origCoord = coord + vec2(3.0, 1.0) * uImageIncrement_Stage1_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0.xy, uTexDom_Stage1_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0[4].x;
+ {
+ vec2 origCoord = coord + vec2(4.0, 1.0) * uImageIncrement_Stage1_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0.xy, uTexDom_Stage1_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0[4].y;
+ {
+ vec2 origCoord = coord + vec2(5.0, 1.0) * uImageIncrement_Stage1_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0.xy, uTexDom_Stage1_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0[4].z;
+ {
+ vec2 origCoord = coord + vec2(6.0, 1.0) * uImageIncrement_Stage1_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0.xy, uTexDom_Stage1_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0[4].w;
+ {
+ vec2 origCoord = coord + vec2(7.0, 1.0) * uImageIncrement_Stage1_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0.xy, uTexDom_Stage1_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0[5].x;
+ {
+ vec2 origCoord = coord + vec2(8.0, 1.0) * uImageIncrement_Stage1_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0.xy, uTexDom_Stage1_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0[5].y;
+ {
+ vec2 origCoord = coord + vec2(9.0, 1.0) * uImageIncrement_Stage1_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0.xy, uTexDom_Stage1_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0[5].z;
+ {
+ vec2 origCoord = coord + vec2(10.0, 1.0) * uImageIncrement_Stage1_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0.xy, uTexDom_Stage1_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0[5].w;
+ {
+ vec2 origCoord = coord + vec2(11.0, 1.0) * uImageIncrement_Stage1_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0.xy, uTexDom_Stage1_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ vec2 origCoord = vTransformedCoords_0_Stage0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0.xy, uTexDom_Stage1_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ _output.w = c.w;
+ _output.xyz = clamp(sum.xyz * uGain_Stage1_c1_c0 + uBias_Stage1_c1_c0, 0.0, 1.0);
+ _output.xyz *= _output.w;
+ _output *= _input;
+ return _output;
+}
+float _guarded_divide(float n, float d) {
+ return n / d;
+}
+float _soft_light_component(float sc, float sa, float dc, float da) {
+ if (2.0 * sc <= sa) {
+ return (_guarded_divide((dc * dc) * (sa - 2.0 * sc), da) + (1.0 - da) * sc) + dc * ((-sa + 2.0 * sc) + 1.0);
+ } else if (4.0 * dc <= da) {
+ float DSqd = dc * dc;
+ float DCub = DSqd * dc;
+ float DaSqd = da * da;
+ float DaCub = DaSqd * da;
+ return _guarded_divide(((DaSqd * (sc - dc * ((3.0 * sa - 6.0 * sc) - 1.0)) + ((12.0 * da) * DSqd) * (sa - 2.0 * sc)) - (16.0 * DCub) * (sa - 2.0 * sc)) - DaCub * sc, DaSqd);
+ }
+ return ((dc * ((sa - 2.0 * sc) + 1.0) + sc) - sqrt(da * dc) * (sa - 2.0 * sc)) - da * sc;
+}
+vec4 blend_soft_light(vec4 src, vec4 dst) {
+ if (dst.w == 0.0) {
+ return src;
+ }
+ return vec4(_soft_light_component(src.x, src.w, dst.x, dst.w), _soft_light_component(src.y, src.w, dst.y, dst.w), _soft_light_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = uColor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_soft_light(ComposeTwo_Stage1_c0_c0(inputColor), MatrixConvolution_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec2 pos2 = (uViewM_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1486.shader_test b/shaders/skia/1486.shader_test
new file mode 100644
index 0000000..0539cb9
--- /dev/null
+++ b/shaders/skia/1486.shader_test
@@ -0,0 +1,394 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1_c0_c0;
+uniform vec4 uKernel_Stage1_c0_c0[6];
+uniform vec2 uKernelOffset_Stage1_c0_c0;
+uniform float uGain_Stage1_c0_c0;
+uniform float uBias_Stage1_c0_c0;
+uniform vec4 ucolor_Stage1_c1_c0_c0_c0_c0_c0;
+uniform float uPixelSize_Stage1_c1_c0_c1_c0_c1_c0;
+uniform vec2 uRange_Stage1_c1_c0_c1_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+uniform sampler2D uTextureSampler_2_Stage1;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec3 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+vec4 MatrixConvolution_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 sum = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0 - uKernelOffset_Stage1_c0_c0 * uImageIncrement_Stage1_c0_c0;
+ vec4 c;
+ {
+ float k = uKernel_Stage1_c0_c0[0].x;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0[0].y;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0[0].z;
+ {
+ vec2 origCoord = coord + vec2(2.0, 0.0) * uImageIncrement_Stage1_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0[0].w;
+ {
+ vec2 origCoord = coord + vec2(3.0, 0.0) * uImageIncrement_Stage1_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0[1].x;
+ {
+ vec2 origCoord = coord + vec2(4.0, 0.0) * uImageIncrement_Stage1_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0[1].y;
+ {
+ vec2 origCoord = coord + vec2(5.0, 0.0) * uImageIncrement_Stage1_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0[1].z;
+ {
+ vec2 origCoord = coord + vec2(6.0, 0.0) * uImageIncrement_Stage1_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0[1].w;
+ {
+ vec2 origCoord = coord + vec2(7.0, 0.0) * uImageIncrement_Stage1_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0[2].x;
+ {
+ vec2 origCoord = coord + vec2(8.0, 0.0) * uImageIncrement_Stage1_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0[2].y;
+ {
+ vec2 origCoord = coord + vec2(9.0, 0.0) * uImageIncrement_Stage1_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0[2].z;
+ {
+ vec2 origCoord = coord + vec2(10.0, 0.0) * uImageIncrement_Stage1_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0[2].w;
+ {
+ vec2 origCoord = coord + vec2(11.0, 0.0) * uImageIncrement_Stage1_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0[3].x;
+ {
+ vec2 origCoord = coord + vec2(12.0, 0.0) * uImageIncrement_Stage1_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0[3].y;
+ {
+ vec2 origCoord = coord + vec2(13.0, 0.0) * uImageIncrement_Stage1_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0[3].z;
+ {
+ vec2 origCoord = coord + vec2(14.0, 0.0) * uImageIncrement_Stage1_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0[3].w;
+ {
+ vec2 origCoord = coord + vec2(15.0, 0.0) * uImageIncrement_Stage1_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0[4].x;
+ {
+ vec2 origCoord = coord + vec2(16.0, 0.0) * uImageIncrement_Stage1_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0[4].y;
+ {
+ vec2 origCoord = coord + vec2(17.0, 0.0) * uImageIncrement_Stage1_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0[4].z;
+ {
+ vec2 origCoord = coord + vec2(18.0, 0.0) * uImageIncrement_Stage1_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0[4].w;
+ {
+ vec2 origCoord = coord + vec2(19.0, 0.0) * uImageIncrement_Stage1_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0[5].x;
+ {
+ vec2 origCoord = coord + vec2(20.0, 0.0) * uImageIncrement_Stage1_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ _output = sum * uGain_Stage1_c0_c0 + uBias_Stage1_c0_c0;
+ _output.w = clamp(_output.w, 0.0, 1.0);
+ _output.xyz = clamp(_output.xyz, 0.0, _output.w);
+ _output *= _input;
+ return _output;
+}
+vec4 ConstColorProcessor_Stage1_c1_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = _input * ucolor_Stage1_c1_c0_c0_c0_c0_c0;
+ }
+ return _output;
+}
+vec4 TextureEffect_Stage1_c1_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = textureProj(uTextureSampler_1_Stage1, vTransformedCoords_1_Stage0) * _input;
+ return _output;
+}
+float _guarded_divide(float n, float d) {
+ return n / d;
+}
+float _color_burn_component(float sc, float sa, float dc, float da) {
+ if (da == dc) {
+ return (sa * da + sc * (1.0 - da)) + dc * (1.0 - sa);
+ } else if (sc == 0.0) {
+ return dc * (1.0 - sa);
+ }
+ float d = max(0.0, da - _guarded_divide((da - dc) * sa, sc));
+ return (d * sa + sc * (1.0 - da)) + dc * (1.0 - sa);
+}
+vec4 blend_color_burn(vec4 src, vec4 dst) {
+ return vec4(_color_burn_component(src.x, src.w, dst.x, dst.w), _color_burn_component(src.y, src.w, dst.y, dst.w), _color_burn_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+}
+vec4 ComposeTwo_Stage1_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_color_burn(ConstColorProcessor_Stage1_c1_c0_c0_c0_c0_c0(inputColor), TextureEffect_Stage1_c1_c0_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 ConfigConversionEffect_Stage1_c1_c0_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = floor(_input * 255.0 + 0.5) / 255.0;
+ {
+ _output.xyz = _output.w <= 0.0 ? vec3(0.0) : floor((_output.xyz / _output.w) * 255.0 + 0.5) / 255.0;
+ }
+ return _output;
+}
+vec4 Morphology_Stage1_c1_c0_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = vec4(1.0, 1.0, 1.0, 1.0);
+ vec2 coord = vTransformedCoords_2_Stage0;
+ coord.y -= 9.0 * uPixelSize_Stage1_c1_c0_c1_c0_c1_c0;
+ for (int i = 0;i < 19; i++) {
+ _output = min(_output, texture(uTextureSampler_2_Stage1, coord));
+ coord.y += uPixelSize_Stage1_c1_c0_c1_c0_c1_c0;
+ }
+ _output *= _input;
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 ComposeTwo_Stage1_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_src_in(ConfigConversionEffect_Stage1_c1_c0_c1_c0_c0_c0(inputColor), Morphology_Stage1_c1_c0_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 blend_src_atop(vec4 src, vec4 dst) {
+ return dst.w * src + (1.0 - src.w) * dst;
+}
+vec4 ComposeTwo_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_src_atop(ComposeTwo_Stage1_c1_c0_c0_c0(inputColor), ComposeTwo_Stage1_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+float _blend_overlay_component(float sc, float sa, float dc, float da) {
+ if (2.0 * dc <= da) {
+ return (2.0 * sc) * dc;
+ }
+ return sa * da - (2.0 * (da - dc)) * (sa - sc);
+}
+vec4 blend_overlay(vec4 src, vec4 dst) {
+ vec4 result = vec4(_blend_overlay_component(src.x, src.w, dst.x, dst.w), _blend_overlay_component(src.y, src.w, dst.y, dst.w), _blend_overlay_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+ result.xyz += dst.xyz * (1.0 - src.w) + src.xyz * (1.0 - dst.w);
+ return result;
+}
+vec4 blend_hard_light(vec4 src, vec4 dst) {
+ return blend_overlay(dst, src);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_hard_light(MatrixConvolution_Stage1_c0_c0(inputColor), ComposeTwo_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec2 inLocalCoord;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec3 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+void main() {
+ vec4 color = inColor;
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = uCoordTransformMatrix_1_Stage0 * vec3(inLocalCoord, 1.0);
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1489.shader_test b/shaders/skia/1489.shader_test
new file mode 100644
index 0000000..5bf30cd
--- /dev/null
+++ b/shaders/skia/1489.shader_test
@@ -0,0 +1,31 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 color = inColor;
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1492.shader_test b/shaders/skia/1492.shader_test
new file mode 100644
index 0000000..77dfc8e
--- /dev/null
+++ b/shaders/skia/1492.shader_test
@@ -0,0 +1,121 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_KHR_blend_equation_advanced : require
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+layout (blend_support_all_equations) out ;
+uniform vec4 uColor_Stage0;
+uniform vec4 ucircleData_Stage1;
+uniform mat4 um_Stage2;
+uniform vec4 uv_Stage2;
+uniform vec4 uellipse_Stage3;
+uniform vec4 ucircle_Stage6;
+uniform sampler2D uTextureSampler_0_Stage1;
+vec4 ConfigConversionEffect_Stage4_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = floor(_input * 255.0 + 0.5) / 255.0;
+ {
+ _output.xyz = _output.w <= 0.0 ? vec3(0.0) : floor((_output.xyz / _output.w) * 255.0 + 0.5) / 255.0;
+ }
+ return _output;
+}
+float _blend_color_luminance(vec3 color) {
+ return dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), color);
+}
+vec3 _blend_set_color_luminance(vec3 hueSatColor, float alpha, vec3 lumColor) {
+ float lum = _blend_color_luminance(lumColor);
+ vec3 result = (lum - _blend_color_luminance(hueSatColor)) + hueSatColor;
+ float minComp = min(min(result.x, result.y), result.z);
+ float maxComp = max(max(result.x, result.y), result.z);
+ if (minComp < 0.0 && lum != minComp) {
+ result = lum + ((result - lum) * lum) / (lum - minComp);
+ }
+ if (maxComp > alpha && maxComp != lum) {
+ return lum + ((result - lum) * (alpha - lum)) / (maxComp - lum);
+ }
+ return result;
+}
+vec4 blend_luminosity(vec4 src, vec4 dst) {
+ float alpha = dst.w * src.w;
+ vec3 sda = src.xyz * dst.w;
+ vec3 dsa = dst.xyz * src.w;
+ return vec4((((_blend_set_color_luminance(dsa, alpha, sda) + dst.xyz) - dsa) + src.xyz) - sda, (src.w + dst.w) - alpha);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = uColor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec2 vec = vec2((gl_FragCoord.x - ucircleData_Stage1.x) * ucircleData_Stage1.w, (gl_FragCoord.y - ucircleData_Stage1.y) * ucircleData_Stage1.w);
+ float dist = length(vec) + (0.5 - ucircleData_Stage1.z) * ucircleData_Stage1.w;
+ output_Stage1 = vec4(texture(uTextureSampler_0_Stage1, vec2(dist, 0.5)).w);
+ }
+ vec4 output_Stage2;
+ {
+ vec4 inputColor = output_Stage1;
+ output_Stage2 = um_Stage2 * inputColor + uv_Stage2;
+ {
+ output_Stage2 = clamp(output_Stage2, 0.0, 1.0);
+ }
+ }
+ vec4 output_Stage3;
+ {
+ vec2 d = gl_FragCoord.xy - uellipse_Stage3.xy;
+ vec2 Z = d * uellipse_Stage3.zw;
+ float implicit = dot(Z, d) - 1.0;
+ float grad_dot = 4.0 * dot(Z, Z);
+ {
+ grad_dot = max(grad_dot, 1.1754999560161448e-38);
+ }
+ float approx_dist = implicit * inversesqrt(grad_dot);
+ float alpha;
+ {
+ alpha = approx_dist > 0.0 ? 0.0 : 1.0;
+ }
+ output_Stage3 = output_Stage2 * alpha;
+ }
+ vec4 output_Stage4;
+ {
+ output_Stage4 = blend_luminosity(output_Stage3, ConfigConversionEffect_Stage4_c0_c0(vec4(1.0)));
+ }
+ vec4 output_Stage5;
+ {
+ output_Stage5 = floor(output_Stage4 * 255.0 + 0.5) / 255.0;
+ {
+ output_Stage5.xyz = output_Stage5.w <= 0.0 ? vec3(0.0) : floor((output_Stage5.xyz / output_Stage5.w) * 255.0 + 0.5) / 255.0;
+ }
+ }
+ vec4 output_Stage6;
+ {
+ float d;
+ {
+ d = (1.0 - length((ucircle_Stage6.xy - gl_FragCoord.xy) * ucircle_Stage6.w)) * ucircle_Stage6.z;
+ }
+ {
+ output_Stage6 = output_Stage5 * clamp(d, 0.0, 1.0);
+ }
+ }
+ {
+ sk_FragColor = output_Stage6 * outputColor_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 inPosition;
+void main() {
+ vec2 pos2 = (uViewM_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1495.shader_test b/shaders/skia/1495.shader_test
new file mode 100644
index 0000000..b080a41
--- /dev/null
+++ b/shaders/skia/1495.shader_test
@@ -0,0 +1,83 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_KHR_blend_equation_advanced : require
+out vec4 sk_FragColor;
+layout (blend_support_all_equations) out ;
+uniform vec4 uColor_Stage0;
+uniform vec4 ucircleData_Stage2;
+uniform float uPixelSize_Stage3;
+uniform vec2 uRange_Stage3;
+uniform float uPixelSize_Stage4;
+uniform vec2 uRange_Stage4;
+uniform sampler2D uTextureSampler_0_Stage2;
+uniform sampler2D uTextureSampler_0_Stage3;
+uniform sampler2D uTextureSampler_0_Stage4;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = uColor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = floor(outputColor_Stage0 * 255.0 + 0.5) / 255.0;
+ {
+ output_Stage1.xyz = floor((output_Stage1.xyz * output_Stage1.w) * 255.0 + 0.5) / 255.0;
+ }
+ }
+ vec4 output_Stage2;
+ {
+ vec2 vec = vec2((gl_FragCoord.x - ucircleData_Stage2.x) * ucircleData_Stage2.w, (gl_FragCoord.y - ucircleData_Stage2.y) * ucircleData_Stage2.w);
+ float dist = length(vec) + (0.5 - ucircleData_Stage2.z) * ucircleData_Stage2.w;
+ output_Stage2 = output_Stage1 * texture(uTextureSampler_0_Stage2, vec2(dist, 0.5)).w;
+ }
+ vec4 output_Stage3;
+ {
+ output_Stage3 = vec4(1.0, 1.0, 1.0, 1.0);
+ vec2 coord = vTransformedCoords_0_Stage0;
+ coord.x -= uPixelSize_Stage3;
+ for (int i = 0;i < 3; i++) {
+ output_Stage3 = min(output_Stage3, texture(uTextureSampler_0_Stage3, coord));
+ coord.x += uPixelSize_Stage3;
+ }
+ output_Stage3 *= output_Stage2;
+ }
+ vec4 output_Stage4;
+ {
+ output_Stage4 = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_1_Stage0;
+ coord.x -= 6.0 * uPixelSize_Stage4;
+ for (int i = 0;i < 13; i++) {
+ output_Stage4 = max(output_Stage4, texture(uTextureSampler_0_Stage4, coord));
+ coord.x += uPixelSize_Stage4;
+ }
+ }
+ {
+ sk_FragColor = output_Stage4 * output_Stage3;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 inLocalCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1498.shader_test b/shaders/skia/1498.shader_test
new file mode 100644
index 0000000..c87e457
--- /dev/null
+++ b/shaders/skia/1498.shader_test
@@ -0,0 +1,205 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uColor_Stage0;
+uniform vec2 uImageIncrement_Stage1_c1_c0_c0_c0_c0_c0;
+uniform vec2 uBounds_Stage1_c1_c0_c0_c0_c0_c0;
+uniform vec4 uKernel_Stage1_c1_c0_c0_c0_c0_c0[2];
+uniform vec2 ubaseFrequency_Stage1_c1_c0_c0_c0_c1_c0;
+uniform float uz_Stage1_c1_c0_c0_c0_c1_c0;
+uniform float uinnerThreshold_Stage1_c1_c0_c1_c0_c0_c0;
+uniform float uouterThreshold_Stage1_c1_c0_c1_c0_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+uniform sampler2D uTextureSampler_2_Stage1;
+uniform sampler2D uTextureSampler_3_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec3 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+vec4 ClampFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ float alpha = clamp(_input.w, 0.0, 1.0);
+ _output = vec4(clamp(_input.xyz, 0.0, alpha), alpha);
+ }
+ return _output;
+}
+vec4 GaussianConvolution_Stage1_c1_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0 - 2.0 * uImageIncrement_Stage1_c1_c0_c0_c0_c0_c0;
+ vec2 coordSampled = vec2(0.0, 0.0);
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1_c1_c0_c0_c0_c0_c0.x, uBounds_Stage1_c1_c0_c0_c0_c0_c0.y - uBounds_Stage1_c1_c0_c0_c0_c0_c0.x) + uBounds_Stage1_c1_c0_c0_c0_c0_c0.x;
+ _output += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1_c1_c0_c0_c0_c0_c0[0].x;
+ coord += uImageIncrement_Stage1_c1_c0_c0_c0_c0_c0;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1_c1_c0_c0_c0_c0_c0.x, uBounds_Stage1_c1_c0_c0_c0_c0_c0.y - uBounds_Stage1_c1_c0_c0_c0_c0_c0.x) + uBounds_Stage1_c1_c0_c0_c0_c0_c0.x;
+ _output += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1_c1_c0_c0_c0_c0_c0[0].y;
+ coord += uImageIncrement_Stage1_c1_c0_c0_c0_c0_c0;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1_c1_c0_c0_c0_c0_c0.x, uBounds_Stage1_c1_c0_c0_c0_c0_c0.y - uBounds_Stage1_c1_c0_c0_c0_c0_c0.x) + uBounds_Stage1_c1_c0_c0_c0_c0_c0.x;
+ _output += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1_c1_c0_c0_c0_c0_c0[0].z;
+ coord += uImageIncrement_Stage1_c1_c0_c0_c0_c0_c0;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1_c1_c0_c0_c0_c0_c0.x, uBounds_Stage1_c1_c0_c0_c0_c0_c0.y - uBounds_Stage1_c1_c0_c0_c0_c0_c0.x) + uBounds_Stage1_c1_c0_c0_c0_c0_c0.x;
+ _output += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1_c1_c0_c0_c0_c0_c0[0].w;
+ coord += uImageIncrement_Stage1_c1_c0_c0_c0_c0_c0;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1_c1_c0_c0_c0_c0_c0.x, uBounds_Stage1_c1_c0_c0_c0_c0_c0.y - uBounds_Stage1_c1_c0_c0_c0_c0_c0.x) + uBounds_Stage1_c1_c0_c0_c0_c0_c0.x;
+ _output += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1_c1_c0_c0_c0_c0_c0[1].x;
+ coord += uImageIncrement_Stage1_c1_c0_c0_c0_c0_c0;
+ _output *= _input;
+ return _output;
+}
+vec3 fade_Stage1_c1_c0_c0_c0_c1_c0(vec3 t) {
+ return ((t * t) * t) * (t * (t * 6.0 - 15.0) + 10.0);
+}
+float perm_Stage1_c1_c0_c0_c0_c1_c0(float x) {
+ return texture(uTextureSampler_1_Stage1, vec2(fract(x / 256.0), 0.0)).x * 255.0;
+}
+float grad_Stage1_c1_c0_c0_c0_c1_c0(float x, vec3 p) {
+ return dot(texture(uTextureSampler_2_Stage1, vec2(fract(x / 16.0), 0.0)).xyz * 255.0 - vec3(1.0), p);
+}
+float lerp_Stage1_c1_c0_c0_c0_c1_c0(float a, float b, float w) {
+ return a + w * (b - a);
+}
+float noise_Stage1_c1_c0_c0_c0_c1_c0(vec3 p) {
+ vec3 P = mod(floor(p), 256.0);
+ p -= floor(p);
+ vec3 f = fade_Stage1_c1_c0_c0_c0_c1_c0(p);
+ float A = perm_Stage1_c1_c0_c0_c0_c1_c0(P.x) + P.y;
+ float AA = perm_Stage1_c1_c0_c0_c0_c1_c0(A) + P.z;
+ float AB = perm_Stage1_c1_c0_c0_c0_c1_c0(A + 1.0) + P.z;
+ float B = perm_Stage1_c1_c0_c0_c0_c1_c0(P.x + 1.0) + P.y;
+ float BA = perm_Stage1_c1_c0_c0_c0_c1_c0(B) + P.z;
+ float BB = perm_Stage1_c1_c0_c0_c0_c1_c0(B + 1.0) + P.z;
+ float result = lerp_Stage1_c1_c0_c0_c0_c1_c0(lerp_Stage1_c1_c0_c0_c0_c1_c0(lerp_Stage1_c1_c0_c0_c0_c1_c0(grad_Stage1_c1_c0_c0_c0_c1_c0(perm_Stage1_c1_c0_c0_c0_c1_c0(AA), p), grad_Stage1_c1_c0_c0_c0_c1_c0(perm_Stage1_c1_c0_c0_c0_c1_c0(BA), p + vec3(-1.0, 0.0, 0.0)), f.x), lerp_Stage1_c1_c0_c0_c0_c1_c0(grad_Stage1_c1_c0_c0_c0_c1_c0(perm_Stage1_c1_c0_c0_c0_c1_c0(AB), p + vec3(0.0, -1.0, 0.0)), grad_Stage1_c1_c0_c0_c0_c1_c0(perm_Stage1_c1_c0_c0_c0_c1_c0(BB), p + vec3(-1.0, -1.0, 0.0)), f.x), f.y), lerp_Stage1_c1_c0_c0_c0_c1_c0(lerp_Stage1_c1_c0_c0_c0_c1_c0(grad_Stage1_c1_c0_c0_c0_c1_c0(perm_Stage1_c1_c0_c0_c0_c1_c0(AA + 1.0), p + vec3(0.0, 0.0, -1.0)), grad_Stage1_c1_c0_c0_c0_c1_c0(perm_Stage1_c1_c0_c0_c0_c1_c0(BA + 1.0), p + vec3(-1.0, 0.0, -1.0)), f.x), lerp_Stage1_c1_c0_c0_c0_c1_c0(grad_Stage1_c1_c0_c0_c0_c1_c0(perm_Stage1_c1_c0_c0_c0_c1_c0(AB + 1.0), p + vec3(0.0, -1.0, -1.0)), grad_Stage1_c1_c0_c0_c0_c1_c0(perm_Stage1_c1_c0_c0_c0_c1_c0(BB + 1.0), p + vec3(-1.0, -1.0, -1.0)), f.x), f.y), f.z);
+ return result;
+}
+float noiseOctaves_Stage1_c1_c0_c0_c0_c1_c0(vec3 p) {
+ float result = 0.0;
+ float ratio = 1.0;
+ for (float i = 0.0;i < 6.0; i++) {
+ result += noise_Stage1_c1_c0_c0_c0_c1_c0(p) / ratio;
+ p *= 2.0;
+ ratio *= 2.0;
+ }
+ return (result + 1.0) / 2.0;
+}
+vec4 ImprovedPerlinNoise_Stage1_c1_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 vTransformedCoords_1_Stage0_ensure2D = vTransformedCoords_1_Stage0.xy / vTransformedCoords_1_Stage0.z;
+ vec2 coords = vTransformedCoords_1_Stage0_ensure2D * ubaseFrequency_Stage1_c1_c0_c0_c0_c1_c0;
+ float r = noiseOctaves_Stage1_c1_c0_c0_c0_c1_c0(vec3(coords, uz_Stage1_c1_c0_c0_c0_c1_c0));
+ float g = noiseOctaves_Stage1_c1_c0_c0_c0_c1_c0(vec3(coords, uz_Stage1_c1_c0_c0_c0_c1_c0));
+ float b = noiseOctaves_Stage1_c1_c0_c0_c0_c1_c0(vec3(coords, uz_Stage1_c1_c0_c0_c0_c1_c0));
+ float a = noiseOctaves_Stage1_c1_c0_c0_c0_c1_c0(vec3(coords, uz_Stage1_c1_c0_c0_c0_c1_c0));
+ _output = vec4(r, g, b, a);
+ _output = clamp(_output, 0.0, 1.0);
+ _output = vec4(_output.xyz * _output.www, _output.w);
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 ComposeTwo_Stage1_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_src_in(GaussianConvolution_Stage1_c1_c0_c0_c0_c0_c0(inputColor), ImprovedPerlinNoise_Stage1_c1_c0_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 AlphaThresholdFragmentProcessor_Stage1_c1_c0_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 color = _input;
+ vec4 mask_color = texture(uTextureSampler_3_Stage1, vTransformedCoords_2_Stage0);
+ if (mask_color.w < 0.5) {
+ if (color.w > uouterThreshold_Stage1_c1_c0_c1_c0_c0_c0) {
+ float scale = uouterThreshold_Stage1_c1_c0_c1_c0_c0_c0 / color.w;
+ color.xyz *= scale;
+ color.w = uouterThreshold_Stage1_c1_c0_c1_c0_c0_c0;
+ }
+ } else if (color.w < uinnerThreshold_Stage1_c1_c0_c1_c0_c0_c0) {
+ float scale = uinnerThreshold_Stage1_c1_c0_c1_c0_c0_c0 / max(0.0010000000474974513, color.w);
+ color.xyz *= scale;
+ color.w = uinnerThreshold_Stage1_c1_c0_c1_c0_c0_c0;
+ }
+ _output = color;
+ return _output;
+}
+vec4 ClampFragmentProcessor_Stage1_c1_c0_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = clamp(_input, 0.0, 1.0);
+ }
+ return _output;
+}
+vec4 blend_dst_over(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src + dst;
+}
+vec4 ComposeTwo_Stage1_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_dst_over(AlphaThresholdFragmentProcessor_Stage1_c1_c0_c1_c0_c0_c0(inputColor), ClampFragmentProcessor_Stage1_c1_c0_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 blend_dst_atop(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src + src.w * dst;
+}
+vec4 ComposeTwo_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_dst_atop(ComposeTwo_Stage1_c1_c0_c0_c0(inputColor), ComposeTwo_Stage1_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 blend_src_out(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = uColor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_src_out(ClampFragmentProcessor_Stage1_c0_c0(inputColor), ComposeTwo_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+in vec2 inPosition;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec3 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+void main() {
+ vec2 pos2 = (uViewM_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = uCoordTransformMatrix_1_Stage0 * vec3(inPosition, 1.0);
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(inPosition, 1.0)).xy;
+ {
+ vec2 _posTmp = pos2;
+ _posTmp = floor(_posTmp) + vec2(0.5, 0.5);
+ gl_Position = vec4(_posTmp, 0.0, 1.0);
+ }
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1501.shader_test b/shaders/skia/1501.shader_test
new file mode 100644
index 0000000..28985d6
--- /dev/null
+++ b/shaders/skia/1501.shader_test
@@ -0,0 +1,101 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_KHR_blend_equation_advanced : require
+out vec4 sk_FragColor;
+layout (blend_support_all_equations) out ;
+uniform float uSrcTF_Stage0[7];
+uniform mat3 uColorXform_Stage0;
+uniform float uDstTF_Stage0[7];
+uniform sampler2D uTextureSampler_0_Stage0;
+noperspective in vec2 vtextureCoords_Stage0;
+flat in vec4 vtextureDomain_Stage0;
+flat in vec4 vcolor_Stage0;
+float src_tf_Stage0(float x) {
+ float G = uSrcTF_Stage0[0];
+ float A = uSrcTF_Stage0[1];
+ float B = uSrcTF_Stage0[2];
+ float C = uSrcTF_Stage0[3];
+ float D = uSrcTF_Stage0[4];
+ float E = uSrcTF_Stage0[5];
+ float F = uSrcTF_Stage0[6];
+ float s = sign(x);
+ x = abs(x);
+ x = x < D ? C * x + F : pow(A * x + B, G) + E;
+ return s * x;
+}
+float dst_tf_Stage0(float x) {
+ float G = uDstTF_Stage0[0];
+ float A = uDstTF_Stage0[1];
+ float B = uDstTF_Stage0[2];
+ float C = uDstTF_Stage0[3];
+ float D = uDstTF_Stage0[4];
+ float E = uDstTF_Stage0[5];
+ float F = uDstTF_Stage0[6];
+ float s = sign(x);
+ x = abs(x);
+ x = x < D ? C * x + F : pow(A * x + B, G) + E;
+ return s * x;
+}
+vec4 gamut_xform_Stage0(vec4 color) {
+ color.xyz = uColorXform_Stage0 * color.xyz;
+ return color;
+}
+vec4 color_xform_Stage0(vec4 color) {
+ float nonZeroAlpha = max(color.w, 9.9999997473787516e-05);
+ color = vec4(color.xyz / nonZeroAlpha, nonZeroAlpha);
+ color.x = src_tf_Stage0(color.x);
+ color.y = src_tf_Stage0(color.y);
+ color.z = src_tf_Stage0(color.z);
+ color = gamut_xform_Stage0(color);
+ color.x = dst_tf_Stage0(color.x);
+ color.y = dst_tf_Stage0(color.y);
+ color.z = dst_tf_Stage0(color.z);
+ color.xyz *= color.w;
+ return color;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ vec2 textureCoords;
+ textureCoords = vtextureCoords_Stage0;
+ vec4 textureDomain;
+ textureDomain = vtextureDomain_Stage0;
+ outputColor_Stage0 = vcolor_Stage0;
+ outputColor_Stage0 = color_xform_Stage0(texture(uTextureSampler_0_Stage0, clamp(textureCoords, textureDomain.xy, textureDomain.zw))) * outputColor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = floor(outputColor_Stage0 * 255.0 + 0.5) / 255.0;
+ {
+ output_Stage1.xyz = floor((output_Stage1.xyz * output_Stage1.w) * 255.0 + 0.5) / 255.0;
+ }
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 position;
+in vec2 textureCoords;
+in vec4 textureDomain;
+in vec4 color;
+noperspective out vec2 vtextureCoords_Stage0;
+flat out vec4 vtextureDomain_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vec2 pos2 = position;
+ vtextureCoords_Stage0 = textureCoords;
+ vtextureDomain_Stage0 = textureDomain;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1504.shader_test b/shaders/skia/1504.shader_test
new file mode 100644
index 0000000..832513e
--- /dev/null
+++ b/shaders/skia/1504.shader_test
@@ -0,0 +1,229 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_KHR_blend_equation_advanced : require
+out vec4 sk_FragColor;
+layout (blend_support_all_equations) out ;
+uniform vec4 uleftBorderColor_Stage3_c0_c0;
+uniform vec4 urightBorderColor_Stage3_c0_c0;
+uniform float ubias_Stage3_c0_c0_c0_c0;
+uniform float uscale_Stage3_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage3_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage3_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage3_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage3_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage3_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage3_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage3_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage3_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage3_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage3_c0_c0_c1_c0;
+uniform vec2 ubaseFrequency_Stage4_c1_c0;
+uniform float uinnerThreshold_Stage5;
+uniform float uouterThreshold_Stage5;
+uniform float uPixelSize_Stage6;
+uniform vec2 uRange_Stage6;
+uniform sampler2D uTextureSampler_0_Stage4;
+uniform sampler2D uTextureSampler_1_Stage4;
+uniform sampler2D uTextureSampler_0_Stage5;
+uniform sampler2D uTextureSampler_0_Stage6;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+noperspective in vec2 vTransformedCoords_3_Stage0;
+noperspective in float vinCoverage_Stage0;
+vec4 SweepGradientLayout_Stage3_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float angle;
+ {
+ angle = atan(-vTransformedCoords_0_Stage0.y, -vTransformedCoords_0_Stage0.x);
+ }
+ float t = ((angle * 0.15915493667125702 + 0.5) + ubias_Stage3_c0_c0_c0_c0) * uscale_Stage3_c0_c0_c0_c0;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage3_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage3_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage3_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage3_c0_c0_c1_c0;
+ bias = ubias0_1_Stage3_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage3_c0_c0_c1_c0;
+ bias = ubias2_3_Stage3_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage3_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage3_c0_c0_c1_c0;
+ bias = ubias4_5_Stage3_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage3_c0_c0_c1_c0;
+ bias = ubias6_7_Stage3_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage3_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = SweepGradientLayout_Stage3_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage3_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage3_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage3_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+float perlinnoise_Stage4_c1_c0(float chanCoord, vec2 noiseVec) {
+ vec4 floorVal;
+ floorVal.xy = floor(noiseVec);
+ floorVal.zw = floorVal.xy + vec2(1.0);
+ vec2 fractVal = fract(noiseVec);
+ vec2 noiseSmooth = (fractVal * fractVal) * (vec2(3.0) - vec2(2.0) * fractVal);
+ floorVal = fract(floor(mod(floorVal, 256.0)) / vec4(256.0));
+ vec2 latticeIdx;
+ latticeIdx.x = texture(uTextureSampler_0_Stage4, vec2(floorVal.x, 0.5)).x;
+ latticeIdx.y = texture(uTextureSampler_0_Stage4, vec2(floorVal.z, 0.5)).x;
+ vec4 bcoords = fract(latticeIdx.xyxy + floorVal.yyww);
+ vec2 uv;
+ vec4 lattice = texture(uTextureSampler_1_Stage4, vec2(bcoords.x, chanCoord)).zyxw;
+ uv.x = dot((lattice.yw + lattice.xz * vec2(0.00390625)) * vec2(2.0) - vec2(1.0), fractVal);
+ fractVal.x -= 1.0;
+ lattice = texture(uTextureSampler_1_Stage4, vec2(bcoords.y, chanCoord)).zyxw;
+ uv.y = dot((lattice.yw + lattice.xz * vec2(0.00390625)) * vec2(2.0) - vec2(1.0), fractVal);
+ vec2 ab;
+ ab.x = mix(uv.x, uv.y, noiseSmooth.x);
+ fractVal.y -= 1.0;
+ lattice = texture(uTextureSampler_1_Stage4, vec2(bcoords.w, chanCoord)).zyxw;
+ uv.y = dot((lattice.yw + lattice.xz * vec2(0.00390625)) * vec2(2.0) - vec2(1.0), fractVal);
+ fractVal.x += 1.0;
+ lattice = texture(uTextureSampler_1_Stage4, vec2(bcoords.z, chanCoord)).zyxw;
+ uv.x = dot((lattice.yw + lattice.xz * vec2(0.00390625)) * vec2(2.0) - vec2(1.0), fractVal);
+ ab.y = mix(uv.x, uv.y, noiseSmooth.x);
+ return mix(ab.x, ab.y, noiseSmooth.y);
+}
+vec4 PerlinNoise_Stage4_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 noiseVec = floor(vTransformedCoords_1_Stage0) * ubaseFrequency_Stage4_c1_c0;
+ _output = vec4(0.0);
+ float ratio = 1.0;
+ for (int octave = 0;octave < 8; ++octave) {
+ _output += vec4(perlinnoise_Stage4_c1_c0(0.125, noiseVec), perlinnoise_Stage4_c1_c0(0.375, noiseVec), perlinnoise_Stage4_c1_c0(0.625, noiseVec), perlinnoise_Stage4_c1_c0(0.875, noiseVec)) * ratio;
+ noiseVec *= vec2(2.0);
+ ratio *= 0.5;
+ }
+ _output = _output * vec4(0.5) + vec4(0.5);
+ _output = clamp(_output, 0.0, 1.0);
+ _output = vec4(_output.xyz * _output.www, _output.w);
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ float alpha = 1.0;
+ alpha = vinCoverage_Stage0;
+ outputCoverage_Stage0 = vec4(alpha);
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = outputColor_Stage0;
+ }
+ vec4 output_Stage2;
+ {
+ {
+ float alpha = clamp(outputCoverage_Stage0.w, 0.0, 1.0);
+ output_Stage2 = vec4(clamp(outputCoverage_Stage0.xyz, 0.0, alpha), alpha);
+ }
+ }
+ vec4 output_Stage3;
+ {
+ output_Stage3 = blend_dst_in(output_Stage2, ClampedGradientEffect_Stage3_c0_c0(vec4(1.0)));
+ }
+ vec4 output_Stage4;
+ {
+ output_Stage4 = blend_dst_in(output_Stage3, PerlinNoise_Stage4_c1_c0(vec4(1.0)));
+ }
+ vec4 output_Stage5;
+ {
+ vec4 color = output_Stage4;
+ vec4 mask_color = texture(uTextureSampler_0_Stage5, vTransformedCoords_2_Stage0);
+ if (mask_color.w < 0.5) {
+ if (color.w > uouterThreshold_Stage5) {
+ float scale = uouterThreshold_Stage5 / color.w;
+ color.xyz *= scale;
+ color.w = uouterThreshold_Stage5;
+ }
+ } else if (color.w < uinnerThreshold_Stage5) {
+ float scale = uinnerThreshold_Stage5 / max(0.0010000000474974513, color.w);
+ color.xyz *= scale;
+ color.w = uinnerThreshold_Stage5;
+ }
+ output_Stage5 = color;
+ }
+ vec4 output_Stage6;
+ {
+ output_Stage6 = vec4(1.0, 1.0, 1.0, 1.0);
+ vec2 coord = vTransformedCoords_3_Stage0;
+ coord.y -= 10.0 * uPixelSize_Stage6;
+ for (int i = 0;i < 21; i++) {
+ output_Stage6 = min(output_Stage6, texture(uTextureSampler_0_Stage6, coord));
+ coord.y += uPixelSize_Stage6;
+ }
+ output_Stage6 *= output_Stage5;
+ }
+ {
+ sk_FragColor = output_Stage6 * output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+uniform mat3 uCoordTransformMatrix_3_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in float inCoverage;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+noperspective out vec2 vTransformedCoords_3_Stage0;
+noperspective out float vinCoverage_Stage0;
+void main() {
+ vec4 color = inColor;
+ vcolor_Stage0 = color;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_3_Stage0 = (uCoordTransformMatrix_3_Stage0 * vec3(inPosition, 1.0)).xy;
+ vinCoverage_Stage0 = inCoverage;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1507.shader_test b/shaders/skia/1507.shader_test
new file mode 100644
index 0000000..f1e3cfc
--- /dev/null
+++ b/shaders/skia/1507.shader_test
@@ -0,0 +1,127 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage0;
+noperspective in vec2 vTextureCoords_Stage0;
+flat in int vTexIndex_Stage0;
+noperspective in vec4 vinColor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_0_Stage0;
+ float t = -1.0;
+ {
+ {
+ float r0 = ufocalParams_Stage1_c0_c0_c0_c0.x;
+ {
+ t = length(p) - r0;
+ }
+ }
+ }
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vinColor_Stage0;
+ vec4 texColor;
+ {
+ texColor = texture(uTextureSampler_0_Stage0, vTextureCoords_Stage0);
+ }
+ outputCoverage_Stage0 = texColor;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_dst_in(outputColor_Stage0, TiledGradientEffect_Stage1_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage1 * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform vec2 uAtlasSizeInv_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in uvec2 inTextureCoords;
+noperspective out vec2 vTextureCoords_Stage0;
+flat out int vTexIndex_Stage0;
+noperspective out vec4 vinColor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ ivec2 signedCoords = ivec2(int(inTextureCoords.x), int(inTextureCoords.y));
+ vec2 unormTexCoords = vec2(float(signedCoords.x / 2), float(signedCoords.y / 2));
+ vTextureCoords_Stage0 = unormTexCoords * uAtlasSizeInv_Stage0;
+ vTexIndex_Stage0 = 0;
+ vinColor_Stage0 = inColor;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(inPosition.x, inPosition.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/151-10.shader_test b/shaders/skia/151-10.shader_test
new file mode 100644
index 0000000..3356b42
--- /dev/null
+++ b/shaders/skia/151-10.shader_test
@@ -0,0 +1,75 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 urectH_Stage2_c0_c0;
+uniform float uinvSixSigma_Stage2_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec3 vTransformedCoords_1_Stage0;
+vec4 RectBlurEffect_Stage2_c0_c0(vec4 _input, vec2 _coords) {
+ vec4 _output;
+ float xCoverage, yCoverage;
+ {
+ float x, y;
+ {
+ x = max(urectH_Stage2_c0_c0.x - gl_FragCoord.x, gl_FragCoord.x - urectH_Stage2_c0_c0.z);
+ y = max(urectH_Stage2_c0_c0.y - gl_FragCoord.y, gl_FragCoord.y - urectH_Stage2_c0_c0.w);
+ }
+ xCoverage = texture(uTextureSampler_0_Stage2, vec2(x * uinvSixSigma_Stage2_c0_c0, 0.5)).w;
+ yCoverage = texture(uTextureSampler_0_Stage2, vec2(y * uinvSixSigma_Stage2_c0_c0, 0.5)).w;
+ _output = (_input * xCoverage) * yCoverage;
+ }
+ _output = (_input * xCoverage) * yCoverage;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ vec2 vTransformedCoords_1_Stage0_ensure2D = vTransformedCoords_1_Stage0.xy / vTransformedCoords_1_Stage0.z;
+ float coord = vTransformedCoords_1_Stage0_ensure2D.x - 0.5;
+ float f = fract(coord);
+ coord += 0.5 - f;
+ float f2 = f * f;
+ vec4 w = mat4(0.055555555555555552, 0.88888888888888884, 0.055555555555555552, 0.0, -0.5, 0.0, 0.5, 0.0, 0.83333333333333337, -2.0, 1.5, -0.33333333333333331, -0.3888888888888889, 1.1666666666666667, -1.1666666666666667, 0.3888888888888889) * vec4(1.0, f, f2, f2 * f);
+ vec4 c[4];
+ c[0] = RectBlurEffect_Stage2_c0_c0(vec4(1.0), vec2(coord + -1.0, vTransformedCoords_1_Stage0_ensure2D.y));
+ c[1] = RectBlurEffect_Stage2_c0_c0(vec4(1.0), vec2(coord, vTransformedCoords_1_Stage0_ensure2D.y));
+ c[2] = RectBlurEffect_Stage2_c0_c0(vec4(1.0), vec2(coord + 1.0, vTransformedCoords_1_Stage0_ensure2D.y));
+ c[3] = RectBlurEffect_Stage2_c0_c0(vec4(1.0), vec2(coord + 2.0, vTransformedCoords_1_Stage0_ensure2D.y));
+ vec4 bicubicColor = ((c[0] * w.x + c[1] * w.y) + c[2] * w.z) + c[3] * w.w;
+ bicubicColor = clamp(bicubicColor, 0.0, 1.0);
+ output_Stage2 = bicubicColor * output_Stage1;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec3 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0);
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/151-2.shader_test b/shaders/skia/151-2.shader_test
new file mode 100644
index 0000000..452d375
--- /dev/null
+++ b/shaders/skia/151-2.shader_test
@@ -0,0 +1,75 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage2_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c1_c0;
+ }
+ return _output;
+}
+vec4 blend_src_atop(vec4 src, vec4 dst) {
+ return dst.w * src + (1.0 - src.w) * dst;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_src_atop(ConstColorProcessor_Stage2_c1_c0(vec4(1.0)), output_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/151-3.shader_test b/shaders/skia/151-3.shader_test
new file mode 100644
index 0000000..f9d7a5c
--- /dev/null
+++ b/shaders/skia/151-3.shader_test
@@ -0,0 +1,156 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform float uSurfaceScale_Stage1;
+uniform vec3 uLightColor_Stage1;
+uniform float uKS_Stage1;
+uniform float uShininess_Stage1;
+uniform vec3 uLightLocation_Stage1;
+uniform float uExponent_Stage1;
+uniform float uCosInnerConeAngle_Stage1;
+uniform float uCosOuterConeAngle_Stage1;
+uniform float uConeScale_Stage1;
+uniform vec3 uS_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 light_Stage1(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ vec3 halfDir = normalize(surfaceToLight + vec3(0.0, 0.0, 1.0));
+ float colorScale = uKS_Stage1 * pow(dot(normal, halfDir), uShininess_Stage1);
+ vec3 color = lightColor * clamp(colorScale, 0.0, 1.0);
+ return vec4(color, max(max(color.x, color.y), color.z));
+}
+float sobel_Stage1(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage1(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage1(float m[9], float surfaceScale) {
+ return pointToNormal_Stage1(sobel_Stage1(m[1], m[2], m[4], m[5], m[7], m[8], 0.5), sobel_Stage1(0.0, 0.0, m[1], m[7], m[2], m[8], 0.33333298563957214), surfaceScale);
+}
+vec3 lightColor_Stage1(vec3 surfaceToLight) {
+ float cosAngle = -dot(surfaceToLight, uS_Stage1);
+ if (cosAngle < uCosOuterConeAngle_Stage1) {
+ return vec3(0.0);
+ }
+ float scale = pow(cosAngle, uExponent_Stage1);
+ if (cosAngle < uCosInnerConeAngle_Stage1) {
+ return ((uLightColor_Stage1 * scale) * (cosAngle - uCosOuterConeAngle_Stage1)) * uConeScale_Stage1;
+ }
+ return uLightColor_Stage1;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ vec2 coord = vTransformedCoords_0_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp0 = textureColor;
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp1 = textureColor;
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp2 = textureColor;
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp3 = textureColor;
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp4 = textureColor;
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp5 = textureColor;
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp6 = textureColor;
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp7 = textureColor;
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp8 = textureColor;
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = normalize(uLightLocation_Stage1 - vec3(gl_FragCoord.xy, uSurfaceScale_Stage1 * m[4]));
+ output_Stage1 = light_Stage1(normal_Stage1(m, uSurfaceScale_Stage1), surfaceToLight, lightColor_Stage1(surfaceToLight));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/151-4.shader_test b/shaders/skia/151-4.shader_test
new file mode 100644
index 0000000..6332553
--- /dev/null
+++ b/shaders/skia/151-4.shader_test
@@ -0,0 +1,116 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+uniform vec2 uDstTextureUpperLeft_Stage2;
+uniform vec2 uDstTextureCoordScale_Stage2;
+uniform sampler2D uTextureSampler_0_Stage0;
+uniform sampler2D uDstTextureSampler_Stage2;
+noperspective in vec2 vTextureCoords_Stage0;
+flat in int vTexIndex_Stage0;
+noperspective in vec4 vinColor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ t.x = fract(t.x);
+ }
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+float _guarded_divide(float n, float d) {
+ return n / d;
+}
+float _soft_light_component(float sc, float sa, float dc, float da) {
+ if (2.0 * sc <= sa) {
+ return (_guarded_divide((dc * dc) * (sa - 2.0 * sc), da) + (1.0 - da) * sc) + dc * ((-sa + 2.0 * sc) + 1.0);
+ } else if (4.0 * dc <= da) {
+ float DSqd = dc * dc;
+ float DCub = DSqd * dc;
+ float DaSqd = da * da;
+ float DaCub = DaSqd * da;
+ return _guarded_divide(((DaSqd * (sc - dc * ((3.0 * sa - 6.0 * sc) - 1.0)) + ((12.0 * da) * DSqd) * (sa - 2.0 * sc)) - (16.0 * DCub) * (sa - 2.0 * sc)) - DaCub * sc, DaSqd);
+ }
+ return ((dc * ((sa - 2.0 * sc) + 1.0) + sc) - sqrt(da * dc) * (sa - 2.0 * sc)) - da * sc;
+}
+vec4 blend_soft_light(vec4 src, vec4 dst) {
+ if (dst.w == 0.0) {
+ return src;
+ }
+ return vec4(_soft_light_component(src.x, src.w, dst.x, dst.w), _soft_light_component(src.y, src.w, dst.y, dst.w), _soft_light_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ vec4 texColor;
+ {
+ texColor = texture(uTextureSampler_0_Stage0, vTextureCoords_Stage0);
+ }
+ outputCoverage_Stage0 = texColor;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TiledGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ if (all(lessThanEqual(outputCoverage_Stage0.xyz, vec3(0.0)))) {
+ discard;
+ }
+ vec2 _dstTexCoord = (gl_FragCoord.xy - uDstTextureUpperLeft_Stage2) * uDstTextureCoordScale_Stage2;
+ _dstTexCoord.y = 1.0 - _dstTexCoord.y;
+ vec4 _dstColor = texture(uDstTextureSampler_Stage2, _dstTexCoord);
+ sk_FragColor = blend_soft_light(output_Stage1, _dstColor);
+ float lerpRed = mix(_dstColor.w, sk_FragColor.w, outputCoverage_Stage0.x);
+ float lerpBlue = mix(_dstColor.w, sk_FragColor.w, outputCoverage_Stage0.y);
+ float lerpGreen = mix(_dstColor.w, sk_FragColor.w, outputCoverage_Stage0.z);
+ sk_FragColor = outputCoverage_Stage0 * sk_FragColor + (vec4(1.0) - outputCoverage_Stage0) * _dstColor;
+ sk_FragColor.w = max(max(lerpRed, lerpBlue), lerpGreen);
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform vec2 uAtlasSizeInv_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in uvec2 inTextureCoords;
+noperspective out vec2 vTextureCoords_Stage0;
+flat out int vTexIndex_Stage0;
+noperspective out vec4 vinColor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ ivec2 signedCoords = ivec2(int(inTextureCoords.x), int(inTextureCoords.y));
+ vec2 unormTexCoords = vec2(float(signedCoords.x / 2), float(signedCoords.y / 2));
+ vTextureCoords_Stage0 = unormTexCoords * uAtlasSizeInv_Stage0;
+ vTexIndex_Stage0 = 0;
+ vinColor_Stage0 = inColor;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(inPosition.x, inPosition.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/151-5.shader_test b/shaders/skia/151-5.shader_test
new file mode 100644
index 0000000..b90ae47
--- /dev/null
+++ b/shaders/skia/151-5.shader_test
@@ -0,0 +1,66 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uclamp_Stage1_c0_c0;
+uniform vec4 ucolor_Stage2_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 inCoord = vTransformedCoords_0_Stage0;
+ vec2 subsetCoord;
+ subsetCoord.x = inCoord.x;
+ subsetCoord.y = inCoord.y;
+ vec2 clampedCoord;
+ clampedCoord.x = subsetCoord.x;
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage1_c0_c0.y, uclamp_Stage1_c0_c0.w);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ _output = _input * textureColor;
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c1_c0;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TextureEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_src_in(ConstColorProcessor_Stage2_c1_c0(vec4(1.0)), output_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/151-9.shader_test b/shaders/skia/151-9.shader_test
new file mode 100644
index 0000000..59a3ebf
--- /dev/null
+++ b/shaders/skia/151-9.shader_test
@@ -0,0 +1,190 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_KHR_blend_equation_advanced : require
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+layout (blend_support_all_equations) out ;
+uniform vec3 uedges_Stage1_c0_c0_c0_c0[3];
+uniform vec4 ucircleData_Stage1_c1_c0_c0_c0;
+uniform vec2 ubaseFrequency_Stage1_c1_c0_c1_c0_c0_c0;
+uniform float uz_Stage1_c1_c0_c1_c0_c0_c0;
+uniform vec3 uedges_Stage1_c1_c0_c1_c0_c1_c0[1];
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+uniform sampler2D uTextureSampler_2_Stage1;
+noperspective in vec2 vEllipseOffsets_Stage0;
+noperspective in vec4 vEllipseRadii_Stage0;
+noperspective in vec4 vinColor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 ConvexPoly_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float alpha = 1.0;
+ float edge;
+ edge = dot(uedges_Stage1_c0_c0_c0_c0[0], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage1_c0_c0_c0_c0[1], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage1_c0_c0_c0_c0[2], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ _output = _input * alpha;
+ return _output;
+}
+vec4 Big_Ole_Key_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = _input;
+ return _output;
+}
+vec4 blend_plus(vec4 src, vec4 dst) {
+ return min(src + dst, 1.0);
+}
+vec4 ComposeTwo_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_plus(ConvexPoly_Stage1_c0_c0_c0_c0(inputColor), Big_Ole_Key_Stage1_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 CircleBlurFragmentProcessor_Stage1_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 vec = vec2((gl_FragCoord.x - ucircleData_Stage1_c1_c0_c0_c0.x) * ucircleData_Stage1_c1_c0_c0_c0.w, (gl_FragCoord.y - ucircleData_Stage1_c1_c0_c0_c0.y) * ucircleData_Stage1_c1_c0_c0_c0.w);
+ float dist = length(vec) + (0.5 - ucircleData_Stage1_c1_c0_c0_c0.z) * ucircleData_Stage1_c1_c0_c0_c0.w;
+ _output = _input * texture(uTextureSampler_0_Stage1, vec2(dist, 0.5)).w;
+ return _output;
+}
+vec3 fade_Stage1_c1_c0_c1_c0_c0_c0(vec3 t) {
+ return ((t * t) * t) * (t * (t * 6.0 - 15.0) + 10.0);
+}
+float perm_Stage1_c1_c0_c1_c0_c0_c0(float x) {
+ return texture(uTextureSampler_1_Stage1, vec2(fract(x / 256.0), 0.0)).x * 255.0;
+}
+float grad_Stage1_c1_c0_c1_c0_c0_c0(float x, vec3 p) {
+ return dot(texture(uTextureSampler_2_Stage1, vec2(fract(x / 16.0), 0.0)).xyz * 255.0 - vec3(1.0), p);
+}
+float lerp_Stage1_c1_c0_c1_c0_c0_c0(float a, float b, float w) {
+ return a + w * (b - a);
+}
+float noise_Stage1_c1_c0_c1_c0_c0_c0(vec3 p) {
+ vec3 P = mod(floor(p), 256.0);
+ p -= floor(p);
+ vec3 f = fade_Stage1_c1_c0_c1_c0_c0_c0(p);
+ float A = perm_Stage1_c1_c0_c1_c0_c0_c0(P.x) + P.y;
+ float AA = perm_Stage1_c1_c0_c1_c0_c0_c0(A) + P.z;
+ float AB = perm_Stage1_c1_c0_c1_c0_c0_c0(A + 1.0) + P.z;
+ float B = perm_Stage1_c1_c0_c1_c0_c0_c0(P.x + 1.0) + P.y;
+ float BA = perm_Stage1_c1_c0_c1_c0_c0_c0(B) + P.z;
+ float BB = perm_Stage1_c1_c0_c1_c0_c0_c0(B + 1.0) + P.z;
+ float result = lerp_Stage1_c1_c0_c1_c0_c0_c0(lerp_Stage1_c1_c0_c1_c0_c0_c0(lerp_Stage1_c1_c0_c1_c0_c0_c0(grad_Stage1_c1_c0_c1_c0_c0_c0(perm_Stage1_c1_c0_c1_c0_c0_c0(AA), p), grad_Stage1_c1_c0_c1_c0_c0_c0(perm_Stage1_c1_c0_c1_c0_c0_c0(BA), p + vec3(-1.0, 0.0, 0.0)), f.x), lerp_Stage1_c1_c0_c1_c0_c0_c0(grad_Stage1_c1_c0_c1_c0_c0_c0(perm_Stage1_c1_c0_c1_c0_c0_c0(AB), p + vec3(0.0, -1.0, 0.0)), grad_Stage1_c1_c0_c1_c0_c0_c0(perm_Stage1_c1_c0_c1_c0_c0_c0(BB), p + vec3(-1.0, -1.0, 0.0)), f.x), f.y), lerp_Stage1_c1_c0_c1_c0_c0_c0(lerp_Stage1_c1_c0_c1_c0_c0_c0(grad_Stage1_c1_c0_c1_c0_c0_c0(perm_Stage1_c1_c0_c1_c0_c0_c0(AA + 1.0), p + vec3(0.0, 0.0, -1.0)), grad_Stage1_c1_c0_c1_c0_c0_c0(perm_Stage1_c1_c0_c1_c0_c0_c0(BA + 1.0), p + vec3(-1.0, 0.0, -1.0)), f.x), lerp_Stage1_c1_c0_c1_c0_c0_c0(grad_Stage1_c1_c0_c1_c0_c0_c0(perm_Stage1_c1_c0_c1_c0_c0_c0(AB + 1.0), p + vec3(0.0, -1.0, -1.0)), grad_Stage1_c1_c0_c1_c0_c0_c0(perm_Stage1_c1_c0_c1_c0_c0_c0(BB + 1.0), p + vec3(-1.0, -1.0, -1.0)), f.x), f.y), f.z);
+ return result;
+}
+float noiseOctaves_Stage1_c1_c0_c1_c0_c0_c0(vec3 p) {
+ float result = 0.0;
+ float ratio = 1.0;
+ for (float i = 0.0;i < 7.0; i++) {
+ result += noise_Stage1_c1_c0_c1_c0_c0_c0(p) / ratio;
+ p *= 2.0;
+ ratio *= 2.0;
+ }
+ return (result + 1.0) / 2.0;
+}
+vec4 ImprovedPerlinNoise_Stage1_c1_c0_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coords = vTransformedCoords_0_Stage0 * ubaseFrequency_Stage1_c1_c0_c1_c0_c0_c0;
+ float r = noiseOctaves_Stage1_c1_c0_c1_c0_c0_c0(vec3(coords, uz_Stage1_c1_c0_c1_c0_c0_c0));
+ float g = noiseOctaves_Stage1_c1_c0_c1_c0_c0_c0(vec3(coords, uz_Stage1_c1_c0_c1_c0_c0_c0));
+ float b = noiseOctaves_Stage1_c1_c0_c1_c0_c0_c0(vec3(coords, uz_Stage1_c1_c0_c1_c0_c0_c0));
+ float a = noiseOctaves_Stage1_c1_c0_c1_c0_c0_c0(vec3(coords, uz_Stage1_c1_c0_c1_c0_c0_c0));
+ _output = vec4(r, g, b, a);
+ _output = clamp(_output, 0.0, 1.0);
+ _output = vec4(_output.xyz * _output.www, _output.w);
+ return _output;
+}
+vec4 ConvexPoly_Stage1_c1_c0_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float alpha = 1.0;
+ float edge;
+ edge = dot(uedges_Stage1_c1_c0_c1_c0_c1_c0[0], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ alpha = 1.0 - alpha;
+ _output = _input * alpha;
+ return _output;
+}
+vec4 blend_dst_over(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src + dst;
+}
+vec4 ComposeTwo_Stage1_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_dst_over(ImprovedPerlinNoise_Stage1_c1_c0_c1_c0_c0_c0(inputColor), ConvexPoly_Stage1_c1_c0_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 blend_screen(vec4 src, vec4 dst) {
+ return src + (1.0 - src) * dst;
+}
+vec4 ComposeTwo_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_screen(CircleBlurFragmentProcessor_Stage1_c1_c0_c0_c0(inputColor), ComposeTwo_Stage1_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 blend_dst_atop(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src + src.w * dst;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vinColor_Stage0;
+ vec2 offset = vEllipseOffsets_Stage0;
+ float test = dot(offset, offset) - 1.0;
+ vec2 grad = (2.0 * offset) * vEllipseRadii_Stage0.xy;
+ float grad_dot = dot(grad, grad);
+ grad_dot = max(grad_dot, 1.1754999560161448e-38);
+ float invlen = inversesqrt(grad_dot);
+ float edgeAlpha = clamp(0.5 - test * invlen, 0.0, 1.0);
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_dst_atop(ComposeTwo_Stage1_c0_c0(inputColor), ComposeTwo_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ sk_FragColor = outputCoverage_Stage0 * output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec2 inEllipseOffset;
+in vec4 inEllipseRadii;
+noperspective out vec2 vEllipseOffsets_Stage0;
+noperspective out vec4 vEllipseRadii_Stage0;
+noperspective out vec4 vinColor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vEllipseOffsets_Stage0 = inEllipseOffset;
+ vEllipseRadii_Stage0 = inEllipseRadii;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/151.shader_test b/shaders/skia/151.shader_test
new file mode 100644
index 0000000..39bdb2a
--- /dev/null
+++ b/shaders/skia/151.shader_test
@@ -0,0 +1,64 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 ucolor_Stage1_c0_c0_c0_c0;
+noperspective in vec4 vcolor_Stage0;
+vec4 ConstColorProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = _input.w * ucolor_Stage1_c0_c0_c0_c0;
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = ConstColorProcessor_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_dst_in(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 position;
+in vec4 inColor;
+noperspective out vec4 vcolor_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1510.shader_test b/shaders/skia/1510.shader_test
new file mode 100644
index 0000000..707ca78
--- /dev/null
+++ b/shaders/skia/1510.shader_test
@@ -0,0 +1,92 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_KHR_blend_equation_advanced : require
+out vec4 sk_FragColor;
+layout (blend_support_all_equations) out ;
+uniform vec4 uColor_Stage0;
+uniform vec4 uCoordTransformMatrix_1_Stage0;
+uniform vec4 uellipse_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec3 vDashParam_Stage0;
+noperspective in vec2 vCircleParams_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 TextureEffect_Stage2_c0_c0(vec4 _input, vec2 _coords) {
+ _coords = _coords * uCoordTransformMatrix_1_Stage0.xz + uCoordTransformMatrix_1_Stage0.yw;
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage2, _coords) * _input;
+ return _output;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = uColor_Stage0;
+ float xShifted = vDashParam_Stage0.x - floor(vDashParam_Stage0.x / vDashParam_Stage0.z) * vDashParam_Stage0.z;
+ vec2 fragPosShifted = vec2(xShifted, vDashParam_Stage0.y);
+ vec2 center = vec2(vCircleParams_Stage0.y, 0.0);
+ float dist = length(center - fragPosShifted);
+ float alpha = 1.0;
+ alpha *= dist < vCircleParams_Stage0.x + 0.5 ? 1.0 : 0.0;
+ outputCoverage_Stage0 = vec4(alpha);
+ }
+ vec4 output_Stage1;
+ {
+ vec2 d = gl_FragCoord.xy - uellipse_Stage1.xy;
+ vec2 Z = d * uellipse_Stage1.zw;
+ float implicit = dot(Z, d) - 1.0;
+ float grad_dot = 4.0 * dot(Z, Z);
+ {
+ grad_dot = max(grad_dot, 1.1754999560161448e-38);
+ }
+ float approx_dist = implicit * inversesqrt(grad_dot);
+ float alpha;
+ {
+ alpha = approx_dist > 0.0 ? 1.0 : 0.0;
+ }
+ output_Stage1 = outputCoverage_Stage0 * alpha;
+ }
+ vec4 output_Stage2;
+ {
+ float coord = vTransformedCoords_0_Stage0.x - 0.5;
+ float f = fract(coord);
+ coord += 0.5 - f;
+ float f2 = f * f;
+ vec4 w = mat4(0.055555555555555552, 0.88888888888888884, 0.055555555555555552, 0.0, -0.5, 0.0, 0.5, 0.0, 0.83333333333333337, -2.0, 1.5, -0.33333333333333331, -0.3888888888888889, 1.1666666666666667, -1.1666666666666667, 0.3888888888888889) * vec4(1.0, f, f2, f2 * f);
+ vec4 c[4];
+ c[0] = TextureEffect_Stage2_c0_c0(vec4(1.0), vec2(coord + -1.0, vTransformedCoords_0_Stage0.y));
+ c[1] = TextureEffect_Stage2_c0_c0(vec4(1.0), vec2(coord, vTransformedCoords_0_Stage0.y));
+ c[2] = TextureEffect_Stage2_c0_c0(vec4(1.0), vec2(coord + 1.0, vTransformedCoords_0_Stage0.y));
+ c[3] = TextureEffect_Stage2_c0_c0(vec4(1.0), vec2(coord + 2.0, vTransformedCoords_0_Stage0.y));
+ vec4 bicubicColor = ((c[0] * w.x + c[1] * w.y) + c[2] * w.z) + c[3] * w.w;
+ bicubicColor.xyz = max(vec3(0.0), min(bicubicColor.xyz, bicubicColor.www));
+ output_Stage2 = bicubicColor * output_Stage1;
+ }
+ {
+ sk_FragColor = output_Stage2 * outputColor_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec3 inDashParams;
+in vec2 inCircleParams;
+noperspective out vec3 vDashParam_Stage0;
+noperspective out vec2 vCircleParams_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vDashParam_Stage0 = inDashParams;
+ vCircleParams_Stage0 = inCircleParams;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1516.shader_test b/shaders/skia/1516.shader_test
new file mode 100644
index 0000000..9050825
--- /dev/null
+++ b/shaders/skia/1516.shader_test
@@ -0,0 +1,294 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uColor_Stage0;
+uniform vec2 uImageIncrement_Stage1;
+uniform vec2 uBounds_Stage1;
+uniform vec4 uKernel_Stage1[4];
+uniform vec2 uImageIncrement_Stage2;
+uniform float uSurfaceScale_Stage2;
+uniform vec3 uLightColor_Stage2;
+uniform float uKD_Stage2;
+uniform vec4 uTexDom_Stage2;
+uniform vec3 uDecalParams_Stage2;
+uniform vec3 uLightLocation_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec3 vDashParam_Stage0;
+noperspective in vec2 vCircleParams_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 light_Stage2(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ float colorScale = uKD_Stage2 * dot(normal, surfaceToLight);
+ return vec4(lightColor * clamp(colorScale, 0.0, 1.0), 1.0);
+}
+float sobel_Stage2(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage2(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage2(float m[9], float surfaceScale) {
+ return pointToNormal_Stage2(sobel_Stage2(m[0], m[1], m[3], m[4], 0.0, 0.0, 0.66666698455810547), sobel_Stage2(m[0], m[3], m[1], m[4], 0.0, 0.0, 0.66666698455810547), surfaceScale);
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ float xShifted = vDashParam_Stage0.x - floor(vDashParam_Stage0.x / vDashParam_Stage0.z) * vDashParam_Stage0.z;
+ vec2 fragPosShifted = vec2(xShifted, vDashParam_Stage0.y);
+ vec2 center = vec2(vCircleParams_Stage0.y, 0.0);
+ float dist = length(center - fragPosShifted);
+ float diff = dist - vCircleParams_Stage0.x;
+ diff = 1.0 - diff;
+ float alpha = clamp(diff, 0.0, 1.0);
+ outputCoverage_Stage0 = vec4(alpha);
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0 - 6.0 * uImageIncrement_Stage1;
+ vec2 coordSampled = vec2(0.0, 0.0);
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage1.x && coord.y <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].x;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage1.x && coord.y <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].y;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage1.x && coord.y <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].z;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage1.x && coord.y <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].w;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage1.x && coord.y <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].x;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage1.x && coord.y <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].y;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage1.x && coord.y <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].z;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage1.x && coord.y <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].w;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage1.x && coord.y <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].x;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage1.x && coord.y <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].y;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage1.x && coord.y <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].z;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage1.x && coord.y <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].w;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage1.x && coord.y <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].x;
+ }
+ coord += uImageIncrement_Stage1;
+ output_Stage1 *= outputCoverage_Stage0;
+ }
+ vec4 output_Stage2;
+ {
+ vec2 coord = vTransformedCoords_1_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp0 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp5 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp6 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp7 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp8 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = normalize(uLightLocation_Stage2 - vec3(gl_FragCoord.xy, uSurfaceScale_Stage2 * m[4]));
+ output_Stage2 = light_Stage2(normal_Stage2(m, uSurfaceScale_Stage2), surfaceToLight, uLightColor_Stage2);
+ output_Stage2 *= output_Stage1;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 inPosition;
+in vec3 inDashParams;
+in vec2 inCircleParams;
+noperspective out vec3 vDashParam_Stage0;
+noperspective out vec2 vCircleParams_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vDashParam_Stage0 = inDashParams;
+ vCircleParams_Stage0 = inCircleParams;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1519.shader_test b/shaders/skia/1519.shader_test
new file mode 100644
index 0000000..6479dea
--- /dev/null
+++ b/shaders/skia/1519.shader_test
@@ -0,0 +1,40 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+noperspective in vec2 vEllipseOffsets0_Stage0;
+noperspective in vec2 vEllipseOffsets1_Stage0;
+noperspective in vec4 vinColor_Stage0;
+void main() {
+ {
+ vec2 duvdx = dFdx(vEllipseOffsets0_Stage0);
+ vec2 duvdy = dFdy(vEllipseOffsets0_Stage0);
+ vec2 grad = vec2(vEllipseOffsets0_Stage0.x * duvdx.x + vEllipseOffsets0_Stage0.y * duvdx.y, vEllipseOffsets0_Stage0.x * duvdy.x + vEllipseOffsets0_Stage0.y * duvdy.y);
+ float grad_dot = 4.0 * dot(grad, grad);
+ grad_dot = max(grad_dot, 1.1754999560161448e-38);
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec2 inEllipseOffsets0;
+in vec2 inEllipseOffsets1;
+noperspective out vec2 vEllipseOffsets0_Stage0;
+noperspective out vec2 vEllipseOffsets1_Stage0;
+noperspective out vec4 vinColor_Stage0;
+void main() {
+ vEllipseOffsets0_Stage0 = inEllipseOffsets0;
+ vEllipseOffsets1_Stage0 = inEllipseOffsets1;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = (uViewM_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1522.shader_test b/shaders/skia/1522.shader_test
new file mode 100644
index 0000000..a42c76d
--- /dev/null
+++ b/shaders/skia/1522.shader_test
@@ -0,0 +1,432 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_KHR_blend_equation_advanced : require
+out vec4 sk_FragColor;
+layout (blend_support_all_equations) out ;
+uniform vec4 ucolor_Stage1_c0_c0_c0_c0;
+uniform vec2 uImageIncrement_Stage1_c0_c0_c1_c0_c0_c0;
+uniform vec2 uBounds_Stage1_c0_c0_c1_c0_c0_c0;
+uniform vec4 uKernel_Stage1_c0_c0_c1_c0_c0_c0[3];
+uniform vec2 uImageIncrement_Stage1_c0_c0_c1_c0_c1_c0;
+uniform float uSurfaceScale_Stage1_c0_c0_c1_c0_c1_c0;
+uniform vec3 uLightColor_Stage1_c0_c0_c1_c0_c1_c0;
+uniform float uKS_Stage1_c0_c0_c1_c0_c1_c0;
+uniform float uShininess_Stage1_c0_c0_c1_c0_c1_c0;
+uniform vec4 uTexDom_Stage1_c0_c0_c1_c0_c1_c0;
+uniform vec3 uDecalParams_Stage1_c0_c0_c1_c0_c1_c0;
+uniform vec3 uLightDirection_Stage1_c0_c0_c1_c0_c1_c0;
+uniform vec4 ucolor_Stage1_c1_c0_c1_c0_c0_c0;
+uniform vec4 urectUniform_Stage1_c1_c0_c1_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+uniform sampler2D uTextureSampler_2_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vtextureCoords_Stage0;
+flat in vec4 vtextureDomain_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 ConstColorProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage1_c0_c0_c0_c0;
+ }
+ return _output;
+}
+vec4 GaussianConvolution_Stage1_c0_c0_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0 - 4.0 * uImageIncrement_Stage1_c0_c0_c1_c0_c0_c0;
+ vec2 coordSampled = vec2(0.0, 0.0);
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage1_c0_c0_c1_c0_c0_c0.x, uBounds_Stage1_c0_c0_c1_c0_c0_c0.y - uBounds_Stage1_c0_c0_c1_c0_c0_c0.x) + uBounds_Stage1_c0_c0_c1_c0_c0_c0.x;
+ _output += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c1_c0_c0_c0[0].x;
+ coord += uImageIncrement_Stage1_c0_c0_c1_c0_c0_c0;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage1_c0_c0_c1_c0_c0_c0.x, uBounds_Stage1_c0_c0_c1_c0_c0_c0.y - uBounds_Stage1_c0_c0_c1_c0_c0_c0.x) + uBounds_Stage1_c0_c0_c1_c0_c0_c0.x;
+ _output += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c1_c0_c0_c0[0].y;
+ coord += uImageIncrement_Stage1_c0_c0_c1_c0_c0_c0;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage1_c0_c0_c1_c0_c0_c0.x, uBounds_Stage1_c0_c0_c1_c0_c0_c0.y - uBounds_Stage1_c0_c0_c1_c0_c0_c0.x) + uBounds_Stage1_c0_c0_c1_c0_c0_c0.x;
+ _output += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c1_c0_c0_c0[0].z;
+ coord += uImageIncrement_Stage1_c0_c0_c1_c0_c0_c0;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage1_c0_c0_c1_c0_c0_c0.x, uBounds_Stage1_c0_c0_c1_c0_c0_c0.y - uBounds_Stage1_c0_c0_c1_c0_c0_c0.x) + uBounds_Stage1_c0_c0_c1_c0_c0_c0.x;
+ _output += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c1_c0_c0_c0[0].w;
+ coord += uImageIncrement_Stage1_c0_c0_c1_c0_c0_c0;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage1_c0_c0_c1_c0_c0_c0.x, uBounds_Stage1_c0_c0_c1_c0_c0_c0.y - uBounds_Stage1_c0_c0_c1_c0_c0_c0.x) + uBounds_Stage1_c0_c0_c1_c0_c0_c0.x;
+ _output += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c1_c0_c0_c0[1].x;
+ coord += uImageIncrement_Stage1_c0_c0_c1_c0_c0_c0;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage1_c0_c0_c1_c0_c0_c0.x, uBounds_Stage1_c0_c0_c1_c0_c0_c0.y - uBounds_Stage1_c0_c0_c1_c0_c0_c0.x) + uBounds_Stage1_c0_c0_c1_c0_c0_c0.x;
+ _output += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c1_c0_c0_c0[1].y;
+ coord += uImageIncrement_Stage1_c0_c0_c1_c0_c0_c0;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage1_c0_c0_c1_c0_c0_c0.x, uBounds_Stage1_c0_c0_c1_c0_c0_c0.y - uBounds_Stage1_c0_c0_c1_c0_c0_c0.x) + uBounds_Stage1_c0_c0_c1_c0_c0_c0.x;
+ _output += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c1_c0_c0_c0[1].z;
+ coord += uImageIncrement_Stage1_c0_c0_c1_c0_c0_c0;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage1_c0_c0_c1_c0_c0_c0.x, uBounds_Stage1_c0_c0_c1_c0_c0_c0.y - uBounds_Stage1_c0_c0_c1_c0_c0_c0.x) + uBounds_Stage1_c0_c0_c1_c0_c0_c0.x;
+ _output += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c1_c0_c0_c0[1].w;
+ coord += uImageIncrement_Stage1_c0_c0_c1_c0_c0_c0;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage1_c0_c0_c1_c0_c0_c0.x, uBounds_Stage1_c0_c0_c1_c0_c0_c0.y - uBounds_Stage1_c0_c0_c1_c0_c0_c0.x) + uBounds_Stage1_c0_c0_c1_c0_c0_c0.x;
+ _output += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c1_c0_c0_c0[2].x;
+ coord += uImageIncrement_Stage1_c0_c0_c1_c0_c0_c0;
+ _output *= _input;
+ return _output;
+}
+vec4 light_Stage1_c0_c0_c1_c0_c1_c0(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ vec3 halfDir = normalize(surfaceToLight + vec3(0.0, 0.0, 1.0));
+ float colorScale = uKS_Stage1_c0_c0_c1_c0_c1_c0 * pow(dot(normal, halfDir), uShininess_Stage1_c0_c0_c1_c0_c1_c0);
+ vec3 color = lightColor * clamp(colorScale, 0.0, 1.0);
+ return vec4(color, max(max(color.x, color.y), color.z));
+}
+float sobel_Stage1_c0_c0_c1_c0_c1_c0(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage1_c0_c0_c1_c0_c1_c0(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage1_c0_c0_c1_c0_c1_c0(float m[9], float surfaceScale) {
+ return pointToNormal_Stage1_c0_c0_c1_c0_c1_c0(sobel_Stage1_c0_c0_c1_c0_c1_c0(m[1], m[2], m[4], m[5], m[7], m[8], 0.5), sobel_Stage1_c0_c0_c1_c0_c1_c0(0.0, 0.0, m[1], m[7], m[2], m[8], 0.33333298563957214), surfaceScale);
+}
+vec4 SpecularLighting_Stage1_c0_c0_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coord = vTransformedCoords_1_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage1_c0_c0_c1_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c1_c0_c1_c0.xy, uTexDom_Stage1_c0_c0_c1_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c1_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c1_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c1_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c1_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp0 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1_c0_c0_c1_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c1_c0_c1_c0.xy, uTexDom_Stage1_c0_c0_c1_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c1_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c1_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c1_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c1_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1_c0_c0_c1_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c1_c0_c1_c0.xy, uTexDom_Stage1_c0_c0_c1_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c1_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c1_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c1_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c1_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage1_c0_c0_c1_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c1_c0_c1_c0.xy, uTexDom_Stage1_c0_c0_c1_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c1_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c1_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c1_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c1_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c1_c0_c1_c0.xy, uTexDom_Stage1_c0_c0_c1_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c1_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c1_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c1_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c1_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1_c0_c0_c1_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c1_c0_c1_c0.xy, uTexDom_Stage1_c0_c0_c1_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c1_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c1_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c1_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c1_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp5 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage1_c0_c0_c1_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c1_c0_c1_c0.xy, uTexDom_Stage1_c0_c0_c1_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c1_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c1_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c1_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c1_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp6 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage1_c0_c0_c1_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c1_c0_c1_c0.xy, uTexDom_Stage1_c0_c0_c1_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c1_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c1_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c1_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c1_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp7 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage1_c0_c0_c1_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c1_c0_c1_c0.xy, uTexDom_Stage1_c0_c0_c1_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c1_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c1_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c1_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c1_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp8 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = uLightDirection_Stage1_c0_c0_c1_c0_c1_c0;
+ _output = light_Stage1_c0_c0_c1_c0_c1_c0(normal_Stage1_c0_c0_c1_c0_c1_c0(m, uSurfaceScale_Stage1_c0_c0_c1_c0_c1_c0), surfaceToLight, uLightColor_Stage1_c0_c0_c1_c0_c1_c0);
+ _output *= _input;
+ return _output;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 blend_darken(vec4 src, vec4 dst) {
+ vec4 result = blend_src_over(src, dst);
+ result.xyz = min(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
+ return result;
+}
+vec4 ComposeTwo_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_darken(GaussianConvolution_Stage1_c0_c0_c1_c0_c0_c0(inputColor), SpecularLighting_Stage1_c0_c0_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+float _blend_color_saturation(vec3 color) {
+ return max(max(color.x, color.y), color.z) - min(min(color.x, color.y), color.z);
+}
+vec3 _blend_set_color_saturation_helper(vec3 minMidMax, float sat) {
+ if (minMidMax.x < minMidMax.z) {
+ return vec3(0.0, (sat * (minMidMax.y - minMidMax.x)) / (minMidMax.z - minMidMax.x), sat);
+ }
+ return vec3(0.0);
+}
+vec3 _blend_set_color_saturation(vec3 hueLumColor, vec3 satColor) {
+ float sat = _blend_color_saturation(satColor);
+ if (hueLumColor.x <= hueLumColor.y) {
+ if (hueLumColor.y <= hueLumColor.z) {
+ hueLumColor.xyz = _blend_set_color_saturation_helper(hueLumColor, sat);
+ } else if (hueLumColor.x <= hueLumColor.z) {
+ hueLumColor.xzy = _blend_set_color_saturation_helper(hueLumColor.xzy, sat);
+ } else {
+ hueLumColor.zxy = _blend_set_color_saturation_helper(hueLumColor.zxy, sat);
+ }
+ } else if (hueLumColor.x <= hueLumColor.z) {
+ hueLumColor.yxz = _blend_set_color_saturation_helper(hueLumColor.yxz, sat);
+ } else if (hueLumColor.y <= hueLumColor.z) {
+ hueLumColor.yzx = _blend_set_color_saturation_helper(hueLumColor.yzx, sat);
+ } else {
+ hueLumColor.zyx = _blend_set_color_saturation_helper(hueLumColor.zyx, sat);
+ }
+ return hueLumColor;
+}
+float _blend_color_luminance(vec3 color) {
+ return dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), color);
+}
+vec3 _blend_set_color_luminance(vec3 hueSatColor, float alpha, vec3 lumColor) {
+ float lum = _blend_color_luminance(lumColor);
+ vec3 result = (lum - _blend_color_luminance(hueSatColor)) + hueSatColor;
+ float minComp = min(min(result.x, result.y), result.z);
+ float maxComp = max(max(result.x, result.y), result.z);
+ if (minComp < 0.0 && lum != minComp) {
+ result = lum + ((result - lum) * lum) / (lum - minComp);
+ }
+ if (maxComp > alpha && maxComp != lum) {
+ return lum + ((result - lum) * (alpha - lum)) / (maxComp - lum);
+ }
+ return result;
+}
+vec4 blend_saturation(vec4 src, vec4 dst) {
+ float alpha = dst.w * src.w;
+ vec3 sda = src.xyz * dst.w;
+ vec3 dsa = dst.xyz * src.w;
+ return vec4((((_blend_set_color_luminance(_blend_set_color_saturation(dsa, sda), alpha, dsa) + dst.xyz) - dsa) + src.xyz) - sda, (src.w + dst.w) - alpha);
+}
+vec4 ComposeTwo_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_saturation(ConstColorProcessor_Stage1_c0_c0_c0_c0(inputColor), ComposeTwo_Stage1_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 ColorTableEffect_Stage1_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float nonZeroAlpha = max(_input.w, 9.9999997473787516e-05);
+ vec4 coord = vec4(_input.xyz / nonZeroAlpha, nonZeroAlpha);
+ coord = coord * 0.9960939884185791 + vec4(0.0019529999699443579, 0.0019529999699443579, 0.0019529999699443579, 0.0019529999699443579);
+ _output.w = texture(uTextureSampler_2_Stage1, vec2(coord.w, 0.125)).w;
+ _output.x = texture(uTextureSampler_2_Stage1, vec2(coord.x, 0.375)).w;
+ _output.y = texture(uTextureSampler_2_Stage1, vec2(coord.y, 0.625)).w;
+ _output.z = texture(uTextureSampler_2_Stage1, vec2(coord.z, 0.875)).w;
+ _output.xyz *= _output.w;
+ return _output;
+}
+vec4 ConstColorProcessor_Stage1_c1_c0_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = _input * ucolor_Stage1_c1_c0_c1_c0_c0_c0;
+ }
+ return _output;
+}
+vec4 AARectEffect_Stage1_c1_c0_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float alpha;
+ {
+ alpha = float(all(greaterThan(vec4(gl_FragCoord.xy, urectUniform_Stage1_c1_c0_c1_c0_c1_c0.zw), vec4(urectUniform_Stage1_c1_c0_c1_c0_c1_c0.xy, gl_FragCoord.xy))) ? 1 : 0);
+ }
+ _output = _input * alpha;
+ return _output;
+}
+vec4 blend_dst_over(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src + dst;
+}
+vec4 ComposeTwo_Stage1_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_dst_over(ConstColorProcessor_Stage1_c1_c0_c1_c0_c0_c0(inputColor), AARectEffect_Stage1_c1_c0_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+float _blend_overlay_component(float sc, float sa, float dc, float da) {
+ if (2.0 * dc <= da) {
+ return (2.0 * sc) * dc;
+ }
+ return sa * da - (2.0 * (da - dc)) * (sa - sc);
+}
+vec4 blend_overlay(vec4 src, vec4 dst) {
+ vec4 result = vec4(_blend_overlay_component(src.x, src.w, dst.x, dst.w), _blend_overlay_component(src.y, src.w, dst.y, dst.w), _blend_overlay_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+ result.xyz += dst.xyz * (1.0 - src.w) + src.xyz * (1.0 - dst.w);
+ return result;
+}
+vec4 ComposeTwo_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_overlay(ColorTableEffect_Stage1_c1_c0_c0_c0(inputColor), ComposeTwo_Stage1_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+float _guarded_divide(float n, float d) {
+ return n / d;
+}
+float _color_burn_component(float sc, float sa, float dc, float da) {
+ if (da == dc) {
+ return (sa * da + sc * (1.0 - da)) + dc * (1.0 - sa);
+ } else if (sc == 0.0) {
+ return dc * (1.0 - sa);
+ }
+ float d = max(0.0, da - _guarded_divide((da - dc) * sa, sc));
+ return (d * sa + sc * (1.0 - da)) + dc * (1.0 - sa);
+}
+vec4 blend_color_burn(vec4 src, vec4 dst) {
+ return vec4(_color_burn_component(src.x, src.w, dst.x, dst.w), _color_burn_component(src.y, src.w, dst.y, dst.w), _color_burn_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ vec2 textureCoords;
+ textureCoords = vtextureCoords_Stage0;
+ vec4 textureDomain;
+ textureDomain = vtextureDomain_Stage0;
+ outputColor_Stage0 = vcolor_Stage0;
+ outputColor_Stage0 = texture(uTextureSampler_0_Stage0, clamp(textureCoords, textureDomain.xy, textureDomain.zw)) * outputColor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_color_burn(ComposeTwo_Stage1_c0_c0(inputColor), ComposeTwo_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 textureCoords;
+in vec4 textureDomain;
+in vec4 color;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vtextureCoords_Stage0;
+flat out vec4 vtextureDomain_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vec2 pos2 = position;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(textureCoords, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(textureCoords, 1.0)).xy;
+ vtextureCoords_Stage0 = textureCoords;
+ vtextureDomain_Stage0 = textureDomain;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1525.shader_test b/shaders/skia/1525.shader_test
new file mode 100644
index 0000000..9c4c538
--- /dev/null
+++ b/shaders/skia/1525.shader_test
@@ -0,0 +1,38 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+noperspective in vec4 vinCircleEdge_Stage0;
+noperspective in vec4 vinColor_Stage0;
+void main() {
+ {
+ vec4 circleEdge;
+ circleEdge = vinCircleEdge_Stage0;
+ float d = length(circleEdge.xy);
+ float distanceToOuterEdge = circleEdge.z * (1.0 - d);
+ float edgeAlpha = clamp(distanceToOuterEdge, 0.0, 1.0);
+ float distanceToInnerEdge = circleEdge.z * (d - circleEdge.w);
+ float innerAlpha = clamp(distanceToInnerEdge, 0.0, 1.0);
+ edgeAlpha *= innerAlpha;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 inPosition;
+in vec4 inColor;
+in vec4 inCircleEdge;
+noperspective out vec4 vinCircleEdge_Stage0;
+noperspective out vec4 vinColor_Stage0;
+void main() {
+ vinCircleEdge_Stage0 = inCircleEdge;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = inPosition;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1528.shader_test b/shaders/skia/1528.shader_test
new file mode 100644
index 0000000..b744ef2
--- /dev/null
+++ b/shaders/skia/1528.shader_test
@@ -0,0 +1,355 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 ucircleData_Stage1_c0_c0_c0_c0_c0_c0;
+uniform vec4 uboundsUniform_Stage1_c0_c0_c0_c0_c1_c0;
+uniform float uxInvZoom_Stage1_c0_c0_c0_c0_c1_c0;
+uniform float uyInvZoom_Stage1_c0_c0_c0_c0_c1_c0;
+uniform float uxInvInset_Stage1_c0_c0_c0_c0_c1_c0;
+uniform float uyInvInset_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec2 uoffset_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 urectUniform_Stage1_c0_c0_c1_c0_c0_c0;
+uniform vec2 uImageIncrement_Stage1_c0_c0_c1_c0_c1_c0;
+uniform vec4 uKernel_Stage1_c0_c0_c1_c0_c1_c0[3];
+uniform vec2 uKernelOffset_Stage1_c0_c0_c1_c0_c1_c0;
+uniform float uGain_Stage1_c0_c0_c1_c0_c1_c0;
+uniform float uBias_Stage1_c0_c0_c1_c0_c1_c0;
+uniform vec4 uinnerRect_Stage1_c1_c0;
+uniform vec2 uinvRadiiXY_Stage1_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+uniform sampler2D uTextureSampler_2_Stage1;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 CircleBlurFragmentProcessor_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 vec = vec2((gl_FragCoord.x - ucircleData_Stage1_c0_c0_c0_c0_c0_c0.x) * ucircleData_Stage1_c0_c0_c0_c0_c0_c0.w, (gl_FragCoord.y - ucircleData_Stage1_c0_c0_c0_c0_c0_c0.y) * ucircleData_Stage1_c0_c0_c0_c0_c0_c0.w);
+ float dist = length(vec) + (0.5 - ucircleData_Stage1_c0_c0_c0_c0_c0_c0.z) * ucircleData_Stage1_c0_c0_c0_c0_c0_c0.w;
+ _output = _input * texture(uTextureSampler_0_Stage1, vec2(dist, 0.5)).w;
+ return _output;
+}
+vec4 MagnifierEffect_Stage1_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coord = vTransformedCoords_0_Stage0;
+ vec2 zoom_coord = uoffset_Stage1_c0_c0_c0_c0_c1_c0 + coord * vec2(uxInvZoom_Stage1_c0_c0_c0_c0_c1_c0, uyInvZoom_Stage1_c0_c0_c0_c0_c1_c0);
+ vec2 delta = (coord - uboundsUniform_Stage1_c0_c0_c0_c0_c1_c0.xy) * uboundsUniform_Stage1_c0_c0_c0_c0_c1_c0.zw;
+ delta = min(delta, vec2(1.0, 1.0) - delta);
+ delta *= vec2(uxInvInset_Stage1_c0_c0_c0_c0_c1_c0, uyInvInset_Stage1_c0_c0_c0_c0_c1_c0);
+ float weight = 0.0;
+ if (delta.x < 2.0 && delta.y < 2.0) {
+ delta = vec2(2.0, 2.0) - delta;
+ float dist = length(delta);
+ dist = max(2.0 - dist, 0.0);
+ weight = min(dist * dist, 1.0);
+ } else {
+ vec2 delta_squared = delta * delta;
+ weight = min(min(delta_squared.x, delta_squared.y), 1.0);
+ }
+ _output = texture(uTextureSampler_1_Stage1, mix(coord, zoom_coord, weight));
+ return _output;
+}
+vec4 blend_screen(vec4 src, vec4 dst) {
+ return src + (1.0 - src) * dst;
+}
+vec4 ComposeTwo_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_screen(CircleBlurFragmentProcessor_Stage1_c0_c0_c0_c0_c0_c0(inputColor), MagnifierEffect_Stage1_c0_c0_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 AARectEffect_Stage1_c0_c0_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float alpha;
+ {
+ float xSub, ySub;
+ xSub = min(gl_FragCoord.x - urectUniform_Stage1_c0_c0_c1_c0_c0_c0.x, 0.0);
+ xSub += min(urectUniform_Stage1_c0_c0_c1_c0_c0_c0.z - gl_FragCoord.x, 0.0);
+ ySub = min(gl_FragCoord.y - urectUniform_Stage1_c0_c0_c1_c0_c0_c0.y, 0.0);
+ ySub += min(urectUniform_Stage1_c0_c0_c1_c0_c0_c0.w - gl_FragCoord.y, 0.0);
+ alpha = (1.0 + max(xSub, -1.0)) * (1.0 + max(ySub, -1.0));
+ }
+ {
+ alpha = 1.0 - alpha;
+ }
+ _output = _input * alpha;
+ return _output;
+}
+vec4 MatrixConvolution_Stage1_c0_c0_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 sum = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_1_Stage0 - uKernelOffset_Stage1_c0_c0_c1_c0_c1_c0 * uImageIncrement_Stage1_c0_c0_c1_c0_c1_c0;
+ vec4 c;
+ {
+ float k = uKernel_Stage1_c0_c0_c1_c0_c1_c0[0].x;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c1_c0_c1_c0[0].y;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1_c0_c0_c1_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c1_c0_c1_c0[0].z;
+ {
+ vec2 origCoord = coord + vec2(0.0, 2.0) * uImageIncrement_Stage1_c0_c0_c1_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c1_c0_c1_c0[0].w;
+ {
+ vec2 origCoord = coord + vec2(0.0, 3.0) * uImageIncrement_Stage1_c0_c0_c1_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c1_c0_c1_c0[1].x;
+ {
+ vec2 origCoord = coord + vec2(0.0, 4.0) * uImageIncrement_Stage1_c0_c0_c1_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c1_c0_c1_c0[1].y;
+ {
+ vec2 origCoord = coord + vec2(0.0, 5.0) * uImageIncrement_Stage1_c0_c0_c1_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c1_c0_c1_c0[1].z;
+ {
+ vec2 origCoord = coord + vec2(0.0, 6.0) * uImageIncrement_Stage1_c0_c0_c1_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c1_c0_c1_c0[1].w;
+ {
+ vec2 origCoord = coord + vec2(0.0, 7.0) * uImageIncrement_Stage1_c0_c0_c1_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c1_c0_c1_c0[2].x;
+ {
+ vec2 origCoord = coord + vec2(0.0, 8.0) * uImageIncrement_Stage1_c0_c0_c1_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c1_c0_c1_c0[2].y;
+ {
+ vec2 origCoord = coord + vec2(0.0, 9.0) * uImageIncrement_Stage1_c0_c0_c1_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c1_c0_c1_c0[2].z;
+ {
+ vec2 origCoord = coord + vec2(0.0, 10.0) * uImageIncrement_Stage1_c0_c0_c1_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ _output = sum * uGain_Stage1_c0_c0_c1_c0_c1_c0 + uBias_Stage1_c0_c0_c1_c0_c1_c0;
+ _output.w = clamp(_output.w, 0.0, 1.0);
+ _output.xyz = clamp(_output.xyz, 0.0, _output.w);
+ _output *= _input;
+ return _output;
+}
+float _blend_overlay_component(float sc, float sa, float dc, float da) {
+ if (2.0 * dc <= da) {
+ return (2.0 * sc) * dc;
+ }
+ return sa * da - (2.0 * (da - dc)) * (sa - sc);
+}
+vec4 blend_overlay(vec4 src, vec4 dst) {
+ vec4 result = vec4(_blend_overlay_component(src.x, src.w, dst.x, dst.w), _blend_overlay_component(src.y, src.w, dst.y, dst.w), _blend_overlay_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+ result.xyz += dst.xyz * (1.0 - src.w) + src.xyz * (1.0 - dst.w);
+ return result;
+}
+vec4 blend_hard_light(vec4 src, vec4 dst) {
+ return blend_overlay(dst, src);
+}
+vec4 ComposeTwo_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_hard_light(AARectEffect_Stage1_c0_c0_c1_c0_c0_c0(inputColor), MatrixConvolution_Stage1_c0_c0_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 blend_lighten(vec4 src, vec4 dst) {
+ vec4 result = blend_src_over(src, dst);
+ result.xyz = max(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
+ return result;
+}
+vec4 ComposeTwo_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_lighten(ComposeTwo_Stage1_c0_c0_c0_c0(inputColor), ComposeTwo_Stage1_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 EllipticalRRect_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 dxy0 = uinnerRect_Stage1_c1_c0.xy - gl_FragCoord.xy;
+ vec2 dxy1 = gl_FragCoord.xy - uinnerRect_Stage1_c1_c0.zw;
+ vec2 dxy = max(max(dxy0, dxy1), 0.0);
+ vec2 Z = dxy * uinvRadiiXY_Stage1_c1_c0;
+ float implicit = dot(Z, dxy) - 1.0;
+ float grad_dot = 4.0 * dot(Z, Z);
+ grad_dot = max(grad_dot, 9.9999997473787516e-05);
+ float approx_dist = implicit * inversesqrt(grad_dot);
+ float alpha = clamp(0.5 - approx_dist, 0.0, 1.0);
+ _output = _input * alpha;
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_src_in(ComposeTwo_Stage1_c0_c0(inputColor), EllipticalRRect_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform float uSrcTF_Stage0[7];
+uniform mat3 uColorXform_Stage0;
+uniform float uDstTF_Stage0[7];
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 inColor;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+float src_tf_Stage0(float x) {
+ float G = uSrcTF_Stage0[0];
+ float A = uSrcTF_Stage0[1];
+ float B = uSrcTF_Stage0[2];
+ float C = uSrcTF_Stage0[3];
+ float D = uSrcTF_Stage0[4];
+ float E = uSrcTF_Stage0[5];
+ float F = uSrcTF_Stage0[6];
+ float s = sign(x);
+ x = abs(x);
+ x = x < D ? C * x + F : pow(A * x + B, G) + E;
+ return s * x;
+}
+float dst_tf_Stage0(float x) {
+ float G = uDstTF_Stage0[0];
+ float A = uDstTF_Stage0[1];
+ float B = uDstTF_Stage0[2];
+ float C = uDstTF_Stage0[3];
+ float D = uDstTF_Stage0[4];
+ float E = uDstTF_Stage0[5];
+ float F = uDstTF_Stage0[6];
+ float s = sign(x);
+ x = abs(x);
+ x = x < D ? C * x + F : pow(A * x + B, G) + E;
+ return s * x;
+}
+vec4 gamut_xform_Stage0(vec4 color) {
+ color.xyz = uColorXform_Stage0 * color.xyz;
+ return color;
+}
+vec4 color_xform_Stage0(vec4 color) {
+ float nonZeroAlpha = max(color.w, 9.9999997473787516e-05);
+ color = vec4(color.xyz / nonZeroAlpha, nonZeroAlpha);
+ color.x = src_tf_Stage0(color.x);
+ color.y = src_tf_Stage0(color.y);
+ color.z = src_tf_Stage0(color.z);
+ color = gamut_xform_Stage0(color);
+ color.x = dst_tf_Stage0(color.x);
+ color.y = dst_tf_Stage0(color.y);
+ color.z = dst_tf_Stage0(color.z);
+ color.xyz *= color.w;
+ return color;
+}
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = color_xform_Stage0(color);
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(position, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(position, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_PointSize = 1.0;
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1531.shader_test b/shaders/skia/1531.shader_test
new file mode 100644
index 0000000..e199a37
--- /dev/null
+++ b/shaders/skia/1531.shader_test
@@ -0,0 +1,196 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uellipse_Stage1_c1_c0_c0_c0_c0_c0;
+uniform vec4 urectUniform_Stage1_c1_c0_c0_c0_c1_c0;
+uniform vec4 uinnerRect_Stage1_c1_c0_c1_c0_c0_c0;
+uniform vec2 uradiusPlusHalf_Stage1_c1_c0_c1_c0_c0_c0;
+uniform vec2 uScale_Stage1_c1_c0_c1_c0_c1_c0;
+uniform vec4 uTexDom_Stage1_c1_c0_c1_c0_c1_c0;
+uniform vec3 uDecalParams_Stage1_c1_c0_c1_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+uniform sampler2D uTextureSampler_2_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vtextureCoords_Stage0;
+flat in vec4 vtextureDomain_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 ColorTableEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ float nonZeroAlpha = max(_input.w, 9.9999997473787516e-05);
+ vec4 coord = vec4(_input.xyz / nonZeroAlpha, nonZeroAlpha);
+ coord = coord * 0.9960939884185791 + vec4(0.0019529999699443579, 0.0019529999699443579, 0.0019529999699443579, 0.0019529999699443579);
+ _output.w = texture(uTextureSampler_0_Stage1, vec2(coord.w, 0.125)).w;
+ _output.x = texture(uTextureSampler_0_Stage1, vec2(coord.x, 0.375)).w;
+ _output.y = texture(uTextureSampler_0_Stage1, vec2(coord.y, 0.625)).w;
+ _output.z = texture(uTextureSampler_0_Stage1, vec2(coord.z, 0.875)).w;
+ _output.xyz *= _output.w;
+ return _output;
+}
+vec4 EllipseEffect_Stage1_c1_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 d = gl_FragCoord.xy - uellipse_Stage1_c1_c0_c0_c0_c0_c0.xy;
+ vec2 Z = d * uellipse_Stage1_c1_c0_c0_c0_c0_c0.zw;
+ float implicit = dot(Z, d) - 1.0;
+ float grad_dot = 4.0 * dot(Z, Z);
+ {
+ grad_dot = max(grad_dot, 1.1754999560161448e-38);
+ }
+ float approx_dist = implicit * inversesqrt(grad_dot);
+ float alpha;
+ {
+ alpha = approx_dist > 0.0 ? 0.0 : 1.0;
+ }
+ _output = _input * alpha;
+ return _output;
+}
+vec4 AARectEffect_Stage1_c1_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float alpha;
+ {
+ float xSub, ySub;
+ xSub = min(gl_FragCoord.x - urectUniform_Stage1_c1_c0_c0_c0_c1_c0.x, 0.0);
+ xSub += min(urectUniform_Stage1_c1_c0_c0_c0_c1_c0.z - gl_FragCoord.x, 0.0);
+ ySub = min(gl_FragCoord.y - urectUniform_Stage1_c1_c0_c0_c0_c1_c0.y, 0.0);
+ ySub += min(urectUniform_Stage1_c1_c0_c0_c0_c1_c0.w - gl_FragCoord.y, 0.0);
+ alpha = (1.0 + max(xSub, -1.0)) * (1.0 + max(ySub, -1.0));
+ }
+ {
+ alpha = 1.0 - alpha;
+ }
+ _output = _input * alpha;
+ return _output;
+}
+vec4 blend_exclusion(vec4 src, vec4 dst) {
+ return vec4((dst.xyz + src.xyz) - (2.0 * dst.xyz) * src.xyz, src.w + (1.0 - src.w) * dst.w);
+}
+vec4 ComposeTwo_Stage1_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_exclusion(EllipseEffect_Stage1_c1_c0_c0_c0_c0_c0(inputColor), AARectEffect_Stage1_c1_c0_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 CircularRRect_Stage1_c1_c0_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 dxy0 = uinnerRect_Stage1_c1_c0_c1_c0_c0_c0.xy - gl_FragCoord.xy;
+ vec2 dxy1 = gl_FragCoord.xy - uinnerRect_Stage1_c1_c0_c1_c0_c0_c0.zw;
+ vec2 dxy = max(max(dxy0, dxy1), 0.0);
+ float alpha = clamp(uradiusPlusHalf_Stage1_c1_c0_c1_c0_c0_c0.x - length(dxy), 0.0, 1.0);
+ _output = _input * alpha;
+ return _output;
+}
+vec4 DisplacementMap_Stage1_c1_c0_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 dColor = texture(uTextureSampler_1_Stage1, vTransformedCoords_0_Stage0);
+ dColor.xyz = dColor.w < 9.9999999747524271e-07 ? vec3(0.0) : clamp(dColor.xyz / dColor.w, 0.0, 1.0);
+ vec2 cCoords = vTransformedCoords_1_Stage0 + uScale_Stage1_c1_c0_c1_c0_c1_c0 * (dColor.zw - vec2(0.5));
+ {
+ vec2 origCoord = cCoords;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c1_c0_c1_c0.xy, uTexDom_Stage1_c1_c0_c1_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c1_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c1_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c1_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c1_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ _output = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ return _output;
+}
+float _guarded_divide(float n, float d) {
+ return n / d;
+}
+float _soft_light_component(float sc, float sa, float dc, float da) {
+ if (2.0 * sc <= sa) {
+ return (_guarded_divide((dc * dc) * (sa - 2.0 * sc), da) + (1.0 - da) * sc) + dc * ((-sa + 2.0 * sc) + 1.0);
+ } else if (4.0 * dc <= da) {
+ float DSqd = dc * dc;
+ float DCub = DSqd * dc;
+ float DaSqd = da * da;
+ float DaCub = DaSqd * da;
+ return _guarded_divide(((DaSqd * (sc - dc * ((3.0 * sa - 6.0 * sc) - 1.0)) + ((12.0 * da) * DSqd) * (sa - 2.0 * sc)) - (16.0 * DCub) * (sa - 2.0 * sc)) - DaCub * sc, DaSqd);
+ }
+ return ((dc * ((sa - 2.0 * sc) + 1.0) + sc) - sqrt(da * dc) * (sa - 2.0 * sc)) - da * sc;
+}
+vec4 blend_soft_light(vec4 src, vec4 dst) {
+ if (dst.w == 0.0) {
+ return src;
+ }
+ return vec4(_soft_light_component(src.x, src.w, dst.x, dst.w), _soft_light_component(src.y, src.w, dst.y, dst.w), _soft_light_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+}
+vec4 ComposeTwo_Stage1_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_soft_light(CircularRRect_Stage1_c1_c0_c1_c0_c0_c0(inputColor), DisplacementMap_Stage1_c1_c0_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 blend_modulate(vec4 src, vec4 dst) {
+ return src * dst;
+}
+vec4 ComposeTwo_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_modulate(ComposeTwo_Stage1_c1_c0_c0_c0(inputColor), ComposeTwo_Stage1_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 blend_dst_atop(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src + src.w * dst;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ vec2 textureCoords;
+ textureCoords = vtextureCoords_Stage0;
+ vec4 textureDomain;
+ textureDomain = vtextureDomain_Stage0;
+ outputColor_Stage0 = vcolor_Stage0;
+ outputColor_Stage0 = texture(uTextureSampler_0_Stage0, clamp(textureCoords, textureDomain.xy, textureDomain.zw)) * outputColor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_dst_atop(ColorTableEffect_Stage1_c0_c0(inputColor), ComposeTwo_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 textureCoords;
+in vec4 textureDomain;
+in vec4 color;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vtextureCoords_Stage0;
+flat out vec4 vtextureDomain_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vec2 pos2 = position;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(textureCoords, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(textureCoords, 1.0)).xy;
+ vtextureCoords_Stage0 = textureCoords;
+ vtextureDomain_Stage0 = textureDomain;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1537.shader_test b/shaders/skia/1537.shader_test
new file mode 100644
index 0000000..072c491
--- /dev/null
+++ b/shaders/skia/1537.shader_test
@@ -0,0 +1,696 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec3 uedges_Stage1_c0_c0_c0_c0_c0_c0[7];
+uniform float ucornerRadius_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 uproxyRect_Stage1_c0_c0_c0_c0_c1_c0;
+uniform float ublurRadius_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec2 uScale_Stage1_c0_c0_c1_c0_c0_c0;
+uniform vec4 uTexDom_Stage1_c0_c0_c1_c0_c0_c0;
+uniform vec3 uDecalParams_Stage1_c0_c0_c1_c0_c0_c0;
+uniform vec4 urectH_Stage1_c0_c0_c1_c0_c1_c0;
+uniform float uinvSixSigma_Stage1_c0_c0_c1_c0_c1_c0;
+uniform vec2 uImageIncrement_Stage1_c1_c0_c0_c0;
+uniform vec4 uKernel_Stage1_c1_c0_c0_c0[6];
+uniform vec2 uKernelOffset_Stage1_c1_c0_c0_c0;
+uniform float uGain_Stage1_c1_c0_c0_c0;
+uniform float uBias_Stage1_c1_c0_c0_c0;
+uniform vec4 uTexDom_Stage1_c1_c0_c0_c0;
+uniform vec3 uDecalParams_Stage1_c1_c0_c0_c0;
+uniform vec4 uboundsUniform_Stage1_c1_c0_c1_c0;
+uniform float uxInvZoom_Stage1_c1_c0_c1_c0;
+uniform float uyInvZoom_Stage1_c1_c0_c1_c0;
+uniform float uxInvInset_Stage1_c1_c0_c1_c0;
+uniform float uyInvInset_Stage1_c1_c0_c1_c0;
+uniform vec2 uoffset_Stage1_c1_c0_c1_c0;
+uniform vec2 uDstTextureUpperLeft_Stage2;
+uniform vec2 uDstTextureCoordScale_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+uniform sampler2D uTextureSampler_2_Stage1;
+uniform sampler2D uTextureSampler_3_Stage1;
+uniform sampler2D uTextureSampler_4_Stage1;
+uniform sampler2D uTextureSampler_5_Stage1;
+uniform sampler2D uDstTextureSampler_Stage2;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+noperspective in vec2 vTransformedCoords_3_Stage0;
+noperspective in float vinCoverage_Stage0;
+vec4 ConvexPoly_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float alpha = 1.0;
+ float edge;
+ edge = dot(uedges_Stage1_c0_c0_c0_c0_c0_c0[0], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage1_c0_c0_c0_c0_c0_c0[1], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage1_c0_c0_c0_c0_c0_c0[2], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage1_c0_c0_c0_c0_c0_c0[3], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage1_c0_c0_c0_c0_c0_c0[4], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage1_c0_c0_c0_c0_c0_c0[5], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage1_c0_c0_c0_c0_c0_c0[6], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ _output = _input * alpha;
+ return _output;
+}
+vec4 RRectBlurEffect_Stage1_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 translatedFragPos = gl_FragCoord.xy - uproxyRect_Stage1_c0_c0_c0_c0_c1_c0.xy;
+ float threshold = ucornerRadius_Stage1_c0_c0_c0_c0_c1_c0 + 2.0 * ublurRadius_Stage1_c0_c0_c0_c0_c1_c0;
+ vec2 middle = (uproxyRect_Stage1_c0_c0_c0_c0_c1_c0.zw - uproxyRect_Stage1_c0_c0_c0_c0_c1_c0.xy) - 2.0 * threshold;
+ if (translatedFragPos.x >= threshold && translatedFragPos.x < middle.x + threshold) {
+ translatedFragPos.x = threshold;
+ } else if (translatedFragPos.x >= middle.x + threshold) {
+ translatedFragPos.x -= middle.x - 1.0;
+ }
+ if (translatedFragPos.y > threshold && translatedFragPos.y < middle.y + threshold) {
+ translatedFragPos.y = threshold;
+ } else if (translatedFragPos.y >= middle.y + threshold) {
+ translatedFragPos.y -= middle.y - 1.0;
+ }
+ vec2 proxyDims = vec2(2.0 * threshold + 1.0);
+ vec2 texCoord = translatedFragPos / proxyDims;
+ _output = _input * texture(uTextureSampler_0_Stage1, texCoord);
+ return _output;
+}
+float _blend_overlay_component(float sc, float sa, float dc, float da) {
+ if (2.0 * dc <= da) {
+ return (2.0 * sc) * dc;
+ }
+ return sa * da - (2.0 * (da - dc)) * (sa - sc);
+}
+vec4 blend_overlay(vec4 src, vec4 dst) {
+ vec4 result = vec4(_blend_overlay_component(src.x, src.w, dst.x, dst.w), _blend_overlay_component(src.y, src.w, dst.y, dst.w), _blend_overlay_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+ result.xyz += dst.xyz * (1.0 - src.w) + src.xyz * (1.0 - dst.w);
+ return result;
+}
+vec4 blend_hard_light(vec4 src, vec4 dst) {
+ return blend_overlay(dst, src);
+}
+vec4 ComposeTwo_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_hard_light(ConvexPoly_Stage1_c0_c0_c0_c0_c0_c0(inputColor), RRectBlurEffect_Stage1_c0_c0_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 DisplacementMap_Stage1_c0_c0_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 dColor = texture(uTextureSampler_1_Stage1, vTransformedCoords_0_Stage0);
+ dColor.xyz = dColor.w < 9.9999999747524271e-07 ? vec3(0.0) : clamp(dColor.xyz / dColor.w, 0.0, 1.0);
+ vec2 cCoords = vTransformedCoords_1_Stage0 + uScale_Stage1_c0_c0_c1_c0_c0_c0 * (dColor.zw - vec2(0.5));
+ {
+ vec2 origCoord = cCoords;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c1_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c1_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c1_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c1_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c1_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c1_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ _output = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ return _output;
+}
+vec4 RectBlurEffect_Stage1_c0_c0_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float xCoverage, yCoverage;
+ {
+ float x, y;
+ {
+ x = max(urectH_Stage1_c0_c0_c1_c0_c1_c0.x - gl_FragCoord.x, gl_FragCoord.x - urectH_Stage1_c0_c0_c1_c0_c1_c0.z);
+ y = max(urectH_Stage1_c0_c0_c1_c0_c1_c0.y - gl_FragCoord.y, gl_FragCoord.y - urectH_Stage1_c0_c0_c1_c0_c1_c0.w);
+ }
+ xCoverage = texture(uTextureSampler_3_Stage1, vec2(x * uinvSixSigma_Stage1_c0_c0_c1_c0_c1_c0, 0.5)).w;
+ yCoverage = texture(uTextureSampler_3_Stage1, vec2(y * uinvSixSigma_Stage1_c0_c0_c1_c0_c1_c0, 0.5)).w;
+ _output = (_input * xCoverage) * yCoverage;
+ }
+ _output = (_input * xCoverage) * yCoverage;
+ return _output;
+}
+vec4 blend_xor(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src + (1.0 - src.w) * dst;
+}
+vec4 ComposeTwo_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_xor(DisplacementMap_Stage1_c0_c0_c1_c0_c0_c0(inputColor), RectBlurEffect_Stage1_c0_c0_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 blend_src_out(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src;
+}
+vec4 ComposeTwo_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_src_out(ComposeTwo_Stage1_c0_c0_c0_c0(inputColor), ComposeTwo_Stage1_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 MatrixConvolution_Stage1_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 sum = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_2_Stage0 - uKernelOffset_Stage1_c1_c0_c0_c0 * uImageIncrement_Stage1_c1_c0_c0_c0;
+ vec4 c;
+ {
+ float k = uKernel_Stage1_c1_c0_c0_c0[0].x;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0.xy, uTexDom_Stage1_c1_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_4_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0_c0_c0[0].y;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1_c1_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0.xy, uTexDom_Stage1_c1_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_4_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0_c0_c0[0].z;
+ {
+ vec2 origCoord = coord + vec2(2.0, 0.0) * uImageIncrement_Stage1_c1_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0.xy, uTexDom_Stage1_c1_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_4_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0_c0_c0[0].w;
+ {
+ vec2 origCoord = coord + vec2(3.0, 0.0) * uImageIncrement_Stage1_c1_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0.xy, uTexDom_Stage1_c1_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_4_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0_c0_c0[1].x;
+ {
+ vec2 origCoord = coord + vec2(4.0, 0.0) * uImageIncrement_Stage1_c1_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0.xy, uTexDom_Stage1_c1_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_4_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0_c0_c0[1].y;
+ {
+ vec2 origCoord = coord + vec2(5.0, 0.0) * uImageIncrement_Stage1_c1_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0.xy, uTexDom_Stage1_c1_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_4_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0_c0_c0[1].z;
+ {
+ vec2 origCoord = coord + vec2(6.0, 0.0) * uImageIncrement_Stage1_c1_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0.xy, uTexDom_Stage1_c1_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_4_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0_c0_c0[1].w;
+ {
+ vec2 origCoord = coord + vec2(7.0, 0.0) * uImageIncrement_Stage1_c1_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0.xy, uTexDom_Stage1_c1_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_4_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0_c0_c0[2].x;
+ {
+ vec2 origCoord = coord + vec2(8.0, 0.0) * uImageIncrement_Stage1_c1_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0.xy, uTexDom_Stage1_c1_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_4_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0_c0_c0[2].y;
+ {
+ vec2 origCoord = coord + vec2(9.0, 0.0) * uImageIncrement_Stage1_c1_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0.xy, uTexDom_Stage1_c1_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_4_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0_c0_c0[2].z;
+ {
+ vec2 origCoord = coord + vec2(10.0, 0.0) * uImageIncrement_Stage1_c1_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0.xy, uTexDom_Stage1_c1_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_4_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0_c0_c0[2].w;
+ {
+ vec2 origCoord = coord + vec2(11.0, 0.0) * uImageIncrement_Stage1_c1_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0.xy, uTexDom_Stage1_c1_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_4_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0_c0_c0[3].x;
+ {
+ vec2 origCoord = coord + vec2(12.0, 0.0) * uImageIncrement_Stage1_c1_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0.xy, uTexDom_Stage1_c1_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_4_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0_c0_c0[3].y;
+ {
+ vec2 origCoord = coord + vec2(13.0, 0.0) * uImageIncrement_Stage1_c1_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0.xy, uTexDom_Stage1_c1_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_4_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0_c0_c0[3].z;
+ {
+ vec2 origCoord = coord + vec2(14.0, 0.0) * uImageIncrement_Stage1_c1_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0.xy, uTexDom_Stage1_c1_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_4_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0_c0_c0[3].w;
+ {
+ vec2 origCoord = coord + vec2(15.0, 0.0) * uImageIncrement_Stage1_c1_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0.xy, uTexDom_Stage1_c1_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_4_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0_c0_c0[4].x;
+ {
+ vec2 origCoord = coord + vec2(16.0, 0.0) * uImageIncrement_Stage1_c1_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0.xy, uTexDom_Stage1_c1_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_4_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0_c0_c0[4].y;
+ {
+ vec2 origCoord = coord + vec2(17.0, 0.0) * uImageIncrement_Stage1_c1_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0.xy, uTexDom_Stage1_c1_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_4_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0_c0_c0[4].z;
+ {
+ vec2 origCoord = coord + vec2(18.0, 0.0) * uImageIncrement_Stage1_c1_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0.xy, uTexDom_Stage1_c1_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_4_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0_c0_c0[4].w;
+ {
+ vec2 origCoord = coord + vec2(19.0, 0.0) * uImageIncrement_Stage1_c1_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0.xy, uTexDom_Stage1_c1_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_4_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0_c0_c0[5].x;
+ {
+ vec2 origCoord = coord + vec2(20.0, 0.0) * uImageIncrement_Stage1_c1_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0.xy, uTexDom_Stage1_c1_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_4_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ vec2 origCoord = vTransformedCoords_2_Stage0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0.xy, uTexDom_Stage1_c1_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_4_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ _output.w = c.w;
+ _output.xyz = clamp(sum.xyz * uGain_Stage1_c1_c0_c0_c0 + uBias_Stage1_c1_c0_c0_c0, 0.0, 1.0);
+ _output.xyz *= _output.w;
+ _output *= _input;
+ return _output;
+}
+vec4 MagnifierEffect_Stage1_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coord = vTransformedCoords_3_Stage0;
+ vec2 zoom_coord = uoffset_Stage1_c1_c0_c1_c0 + coord * vec2(uxInvZoom_Stage1_c1_c0_c1_c0, uyInvZoom_Stage1_c1_c0_c1_c0);
+ vec2 delta = (coord - uboundsUniform_Stage1_c1_c0_c1_c0.xy) * uboundsUniform_Stage1_c1_c0_c1_c0.zw;
+ delta = min(delta, vec2(1.0, 1.0) - delta);
+ delta *= vec2(uxInvInset_Stage1_c1_c0_c1_c0, uyInvInset_Stage1_c1_c0_c1_c0);
+ float weight = 0.0;
+ if (delta.x < 2.0 && delta.y < 2.0) {
+ delta = vec2(2.0, 2.0) - delta;
+ float dist = length(delta);
+ dist = max(2.0 - dist, 0.0);
+ weight = min(dist * dist, 1.0);
+ } else {
+ vec2 delta_squared = delta * delta;
+ weight = min(min(delta_squared.x, delta_squared.y), 1.0);
+ }
+ _output = texture(uTextureSampler_5_Stage1, mix(coord, zoom_coord, weight));
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 ComposeTwo_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_src_in(MatrixConvolution_Stage1_c1_c0_c0_c0(inputColor), MagnifierEffect_Stage1_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+float _guarded_divide(float n, float d) {
+ return n / d;
+}
+float _color_burn_component(float sc, float sa, float dc, float da) {
+ if (da == dc) {
+ return (sa * da + sc * (1.0 - da)) + dc * (1.0 - sa);
+ } else if (sc == 0.0) {
+ return dc * (1.0 - sa);
+ }
+ float d = max(0.0, da - _guarded_divide((da - dc) * sa, sc));
+ return (d * sa + sc * (1.0 - da)) + dc * (1.0 - sa);
+}
+vec4 blend_color_burn(vec4 src, vec4 dst) {
+ return vec4(_color_burn_component(src.x, src.w, dst.x, dst.w), _color_burn_component(src.y, src.w, dst.y, dst.w), _color_burn_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ float alpha = 1.0;
+ alpha = vinCoverage_Stage0;
+ outputCoverage_Stage0 = vec4(alpha);
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_color_burn(ComposeTwo_Stage1_c0_c0(inputColor), ComposeTwo_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ if (all(lessThanEqual(outputCoverage_Stage0.xyz, vec3(0.0)))) {
+ discard;
+ }
+ vec2 _dstTexCoord = (gl_FragCoord.xy - uDstTextureUpperLeft_Stage2) * uDstTextureCoordScale_Stage2;
+ _dstTexCoord.y = 1.0 - _dstTexCoord.y;
+ vec4 _dstColor = texture(uDstTextureSampler_Stage2, _dstTexCoord);
+ sk_FragColor = blend_src_in(output_Stage1, _dstColor);
+ sk_FragColor = outputCoverage_Stage0 * sk_FragColor + (vec4(1.0) - outputCoverage_Stage0) * _dstColor;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+uniform mat3 uCoordTransformMatrix_3_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in float inCoverage;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+noperspective out vec2 vTransformedCoords_3_Stage0;
+noperspective out float vinCoverage_Stage0;
+void main() {
+ vec4 color = inColor;
+ vcolor_Stage0 = color;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_3_Stage0 = (uCoordTransformMatrix_3_Stage0 * vec3(inPosition, 1.0)).xy;
+ vinCoverage_Stage0 = inCoverage;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/154-2.shader_test b/shaders/skia/154-2.shader_test
new file mode 100644
index 0000000..277140f
--- /dev/null
+++ b/shaders/skia/154-2.shader_test
@@ -0,0 +1,79 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage2_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c1_c0;
+ }
+ return _output;
+}
+vec4 blend_src_atop(vec4 src, vec4 dst) {
+ return dst.w * src + (1.0 - src.w) * dst;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_src_atop(ConstColorProcessor_Stage2_c1_c0(vec4(1.0)), output_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/154-3.shader_test b/shaders/skia/154-3.shader_test
new file mode 100644
index 0000000..4309e87
--- /dev/null
+++ b/shaders/skia/154-3.shader_test
@@ -0,0 +1,156 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform float uSurfaceScale_Stage1;
+uniform vec3 uLightColor_Stage1;
+uniform float uKS_Stage1;
+uniform float uShininess_Stage1;
+uniform vec3 uLightLocation_Stage1;
+uniform float uExponent_Stage1;
+uniform float uCosInnerConeAngle_Stage1;
+uniform float uCosOuterConeAngle_Stage1;
+uniform float uConeScale_Stage1;
+uniform vec3 uS_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 light_Stage1(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ vec3 halfDir = normalize(surfaceToLight + vec3(0.0, 0.0, 1.0));
+ float colorScale = uKS_Stage1 * pow(dot(normal, halfDir), uShininess_Stage1);
+ vec3 color = lightColor * clamp(colorScale, 0.0, 1.0);
+ return vec4(color, max(max(color.x, color.y), color.z));
+}
+float sobel_Stage1(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage1(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage1(float m[9], float surfaceScale) {
+ return pointToNormal_Stage1(sobel_Stage1(m[0], m[2], m[3], m[5], m[6], m[8], 0.25), sobel_Stage1(m[0], m[6], m[1], m[7], m[2], m[8], 0.25), surfaceScale);
+}
+vec3 lightColor_Stage1(vec3 surfaceToLight) {
+ float cosAngle = -dot(surfaceToLight, uS_Stage1);
+ if (cosAngle < uCosOuterConeAngle_Stage1) {
+ return vec3(0.0);
+ }
+ float scale = pow(cosAngle, uExponent_Stage1);
+ if (cosAngle < uCosInnerConeAngle_Stage1) {
+ return ((uLightColor_Stage1 * scale) * (cosAngle - uCosOuterConeAngle_Stage1)) * uConeScale_Stage1;
+ }
+ return uLightColor_Stage1;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ vec2 coord = vTransformedCoords_0_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp0 = textureColor;
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp1 = textureColor;
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp2 = textureColor;
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp3 = textureColor;
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp4 = textureColor;
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp5 = textureColor;
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp6 = textureColor;
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp7 = textureColor;
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp8 = textureColor;
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = normalize(uLightLocation_Stage1 - vec3(gl_FragCoord.xy, uSurfaceScale_Stage1 * m[4]));
+ output_Stage1 = light_Stage1(normal_Stage1(m, uSurfaceScale_Stage1), surfaceToLight, lightColor_Stage1(surfaceToLight));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/154-4.shader_test b/shaders/skia/154-4.shader_test
new file mode 100644
index 0000000..fc90325
--- /dev/null
+++ b/shaders/skia/154-4.shader_test
@@ -0,0 +1,98 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+uniform vec2 uDstTextureUpperLeft_Stage2;
+uniform vec2 uDstTextureCoordScale_Stage2;
+uniform sampler2D uTextureSampler_0_Stage0;
+uniform sampler2D uDstTextureSampler_Stage2;
+noperspective in vec2 vTextureCoords_Stage0;
+flat in int vTexIndex_Stage0;
+noperspective in vec4 vinColor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ t.x = fract(t.x);
+ }
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 blend_difference(vec4 src, vec4 dst) {
+ return vec4((src.xyz + dst.xyz) - 2.0 * min(src.xyz * dst.w, dst.xyz * src.w), src.w + (1.0 - src.w) * dst.w);
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ vec4 texColor;
+ {
+ texColor = texture(uTextureSampler_0_Stage0, vTextureCoords_Stage0);
+ }
+ outputCoverage_Stage0 = texColor;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TiledGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ if (all(lessThanEqual(outputCoverage_Stage0.xyz, vec3(0.0)))) {
+ discard;
+ }
+ vec2 _dstTexCoord = (gl_FragCoord.xy - uDstTextureUpperLeft_Stage2) * uDstTextureCoordScale_Stage2;
+ _dstTexCoord.y = 1.0 - _dstTexCoord.y;
+ vec4 _dstColor = texture(uDstTextureSampler_Stage2, _dstTexCoord);
+ sk_FragColor = blend_difference(output_Stage1, _dstColor);
+ float lerpRed = mix(_dstColor.w, sk_FragColor.w, outputCoverage_Stage0.x);
+ float lerpBlue = mix(_dstColor.w, sk_FragColor.w, outputCoverage_Stage0.y);
+ float lerpGreen = mix(_dstColor.w, sk_FragColor.w, outputCoverage_Stage0.z);
+ sk_FragColor = outputCoverage_Stage0 * sk_FragColor + (vec4(1.0) - outputCoverage_Stage0) * _dstColor;
+ sk_FragColor.w = max(max(lerpRed, lerpBlue), lerpGreen);
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform vec2 uAtlasSizeInv_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in uvec2 inTextureCoords;
+noperspective out vec2 vTextureCoords_Stage0;
+flat out int vTexIndex_Stage0;
+noperspective out vec4 vinColor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ ivec2 signedCoords = ivec2(int(inTextureCoords.x), int(inTextureCoords.y));
+ vec2 unormTexCoords = vec2(float(signedCoords.x / 2), float(signedCoords.y / 2));
+ vTextureCoords_Stage0 = unormTexCoords * uAtlasSizeInv_Stage0;
+ vTexIndex_Stage0 = 0;
+ vinColor_Stage0 = inColor;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(inPosition.x, inPosition.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/154-7.shader_test b/shaders/skia/154-7.shader_test
new file mode 100644
index 0000000..c8980fd
--- /dev/null
+++ b/shaders/skia/154-7.shader_test
@@ -0,0 +1,167 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_KHR_blend_equation_advanced : require
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+layout (blend_support_all_equations) out ;
+uniform vec4 uColor_Stage0;
+uniform float uCoverage_Stage0;
+uniform vec4 ucolor0_Stage1;
+uniform vec4 ucolor1_Stage1;
+uniform vec4 ucolor2_Stage1;
+uniform vec4 ucolor3_Stage1;
+uniform vec4 ucolor4_Stage1;
+uniform vec4 ucolor5_Stage1;
+uniform vec4 uinnerRect_Stage2;
+uniform vec2 uradiusPlusHalf_Stage2;
+uniform vec2 ubaseFrequency_Stage3_c0_c0;
+uniform vec2 ustitchData_Stage3_c0_c0;
+uniform vec4 uellipse_Stage4;
+uniform sampler2D uTextureSampler_0_Stage3;
+uniform sampler2D uTextureSampler_1_Stage3;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec3 vTransformedCoords_1_Stage0;
+float perlinnoise_Stage3_c0_c0(float chanCoord, vec2 noiseVec, vec2 stitchData) {
+ vec4 floorVal;
+ floorVal.xy = floor(noiseVec);
+ floorVal.zw = floorVal.xy + vec2(1.0);
+ vec2 fractVal = fract(noiseVec);
+ vec2 noiseSmooth = (fractVal * fractVal) * (vec2(3.0) - vec2(2.0) * fractVal);
+ if (floorVal.x >= stitchData.x) {
+ floorVal.x -= stitchData.x;
+ }
+ if (floorVal.y >= stitchData.y) {
+ floorVal.y -= stitchData.y;
+ }
+ if (floorVal.z >= stitchData.x) {
+ floorVal.z -= stitchData.x;
+ }
+ if (floorVal.w >= stitchData.y) {
+ floorVal.w -= stitchData.y;
+ }
+ floorVal = fract(floor(mod(floorVal, 256.0)) / vec4(256.0));
+ vec2 latticeIdx;
+ latticeIdx.x = texture(uTextureSampler_0_Stage3, vec2(floorVal.x, 0.5)).x;
+ latticeIdx.y = texture(uTextureSampler_0_Stage3, vec2(floorVal.z, 0.5)).x;
+ vec4 bcoords = fract(latticeIdx.xyxy + floorVal.yyww);
+ vec2 uv;
+ vec4 lattice = texture(uTextureSampler_1_Stage3, vec2(bcoords.x, chanCoord)).zyxw;
+ uv.x = dot((lattice.yw + lattice.xz * vec2(0.00390625)) * vec2(2.0) - vec2(1.0), fractVal);
+ fractVal.x -= 1.0;
+ lattice = texture(uTextureSampler_1_Stage3, vec2(bcoords.y, chanCoord)).zyxw;
+ uv.y = dot((lattice.yw + lattice.xz * vec2(0.00390625)) * vec2(2.0) - vec2(1.0), fractVal);
+ vec2 ab;
+ ab.x = mix(uv.x, uv.y, noiseSmooth.x);
+ fractVal.y -= 1.0;
+ lattice = texture(uTextureSampler_1_Stage3, vec2(bcoords.w, chanCoord)).zyxw;
+ uv.y = dot((lattice.yw + lattice.xz * vec2(0.00390625)) * vec2(2.0) - vec2(1.0), fractVal);
+ fractVal.x += 1.0;
+ lattice = texture(uTextureSampler_1_Stage3, vec2(bcoords.z, chanCoord)).zyxw;
+ uv.x = dot((lattice.yw + lattice.xz * vec2(0.00390625)) * vec2(2.0) - vec2(1.0), fractVal);
+ ab.y = mix(uv.x, uv.y, noiseSmooth.x);
+ return mix(ab.x, ab.y, noiseSmooth.y);
+}
+vec4 PerlinNoise_Stage3_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 vTransformedCoords_1_Stage0_ensure2D = vTransformedCoords_1_Stage0.xy / vTransformedCoords_1_Stage0.z;
+ vec2 noiseVec = floor(vTransformedCoords_1_Stage0_ensure2D) * ubaseFrequency_Stage3_c0_c0;
+ _output = vec4(0.0);
+ vec2 stitchData = ustitchData_Stage3_c0_c0;
+ float ratio = 1.0;
+ for (int octave = 0;octave < 2; ++octave) {
+ _output += abs(vec4(perlinnoise_Stage3_c0_c0(0.125, noiseVec, stitchData), perlinnoise_Stage3_c0_c0(0.375, noiseVec, stitchData), perlinnoise_Stage3_c0_c0(0.625, noiseVec, stitchData), perlinnoise_Stage3_c0_c0(0.875, noiseVec, stitchData))) * ratio;
+ noiseVec *= vec2(2.0);
+ ratio *= 0.5;
+ stitchData *= vec2(2.0);
+ }
+ _output = clamp(_output, 0.0, 1.0);
+ _output = vec4(_output.xyz * _output.www, _output.w);
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = uColor_Stage0;
+ outputCoverage_Stage0 = vec4(uCoverage_Stage0);
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = outputColor_Stage0;
+ float alpha = 255.0 * output_Stage1.w;
+ if (alpha < 0.5) {
+ output_Stage1 = ucolor0_Stage1;
+ } else if (alpha < 1.5) {
+ output_Stage1 = ucolor1_Stage1;
+ } else if (alpha < 2.5) {
+ output_Stage1 = ucolor2_Stage1;
+ } else if (alpha < 3.5) {
+ output_Stage1 = ucolor3_Stage1;
+ } else if (alpha < 4.5) {
+ output_Stage1 = ucolor4_Stage1;
+ } else {
+ output_Stage1 = ucolor5_Stage1;
+ }
+ }
+ vec4 output_Stage2;
+ {
+ vec2 dxy0 = uinnerRect_Stage2.xy - gl_FragCoord.xy;
+ vec2 dxy1 = gl_FragCoord.xy - uinnerRect_Stage2.zw;
+ vec2 dxy = max(max(dxy0, dxy1), 0.0);
+ float alpha = clamp(uradiusPlusHalf_Stage2.x - length(dxy), 0.0, 1.0);
+ output_Stage2 = outputCoverage_Stage0 * alpha;
+ }
+ vec4 output_Stage3;
+ {
+ output_Stage3 = blend_dst_in(output_Stage2, PerlinNoise_Stage3_c0_c0(vec4(1.0)));
+ }
+ vec4 output_Stage4;
+ {
+ vec2 d = gl_FragCoord.xy - uellipse_Stage4.xy;
+ vec2 Z = d * uellipse_Stage4.zw;
+ float implicit = dot(Z, d) - 1.0;
+ float grad_dot = 4.0 * dot(Z, Z);
+ {
+ grad_dot = max(grad_dot, 1.1754999560161448e-38);
+ }
+ float approx_dist = implicit * inversesqrt(grad_dot);
+ float alpha;
+ {
+ alpha = clamp(0.5 + approx_dist, 0.0, 1.0);
+ }
+ output_Stage4 = output_Stage3 * alpha;
+ }
+ {
+ sk_FragColor = output_Stage4 * output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 inPosition;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec3 vTransformedCoords_1_Stage0;
+void main() {
+ vec2 pos2 = (uViewM_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = uCoordTransformMatrix_1_Stage0 * vec3(inPosition, 1.0);
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/154-8.shader_test b/shaders/skia/154-8.shader_test
new file mode 100644
index 0000000..381988b
--- /dev/null
+++ b/shaders/skia/154-8.shader_test
@@ -0,0 +1,99 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uCoordTransformMatrix_2_Stage0;
+uniform vec4 uboundsUniform_Stage2_c0_c0;
+uniform float uxInvZoom_Stage2_c0_c0;
+uniform float uyInvZoom_Stage2_c0_c0;
+uniform float uxInvInset_Stage2_c0_c0;
+uniform float uyInvInset_Stage2_c0_c0;
+uniform vec2 uoffset_Stage2_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec3 vTransformedCoords_1_Stage0;
+vec4 MagnifierEffect_Stage2_c0_c0(vec4 _input, vec2 _coords) {
+ _coords = _coords * uCoordTransformMatrix_2_Stage0.xz + uCoordTransformMatrix_2_Stage0.yw;
+ vec4 _output;
+ vec2 coord = _coords;
+ vec2 zoom_coord = uoffset_Stage2_c0_c0 + coord * vec2(uxInvZoom_Stage2_c0_c0, uyInvZoom_Stage2_c0_c0);
+ vec2 delta = (coord - uboundsUniform_Stage2_c0_c0.xy) * uboundsUniform_Stage2_c0_c0.zw;
+ delta = min(delta, vec2(1.0, 1.0) - delta);
+ delta *= vec2(uxInvInset_Stage2_c0_c0, uyInvInset_Stage2_c0_c0);
+ float weight = 0.0;
+ if (delta.x < 2.0 && delta.y < 2.0) {
+ delta = vec2(2.0, 2.0) - delta;
+ float dist = length(delta);
+ dist = max(2.0 - dist, 0.0);
+ weight = min(dist * dist, 1.0);
+ } else {
+ vec2 delta_squared = delta * delta;
+ weight = min(min(delta_squared.x, delta_squared.y), 1.0);
+ }
+ _output = texture(uTextureSampler_0_Stage2, mix(coord, zoom_coord, weight));
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ vec2 vTransformedCoords_1_Stage0_ensure2D = vTransformedCoords_1_Stage0.xy / vTransformedCoords_1_Stage0.z;
+ vec2 coord = vTransformedCoords_1_Stage0_ensure2D - vec2(0.5);
+ vec2 f = fract(coord);
+ coord += 0.5 - f;
+ vec4 wx = mat4(0.055555555555555552, 0.88888888888888884, 0.055555555555555552, 0.0, -0.5, 0.0, 0.5, 0.0, 0.83333333333333337, -2.0, 1.5, -0.33333333333333331, -0.3888888888888889, 1.1666666666666667, -1.1666666666666667, 0.3888888888888889) * vec4(1.0, f.x, f.x * f.x, (f.x * f.x) * f.x);
+ vec4 wy = mat4(0.055555555555555552, 0.88888888888888884, 0.055555555555555552, 0.0, -0.5, 0.0, 0.5, 0.0, 0.83333333333333337, -2.0, 1.5, -0.33333333333333331, -0.3888888888888889, 1.1666666666666667, -1.1666666666666667, 0.3888888888888889) * vec4(1.0, f.y, f.y * f.y, (f.y * f.y) * f.y);
+ vec4 rowColors[4];
+ rowColors[0] = MagnifierEffect_Stage2_c0_c0(vec4(1.0), coord + vec2(-1.0, -1.0));
+ rowColors[1] = MagnifierEffect_Stage2_c0_c0(vec4(1.0), coord + vec2(0.0, -1.0));
+ rowColors[2] = MagnifierEffect_Stage2_c0_c0(vec4(1.0), coord + vec2(1.0, -1.0));
+ rowColors[3] = MagnifierEffect_Stage2_c0_c0(vec4(1.0), coord + vec2(2.0, -1.0));
+ vec4 s0 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ rowColors[0] = MagnifierEffect_Stage2_c0_c0(vec4(1.0), coord + vec2(-1.0, 0.0));
+ rowColors[1] = MagnifierEffect_Stage2_c0_c0(vec4(1.0), coord);
+ rowColors[2] = MagnifierEffect_Stage2_c0_c0(vec4(1.0), coord + vec2(1.0, 0.0));
+ rowColors[3] = MagnifierEffect_Stage2_c0_c0(vec4(1.0), coord + vec2(2.0, 0.0));
+ vec4 s1 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ rowColors[0] = MagnifierEffect_Stage2_c0_c0(vec4(1.0), coord + vec2(-1.0, 1.0));
+ rowColors[1] = MagnifierEffect_Stage2_c0_c0(vec4(1.0), coord + vec2(0.0, 1.0));
+ rowColors[2] = MagnifierEffect_Stage2_c0_c0(vec4(1.0), coord + vec2(1.0, 1.0));
+ rowColors[3] = MagnifierEffect_Stage2_c0_c0(vec4(1.0), coord + vec2(2.0, 1.0));
+ vec4 s2 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ rowColors[0] = MagnifierEffect_Stage2_c0_c0(vec4(1.0), coord + vec2(-1.0, 2.0));
+ rowColors[1] = MagnifierEffect_Stage2_c0_c0(vec4(1.0), coord + vec2(0.0, 2.0));
+ rowColors[2] = MagnifierEffect_Stage2_c0_c0(vec4(1.0), coord + vec2(1.0, 2.0));
+ rowColors[3] = MagnifierEffect_Stage2_c0_c0(vec4(1.0), coord + vec2(2.0, 2.0));
+ vec4 s3 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ vec4 bicubicColor = ((wy.x * s0 + wy.y * s1) + wy.z * s2) + wy.w * s3;
+ bicubicColor = clamp(bicubicColor, 0.0, 1.0);
+ output_Stage2 = bicubicColor * output_Stage1;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec3 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0);
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/154.shader_test b/shaders/skia/154.shader_test
new file mode 100644
index 0000000..cff2cf3
--- /dev/null
+++ b/shaders/skia/154.shader_test
@@ -0,0 +1,155 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage2_c1_c0;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.w) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ } else {
+ {
+ if (t < uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = OverrideInputFragmentProcessor_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c1_c0;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 blend_darken(vec4 src, vec4 dst) {
+ vec4 result = blend_src_over(src, dst);
+ result.xyz = min(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
+ return result;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_dst_in(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_darken(ConstColorProcessor_Stage2_c1_c0(vec4(1.0)), output_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 inColor;
+in vec2 inLocalCoord;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1540.shader_test b/shaders/skia/1540.shader_test
new file mode 100644
index 0000000..9810569
--- /dev/null
+++ b/shaders/skia/1540.shader_test
@@ -0,0 +1,173 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uColor_Stage0;
+uniform float uCoverage_Stage0;
+uniform vec4 uinnerRect_Stage1_c0_c0;
+uniform vec2 uinvRadiiXY_Stage1_c0_c0;
+uniform vec4 ucircle_Stage1_c1_c0_c0_c0_c0_c0;
+uniform vec4 urectH_Stage1_c1_c0_c0_c0_c1_c0;
+uniform float uinvSixSigma_Stage1_c1_c0_c0_c0_c1_c0;
+uniform vec3 uedges_Stage1_c1_c0_c1_c0_c0_c0[7];
+uniform mat4 um_Stage1_c1_c0_c1_c0_c1_c0;
+uniform vec4 uv_Stage1_c1_c0_c1_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+vec4 EllipticalRRect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 dxy0 = uinnerRect_Stage1_c0_c0.xy - gl_FragCoord.xy;
+ vec2 dxy1 = gl_FragCoord.xy - uinnerRect_Stage1_c0_c0.zw;
+ vec2 dxy = max(max(dxy0, dxy1), 0.0);
+ vec2 Z = dxy * uinvRadiiXY_Stage1_c0_c0;
+ float implicit = dot(Z, dxy) - 1.0;
+ float grad_dot = 4.0 * dot(Z, Z);
+ grad_dot = max(grad_dot, 9.9999997473787516e-05);
+ float approx_dist = implicit * inversesqrt(grad_dot);
+ float alpha = clamp(0.5 + approx_dist, 0.0, 1.0);
+ _output = _input * alpha;
+ return _output;
+}
+vec4 CircleEffect_Stage1_c1_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float d;
+ {
+ d = (length((ucircle_Stage1_c1_c0_c0_c0_c0_c0.xy - gl_FragCoord.xy) * ucircle_Stage1_c1_c0_c0_c0_c0_c0.w) - 1.0) * ucircle_Stage1_c1_c0_c0_c0_c0_c0.z;
+ }
+ {
+ _output = d > 0.5 ? _input : vec4(0.0);
+ }
+ return _output;
+}
+vec4 RectBlurEffect_Stage1_c1_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float xCoverage, yCoverage;
+ {
+ float x, y;
+ {
+ x = max(urectH_Stage1_c1_c0_c0_c0_c1_c0.x - gl_FragCoord.x, gl_FragCoord.x - urectH_Stage1_c1_c0_c0_c0_c1_c0.z);
+ y = max(urectH_Stage1_c1_c0_c0_c0_c1_c0.y - gl_FragCoord.y, gl_FragCoord.y - urectH_Stage1_c1_c0_c0_c0_c1_c0.w);
+ }
+ xCoverage = texture(uTextureSampler_0_Stage1, vec2(x * uinvSixSigma_Stage1_c1_c0_c0_c0_c1_c0, 0.5)).w;
+ yCoverage = texture(uTextureSampler_0_Stage1, vec2(y * uinvSixSigma_Stage1_c1_c0_c0_c0_c1_c0, 0.5)).w;
+ _output = (_input * xCoverage) * yCoverage;
+ }
+ _output = (_input * xCoverage) * yCoverage;
+ return _output;
+}
+vec4 blend_dst_out(vec4 src, vec4 dst) {
+ return (1.0 - src.w) * dst;
+}
+vec4 ComposeTwo_Stage1_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_dst_out(CircleEffect_Stage1_c1_c0_c0_c0_c0_c0(inputColor), RectBlurEffect_Stage1_c1_c0_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 ConvexPoly_Stage1_c1_c0_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float alpha = 1.0;
+ float edge;
+ edge = dot(uedges_Stage1_c1_c0_c1_c0_c0_c0[0], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage1_c1_c0_c1_c0_c0_c0[1], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage1_c1_c0_c1_c0_c0_c0[2], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage1_c1_c0_c1_c0_c0_c0[3], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage1_c1_c0_c1_c0_c0_c0[4], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage1_c1_c0_c1_c0_c0_c0[5], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage1_c1_c0_c1_c0_c0_c0[6], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ alpha = 1.0 - alpha;
+ _output = _input * alpha;
+ return _output;
+}
+vec4 ColorMatrixFragmentProcessor_Stage1_c1_c0_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = _input;
+ _output = um_Stage1_c1_c0_c1_c0_c1_c0 * inputColor + uv_Stage1_c1_c0_c1_c0_c1_c0;
+ {
+ _output.w = clamp(_output.w, 0.0, 1.0);
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 ComposeTwo_Stage1_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_src_in(ConvexPoly_Stage1_c1_c0_c1_c0_c0_c0(inputColor), ColorMatrixFragmentProcessor_Stage1_c1_c0_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 blend_src_out(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src;
+}
+vec4 ComposeTwo_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_src_out(ComposeTwo_Stage1_c1_c0_c0_c0(inputColor), ComposeTwo_Stage1_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+float _blend_overlay_component(float sc, float sa, float dc, float da) {
+ if (2.0 * dc <= da) {
+ return (2.0 * sc) * dc;
+ }
+ return sa * da - (2.0 * (da - dc)) * (sa - sc);
+}
+vec4 blend_overlay(vec4 src, vec4 dst) {
+ vec4 result = vec4(_blend_overlay_component(src.x, src.w, dst.x, dst.w), _blend_overlay_component(src.y, src.w, dst.y, dst.w), _blend_overlay_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+ result.xyz += dst.xyz * (1.0 - src.w) + src.xyz * (1.0 - dst.w);
+ return result;
+}
+vec4 blend_hard_light(vec4 src, vec4 dst) {
+ return blend_overlay(dst, src);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = uColor_Stage0;
+ outputCoverage_Stage0 = vec4(uCoverage_Stage0);
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_hard_light(EllipticalRRect_Stage1_c0_c0(inputColor), ComposeTwo_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ sk_FragColor = (vec4(1.0) - output_Stage1) * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 inPosition;
+void main() {
+ vec2 pos2 = (uViewM_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1543.shader_test b/shaders/skia/1543.shader_test
new file mode 100644
index 0000000..444e405
--- /dev/null
+++ b/shaders/skia/1543.shader_test
@@ -0,0 +1,178 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uboundsUniform_Stage1;
+uniform float uxInvZoom_Stage1;
+uniform float uyInvZoom_Stage1;
+uniform float uxInvInset_Stage1;
+uniform float uyInvInset_Stage1;
+uniform vec2 uoffset_Stage1;
+uniform float uinnerThreshold_Stage2;
+uniform float uouterThreshold_Stage2;
+uniform vec4 uleftBorderColor_Stage3_c0_c0;
+uniform vec4 urightBorderColor_Stage3_c0_c0;
+uniform vec4 uscale0_1_Stage3_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage3_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage3_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage3_c0_c0_c1_c0;
+uniform vec4 uscale8_9_Stage3_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage3_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage3_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage3_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage3_c0_c0_c1_c0;
+uniform vec4 ubias8_9_Stage3_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage3_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage3_c0_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vEllipseOffsets_Stage0;
+noperspective in vec4 vEllipseRadii_Stage0;
+noperspective in vec4 vinColor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+vec4 LinearGradientLayout_Stage3_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_2_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage3_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthresholds1_7_Stage3_c0_c0_c1_c0.w) {
+ if (t < uthresholds1_7_Stage3_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage3_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage3_c0_c0_c1_c0;
+ bias = ubias0_1_Stage3_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage3_c0_c0_c1_c0;
+ bias = ubias2_3_Stage3_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage3_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage3_c0_c0_c1_c0;
+ bias = ubias4_5_Stage3_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage3_c0_c0_c1_c0;
+ bias = ubias6_7_Stage3_c0_c0_c1_c0;
+ }
+ }
+ } else {
+ {
+ {
+ scale = uscale8_9_Stage3_c0_c0_c1_c0;
+ bias = ubias8_9_Stage3_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage3_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage3_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage3_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage3_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage3_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ {
+ vec2 offset = vEllipseOffsets_Stage0;
+ vec2 grad = (2.0 * offset) * vEllipseRadii_Stage0.xy;
+ float grad_dot = dot(grad, grad);
+ grad_dot = max(grad_dot, 1.1754999560161448e-38);
+ }
+ vec4 output_Stage1;
+ {
+ vec2 coord = vTransformedCoords_0_Stage0;
+ vec2 zoom_coord = uoffset_Stage1 + coord * vec2(uxInvZoom_Stage1, uyInvZoom_Stage1);
+ vec2 delta = (coord - uboundsUniform_Stage1.xy) * uboundsUniform_Stage1.zw;
+ delta = min(delta, vec2(1.0, 1.0) - delta);
+ delta *= vec2(uxInvInset_Stage1, uyInvInset_Stage1);
+ float weight = 0.0;
+ if (delta.x < 2.0 && delta.y < 2.0) {
+ delta = vec2(2.0, 2.0) - delta;
+ float dist = length(delta);
+ dist = max(2.0 - dist, 0.0);
+ weight = min(dist * dist, 1.0);
+ } else {
+ vec2 delta_squared = delta * delta;
+ weight = min(min(delta_squared.x, delta_squared.y), 1.0);
+ }
+ output_Stage1 = texture(uTextureSampler_0_Stage1, mix(coord, zoom_coord, weight));
+ }
+ vec4 output_Stage2;
+ {
+ vec4 color = output_Stage1;
+ vec4 mask_color = texture(uTextureSampler_0_Stage2, vTransformedCoords_1_Stage0);
+ if (mask_color.w < 0.5) {
+ if (color.w > uouterThreshold_Stage2) {
+ float scale = uouterThreshold_Stage2 / color.w;
+ color.xyz *= scale;
+ color.w = uouterThreshold_Stage2;
+ }
+ } else if (color.w < uinnerThreshold_Stage2) {
+ float scale = uinnerThreshold_Stage2 / max(0.0010000000474974513, color.w);
+ color.xyz *= scale;
+ color.w = uinnerThreshold_Stage2;
+ }
+ output_Stage2 = color;
+ }
+ vec4 output_Stage3;
+ {
+ output_Stage3 = blend_dst_in(output_Stage2, ClampedGradientEffect_Stage3_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage3;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec2 inEllipseOffset;
+in vec4 inEllipseRadii;
+noperspective out vec2 vEllipseOffsets_Stage0;
+noperspective out vec4 vEllipseRadii_Stage0;
+noperspective out vec4 vinColor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+void main() {
+ vEllipseOffsets_Stage0 = inEllipseOffset;
+ vEllipseRadii_Stage0 = inEllipseRadii;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1546.shader_test b/shaders/skia/1546.shader_test
new file mode 100644
index 0000000..c887f78
--- /dev/null
+++ b/shaders/skia/1546.shader_test
@@ -0,0 +1,654 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_KHR_blend_equation_advanced : require
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+layout (blend_support_all_equations) out ;
+uniform float uSrcTF_Stage0[7];
+uniform mat3 uColorXform_Stage0;
+uniform float uDstTF_Stage0[7];
+uniform float ucornerRadius_Stage1;
+uniform vec4 uproxyRect_Stage1;
+uniform float ublurRadius_Stage1;
+uniform vec4 uleftBorderColor_Stage2_c0_c0;
+uniform vec4 urightBorderColor_Stage2_c0_c0;
+uniform float ubias_Stage2_c0_c0_c0_c0;
+uniform float uscale_Stage2_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale8_9_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias8_9_Stage2_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage2_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage2_c0_c0_c1_c0;
+uniform mat4 um_Stage3_c1_c0;
+uniform vec4 uv_Stage3_c1_c0;
+uniform vec2 uImageIncrement_Stage4;
+uniform vec4 uKernel_Stage4[5];
+uniform vec2 uKernelOffset_Stage4;
+uniform float uGain_Stage4;
+uniform float uBias_Stage4;
+uniform vec4 uTexDom_Stage4;
+uniform vec3 uDecalParams_Stage4;
+uniform vec4 uboundsUniform_Stage5;
+uniform float uxInvZoom_Stage5;
+uniform float uyInvZoom_Stage5;
+uniform float uxInvInset_Stage5;
+uniform float uyInvInset_Stage5;
+uniform vec2 uoffset_Stage5;
+uniform vec4 uinnerRect_Stage6;
+uniform vec4 uinvRadiiLTRB_Stage6;
+uniform sampler2D uTextureSampler_0_Stage0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage4;
+uniform sampler2D uTextureSampler_0_Stage5;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+noperspective in vec2 vtextureCoords_Stage0;
+flat in vec4 vtextureDomain_Stage0;
+flat in vec4 vcolor_Stage0;
+float src_tf_Stage0(float x) {
+ float G = uSrcTF_Stage0[0];
+ float A = uSrcTF_Stage0[1];
+ float B = uSrcTF_Stage0[2];
+ float C = uSrcTF_Stage0[3];
+ float D = uSrcTF_Stage0[4];
+ float E = uSrcTF_Stage0[5];
+ float F = uSrcTF_Stage0[6];
+ float s = sign(x);
+ x = abs(x);
+ x = x < D ? C * x + F : pow(A * x + B, G) + E;
+ return s * x;
+}
+float dst_tf_Stage0(float x) {
+ float G = uDstTF_Stage0[0];
+ float A = uDstTF_Stage0[1];
+ float B = uDstTF_Stage0[2];
+ float C = uDstTF_Stage0[3];
+ float D = uDstTF_Stage0[4];
+ float E = uDstTF_Stage0[5];
+ float F = uDstTF_Stage0[6];
+ float s = sign(x);
+ x = abs(x);
+ x = x < D ? C * x + F : pow(A * x + B, G) + E;
+ return s * x;
+}
+vec4 gamut_xform_Stage0(vec4 color) {
+ color.xyz = uColorXform_Stage0 * color.xyz;
+ return color;
+}
+vec4 color_xform_Stage0(vec4 color) {
+ float nonZeroAlpha = max(color.w, 9.9999997473787516e-05);
+ color = vec4(color.xyz / nonZeroAlpha, nonZeroAlpha);
+ color.x = src_tf_Stage0(color.x);
+ color.y = src_tf_Stage0(color.y);
+ color.z = src_tf_Stage0(color.z);
+ color = gamut_xform_Stage0(color);
+ color.x = dst_tf_Stage0(color.x);
+ color.y = dst_tf_Stage0(color.y);
+ color.z = dst_tf_Stage0(color.z);
+ color.xyz *= color.w;
+ return color;
+}
+vec4 SweepGradientLayout_Stage2_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float angle;
+ {
+ angle = atan(-vTransformedCoords_0_Stage0.y, -vTransformedCoords_0_Stage0.x);
+ }
+ float t = ((angle * 0.15915493667125702 + 0.5) + ubias_Stage2_c0_c0_c0_c0) * uscale_Stage2_c0_c0_c0_c0;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage2_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.w) {
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage2_c0_c0_c1_c0;
+ bias = ubias0_1_Stage2_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage2_c0_c0_c1_c0;
+ bias = ubias2_3_Stage2_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage2_c0_c0_c1_c0;
+ bias = ubias4_5_Stage2_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage2_c0_c0_c1_c0;
+ bias = ubias6_7_Stage2_c0_c0_c1_c0;
+ }
+ }
+ } else {
+ {
+ {
+ scale = uscale8_9_Stage2_c0_c0_c1_c0;
+ bias = ubias8_9_Stage2_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = SweepGradientLayout_Stage2_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage2_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage2_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage2_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 ColorMatrixFragmentProcessor_Stage3_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = _input;
+ {
+ float nonZeroAlpha = max(inputColor.w, 9.9999997473787516e-05);
+ inputColor = vec4(inputColor.xyz / nonZeroAlpha, inputColor.w);
+ }
+ _output = um_Stage3_c1_c0 * inputColor + uv_Stage3_c1_c0;
+ {
+ _output.w = clamp(_output.w, 0.0, 1.0);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+vec4 blend_src(vec4 src, vec4 dst) {
+ return src;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ vec2 textureCoords;
+ textureCoords = vtextureCoords_Stage0;
+ vec4 textureDomain;
+ textureDomain = vtextureDomain_Stage0;
+ outputColor_Stage0 = vcolor_Stage0;
+ outputColor_Stage0 = color_xform_Stage0(texture(uTextureSampler_0_Stage0, clamp(textureCoords, textureDomain.xy, textureDomain.zw))) * outputColor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec2 translatedFragPos = gl_FragCoord.xy - uproxyRect_Stage1.xy;
+ float threshold = ucornerRadius_Stage1 + 2.0 * ublurRadius_Stage1;
+ vec2 middle = (uproxyRect_Stage1.zw - uproxyRect_Stage1.xy) - 2.0 * threshold;
+ if (translatedFragPos.x >= threshold && translatedFragPos.x < middle.x + threshold) {
+ translatedFragPos.x = threshold;
+ } else if (translatedFragPos.x >= middle.x + threshold) {
+ translatedFragPos.x -= middle.x - 1.0;
+ }
+ if (translatedFragPos.y > threshold && translatedFragPos.y < middle.y + threshold) {
+ translatedFragPos.y = threshold;
+ } else if (translatedFragPos.y >= middle.y + threshold) {
+ translatedFragPos.y -= middle.y - 1.0;
+ }
+ vec2 proxyDims = vec2(2.0 * threshold + 1.0);
+ vec2 texCoord = translatedFragPos / proxyDims;
+ output_Stage1 = outputColor_Stage0 * texture(uTextureSampler_0_Stage1, texCoord);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_dst_in(output_Stage1, ClampedGradientEffect_Stage2_c0_c0(vec4(1.0)));
+ }
+ vec4 output_Stage3;
+ {
+ output_Stage3 = blend_src(ColorMatrixFragmentProcessor_Stage3_c1_c0(vec4(1.0)), output_Stage2);
+ }
+ vec4 output_Stage4;
+ {
+ vec4 sum = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_1_Stage0 - uKernelOffset_Stage4 * uImageIncrement_Stage4;
+ vec4 c;
+ {
+ float k = uKernel_Stage4[0].x;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage4.xy, uTexDom_Stage4.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage4, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage4.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage4.y);
+ if (err > uDecalParams_Stage4.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage4.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage4[0].y;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage4;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage4.xy, uTexDom_Stage4.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage4, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage4.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage4.y);
+ if (err > uDecalParams_Stage4.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage4.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage4[0].z;
+ {
+ vec2 origCoord = coord + vec2(2.0, 0.0) * uImageIncrement_Stage4;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage4.xy, uTexDom_Stage4.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage4, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage4.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage4.y);
+ if (err > uDecalParams_Stage4.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage4.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage4[0].w;
+ {
+ vec2 origCoord = coord + vec2(3.0, 0.0) * uImageIncrement_Stage4;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage4.xy, uTexDom_Stage4.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage4, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage4.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage4.y);
+ if (err > uDecalParams_Stage4.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage4.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage4[1].x;
+ {
+ vec2 origCoord = coord + vec2(4.0, 0.0) * uImageIncrement_Stage4;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage4.xy, uTexDom_Stage4.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage4, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage4.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage4.y);
+ if (err > uDecalParams_Stage4.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage4.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage4[1].y;
+ {
+ vec2 origCoord = coord + vec2(5.0, 0.0) * uImageIncrement_Stage4;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage4.xy, uTexDom_Stage4.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage4, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage4.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage4.y);
+ if (err > uDecalParams_Stage4.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage4.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage4[1].z;
+ {
+ vec2 origCoord = coord + vec2(6.0, 0.0) * uImageIncrement_Stage4;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage4.xy, uTexDom_Stage4.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage4, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage4.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage4.y);
+ if (err > uDecalParams_Stage4.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage4.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage4[1].w;
+ {
+ vec2 origCoord = coord + vec2(7.0, 0.0) * uImageIncrement_Stage4;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage4.xy, uTexDom_Stage4.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage4, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage4.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage4.y);
+ if (err > uDecalParams_Stage4.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage4.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage4[2].x;
+ {
+ vec2 origCoord = coord + vec2(8.0, 0.0) * uImageIncrement_Stage4;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage4.xy, uTexDom_Stage4.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage4, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage4.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage4.y);
+ if (err > uDecalParams_Stage4.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage4.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage4[2].y;
+ {
+ vec2 origCoord = coord + vec2(9.0, 0.0) * uImageIncrement_Stage4;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage4.xy, uTexDom_Stage4.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage4, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage4.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage4.y);
+ if (err > uDecalParams_Stage4.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage4.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage4[2].z;
+ {
+ vec2 origCoord = coord + vec2(10.0, 0.0) * uImageIncrement_Stage4;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage4.xy, uTexDom_Stage4.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage4, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage4.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage4.y);
+ if (err > uDecalParams_Stage4.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage4.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage4[2].w;
+ {
+ vec2 origCoord = coord + vec2(11.0, 0.0) * uImageIncrement_Stage4;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage4.xy, uTexDom_Stage4.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage4, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage4.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage4.y);
+ if (err > uDecalParams_Stage4.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage4.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage4[3].x;
+ {
+ vec2 origCoord = coord + vec2(12.0, 0.0) * uImageIncrement_Stage4;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage4.xy, uTexDom_Stage4.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage4, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage4.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage4.y);
+ if (err > uDecalParams_Stage4.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage4.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage4[3].y;
+ {
+ vec2 origCoord = coord + vec2(13.0, 0.0) * uImageIncrement_Stage4;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage4.xy, uTexDom_Stage4.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage4, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage4.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage4.y);
+ if (err > uDecalParams_Stage4.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage4.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage4[3].z;
+ {
+ vec2 origCoord = coord + vec2(14.0, 0.0) * uImageIncrement_Stage4;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage4.xy, uTexDom_Stage4.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage4, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage4.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage4.y);
+ if (err > uDecalParams_Stage4.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage4.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage4[3].w;
+ {
+ vec2 origCoord = coord + vec2(15.0, 0.0) * uImageIncrement_Stage4;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage4.xy, uTexDom_Stage4.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage4, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage4.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage4.y);
+ if (err > uDecalParams_Stage4.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage4.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage4[4].x;
+ {
+ vec2 origCoord = coord + vec2(16.0, 0.0) * uImageIncrement_Stage4;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage4.xy, uTexDom_Stage4.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage4, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage4.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage4.y);
+ if (err > uDecalParams_Stage4.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage4.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage4[4].y;
+ {
+ vec2 origCoord = coord + vec2(17.0, 0.0) * uImageIncrement_Stage4;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage4.xy, uTexDom_Stage4.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage4, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage4.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage4.y);
+ if (err > uDecalParams_Stage4.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage4.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ vec2 origCoord = vTransformedCoords_1_Stage0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage4.xy, uTexDom_Stage4.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage4, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage4.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage4.y);
+ if (err > uDecalParams_Stage4.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage4.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ output_Stage4.w = c.w;
+ output_Stage4.xyz = clamp(sum.xyz * uGain_Stage4 + uBias_Stage4, 0.0, 1.0);
+ output_Stage4.xyz *= output_Stage4.w;
+ output_Stage4 *= output_Stage3;
+ }
+ vec4 output_Stage5;
+ {
+ vec2 coord = vTransformedCoords_2_Stage0;
+ vec2 zoom_coord = uoffset_Stage5 + coord * vec2(uxInvZoom_Stage5, uyInvZoom_Stage5);
+ vec2 delta = (coord - uboundsUniform_Stage5.xy) * uboundsUniform_Stage5.zw;
+ delta = min(delta, vec2(1.0, 1.0) - delta);
+ delta *= vec2(uxInvInset_Stage5, uyInvInset_Stage5);
+ float weight = 0.0;
+ if (delta.x < 2.0 && delta.y < 2.0) {
+ delta = vec2(2.0, 2.0) - delta;
+ float dist = length(delta);
+ dist = max(2.0 - dist, 0.0);
+ weight = min(dist * dist, 1.0);
+ } else {
+ vec2 delta_squared = delta * delta;
+ weight = min(min(delta_squared.x, delta_squared.y), 1.0);
+ }
+ output_Stage5 = texture(uTextureSampler_0_Stage5, mix(coord, zoom_coord, weight));
+ }
+ vec4 output_Stage6;
+ {
+ vec2 dxy0 = uinnerRect_Stage6.xy - gl_FragCoord.xy;
+ vec2 dxy1 = gl_FragCoord.xy - uinnerRect_Stage6.zw;
+ vec2 dxy = max(max(dxy0, dxy1), 0.0);
+ vec2 Z = max(max(dxy0 * uinvRadiiLTRB_Stage6.xy, dxy1 * uinvRadiiLTRB_Stage6.zw), 0.0);
+ float implicit = dot(Z, dxy) - 1.0;
+ float grad_dot = 4.0 * dot(Z, Z);
+ grad_dot = max(grad_dot, 9.9999997473787516e-05);
+ float approx_dist = implicit * inversesqrt(grad_dot);
+ float alpha = clamp(0.5 - approx_dist, 0.0, 1.0);
+ output_Stage6 = output_Stage5 * alpha;
+ }
+ {
+ sk_FragColor = output_Stage6;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+in vec2 position;
+in vec2 textureCoords;
+in vec4 textureDomain;
+in vec4 color;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+noperspective out vec2 vtextureCoords_Stage0;
+flat out vec4 vtextureDomain_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vec2 pos2 = position;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(textureCoords, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(textureCoords, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(textureCoords, 1.0)).xy;
+ vtextureCoords_Stage0 = textureCoords;
+ vtextureDomain_Stage0 = textureDomain;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1552.shader_test b/shaders/skia/1552.shader_test
new file mode 100644
index 0000000..8aba470
--- /dev/null
+++ b/shaders/skia/1552.shader_test
@@ -0,0 +1,223 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+uniform mat4 um_Stage1;
+uniform vec4 uv_Stage1;
+uniform vec4 uboundsUniform_Stage3;
+uniform float uxInvZoom_Stage3;
+uniform float uyInvZoom_Stage3;
+uniform float uxInvInset_Stage3;
+uniform float uyInvInset_Stage3;
+uniform vec2 uoffset_Stage3;
+uniform float uinnerThreshold_Stage4_c0_c0;
+uniform float uouterThreshold_Stage4_c0_c0;
+uniform vec2 uScale_Stage4_c1_c0;
+uniform vec4 uTexDom_Stage4_c1_c0;
+uniform vec3 uDecalParams_Stage4_c1_c0;
+uniform vec2 ubaseFrequency_Stage5_c2_c0;
+uniform sampler2D uTextureSampler_0_Stage3;
+uniform sampler2D uTextureSampler_0_Stage4;
+uniform sampler2D uTextureSampler_1_Stage4;
+uniform sampler2D uTextureSampler_2_Stage4;
+uniform sampler2D uTextureSampler_0_Stage5;
+uniform sampler2D uTextureSampler_1_Stage5;
+uniform sampler2D uTextureSampler_0_Stage6;
+noperspective in vec4 vinCircleEdge_Stage0;
+noperspective in vec3 vinClipPlane_Stage0;
+noperspective in vec4 vinColor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+noperspective in vec2 vTransformedCoords_3_Stage0;
+noperspective in vec2 vTransformedCoords_4_Stage0;
+vec4 AlphaThresholdFragmentProcessor_Stage4_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 color = _input;
+ vec4 mask_color = texture(uTextureSampler_0_Stage4, vTransformedCoords_1_Stage0);
+ if (mask_color.w < 0.5) {
+ if (color.w > uouterThreshold_Stage4_c0_c0) {
+ float scale = uouterThreshold_Stage4_c0_c0 / color.w;
+ color.xyz *= scale;
+ color.w = uouterThreshold_Stage4_c0_c0;
+ }
+ } else if (color.w < uinnerThreshold_Stage4_c0_c0) {
+ float scale = uinnerThreshold_Stage4_c0_c0 / max(0.0010000000474974513, color.w);
+ color.xyz *= scale;
+ color.w = uinnerThreshold_Stage4_c0_c0;
+ }
+ _output = color;
+ return _output;
+}
+vec4 DisplacementMap_Stage4_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 dColor = texture(uTextureSampler_1_Stage4, vTransformedCoords_2_Stage0);
+ dColor.xyz = dColor.w < 9.9999999747524271e-07 ? vec3(0.0) : clamp(dColor.xyz / dColor.w, 0.0, 1.0);
+ vec2 cCoords = vTransformedCoords_3_Stage0 + uScale_Stage4_c1_c0 * (dColor.yw - vec2(0.5));
+ {
+ vec2 origCoord = cCoords;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage4_c1_c0.xy, uTexDom_Stage4_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_2_Stage4, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage4_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage4_c1_c0.y);
+ if (err > uDecalParams_Stage4_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage4_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ _output = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ return _output;
+}
+float perlinnoise_Stage5_c2_c0(float chanCoord, vec2 noiseVec) {
+ vec4 floorVal;
+ floorVal.xy = floor(noiseVec);
+ floorVal.zw = floorVal.xy + vec2(1.0);
+ vec2 fractVal = fract(noiseVec);
+ vec2 noiseSmooth = (fractVal * fractVal) * (vec2(3.0) - vec2(2.0) * fractVal);
+ floorVal = fract(floor(mod(floorVal, 256.0)) / vec4(256.0));
+ vec2 latticeIdx;
+ latticeIdx.x = texture(uTextureSampler_0_Stage5, vec2(floorVal.x, 0.5)).x;
+ latticeIdx.y = texture(uTextureSampler_0_Stage5, vec2(floorVal.z, 0.5)).x;
+ vec4 bcoords = fract(latticeIdx.xyxy + floorVal.yyww);
+ vec2 uv;
+ vec4 lattice = texture(uTextureSampler_1_Stage5, vec2(bcoords.x, chanCoord)).zyxw;
+ uv.x = dot((lattice.yw + lattice.xz * vec2(0.00390625)) * vec2(2.0) - vec2(1.0), fractVal);
+ fractVal.x -= 1.0;
+ lattice = texture(uTextureSampler_1_Stage5, vec2(bcoords.y, chanCoord)).zyxw;
+ uv.y = dot((lattice.yw + lattice.xz * vec2(0.00390625)) * vec2(2.0) - vec2(1.0), fractVal);
+ vec2 ab;
+ ab.x = mix(uv.x, uv.y, noiseSmooth.x);
+ fractVal.y -= 1.0;
+ lattice = texture(uTextureSampler_1_Stage5, vec2(bcoords.w, chanCoord)).zyxw;
+ uv.y = dot((lattice.yw + lattice.xz * vec2(0.00390625)) * vec2(2.0) - vec2(1.0), fractVal);
+ fractVal.x += 1.0;
+ lattice = texture(uTextureSampler_1_Stage5, vec2(bcoords.z, chanCoord)).zyxw;
+ uv.x = dot((lattice.yw + lattice.xz * vec2(0.00390625)) * vec2(2.0) - vec2(1.0), fractVal);
+ ab.y = mix(uv.x, uv.y, noiseSmooth.x);
+ return mix(ab.x, ab.y, noiseSmooth.y);
+}
+vec4 PerlinNoise_Stage5_c2_c0(vec4 _input) {
+ vec4 _output;
+ vec2 noiseVec = floor(vTransformedCoords_4_Stage0) * ubaseFrequency_Stage5_c2_c0;
+ _output = vec4(0.0);
+ float ratio = 1.0;
+ for (int octave = 0;octave < 5; ++octave) {
+ _output += abs(vec4(perlinnoise_Stage5_c2_c0(0.125, noiseVec), perlinnoise_Stage5_c2_c0(0.375, noiseVec), perlinnoise_Stage5_c2_c0(0.625, noiseVec), perlinnoise_Stage5_c2_c0(0.875, noiseVec))) * ratio;
+ noiseVec *= vec2(2.0);
+ ratio *= 0.5;
+ }
+ _output = clamp(_output, 0.0, 1.0);
+ _output = vec4(_output.xyz * _output.www, _output.w);
+ return _output;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ vec4 circleEdge;
+ circleEdge = vinCircleEdge_Stage0;
+ vec3 clipPlane;
+ clipPlane = vinClipPlane_Stage0;
+ float d = length(circleEdge.xy);
+ float distanceToOuterEdge = circleEdge.z * (1.0 - d);
+ float edgeAlpha = clamp(distanceToOuterEdge, 0.0, 1.0);
+ float clip = clamp(circleEdge.z * dot(circleEdge.xy, clipPlane.xy) + clipPlane.z, 0.0, 1.0);
+ edgeAlpha *= clip;
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = outputCoverage_Stage0;
+ output_Stage1 = um_Stage1 * inputColor + uv_Stage1;
+ {
+ output_Stage1 = clamp(output_Stage1, 0.0, 1.0);
+ }
+ }
+ vec4 output_Stage3;
+ {
+ vec2 coord = vTransformedCoords_0_Stage0;
+ vec2 zoom_coord = uoffset_Stage3 + coord * vec2(uxInvZoom_Stage3, uyInvZoom_Stage3);
+ vec2 delta = (coord - uboundsUniform_Stage3.xy) * uboundsUniform_Stage3.zw;
+ delta = min(delta, vec2(1.0, 1.0) - delta);
+ delta *= vec2(uxInvInset_Stage3, uyInvInset_Stage3);
+ float weight = 0.0;
+ if (delta.x < 2.0 && delta.y < 2.0) {
+ delta = vec2(2.0, 2.0) - delta;
+ float dist = length(delta);
+ dist = max(2.0 - dist, 0.0);
+ weight = min(dist * dist, 1.0);
+ } else {
+ vec2 delta_squared = delta * delta;
+ weight = min(min(delta_squared.x, delta_squared.y), 1.0);
+ }
+ output_Stage3 = texture(uTextureSampler_0_Stage3, mix(coord, zoom_coord, weight));
+ }
+ vec4 output_Stage4;
+ {
+ vec4 inputColor = vec4(output_Stage3.xyz, 1.0);
+ output_Stage4 = blend_src_over(AlphaThresholdFragmentProcessor_Stage4_c0_c0(inputColor), DisplacementMap_Stage4_c1_c0(inputColor));
+ output_Stage4 *= output_Stage3.w;
+ }
+ vec4 output_Stage5;
+ {
+ output_Stage5 = blend_dst_in(output_Stage4, PerlinNoise_Stage5_c2_c0(vec4(1.0)));
+ }
+ vec4 output_Stage6;
+ {
+ float nonZeroAlpha = max(output_Stage5.w, 9.9999997473787516e-05);
+ vec4 coord = vec4(output_Stage5.xyz / nonZeroAlpha, nonZeroAlpha);
+ coord = coord * 0.9960939884185791 + vec4(0.0019529999699443579, 0.0019529999699443579, 0.0019529999699443579, 0.0019529999699443579);
+ output_Stage6.w = texture(uTextureSampler_0_Stage6, vec2(coord.w, 0.125)).w;
+ output_Stage6.x = texture(uTextureSampler_0_Stage6, vec2(coord.x, 0.375)).w;
+ output_Stage6.y = texture(uTextureSampler_0_Stage6, vec2(coord.y, 0.625)).w;
+ output_Stage6.z = texture(uTextureSampler_0_Stage6, vec2(coord.z, 0.875)).w;
+ output_Stage6.xyz *= output_Stage6.w;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+uniform mat3 uCoordTransformMatrix_3_Stage0;
+uniform mat3 uCoordTransformMatrix_4_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec4 inCircleEdge;
+in vec3 inClipPlane;
+noperspective out vec4 vinCircleEdge_Stage0;
+noperspective out vec3 vinClipPlane_Stage0;
+noperspective out vec4 vinColor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+noperspective out vec2 vTransformedCoords_3_Stage0;
+noperspective out vec2 vTransformedCoords_4_Stage0;
+void main() {
+ vinCircleEdge_Stage0 = inCircleEdge;
+ vinClipPlane_Stage0 = inClipPlane;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_3_Stage0 = (uCoordTransformMatrix_3_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_4_Stage0 = (uCoordTransformMatrix_4_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1555.shader_test b/shaders/skia/1555.shader_test
new file mode 100644
index 0000000..5d620e0
--- /dev/null
+++ b/shaders/skia/1555.shader_test
@@ -0,0 +1,26 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+noperspective in vec4 vcolor_Stage0;
+void main() {
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 inPosition;
+in vec4 inColor;
+in vec2 inLocalCoord;
+noperspective out vec4 vcolor_Stage0;
+void main() {
+ vec4 color = inColor;
+ vcolor_Stage0 = color;
+ vec2 pos2 = inPosition;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1561.shader_test b/shaders/skia/1561.shader_test
new file mode 100644
index 0000000..255b1db
--- /dev/null
+++ b/shaders/skia/1561.shader_test
@@ -0,0 +1,512 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1_c0_c0_c0_c0_c0_c0;
+uniform vec4 uKernel_Stage1_c0_c0_c0_c0_c0_c0[5];
+uniform vec2 uKernelOffset_Stage1_c0_c0_c0_c0_c0_c0;
+uniform float uGain_Stage1_c0_c0_c0_c0_c0_c0;
+uniform float uBias_Stage1_c0_c0_c0_c0_c0_c0;
+uniform vec4 uboundsUniform_Stage1_c0_c0_c0_c0_c1_c0;
+uniform float uxInvZoom_Stage1_c0_c0_c0_c0_c1_c0;
+uniform float uyInvZoom_Stage1_c0_c0_c0_c0_c1_c0;
+uniform float uxInvInset_Stage1_c0_c0_c0_c0_c1_c0;
+uniform float uyInvInset_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec2 uoffset_Stage1_c0_c0_c0_c0_c1_c0;
+uniform float uinnerThreshold_Stage1_c0_c0_c1_c0_c0_c0;
+uniform float uouterThreshold_Stage1_c0_c0_c1_c0_c0_c0;
+uniform mat4 um_Stage1_c0_c0_c1_c0_c1_c0;
+uniform vec4 uv_Stage1_c0_c0_c1_c0_c1_c0;
+uniform vec4 ucircleData_Stage1_c1_c0_c0_c0_c0_c0;
+uniform vec4 urectUniform_Stage1_c1_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+uniform sampler2D uTextureSampler_2_Stage1;
+uniform sampler2D uTextureSampler_3_Stage1;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+noperspective in float vinCoverage_Stage0;
+vec4 MatrixConvolution_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 sum = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0 - uKernelOffset_Stage1_c0_c0_c0_c0_c0_c0 * uImageIncrement_Stage1_c0_c0_c0_c0_c0_c0;
+ vec4 c;
+ {
+ float k = uKernel_Stage1_c0_c0_c0_c0_c0_c0[0].x;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c0_c0_c0_c0[0].y;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1_c0_c0_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c0_c0_c0_c0[0].z;
+ {
+ vec2 origCoord = coord + vec2(2.0, 0.0) * uImageIncrement_Stage1_c0_c0_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c0_c0_c0_c0[0].w;
+ {
+ vec2 origCoord = coord + vec2(3.0, 0.0) * uImageIncrement_Stage1_c0_c0_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c0_c0_c0_c0[1].x;
+ {
+ vec2 origCoord = coord + vec2(4.0, 0.0) * uImageIncrement_Stage1_c0_c0_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c0_c0_c0_c0[1].y;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1_c0_c0_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c0_c0_c0_c0[1].z;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1_c0_c0_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c0_c0_c0_c0[1].w;
+ {
+ vec2 origCoord = coord + vec2(2.0, 1.0) * uImageIncrement_Stage1_c0_c0_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c0_c0_c0_c0[2].x;
+ {
+ vec2 origCoord = coord + vec2(3.0, 1.0) * uImageIncrement_Stage1_c0_c0_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c0_c0_c0_c0[2].y;
+ {
+ vec2 origCoord = coord + vec2(4.0, 1.0) * uImageIncrement_Stage1_c0_c0_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c0_c0_c0_c0[2].z;
+ {
+ vec2 origCoord = coord + vec2(0.0, 2.0) * uImageIncrement_Stage1_c0_c0_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c0_c0_c0_c0[2].w;
+ {
+ vec2 origCoord = coord + vec2(1.0, 2.0) * uImageIncrement_Stage1_c0_c0_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c0_c0_c0_c0[3].x;
+ {
+ vec2 origCoord = coord + vec2(2.0, 2.0) * uImageIncrement_Stage1_c0_c0_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c0_c0_c0_c0[3].y;
+ {
+ vec2 origCoord = coord + vec2(3.0, 2.0) * uImageIncrement_Stage1_c0_c0_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c0_c0_c0_c0[3].z;
+ {
+ vec2 origCoord = coord + vec2(4.0, 2.0) * uImageIncrement_Stage1_c0_c0_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c0_c0_c0_c0[3].w;
+ {
+ vec2 origCoord = coord + vec2(0.0, 3.0) * uImageIncrement_Stage1_c0_c0_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c0_c0_c0_c0[4].x;
+ {
+ vec2 origCoord = coord + vec2(1.0, 3.0) * uImageIncrement_Stage1_c0_c0_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c0_c0_c0_c0[4].y;
+ {
+ vec2 origCoord = coord + vec2(2.0, 3.0) * uImageIncrement_Stage1_c0_c0_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c0_c0_c0_c0[4].z;
+ {
+ vec2 origCoord = coord + vec2(3.0, 3.0) * uImageIncrement_Stage1_c0_c0_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c0_c0_c0_c0[4].w;
+ {
+ vec2 origCoord = coord + vec2(4.0, 3.0) * uImageIncrement_Stage1_c0_c0_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ vec2 origCoord = vTransformedCoords_0_Stage0;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ _output.w = c.w;
+ _output.xyz = clamp(sum.xyz * uGain_Stage1_c0_c0_c0_c0_c0_c0 + uBias_Stage1_c0_c0_c0_c0_c0_c0, 0.0, 1.0);
+ _output.xyz *= _output.w;
+ _output *= _input;
+ return _output;
+}
+vec4 MagnifierEffect_Stage1_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coord = vTransformedCoords_1_Stage0;
+ vec2 zoom_coord = uoffset_Stage1_c0_c0_c0_c0_c1_c0 + coord * vec2(uxInvZoom_Stage1_c0_c0_c0_c0_c1_c0, uyInvZoom_Stage1_c0_c0_c0_c0_c1_c0);
+ vec2 delta = (coord - uboundsUniform_Stage1_c0_c0_c0_c0_c1_c0.xy) * uboundsUniform_Stage1_c0_c0_c0_c0_c1_c0.zw;
+ delta = min(delta, vec2(1.0, 1.0) - delta);
+ delta *= vec2(uxInvInset_Stage1_c0_c0_c0_c0_c1_c0, uyInvInset_Stage1_c0_c0_c0_c0_c1_c0);
+ float weight = 0.0;
+ if (delta.x < 2.0 && delta.y < 2.0) {
+ delta = vec2(2.0, 2.0) - delta;
+ float dist = length(delta);
+ dist = max(2.0 - dist, 0.0);
+ weight = min(dist * dist, 1.0);
+ } else {
+ vec2 delta_squared = delta * delta;
+ weight = min(min(delta_squared.x, delta_squared.y), 1.0);
+ }
+ _output = texture(uTextureSampler_1_Stage1, mix(coord, zoom_coord, weight));
+ return _output;
+}
+float _blend_color_luminance(vec3 color) {
+ return dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), color);
+}
+vec3 _blend_set_color_luminance(vec3 hueSatColor, float alpha, vec3 lumColor) {
+ float lum = _blend_color_luminance(lumColor);
+ vec3 result = (lum - _blend_color_luminance(hueSatColor)) + hueSatColor;
+ float minComp = min(min(result.x, result.y), result.z);
+ float maxComp = max(max(result.x, result.y), result.z);
+ if (minComp < 0.0 && lum != minComp) {
+ result = lum + ((result - lum) * lum) / (lum - minComp);
+ }
+ if (maxComp > alpha && maxComp != lum) {
+ return lum + ((result - lum) * (alpha - lum)) / (maxComp - lum);
+ }
+ return result;
+}
+vec4 blend_luminosity(vec4 src, vec4 dst) {
+ float alpha = dst.w * src.w;
+ vec3 sda = src.xyz * dst.w;
+ vec3 dsa = dst.xyz * src.w;
+ return vec4((((_blend_set_color_luminance(dsa, alpha, sda) + dst.xyz) - dsa) + src.xyz) - sda, (src.w + dst.w) - alpha);
+}
+vec4 ComposeTwo_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_luminosity(MatrixConvolution_Stage1_c0_c0_c0_c0_c0_c0(inputColor), MagnifierEffect_Stage1_c0_c0_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 AlphaThresholdFragmentProcessor_Stage1_c0_c0_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 color = _input;
+ vec4 mask_color = texture(uTextureSampler_2_Stage1, vTransformedCoords_2_Stage0);
+ if (mask_color.w < 0.5) {
+ if (color.w > uouterThreshold_Stage1_c0_c0_c1_c0_c0_c0) {
+ float scale = uouterThreshold_Stage1_c0_c0_c1_c0_c0_c0 / color.w;
+ color.xyz *= scale;
+ color.w = uouterThreshold_Stage1_c0_c0_c1_c0_c0_c0;
+ }
+ } else if (color.w < uinnerThreshold_Stage1_c0_c0_c1_c0_c0_c0) {
+ float scale = uinnerThreshold_Stage1_c0_c0_c1_c0_c0_c0 / max(0.0010000000474974513, color.w);
+ color.xyz *= scale;
+ color.w = uinnerThreshold_Stage1_c0_c0_c1_c0_c0_c0;
+ }
+ _output = color;
+ return _output;
+}
+vec4 ColorMatrixFragmentProcessor_Stage1_c0_c0_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = _input;
+ {
+ float nonZeroAlpha = max(inputColor.w, 9.9999997473787516e-05);
+ inputColor = vec4(inputColor.xyz / nonZeroAlpha, inputColor.w);
+ }
+ _output = um_Stage1_c0_c0_c1_c0_c1_c0 * inputColor + uv_Stage1_c0_c0_c1_c0_c1_c0;
+ {
+ _output = clamp(_output, 0.0, 1.0);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_xor(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src + (1.0 - src.w) * dst;
+}
+vec4 ComposeTwo_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_xor(AlphaThresholdFragmentProcessor_Stage1_c0_c0_c1_c0_c0_c0(inputColor), ColorMatrixFragmentProcessor_Stage1_c0_c0_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 ComposeTwo_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_xor(ComposeTwo_Stage1_c0_c0_c0_c0(inputColor), ComposeTwo_Stage1_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 CircleBlurFragmentProcessor_Stage1_c1_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 vec = vec2((gl_FragCoord.x - ucircleData_Stage1_c1_c0_c0_c0_c0_c0.x) * ucircleData_Stage1_c1_c0_c0_c0_c0_c0.w, (gl_FragCoord.y - ucircleData_Stage1_c1_c0_c0_c0_c0_c0.y) * ucircleData_Stage1_c1_c0_c0_c0_c0_c0.w);
+ float dist = length(vec) + (0.5 - ucircleData_Stage1_c1_c0_c0_c0_c0_c0.z) * ucircleData_Stage1_c1_c0_c0_c0_c0_c0.w;
+ _output = _input * texture(uTextureSampler_3_Stage1, vec2(dist, 0.5)).w;
+ return _output;
+}
+vec4 Big_Ole_Key_Stage1_c1_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = _input;
+ return _output;
+}
+float _blend_overlay_component(float sc, float sa, float dc, float da) {
+ if (2.0 * dc <= da) {
+ return (2.0 * sc) * dc;
+ }
+ return sa * da - (2.0 * (da - dc)) * (sa - sc);
+}
+vec4 blend_overlay(vec4 src, vec4 dst) {
+ vec4 result = vec4(_blend_overlay_component(src.x, src.w, dst.x, dst.w), _blend_overlay_component(src.y, src.w, dst.y, dst.w), _blend_overlay_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+ result.xyz += dst.xyz * (1.0 - src.w) + src.xyz * (1.0 - dst.w);
+ return result;
+}
+vec4 ComposeTwo_Stage1_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_overlay(CircleBlurFragmentProcessor_Stage1_c1_c0_c0_c0_c0_c0(inputColor), Big_Ole_Key_Stage1_c1_c0_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 AARectEffect_Stage1_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float alpha;
+ {
+ alpha = float(all(greaterThan(vec4(gl_FragCoord.xy, urectUniform_Stage1_c1_c0_c1_c0.zw), vec4(urectUniform_Stage1_c1_c0_c1_c0.xy, gl_FragCoord.xy))) ? 1 : 0);
+ }
+ {
+ alpha = 1.0 - alpha;
+ }
+ _output = _input * alpha;
+ return _output;
+}
+vec4 ComposeTwo_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_luminosity(ComposeTwo_Stage1_c1_c0_c0_c0(inputColor), AARectEffect_Stage1_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 blend_src_out(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ float alpha = 1.0;
+ alpha = vinCoverage_Stage0;
+ outputCoverage_Stage0 = vec4(alpha);
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_src_out(ComposeTwo_Stage1_c0_c0(inputColor), ComposeTwo_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ sk_FragColor = output_Stage1 * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in float inCoverage;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+noperspective out float vinCoverage_Stage0;
+void main() {
+ vec4 color = inColor;
+ vcolor_Stage0 = color;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(inPosition, 1.0)).xy;
+ vinCoverage_Stage0 = inCoverage;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1567.shader_test b/shaders/skia/1567.shader_test
new file mode 100644
index 0000000..0aea78f
--- /dev/null
+++ b/shaders/skia/1567.shader_test
@@ -0,0 +1,412 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1_c0_c0_c0_c0;
+uniform vec2 uBounds_Stage1_c0_c0_c0_c0;
+uniform vec4 uKernel_Stage1_c0_c0_c0_c0[5];
+uniform vec4 ucircle_Stage1_c0_c0_c1_c0_c0_c0;
+uniform vec2 uImageIncrement_Stage1_c0_c0_c1_c0_c1_c0;
+uniform float uSurfaceScale_Stage1_c0_c0_c1_c0_c1_c0;
+uniform vec3 uLightColor_Stage1_c0_c0_c1_c0_c1_c0;
+uniform float uKD_Stage1_c0_c0_c1_c0_c1_c0;
+uniform vec4 uTexDom_Stage1_c0_c0_c1_c0_c1_c0;
+uniform vec3 uDecalParams_Stage1_c0_c0_c1_c0_c1_c0;
+uniform vec3 uLightDirection_Stage1_c0_c0_c1_c0_c1_c0;
+uniform vec3 uedges_Stage1_c1_c0_c0_c0[2];
+uniform vec4 ucolor_Stage1_c1_c0_c1_c0_c0_c0;
+uniform vec3 uedges_Stage1_c1_c0_c1_c0_c1_c0[5];
+uniform sampler2D uTextureSampler_0_Stage0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vtextureCoords_Stage0;
+flat in vec4 vtextureDomain_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 GaussianConvolution_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0 - 8.0 * uImageIncrement_Stage1_c0_c0_c0_c0;
+ vec2 coordSampled = vec2(0.0, 0.0);
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage1_c0_c0_c0_c0.x, uBounds_Stage1_c0_c0_c0_c0.y - uBounds_Stage1_c0_c0_c0_c0.x) + uBounds_Stage1_c0_c0_c0_c0.x;
+ _output += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c0_c0[0].x;
+ coord += uImageIncrement_Stage1_c0_c0_c0_c0;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage1_c0_c0_c0_c0.x, uBounds_Stage1_c0_c0_c0_c0.y - uBounds_Stage1_c0_c0_c0_c0.x) + uBounds_Stage1_c0_c0_c0_c0.x;
+ _output += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c0_c0[0].y;
+ coord += uImageIncrement_Stage1_c0_c0_c0_c0;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage1_c0_c0_c0_c0.x, uBounds_Stage1_c0_c0_c0_c0.y - uBounds_Stage1_c0_c0_c0_c0.x) + uBounds_Stage1_c0_c0_c0_c0.x;
+ _output += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c0_c0[0].z;
+ coord += uImageIncrement_Stage1_c0_c0_c0_c0;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage1_c0_c0_c0_c0.x, uBounds_Stage1_c0_c0_c0_c0.y - uBounds_Stage1_c0_c0_c0_c0.x) + uBounds_Stage1_c0_c0_c0_c0.x;
+ _output += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c0_c0[0].w;
+ coord += uImageIncrement_Stage1_c0_c0_c0_c0;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage1_c0_c0_c0_c0.x, uBounds_Stage1_c0_c0_c0_c0.y - uBounds_Stage1_c0_c0_c0_c0.x) + uBounds_Stage1_c0_c0_c0_c0.x;
+ _output += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c0_c0[1].x;
+ coord += uImageIncrement_Stage1_c0_c0_c0_c0;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage1_c0_c0_c0_c0.x, uBounds_Stage1_c0_c0_c0_c0.y - uBounds_Stage1_c0_c0_c0_c0.x) + uBounds_Stage1_c0_c0_c0_c0.x;
+ _output += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c0_c0[1].y;
+ coord += uImageIncrement_Stage1_c0_c0_c0_c0;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage1_c0_c0_c0_c0.x, uBounds_Stage1_c0_c0_c0_c0.y - uBounds_Stage1_c0_c0_c0_c0.x) + uBounds_Stage1_c0_c0_c0_c0.x;
+ _output += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c0_c0[1].z;
+ coord += uImageIncrement_Stage1_c0_c0_c0_c0;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage1_c0_c0_c0_c0.x, uBounds_Stage1_c0_c0_c0_c0.y - uBounds_Stage1_c0_c0_c0_c0.x) + uBounds_Stage1_c0_c0_c0_c0.x;
+ _output += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c0_c0[1].w;
+ coord += uImageIncrement_Stage1_c0_c0_c0_c0;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage1_c0_c0_c0_c0.x, uBounds_Stage1_c0_c0_c0_c0.y - uBounds_Stage1_c0_c0_c0_c0.x) + uBounds_Stage1_c0_c0_c0_c0.x;
+ _output += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c0_c0[2].x;
+ coord += uImageIncrement_Stage1_c0_c0_c0_c0;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage1_c0_c0_c0_c0.x, uBounds_Stage1_c0_c0_c0_c0.y - uBounds_Stage1_c0_c0_c0_c0.x) + uBounds_Stage1_c0_c0_c0_c0.x;
+ _output += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c0_c0[2].y;
+ coord += uImageIncrement_Stage1_c0_c0_c0_c0;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage1_c0_c0_c0_c0.x, uBounds_Stage1_c0_c0_c0_c0.y - uBounds_Stage1_c0_c0_c0_c0.x) + uBounds_Stage1_c0_c0_c0_c0.x;
+ _output += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c0_c0[2].z;
+ coord += uImageIncrement_Stage1_c0_c0_c0_c0;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage1_c0_c0_c0_c0.x, uBounds_Stage1_c0_c0_c0_c0.y - uBounds_Stage1_c0_c0_c0_c0.x) + uBounds_Stage1_c0_c0_c0_c0.x;
+ _output += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c0_c0[2].w;
+ coord += uImageIncrement_Stage1_c0_c0_c0_c0;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage1_c0_c0_c0_c0.x, uBounds_Stage1_c0_c0_c0_c0.y - uBounds_Stage1_c0_c0_c0_c0.x) + uBounds_Stage1_c0_c0_c0_c0.x;
+ _output += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c0_c0[3].x;
+ coord += uImageIncrement_Stage1_c0_c0_c0_c0;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage1_c0_c0_c0_c0.x, uBounds_Stage1_c0_c0_c0_c0.y - uBounds_Stage1_c0_c0_c0_c0.x) + uBounds_Stage1_c0_c0_c0_c0.x;
+ _output += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c0_c0[3].y;
+ coord += uImageIncrement_Stage1_c0_c0_c0_c0;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage1_c0_c0_c0_c0.x, uBounds_Stage1_c0_c0_c0_c0.y - uBounds_Stage1_c0_c0_c0_c0.x) + uBounds_Stage1_c0_c0_c0_c0.x;
+ _output += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c0_c0[3].z;
+ coord += uImageIncrement_Stage1_c0_c0_c0_c0;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage1_c0_c0_c0_c0.x, uBounds_Stage1_c0_c0_c0_c0.y - uBounds_Stage1_c0_c0_c0_c0.x) + uBounds_Stage1_c0_c0_c0_c0.x;
+ _output += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c0_c0[3].w;
+ coord += uImageIncrement_Stage1_c0_c0_c0_c0;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage1_c0_c0_c0_c0.x, uBounds_Stage1_c0_c0_c0_c0.y - uBounds_Stage1_c0_c0_c0_c0.x) + uBounds_Stage1_c0_c0_c0_c0.x;
+ _output += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c0_c0[4].x;
+ coord += uImageIncrement_Stage1_c0_c0_c0_c0;
+ _output *= _input;
+ return _output;
+}
+vec4 CircleEffect_Stage1_c0_c0_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float d;
+ {
+ d = (1.0 - length((ucircle_Stage1_c0_c0_c1_c0_c0_c0.xy - gl_FragCoord.xy) * ucircle_Stage1_c0_c0_c1_c0_c0_c0.w)) * ucircle_Stage1_c0_c0_c1_c0_c0_c0.z;
+ }
+ {
+ _output = d > 0.5 ? _input : vec4(0.0);
+ }
+ return _output;
+}
+vec4 light_Stage1_c0_c0_c1_c0_c1_c0(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ float colorScale = uKD_Stage1_c0_c0_c1_c0_c1_c0 * dot(normal, surfaceToLight);
+ return vec4(lightColor * clamp(colorScale, 0.0, 1.0), 1.0);
+}
+float sobel_Stage1_c0_c0_c1_c0_c1_c0(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage1_c0_c0_c1_c0_c1_c0(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage1_c0_c0_c1_c0_c1_c0(float m[9], float surfaceScale) {
+ return pointToNormal_Stage1_c0_c0_c1_c0_c1_c0(sobel_Stage1_c0_c0_c1_c0_c1_c0(0.0, 0.0, m[3], m[4], m[6], m[7], 0.66666698455810547), sobel_Stage1_c0_c0_c1_c0_c1_c0(m[3], m[6], m[4], m[7], 0.0, 0.0, 0.66666698455810547), surfaceScale);
+}
+vec4 DiffuseLighting_Stage1_c0_c0_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coord = vTransformedCoords_1_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage1_c0_c0_c1_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c1_c0_c1_c0.xy, uTexDom_Stage1_c0_c0_c1_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c1_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c1_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c1_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c1_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp0 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1_c0_c0_c1_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c1_c0_c1_c0.xy, uTexDom_Stage1_c0_c0_c1_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c1_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c1_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c1_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c1_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1_c0_c0_c1_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c1_c0_c1_c0.xy, uTexDom_Stage1_c0_c0_c1_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c1_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c1_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c1_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c1_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage1_c0_c0_c1_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c1_c0_c1_c0.xy, uTexDom_Stage1_c0_c0_c1_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c1_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c1_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c1_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c1_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c1_c0_c1_c0.xy, uTexDom_Stage1_c0_c0_c1_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c1_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c1_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c1_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c1_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1_c0_c0_c1_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c1_c0_c1_c0.xy, uTexDom_Stage1_c0_c0_c1_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c1_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c1_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c1_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c1_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp5 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage1_c0_c0_c1_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c1_c0_c1_c0.xy, uTexDom_Stage1_c0_c0_c1_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c1_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c1_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c1_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c1_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp6 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage1_c0_c0_c1_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c1_c0_c1_c0.xy, uTexDom_Stage1_c0_c0_c1_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c1_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c1_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c1_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c1_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp7 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage1_c0_c0_c1_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c1_c0_c1_c0.xy, uTexDom_Stage1_c0_c0_c1_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c1_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c1_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c1_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c1_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp8 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = uLightDirection_Stage1_c0_c0_c1_c0_c1_c0;
+ _output = light_Stage1_c0_c0_c1_c0_c1_c0(normal_Stage1_c0_c0_c1_c0_c1_c0(m, uSurfaceScale_Stage1_c0_c0_c1_c0_c1_c0), surfaceToLight, uLightColor_Stage1_c0_c0_c1_c0_c1_c0);
+ _output *= _input;
+ return _output;
+}
+vec4 blend_plus(vec4 src, vec4 dst) {
+ return min(src + dst, 1.0);
+}
+vec4 ComposeTwo_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_plus(CircleEffect_Stage1_c0_c0_c1_c0_c0_c0(inputColor), DiffuseLighting_Stage1_c0_c0_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 blend_src_out(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src;
+}
+vec4 ComposeTwo_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_src_out(GaussianConvolution_Stage1_c0_c0_c0_c0(inputColor), ComposeTwo_Stage1_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 ConvexPoly_Stage1_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float alpha = 1.0;
+ float edge;
+ edge = dot(uedges_Stage1_c1_c0_c0_c0[0], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage1_c1_c0_c0_c0[1], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ _output = _input * alpha;
+ return _output;
+}
+vec4 ConstColorProcessor_Stage1_c1_c0_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = _input * ucolor_Stage1_c1_c0_c1_c0_c0_c0;
+ }
+ return _output;
+}
+vec4 ConvexPoly_Stage1_c1_c0_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float alpha = 1.0;
+ float edge;
+ edge = dot(uedges_Stage1_c1_c0_c1_c0_c1_c0[0], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage1_c1_c0_c1_c0_c1_c0[1], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage1_c1_c0_c1_c0_c1_c0[2], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage1_c1_c0_c1_c0_c1_c0[3], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage1_c1_c0_c1_c0_c1_c0[4], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ _output = _input * alpha;
+ return _output;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 blend_lighten(vec4 src, vec4 dst) {
+ vec4 result = blend_src_over(src, dst);
+ result.xyz = max(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
+ return result;
+}
+vec4 ComposeTwo_Stage1_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_lighten(ConstColorProcessor_Stage1_c1_c0_c1_c0_c0_c0(inputColor), ConvexPoly_Stage1_c1_c0_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 blend_multiply(vec4 src, vec4 dst) {
+ return vec4(((1.0 - src.w) * dst.xyz + (1.0 - dst.w) * src.xyz) + src.xyz * dst.xyz, src.w + (1.0 - src.w) * dst.w);
+}
+vec4 ComposeTwo_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_multiply(ConvexPoly_Stage1_c1_c0_c0_c0(inputColor), ComposeTwo_Stage1_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 blend_screen(vec4 src, vec4 dst) {
+ return src + (1.0 - src) * dst;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ vec2 textureCoords;
+ textureCoords = vtextureCoords_Stage0;
+ vec4 textureDomain;
+ textureDomain = vtextureDomain_Stage0;
+ outputColor_Stage0 = vcolor_Stage0;
+ outputColor_Stage0 = texture(uTextureSampler_0_Stage0, clamp(textureCoords, textureDomain.xy, textureDomain.zw)) * outputColor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_screen(ComposeTwo_Stage1_c0_c0(inputColor), ComposeTwo_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 textureCoords;
+in vec4 textureDomain;
+in vec4 color;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vtextureCoords_Stage0;
+flat out vec4 vtextureDomain_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vec2 pos2 = position;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(textureCoords, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(textureCoords, 1.0)).xy;
+ vtextureCoords_Stage0 = textureCoords;
+ vtextureDomain_Stage0 = textureDomain;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/157-2.shader_test b/shaders/skia/157-2.shader_test
new file mode 100644
index 0000000..4f4e997
--- /dev/null
+++ b/shaders/skia/157-2.shader_test
@@ -0,0 +1,89 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage2_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c1_c0;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+vec4 blend_src_atop(vec4 src, vec4 dst) {
+ return dst.w * src + (1.0 - src.w) * dst;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_dst_in(outputColor_Stage0, ClampedGradientEffect_Stage1_c0_c0(vec4(1.0)));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_src_atop(ConstColorProcessor_Stage2_c1_c0(vec4(1.0)), output_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/157-3.shader_test b/shaders/skia/157-3.shader_test
new file mode 100644
index 0000000..f1548d7
--- /dev/null
+++ b/shaders/skia/157-3.shader_test
@@ -0,0 +1,156 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform float uSurfaceScale_Stage1;
+uniform vec3 uLightColor_Stage1;
+uniform float uKS_Stage1;
+uniform float uShininess_Stage1;
+uniform vec3 uLightLocation_Stage1;
+uniform float uExponent_Stage1;
+uniform float uCosInnerConeAngle_Stage1;
+uniform float uCosOuterConeAngle_Stage1;
+uniform float uConeScale_Stage1;
+uniform vec3 uS_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 light_Stage1(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ vec3 halfDir = normalize(surfaceToLight + vec3(0.0, 0.0, 1.0));
+ float colorScale = uKS_Stage1 * pow(dot(normal, halfDir), uShininess_Stage1);
+ vec3 color = lightColor * clamp(colorScale, 0.0, 1.0);
+ return vec4(color, max(max(color.x, color.y), color.z));
+}
+float sobel_Stage1(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage1(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage1(float m[9], float surfaceScale) {
+ return pointToNormal_Stage1(sobel_Stage1(m[0], m[1], m[3], m[4], m[6], m[7], 0.5), sobel_Stage1(m[0], m[6], m[1], m[7], 0.0, 0.0, 0.33333298563957214), surfaceScale);
+}
+vec3 lightColor_Stage1(vec3 surfaceToLight) {
+ float cosAngle = -dot(surfaceToLight, uS_Stage1);
+ if (cosAngle < uCosOuterConeAngle_Stage1) {
+ return vec3(0.0);
+ }
+ float scale = pow(cosAngle, uExponent_Stage1);
+ if (cosAngle < uCosInnerConeAngle_Stage1) {
+ return ((uLightColor_Stage1 * scale) * (cosAngle - uCosOuterConeAngle_Stage1)) * uConeScale_Stage1;
+ }
+ return uLightColor_Stage1;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ vec2 coord = vTransformedCoords_0_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp0 = textureColor;
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp1 = textureColor;
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp2 = textureColor;
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp3 = textureColor;
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp4 = textureColor;
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp5 = textureColor;
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp6 = textureColor;
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp7 = textureColor;
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp8 = textureColor;
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = normalize(uLightLocation_Stage1 - vec3(gl_FragCoord.xy, uSurfaceScale_Stage1 * m[4]));
+ output_Stage1 = light_Stage1(normal_Stage1(m, uSurfaceScale_Stage1), surfaceToLight, lightColor_Stage1(surfaceToLight));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/157-4.shader_test b/shaders/skia/157-4.shader_test
new file mode 100644
index 0000000..6d159c4
--- /dev/null
+++ b/shaders/skia/157-4.shader_test
@@ -0,0 +1,98 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+uniform vec2 uDstTextureUpperLeft_Stage2;
+uniform vec2 uDstTextureCoordScale_Stage2;
+uniform sampler2D uTextureSampler_0_Stage0;
+uniform sampler2D uDstTextureSampler_Stage2;
+noperspective in vec2 vTextureCoords_Stage0;
+flat in int vTexIndex_Stage0;
+noperspective in vec4 vinColor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ t.x = fract(t.x);
+ }
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 blend_exclusion(vec4 src, vec4 dst) {
+ return vec4((dst.xyz + src.xyz) - (2.0 * dst.xyz) * src.xyz, src.w + (1.0 - src.w) * dst.w);
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ vec4 texColor;
+ {
+ texColor = texture(uTextureSampler_0_Stage0, vTextureCoords_Stage0);
+ }
+ outputCoverage_Stage0 = texColor;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TiledGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ if (all(lessThanEqual(outputCoverage_Stage0.xyz, vec3(0.0)))) {
+ discard;
+ }
+ vec2 _dstTexCoord = (gl_FragCoord.xy - uDstTextureUpperLeft_Stage2) * uDstTextureCoordScale_Stage2;
+ _dstTexCoord.y = 1.0 - _dstTexCoord.y;
+ vec4 _dstColor = texture(uDstTextureSampler_Stage2, _dstTexCoord);
+ sk_FragColor = blend_exclusion(output_Stage1, _dstColor);
+ float lerpRed = mix(_dstColor.w, sk_FragColor.w, outputCoverage_Stage0.x);
+ float lerpBlue = mix(_dstColor.w, sk_FragColor.w, outputCoverage_Stage0.y);
+ float lerpGreen = mix(_dstColor.w, sk_FragColor.w, outputCoverage_Stage0.z);
+ sk_FragColor = outputCoverage_Stage0 * sk_FragColor + (vec4(1.0) - outputCoverage_Stage0) * _dstColor;
+ sk_FragColor.w = max(max(lerpRed, lerpBlue), lerpGreen);
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform vec2 uAtlasSizeInv_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in uvec2 inTextureCoords;
+noperspective out vec2 vTextureCoords_Stage0;
+flat out int vTexIndex_Stage0;
+noperspective out vec4 vinColor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ ivec2 signedCoords = ivec2(int(inTextureCoords.x), int(inTextureCoords.y));
+ vec2 unormTexCoords = vec2(float(signedCoords.x / 2), float(signedCoords.y / 2));
+ vTextureCoords_Stage0 = unormTexCoords * uAtlasSizeInv_Stage0;
+ vTexIndex_Stage0 = 0;
+ vinColor_Stage0 = inColor;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(inPosition.x, inPosition.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/157-6.shader_test b/shaders/skia/157-6.shader_test
new file mode 100644
index 0000000..dbc5d1d
--- /dev/null
+++ b/shaders/skia/157-6.shader_test
@@ -0,0 +1,112 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform vec4 uKernel_Stage1[7];
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0 - 12.0 * uImageIncrement_Stage1;
+ vec2 coordSampled = vec2(0.0, 0.0);
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[4].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[4].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[4].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[4].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[5].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[5].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[5].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[5].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[6].x;
+ coord += uImageIncrement_Stage1;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/157-7.shader_test b/shaders/skia/157-7.shader_test
new file mode 100644
index 0000000..4d80b87
--- /dev/null
+++ b/shaders/skia/157-7.shader_test
@@ -0,0 +1,272 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec2 uScale_Stage1_c1_c0_c0_c0_c0_c0;
+uniform vec4 uTexDom_Stage1_c1_c0_c0_c0_c0_c0;
+uniform vec3 uDecalParams_Stage1_c1_c0_c0_c0_c0_c0;
+uniform vec4 uinnerRect_Stage1_c1_c0_c0_c0_c1_c0;
+uniform vec4 uinvRadiiLTRB_Stage1_c1_c0_c0_c0_c1_c0;
+uniform vec4 ucircleData_Stage1_c1_c0_c1_c0_c0_c0;
+uniform vec2 uImageIncrement_Stage1_c1_c0_c1_c0_c1_c0;
+uniform vec4 uKernel_Stage1_c1_c0_c1_c0_c1_c0[2];
+uniform vec2 uKernelOffset_Stage1_c1_c0_c1_c0_c1_c0;
+uniform float uGain_Stage1_c1_c0_c1_c0_c1_c0;
+uniform float uBias_Stage1_c1_c0_c1_c0_c1_c0;
+uniform vec4 uTexDom_Stage1_c1_c0_c1_c0_c1_c0;
+uniform vec3 uDecalParams_Stage1_c1_c0_c1_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+uniform sampler2D uTextureSampler_2_Stage1;
+uniform sampler2D uTextureSampler_3_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+vec4 ClampFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ float alpha = clamp(_input.w, 0.0, 1.0);
+ _output = vec4(clamp(_input.xyz, 0.0, alpha), alpha);
+ }
+ return _output;
+}
+vec4 DisplacementMap_Stage1_c1_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 dColor = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ dColor.xyz = dColor.w < 9.9999999747524271e-07 ? vec3(0.0) : clamp(dColor.xyz / dColor.w, 0.0, 1.0);
+ vec2 cCoords = vTransformedCoords_1_Stage0 + uScale_Stage1_c1_c0_c0_c0_c0_c0 * (dColor.zz - vec2(0.5));
+ {
+ vec2 origCoord = cCoords;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0_c0_c0.xy, uTexDom_Stage1_c1_c0_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ _output = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ return _output;
+}
+vec4 EllipticalRRect_Stage1_c1_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 dxy0 = uinnerRect_Stage1_c1_c0_c0_c0_c1_c0.xy - gl_FragCoord.xy;
+ vec2 dxy1 = gl_FragCoord.xy - uinnerRect_Stage1_c1_c0_c0_c0_c1_c0.zw;
+ vec2 dxy = max(max(dxy0, dxy1), 0.0);
+ vec2 Z = max(max(dxy0 * uinvRadiiLTRB_Stage1_c1_c0_c0_c0_c1_c0.xy, dxy1 * uinvRadiiLTRB_Stage1_c1_c0_c0_c0_c1_c0.zw), 0.0);
+ float implicit = dot(Z, dxy) - 1.0;
+ float grad_dot = 4.0 * dot(Z, Z);
+ grad_dot = max(grad_dot, 9.9999997473787516e-05);
+ float approx_dist = implicit * inversesqrt(grad_dot);
+ float alpha = clamp(0.5 - approx_dist, 0.0, 1.0);
+ _output = _input * alpha;
+ return _output;
+}
+vec4 blend_dst_atop(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src + src.w * dst;
+}
+vec4 ComposeTwo_Stage1_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_dst_atop(DisplacementMap_Stage1_c1_c0_c0_c0_c0_c0(inputColor), EllipticalRRect_Stage1_c1_c0_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 CircleBlurFragmentProcessor_Stage1_c1_c0_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 vec = vec2((gl_FragCoord.x - ucircleData_Stage1_c1_c0_c1_c0_c0_c0.x) * ucircleData_Stage1_c1_c0_c1_c0_c0_c0.w, (gl_FragCoord.y - ucircleData_Stage1_c1_c0_c1_c0_c0_c0.y) * ucircleData_Stage1_c1_c0_c1_c0_c0_c0.w);
+ float dist = length(vec) + (0.5 - ucircleData_Stage1_c1_c0_c1_c0_c0_c0.z) * ucircleData_Stage1_c1_c0_c1_c0_c0_c0.w;
+ _output = _input * texture(uTextureSampler_2_Stage1, vec2(dist, 0.5)).w;
+ return _output;
+}
+vec4 MatrixConvolution_Stage1_c1_c0_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 sum = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_2_Stage0 - uKernelOffset_Stage1_c1_c0_c1_c0_c1_c0 * uImageIncrement_Stage1_c1_c0_c1_c0_c1_c0;
+ vec4 c;
+ {
+ float k = uKernel_Stage1_c1_c0_c1_c0_c1_c0[0].x;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c1_c0_c1_c0.xy, uTexDom_Stage1_c1_c0_c1_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_3_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c1_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c1_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c1_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c1_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0_c1_c0_c1_c0[0].y;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1_c1_c0_c1_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c1_c0_c1_c0.xy, uTexDom_Stage1_c1_c0_c1_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_3_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c1_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c1_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c1_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c1_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0_c1_c0_c1_c0[0].z;
+ {
+ vec2 origCoord = coord + vec2(2.0, 0.0) * uImageIncrement_Stage1_c1_c0_c1_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c1_c0_c1_c0.xy, uTexDom_Stage1_c1_c0_c1_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_3_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c1_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c1_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c1_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c1_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0_c1_c0_c1_c0[0].w;
+ {
+ vec2 origCoord = coord + vec2(3.0, 0.0) * uImageIncrement_Stage1_c1_c0_c1_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c1_c0_c1_c0.xy, uTexDom_Stage1_c1_c0_c1_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_3_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c1_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c1_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c1_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c1_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0_c1_c0_c1_c0[1].x;
+ {
+ vec2 origCoord = coord + vec2(4.0, 0.0) * uImageIncrement_Stage1_c1_c0_c1_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c1_c0_c1_c0.xy, uTexDom_Stage1_c1_c0_c1_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_3_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c1_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c1_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c1_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c1_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0_c1_c0_c1_c0[1].y;
+ {
+ vec2 origCoord = coord + vec2(5.0, 0.0) * uImageIncrement_Stage1_c1_c0_c1_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c1_c0_c1_c0.xy, uTexDom_Stage1_c1_c0_c1_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_3_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c1_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c1_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c1_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c1_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0_c1_c0_c1_c0[1].z;
+ {
+ vec2 origCoord = coord + vec2(6.0, 0.0) * uImageIncrement_Stage1_c1_c0_c1_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c1_c0_c1_c0.xy, uTexDom_Stage1_c1_c0_c1_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_3_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c1_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c1_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c1_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c1_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ _output = sum * uGain_Stage1_c1_c0_c1_c0_c1_c0 + uBias_Stage1_c1_c0_c1_c0_c1_c0;
+ _output.w = clamp(_output.w, 0.0, 1.0);
+ _output.xyz = clamp(_output.xyz, 0.0, _output.w);
+ _output *= _input;
+ return _output;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 ComposeTwo_Stage1_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_src_over(CircleBlurFragmentProcessor_Stage1_c1_c0_c1_c0_c0_c0(inputColor), MatrixConvolution_Stage1_c1_c0_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 blend_modulate(vec4 src, vec4 dst) {
+ return src * dst;
+}
+vec4 ComposeTwo_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_modulate(ComposeTwo_Stage1_c1_c0_c0_c0(inputColor), ComposeTwo_Stage1_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 blend_xor(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src + (1.0 - src.w) * dst;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(vec4(1.0).xyz, 1.0);
+ output_Stage1 = blend_xor(ClampFragmentProcessor_Stage1_c0_c0(inputColor), ComposeTwo_Stage1_c1_c0(inputColor));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/157-8.shader_test b/shaders/skia/157-8.shader_test
new file mode 100644
index 0000000..2cd06a4
--- /dev/null
+++ b/shaders/skia/157-8.shader_test
@@ -0,0 +1,66 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 ColorTableEffect_Stage2_c0_c0(vec4 _input, vec2 _coords) {
+ vec4 _output;
+ float nonZeroAlpha = max(_input.w, 9.9999997473787516e-05);
+ vec4 coord = vec4(_input.xyz / nonZeroAlpha, nonZeroAlpha);
+ coord = coord * 0.9960939884185791 + vec4(0.0019529999699443579, 0.0019529999699443579, 0.0019529999699443579, 0.0019529999699443579);
+ _output.w = texture(uTextureSampler_0_Stage2, vec2(coord.w, 0.125)).w;
+ _output.x = texture(uTextureSampler_0_Stage2, vec2(coord.x, 0.375)).w;
+ _output.y = texture(uTextureSampler_0_Stage2, vec2(coord.y, 0.625)).w;
+ _output.z = texture(uTextureSampler_0_Stage2, vec2(coord.z, 0.875)).w;
+ _output.xyz *= _output.w;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ float coord = vTransformedCoords_1_Stage0.x - 0.5;
+ float f = fract(coord);
+ coord += 0.5 - f;
+ float f2 = f * f;
+ vec4 w = mat4(0.055555555555555552, 0.88888888888888884, 0.055555555555555552, 0.0, -0.5, 0.0, 0.5, 0.0, 0.83333333333333337, -2.0, 1.5, -0.33333333333333331, -0.3888888888888889, 1.1666666666666667, -1.1666666666666667, 0.3888888888888889) * vec4(1.0, f, f2, f2 * f);
+ vec4 c[4];
+ c[0] = ColorTableEffect_Stage2_c0_c0(vec4(1.0), vec2(coord + -1.0, vTransformedCoords_1_Stage0.y));
+ c[1] = ColorTableEffect_Stage2_c0_c0(vec4(1.0), vec2(coord, vTransformedCoords_1_Stage0.y));
+ c[2] = ColorTableEffect_Stage2_c0_c0(vec4(1.0), vec2(coord + 1.0, vTransformedCoords_1_Stage0.y));
+ c[3] = ColorTableEffect_Stage2_c0_c0(vec4(1.0), vec2(coord + 2.0, vTransformedCoords_1_Stage0.y));
+ vec4 bicubicColor = ((c[0] * w.x + c[1] * w.y) + c[2] * w.z) + c[3] * w.w;
+ bicubicColor = clamp(bicubicColor, 0.0, 1.0);
+ output_Stage2 = bicubicColor * output_Stage1;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/157.shader_test b/shaders/skia/157.shader_test
new file mode 100644
index 0000000..9dda166
--- /dev/null
+++ b/shaders/skia/157.shader_test
@@ -0,0 +1,84 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 ucolor_Stage1_c0_c0_c0_c0;
+uniform vec4 ucolor_Stage2_c1_c0;
+noperspective in vec4 vcolor_Stage0;
+vec4 ConstColorProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = _input.w * ucolor_Stage1_c0_c0_c0_c0;
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = ConstColorProcessor_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c1_c0;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 blend_darken(vec4 src, vec4 dst) {
+ vec4 result = blend_src_over(src, dst);
+ result.xyz = min(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
+ return result;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_dst_in(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_darken(ConstColorProcessor_Stage2_c1_c0(vec4(1.0)), output_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 position;
+in vec4 inColor;
+noperspective out vec4 vcolor_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1573.shader_test b/shaders/skia/1573.shader_test
new file mode 100644
index 0000000..8cd6d3b
--- /dev/null
+++ b/shaders/skia/1573.shader_test
@@ -0,0 +1,656 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1_c0_c0_c0_c0_c0_c0;
+uniform vec4 uKernel_Stage1_c0_c0_c0_c0_c0_c0[7];
+uniform vec2 uKernelOffset_Stage1_c0_c0_c0_c0_c0_c0;
+uniform float uGain_Stage1_c0_c0_c0_c0_c0_c0;
+uniform float uBias_Stage1_c0_c0_c0_c0_c0_c0;
+uniform vec4 uTexDom_Stage1_c0_c0_c0_c0_c0_c0;
+uniform vec2 uScale_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 uTexDom_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec3 uDecalParams_Stage1_c0_c0_c0_c0_c1_c0;
+uniform float uPixelSize_Stage1_c0_c0_c1_c0_c0_c0;
+uniform vec2 uRange_Stage1_c0_c0_c1_c0_c0_c0;
+uniform float ucornerRadius_Stage1_c1_c0_c0_c0_c0_c0;
+uniform vec4 uproxyRect_Stage1_c1_c0_c0_c0_c0_c0;
+uniform float ublurRadius_Stage1_c1_c0_c0_c0_c0_c0;
+uniform vec4 uellipse_Stage1_c1_c0_c0_c0_c1_c0;
+uniform vec4 ucircleData_Stage1_c1_c0_c1_c0_c0_c0;
+uniform vec4 uinnerRect_Stage1_c1_c0_c1_c0_c1_c0;
+uniform vec4 uinvRadiiLTRB_Stage1_c1_c0_c1_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+uniform sampler2D uTextureSampler_2_Stage1;
+uniform sampler2D uTextureSampler_3_Stage1;
+uniform sampler2D uTextureSampler_4_Stage1;
+uniform sampler2D uTextureSampler_5_Stage1;
+uniform sampler2D uTextureSampler_6_Stage1;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+noperspective in vec2 vTransformedCoords_3_Stage0;
+noperspective in vec2 vTransformedCoords_4_Stage0;
+vec4 MatrixConvolution_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 sum = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0 - uKernelOffset_Stage1_c0_c0_c0_c0_c0_c0 * uImageIncrement_Stage1_c0_c0_c0_c0_c0_c0;
+ vec4 c;
+ {
+ float k = uKernel_Stage1_c0_c0_c0_c0_c0_c0[0].x;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c0_c0_c0_c0[0].y;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1_c0_c0_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c0_c0_c0_c0[0].z;
+ {
+ vec2 origCoord = coord + vec2(2.0, 0.0) * uImageIncrement_Stage1_c0_c0_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c0_c0_c0_c0[0].w;
+ {
+ vec2 origCoord = coord + vec2(3.0, 0.0) * uImageIncrement_Stage1_c0_c0_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c0_c0_c0_c0[1].x;
+ {
+ vec2 origCoord = coord + vec2(4.0, 0.0) * uImageIncrement_Stage1_c0_c0_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c0_c0_c0_c0[1].y;
+ {
+ vec2 origCoord = coord + vec2(5.0, 0.0) * uImageIncrement_Stage1_c0_c0_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c0_c0_c0_c0[1].z;
+ {
+ vec2 origCoord = coord + vec2(6.0, 0.0) * uImageIncrement_Stage1_c0_c0_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c0_c0_c0_c0[1].w;
+ {
+ vec2 origCoord = coord + vec2(7.0, 0.0) * uImageIncrement_Stage1_c0_c0_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c0_c0_c0_c0[2].x;
+ {
+ vec2 origCoord = coord + vec2(8.0, 0.0) * uImageIncrement_Stage1_c0_c0_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c0_c0_c0_c0[2].y;
+ {
+ vec2 origCoord = coord + vec2(9.0, 0.0) * uImageIncrement_Stage1_c0_c0_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c0_c0_c0_c0[2].z;
+ {
+ vec2 origCoord = coord + vec2(10.0, 0.0) * uImageIncrement_Stage1_c0_c0_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c0_c0_c0_c0[2].w;
+ {
+ vec2 origCoord = coord + vec2(11.0, 0.0) * uImageIncrement_Stage1_c0_c0_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c0_c0_c0_c0[3].x;
+ {
+ vec2 origCoord = coord + vec2(12.0, 0.0) * uImageIncrement_Stage1_c0_c0_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c0_c0_c0_c0[3].y;
+ {
+ vec2 origCoord = coord + vec2(13.0, 0.0) * uImageIncrement_Stage1_c0_c0_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c0_c0_c0_c0[3].z;
+ {
+ vec2 origCoord = coord + vec2(14.0, 0.0) * uImageIncrement_Stage1_c0_c0_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c0_c0_c0_c0[3].w;
+ {
+ vec2 origCoord = coord + vec2(15.0, 0.0) * uImageIncrement_Stage1_c0_c0_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c0_c0_c0_c0[4].x;
+ {
+ vec2 origCoord = coord + vec2(16.0, 0.0) * uImageIncrement_Stage1_c0_c0_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c0_c0_c0_c0[4].y;
+ {
+ vec2 origCoord = coord + vec2(17.0, 0.0) * uImageIncrement_Stage1_c0_c0_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c0_c0_c0_c0[4].z;
+ {
+ vec2 origCoord = coord + vec2(18.0, 0.0) * uImageIncrement_Stage1_c0_c0_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c0_c0_c0_c0[4].w;
+ {
+ vec2 origCoord = coord + vec2(19.0, 0.0) * uImageIncrement_Stage1_c0_c0_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c0_c0_c0_c0[5].x;
+ {
+ vec2 origCoord = coord + vec2(20.0, 0.0) * uImageIncrement_Stage1_c0_c0_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c0_c0_c0_c0[5].y;
+ {
+ vec2 origCoord = coord + vec2(21.0, 0.0) * uImageIncrement_Stage1_c0_c0_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c0_c0_c0_c0[5].z;
+ {
+ vec2 origCoord = coord + vec2(22.0, 0.0) * uImageIncrement_Stage1_c0_c0_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c0_c0_c0_c0[5].w;
+ {
+ vec2 origCoord = coord + vec2(23.0, 0.0) * uImageIncrement_Stage1_c0_c0_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c0_c0_c0_c0[6].x;
+ {
+ vec2 origCoord = coord + vec2(24.0, 0.0) * uImageIncrement_Stage1_c0_c0_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ vec2 origCoord = vTransformedCoords_0_Stage0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ _output.w = c.w;
+ _output.xyz = clamp(sum.xyz * uGain_Stage1_c0_c0_c0_c0_c0_c0 + uBias_Stage1_c0_c0_c0_c0_c0_c0, 0.0, 1.0);
+ _output.xyz *= _output.w;
+ _output *= _input;
+ return _output;
+}
+vec4 DisplacementMap_Stage1_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 dColor = texture(uTextureSampler_1_Stage1, vTransformedCoords_1_Stage0);
+ dColor.xyz = dColor.w < 9.9999999747524271e-07 ? vec3(0.0) : clamp(dColor.xyz / dColor.w, 0.0, 1.0);
+ vec2 cCoords = vTransformedCoords_2_Stage0 + uScale_Stage1_c0_c0_c0_c0_c1_c0 * (dColor.zz - vec2(0.5));
+ {
+ vec2 origCoord = cCoords;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0_c1_c0.xy, uTexDom_Stage1_c0_c0_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ _output = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ return _output;
+}
+vec4 blend_dst_over(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src + dst;
+}
+vec4 ComposeTwo_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_dst_over(MatrixConvolution_Stage1_c0_c0_c0_c0_c0_c0(inputColor), DisplacementMap_Stage1_c0_c0_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 Morphology_Stage1_c0_c0_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = vec4(1.0, 1.0, 1.0, 1.0);
+ vec2 coord = vTransformedCoords_3_Stage0;
+ coord.x -= 3.0 * uPixelSize_Stage1_c0_c0_c1_c0_c0_c0;
+ for (int i = 0;i < 7; i++) {
+ _output = min(_output, texture(uTextureSampler_3_Stage1, coord));
+ coord.x += uPixelSize_Stage1_c0_c0_c1_c0_c0_c0;
+ }
+ _output *= _input;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c0_c0_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_4_Stage1, vTransformedCoords_4_Stage0) * _input;
+ return _output;
+}
+float _guarded_divide(float n, float d) {
+ return n / d;
+}
+float _color_burn_component(float sc, float sa, float dc, float da) {
+ if (da == dc) {
+ return (sa * da + sc * (1.0 - da)) + dc * (1.0 - sa);
+ } else if (sc == 0.0) {
+ return dc * (1.0 - sa);
+ }
+ float d = max(0.0, da - _guarded_divide((da - dc) * sa, sc));
+ return (d * sa + sc * (1.0 - da)) + dc * (1.0 - sa);
+}
+vec4 blend_color_burn(vec4 src, vec4 dst) {
+ return vec4(_color_burn_component(src.x, src.w, dst.x, dst.w), _color_burn_component(src.y, src.w, dst.y, dst.w), _color_burn_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+}
+vec4 ComposeTwo_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_color_burn(Morphology_Stage1_c0_c0_c1_c0_c0_c0(inputColor), TextureEffect_Stage1_c0_c0_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 blend_multiply(vec4 src, vec4 dst) {
+ return vec4(((1.0 - src.w) * dst.xyz + (1.0 - dst.w) * src.xyz) + src.xyz * dst.xyz, src.w + (1.0 - src.w) * dst.w);
+}
+vec4 ComposeTwo_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_multiply(ComposeTwo_Stage1_c0_c0_c0_c0(inputColor), ComposeTwo_Stage1_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 RRectBlurEffect_Stage1_c1_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 translatedFragPos = gl_FragCoord.xy - uproxyRect_Stage1_c1_c0_c0_c0_c0_c0.xy;
+ float threshold = ucornerRadius_Stage1_c1_c0_c0_c0_c0_c0 + 2.0 * ublurRadius_Stage1_c1_c0_c0_c0_c0_c0;
+ vec2 middle = (uproxyRect_Stage1_c1_c0_c0_c0_c0_c0.zw - uproxyRect_Stage1_c1_c0_c0_c0_c0_c0.xy) - 2.0 * threshold;
+ if (translatedFragPos.x >= threshold && translatedFragPos.x < middle.x + threshold) {
+ translatedFragPos.x = threshold;
+ } else if (translatedFragPos.x >= middle.x + threshold) {
+ translatedFragPos.x -= middle.x - 1.0;
+ }
+ if (translatedFragPos.y > threshold && translatedFragPos.y < middle.y + threshold) {
+ translatedFragPos.y = threshold;
+ } else if (translatedFragPos.y >= middle.y + threshold) {
+ translatedFragPos.y -= middle.y - 1.0;
+ }
+ vec2 proxyDims = vec2(2.0 * threshold + 1.0);
+ vec2 texCoord = translatedFragPos / proxyDims;
+ _output = _input * texture(uTextureSampler_5_Stage1, texCoord);
+ return _output;
+}
+vec4 EllipseEffect_Stage1_c1_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 d = gl_FragCoord.xy - uellipse_Stage1_c1_c0_c0_c0_c1_c0.xy;
+ vec2 Z = d * uellipse_Stage1_c1_c0_c0_c0_c1_c0.zw;
+ float implicit = dot(Z, d) - 1.0;
+ float grad_dot = 4.0 * dot(Z, Z);
+ {
+ grad_dot = max(grad_dot, 1.1754999560161448e-38);
+ }
+ float approx_dist = implicit * inversesqrt(grad_dot);
+ float alpha;
+ {
+ alpha = clamp(0.5 + approx_dist, 0.0, 1.0);
+ }
+ _output = _input * alpha;
+ return _output;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 blend_darken(vec4 src, vec4 dst) {
+ vec4 result = blend_src_over(src, dst);
+ result.xyz = min(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
+ return result;
+}
+vec4 ComposeTwo_Stage1_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_darken(RRectBlurEffect_Stage1_c1_c0_c0_c0_c0_c0(inputColor), EllipseEffect_Stage1_c1_c0_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 CircleBlurFragmentProcessor_Stage1_c1_c0_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 vec = vec2((gl_FragCoord.x - ucircleData_Stage1_c1_c0_c1_c0_c0_c0.x) * ucircleData_Stage1_c1_c0_c1_c0_c0_c0.w, (gl_FragCoord.y - ucircleData_Stage1_c1_c0_c1_c0_c0_c0.y) * ucircleData_Stage1_c1_c0_c1_c0_c0_c0.w);
+ float dist = length(vec) + (0.5 - ucircleData_Stage1_c1_c0_c1_c0_c0_c0.z) * ucircleData_Stage1_c1_c0_c1_c0_c0_c0.w;
+ _output = _input * texture(uTextureSampler_6_Stage1, vec2(dist, 0.5)).w;
+ return _output;
+}
+vec4 EllipticalRRect_Stage1_c1_c0_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 dxy0 = uinnerRect_Stage1_c1_c0_c1_c0_c1_c0.xy - gl_FragCoord.xy;
+ vec2 dxy1 = gl_FragCoord.xy - uinnerRect_Stage1_c1_c0_c1_c0_c1_c0.zw;
+ vec2 dxy = max(max(dxy0, dxy1), 0.0);
+ vec2 Z = max(max(dxy0 * uinvRadiiLTRB_Stage1_c1_c0_c1_c0_c1_c0.xy, dxy1 * uinvRadiiLTRB_Stage1_c1_c0_c1_c0_c1_c0.zw), 0.0);
+ float implicit = dot(Z, dxy) - 1.0;
+ float grad_dot = 4.0 * dot(Z, Z);
+ grad_dot = max(grad_dot, 9.9999997473787516e-05);
+ float approx_dist = implicit * inversesqrt(grad_dot);
+ float alpha = clamp(0.5 - approx_dist, 0.0, 1.0);
+ _output = _input * alpha;
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+vec4 ComposeTwo_Stage1_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_dst_in(CircleBlurFragmentProcessor_Stage1_c1_c0_c1_c0_c0_c0(inputColor), EllipticalRRect_Stage1_c1_c0_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 blend_dst_out(vec4 src, vec4 dst) {
+ return (1.0 - src.w) * dst;
+}
+vec4 ComposeTwo_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_dst_out(ComposeTwo_Stage1_c1_c0_c0_c0(inputColor), ComposeTwo_Stage1_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+float _blend_color_saturation(vec3 color) {
+ return max(max(color.x, color.y), color.z) - min(min(color.x, color.y), color.z);
+}
+vec3 _blend_set_color_saturation_helper(vec3 minMidMax, float sat) {
+ if (minMidMax.x < minMidMax.z) {
+ return vec3(0.0, (sat * (minMidMax.y - minMidMax.x)) / (minMidMax.z - minMidMax.x), sat);
+ }
+ return vec3(0.0);
+}
+vec3 _blend_set_color_saturation(vec3 hueLumColor, vec3 satColor) {
+ float sat = _blend_color_saturation(satColor);
+ if (hueLumColor.x <= hueLumColor.y) {
+ if (hueLumColor.y <= hueLumColor.z) {
+ hueLumColor.xyz = _blend_set_color_saturation_helper(hueLumColor, sat);
+ } else if (hueLumColor.x <= hueLumColor.z) {
+ hueLumColor.xzy = _blend_set_color_saturation_helper(hueLumColor.xzy, sat);
+ } else {
+ hueLumColor.zxy = _blend_set_color_saturation_helper(hueLumColor.zxy, sat);
+ }
+ } else if (hueLumColor.x <= hueLumColor.z) {
+ hueLumColor.yxz = _blend_set_color_saturation_helper(hueLumColor.yxz, sat);
+ } else if (hueLumColor.y <= hueLumColor.z) {
+ hueLumColor.yzx = _blend_set_color_saturation_helper(hueLumColor.yzx, sat);
+ } else {
+ hueLumColor.zyx = _blend_set_color_saturation_helper(hueLumColor.zyx, sat);
+ }
+ return hueLumColor;
+}
+float _blend_color_luminance(vec3 color) {
+ return dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), color);
+}
+vec3 _blend_set_color_luminance(vec3 hueSatColor, float alpha, vec3 lumColor) {
+ float lum = _blend_color_luminance(lumColor);
+ vec3 result = (lum - _blend_color_luminance(hueSatColor)) + hueSatColor;
+ float minComp = min(min(result.x, result.y), result.z);
+ float maxComp = max(max(result.x, result.y), result.z);
+ if (minComp < 0.0 && lum != minComp) {
+ result = lum + ((result - lum) * lum) / (lum - minComp);
+ }
+ if (maxComp > alpha && maxComp != lum) {
+ return lum + ((result - lum) * (alpha - lum)) / (maxComp - lum);
+ }
+ return result;
+}
+vec4 blend_hue(vec4 src, vec4 dst) {
+ float alpha = dst.w * src.w;
+ vec3 sda = src.xyz * dst.w;
+ vec3 dsa = dst.xyz * src.w;
+ return vec4((((_blend_set_color_luminance(_blend_set_color_saturation(sda, dsa), alpha, dsa) + dst.xyz) - dsa) + src.xyz) - sda, (src.w + dst.w) - alpha);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_hue(ComposeTwo_Stage1_c0_c0(inputColor), ComposeTwo_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+uniform mat3 uCoordTransformMatrix_3_Stage0;
+uniform mat3 uCoordTransformMatrix_4_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec2 inLocalCoord;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+noperspective out vec2 vTransformedCoords_3_Stage0;
+noperspective out vec2 vTransformedCoords_4_Stage0;
+void main() {
+ vec4 color = inColor;
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ vTransformedCoords_3_Stage0 = (uCoordTransformMatrix_3_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ vTransformedCoords_4_Stage0 = (uCoordTransformMatrix_4_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1576.shader_test b/shaders/skia/1576.shader_test
new file mode 100644
index 0000000..6fa4ce0
--- /dev/null
+++ b/shaders/skia/1576.shader_test
@@ -0,0 +1,247 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1_c1_c0;
+uniform float uSurfaceScale_Stage1_c1_c0;
+uniform vec3 uLightColor_Stage1_c1_c0;
+uniform float uKD_Stage1_c1_c0;
+uniform vec4 uTexDom_Stage1_c1_c0;
+uniform vec3 uDecalParams_Stage1_c1_c0;
+uniform vec3 uLightLocation_Stage1_c1_c0;
+uniform float uExponent_Stage1_c1_c0;
+uniform float uCosInnerConeAngle_Stage1_c1_c0;
+uniform float uCosOuterConeAngle_Stage1_c1_c0;
+uniform float uConeScale_Stage1_c1_c0;
+uniform vec3 uS_Stage1_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTextureCoords_Stage0;
+flat in int vTexIndex_Stage0;
+noperspective in vec4 vinColor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 ClampFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = clamp(_input, 0.0, 1.0);
+ }
+ return _output;
+}
+vec4 light_Stage1_c1_c0(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ float colorScale = uKD_Stage1_c1_c0 * dot(normal, surfaceToLight);
+ return vec4(lightColor * clamp(colorScale, 0.0, 1.0), 1.0);
+}
+float sobel_Stage1_c1_c0(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage1_c1_c0(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage1_c1_c0(float m[9], float surfaceScale) {
+ return pointToNormal_Stage1_c1_c0(sobel_Stage1_c1_c0(0.0, 0.0, m[4], m[5], m[7], m[8], 0.66666698455810547), sobel_Stage1_c1_c0(0.0, 0.0, m[4], m[7], m[5], m[8], 0.66666698455810547), surfaceScale);
+}
+vec3 lightColor_Stage1_c1_c0(vec3 surfaceToLight) {
+ float cosAngle = -dot(surfaceToLight, uS_Stage1_c1_c0);
+ if (cosAngle < uCosOuterConeAngle_Stage1_c1_c0) {
+ return vec3(0.0);
+ }
+ float scale = pow(cosAngle, uExponent_Stage1_c1_c0);
+ if (cosAngle < uCosInnerConeAngle_Stage1_c1_c0) {
+ return ((uLightColor_Stage1_c1_c0 * scale) * (cosAngle - uCosOuterConeAngle_Stage1_c1_c0)) * uConeScale_Stage1_c1_c0;
+ }
+ return uLightColor_Stage1_c1_c0;
+}
+vec4 DiffuseLighting_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coord = vTransformedCoords_0_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage1_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0.xy, uTexDom_Stage1_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp0 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0.xy, uTexDom_Stage1_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0.xy, uTexDom_Stage1_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage1_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0.xy, uTexDom_Stage1_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0.xy, uTexDom_Stage1_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0.xy, uTexDom_Stage1_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp5 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage1_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0.xy, uTexDom_Stage1_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp6 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage1_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0.xy, uTexDom_Stage1_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp7 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage1_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0.xy, uTexDom_Stage1_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp8 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = normalize(uLightLocation_Stage1_c1_c0 - vec3(gl_FragCoord.xy, uSurfaceScale_Stage1_c1_c0 * m[4]));
+ _output = light_Stage1_c1_c0(normal_Stage1_c1_c0(m, uSurfaceScale_Stage1_c1_c0), surfaceToLight, lightColor_Stage1_c1_c0(surfaceToLight));
+ _output *= _input;
+ return _output;
+}
+vec4 blend_difference(vec4 src, vec4 dst) {
+ return vec4((src.xyz + dst.xyz) - 2.0 * min(src.xyz * dst.w, dst.xyz * src.w), src.w + (1.0 - src.w) * dst.w);
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ vec4 texColor;
+ {
+ texColor = texture(uTextureSampler_0_Stage0, vTextureCoords_Stage0);
+ }
+ outputCoverage_Stage0 = texColor;
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputCoverage_Stage0.xyz, 1.0);
+ output_Stage1 = blend_difference(ClampFragmentProcessor_Stage1_c0_c0(inputColor), DiffuseLighting_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputCoverage_Stage0.w;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform vec2 uAtlasSizeInv_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in uvec2 inTextureCoords;
+noperspective out vec2 vTextureCoords_Stage0;
+flat out int vTexIndex_Stage0;
+noperspective out vec4 vinColor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ ivec2 signedCoords = ivec2(int(inTextureCoords.x), int(inTextureCoords.y));
+ vec2 unormTexCoords = vec2(float(signedCoords.x / 2), float(signedCoords.y / 2));
+ vTextureCoords_Stage0 = unormTexCoords * uAtlasSizeInv_Stage0;
+ vTexIndex_Stage0 = 0;
+ vinColor_Stage0 = inColor;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(inPosition.x, inPosition.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1579.shader_test b/shaders/skia/1579.shader_test
new file mode 100644
index 0000000..936462e
--- /dev/null
+++ b/shaders/skia/1579.shader_test
@@ -0,0 +1,671 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_KHR_blend_equation_advanced : require
+out vec4 sk_FragColor;
+layout (blend_support_all_equations) out ;
+uniform vec4 uinnerRect_Stage1_c0_c0_c0_c0_c0_c0;
+uniform vec4 uinvRadiiLTRB_Stage1_c0_c0_c0_c0_c0_c0;
+uniform vec2 uImageIncrement_Stage1_c0_c0_c1_c0_c0_c0;
+uniform vec2 uBounds_Stage1_c0_c0_c1_c0_c0_c0;
+uniform vec4 uKernel_Stage1_c0_c0_c1_c0_c0_c0[5];
+uniform vec2 uImageIncrement_Stage1_c0_c0_c1_c0_c1_c0;
+uniform vec4 uKernel_Stage1_c0_c0_c1_c0_c1_c0[5];
+uniform vec2 uKernelOffset_Stage1_c0_c0_c1_c0_c1_c0;
+uniform float uGain_Stage1_c0_c0_c1_c0_c1_c0;
+uniform float uBias_Stage1_c0_c0_c1_c0_c1_c0;
+uniform vec2 uImageIncrement_Stage1_c1_c0_c0_c0;
+uniform float uSurfaceScale_Stage1_c1_c0_c0_c0;
+uniform vec3 uLightColor_Stage1_c1_c0_c0_c0;
+uniform float uKS_Stage1_c1_c0_c0_c0;
+uniform float uShininess_Stage1_c1_c0_c0_c0;
+uniform vec4 uTexDom_Stage1_c1_c0_c0_c0;
+uniform vec3 uDecalParams_Stage1_c1_c0_c0_c0;
+uniform vec3 uLightLocation_Stage1_c1_c0_c0_c0;
+uniform float uExponent_Stage1_c1_c0_c0_c0;
+uniform float uCosInnerConeAngle_Stage1_c1_c0_c0_c0;
+uniform float uCosOuterConeAngle_Stage1_c1_c0_c0_c0;
+uniform float uConeScale_Stage1_c1_c0_c0_c0;
+uniform vec3 uS_Stage1_c1_c0_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+uniform sampler2D uTextureSampler_2_Stage1;
+uniform sampler2D uTextureSampler_3_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+noperspective in vec2 vtextureCoords_Stage0;
+flat in vec4 vtextureDomain_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 EllipticalRRect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 dxy0 = uinnerRect_Stage1_c0_c0_c0_c0_c0_c0.xy - gl_FragCoord.xy;
+ vec2 dxy1 = gl_FragCoord.xy - uinnerRect_Stage1_c0_c0_c0_c0_c0_c0.zw;
+ vec2 dxy = max(max(dxy0, dxy1), 0.0);
+ vec2 Z = max(max(dxy0 * uinvRadiiLTRB_Stage1_c0_c0_c0_c0_c0_c0.xy, dxy1 * uinvRadiiLTRB_Stage1_c0_c0_c0_c0_c0_c0.zw), 0.0);
+ float implicit = dot(Z, dxy) - 1.0;
+ float grad_dot = 4.0 * dot(Z, Z);
+ grad_dot = max(grad_dot, 9.9999997473787516e-05);
+ float approx_dist = implicit * inversesqrt(grad_dot);
+ float alpha = clamp(0.5 - approx_dist, 0.0, 1.0);
+ _output = _input * alpha;
+ return _output;
+}
+vec4 ConfigConversionEffect_Stage1_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = floor(_input * 255.0 + 0.5) / 255.0;
+ {
+ _output.xyz = floor((_output.xyz * _output.w) * 255.0 + 0.5) / 255.0;
+ }
+ return _output;
+}
+vec4 blend_multiply(vec4 src, vec4 dst) {
+ return vec4(((1.0 - src.w) * dst.xyz + (1.0 - dst.w) * src.xyz) + src.xyz * dst.xyz, src.w + (1.0 - src.w) * dst.w);
+}
+vec4 ComposeTwo_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_multiply(EllipticalRRect_Stage1_c0_c0_c0_c0_c0_c0(inputColor), ConfigConversionEffect_Stage1_c0_c0_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 GaussianConvolution_Stage1_c0_c0_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0 - 9.0 * uImageIncrement_Stage1_c0_c0_c1_c0_c0_c0;
+ vec2 coordSampled = vec2(0.0, 0.0);
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1_c0_c0_c1_c0_c0_c0.x, uBounds_Stage1_c0_c0_c1_c0_c0_c0.y - uBounds_Stage1_c0_c0_c1_c0_c0_c0.x) + uBounds_Stage1_c0_c0_c1_c0_c0_c0.x;
+ _output += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c1_c0_c0_c0[0].x;
+ coord += uImageIncrement_Stage1_c0_c0_c1_c0_c0_c0;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1_c0_c0_c1_c0_c0_c0.x, uBounds_Stage1_c0_c0_c1_c0_c0_c0.y - uBounds_Stage1_c0_c0_c1_c0_c0_c0.x) + uBounds_Stage1_c0_c0_c1_c0_c0_c0.x;
+ _output += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c1_c0_c0_c0[0].y;
+ coord += uImageIncrement_Stage1_c0_c0_c1_c0_c0_c0;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1_c0_c0_c1_c0_c0_c0.x, uBounds_Stage1_c0_c0_c1_c0_c0_c0.y - uBounds_Stage1_c0_c0_c1_c0_c0_c0.x) + uBounds_Stage1_c0_c0_c1_c0_c0_c0.x;
+ _output += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c1_c0_c0_c0[0].z;
+ coord += uImageIncrement_Stage1_c0_c0_c1_c0_c0_c0;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1_c0_c0_c1_c0_c0_c0.x, uBounds_Stage1_c0_c0_c1_c0_c0_c0.y - uBounds_Stage1_c0_c0_c1_c0_c0_c0.x) + uBounds_Stage1_c0_c0_c1_c0_c0_c0.x;
+ _output += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c1_c0_c0_c0[0].w;
+ coord += uImageIncrement_Stage1_c0_c0_c1_c0_c0_c0;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1_c0_c0_c1_c0_c0_c0.x, uBounds_Stage1_c0_c0_c1_c0_c0_c0.y - uBounds_Stage1_c0_c0_c1_c0_c0_c0.x) + uBounds_Stage1_c0_c0_c1_c0_c0_c0.x;
+ _output += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c1_c0_c0_c0[1].x;
+ coord += uImageIncrement_Stage1_c0_c0_c1_c0_c0_c0;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1_c0_c0_c1_c0_c0_c0.x, uBounds_Stage1_c0_c0_c1_c0_c0_c0.y - uBounds_Stage1_c0_c0_c1_c0_c0_c0.x) + uBounds_Stage1_c0_c0_c1_c0_c0_c0.x;
+ _output += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c1_c0_c0_c0[1].y;
+ coord += uImageIncrement_Stage1_c0_c0_c1_c0_c0_c0;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1_c0_c0_c1_c0_c0_c0.x, uBounds_Stage1_c0_c0_c1_c0_c0_c0.y - uBounds_Stage1_c0_c0_c1_c0_c0_c0.x) + uBounds_Stage1_c0_c0_c1_c0_c0_c0.x;
+ _output += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c1_c0_c0_c0[1].z;
+ coord += uImageIncrement_Stage1_c0_c0_c1_c0_c0_c0;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1_c0_c0_c1_c0_c0_c0.x, uBounds_Stage1_c0_c0_c1_c0_c0_c0.y - uBounds_Stage1_c0_c0_c1_c0_c0_c0.x) + uBounds_Stage1_c0_c0_c1_c0_c0_c0.x;
+ _output += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c1_c0_c0_c0[1].w;
+ coord += uImageIncrement_Stage1_c0_c0_c1_c0_c0_c0;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1_c0_c0_c1_c0_c0_c0.x, uBounds_Stage1_c0_c0_c1_c0_c0_c0.y - uBounds_Stage1_c0_c0_c1_c0_c0_c0.x) + uBounds_Stage1_c0_c0_c1_c0_c0_c0.x;
+ _output += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c1_c0_c0_c0[2].x;
+ coord += uImageIncrement_Stage1_c0_c0_c1_c0_c0_c0;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1_c0_c0_c1_c0_c0_c0.x, uBounds_Stage1_c0_c0_c1_c0_c0_c0.y - uBounds_Stage1_c0_c0_c1_c0_c0_c0.x) + uBounds_Stage1_c0_c0_c1_c0_c0_c0.x;
+ _output += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c1_c0_c0_c0[2].y;
+ coord += uImageIncrement_Stage1_c0_c0_c1_c0_c0_c0;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1_c0_c0_c1_c0_c0_c0.x, uBounds_Stage1_c0_c0_c1_c0_c0_c0.y - uBounds_Stage1_c0_c0_c1_c0_c0_c0.x) + uBounds_Stage1_c0_c0_c1_c0_c0_c0.x;
+ _output += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c1_c0_c0_c0[2].z;
+ coord += uImageIncrement_Stage1_c0_c0_c1_c0_c0_c0;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1_c0_c0_c1_c0_c0_c0.x, uBounds_Stage1_c0_c0_c1_c0_c0_c0.y - uBounds_Stage1_c0_c0_c1_c0_c0_c0.x) + uBounds_Stage1_c0_c0_c1_c0_c0_c0.x;
+ _output += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c1_c0_c0_c0[2].w;
+ coord += uImageIncrement_Stage1_c0_c0_c1_c0_c0_c0;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1_c0_c0_c1_c0_c0_c0.x, uBounds_Stage1_c0_c0_c1_c0_c0_c0.y - uBounds_Stage1_c0_c0_c1_c0_c0_c0.x) + uBounds_Stage1_c0_c0_c1_c0_c0_c0.x;
+ _output += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c1_c0_c0_c0[3].x;
+ coord += uImageIncrement_Stage1_c0_c0_c1_c0_c0_c0;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1_c0_c0_c1_c0_c0_c0.x, uBounds_Stage1_c0_c0_c1_c0_c0_c0.y - uBounds_Stage1_c0_c0_c1_c0_c0_c0.x) + uBounds_Stage1_c0_c0_c1_c0_c0_c0.x;
+ _output += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c1_c0_c0_c0[3].y;
+ coord += uImageIncrement_Stage1_c0_c0_c1_c0_c0_c0;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1_c0_c0_c1_c0_c0_c0.x, uBounds_Stage1_c0_c0_c1_c0_c0_c0.y - uBounds_Stage1_c0_c0_c1_c0_c0_c0.x) + uBounds_Stage1_c0_c0_c1_c0_c0_c0.x;
+ _output += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c1_c0_c0_c0[3].z;
+ coord += uImageIncrement_Stage1_c0_c0_c1_c0_c0_c0;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1_c0_c0_c1_c0_c0_c0.x, uBounds_Stage1_c0_c0_c1_c0_c0_c0.y - uBounds_Stage1_c0_c0_c1_c0_c0_c0.x) + uBounds_Stage1_c0_c0_c1_c0_c0_c0.x;
+ _output += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c1_c0_c0_c0[3].w;
+ coord += uImageIncrement_Stage1_c0_c0_c1_c0_c0_c0;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1_c0_c0_c1_c0_c0_c0.x, uBounds_Stage1_c0_c0_c1_c0_c0_c0.y - uBounds_Stage1_c0_c0_c1_c0_c0_c0.x) + uBounds_Stage1_c0_c0_c1_c0_c0_c0.x;
+ _output += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c1_c0_c0_c0[4].x;
+ coord += uImageIncrement_Stage1_c0_c0_c1_c0_c0_c0;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1_c0_c0_c1_c0_c0_c0.x, uBounds_Stage1_c0_c0_c1_c0_c0_c0.y - uBounds_Stage1_c0_c0_c1_c0_c0_c0.x) + uBounds_Stage1_c0_c0_c1_c0_c0_c0.x;
+ _output += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c1_c0_c0_c0[4].y;
+ coord += uImageIncrement_Stage1_c0_c0_c1_c0_c0_c0;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1_c0_c0_c1_c0_c0_c0.x, uBounds_Stage1_c0_c0_c1_c0_c0_c0.y - uBounds_Stage1_c0_c0_c1_c0_c0_c0.x) + uBounds_Stage1_c0_c0_c1_c0_c0_c0.x;
+ _output += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c1_c0_c0_c0[4].z;
+ coord += uImageIncrement_Stage1_c0_c0_c1_c0_c0_c0;
+ _output *= _input;
+ return _output;
+}
+vec4 MatrixConvolution_Stage1_c0_c0_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 sum = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_1_Stage0 - uKernelOffset_Stage1_c0_c0_c1_c0_c1_c0 * uImageIncrement_Stage1_c0_c0_c1_c0_c1_c0;
+ vec4 c;
+ {
+ float k = uKernel_Stage1_c0_c0_c1_c0_c1_c0[0].x;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c1_c0_c1_c0[0].y;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1_c0_c0_c1_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c1_c0_c1_c0[0].z;
+ {
+ vec2 origCoord = coord + vec2(2.0, 0.0) * uImageIncrement_Stage1_c0_c0_c1_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c1_c0_c1_c0[0].w;
+ {
+ vec2 origCoord = coord + vec2(3.0, 0.0) * uImageIncrement_Stage1_c0_c0_c1_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c1_c0_c1_c0[1].x;
+ {
+ vec2 origCoord = coord + vec2(4.0, 0.0) * uImageIncrement_Stage1_c0_c0_c1_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c1_c0_c1_c0[1].y;
+ {
+ vec2 origCoord = coord + vec2(5.0, 0.0) * uImageIncrement_Stage1_c0_c0_c1_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c1_c0_c1_c0[1].z;
+ {
+ vec2 origCoord = coord + vec2(6.0, 0.0) * uImageIncrement_Stage1_c0_c0_c1_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c1_c0_c1_c0[1].w;
+ {
+ vec2 origCoord = coord + vec2(7.0, 0.0) * uImageIncrement_Stage1_c0_c0_c1_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c1_c0_c1_c0[2].x;
+ {
+ vec2 origCoord = coord + vec2(8.0, 0.0) * uImageIncrement_Stage1_c0_c0_c1_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c1_c0_c1_c0[2].y;
+ {
+ vec2 origCoord = coord + vec2(9.0, 0.0) * uImageIncrement_Stage1_c0_c0_c1_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c1_c0_c1_c0[2].z;
+ {
+ vec2 origCoord = coord + vec2(10.0, 0.0) * uImageIncrement_Stage1_c0_c0_c1_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c1_c0_c1_c0[2].w;
+ {
+ vec2 origCoord = coord + vec2(11.0, 0.0) * uImageIncrement_Stage1_c0_c0_c1_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c1_c0_c1_c0[3].x;
+ {
+ vec2 origCoord = coord + vec2(12.0, 0.0) * uImageIncrement_Stage1_c0_c0_c1_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c1_c0_c1_c0[3].y;
+ {
+ vec2 origCoord = coord + vec2(13.0, 0.0) * uImageIncrement_Stage1_c0_c0_c1_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c1_c0_c1_c0[3].z;
+ {
+ vec2 origCoord = coord + vec2(14.0, 0.0) * uImageIncrement_Stage1_c0_c0_c1_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c1_c0_c1_c0[3].w;
+ {
+ vec2 origCoord = coord + vec2(15.0, 0.0) * uImageIncrement_Stage1_c0_c0_c1_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c1_c0_c1_c0[4].x;
+ {
+ vec2 origCoord = coord + vec2(16.0, 0.0) * uImageIncrement_Stage1_c0_c0_c1_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c1_c0_c1_c0[4].y;
+ {
+ vec2 origCoord = coord + vec2(17.0, 0.0) * uImageIncrement_Stage1_c0_c0_c1_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c1_c0_c1_c0[4].z;
+ {
+ vec2 origCoord = coord + vec2(18.0, 0.0) * uImageIncrement_Stage1_c0_c0_c1_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c1_c0_c1_c0[4].w;
+ {
+ vec2 origCoord = coord + vec2(19.0, 0.0) * uImageIncrement_Stage1_c0_c0_c1_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ _output = sum * uGain_Stage1_c0_c0_c1_c0_c1_c0 + uBias_Stage1_c0_c0_c1_c0_c1_c0;
+ _output.w = clamp(_output.w, 0.0, 1.0);
+ _output.xyz = clamp(_output.xyz, 0.0, _output.w);
+ _output *= _input;
+ return _output;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 ComposeTwo_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_src_over(GaussianConvolution_Stage1_c0_c0_c1_c0_c0_c0(inputColor), MatrixConvolution_Stage1_c0_c0_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 ComposeTwo_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_src_over(ComposeTwo_Stage1_c0_c0_c0_c0(inputColor), ComposeTwo_Stage1_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 light_Stage1_c1_c0_c0_c0(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ vec3 halfDir = normalize(surfaceToLight + vec3(0.0, 0.0, 1.0));
+ float colorScale = uKS_Stage1_c1_c0_c0_c0 * pow(dot(normal, halfDir), uShininess_Stage1_c1_c0_c0_c0);
+ vec3 color = lightColor * clamp(colorScale, 0.0, 1.0);
+ return vec4(color, max(max(color.x, color.y), color.z));
+}
+float sobel_Stage1_c1_c0_c0_c0(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage1_c1_c0_c0_c0(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage1_c1_c0_c0_c0(float m[9], float surfaceScale) {
+ return pointToNormal_Stage1_c1_c0_c0_c0(sobel_Stage1_c1_c0_c0_c0(m[0], m[1], m[3], m[4], 0.0, 0.0, 0.66666698455810547), sobel_Stage1_c1_c0_c0_c0(m[0], m[3], m[1], m[4], 0.0, 0.0, 0.66666698455810547), surfaceScale);
+}
+vec3 lightColor_Stage1_c1_c0_c0_c0(vec3 surfaceToLight) {
+ float cosAngle = -dot(surfaceToLight, uS_Stage1_c1_c0_c0_c0);
+ if (cosAngle < uCosOuterConeAngle_Stage1_c1_c0_c0_c0) {
+ return vec3(0.0);
+ }
+ float scale = pow(cosAngle, uExponent_Stage1_c1_c0_c0_c0);
+ if (cosAngle < uCosInnerConeAngle_Stage1_c1_c0_c0_c0) {
+ return ((uLightColor_Stage1_c1_c0_c0_c0 * scale) * (cosAngle - uCosOuterConeAngle_Stage1_c1_c0_c0_c0)) * uConeScale_Stage1_c1_c0_c0_c0;
+ }
+ return uLightColor_Stage1_c1_c0_c0_c0;
+}
+vec4 SpecularLighting_Stage1_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coord = vTransformedCoords_2_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage1_c1_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0.xy, uTexDom_Stage1_c1_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp0 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1_c1_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0.xy, uTexDom_Stage1_c1_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1_c1_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0.xy, uTexDom_Stage1_c1_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage1_c1_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0.xy, uTexDom_Stage1_c1_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0.xy, uTexDom_Stage1_c1_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1_c1_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0.xy, uTexDom_Stage1_c1_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp5 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage1_c1_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0.xy, uTexDom_Stage1_c1_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp6 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage1_c1_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0.xy, uTexDom_Stage1_c1_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp7 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage1_c1_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0.xy, uTexDom_Stage1_c1_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp8 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = normalize(uLightLocation_Stage1_c1_c0_c0_c0 - vec3(gl_FragCoord.xy, uSurfaceScale_Stage1_c1_c0_c0_c0 * m[4]));
+ _output = light_Stage1_c1_c0_c0_c0(normal_Stage1_c1_c0_c0_c0(m, uSurfaceScale_Stage1_c1_c0_c0_c0), surfaceToLight, lightColor_Stage1_c1_c0_c0_c0(surfaceToLight));
+ _output *= _input;
+ return _output;
+}
+vec4 ColorTableEffect_Stage1_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float nonZeroAlpha = max(_input.w, 9.9999997473787516e-05);
+ vec4 coord = vec4(_input.xyz / nonZeroAlpha, nonZeroAlpha);
+ coord = coord * 0.9960939884185791 + vec4(0.0019529999699443579, 0.0019529999699443579, 0.0019529999699443579, 0.0019529999699443579);
+ _output.w = texture(uTextureSampler_3_Stage1, vec2(coord.w, 0.125)).w;
+ _output.x = texture(uTextureSampler_3_Stage1, vec2(coord.x, 0.375)).w;
+ _output.y = texture(uTextureSampler_3_Stage1, vec2(coord.y, 0.625)).w;
+ _output.z = texture(uTextureSampler_3_Stage1, vec2(coord.z, 0.875)).w;
+ _output.xyz *= _output.w;
+ return _output;
+}
+float _blend_color_luminance(vec3 color) {
+ return dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), color);
+}
+vec3 _blend_set_color_luminance(vec3 hueSatColor, float alpha, vec3 lumColor) {
+ float lum = _blend_color_luminance(lumColor);
+ vec3 result = (lum - _blend_color_luminance(hueSatColor)) + hueSatColor;
+ float minComp = min(min(result.x, result.y), result.z);
+ float maxComp = max(max(result.x, result.y), result.z);
+ if (minComp < 0.0 && lum != minComp) {
+ result = lum + ((result - lum) * lum) / (lum - minComp);
+ }
+ if (maxComp > alpha && maxComp != lum) {
+ return lum + ((result - lum) * (alpha - lum)) / (maxComp - lum);
+ }
+ return result;
+}
+vec4 blend_luminosity(vec4 src, vec4 dst) {
+ float alpha = dst.w * src.w;
+ vec3 sda = src.xyz * dst.w;
+ vec3 dsa = dst.xyz * src.w;
+ return vec4((((_blend_set_color_luminance(dsa, alpha, sda) + dst.xyz) - dsa) + src.xyz) - sda, (src.w + dst.w) - alpha);
+}
+vec4 ComposeTwo_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_luminosity(SpecularLighting_Stage1_c1_c0_c0_c0(inputColor), ColorTableEffect_Stage1_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 blend_screen(vec4 src, vec4 dst) {
+ return src + (1.0 - src) * dst;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ vec2 textureCoords;
+ textureCoords = vtextureCoords_Stage0;
+ vec4 textureDomain;
+ textureDomain = vtextureDomain_Stage0;
+ outputColor_Stage0 = vcolor_Stage0;
+ outputColor_Stage0 = texture(uTextureSampler_0_Stage0, clamp(textureCoords, textureDomain.xy, textureDomain.zw)) * outputColor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_screen(ComposeTwo_Stage1_c0_c0(inputColor), ComposeTwo_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+in vec2 position;
+in vec2 textureCoords;
+in vec4 textureDomain;
+in vec4 color;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+noperspective out vec2 vtextureCoords_Stage0;
+flat out vec4 vtextureDomain_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vec2 pos2 = position;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(textureCoords, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(textureCoords, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(textureCoords, 1.0)).xy;
+ vtextureCoords_Stage0 = textureCoords;
+ vtextureDomain_Stage0 = textureDomain;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1582.shader_test b/shaders/skia/1582.shader_test
new file mode 100644
index 0000000..27b6cbb
--- /dev/null
+++ b/shaders/skia/1582.shader_test
@@ -0,0 +1,44 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+noperspective in vec2 vEllipseOffsets0_Stage0;
+noperspective in vec2 vEllipseOffsets1_Stage0;
+noperspective in vec4 vinColor_Stage0;
+void main() {
+ {
+ vec2 scaledOffset = vEllipseOffsets0_Stage0;
+ float test = dot(scaledOffset, scaledOffset) - 1.0;
+ vec2 duvdx = dFdx(vEllipseOffsets0_Stage0);
+ vec2 duvdy = dFdy(vEllipseOffsets0_Stage0);
+ vec2 grad = vec2(vEllipseOffsets0_Stage0.x * duvdx.x + vEllipseOffsets0_Stage0.y * duvdx.y, vEllipseOffsets0_Stage0.x * duvdy.x + vEllipseOffsets0_Stage0.y * duvdy.y);
+ float grad_dot = 4.0 * dot(grad, grad);
+ grad_dot = max(grad_dot, 1.1754999560161448e-38);
+ float invlen = inversesqrt(grad_dot);
+ float edgeAlpha = clamp(1.0 - test * invlen, 0.0, 1.0);
+ edgeAlpha *= clamp(1.0 + test * invlen, 0.0, 1.0);
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 inPosition;
+in vec4 inColor;
+in vec2 inEllipseOffsets0;
+in vec2 inEllipseOffsets1;
+noperspective out vec2 vEllipseOffsets0_Stage0;
+noperspective out vec2 vEllipseOffsets1_Stage0;
+noperspective out vec4 vinColor_Stage0;
+void main() {
+ vEllipseOffsets0_Stage0 = inEllipseOffsets0;
+ vEllipseOffsets1_Stage0 = inEllipseOffsets1;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = inPosition;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1588.shader_test b/shaders/skia/1588.shader_test
new file mode 100644
index 0000000..e669b41
--- /dev/null
+++ b/shaders/skia/1588.shader_test
@@ -0,0 +1,486 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_KHR_blend_equation_advanced : require
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+layout (blend_support_all_equations) out ;
+uniform vec2 ubaseFrequency_Stage1_c0_c0_c0_c0_c1_c0;
+uniform float uz_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec2 uImageIncrement_Stage1_c0_c0_c1_c0;
+uniform vec4 uKernel_Stage1_c0_c0_c1_c0[1];
+uniform vec2 uKernelOffset_Stage1_c0_c0_c1_c0;
+uniform float uGain_Stage1_c0_c0_c1_c0;
+uniform float uBias_Stage1_c0_c0_c1_c0;
+uniform vec2 uImageIncrement_Stage1_c1_c0_c0_c0;
+uniform float uSurfaceScale_Stage1_c1_c0_c0_c0;
+uniform vec3 uLightColor_Stage1_c1_c0_c0_c0;
+uniform float uKS_Stage1_c1_c0_c0_c0;
+uniform float uShininess_Stage1_c1_c0_c0_c0;
+uniform vec4 uTexDom_Stage1_c1_c0_c0_c0;
+uniform vec3 uDecalParams_Stage1_c1_c0_c0_c0;
+uniform vec3 uLightLocation_Stage1_c1_c0_c0_c0;
+uniform float uExponent_Stage1_c1_c0_c0_c0;
+uniform float uCosInnerConeAngle_Stage1_c1_c0_c0_c0;
+uniform float uCosOuterConeAngle_Stage1_c1_c0_c0_c0;
+uniform float uConeScale_Stage1_c1_c0_c0_c0;
+uniform vec3 uS_Stage1_c1_c0_c0_c0;
+uniform vec4 uinnerRect_Stage1_c1_c0_c1_c0;
+uniform vec2 uradiusPlusHalf_Stage1_c1_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+uniform sampler2D uTextureSampler_2_Stage1;
+uniform sampler2D uTextureSampler_3_Stage1;
+noperspective in vec4 vinCircleEdge_Stage0;
+noperspective in vec3 vinClipPlane_Stage0;
+noperspective in vec3 vinUnionPlane_Stage0;
+noperspective in vec4 vinRoundCapCenters_Stage0;
+flat in float vcapRadius_Stage0;
+noperspective in vec4 vinColor_Stage0;
+noperspective in vec3 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+vec4 ConfigConversionEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = floor(_input * 255.0 + 0.5) / 255.0;
+ {
+ _output.xyz = floor((_output.xyz * _output.w) * 255.0 + 0.5) / 255.0;
+ }
+ return _output;
+}
+vec3 fade_Stage1_c0_c0_c0_c0_c1_c0(vec3 t) {
+ return ((t * t) * t) * (t * (t * 6.0 - 15.0) + 10.0);
+}
+float perm_Stage1_c0_c0_c0_c0_c1_c0(float x) {
+ return texture(uTextureSampler_0_Stage1, vec2(fract(x / 256.0), 0.0)).x * 255.0;
+}
+float grad_Stage1_c0_c0_c0_c0_c1_c0(float x, vec3 p) {
+ return dot(texture(uTextureSampler_1_Stage1, vec2(fract(x / 16.0), 0.0)).xyz * 255.0 - vec3(1.0), p);
+}
+float lerp_Stage1_c0_c0_c0_c0_c1_c0(float a, float b, float w) {
+ return a + w * (b - a);
+}
+float noise_Stage1_c0_c0_c0_c0_c1_c0(vec3 p) {
+ vec3 P = mod(floor(p), 256.0);
+ p -= floor(p);
+ vec3 f = fade_Stage1_c0_c0_c0_c0_c1_c0(p);
+ float A = perm_Stage1_c0_c0_c0_c0_c1_c0(P.x) + P.y;
+ float AA = perm_Stage1_c0_c0_c0_c0_c1_c0(A) + P.z;
+ float AB = perm_Stage1_c0_c0_c0_c0_c1_c0(A + 1.0) + P.z;
+ float B = perm_Stage1_c0_c0_c0_c0_c1_c0(P.x + 1.0) + P.y;
+ float BA = perm_Stage1_c0_c0_c0_c0_c1_c0(B) + P.z;
+ float BB = perm_Stage1_c0_c0_c0_c0_c1_c0(B + 1.0) + P.z;
+ float result = lerp_Stage1_c0_c0_c0_c0_c1_c0(lerp_Stage1_c0_c0_c0_c0_c1_c0(lerp_Stage1_c0_c0_c0_c0_c1_c0(grad_Stage1_c0_c0_c0_c0_c1_c0(perm_Stage1_c0_c0_c0_c0_c1_c0(AA), p), grad_Stage1_c0_c0_c0_c0_c1_c0(perm_Stage1_c0_c0_c0_c0_c1_c0(BA), p + vec3(-1.0, 0.0, 0.0)), f.x), lerp_Stage1_c0_c0_c0_c0_c1_c0(grad_Stage1_c0_c0_c0_c0_c1_c0(perm_Stage1_c0_c0_c0_c0_c1_c0(AB), p + vec3(0.0, -1.0, 0.0)), grad_Stage1_c0_c0_c0_c0_c1_c0(perm_Stage1_c0_c0_c0_c0_c1_c0(BB), p + vec3(-1.0, -1.0, 0.0)), f.x), f.y), lerp_Stage1_c0_c0_c0_c0_c1_c0(lerp_Stage1_c0_c0_c0_c0_c1_c0(grad_Stage1_c0_c0_c0_c0_c1_c0(perm_Stage1_c0_c0_c0_c0_c1_c0(AA + 1.0), p + vec3(0.0, 0.0, -1.0)), grad_Stage1_c0_c0_c0_c0_c1_c0(perm_Stage1_c0_c0_c0_c0_c1_c0(BA + 1.0), p + vec3(-1.0, 0.0, -1.0)), f.x), lerp_Stage1_c0_c0_c0_c0_c1_c0(grad_Stage1_c0_c0_c0_c0_c1_c0(perm_Stage1_c0_c0_c0_c0_c1_c0(AB + 1.0), p + vec3(0.0, -1.0, -1.0)), grad_Stage1_c0_c0_c0_c0_c1_c0(perm_Stage1_c0_c0_c0_c0_c1_c0(BB + 1.0), p + vec3(-1.0, -1.0, -1.0)), f.x), f.y), f.z);
+ return result;
+}
+float noiseOctaves_Stage1_c0_c0_c0_c0_c1_c0(vec3 p) {
+ float result = 0.0;
+ float ratio = 1.0;
+ for (float i = 0.0;i < 3.0; i++) {
+ result += noise_Stage1_c0_c0_c0_c0_c1_c0(p) / ratio;
+ p *= 2.0;
+ ratio *= 2.0;
+ }
+ return (result + 1.0) / 2.0;
+}
+vec4 ImprovedPerlinNoise_Stage1_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 vTransformedCoords_0_Stage0_ensure2D = vTransformedCoords_0_Stage0.xy / vTransformedCoords_0_Stage0.z;
+ vec2 coords = vTransformedCoords_0_Stage0_ensure2D * ubaseFrequency_Stage1_c0_c0_c0_c0_c1_c0;
+ float r = noiseOctaves_Stage1_c0_c0_c0_c0_c1_c0(vec3(coords, uz_Stage1_c0_c0_c0_c0_c1_c0));
+ float g = noiseOctaves_Stage1_c0_c0_c0_c0_c1_c0(vec3(coords, uz_Stage1_c0_c0_c0_c0_c1_c0));
+ float b = noiseOctaves_Stage1_c0_c0_c0_c0_c1_c0(vec3(coords, uz_Stage1_c0_c0_c0_c0_c1_c0));
+ float a = noiseOctaves_Stage1_c0_c0_c0_c0_c1_c0(vec3(coords, uz_Stage1_c0_c0_c0_c0_c1_c0));
+ _output = vec4(r, g, b, a);
+ _output = clamp(_output, 0.0, 1.0);
+ _output = vec4(_output.xyz * _output.www, _output.w);
+ return _output;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 blend_lighten(vec4 src, vec4 dst) {
+ vec4 result = blend_src_over(src, dst);
+ result.xyz = max(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
+ return result;
+}
+vec4 ComposeTwo_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_lighten(ConfigConversionEffect_Stage1_c0_c0_c0_c0_c0_c0(inputColor), ImprovedPerlinNoise_Stage1_c0_c0_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 MatrixConvolution_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 sum = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_1_Stage0 - uKernelOffset_Stage1_c0_c0_c1_c0 * uImageIncrement_Stage1_c0_c0_c1_c0;
+ vec4 c;
+ {
+ float k = uKernel_Stage1_c0_c0_c1_c0[0].x;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c1_c0[0].y;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ vec2 origCoord = vTransformedCoords_1_Stage0;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ _output.w = c.w;
+ _output.xyz = clamp(sum.xyz * uGain_Stage1_c0_c0_c1_c0 + uBias_Stage1_c0_c0_c1_c0, 0.0, 1.0);
+ _output.xyz *= _output.w;
+ _output *= _input;
+ return _output;
+}
+vec4 blend_multiply(vec4 src, vec4 dst) {
+ return vec4(((1.0 - src.w) * dst.xyz + (1.0 - dst.w) * src.xyz) + src.xyz * dst.xyz, src.w + (1.0 - src.w) * dst.w);
+}
+vec4 ComposeTwo_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_multiply(ComposeTwo_Stage1_c0_c0_c0_c0(inputColor), MatrixConvolution_Stage1_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 light_Stage1_c1_c0_c0_c0(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ vec3 halfDir = normalize(surfaceToLight + vec3(0.0, 0.0, 1.0));
+ float colorScale = uKS_Stage1_c1_c0_c0_c0 * pow(dot(normal, halfDir), uShininess_Stage1_c1_c0_c0_c0);
+ vec3 color = lightColor * clamp(colorScale, 0.0, 1.0);
+ return vec4(color, max(max(color.x, color.y), color.z));
+}
+float sobel_Stage1_c1_c0_c0_c0(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage1_c1_c0_c0_c0(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage1_c1_c0_c0_c0(float m[9], float surfaceScale) {
+ return pointToNormal_Stage1_c1_c0_c0_c0(sobel_Stage1_c1_c0_c0_c0(0.0, 0.0, m[3], m[4], m[6], m[7], 0.66666698455810547), sobel_Stage1_c1_c0_c0_c0(m[3], m[6], m[4], m[7], 0.0, 0.0, 0.66666698455810547), surfaceScale);
+}
+vec3 lightColor_Stage1_c1_c0_c0_c0(vec3 surfaceToLight) {
+ float cosAngle = -dot(surfaceToLight, uS_Stage1_c1_c0_c0_c0);
+ if (cosAngle < uCosOuterConeAngle_Stage1_c1_c0_c0_c0) {
+ return vec3(0.0);
+ }
+ float scale = pow(cosAngle, uExponent_Stage1_c1_c0_c0_c0);
+ if (cosAngle < uCosInnerConeAngle_Stage1_c1_c0_c0_c0) {
+ return ((uLightColor_Stage1_c1_c0_c0_c0 * scale) * (cosAngle - uCosOuterConeAngle_Stage1_c1_c0_c0_c0)) * uConeScale_Stage1_c1_c0_c0_c0;
+ }
+ return uLightColor_Stage1_c1_c0_c0_c0;
+}
+vec4 SpecularLighting_Stage1_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coord = vTransformedCoords_2_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage1_c1_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0.xy, uTexDom_Stage1_c1_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_3_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp0 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1_c1_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0.xy, uTexDom_Stage1_c1_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_3_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1_c1_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0.xy, uTexDom_Stage1_c1_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_3_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage1_c1_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0.xy, uTexDom_Stage1_c1_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_3_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0.xy, uTexDom_Stage1_c1_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_3_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1_c1_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0.xy, uTexDom_Stage1_c1_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_3_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp5 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage1_c1_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0.xy, uTexDom_Stage1_c1_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_3_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp6 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage1_c1_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0.xy, uTexDom_Stage1_c1_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_3_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp7 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage1_c1_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0.xy, uTexDom_Stage1_c1_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_3_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp8 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = normalize(uLightLocation_Stage1_c1_c0_c0_c0 - vec3(gl_FragCoord.xy, uSurfaceScale_Stage1_c1_c0_c0_c0 * m[4]));
+ _output = light_Stage1_c1_c0_c0_c0(normal_Stage1_c1_c0_c0_c0(m, uSurfaceScale_Stage1_c1_c0_c0_c0), surfaceToLight, lightColor_Stage1_c1_c0_c0_c0(surfaceToLight));
+ _output *= _input;
+ return _output;
+}
+vec4 CircularRRect_Stage1_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 dxy0 = uinnerRect_Stage1_c1_c0_c1_c0.xy - gl_FragCoord.xy;
+ vec2 dxy1 = gl_FragCoord.xy - uinnerRect_Stage1_c1_c0_c1_c0.zw;
+ vec2 dxy = max(max(dxy0, dxy1), 0.0);
+ float alpha = clamp(uradiusPlusHalf_Stage1_c1_c0_c1_c0.x - length(dxy), 0.0, 1.0);
+ _output = _input * alpha;
+ return _output;
+}
+float _blend_color_saturation(vec3 color) {
+ return max(max(color.x, color.y), color.z) - min(min(color.x, color.y), color.z);
+}
+vec3 _blend_set_color_saturation_helper(vec3 minMidMax, float sat) {
+ if (minMidMax.x < minMidMax.z) {
+ return vec3(0.0, (sat * (minMidMax.y - minMidMax.x)) / (minMidMax.z - minMidMax.x), sat);
+ }
+ return vec3(0.0);
+}
+vec3 _blend_set_color_saturation(vec3 hueLumColor, vec3 satColor) {
+ float sat = _blend_color_saturation(satColor);
+ if (hueLumColor.x <= hueLumColor.y) {
+ if (hueLumColor.y <= hueLumColor.z) {
+ hueLumColor.xyz = _blend_set_color_saturation_helper(hueLumColor, sat);
+ } else if (hueLumColor.x <= hueLumColor.z) {
+ hueLumColor.xzy = _blend_set_color_saturation_helper(hueLumColor.xzy, sat);
+ } else {
+ hueLumColor.zxy = _blend_set_color_saturation_helper(hueLumColor.zxy, sat);
+ }
+ } else if (hueLumColor.x <= hueLumColor.z) {
+ hueLumColor.yxz = _blend_set_color_saturation_helper(hueLumColor.yxz, sat);
+ } else if (hueLumColor.y <= hueLumColor.z) {
+ hueLumColor.yzx = _blend_set_color_saturation_helper(hueLumColor.yzx, sat);
+ } else {
+ hueLumColor.zyx = _blend_set_color_saturation_helper(hueLumColor.zyx, sat);
+ }
+ return hueLumColor;
+}
+float _blend_color_luminance(vec3 color) {
+ return dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), color);
+}
+vec3 _blend_set_color_luminance(vec3 hueSatColor, float alpha, vec3 lumColor) {
+ float lum = _blend_color_luminance(lumColor);
+ vec3 result = (lum - _blend_color_luminance(hueSatColor)) + hueSatColor;
+ float minComp = min(min(result.x, result.y), result.z);
+ float maxComp = max(max(result.x, result.y), result.z);
+ if (minComp < 0.0 && lum != minComp) {
+ result = lum + ((result - lum) * lum) / (lum - minComp);
+ }
+ if (maxComp > alpha && maxComp != lum) {
+ return lum + ((result - lum) * (alpha - lum)) / (maxComp - lum);
+ }
+ return result;
+}
+vec4 blend_saturation(vec4 src, vec4 dst) {
+ float alpha = dst.w * src.w;
+ vec3 sda = src.xyz * dst.w;
+ vec3 dsa = dst.xyz * src.w;
+ return vec4((((_blend_set_color_luminance(_blend_set_color_saturation(dsa, sda), alpha, dsa) + dst.xyz) - dsa) + src.xyz) - sda, (src.w + dst.w) - alpha);
+}
+vec4 ComposeTwo_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_saturation(SpecularLighting_Stage1_c1_c0_c0_c0(inputColor), CircularRRect_Stage1_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 blend_plus(vec4 src, vec4 dst) {
+ return min(src + dst, 1.0);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ vec4 circleEdge;
+ circleEdge = vinCircleEdge_Stage0;
+ vec3 clipPlane;
+ clipPlane = vinClipPlane_Stage0;
+ vec3 unionPlane;
+ unionPlane = vinUnionPlane_Stage0;
+ vec4 roundCapCenters;
+ roundCapCenters = vinRoundCapCenters_Stage0;
+ outputColor_Stage0 = vinColor_Stage0;
+ float d = length(circleEdge.xy);
+ float distanceToOuterEdge = circleEdge.z * (1.0 - d);
+ float edgeAlpha = clamp(distanceToOuterEdge, 0.0, 1.0);
+ float distanceToInnerEdge = circleEdge.z * (d - circleEdge.w);
+ float innerAlpha = clamp(distanceToInnerEdge, 0.0, 1.0);
+ edgeAlpha *= innerAlpha;
+ float clip = clamp(circleEdge.z * dot(circleEdge.xy, clipPlane.xy) + clipPlane.z, 0.0, 1.0);
+ clip = clamp(clip + clamp(circleEdge.z * dot(circleEdge.xy, unionPlane.xy) + unionPlane.z, 0.0, 1.0), 0.0, 1.0);
+ edgeAlpha *= clip;
+ float dcap1 = circleEdge.z * (vcapRadius_Stage0 - length(circleEdge.xy - roundCapCenters.xy));
+ float dcap2 = circleEdge.z * (vcapRadius_Stage0 - length(circleEdge.xy - roundCapCenters.zw));
+ float capAlpha = (1.0 - clip) * (max(dcap1, 0.0) + max(dcap2, 0.0));
+ edgeAlpha = min(edgeAlpha + capAlpha, 1.0);
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_plus(ComposeTwo_Stage1_c0_c0(inputColor), ComposeTwo_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ sk_FragColor = outputCoverage_Stage0 * output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec4 inCircleEdge;
+in vec3 inClipPlane;
+in vec3 inUnionPlane;
+in vec4 inRoundCapCenters;
+noperspective out vec4 vinCircleEdge_Stage0;
+noperspective out vec3 vinClipPlane_Stage0;
+noperspective out vec3 vinUnionPlane_Stage0;
+noperspective out vec4 vinRoundCapCenters_Stage0;
+flat out float vcapRadius_Stage0;
+noperspective out vec4 vinColor_Stage0;
+noperspective out vec3 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+void main() {
+ vinCircleEdge_Stage0 = inCircleEdge;
+ vinClipPlane_Stage0 = inClipPlane;
+ vinUnionPlane_Stage0 = inUnionPlane;
+ vinRoundCapCenters_Stage0 = inRoundCapCenters;
+ vcapRadius_Stage0 = (1.0 - inCircleEdge.w) / 2.0;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0);
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1591.shader_test b/shaders/skia/1591.shader_test
new file mode 100644
index 0000000..4b34f23
--- /dev/null
+++ b/shaders/skia/1591.shader_test
@@ -0,0 +1,220 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+uniform vec2 uImageIncrement_Stage1;
+uniform float uSurfaceScale_Stage1;
+uniform vec3 uLightColor_Stage1;
+uniform float uKD_Stage1;
+uniform vec4 uTexDom_Stage1;
+uniform vec3 uDecalParams_Stage1;
+uniform vec3 uLightLocation_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vEllipseOffsets_Stage0;
+noperspective in vec4 vEllipseRadii_Stage0;
+noperspective in vec4 vinColor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 light_Stage1(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ float colorScale = uKD_Stage1 * dot(normal, surfaceToLight);
+ return vec4(lightColor * clamp(colorScale, 0.0, 1.0), 1.0);
+}
+float sobel_Stage1(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage1(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage1(float m[9], float surfaceScale) {
+ return pointToNormal_Stage1(sobel_Stage1(m[0], m[2], m[3], m[5], m[6], m[8], 0.25), sobel_Stage1(m[0], m[6], m[1], m[7], m[2], m[8], 0.25), surfaceScale);
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ vec2 offset = vEllipseOffsets_Stage0;
+ offset *= vEllipseRadii_Stage0.xy;
+ float test = dot(offset, offset) - 1.0;
+ vec2 grad = (2.0 * offset) * vEllipseRadii_Stage0.xy;
+ float grad_dot = dot(grad, grad);
+ grad_dot = max(grad_dot, 1.1754999560161448e-38);
+ float invlen = inversesqrt(grad_dot);
+ float edgeAlpha = clamp(0.5 - test * invlen, 0.0, 1.0);
+ offset = vEllipseOffsets_Stage0 * vEllipseRadii_Stage0.zw;
+ test = dot(offset, offset) - 1.0;
+ grad = (2.0 * offset) * vEllipseRadii_Stage0.zw;
+ grad_dot = dot(grad, grad);
+ invlen = inversesqrt(grad_dot);
+ edgeAlpha *= clamp(0.5 + test * invlen, 0.0, 1.0);
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ vec4 output_Stage1;
+ {
+ vec2 coord = vTransformedCoords_0_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp0 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp5 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp6 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp7 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp8 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = normalize(uLightLocation_Stage1 - vec3(gl_FragCoord.xy, uSurfaceScale_Stage1 * m[4]));
+ output_Stage1 = light_Stage1(normal_Stage1(m, uSurfaceScale_Stage1), surfaceToLight, uLightColor_Stage1);
+ output_Stage1 *= outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec2 inEllipseOffset;
+in vec4 inEllipseRadii;
+noperspective out vec2 vEllipseOffsets_Stage0;
+noperspective out vec4 vEllipseRadii_Stage0;
+noperspective out vec4 vinColor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vEllipseOffsets_Stage0 = inEllipseOffset;
+ vEllipseRadii_Stage0 = inEllipseRadii;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1594.shader_test b/shaders/skia/1594.shader_test
new file mode 100644
index 0000000..28ceadd
--- /dev/null
+++ b/shaders/skia/1594.shader_test
@@ -0,0 +1,437 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_KHR_blend_equation_advanced : require
+out vec4 sk_FragColor;
+layout (blend_support_all_equations) out ;
+uniform vec4 uColor_Stage0;
+uniform vec4 uinnerRect_Stage1_c0_c0_c0_c0;
+uniform vec2 uradiusPlusHalf_Stage1_c0_c0_c0_c0;
+uniform float uinnerThreshold_Stage1_c0_c0_c1_c0_c1_c0;
+uniform float uouterThreshold_Stage1_c0_c0_c1_c0_c1_c0;
+uniform vec4 uboundsUniform_Stage1_c1_c0_c0_c0_c0_c0;
+uniform float uxInvZoom_Stage1_c1_c0_c0_c0_c0_c0;
+uniform float uyInvZoom_Stage1_c1_c0_c0_c0_c0_c0;
+uniform float uxInvInset_Stage1_c1_c0_c0_c0_c0_c0;
+uniform float uyInvInset_Stage1_c1_c0_c0_c0_c0_c0;
+uniform vec2 uoffset_Stage1_c1_c0_c0_c0_c0_c0;
+uniform vec4 uinnerRect_Stage1_c1_c0_c0_c0_c1_c0;
+uniform vec2 uradiusPlusHalf_Stage1_c1_c0_c0_c0_c1_c0;
+uniform vec2 uImageIncrement_Stage1_c1_c0_c1_c0_c0_c0;
+uniform float uSurfaceScale_Stage1_c1_c0_c1_c0_c0_c0;
+uniform vec3 uLightColor_Stage1_c1_c0_c1_c0_c0_c0;
+uniform float uKS_Stage1_c1_c0_c1_c0_c0_c0;
+uniform float uShininess_Stage1_c1_c0_c1_c0_c0_c0;
+uniform vec4 uTexDom_Stage1_c1_c0_c1_c0_c0_c0;
+uniform vec3 uDecalParams_Stage1_c1_c0_c1_c0_c0_c0;
+uniform vec3 uLightLocation_Stage1_c1_c0_c1_c0_c0_c0;
+uniform vec4 uinnerRect_Stage1_c1_c0_c1_c0_c1_c0;
+uniform vec2 uinvRadiiXY_Stage1_c1_c0_c1_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+uniform sampler2D uTextureSampler_2_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+noperspective in vec2 vTransformedCoords_3_Stage0;
+vec4 CircularRRect_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 dxy0 = uinnerRect_Stage1_c0_c0_c0_c0.xy - gl_FragCoord.xy;
+ vec2 dxy1 = gl_FragCoord.xy - uinnerRect_Stage1_c0_c0_c0_c0.zw;
+ vec2 dxy = max(max(dxy0, dxy1), 0.0);
+ float alpha = clamp(uradiusPlusHalf_Stage1_c0_c0_c0_c0.x - length(dxy), 0.0, 1.0);
+ _output = _input * alpha;
+ return _output;
+}
+vec4 Dither_Stage1_c0_c0_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = _input;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_0_Stage0.x);
+ uint y = uint(vTransformedCoords_0_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ _output = vec4(clamp(_output.xyz + value * 0.066666670143604279, 0.0, _output.w), _output.w);
+ return _output;
+}
+vec4 AlphaThresholdFragmentProcessor_Stage1_c0_c0_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 color = _input;
+ vec4 mask_color = texture(uTextureSampler_0_Stage1, vTransformedCoords_1_Stage0);
+ if (mask_color.w < 0.5) {
+ if (color.w > uouterThreshold_Stage1_c0_c0_c1_c0_c1_c0) {
+ float scale = uouterThreshold_Stage1_c0_c0_c1_c0_c1_c0 / color.w;
+ color.xyz *= scale;
+ color.w = uouterThreshold_Stage1_c0_c0_c1_c0_c1_c0;
+ }
+ } else if (color.w < uinnerThreshold_Stage1_c0_c0_c1_c0_c1_c0) {
+ float scale = uinnerThreshold_Stage1_c0_c0_c1_c0_c1_c0 / max(0.0010000000474974513, color.w);
+ color.xyz *= scale;
+ color.w = uinnerThreshold_Stage1_c0_c0_c1_c0_c1_c0;
+ }
+ _output = color;
+ return _output;
+}
+vec4 blend_multiply(vec4 src, vec4 dst) {
+ return vec4(((1.0 - src.w) * dst.xyz + (1.0 - dst.w) * src.xyz) + src.xyz * dst.xyz, src.w + (1.0 - src.w) * dst.w);
+}
+vec4 ComposeTwo_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_multiply(Dither_Stage1_c0_c0_c1_c0_c0_c0(inputColor), AlphaThresholdFragmentProcessor_Stage1_c0_c0_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 blend_difference(vec4 src, vec4 dst) {
+ return vec4((src.xyz + dst.xyz) - 2.0 * min(src.xyz * dst.w, dst.xyz * src.w), src.w + (1.0 - src.w) * dst.w);
+}
+vec4 ComposeTwo_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_difference(CircularRRect_Stage1_c0_c0_c0_c0(inputColor), ComposeTwo_Stage1_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 MagnifierEffect_Stage1_c1_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coord = vTransformedCoords_2_Stage0;
+ vec2 zoom_coord = uoffset_Stage1_c1_c0_c0_c0_c0_c0 + coord * vec2(uxInvZoom_Stage1_c1_c0_c0_c0_c0_c0, uyInvZoom_Stage1_c1_c0_c0_c0_c0_c0);
+ vec2 delta = (coord - uboundsUniform_Stage1_c1_c0_c0_c0_c0_c0.xy) * uboundsUniform_Stage1_c1_c0_c0_c0_c0_c0.zw;
+ delta = min(delta, vec2(1.0, 1.0) - delta);
+ delta *= vec2(uxInvInset_Stage1_c1_c0_c0_c0_c0_c0, uyInvInset_Stage1_c1_c0_c0_c0_c0_c0);
+ float weight = 0.0;
+ if (delta.x < 2.0 && delta.y < 2.0) {
+ delta = vec2(2.0, 2.0) - delta;
+ float dist = length(delta);
+ dist = max(2.0 - dist, 0.0);
+ weight = min(dist * dist, 1.0);
+ } else {
+ vec2 delta_squared = delta * delta;
+ weight = min(min(delta_squared.x, delta_squared.y), 1.0);
+ }
+ _output = texture(uTextureSampler_1_Stage1, mix(coord, zoom_coord, weight));
+ return _output;
+}
+vec4 CircularRRect_Stage1_c1_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 dxy0 = uinnerRect_Stage1_c1_c0_c0_c0_c1_c0.xy - gl_FragCoord.xy;
+ vec2 dxy1 = gl_FragCoord.xy - uinnerRect_Stage1_c1_c0_c0_c0_c1_c0.zw;
+ vec2 dxy = max(max(dxy0, dxy1), 0.0);
+ float alpha = clamp(uradiusPlusHalf_Stage1_c1_c0_c0_c0_c1_c0.x - length(dxy), 0.0, 1.0);
+ alpha = 1.0 - alpha;
+ _output = _input * alpha;
+ return _output;
+}
+float _blend_color_saturation(vec3 color) {
+ return max(max(color.x, color.y), color.z) - min(min(color.x, color.y), color.z);
+}
+vec3 _blend_set_color_saturation_helper(vec3 minMidMax, float sat) {
+ if (minMidMax.x < minMidMax.z) {
+ return vec3(0.0, (sat * (minMidMax.y - minMidMax.x)) / (minMidMax.z - minMidMax.x), sat);
+ }
+ return vec3(0.0);
+}
+vec3 _blend_set_color_saturation(vec3 hueLumColor, vec3 satColor) {
+ float sat = _blend_color_saturation(satColor);
+ if (hueLumColor.x <= hueLumColor.y) {
+ if (hueLumColor.y <= hueLumColor.z) {
+ hueLumColor.xyz = _blend_set_color_saturation_helper(hueLumColor, sat);
+ } else if (hueLumColor.x <= hueLumColor.z) {
+ hueLumColor.xzy = _blend_set_color_saturation_helper(hueLumColor.xzy, sat);
+ } else {
+ hueLumColor.zxy = _blend_set_color_saturation_helper(hueLumColor.zxy, sat);
+ }
+ } else if (hueLumColor.x <= hueLumColor.z) {
+ hueLumColor.yxz = _blend_set_color_saturation_helper(hueLumColor.yxz, sat);
+ } else if (hueLumColor.y <= hueLumColor.z) {
+ hueLumColor.yzx = _blend_set_color_saturation_helper(hueLumColor.yzx, sat);
+ } else {
+ hueLumColor.zyx = _blend_set_color_saturation_helper(hueLumColor.zyx, sat);
+ }
+ return hueLumColor;
+}
+float _blend_color_luminance(vec3 color) {
+ return dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), color);
+}
+vec3 _blend_set_color_luminance(vec3 hueSatColor, float alpha, vec3 lumColor) {
+ float lum = _blend_color_luminance(lumColor);
+ vec3 result = (lum - _blend_color_luminance(hueSatColor)) + hueSatColor;
+ float minComp = min(min(result.x, result.y), result.z);
+ float maxComp = max(max(result.x, result.y), result.z);
+ if (minComp < 0.0 && lum != minComp) {
+ result = lum + ((result - lum) * lum) / (lum - minComp);
+ }
+ if (maxComp > alpha && maxComp != lum) {
+ return lum + ((result - lum) * (alpha - lum)) / (maxComp - lum);
+ }
+ return result;
+}
+vec4 blend_hue(vec4 src, vec4 dst) {
+ float alpha = dst.w * src.w;
+ vec3 sda = src.xyz * dst.w;
+ vec3 dsa = dst.xyz * src.w;
+ return vec4((((_blend_set_color_luminance(_blend_set_color_saturation(sda, dsa), alpha, dsa) + dst.xyz) - dsa) + src.xyz) - sda, (src.w + dst.w) - alpha);
+}
+vec4 ComposeTwo_Stage1_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_hue(MagnifierEffect_Stage1_c1_c0_c0_c0_c0_c0(inputColor), CircularRRect_Stage1_c1_c0_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 light_Stage1_c1_c0_c1_c0_c0_c0(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ vec3 halfDir = normalize(surfaceToLight + vec3(0.0, 0.0, 1.0));
+ float colorScale = uKS_Stage1_c1_c0_c1_c0_c0_c0 * pow(dot(normal, halfDir), uShininess_Stage1_c1_c0_c1_c0_c0_c0);
+ vec3 color = lightColor * clamp(colorScale, 0.0, 1.0);
+ return vec4(color, max(max(color.x, color.y), color.z));
+}
+float sobel_Stage1_c1_c0_c1_c0_c0_c0(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage1_c1_c0_c1_c0_c0_c0(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage1_c1_c0_c1_c0_c0_c0(float m[9], float surfaceScale) {
+ return pointToNormal_Stage1_c1_c0_c1_c0_c0_c0(sobel_Stage1_c1_c0_c1_c0_c0_c0(0.0, 0.0, m[4], m[5], m[7], m[8], 0.66666698455810547), sobel_Stage1_c1_c0_c1_c0_c0_c0(0.0, 0.0, m[4], m[7], m[5], m[8], 0.66666698455810547), surfaceScale);
+}
+vec4 SpecularLighting_Stage1_c1_c0_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coord = vTransformedCoords_3_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage1_c1_c0_c1_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c1_c0_c0_c0.xy, uTexDom_Stage1_c1_c0_c1_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c1_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c1_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c1_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c1_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp0 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1_c1_c0_c1_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c1_c0_c0_c0.xy, uTexDom_Stage1_c1_c0_c1_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c1_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c1_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c1_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c1_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1_c1_c0_c1_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c1_c0_c0_c0.xy, uTexDom_Stage1_c1_c0_c1_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c1_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c1_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c1_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c1_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage1_c1_c0_c1_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c1_c0_c0_c0.xy, uTexDom_Stage1_c1_c0_c1_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c1_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c1_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c1_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c1_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c1_c0_c0_c0.xy, uTexDom_Stage1_c1_c0_c1_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c1_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c1_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c1_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c1_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1_c1_c0_c1_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c1_c0_c0_c0.xy, uTexDom_Stage1_c1_c0_c1_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c1_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c1_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c1_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c1_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp5 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage1_c1_c0_c1_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c1_c0_c0_c0.xy, uTexDom_Stage1_c1_c0_c1_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c1_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c1_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c1_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c1_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp6 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage1_c1_c0_c1_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c1_c0_c0_c0.xy, uTexDom_Stage1_c1_c0_c1_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c1_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c1_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c1_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c1_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp7 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage1_c1_c0_c1_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c1_c0_c0_c0.xy, uTexDom_Stage1_c1_c0_c1_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c1_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c1_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c1_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c1_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp8 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = normalize(uLightLocation_Stage1_c1_c0_c1_c0_c0_c0 - vec3(gl_FragCoord.xy, uSurfaceScale_Stage1_c1_c0_c1_c0_c0_c0 * m[4]));
+ _output = light_Stage1_c1_c0_c1_c0_c0_c0(normal_Stage1_c1_c0_c1_c0_c0_c0(m, uSurfaceScale_Stage1_c1_c0_c1_c0_c0_c0), surfaceToLight, uLightColor_Stage1_c1_c0_c1_c0_c0_c0);
+ _output *= _input;
+ return _output;
+}
+vec4 EllipticalRRect_Stage1_c1_c0_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 dxy0 = uinnerRect_Stage1_c1_c0_c1_c0_c1_c0.xy - gl_FragCoord.xy;
+ vec2 dxy1 = gl_FragCoord.xy - uinnerRect_Stage1_c1_c0_c1_c0_c1_c0.zw;
+ vec2 dxy = max(max(dxy0, dxy1), 0.0);
+ vec2 Z = dxy * uinvRadiiXY_Stage1_c1_c0_c1_c0_c1_c0;
+ float implicit = dot(Z, dxy) - 1.0;
+ float grad_dot = 4.0 * dot(Z, Z);
+ grad_dot = max(grad_dot, 9.9999997473787516e-05);
+ float approx_dist = implicit * inversesqrt(grad_dot);
+ float alpha = clamp(0.5 - approx_dist, 0.0, 1.0);
+ _output = _input * alpha;
+ return _output;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 blend_darken(vec4 src, vec4 dst) {
+ vec4 result = blend_src_over(src, dst);
+ result.xyz = min(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
+ return result;
+}
+vec4 ComposeTwo_Stage1_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_darken(SpecularLighting_Stage1_c1_c0_c1_c0_c0_c0(inputColor), EllipticalRRect_Stage1_c1_c0_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+float _guarded_divide(float n, float d) {
+ return n / d;
+}
+float _color_burn_component(float sc, float sa, float dc, float da) {
+ if (da == dc) {
+ return (sa * da + sc * (1.0 - da)) + dc * (1.0 - sa);
+ } else if (sc == 0.0) {
+ return dc * (1.0 - sa);
+ }
+ float d = max(0.0, da - _guarded_divide((da - dc) * sa, sc));
+ return (d * sa + sc * (1.0 - da)) + dc * (1.0 - sa);
+}
+vec4 blend_color_burn(vec4 src, vec4 dst) {
+ return vec4(_color_burn_component(src.x, src.w, dst.x, dst.w), _color_burn_component(src.y, src.w, dst.y, dst.w), _color_burn_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+}
+vec4 ComposeTwo_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_color_burn(ComposeTwo_Stage1_c1_c0_c0_c0(inputColor), ComposeTwo_Stage1_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = uColor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_multiply(ComposeTwo_Stage1_c0_c0(inputColor), ComposeTwo_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+uniform mat3 uCoordTransformMatrix_3_Stage0;
+in vec2 inPosition;
+in vec2 inLocalCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+noperspective out vec2 vTransformedCoords_3_Stage0;
+void main() {
+ vec2 pos2 = (uViewM_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ vTransformedCoords_3_Stage0 = (uCoordTransformMatrix_3_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1597.shader_test b/shaders/skia/1597.shader_test
new file mode 100644
index 0000000..9e3c0d3
--- /dev/null
+++ b/shaders/skia/1597.shader_test
@@ -0,0 +1,255 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform vec2 uBounds_Stage1;
+uniform vec4 uKernel_Stage1[6];
+uniform vec2 ubaseFrequency_Stage2_c0_c0;
+uniform float uz_Stage2_c0_c0;
+uniform vec2 ubaseFrequency_Stage3;
+uniform float uz_Stage3;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+uniform sampler2D uTextureSampler_1_Stage2;
+uniform sampler2D uTextureSampler_0_Stage3;
+uniform sampler2D uTextureSampler_1_Stage3;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+noperspective in float vinCoverage_Stage0;
+vec3 fade_Stage2_c0_c0(vec3 t) {
+ return ((t * t) * t) * (t * (t * 6.0 - 15.0) + 10.0);
+}
+float perm_Stage2_c0_c0(float x) {
+ return texture(uTextureSampler_0_Stage2, vec2(fract(x / 256.0), 0.0)).x * 255.0;
+}
+float grad_Stage2_c0_c0(float x, vec3 p) {
+ return dot(texture(uTextureSampler_1_Stage2, vec2(fract(x / 16.0), 0.0)).xyz * 255.0 - vec3(1.0), p);
+}
+float lerp_Stage2_c0_c0(float a, float b, float w) {
+ return a + w * (b - a);
+}
+float noise_Stage2_c0_c0(vec3 p) {
+ vec3 P = mod(floor(p), 256.0);
+ p -= floor(p);
+ vec3 f = fade_Stage2_c0_c0(p);
+ float A = perm_Stage2_c0_c0(P.x) + P.y;
+ float AA = perm_Stage2_c0_c0(A) + P.z;
+ float AB = perm_Stage2_c0_c0(A + 1.0) + P.z;
+ float B = perm_Stage2_c0_c0(P.x + 1.0) + P.y;
+ float BA = perm_Stage2_c0_c0(B) + P.z;
+ float BB = perm_Stage2_c0_c0(B + 1.0) + P.z;
+ float result = lerp_Stage2_c0_c0(lerp_Stage2_c0_c0(lerp_Stage2_c0_c0(grad_Stage2_c0_c0(perm_Stage2_c0_c0(AA), p), grad_Stage2_c0_c0(perm_Stage2_c0_c0(BA), p + vec3(-1.0, 0.0, 0.0)), f.x), lerp_Stage2_c0_c0(grad_Stage2_c0_c0(perm_Stage2_c0_c0(AB), p + vec3(0.0, -1.0, 0.0)), grad_Stage2_c0_c0(perm_Stage2_c0_c0(BB), p + vec3(-1.0, -1.0, 0.0)), f.x), f.y), lerp_Stage2_c0_c0(lerp_Stage2_c0_c0(grad_Stage2_c0_c0(perm_Stage2_c0_c0(AA + 1.0), p + vec3(0.0, 0.0, -1.0)), grad_Stage2_c0_c0(perm_Stage2_c0_c0(BA + 1.0), p + vec3(-1.0, 0.0, -1.0)), f.x), lerp_Stage2_c0_c0(grad_Stage2_c0_c0(perm_Stage2_c0_c0(AB + 1.0), p + vec3(0.0, -1.0, -1.0)), grad_Stage2_c0_c0(perm_Stage2_c0_c0(BB + 1.0), p + vec3(-1.0, -1.0, -1.0)), f.x), f.y), f.z);
+ return result;
+}
+float noiseOctaves_Stage2_c0_c0(vec3 p) {
+ float result = 0.0;
+ float ratio = 1.0;
+ for (float i = 0.0;i < 9.0; i++) {
+ result += noise_Stage2_c0_c0(p) / ratio;
+ p *= 2.0;
+ ratio *= 2.0;
+ }
+ return (result + 1.0) / 2.0;
+}
+vec4 ImprovedPerlinNoise_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coords = vTransformedCoords_1_Stage0 * ubaseFrequency_Stage2_c0_c0;
+ float r = noiseOctaves_Stage2_c0_c0(vec3(coords, uz_Stage2_c0_c0));
+ float g = noiseOctaves_Stage2_c0_c0(vec3(coords, uz_Stage2_c0_c0));
+ float b = noiseOctaves_Stage2_c0_c0(vec3(coords, uz_Stage2_c0_c0));
+ float a = noiseOctaves_Stage2_c0_c0(vec3(coords, uz_Stage2_c0_c0));
+ _output = vec4(r, g, b, a);
+ _output = clamp(_output, 0.0, 1.0);
+ _output = vec4(_output.xyz * _output.www, _output.w);
+ return _output;
+}
+vec3 fade_Stage3(vec3 t) {
+ return ((t * t) * t) * (t * (t * 6.0 - 15.0) + 10.0);
+}
+float perm_Stage3(float x) {
+ return texture(uTextureSampler_0_Stage3, vec2(fract(x / 256.0), 0.0)).x * 255.0;
+}
+float grad_Stage3(float x, vec3 p) {
+ return dot(texture(uTextureSampler_1_Stage3, vec2(fract(x / 16.0), 0.0)).xyz * 255.0 - vec3(1.0), p);
+}
+float lerp_Stage3(float a, float b, float w) {
+ return a + w * (b - a);
+}
+float noise_Stage3(vec3 p) {
+ vec3 P = mod(floor(p), 256.0);
+ p -= floor(p);
+ vec3 f = fade_Stage3(p);
+ float A = perm_Stage3(P.x) + P.y;
+ float AA = perm_Stage3(A) + P.z;
+ float AB = perm_Stage3(A + 1.0) + P.z;
+ float B = perm_Stage3(P.x + 1.0) + P.y;
+ float BA = perm_Stage3(B) + P.z;
+ float BB = perm_Stage3(B + 1.0) + P.z;
+ float result = lerp_Stage3(lerp_Stage3(lerp_Stage3(grad_Stage3(perm_Stage3(AA), p), grad_Stage3(perm_Stage3(BA), p + vec3(-1.0, 0.0, 0.0)), f.x), lerp_Stage3(grad_Stage3(perm_Stage3(AB), p + vec3(0.0, -1.0, 0.0)), grad_Stage3(perm_Stage3(BB), p + vec3(-1.0, -1.0, 0.0)), f.x), f.y), lerp_Stage3(lerp_Stage3(grad_Stage3(perm_Stage3(AA + 1.0), p + vec3(0.0, 0.0, -1.0)), grad_Stage3(perm_Stage3(BA + 1.0), p + vec3(-1.0, 0.0, -1.0)), f.x), lerp_Stage3(grad_Stage3(perm_Stage3(AB + 1.0), p + vec3(0.0, -1.0, -1.0)), grad_Stage3(perm_Stage3(BB + 1.0), p + vec3(-1.0, -1.0, -1.0)), f.x), f.y), f.z);
+ return result;
+}
+float noiseOctaves_Stage3(vec3 p) {
+ float result = 0.0;
+ float ratio = 1.0;
+ for (float i = 0.0;i < 9.0; i++) {
+ result += noise_Stage3(p) / ratio;
+ p *= 2.0;
+ ratio *= 2.0;
+ }
+ return (result + 1.0) / 2.0;
+}
+vec4 blend_src_out(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ float alpha = 1.0;
+ alpha = vinCoverage_Stage0;
+ outputCoverage_Stage0 = vec4(alpha);
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0 - 10.0 * uImageIncrement_Stage1;
+ vec2 coordSampled = vec2(0.0, 0.0);
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1.x, uBounds_Stage1.y - uBounds_Stage1.x) + uBounds_Stage1.x;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1.x, uBounds_Stage1.y - uBounds_Stage1.x) + uBounds_Stage1.x;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1.x, uBounds_Stage1.y - uBounds_Stage1.x) + uBounds_Stage1.x;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1.x, uBounds_Stage1.y - uBounds_Stage1.x) + uBounds_Stage1.x;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1.x, uBounds_Stage1.y - uBounds_Stage1.x) + uBounds_Stage1.x;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1.x, uBounds_Stage1.y - uBounds_Stage1.x) + uBounds_Stage1.x;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1.x, uBounds_Stage1.y - uBounds_Stage1.x) + uBounds_Stage1.x;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1.x, uBounds_Stage1.y - uBounds_Stage1.x) + uBounds_Stage1.x;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1.x, uBounds_Stage1.y - uBounds_Stage1.x) + uBounds_Stage1.x;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1.x, uBounds_Stage1.y - uBounds_Stage1.x) + uBounds_Stage1.x;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1.x, uBounds_Stage1.y - uBounds_Stage1.x) + uBounds_Stage1.x;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1.x, uBounds_Stage1.y - uBounds_Stage1.x) + uBounds_Stage1.x;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1.x, uBounds_Stage1.y - uBounds_Stage1.x) + uBounds_Stage1.x;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1.x, uBounds_Stage1.y - uBounds_Stage1.x) + uBounds_Stage1.x;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1.x, uBounds_Stage1.y - uBounds_Stage1.x) + uBounds_Stage1.x;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1.x, uBounds_Stage1.y - uBounds_Stage1.x) + uBounds_Stage1.x;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1.x, uBounds_Stage1.y - uBounds_Stage1.x) + uBounds_Stage1.x;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[4].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1.x, uBounds_Stage1.y - uBounds_Stage1.x) + uBounds_Stage1.x;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[4].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1.x, uBounds_Stage1.y - uBounds_Stage1.x) + uBounds_Stage1.x;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[4].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1.x, uBounds_Stage1.y - uBounds_Stage1.x) + uBounds_Stage1.x;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[4].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1.x, uBounds_Stage1.y - uBounds_Stage1.x) + uBounds_Stage1.x;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[5].x;
+ coord += uImageIncrement_Stage1;
+ output_Stage1 *= outputCoverage_Stage0;
+ }
+ {
+ blend_src_out(ImprovedPerlinNoise_Stage2_c0_c0(vec4(1.0)), output_Stage1);
+ }
+ vec4 output_Stage3;
+ {
+ vec2 coords = vTransformedCoords_2_Stage0 * ubaseFrequency_Stage3;
+ float r = noiseOctaves_Stage3(vec3(coords, uz_Stage3));
+ float g = noiseOctaves_Stage3(vec3(coords, uz_Stage3));
+ float b = noiseOctaves_Stage3(vec3(coords, uz_Stage3));
+ float a = noiseOctaves_Stage3(vec3(coords, uz_Stage3));
+ output_Stage3 = vec4(r, g, b, a);
+ output_Stage3 = clamp(output_Stage3, 0.0, 1.0);
+ output_Stage3 = vec4(output_Stage3.xyz * output_Stage3.www, output_Stage3.w);
+ }
+ {
+ sk_FragColor = outputColor_Stage0 * output_Stage3;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in float inCoverage;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+noperspective out float vinCoverage_Stage0;
+void main() {
+ vec4 color = inColor;
+ vcolor_Stage0 = color;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(inPosition, 1.0)).xy;
+ vinCoverage_Stage0 = inCoverage;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/16-1.shader_test b/shaders/skia/16-1.shader_test
new file mode 100644
index 0000000..fd408d6
--- /dev/null
+++ b/shaders/skia/16-1.shader_test
@@ -0,0 +1,138 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 usubset_Stage1_c0_c0;
+uniform vec4 uclamp_Stage1_c0_c0;
+uniform vec4 unorm_Stage1_c0_c0;
+uniform vec4 usubset_Stage1_c1_c0;
+uniform vec4 uclamp_Stage1_c1_c0;
+uniform vec4 unorm_Stage1_c1_c0;
+uniform vec4 usubset_Stage1_c2_c0;
+uniform vec4 uclamp_Stage1_c2_c0;
+uniform vec4 unorm_Stage1_c2_c0;
+uniform mat3 ucolorSpaceMatrix_Stage1;
+uniform vec3 ucolorSpaceTranslate_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+uniform sampler2D uTextureSampler_2_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+vec4 TextureEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 inCoord = vTransformedCoords_0_Stage0;
+ inCoord *= unorm_Stage1_c0_c0.xy;
+ vec2 subsetCoord;
+ subsetCoord.x = mod(inCoord.x - usubset_Stage1_c0_c0.x, usubset_Stage1_c0_c0.z - usubset_Stage1_c0_c0.x) + usubset_Stage1_c0_c0.x;
+ subsetCoord.y = mod(inCoord.y - usubset_Stage1_c0_c0.y, usubset_Stage1_c0_c0.w - usubset_Stage1_c0_c0.y) + usubset_Stage1_c0_c0.y;
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage1_c0_c0.x, uclamp_Stage1_c0_c0.z);
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage1_c0_c0.y, uclamp_Stage1_c0_c0.w);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord * unorm_Stage1_c0_c0.zw);
+ float errX = subsetCoord.x - clampedCoord.x;
+ float repeatCoordX = errX > 0.0 ? uclamp_Stage1_c0_c0.x : uclamp_Stage1_c0_c0.z;
+ float errY = subsetCoord.y - clampedCoord.y;
+ float repeatCoordY = errY > 0.0 ? uclamp_Stage1_c0_c0.y : uclamp_Stage1_c0_c0.w;
+ if (errX != 0.0 && errY != 0.0) {
+ errX = abs(errX);
+ textureColor = mix(mix(textureColor, texture(uTextureSampler_0_Stage1, vec2(repeatCoordX, clampedCoord.y) * unorm_Stage1_c0_c0.zw), errX), mix(texture(uTextureSampler_0_Stage1, vec2(clampedCoord.x, repeatCoordY) * unorm_Stage1_c0_c0.zw), texture(uTextureSampler_0_Stage1, vec2(repeatCoordX, repeatCoordY) * unorm_Stage1_c0_c0.zw), errX), abs(errY));
+ } else if (errX != 0.0) {
+ textureColor = mix(textureColor, texture(uTextureSampler_0_Stage1, vec2(repeatCoordX, clampedCoord.y) * unorm_Stage1_c0_c0.zw), abs(errX));
+ } else if (errY != 0.0) {
+ textureColor = mix(textureColor, texture(uTextureSampler_0_Stage1, vec2(clampedCoord.x, repeatCoordY) * unorm_Stage1_c0_c0.zw), abs(errY));
+ }
+ _output = _input * textureColor;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 inCoord = vTransformedCoords_1_Stage0;
+ inCoord *= unorm_Stage1_c1_c0.xy;
+ vec2 subsetCoord;
+ subsetCoord.x = mod(inCoord.x - usubset_Stage1_c1_c0.x, usubset_Stage1_c1_c0.z - usubset_Stage1_c1_c0.x) + usubset_Stage1_c1_c0.x;
+ subsetCoord.y = mod(inCoord.y - usubset_Stage1_c1_c0.y, usubset_Stage1_c1_c0.w - usubset_Stage1_c1_c0.y) + usubset_Stage1_c1_c0.y;
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage1_c1_c0.x, uclamp_Stage1_c1_c0.z);
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage1_c1_c0.y, uclamp_Stage1_c1_c0.w);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord * unorm_Stage1_c1_c0.zw);
+ float errX = subsetCoord.x - clampedCoord.x;
+ float repeatCoordX = errX > 0.0 ? uclamp_Stage1_c1_c0.x : uclamp_Stage1_c1_c0.z;
+ float errY = subsetCoord.y - clampedCoord.y;
+ float repeatCoordY = errY > 0.0 ? uclamp_Stage1_c1_c0.y : uclamp_Stage1_c1_c0.w;
+ if (errX != 0.0 && errY != 0.0) {
+ errX = abs(errX);
+ textureColor = mix(mix(textureColor, texture(uTextureSampler_1_Stage1, vec2(repeatCoordX, clampedCoord.y) * unorm_Stage1_c1_c0.zw), errX), mix(texture(uTextureSampler_1_Stage1, vec2(clampedCoord.x, repeatCoordY) * unorm_Stage1_c1_c0.zw), texture(uTextureSampler_1_Stage1, vec2(repeatCoordX, repeatCoordY) * unorm_Stage1_c1_c0.zw), errX), abs(errY));
+ } else if (errX != 0.0) {
+ textureColor = mix(textureColor, texture(uTextureSampler_1_Stage1, vec2(repeatCoordX, clampedCoord.y) * unorm_Stage1_c1_c0.zw), abs(errX));
+ } else if (errY != 0.0) {
+ textureColor = mix(textureColor, texture(uTextureSampler_1_Stage1, vec2(clampedCoord.x, repeatCoordY) * unorm_Stage1_c1_c0.zw), abs(errY));
+ }
+ _output = _input * textureColor;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c2_c0(vec4 _input) {
+ vec4 _output;
+ vec2 inCoord = vTransformedCoords_2_Stage0;
+ inCoord *= unorm_Stage1_c2_c0.xy;
+ vec2 subsetCoord;
+ subsetCoord.x = mod(inCoord.x - usubset_Stage1_c2_c0.x, usubset_Stage1_c2_c0.z - usubset_Stage1_c2_c0.x) + usubset_Stage1_c2_c0.x;
+ subsetCoord.y = mod(inCoord.y - usubset_Stage1_c2_c0.y, usubset_Stage1_c2_c0.w - usubset_Stage1_c2_c0.y) + usubset_Stage1_c2_c0.y;
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage1_c2_c0.x, uclamp_Stage1_c2_c0.z);
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage1_c2_c0.y, uclamp_Stage1_c2_c0.w);
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord * unorm_Stage1_c2_c0.zw);
+ float errX = subsetCoord.x - clampedCoord.x;
+ float repeatCoordX = errX > 0.0 ? uclamp_Stage1_c2_c0.x : uclamp_Stage1_c2_c0.z;
+ float errY = subsetCoord.y - clampedCoord.y;
+ float repeatCoordY = errY > 0.0 ? uclamp_Stage1_c2_c0.y : uclamp_Stage1_c2_c0.w;
+ if (errX != 0.0 && errY != 0.0) {
+ errX = abs(errX);
+ textureColor = mix(mix(textureColor, texture(uTextureSampler_2_Stage1, vec2(repeatCoordX, clampedCoord.y) * unorm_Stage1_c2_c0.zw), errX), mix(texture(uTextureSampler_2_Stage1, vec2(clampedCoord.x, repeatCoordY) * unorm_Stage1_c2_c0.zw), texture(uTextureSampler_2_Stage1, vec2(repeatCoordX, repeatCoordY) * unorm_Stage1_c2_c0.zw), errX), abs(errY));
+ } else if (errX != 0.0) {
+ textureColor = mix(textureColor, texture(uTextureSampler_2_Stage1, vec2(repeatCoordX, clampedCoord.y) * unorm_Stage1_c2_c0.zw), abs(errX));
+ } else if (errY != 0.0) {
+ textureColor = mix(textureColor, texture(uTextureSampler_2_Stage1, vec2(clampedCoord.x, repeatCoordY) * unorm_Stage1_c2_c0.zw), abs(errY));
+ }
+ _output = _input * textureColor;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ vec4 planes[3];
+ planes[0] = TextureEffect_Stage1_c0_c0(vec4(1.0));
+ planes[1] = TextureEffect_Stage1_c1_c0(vec4(1.0));
+ planes[2] = TextureEffect_Stage1_c2_c0(vec4(1.0));
+ vec4 color = vec4(planes[0].x, planes[1].x, planes[2].x, 1.0);
+ color.xyz = clamp(color.xyz * ucolorSpaceMatrix_Stage1 + ucolorSpaceTranslate_Stage1, 0.0, 1.0);
+ output_Stage1 = color;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/16-10.shader_test b/shaders/skia/16-10.shader_test
new file mode 100644
index 0000000..9f1d20e
--- /dev/null
+++ b/shaders/skia/16-10.shader_test
@@ -0,0 +1,124 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uColor_Stage0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale8_9_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale10_11_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias8_9_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias10_11_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage2_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.w) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c1_c0;
+ }
+ }
+ } else {
+ {
+ if (t < uthresholds9_13_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale8_9_Stage1_c0_c0_c1_c0;
+ bias = ubias8_9_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale10_11_Stage1_c0_c0_c1_c0;
+ bias = ubias10_11_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c1_c0;
+ }
+ return _output;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 blend_darken(vec4 src, vec4 dst) {
+ vec4 result = blend_src_over(src, dst);
+ result.xyz = min(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
+ return result;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TiledGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_darken(ConstColorProcessor_Stage2_c1_c0(vec4(1.0)), output_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 inLocalCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/16-104.shader_test b/shaders/skia/16-104.shader_test
new file mode 100644
index 0000000..822d34c
--- /dev/null
+++ b/shaders/skia/16-104.shader_test
@@ -0,0 +1,114 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform vec2 uBounds_Stage1;
+uniform vec4 uKernel_Stage1[5];
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0 - 9.0 * uImageIncrement_Stage1;
+ vec2 coordSampled = vec2(0.0, 0.0);
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1.x, uBounds_Stage1.y - uBounds_Stage1.x) + uBounds_Stage1.x;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1.x, uBounds_Stage1.y - uBounds_Stage1.x) + uBounds_Stage1.x;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1.x, uBounds_Stage1.y - uBounds_Stage1.x) + uBounds_Stage1.x;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1.x, uBounds_Stage1.y - uBounds_Stage1.x) + uBounds_Stage1.x;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1.x, uBounds_Stage1.y - uBounds_Stage1.x) + uBounds_Stage1.x;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1.x, uBounds_Stage1.y - uBounds_Stage1.x) + uBounds_Stage1.x;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1.x, uBounds_Stage1.y - uBounds_Stage1.x) + uBounds_Stage1.x;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1.x, uBounds_Stage1.y - uBounds_Stage1.x) + uBounds_Stage1.x;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1.x, uBounds_Stage1.y - uBounds_Stage1.x) + uBounds_Stage1.x;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1.x, uBounds_Stage1.y - uBounds_Stage1.x) + uBounds_Stage1.x;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1.x, uBounds_Stage1.y - uBounds_Stage1.x) + uBounds_Stage1.x;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1.x, uBounds_Stage1.y - uBounds_Stage1.x) + uBounds_Stage1.x;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1.x, uBounds_Stage1.y - uBounds_Stage1.x) + uBounds_Stage1.x;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1.x, uBounds_Stage1.y - uBounds_Stage1.x) + uBounds_Stage1.x;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1.x, uBounds_Stage1.y - uBounds_Stage1.x) + uBounds_Stage1.x;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1.x, uBounds_Stage1.y - uBounds_Stage1.x) + uBounds_Stage1.x;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1.x, uBounds_Stage1.y - uBounds_Stage1.x) + uBounds_Stage1.x;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[4].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1.x, uBounds_Stage1.y - uBounds_Stage1.x) + uBounds_Stage1.x;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[4].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1.x, uBounds_Stage1.y - uBounds_Stage1.x) + uBounds_Stage1.x;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[4].z;
+ coord += uImageIncrement_Stage1;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/16-106.shader_test b/shaders/skia/16-106.shader_test
new file mode 100644
index 0000000..3568dad
--- /dev/null
+++ b/shaders/skia/16-106.shader_test
@@ -0,0 +1,58 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform vec2 uBounds_Stage1;
+uniform vec4 uKernel_Stage1[2];
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0 - 2.0 * uImageIncrement_Stage1;
+ vec2 coordSampled = vec2(0.0, 0.0);
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].x;
+ coord += uImageIncrement_Stage1;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/16-111.shader_test b/shaders/skia/16-111.shader_test
new file mode 100644
index 0000000..8324f04
--- /dev/null
+++ b/shaders/skia/16-111.shader_test
@@ -0,0 +1,98 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform float ucontrast_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+float hue2rgb_Stage2(float p, float q, float t) {
+ if (t < 0.0) t += 1.0;
+ if (t > 1.0) t -= 1.0;
+ if (t < 0.16666666666666666) return p + ((q - p) * 6.0) * t;
+ if (t < 0.5) return q;
+ if (t < 0.66666666666666663) return p + ((q - p) * (0.66666666666666663 - t)) * 6.0;
+ return p;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TextureEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ vec4 color = output_Stage1;
+ float nonZeroAlpha = max(color.w, 9.9999997473787516e-05);
+ color = vec4(color.xyz / nonZeroAlpha, nonZeroAlpha);
+ color.xyz = color.xyz * color.xyz;
+ float fmax = max(color.x, max(color.y, color.z));
+ float fmin = min(color.x, min(color.y, color.z));
+ float l = (fmax + fmin) / 2.0;
+ float h;
+ float s;
+ if (fmax == fmin) {
+ h = 0.0;
+ s = 0.0;
+ } else {
+ float d = fmax - fmin;
+ s = l > 0.5 ? d / ((2.0 - fmax) - fmin) : d / (fmax + fmin);
+ if (color.x >= color.y && color.x >= color.z) {
+ h = (color.y - color.z) / d + float(color.y < color.z ? 6 : 0);
+ } else if (color.y >= color.z) {
+ h = (color.z - color.x) / d + 2.0;
+ } else {
+ h = (color.x - color.y) / d + 4.0;
+ }
+ }
+ h /= 6.0;
+ l = 1.0 - l;
+ if (s == 0.0) {
+ color = vec4(l, l, l, 0.0);
+ } else {
+ float q = l < 0.5 ? l * (1.0 + s) : (l + s) - l * s;
+ float p = 2.0 * l - q;
+ color.x = hue2rgb_Stage2(p, q, h + 0.33333333333333331);
+ color.y = hue2rgb_Stage2(p, q, h);
+ color.z = hue2rgb_Stage2(p, q, h - 0.33333333333333331);
+ }
+ if (ucontrast_Stage2 != 0.0) {
+ float m = (1.0 + ucontrast_Stage2) / (1.0 - ucontrast_Stage2);
+ float off = -0.5 * m + 0.5;
+ color = m * color + off;
+ }
+ color = clamp(color, 0.0, 1.0);
+ color.xyz = sqrt(color.xyz);
+ color.w = output_Stage1.w;
+ color.xyz *= color.w;
+ output_Stage2 = color;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/16-112.shader_test b/shaders/skia/16-112.shader_test
new file mode 100644
index 0000000..6905d46
--- /dev/null
+++ b/shaders/skia/16-112.shader_test
@@ -0,0 +1,74 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uscale01_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias01_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale23_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias23_Stage1_c0_c0_c1_c0;
+uniform float uthreshold_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 DualIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthreshold_Stage1_c0_c0_c1_c0) {
+ scale = uscale01_Stage1_c0_c0_c1_c0;
+ bias = ubias01_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale23_Stage1_c0_c0_c1_c0;
+ bias = ubias23_Stage1_c0_c0_c1_c0;
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = DualIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TiledGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/16-118.shader_test b/shaders/skia/16-118.shader_test
new file mode 100644
index 0000000..267374d
--- /dev/null
+++ b/shaders/skia/16-118.shader_test
@@ -0,0 +1,110 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_0_Stage0;
+ float t = -1.0;
+ float v = 1.0;
+ {
+ {
+ float x_t = -1.0;
+ {
+ x_t = dot(p, p) / p.x;
+ }
+ {
+ if (x_t <= 0.0) {
+ v = -1.0;
+ }
+ }
+ {
+ {
+ t = x_t;
+ }
+ }
+ }
+ }
+ _output = vec4(t, v, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/16-121.shader_test b/shaders/skia/16-121.shader_test
new file mode 100644
index 0000000..9e487a5
--- /dev/null
+++ b/shaders/skia/16-121.shader_test
@@ -0,0 +1,125 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_0_Stage0;
+ float t = -1.0;
+ float v = 1.0;
+ {
+ {
+ float x_t = -1.0;
+ {
+ x_t = dot(p, p) / p.x;
+ }
+ {
+ if (x_t <= 0.0) {
+ v = -1.0;
+ }
+ }
+ {
+ {
+ t = x_t;
+ }
+ }
+ }
+ }
+ _output = vec4(t, v, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TiledGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_1_Stage0.x);
+ uint y = uint(vTransformedCoords_1_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ output_Stage2 = vec4(clamp(output_Stage2.xyz + value * 0.0039215688593685627, 0.0, output_Stage2.w), output_Stage2.w);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/16-124.shader_test b/shaders/skia/16-124.shader_test
new file mode 100644
index 0000000..cbf78f1
--- /dev/null
+++ b/shaders/skia/16-124.shader_test
@@ -0,0 +1,123 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_0_Stage0;
+ float t = -1.0;
+ float v = 1.0;
+ {
+ {
+ float x_t = -1.0;
+ {
+ x_t = dot(p, p) / p.x;
+ }
+ {
+ if (x_t <= 0.0) {
+ v = -1.0;
+ }
+ }
+ {
+ {
+ t = x_t;
+ }
+ }
+ }
+ }
+ _output = vec4(t, v, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else {
+ {
+ t.x = fract(t.x);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TiledGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_1_Stage0.x);
+ uint y = uint(vTransformedCoords_1_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ output_Stage2 = vec4(clamp(output_Stage2.xyz + value * 0.0039215688593685627, 0.0, output_Stage2.w), output_Stage2.w);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/16-127.shader_test b/shaders/skia/16-127.shader_test
new file mode 100644
index 0000000..25de0e1
--- /dev/null
+++ b/shaders/skia/16-127.shader_test
@@ -0,0 +1,126 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_0_Stage0;
+ float t = -1.0;
+ float v = 1.0;
+ {
+ {
+ float x_t = -1.0;
+ {
+ x_t = dot(p, p) / p.x;
+ }
+ {
+ if (x_t <= 0.0) {
+ v = -1.0;
+ }
+ }
+ {
+ {
+ t = x_t;
+ }
+ }
+ }
+ }
+ _output = vec4(t, v, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_1_Stage0.x);
+ uint y = uint(vTransformedCoords_1_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ output_Stage2 = vec4(clamp(output_Stage2.xyz + value * 0.0039215688593685627, 0.0, output_Stage2.w), output_Stage2.w);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/16-13.shader_test b/shaders/skia/16-13.shader_test
new file mode 100644
index 0000000..f8f3fff
--- /dev/null
+++ b/shaders/skia/16-13.shader_test
@@ -0,0 +1,61 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 RadialGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = length(vTransformedCoords_0_Stage0);
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = RadialGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ t.x = fract(t.x);
+ }
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TiledGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/16-131.shader_test b/shaders/skia/16-131.shader_test
new file mode 100644
index 0000000..6209979
--- /dev/null
+++ b/shaders/skia/16-131.shader_test
@@ -0,0 +1,339 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale8_9_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale10_11_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale12_13_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias8_9_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias10_11_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias12_13_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 uleftBorderColor_Stage1_c1_c0_c0_c0_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c1_c0_c0_c0_c0_c0;
+uniform float ubias_Stage1_c1_c0_c0_c0_c0_c0_c0_c0;
+uniform float uscale_Stage1_c1_c0_c0_c0_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage1_c1_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c1_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c1_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c1_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale8_9_Stage1_c1_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale10_11_Stage1_c1_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale12_13_Stage1_c1_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale14_15_Stage1_c1_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c1_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c1_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c1_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c1_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias8_9_Stage1_c1_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias10_11_Stage1_c1_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias12_13_Stage1_c1_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias14_15_Stage1_c1_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c1_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c1_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uleftBorderColor_Stage1_c1_c0_c1_c0_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c1_c0_c1_c0_c0_c0;
+uniform float ubias_Stage1_c1_c0_c1_c0_c0_c0_c0_c0;
+uniform float uscale_Stage1_c1_c0_c1_c0_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage1_c1_c0_c1_c0_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c1_c0_c1_c0_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c1_c0_c1_c0_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c1_c0_c1_c0_c0_c0_c1_c0;
+uniform vec4 uscale8_9_Stage1_c1_c0_c1_c0_c0_c0_c1_c0;
+uniform vec4 uscale10_11_Stage1_c1_c0_c1_c0_c0_c0_c1_c0;
+uniform vec4 uscale12_13_Stage1_c1_c0_c1_c0_c0_c0_c1_c0;
+uniform vec4 uscale14_15_Stage1_c1_c0_c1_c0_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c1_c0_c1_c0_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c1_c0_c1_c0_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c1_c0_c1_c0_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c1_c0_c1_c0_c0_c0_c1_c0;
+uniform vec4 ubias8_9_Stage1_c1_c0_c1_c0_c0_c0_c1_c0;
+uniform vec4 ubias10_11_Stage1_c1_c0_c1_c0_c0_c0_c1_c0;
+uniform vec4 ubias12_13_Stage1_c1_c0_c1_c0_c0_c0_c1_c0;
+uniform vec4 ubias14_15_Stage1_c1_c0_c1_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c1_c0_c1_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c1_c0_c1_c0_c0_c0_c1_c0;
+noperspective in vec4 vinCircleEdge_Stage0;
+noperspective in vec4 vinColor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+vec4 RadialGradientLayout_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = length(vTransformedCoords_0_Stage0);
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c1_c0.w) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ } else {
+ if (t < uthresholds9_13_Stage1_c0_c0_c0_c0_c1_c0.y) {
+ if (t < uthresholds9_13_Stage1_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale8_9_Stage1_c0_c0_c0_c0_c1_c0;
+ bias = ubias8_9_Stage1_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale10_11_Stage1_c0_c0_c0_c0_c1_c0;
+ bias = ubias10_11_Stage1_c0_c0_c0_c0_c1_c0;
+ }
+ } else {
+ {
+ scale = uscale12_13_Stage1_c0_c0_c0_c0_c1_c0;
+ bias = ubias12_13_Stage1_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = RadialGradientLayout_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = ClampedGradientEffect_Stage1_c0_c0_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ return _output;
+}
+vec4 SweepGradientLayout_Stage1_c1_c0_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float angle;
+ {
+ angle = atan(-vTransformedCoords_1_Stage0.y, -vTransformedCoords_1_Stage0.x);
+ }
+ float t = ((angle * 0.15915493667125702 + 0.5) + ubias_Stage1_c1_c0_c0_c0_c0_c0_c0_c0) * uscale_Stage1_c1_c0_c0_c0_c0_c0_c0_c0;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c1_c0_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthresholds1_7_Stage1_c1_c0_c0_c0_c0_c0_c1_c0.w) {
+ if (t < uthresholds1_7_Stage1_c1_c0_c0_c0_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c1_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c1_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c1_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c1_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c1_c0_c0_c0_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c1_c0_c0_c0_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c1_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c1_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c1_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c1_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ } else {
+ if (t < uthresholds9_13_Stage1_c1_c0_c0_c0_c0_c0_c1_c0.y) {
+ if (t < uthresholds9_13_Stage1_c1_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale8_9_Stage1_c1_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias8_9_Stage1_c1_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale10_11_Stage1_c1_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias10_11_Stage1_c1_c0_c0_c0_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds9_13_Stage1_c1_c0_c0_c0_c0_c0_c1_c0.z) {
+ scale = uscale12_13_Stage1_c1_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias12_13_Stage1_c1_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale14_15_Stage1_c1_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias14_15_Stage1_c1_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c1_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = SweepGradientLayout_Stage1_c1_c0_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c1_c0_c0_c0_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c1_c0_c0_c0_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage1_c1_c0_c0_c0_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = ClampedGradientEffect_Stage1_c1_c0_c0_c0_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ return _output;
+}
+vec4 SweepGradientLayout_Stage1_c1_c0_c1_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float angle;
+ {
+ angle = atan(-vTransformedCoords_2_Stage0.y, -vTransformedCoords_2_Stage0.x);
+ }
+ float t = ((angle * 0.15915493667125702 + 0.5) + ubias_Stage1_c1_c0_c1_c0_c0_c0_c0_c0) * uscale_Stage1_c1_c0_c1_c0_c0_c0_c0_c0;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c1_c0_c1_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthresholds1_7_Stage1_c1_c0_c1_c0_c0_c0_c1_c0.w) {
+ if (t < uthresholds1_7_Stage1_c1_c0_c1_c0_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c1_c0_c1_c0_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c1_c0_c1_c0_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c1_c0_c1_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c1_c0_c1_c0_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c1_c0_c1_c0_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c1_c0_c1_c0_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c1_c0_c1_c0_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c1_c0_c1_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c1_c0_c1_c0_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c1_c0_c1_c0_c0_c0_c1_c0;
+ }
+ }
+ } else {
+ if (t < uthresholds9_13_Stage1_c1_c0_c1_c0_c0_c0_c1_c0.y) {
+ if (t < uthresholds9_13_Stage1_c1_c0_c1_c0_c0_c0_c1_c0.x) {
+ scale = uscale8_9_Stage1_c1_c0_c1_c0_c0_c0_c1_c0;
+ bias = ubias8_9_Stage1_c1_c0_c1_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale10_11_Stage1_c1_c0_c1_c0_c0_c0_c1_c0;
+ bias = ubias10_11_Stage1_c1_c0_c1_c0_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds9_13_Stage1_c1_c0_c1_c0_c0_c0_c1_c0.z) {
+ scale = uscale12_13_Stage1_c1_c0_c1_c0_c0_c0_c1_c0;
+ bias = ubias12_13_Stage1_c1_c0_c1_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale14_15_Stage1_c1_c0_c1_c0_c0_c0_c1_c0;
+ bias = ubias14_15_Stage1_c1_c0_c1_c0_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c1_c0_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = SweepGradientLayout_Stage1_c1_c0_c1_c0_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c1_c0_c1_c0_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c1_c0_c1_c0_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage1_c1_c0_c1_c0_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = ClampedGradientEffect_Stage1_c1_c0_c1_c0_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ return _output;
+}
+vec4 blend_exclusion(vec4 src, vec4 dst) {
+ return vec4((dst.xyz + src.xyz) - (2.0 * dst.xyz) * src.xyz, src.w + (1.0 - src.w) * dst.w);
+}
+vec4 ComposeTwo_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_exclusion(OverrideInputFragmentProcessor_Stage1_c1_c0_c0_c0(inputColor), OverrideInputFragmentProcessor_Stage1_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ vec4 circleEdge;
+ circleEdge = vinCircleEdge_Stage0;
+ outputColor_Stage0 = vinColor_Stage0;
+ float d = length(circleEdge.xy);
+ float distanceToOuterEdge = circleEdge.z * (1.0 - d);
+ float edgeAlpha = clamp(distanceToOuterEdge, 0.0, 1.0);
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_exclusion(OverrideInputFragmentProcessor_Stage1_c0_c0(inputColor), ComposeTwo_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ sk_FragColor = output_Stage1 * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec4 inCircleEdge;
+noperspective out vec4 vinCircleEdge_Stage0;
+noperspective out vec4 vinColor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+void main() {
+ vinCircleEdge_Stage0 = inCircleEdge;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/16-132.shader_test b/shaders/skia/16-132.shader_test
new file mode 100644
index 0000000..3b4583d
--- /dev/null
+++ b/shaders/skia/16-132.shader_test
@@ -0,0 +1,87 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 uscale01_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias01_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale23_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias23_Stage1_c0_c0_c1_c0;
+uniform float uthreshold_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_0_Stage0;
+ float t = -1.0;
+ {
+ {
+ float r0 = ufocalParams_Stage1_c0_c0_c0_c0.x;
+ {
+ t = length(p) - r0;
+ }
+ }
+ }
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 DualIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthreshold_Stage1_c0_c0_c1_c0) {
+ scale = uscale01_Stage1_c0_c0_c1_c0;
+ bias = ubias01_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale23_Stage1_c0_c0_c1_c0;
+ bias = ubias23_Stage1_c0_c0_c1_c0;
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = DualIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/16-133.shader_test b/shaders/skia/16-133.shader_test
new file mode 100644
index 0000000..2aa5df3
--- /dev/null
+++ b/shaders/skia/16-133.shader_test
@@ -0,0 +1,109 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+in float vcoverage_Stage0;
+flat in vec4 vgeomDomain_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ float coverage = vcoverage_Stage0 * gl_FragCoord.w;
+ vec4 geoDomain;
+ geoDomain = vgeomDomain_Stage0;
+ if (coverage < 0.5) {
+ vec4 dists4 = clamp(vec4(1.0, 1.0, -1.0, -1.0) * (gl_FragCoord.xyxy - geoDomain), 0.0, 1.0);
+ vec2 dists2 = dists4.xy * dists4.zw;
+ coverage = min(coverage, dists2.x * dists2.y);
+ }
+ outputCoverage_Stage0 = vec4(coverage);
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1 * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec4 positionWithCoverage;
+in vec4 color;
+in vec2 localCoord;
+in vec4 geomDomain;
+out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+out float vcoverage_Stage0;
+flat out vec4 vgeomDomain_Stage0;
+void main() {
+ vec3 position = positionWithCoverage.xyz;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ vcoverage_Stage0 = positionWithCoverage.w * positionWithCoverage.z;
+ vgeomDomain_Stage0 = geomDomain;
+ gl_Position = vec4(position.x, position.y, 0.0, position.z);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/16-134.shader_test b/shaders/skia/16-134.shader_test
new file mode 100644
index 0000000..0293cd7
--- /dev/null
+++ b/shaders/skia/16-134.shader_test
@@ -0,0 +1,125 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+in vec2 vTransformedCoords_0_Stage0;
+in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+in float vcoverage_Stage0;
+flat in vec4 vgeomDomain_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ float coverage = vcoverage_Stage0 * gl_FragCoord.w;
+ vec4 geoDomain;
+ geoDomain = vgeomDomain_Stage0;
+ if (coverage < 0.5) {
+ vec4 dists4 = clamp(vec4(1.0, 1.0, -1.0, -1.0) * (gl_FragCoord.xyxy - geoDomain), 0.0, 1.0);
+ vec2 dists2 = dists4.xy * dists4.zw;
+ coverage = min(coverage, dists2.x * dists2.y);
+ }
+ outputCoverage_Stage0 = vec4(coverage);
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_1_Stage0.x);
+ uint y = uint(vTransformedCoords_1_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ output_Stage2 = vec4(clamp(output_Stage2.xyz + value * 0.0039215688593685627, 0.0, output_Stage2.w), output_Stage2.w);
+ }
+ {
+ sk_FragColor = output_Stage2 * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec4 positionWithCoverage;
+in vec4 color;
+in vec2 localCoord;
+in vec4 geomDomain;
+out vec2 vTransformedCoords_0_Stage0;
+out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+out float vcoverage_Stage0;
+flat out vec4 vgeomDomain_Stage0;
+void main() {
+ vec3 position = positionWithCoverage.xyz;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ vcoverage_Stage0 = positionWithCoverage.w * positionWithCoverage.z;
+ vgeomDomain_Stage0 = geomDomain;
+ gl_Position = vec4(position.x, position.y, 0.0, position.z);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/16-135.shader_test b/shaders/skia/16-135.shader_test
new file mode 100644
index 0000000..be4b94a
--- /dev/null
+++ b/shaders/skia/16-135.shader_test
@@ -0,0 +1,88 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+noperspective in vec3 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 vTransformedCoords_0_Stage0_ensure2D = vTransformedCoords_0_Stage0.xy / vTransformedCoords_0_Stage0.z;
+ float t = vTransformedCoords_0_Stage0_ensure2D.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec3 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0);
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/16-136.shader_test b/shaders/skia/16-136.shader_test
new file mode 100644
index 0000000..b34080e
--- /dev/null
+++ b/shaders/skia/16-136.shader_test
@@ -0,0 +1,104 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+noperspective in vec3 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 vTransformedCoords_0_Stage0_ensure2D = vTransformedCoords_0_Stage0.xy / vTransformedCoords_0_Stage0.z;
+ float t = vTransformedCoords_0_Stage0_ensure2D.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_1_Stage0.x);
+ uint y = uint(vTransformedCoords_1_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ output_Stage2 = vec4(clamp(output_Stage2.xyz + value * 0.0039215688593685627, 0.0, output_Stage2.w), output_Stage2.w);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec3 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0);
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/16-144.shader_test b/shaders/skia/16-144.shader_test
new file mode 100644
index 0000000..c1b1657
--- /dev/null
+++ b/shaders/skia/16-144.shader_test
@@ -0,0 +1,43 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uColor_Stage0;
+in vec4 vHairQuadEdge_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = uColor_Stage0;
+ float edgeAlpha;
+ vec2 duvdx = dFdx(vHairQuadEdge_Stage0.xy);
+ vec2 duvdy = -dFdy(vHairQuadEdge_Stage0.xy);
+ vec2 gF = vec2((2.0 * vHairQuadEdge_Stage0.x) * duvdx.x - duvdx.y, (2.0 * vHairQuadEdge_Stage0.x) * duvdy.x - duvdy.y);
+ edgeAlpha = vHairQuadEdge_Stage0.x * vHairQuadEdge_Stage0.x - vHairQuadEdge_Stage0.y;
+ edgeAlpha = sqrt((edgeAlpha * edgeAlpha) / dot(gF, gF));
+ edgeAlpha = max(1.0 - edgeAlpha, 0.0);
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ {
+ sk_FragColor = outputColor_Stage0 * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 inPosition;
+in vec4 inHairQuadEdge;
+out vec4 vHairQuadEdge_Stage0;
+void main() {
+ vHairQuadEdge_Stage0 = inHairQuadEdge;
+ vec3 pos3 = uViewM_Stage0 * vec3(inPosition, 1.0);
+ gl_Position = vec4(pos3.x, pos3.y, 0.0, pos3.z);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/16-15.shader_test b/shaders/skia/16-15.shader_test
new file mode 100644
index 0000000..c5cab64
--- /dev/null
+++ b/shaders/skia/16-15.shader_test
@@ -0,0 +1,68 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uclamp_Stage1_c0_c0;
+uniform mat4 um_Stage2;
+uniform vec4 uv_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 inCoord = vTransformedCoords_0_Stage0;
+ vec2 subsetCoord;
+ subsetCoord.x = inCoord.x;
+ subsetCoord.y = inCoord.y;
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage1_c0_c0.x, uclamp_Stage1_c0_c0.z);
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage1_c0_c0.y, uclamp_Stage1_c0_c0.w);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ _output = _input * textureColor;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TextureEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ vec4 inputColor = output_Stage1;
+ {
+ float nonZeroAlpha = max(inputColor.w, 9.9999997473787516e-05);
+ inputColor = vec4(inputColor.xyz / nonZeroAlpha, inputColor.w);
+ }
+ output_Stage2 = um_Stage2 * inputColor + uv_Stage2;
+ {
+ output_Stage2 = clamp(output_Stage2, 0.0, 1.0);
+ }
+ {
+ output_Stage2.xyz *= output_Stage2.w;
+ }
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/16-150.shader_test b/shaders/skia/16-150.shader_test
new file mode 100644
index 0000000..c6aa890
--- /dev/null
+++ b/shaders/skia/16-150.shader_test
@@ -0,0 +1,61 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 urectUniform_Stage1;
+uniform vec4 ucircle_Stage2;
+flat in vec4 vcolor_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ float alpha;
+ {
+ float xSub, ySub;
+ xSub = min(gl_FragCoord.x - urectUniform_Stage1.x, 0.0);
+ xSub += min(urectUniform_Stage1.z - gl_FragCoord.x, 0.0);
+ ySub = min(gl_FragCoord.y - urectUniform_Stage1.y, 0.0);
+ ySub += min(urectUniform_Stage1.w - gl_FragCoord.y, 0.0);
+ alpha = (1.0 + max(xSub, -1.0)) * (1.0 + max(ySub, -1.0));
+ }
+ {
+ alpha = 1.0 - alpha;
+ }
+ output_Stage1 = vec4(alpha);
+ }
+ vec4 output_Stage2;
+ {
+ float d;
+ {
+ d = (1.0 - length((ucircle_Stage2.xy - gl_FragCoord.xy) * ucircle_Stage2.w)) * ucircle_Stage2.z;
+ }
+ {
+ output_Stage2 = output_Stage1 * clamp(d, 0.0, 1.0);
+ }
+ }
+ {
+ sk_FragColor = outputColor_Stage0 * output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 position;
+in vec4 color;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/16-154.shader_test b/shaders/skia/16-154.shader_test
new file mode 100644
index 0000000..11e679c
--- /dev/null
+++ b/shaders/skia/16-154.shader_test
@@ -0,0 +1,62 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 urectH_Stage2;
+uniform float uinvSixSigma_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TextureEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ float xCoverage, yCoverage;
+ {
+ float x, y;
+ {
+ x = max(urectH_Stage2.x - gl_FragCoord.x, gl_FragCoord.x - urectH_Stage2.z);
+ y = max(urectH_Stage2.y - gl_FragCoord.y, gl_FragCoord.y - urectH_Stage2.w);
+ }
+ xCoverage = texture(uTextureSampler_0_Stage2, vec2(x * uinvSixSigma_Stage2, 0.5)).w;
+ yCoverage = texture(uTextureSampler_0_Stage2, vec2(y * uinvSixSigma_Stage2, 0.5)).w;
+ output_Stage2 = vec4(xCoverage) * yCoverage;
+ }
+ output_Stage2 = vec4(xCoverage) * yCoverage;
+ }
+ {
+ sk_FragColor = output_Stage1 * output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/16-155.shader_test b/shaders/skia/16-155.shader_test
new file mode 100644
index 0000000..78991b3
--- /dev/null
+++ b/shaders/skia/16-155.shader_test
@@ -0,0 +1,71 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uclamp_Stage1_c0_c0;
+uniform vec4 urectH_Stage2;
+uniform float uinvSixSigma_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 inCoord = vTransformedCoords_0_Stage0;
+ vec2 subsetCoord;
+ subsetCoord.x = inCoord.x;
+ subsetCoord.y = inCoord.y;
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage1_c0_c0.x, uclamp_Stage1_c0_c0.z);
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage1_c0_c0.y, uclamp_Stage1_c0_c0.w);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ _output = _input * textureColor;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TextureEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ float xCoverage, yCoverage;
+ {
+ float x, y;
+ {
+ x = max(urectH_Stage2.x - gl_FragCoord.x, gl_FragCoord.x - urectH_Stage2.z);
+ y = max(urectH_Stage2.y - gl_FragCoord.y, gl_FragCoord.y - urectH_Stage2.w);
+ }
+ xCoverage = texture(uTextureSampler_0_Stage2, vec2(x * uinvSixSigma_Stage2, 0.5)).w;
+ yCoverage = texture(uTextureSampler_0_Stage2, vec2(y * uinvSixSigma_Stage2, 0.5)).w;
+ output_Stage2 = vec4(xCoverage) * yCoverage;
+ }
+ output_Stage2 = vec4(xCoverage) * yCoverage;
+ }
+ {
+ sk_FragColor = output_Stage1 * output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/16-159.shader_test b/shaders/skia/16-159.shader_test
new file mode 100644
index 0000000..ca2fa86
--- /dev/null
+++ b/shaders/skia/16-159.shader_test
@@ -0,0 +1,82 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 ucolor_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 TextureEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+vec4 ComposeOne_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_dst_in(_input, TextureEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0)));
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = ComposeOne_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_src_over(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ {
+ output_Stage2 = output_Stage1 * ucolor_Stage2;
+ }
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 inColor;
+in vec2 inLocalCoord;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/16-16.shader_test b/shaders/skia/16-16.shader_test
new file mode 100644
index 0000000..3afa1dc
--- /dev/null
+++ b/shaders/skia/16-16.shader_test
@@ -0,0 +1,63 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform float uDistanceAdjust_Stage0;
+uniform sampler2D uTextureSampler_0_Stage0;
+noperspective in vec4 vinColor_Stage0;
+noperspective in vec2 vTextureCoords_Stage0;
+flat in int vTexIndex_Stage0;
+noperspective in vec2 vIntTextureCoords_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vinColor_Stage0;
+ vec2 uv = vTextureCoords_Stage0;
+ vec4 texColor;
+ {
+ texColor = texture(uTextureSampler_0_Stage0, uv);
+ }
+ float distance = 7.96875 * (texColor.x - 0.50196081399917603);
+ distance -= uDistanceAdjust_Stage0;
+ vec2 dist_grad = vec2(dFdx(distance), -dFdy(distance));
+ float dg_len2 = dot(dist_grad, dist_grad);
+ if (dg_len2 < 9.9999997473787516e-05) {
+ dist_grad = vec2(0.70709997415542603, 0.70709997415542603);
+ } else {
+ dist_grad = dist_grad * inversesqrt(dg_len2);
+ }
+ float val = distance > 0.0 ? 1.0 : 0.0;
+ outputCoverage_Stage0 = vec4(val);
+ }
+ {
+ sk_FragColor = outputColor_Stage0 * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform vec2 uAtlasDimensionsInv_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in uvec2 inTextureCoords;
+noperspective out vec4 vinColor_Stage0;
+noperspective out vec2 vTextureCoords_Stage0;
+flat out int vTexIndex_Stage0;
+noperspective out vec2 vIntTextureCoords_Stage0;
+void main() {
+ vinColor_Stage0 = inColor;
+ ivec2 signedCoords = ivec2(int(inTextureCoords.x), int(inTextureCoords.y));
+ vec2 unormTexCoords = vec2(float(signedCoords.x / 2), float(signedCoords.y / 2));
+ vTextureCoords_Stage0 = unormTexCoords * uAtlasDimensionsInv_Stage0;
+ vTexIndex_Stage0 = 0;
+ vIntTextureCoords_Stage0 = unormTexCoords;
+ gl_Position = vec4(inPosition.x, inPosition.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/16-160.shader_test b/shaders/skia/16-160.shader_test
new file mode 100644
index 0000000..7277905
--- /dev/null
+++ b/shaders/skia/16-160.shader_test
@@ -0,0 +1,56 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uScale_Stage1;
+uniform vec4 uTexDom_Stage1;
+uniform vec3 uDecalParams_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ vec4 dColor = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ dColor.xyz = dColor.w < 9.9999999747524271e-07 ? vec3(0.0) : clamp(dColor.xyz / dColor.w, 0.0, 1.0);
+ vec2 cCoords = vTransformedCoords_1_Stage0 + uScale_Stage1 * (dColor.xw - vec2(0.5));
+ {
+ vec2 origCoord = cCoords;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ output_Stage1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/16-166.shader_test b/shaders/skia/16-166.shader_test
new file mode 100644
index 0000000..142e799
--- /dev/null
+++ b/shaders/skia/16-166.shader_test
@@ -0,0 +1,66 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec3 uedges_Stage1[3];
+uniform sampler2D uTextureSampler_0_Stage0;
+noperspective in vec2 vTextureCoords_Stage0;
+flat in int vTexIndex_Stage0;
+noperspective in vec4 vinColor_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vinColor_Stage0;
+ vec4 texColor;
+ {
+ texColor = texture(uTextureSampler_0_Stage0, vTextureCoords_Stage0);
+ }
+ outputCoverage_Stage0 = texColor;
+ }
+ vec4 output_Stage1;
+ {
+ float alpha = 1.0;
+ float edge;
+ edge = dot(uedges_Stage1[0], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage1[1], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage1[2], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ output_Stage1 = outputCoverage_Stage0 * alpha;
+ }
+ {
+ sk_FragColor = outputColor_Stage0 * output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform vec2 uAtlasSizeInv_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in uvec2 inTextureCoords;
+noperspective out vec2 vTextureCoords_Stage0;
+flat out int vTexIndex_Stage0;
+noperspective out vec4 vinColor_Stage0;
+void main() {
+ ivec2 signedCoords = ivec2(int(inTextureCoords.x), int(inTextureCoords.y));
+ vec2 unormTexCoords = vec2(float(signedCoords.x / 2), float(signedCoords.y / 2));
+ vTextureCoords_Stage0 = unormTexCoords * uAtlasSizeInv_Stage0;
+ vTexIndex_Stage0 = 0;
+ vinColor_Stage0 = inColor;
+ gl_Position = vec4(inPosition.x, inPosition.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/16-168.shader_test b/shaders/skia/16-168.shader_test
new file mode 100644
index 0000000..5db2d0d
--- /dev/null
+++ b/shaders/skia/16-168.shader_test
@@ -0,0 +1,85 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 uscale01_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias01_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale23_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias23_Stage1_c0_c0_c1_c0;
+uniform float uthreshold_Stage1_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 DualIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthreshold_Stage1_c0_c0_c1_c0) {
+ scale = uscale01_Stage1_c0_c0_c1_c0;
+ bias = ubias01_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale23_Stage1_c0_c0_c1_c0;
+ bias = ubias23_Stage1_c0_c0_c1_c0;
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = DualIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ {
+ output_Stage2 = output_Stage1.w * ucolor_Stage2;
+ }
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/16-170.shader_test b/shaders/skia/16-170.shader_test
new file mode 100644
index 0000000..3a66e9a
--- /dev/null
+++ b/shaders/skia/16-170.shader_test
@@ -0,0 +1,105 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform mat3 ucolorSpaceMatrix_Stage1_c0_c0;
+uniform vec3 ucolorSpaceTranslate_Stage1_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+uniform sampler2D uTextureSampler_2_Stage1;
+in vec2 vTransformedCoords_0_Stage0;
+in vec2 vTransformedCoords_1_Stage0;
+in vec2 vTransformedCoords_2_Stage0;
+flat in vec4 vcolor_Stage0;
+in float vcoverage_Stage0;
+flat in vec4 vgeomDomain_Stage0;
+vec4 TextureEffect_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_1_Stage1, vTransformedCoords_1_Stage0) * _input;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c0_c0_c2_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_2_Stage1, vTransformedCoords_2_Stage0) * _input;
+ return _output;
+}
+vec4 YUVtoRGBEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 planes[3];
+ planes[0] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0));
+ planes[1] = TextureEffect_Stage1_c0_c0_c1_c0(vec4(1.0));
+ planes[2] = TextureEffect_Stage1_c0_c0_c2_c0(vec4(1.0));
+ vec4 color = vec4(planes[0].x, planes[1].x, planes[2].x, 1.0);
+ color.xyz = clamp(color.xyz * ucolorSpaceMatrix_Stage1_c0_c0 + ucolorSpaceTranslate_Stage1_c0_c0, 0.0, 1.0);
+ _output = color;
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ float coverage = vcoverage_Stage0 * gl_FragCoord.w;
+ vec4 geoDomain;
+ geoDomain = vgeomDomain_Stage0;
+ if (coverage < 0.5) {
+ vec4 dists4 = clamp(vec4(1.0, 1.0, -1.0, -1.0) * (gl_FragCoord.xyxy - geoDomain), 0.0, 1.0);
+ vec2 dists2 = dists4.xy * dists4.zw;
+ coverage = min(coverage, dists2.x * dists2.y);
+ }
+ outputCoverage_Stage0 = vec4(coverage);
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_dst_in(outputColor_Stage0, YUVtoRGBEffect_Stage1_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage1 * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+in vec4 positionWithCoverage;
+in vec4 color;
+in vec2 localCoord;
+in vec4 geomDomain;
+out vec2 vTransformedCoords_0_Stage0;
+out vec2 vTransformedCoords_1_Stage0;
+out vec2 vTransformedCoords_2_Stage0;
+flat out vec4 vcolor_Stage0;
+out float vcoverage_Stage0;
+flat out vec4 vgeomDomain_Stage0;
+void main() {
+ vec3 position = positionWithCoverage.xyz;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ vcoverage_Stage0 = positionWithCoverage.w * positionWithCoverage.z;
+ vgeomDomain_Stage0 = geomDomain;
+ gl_Position = vec4(position.x, position.y, 0.0, position.z);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/16-171.shader_test b/shaders/skia/16-171.shader_test
new file mode 100644
index 0000000..7fcf9b8
--- /dev/null
+++ b/shaders/skia/16-171.shader_test
@@ -0,0 +1,108 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 ustart_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c0_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+in vec2 vTransformedCoords_0_Stage0;
+in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+in float vcoverage_Stage0;
+flat in vec4 vgeomDomain_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c0_c0_c1_c0;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+vec4 ComposeOne_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_dst_in(_input, TiledGradientEffect_Stage1_c0_c0_c0_c0(vec4(1.0)));
+ return _output;
+}
+vec4 TextureEffect_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_1_Stage0) * _input;
+ return _output;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ float coverage = vcoverage_Stage0 * gl_FragCoord.w;
+ vec4 geoDomain;
+ geoDomain = vgeomDomain_Stage0;
+ if (coverage < 0.5) {
+ vec4 dists4 = clamp(vec4(1.0, 1.0, -1.0, -1.0) * (gl_FragCoord.xyxy - geoDomain), 0.0, 1.0);
+ vec2 dists2 = dists4.xy * dists4.zw;
+ coverage = min(coverage, dists2.x * dists2.y);
+ }
+ outputCoverage_Stage0 = vec4(coverage);
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TextureEffect_Stage1_c1_c0(ComposeOne_Stage1_c0_c0(outputColor_Stage0));
+ }
+ {
+ sk_FragColor = output_Stage1 * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec4 positionWithCoverage;
+in vec4 color;
+in vec2 localCoord;
+in vec4 geomDomain;
+out vec2 vTransformedCoords_0_Stage0;
+out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+out float vcoverage_Stage0;
+flat out vec4 vgeomDomain_Stage0;
+void main() {
+ vec3 position = positionWithCoverage.xyz;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ vcoverage_Stage0 = positionWithCoverage.w * positionWithCoverage.z;
+ vgeomDomain_Stage0 = geomDomain;
+ gl_Position = vec4(position.x, position.y, 0.0, position.z);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/16-174.shader_test b/shaders/skia/16-174.shader_test
new file mode 100644
index 0000000..404076e
--- /dev/null
+++ b/shaders/skia/16-174.shader_test
@@ -0,0 +1,44 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 ucircle_Stage1;
+noperspective in vec4 vcolor_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ float d;
+ {
+ d = (length((ucircle_Stage1.xy - gl_FragCoord.xy) * ucircle_Stage1.w) - 1.0) * ucircle_Stage1.z;
+ }
+ {
+ output_Stage1 = d > 0.5 ? vec4(1.0) : vec4(0.0);
+ }
+ }
+ {
+ sk_FragColor = outputColor_Stage0 * output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 position;
+in vec4 color;
+noperspective out vec4 vcolor_Stage0;
+void main() {
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/16-18.shader_test b/shaders/skia/16-18.shader_test
new file mode 100644
index 0000000..352dadc
--- /dev/null
+++ b/shaders/skia/16-18.shader_test
@@ -0,0 +1,139 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale8_9_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale10_11_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias8_9_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias10_11_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage2_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage0;
+noperspective in vec2 vTextureCoords_Stage0;
+flat in int vTexIndex_Stage0;
+noperspective in vec4 vinColor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.w) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c1_c0;
+ }
+ }
+ } else {
+ {
+ if (t < uthresholds9_13_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale8_9_Stage1_c0_c0_c1_c0;
+ bias = ubias8_9_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale10_11_Stage1_c0_c0_c1_c0;
+ bias = ubias10_11_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c1_c0;
+ }
+ return _output;
+}
+vec4 blend_modulate(vec4 src, vec4 dst) {
+ return src * dst;
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ vec4 texColor;
+ {
+ texColor = texture(uTextureSampler_0_Stage0, vTextureCoords_Stage0);
+ }
+ outputCoverage_Stage0 = texColor;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_modulate(ConstColorProcessor_Stage2_c1_c0(vec4(1.0)), output_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage2 * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform vec2 uAtlasSizeInv_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in uvec2 inTextureCoords;
+noperspective out vec2 vTextureCoords_Stage0;
+flat out int vTexIndex_Stage0;
+noperspective out vec4 vinColor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ ivec2 signedCoords = ivec2(int(inTextureCoords.x), int(inTextureCoords.y));
+ vec2 unormTexCoords = vec2(float(signedCoords.x / 2), float(signedCoords.y / 2));
+ vTextureCoords_Stage0 = unormTexCoords * uAtlasSizeInv_Stage0;
+ vTexIndex_Stage0 = 0;
+ vinColor_Stage0 = inColor;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(inPosition.x, inPosition.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/16-188.shader_test b/shaders/skia/16-188.shader_test
new file mode 100644
index 0000000..300573c
--- /dev/null
+++ b/shaders/skia/16-188.shader_test
@@ -0,0 +1,122 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform float uweight_Stage1;
+uniform vec4 uleftBorderColor_Stage1_c1_c0_c0_c0_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c1_c0_c0_c0_c0_c0;
+uniform vec4 ustart_Stage1_c1_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c1_c0_c0_c0_c0_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ return _output;
+}
+vec4 RadialGradientLayout_Stage1_c1_c0_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = length(vTransformedCoords_1_Stage0);
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c1_c0_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c1_c0_c0_c0_c0_c0_c1_c0 + t * uend_Stage1_c1_c0_c0_c0_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c1_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = RadialGradientLayout_Stage1_c1_c0_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c1_c0_c0_c0_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c1_c0_c0_c0_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c1_c0_c0_c0_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = ClampedGradientEffect_Stage1_c1_c0_c0_c0_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ return _output;
+}
+vec4 TextureEffect_Stage1_c1_c0_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_1_Stage1, vTransformedCoords_2_Stage0) * _input;
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = TextureEffect_Stage1_c1_c0_c1_c0_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ return _output;
+}
+float _guarded_divide(float n, float d) {
+ return n / d;
+}
+float _color_burn_component(float sc, float sa, float dc, float da) {
+ if (da == dc) {
+ return (sa * da + sc * (1.0 - da)) + dc * (1.0 - sa);
+ } else if (sc == 0.0) {
+ return dc * (1.0 - sa);
+ }
+ float d = max(0.0, da - _guarded_divide((da - dc) * sa, sc));
+ return (d * sa + sc * (1.0 - da)) + dc * (1.0 - sa);
+}
+vec4 blend_color_burn(vec4 src, vec4 dst) {
+ return vec4(_color_burn_component(src.x, src.w, dst.x, dst.w), _color_burn_component(src.y, src.w, dst.y, dst.w), _color_burn_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+}
+vec4 ComposeTwo_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_color_burn(OverrideInputFragmentProcessor_Stage1_c1_c0_c0_c0(inputColor), OverrideInputFragmentProcessor_Stage1_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = mix(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), ComposeTwo_Stage1_c1_c0(vec4(1.0)), uweight_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/16-189.shader_test b/shaders/skia/16-189.shader_test
new file mode 100644
index 0000000..01422cf
--- /dev/null
+++ b/shaders/skia/16-189.shader_test
@@ -0,0 +1,100 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uscale01_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias01_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale23_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias23_Stage1_c0_c0_c0_c0_c1_c0;
+uniform float uthreshold_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage1_c1_c0_c0_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 DualIntervalGradientColorizer_Stage1_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthreshold_Stage1_c0_c0_c0_c0_c1_c0) {
+ scale = uscale01_Stage1_c0_c0_c0_c0_c1_c0;
+ bias = ubias01_Stage1_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale23_Stage1_c0_c0_c0_c0_c1_c0;
+ bias = ubias23_Stage1_c0_c0_c0_c0_c1_c0;
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ t.x = fract(t.x);
+ }
+ _output = DualIntervalGradientColorizer_Stage1_c0_c0_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = TiledGradientEffect_Stage1_c0_c0_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ return _output;
+}
+vec4 ConstColorProcessor_Stage1_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage1_c1_c0_c0_c0;
+ }
+ return _output;
+}
+vec4 blend_src(vec4 src, vec4 dst) {
+ return src;
+}
+vec4 ComposeOne_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_src(ConstColorProcessor_Stage1_c1_c0_c0_c0(vec4(1.0)), _input);
+ return _output;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ComposeOne_Stage1_c1_c0(OverrideInputFragmentProcessor_Stage1_c0_c0(outputColor_Stage0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/16-19.shader_test b/shaders/skia/16-19.shader_test
new file mode 100644
index 0000000..99b0d28
--- /dev/null
+++ b/shaders/skia/16-19.shader_test
@@ -0,0 +1,57 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uborder_Stage1;
+uniform vec4 usubset_Stage1;
+uniform vec4 uclamp_Stage1;
+uniform vec4 unorm_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+flat in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec2 inCoord = vTransformedCoords_0_Stage0;
+ inCoord *= unorm_Stage1.xy;
+ vec2 subsetCoord;
+ subsetCoord.x = inCoord.x;
+ subsetCoord.y = inCoord.y;
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage1.x, uclamp_Stage1.z);
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage1.y, uclamp_Stage1.w);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord * unorm_Stage1.zw);
+ float errX = subsetCoord.x - clampedCoord.x;
+ textureColor = mix(textureColor, uborder_Stage1, min(abs(errX), 1.0));
+ output_Stage1 = outputColor_Stage0 * textureColor;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec2 inLocalCoords;
+in vec4 color;
+flat out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vcolor_Stage0 = color;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoords, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/16-191.shader_test b/shaders/skia/16-191.shader_test
new file mode 100644
index 0000000..19bdf34
--- /dev/null
+++ b/shaders/skia/16-191.shader_test
@@ -0,0 +1,46 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_KHR_blend_equation_advanced : require
+out vec4 sk_FragColor;
+layout (blend_support_all_equations) out ;
+uniform vec4 uColor_Stage0;
+uniform sampler2D uTextureSampler_0_Stage0;
+noperspective in vec2 vTextureCoords_Stage0;
+flat in int vTexIndex_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = uColor_Stage0;
+ vec4 texColor;
+ {
+ texColor = texture(uTextureSampler_0_Stage0, vTextureCoords_Stage0);
+ }
+ outputColor_Stage0 = outputColor_Stage0 * texColor;
+ }
+ {
+ sk_FragColor = outputColor_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform vec2 uAtlasSizeInv_Stage0;
+in vec2 inPosition;
+in uvec2 inTextureCoords;
+noperspective out vec2 vTextureCoords_Stage0;
+flat out int vTexIndex_Stage0;
+void main() {
+ ivec2 signedCoords = ivec2(int(inTextureCoords.x), int(inTextureCoords.y));
+ vec2 unormTexCoords = vec2(float(signedCoords.x / 2), float(signedCoords.y / 2));
+ vTextureCoords_Stage0 = unormTexCoords * uAtlasSizeInv_Stage0;
+ vTexIndex_Stage0 = 0;
+ gl_Position = vec4(inPosition.x, inPosition.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/16-192.shader_test b/shaders/skia/16-192.shader_test
new file mode 100644
index 0000000..8a071ee
--- /dev/null
+++ b/shaders/skia/16-192.shader_test
@@ -0,0 +1,91 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uColor_Stage0;
+uniform vec4 ucolor_Stage1;
+uniform mat4 um_Stage2_c0_c0;
+uniform vec4 uv_Stage2_c0_c0;
+uniform mat4 um_Stage2_c1_c0;
+uniform vec4 uv_Stage2_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage0;
+noperspective in vec2 vTextureCoords_Stage0;
+flat in int vTexIndex_Stage0;
+vec4 ColorMatrixFragmentProcessor_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = _input;
+ {
+ float nonZeroAlpha = max(inputColor.w, 9.9999997473787516e-05);
+ inputColor = vec4(inputColor.xyz / nonZeroAlpha, inputColor.w);
+ }
+ _output = um_Stage2_c0_c0 * inputColor + uv_Stage2_c0_c0;
+ {
+ _output = clamp(_output, 0.0, 1.0);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 ColorMatrixFragmentProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = _input;
+ {
+ float nonZeroAlpha = max(inputColor.w, 9.9999997473787516e-05);
+ inputColor = vec4(inputColor.xyz / nonZeroAlpha, inputColor.w);
+ }
+ _output = um_Stage2_c1_c0 * inputColor + uv_Stage2_c1_c0;
+ {
+ _output = clamp(_output, 0.0, 1.0);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = uColor_Stage0;
+ vec4 texColor;
+ {
+ texColor = texture(uTextureSampler_0_Stage0, vTextureCoords_Stage0);
+ }
+ outputColor_Stage0 = outputColor_Stage0 * texColor;
+ }
+ vec4 output_Stage1;
+ {
+ {
+ output_Stage1 = outputColor_Stage0 * ucolor_Stage1;
+ }
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = ColorMatrixFragmentProcessor_Stage2_c1_c0(ColorMatrixFragmentProcessor_Stage2_c0_c0(output_Stage1));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform vec2 uAtlasSizeInv_Stage0;
+in vec2 inPosition;
+in uvec2 inTextureCoords;
+noperspective out vec2 vTextureCoords_Stage0;
+flat out int vTexIndex_Stage0;
+void main() {
+ ivec2 signedCoords = ivec2(int(inTextureCoords.x), int(inTextureCoords.y));
+ vec2 unormTexCoords = vec2(float(signedCoords.x / 2), float(signedCoords.y / 2));
+ vTextureCoords_Stage0 = unormTexCoords * uAtlasSizeInv_Stage0;
+ vTexIndex_Stage0 = 0;
+ gl_Position = vec4(inPosition.x, inPosition.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/16-2.shader_test b/shaders/skia/16-2.shader_test
new file mode 100644
index 0000000..50b0a06
--- /dev/null
+++ b/shaders/skia/16-2.shader_test
@@ -0,0 +1,66 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform mat3 ucolorSpaceMatrix_Stage1;
+uniform vec3 ucolorSpaceTranslate_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+uniform sampler2D uTextureSampler_2_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+vec4 TextureEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_1_Stage1, vTransformedCoords_1_Stage0) * _input;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c2_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_2_Stage1, vTransformedCoords_2_Stage0) * _input;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ vec4 planes[3];
+ planes[0] = TextureEffect_Stage1_c0_c0(vec4(1.0));
+ planes[1] = TextureEffect_Stage1_c1_c0(vec4(1.0));
+ planes[2] = TextureEffect_Stage1_c2_c0(vec4(1.0));
+ vec4 color = vec4(planes[2].x, planes[1].x, planes[0].x, 1.0);
+ color.xyz = clamp(color.xyz * ucolorSpaceMatrix_Stage1 + ucolorSpaceTranslate_Stage1, 0.0, 1.0);
+ output_Stage1 = color;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/16-202.shader_test b/shaders/skia/16-202.shader_test
new file mode 100644
index 0000000..27f2689
--- /dev/null
+++ b/shaders/skia/16-202.shader_test
@@ -0,0 +1,126 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+uniform vec4 urectH_Stage2;
+uniform float uinvSixSigma_Stage2;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_0_Stage0;
+ float t = -1.0;
+ {
+ {
+ float invR1 = ufocalParams_Stage1_c0_c0_c0_c0.x;
+ float fx = ufocalParams_Stage1_c0_c0_c0_c0.y;
+ float x_t = -1.0;
+ {
+ x_t = length(p) - p.x * invR1;
+ }
+ {
+ {
+ t = x_t + fx;
+ }
+ }
+ }
+ }
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ float xCoverage, yCoverage;
+ {
+ float x, y;
+ {
+ x = max(urectH_Stage2.x - gl_FragCoord.x, gl_FragCoord.x - urectH_Stage2.z);
+ y = max(urectH_Stage2.y - gl_FragCoord.y, gl_FragCoord.y - urectH_Stage2.w);
+ }
+ xCoverage = texture(uTextureSampler_0_Stage2, vec2(x * uinvSixSigma_Stage2, 0.5)).w;
+ yCoverage = texture(uTextureSampler_0_Stage2, vec2(y * uinvSixSigma_Stage2, 0.5)).w;
+ output_Stage2 = vec4(xCoverage) * yCoverage;
+ }
+ output_Stage2 = vec4(xCoverage) * yCoverage;
+ }
+ {
+ sk_FragColor = output_Stage1 * output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/16-216.shader_test b/shaders/skia/16-216.shader_test
new file mode 100644
index 0000000..234f081
--- /dev/null
+++ b/shaders/skia/16-216.shader_test
@@ -0,0 +1,143 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform vec2 uBounds_Stage1;
+uniform vec4 uKernel_Stage1[6];
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0 - 10.0 * uImageIncrement_Stage1;
+ vec2 coordSampled = vec2(0.0, 0.0);
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage1.x && coord.y <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].x;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage1.x && coord.y <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].y;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage1.x && coord.y <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].z;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage1.x && coord.y <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].w;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage1.x && coord.y <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].x;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage1.x && coord.y <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].y;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage1.x && coord.y <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].z;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage1.x && coord.y <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].w;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage1.x && coord.y <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].x;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage1.x && coord.y <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].y;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage1.x && coord.y <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].z;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage1.x && coord.y <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].w;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage1.x && coord.y <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].x;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage1.x && coord.y <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].y;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage1.x && coord.y <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].z;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage1.x && coord.y <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].w;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage1.x && coord.y <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[4].x;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage1.x && coord.y <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[4].y;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage1.x && coord.y <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[4].z;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage1.x && coord.y <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[4].w;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage1.x && coord.y <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[5].x;
+ }
+ coord += uImageIncrement_Stage1;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/16-22.shader_test b/shaders/skia/16-22.shader_test
new file mode 100644
index 0000000..ba35926
--- /dev/null
+++ b/shaders/skia/16-22.shader_test
@@ -0,0 +1,58 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uborder_Stage1;
+uniform vec4 usubset_Stage1;
+uniform vec4 uclamp_Stage1;
+uniform vec4 unorm_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+flat in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec2 inCoord = vTransformedCoords_0_Stage0;
+ inCoord *= unorm_Stage1.xy;
+ vec2 subsetCoord;
+ subsetCoord.x = inCoord.x;
+ subsetCoord.y = inCoord.y;
+ vec2 clampedCoord;
+ clampedCoord.x = subsetCoord.x;
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage1.y, uclamp_Stage1.w);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord * unorm_Stage1.zw);
+ if (inCoord.x < usubset_Stage1.x || inCoord.x > usubset_Stage1.z) {
+ textureColor = uborder_Stage1;
+ }
+ output_Stage1 = outputColor_Stage0 * textureColor;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec2 inLocalCoords;
+in vec4 color;
+flat out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vcolor_Stage0 = color;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoords, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/16-220.shader_test b/shaders/skia/16-220.shader_test
new file mode 100644
index 0000000..29d374f
--- /dev/null
+++ b/shaders/skia/16-220.shader_test
@@ -0,0 +1,77 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uCoordTransformMatrix_1_Stage0;
+uniform vec4 uclamp_Stage1_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 TextureEffect_Stage1_c0_c0(vec4 _input, vec2 _coords) {
+ _coords = _coords * uCoordTransformMatrix_1_Stage0.xz + uCoordTransformMatrix_1_Stage0.yw;
+ vec4 _output;
+ vec2 inCoord = _coords;
+ vec2 subsetCoord;
+ subsetCoord.x = inCoord.x;
+ subsetCoord.y = inCoord.y;
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage1_c0_c0.x, uclamp_Stage1_c0_c0.z);
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage1_c0_c0.y, uclamp_Stage1_c0_c0.w);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ _output = _input * textureColor;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ vec2 coord = vTransformedCoords_0_Stage0 - vec2(0.5);
+ vec2 f = fract(coord);
+ coord += 0.5 - f;
+ vec4 wx = mat4(0.055555555555555552, 0.88888888888888884, 0.055555555555555552, 0.0, -0.5, 0.0, 0.5, 0.0, 0.83333333333333337, -2.0, 1.5, -0.33333333333333331, -0.3888888888888889, 1.1666666666666667, -1.1666666666666667, 0.3888888888888889) * vec4(1.0, f.x, f.x * f.x, (f.x * f.x) * f.x);
+ vec4 wy = mat4(0.055555555555555552, 0.88888888888888884, 0.055555555555555552, 0.0, -0.5, 0.0, 0.5, 0.0, 0.83333333333333337, -2.0, 1.5, -0.33333333333333331, -0.3888888888888889, 1.1666666666666667, -1.1666666666666667, 0.3888888888888889) * vec4(1.0, f.y, f.y * f.y, (f.y * f.y) * f.y);
+ vec4 rowColors[4];
+ rowColors[0] = TextureEffect_Stage1_c0_c0(vec4(1.0), coord + vec2(-1.0, -1.0));
+ rowColors[1] = TextureEffect_Stage1_c0_c0(vec4(1.0), coord + vec2(0.0, -1.0));
+ rowColors[2] = TextureEffect_Stage1_c0_c0(vec4(1.0), coord + vec2(1.0, -1.0));
+ rowColors[3] = TextureEffect_Stage1_c0_c0(vec4(1.0), coord + vec2(2.0, -1.0));
+ vec4 s0 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ rowColors[0] = TextureEffect_Stage1_c0_c0(vec4(1.0), coord + vec2(-1.0, 0.0));
+ rowColors[1] = TextureEffect_Stage1_c0_c0(vec4(1.0), coord);
+ rowColors[2] = TextureEffect_Stage1_c0_c0(vec4(1.0), coord + vec2(1.0, 0.0));
+ rowColors[3] = TextureEffect_Stage1_c0_c0(vec4(1.0), coord + vec2(2.0, 0.0));
+ vec4 s1 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ rowColors[0] = TextureEffect_Stage1_c0_c0(vec4(1.0), coord + vec2(-1.0, 1.0));
+ rowColors[1] = TextureEffect_Stage1_c0_c0(vec4(1.0), coord + vec2(0.0, 1.0));
+ rowColors[2] = TextureEffect_Stage1_c0_c0(vec4(1.0), coord + vec2(1.0, 1.0));
+ rowColors[3] = TextureEffect_Stage1_c0_c0(vec4(1.0), coord + vec2(2.0, 1.0));
+ vec4 s2 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ rowColors[0] = TextureEffect_Stage1_c0_c0(vec4(1.0), coord + vec2(-1.0, 2.0));
+ rowColors[1] = TextureEffect_Stage1_c0_c0(vec4(1.0), coord + vec2(0.0, 2.0));
+ rowColors[2] = TextureEffect_Stage1_c0_c0(vec4(1.0), coord + vec2(1.0, 2.0));
+ rowColors[3] = TextureEffect_Stage1_c0_c0(vec4(1.0), coord + vec2(2.0, 2.0));
+ vec4 s3 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ vec4 bicubicColor = ((wy.x * s0 + wy.y * s1) + wy.z * s2) + wy.w * s3;
+ bicubicColor.xyz = max(vec3(0.0), min(bicubicColor.xyz, bicubicColor.www));
+ output_Stage1 = bicubicColor;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/16-221.shader_test b/shaders/skia/16-221.shader_test
new file mode 100644
index 0000000..81bca28
--- /dev/null
+++ b/shaders/skia/16-221.shader_test
@@ -0,0 +1,70 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform float uSrcTF_Stage1[7];
+uniform vec4 uclamp_Stage1_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 TextureEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 inCoord = vTransformedCoords_0_Stage0;
+ vec2 subsetCoord;
+ subsetCoord.x = inCoord.x;
+ subsetCoord.y = inCoord.y;
+ vec2 clampedCoord;
+ clampedCoord.x = subsetCoord.x;
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage1_c0_c0.y, uclamp_Stage1_c0_c0.w);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ _output = _input * textureColor;
+ return _output;
+}
+float src_tf_Stage1(float x) {
+ float G = uSrcTF_Stage1[0];
+ float A = uSrcTF_Stage1[1];
+ float B = uSrcTF_Stage1[2];
+ float C = uSrcTF_Stage1[3];
+ float D = uSrcTF_Stage1[4];
+ float E = uSrcTF_Stage1[5];
+ float F = uSrcTF_Stage1[6];
+ float s = sign(x);
+ x = abs(x);
+ x = x < D ? C * x + F : pow(A * x + B, G) + E;
+ return s * x;
+}
+vec4 color_xform_Stage1(vec4 color) {
+ float nonZeroAlpha = max(color.w, 9.9999997473787516e-05);
+ color = vec4(color.xyz / nonZeroAlpha, nonZeroAlpha);
+ color.x = src_tf_Stage1(color.x);
+ color.y = src_tf_Stage1(color.y);
+ color.z = src_tf_Stage1(color.z);
+ color.xyz *= color.w;
+ return color;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = color_xform_Stage1(TextureEffect_Stage1_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/16-231.shader_test b/shaders/skia/16-231.shader_test
new file mode 100644
index 0000000..fa5e4eb
--- /dev/null
+++ b/shaders/skia/16-231.shader_test
@@ -0,0 +1,46 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+noperspective in vec4 vQuadEdge_Stage0;
+noperspective in vec4 vinColor_Stage0;
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ float edgeAlpha;
+ vec2 duvdx = dFdx(vQuadEdge_Stage0.xy);
+ vec2 duvdy = -dFdy(vQuadEdge_Stage0.xy);
+ if (vQuadEdge_Stage0.z > 0.0 && vQuadEdge_Stage0.w > 0.0) {
+ edgeAlpha = min(min(vQuadEdge_Stage0.z, vQuadEdge_Stage0.w) + 0.5, 1.0);
+ } else {
+ vec2 gF = vec2((2.0 * vQuadEdge_Stage0.x) * duvdx.x - duvdx.y, (2.0 * vQuadEdge_Stage0.x) * duvdy.x - duvdy.y);
+ edgeAlpha = vQuadEdge_Stage0.x * vQuadEdge_Stage0.x - vQuadEdge_Stage0.y;
+ edgeAlpha = clamp(0.5 - edgeAlpha / length(gF), 0.0, 1.0);
+ }
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ {
+ sk_FragColor = outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 inPosition;
+in vec4 inColor;
+in vec4 inQuadEdge;
+noperspective out vec4 vQuadEdge_Stage0;
+noperspective out vec4 vinColor_Stage0;
+void main() {
+ vQuadEdge_Stage0 = inQuadEdge;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = inPosition;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/16-239.shader_test b/shaders/skia/16-239.shader_test
new file mode 100644
index 0000000..f4713c8
--- /dev/null
+++ b/shaders/skia/16-239.shader_test
@@ -0,0 +1,39 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ {
+ output_Stage2 = clamp(output_Stage1, 0.0, 1.0);
+ }
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/16-24.shader_test b/shaders/skia/16-24.shader_test
new file mode 100644
index 0000000..d5ed43f
--- /dev/null
+++ b/shaders/skia/16-24.shader_test
@@ -0,0 +1,108 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 uscale01_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias01_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale23_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias23_Stage1_c0_c0_c1_c0;
+uniform float uthreshold_Stage1_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage2_c1_c0_c0_c0;
+uniform vec4 ucolor_Stage2_c2_c0_c0_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 RadialGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = length(vTransformedCoords_0_Stage0);
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 DualIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthreshold_Stage1_c0_c0_c1_c0) {
+ scale = uscale01_Stage1_c0_c0_c1_c0;
+ bias = ubias01_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale23_Stage1_c0_c0_c1_c0;
+ bias = ubias23_Stage1_c0_c0_c1_c0;
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = RadialGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = DualIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c1_c0_c0_c0;
+ }
+ return _output;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 ComposeOne_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_src_over(ConstColorProcessor_Stage2_c1_c0_c0_c0(vec4(1.0)), _input);
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c2_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c2_c0_c0_c0;
+ }
+ return _output;
+}
+vec4 ComposeOne_Stage2_c2_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_src_over(ConstColorProcessor_Stage2_c2_c0_c0_c0(vec4(1.0)), _input);
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = ComposeOne_Stage2_c2_c0(ComposeOne_Stage2_c1_c0(output_Stage1));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/16-240.shader_test b/shaders/skia/16-240.shader_test
new file mode 100644
index 0000000..98e2453
--- /dev/null
+++ b/shaders/skia/16-240.shader_test
@@ -0,0 +1,111 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_KHR_blend_equation_advanced : require
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+layout (blend_support_all_equations) out ;
+uniform vec4 ucolor_Stage1_c0_c0_c1_c0;
+uniform vec4 ucircleData_Stage1_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vtextureCoords_Stage0;
+flat in vec4 vtextureDomain_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 Dither_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = _input;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_0_Stage0.x);
+ uint y = uint(vTransformedCoords_0_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ _output = vec4(clamp(_output.xyz + value * 0.066666670143604279, 0.0, _output.w), _output.w);
+ return _output;
+}
+vec4 ConstColorProcessor_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage1_c0_c0_c1_c0;
+ }
+ return _output;
+}
+float _blend_overlay_component(float sc, float sa, float dc, float da) {
+ if (2.0 * dc <= da) {
+ return (2.0 * sc) * dc;
+ }
+ return sa * da - (2.0 * (da - dc)) * (sa - sc);
+}
+vec4 blend_overlay(vec4 src, vec4 dst) {
+ vec4 result = vec4(_blend_overlay_component(src.x, src.w, dst.x, dst.w), _blend_overlay_component(src.y, src.w, dst.y, dst.w), _blend_overlay_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+ result.xyz += dst.xyz * (1.0 - src.w) + src.xyz * (1.0 - dst.w);
+ return result;
+}
+vec4 ComposeTwo_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_overlay(Dither_Stage1_c0_c0_c0_c0(inputColor), ConstColorProcessor_Stage1_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 CircleBlurFragmentProcessor_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 vec = vec2((gl_FragCoord.x - ucircleData_Stage1_c1_c0.x) * ucircleData_Stage1_c1_c0.w, (gl_FragCoord.y - ucircleData_Stage1_c1_c0.y) * ucircleData_Stage1_c1_c0.w);
+ float dist = length(vec) + (0.5 - ucircleData_Stage1_c1_c0.z) * ucircleData_Stage1_c1_c0.w;
+ _output = _input * texture(uTextureSampler_0_Stage1, vec2(dist, 0.5)).w;
+ return _output;
+}
+vec4 blend_exclusion(vec4 src, vec4 dst) {
+ return vec4((dst.xyz + src.xyz) - (2.0 * dst.xyz) * src.xyz, src.w + (1.0 - src.w) * dst.w);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ vec2 textureCoords;
+ textureCoords = vtextureCoords_Stage0;
+ vec4 textureDomain;
+ textureDomain = vtextureDomain_Stage0;
+ outputColor_Stage0 = vcolor_Stage0;
+ outputColor_Stage0 = texture(uTextureSampler_0_Stage0, clamp(textureCoords, textureDomain.xy, textureDomain.zw)) * outputColor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_exclusion(ComposeTwo_Stage1_c0_c0(inputColor), CircleBlurFragmentProcessor_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 textureCoords;
+in vec4 textureDomain;
+in vec4 color;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vtextureCoords_Stage0;
+flat out vec4 vtextureDomain_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vec2 pos2 = position;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(textureCoords, 1.0)).xy;
+ vtextureCoords_Stage0 = textureCoords;
+ vtextureDomain_Stage0 = textureDomain;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/16-241.shader_test b/shaders/skia/16-241.shader_test
new file mode 100644
index 0000000..7b8c328
--- /dev/null
+++ b/shaders/skia/16-241.shader_test
@@ -0,0 +1,108 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 ubaseFrequency_Stage2_c0_c0;
+uniform vec2 ustitchData_Stage2_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+uniform sampler2D uTextureSampler_1_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec3 vTransformedCoords_1_Stage0;
+float perlinnoise_Stage2_c0_c0(float chanCoord, vec2 noiseVec, vec2 stitchData) {
+ vec4 floorVal;
+ floorVal.xy = floor(noiseVec);
+ floorVal.zw = floorVal.xy + vec2(1.0);
+ vec2 fractVal = fract(noiseVec);
+ vec2 noiseSmooth = (fractVal * fractVal) * (vec2(3.0) - vec2(2.0) * fractVal);
+ if (floorVal.x >= stitchData.x) {
+ floorVal.x -= stitchData.x;
+ }
+ if (floorVal.y >= stitchData.y) {
+ floorVal.y -= stitchData.y;
+ }
+ if (floorVal.z >= stitchData.x) {
+ floorVal.z -= stitchData.x;
+ }
+ if (floorVal.w >= stitchData.y) {
+ floorVal.w -= stitchData.y;
+ }
+ floorVal = fract(floor(mod(floorVal, 256.0)) / vec4(256.0));
+ vec2 latticeIdx;
+ latticeIdx.x = texture(uTextureSampler_0_Stage2, vec2(floorVal.x, 0.5)).x;
+ latticeIdx.y = texture(uTextureSampler_0_Stage2, vec2(floorVal.z, 0.5)).x;
+ vec4 bcoords = fract(latticeIdx.xyxy + floorVal.yyww);
+ vec2 uv;
+ vec4 lattice = texture(uTextureSampler_1_Stage2, vec2(bcoords.x, chanCoord)).zyxw;
+ uv.x = dot((lattice.yw + lattice.xz * vec2(0.00390625)) * vec2(2.0) - vec2(1.0), fractVal);
+ fractVal.x -= 1.0;
+ lattice = texture(uTextureSampler_1_Stage2, vec2(bcoords.y, chanCoord)).zyxw;
+ uv.y = dot((lattice.yw + lattice.xz * vec2(0.00390625)) * vec2(2.0) - vec2(1.0), fractVal);
+ vec2 ab;
+ ab.x = mix(uv.x, uv.y, noiseSmooth.x);
+ fractVal.y -= 1.0;
+ lattice = texture(uTextureSampler_1_Stage2, vec2(bcoords.w, chanCoord)).zyxw;
+ uv.y = dot((lattice.yw + lattice.xz * vec2(0.00390625)) * vec2(2.0) - vec2(1.0), fractVal);
+ fractVal.x += 1.0;
+ lattice = texture(uTextureSampler_1_Stage2, vec2(bcoords.z, chanCoord)).zyxw;
+ uv.x = dot((lattice.yw + lattice.xz * vec2(0.00390625)) * vec2(2.0) - vec2(1.0), fractVal);
+ ab.y = mix(uv.x, uv.y, noiseSmooth.x);
+ return mix(ab.x, ab.y, noiseSmooth.y);
+}
+vec4 PerlinNoise_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 vTransformedCoords_1_Stage0_ensure2D = vTransformedCoords_1_Stage0.xy / vTransformedCoords_1_Stage0.z;
+ vec2 noiseVec = floor(vTransformedCoords_1_Stage0_ensure2D) * ubaseFrequency_Stage2_c0_c0;
+ _output = vec4(0.0);
+ vec2 stitchData = ustitchData_Stage2_c0_c0;
+ float ratio = 1.0;
+ for (int octave = 0;octave < 7; ++octave) {
+ _output += abs(vec4(perlinnoise_Stage2_c0_c0(0.125, noiseVec, stitchData), perlinnoise_Stage2_c0_c0(0.375, noiseVec, stitchData), perlinnoise_Stage2_c0_c0(0.625, noiseVec, stitchData), perlinnoise_Stage2_c0_c0(0.875, noiseVec, stitchData))) * ratio;
+ noiseVec *= vec2(2.0);
+ ratio *= 0.5;
+ stitchData *= vec2(2.0);
+ }
+ _output = clamp(_output, 0.0, 1.0);
+ _output = vec4(_output.xyz * _output.www, _output.w);
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_dst_in(output_Stage1, PerlinNoise_Stage2_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec3 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0);
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/16-242.shader_test b/shaders/skia/16-242.shader_test
new file mode 100644
index 0000000..d4630f4
--- /dev/null
+++ b/shaders/skia/16-242.shader_test
@@ -0,0 +1,73 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 urectUniform_Stage2_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 AARectEffect_Stage2_c0_c0(vec4 _input, vec2 _coords) {
+ vec4 _output;
+ float alpha;
+ {
+ float xSub, ySub;
+ xSub = min(gl_FragCoord.x - urectUniform_Stage2_c0_c0.x, 0.0);
+ xSub += min(urectUniform_Stage2_c0_c0.z - gl_FragCoord.x, 0.0);
+ ySub = min(gl_FragCoord.y - urectUniform_Stage2_c0_c0.y, 0.0);
+ ySub += min(urectUniform_Stage2_c0_c0.w - gl_FragCoord.y, 0.0);
+ alpha = (1.0 + max(xSub, -1.0)) * (1.0 + max(ySub, -1.0));
+ }
+ {
+ alpha = 1.0 - alpha;
+ }
+ _output = _input * alpha;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ float coord = vTransformedCoords_1_Stage0.x - 0.5;
+ float f = fract(coord);
+ coord += 0.5 - f;
+ float f2 = f * f;
+ vec4 w = mat4(0.055555555555555552, 0.88888888888888884, 0.055555555555555552, 0.0, -0.5, 0.0, 0.5, 0.0, 0.83333333333333337, -2.0, 1.5, -0.33333333333333331, -0.3888888888888889, 1.1666666666666667, -1.1666666666666667, 0.3888888888888889) * vec4(1.0, f, f2, f2 * f);
+ vec4 c[4];
+ c[0] = AARectEffect_Stage2_c0_c0(vec4(1.0), vec2(coord + -1.0, vTransformedCoords_1_Stage0.y));
+ c[1] = AARectEffect_Stage2_c0_c0(vec4(1.0), vec2(coord, vTransformedCoords_1_Stage0.y));
+ c[2] = AARectEffect_Stage2_c0_c0(vec4(1.0), vec2(coord + 1.0, vTransformedCoords_1_Stage0.y));
+ c[3] = AARectEffect_Stage2_c0_c0(vec4(1.0), vec2(coord + 2.0, vTransformedCoords_1_Stage0.y));
+ vec4 bicubicColor = ((c[0] * w.x + c[1] * w.y) + c[2] * w.z) + c[3] * w.w;
+ bicubicColor = clamp(bicubicColor, 0.0, 1.0);
+ output_Stage2 = bicubicColor * output_Stage1;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/16-25.shader_test b/shaders/skia/16-25.shader_test
new file mode 100644
index 0000000..522e0ff
--- /dev/null
+++ b/shaders/skia/16-25.shader_test
@@ -0,0 +1,116 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 uscale01_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias01_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale23_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias23_Stage1_c0_c0_c1_c0;
+uniform float uthreshold_Stage1_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage2_c1_c0_c0_c0;
+uniform vec4 ucolor_Stage2_c2_c0_c0_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 RadialGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = length(vTransformedCoords_0_Stage0);
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 DualIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthreshold_Stage1_c0_c0_c1_c0) {
+ scale = uscale01_Stage1_c0_c0_c1_c0;
+ bias = ubias01_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale23_Stage1_c0_c0_c1_c0;
+ bias = ubias23_Stage1_c0_c0_c1_c0;
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = RadialGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = DualIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c1_c0_c0_c0;
+ }
+ return _output;
+}
+float _blend_overlay_component(float sc, float sa, float dc, float da) {
+ if (2.0 * dc <= da) {
+ return (2.0 * sc) * dc;
+ }
+ return sa * da - (2.0 * (da - dc)) * (sa - sc);
+}
+vec4 blend_overlay(vec4 src, vec4 dst) {
+ vec4 result = vec4(_blend_overlay_component(src.x, src.w, dst.x, dst.w), _blend_overlay_component(src.y, src.w, dst.y, dst.w), _blend_overlay_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+ result.xyz += dst.xyz * (1.0 - src.w) + src.xyz * (1.0 - dst.w);
+ return result;
+}
+vec4 ComposeOne_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_overlay(ConstColorProcessor_Stage2_c1_c0_c0_c0(vec4(1.0)), _input);
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c2_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c2_c0_c0_c0;
+ }
+ return _output;
+}
+vec4 ComposeOne_Stage2_c2_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_overlay(ConstColorProcessor_Stage2_c2_c0_c0_c0(vec4(1.0)), _input);
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = ComposeOne_Stage2_c2_c0(ComposeOne_Stage2_c1_c0(output_Stage1));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/16-31.shader_test b/shaders/skia/16-31.shader_test
new file mode 100644
index 0000000..a88e7b4
--- /dev/null
+++ b/shaders/skia/16-31.shader_test
@@ -0,0 +1,92 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform mat4 um_Stage2_c1_c0;
+uniform vec4 uv_Stage2_c1_c0;
+uniform float uSrcTF_Stage2_c2_c0[7];
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+vec4 ColorMatrixFragmentProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = _input;
+ {
+ float nonZeroAlpha = max(inputColor.w, 9.9999997473787516e-05);
+ inputColor = vec4(inputColor.xyz / nonZeroAlpha, inputColor.w);
+ }
+ _output = um_Stage2_c1_c0 * inputColor + uv_Stage2_c1_c0;
+ {
+ _output = clamp(_output, 0.0, 1.0);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+float src_tf_Stage2_c2_c0(float x) {
+ float G = uSrcTF_Stage2_c2_c0[0];
+ float A = uSrcTF_Stage2_c2_c0[1];
+ float B = uSrcTF_Stage2_c2_c0[2];
+ float C = uSrcTF_Stage2_c2_c0[3];
+ float D = uSrcTF_Stage2_c2_c0[4];
+ float E = uSrcTF_Stage2_c2_c0[5];
+ float F = uSrcTF_Stage2_c2_c0[6];
+ float s = sign(x);
+ x = abs(x);
+ x = x < D ? C * x + F : pow(A * x + B, G) + E;
+ return s * x;
+}
+vec4 color_xform_Stage2_c2_c0(vec4 color) {
+ float nonZeroAlpha = max(color.w, 9.9999997473787516e-05);
+ color = vec4(color.xyz / nonZeroAlpha, nonZeroAlpha);
+ color.x = src_tf_Stage2_c2_c0(color.x);
+ color.y = src_tf_Stage2_c2_c0(color.y);
+ color.z = src_tf_Stage2_c2_c0(color.z);
+ color.xyz *= color.w;
+ return color;
+}
+vec4 ColorSpaceXform_Stage2_c2_c0(vec4 _input) {
+ vec4 _output;
+ _output = color_xform_Stage2_c2_c0(_input);
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TextureEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = ColorSpaceXform_Stage2_c2_c0(ColorMatrixFragmentProcessor_Stage2_c1_c0(output_Stage1));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/16-32.shader_test b/shaders/skia/16-32.shader_test
new file mode 100644
index 0000000..fb4aea1
--- /dev/null
+++ b/shaders/skia/16-32.shader_test
@@ -0,0 +1,63 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec2 uDstTextureUpperLeft_Stage1;
+uniform vec2 uDstTextureCoordScale_Stage1;
+uniform sampler2D uTextureSampler_0_Stage0;
+uniform sampler2D uDstTextureSampler_Stage1;
+noperspective in vec2 vTextureCoords_Stage0;
+flat in int vTexIndex_Stage0;
+noperspective in vec4 vinColor_Stage0;
+vec4 blend_src(vec4 src, vec4 dst) {
+ return src;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vinColor_Stage0;
+ vec4 texColor;
+ {
+ texColor = texture(uTextureSampler_0_Stage0, vTextureCoords_Stage0);
+ }
+ outputCoverage_Stage0 = texColor;
+ }
+ {
+ if (all(lessThanEqual(outputCoverage_Stage0.xyz, vec3(0.0)))) {
+ discard;
+ }
+ vec2 _dstTexCoord = (gl_FragCoord.xy - uDstTextureUpperLeft_Stage1) * uDstTextureCoordScale_Stage1;
+ _dstTexCoord.y = 1.0 - _dstTexCoord.y;
+ vec4 _dstColor = texture(uDstTextureSampler_Stage1, _dstTexCoord);
+ sk_FragColor = blend_src(outputColor_Stage0, _dstColor);
+ sk_FragColor = outputCoverage_Stage0 * sk_FragColor + (vec4(1.0) - outputCoverage_Stage0) * _dstColor;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform vec2 uAtlasSizeInv_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in uvec2 inTextureCoords;
+noperspective out vec2 vTextureCoords_Stage0;
+flat out int vTexIndex_Stage0;
+noperspective out vec4 vinColor_Stage0;
+void main() {
+ ivec2 signedCoords = ivec2(int(inTextureCoords.x), int(inTextureCoords.y));
+ vec2 unormTexCoords = vec2(float(signedCoords.x / 2), float(signedCoords.y / 2));
+ vTextureCoords_Stage0 = unormTexCoords * uAtlasSizeInv_Stage0;
+ vTexIndex_Stage0 = 0;
+ vinColor_Stage0 = inColor;
+ gl_Position = vec4(inPosition.x, inPosition.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/16-33.shader_test b/shaders/skia/16-33.shader_test
new file mode 100644
index 0000000..aa9d733
--- /dev/null
+++ b/shaders/skia/16-33.shader_test
@@ -0,0 +1,138 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform vec2 uBounds_Stage1;
+uniform vec4 uKernel_Stage1[7];
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0 - 12.0 * uImageIncrement_Stage1;
+ vec2 coordSampled = vec2(0.0, 0.0);
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[4].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[4].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[4].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[4].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[5].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[5].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[5].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[5].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[6].x;
+ coord += uImageIncrement_Stage1;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/16-35.shader_test b/shaders/skia/16-35.shader_test
new file mode 100644
index 0000000..5e4aa69
--- /dev/null
+++ b/shaders/skia/16-35.shader_test
@@ -0,0 +1,45 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uCoordTransformMatrix_0_Stage0;
+uniform sampler2D uTextureSampler_0_Stage1;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0(vec4 _input, vec2 _coords) {
+ _coords = _coords * uCoordTransformMatrix_0_Stage0.xz + uCoordTransformMatrix_0_Stage0.yw;
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, _coords) * _input;
+ return _output;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TextureEffect_Stage1_c0_c0(vec4(1.0), gl_FragCoord.xy);
+ }
+ {
+ sk_FragColor = outputColor_Stage0 * output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 position;
+in vec4 color;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/16-4.shader_test b/shaders/skia/16-4.shader_test
new file mode 100644
index 0000000..c81656f
--- /dev/null
+++ b/shaders/skia/16-4.shader_test
@@ -0,0 +1,33 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/16-40.shader_test b/shaders/skia/16-40.shader_test
new file mode 100644
index 0000000..7020daf
--- /dev/null
+++ b/shaders/skia/16-40.shader_test
@@ -0,0 +1,83 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+vec4 ComposeOne_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_dst_in(_input, TextureEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0)));
+ return _output;
+}
+vec4 ComposeOne_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_src_in(_input, ComposeOne_Stage1_c0_c0_c0_c0(vec4(1.0)));
+ return _output;
+}
+vec4 TextureEffect_Stage1_c1_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_1_Stage1, vTransformedCoords_1_Stage0) * _input;
+ return _output;
+}
+vec4 ComposeOne_Stage1_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_dst_in(_input, TextureEffect_Stage1_c1_c0_c0_c0_c0_c0(vec4(1.0)));
+ return _output;
+}
+vec4 ComposeOne_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_src_in(_input, ComposeOne_Stage1_c1_c0_c0_c0(vec4(1.0)));
+ return _output;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(vec4(1.0).xyz, 1.0);
+ output_Stage1 = blend_src_in(ComposeOne_Stage1_c0_c0(inputColor), ComposeOne_Stage1_c1_c0(inputColor));
+ }
+ {
+ sk_FragColor = outputColor_Stage0 * output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/16-42.shader_test b/shaders/skia/16-42.shader_test
new file mode 100644
index 0000000..76d1bb5
--- /dev/null
+++ b/shaders/skia/16-42.shader_test
@@ -0,0 +1,103 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform vec2 uBounds_Stage1;
+uniform vec4 uKernel_Stage1[4];
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0 - 6.0 * uImageIncrement_Stage1;
+ vec2 coordSampled = vec2(0.0, 0.0);
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1.x && coord.x <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].x;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1.x && coord.x <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].y;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1.x && coord.x <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].z;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1.x && coord.x <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].w;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1.x && coord.x <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].x;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1.x && coord.x <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].y;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1.x && coord.x <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].z;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1.x && coord.x <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].w;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1.x && coord.x <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].x;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1.x && coord.x <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].y;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1.x && coord.x <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].z;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1.x && coord.x <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].w;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1.x && coord.x <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].x;
+ }
+ coord += uImageIncrement_Stage1;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/16-43.shader_test b/shaders/skia/16-43.shader_test
new file mode 100644
index 0000000..13f5606
--- /dev/null
+++ b/shaders/skia/16-43.shader_test
@@ -0,0 +1,43 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uinnerRect_Stage1;
+uniform vec2 uradiusPlusHalf_Stage1;
+flat in vec4 vcolor_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec2 dxy0 = uinnerRect_Stage1.xy - gl_FragCoord.xy;
+ vec2 dxy1 = gl_FragCoord.xy - uinnerRect_Stage1.zw;
+ vec2 dxy = max(max(dxy0, dxy1), 0.0);
+ float alpha = clamp(uradiusPlusHalf_Stage1.x - length(dxy), 0.0, 1.0);
+ output_Stage1 = vec4(alpha);
+ }
+ {
+ sk_FragColor = outputColor_Stage0 * output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 position;
+in vec4 color;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/16-5.shader_test b/shaders/skia/16-5.shader_test
new file mode 100644
index 0000000..05787da
--- /dev/null
+++ b/shaders/skia/16-5.shader_test
@@ -0,0 +1,50 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 TextureEffect_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage2, vTransformedCoords_1_Stage0) * _input;
+ return _output;
+}
+vec4 blend_dst_over(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src + dst;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_dst_over(output_Stage1, TextureEffect_Stage2_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/16-55.shader_test b/shaders/skia/16-55.shader_test
new file mode 100644
index 0000000..7d645ab
--- /dev/null
+++ b/shaders/skia/16-55.shader_test
@@ -0,0 +1,90 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uColor_Stage0;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+in vec2 vTransformedCoords_0_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec3 pos3 = uViewM_Stage0 * vec3(inPosition, 1.0);
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos3.x, pos3.y, 0.0, pos3.z);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/16-56.shader_test b/shaders/skia/16-56.shader_test
new file mode 100644
index 0000000..df1dc56
--- /dev/null
+++ b/shaders/skia/16-56.shader_test
@@ -0,0 +1,130 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage0;
+in vec2 vTextureCoords_Stage0;
+flat in int vTexIndex_Stage0;
+in vec2 vIntTextureCoords_Stage0;
+in vec4 vinColor_Stage0;
+in vec2 vTransformedCoords_0_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ vec2 uv = vTextureCoords_Stage0;
+ vec4 texColor;
+ {
+ texColor = texture(uTextureSampler_0_Stage0, uv);
+ }
+ float distance = 7.96875 * (texColor.x - 0.50196081399917603);
+ float afwidth;
+ vec2 dist_grad = vec2(dFdx(distance), -dFdy(distance));
+ float dg_len2 = dot(dist_grad, dist_grad);
+ if (dg_len2 < 9.9999997473787516e-05) {
+ dist_grad = vec2(0.70709997415542603, 0.70709997415542603);
+ } else {
+ dist_grad = dist_grad * inversesqrt(dg_len2);
+ }
+ vec2 Jdx = dFdx(vIntTextureCoords_Stage0);
+ vec2 Jdy = -dFdy(vIntTextureCoords_Stage0);
+ vec2 grad = vec2(dist_grad.x * Jdx.x + dist_grad.y * Jdy.x, dist_grad.x * Jdx.y + dist_grad.y * Jdy.y);
+ afwidth = 0.64999997615814209 * length(grad);
+ float val = smoothstep(-afwidth, afwidth, distance);
+ outputCoverage_Stage0 = vec4(val);
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1 * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform vec2 uAtlasDimensionsInv_Stage0;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in uvec2 inTextureCoords;
+out vec2 vTextureCoords_Stage0;
+flat out int vTexIndex_Stage0;
+out vec2 vIntTextureCoords_Stage0;
+out vec4 vinColor_Stage0;
+out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ ivec2 signedCoords = ivec2(int(inTextureCoords.x), int(inTextureCoords.y));
+ vec2 unormTexCoords = vec2(float(signedCoords.x / 2), float(signedCoords.y / 2));
+ vTextureCoords_Stage0 = unormTexCoords * uAtlasDimensionsInv_Stage0;
+ vTexIndex_Stage0 = 0;
+ vIntTextureCoords_Stage0 = unormTexCoords;
+ vinColor_Stage0 = inColor;
+ vec3 pos3 = uViewM_Stage0 * vec3(inPosition, 1.0);
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos3.x, pos3.y, 0.0, pos3.z);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/16-57.shader_test b/shaders/skia/16-57.shader_test
new file mode 100644
index 0000000..5941597
--- /dev/null
+++ b/shaders/skia/16-57.shader_test
@@ -0,0 +1,62 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform sampler2D uTextureSampler_0_Stage0;
+in vec2 vlocalCoord_Stage0;
+flat in vec4 vtexDomain_Stage0;
+in float vcoverage_Stage0;
+flat in vec4 vgeomDomain_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vec4(1.0);
+ vec2 texCoord;
+ texCoord = vlocalCoord_Stage0;
+ vec4 domain;
+ domain = vtexDomain_Stage0;
+ texCoord = clamp(texCoord, domain.xy, domain.zw);
+ outputColor_Stage0 = texture(uTextureSampler_0_Stage0, texCoord);
+ float coverage = vcoverage_Stage0 * gl_FragCoord.w;
+ vec4 geoDomain;
+ geoDomain = vgeomDomain_Stage0;
+ if (coverage < 0.5) {
+ vec4 dists4 = clamp(vec4(1.0, 1.0, -1.0, -1.0) * (gl_FragCoord.xyxy - geoDomain), 0.0, 1.0);
+ vec2 dists2 = dists4.xy * dists4.zw;
+ coverage = min(coverage, dists2.x * dists2.y);
+ }
+ outputCoverage_Stage0 = vec4(coverage);
+ }
+ {
+ sk_FragColor = outputColor_Stage0 * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec4 positionWithCoverage;
+in vec2 localCoord;
+in vec4 geomDomain;
+in vec4 texDomain;
+out vec2 vlocalCoord_Stage0;
+flat out vec4 vtexDomain_Stage0;
+out float vcoverage_Stage0;
+flat out vec4 vgeomDomain_Stage0;
+void main() {
+ vec3 position = positionWithCoverage.xyz;
+ vlocalCoord_Stage0 = localCoord;
+ vtexDomain_Stage0 = texDomain;
+ vcoverage_Stage0 = positionWithCoverage.w * positionWithCoverage.z;
+ vgeomDomain_Stage0 = geomDomain;
+ gl_Position = vec4(position.x, position.y, 0.0, position.z);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/16-58.shader_test b/shaders/skia/16-58.shader_test
new file mode 100644
index 0000000..56c366d
--- /dev/null
+++ b/shaders/skia/16-58.shader_test
@@ -0,0 +1,92 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 ubaseFrequency_Stage1_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+float perlinnoise_Stage1_c0_c0(float chanCoord, vec2 noiseVec) {
+ vec4 floorVal;
+ floorVal.xy = floor(noiseVec);
+ floorVal.zw = floorVal.xy + vec2(1.0);
+ vec2 fractVal = fract(noiseVec);
+ vec2 noiseSmooth = (fractVal * fractVal) * (vec2(3.0) - vec2(2.0) * fractVal);
+ floorVal = fract(floor(mod(floorVal, 256.0)) / vec4(256.0));
+ vec2 latticeIdx;
+ latticeIdx.x = texture(uTextureSampler_0_Stage1, vec2(floorVal.x, 0.5)).x;
+ latticeIdx.y = texture(uTextureSampler_0_Stage1, vec2(floorVal.z, 0.5)).x;
+ vec4 bcoords = fract(latticeIdx.xyxy + floorVal.yyww);
+ vec2 uv;
+ vec4 lattice = texture(uTextureSampler_1_Stage1, vec2(bcoords.x, chanCoord)).zyxw;
+ uv.x = dot((lattice.yw + lattice.xz * vec2(0.00390625)) * vec2(2.0) - vec2(1.0), fractVal);
+ fractVal.x -= 1.0;
+ lattice = texture(uTextureSampler_1_Stage1, vec2(bcoords.y, chanCoord)).zyxw;
+ uv.y = dot((lattice.yw + lattice.xz * vec2(0.00390625)) * vec2(2.0) - vec2(1.0), fractVal);
+ vec2 ab;
+ ab.x = mix(uv.x, uv.y, noiseSmooth.x);
+ fractVal.y -= 1.0;
+ lattice = texture(uTextureSampler_1_Stage1, vec2(bcoords.w, chanCoord)).zyxw;
+ uv.y = dot((lattice.yw + lattice.xz * vec2(0.00390625)) * vec2(2.0) - vec2(1.0), fractVal);
+ fractVal.x += 1.0;
+ lattice = texture(uTextureSampler_1_Stage1, vec2(bcoords.z, chanCoord)).zyxw;
+ uv.x = dot((lattice.yw + lattice.xz * vec2(0.00390625)) * vec2(2.0) - vec2(1.0), fractVal);
+ ab.y = mix(uv.x, uv.y, noiseSmooth.x);
+ return mix(ab.x, ab.y, noiseSmooth.y);
+}
+vec4 PerlinNoise_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 noiseVec = floor(vTransformedCoords_0_Stage0) * ubaseFrequency_Stage1_c0_c0;
+ _output = vec4(0.0);
+ float ratio = 1.0;
+ for (int octave = 0;octave < 3; ++octave) {
+ _output += vec4(perlinnoise_Stage1_c0_c0(0.125, noiseVec), perlinnoise_Stage1_c0_c0(0.375, noiseVec), perlinnoise_Stage1_c0_c0(0.625, noiseVec), perlinnoise_Stage1_c0_c0(0.875, noiseVec)) * ratio;
+ noiseVec *= vec2(2.0);
+ ratio *= 0.5;
+ }
+ _output = _output * vec4(0.5) + vec4(0.5);
+ _output = clamp(_output, 0.0, 1.0);
+ _output = vec4(_output.xyz * _output.www, _output.w);
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_dst_in(outputColor_Stage0, PerlinNoise_Stage1_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/16-6.shader_test b/shaders/skia/16-6.shader_test
new file mode 100644
index 0000000..9c4055c
--- /dev/null
+++ b/shaders/skia/16-6.shader_test
@@ -0,0 +1,63 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uclamp_Stage1_c0_c0_c0_c0;
+uniform mat3 ucolorSpaceMatrix_Stage1_c0_c0;
+uniform vec3 ucolorSpaceTranslate_Stage1_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 inCoord = vTransformedCoords_0_Stage0;
+ vec2 subsetCoord;
+ subsetCoord.x = inCoord.x;
+ subsetCoord.y = inCoord.y;
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage1_c0_c0_c0_c0.x, uclamp_Stage1_c0_c0_c0_c0.z);
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage1_c0_c0_c0_c0.y, uclamp_Stage1_c0_c0_c0_c0.w);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ _output = _input * textureColor;
+ return _output;
+}
+vec4 YUVtoRGBEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 planes[1];
+ planes[0] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0));
+ vec4 color = vec4(planes[0].y, planes[0].z, planes[0].x, planes[0].w);
+ color.xyz = clamp(color.xyz * ucolorSpaceMatrix_Stage1_c0_c0 + ucolorSpaceTranslate_Stage1_c0_c0, 0.0, 1.0);
+ color.xyz *= color.w;
+ _output = color;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = YUVtoRGBEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/16-65.shader_test b/shaders/skia/16-65.shader_test
new file mode 100644
index 0000000..6d328d1
--- /dev/null
+++ b/shaders/skia/16-65.shader_test
@@ -0,0 +1,69 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec3 vTransformedCoords_0_Stage0;
+vec4 TextureEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = textureProj(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = TextureEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = OverrideInputFragmentProcessor_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 blend_src(vec4 src, vec4 dst) {
+ return src;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_src(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 inColor;
+in vec2 inLocalCoord;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec3 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0);
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/16-66.shader_test b/shaders/skia/16-66.shader_test
new file mode 100644
index 0000000..be6e6c1
--- /dev/null
+++ b/shaders/skia/16-66.shader_test
@@ -0,0 +1,69 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 TextureEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = TextureEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = OverrideInputFragmentProcessor_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 blend_src(vec4 src, vec4 dst) {
+ return src;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_src(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 inColor;
+in vec2 inLocalCoord;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/16-7.shader_test b/shaders/skia/16-7.shader_test
new file mode 100644
index 0000000..8123b0d
--- /dev/null
+++ b/shaders/skia/16-7.shader_test
@@ -0,0 +1,78 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform mat3 ucolorSpaceMatrix_Stage1;
+uniform vec3 ucolorSpaceTranslate_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+uniform sampler2D uTextureSampler_2_Stage1;
+uniform sampler2D uTextureSampler_3_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+noperspective in vec2 vTransformedCoords_3_Stage0;
+vec4 TextureEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_1_Stage1, vTransformedCoords_1_Stage0) * _input;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c2_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_2_Stage1, vTransformedCoords_2_Stage0) * _input;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c3_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_3_Stage1, vTransformedCoords_3_Stage0) * _input;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ vec4 planes[4];
+ planes[0] = TextureEffect_Stage1_c0_c0(vec4(1.0));
+ planes[1] = TextureEffect_Stage1_c1_c0(vec4(1.0));
+ planes[2] = TextureEffect_Stage1_c2_c0(vec4(1.0));
+ planes[3] = TextureEffect_Stage1_c3_c0(vec4(1.0));
+ vec4 color = vec4(planes[0].x, planes[1].x, planes[2].x, planes[3].w);
+ color.xyz = clamp(color.xyz * ucolorSpaceMatrix_Stage1 + ucolorSpaceTranslate_Stage1, 0.0, 1.0);
+ color.xyz *= color.w;
+ output_Stage1 = color;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+uniform mat3 uCoordTransformMatrix_3_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+noperspective out vec2 vTransformedCoords_3_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_3_Stage0 = (uCoordTransformMatrix_3_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/16-72.shader_test b/shaders/skia/16-72.shader_test
new file mode 100644
index 0000000..13225be
--- /dev/null
+++ b/shaders/skia/16-72.shader_test
@@ -0,0 +1,41 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform float uPixelSize_Stage1;
+uniform vec2 uRange_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0;
+ coord.x -= 2.0 * uPixelSize_Stage1;
+ for (int i = 0;i < 5; i++) {
+ output_Stage1 = max(output_Stage1, texture(uTextureSampler_0_Stage1, coord));
+ coord.x += uPixelSize_Stage1;
+ }
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/16-73.shader_test b/shaders/skia/16-73.shader_test
new file mode 100644
index 0000000..112b597
--- /dev/null
+++ b/shaders/skia/16-73.shader_test
@@ -0,0 +1,78 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage2_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c1_c0;
+ }
+ return _output;
+}
+vec4 blend_src(vec4 src, vec4 dst) {
+ return src;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_src(ConstColorProcessor_Stage2_c1_c0(vec4(1.0)), output_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/16-75.shader_test b/shaders/skia/16-75.shader_test
new file mode 100644
index 0000000..56abe9f
--- /dev/null
+++ b/shaders/skia/16-75.shader_test
@@ -0,0 +1,168 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform vec4 uKernel_Stage1[3];
+uniform vec2 uKernelOffset_Stage1;
+uniform float uGain_Stage1;
+uniform float uBias_Stage1;
+uniform vec4 uTexDom_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ vec4 sum = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0 - uKernelOffset_Stage1 * uImageIncrement_Stage1;
+ vec4 c;
+ {
+ float k = uKernel_Stage1[0].x;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[0].y;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[0].z;
+ {
+ vec2 origCoord = coord + vec2(2.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[0].w;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[1].x;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[1].y;
+ {
+ vec2 origCoord = coord + vec2(2.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[1].z;
+ {
+ vec2 origCoord = coord + vec2(0.0, 2.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[1].w;
+ {
+ vec2 origCoord = coord + vec2(1.0, 2.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[2].x;
+ {
+ vec2 origCoord = coord + vec2(2.0, 2.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ vec2 origCoord = vTransformedCoords_0_Stage0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ output_Stage1.w = c.w;
+ output_Stage1.xyz = clamp(sum.xyz * uGain_Stage1 + uBias_Stage1, 0.0, 1.0);
+ output_Stage1.xyz *= output_Stage1.w;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/16-77.shader_test b/shaders/skia/16-77.shader_test
new file mode 100644
index 0000000..ba8c165
--- /dev/null
+++ b/shaders/skia/16-77.shader_test
@@ -0,0 +1,140 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 uscale01_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias01_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale23_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias23_Stage1_c0_c0_c1_c0;
+uniform float uthreshold_Stage1_c0_c0_c1_c0;
+flat in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 varccoord_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 DualIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthreshold_Stage1_c0_c0_c1_c0) {
+ scale = uscale01_Stage1_c0_c0_c1_c0;
+ bias = ubias01_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale23_Stage1_c0_c0_c1_c0;
+ bias = ubias23_Stage1_c0_c0_c1_c0;
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = DualIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ float x_plus_1 = varccoord_Stage0.x, y = varccoord_Stage0.y;
+ float coverage;
+ if (0.0 == x_plus_1) {
+ coverage = y;
+ } else {
+ float fn = x_plus_1 * (x_plus_1 - 2.0);
+ fn = ((y) * (y) + (fn));
+ float fnwidth = fwidth(fn);
+ float d = fn / fnwidth;
+ coverage = clamp(0.5 - d, 0.0, 1.0);
+ }
+ outputCoverage_Stage0 = vec4(coverage);
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1 * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec4 radii_selector;
+in vec4 corner_and_radius_outsets;
+in vec4 aa_bloat_and_coverage;
+in vec4 skew;
+in vec2 translate;
+in vec4 radii_x;
+in vec4 radii_y;
+in vec4 color;
+in vec4 local_rect;
+flat out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 varccoord_Stage0;
+void main() {
+ vcolor_Stage0 = color;
+ vec2 corner = corner_and_radius_outsets.xy;
+ vec2 radius_outset = corner_and_radius_outsets.zw;
+ vec2 aa_bloat_direction = aa_bloat_and_coverage.xy;
+ float coverage = aa_bloat_and_coverage.z;
+ float is_linear_coverage = aa_bloat_and_coverage.w;
+ vec2 pixellength = inversesqrt(vec2(dot(skew.xz, skew.xz), dot(skew.yw, skew.yw)));
+ vec4 normalized_axis_dirs = skew * pixellength.xyxy;
+ vec2 axiswidths = abs(normalized_axis_dirs.xy) + abs(normalized_axis_dirs.zw);
+ vec2 aa_bloatradius = (axiswidths * pixellength) * 0.5;
+ vec4 radii_and_neighbors = radii_selector * mat4(radii_x, radii_y, radii_x.yxwz, radii_y.wzyx);
+ vec2 radii = radii_and_neighbors.xy;
+ vec2 neighbor_radii = radii_and_neighbors.zw;
+ if (any(greaterThan(aa_bloatradius, vec2(1.0)))) {
+ corner = max(abs(corner), aa_bloatradius) * sign(corner);
+ coverage /= max(aa_bloatradius.x, 1.0) * max(aa_bloatradius.y, 1.0);
+ radii = vec2(0.0);
+ }
+ if (any(lessThan(radii, aa_bloatradius * 1.25))) {
+ radii = aa_bloatradius;
+ radius_outset = floor(abs(radius_outset)) * radius_outset;
+ is_linear_coverage = 1.0;
+ } else {
+ radii = clamp(radii, pixellength, 2.0 - pixellength);
+ neighbor_radii = clamp(neighbor_radii, pixellength, 2.0 - pixellength);
+ vec2 spacing = (2.0 - radii) - neighbor_radii;
+ vec2 extra_pad = max(pixellength * 0.0625 - spacing, vec2(0.0));
+ radii -= extra_pad * 0.5;
+ }
+ vec2 aa_outset = aa_bloat_direction * aa_bloatradius;
+ vec2 vertexpos = (corner + radius_outset * radii) + aa_outset;
+ vec2 localcoord = (local_rect.xy * (1.0 - vertexpos) + local_rect.zw * (1.0 + vertexpos)) * 0.5;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localcoord, 1.0)).xy;
+ mat2 skewmatrix = mat2(skew.xy, skew.zw);
+ vec2 devcoord = vertexpos * skewmatrix + translate;
+ if (0.0 != is_linear_coverage) {
+ varccoord_Stage0.xy = vec2(0.0, coverage);
+ } else {
+ vec2 arccoord = (1.0 - abs(radius_outset)) + (aa_outset / radii) * corner;
+ varccoord_Stage0.xy = vec2(arccoord.x + 1.0, arccoord.y);
+ }
+ gl_Position = vec4(devcoord.x, devcoord.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/16-79.shader_test b/shaders/skia/16-79.shader_test
new file mode 100644
index 0000000..e1af831
--- /dev/null
+++ b/shaders/skia/16-79.shader_test
@@ -0,0 +1,137 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform float uSurfaceScale_Stage1;
+uniform vec3 uLightColor_Stage1;
+uniform float uKD_Stage1;
+uniform vec3 uLightLocation_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 light_Stage1(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ float colorScale = uKD_Stage1 * dot(normal, surfaceToLight);
+ return vec4(lightColor * clamp(colorScale, 0.0, 1.0), 1.0);
+}
+float sobel_Stage1(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage1(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage1(float m[9], float surfaceScale) {
+ return pointToNormal_Stage1(sobel_Stage1(m[0], m[2], m[3], m[5], m[6], m[8], 0.25), sobel_Stage1(m[0], m[6], m[1], m[7], m[2], m[8], 0.25), surfaceScale);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ vec2 coord = vTransformedCoords_0_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp0 = textureColor;
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp1 = textureColor;
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp2 = textureColor;
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp3 = textureColor;
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp4 = textureColor;
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp5 = textureColor;
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp6 = textureColor;
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp7 = textureColor;
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp8 = textureColor;
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = normalize(uLightLocation_Stage1 - vec3(gl_FragCoord.xy, uSurfaceScale_Stage1 * m[4]));
+ output_Stage1 = light_Stage1(normal_Stage1(m, uSurfaceScale_Stage1), surfaceToLight, uLightColor_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/16-8.shader_test b/shaders/skia/16-8.shader_test
new file mode 100644
index 0000000..4d81061
--- /dev/null
+++ b/shaders/skia/16-8.shader_test
@@ -0,0 +1,76 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform mat3 ucolorSpaceMatrix_Stage1_c0_c0;
+uniform vec3 ucolorSpaceTranslate_Stage1_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+uniform sampler2D uTextureSampler_2_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_1_Stage1, vTransformedCoords_1_Stage0) * _input;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c0_c0_c2_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_2_Stage1, vTransformedCoords_2_Stage0) * _input;
+ return _output;
+}
+vec4 YUVtoRGBEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 planes[3];
+ planes[0] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0));
+ planes[1] = TextureEffect_Stage1_c0_c0_c1_c0(vec4(1.0));
+ planes[2] = TextureEffect_Stage1_c0_c0_c2_c0(vec4(1.0));
+ vec4 color = vec4(planes[0].x, planes[1].y, planes[1].x, planes[2].w);
+ color.xyz = clamp(color.xyz * ucolorSpaceMatrix_Stage1_c0_c0 + ucolorSpaceTranslate_Stage1_c0_c0, 0.0, 1.0);
+ color.xyz *= color.w;
+ _output = color;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = YUVtoRGBEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/16-84.shader_test b/shaders/skia/16-84.shader_test
new file mode 100644
index 0000000..cf9adc6
--- /dev/null
+++ b/shaders/skia/16-84.shader_test
@@ -0,0 +1,87 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uCoordTransformMatrix_1_Stage0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+noperspective in float vcoverage_Stage0;
+vec4 TextureEffect_Stage1_c0_c0_c0_c0(vec4 _input, vec2 _coords) {
+ _coords = _coords * uCoordTransformMatrix_1_Stage0.xz + uCoordTransformMatrix_1_Stage0.yw;
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, _coords) * _input;
+ return _output;
+}
+vec4 Bicubic_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coord = vTransformedCoords_0_Stage0 - vec2(0.5);
+ vec2 f = fract(coord);
+ coord += 0.5 - f;
+ vec4 wx = mat4(0.055555555555555552, 0.88888888888888884, 0.055555555555555552, 0.0, -0.5, 0.0, 0.5, 0.0, 0.83333333333333337, -2.0, 1.5, -0.33333333333333331, -0.3888888888888889, 1.1666666666666667, -1.1666666666666667, 0.3888888888888889) * vec4(1.0, f.x, f.x * f.x, (f.x * f.x) * f.x);
+ vec4 wy = mat4(0.055555555555555552, 0.88888888888888884, 0.055555555555555552, 0.0, -0.5, 0.0, 0.5, 0.0, 0.83333333333333337, -2.0, 1.5, -0.33333333333333331, -0.3888888888888889, 1.1666666666666667, -1.1666666666666667, 0.3888888888888889) * vec4(1.0, f.y, f.y * f.y, (f.y * f.y) * f.y);
+ vec4 rowColors[4];
+ rowColors[0] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(-1.0, -1.0));
+ rowColors[1] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(0.0, -1.0));
+ rowColors[2] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(1.0, -1.0));
+ rowColors[3] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(2.0, -1.0));
+ vec4 s0 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ rowColors[0] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(-1.0, 0.0));
+ rowColors[1] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord);
+ rowColors[2] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(1.0, 0.0));
+ rowColors[3] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(2.0, 0.0));
+ vec4 s1 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ rowColors[0] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(-1.0, 1.0));
+ rowColors[1] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(0.0, 1.0));
+ rowColors[2] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(1.0, 1.0));
+ rowColors[3] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(2.0, 1.0));
+ vec4 s2 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ rowColors[0] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(-1.0, 2.0));
+ rowColors[1] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(0.0, 2.0));
+ rowColors[2] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(1.0, 2.0));
+ rowColors[3] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(2.0, 2.0));
+ vec4 s3 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ vec4 bicubicColor = ((wy.x * s0 + wy.y * s1) + wy.z * s2) + wy.w * s3;
+ bicubicColor.xyz = max(vec3(0.0), min(bicubicColor.xyz, bicubicColor.www));
+ _output = bicubicColor * _input;
+ return _output;
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ float coverage = vcoverage_Stage0;
+ outputCoverage_Stage0 = vec4(coverage);
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = Bicubic_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1 * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in float coverage;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+noperspective out float vcoverage_Stage0;
+void main() {
+ vec2 position = position;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ vcoverage_Stage0 = coverage;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/16-92.shader_test b/shaders/skia/16-92.shader_test
new file mode 100644
index 0000000..8a5f0bd
--- /dev/null
+++ b/shaders/skia/16-92.shader_test
@@ -0,0 +1,106 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform vec2 uBounds_Stage1;
+uniform vec4 uKernel_Stage1[5];
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0 - 8.0 * uImageIncrement_Stage1;
+ vec2 coordSampled = vec2(0.0, 0.0);
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[4].x;
+ coord += uImageIncrement_Stage1;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/16-95.shader_test b/shaders/skia/16-95.shader_test
new file mode 100644
index 0000000..24d0eb4
--- /dev/null
+++ b/shaders/skia/16-95.shader_test
@@ -0,0 +1,73 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform vec2 uBounds_Stage1;
+uniform vec4 uKernel_Stage1[2];
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0 - 3.0 * uImageIncrement_Stage1;
+ vec2 coordSampled = vec2(0.0, 0.0);
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage1.x && coord.y <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].x;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage1.x && coord.y <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].y;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage1.x && coord.y <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].z;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage1.x && coord.y <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].w;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage1.x && coord.y <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].x;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage1.x && coord.y <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].y;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage1.x && coord.y <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].z;
+ }
+ coord += uImageIncrement_Stage1;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/16.shader_test b/shaders/skia/16.shader_test
new file mode 100644
index 0000000..c7428fb
--- /dev/null
+++ b/shaders/skia/16.shader_test
@@ -0,0 +1,51 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uclamp_Stage1_c0_c0;
+uniform sampler2DRect uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 inCoord = vTransformedCoords_0_Stage0;
+ vec2 subsetCoord;
+ subsetCoord.x = inCoord.x;
+ subsetCoord.y = inCoord.y;
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage1_c0_c0.x, uclamp_Stage1_c0_c0.z);
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage1_c0_c0.y, uclamp_Stage1_c0_c0.w);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ _output = _input * textureColor;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TextureEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/160-2.shader_test b/shaders/skia/160-2.shader_test
new file mode 100644
index 0000000..7b544ee
--- /dev/null
+++ b/shaders/skia/160-2.shader_test
@@ -0,0 +1,78 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage2_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c1_c0;
+ }
+ return _output;
+}
+vec4 blend_src_atop(vec4 src, vec4 dst) {
+ return dst.w * src + (1.0 - src.w) * dst;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_src_atop(ConstColorProcessor_Stage2_c1_c0(vec4(1.0)), output_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/160-3.shader_test b/shaders/skia/160-3.shader_test
new file mode 100644
index 0000000..456424b
--- /dev/null
+++ b/shaders/skia/160-3.shader_test
@@ -0,0 +1,156 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform float uSurfaceScale_Stage1;
+uniform vec3 uLightColor_Stage1;
+uniform float uKS_Stage1;
+uniform float uShininess_Stage1;
+uniform vec3 uLightLocation_Stage1;
+uniform float uExponent_Stage1;
+uniform float uCosInnerConeAngle_Stage1;
+uniform float uCosOuterConeAngle_Stage1;
+uniform float uConeScale_Stage1;
+uniform vec3 uS_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 light_Stage1(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ vec3 halfDir = normalize(surfaceToLight + vec3(0.0, 0.0, 1.0));
+ float colorScale = uKS_Stage1 * pow(dot(normal, halfDir), uShininess_Stage1);
+ vec3 color = lightColor * clamp(colorScale, 0.0, 1.0);
+ return vec4(color, max(max(color.x, color.y), color.z));
+}
+float sobel_Stage1(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage1(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage1(float m[9], float surfaceScale) {
+ return pointToNormal_Stage1(sobel_Stage1(m[1], m[2], m[4], m[5], 0.0, 0.0, 0.66666698455810547), sobel_Stage1(0.0, 0.0, m[1], m[4], m[2], m[5], 0.66666698455810547), surfaceScale);
+}
+vec3 lightColor_Stage1(vec3 surfaceToLight) {
+ float cosAngle = -dot(surfaceToLight, uS_Stage1);
+ if (cosAngle < uCosOuterConeAngle_Stage1) {
+ return vec3(0.0);
+ }
+ float scale = pow(cosAngle, uExponent_Stage1);
+ if (cosAngle < uCosInnerConeAngle_Stage1) {
+ return ((uLightColor_Stage1 * scale) * (cosAngle - uCosOuterConeAngle_Stage1)) * uConeScale_Stage1;
+ }
+ return uLightColor_Stage1;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ vec2 coord = vTransformedCoords_0_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp0 = textureColor;
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp1 = textureColor;
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp2 = textureColor;
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp3 = textureColor;
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp4 = textureColor;
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp5 = textureColor;
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp6 = textureColor;
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp7 = textureColor;
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp8 = textureColor;
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = normalize(uLightLocation_Stage1 - vec3(gl_FragCoord.xy, uSurfaceScale_Stage1 * m[4]));
+ output_Stage1 = light_Stage1(normal_Stage1(m, uSurfaceScale_Stage1), surfaceToLight, lightColor_Stage1(surfaceToLight));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/160-4.shader_test b/shaders/skia/160-4.shader_test
new file mode 100644
index 0000000..e9feddf
--- /dev/null
+++ b/shaders/skia/160-4.shader_test
@@ -0,0 +1,98 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+uniform vec2 uDstTextureUpperLeft_Stage2;
+uniform vec2 uDstTextureCoordScale_Stage2;
+uniform sampler2D uTextureSampler_0_Stage0;
+uniform sampler2D uDstTextureSampler_Stage2;
+noperspective in vec2 vTextureCoords_Stage0;
+flat in int vTexIndex_Stage0;
+noperspective in vec4 vinColor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ t.x = fract(t.x);
+ }
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 blend_multiply(vec4 src, vec4 dst) {
+ return vec4(((1.0 - src.w) * dst.xyz + (1.0 - dst.w) * src.xyz) + src.xyz * dst.xyz, src.w + (1.0 - src.w) * dst.w);
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ vec4 texColor;
+ {
+ texColor = texture(uTextureSampler_0_Stage0, vTextureCoords_Stage0);
+ }
+ outputCoverage_Stage0 = texColor;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TiledGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ if (all(lessThanEqual(outputCoverage_Stage0.xyz, vec3(0.0)))) {
+ discard;
+ }
+ vec2 _dstTexCoord = (gl_FragCoord.xy - uDstTextureUpperLeft_Stage2) * uDstTextureCoordScale_Stage2;
+ _dstTexCoord.y = 1.0 - _dstTexCoord.y;
+ vec4 _dstColor = texture(uDstTextureSampler_Stage2, _dstTexCoord);
+ sk_FragColor = blend_multiply(output_Stage1, _dstColor);
+ float lerpRed = mix(_dstColor.w, sk_FragColor.w, outputCoverage_Stage0.x);
+ float lerpBlue = mix(_dstColor.w, sk_FragColor.w, outputCoverage_Stage0.y);
+ float lerpGreen = mix(_dstColor.w, sk_FragColor.w, outputCoverage_Stage0.z);
+ sk_FragColor = outputCoverage_Stage0 * sk_FragColor + (vec4(1.0) - outputCoverage_Stage0) * _dstColor;
+ sk_FragColor.w = max(max(lerpRed, lerpBlue), lerpGreen);
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform vec2 uAtlasSizeInv_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in uvec2 inTextureCoords;
+noperspective out vec2 vTextureCoords_Stage0;
+flat out int vTexIndex_Stage0;
+noperspective out vec4 vinColor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ ivec2 signedCoords = ivec2(int(inTextureCoords.x), int(inTextureCoords.y));
+ vec2 unormTexCoords = vec2(float(signedCoords.x / 2), float(signedCoords.y / 2));
+ vTextureCoords_Stage0 = unormTexCoords * uAtlasSizeInv_Stage0;
+ vTexIndex_Stage0 = 0;
+ vinColor_Stage0 = inColor;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(inPosition.x, inPosition.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/160-8.shader_test b/shaders/skia/160-8.shader_test
new file mode 100644
index 0000000..b2a4bbb
--- /dev/null
+++ b/shaders/skia/160-8.shader_test
@@ -0,0 +1,51 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec3 uedges_Stage2[3];
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ float alpha = 1.0;
+ float edge;
+ edge = dot(uedges_Stage2[0], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage2[1], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage2[2], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ output_Stage2 = output_Stage1 * alpha;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/160.shader_test b/shaders/skia/160.shader_test
new file mode 100644
index 0000000..18b1720
--- /dev/null
+++ b/shaders/skia/160.shader_test
@@ -0,0 +1,142 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage2;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.w) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ } else {
+ {
+ if (t < uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+vec4 ComposeOne_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_dst_in(_input, TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0)));
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = ComposeOne_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_dst_in(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ {
+ output_Stage2 = output_Stage1 * ucolor_Stage2;
+ }
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 inColor;
+in vec2 inLocalCoord;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1603.shader_test b/shaders/skia/1603.shader_test
new file mode 100644
index 0000000..aee75c4
--- /dev/null
+++ b/shaders/skia/1603.shader_test
@@ -0,0 +1,439 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 ucolor0_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 ucolor1_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 ucolor2_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 ucolor3_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 ucolor4_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 ucolor5_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec2 uImageIncrement_Stage1_c0_c0_c1_c0_c0_c0;
+uniform vec2 uBounds_Stage1_c0_c0_c1_c0_c0_c0;
+uniform vec4 uKernel_Stage1_c0_c0_c1_c0_c0_c0[6];
+uniform vec4 uinnerRect_Stage1_c0_c0_c1_c0_c1_c0;
+uniform vec4 uinvRadiiLTRB_Stage1_c0_c0_c1_c0_c1_c0;
+uniform vec2 uImageIncrement_Stage1_c1_c0;
+uniform float uSurfaceScale_Stage1_c1_c0;
+uniform vec3 uLightColor_Stage1_c1_c0;
+uniform float uKS_Stage1_c1_c0;
+uniform float uShininess_Stage1_c1_c0;
+uniform vec4 uTexDom_Stage1_c1_c0;
+uniform vec3 uDecalParams_Stage1_c1_c0;
+uniform vec3 uLightLocation_Stage1_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+uniform sampler2D uTextureSampler_2_Stage1;
+noperspective in vec4 vQuadEdge_Stage0;
+noperspective in vec4 vinColor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+vec4 ColorTableEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float nonZeroAlpha = max(_input.w, 9.9999997473787516e-05);
+ vec4 coord = vec4(_input.xyz / nonZeroAlpha, nonZeroAlpha);
+ coord = coord * 0.9960939884185791 + vec4(0.0019529999699443579, 0.0019529999699443579, 0.0019529999699443579, 0.0019529999699443579);
+ _output.w = texture(uTextureSampler_0_Stage1, vec2(coord.w, 0.125)).w;
+ _output.x = texture(uTextureSampler_0_Stage1, vec2(coord.x, 0.375)).w;
+ _output.y = texture(uTextureSampler_0_Stage1, vec2(coord.y, 0.625)).w;
+ _output.z = texture(uTextureSampler_0_Stage1, vec2(coord.z, 0.875)).w;
+ _output.xyz *= _output.w;
+ return _output;
+}
+vec4 Overdraw_Stage1_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = _input;
+ float alpha = 255.0 * _output.w;
+ if (alpha < 0.5) {
+ _output = ucolor0_Stage1_c0_c0_c0_c0_c1_c0;
+ } else if (alpha < 1.5) {
+ _output = ucolor1_Stage1_c0_c0_c0_c0_c1_c0;
+ } else if (alpha < 2.5) {
+ _output = ucolor2_Stage1_c0_c0_c0_c0_c1_c0;
+ } else if (alpha < 3.5) {
+ _output = ucolor3_Stage1_c0_c0_c0_c0_c1_c0;
+ } else if (alpha < 4.5) {
+ _output = ucolor4_Stage1_c0_c0_c0_c0_c1_c0;
+ } else {
+ _output = ucolor5_Stage1_c0_c0_c0_c0_c1_c0;
+ }
+ return _output;
+}
+float _guarded_divide(float n, float d) {
+ return n / d;
+}
+float _color_burn_component(float sc, float sa, float dc, float da) {
+ if (da == dc) {
+ return (sa * da + sc * (1.0 - da)) + dc * (1.0 - sa);
+ } else if (sc == 0.0) {
+ return dc * (1.0 - sa);
+ }
+ float d = max(0.0, da - _guarded_divide((da - dc) * sa, sc));
+ return (d * sa + sc * (1.0 - da)) + dc * (1.0 - sa);
+}
+vec4 blend_color_burn(vec4 src, vec4 dst) {
+ return vec4(_color_burn_component(src.x, src.w, dst.x, dst.w), _color_burn_component(src.y, src.w, dst.y, dst.w), _color_burn_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+}
+vec4 ComposeTwo_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_color_burn(ColorTableEffect_Stage1_c0_c0_c0_c0_c0_c0(inputColor), Overdraw_Stage1_c0_c0_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 GaussianConvolution_Stage1_c0_c0_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_1_Stage0 - 11.0 * uImageIncrement_Stage1_c0_c0_c1_c0_c0_c0;
+ vec2 coordSampled = vec2(0.0, 0.0);
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage1_c0_c0_c1_c0_c0_c0.x, uBounds_Stage1_c0_c0_c1_c0_c0_c0.y - uBounds_Stage1_c0_c0_c1_c0_c0_c0.x) + uBounds_Stage1_c0_c0_c1_c0_c0_c0.x;
+ _output += texture(uTextureSampler_1_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c1_c0_c0_c0[0].x;
+ coord += uImageIncrement_Stage1_c0_c0_c1_c0_c0_c0;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage1_c0_c0_c1_c0_c0_c0.x, uBounds_Stage1_c0_c0_c1_c0_c0_c0.y - uBounds_Stage1_c0_c0_c1_c0_c0_c0.x) + uBounds_Stage1_c0_c0_c1_c0_c0_c0.x;
+ _output += texture(uTextureSampler_1_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c1_c0_c0_c0[0].y;
+ coord += uImageIncrement_Stage1_c0_c0_c1_c0_c0_c0;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage1_c0_c0_c1_c0_c0_c0.x, uBounds_Stage1_c0_c0_c1_c0_c0_c0.y - uBounds_Stage1_c0_c0_c1_c0_c0_c0.x) + uBounds_Stage1_c0_c0_c1_c0_c0_c0.x;
+ _output += texture(uTextureSampler_1_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c1_c0_c0_c0[0].z;
+ coord += uImageIncrement_Stage1_c0_c0_c1_c0_c0_c0;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage1_c0_c0_c1_c0_c0_c0.x, uBounds_Stage1_c0_c0_c1_c0_c0_c0.y - uBounds_Stage1_c0_c0_c1_c0_c0_c0.x) + uBounds_Stage1_c0_c0_c1_c0_c0_c0.x;
+ _output += texture(uTextureSampler_1_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c1_c0_c0_c0[0].w;
+ coord += uImageIncrement_Stage1_c0_c0_c1_c0_c0_c0;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage1_c0_c0_c1_c0_c0_c0.x, uBounds_Stage1_c0_c0_c1_c0_c0_c0.y - uBounds_Stage1_c0_c0_c1_c0_c0_c0.x) + uBounds_Stage1_c0_c0_c1_c0_c0_c0.x;
+ _output += texture(uTextureSampler_1_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c1_c0_c0_c0[1].x;
+ coord += uImageIncrement_Stage1_c0_c0_c1_c0_c0_c0;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage1_c0_c0_c1_c0_c0_c0.x, uBounds_Stage1_c0_c0_c1_c0_c0_c0.y - uBounds_Stage1_c0_c0_c1_c0_c0_c0.x) + uBounds_Stage1_c0_c0_c1_c0_c0_c0.x;
+ _output += texture(uTextureSampler_1_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c1_c0_c0_c0[1].y;
+ coord += uImageIncrement_Stage1_c0_c0_c1_c0_c0_c0;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage1_c0_c0_c1_c0_c0_c0.x, uBounds_Stage1_c0_c0_c1_c0_c0_c0.y - uBounds_Stage1_c0_c0_c1_c0_c0_c0.x) + uBounds_Stage1_c0_c0_c1_c0_c0_c0.x;
+ _output += texture(uTextureSampler_1_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c1_c0_c0_c0[1].z;
+ coord += uImageIncrement_Stage1_c0_c0_c1_c0_c0_c0;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage1_c0_c0_c1_c0_c0_c0.x, uBounds_Stage1_c0_c0_c1_c0_c0_c0.y - uBounds_Stage1_c0_c0_c1_c0_c0_c0.x) + uBounds_Stage1_c0_c0_c1_c0_c0_c0.x;
+ _output += texture(uTextureSampler_1_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c1_c0_c0_c0[1].w;
+ coord += uImageIncrement_Stage1_c0_c0_c1_c0_c0_c0;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage1_c0_c0_c1_c0_c0_c0.x, uBounds_Stage1_c0_c0_c1_c0_c0_c0.y - uBounds_Stage1_c0_c0_c1_c0_c0_c0.x) + uBounds_Stage1_c0_c0_c1_c0_c0_c0.x;
+ _output += texture(uTextureSampler_1_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c1_c0_c0_c0[2].x;
+ coord += uImageIncrement_Stage1_c0_c0_c1_c0_c0_c0;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage1_c0_c0_c1_c0_c0_c0.x, uBounds_Stage1_c0_c0_c1_c0_c0_c0.y - uBounds_Stage1_c0_c0_c1_c0_c0_c0.x) + uBounds_Stage1_c0_c0_c1_c0_c0_c0.x;
+ _output += texture(uTextureSampler_1_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c1_c0_c0_c0[2].y;
+ coord += uImageIncrement_Stage1_c0_c0_c1_c0_c0_c0;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage1_c0_c0_c1_c0_c0_c0.x, uBounds_Stage1_c0_c0_c1_c0_c0_c0.y - uBounds_Stage1_c0_c0_c1_c0_c0_c0.x) + uBounds_Stage1_c0_c0_c1_c0_c0_c0.x;
+ _output += texture(uTextureSampler_1_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c1_c0_c0_c0[2].z;
+ coord += uImageIncrement_Stage1_c0_c0_c1_c0_c0_c0;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage1_c0_c0_c1_c0_c0_c0.x, uBounds_Stage1_c0_c0_c1_c0_c0_c0.y - uBounds_Stage1_c0_c0_c1_c0_c0_c0.x) + uBounds_Stage1_c0_c0_c1_c0_c0_c0.x;
+ _output += texture(uTextureSampler_1_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c1_c0_c0_c0[2].w;
+ coord += uImageIncrement_Stage1_c0_c0_c1_c0_c0_c0;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage1_c0_c0_c1_c0_c0_c0.x, uBounds_Stage1_c0_c0_c1_c0_c0_c0.y - uBounds_Stage1_c0_c0_c1_c0_c0_c0.x) + uBounds_Stage1_c0_c0_c1_c0_c0_c0.x;
+ _output += texture(uTextureSampler_1_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c1_c0_c0_c0[3].x;
+ coord += uImageIncrement_Stage1_c0_c0_c1_c0_c0_c0;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage1_c0_c0_c1_c0_c0_c0.x, uBounds_Stage1_c0_c0_c1_c0_c0_c0.y - uBounds_Stage1_c0_c0_c1_c0_c0_c0.x) + uBounds_Stage1_c0_c0_c1_c0_c0_c0.x;
+ _output += texture(uTextureSampler_1_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c1_c0_c0_c0[3].y;
+ coord += uImageIncrement_Stage1_c0_c0_c1_c0_c0_c0;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage1_c0_c0_c1_c0_c0_c0.x, uBounds_Stage1_c0_c0_c1_c0_c0_c0.y - uBounds_Stage1_c0_c0_c1_c0_c0_c0.x) + uBounds_Stage1_c0_c0_c1_c0_c0_c0.x;
+ _output += texture(uTextureSampler_1_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c1_c0_c0_c0[3].z;
+ coord += uImageIncrement_Stage1_c0_c0_c1_c0_c0_c0;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage1_c0_c0_c1_c0_c0_c0.x, uBounds_Stage1_c0_c0_c1_c0_c0_c0.y - uBounds_Stage1_c0_c0_c1_c0_c0_c0.x) + uBounds_Stage1_c0_c0_c1_c0_c0_c0.x;
+ _output += texture(uTextureSampler_1_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c1_c0_c0_c0[3].w;
+ coord += uImageIncrement_Stage1_c0_c0_c1_c0_c0_c0;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage1_c0_c0_c1_c0_c0_c0.x, uBounds_Stage1_c0_c0_c1_c0_c0_c0.y - uBounds_Stage1_c0_c0_c1_c0_c0_c0.x) + uBounds_Stage1_c0_c0_c1_c0_c0_c0.x;
+ _output += texture(uTextureSampler_1_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c1_c0_c0_c0[4].x;
+ coord += uImageIncrement_Stage1_c0_c0_c1_c0_c0_c0;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage1_c0_c0_c1_c0_c0_c0.x, uBounds_Stage1_c0_c0_c1_c0_c0_c0.y - uBounds_Stage1_c0_c0_c1_c0_c0_c0.x) + uBounds_Stage1_c0_c0_c1_c0_c0_c0.x;
+ _output += texture(uTextureSampler_1_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c1_c0_c0_c0[4].y;
+ coord += uImageIncrement_Stage1_c0_c0_c1_c0_c0_c0;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage1_c0_c0_c1_c0_c0_c0.x, uBounds_Stage1_c0_c0_c1_c0_c0_c0.y - uBounds_Stage1_c0_c0_c1_c0_c0_c0.x) + uBounds_Stage1_c0_c0_c1_c0_c0_c0.x;
+ _output += texture(uTextureSampler_1_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c1_c0_c0_c0[4].z;
+ coord += uImageIncrement_Stage1_c0_c0_c1_c0_c0_c0;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage1_c0_c0_c1_c0_c0_c0.x, uBounds_Stage1_c0_c0_c1_c0_c0_c0.y - uBounds_Stage1_c0_c0_c1_c0_c0_c0.x) + uBounds_Stage1_c0_c0_c1_c0_c0_c0.x;
+ _output += texture(uTextureSampler_1_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c1_c0_c0_c0[4].w;
+ coord += uImageIncrement_Stage1_c0_c0_c1_c0_c0_c0;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage1_c0_c0_c1_c0_c0_c0.x, uBounds_Stage1_c0_c0_c1_c0_c0_c0.y - uBounds_Stage1_c0_c0_c1_c0_c0_c0.x) + uBounds_Stage1_c0_c0_c1_c0_c0_c0.x;
+ _output += texture(uTextureSampler_1_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c1_c0_c0_c0[5].x;
+ coord += uImageIncrement_Stage1_c0_c0_c1_c0_c0_c0;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage1_c0_c0_c1_c0_c0_c0.x, uBounds_Stage1_c0_c0_c1_c0_c0_c0.y - uBounds_Stage1_c0_c0_c1_c0_c0_c0.x) + uBounds_Stage1_c0_c0_c1_c0_c0_c0.x;
+ _output += texture(uTextureSampler_1_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c1_c0_c0_c0[5].y;
+ coord += uImageIncrement_Stage1_c0_c0_c1_c0_c0_c0;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage1_c0_c0_c1_c0_c0_c0.x, uBounds_Stage1_c0_c0_c1_c0_c0_c0.y - uBounds_Stage1_c0_c0_c1_c0_c0_c0.x) + uBounds_Stage1_c0_c0_c1_c0_c0_c0.x;
+ _output += texture(uTextureSampler_1_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c1_c0_c0_c0[5].z;
+ coord += uImageIncrement_Stage1_c0_c0_c1_c0_c0_c0;
+ _output *= _input;
+ return _output;
+}
+vec4 EllipticalRRect_Stage1_c0_c0_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 dxy0 = uinnerRect_Stage1_c0_c0_c1_c0_c1_c0.xy - gl_FragCoord.xy;
+ vec2 dxy1 = gl_FragCoord.xy - uinnerRect_Stage1_c0_c0_c1_c0_c1_c0.zw;
+ vec2 dxy = max(max(dxy0, dxy1), 0.0);
+ vec2 Z = max(max(dxy0 * uinvRadiiLTRB_Stage1_c0_c0_c1_c0_c1_c0.xy, dxy1 * uinvRadiiLTRB_Stage1_c0_c0_c1_c0_c1_c0.zw), 0.0);
+ float implicit = dot(Z, dxy) - 1.0;
+ float grad_dot = 4.0 * dot(Z, Z);
+ grad_dot = max(grad_dot, 9.9999997473787516e-05);
+ float approx_dist = implicit * inversesqrt(grad_dot);
+ float alpha = clamp(0.5 - approx_dist, 0.0, 1.0);
+ _output = _input * alpha;
+ return _output;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 ComposeTwo_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_src_over(GaussianConvolution_Stage1_c0_c0_c1_c0_c0_c0(inputColor), EllipticalRRect_Stage1_c0_c0_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 blend_modulate(vec4 src, vec4 dst) {
+ return src * dst;
+}
+vec4 ComposeTwo_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_modulate(ComposeTwo_Stage1_c0_c0_c0_c0(inputColor), ComposeTwo_Stage1_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 light_Stage1_c1_c0(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ vec3 halfDir = normalize(surfaceToLight + vec3(0.0, 0.0, 1.0));
+ float colorScale = uKS_Stage1_c1_c0 * pow(dot(normal, halfDir), uShininess_Stage1_c1_c0);
+ vec3 color = lightColor * clamp(colorScale, 0.0, 1.0);
+ return vec4(color, max(max(color.x, color.y), color.z));
+}
+float sobel_Stage1_c1_c0(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage1_c1_c0(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage1_c1_c0(float m[9], float surfaceScale) {
+ return pointToNormal_Stage1_c1_c0(sobel_Stage1_c1_c0(m[0], m[2], m[3], m[5], m[6], m[8], 0.25), sobel_Stage1_c1_c0(m[0], m[6], m[1], m[7], m[2], m[8], 0.25), surfaceScale);
+}
+vec4 SpecularLighting_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coord = vTransformedCoords_2_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage1_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0.xy, uTexDom_Stage1_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp0 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0.xy, uTexDom_Stage1_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0.xy, uTexDom_Stage1_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage1_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0.xy, uTexDom_Stage1_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0.xy, uTexDom_Stage1_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0.xy, uTexDom_Stage1_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp5 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage1_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0.xy, uTexDom_Stage1_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp6 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage1_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0.xy, uTexDom_Stage1_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp7 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage1_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0.xy, uTexDom_Stage1_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp8 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = normalize(uLightLocation_Stage1_c1_c0 - vec3(gl_FragCoord.xy, uSurfaceScale_Stage1_c1_c0 * m[4]));
+ _output = light_Stage1_c1_c0(normal_Stage1_c1_c0(m, uSurfaceScale_Stage1_c1_c0), surfaceToLight, uLightColor_Stage1_c1_c0);
+ _output *= _input;
+ return _output;
+}
+vec4 blend_exclusion(vec4 src, vec4 dst) {
+ return vec4((dst.xyz + src.xyz) - (2.0 * dst.xyz) * src.xyz, src.w + (1.0 - src.w) * dst.w);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vinColor_Stage0;
+ float edgeAlpha;
+ vec2 duvdx = dFdx(vQuadEdge_Stage0.xy);
+ vec2 duvdy = -dFdy(vQuadEdge_Stage0.xy);
+ if (vQuadEdge_Stage0.z > 0.0 && vQuadEdge_Stage0.w > 0.0) {
+ edgeAlpha = min(min(vQuadEdge_Stage0.z, vQuadEdge_Stage0.w) + 0.5, 1.0);
+ } else {
+ vec2 gF = vec2((2.0 * vQuadEdge_Stage0.x) * duvdx.x - duvdx.y, (2.0 * vQuadEdge_Stage0.x) * duvdy.x - duvdy.y);
+ edgeAlpha = vQuadEdge_Stage0.x * vQuadEdge_Stage0.x - vQuadEdge_Stage0.y;
+ edgeAlpha = clamp(0.5 - edgeAlpha / length(gF), 0.0, 1.0);
+ }
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_exclusion(ComposeTwo_Stage1_c0_c0(inputColor), SpecularLighting_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ sk_FragColor = (1.0 - output_Stage1.w) * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec4 inQuadEdge;
+noperspective out vec4 vQuadEdge_Stage0;
+noperspective out vec4 vinColor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+void main() {
+ vQuadEdge_Stage0 = inQuadEdge;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1606.shader_test b/shaders/skia/1606.shader_test
new file mode 100644
index 0000000..64942a9
--- /dev/null
+++ b/shaders/skia/1606.shader_test
@@ -0,0 +1,127 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+uniform vec4 uinnerRect_Stage1;
+uniform vec2 uradiusPlusHalf_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec4 vcolor_Stage0;
+vec4 ColorTableEffect_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ float nonZeroAlpha = max(_input.w, 9.9999997473787516e-05);
+ vec4 coord = vec4(_input.xyz / nonZeroAlpha, nonZeroAlpha);
+ coord = coord * 0.9960939884185791 + vec4(0.0019529999699443579, 0.0019529999699443579, 0.0019529999699443579, 0.0019529999699443579);
+ _output.w = texture(uTextureSampler_0_Stage2, vec2(coord.w, 0.125)).w;
+ _output.x = texture(uTextureSampler_0_Stage2, vec2(coord.x, 0.375)).w;
+ _output.y = texture(uTextureSampler_0_Stage2, vec2(coord.y, 0.625)).w;
+ _output.z = texture(uTextureSampler_0_Stage2, vec2(coord.z, 0.875)).w;
+ _output.xyz *= _output.w;
+ return _output;
+}
+float _blend_color_luminance(vec3 color) {
+ return dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), color);
+}
+vec3 _blend_set_color_luminance(vec3 hueSatColor, float alpha, vec3 lumColor) {
+ float lum = _blend_color_luminance(lumColor);
+ vec3 result = (lum - _blend_color_luminance(hueSatColor)) + hueSatColor;
+ float minComp = min(min(result.x, result.y), result.z);
+ float maxComp = max(max(result.x, result.y), result.z);
+ if (minComp < 0.0 && lum != minComp) {
+ result = lum + ((result - lum) * lum) / (lum - minComp);
+ }
+ if (maxComp > alpha && maxComp != lum) {
+ return lum + ((result - lum) * (alpha - lum)) / (maxComp - lum);
+ }
+ return result;
+}
+vec4 blend_color(vec4 src, vec4 dst) {
+ float alpha = dst.w * src.w;
+ vec3 sda = src.xyz * dst.w;
+ vec3 dsa = dst.xyz * src.w;
+ return vec4((((_blend_set_color_luminance(sda, alpha, dsa) + dst.xyz) - dsa) + src.xyz) - sda, (src.w + dst.w) - alpha);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ vec2 dxy0 = uinnerRect_Stage1.xy - gl_FragCoord.xy;
+ vec2 dxy1 = gl_FragCoord.xy - uinnerRect_Stage1.zw;
+ vec2 dxy = max(max(dxy0, dxy1), 0.0);
+ float alpha = clamp(uradiusPlusHalf_Stage1.x - length(dxy), 0.0, 1.0);
+ alpha = 1.0 - alpha;
+ output_Stage1 = vec4(alpha);
+ }
+ {
+ blend_color(output_Stage1, ColorTableEffect_Stage2_c0_c0(vec4(1.0)));
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform float uSrcTF_Stage0[7];
+uniform mat3 uColorXform_Stage0;
+uniform float uDstTF_Stage0[7];
+uniform mat3 uViewM_Stage0;
+in vec2 position;
+in vec4 inColor;
+noperspective out vec4 vcolor_Stage0;
+float src_tf_Stage0(float x) {
+ float G = uSrcTF_Stage0[0];
+ float A = uSrcTF_Stage0[1];
+ float B = uSrcTF_Stage0[2];
+ float C = uSrcTF_Stage0[3];
+ float D = uSrcTF_Stage0[4];
+ float E = uSrcTF_Stage0[5];
+ float F = uSrcTF_Stage0[6];
+ float s = sign(x);
+ x = abs(x);
+ x = x < D ? C * x + F : pow(A * x + B, G) + E;
+ return s * x;
+}
+float dst_tf_Stage0(float x) {
+ float G = uDstTF_Stage0[0];
+ float A = uDstTF_Stage0[1];
+ float B = uDstTF_Stage0[2];
+ float C = uDstTF_Stage0[3];
+ float D = uDstTF_Stage0[4];
+ float E = uDstTF_Stage0[5];
+ float F = uDstTF_Stage0[6];
+ float s = sign(x);
+ x = abs(x);
+ x = x < D ? C * x + F : pow(A * x + B, G) + E;
+ return s * x;
+}
+vec4 gamut_xform_Stage0(vec4 color) {
+ color.xyz = uColorXform_Stage0 * color.xyz;
+ return color;
+}
+vec4 color_xform_Stage0(vec4 color) {
+ float nonZeroAlpha = max(color.w, 9.9999997473787516e-05);
+ color = vec4(color.xyz / nonZeroAlpha, nonZeroAlpha);
+ color.x = src_tf_Stage0(color.x);
+ color.y = src_tf_Stage0(color.y);
+ color.z = src_tf_Stage0(color.z);
+ color = gamut_xform_Stage0(color);
+ color.x = dst_tf_Stage0(color.x);
+ color.y = dst_tf_Stage0(color.y);
+ color.z = dst_tf_Stage0(color.z);
+ color.xyz *= color.w;
+ return color;
+}
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = color_xform_Stage0(color);
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_PointSize = 1.0;
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1609.shader_test b/shaders/skia/1609.shader_test
new file mode 100644
index 0000000..450b8e3
--- /dev/null
+++ b/shaders/skia/1609.shader_test
@@ -0,0 +1,43 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uColor_Stage0;
+noperspective in vec3 vDashParam_Stage0;
+noperspective in vec2 vCircleParams_Stage0;
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ float xShifted = vDashParam_Stage0.x - floor(vDashParam_Stage0.x / vDashParam_Stage0.z) * vDashParam_Stage0.z;
+ vec2 fragPosShifted = vec2(xShifted, vDashParam_Stage0.y);
+ vec2 center = vec2(vCircleParams_Stage0.y, 0.0);
+ float dist = length(center - fragPosShifted);
+ float alpha = 1.0;
+ alpha *= dist < vCircleParams_Stage0.x + 0.5 ? 1.0 : 0.0;
+ outputCoverage_Stage0 = vec4(alpha);
+ }
+ {
+ sk_FragColor = 1.0 - outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 inPosition;
+in vec3 inDashParams;
+in vec2 inCircleParams;
+noperspective out vec3 vDashParam_Stage0;
+noperspective out vec2 vCircleParams_Stage0;
+void main() {
+ vDashParam_Stage0 = inDashParams;
+ vCircleParams_Stage0 = inCircleParams;
+ vec2 pos2 = inPosition;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1618.shader_test b/shaders/skia/1618.shader_test
new file mode 100644
index 0000000..abfca07
--- /dev/null
+++ b/shaders/skia/1618.shader_test
@@ -0,0 +1,496 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform mat4 um_Stage1_c0_c0_c0_c0_c0_c0;
+uniform vec4 uv_Stage1_c0_c0_c0_c0_c0_c0;
+uniform vec4 urectUniform_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec2 uImageIncrement_Stage1_c0_c0_c1_c0_c0_c0;
+uniform float uSurfaceScale_Stage1_c0_c0_c1_c0_c0_c0;
+uniform vec3 uLightColor_Stage1_c0_c0_c1_c0_c0_c0;
+uniform float uKD_Stage1_c0_c0_c1_c0_c0_c0;
+uniform vec4 uTexDom_Stage1_c0_c0_c1_c0_c0_c0;
+uniform vec3 uDecalParams_Stage1_c0_c0_c1_c0_c0_c0;
+uniform vec3 uLightDirection_Stage1_c0_c0_c1_c0_c0_c0;
+uniform vec4 ucircle_Stage1_c0_c0_c1_c0_c1_c0;
+uniform vec4 uboundsUniform_Stage1_c1_c0_c0_c0_c0_c0;
+uniform float uxInvZoom_Stage1_c1_c0_c0_c0_c0_c0;
+uniform float uyInvZoom_Stage1_c1_c0_c0_c0_c0_c0;
+uniform float uxInvInset_Stage1_c1_c0_c0_c0_c0_c0;
+uniform float uyInvInset_Stage1_c1_c0_c0_c0_c0_c0;
+uniform vec2 uoffset_Stage1_c1_c0_c0_c0_c0_c0;
+uniform vec3 uedges_Stage1_c1_c0_c0_c0_c1_c0[4];
+uniform vec2 ubaseFrequency_Stage1_c1_c0_c1_c0_c0_c0;
+uniform float uz_Stage1_c1_c0_c1_c0_c0_c0;
+uniform float ucornerRadius_Stage1_c1_c0_c1_c0_c1_c0;
+uniform vec4 uproxyRect_Stage1_c1_c0_c1_c0_c1_c0;
+uniform float ublurRadius_Stage1_c1_c0_c1_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+uniform sampler2D uTextureSampler_2_Stage1;
+uniform sampler2D uTextureSampler_3_Stage1;
+uniform sampler2D uTextureSampler_4_Stage1;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+noperspective in float vinCoverage_Stage0;
+vec4 ColorMatrixFragmentProcessor_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = _input;
+ _output = um_Stage1_c0_c0_c0_c0_c0_c0 * inputColor + uv_Stage1_c0_c0_c0_c0_c0_c0;
+ {
+ _output.w = clamp(_output.w, 0.0, 1.0);
+ }
+ return _output;
+}
+vec4 AARectEffect_Stage1_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float alpha;
+ {
+ float xSub, ySub;
+ xSub = min(gl_FragCoord.x - urectUniform_Stage1_c0_c0_c0_c0_c1_c0.x, 0.0);
+ xSub += min(urectUniform_Stage1_c0_c0_c0_c0_c1_c0.z - gl_FragCoord.x, 0.0);
+ ySub = min(gl_FragCoord.y - urectUniform_Stage1_c0_c0_c0_c0_c1_c0.y, 0.0);
+ ySub += min(urectUniform_Stage1_c0_c0_c0_c0_c1_c0.w - gl_FragCoord.y, 0.0);
+ alpha = (1.0 + max(xSub, -1.0)) * (1.0 + max(ySub, -1.0));
+ }
+ {
+ alpha = 1.0 - alpha;
+ }
+ _output = _input * alpha;
+ return _output;
+}
+vec4 blend_multiply(vec4 src, vec4 dst) {
+ return vec4(((1.0 - src.w) * dst.xyz + (1.0 - dst.w) * src.xyz) + src.xyz * dst.xyz, src.w + (1.0 - src.w) * dst.w);
+}
+vec4 ComposeTwo_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_multiply(ColorMatrixFragmentProcessor_Stage1_c0_c0_c0_c0_c0_c0(inputColor), AARectEffect_Stage1_c0_c0_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 light_Stage1_c0_c0_c1_c0_c0_c0(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ float colorScale = uKD_Stage1_c0_c0_c1_c0_c0_c0 * dot(normal, surfaceToLight);
+ return vec4(lightColor * clamp(colorScale, 0.0, 1.0), 1.0);
+}
+float sobel_Stage1_c0_c0_c1_c0_c0_c0(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage1_c0_c0_c1_c0_c0_c0(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage1_c0_c0_c1_c0_c0_c0(float m[9], float surfaceScale) {
+ return pointToNormal_Stage1_c0_c0_c1_c0_c0_c0(sobel_Stage1_c0_c0_c1_c0_c0_c0(m[0], m[2], m[3], m[5], m[6], m[8], 0.25), sobel_Stage1_c0_c0_c1_c0_c0_c0(m[0], m[6], m[1], m[7], m[2], m[8], 0.25), surfaceScale);
+}
+vec4 DiffuseLighting_Stage1_c0_c0_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coord = vTransformedCoords_0_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage1_c0_c0_c1_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c1_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c1_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c1_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c1_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c1_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c1_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp0 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1_c0_c0_c1_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c1_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c1_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c1_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c1_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c1_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c1_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1_c0_c0_c1_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c1_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c1_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c1_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c1_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c1_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c1_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage1_c0_c0_c1_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c1_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c1_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c1_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c1_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c1_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c1_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c1_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c1_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c1_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c1_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c1_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c1_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1_c0_c0_c1_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c1_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c1_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c1_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c1_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c1_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c1_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp5 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage1_c0_c0_c1_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c1_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c1_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c1_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c1_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c1_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c1_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp6 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage1_c0_c0_c1_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c1_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c1_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c1_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c1_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c1_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c1_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp7 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage1_c0_c0_c1_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c1_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c1_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c1_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c1_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c1_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c1_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp8 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = uLightDirection_Stage1_c0_c0_c1_c0_c0_c0;
+ _output = light_Stage1_c0_c0_c1_c0_c0_c0(normal_Stage1_c0_c0_c1_c0_c0_c0(m, uSurfaceScale_Stage1_c0_c0_c1_c0_c0_c0), surfaceToLight, uLightColor_Stage1_c0_c0_c1_c0_c0_c0);
+ _output *= _input;
+ return _output;
+}
+vec4 CircleEffect_Stage1_c0_c0_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float d;
+ {
+ d = (length((ucircle_Stage1_c0_c0_c1_c0_c1_c0.xy - gl_FragCoord.xy) * ucircle_Stage1_c0_c0_c1_c0_c1_c0.w) - 1.0) * ucircle_Stage1_c0_c0_c1_c0_c1_c0.z;
+ }
+ {
+ _output = _input * clamp(d, 0.0, 1.0);
+ }
+ return _output;
+}
+float _blend_color_luminance(vec3 color) {
+ return dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), color);
+}
+vec3 _blend_set_color_luminance(vec3 hueSatColor, float alpha, vec3 lumColor) {
+ float lum = _blend_color_luminance(lumColor);
+ vec3 result = (lum - _blend_color_luminance(hueSatColor)) + hueSatColor;
+ float minComp = min(min(result.x, result.y), result.z);
+ float maxComp = max(max(result.x, result.y), result.z);
+ if (minComp < 0.0 && lum != minComp) {
+ result = lum + ((result - lum) * lum) / (lum - minComp);
+ }
+ if (maxComp > alpha && maxComp != lum) {
+ return lum + ((result - lum) * (alpha - lum)) / (maxComp - lum);
+ }
+ return result;
+}
+vec4 blend_luminosity(vec4 src, vec4 dst) {
+ float alpha = dst.w * src.w;
+ vec3 sda = src.xyz * dst.w;
+ vec3 dsa = dst.xyz * src.w;
+ return vec4((((_blend_set_color_luminance(dsa, alpha, sda) + dst.xyz) - dsa) + src.xyz) - sda, (src.w + dst.w) - alpha);
+}
+vec4 ComposeTwo_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_luminosity(DiffuseLighting_Stage1_c0_c0_c1_c0_c0_c0(inputColor), CircleEffect_Stage1_c0_c0_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 blend_darken(vec4 src, vec4 dst) {
+ vec4 result = blend_src_over(src, dst);
+ result.xyz = min(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
+ return result;
+}
+vec4 ComposeTwo_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_darken(ComposeTwo_Stage1_c0_c0_c0_c0(inputColor), ComposeTwo_Stage1_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 MagnifierEffect_Stage1_c1_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coord = vTransformedCoords_1_Stage0;
+ vec2 zoom_coord = uoffset_Stage1_c1_c0_c0_c0_c0_c0 + coord * vec2(uxInvZoom_Stage1_c1_c0_c0_c0_c0_c0, uyInvZoom_Stage1_c1_c0_c0_c0_c0_c0);
+ vec2 delta = (coord - uboundsUniform_Stage1_c1_c0_c0_c0_c0_c0.xy) * uboundsUniform_Stage1_c1_c0_c0_c0_c0_c0.zw;
+ delta = min(delta, vec2(1.0, 1.0) - delta);
+ delta *= vec2(uxInvInset_Stage1_c1_c0_c0_c0_c0_c0, uyInvInset_Stage1_c1_c0_c0_c0_c0_c0);
+ float weight = 0.0;
+ if (delta.x < 2.0 && delta.y < 2.0) {
+ delta = vec2(2.0, 2.0) - delta;
+ float dist = length(delta);
+ dist = max(2.0 - dist, 0.0);
+ weight = min(dist * dist, 1.0);
+ } else {
+ vec2 delta_squared = delta * delta;
+ weight = min(min(delta_squared.x, delta_squared.y), 1.0);
+ }
+ _output = texture(uTextureSampler_1_Stage1, mix(coord, zoom_coord, weight));
+ return _output;
+}
+vec4 ConvexPoly_Stage1_c1_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float alpha = 1.0;
+ float edge;
+ edge = dot(uedges_Stage1_c1_c0_c0_c0_c1_c0[0], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage1_c1_c0_c0_c0_c1_c0[1], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage1_c1_c0_c0_c0_c1_c0[2], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage1_c1_c0_c0_c0_c1_c0[3], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ _output = _input * alpha;
+ return _output;
+}
+float _blend_overlay_component(float sc, float sa, float dc, float da) {
+ if (2.0 * dc <= da) {
+ return (2.0 * sc) * dc;
+ }
+ return sa * da - (2.0 * (da - dc)) * (sa - sc);
+}
+vec4 blend_overlay(vec4 src, vec4 dst) {
+ vec4 result = vec4(_blend_overlay_component(src.x, src.w, dst.x, dst.w), _blend_overlay_component(src.y, src.w, dst.y, dst.w), _blend_overlay_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+ result.xyz += dst.xyz * (1.0 - src.w) + src.xyz * (1.0 - dst.w);
+ return result;
+}
+vec4 ComposeTwo_Stage1_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_overlay(MagnifierEffect_Stage1_c1_c0_c0_c0_c0_c0(inputColor), ConvexPoly_Stage1_c1_c0_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec3 fade_Stage1_c1_c0_c1_c0_c0_c0(vec3 t) {
+ return ((t * t) * t) * (t * (t * 6.0 - 15.0) + 10.0);
+}
+float perm_Stage1_c1_c0_c1_c0_c0_c0(float x) {
+ return texture(uTextureSampler_2_Stage1, vec2(fract(x / 256.0), 0.0)).x * 255.0;
+}
+float grad_Stage1_c1_c0_c1_c0_c0_c0(float x, vec3 p) {
+ return dot(texture(uTextureSampler_3_Stage1, vec2(fract(x / 16.0), 0.0)).xyz * 255.0 - vec3(1.0), p);
+}
+float lerp_Stage1_c1_c0_c1_c0_c0_c0(float a, float b, float w) {
+ return a + w * (b - a);
+}
+float noise_Stage1_c1_c0_c1_c0_c0_c0(vec3 p) {
+ vec3 P = mod(floor(p), 256.0);
+ p -= floor(p);
+ vec3 f = fade_Stage1_c1_c0_c1_c0_c0_c0(p);
+ float A = perm_Stage1_c1_c0_c1_c0_c0_c0(P.x) + P.y;
+ float AA = perm_Stage1_c1_c0_c1_c0_c0_c0(A) + P.z;
+ float AB = perm_Stage1_c1_c0_c1_c0_c0_c0(A + 1.0) + P.z;
+ float B = perm_Stage1_c1_c0_c1_c0_c0_c0(P.x + 1.0) + P.y;
+ float BA = perm_Stage1_c1_c0_c1_c0_c0_c0(B) + P.z;
+ float BB = perm_Stage1_c1_c0_c1_c0_c0_c0(B + 1.0) + P.z;
+ float result = lerp_Stage1_c1_c0_c1_c0_c0_c0(lerp_Stage1_c1_c0_c1_c0_c0_c0(lerp_Stage1_c1_c0_c1_c0_c0_c0(grad_Stage1_c1_c0_c1_c0_c0_c0(perm_Stage1_c1_c0_c1_c0_c0_c0(AA), p), grad_Stage1_c1_c0_c1_c0_c0_c0(perm_Stage1_c1_c0_c1_c0_c0_c0(BA), p + vec3(-1.0, 0.0, 0.0)), f.x), lerp_Stage1_c1_c0_c1_c0_c0_c0(grad_Stage1_c1_c0_c1_c0_c0_c0(perm_Stage1_c1_c0_c1_c0_c0_c0(AB), p + vec3(0.0, -1.0, 0.0)), grad_Stage1_c1_c0_c1_c0_c0_c0(perm_Stage1_c1_c0_c1_c0_c0_c0(BB), p + vec3(-1.0, -1.0, 0.0)), f.x), f.y), lerp_Stage1_c1_c0_c1_c0_c0_c0(lerp_Stage1_c1_c0_c1_c0_c0_c0(grad_Stage1_c1_c0_c1_c0_c0_c0(perm_Stage1_c1_c0_c1_c0_c0_c0(AA + 1.0), p + vec3(0.0, 0.0, -1.0)), grad_Stage1_c1_c0_c1_c0_c0_c0(perm_Stage1_c1_c0_c1_c0_c0_c0(BA + 1.0), p + vec3(-1.0, 0.0, -1.0)), f.x), lerp_Stage1_c1_c0_c1_c0_c0_c0(grad_Stage1_c1_c0_c1_c0_c0_c0(perm_Stage1_c1_c0_c1_c0_c0_c0(AB + 1.0), p + vec3(0.0, -1.0, -1.0)), grad_Stage1_c1_c0_c1_c0_c0_c0(perm_Stage1_c1_c0_c1_c0_c0_c0(BB + 1.0), p + vec3(-1.0, -1.0, -1.0)), f.x), f.y), f.z);
+ return result;
+}
+float noiseOctaves_Stage1_c1_c0_c1_c0_c0_c0(vec3 p) {
+ float result = 0.0;
+ float ratio = 1.0;
+ for (float i = 0.0;i < 5.0; i++) {
+ result += noise_Stage1_c1_c0_c1_c0_c0_c0(p) / ratio;
+ p *= 2.0;
+ ratio *= 2.0;
+ }
+ return (result + 1.0) / 2.0;
+}
+vec4 ImprovedPerlinNoise_Stage1_c1_c0_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coords = vTransformedCoords_2_Stage0 * ubaseFrequency_Stage1_c1_c0_c1_c0_c0_c0;
+ float r = noiseOctaves_Stage1_c1_c0_c1_c0_c0_c0(vec3(coords, uz_Stage1_c1_c0_c1_c0_c0_c0));
+ float g = noiseOctaves_Stage1_c1_c0_c1_c0_c0_c0(vec3(coords, uz_Stage1_c1_c0_c1_c0_c0_c0));
+ float b = noiseOctaves_Stage1_c1_c0_c1_c0_c0_c0(vec3(coords, uz_Stage1_c1_c0_c1_c0_c0_c0));
+ float a = noiseOctaves_Stage1_c1_c0_c1_c0_c0_c0(vec3(coords, uz_Stage1_c1_c0_c1_c0_c0_c0));
+ _output = vec4(r, g, b, a);
+ _output = clamp(_output, 0.0, 1.0);
+ _output = vec4(_output.xyz * _output.www, _output.w);
+ return _output;
+}
+vec4 RRectBlurEffect_Stage1_c1_c0_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 translatedFragPos = gl_FragCoord.xy - uproxyRect_Stage1_c1_c0_c1_c0_c1_c0.xy;
+ float threshold = ucornerRadius_Stage1_c1_c0_c1_c0_c1_c0 + 2.0 * ublurRadius_Stage1_c1_c0_c1_c0_c1_c0;
+ vec2 middle = (uproxyRect_Stage1_c1_c0_c1_c0_c1_c0.zw - uproxyRect_Stage1_c1_c0_c1_c0_c1_c0.xy) - 2.0 * threshold;
+ if (translatedFragPos.x >= threshold && translatedFragPos.x < middle.x + threshold) {
+ translatedFragPos.x = threshold;
+ } else if (translatedFragPos.x >= middle.x + threshold) {
+ translatedFragPos.x -= middle.x - 1.0;
+ }
+ if (translatedFragPos.y > threshold && translatedFragPos.y < middle.y + threshold) {
+ translatedFragPos.y = threshold;
+ } else if (translatedFragPos.y >= middle.y + threshold) {
+ translatedFragPos.y -= middle.y - 1.0;
+ }
+ vec2 proxyDims = vec2(2.0 * threshold + 1.0);
+ vec2 texCoord = translatedFragPos / proxyDims;
+ _output = _input * texture(uTextureSampler_4_Stage1, texCoord);
+ return _output;
+}
+vec4 blend_dst_over(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src + dst;
+}
+vec4 ComposeTwo_Stage1_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_dst_over(ImprovedPerlinNoise_Stage1_c1_c0_c1_c0_c0_c0(inputColor), RRectBlurEffect_Stage1_c1_c0_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 blend_src_atop(vec4 src, vec4 dst) {
+ return dst.w * src + (1.0 - src.w) * dst;
+}
+vec4 ComposeTwo_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_src_atop(ComposeTwo_Stage1_c1_c0_c0_c0(inputColor), ComposeTwo_Stage1_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+float _guarded_divide(float n, float d) {
+ return n / d;
+}
+float _color_burn_component(float sc, float sa, float dc, float da) {
+ if (da == dc) {
+ return (sa * da + sc * (1.0 - da)) + dc * (1.0 - sa);
+ } else if (sc == 0.0) {
+ return dc * (1.0 - sa);
+ }
+ float d = max(0.0, da - _guarded_divide((da - dc) * sa, sc));
+ return (d * sa + sc * (1.0 - da)) + dc * (1.0 - sa);
+}
+vec4 blend_color_burn(vec4 src, vec4 dst) {
+ return vec4(_color_burn_component(src.x, src.w, dst.x, dst.w), _color_burn_component(src.y, src.w, dst.y, dst.w), _color_burn_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ float alpha = 1.0;
+ alpha = vinCoverage_Stage0;
+ outputCoverage_Stage0 = vec4(alpha);
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_color_burn(ComposeTwo_Stage1_c0_c0(inputColor), ComposeTwo_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ sk_FragColor = output_Stage1 * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in float inCoverage;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+noperspective out float vinCoverage_Stage0;
+void main() {
+ vec4 color = inColor;
+ vcolor_Stage0 = color;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(inPosition, 1.0)).xy;
+ vinCoverage_Stage0 = inCoverage;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1621.shader_test b/shaders/skia/1621.shader_test
new file mode 100644
index 0000000..7b41ed1
--- /dev/null
+++ b/shaders/skia/1621.shader_test
@@ -0,0 +1,93 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uColor_Stage0;
+uniform float ucornerRadius_Stage1;
+uniform vec4 uproxyRect_Stage1;
+uniform float ublurRadius_Stage1;
+uniform vec4 urectUniform_Stage2;
+uniform vec4 ucolor_Stage3;
+uniform vec4 uboundsUniform_Stage4;
+uniform float uxInvZoom_Stage4;
+uniform float uyInvZoom_Stage4;
+uniform float uxInvInset_Stage4;
+uniform float uyInvInset_Stage4;
+uniform vec2 uoffset_Stage4;
+uniform vec4 uinnerRect_Stage5;
+uniform vec2 uinvRadiiXY_Stage5;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage4;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ {
+ vec2 translatedFragPos = gl_FragCoord.xy - uproxyRect_Stage1.xy;
+ float threshold = ucornerRadius_Stage1 + 2.0 * ublurRadius_Stage1;
+ vec2 middle = (uproxyRect_Stage1.zw - uproxyRect_Stage1.xy) - 2.0 * threshold;
+ if (translatedFragPos.x >= threshold && translatedFragPos.x < middle.x + threshold) {
+ translatedFragPos.x = threshold;
+ } else if (translatedFragPos.x >= middle.x + threshold) {
+ translatedFragPos.x -= middle.x - 1.0;
+ }
+ if (translatedFragPos.y > threshold && translatedFragPos.y < middle.y + threshold) {
+ translatedFragPos.y = threshold;
+ } else if (translatedFragPos.y >= middle.y + threshold) {
+ translatedFragPos.y -= middle.y - 1.0;
+ }
+ }
+ vec4 output_Stage4;
+ {
+ vec2 coord = vTransformedCoords_0_Stage0;
+ vec2 zoom_coord = uoffset_Stage4 + coord * vec2(uxInvZoom_Stage4, uyInvZoom_Stage4);
+ vec2 delta = (coord - uboundsUniform_Stage4.xy) * uboundsUniform_Stage4.zw;
+ delta = min(delta, vec2(1.0, 1.0) - delta);
+ delta *= vec2(uxInvInset_Stage4, uyInvInset_Stage4);
+ float weight = 0.0;
+ if (delta.x < 2.0 && delta.y < 2.0) {
+ delta = vec2(2.0, 2.0) - delta;
+ float dist = length(delta);
+ dist = max(2.0 - dist, 0.0);
+ weight = min(dist * dist, 1.0);
+ } else {
+ vec2 delta_squared = delta * delta;
+ weight = min(min(delta_squared.x, delta_squared.y), 1.0);
+ }
+ output_Stage4 = texture(uTextureSampler_0_Stage4, mix(coord, zoom_coord, weight));
+ }
+ vec4 output_Stage5;
+ {
+ vec2 dxy0 = uinnerRect_Stage5.xy - gl_FragCoord.xy;
+ vec2 dxy1 = gl_FragCoord.xy - uinnerRect_Stage5.zw;
+ vec2 dxy = max(max(dxy0, dxy1), 0.0);
+ vec2 Z = dxy * uinvRadiiXY_Stage5;
+ float implicit = dot(Z, dxy) - 1.0;
+ float grad_dot = 4.0 * dot(Z, Z);
+ grad_dot = max(grad_dot, 9.9999997473787516e-05);
+ float approx_dist = implicit * inversesqrt(grad_dot);
+ float alpha = clamp(0.5 + approx_dist, 0.0, 1.0);
+ output_Stage5 = output_Stage4 * alpha;
+ }
+ {
+ sk_FragColor = output_Stage5;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 inLocalCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec2 pos2 = position;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_PointSize = 1.0;
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1624.shader_test b/shaders/skia/1624.shader_test
new file mode 100644
index 0000000..fd32e3d
--- /dev/null
+++ b/shaders/skia/1624.shader_test
@@ -0,0 +1,318 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+uniform vec2 uImageIncrement_Stage1;
+uniform vec4 uKernel_Stage1[5];
+uniform vec2 uKernelOffset_Stage1;
+uniform float uGain_Stage1;
+uniform float uBias_Stage1;
+uniform vec4 uTexDom_Stage1;
+uniform vec4 uleftBorderColor_Stage2_c0_c0;
+uniform vec4 urightBorderColor_Stage2_c0_c0;
+uniform vec4 ustart_Stage2_c0_c0_c1_c0;
+uniform vec4 uend_Stage2_c0_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 LinearGradientLayout_Stage2_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_1_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage2_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage2_c0_c0_c1_c0 + t * uend_Stage2_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage2_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage2_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage2_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage2_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ vec4 sum = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0 - uKernelOffset_Stage1 * uImageIncrement_Stage1;
+ vec4 c;
+ {
+ float k = uKernel_Stage1[0].x;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[0].y;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[0].z;
+ {
+ vec2 origCoord = coord + vec2(2.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[0].w;
+ {
+ vec2 origCoord = coord + vec2(3.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[1].x;
+ {
+ vec2 origCoord = coord + vec2(4.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[1].y;
+ {
+ vec2 origCoord = coord + vec2(5.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[1].z;
+ {
+ vec2 origCoord = coord + vec2(6.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[1].w;
+ {
+ vec2 origCoord = coord + vec2(7.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[2].x;
+ {
+ vec2 origCoord = coord + vec2(8.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[2].y;
+ {
+ vec2 origCoord = coord + vec2(9.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[2].z;
+ {
+ vec2 origCoord = coord + vec2(10.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[2].w;
+ {
+ vec2 origCoord = coord + vec2(11.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[3].x;
+ {
+ vec2 origCoord = coord + vec2(12.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[3].y;
+ {
+ vec2 origCoord = coord + vec2(13.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[3].z;
+ {
+ vec2 origCoord = coord + vec2(14.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[3].w;
+ {
+ vec2 origCoord = coord + vec2(15.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[4].x;
+ {
+ vec2 origCoord = coord + vec2(16.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ vec2 origCoord = vTransformedCoords_0_Stage0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ output_Stage1.w = c.w;
+ output_Stage1.xyz = clamp(sum.xyz * uGain_Stage1 + uBias_Stage1, 0.0, 1.0);
+ output_Stage1.xyz *= output_Stage1.w;
+ }
+ {
+ blend_dst_in(output_Stage1, ClampedGradientEffect_Stage2_c0_c0(vec4(1.0)));
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vec4 color = inColor;
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1627.shader_test b/shaders/skia/1627.shader_test
new file mode 100644
index 0000000..8f7d896
--- /dev/null
+++ b/shaders/skia/1627.shader_test
@@ -0,0 +1,40 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform sampler2D uTextureSampler_0_Stage0;
+flat in vec4 vcolor_Stage0;
+noperspective in vec2 vlocalCoord_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ vec2 texCoord;
+ texCoord = vlocalCoord_Stage0;
+ outputColor_Stage0 = texture(uTextureSampler_0_Stage0, texCoord) * outputColor_Stage0;
+ outputColor_Stage0 = clamp(outputColor_Stage0, 0.0, 1.0);
+ }
+ {
+ sk_FragColor = outputColor_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+flat out vec4 vcolor_Stage0;
+noperspective out vec2 vlocalCoord_Stage0;
+void main() {
+ vcolor_Stage0 = color;
+ vlocalCoord_Stage0 = localCoord;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/163-2.shader_test b/shaders/skia/163-2.shader_test
new file mode 100644
index 0000000..c1717d5
--- /dev/null
+++ b/shaders/skia/163-2.shader_test
@@ -0,0 +1,82 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage2_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c1_c0;
+ }
+ return _output;
+}
+vec4 blend_src_atop(vec4 src, vec4 dst) {
+ return dst.w * src + (1.0 - src.w) * dst;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_src_atop(ConstColorProcessor_Stage2_c1_c0(vec4(1.0)), output_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/163-3.shader_test b/shaders/skia/163-3.shader_test
new file mode 100644
index 0000000..6bddc10
--- /dev/null
+++ b/shaders/skia/163-3.shader_test
@@ -0,0 +1,156 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform float uSurfaceScale_Stage1;
+uniform vec3 uLightColor_Stage1;
+uniform float uKS_Stage1;
+uniform float uShininess_Stage1;
+uniform vec3 uLightLocation_Stage1;
+uniform float uExponent_Stage1;
+uniform float uCosInnerConeAngle_Stage1;
+uniform float uCosOuterConeAngle_Stage1;
+uniform float uConeScale_Stage1;
+uniform vec3 uS_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 light_Stage1(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ vec3 halfDir = normalize(surfaceToLight + vec3(0.0, 0.0, 1.0));
+ float colorScale = uKS_Stage1 * pow(dot(normal, halfDir), uShininess_Stage1);
+ vec3 color = lightColor * clamp(colorScale, 0.0, 1.0);
+ return vec4(color, max(max(color.x, color.y), color.z));
+}
+float sobel_Stage1(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage1(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage1(float m[9], float surfaceScale) {
+ return pointToNormal_Stage1(sobel_Stage1(m[0], m[2], m[3], m[5], 0.0, 0.0, 0.33333298563957214), sobel_Stage1(m[0], m[3], m[1], m[4], m[2], m[5], 0.5), surfaceScale);
+}
+vec3 lightColor_Stage1(vec3 surfaceToLight) {
+ float cosAngle = -dot(surfaceToLight, uS_Stage1);
+ if (cosAngle < uCosOuterConeAngle_Stage1) {
+ return vec3(0.0);
+ }
+ float scale = pow(cosAngle, uExponent_Stage1);
+ if (cosAngle < uCosInnerConeAngle_Stage1) {
+ return ((uLightColor_Stage1 * scale) * (cosAngle - uCosOuterConeAngle_Stage1)) * uConeScale_Stage1;
+ }
+ return uLightColor_Stage1;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ vec2 coord = vTransformedCoords_0_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp0 = textureColor;
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp1 = textureColor;
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp2 = textureColor;
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp3 = textureColor;
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp4 = textureColor;
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp5 = textureColor;
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp6 = textureColor;
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp7 = textureColor;
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp8 = textureColor;
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = normalize(uLightLocation_Stage1 - vec3(gl_FragCoord.xy, uSurfaceScale_Stage1 * m[4]));
+ output_Stage1 = light_Stage1(normal_Stage1(m, uSurfaceScale_Stage1), surfaceToLight, lightColor_Stage1(surfaceToLight));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/163-4.shader_test b/shaders/skia/163-4.shader_test
new file mode 100644
index 0000000..8cbf60b
--- /dev/null
+++ b/shaders/skia/163-4.shader_test
@@ -0,0 +1,145 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+uniform vec2 uDstTextureUpperLeft_Stage2;
+uniform vec2 uDstTextureCoordScale_Stage2;
+uniform sampler2D uTextureSampler_0_Stage0;
+uniform sampler2D uDstTextureSampler_Stage2;
+noperspective in vec2 vTextureCoords_Stage0;
+flat in int vTexIndex_Stage0;
+noperspective in vec4 vinColor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ t.x = fract(t.x);
+ }
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+float _blend_color_saturation(vec3 color) {
+ return max(max(color.x, color.y), color.z) - min(min(color.x, color.y), color.z);
+}
+vec3 _blend_set_color_saturation_helper(vec3 minMidMax, float sat) {
+ if (minMidMax.x < minMidMax.z) {
+ return vec3(0.0, (sat * (minMidMax.y - minMidMax.x)) / (minMidMax.z - minMidMax.x), sat);
+ }
+ return vec3(0.0);
+}
+vec3 _blend_set_color_saturation(vec3 hueLumColor, vec3 satColor) {
+ float sat = _blend_color_saturation(satColor);
+ if (hueLumColor.x <= hueLumColor.y) {
+ if (hueLumColor.y <= hueLumColor.z) {
+ hueLumColor.xyz = _blend_set_color_saturation_helper(hueLumColor, sat);
+ } else if (hueLumColor.x <= hueLumColor.z) {
+ hueLumColor.xzy = _blend_set_color_saturation_helper(hueLumColor.xzy, sat);
+ } else {
+ hueLumColor.zxy = _blend_set_color_saturation_helper(hueLumColor.zxy, sat);
+ }
+ } else if (hueLumColor.x <= hueLumColor.z) {
+ hueLumColor.yxz = _blend_set_color_saturation_helper(hueLumColor.yxz, sat);
+ } else if (hueLumColor.y <= hueLumColor.z) {
+ hueLumColor.yzx = _blend_set_color_saturation_helper(hueLumColor.yzx, sat);
+ } else {
+ hueLumColor.zyx = _blend_set_color_saturation_helper(hueLumColor.zyx, sat);
+ }
+ return hueLumColor;
+}
+float _blend_color_luminance(vec3 color) {
+ return dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), color);
+}
+vec3 _blend_set_color_luminance(vec3 hueSatColor, float alpha, vec3 lumColor) {
+ float lum = _blend_color_luminance(lumColor);
+ vec3 result = (lum - _blend_color_luminance(hueSatColor)) + hueSatColor;
+ float minComp = min(min(result.x, result.y), result.z);
+ float maxComp = max(max(result.x, result.y), result.z);
+ if (minComp < 0.0 && lum != minComp) {
+ result = lum + ((result - lum) * lum) / (lum - minComp);
+ }
+ if (maxComp > alpha && maxComp != lum) {
+ return lum + ((result - lum) * (alpha - lum)) / (maxComp - lum);
+ }
+ return result;
+}
+vec4 blend_hue(vec4 src, vec4 dst) {
+ float alpha = dst.w * src.w;
+ vec3 sda = src.xyz * dst.w;
+ vec3 dsa = dst.xyz * src.w;
+ return vec4((((_blend_set_color_luminance(_blend_set_color_saturation(sda, dsa), alpha, dsa) + dst.xyz) - dsa) + src.xyz) - sda, (src.w + dst.w) - alpha);
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ vec4 texColor;
+ {
+ texColor = texture(uTextureSampler_0_Stage0, vTextureCoords_Stage0);
+ }
+ outputCoverage_Stage0 = texColor;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TiledGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ if (all(lessThanEqual(outputCoverage_Stage0.xyz, vec3(0.0)))) {
+ discard;
+ }
+ vec2 _dstTexCoord = (gl_FragCoord.xy - uDstTextureUpperLeft_Stage2) * uDstTextureCoordScale_Stage2;
+ _dstTexCoord.y = 1.0 - _dstTexCoord.y;
+ vec4 _dstColor = texture(uDstTextureSampler_Stage2, _dstTexCoord);
+ sk_FragColor = blend_hue(output_Stage1, _dstColor);
+ float lerpRed = mix(_dstColor.w, sk_FragColor.w, outputCoverage_Stage0.x);
+ float lerpBlue = mix(_dstColor.w, sk_FragColor.w, outputCoverage_Stage0.y);
+ float lerpGreen = mix(_dstColor.w, sk_FragColor.w, outputCoverage_Stage0.z);
+ sk_FragColor = outputCoverage_Stage0 * sk_FragColor + (vec4(1.0) - outputCoverage_Stage0) * _dstColor;
+ sk_FragColor.w = max(max(lerpRed, lerpBlue), lerpGreen);
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform vec2 uAtlasSizeInv_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in uvec2 inTextureCoords;
+noperspective out vec2 vTextureCoords_Stage0;
+flat out int vTexIndex_Stage0;
+noperspective out vec4 vinColor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ ivec2 signedCoords = ivec2(int(inTextureCoords.x), int(inTextureCoords.y));
+ vec2 unormTexCoords = vec2(float(signedCoords.x / 2), float(signedCoords.y / 2));
+ vTextureCoords_Stage0 = unormTexCoords * uAtlasSizeInv_Stage0;
+ vTexIndex_Stage0 = 0;
+ vinColor_Stage0 = inColor;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(inPosition.x, inPosition.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/163-7.shader_test b/shaders/skia/163-7.shader_test
new file mode 100644
index 0000000..348eb09
--- /dev/null
+++ b/shaders/skia/163-7.shader_test
@@ -0,0 +1,27 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uColor_Stage0;
+void main() {
+ {
+ sk_FragColor = 1.0 - vec4(1.0);
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 inPosition;
+in vec2 inLocalCoord;
+void main() {
+ vec3 pos3 = uViewM_Stage0 * vec3(inPosition, 1.0);
+ gl_Position = vec4(pos3.x, pos3.y, 0.0, pos3.z);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/163-8.shader_test b/shaders/skia/163-8.shader_test
new file mode 100644
index 0000000..d213580
--- /dev/null
+++ b/shaders/skia/163-8.shader_test
@@ -0,0 +1,58 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec3 uedges_Stage2[5];
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ float alpha = 1.0;
+ float edge;
+ edge = dot(uedges_Stage2[0], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage2[1], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage2[2], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage2[3], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage2[4], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ alpha = 1.0 - alpha;
+ output_Stage2 = output_Stage1 * alpha;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/163.shader_test b/shaders/skia/163.shader_test
new file mode 100644
index 0000000..bf78b69
--- /dev/null
+++ b/shaders/skia/163.shader_test
@@ -0,0 +1,71 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 ucolor_Stage1_c0_c0_c0_c0;
+uniform vec4 ucolor_Stage2;
+noperspective in vec4 vcolor_Stage0;
+vec4 ConstColorProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = _input.w * ucolor_Stage1_c0_c0_c0_c0;
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = ConstColorProcessor_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_dst_in(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ {
+ output_Stage2 = output_Stage1 * ucolor_Stage2;
+ }
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 position;
+in vec4 inColor;
+noperspective out vec4 vcolor_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1630.shader_test b/shaders/skia/1630.shader_test
new file mode 100644
index 0000000..1c21ee3
--- /dev/null
+++ b/shaders/skia/1630.shader_test
@@ -0,0 +1,184 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uinnerRect_Stage1_c0_c0_c0_c0_c0_c0;
+uniform vec2 uradiusPlusHalf_Stage1_c0_c0_c0_c0_c0_c0;
+uniform vec4 uinnerRect_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec2 uradiusPlusHalf_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 ucircle_Stage1_c0_c0_c1_c0;
+uniform mat4 um_Stage1_c1_c0;
+uniform vec4 uv_Stage1_c1_c0;
+noperspective in vec2 vEllipseOffsets0_Stage0;
+noperspective in vec2 vEllipseOffsets1_Stage0;
+noperspective in vec4 vinColor_Stage0;
+vec4 CircularRRect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 dxy0 = uinnerRect_Stage1_c0_c0_c0_c0_c0_c0.xy - gl_FragCoord.xy;
+ vec2 dxy1 = gl_FragCoord.xy - uinnerRect_Stage1_c0_c0_c0_c0_c0_c0.zw;
+ vec2 dxy = max(max(dxy0, dxy1), 0.0);
+ float alpha = clamp(uradiusPlusHalf_Stage1_c0_c0_c0_c0_c0_c0.x - length(dxy), 0.0, 1.0);
+ _output = _input * alpha;
+ return _output;
+}
+vec4 CircularRRect_Stage1_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 dxy0 = uinnerRect_Stage1_c0_c0_c0_c0_c1_c0.xy - gl_FragCoord.xy;
+ vec2 dxy1 = gl_FragCoord.xy - uinnerRect_Stage1_c0_c0_c0_c0_c1_c0.zw;
+ vec2 dxy = max(max(dxy0, dxy1), 0.0);
+ float alpha = clamp(uradiusPlusHalf_Stage1_c0_c0_c0_c0_c1_c0.x - length(dxy), 0.0, 1.0);
+ _output = _input * alpha;
+ return _output;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 blend_darken(vec4 src, vec4 dst) {
+ vec4 result = blend_src_over(src, dst);
+ result.xyz = min(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
+ return result;
+}
+vec4 ComposeTwo_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_darken(CircularRRect_Stage1_c0_c0_c0_c0_c0_c0(inputColor), CircularRRect_Stage1_c0_c0_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 CircleEffect_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float d;
+ {
+ d = (length((ucircle_Stage1_c0_c0_c1_c0.xy - gl_FragCoord.xy) * ucircle_Stage1_c0_c0_c1_c0.w) - 1.0) * ucircle_Stage1_c0_c0_c1_c0.z;
+ }
+ {
+ _output = _input * clamp(d, 0.0, 1.0);
+ }
+ return _output;
+}
+vec4 blend_src_atop(vec4 src, vec4 dst) {
+ return dst.w * src + (1.0 - src.w) * dst;
+}
+vec4 ComposeTwo_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_src_atop(ComposeTwo_Stage1_c0_c0_c0_c0(inputColor), CircleEffect_Stage1_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 ColorMatrixFragmentProcessor_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = _input;
+ {
+ float nonZeroAlpha = max(inputColor.w, 9.9999997473787516e-05);
+ inputColor = vec4(inputColor.xyz / nonZeroAlpha, inputColor.w);
+ }
+ _output = um_Stage1_c1_c0 * inputColor + uv_Stage1_c1_c0;
+ {
+ _output = clamp(_output, 0.0, 1.0);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+float _blend_color_saturation(vec3 color) {
+ return max(max(color.x, color.y), color.z) - min(min(color.x, color.y), color.z);
+}
+vec3 _blend_set_color_saturation_helper(vec3 minMidMax, float sat) {
+ if (minMidMax.x < minMidMax.z) {
+ return vec3(0.0, (sat * (minMidMax.y - minMidMax.x)) / (minMidMax.z - minMidMax.x), sat);
+ }
+ return vec3(0.0);
+}
+vec3 _blend_set_color_saturation(vec3 hueLumColor, vec3 satColor) {
+ float sat = _blend_color_saturation(satColor);
+ if (hueLumColor.x <= hueLumColor.y) {
+ if (hueLumColor.y <= hueLumColor.z) {
+ hueLumColor.xyz = _blend_set_color_saturation_helper(hueLumColor, sat);
+ } else if (hueLumColor.x <= hueLumColor.z) {
+ hueLumColor.xzy = _blend_set_color_saturation_helper(hueLumColor.xzy, sat);
+ } else {
+ hueLumColor.zxy = _blend_set_color_saturation_helper(hueLumColor.zxy, sat);
+ }
+ } else if (hueLumColor.x <= hueLumColor.z) {
+ hueLumColor.yxz = _blend_set_color_saturation_helper(hueLumColor.yxz, sat);
+ } else if (hueLumColor.y <= hueLumColor.z) {
+ hueLumColor.yzx = _blend_set_color_saturation_helper(hueLumColor.yzx, sat);
+ } else {
+ hueLumColor.zyx = _blend_set_color_saturation_helper(hueLumColor.zyx, sat);
+ }
+ return hueLumColor;
+}
+float _blend_color_luminance(vec3 color) {
+ return dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), color);
+}
+vec3 _blend_set_color_luminance(vec3 hueSatColor, float alpha, vec3 lumColor) {
+ float lum = _blend_color_luminance(lumColor);
+ vec3 result = (lum - _blend_color_luminance(hueSatColor)) + hueSatColor;
+ float minComp = min(min(result.x, result.y), result.z);
+ float maxComp = max(max(result.x, result.y), result.z);
+ if (minComp < 0.0 && lum != minComp) {
+ result = lum + ((result - lum) * lum) / (lum - minComp);
+ }
+ if (maxComp > alpha && maxComp != lum) {
+ return lum + ((result - lum) * (alpha - lum)) / (maxComp - lum);
+ }
+ return result;
+}
+vec4 blend_saturation(vec4 src, vec4 dst) {
+ float alpha = dst.w * src.w;
+ vec3 sda = src.xyz * dst.w;
+ vec3 dsa = dst.xyz * src.w;
+ return vec4((((_blend_set_color_luminance(_blend_set_color_saturation(dsa, sda), alpha, dsa) + dst.xyz) - dsa) + src.xyz) - sda, (src.w + dst.w) - alpha);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vinColor_Stage0;
+ vec2 scaledOffset = vEllipseOffsets0_Stage0;
+ float test = dot(scaledOffset, scaledOffset) - 1.0;
+ vec2 duvdx = dFdx(vEllipseOffsets0_Stage0);
+ vec2 duvdy = dFdy(vEllipseOffsets0_Stage0);
+ vec2 grad = vec2(vEllipseOffsets0_Stage0.x * duvdx.x + vEllipseOffsets0_Stage0.y * duvdx.y, vEllipseOffsets0_Stage0.x * duvdy.x + vEllipseOffsets0_Stage0.y * duvdy.y);
+ float grad_dot = 4.0 * dot(grad, grad);
+ grad_dot = max(grad_dot, 1.1754999560161448e-38);
+ float invlen = inversesqrt(grad_dot);
+ float edgeAlpha = clamp(0.5 - test * invlen, 0.0, 1.0);
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_saturation(ComposeTwo_Stage1_c0_c0(inputColor), ColorMatrixFragmentProcessor_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ sk_FragColor = output_Stage1 * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 inPosition;
+in vec4 inColor;
+in vec2 inEllipseOffsets0;
+in vec2 inEllipseOffsets1;
+noperspective out vec2 vEllipseOffsets0_Stage0;
+noperspective out vec2 vEllipseOffsets1_Stage0;
+noperspective out vec4 vinColor_Stage0;
+void main() {
+ vEllipseOffsets0_Stage0 = inEllipseOffsets0;
+ vEllipseOffsets1_Stage0 = inEllipseOffsets1;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = inPosition;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1633.shader_test b/shaders/skia/1633.shader_test
new file mode 100644
index 0000000..0aa5f9f
--- /dev/null
+++ b/shaders/skia/1633.shader_test
@@ -0,0 +1,333 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uCoordTransformMatrix_1_Stage0;
+uniform float uPixelSize_Stage1_c0_c0;
+uniform vec2 uRange_Stage1_c0_c0;
+uniform float uPixelSize_Stage2;
+uniform vec2 uRange_Stage2;
+uniform vec2 uImageIncrement_Stage3;
+uniform float uSurfaceScale_Stage3;
+uniform vec3 uLightColor_Stage3;
+uniform float uKD_Stage3;
+uniform vec4 uTexDom_Stage3;
+uniform vec3 uDecalParams_Stage3;
+uniform vec3 uLightDirection_Stage3;
+uniform vec4 urectH_Stage4;
+uniform float uinvSixSigma_Stage4;
+uniform vec4 uinnerRect_Stage5;
+uniform vec2 uradiusPlusHalf_Stage5;
+uniform vec4 ucircleData_Stage6_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+uniform sampler2D uTextureSampler_0_Stage3;
+uniform sampler2D uTextureSampler_0_Stage4;
+uniform sampler2D uTextureSampler_0_Stage6;
+in vec2 vTextureCoords_Stage0;
+flat in int vTexIndex_Stage0;
+in vec2 vIntTextureCoords_Stage0;
+in vec4 vinColor_Stage0;
+in vec2 vTransformedCoords_0_Stage0;
+in vec2 vTransformedCoords_2_Stage0;
+in vec2 vTransformedCoords_3_Stage0;
+vec4 Morphology_Stage1_c0_c0(vec4 _input, vec2 _coords) {
+ _coords = _coords * uCoordTransformMatrix_1_Stage0.xz + uCoordTransformMatrix_1_Stage0.yw;
+ vec4 _output;
+ _output = vec4(1.0, 1.0, 1.0, 1.0);
+ vec2 coord = _coords;
+ coord.x -= 7.0 * uPixelSize_Stage1_c0_c0;
+ for (int i = 0;i < 15; i++) {
+ _output = min(_output, texture(uTextureSampler_0_Stage1, coord));
+ coord.x += uPixelSize_Stage1_c0_c0;
+ }
+ _output *= _input;
+ return _output;
+}
+vec4 light_Stage3(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ float colorScale = uKD_Stage3 * dot(normal, surfaceToLight);
+ return vec4(lightColor * clamp(colorScale, 0.0, 1.0), 1.0);
+}
+float sobel_Stage3(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage3(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage3(float m[9], float surfaceScale) {
+ return pointToNormal_Stage3(sobel_Stage3(m[0], m[2], m[3], m[5], 0.0, 0.0, 0.33333298563957214), sobel_Stage3(m[0], m[3], m[1], m[4], m[2], m[5], 0.5), surfaceScale);
+}
+vec4 CircleBlurFragmentProcessor_Stage6_c1_c0(vec4 _input, vec2 _coords) {
+ vec4 _output;
+ vec2 vec = vec2((gl_FragCoord.x - ucircleData_Stage6_c1_c0.x) * ucircleData_Stage6_c1_c0.w, (gl_FragCoord.y - ucircleData_Stage6_c1_c0.y) * ucircleData_Stage6_c1_c0.w);
+ float dist = length(vec) + (0.5 - ucircleData_Stage6_c1_c0.z) * ucircleData_Stage6_c1_c0.w;
+ _output = _input * texture(uTextureSampler_0_Stage6, vec2(dist, 0.5)).w;
+ return _output;
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ vec2 uv = vTextureCoords_Stage0;
+ vec4 texColor;
+ {
+ texColor = texture(uTextureSampler_0_Stage0, uv);
+ }
+ float distance = 7.96875 * (texColor.x - 0.50196081399917603);
+ float afwidth;
+ vec2 dist_grad = vec2(dFdx(distance), -dFdy(distance));
+ float dg_len2 = dot(dist_grad, dist_grad);
+ if (dg_len2 < 9.9999997473787516e-05) {
+ dist_grad = vec2(0.70709997415542603, 0.70709997415542603);
+ } else {
+ dist_grad = dist_grad * inversesqrt(dg_len2);
+ }
+ vec2 Jdx = dFdx(vIntTextureCoords_Stage0);
+ vec2 Jdy = -dFdy(vIntTextureCoords_Stage0);
+ vec2 grad = vec2(dist_grad.x * Jdx.x + dist_grad.y * Jdy.x, dist_grad.x * Jdx.y + dist_grad.y * Jdy.y);
+ afwidth = 0.64999997615814209 * length(grad);
+ float val = smoothstep(-afwidth, afwidth, distance);
+ outputCoverage_Stage0 = vec4(val);
+ }
+ vec4 output_Stage1;
+ {
+ float coord = vTransformedCoords_0_Stage0.y - 0.5;
+ float f = fract(coord);
+ coord += 0.5 - f;
+ float f2 = f * f;
+ vec4 w = mat4(0.055555555555555552, 0.88888888888888884, 0.055555555555555552, 0.0, -0.5, 0.0, 0.5, 0.0, 0.83333333333333337, -2.0, 1.5, -0.33333333333333331, -0.3888888888888889, 1.1666666666666667, -1.1666666666666667, 0.3888888888888889) * vec4(1.0, f, f2, f2 * f);
+ vec4 c[4];
+ c[0] = Morphology_Stage1_c0_c0(vec4(1.0), vec2(vTransformedCoords_0_Stage0.x, coord + -1.0));
+ c[1] = Morphology_Stage1_c0_c0(vec4(1.0), vec2(vTransformedCoords_0_Stage0.x, coord));
+ c[2] = Morphology_Stage1_c0_c0(vec4(1.0), vec2(vTransformedCoords_0_Stage0.x, coord + 1.0));
+ c[3] = Morphology_Stage1_c0_c0(vec4(1.0), vec2(vTransformedCoords_0_Stage0.x, coord + 2.0));
+ vec4 bicubicColor = ((c[0] * w.x + c[1] * w.y) + c[2] * w.z) + c[3] * w.w;
+ bicubicColor = clamp(bicubicColor, 0.0, 1.0);
+ output_Stage1 = bicubicColor * outputCoverage_Stage0;
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_2_Stage0;
+ coord.y -= 6.0 * uPixelSize_Stage2;
+ for (int i = 0;i < 13; i++) {
+ output_Stage2 = max(output_Stage2, texture(uTextureSampler_0_Stage2, coord));
+ coord.y += uPixelSize_Stage2;
+ }
+ output_Stage2 *= output_Stage1;
+ }
+ vec4 output_Stage3;
+ {
+ vec2 coord = vTransformedCoords_3_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage3;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage3.xy, uTexDom_Stage3.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage3, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage3.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage3.y);
+ if (err > uDecalParams_Stage3.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage3.z < 1.0) {
+ err = 0.0;
+ }
+ temp0 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage3;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage3.xy, uTexDom_Stage3.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage3, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage3.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage3.y);
+ if (err > uDecalParams_Stage3.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage3.z < 1.0) {
+ err = 0.0;
+ }
+ temp1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage3;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage3.xy, uTexDom_Stage3.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage3, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage3.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage3.y);
+ if (err > uDecalParams_Stage3.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage3.z < 1.0) {
+ err = 0.0;
+ }
+ temp2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage3;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage3.xy, uTexDom_Stage3.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage3, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage3.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage3.y);
+ if (err > uDecalParams_Stage3.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage3.z < 1.0) {
+ err = 0.0;
+ }
+ temp3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage3.xy, uTexDom_Stage3.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage3, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage3.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage3.y);
+ if (err > uDecalParams_Stage3.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage3.z < 1.0) {
+ err = 0.0;
+ }
+ temp4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage3;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage3.xy, uTexDom_Stage3.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage3, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage3.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage3.y);
+ if (err > uDecalParams_Stage3.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage3.z < 1.0) {
+ err = 0.0;
+ }
+ temp5 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage3;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage3.xy, uTexDom_Stage3.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage3, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage3.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage3.y);
+ if (err > uDecalParams_Stage3.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage3.z < 1.0) {
+ err = 0.0;
+ }
+ temp6 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage3;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage3.xy, uTexDom_Stage3.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage3, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage3.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage3.y);
+ if (err > uDecalParams_Stage3.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage3.z < 1.0) {
+ err = 0.0;
+ }
+ temp7 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage3;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage3.xy, uTexDom_Stage3.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage3, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage3.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage3.y);
+ if (err > uDecalParams_Stage3.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage3.z < 1.0) {
+ err = 0.0;
+ }
+ temp8 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = uLightDirection_Stage3;
+ output_Stage3 = light_Stage3(normal_Stage3(m, uSurfaceScale_Stage3), surfaceToLight, uLightColor_Stage3);
+ output_Stage3 *= output_Stage2;
+ }
+ vec4 output_Stage4;
+ {
+ float xCoverage, yCoverage;
+ {
+ float x, y;
+ {
+ x = max(urectH_Stage4.x - gl_FragCoord.x, gl_FragCoord.x - urectH_Stage4.z);
+ y = max(urectH_Stage4.y - gl_FragCoord.y, gl_FragCoord.y - urectH_Stage4.w);
+ }
+ xCoverage = texture(uTextureSampler_0_Stage4, vec2(x * uinvSixSigma_Stage4, 0.5)).w;
+ yCoverage = texture(uTextureSampler_0_Stage4, vec2(y * uinvSixSigma_Stage4, 0.5)).w;
+ output_Stage4 = (output_Stage3 * xCoverage) * yCoverage;
+ }
+ output_Stage4 = (output_Stage3 * xCoverage) * yCoverage;
+ }
+ vec4 output_Stage5;
+ {
+ vec2 dxy0 = uinnerRect_Stage5.xy - gl_FragCoord.xy;
+ vec2 dxy1 = gl_FragCoord.xy - uinnerRect_Stage5.zw;
+ vec2 dxy = max(max(dxy0, dxy1), 0.0);
+ float alpha = clamp(uradiusPlusHalf_Stage5.x - length(dxy), 0.0, 1.0);
+ alpha = 1.0 - alpha;
+ output_Stage5 = output_Stage4 * alpha;
+ }
+ vec4 output_Stage6;
+ {
+ output_Stage6 = CircleBlurFragmentProcessor_Stage6_c1_c0(output_Stage5, gl_FragCoord.xy);
+ }
+ {
+ sk_FragColor = output_Stage6;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform vec2 uAtlasDimensionsInv_Stage0;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+uniform mat3 uCoordTransformMatrix_3_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in uvec2 inTextureCoords;
+out vec2 vTextureCoords_Stage0;
+flat out int vTexIndex_Stage0;
+out vec2 vIntTextureCoords_Stage0;
+out vec4 vinColor_Stage0;
+out vec2 vTransformedCoords_0_Stage0;
+out vec2 vTransformedCoords_2_Stage0;
+out vec2 vTransformedCoords_3_Stage0;
+void main() {
+ ivec2 signedCoords = ivec2(int(inTextureCoords.x), int(inTextureCoords.y));
+ vec2 unormTexCoords = vec2(float(signedCoords.x / 2), float(signedCoords.y / 2));
+ vTextureCoords_Stage0 = unormTexCoords * uAtlasDimensionsInv_Stage0;
+ vTexIndex_Stage0 = 0;
+ vIntTextureCoords_Stage0 = unormTexCoords;
+ vinColor_Stage0 = inColor;
+ vec3 pos3 = uViewM_Stage0 * vec3(inPosition, 1.0);
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_3_Stage0 = (uCoordTransformMatrix_3_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos3.x, pos3.y, 0.0, pos3.z);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1636.shader_test b/shaders/skia/1636.shader_test
new file mode 100644
index 0000000..f098f4a
--- /dev/null
+++ b/shaders/skia/1636.shader_test
@@ -0,0 +1,75 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uColor_Stage0;
+uniform vec4 uinnerRect_Stage1_c0_c0;
+uniform vec2 uradiusPlusHalf_Stage1_c0_c0;
+in vec2 vTransformedCoords_0_Stage0;
+vec4 CircularRRect_Stage1_c0_c0(vec4 _input, vec2 _coords) {
+ vec4 _output;
+ vec2 dxy0 = uinnerRect_Stage1_c0_c0.xy - gl_FragCoord.xy;
+ vec2 dxy1 = gl_FragCoord.xy - uinnerRect_Stage1_c0_c0.zw;
+ vec2 dxy = max(max(dxy0, dxy1), 0.0);
+ float alpha = clamp(uradiusPlusHalf_Stage1_c0_c0.x - length(dxy), 0.0, 1.0);
+ alpha = 1.0 - alpha;
+ _output = _input * alpha;
+ return _output;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = uColor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ float coord = vTransformedCoords_0_Stage0.x - 0.5;
+ float f = fract(coord);
+ coord += 0.5 - f;
+ float f2 = f * f;
+ vec4 w = mat4(0.055555555555555552, 0.88888888888888884, 0.055555555555555552, 0.0, -0.5, 0.0, 0.5, 0.0, 0.83333333333333337, -2.0, 1.5, -0.33333333333333331, -0.3888888888888889, 1.1666666666666667, -1.1666666666666667, 0.3888888888888889) * vec4(1.0, f, f2, f2 * f);
+ vec4 c[4];
+ c[0] = CircularRRect_Stage1_c0_c0(vec4(1.0), vec2(coord + -1.0, vTransformedCoords_0_Stage0.y));
+ c[1] = CircularRRect_Stage1_c0_c0(vec4(1.0), vec2(coord, vTransformedCoords_0_Stage0.y));
+ c[2] = CircularRRect_Stage1_c0_c0(vec4(1.0), vec2(coord + 1.0, vTransformedCoords_0_Stage0.y));
+ c[3] = CircularRRect_Stage1_c0_c0(vec4(1.0), vec2(coord + 2.0, vTransformedCoords_0_Stage0.y));
+ vec4 bicubicColor = ((c[0] * w.x + c[1] * w.y) + c[2] * w.z) + c[3] * w.w;
+ bicubicColor = clamp(bicubicColor, 0.0, 1.0);
+ output_Stage1 = bicubicColor * outputColor_Stage0;
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = floor(vec4(255.0) + 0.5) / 255.0;
+ {
+ output_Stage2.xyz = floor((output_Stage2.xyz * output_Stage2.w) * 255.0 + 0.5) / 255.0;
+ }
+ }
+ {
+ sk_FragColor = output_Stage1 * output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec3 pos3 = uViewM_Stage0 * vec3(inPosition, 1.0);
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ {
+ vec2 _posTmp = vec2(pos3.x / pos3.z, pos3.y / pos3.z);
+ _posTmp = floor(_posTmp) + vec2(0.5, 0.5);
+ gl_Position = vec4(_posTmp, 0.0, 1.0);
+ }
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1639.shader_test b/shaders/skia/1639.shader_test
new file mode 100644
index 0000000..8066d62
--- /dev/null
+++ b/shaders/skia/1639.shader_test
@@ -0,0 +1,79 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+uniform vec4 ucolor0_Stage2;
+uniform vec4 ucolor1_Stage2;
+uniform vec4 ucolor2_Stage2;
+uniform vec4 ucolor3_Stage2;
+uniform vec4 ucolor4_Stage2;
+uniform vec4 ucolor5_Stage2;
+uniform sampler2D uTextureSampler_0_Stage0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec3 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vtextureCoords_Stage0;
+flat in vec4 vtextureDomain_Stage0;
+flat in vec4 vcolor_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ vec2 textureCoords;
+ textureCoords = vtextureCoords_Stage0;
+ vec4 textureDomain;
+ textureDomain = vtextureDomain_Stage0;
+ outputColor_Stage0 = vcolor_Stage0;
+ outputColor_Stage0 = texture(uTextureSampler_0_Stage0, clamp(textureCoords, textureDomain.xy, textureDomain.zw)) * outputColor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = textureProj(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ float alpha = 255.0 * output_Stage2.w;
+ if (alpha < 0.5) {
+ output_Stage2 = ucolor0_Stage2;
+ } else if (alpha < 1.5) {
+ output_Stage2 = ucolor1_Stage2;
+ } else if (alpha < 2.5) {
+ output_Stage2 = ucolor2_Stage2;
+ } else if (alpha < 3.5) {
+ output_Stage2 = ucolor3_Stage2;
+ } else if (alpha < 4.5) {
+ output_Stage2 = ucolor4_Stage2;
+ } else {
+ output_Stage2 = ucolor5_Stage2;
+ }
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 textureCoords;
+in vec4 textureDomain;
+in vec4 color;
+noperspective out vec3 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vtextureCoords_Stage0;
+flat out vec4 vtextureDomain_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vec2 pos2 = position;
+ vTransformedCoords_0_Stage0 = uCoordTransformMatrix_0_Stage0 * vec3(textureCoords, 1.0);
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(textureCoords, 1.0)).xy;
+ vtextureCoords_Stage0 = textureCoords;
+ vtextureDomain_Stage0 = textureDomain;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1642.shader_test b/shaders/skia/1642.shader_test
new file mode 100644
index 0000000..e112647
--- /dev/null
+++ b/shaders/skia/1642.shader_test
@@ -0,0 +1,49 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uColor_Stage0;
+uniform vec4 urectUniform_Stage1;
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = uColor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ float alpha;
+ {
+ float xSub, ySub;
+ xSub = min(gl_FragCoord.x - urectUniform_Stage1.x, 0.0);
+ xSub += min(urectUniform_Stage1.z - gl_FragCoord.x, 0.0);
+ ySub = min(gl_FragCoord.y - urectUniform_Stage1.y, 0.0);
+ ySub += min(urectUniform_Stage1.w - gl_FragCoord.y, 0.0);
+ alpha = (1.0 + max(xSub, -1.0)) * (1.0 + max(ySub, -1.0));
+ }
+ {
+ alpha = 1.0 - alpha;
+ }
+ output_Stage1 = outputColor_Stage0 * alpha;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 inPosition;
+void main() {
+ vec2 pos2 = (uViewM_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1648.shader_test b/shaders/skia/1648.shader_test
new file mode 100644
index 0000000..3f2fc01
--- /dev/null
+++ b/shaders/skia/1648.shader_test
@@ -0,0 +1,50 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+in vec2 vEllipseOffsets0_Stage0;
+in vec2 vEllipseOffsets1_Stage0;
+in vec4 vinColor_Stage0;
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ vec2 scaledOffset = vEllipseOffsets0_Stage0;
+ float test = dot(scaledOffset, scaledOffset) - 1.0;
+ vec2 duvdx = dFdx(vEllipseOffsets0_Stage0);
+ vec2 duvdy = -dFdy(vEllipseOffsets0_Stage0);
+ vec2 grad = vec2(vEllipseOffsets0_Stage0.x * duvdx.x + vEllipseOffsets0_Stage0.y * duvdx.y, vEllipseOffsets0_Stage0.x * duvdy.x + vEllipseOffsets0_Stage0.y * duvdy.y);
+ float grad_dot = 4.0 * dot(grad, grad);
+ grad_dot = max(grad_dot, 1.1754999560161448e-38);
+ float invlen = inversesqrt(grad_dot);
+ float edgeAlpha = clamp(0.5 - test * invlen, 0.0, 1.0);
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ {
+ sk_FragColor = 1.0 - outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec2 inEllipseOffsets0;
+in vec2 inEllipseOffsets1;
+out vec2 vEllipseOffsets0_Stage0;
+out vec2 vEllipseOffsets1_Stage0;
+out vec4 vinColor_Stage0;
+void main() {
+ vEllipseOffsets0_Stage0 = inEllipseOffsets0;
+ vEllipseOffsets1_Stage0 = inEllipseOffsets1;
+ vinColor_Stage0 = inColor;
+ vec3 pos3 = uViewM_Stage0 * vec3(inPosition, 1.0);
+ gl_Position = vec4(pos3.x, pos3.y, 0.0, pos3.z);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1651.shader_test b/shaders/skia/1651.shader_test
new file mode 100644
index 0000000..b9124cc
--- /dev/null
+++ b/shaders/skia/1651.shader_test
@@ -0,0 +1,235 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform float uinnerThreshold_Stage1_c0_c0_c0_c0_c0_c0;
+uniform float uouterThreshold_Stage1_c0_c0_c0_c0_c0_c0;
+uniform vec3 uedges_Stage1_c0_c0_c0_c0_c1_c0[6];
+uniform float ucornerRadius_Stage1_c0_c0_c1_c0_c0_c0;
+uniform vec4 uproxyRect_Stage1_c0_c0_c1_c0_c0_c0;
+uniform float ublurRadius_Stage1_c0_c0_c1_c0_c0_c0;
+uniform vec2 uScale_Stage1_c0_c0_c1_c0_c1_c0;
+uniform vec4 uTexDom_Stage1_c0_c0_c1_c0_c1_c0;
+uniform vec3 uDecalParams_Stage1_c0_c0_c1_c0_c1_c0;
+uniform vec4 ucolor_Stage1_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+uniform sampler2D uTextureSampler_2_Stage1;
+uniform sampler2D uTextureSampler_3_Stage1;
+noperspective in vec2 vEllipseOffsets_Stage0;
+noperspective in vec4 vEllipseRadii_Stage0;
+noperspective in vec4 vinColor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+vec4 AlphaThresholdFragmentProcessor_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 color = _input;
+ vec4 mask_color = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ if (mask_color.w < 0.5) {
+ if (color.w > uouterThreshold_Stage1_c0_c0_c0_c0_c0_c0) {
+ float scale = uouterThreshold_Stage1_c0_c0_c0_c0_c0_c0 / color.w;
+ color.xyz *= scale;
+ color.w = uouterThreshold_Stage1_c0_c0_c0_c0_c0_c0;
+ }
+ } else if (color.w < uinnerThreshold_Stage1_c0_c0_c0_c0_c0_c0) {
+ float scale = uinnerThreshold_Stage1_c0_c0_c0_c0_c0_c0 / max(0.0010000000474974513, color.w);
+ color.xyz *= scale;
+ color.w = uinnerThreshold_Stage1_c0_c0_c0_c0_c0_c0;
+ }
+ _output = color;
+ return _output;
+}
+vec4 ConvexPoly_Stage1_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float alpha = 1.0;
+ float edge;
+ edge = dot(uedges_Stage1_c0_c0_c0_c0_c1_c0[0], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage1_c0_c0_c0_c0_c1_c0[1], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage1_c0_c0_c0_c0_c1_c0[2], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage1_c0_c0_c0_c0_c1_c0[3], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage1_c0_c0_c0_c0_c1_c0[4], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage1_c0_c0_c0_c0_c1_c0[5], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ alpha = 1.0 - alpha;
+ _output = _input * alpha;
+ return _output;
+}
+float _blend_overlay_component(float sc, float sa, float dc, float da) {
+ if (2.0 * dc <= da) {
+ return (2.0 * sc) * dc;
+ }
+ return sa * da - (2.0 * (da - dc)) * (sa - sc);
+}
+vec4 blend_overlay(vec4 src, vec4 dst) {
+ vec4 result = vec4(_blend_overlay_component(src.x, src.w, dst.x, dst.w), _blend_overlay_component(src.y, src.w, dst.y, dst.w), _blend_overlay_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+ result.xyz += dst.xyz * (1.0 - src.w) + src.xyz * (1.0 - dst.w);
+ return result;
+}
+vec4 ComposeTwo_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_overlay(AlphaThresholdFragmentProcessor_Stage1_c0_c0_c0_c0_c0_c0(inputColor), ConvexPoly_Stage1_c0_c0_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 RRectBlurEffect_Stage1_c0_c0_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 translatedFragPos = gl_FragCoord.xy - uproxyRect_Stage1_c0_c0_c1_c0_c0_c0.xy;
+ float threshold = ucornerRadius_Stage1_c0_c0_c1_c0_c0_c0 + 2.0 * ublurRadius_Stage1_c0_c0_c1_c0_c0_c0;
+ vec2 middle = (uproxyRect_Stage1_c0_c0_c1_c0_c0_c0.zw - uproxyRect_Stage1_c0_c0_c1_c0_c0_c0.xy) - 2.0 * threshold;
+ if (translatedFragPos.x >= threshold && translatedFragPos.x < middle.x + threshold) {
+ translatedFragPos.x = threshold;
+ } else if (translatedFragPos.x >= middle.x + threshold) {
+ translatedFragPos.x -= middle.x - 1.0;
+ }
+ if (translatedFragPos.y > threshold && translatedFragPos.y < middle.y + threshold) {
+ translatedFragPos.y = threshold;
+ } else if (translatedFragPos.y >= middle.y + threshold) {
+ translatedFragPos.y -= middle.y - 1.0;
+ }
+ vec2 proxyDims = vec2(2.0 * threshold + 1.0);
+ vec2 texCoord = translatedFragPos / proxyDims;
+ _output = _input * texture(uTextureSampler_1_Stage1, texCoord);
+ return _output;
+}
+vec4 DisplacementMap_Stage1_c0_c0_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 dColor = texture(uTextureSampler_2_Stage1, vTransformedCoords_1_Stage0);
+ dColor.xyz = dColor.w < 9.9999999747524271e-07 ? vec3(0.0) : clamp(dColor.xyz / dColor.w, 0.0, 1.0);
+ vec2 cCoords = vTransformedCoords_2_Stage0 + uScale_Stage1_c0_c0_c1_c0_c1_c0 * (dColor.ww - vec2(0.5));
+ {
+ vec2 origCoord = cCoords;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c1_c0_c1_c0.xy, uTexDom_Stage1_c0_c0_c1_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_3_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c1_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c1_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c1_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c1_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ _output = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ return _output;
+}
+vec4 blend_src_out(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src;
+}
+vec4 ComposeTwo_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_src_out(RRectBlurEffect_Stage1_c0_c0_c1_c0_c0_c0(inputColor), DisplacementMap_Stage1_c0_c0_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+float _guarded_divide(float n, float d) {
+ return n / d;
+}
+float _color_dodge_component(float sc, float sa, float dc, float da) {
+ if (dc == 0.0) {
+ return sc * (1.0 - da);
+ } else {
+ float d = sa - sc;
+ if (d == 0.0) {
+ return (sa * da + sc * (1.0 - da)) + dc * (1.0 - sa);
+ }
+ d = min(da, _guarded_divide(dc * sa, d));
+ return (d * sa + sc * (1.0 - da)) + dc * (1.0 - sa);
+ }
+}
+vec4 blend_color_dodge(vec4 src, vec4 dst) {
+ return vec4(_color_dodge_component(src.x, src.w, dst.x, dst.w), _color_dodge_component(src.y, src.w, dst.y, dst.w), _color_dodge_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+}
+vec4 ComposeTwo_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_color_dodge(ComposeTwo_Stage1_c0_c0_c0_c0(inputColor), ComposeTwo_Stage1_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 ConstColorProcessor_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage1_c1_c0;
+ }
+ return _output;
+}
+vec4 blend_dst_out(vec4 src, vec4 dst) {
+ return (1.0 - src.w) * dst;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vinColor_Stage0;
+ vec2 offset = vEllipseOffsets_Stage0;
+ offset *= vEllipseRadii_Stage0.xy;
+ float test = dot(offset, offset) - 1.0;
+ vec2 grad = (2.0 * offset) * vEllipseRadii_Stage0.xy;
+ float grad_dot = dot(grad, grad);
+ grad_dot = max(grad_dot, 1.1754999560161448e-38);
+ float invlen = inversesqrt(grad_dot);
+ float edgeAlpha = clamp(0.5 - test * invlen, 0.0, 1.0);
+ offset = vEllipseOffsets_Stage0 * vEllipseRadii_Stage0.zw;
+ test = dot(offset, offset) - 1.0;
+ grad = (2.0 * offset) * vEllipseRadii_Stage0.zw;
+ grad_dot = dot(grad, grad);
+ invlen = inversesqrt(grad_dot);
+ edgeAlpha *= clamp(0.5 + test * invlen, 0.0, 1.0);
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_dst_out(ComposeTwo_Stage1_c0_c0(inputColor), ConstColorProcessor_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ sk_FragColor = output_Stage1 * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec2 inEllipseOffset;
+in vec4 inEllipseRadii;
+noperspective out vec2 vEllipseOffsets_Stage0;
+noperspective out vec4 vEllipseRadii_Stage0;
+noperspective out vec4 vinColor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+void main() {
+ vEllipseOffsets_Stage0 = inEllipseOffset;
+ vEllipseRadii_Stage0 = inEllipseRadii;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1654.shader_test b/shaders/skia/1654.shader_test
new file mode 100644
index 0000000..0bdcbd8
--- /dev/null
+++ b/shaders/skia/1654.shader_test
@@ -0,0 +1,31 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+in vec4 vcolor_Stage0;
+void main() {
+ {
+ sk_FragColor = 1.0 - vec4(1.0);
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec2 inLocalCoord;
+out vec4 vcolor_Stage0;
+void main() {
+ vec4 color = inColor;
+ vcolor_Stage0 = color;
+ vec3 pos3 = uViewM_Stage0 * vec3(inPosition, 1.0);
+ gl_Position = vec4(pos3.x, pos3.y, 0.0, pos3.z);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1657.shader_test b/shaders/skia/1657.shader_test
new file mode 100644
index 0000000..b95bb17
--- /dev/null
+++ b/shaders/skia/1657.shader_test
@@ -0,0 +1,45 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+noperspective in vec4 vinCircleEdge_Stage0;
+noperspective in vec4 vinColor_Stage0;
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ vec4 circleEdge;
+ circleEdge = vinCircleEdge_Stage0;
+ float d = length(circleEdge.xy);
+ float distanceToOuterEdge = circleEdge.z * (1.0 - d);
+ float edgeAlpha = clamp(distanceToOuterEdge, 0.0, 1.0);
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = outputCoverage_Stage0;
+ }
+ {
+ sk_FragColor = 1.0 - output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 inPosition;
+in vec4 inColor;
+in vec4 inCircleEdge;
+noperspective out vec4 vinCircleEdge_Stage0;
+noperspective out vec4 vinColor_Stage0;
+void main() {
+ vinCircleEdge_Stage0 = inCircleEdge;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = inPosition;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/166-2.shader_test b/shaders/skia/166-2.shader_test
new file mode 100644
index 0000000..3a18a0a
--- /dev/null
+++ b/shaders/skia/166-2.shader_test
@@ -0,0 +1,92 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage2_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c1_c0;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+vec4 blend_src_atop(vec4 src, vec4 dst) {
+ return dst.w * src + (1.0 - src.w) * dst;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_dst_in(outputColor_Stage0, ClampedGradientEffect_Stage1_c0_c0(vec4(1.0)));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_src_atop(ConstColorProcessor_Stage2_c1_c0(vec4(1.0)), output_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/166-3.shader_test b/shaders/skia/166-3.shader_test
new file mode 100644
index 0000000..3564360
--- /dev/null
+++ b/shaders/skia/166-3.shader_test
@@ -0,0 +1,156 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform float uSurfaceScale_Stage1;
+uniform vec3 uLightColor_Stage1;
+uniform float uKS_Stage1;
+uniform float uShininess_Stage1;
+uniform vec3 uLightLocation_Stage1;
+uniform float uExponent_Stage1;
+uniform float uCosInnerConeAngle_Stage1;
+uniform float uCosOuterConeAngle_Stage1;
+uniform float uConeScale_Stage1;
+uniform vec3 uS_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 light_Stage1(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ vec3 halfDir = normalize(surfaceToLight + vec3(0.0, 0.0, 1.0));
+ float colorScale = uKS_Stage1 * pow(dot(normal, halfDir), uShininess_Stage1);
+ vec3 color = lightColor * clamp(colorScale, 0.0, 1.0);
+ return vec4(color, max(max(color.x, color.y), color.z));
+}
+float sobel_Stage1(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage1(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage1(float m[9], float surfaceScale) {
+ return pointToNormal_Stage1(sobel_Stage1(m[0], m[1], m[3], m[4], 0.0, 0.0, 0.66666698455810547), sobel_Stage1(m[0], m[3], m[1], m[4], 0.0, 0.0, 0.66666698455810547), surfaceScale);
+}
+vec3 lightColor_Stage1(vec3 surfaceToLight) {
+ float cosAngle = -dot(surfaceToLight, uS_Stage1);
+ if (cosAngle < uCosOuterConeAngle_Stage1) {
+ return vec3(0.0);
+ }
+ float scale = pow(cosAngle, uExponent_Stage1);
+ if (cosAngle < uCosInnerConeAngle_Stage1) {
+ return ((uLightColor_Stage1 * scale) * (cosAngle - uCosOuterConeAngle_Stage1)) * uConeScale_Stage1;
+ }
+ return uLightColor_Stage1;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ vec2 coord = vTransformedCoords_0_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp0 = textureColor;
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp1 = textureColor;
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp2 = textureColor;
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp3 = textureColor;
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp4 = textureColor;
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp5 = textureColor;
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp6 = textureColor;
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp7 = textureColor;
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp8 = textureColor;
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = normalize(uLightLocation_Stage1 - vec3(gl_FragCoord.xy, uSurfaceScale_Stage1 * m[4]));
+ output_Stage1 = light_Stage1(normal_Stage1(m, uSurfaceScale_Stage1), surfaceToLight, lightColor_Stage1(surfaceToLight));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/166-4.shader_test b/shaders/skia/166-4.shader_test
new file mode 100644
index 0000000..0656b45
--- /dev/null
+++ b/shaders/skia/166-4.shader_test
@@ -0,0 +1,145 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+uniform vec2 uDstTextureUpperLeft_Stage2;
+uniform vec2 uDstTextureCoordScale_Stage2;
+uniform sampler2D uTextureSampler_0_Stage0;
+uniform sampler2D uDstTextureSampler_Stage2;
+noperspective in vec2 vTextureCoords_Stage0;
+flat in int vTexIndex_Stage0;
+noperspective in vec4 vinColor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ t.x = fract(t.x);
+ }
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+float _blend_color_saturation(vec3 color) {
+ return max(max(color.x, color.y), color.z) - min(min(color.x, color.y), color.z);
+}
+vec3 _blend_set_color_saturation_helper(vec3 minMidMax, float sat) {
+ if (minMidMax.x < minMidMax.z) {
+ return vec3(0.0, (sat * (minMidMax.y - minMidMax.x)) / (minMidMax.z - minMidMax.x), sat);
+ }
+ return vec3(0.0);
+}
+vec3 _blend_set_color_saturation(vec3 hueLumColor, vec3 satColor) {
+ float sat = _blend_color_saturation(satColor);
+ if (hueLumColor.x <= hueLumColor.y) {
+ if (hueLumColor.y <= hueLumColor.z) {
+ hueLumColor.xyz = _blend_set_color_saturation_helper(hueLumColor, sat);
+ } else if (hueLumColor.x <= hueLumColor.z) {
+ hueLumColor.xzy = _blend_set_color_saturation_helper(hueLumColor.xzy, sat);
+ } else {
+ hueLumColor.zxy = _blend_set_color_saturation_helper(hueLumColor.zxy, sat);
+ }
+ } else if (hueLumColor.x <= hueLumColor.z) {
+ hueLumColor.yxz = _blend_set_color_saturation_helper(hueLumColor.yxz, sat);
+ } else if (hueLumColor.y <= hueLumColor.z) {
+ hueLumColor.yzx = _blend_set_color_saturation_helper(hueLumColor.yzx, sat);
+ } else {
+ hueLumColor.zyx = _blend_set_color_saturation_helper(hueLumColor.zyx, sat);
+ }
+ return hueLumColor;
+}
+float _blend_color_luminance(vec3 color) {
+ return dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), color);
+}
+vec3 _blend_set_color_luminance(vec3 hueSatColor, float alpha, vec3 lumColor) {
+ float lum = _blend_color_luminance(lumColor);
+ vec3 result = (lum - _blend_color_luminance(hueSatColor)) + hueSatColor;
+ float minComp = min(min(result.x, result.y), result.z);
+ float maxComp = max(max(result.x, result.y), result.z);
+ if (minComp < 0.0 && lum != minComp) {
+ result = lum + ((result - lum) * lum) / (lum - minComp);
+ }
+ if (maxComp > alpha && maxComp != lum) {
+ return lum + ((result - lum) * (alpha - lum)) / (maxComp - lum);
+ }
+ return result;
+}
+vec4 blend_saturation(vec4 src, vec4 dst) {
+ float alpha = dst.w * src.w;
+ vec3 sda = src.xyz * dst.w;
+ vec3 dsa = dst.xyz * src.w;
+ return vec4((((_blend_set_color_luminance(_blend_set_color_saturation(dsa, sda), alpha, dsa) + dst.xyz) - dsa) + src.xyz) - sda, (src.w + dst.w) - alpha);
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ vec4 texColor;
+ {
+ texColor = texture(uTextureSampler_0_Stage0, vTextureCoords_Stage0);
+ }
+ outputCoverage_Stage0 = texColor;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TiledGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ if (all(lessThanEqual(outputCoverage_Stage0.xyz, vec3(0.0)))) {
+ discard;
+ }
+ vec2 _dstTexCoord = (gl_FragCoord.xy - uDstTextureUpperLeft_Stage2) * uDstTextureCoordScale_Stage2;
+ _dstTexCoord.y = 1.0 - _dstTexCoord.y;
+ vec4 _dstColor = texture(uDstTextureSampler_Stage2, _dstTexCoord);
+ sk_FragColor = blend_saturation(output_Stage1, _dstColor);
+ float lerpRed = mix(_dstColor.w, sk_FragColor.w, outputCoverage_Stage0.x);
+ float lerpBlue = mix(_dstColor.w, sk_FragColor.w, outputCoverage_Stage0.y);
+ float lerpGreen = mix(_dstColor.w, sk_FragColor.w, outputCoverage_Stage0.z);
+ sk_FragColor = outputCoverage_Stage0 * sk_FragColor + (vec4(1.0) - outputCoverage_Stage0) * _dstColor;
+ sk_FragColor.w = max(max(lerpRed, lerpBlue), lerpGreen);
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform vec2 uAtlasSizeInv_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in uvec2 inTextureCoords;
+noperspective out vec2 vTextureCoords_Stage0;
+flat out int vTexIndex_Stage0;
+noperspective out vec4 vinColor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ ivec2 signedCoords = ivec2(int(inTextureCoords.x), int(inTextureCoords.y));
+ vec2 unormTexCoords = vec2(float(signedCoords.x / 2), float(signedCoords.y / 2));
+ vTextureCoords_Stage0 = unormTexCoords * uAtlasSizeInv_Stage0;
+ vTexIndex_Stage0 = 0;
+ vinColor_Stage0 = inColor;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(inPosition.x, inPosition.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/166-7.shader_test b/shaders/skia/166-7.shader_test
new file mode 100644
index 0000000..cb70317
--- /dev/null
+++ b/shaders/skia/166-7.shader_test
@@ -0,0 +1,115 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform vec2 uBounds_Stage1;
+uniform vec4 uKernel_Stage1[5];
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0 - 9.0 * uImageIncrement_Stage1;
+ vec2 coordSampled = vec2(0.0, 0.0);
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[4].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[4].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[4].z;
+ coord += uImageIncrement_Stage1;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ sk_FragColor = sk_FragColor.wwww;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/166-8.shader_test b/shaders/skia/166-8.shader_test
new file mode 100644
index 0000000..5de68b3
--- /dev/null
+++ b/shaders/skia/166-8.shader_test
@@ -0,0 +1,45 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec3 uedges_Stage2[1];
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ float alpha = 1.0;
+ float edge;
+ edge = dot(uedges_Stage2[0], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ output_Stage2 = output_Stage1 * alpha;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/166.shader_test b/shaders/skia/166.shader_test
new file mode 100644
index 0000000..0c8f779
--- /dev/null
+++ b/shaders/skia/166.shader_test
@@ -0,0 +1,162 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage2;
+uniform vec4 ucolor_Stage3_c1_c0;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.w) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ } else {
+ {
+ if (t < uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+vec4 ComposeOne_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_dst_in(_input, TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0)));
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = ComposeOne_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 ConstColorProcessor_Stage3_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage3_c1_c0;
+ }
+ return _output;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 blend_darken(vec4 src, vec4 dst) {
+ vec4 result = blend_src_over(src, dst);
+ result.xyz = min(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
+ return result;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_dst_in(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ {
+ output_Stage2 = output_Stage1 * ucolor_Stage2;
+ }
+ }
+ vec4 output_Stage3;
+ {
+ output_Stage3 = blend_darken(ConstColorProcessor_Stage3_c1_c0(vec4(1.0)), output_Stage2);
+ }
+ {
+ sk_FragColor = output_Stage3;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 inColor;
+in vec2 inLocalCoord;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1663.shader_test b/shaders/skia/1663.shader_test
new file mode 100644
index 0000000..3b7c63d
--- /dev/null
+++ b/shaders/skia/1663.shader_test
@@ -0,0 +1,33 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+noperspective in vec4 vcolor_Stage0;
+void main() {
+ {
+ sk_FragColor = 1.0 - vec4(1.0);
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 position;
+in vec4 inColor;
+noperspective out vec4 vcolor_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_PointSize = 1.0;
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1666.shader_test b/shaders/skia/1666.shader_test
new file mode 100644
index 0000000..4878b0c
--- /dev/null
+++ b/shaders/skia/1666.shader_test
@@ -0,0 +1,84 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+uniform vec2 ubaseFrequency_Stage1;
+uniform float uz_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec3 vTransformedCoords_0_Stage0;
+noperspective in float vinCoverage_Stage0;
+vec3 fade_Stage1(vec3 t) {
+ return ((t * t) * t) * (t * (t * 6.0 - 15.0) + 10.0);
+}
+float perm_Stage1(float x) {
+ return texture(uTextureSampler_0_Stage1, vec2(fract(x / 256.0), 0.0)).x * 255.0;
+}
+float grad_Stage1(float x, vec3 p) {
+ return dot(texture(uTextureSampler_1_Stage1, vec2(fract(x / 16.0), 0.0)).xyz * 255.0 - vec3(1.0), p);
+}
+float lerp_Stage1(float a, float b, float w) {
+ return a + w * (b - a);
+}
+float noise_Stage1(vec3 p) {
+ vec3 P = mod(floor(p), 256.0);
+ p -= floor(p);
+ vec3 f = fade_Stage1(p);
+ float A = perm_Stage1(P.x) + P.y;
+ float AA = perm_Stage1(A) + P.z;
+ float AB = perm_Stage1(A + 1.0) + P.z;
+ float B = perm_Stage1(P.x + 1.0) + P.y;
+ float BA = perm_Stage1(B) + P.z;
+ float BB = perm_Stage1(B + 1.0) + P.z;
+ float result = lerp_Stage1(lerp_Stage1(lerp_Stage1(grad_Stage1(perm_Stage1(AA), p), grad_Stage1(perm_Stage1(BA), p + vec3(-1.0, 0.0, 0.0)), f.x), lerp_Stage1(grad_Stage1(perm_Stage1(AB), p + vec3(0.0, -1.0, 0.0)), grad_Stage1(perm_Stage1(BB), p + vec3(-1.0, -1.0, 0.0)), f.x), f.y), lerp_Stage1(lerp_Stage1(grad_Stage1(perm_Stage1(AA + 1.0), p + vec3(0.0, 0.0, -1.0)), grad_Stage1(perm_Stage1(BA + 1.0), p + vec3(-1.0, 0.0, -1.0)), f.x), lerp_Stage1(grad_Stage1(perm_Stage1(AB + 1.0), p + vec3(0.0, -1.0, -1.0)), grad_Stage1(perm_Stage1(BB + 1.0), p + vec3(-1.0, -1.0, -1.0)), f.x), f.y), f.z);
+ return result;
+}
+float noiseOctaves_Stage1(vec3 p) {
+ float result = 0.0;
+ float ratio = 1.0;
+ for (float i = 0.0;i < 3.0; i++) {
+ result += noise_Stage1(p) / ratio;
+ p *= 2.0;
+ ratio *= 2.0;
+ }
+ return (result + 1.0) / 2.0;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ vec2 vTransformedCoords_0_Stage0_ensure2D = vTransformedCoords_0_Stage0.xy / vTransformedCoords_0_Stage0.z;
+ vec2 coords = vTransformedCoords_0_Stage0_ensure2D * ubaseFrequency_Stage1;
+ float r = noiseOctaves_Stage1(vec3(coords, uz_Stage1));
+ float g = noiseOctaves_Stage1(vec3(coords, uz_Stage1));
+ float b = noiseOctaves_Stage1(vec3(coords, uz_Stage1));
+ float a = noiseOctaves_Stage1(vec3(coords, uz_Stage1));
+ output_Stage1 = vec4(r, g, b, a);
+ output_Stage1 = clamp(output_Stage1, 0.0, 1.0);
+ output_Stage1 = vec4(output_Stage1.xyz * output_Stage1.www, output_Stage1.w);
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in float inCoverage;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec3 vTransformedCoords_0_Stage0;
+noperspective out float vinCoverage_Stage0;
+void main() {
+ vec4 color = inColor;
+ vcolor_Stage0 = color;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0);
+ vinCoverage_Stage0 = inCoverage;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1672.shader_test b/shaders/skia/1672.shader_test
new file mode 100644
index 0000000..a9c7a27
--- /dev/null
+++ b/shaders/skia/1672.shader_test
@@ -0,0 +1,235 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_KHR_blend_equation_advanced : require
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+layout (blend_support_all_equations) out ;
+uniform vec4 uellipse_Stage1_c0_c0_c0_c0_c0_c0;
+uniform float uPixelSize_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec2 uRange_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 urectH_Stage1_c0_c0_c1_c0;
+uniform float uinvSixSigma_Stage1_c0_c0_c1_c0;
+uniform float ucornerRadius_Stage1_c1_c0_c0_c0;
+uniform vec4 uproxyRect_Stage1_c1_c0_c0_c0;
+uniform float ublurRadius_Stage1_c1_c0_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+uniform sampler2D uTextureSampler_2_Stage1;
+in vec4 vcolor_Stage0;
+in vec2 vTransformedCoords_0_Stage0;
+vec4 EllipseEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 d = gl_FragCoord.xy - uellipse_Stage1_c0_c0_c0_c0_c0_c0.xy;
+ vec2 Z = d * uellipse_Stage1_c0_c0_c0_c0_c0_c0.zw;
+ float implicit = dot(Z, d) - 1.0;
+ float grad_dot = 4.0 * dot(Z, Z);
+ {
+ grad_dot = max(grad_dot, 1.1754999560161448e-38);
+ }
+ float approx_dist = implicit * inversesqrt(grad_dot);
+ float alpha;
+ {
+ alpha = clamp(0.5 - approx_dist, 0.0, 1.0);
+ }
+ _output = _input * alpha;
+ return _output;
+}
+vec4 Morphology_Stage1_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0;
+ coord.y -= 7.0 * uPixelSize_Stage1_c0_c0_c0_c0_c1_c0;
+ for (int i = 0;i < 15; i++) {
+ _output = max(_output, texture(uTextureSampler_0_Stage1, coord));
+ coord.y += uPixelSize_Stage1_c0_c0_c0_c0_c1_c0;
+ }
+ _output *= _input;
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 ComposeTwo_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_src_in(EllipseEffect_Stage1_c0_c0_c0_c0_c0_c0(inputColor), Morphology_Stage1_c0_c0_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 RectBlurEffect_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float xCoverage, yCoverage;
+ {
+ float x, y;
+ {
+ x = max(urectH_Stage1_c0_c0_c1_c0.x - gl_FragCoord.x, gl_FragCoord.x - urectH_Stage1_c0_c0_c1_c0.z);
+ y = max(urectH_Stage1_c0_c0_c1_c0.y - gl_FragCoord.y, gl_FragCoord.y - urectH_Stage1_c0_c0_c1_c0.w);
+ }
+ xCoverage = texture(uTextureSampler_1_Stage1, vec2(x * uinvSixSigma_Stage1_c0_c0_c1_c0, 0.5)).w;
+ yCoverage = texture(uTextureSampler_1_Stage1, vec2(y * uinvSixSigma_Stage1_c0_c0_c1_c0, 0.5)).w;
+ _output = (_input * xCoverage) * yCoverage;
+ }
+ _output = (_input * xCoverage) * yCoverage;
+ return _output;
+}
+vec4 blend_xor(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src + (1.0 - src.w) * dst;
+}
+vec4 ComposeTwo_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_xor(ComposeTwo_Stage1_c0_c0_c0_c0(inputColor), RectBlurEffect_Stage1_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 RRectBlurEffect_Stage1_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 translatedFragPos = gl_FragCoord.xy - uproxyRect_Stage1_c1_c0_c0_c0.xy;
+ float threshold = ucornerRadius_Stage1_c1_c0_c0_c0 + 2.0 * ublurRadius_Stage1_c1_c0_c0_c0;
+ vec2 middle = (uproxyRect_Stage1_c1_c0_c0_c0.zw - uproxyRect_Stage1_c1_c0_c0_c0.xy) - 2.0 * threshold;
+ if (translatedFragPos.x >= threshold && translatedFragPos.x < middle.x + threshold) {
+ translatedFragPos.x = threshold;
+ } else if (translatedFragPos.x >= middle.x + threshold) {
+ translatedFragPos.x -= middle.x - 1.0;
+ }
+ if (translatedFragPos.y > threshold && translatedFragPos.y < middle.y + threshold) {
+ translatedFragPos.y = threshold;
+ } else if (translatedFragPos.y >= middle.y + threshold) {
+ translatedFragPos.y -= middle.y - 1.0;
+ }
+ vec2 proxyDims = vec2(2.0 * threshold + 1.0);
+ vec2 texCoord = translatedFragPos / proxyDims;
+ _output = _input * texture(uTextureSampler_2_Stage1, texCoord);
+ return _output;
+}
+vec4 ConfigConversionEffect_Stage1_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = floor(_input * 255.0 + 0.5) / 255.0;
+ {
+ _output.xyz = _output.w <= 0.0 ? vec3(0.0) : floor((_output.xyz / _output.w) * 255.0 + 0.5) / 255.0;
+ }
+ return _output;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 blend_darken(vec4 src, vec4 dst) {
+ vec4 result = blend_src_over(src, dst);
+ result.xyz = min(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
+ return result;
+}
+vec4 ComposeTwo_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_darken(RRectBlurEffect_Stage1_c1_c0_c0_c0(inputColor), ConfigConversionEffect_Stage1_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+float _guarded_divide(float n, float d) {
+ return n / d;
+}
+float _color_dodge_component(float sc, float sa, float dc, float da) {
+ if (dc == 0.0) {
+ return sc * (1.0 - da);
+ } else {
+ float d = sa - sc;
+ if (d == 0.0) {
+ return (sa * da + sc * (1.0 - da)) + dc * (1.0 - sa);
+ }
+ d = min(da, _guarded_divide(dc * sa, d));
+ return (d * sa + sc * (1.0 - da)) + dc * (1.0 - sa);
+ }
+}
+vec4 blend_color_dodge(vec4 src, vec4 dst) {
+ return vec4(_color_dodge_component(src.x, src.w, dst.x, dst.w), _color_dodge_component(src.y, src.w, dst.y, dst.w), _color_dodge_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_color_dodge(ComposeTwo_Stage1_c0_c0(inputColor), ComposeTwo_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform float uSrcTF_Stage0[7];
+uniform mat3 uColorXform_Stage0;
+uniform float uDstTF_Stage0[7];
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 inColor;
+in vec2 inLocalCoord;
+out vec4 vcolor_Stage0;
+out vec2 vTransformedCoords_0_Stage0;
+float src_tf_Stage0(float x) {
+ float G = uSrcTF_Stage0[0];
+ float A = uSrcTF_Stage0[1];
+ float B = uSrcTF_Stage0[2];
+ float C = uSrcTF_Stage0[3];
+ float D = uSrcTF_Stage0[4];
+ float E = uSrcTF_Stage0[5];
+ float F = uSrcTF_Stage0[6];
+ float s = sign(x);
+ x = abs(x);
+ x = x < D ? C * x + F : pow(A * x + B, G) + E;
+ return s * x;
+}
+float dst_tf_Stage0(float x) {
+ float G = uDstTF_Stage0[0];
+ float A = uDstTF_Stage0[1];
+ float B = uDstTF_Stage0[2];
+ float C = uDstTF_Stage0[3];
+ float D = uDstTF_Stage0[4];
+ float E = uDstTF_Stage0[5];
+ float F = uDstTF_Stage0[6];
+ float s = sign(x);
+ x = abs(x);
+ x = x < D ? C * x + F : pow(A * x + B, G) + E;
+ return s * x;
+}
+vec4 gamut_xform_Stage0(vec4 color) {
+ color.xyz = uColorXform_Stage0 * color.xyz;
+ return color;
+}
+vec4 color_xform_Stage0(vec4 color) {
+ float nonZeroAlpha = max(color.w, 9.9999997473787516e-05);
+ color = vec4(color.xyz / nonZeroAlpha, nonZeroAlpha);
+ color.x = src_tf_Stage0(color.x);
+ color.y = src_tf_Stage0(color.y);
+ color.z = src_tf_Stage0(color.z);
+ color = gamut_xform_Stage0(color);
+ color.x = dst_tf_Stage0(color.x);
+ color.y = dst_tf_Stage0(color.y);
+ color.z = dst_tf_Stage0(color.z);
+ color.xyz *= color.w;
+ return color;
+}
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = color_xform_Stage0(color);
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec3 pos3 = uViewM_Stage0 * vec3(position, 1.0);
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos3.x, pos3.y, 0.0, pos3.z);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1678.shader_test b/shaders/skia/1678.shader_test
new file mode 100644
index 0000000..9d4a6f2
--- /dev/null
+++ b/shaders/skia/1678.shader_test
@@ -0,0 +1,267 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_KHR_blend_equation_advanced : require
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+layout (blend_support_all_equations) out ;
+uniform vec4 ucircleData_Stage1;
+uniform vec2 uImageIncrement_Stage3;
+uniform float uSurfaceScale_Stage3;
+uniform vec3 uLightColor_Stage3;
+uniform float uKD_Stage3;
+uniform vec4 uTexDom_Stage3;
+uniform vec3 uDecalParams_Stage3;
+uniform vec3 uLightLocation_Stage3;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage3;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 light_Stage3(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ float colorScale = uKD_Stage3 * dot(normal, surfaceToLight);
+ return vec4(lightColor * clamp(colorScale, 0.0, 1.0), 1.0);
+}
+float sobel_Stage3(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage3(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage3(float m[9], float surfaceScale) {
+ return pointToNormal_Stage3(sobel_Stage3(0.0, 0.0, m[4], m[5], m[7], m[8], 0.66666698455810547), sobel_Stage3(0.0, 0.0, m[4], m[7], m[5], m[8], 0.66666698455810547), surfaceScale);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec2 vec = vec2((gl_FragCoord.x - ucircleData_Stage1.x) * ucircleData_Stage1.w, (gl_FragCoord.y - ucircleData_Stage1.y) * ucircleData_Stage1.w);
+ float dist = length(vec) + (0.5 - ucircleData_Stage1.z) * ucircleData_Stage1.w;
+ output_Stage1 = outputColor_Stage0 * texture(uTextureSampler_0_Stage1, vec2(dist, 0.5)).w;
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ }
+ vec4 output_Stage3;
+ {
+ vec2 coord = vTransformedCoords_0_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage3;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage3.xy, uTexDom_Stage3.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage3, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage3.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage3.y);
+ if (err > uDecalParams_Stage3.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage3.z < 1.0) {
+ err = 0.0;
+ }
+ temp0 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage3;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage3.xy, uTexDom_Stage3.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage3, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage3.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage3.y);
+ if (err > uDecalParams_Stage3.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage3.z < 1.0) {
+ err = 0.0;
+ }
+ temp1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage3;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage3.xy, uTexDom_Stage3.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage3, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage3.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage3.y);
+ if (err > uDecalParams_Stage3.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage3.z < 1.0) {
+ err = 0.0;
+ }
+ temp2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage3;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage3.xy, uTexDom_Stage3.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage3, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage3.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage3.y);
+ if (err > uDecalParams_Stage3.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage3.z < 1.0) {
+ err = 0.0;
+ }
+ temp3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage3.xy, uTexDom_Stage3.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage3, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage3.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage3.y);
+ if (err > uDecalParams_Stage3.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage3.z < 1.0) {
+ err = 0.0;
+ }
+ temp4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage3;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage3.xy, uTexDom_Stage3.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage3, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage3.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage3.y);
+ if (err > uDecalParams_Stage3.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage3.z < 1.0) {
+ err = 0.0;
+ }
+ temp5 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage3;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage3.xy, uTexDom_Stage3.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage3, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage3.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage3.y);
+ if (err > uDecalParams_Stage3.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage3.z < 1.0) {
+ err = 0.0;
+ }
+ temp6 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage3;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage3.xy, uTexDom_Stage3.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage3, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage3.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage3.y);
+ if (err > uDecalParams_Stage3.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage3.z < 1.0) {
+ err = 0.0;
+ }
+ temp7 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage3;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage3.xy, uTexDom_Stage3.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage3, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage3.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage3.y);
+ if (err > uDecalParams_Stage3.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage3.z < 1.0) {
+ err = 0.0;
+ }
+ temp8 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = normalize(uLightLocation_Stage3 - vec3(gl_FragCoord.xy, uSurfaceScale_Stage3 * m[4]));
+ output_Stage3 = light_Stage3(normal_Stage3(m, uSurfaceScale_Stage3), surfaceToLight, uLightColor_Stage3);
+ }
+ {
+ sk_FragColor = output_Stage3 * output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform float uSrcTF_Stage0[7];
+uniform mat3 uColorXform_Stage0;
+uniform float uDstTF_Stage0[7];
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 inColor;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+float src_tf_Stage0(float x) {
+ float G = uSrcTF_Stage0[0];
+ float A = uSrcTF_Stage0[1];
+ float B = uSrcTF_Stage0[2];
+ float C = uSrcTF_Stage0[3];
+ float D = uSrcTF_Stage0[4];
+ float E = uSrcTF_Stage0[5];
+ float F = uSrcTF_Stage0[6];
+ float s = sign(x);
+ x = abs(x);
+ x = x < D ? C * x + F : pow(A * x + B, G) + E;
+ return s * x;
+}
+float dst_tf_Stage0(float x) {
+ float G = uDstTF_Stage0[0];
+ float A = uDstTF_Stage0[1];
+ float B = uDstTF_Stage0[2];
+ float C = uDstTF_Stage0[3];
+ float D = uDstTF_Stage0[4];
+ float E = uDstTF_Stage0[5];
+ float F = uDstTF_Stage0[6];
+ float s = sign(x);
+ x = abs(x);
+ x = x < D ? C * x + F : pow(A * x + B, G) + E;
+ return s * x;
+}
+vec4 gamut_xform_Stage0(vec4 color) {
+ color.xyz = uColorXform_Stage0 * color.xyz;
+ return color;
+}
+vec4 color_xform_Stage0(vec4 color) {
+ float nonZeroAlpha = max(color.w, 9.9999997473787516e-05);
+ color = vec4(color.xyz / nonZeroAlpha, nonZeroAlpha);
+ color.x = src_tf_Stage0(color.x);
+ color.y = src_tf_Stage0(color.y);
+ color.z = src_tf_Stage0(color.z);
+ color = gamut_xform_Stage0(color);
+ color.x = dst_tf_Stage0(color.x);
+ color.y = dst_tf_Stage0(color.y);
+ color.z = dst_tf_Stage0(color.z);
+ color.xyz *= color.w;
+ return color;
+}
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = color_xform_Stage0(color);
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(position, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_PointSize = 1.0;
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1681.shader_test b/shaders/skia/1681.shader_test
new file mode 100644
index 0000000..93f31d6
--- /dev/null
+++ b/shaders/skia/1681.shader_test
@@ -0,0 +1,187 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uCoordTransformMatrix_3_Stage0;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+uniform vec4 uleftBorderColor_Stage2_c1_c0;
+uniform vec4 urightBorderColor_Stage2_c1_c0;
+uniform float ubias_Stage2_c1_c0_c0_c0;
+uniform float uscale_Stage2_c1_c0_c0_c0;
+uniform vec4 ustart_Stage2_c1_c0_c1_c0;
+uniform vec4 uend_Stage2_c1_c0_c1_c0;
+uniform vec4 usubset_Stage3_c2_c0;
+uniform vec4 uclamp_Stage3_c2_c0;
+uniform sampler2D uTextureSampler_0_Stage3;
+noperspective in vec2 vEllipseOffsets_Stage0;
+noperspective in vec4 vEllipseRadii_Stage0;
+noperspective in vec4 vinColor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec3 vTransformedCoords_2_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ t.x = fract(t.x);
+ }
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 SweepGradientLayout_Stage2_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float angle;
+ {
+ angle = atan(-vTransformedCoords_1_Stage0.y, -vTransformedCoords_1_Stage0.x);
+ }
+ float t = ((angle * 0.15915493667125702 + 0.5) + ubias_Stage2_c1_c0_c0_c0) * uscale_Stage2_c1_c0_c0_c0;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage2_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage2_c1_c0_c1_c0 + t * uend_Stage2_c1_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = SweepGradientLayout_Stage2_c1_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage2_c1_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage2_c1_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage2_c1_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 TextureEffect_Stage3_c2_c0(vec4 _input, vec2 _coords) {
+ _coords = _coords * uCoordTransformMatrix_3_Stage0.xz + uCoordTransformMatrix_3_Stage0.yw;
+ vec4 _output;
+ vec2 inCoord = _coords;
+ vec2 subsetCoord;
+ subsetCoord.x = mod(inCoord.x - usubset_Stage3_c2_c0.x, usubset_Stage3_c2_c0.z - usubset_Stage3_c2_c0.x) + usubset_Stage3_c2_c0.x;
+ {
+ float w = usubset_Stage3_c2_c0.w - usubset_Stage3_c2_c0.y;
+ float w2 = 2.0 * w;
+ float m = mod(inCoord.y - usubset_Stage3_c2_c0.y, w2);
+ subsetCoord.y = mix(m, w2 - m, step(w, m)) + usubset_Stage3_c2_c0.y;
+ }
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage3_c2_c0.x, uclamp_Stage3_c2_c0.z);
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage3_c2_c0.y, uclamp_Stage3_c2_c0.w);
+ vec4 textureColor = texture(uTextureSampler_0_Stage3, clampedCoord);
+ _output = _input * textureColor;
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vinColor_Stage0;
+ vec2 offset = vEllipseOffsets_Stage0;
+ float test = dot(offset, offset) - 1.0;
+ vec2 grad = (2.0 * offset) * vEllipseRadii_Stage0.xy;
+ float grad_dot = dot(grad, grad);
+ grad_dot = max(grad_dot, 1.1754999560161448e-38);
+ float invlen = inversesqrt(grad_dot);
+ float edgeAlpha = clamp(0.5 - test * invlen, 0.0, 1.0);
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_dst_in(outputColor_Stage0, TiledGradientEffect_Stage1_c0_c0(vec4(1.0)));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_dst_in(output_Stage1, ClampedGradientEffect_Stage2_c1_c0(vec4(1.0)));
+ }
+ vec4 output_Stage3;
+ {
+ vec2 vTransformedCoords_2_Stage0_ensure2D = vTransformedCoords_2_Stage0.xy / vTransformedCoords_2_Stage0.z;
+ float coord = vTransformedCoords_2_Stage0_ensure2D.x - 0.5;
+ float f = fract(coord);
+ coord += 0.5 - f;
+ float f2 = f * f;
+ vec4 w = mat4(0.055555555555555552, 0.88888888888888884, 0.055555555555555552, 0.0, -0.5, 0.0, 0.5, 0.0, 0.83333333333333337, -2.0, 1.5, -0.33333333333333331, -0.3888888888888889, 1.1666666666666667, -1.1666666666666667, 0.3888888888888889) * vec4(1.0, f, f2, f2 * f);
+ vec4 c[4];
+ c[0] = TextureEffect_Stage3_c2_c0(vec4(1.0), vec2(coord + -1.0, vTransformedCoords_2_Stage0_ensure2D.y));
+ c[1] = TextureEffect_Stage3_c2_c0(vec4(1.0), vec2(coord, vTransformedCoords_2_Stage0_ensure2D.y));
+ c[2] = TextureEffect_Stage3_c2_c0(vec4(1.0), vec2(coord + 1.0, vTransformedCoords_2_Stage0_ensure2D.y));
+ c[3] = TextureEffect_Stage3_c2_c0(vec4(1.0), vec2(coord + 2.0, vTransformedCoords_2_Stage0_ensure2D.y));
+ vec4 bicubicColor = ((c[0] * w.x + c[1] * w.y) + c[2] * w.z) + c[3] * w.w;
+ bicubicColor.xyz = max(vec3(0.0), min(bicubicColor.xyz, bicubicColor.www));
+ output_Stage3 = bicubicColor * output_Stage2;
+ }
+ vec4 output_Stage4;
+ {
+ output_Stage4 = floor(output_Stage3 * 255.0 + 0.5) / 255.0;
+ {
+ output_Stage4.xyz = output_Stage4.w <= 0.0 ? vec3(0.0) : floor((output_Stage4.xyz / output_Stage4.w) * 255.0 + 0.5) / 255.0;
+ }
+ }
+ {
+ sk_FragColor = (1.0 - output_Stage4.w) * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec2 inEllipseOffset;
+in vec4 inEllipseRadii;
+noperspective out vec2 vEllipseOffsets_Stage0;
+noperspective out vec4 vEllipseRadii_Stage0;
+noperspective out vec4 vinColor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec3 vTransformedCoords_2_Stage0;
+void main() {
+ vEllipseOffsets_Stage0 = inEllipseOffset;
+ vEllipseRadii_Stage0 = inEllipseRadii;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = uCoordTransformMatrix_2_Stage0 * vec3(inPosition, 1.0);
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1684.shader_test b/shaders/skia/1684.shader_test
new file mode 100644
index 0000000..b761523
--- /dev/null
+++ b/shaders/skia/1684.shader_test
@@ -0,0 +1,942 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1_c0_c0_c0_c0_c0_c0;
+uniform float uSurfaceScale_Stage1_c0_c0_c0_c0_c0_c0;
+uniform vec3 uLightColor_Stage1_c0_c0_c0_c0_c0_c0;
+uniform float uKS_Stage1_c0_c0_c0_c0_c0_c0;
+uniform float uShininess_Stage1_c0_c0_c0_c0_c0_c0;
+uniform vec4 uTexDom_Stage1_c0_c0_c0_c0_c0_c0;
+uniform vec3 uDecalParams_Stage1_c0_c0_c0_c0_c0_c0;
+uniform vec3 uLightLocation_Stage1_c0_c0_c0_c0_c0_c0;
+uniform float uinnerThreshold_Stage1_c0_c0_c0_c0_c1_c0;
+uniform float uouterThreshold_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec2 uImageIncrement_Stage1_c0_c0_c1_c0_c0_c0;
+uniform float uSurfaceScale_Stage1_c0_c0_c1_c0_c0_c0;
+uniform vec3 uLightColor_Stage1_c0_c0_c1_c0_c0_c0;
+uniform float uKS_Stage1_c0_c0_c1_c0_c0_c0;
+uniform float uShininess_Stage1_c0_c0_c1_c0_c0_c0;
+uniform vec4 uTexDom_Stage1_c0_c0_c1_c0_c0_c0;
+uniform vec3 uDecalParams_Stage1_c0_c0_c1_c0_c0_c0;
+uniform vec3 uLightLocation_Stage1_c0_c0_c1_c0_c0_c0;
+uniform vec4 ucolor_Stage1_c0_c0_c1_c0_c1_c0;
+uniform vec4 uinnerRect_Stage1_c1_c0_c0_c0;
+uniform vec2 uinvRadiiXY_Stage1_c1_c0_c0_c0;
+uniform vec2 uImageIncrement_Stage1_c1_c0_c1_c0_c0_c0;
+uniform float uSurfaceScale_Stage1_c1_c0_c1_c0_c0_c0;
+uniform vec3 uLightColor_Stage1_c1_c0_c1_c0_c0_c0;
+uniform float uKS_Stage1_c1_c0_c1_c0_c0_c0;
+uniform float uShininess_Stage1_c1_c0_c1_c0_c0_c0;
+uniform vec4 uTexDom_Stage1_c1_c0_c1_c0_c0_c0;
+uniform vec3 uDecalParams_Stage1_c1_c0_c1_c0_c0_c0;
+uniform vec3 uLightLocation_Stage1_c1_c0_c1_c0_c0_c0;
+uniform float uExponent_Stage1_c1_c0_c1_c0_c0_c0;
+uniform float uCosInnerConeAngle_Stage1_c1_c0_c1_c0_c0_c0;
+uniform float uCosOuterConeAngle_Stage1_c1_c0_c1_c0_c0_c0;
+uniform float uConeScale_Stage1_c1_c0_c1_c0_c0_c0;
+uniform vec3 uS_Stage1_c1_c0_c1_c0_c0_c0;
+uniform vec2 uImageIncrement_Stage1_c1_c0_c1_c0_c1_c0;
+uniform float uSurfaceScale_Stage1_c1_c0_c1_c0_c1_c0;
+uniform vec3 uLightColor_Stage1_c1_c0_c1_c0_c1_c0;
+uniform float uKS_Stage1_c1_c0_c1_c0_c1_c0;
+uniform float uShininess_Stage1_c1_c0_c1_c0_c1_c0;
+uniform vec4 uTexDom_Stage1_c1_c0_c1_c0_c1_c0;
+uniform vec3 uDecalParams_Stage1_c1_c0_c1_c0_c1_c0;
+uniform vec3 uLightLocation_Stage1_c1_c0_c1_c0_c1_c0;
+uniform float uExponent_Stage1_c1_c0_c1_c0_c1_c0;
+uniform float uCosInnerConeAngle_Stage1_c1_c0_c1_c0_c1_c0;
+uniform float uCosOuterConeAngle_Stage1_c1_c0_c1_c0_c1_c0;
+uniform float uConeScale_Stage1_c1_c0_c1_c0_c1_c0;
+uniform vec3 uS_Stage1_c1_c0_c1_c0_c1_c0;
+uniform vec2 uDstTextureUpperLeft_Stage2;
+uniform vec2 uDstTextureCoordScale_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+uniform sampler2D uTextureSampler_2_Stage1;
+uniform sampler2D uTextureSampler_3_Stage1;
+uniform sampler2D uTextureSampler_4_Stage1;
+uniform sampler2D uDstTextureSampler_Stage2;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+noperspective in vec2 vTransformedCoords_3_Stage0;
+noperspective in vec2 vTransformedCoords_4_Stage0;
+noperspective in float vinCoverage_Stage0;
+vec4 light_Stage1_c0_c0_c0_c0_c0_c0(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ vec3 halfDir = normalize(surfaceToLight + vec3(0.0, 0.0, 1.0));
+ float colorScale = uKS_Stage1_c0_c0_c0_c0_c0_c0 * pow(dot(normal, halfDir), uShininess_Stage1_c0_c0_c0_c0_c0_c0);
+ vec3 color = lightColor * clamp(colorScale, 0.0, 1.0);
+ return vec4(color, max(max(color.x, color.y), color.z));
+}
+float sobel_Stage1_c0_c0_c0_c0_c0_c0(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage1_c0_c0_c0_c0_c0_c0(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage1_c0_c0_c0_c0_c0_c0(float m[9], float surfaceScale) {
+ return pointToNormal_Stage1_c0_c0_c0_c0_c0_c0(sobel_Stage1_c0_c0_c0_c0_c0_c0(m[0], m[1], m[3], m[4], 0.0, 0.0, 0.66666698455810547), sobel_Stage1_c0_c0_c0_c0_c0_c0(m[0], m[3], m[1], m[4], 0.0, 0.0, 0.66666698455810547), surfaceScale);
+}
+vec4 SpecularLighting_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coord = vTransformedCoords_0_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage1_c0_c0_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp0 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1_c0_c0_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1_c0_c0_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage1_c0_c0_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1_c0_c0_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp5 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage1_c0_c0_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp6 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage1_c0_c0_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp7 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage1_c0_c0_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp8 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = normalize(uLightLocation_Stage1_c0_c0_c0_c0_c0_c0 - vec3(gl_FragCoord.xy, uSurfaceScale_Stage1_c0_c0_c0_c0_c0_c0 * m[4]));
+ _output = light_Stage1_c0_c0_c0_c0_c0_c0(normal_Stage1_c0_c0_c0_c0_c0_c0(m, uSurfaceScale_Stage1_c0_c0_c0_c0_c0_c0), surfaceToLight, uLightColor_Stage1_c0_c0_c0_c0_c0_c0);
+ _output *= _input;
+ return _output;
+}
+vec4 AlphaThresholdFragmentProcessor_Stage1_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 color = _input;
+ vec4 mask_color = texture(uTextureSampler_1_Stage1, vTransformedCoords_1_Stage0);
+ if (mask_color.w < 0.5) {
+ if (color.w > uouterThreshold_Stage1_c0_c0_c0_c0_c1_c0) {
+ float scale = uouterThreshold_Stage1_c0_c0_c0_c0_c1_c0 / color.w;
+ color.xyz *= scale;
+ color.w = uouterThreshold_Stage1_c0_c0_c0_c0_c1_c0;
+ }
+ } else if (color.w < uinnerThreshold_Stage1_c0_c0_c0_c0_c1_c0) {
+ float scale = uinnerThreshold_Stage1_c0_c0_c0_c0_c1_c0 / max(0.0010000000474974513, color.w);
+ color.xyz *= scale;
+ color.w = uinnerThreshold_Stage1_c0_c0_c0_c0_c1_c0;
+ }
+ _output = color;
+ return _output;
+}
+vec4 blend_difference(vec4 src, vec4 dst) {
+ return vec4((src.xyz + dst.xyz) - 2.0 * min(src.xyz * dst.w, dst.xyz * src.w), src.w + (1.0 - src.w) * dst.w);
+}
+vec4 ComposeTwo_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_difference(SpecularLighting_Stage1_c0_c0_c0_c0_c0_c0(inputColor), AlphaThresholdFragmentProcessor_Stage1_c0_c0_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 light_Stage1_c0_c0_c1_c0_c0_c0(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ vec3 halfDir = normalize(surfaceToLight + vec3(0.0, 0.0, 1.0));
+ float colorScale = uKS_Stage1_c0_c0_c1_c0_c0_c0 * pow(dot(normal, halfDir), uShininess_Stage1_c0_c0_c1_c0_c0_c0);
+ vec3 color = lightColor * clamp(colorScale, 0.0, 1.0);
+ return vec4(color, max(max(color.x, color.y), color.z));
+}
+float sobel_Stage1_c0_c0_c1_c0_c0_c0(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage1_c0_c0_c1_c0_c0_c0(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage1_c0_c0_c1_c0_c0_c0(float m[9], float surfaceScale) {
+ return pointToNormal_Stage1_c0_c0_c1_c0_c0_c0(sobel_Stage1_c0_c0_c1_c0_c0_c0(m[1], m[2], m[4], m[5], 0.0, 0.0, 0.66666698455810547), sobel_Stage1_c0_c0_c1_c0_c0_c0(0.0, 0.0, m[1], m[4], m[2], m[5], 0.66666698455810547), surfaceScale);
+}
+vec4 SpecularLighting_Stage1_c0_c0_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coord = vTransformedCoords_2_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage1_c0_c0_c1_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c1_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c1_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c1_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c1_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c1_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c1_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp0 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1_c0_c0_c1_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c1_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c1_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c1_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c1_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c1_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c1_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1_c0_c0_c1_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c1_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c1_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c1_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c1_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c1_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c1_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage1_c0_c0_c1_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c1_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c1_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c1_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c1_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c1_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c1_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c1_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c1_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c1_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c1_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c1_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c1_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1_c0_c0_c1_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c1_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c1_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c1_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c1_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c1_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c1_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp5 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage1_c0_c0_c1_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c1_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c1_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c1_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c1_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c1_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c1_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp6 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage1_c0_c0_c1_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c1_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c1_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c1_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c1_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c1_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c1_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp7 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage1_c0_c0_c1_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c1_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c1_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c1_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c1_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c1_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c1_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp8 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = normalize(uLightLocation_Stage1_c0_c0_c1_c0_c0_c0 - vec3(gl_FragCoord.xy, uSurfaceScale_Stage1_c0_c0_c1_c0_c0_c0 * m[4]));
+ _output = light_Stage1_c0_c0_c1_c0_c0_c0(normal_Stage1_c0_c0_c1_c0_c0_c0(m, uSurfaceScale_Stage1_c0_c0_c1_c0_c0_c0), surfaceToLight, uLightColor_Stage1_c0_c0_c1_c0_c0_c0);
+ _output *= _input;
+ return _output;
+}
+vec4 ConstColorProcessor_Stage1_c0_c0_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = _input.w * ucolor_Stage1_c0_c0_c1_c0_c1_c0;
+ }
+ return _output;
+}
+float _blend_color_saturation(vec3 color) {
+ return max(max(color.x, color.y), color.z) - min(min(color.x, color.y), color.z);
+}
+vec3 _blend_set_color_saturation_helper(vec3 minMidMax, float sat) {
+ if (minMidMax.x < minMidMax.z) {
+ return vec3(0.0, (sat * (minMidMax.y - minMidMax.x)) / (minMidMax.z - minMidMax.x), sat);
+ }
+ return vec3(0.0);
+}
+vec3 _blend_set_color_saturation(vec3 hueLumColor, vec3 satColor) {
+ float sat = _blend_color_saturation(satColor);
+ if (hueLumColor.x <= hueLumColor.y) {
+ if (hueLumColor.y <= hueLumColor.z) {
+ hueLumColor.xyz = _blend_set_color_saturation_helper(hueLumColor, sat);
+ } else if (hueLumColor.x <= hueLumColor.z) {
+ hueLumColor.xzy = _blend_set_color_saturation_helper(hueLumColor.xzy, sat);
+ } else {
+ hueLumColor.zxy = _blend_set_color_saturation_helper(hueLumColor.zxy, sat);
+ }
+ } else if (hueLumColor.x <= hueLumColor.z) {
+ hueLumColor.yxz = _blend_set_color_saturation_helper(hueLumColor.yxz, sat);
+ } else if (hueLumColor.y <= hueLumColor.z) {
+ hueLumColor.yzx = _blend_set_color_saturation_helper(hueLumColor.yzx, sat);
+ } else {
+ hueLumColor.zyx = _blend_set_color_saturation_helper(hueLumColor.zyx, sat);
+ }
+ return hueLumColor;
+}
+float _blend_color_luminance(vec3 color) {
+ return dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), color);
+}
+vec3 _blend_set_color_luminance(vec3 hueSatColor, float alpha, vec3 lumColor) {
+ float lum = _blend_color_luminance(lumColor);
+ vec3 result = (lum - _blend_color_luminance(hueSatColor)) + hueSatColor;
+ float minComp = min(min(result.x, result.y), result.z);
+ float maxComp = max(max(result.x, result.y), result.z);
+ if (minComp < 0.0 && lum != minComp) {
+ result = lum + ((result - lum) * lum) / (lum - minComp);
+ }
+ if (maxComp > alpha && maxComp != lum) {
+ return lum + ((result - lum) * (alpha - lum)) / (maxComp - lum);
+ }
+ return result;
+}
+vec4 blend_hue(vec4 src, vec4 dst) {
+ float alpha = dst.w * src.w;
+ vec3 sda = src.xyz * dst.w;
+ vec3 dsa = dst.xyz * src.w;
+ return vec4((((_blend_set_color_luminance(_blend_set_color_saturation(sda, dsa), alpha, dsa) + dst.xyz) - dsa) + src.xyz) - sda, (src.w + dst.w) - alpha);
+}
+vec4 ComposeTwo_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_hue(SpecularLighting_Stage1_c0_c0_c1_c0_c0_c0(inputColor), ConstColorProcessor_Stage1_c0_c0_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 blend_dst_atop(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src + src.w * dst;
+}
+vec4 ComposeTwo_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_dst_atop(ComposeTwo_Stage1_c0_c0_c0_c0(inputColor), ComposeTwo_Stage1_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 EllipticalRRect_Stage1_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 dxy0 = uinnerRect_Stage1_c1_c0_c0_c0.xy - gl_FragCoord.xy;
+ vec2 dxy1 = gl_FragCoord.xy - uinnerRect_Stage1_c1_c0_c0_c0.zw;
+ vec2 dxy = max(max(dxy0, dxy1), 0.0);
+ vec2 Z = dxy * uinvRadiiXY_Stage1_c1_c0_c0_c0;
+ float implicit = dot(Z, dxy) - 1.0;
+ float grad_dot = 4.0 * dot(Z, Z);
+ grad_dot = max(grad_dot, 9.9999997473787516e-05);
+ float approx_dist = implicit * inversesqrt(grad_dot);
+ float alpha = clamp(0.5 - approx_dist, 0.0, 1.0);
+ _output = _input * alpha;
+ return _output;
+}
+vec4 light_Stage1_c1_c0_c1_c0_c0_c0(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ vec3 halfDir = normalize(surfaceToLight + vec3(0.0, 0.0, 1.0));
+ float colorScale = uKS_Stage1_c1_c0_c1_c0_c0_c0 * pow(dot(normal, halfDir), uShininess_Stage1_c1_c0_c1_c0_c0_c0);
+ vec3 color = lightColor * clamp(colorScale, 0.0, 1.0);
+ return vec4(color, max(max(color.x, color.y), color.z));
+}
+float sobel_Stage1_c1_c0_c1_c0_c0_c0(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage1_c1_c0_c1_c0_c0_c0(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage1_c1_c0_c1_c0_c0_c0(float m[9], float surfaceScale) {
+ return pointToNormal_Stage1_c1_c0_c1_c0_c0_c0(sobel_Stage1_c1_c0_c1_c0_c0_c0(m[1], m[2], m[4], m[5], m[7], m[8], 0.5), sobel_Stage1_c1_c0_c1_c0_c0_c0(0.0, 0.0, m[1], m[7], m[2], m[8], 0.33333298563957214), surfaceScale);
+}
+vec3 lightColor_Stage1_c1_c0_c1_c0_c0_c0(vec3 surfaceToLight) {
+ float cosAngle = -dot(surfaceToLight, uS_Stage1_c1_c0_c1_c0_c0_c0);
+ if (cosAngle < uCosOuterConeAngle_Stage1_c1_c0_c1_c0_c0_c0) {
+ return vec3(0.0);
+ }
+ float scale = pow(cosAngle, uExponent_Stage1_c1_c0_c1_c0_c0_c0);
+ if (cosAngle < uCosInnerConeAngle_Stage1_c1_c0_c1_c0_c0_c0) {
+ return ((uLightColor_Stage1_c1_c0_c1_c0_c0_c0 * scale) * (cosAngle - uCosOuterConeAngle_Stage1_c1_c0_c1_c0_c0_c0)) * uConeScale_Stage1_c1_c0_c1_c0_c0_c0;
+ }
+ return uLightColor_Stage1_c1_c0_c1_c0_c0_c0;
+}
+vec4 SpecularLighting_Stage1_c1_c0_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coord = vTransformedCoords_3_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage1_c1_c0_c1_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c1_c0_c0_c0.xy, uTexDom_Stage1_c1_c0_c1_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_3_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c1_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c1_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c1_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c1_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp0 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1_c1_c0_c1_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c1_c0_c0_c0.xy, uTexDom_Stage1_c1_c0_c1_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_3_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c1_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c1_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c1_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c1_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1_c1_c0_c1_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c1_c0_c0_c0.xy, uTexDom_Stage1_c1_c0_c1_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_3_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c1_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c1_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c1_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c1_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage1_c1_c0_c1_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c1_c0_c0_c0.xy, uTexDom_Stage1_c1_c0_c1_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_3_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c1_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c1_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c1_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c1_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c1_c0_c0_c0.xy, uTexDom_Stage1_c1_c0_c1_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_3_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c1_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c1_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c1_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c1_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1_c1_c0_c1_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c1_c0_c0_c0.xy, uTexDom_Stage1_c1_c0_c1_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_3_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c1_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c1_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c1_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c1_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp5 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage1_c1_c0_c1_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c1_c0_c0_c0.xy, uTexDom_Stage1_c1_c0_c1_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_3_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c1_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c1_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c1_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c1_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp6 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage1_c1_c0_c1_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c1_c0_c0_c0.xy, uTexDom_Stage1_c1_c0_c1_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_3_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c1_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c1_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c1_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c1_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp7 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage1_c1_c0_c1_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c1_c0_c0_c0.xy, uTexDom_Stage1_c1_c0_c1_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_3_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c1_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c1_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c1_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c1_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp8 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = normalize(uLightLocation_Stage1_c1_c0_c1_c0_c0_c0 - vec3(gl_FragCoord.xy, uSurfaceScale_Stage1_c1_c0_c1_c0_c0_c0 * m[4]));
+ _output = light_Stage1_c1_c0_c1_c0_c0_c0(normal_Stage1_c1_c0_c1_c0_c0_c0(m, uSurfaceScale_Stage1_c1_c0_c1_c0_c0_c0), surfaceToLight, lightColor_Stage1_c1_c0_c1_c0_c0_c0(surfaceToLight));
+ _output *= _input;
+ return _output;
+}
+vec4 light_Stage1_c1_c0_c1_c0_c1_c0(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ vec3 halfDir = normalize(surfaceToLight + vec3(0.0, 0.0, 1.0));
+ float colorScale = uKS_Stage1_c1_c0_c1_c0_c1_c0 * pow(dot(normal, halfDir), uShininess_Stage1_c1_c0_c1_c0_c1_c0);
+ vec3 color = lightColor * clamp(colorScale, 0.0, 1.0);
+ return vec4(color, max(max(color.x, color.y), color.z));
+}
+float sobel_Stage1_c1_c0_c1_c0_c1_c0(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage1_c1_c0_c1_c0_c1_c0(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage1_c1_c0_c1_c0_c1_c0(float m[9], float surfaceScale) {
+ return pointToNormal_Stage1_c1_c0_c1_c0_c1_c0(sobel_Stage1_c1_c0_c1_c0_c1_c0(m[1], m[2], m[4], m[5], m[7], m[8], 0.5), sobel_Stage1_c1_c0_c1_c0_c1_c0(0.0, 0.0, m[1], m[7], m[2], m[8], 0.33333298563957214), surfaceScale);
+}
+vec3 lightColor_Stage1_c1_c0_c1_c0_c1_c0(vec3 surfaceToLight) {
+ float cosAngle = -dot(surfaceToLight, uS_Stage1_c1_c0_c1_c0_c1_c0);
+ if (cosAngle < uCosOuterConeAngle_Stage1_c1_c0_c1_c0_c1_c0) {
+ return vec3(0.0);
+ }
+ float scale = pow(cosAngle, uExponent_Stage1_c1_c0_c1_c0_c1_c0);
+ if (cosAngle < uCosInnerConeAngle_Stage1_c1_c0_c1_c0_c1_c0) {
+ return ((uLightColor_Stage1_c1_c0_c1_c0_c1_c0 * scale) * (cosAngle - uCosOuterConeAngle_Stage1_c1_c0_c1_c0_c1_c0)) * uConeScale_Stage1_c1_c0_c1_c0_c1_c0;
+ }
+ return uLightColor_Stage1_c1_c0_c1_c0_c1_c0;
+}
+vec4 SpecularLighting_Stage1_c1_c0_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coord = vTransformedCoords_4_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage1_c1_c0_c1_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c1_c0_c1_c0.xy, uTexDom_Stage1_c1_c0_c1_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_4_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c1_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c1_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c1_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c1_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp0 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1_c1_c0_c1_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c1_c0_c1_c0.xy, uTexDom_Stage1_c1_c0_c1_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_4_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c1_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c1_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c1_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c1_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1_c1_c0_c1_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c1_c0_c1_c0.xy, uTexDom_Stage1_c1_c0_c1_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_4_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c1_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c1_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c1_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c1_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage1_c1_c0_c1_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c1_c0_c1_c0.xy, uTexDom_Stage1_c1_c0_c1_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_4_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c1_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c1_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c1_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c1_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c1_c0_c1_c0.xy, uTexDom_Stage1_c1_c0_c1_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_4_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c1_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c1_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c1_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c1_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1_c1_c0_c1_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c1_c0_c1_c0.xy, uTexDom_Stage1_c1_c0_c1_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_4_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c1_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c1_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c1_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c1_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp5 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage1_c1_c0_c1_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c1_c0_c1_c0.xy, uTexDom_Stage1_c1_c0_c1_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_4_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c1_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c1_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c1_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c1_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp6 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage1_c1_c0_c1_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c1_c0_c1_c0.xy, uTexDom_Stage1_c1_c0_c1_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_4_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c1_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c1_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c1_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c1_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp7 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage1_c1_c0_c1_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c1_c0_c1_c0.xy, uTexDom_Stage1_c1_c0_c1_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_4_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c1_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c1_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c1_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c1_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp8 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = normalize(uLightLocation_Stage1_c1_c0_c1_c0_c1_c0 - vec3(gl_FragCoord.xy, uSurfaceScale_Stage1_c1_c0_c1_c0_c1_c0 * m[4]));
+ _output = light_Stage1_c1_c0_c1_c0_c1_c0(normal_Stage1_c1_c0_c1_c0_c1_c0(m, uSurfaceScale_Stage1_c1_c0_c1_c0_c1_c0), surfaceToLight, lightColor_Stage1_c1_c0_c1_c0_c1_c0(surfaceToLight));
+ _output *= _input;
+ return _output;
+}
+vec4 blend_luminosity(vec4 src, vec4 dst) {
+ float alpha = dst.w * src.w;
+ vec3 sda = src.xyz * dst.w;
+ vec3 dsa = dst.xyz * src.w;
+ return vec4((((_blend_set_color_luminance(dsa, alpha, sda) + dst.xyz) - dsa) + src.xyz) - sda, (src.w + dst.w) - alpha);
+}
+vec4 ComposeTwo_Stage1_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_luminosity(SpecularLighting_Stage1_c1_c0_c1_c0_c0_c0(inputColor), SpecularLighting_Stage1_c1_c0_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 blend_saturation(vec4 src, vec4 dst) {
+ float alpha = dst.w * src.w;
+ vec3 sda = src.xyz * dst.w;
+ vec3 dsa = dst.xyz * src.w;
+ return vec4((((_blend_set_color_luminance(_blend_set_color_saturation(dsa, sda), alpha, dsa) + dst.xyz) - dsa) + src.xyz) - sda, (src.w + dst.w) - alpha);
+}
+vec4 ComposeTwo_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_saturation(EllipticalRRect_Stage1_c1_c0_c0_c0(inputColor), ComposeTwo_Stage1_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+float _blend_overlay_component(float sc, float sa, float dc, float da) {
+ if (2.0 * dc <= da) {
+ return (2.0 * sc) * dc;
+ }
+ return sa * da - (2.0 * (da - dc)) * (sa - sc);
+}
+vec4 blend_overlay(vec4 src, vec4 dst) {
+ vec4 result = vec4(_blend_overlay_component(src.x, src.w, dst.x, dst.w), _blend_overlay_component(src.y, src.w, dst.y, dst.w), _blend_overlay_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+ result.xyz += dst.xyz * (1.0 - src.w) + src.xyz * (1.0 - dst.w);
+ return result;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ float alpha = 1.0;
+ alpha = vinCoverage_Stage0;
+ outputCoverage_Stage0 = vec4(alpha);
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_overlay(ComposeTwo_Stage1_c0_c0(inputColor), ComposeTwo_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ if (all(lessThanEqual(outputCoverage_Stage0.xyz, vec3(0.0)))) {
+ discard;
+ }
+ vec2 _dstTexCoord = (gl_FragCoord.xy - uDstTextureUpperLeft_Stage2) * uDstTextureCoordScale_Stage2;
+ _dstTexCoord.y = 1.0 - _dstTexCoord.y;
+ vec4 _dstColor = texture(uDstTextureSampler_Stage2, _dstTexCoord);
+ sk_FragColor = blend_dst_atop(output_Stage1, _dstColor);
+ sk_FragColor = outputCoverage_Stage0 * sk_FragColor + (vec4(1.0) - outputCoverage_Stage0) * _dstColor;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+uniform mat3 uCoordTransformMatrix_3_Stage0;
+uniform mat3 uCoordTransformMatrix_4_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in float inCoverage;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+noperspective out vec2 vTransformedCoords_3_Stage0;
+noperspective out vec2 vTransformedCoords_4_Stage0;
+noperspective out float vinCoverage_Stage0;
+void main() {
+ vec4 color = inColor;
+ vcolor_Stage0 = color;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_3_Stage0 = (uCoordTransformMatrix_3_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_4_Stage0 = (uCoordTransformMatrix_4_Stage0 * vec3(inPosition, 1.0)).xy;
+ vinCoverage_Stage0 = inCoverage;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/169-2.shader_test b/shaders/skia/169-2.shader_test
new file mode 100644
index 0000000..fd245ec
--- /dev/null
+++ b/shaders/skia/169-2.shader_test
@@ -0,0 +1,75 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage2_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c1_c0;
+ }
+ return _output;
+}
+vec4 blend_dst_atop(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src + src.w * dst;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_dst_atop(ConstColorProcessor_Stage2_c1_c0(vec4(1.0)), output_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/169-4.shader_test b/shaders/skia/169-4.shader_test
new file mode 100644
index 0000000..0c2dee3
--- /dev/null
+++ b/shaders/skia/169-4.shader_test
@@ -0,0 +1,117 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+uniform vec2 uDstTextureUpperLeft_Stage2;
+uniform vec2 uDstTextureCoordScale_Stage2;
+uniform sampler2D uTextureSampler_0_Stage0;
+uniform sampler2D uDstTextureSampler_Stage2;
+noperspective in vec2 vTextureCoords_Stage0;
+flat in int vTexIndex_Stage0;
+noperspective in vec4 vinColor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ t.x = fract(t.x);
+ }
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+float _blend_color_luminance(vec3 color) {
+ return dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), color);
+}
+vec3 _blend_set_color_luminance(vec3 hueSatColor, float alpha, vec3 lumColor) {
+ float lum = _blend_color_luminance(lumColor);
+ vec3 result = (lum - _blend_color_luminance(hueSatColor)) + hueSatColor;
+ float minComp = min(min(result.x, result.y), result.z);
+ float maxComp = max(max(result.x, result.y), result.z);
+ if (minComp < 0.0 && lum != minComp) {
+ result = lum + ((result - lum) * lum) / (lum - minComp);
+ }
+ if (maxComp > alpha && maxComp != lum) {
+ return lum + ((result - lum) * (alpha - lum)) / (maxComp - lum);
+ }
+ return result;
+}
+vec4 blend_color(vec4 src, vec4 dst) {
+ float alpha = dst.w * src.w;
+ vec3 sda = src.xyz * dst.w;
+ vec3 dsa = dst.xyz * src.w;
+ return vec4((((_blend_set_color_luminance(sda, alpha, dsa) + dst.xyz) - dsa) + src.xyz) - sda, (src.w + dst.w) - alpha);
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ vec4 texColor;
+ {
+ texColor = texture(uTextureSampler_0_Stage0, vTextureCoords_Stage0);
+ }
+ outputCoverage_Stage0 = texColor;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TiledGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ if (all(lessThanEqual(outputCoverage_Stage0.xyz, vec3(0.0)))) {
+ discard;
+ }
+ vec2 _dstTexCoord = (gl_FragCoord.xy - uDstTextureUpperLeft_Stage2) * uDstTextureCoordScale_Stage2;
+ _dstTexCoord.y = 1.0 - _dstTexCoord.y;
+ vec4 _dstColor = texture(uDstTextureSampler_Stage2, _dstTexCoord);
+ sk_FragColor = blend_color(output_Stage1, _dstColor);
+ float lerpRed = mix(_dstColor.w, sk_FragColor.w, outputCoverage_Stage0.x);
+ float lerpBlue = mix(_dstColor.w, sk_FragColor.w, outputCoverage_Stage0.y);
+ float lerpGreen = mix(_dstColor.w, sk_FragColor.w, outputCoverage_Stage0.z);
+ sk_FragColor = outputCoverage_Stage0 * sk_FragColor + (vec4(1.0) - outputCoverage_Stage0) * _dstColor;
+ sk_FragColor.w = max(max(lerpRed, lerpBlue), lerpGreen);
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform vec2 uAtlasSizeInv_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in uvec2 inTextureCoords;
+noperspective out vec2 vTextureCoords_Stage0;
+flat out int vTexIndex_Stage0;
+noperspective out vec4 vinColor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ ivec2 signedCoords = ivec2(int(inTextureCoords.x), int(inTextureCoords.y));
+ vec2 unormTexCoords = vec2(float(signedCoords.x / 2), float(signedCoords.y / 2));
+ vTextureCoords_Stage0 = unormTexCoords * uAtlasSizeInv_Stage0;
+ vTexIndex_Stage0 = 0;
+ vinColor_Stage0 = inColor;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(inPosition.x, inPosition.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/169-8.shader_test b/shaders/skia/169-8.shader_test
new file mode 100644
index 0000000..1578e5f
--- /dev/null
+++ b/shaders/skia/169-8.shader_test
@@ -0,0 +1,52 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec3 uedges_Stage2[3];
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ float alpha = 1.0;
+ float edge;
+ edge = dot(uedges_Stage2[0], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage2[1], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage2[2], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ alpha = 1.0 - alpha;
+ output_Stage2 = output_Stage1 * alpha;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/169.shader_test b/shaders/skia/169.shader_test
new file mode 100644
index 0000000..6ead35e
--- /dev/null
+++ b/shaders/skia/169.shader_test
@@ -0,0 +1,91 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 ucolor_Stage1_c0_c0_c0_c0;
+uniform vec4 ucolor_Stage2;
+uniform vec4 ucolor_Stage3_c1_c0;
+noperspective in vec4 vcolor_Stage0;
+vec4 ConstColorProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = _input.w * ucolor_Stage1_c0_c0_c0_c0;
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = ConstColorProcessor_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 ConstColorProcessor_Stage3_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage3_c1_c0;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 blend_darken(vec4 src, vec4 dst) {
+ vec4 result = blend_src_over(src, dst);
+ result.xyz = min(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
+ return result;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_dst_in(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ {
+ output_Stage2 = output_Stage1 * ucolor_Stage2;
+ }
+ }
+ vec4 output_Stage3;
+ {
+ output_Stage3 = blend_darken(ConstColorProcessor_Stage3_c1_c0(vec4(1.0)), output_Stage2);
+ }
+ {
+ sk_FragColor = output_Stage3;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 position;
+in vec4 inColor;
+noperspective out vec4 vcolor_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1699.shader_test b/shaders/skia/1699.shader_test
new file mode 100644
index 0000000..bb263d3
--- /dev/null
+++ b/shaders/skia/1699.shader_test
@@ -0,0 +1,419 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_KHR_blend_equation_advanced : require
+out vec4 sk_FragColor;
+layout (blend_support_all_equations) out ;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 uscale01_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias01_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale23_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias23_Stage1_c0_c0_c1_c0;
+uniform float uthreshold_Stage1_c0_c0_c1_c0;
+uniform vec4 uleftBorderColor_Stage2_c1_c0;
+uniform vec4 urightBorderColor_Stage2_c1_c0;
+uniform vec4 uscale0_1_Stage2_c1_c0_c1_c0;
+uniform vec4 uscale2_3_Stage2_c1_c0_c1_c0;
+uniform vec4 uscale4_5_Stage2_c1_c0_c1_c0;
+uniform vec4 ubias0_1_Stage2_c1_c0_c1_c0;
+uniform vec4 ubias2_3_Stage2_c1_c0_c1_c0;
+uniform vec4 ubias4_5_Stage2_c1_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage2_c1_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage2_c1_c0_c1_c0;
+uniform float uinnerThreshold_Stage3;
+uniform float uouterThreshold_Stage3;
+uniform vec2 uImageIncrement_Stage4;
+uniform vec4 uKernel_Stage4[2];
+uniform vec2 uKernelOffset_Stage4;
+uniform float uGain_Stage4;
+uniform float uBias_Stage4;
+uniform vec4 uTexDom_Stage4;
+uniform vec4 uleftBorderColor_Stage5_c2_c0;
+uniform vec4 urightBorderColor_Stage5_c2_c0;
+uniform float ubias_Stage5_c2_c0_c0_c0;
+uniform float uscale_Stage5_c2_c0_c0_c0;
+uniform vec4 uscale0_1_Stage5_c2_c0_c1_c0;
+uniform vec4 uscale2_3_Stage5_c2_c0_c1_c0;
+uniform vec4 uscale4_5_Stage5_c2_c0_c1_c0;
+uniform vec4 uscale6_7_Stage5_c2_c0_c1_c0;
+uniform vec4 uscale8_9_Stage5_c2_c0_c1_c0;
+uniform vec4 ubias0_1_Stage5_c2_c0_c1_c0;
+uniform vec4 ubias2_3_Stage5_c2_c0_c1_c0;
+uniform vec4 ubias4_5_Stage5_c2_c0_c1_c0;
+uniform vec4 ubias6_7_Stage5_c2_c0_c1_c0;
+uniform vec4 ubias8_9_Stage5_c2_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage5_c2_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage5_c2_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage0;
+uniform sampler2D uTextureSampler_0_Stage3;
+uniform sampler2D uTextureSampler_0_Stage4;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+noperspective in vec2 vTransformedCoords_3_Stage0;
+noperspective in vec2 vTransformedCoords_4_Stage0;
+noperspective in vec2 vtextureCoords_Stage0;
+flat in vec4 vtextureDomain_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_0_Stage0;
+ float t = -1.0;
+ {
+ {
+ float invR1 = ufocalParams_Stage1_c0_c0_c0_c0.x;
+ float x_t = -1.0;
+ {
+ x_t = length(p) - p.x * invR1;
+ }
+ {
+ {
+ t = x_t;
+ }
+ }
+ }
+ }
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 DualIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthreshold_Stage1_c0_c0_c1_c0) {
+ scale = uscale01_Stage1_c0_c0_c1_c0;
+ bias = ubias01_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale23_Stage1_c0_c0_c1_c0;
+ bias = ubias23_Stage1_c0_c0_c1_c0;
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else {
+ {
+ t.x = fract(t.x);
+ }
+ _output = DualIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 LinearGradientLayout_Stage2_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_1_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage2_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage2_c1_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage2_c1_c0_c1_c0.x) {
+ scale = uscale0_1_Stage2_c1_c0_c1_c0;
+ bias = ubias0_1_Stage2_c1_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage2_c1_c0_c1_c0;
+ bias = ubias2_3_Stage2_c1_c0_c1_c0;
+ }
+ } else {
+ {
+ scale = uscale4_5_Stage2_c1_c0_c1_c0;
+ bias = ubias4_5_Stage2_c1_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage2_c1_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage2_c1_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage2_c1_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage2_c1_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 SweepGradientLayout_Stage5_c2_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float angle;
+ {
+ angle = atan(-vTransformedCoords_4_Stage0.y, -vTransformedCoords_4_Stage0.x);
+ }
+ float t = ((angle * 0.15915493667125702 + 0.5) + ubias_Stage5_c2_c0_c0_c0) * uscale_Stage5_c2_c0_c0_c0;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage5_c2_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthresholds1_7_Stage5_c2_c0_c1_c0.w) {
+ if (t < uthresholds1_7_Stage5_c2_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage5_c2_c0_c1_c0.x) {
+ scale = uscale0_1_Stage5_c2_c0_c1_c0;
+ bias = ubias0_1_Stage5_c2_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage5_c2_c0_c1_c0;
+ bias = ubias2_3_Stage5_c2_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage5_c2_c0_c1_c0.z) {
+ scale = uscale4_5_Stage5_c2_c0_c1_c0;
+ bias = ubias4_5_Stage5_c2_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage5_c2_c0_c1_c0;
+ bias = ubias6_7_Stage5_c2_c0_c1_c0;
+ }
+ }
+ } else {
+ {
+ {
+ scale = uscale8_9_Stage5_c2_c0_c1_c0;
+ bias = ubias8_9_Stage5_c2_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage5_c2_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = SweepGradientLayout_Stage5_c2_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage5_c2_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage5_c2_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage5_c2_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ vec2 textureCoords;
+ textureCoords = vtextureCoords_Stage0;
+ vec4 textureDomain;
+ textureDomain = vtextureDomain_Stage0;
+ outputColor_Stage0 = vcolor_Stage0;
+ outputColor_Stage0 = texture(uTextureSampler_0_Stage0, clamp(textureCoords, textureDomain.xy, textureDomain.zw)) * outputColor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_dst_in(outputColor_Stage0, TiledGradientEffect_Stage1_c0_c0(vec4(1.0)));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_dst_in(vec4(1.0), ClampedGradientEffect_Stage2_c1_c0(vec4(1.0)));
+ }
+ vec4 output_Stage3;
+ {
+ vec4 color = output_Stage2;
+ vec4 mask_color = texture(uTextureSampler_0_Stage3, vTransformedCoords_2_Stage0);
+ if (mask_color.w < 0.5) {
+ if (color.w > uouterThreshold_Stage3) {
+ float scale = uouterThreshold_Stage3 / color.w;
+ color.xyz *= scale;
+ color.w = uouterThreshold_Stage3;
+ }
+ } else if (color.w < uinnerThreshold_Stage3) {
+ float scale = uinnerThreshold_Stage3 / max(0.0010000000474974513, color.w);
+ color.xyz *= scale;
+ color.w = uinnerThreshold_Stage3;
+ }
+ output_Stage3 = color;
+ }
+ vec4 output_Stage4;
+ {
+ vec4 sum = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_3_Stage0 - uKernelOffset_Stage4 * uImageIncrement_Stage4;
+ vec4 c;
+ {
+ float k = uKernel_Stage4[0].x;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage4.xy, uTexDom_Stage4.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage4, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage4[0].y;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage4;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage4.xy, uTexDom_Stage4.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage4, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage4[0].z;
+ {
+ vec2 origCoord = coord + vec2(2.0, 0.0) * uImageIncrement_Stage4;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage4.xy, uTexDom_Stage4.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage4, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage4[0].w;
+ {
+ vec2 origCoord = coord + vec2(3.0, 0.0) * uImageIncrement_Stage4;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage4.xy, uTexDom_Stage4.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage4, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage4[1].x;
+ {
+ vec2 origCoord = coord + vec2(4.0, 0.0) * uImageIncrement_Stage4;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage4.xy, uTexDom_Stage4.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage4, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage4[1].y;
+ {
+ vec2 origCoord = coord + vec2(5.0, 0.0) * uImageIncrement_Stage4;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage4.xy, uTexDom_Stage4.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage4, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage4[1].z;
+ {
+ vec2 origCoord = coord + vec2(6.0, 0.0) * uImageIncrement_Stage4;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage4.xy, uTexDom_Stage4.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage4, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage4[1].w;
+ {
+ vec2 origCoord = coord + vec2(7.0, 0.0) * uImageIncrement_Stage4;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage4.xy, uTexDom_Stage4.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage4, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ vec2 origCoord = vTransformedCoords_3_Stage0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage4.xy, uTexDom_Stage4.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage4, clampedCoord);
+ c = textureColor;
+ }
+ output_Stage4.w = c.w;
+ output_Stage4.xyz = clamp(sum.xyz * uGain_Stage4 + uBias_Stage4, 0.0, 1.0);
+ output_Stage4.xyz *= output_Stage4.w;
+ output_Stage4 *= output_Stage3;
+ }
+ vec4 output_Stage5;
+ {
+ output_Stage5 = blend_dst_in(output_Stage4, ClampedGradientEffect_Stage5_c2_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage5 * output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+uniform mat3 uCoordTransformMatrix_3_Stage0;
+uniform mat3 uCoordTransformMatrix_4_Stage0;
+in vec2 position;
+in vec2 textureCoords;
+in vec4 textureDomain;
+in vec4 color;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+noperspective out vec2 vTransformedCoords_3_Stage0;
+noperspective out vec2 vTransformedCoords_4_Stage0;
+noperspective out vec2 vtextureCoords_Stage0;
+flat out vec4 vtextureDomain_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vec2 pos2 = position;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(textureCoords, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(textureCoords, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(textureCoords, 1.0)).xy;
+ vTransformedCoords_3_Stage0 = (uCoordTransformMatrix_3_Stage0 * vec3(textureCoords, 1.0)).xy;
+ vTransformedCoords_4_Stage0 = (uCoordTransformMatrix_4_Stage0 * vec3(textureCoords, 1.0)).xy;
+ vtextureCoords_Stage0 = textureCoords;
+ vtextureDomain_Stage0 = textureDomain;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1702.shader_test b/shaders/skia/1702.shader_test
new file mode 100644
index 0000000..a3721d2
--- /dev/null
+++ b/shaders/skia/1702.shader_test
@@ -0,0 +1,169 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_KHR_blend_equation_advanced : require
+out vec4 sk_FragColor;
+layout (blend_support_all_equations) out ;
+uniform mat4 um_Stage1_c0_c0_c0_c0_c0_c0;
+uniform vec4 uv_Stage1_c0_c0_c0_c0_c0_c0;
+uniform vec4 urectH_Stage1_c0_c0_c1_c0_c0_c0;
+uniform float uinvSixSigma_Stage1_c0_c0_c1_c0_c0_c0;
+uniform mat4 um_Stage1_c0_c0_c1_c0_c1_c0;
+uniform vec4 uv_Stage1_c0_c0_c1_c0_c1_c0;
+uniform vec4 ucolor_Stage1_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec4 vQuadEdge_Stage0;
+noperspective in vec4 vinColor_Stage0;
+vec4 ColorMatrixFragmentProcessor_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = _input;
+ {
+ float nonZeroAlpha = max(inputColor.w, 9.9999997473787516e-05);
+ inputColor = vec4(inputColor.xyz / nonZeroAlpha, inputColor.w);
+ }
+ _output = um_Stage1_c0_c0_c0_c0_c0_c0 * inputColor + uv_Stage1_c0_c0_c0_c0_c0_c0;
+ {
+ _output = clamp(_output, 0.0, 1.0);
+ }
+ return _output;
+}
+vec4 Big_Ole_Key_Stage1_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = _input;
+ return _output;
+}
+float _guarded_divide(float n, float d) {
+ return n / d;
+}
+float _color_dodge_component(float sc, float sa, float dc, float da) {
+ if (dc == 0.0) {
+ return sc * (1.0 - da);
+ } else {
+ float d = sa - sc;
+ if (d == 0.0) {
+ return (sa * da + sc * (1.0 - da)) + dc * (1.0 - sa);
+ }
+ d = min(da, _guarded_divide(dc * sa, d));
+ return (d * sa + sc * (1.0 - da)) + dc * (1.0 - sa);
+ }
+}
+vec4 blend_color_dodge(vec4 src, vec4 dst) {
+ return vec4(_color_dodge_component(src.x, src.w, dst.x, dst.w), _color_dodge_component(src.y, src.w, dst.y, dst.w), _color_dodge_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+}
+vec4 ComposeTwo_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_color_dodge(ColorMatrixFragmentProcessor_Stage1_c0_c0_c0_c0_c0_c0(inputColor), Big_Ole_Key_Stage1_c0_c0_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 RectBlurEffect_Stage1_c0_c0_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float xCoverage, yCoverage;
+ {
+ float x, y;
+ {
+ x = max(urectH_Stage1_c0_c0_c1_c0_c0_c0.x - gl_FragCoord.x, gl_FragCoord.x - urectH_Stage1_c0_c0_c1_c0_c0_c0.z);
+ y = max(urectH_Stage1_c0_c0_c1_c0_c0_c0.y - gl_FragCoord.y, gl_FragCoord.y - urectH_Stage1_c0_c0_c1_c0_c0_c0.w);
+ }
+ xCoverage = texture(uTextureSampler_0_Stage1, vec2(x * uinvSixSigma_Stage1_c0_c0_c1_c0_c0_c0, 0.5)).w;
+ yCoverage = texture(uTextureSampler_0_Stage1, vec2(y * uinvSixSigma_Stage1_c0_c0_c1_c0_c0_c0, 0.5)).w;
+ _output = (_input * xCoverage) * yCoverage;
+ }
+ _output = (_input * xCoverage) * yCoverage;
+ return _output;
+}
+vec4 ColorMatrixFragmentProcessor_Stage1_c0_c0_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = _input;
+ {
+ float nonZeroAlpha = max(inputColor.w, 9.9999997473787516e-05);
+ inputColor = vec4(inputColor.xyz / nonZeroAlpha, inputColor.w);
+ }
+ _output = um_Stage1_c0_c0_c1_c0_c1_c0 * inputColor + uv_Stage1_c0_c0_c1_c0_c1_c0;
+ {
+ _output.w = clamp(_output.w, 0.0, 1.0);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 ComposeTwo_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_src_in(RectBlurEffect_Stage1_c0_c0_c1_c0_c0_c0(inputColor), ColorMatrixFragmentProcessor_Stage1_c0_c0_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 ComposeTwo_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_src_over(ComposeTwo_Stage1_c0_c0_c0_c0(inputColor), ComposeTwo_Stage1_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 ConstColorProcessor_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage1_c1_c0;
+ }
+ return _output;
+}
+vec4 blend_exclusion(vec4 src, vec4 dst) {
+ return vec4((dst.xyz + src.xyz) - (2.0 * dst.xyz) * src.xyz, src.w + (1.0 - src.w) * dst.w);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vinColor_Stage0;
+ float edgeAlpha;
+ vec2 duvdx = dFdx(vQuadEdge_Stage0.xy);
+ vec2 duvdy = dFdy(vQuadEdge_Stage0.xy);
+ if (vQuadEdge_Stage0.z > 0.0 && vQuadEdge_Stage0.w > 0.0) {
+ edgeAlpha = min(min(vQuadEdge_Stage0.z, vQuadEdge_Stage0.w) + 0.5, 1.0);
+ } else {
+ vec2 gF = vec2((2.0 * vQuadEdge_Stage0.x) * duvdx.x - duvdx.y, (2.0 * vQuadEdge_Stage0.x) * duvdy.x - duvdy.y);
+ edgeAlpha = vQuadEdge_Stage0.x * vQuadEdge_Stage0.x - vQuadEdge_Stage0.y;
+ edgeAlpha = clamp(0.5 - edgeAlpha / length(gF), 0.0, 1.0);
+ }
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_exclusion(ComposeTwo_Stage1_c0_c0(inputColor), ConstColorProcessor_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ sk_FragColor = outputCoverage_Stage0 * output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 inPosition;
+in vec4 inColor;
+in vec4 inQuadEdge;
+noperspective out vec4 vQuadEdge_Stage0;
+noperspective out vec4 vinColor_Stage0;
+void main() {
+ vQuadEdge_Stage0 = inQuadEdge;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = inPosition;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1705.shader_test b/shaders/skia/1705.shader_test
new file mode 100644
index 0000000..a1d3a42
--- /dev/null
+++ b/shaders/skia/1705.shader_test
@@ -0,0 +1,185 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+uniform vec4 urectUniform_Stage1;
+uniform vec4 uscale01_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias01_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale23_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias23_Stage2_c0_c0_c1_c0;
+uniform float uthreshold_Stage2_c0_c0_c1_c0;
+uniform vec4 uleftBorderColor_Stage3_c1_c0;
+uniform vec4 urightBorderColor_Stage3_c1_c0;
+uniform vec2 ufocalParams_Stage3_c1_c0_c0_c0;
+uniform vec4 uscale0_1_Stage3_c1_c0_c1_c0;
+uniform vec4 uscale2_3_Stage3_c1_c0_c1_c0;
+uniform vec4 uscale4_5_Stage3_c1_c0_c1_c0;
+uniform vec4 uscale6_7_Stage3_c1_c0_c1_c0;
+uniform vec4 uscale8_9_Stage3_c1_c0_c1_c0;
+uniform vec4 ubias0_1_Stage3_c1_c0_c1_c0;
+uniform vec4 ubias2_3_Stage3_c1_c0_c1_c0;
+uniform vec4 ubias4_5_Stage3_c1_c0_c1_c0;
+uniform vec4 ubias6_7_Stage3_c1_c0_c1_c0;
+uniform vec4 ubias8_9_Stage3_c1_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage3_c1_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage3_c1_c0_c1_c0;
+in vec4 vcolor_Stage0;
+in vec2 vTransformedCoords_0_Stage0;
+in vec2 vTransformedCoords_1_Stage0;
+vec4 RadialGradientLayout_Stage2_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = length(vTransformedCoords_0_Stage0);
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 DualIntervalGradientColorizer_Stage2_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthreshold_Stage2_c0_c0_c1_c0) {
+ scale = uscale01_Stage2_c0_c0_c1_c0;
+ bias = ubias01_Stage2_c0_c0_c1_c0;
+ } else {
+ scale = uscale23_Stage2_c0_c0_c1_c0;
+ bias = ubias23_Stage2_c0_c0_c1_c0;
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = RadialGradientLayout_Stage2_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = DualIntervalGradientColorizer_Stage2_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 TwoPointConicalGradientLayout_Stage3_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_1_Stage0;
+ float t = -1.0;
+ {
+ {
+ float r0 = ufocalParams_Stage3_c1_c0_c0_c0.x;
+ {
+ t = -length(p) - r0;
+ }
+ }
+ }
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage3_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthresholds1_7_Stage3_c1_c0_c1_c0.w) {
+ if (t < uthresholds1_7_Stage3_c1_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage3_c1_c0_c1_c0.x) {
+ scale = uscale0_1_Stage3_c1_c0_c1_c0;
+ bias = ubias0_1_Stage3_c1_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage3_c1_c0_c1_c0;
+ bias = ubias2_3_Stage3_c1_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage3_c1_c0_c1_c0.z) {
+ scale = uscale4_5_Stage3_c1_c0_c1_c0;
+ bias = ubias4_5_Stage3_c1_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage3_c1_c0_c1_c0;
+ bias = ubias6_7_Stage3_c1_c0_c1_c0;
+ }
+ }
+ } else {
+ {
+ {
+ scale = uscale8_9_Stage3_c1_c0_c1_c0;
+ bias = ubias8_9_Stage3_c1_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage3_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage3_c1_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage3_c1_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage3_c1_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage3_c1_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ float alpha;
+ {
+ float xSub, ySub;
+ xSub = min(gl_FragCoord.x - urectUniform_Stage1.x, 0.0);
+ xSub += min(urectUniform_Stage1.z - gl_FragCoord.x, 0.0);
+ ySub = min(gl_FragCoord.y - urectUniform_Stage1.y, 0.0);
+ ySub += min(urectUniform_Stage1.w - gl_FragCoord.y, 0.0);
+ alpha = (1.0 + max(xSub, -1.0)) * (1.0 + max(ySub, -1.0));
+ }
+ {
+ alpha = 1.0 - alpha;
+ }
+ output_Stage1 = vec4(alpha);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_dst_in(output_Stage1, TiledGradientEffect_Stage2_c0_c0(vec4(1.0)));
+ }
+ {
+ blend_dst_in(output_Stage2, ClampedGradientEffect_Stage3_c1_c0(vec4(1.0)));
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+out vec4 vcolor_Stage0;
+out vec2 vTransformedCoords_0_Stage0;
+out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vec4 color = inColor;
+ vcolor_Stage0 = color;
+ vec3 pos3 = uViewM_Stage0 * vec3(inPosition, 1.0);
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos3.x, pos3.y, 0.0, pos3.z);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1708.shader_test b/shaders/skia/1708.shader_test
new file mode 100644
index 0000000..01e2563
--- /dev/null
+++ b/shaders/skia/1708.shader_test
@@ -0,0 +1,164 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uellipse_Stage1;
+uniform vec4 uboundsUniform_Stage2;
+uniform float uxInvZoom_Stage2;
+uniform float uyInvZoom_Stage2;
+uniform float uxInvInset_Stage2;
+uniform float uyInvInset_Stage2;
+uniform vec2 uoffset_Stage2;
+uniform vec4 uleftBorderColor_Stage3_c0_c0;
+uniform vec4 urightBorderColor_Stage3_c0_c0;
+uniform vec4 uscale01_Stage3_c0_c0_c1_c0;
+uniform vec4 ubias01_Stage3_c0_c0_c1_c0;
+uniform vec4 uscale23_Stage3_c0_c0_c1_c0;
+uniform vec4 ubias23_Stage3_c0_c0_c1_c0;
+uniform float uthreshold_Stage3_c0_c0_c1_c0;
+uniform vec4 ucircleData_Stage4;
+uniform vec3 uedges_Stage5[5];
+uniform sampler2D uTextureSampler_0_Stage0;
+uniform sampler2D uTextureSampler_0_Stage2;
+uniform sampler2D uTextureSampler_0_Stage4;
+noperspective in vec2 vTextureCoords_Stage0;
+flat in int vTexIndex_Stage0;
+noperspective in vec4 vinColor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 RadialGradientLayout_Stage3_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = length(vTransformedCoords_1_Stage0);
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 DualIntervalGradientColorizer_Stage3_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthreshold_Stage3_c0_c0_c1_c0) {
+ scale = uscale01_Stage3_c0_c0_c1_c0;
+ bias = ubias01_Stage3_c0_c0_c1_c0;
+ } else {
+ scale = uscale23_Stage3_c0_c0_c1_c0;
+ bias = ubias23_Stage3_c0_c0_c1_c0;
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage3_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = RadialGradientLayout_Stage3_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage3_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage3_c0_c0;
+ } else {
+ _output = DualIntervalGradientColorizer_Stage3_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ {
+ vec2 d = gl_FragCoord.xy - uellipse_Stage1.xy;
+ vec2 Z = d * uellipse_Stage1.zw;
+ float grad_dot = 4.0 * dot(Z, Z);
+ {
+ grad_dot = max(grad_dot, 1.1754999560161448e-38);
+ }
+ }
+ vec4 output_Stage2;
+ {
+ vec2 coord = vTransformedCoords_0_Stage0;
+ vec2 zoom_coord = uoffset_Stage2 + coord * vec2(uxInvZoom_Stage2, uyInvZoom_Stage2);
+ vec2 delta = (coord - uboundsUniform_Stage2.xy) * uboundsUniform_Stage2.zw;
+ delta = min(delta, vec2(1.0, 1.0) - delta);
+ delta *= vec2(uxInvInset_Stage2, uyInvInset_Stage2);
+ float weight = 0.0;
+ if (delta.x < 2.0 && delta.y < 2.0) {
+ delta = vec2(2.0, 2.0) - delta;
+ float dist = length(delta);
+ dist = max(2.0 - dist, 0.0);
+ weight = min(dist * dist, 1.0);
+ } else {
+ vec2 delta_squared = delta * delta;
+ weight = min(min(delta_squared.x, delta_squared.y), 1.0);
+ }
+ output_Stage2 = texture(uTextureSampler_0_Stage2, mix(coord, zoom_coord, weight));
+ }
+ vec4 output_Stage3;
+ {
+ output_Stage3 = blend_dst_in(output_Stage2, ClampedGradientEffect_Stage3_c0_c0(vec4(1.0)));
+ }
+ vec4 output_Stage4;
+ {
+ vec2 vec = vec2((gl_FragCoord.x - ucircleData_Stage4.x) * ucircleData_Stage4.w, (gl_FragCoord.y - ucircleData_Stage4.y) * ucircleData_Stage4.w);
+ float dist = length(vec) + (0.5 - ucircleData_Stage4.z) * ucircleData_Stage4.w;
+ output_Stage4 = output_Stage3 * texture(uTextureSampler_0_Stage4, vec2(dist, 0.5)).w;
+ }
+ vec4 output_Stage5;
+ {
+ float alpha = 1.0;
+ float edge;
+ edge = dot(uedges_Stage5[0], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage5[1], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage5[2], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage5[3], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage5[4], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ alpha = 1.0 - alpha;
+ output_Stage5 = output_Stage4 * alpha;
+ }
+ {
+ sk_FragColor = output_Stage5;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform vec2 uAtlasSizeInv_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in uvec2 inTextureCoords;
+noperspective out vec2 vTextureCoords_Stage0;
+flat out int vTexIndex_Stage0;
+noperspective out vec4 vinColor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ ivec2 signedCoords = ivec2(int(inTextureCoords.x), int(inTextureCoords.y));
+ vec2 unormTexCoords = vec2(float(signedCoords.x / 2), float(signedCoords.y / 2));
+ vTextureCoords_Stage0 = unormTexCoords * uAtlasSizeInv_Stage0;
+ vTexIndex_Stage0 = 0;
+ vinColor_Stage0 = inColor;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(inPosition.x, inPosition.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1711.shader_test b/shaders/skia/1711.shader_test
new file mode 100644
index 0000000..f7536b6
--- /dev/null
+++ b/shaders/skia/1711.shader_test
@@ -0,0 +1,23 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+uniform vec4 uColor_Stage0;
+void main() {
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 inPosition;
+in vec2 inLocalCoord;
+void main() {
+ vec3 pos3 = uViewM_Stage0 * vec3(inPosition, 1.0);
+ gl_Position = vec4(pos3.x, pos3.y, 0.0, pos3.z);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1714.shader_test b/shaders/skia/1714.shader_test
new file mode 100644
index 0000000..7451760
--- /dev/null
+++ b/shaders/skia/1714.shader_test
@@ -0,0 +1,190 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform float uSrcTF_Stage0[7];
+uniform mat3 uColorXform_Stage0;
+uniform float uDstTF_Stage0[7];
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform float ubias_Stage1_c0_c0_c0_c0;
+uniform float uscale_Stage1_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage0;
+uniform sampler2D uTextureSampler_0_Stage2;
+uniform sampler2D uTextureSampler_0_Stage3;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vtextureCoords_Stage0;
+flat in vec4 vtextureDomain_Stage0;
+flat in vec4 vcolor_Stage0;
+float src_tf_Stage0(float x) {
+ float G = uSrcTF_Stage0[0];
+ float A = uSrcTF_Stage0[1];
+ float B = uSrcTF_Stage0[2];
+ float C = uSrcTF_Stage0[3];
+ float D = uSrcTF_Stage0[4];
+ float E = uSrcTF_Stage0[5];
+ float F = uSrcTF_Stage0[6];
+ float s = sign(x);
+ x = abs(x);
+ x = x < D ? C * x + F : pow(A * x + B, G) + E;
+ return s * x;
+}
+float dst_tf_Stage0(float x) {
+ float G = uDstTF_Stage0[0];
+ float A = uDstTF_Stage0[1];
+ float B = uDstTF_Stage0[2];
+ float C = uDstTF_Stage0[3];
+ float D = uDstTF_Stage0[4];
+ float E = uDstTF_Stage0[5];
+ float F = uDstTF_Stage0[6];
+ float s = sign(x);
+ x = abs(x);
+ x = x < D ? C * x + F : pow(A * x + B, G) + E;
+ return s * x;
+}
+vec4 gamut_xform_Stage0(vec4 color) {
+ color.xyz = uColorXform_Stage0 * color.xyz;
+ return color;
+}
+vec4 color_xform_Stage0(vec4 color) {
+ float nonZeroAlpha = max(color.w, 9.9999997473787516e-05);
+ color = vec4(color.xyz / nonZeroAlpha, nonZeroAlpha);
+ color.x = src_tf_Stage0(color.x);
+ color.y = src_tf_Stage0(color.y);
+ color.z = src_tf_Stage0(color.z);
+ color = gamut_xform_Stage0(color);
+ color.x = dst_tf_Stage0(color.x);
+ color.y = dst_tf_Stage0(color.y);
+ color.z = dst_tf_Stage0(color.z);
+ color.xyz *= color.w;
+ return color;
+}
+vec4 SweepGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float angle;
+ {
+ angle = atan(-vTransformedCoords_0_Stage0.y, -vTransformedCoords_0_Stage0.x);
+ }
+ float t = ((angle * 0.15915493667125702 + 0.5) + ubias_Stage1_c0_c0_c0_c0) * uscale_Stage1_c0_c0_c0_c0;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = SweepGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ vec2 textureCoords;
+ textureCoords = vtextureCoords_Stage0;
+ vec4 textureDomain;
+ textureDomain = vtextureDomain_Stage0;
+ outputColor_Stage0 = vcolor_Stage0;
+ outputColor_Stage0 = color_xform_Stage0(texture(uTextureSampler_0_Stage0, clamp(textureCoords, textureDomain.xy, textureDomain.zw))) * outputColor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_dst_in(vec4(1.0), ClampedGradientEffect_Stage1_c0_c0(vec4(1.0)));
+ }
+ vec4 output_Stage2;
+ {
+ float nonZeroAlpha = max(output_Stage1.w, 9.9999997473787516e-05);
+ vec4 coord = vec4(output_Stage1.xyz / nonZeroAlpha, nonZeroAlpha);
+ coord = coord * 0.9960939884185791 + vec4(0.0019529999699443579, 0.0019529999699443579, 0.0019529999699443579, 0.0019529999699443579);
+ output_Stage2.w = texture(uTextureSampler_0_Stage2, vec2(coord.w, 0.125)).w;
+ output_Stage2.x = texture(uTextureSampler_0_Stage2, vec2(coord.x, 0.375)).w;
+ output_Stage2.y = texture(uTextureSampler_0_Stage2, vec2(coord.y, 0.625)).w;
+ output_Stage2.z = texture(uTextureSampler_0_Stage2, vec2(coord.z, 0.875)).w;
+ output_Stage2.xyz *= output_Stage2.w;
+ }
+ vec4 output_Stage3;
+ {
+ float nonZeroAlpha = max(output_Stage2.w, 9.9999997473787516e-05);
+ vec4 coord = vec4(output_Stage2.xyz / nonZeroAlpha, nonZeroAlpha);
+ coord = coord * 0.9960939884185791 + vec4(0.0019529999699443579, 0.0019529999699443579, 0.0019529999699443579, 0.0019529999699443579);
+ output_Stage3.w = texture(uTextureSampler_0_Stage3, vec2(coord.w, 0.125)).w;
+ output_Stage3.x = texture(uTextureSampler_0_Stage3, vec2(coord.x, 0.375)).w;
+ output_Stage3.y = texture(uTextureSampler_0_Stage3, vec2(coord.y, 0.625)).w;
+ output_Stage3.z = texture(uTextureSampler_0_Stage3, vec2(coord.z, 0.875)).w;
+ output_Stage3.xyz *= output_Stage3.w;
+ }
+ {
+ sk_FragColor = output_Stage3;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 textureCoords;
+in vec4 textureDomain;
+in vec4 color;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vtextureCoords_Stage0;
+flat out vec4 vtextureDomain_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vec2 pos2 = position;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(textureCoords, 1.0)).xy;
+ vtextureCoords_Stage0 = textureCoords;
+ vtextureDomain_Stage0 = textureDomain;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/172-2.shader_test b/shaders/skia/172-2.shader_test
new file mode 100644
index 0000000..1343e11
--- /dev/null
+++ b/shaders/skia/172-2.shader_test
@@ -0,0 +1,79 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage2_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c1_c0;
+ }
+ return _output;
+}
+vec4 blend_dst_atop(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src + src.w * dst;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_dst_atop(ConstColorProcessor_Stage2_c1_c0(vec4(1.0)), output_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/172-3.shader_test b/shaders/skia/172-3.shader_test
new file mode 100644
index 0000000..47b276b
--- /dev/null
+++ b/shaders/skia/172-3.shader_test
@@ -0,0 +1,193 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform float uSurfaceScale_Stage1;
+uniform vec3 uLightColor_Stage1;
+uniform float uKD_Stage1;
+uniform vec4 uTexDom_Stage1;
+uniform vec3 uDecalParams_Stage1;
+uniform vec3 uLightLocation_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 light_Stage1(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ float colorScale = uKD_Stage1 * dot(normal, surfaceToLight);
+ return vec4(lightColor * clamp(colorScale, 0.0, 1.0), 1.0);
+}
+float sobel_Stage1(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage1(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage1(float m[9], float surfaceScale) {
+ return pointToNormal_Stage1(sobel_Stage1(0.0, 0.0, m[4], m[5], m[7], m[8], 0.66666698455810547), sobel_Stage1(0.0, 0.0, m[4], m[7], m[5], m[8], 0.66666698455810547), surfaceScale);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ vec2 coord = vTransformedCoords_0_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp0 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp5 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp6 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp7 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp8 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = normalize(uLightLocation_Stage1 - vec3(gl_FragCoord.xy, uSurfaceScale_Stage1 * m[4]));
+ output_Stage1 = light_Stage1(normal_Stage1(m, uSurfaceScale_Stage1), surfaceToLight, uLightColor_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/172-4.shader_test b/shaders/skia/172-4.shader_test
new file mode 100644
index 0000000..9ccd893
--- /dev/null
+++ b/shaders/skia/172-4.shader_test
@@ -0,0 +1,117 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+uniform vec2 uDstTextureUpperLeft_Stage2;
+uniform vec2 uDstTextureCoordScale_Stage2;
+uniform sampler2D uTextureSampler_0_Stage0;
+uniform sampler2D uDstTextureSampler_Stage2;
+noperspective in vec2 vTextureCoords_Stage0;
+flat in int vTexIndex_Stage0;
+noperspective in vec4 vinColor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ t.x = fract(t.x);
+ }
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+float _blend_color_luminance(vec3 color) {
+ return dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), color);
+}
+vec3 _blend_set_color_luminance(vec3 hueSatColor, float alpha, vec3 lumColor) {
+ float lum = _blend_color_luminance(lumColor);
+ vec3 result = (lum - _blend_color_luminance(hueSatColor)) + hueSatColor;
+ float minComp = min(min(result.x, result.y), result.z);
+ float maxComp = max(max(result.x, result.y), result.z);
+ if (minComp < 0.0 && lum != minComp) {
+ result = lum + ((result - lum) * lum) / (lum - minComp);
+ }
+ if (maxComp > alpha && maxComp != lum) {
+ return lum + ((result - lum) * (alpha - lum)) / (maxComp - lum);
+ }
+ return result;
+}
+vec4 blend_luminosity(vec4 src, vec4 dst) {
+ float alpha = dst.w * src.w;
+ vec3 sda = src.xyz * dst.w;
+ vec3 dsa = dst.xyz * src.w;
+ return vec4((((_blend_set_color_luminance(dsa, alpha, sda) + dst.xyz) - dsa) + src.xyz) - sda, (src.w + dst.w) - alpha);
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ vec4 texColor;
+ {
+ texColor = texture(uTextureSampler_0_Stage0, vTextureCoords_Stage0);
+ }
+ outputCoverage_Stage0 = texColor;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TiledGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ if (all(lessThanEqual(outputCoverage_Stage0.xyz, vec3(0.0)))) {
+ discard;
+ }
+ vec2 _dstTexCoord = (gl_FragCoord.xy - uDstTextureUpperLeft_Stage2) * uDstTextureCoordScale_Stage2;
+ _dstTexCoord.y = 1.0 - _dstTexCoord.y;
+ vec4 _dstColor = texture(uDstTextureSampler_Stage2, _dstTexCoord);
+ sk_FragColor = blend_luminosity(output_Stage1, _dstColor);
+ float lerpRed = mix(_dstColor.w, sk_FragColor.w, outputCoverage_Stage0.x);
+ float lerpBlue = mix(_dstColor.w, sk_FragColor.w, outputCoverage_Stage0.y);
+ float lerpGreen = mix(_dstColor.w, sk_FragColor.w, outputCoverage_Stage0.z);
+ sk_FragColor = outputCoverage_Stage0 * sk_FragColor + (vec4(1.0) - outputCoverage_Stage0) * _dstColor;
+ sk_FragColor.w = max(max(lerpRed, lerpBlue), lerpGreen);
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform vec2 uAtlasSizeInv_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in uvec2 inTextureCoords;
+noperspective out vec2 vTextureCoords_Stage0;
+flat out int vTexIndex_Stage0;
+noperspective out vec4 vinColor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ ivec2 signedCoords = ivec2(int(inTextureCoords.x), int(inTextureCoords.y));
+ vec2 unormTexCoords = vec2(float(signedCoords.x / 2), float(signedCoords.y / 2));
+ vTextureCoords_Stage0 = unormTexCoords * uAtlasSizeInv_Stage0;
+ vTexIndex_Stage0 = 0;
+ vinColor_Stage0 = inColor;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(inPosition.x, inPosition.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/172-7.shader_test b/shaders/skia/172-7.shader_test
new file mode 100644
index 0000000..f0e3701
--- /dev/null
+++ b/shaders/skia/172-7.shader_test
@@ -0,0 +1,31 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+noperspective in vec4 vcolor_Stage0;
+void main() {
+ {
+ sk_FragColor = vec4(1.0);
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec2 inLocalCoord;
+noperspective out vec4 vcolor_Stage0;
+void main() {
+ vec4 color = inColor;
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/172-8.shader_test b/shaders/skia/172-8.shader_test
new file mode 100644
index 0000000..74458d5
--- /dev/null
+++ b/shaders/skia/172-8.shader_test
@@ -0,0 +1,54 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec3 uedges_Stage2[4];
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ float alpha = 1.0;
+ float edge;
+ edge = dot(uedges_Stage2[0], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage2[1], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage2[2], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage2[3], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ output_Stage2 = output_Stage1 * alpha;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/172.shader_test b/shaders/skia/172.shader_test
new file mode 100644
index 0000000..a66fb52
--- /dev/null
+++ b/shaders/skia/172.shader_test
@@ -0,0 +1,132 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.w) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ } else {
+ {
+ if (t < uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = OverrideInputFragmentProcessor_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 blend_src_out(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_src_out(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 inColor;
+in vec2 inLocalCoord;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1720.shader_test b/shaders/skia/1720.shader_test
new file mode 100644
index 0000000..b6c3b29
--- /dev/null
+++ b/shaders/skia/1720.shader_test
@@ -0,0 +1,135 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uColor_Stage0;
+uniform vec4 ucircle_Stage2_c0_c0;
+uniform float uinnerThreshold_Stage2_c1_c0;
+uniform float uouterThreshold_Stage2_c1_c0;
+uniform vec4 urectH_Stage3;
+uniform float uinvSixSigma_Stage3;
+uniform vec4 ucolor_Stage4_c2_c0;
+uniform float uPixelSize_Stage5;
+uniform vec2 uRange_Stage5;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+uniform sampler2D uTextureSampler_0_Stage3;
+uniform sampler2D uTextureSampler_0_Stage5;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 CircleEffect_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ float d;
+ {
+ d = (length((ucircle_Stage2_c0_c0.xy - gl_FragCoord.xy) * ucircle_Stage2_c0_c0.w) - 1.0) * ucircle_Stage2_c0_c0.z;
+ }
+ {
+ _output = _input * clamp(d, 0.0, 1.0);
+ }
+ return _output;
+}
+vec4 AlphaThresholdFragmentProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 color = _input;
+ vec4 mask_color = texture(uTextureSampler_0_Stage2, vTransformedCoords_0_Stage0);
+ if (mask_color.w < 0.5) {
+ if (color.w > uouterThreshold_Stage2_c1_c0) {
+ float scale = uouterThreshold_Stage2_c1_c0 / color.w;
+ color.xyz *= scale;
+ color.w = uouterThreshold_Stage2_c1_c0;
+ }
+ } else if (color.w < uinnerThreshold_Stage2_c1_c0) {
+ float scale = uinnerThreshold_Stage2_c1_c0 / max(0.0010000000474974513, color.w);
+ color.xyz *= scale;
+ color.w = uinnerThreshold_Stage2_c1_c0;
+ }
+ _output = color;
+ return _output;
+}
+vec4 ConstColorProcessor_Stage4_c2_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = _input.w * ucolor_Stage4_c2_c0;
+ }
+ return _output;
+}
+vec4 blend_xor(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src + (1.0 - src.w) * dst;
+}
+vec4 blend_src_atop(vec4 src, vec4 dst) {
+ return dst.w * src + (1.0 - src.w) * dst;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ float nonZeroAlpha = max(1.0, 9.9999997473787516e-05);
+ vec4 coord = vec4(vec4(1.0).xyz / nonZeroAlpha, nonZeroAlpha);
+ coord = coord * 0.9960939884185791 + vec4(0.0019529999699443579, 0.0019529999699443579, 0.0019529999699443579, 0.0019529999699443579);
+ output_Stage1.w = texture(uTextureSampler_0_Stage1, vec2(coord.w, 0.125)).w;
+ output_Stage1.x = texture(uTextureSampler_0_Stage1, vec2(coord.x, 0.375)).w;
+ output_Stage1.y = texture(uTextureSampler_0_Stage1, vec2(coord.y, 0.625)).w;
+ output_Stage1.z = texture(uTextureSampler_0_Stage1, vec2(coord.z, 0.875)).w;
+ output_Stage1.xyz *= output_Stage1.w;
+ }
+ vec4 output_Stage2;
+ {
+ vec4 inputColor = vec4(output_Stage1.xyz, 1.0);
+ output_Stage2 = blend_xor(CircleEffect_Stage2_c0_c0(inputColor), AlphaThresholdFragmentProcessor_Stage2_c1_c0(inputColor));
+ output_Stage2 *= output_Stage1.w;
+ }
+ vec4 output_Stage3;
+ {
+ float xCoverage, yCoverage;
+ {
+ float x, y;
+ {
+ x = max(urectH_Stage3.x - gl_FragCoord.x, gl_FragCoord.x - urectH_Stage3.z);
+ y = max(urectH_Stage3.y - gl_FragCoord.y, gl_FragCoord.y - urectH_Stage3.w);
+ }
+ xCoverage = texture(uTextureSampler_0_Stage3, vec2(x * uinvSixSigma_Stage3, 0.5)).w;
+ yCoverage = texture(uTextureSampler_0_Stage3, vec2(y * uinvSixSigma_Stage3, 0.5)).w;
+ output_Stage3 = (output_Stage2 * xCoverage) * yCoverage;
+ }
+ output_Stage3 = (output_Stage2 * xCoverage) * yCoverage;
+ }
+ vec4 output_Stage4;
+ {
+ output_Stage4 = blend_src_atop(output_Stage3, ConstColorProcessor_Stage4_c2_c0(vec4(1.0)));
+ }
+ vec4 output_Stage5;
+ {
+ output_Stage5 = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_1_Stage0;
+ coord.x -= 2.0 * uPixelSize_Stage5;
+ for (int i = 0;i < 5; i++) {
+ output_Stage5 = max(output_Stage5, texture(uTextureSampler_0_Stage5, coord));
+ coord.x += uPixelSize_Stage5;
+ }
+ output_Stage5 *= output_Stage4;
+ }
+ {
+ sk_FragColor = 1.0 - output_Stage5;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 inPosition;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vec2 pos2 = (uViewM_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1723.shader_test b/shaders/skia/1723.shader_test
new file mode 100644
index 0000000..5514e5a
--- /dev/null
+++ b/shaders/skia/1723.shader_test
@@ -0,0 +1,228 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_KHR_blend_equation_advanced : require
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+layout (blend_support_all_equations) out ;
+uniform vec4 uColor_Stage0;
+uniform float uCoverage_Stage0;
+uniform vec4 urectH_Stage1_c0_c0_c0_c0_c0_c0;
+uniform float uinvSixSigma_Stage1_c0_c0_c0_c0_c0_c0;
+uniform vec4 urectUniform_Stage1_c0_c0_c1_c0;
+uniform vec4 ucircle_Stage1_c1_c0_c0_c0_c0_c0;
+uniform vec4 uellipse_Stage1_c1_c0_c0_c0_c1_c0;
+uniform float ucornerRadius_Stage1_c1_c0_c1_c0_c0_c0;
+uniform vec4 uproxyRect_Stage1_c1_c0_c1_c0_c0_c0;
+uniform float ublurRadius_Stage1_c1_c0_c1_c0_c0_c0;
+uniform vec3 uedges_Stage1_c1_c0_c1_c0_c1_c0[1];
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+uniform sampler2D uTextureSampler_2_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 RectBlurEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float xCoverage, yCoverage;
+ {
+ float x, y;
+ {
+ x = max(urectH_Stage1_c0_c0_c0_c0_c0_c0.x - gl_FragCoord.x, gl_FragCoord.x - urectH_Stage1_c0_c0_c0_c0_c0_c0.z);
+ y = max(urectH_Stage1_c0_c0_c0_c0_c0_c0.y - gl_FragCoord.y, gl_FragCoord.y - urectH_Stage1_c0_c0_c0_c0_c0_c0.w);
+ }
+ xCoverage = texture(uTextureSampler_0_Stage1, vec2(x * uinvSixSigma_Stage1_c0_c0_c0_c0_c0_c0, 0.5)).w;
+ yCoverage = texture(uTextureSampler_0_Stage1, vec2(y * uinvSixSigma_Stage1_c0_c0_c0_c0_c0_c0, 0.5)).w;
+ _output = (_input * xCoverage) * yCoverage;
+ }
+ _output = (_input * xCoverage) * yCoverage;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_1_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+float _guarded_divide(float n, float d) {
+ return n / d;
+}
+float _color_dodge_component(float sc, float sa, float dc, float da) {
+ if (dc == 0.0) {
+ return sc * (1.0 - da);
+ } else {
+ float d = sa - sc;
+ if (d == 0.0) {
+ return (sa * da + sc * (1.0 - da)) + dc * (1.0 - sa);
+ }
+ d = min(da, _guarded_divide(dc * sa, d));
+ return (d * sa + sc * (1.0 - da)) + dc * (1.0 - sa);
+ }
+}
+vec4 blend_color_dodge(vec4 src, vec4 dst) {
+ return vec4(_color_dodge_component(src.x, src.w, dst.x, dst.w), _color_dodge_component(src.y, src.w, dst.y, dst.w), _color_dodge_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+}
+vec4 ComposeTwo_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_color_dodge(RectBlurEffect_Stage1_c0_c0_c0_c0_c0_c0(inputColor), TextureEffect_Stage1_c0_c0_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 AARectEffect_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float alpha;
+ {
+ float xSub, ySub;
+ xSub = min(gl_FragCoord.x - urectUniform_Stage1_c0_c0_c1_c0.x, 0.0);
+ xSub += min(urectUniform_Stage1_c0_c0_c1_c0.z - gl_FragCoord.x, 0.0);
+ ySub = min(gl_FragCoord.y - urectUniform_Stage1_c0_c0_c1_c0.y, 0.0);
+ ySub += min(urectUniform_Stage1_c0_c0_c1_c0.w - gl_FragCoord.y, 0.0);
+ alpha = (1.0 + max(xSub, -1.0)) * (1.0 + max(ySub, -1.0));
+ }
+ _output = _input * alpha;
+ return _output;
+}
+vec4 blend_xor(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src + (1.0 - src.w) * dst;
+}
+vec4 ComposeTwo_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_xor(ComposeTwo_Stage1_c0_c0_c0_c0(inputColor), AARectEffect_Stage1_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 CircleEffect_Stage1_c1_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float d;
+ {
+ d = (length((ucircle_Stage1_c1_c0_c0_c0_c0_c0.xy - gl_FragCoord.xy) * ucircle_Stage1_c1_c0_c0_c0_c0_c0.w) - 1.0) * ucircle_Stage1_c1_c0_c0_c0_c0_c0.z;
+ }
+ {
+ _output = d > 0.5 ? _input : vec4(0.0);
+ }
+ return _output;
+}
+vec4 EllipseEffect_Stage1_c1_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 d = gl_FragCoord.xy - uellipse_Stage1_c1_c0_c0_c0_c1_c0.xy;
+ vec2 Z = d * uellipse_Stage1_c1_c0_c0_c0_c1_c0.zw;
+ float implicit = dot(Z, d) - 1.0;
+ float grad_dot = 4.0 * dot(Z, Z);
+ {
+ grad_dot = max(grad_dot, 1.1754999560161448e-38);
+ }
+ float approx_dist = implicit * inversesqrt(grad_dot);
+ float alpha;
+ {
+ alpha = approx_dist > 0.0 ? 0.0 : 1.0;
+ }
+ _output = _input * alpha;
+ return _output;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 blend_lighten(vec4 src, vec4 dst) {
+ vec4 result = blend_src_over(src, dst);
+ result.xyz = max(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
+ return result;
+}
+vec4 ComposeTwo_Stage1_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_lighten(CircleEffect_Stage1_c1_c0_c0_c0_c0_c0(inputColor), EllipseEffect_Stage1_c1_c0_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 RRectBlurEffect_Stage1_c1_c0_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 translatedFragPos = gl_FragCoord.xy - uproxyRect_Stage1_c1_c0_c1_c0_c0_c0.xy;
+ float threshold = ucornerRadius_Stage1_c1_c0_c1_c0_c0_c0 + 2.0 * ublurRadius_Stage1_c1_c0_c1_c0_c0_c0;
+ vec2 middle = (uproxyRect_Stage1_c1_c0_c1_c0_c0_c0.zw - uproxyRect_Stage1_c1_c0_c1_c0_c0_c0.xy) - 2.0 * threshold;
+ if (translatedFragPos.x >= threshold && translatedFragPos.x < middle.x + threshold) {
+ translatedFragPos.x = threshold;
+ } else if (translatedFragPos.x >= middle.x + threshold) {
+ translatedFragPos.x -= middle.x - 1.0;
+ }
+ if (translatedFragPos.y > threshold && translatedFragPos.y < middle.y + threshold) {
+ translatedFragPos.y = threshold;
+ } else if (translatedFragPos.y >= middle.y + threshold) {
+ translatedFragPos.y -= middle.y - 1.0;
+ }
+ vec2 proxyDims = vec2(2.0 * threshold + 1.0);
+ vec2 texCoord = translatedFragPos / proxyDims;
+ _output = _input * texture(uTextureSampler_2_Stage1, texCoord);
+ return _output;
+}
+vec4 ConvexPoly_Stage1_c1_c0_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float alpha = 1.0;
+ float edge;
+ edge = dot(uedges_Stage1_c1_c0_c1_c0_c1_c0[0], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ _output = _input * alpha;
+ return _output;
+}
+vec4 blend_screen(vec4 src, vec4 dst) {
+ return src + (1.0 - src) * dst;
+}
+vec4 ComposeTwo_Stage1_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_screen(RRectBlurEffect_Stage1_c1_c0_c1_c0_c0_c0(inputColor), ConvexPoly_Stage1_c1_c0_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+vec4 ComposeTwo_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_dst_in(ComposeTwo_Stage1_c1_c0_c0_c0(inputColor), ComposeTwo_Stage1_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 blend_src_atop(vec4 src, vec4 dst) {
+ return dst.w * src + (1.0 - src.w) * dst;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = uColor_Stage0;
+ outputCoverage_Stage0 = vec4(uCoverage_Stage0);
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_src_atop(ComposeTwo_Stage1_c0_c0(inputColor), ComposeTwo_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ sk_FragColor = outputCoverage_Stage0 * output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec2 pos2 = (uViewM_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1726.shader_test b/shaders/skia/1726.shader_test
new file mode 100644
index 0000000..230cec0
--- /dev/null
+++ b/shaders/skia/1726.shader_test
@@ -0,0 +1,258 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uinnerRect_Stage1;
+uniform vec4 uinvRadiiLTRB_Stage1;
+uniform vec2 uImageIncrement_Stage2;
+uniform float uSurfaceScale_Stage2;
+uniform vec3 uLightColor_Stage2;
+uniform float uKS_Stage2;
+uniform float uShininess_Stage2;
+uniform vec4 uTexDom_Stage2;
+uniform vec3 uDecalParams_Stage2;
+uniform vec3 uLightDirection_Stage2;
+uniform mat4 um_Stage4;
+uniform vec4 uv_Stage4;
+uniform vec4 urectH_Stage5;
+uniform float uinvSixSigma_Stage5;
+uniform sampler2D uTextureSampler_0_Stage2;
+uniform sampler2D uTextureSampler_0_Stage3;
+uniform sampler2D uTextureSampler_0_Stage5;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 light_Stage2(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ vec3 halfDir = normalize(surfaceToLight + vec3(0.0, 0.0, 1.0));
+ float colorScale = uKS_Stage2 * pow(dot(normal, halfDir), uShininess_Stage2);
+ vec3 color = lightColor * clamp(colorScale, 0.0, 1.0);
+ return vec4(color, max(max(color.x, color.y), color.z));
+}
+float sobel_Stage2(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage2(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage2(float m[9], float surfaceScale) {
+ return pointToNormal_Stage2(sobel_Stage2(m[0], m[2], m[3], m[5], 0.0, 0.0, 0.33333298563957214), sobel_Stage2(m[0], m[3], m[1], m[4], m[2], m[5], 0.5), surfaceScale);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ vec2 dxy0 = uinnerRect_Stage1.xy - gl_FragCoord.xy;
+ vec2 dxy1 = gl_FragCoord.xy - uinnerRect_Stage1.zw;
+ vec2 dxy = max(max(dxy0, dxy1), 0.0);
+ vec2 Z = max(max(dxy0 * uinvRadiiLTRB_Stage1.xy, dxy1 * uinvRadiiLTRB_Stage1.zw), 0.0);
+ float implicit = dot(Z, dxy) - 1.0;
+ float grad_dot = 4.0 * dot(Z, Z);
+ grad_dot = max(grad_dot, 9.9999997473787516e-05);
+ float approx_dist = implicit * inversesqrt(grad_dot);
+ float alpha = clamp(0.5 - approx_dist, 0.0, 1.0);
+ output_Stage1 = vec4(alpha);
+ }
+ vec4 output_Stage2;
+ {
+ vec2 coord = vTransformedCoords_0_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp0 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp5 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp6 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp7 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp8 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = uLightDirection_Stage2;
+ output_Stage2 = light_Stage2(normal_Stage2(m, uSurfaceScale_Stage2), surfaceToLight, uLightColor_Stage2);
+ output_Stage2 *= output_Stage1;
+ }
+ vec4 output_Stage3;
+ {
+ float nonZeroAlpha = max(output_Stage2.w, 9.9999997473787516e-05);
+ vec4 coord = vec4(output_Stage2.xyz / nonZeroAlpha, nonZeroAlpha);
+ coord = coord * 0.9960939884185791 + vec4(0.0019529999699443579, 0.0019529999699443579, 0.0019529999699443579, 0.0019529999699443579);
+ output_Stage3.w = texture(uTextureSampler_0_Stage3, vec2(coord.w, 0.125)).w;
+ output_Stage3.x = texture(uTextureSampler_0_Stage3, vec2(coord.x, 0.375)).w;
+ output_Stage3.y = texture(uTextureSampler_0_Stage3, vec2(coord.y, 0.625)).w;
+ output_Stage3.z = texture(uTextureSampler_0_Stage3, vec2(coord.z, 0.875)).w;
+ output_Stage3.xyz *= output_Stage3.w;
+ }
+ vec4 output_Stage4;
+ {
+ vec4 inputColor = output_Stage3;
+ {
+ float nonZeroAlpha = max(inputColor.w, 9.9999997473787516e-05);
+ inputColor = vec4(inputColor.xyz / nonZeroAlpha, inputColor.w);
+ }
+ output_Stage4 = um_Stage4 * inputColor + uv_Stage4;
+ {
+ output_Stage4.w = clamp(output_Stage4.w, 0.0, 1.0);
+ }
+ }
+ vec4 output_Stage5;
+ {
+ float xCoverage, yCoverage;
+ {
+ float x, y;
+ {
+ x = max(urectH_Stage5.x - gl_FragCoord.x, gl_FragCoord.x - urectH_Stage5.z);
+ y = max(urectH_Stage5.y - gl_FragCoord.y, gl_FragCoord.y - urectH_Stage5.w);
+ }
+ xCoverage = texture(uTextureSampler_0_Stage5, vec2(x * uinvSixSigma_Stage5, 0.5)).w;
+ yCoverage = texture(uTextureSampler_0_Stage5, vec2(y * uinvSixSigma_Stage5, 0.5)).w;
+ output_Stage5 = (output_Stage4 * xCoverage) * yCoverage;
+ }
+ output_Stage5 = (output_Stage4 * xCoverage) * yCoverage;
+ }
+ {
+ sk_FragColor = output_Stage5;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1735.shader_test b/shaders/skia/1735.shader_test
new file mode 100644
index 0000000..2005217
--- /dev/null
+++ b/shaders/skia/1735.shader_test
@@ -0,0 +1,146 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 ucircleData_Stage1_c1_c0_c0_c0;
+uniform vec4 uinnerRect_Stage1_c1_c0_c1_c0;
+uniform vec2 uinvRadiiXY_Stage1_c1_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vEllipseOffsets_Stage0;
+noperspective in vec4 vEllipseRadii_Stage0;
+noperspective in vec4 vinColor_Stage0;
+vec4 ConfigConversionEffect_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = floor(_input * 255.0 + 0.5) / 255.0;
+ {
+ _output.xyz = _output.w <= 0.0 ? vec3(0.0) : floor((_output.xyz / _output.w) * 255.0 + 0.5) / 255.0;
+ }
+ return _output;
+}
+vec4 ConfigConversionEffect_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = floor(_input * 255.0 + 0.5) / 255.0;
+ {
+ _output.xyz = _output.w <= 0.0 ? vec3(0.0) : floor((_output.xyz / _output.w) * 255.0 + 0.5) / 255.0;
+ }
+ return _output;
+}
+vec4 blend_modulate(vec4 src, vec4 dst) {
+ return src * dst;
+}
+vec4 ComposeTwo_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_modulate(ConfigConversionEffect_Stage1_c0_c0_c0_c0(inputColor), ConfigConversionEffect_Stage1_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 CircleBlurFragmentProcessor_Stage1_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 vec = vec2((gl_FragCoord.x - ucircleData_Stage1_c1_c0_c0_c0.x) * ucircleData_Stage1_c1_c0_c0_c0.w, (gl_FragCoord.y - ucircleData_Stage1_c1_c0_c0_c0.y) * ucircleData_Stage1_c1_c0_c0_c0.w);
+ float dist = length(vec) + (0.5 - ucircleData_Stage1_c1_c0_c0_c0.z) * ucircleData_Stage1_c1_c0_c0_c0.w;
+ _output = _input * texture(uTextureSampler_0_Stage1, vec2(dist, 0.5)).w;
+ return _output;
+}
+vec4 EllipticalRRect_Stage1_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 dxy0 = uinnerRect_Stage1_c1_c0_c1_c0.xy - gl_FragCoord.xy;
+ vec2 dxy1 = gl_FragCoord.xy - uinnerRect_Stage1_c1_c0_c1_c0.zw;
+ vec2 dxy = max(max(dxy0, dxy1), 0.0);
+ vec2 Z = dxy * uinvRadiiXY_Stage1_c1_c0_c1_c0;
+ float implicit = dot(Z, dxy) - 1.0;
+ float grad_dot = 4.0 * dot(Z, Z);
+ grad_dot = max(grad_dot, 9.9999997473787516e-05);
+ float approx_dist = implicit * inversesqrt(grad_dot);
+ float alpha = clamp(0.5 - approx_dist, 0.0, 1.0);
+ _output = _input * alpha;
+ return _output;
+}
+float _guarded_divide(float n, float d) {
+ return n / d;
+}
+float _color_burn_component(float sc, float sa, float dc, float da) {
+ if (da == dc) {
+ return (sa * da + sc * (1.0 - da)) + dc * (1.0 - sa);
+ } else if (sc == 0.0) {
+ return dc * (1.0 - sa);
+ }
+ float d = max(0.0, da - _guarded_divide((da - dc) * sa, sc));
+ return (d * sa + sc * (1.0 - da)) + dc * (1.0 - sa);
+}
+vec4 blend_color_burn(vec4 src, vec4 dst) {
+ return vec4(_color_burn_component(src.x, src.w, dst.x, dst.w), _color_burn_component(src.y, src.w, dst.y, dst.w), _color_burn_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+}
+vec4 ComposeTwo_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_color_burn(CircleBlurFragmentProcessor_Stage1_c1_c0_c0_c0(inputColor), EllipticalRRect_Stage1_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+float _blend_overlay_component(float sc, float sa, float dc, float da) {
+ if (2.0 * dc <= da) {
+ return (2.0 * sc) * dc;
+ }
+ return sa * da - (2.0 * (da - dc)) * (sa - sc);
+}
+vec4 blend_overlay(vec4 src, vec4 dst) {
+ vec4 result = vec4(_blend_overlay_component(src.x, src.w, dst.x, dst.w), _blend_overlay_component(src.y, src.w, dst.y, dst.w), _blend_overlay_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+ result.xyz += dst.xyz * (1.0 - src.w) + src.xyz * (1.0 - dst.w);
+ return result;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vinColor_Stage0;
+ vec2 offset = vEllipseOffsets_Stage0;
+ offset *= vEllipseRadii_Stage0.xy;
+ float test = dot(offset, offset) - 1.0;
+ vec2 grad = (2.0 * offset) * vEllipseRadii_Stage0.xy;
+ float grad_dot = dot(grad, grad);
+ grad_dot = max(grad_dot, 1.1754999560161448e-38);
+ float invlen = inversesqrt(grad_dot);
+ float edgeAlpha = clamp(0.5 - test * invlen, 0.0, 1.0);
+ offset = vEllipseOffsets_Stage0 * vEllipseRadii_Stage0.zw;
+ test = dot(offset, offset) - 1.0;
+ grad = (2.0 * offset) * vEllipseRadii_Stage0.zw;
+ grad_dot = dot(grad, grad);
+ invlen = inversesqrt(grad_dot);
+ edgeAlpha *= clamp(0.5 + test * invlen, 0.0, 1.0);
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_overlay(ComposeTwo_Stage1_c0_c0(inputColor), ComposeTwo_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ sk_FragColor = (vec4(1.0) - output_Stage1) * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 inPosition;
+in vec4 inColor;
+in vec2 inEllipseOffset;
+in vec4 inEllipseRadii;
+noperspective out vec2 vEllipseOffsets_Stage0;
+noperspective out vec4 vEllipseRadii_Stage0;
+noperspective out vec4 vinColor_Stage0;
+void main() {
+ vEllipseOffsets_Stage0 = inEllipseOffset;
+ vEllipseRadii_Stage0 = inEllipseRadii;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = inPosition;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1738.shader_test b/shaders/skia/1738.shader_test
new file mode 100644
index 0000000..f0e490c
--- /dev/null
+++ b/shaders/skia/1738.shader_test
@@ -0,0 +1,41 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_KHR_blend_equation_advanced : require
+out vec4 sk_FragColor;
+layout (blend_support_all_equations) out ;
+uniform vec4 uColor_Stage0;
+uniform float uCoverage_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = uColor_Stage0;
+ outputCoverage_Stage0 = vec4(uCoverage_Stage0);
+ }
+ vec4 output_Stage1;
+ {
+ {
+ output_Stage1 = clamp(outputCoverage_Stage0, 0.0, 1.0);
+ }
+ }
+ {
+ sk_FragColor = output_Stage1 * outputColor_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 inPosition;
+void main() {
+ vec2 pos2 = (uViewM_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/175-2.shader_test b/shaders/skia/175-2.shader_test
new file mode 100644
index 0000000..af788ba
--- /dev/null
+++ b/shaders/skia/175-2.shader_test
@@ -0,0 +1,89 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage2_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c1_c0;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+vec4 blend_dst_atop(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src + src.w * dst;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_dst_in(outputColor_Stage0, ClampedGradientEffect_Stage1_c0_c0(vec4(1.0)));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_dst_atop(ConstColorProcessor_Stage2_c1_c0(vec4(1.0)), output_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/175-3.shader_test b/shaders/skia/175-3.shader_test
new file mode 100644
index 0000000..674c213
--- /dev/null
+++ b/shaders/skia/175-3.shader_test
@@ -0,0 +1,193 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform float uSurfaceScale_Stage1;
+uniform vec3 uLightColor_Stage1;
+uniform float uKD_Stage1;
+uniform vec4 uTexDom_Stage1;
+uniform vec3 uDecalParams_Stage1;
+uniform vec3 uLightLocation_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 light_Stage1(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ float colorScale = uKD_Stage1 * dot(normal, surfaceToLight);
+ return vec4(lightColor * clamp(colorScale, 0.0, 1.0), 1.0);
+}
+float sobel_Stage1(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage1(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage1(float m[9], float surfaceScale) {
+ return pointToNormal_Stage1(sobel_Stage1(0.0, 0.0, m[3], m[5], m[6], m[8], 0.33333298563957214), sobel_Stage1(0.0, 0.0, m[4], m[7], m[5], m[8], 0.5), surfaceScale);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ vec2 coord = vTransformedCoords_0_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp0 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp5 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp6 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp7 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp8 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = normalize(uLightLocation_Stage1 - vec3(gl_FragCoord.xy, uSurfaceScale_Stage1 * m[4]));
+ output_Stage1 = light_Stage1(normal_Stage1(m, uSurfaceScale_Stage1), surfaceToLight, uLightColor_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/175-7.shader_test b/shaders/skia/175-7.shader_test
new file mode 100644
index 0000000..234b5c5
--- /dev/null
+++ b/shaders/skia/175-7.shader_test
@@ -0,0 +1,179 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_KHR_blend_equation_advanced : require
+out vec4 sk_FragColor;
+layout (blend_support_all_equations) out ;
+uniform vec2 uImageIncrement_Stage1_c1_c0;
+uniform vec2 uBounds_Stage1_c1_c0;
+uniform vec4 uKernel_Stage1_c1_c0[6];
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 ColorTableEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ float nonZeroAlpha = max(_input.w, 9.9999997473787516e-05);
+ vec4 coord = vec4(_input.xyz / nonZeroAlpha, nonZeroAlpha);
+ coord = coord * 0.9960939884185791 + vec4(0.0019529999699443579, 0.0019529999699443579, 0.0019529999699443579, 0.0019529999699443579);
+ _output.w = texture(uTextureSampler_0_Stage1, vec2(coord.w, 0.125)).w;
+ _output.x = texture(uTextureSampler_0_Stage1, vec2(coord.x, 0.375)).w;
+ _output.y = texture(uTextureSampler_0_Stage1, vec2(coord.y, 0.625)).w;
+ _output.z = texture(uTextureSampler_0_Stage1, vec2(coord.z, 0.875)).w;
+ _output.xyz *= _output.w;
+ return _output;
+}
+vec4 GaussianConvolution_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0 - 10.0 * uImageIncrement_Stage1_c1_c0;
+ vec2 coordSampled = vec2(0.0, 0.0);
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1_c1_c0.x && coord.x <= uBounds_Stage1_c1_c0.y) {
+ _output += texture(uTextureSampler_1_Stage1, coordSampled) * uKernel_Stage1_c1_c0[0].x;
+ }
+ coord += uImageIncrement_Stage1_c1_c0;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1_c1_c0.x && coord.x <= uBounds_Stage1_c1_c0.y) {
+ _output += texture(uTextureSampler_1_Stage1, coordSampled) * uKernel_Stage1_c1_c0[0].y;
+ }
+ coord += uImageIncrement_Stage1_c1_c0;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1_c1_c0.x && coord.x <= uBounds_Stage1_c1_c0.y) {
+ _output += texture(uTextureSampler_1_Stage1, coordSampled) * uKernel_Stage1_c1_c0[0].z;
+ }
+ coord += uImageIncrement_Stage1_c1_c0;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1_c1_c0.x && coord.x <= uBounds_Stage1_c1_c0.y) {
+ _output += texture(uTextureSampler_1_Stage1, coordSampled) * uKernel_Stage1_c1_c0[0].w;
+ }
+ coord += uImageIncrement_Stage1_c1_c0;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1_c1_c0.x && coord.x <= uBounds_Stage1_c1_c0.y) {
+ _output += texture(uTextureSampler_1_Stage1, coordSampled) * uKernel_Stage1_c1_c0[1].x;
+ }
+ coord += uImageIncrement_Stage1_c1_c0;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1_c1_c0.x && coord.x <= uBounds_Stage1_c1_c0.y) {
+ _output += texture(uTextureSampler_1_Stage1, coordSampled) * uKernel_Stage1_c1_c0[1].y;
+ }
+ coord += uImageIncrement_Stage1_c1_c0;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1_c1_c0.x && coord.x <= uBounds_Stage1_c1_c0.y) {
+ _output += texture(uTextureSampler_1_Stage1, coordSampled) * uKernel_Stage1_c1_c0[1].z;
+ }
+ coord += uImageIncrement_Stage1_c1_c0;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1_c1_c0.x && coord.x <= uBounds_Stage1_c1_c0.y) {
+ _output += texture(uTextureSampler_1_Stage1, coordSampled) * uKernel_Stage1_c1_c0[1].w;
+ }
+ coord += uImageIncrement_Stage1_c1_c0;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1_c1_c0.x && coord.x <= uBounds_Stage1_c1_c0.y) {
+ _output += texture(uTextureSampler_1_Stage1, coordSampled) * uKernel_Stage1_c1_c0[2].x;
+ }
+ coord += uImageIncrement_Stage1_c1_c0;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1_c1_c0.x && coord.x <= uBounds_Stage1_c1_c0.y) {
+ _output += texture(uTextureSampler_1_Stage1, coordSampled) * uKernel_Stage1_c1_c0[2].y;
+ }
+ coord += uImageIncrement_Stage1_c1_c0;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1_c1_c0.x && coord.x <= uBounds_Stage1_c1_c0.y) {
+ _output += texture(uTextureSampler_1_Stage1, coordSampled) * uKernel_Stage1_c1_c0[2].z;
+ }
+ coord += uImageIncrement_Stage1_c1_c0;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1_c1_c0.x && coord.x <= uBounds_Stage1_c1_c0.y) {
+ _output += texture(uTextureSampler_1_Stage1, coordSampled) * uKernel_Stage1_c1_c0[2].w;
+ }
+ coord += uImageIncrement_Stage1_c1_c0;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1_c1_c0.x && coord.x <= uBounds_Stage1_c1_c0.y) {
+ _output += texture(uTextureSampler_1_Stage1, coordSampled) * uKernel_Stage1_c1_c0[3].x;
+ }
+ coord += uImageIncrement_Stage1_c1_c0;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1_c1_c0.x && coord.x <= uBounds_Stage1_c1_c0.y) {
+ _output += texture(uTextureSampler_1_Stage1, coordSampled) * uKernel_Stage1_c1_c0[3].y;
+ }
+ coord += uImageIncrement_Stage1_c1_c0;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1_c1_c0.x && coord.x <= uBounds_Stage1_c1_c0.y) {
+ _output += texture(uTextureSampler_1_Stage1, coordSampled) * uKernel_Stage1_c1_c0[3].z;
+ }
+ coord += uImageIncrement_Stage1_c1_c0;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1_c1_c0.x && coord.x <= uBounds_Stage1_c1_c0.y) {
+ _output += texture(uTextureSampler_1_Stage1, coordSampled) * uKernel_Stage1_c1_c0[3].w;
+ }
+ coord += uImageIncrement_Stage1_c1_c0;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1_c1_c0.x && coord.x <= uBounds_Stage1_c1_c0.y) {
+ _output += texture(uTextureSampler_1_Stage1, coordSampled) * uKernel_Stage1_c1_c0[4].x;
+ }
+ coord += uImageIncrement_Stage1_c1_c0;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1_c1_c0.x && coord.x <= uBounds_Stage1_c1_c0.y) {
+ _output += texture(uTextureSampler_1_Stage1, coordSampled) * uKernel_Stage1_c1_c0[4].y;
+ }
+ coord += uImageIncrement_Stage1_c1_c0;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1_c1_c0.x && coord.x <= uBounds_Stage1_c1_c0.y) {
+ _output += texture(uTextureSampler_1_Stage1, coordSampled) * uKernel_Stage1_c1_c0[4].z;
+ }
+ coord += uImageIncrement_Stage1_c1_c0;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1_c1_c0.x && coord.x <= uBounds_Stage1_c1_c0.y) {
+ _output += texture(uTextureSampler_1_Stage1, coordSampled) * uKernel_Stage1_c1_c0[4].w;
+ }
+ coord += uImageIncrement_Stage1_c1_c0;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1_c1_c0.x && coord.x <= uBounds_Stage1_c1_c0.y) {
+ _output += texture(uTextureSampler_1_Stage1, coordSampled) * uKernel_Stage1_c1_c0[5].x;
+ }
+ coord += uImageIncrement_Stage1_c1_c0;
+ _output *= _input;
+ return _output;
+}
+vec4 blend_dst_out(vec4 src, vec4 dst) {
+ return (1.0 - src.w) * dst;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_dst_out(ColorTableEffect_Stage1_c0_c0(inputColor), GaussianConvolution_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 color = inColor;
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/175-8.shader_test b/shaders/skia/175-8.shader_test
new file mode 100644
index 0000000..8c47077
--- /dev/null
+++ b/shaders/skia/175-8.shader_test
@@ -0,0 +1,61 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec3 uedges_Stage2[6];
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ float alpha = 1.0;
+ float edge;
+ edge = dot(uedges_Stage2[0], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage2[1], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage2[2], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage2[3], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage2[4], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage2[5], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ alpha = 1.0 - alpha;
+ output_Stage2 = output_Stage1 * alpha;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/175-9.shader_test b/shaders/skia/175-9.shader_test
new file mode 100644
index 0000000..168a60b
--- /dev/null
+++ b/shaders/skia/175-9.shader_test
@@ -0,0 +1,75 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 ucircleData_Stage2_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 ClampFragmentProcessor_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = clamp(_input, 0.0, 1.0);
+ }
+ return _output;
+}
+vec4 CircleBlurFragmentProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 vec = vec2((gl_FragCoord.x - ucircleData_Stage2_c1_c0.x) * ucircleData_Stage2_c1_c0.w, (gl_FragCoord.y - ucircleData_Stage2_c1_c0.y) * ucircleData_Stage2_c1_c0.w);
+ float dist = length(vec) + (0.5 - ucircleData_Stage2_c1_c0.z) * ucircleData_Stage2_c1_c0.w;
+ _output = _input * texture(uTextureSampler_0_Stage2, vec2(dist, 0.5)).w;
+ return _output;
+}
+float _guarded_divide(float n, float d) {
+ return n / d;
+}
+float _color_dodge_component(float sc, float sa, float dc, float da) {
+ if (dc == 0.0) {
+ return sc * (1.0 - da);
+ } else {
+ float d = sa - sc;
+ if (d == 0.0) {
+ return (sa * da + sc * (1.0 - da)) + dc * (1.0 - sa);
+ }
+ d = min(da, _guarded_divide(dc * sa, d));
+ return (d * sa + sc * (1.0 - da)) + dc * (1.0 - sa);
+ }
+}
+vec4 blend_color_dodge(vec4 src, vec4 dst) {
+ return vec4(_color_dodge_component(src.x, src.w, dst.x, dst.w), _color_dodge_component(src.y, src.w, dst.y, dst.w), _color_dodge_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ vec4 inputColor = vec4(output_Stage1.xyz, 1.0);
+ output_Stage2 = blend_color_dodge(ClampFragmentProcessor_Stage2_c0_c0(inputColor), CircleBlurFragmentProcessor_Stage2_c1_c0(inputColor));
+ output_Stage2 *= output_Stage1.w;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/175.shader_test b/shaders/skia/175.shader_test
new file mode 100644
index 0000000..1cd0d0f
--- /dev/null
+++ b/shaders/skia/175.shader_test
@@ -0,0 +1,61 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 ucolor_Stage1_c0_c0_c0_c0;
+noperspective in vec4 vcolor_Stage0;
+vec4 ConstColorProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = _input.w * ucolor_Stage1_c0_c0_c0_c0;
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = ConstColorProcessor_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 blend_src_out(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_src_out(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 position;
+in vec4 inColor;
+noperspective out vec4 vcolor_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1750.shader_test b/shaders/skia/1750.shader_test
new file mode 100644
index 0000000..a61f05f
--- /dev/null
+++ b/shaders/skia/1750.shader_test
@@ -0,0 +1,30 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uColor_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = uColor_Stage0;
+ }
+ {
+ sk_FragColor = outputColor_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 position;
+void main() {
+ vec3 pos3 = uViewM_Stage0 * vec3(position, 1.0);
+ gl_Position = vec4(pos3.x, pos3.y, 0.0, pos3.z);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1756.shader_test b/shaders/skia/1756.shader_test
new file mode 100644
index 0000000..5492a76
--- /dev/null
+++ b/shaders/skia/1756.shader_test
@@ -0,0 +1,50 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+noperspective in vec2 vEllipseOffsets0_Stage0;
+noperspective in vec2 vEllipseOffsets1_Stage0;
+noperspective in vec4 vinColor_Stage0;
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ vec2 scaledOffset = vEllipseOffsets0_Stage0;
+ float test = dot(scaledOffset, scaledOffset) - 1.0;
+ vec2 duvdx = dFdx(vEllipseOffsets0_Stage0);
+ vec2 duvdy = dFdy(vEllipseOffsets0_Stage0);
+ vec2 grad = vec2(vEllipseOffsets0_Stage0.x * duvdx.x + vEllipseOffsets0_Stage0.y * duvdx.y, vEllipseOffsets0_Stage0.x * duvdy.x + vEllipseOffsets0_Stage0.y * duvdy.y);
+ float grad_dot = 4.0 * dot(grad, grad);
+ grad_dot = max(grad_dot, 1.1754999560161448e-38);
+ float invlen = inversesqrt(grad_dot);
+ float edgeAlpha = clamp(1.0 - test * invlen, 0.0, 1.0);
+ edgeAlpha *= clamp(1.0 + test * invlen, 0.0, 1.0);
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ {
+ sk_FragColor = outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 inPosition;
+in vec4 inColor;
+in vec2 inEllipseOffsets0;
+in vec2 inEllipseOffsets1;
+noperspective out vec2 vEllipseOffsets0_Stage0;
+noperspective out vec2 vEllipseOffsets1_Stage0;
+noperspective out vec4 vinColor_Stage0;
+void main() {
+ vEllipseOffsets0_Stage0 = inEllipseOffsets0;
+ vEllipseOffsets1_Stage0 = inEllipseOffsets1;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = inPosition;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1762.shader_test b/shaders/skia/1762.shader_test
new file mode 100644
index 0000000..d64d92f
--- /dev/null
+++ b/shaders/skia/1762.shader_test
@@ -0,0 +1,190 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform float ubias_Stage1_c0_c0_c0_c0;
+uniform float uscale_Stage1_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+uniform vec2 ufocalParams_Stage2_c1_c0_c0_c0;
+uniform vec4 uscale0_1_Stage2_c1_c0_c1_c0;
+uniform vec4 uscale2_3_Stage2_c1_c0_c1_c0;
+uniform vec4 uscale4_5_Stage2_c1_c0_c1_c0;
+uniform vec4 uscale6_7_Stage2_c1_c0_c1_c0;
+uniform vec4 ubias0_1_Stage2_c1_c0_c1_c0;
+uniform vec4 ubias2_3_Stage2_c1_c0_c1_c0;
+uniform vec4 ubias4_5_Stage2_c1_c0_c1_c0;
+uniform vec4 ubias6_7_Stage2_c1_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage2_c1_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage2_c1_c0_c1_c0;
+uniform vec4 urectUniform_Stage3;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 SweepGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float angle;
+ {
+ angle = atan(-vTransformedCoords_0_Stage0.y, -vTransformedCoords_0_Stage0.x);
+ }
+ float t = ((angle * 0.15915493667125702 + 0.5) + ubias_Stage1_c0_c0_c0_c0) * uscale_Stage1_c0_c0_c0_c0;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = SweepGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 TwoPointConicalGradientLayout_Stage2_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_1_Stage0;
+ float t = -1.0;
+ float v = 1.0;
+ {
+ {
+ float r0_2 = ufocalParams_Stage2_c1_c0_c0_c0.y;
+ t = r0_2 - p.y * p.y;
+ if (t >= 0.0) {
+ t = p.x + sqrt(t);
+ } else {
+ v = -1.0;
+ }
+ }
+ }
+ _output = vec4(t, v, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage2_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage2_c1_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage2_c1_c0_c1_c0.x) {
+ scale = uscale0_1_Stage2_c1_c0_c1_c0;
+ bias = ubias0_1_Stage2_c1_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage2_c1_c0_c1_c0;
+ bias = ubias2_3_Stage2_c1_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage2_c1_c0_c1_c0.z) {
+ scale = uscale4_5_Stage2_c1_c0_c1_c0;
+ bias = ubias4_5_Stage2_c1_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage2_c1_c0_c1_c0;
+ bias = ubias6_7_Stage2_c1_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage2_c1_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage2_c1_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_dst_in(vec4(1.0), ClampedGradientEffect_Stage1_c0_c0(vec4(1.0)));
+ }
+ {
+ blend_dst_in(output_Stage1, TiledGradientEffect_Stage2_c1_c0(vec4(1.0)));
+ }
+ {
+ {
+ float xSub, ySub;
+ xSub = min(gl_FragCoord.x - urectUniform_Stage3.x, 0.0);
+ xSub += min(urectUniform_Stage3.z - gl_FragCoord.x, 0.0);
+ ySub = min(gl_FragCoord.y - urectUniform_Stage3.y, 0.0);
+ ySub += min(urectUniform_Stage3.w - gl_FragCoord.y, 0.0);
+ }
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vec4 color = inColor;
+ vcolor_Stage0 = color;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1768.shader_test b/shaders/skia/1768.shader_test
new file mode 100644
index 0000000..9711709
--- /dev/null
+++ b/shaders/skia/1768.shader_test
@@ -0,0 +1,153 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_KHR_blend_equation_advanced : require
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+layout (blend_support_all_equations) out ;
+uniform vec4 ucircle_Stage1_c0_c0_c0_c0;
+uniform vec4 ucolor_Stage1_c0_c0_c1_c0;
+uniform vec2 ubaseFrequency_Stage1_c1_c0;
+uniform float uz_Stage1_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 CircleEffect_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float d;
+ {
+ d = (length((ucircle_Stage1_c0_c0_c0_c0.xy - gl_FragCoord.xy) * ucircle_Stage1_c0_c0_c0_c0.w) - 1.0) * ucircle_Stage1_c0_c0_c0_c0.z;
+ }
+ {
+ _output = d > 0.5 ? _input : vec4(0.0);
+ }
+ return _output;
+}
+vec4 ConstColorProcessor_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage1_c0_c0_c1_c0;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+vec4 ComposeTwo_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_dst_in(CircleEffect_Stage1_c0_c0_c0_c0(inputColor), ConstColorProcessor_Stage1_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec3 fade_Stage1_c1_c0(vec3 t) {
+ return ((t * t) * t) * (t * (t * 6.0 - 15.0) + 10.0);
+}
+float perm_Stage1_c1_c0(float x) {
+ return texture(uTextureSampler_0_Stage1, vec2(fract(x / 256.0), 0.0)).x * 255.0;
+}
+float grad_Stage1_c1_c0(float x, vec3 p) {
+ return dot(texture(uTextureSampler_1_Stage1, vec2(fract(x / 16.0), 0.0)).xyz * 255.0 - vec3(1.0), p);
+}
+float lerp_Stage1_c1_c0(float a, float b, float w) {
+ return a + w * (b - a);
+}
+float noise_Stage1_c1_c0(vec3 p) {
+ vec3 P = mod(floor(p), 256.0);
+ p -= floor(p);
+ vec3 f = fade_Stage1_c1_c0(p);
+ float A = perm_Stage1_c1_c0(P.x) + P.y;
+ float AA = perm_Stage1_c1_c0(A) + P.z;
+ float AB = perm_Stage1_c1_c0(A + 1.0) + P.z;
+ float B = perm_Stage1_c1_c0(P.x + 1.0) + P.y;
+ float BA = perm_Stage1_c1_c0(B) + P.z;
+ float BB = perm_Stage1_c1_c0(B + 1.0) + P.z;
+ float result = lerp_Stage1_c1_c0(lerp_Stage1_c1_c0(lerp_Stage1_c1_c0(grad_Stage1_c1_c0(perm_Stage1_c1_c0(AA), p), grad_Stage1_c1_c0(perm_Stage1_c1_c0(BA), p + vec3(-1.0, 0.0, 0.0)), f.x), lerp_Stage1_c1_c0(grad_Stage1_c1_c0(perm_Stage1_c1_c0(AB), p + vec3(0.0, -1.0, 0.0)), grad_Stage1_c1_c0(perm_Stage1_c1_c0(BB), p + vec3(-1.0, -1.0, 0.0)), f.x), f.y), lerp_Stage1_c1_c0(lerp_Stage1_c1_c0(grad_Stage1_c1_c0(perm_Stage1_c1_c0(AA + 1.0), p + vec3(0.0, 0.0, -1.0)), grad_Stage1_c1_c0(perm_Stage1_c1_c0(BA + 1.0), p + vec3(-1.0, 0.0, -1.0)), f.x), lerp_Stage1_c1_c0(grad_Stage1_c1_c0(perm_Stage1_c1_c0(AB + 1.0), p + vec3(0.0, -1.0, -1.0)), grad_Stage1_c1_c0(perm_Stage1_c1_c0(BB + 1.0), p + vec3(-1.0, -1.0, -1.0)), f.x), f.y), f.z);
+ return result;
+}
+float noiseOctaves_Stage1_c1_c0(vec3 p) {
+ float result = 0.0;
+ float ratio = 1.0;
+ for (float i = 0.0;i < 7.0; i++) {
+ result += noise_Stage1_c1_c0(p) / ratio;
+ p *= 2.0;
+ ratio *= 2.0;
+ }
+ return (result + 1.0) / 2.0;
+}
+vec4 ImprovedPerlinNoise_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coords = vTransformedCoords_0_Stage0 * ubaseFrequency_Stage1_c1_c0;
+ float r = noiseOctaves_Stage1_c1_c0(vec3(coords, uz_Stage1_c1_c0));
+ float g = noiseOctaves_Stage1_c1_c0(vec3(coords, uz_Stage1_c1_c0));
+ float b = noiseOctaves_Stage1_c1_c0(vec3(coords, uz_Stage1_c1_c0));
+ float a = noiseOctaves_Stage1_c1_c0(vec3(coords, uz_Stage1_c1_c0));
+ _output = vec4(r, g, b, a);
+ _output = clamp(_output, 0.0, 1.0);
+ _output = vec4(_output.xyz * _output.www, _output.w);
+ return _output;
+}
+float _guarded_divide(float n, float d) {
+ return n / d;
+}
+float _soft_light_component(float sc, float sa, float dc, float da) {
+ if (2.0 * sc <= sa) {
+ return (_guarded_divide((dc * dc) * (sa - 2.0 * sc), da) + (1.0 - da) * sc) + dc * ((-sa + 2.0 * sc) + 1.0);
+ } else if (4.0 * dc <= da) {
+ float DSqd = dc * dc;
+ float DCub = DSqd * dc;
+ float DaSqd = da * da;
+ float DaCub = DaSqd * da;
+ return _guarded_divide(((DaSqd * (sc - dc * ((3.0 * sa - 6.0 * sc) - 1.0)) + ((12.0 * da) * DSqd) * (sa - 2.0 * sc)) - (16.0 * DCub) * (sa - 2.0 * sc)) - DaCub * sc, DaSqd);
+ }
+ return ((dc * ((sa - 2.0 * sc) + 1.0) + sc) - sqrt(da * dc) * (sa - 2.0 * sc)) - da * sc;
+}
+vec4 blend_soft_light(vec4 src, vec4 dst) {
+ if (dst.w == 0.0) {
+ return src;
+ }
+ return vec4(_soft_light_component(src.x, src.w, dst.x, dst.w), _soft_light_component(src.y, src.w, dst.y, dst.w), _soft_light_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_soft_light(ComposeTwo_Stage1_c0_c0(inputColor), ImprovedPerlinNoise_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 color = inColor;
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1771.shader_test b/shaders/skia/1771.shader_test
new file mode 100644
index 0000000..8e95a6f
--- /dev/null
+++ b/shaders/skia/1771.shader_test
@@ -0,0 +1,219 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uColor_Stage0;
+uniform vec2 uImageIncrement_Stage2;
+uniform vec2 uBounds_Stage2;
+uniform vec4 uKernel_Stage2[2];
+uniform vec4 uinnerRect_Stage5;
+uniform vec4 uinvRadiiLTRB_Stage5;
+uniform vec4 uellipse_Stage6_c1_c0;
+uniform vec4 urectH_Stage6_c2_c0;
+uniform float uinvSixSigma_Stage6_c2_c0;
+uniform vec2 uDstTextureUpperLeft_Stage7;
+uniform vec2 uDstTextureCoordScale_Stage7;
+uniform sampler2D uTextureSampler_0_Stage2;
+uniform sampler2D uTextureSampler_0_Stage6;
+uniform sampler2D uDstTextureSampler_Stage7;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 ConfigConversionEffect_Stage1_c0_c0(vec4 _input, vec2 _coords) {
+ vec4 _output;
+ _output = floor(_input * 255.0 + 0.5) / 255.0;
+ {
+ _output.xyz = floor((_output.xyz * _output.w) * 255.0 + 0.5) / 255.0;
+ }
+ return _output;
+}
+vec4 EllipseEffect_Stage6_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 d = gl_FragCoord.xy - uellipse_Stage6_c1_c0.xy;
+ vec2 Z = d * uellipse_Stage6_c1_c0.zw;
+ float implicit = dot(Z, d) - 1.0;
+ float grad_dot = 4.0 * dot(Z, Z);
+ {
+ grad_dot = max(grad_dot, 1.1754999560161448e-38);
+ }
+ float approx_dist = implicit * inversesqrt(grad_dot);
+ float alpha;
+ {
+ alpha = approx_dist > 0.0 ? 1.0 : 0.0;
+ }
+ _output = _input * alpha;
+ return _output;
+}
+vec4 RectBlurEffect_Stage6_c2_c0(vec4 _input) {
+ vec4 _output;
+ float xCoverage, yCoverage;
+ {
+ float x, y;
+ {
+ x = max(urectH_Stage6_c2_c0.x - gl_FragCoord.x, gl_FragCoord.x - urectH_Stage6_c2_c0.z);
+ y = max(urectH_Stage6_c2_c0.y - gl_FragCoord.y, gl_FragCoord.y - urectH_Stage6_c2_c0.w);
+ }
+ xCoverage = texture(uTextureSampler_0_Stage6, vec2(x * uinvSixSigma_Stage6_c2_c0, 0.5)).w;
+ yCoverage = texture(uTextureSampler_0_Stage6, vec2(y * uinvSixSigma_Stage6_c2_c0, 0.5)).w;
+ _output = (_input * xCoverage) * yCoverage;
+ }
+ _output = (_input * xCoverage) * yCoverage;
+ return _output;
+}
+float _blend_color_saturation(vec3 color) {
+ return max(max(color.x, color.y), color.z) - min(min(color.x, color.y), color.z);
+}
+vec3 _blend_set_color_saturation_helper(vec3 minMidMax, float sat) {
+ if (minMidMax.x < minMidMax.z) {
+ return vec3(0.0, (sat * (minMidMax.y - minMidMax.x)) / (minMidMax.z - minMidMax.x), sat);
+ }
+ return vec3(0.0);
+}
+vec3 _blend_set_color_saturation(vec3 hueLumColor, vec3 satColor) {
+ float sat = _blend_color_saturation(satColor);
+ if (hueLumColor.x <= hueLumColor.y) {
+ if (hueLumColor.y <= hueLumColor.z) {
+ hueLumColor.xyz = _blend_set_color_saturation_helper(hueLumColor, sat);
+ } else if (hueLumColor.x <= hueLumColor.z) {
+ hueLumColor.xzy = _blend_set_color_saturation_helper(hueLumColor.xzy, sat);
+ } else {
+ hueLumColor.zxy = _blend_set_color_saturation_helper(hueLumColor.zxy, sat);
+ }
+ } else if (hueLumColor.x <= hueLumColor.z) {
+ hueLumColor.yxz = _blend_set_color_saturation_helper(hueLumColor.yxz, sat);
+ } else if (hueLumColor.y <= hueLumColor.z) {
+ hueLumColor.yzx = _blend_set_color_saturation_helper(hueLumColor.yzx, sat);
+ } else {
+ hueLumColor.zyx = _blend_set_color_saturation_helper(hueLumColor.zyx, sat);
+ }
+ return hueLumColor;
+}
+float _blend_color_luminance(vec3 color) {
+ return dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), color);
+}
+vec3 _blend_set_color_luminance(vec3 hueSatColor, float alpha, vec3 lumColor) {
+ float lum = _blend_color_luminance(lumColor);
+ vec3 result = (lum - _blend_color_luminance(hueSatColor)) + hueSatColor;
+ float minComp = min(min(result.x, result.y), result.z);
+ float maxComp = max(max(result.x, result.y), result.z);
+ if (minComp < 0.0 && lum != minComp) {
+ result = lum + ((result - lum) * lum) / (lum - minComp);
+ }
+ if (maxComp > alpha && maxComp != lum) {
+ return lum + ((result - lum) * (alpha - lum)) / (maxComp - lum);
+ }
+ return result;
+}
+vec4 blend_saturation(vec4 src, vec4 dst) {
+ float alpha = dst.w * src.w;
+ vec3 sda = src.xyz * dst.w;
+ vec3 dsa = dst.xyz * src.w;
+ return vec4((((_blend_set_color_luminance(_blend_set_color_saturation(dsa, sda), alpha, dsa) + dst.xyz) - dsa) + src.xyz) - sda, (src.w + dst.w) - alpha);
+}
+vec4 blend_dst_atop(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src + src.w * dst;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = uColor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ConfigConversionEffect_Stage1_c0_c0(outputColor_Stage0, gl_FragCoord.xy);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0 - 3.0 * uImageIncrement_Stage2;
+ vec2 coordSampled = vec2(0.0, 0.0);
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage2.x, uBounds_Stage2.y - uBounds_Stage2.x) + uBounds_Stage2.x;
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[0].x;
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage2.x, uBounds_Stage2.y - uBounds_Stage2.x) + uBounds_Stage2.x;
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[0].y;
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage2.x, uBounds_Stage2.y - uBounds_Stage2.x) + uBounds_Stage2.x;
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[0].z;
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage2.x, uBounds_Stage2.y - uBounds_Stage2.x) + uBounds_Stage2.x;
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[0].w;
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage2.x, uBounds_Stage2.y - uBounds_Stage2.x) + uBounds_Stage2.x;
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[1].x;
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage2.x, uBounds_Stage2.y - uBounds_Stage2.x) + uBounds_Stage2.x;
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[1].y;
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage2.x, uBounds_Stage2.y - uBounds_Stage2.x) + uBounds_Stage2.x;
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[1].z;
+ coord += uImageIncrement_Stage2;
+ output_Stage2 *= output_Stage1;
+ }
+ vec4 output_Stage3;
+ {
+ {
+ float alpha = clamp(output_Stage2.w, 0.0, 1.0);
+ output_Stage3 = vec4(clamp(output_Stage2.xyz, 0.0, alpha), alpha);
+ }
+ }
+ vec4 output_Stage4;
+ {
+ output_Stage4 = floor(vec4(255.0) + 0.5) / 255.0;
+ {
+ output_Stage4.xyz = output_Stage4.w <= 0.0 ? vec3(0.0) : floor((output_Stage4.xyz / output_Stage4.w) * 255.0 + 0.5) / 255.0;
+ }
+ }
+ vec4 output_Stage5;
+ {
+ vec2 dxy0 = uinnerRect_Stage5.xy - gl_FragCoord.xy;
+ vec2 dxy1 = gl_FragCoord.xy - uinnerRect_Stage5.zw;
+ vec2 dxy = max(max(dxy0, dxy1), 0.0);
+ vec2 Z = max(max(dxy0 * uinvRadiiLTRB_Stage5.xy, dxy1 * uinvRadiiLTRB_Stage5.zw), 0.0);
+ float implicit = dot(Z, dxy) - 1.0;
+ float grad_dot = 4.0 * dot(Z, Z);
+ grad_dot = max(grad_dot, 9.9999997473787516e-05);
+ float approx_dist = implicit * inversesqrt(grad_dot);
+ float alpha = clamp(0.5 - approx_dist, 0.0, 1.0);
+ output_Stage5 = output_Stage4 * alpha;
+ }
+ vec4 output_Stage6;
+ {
+ vec4 inputColor = vec4(output_Stage5.xyz, 1.0);
+ output_Stage6 = blend_saturation(EllipseEffect_Stage6_c1_c0(inputColor), RectBlurEffect_Stage6_c2_c0(inputColor));
+ output_Stage6 *= output_Stage5.w;
+ }
+ {
+ if (all(lessThanEqual(output_Stage6.xyz, vec3(0.0)))) {
+ discard;
+ }
+ vec2 _dstTexCoord = (gl_FragCoord.xy - uDstTextureUpperLeft_Stage7) * uDstTextureCoordScale_Stage7;
+ vec4 _dstColor = texture(uDstTextureSampler_Stage7, _dstTexCoord);
+ sk_FragColor = blend_dst_atop(output_Stage3, _dstColor);
+ sk_FragColor = output_Stage6 * sk_FragColor + (vec4(1.0) - output_Stage6) * _dstColor;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(position, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1774.shader_test b/shaders/skia/1774.shader_test
new file mode 100644
index 0000000..2664347
--- /dev/null
+++ b/shaders/skia/1774.shader_test
@@ -0,0 +1,108 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 ubaseFrequency_Stage1_c0_c0;
+uniform float uz_Stage1_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+noperspective in vec4 vQuadEdge_Stage0;
+noperspective in vec4 vinColor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec3 fade_Stage1_c0_c0(vec3 t) {
+ return ((t * t) * t) * (t * (t * 6.0 - 15.0) + 10.0);
+}
+float perm_Stage1_c0_c0(float x) {
+ return texture(uTextureSampler_0_Stage1, vec2(fract(x / 256.0), 0.0)).x * 255.0;
+}
+float grad_Stage1_c0_c0(float x, vec3 p) {
+ return dot(texture(uTextureSampler_1_Stage1, vec2(fract(x / 16.0), 0.0)).xyz * 255.0 - vec3(1.0), p);
+}
+float lerp_Stage1_c0_c0(float a, float b, float w) {
+ return a + w * (b - a);
+}
+float noise_Stage1_c0_c0(vec3 p) {
+ vec3 P = mod(floor(p), 256.0);
+ p -= floor(p);
+ vec3 f = fade_Stage1_c0_c0(p);
+ float A = perm_Stage1_c0_c0(P.x) + P.y;
+ float AA = perm_Stage1_c0_c0(A) + P.z;
+ float AB = perm_Stage1_c0_c0(A + 1.0) + P.z;
+ float B = perm_Stage1_c0_c0(P.x + 1.0) + P.y;
+ float BA = perm_Stage1_c0_c0(B) + P.z;
+ float BB = perm_Stage1_c0_c0(B + 1.0) + P.z;
+ float result = lerp_Stage1_c0_c0(lerp_Stage1_c0_c0(lerp_Stage1_c0_c0(grad_Stage1_c0_c0(perm_Stage1_c0_c0(AA), p), grad_Stage1_c0_c0(perm_Stage1_c0_c0(BA), p + vec3(-1.0, 0.0, 0.0)), f.x), lerp_Stage1_c0_c0(grad_Stage1_c0_c0(perm_Stage1_c0_c0(AB), p + vec3(0.0, -1.0, 0.0)), grad_Stage1_c0_c0(perm_Stage1_c0_c0(BB), p + vec3(-1.0, -1.0, 0.0)), f.x), f.y), lerp_Stage1_c0_c0(lerp_Stage1_c0_c0(grad_Stage1_c0_c0(perm_Stage1_c0_c0(AA + 1.0), p + vec3(0.0, 0.0, -1.0)), grad_Stage1_c0_c0(perm_Stage1_c0_c0(BA + 1.0), p + vec3(-1.0, 0.0, -1.0)), f.x), lerp_Stage1_c0_c0(grad_Stage1_c0_c0(perm_Stage1_c0_c0(AB + 1.0), p + vec3(0.0, -1.0, -1.0)), grad_Stage1_c0_c0(perm_Stage1_c0_c0(BB + 1.0), p + vec3(-1.0, -1.0, -1.0)), f.x), f.y), f.z);
+ return result;
+}
+float noiseOctaves_Stage1_c0_c0(vec3 p) {
+ float result = 0.0;
+ float ratio = 1.0;
+ for (float i = 0.0;i < 9.0; i++) {
+ result += noise_Stage1_c0_c0(p) / ratio;
+ p *= 2.0;
+ ratio *= 2.0;
+ }
+ return (result + 1.0) / 2.0;
+}
+vec4 ImprovedPerlinNoise_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coords = vTransformedCoords_0_Stage0 * ubaseFrequency_Stage1_c0_c0;
+ float r = noiseOctaves_Stage1_c0_c0(vec3(coords, uz_Stage1_c0_c0));
+ float g = noiseOctaves_Stage1_c0_c0(vec3(coords, uz_Stage1_c0_c0));
+ float b = noiseOctaves_Stage1_c0_c0(vec3(coords, uz_Stage1_c0_c0));
+ float a = noiseOctaves_Stage1_c0_c0(vec3(coords, uz_Stage1_c0_c0));
+ _output = vec4(r, g, b, a);
+ _output = clamp(_output, 0.0, 1.0);
+ _output = vec4(_output.xyz * _output.www, _output.w);
+ return _output;
+}
+vec4 blend_modulate(vec4 src, vec4 dst) {
+ return src * dst;
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ float edgeAlpha;
+ vec2 duvdx = dFdx(vQuadEdge_Stage0.xy);
+ vec2 duvdy = -dFdy(vQuadEdge_Stage0.xy);
+ if (vQuadEdge_Stage0.z > 0.0 && vQuadEdge_Stage0.w > 0.0) {
+ edgeAlpha = min(min(vQuadEdge_Stage0.z, vQuadEdge_Stage0.w) + 0.5, 1.0);
+ } else {
+ vec2 gF = vec2((2.0 * vQuadEdge_Stage0.x) * duvdx.x - duvdx.y, (2.0 * vQuadEdge_Stage0.x) * duvdy.x - duvdy.y);
+ edgeAlpha = vQuadEdge_Stage0.x * vQuadEdge_Stage0.x - vQuadEdge_Stage0.y;
+ edgeAlpha = clamp(0.5 - edgeAlpha / length(gF), 0.0, 1.0);
+ }
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_modulate(ImprovedPerlinNoise_Stage1_c0_c0(vec4(1.0)), outputCoverage_Stage0);
+ }
+ {
+ sk_FragColor = 1.0 - output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec4 inQuadEdge;
+noperspective out vec4 vQuadEdge_Stage0;
+noperspective out vec4 vinColor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vQuadEdge_Stage0 = inQuadEdge;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1777.shader_test b/shaders/skia/1777.shader_test
new file mode 100644
index 0000000..3ee6db8
--- /dev/null
+++ b/shaders/skia/1777.shader_test
@@ -0,0 +1,44 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+noperspective in vec4 vinCircleEdge_Stage0;
+noperspective in vec4 vinColor_Stage0;
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ vec4 circleEdge;
+ circleEdge = vinCircleEdge_Stage0;
+ float d = length(circleEdge.xy);
+ float distanceToOuterEdge = circleEdge.z * (1.0 - d);
+ float edgeAlpha = clamp(distanceToOuterEdge, 0.0, 1.0);
+ float distanceToInnerEdge = circleEdge.z * (d - circleEdge.w);
+ float innerAlpha = clamp(distanceToInnerEdge, 0.0, 1.0);
+ edgeAlpha *= innerAlpha;
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ {
+ sk_FragColor = 1.0 - outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 inPosition;
+in vec4 inColor;
+in vec4 inCircleEdge;
+noperspective out vec4 vinCircleEdge_Stage0;
+noperspective out vec4 vinColor_Stage0;
+void main() {
+ vinCircleEdge_Stage0 = inCircleEdge;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = inPosition;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/178-2.shader_test b/shaders/skia/178-2.shader_test
new file mode 100644
index 0000000..0a876f5
--- /dev/null
+++ b/shaders/skia/178-2.shader_test
@@ -0,0 +1,78 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage2_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c1_c0;
+ }
+ return _output;
+}
+vec4 blend_dst_atop(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src + src.w * dst;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_dst_atop(ConstColorProcessor_Stage2_c1_c0(vec4(1.0)), output_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/178-3.shader_test b/shaders/skia/178-3.shader_test
new file mode 100644
index 0000000..155f196
--- /dev/null
+++ b/shaders/skia/178-3.shader_test
@@ -0,0 +1,193 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform float uSurfaceScale_Stage1;
+uniform vec3 uLightColor_Stage1;
+uniform float uKD_Stage1;
+uniform vec4 uTexDom_Stage1;
+uniform vec3 uDecalParams_Stage1;
+uniform vec3 uLightLocation_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 light_Stage1(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ float colorScale = uKD_Stage1 * dot(normal, surfaceToLight);
+ return vec4(lightColor * clamp(colorScale, 0.0, 1.0), 1.0);
+}
+float sobel_Stage1(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage1(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage1(float m[9], float surfaceScale) {
+ return pointToNormal_Stage1(sobel_Stage1(0.0, 0.0, m[3], m[4], m[6], m[7], 0.66666698455810547), sobel_Stage1(m[3], m[6], m[4], m[7], 0.0, 0.0, 0.66666698455810547), surfaceScale);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ vec2 coord = vTransformedCoords_0_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp0 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp5 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp6 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp7 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp8 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = normalize(uLightLocation_Stage1 - vec3(gl_FragCoord.xy, uSurfaceScale_Stage1 * m[4]));
+ output_Stage1 = light_Stage1(normal_Stage1(m, uSurfaceScale_Stage1), surfaceToLight, uLightColor_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/178-6.shader_test b/shaders/skia/178-6.shader_test
new file mode 100644
index 0000000..6fc5f16
--- /dev/null
+++ b/shaders/skia/178-6.shader_test
@@ -0,0 +1,77 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform vec4 uKernel_Stage1[4];
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0 - 6.0 * uImageIncrement_Stage1;
+ vec2 coordSampled = vec2(0.0, 0.0);
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].x;
+ coord += uImageIncrement_Stage1;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ sk_FragColor = sk_FragColor.wwww;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/178-7.shader_test b/shaders/skia/178-7.shader_test
new file mode 100644
index 0000000..0fce3fe
--- /dev/null
+++ b/shaders/skia/178-7.shader_test
@@ -0,0 +1,64 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec3 uedges_Stage2[7];
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ float alpha = 1.0;
+ float edge;
+ edge = dot(uedges_Stage2[0], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage2[1], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage2[2], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage2[3], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage2[4], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage2[5], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage2[6], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ alpha = 1.0 - alpha;
+ output_Stage2 = output_Stage1 * alpha;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/178.shader_test b/shaders/skia/178.shader_test
new file mode 100644
index 0000000..bc233c9
--- /dev/null
+++ b/shaders/skia/178.shader_test
@@ -0,0 +1,152 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage2_c1_c0;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.w) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ } else {
+ {
+ if (t < uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = OverrideInputFragmentProcessor_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c1_c0;
+ }
+ return _output;
+}
+vec4 blend_src_out(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 blend_darken(vec4 src, vec4 dst) {
+ vec4 result = blend_src_over(src, dst);
+ result.xyz = min(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
+ return result;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_src_out(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_darken(ConstColorProcessor_Stage2_c1_c0(vec4(1.0)), output_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 inColor;
+in vec2 inLocalCoord;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1780.shader_test b/shaders/skia/1780.shader_test
new file mode 100644
index 0000000..668c85b
--- /dev/null
+++ b/shaders/skia/1780.shader_test
@@ -0,0 +1,37 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+uniform vec4 uColor_Stage0;
+noperspective in vec3 vDashParam_Stage0;
+noperspective in vec2 vCircleParams_Stage0;
+void main() {
+ {
+ float xShifted = vDashParam_Stage0.x - floor(vDashParam_Stage0.x / vDashParam_Stage0.z) * vDashParam_Stage0.z;
+ vec2 fragPosShifted = vec2(xShifted, vDashParam_Stage0.y);
+ vec2 center = vec2(vCircleParams_Stage0.y, 0.0);
+ float dist = length(center - fragPosShifted);
+ float diff = dist - vCircleParams_Stage0.x;
+ diff = 1.0 - diff;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 inPosition;
+in vec3 inDashParams;
+in vec2 inCircleParams;
+noperspective out vec3 vDashParam_Stage0;
+noperspective out vec2 vCircleParams_Stage0;
+void main() {
+ vDashParam_Stage0 = inDashParams;
+ vCircleParams_Stage0 = inCircleParams;
+ vec2 pos2 = inPosition;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1783.shader_test b/shaders/skia/1783.shader_test
new file mode 100644
index 0000000..c9d482e
--- /dev/null
+++ b/shaders/skia/1783.shader_test
@@ -0,0 +1,667 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_KHR_blend_equation_advanced : require
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+layout (blend_support_all_equations) out ;
+uniform vec4 ucircle_Stage1_c0_c0_c0_c0;
+uniform float uinnerThreshold_Stage1_c0_c0_c1_c0;
+uniform float uouterThreshold_Stage1_c0_c0_c1_c0;
+uniform vec2 uImageIncrement_Stage1_c1_c0_c0_c0_c0_c0;
+uniform vec4 uKernel_Stage1_c1_c0_c0_c0_c0_c0[6];
+uniform vec2 uKernelOffset_Stage1_c1_c0_c0_c0_c0_c0;
+uniform float uGain_Stage1_c1_c0_c0_c0_c0_c0;
+uniform float uBias_Stage1_c1_c0_c0_c0_c0_c0;
+uniform vec4 uTexDom_Stage1_c1_c0_c0_c0_c0_c0;
+uniform vec3 uDecalParams_Stage1_c1_c0_c0_c0_c0_c0;
+uniform vec4 uinnerRect_Stage1_c1_c0_c0_c0_c1_c0;
+uniform vec4 uinvRadiiLTRB_Stage1_c1_c0_c0_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+noperspective in vec4 vinCircleEdge_Stage0;
+noperspective in vec4 vinColor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 CircleEffect_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float d;
+ {
+ d = (1.0 - length((ucircle_Stage1_c0_c0_c0_c0.xy - gl_FragCoord.xy) * ucircle_Stage1_c0_c0_c0_c0.w)) * ucircle_Stage1_c0_c0_c0_c0.z;
+ }
+ {
+ _output = _input * clamp(d, 0.0, 1.0);
+ }
+ return _output;
+}
+vec4 AlphaThresholdFragmentProcessor_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 color = _input;
+ vec4 mask_color = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ if (mask_color.w < 0.5) {
+ if (color.w > uouterThreshold_Stage1_c0_c0_c1_c0) {
+ float scale = uouterThreshold_Stage1_c0_c0_c1_c0 / color.w;
+ color.xyz *= scale;
+ color.w = uouterThreshold_Stage1_c0_c0_c1_c0;
+ }
+ } else if (color.w < uinnerThreshold_Stage1_c0_c0_c1_c0) {
+ float scale = uinnerThreshold_Stage1_c0_c0_c1_c0 / max(0.0010000000474974513, color.w);
+ color.xyz *= scale;
+ color.w = uinnerThreshold_Stage1_c0_c0_c1_c0;
+ }
+ _output = color;
+ return _output;
+}
+float _guarded_divide(float n, float d) {
+ return n / d;
+}
+float _soft_light_component(float sc, float sa, float dc, float da) {
+ if (2.0 * sc <= sa) {
+ return (_guarded_divide((dc * dc) * (sa - 2.0 * sc), da) + (1.0 - da) * sc) + dc * ((-sa + 2.0 * sc) + 1.0);
+ } else if (4.0 * dc <= da) {
+ float DSqd = dc * dc;
+ float DCub = DSqd * dc;
+ float DaSqd = da * da;
+ float DaCub = DaSqd * da;
+ return _guarded_divide(((DaSqd * (sc - dc * ((3.0 * sa - 6.0 * sc) - 1.0)) + ((12.0 * da) * DSqd) * (sa - 2.0 * sc)) - (16.0 * DCub) * (sa - 2.0 * sc)) - DaCub * sc, DaSqd);
+ }
+ return ((dc * ((sa - 2.0 * sc) + 1.0) + sc) - sqrt(da * dc) * (sa - 2.0 * sc)) - da * sc;
+}
+vec4 blend_soft_light(vec4 src, vec4 dst) {
+ if (dst.w == 0.0) {
+ return src;
+ }
+ return vec4(_soft_light_component(src.x, src.w, dst.x, dst.w), _soft_light_component(src.y, src.w, dst.y, dst.w), _soft_light_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+}
+vec4 ComposeTwo_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_soft_light(CircleEffect_Stage1_c0_c0_c0_c0(inputColor), AlphaThresholdFragmentProcessor_Stage1_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 MatrixConvolution_Stage1_c1_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 sum = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_1_Stage0 - uKernelOffset_Stage1_c1_c0_c0_c0_c0_c0 * uImageIncrement_Stage1_c1_c0_c0_c0_c0_c0;
+ vec4 c;
+ {
+ float k = uKernel_Stage1_c1_c0_c0_c0_c0_c0[0].x;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0_c0_c0.xy, uTexDom_Stage1_c1_c0_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0_c0_c0_c0_c0[0].y;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1_c1_c0_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0_c0_c0.xy, uTexDom_Stage1_c1_c0_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0_c0_c0_c0_c0[0].z;
+ {
+ vec2 origCoord = coord + vec2(2.0, 0.0) * uImageIncrement_Stage1_c1_c0_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0_c0_c0.xy, uTexDom_Stage1_c1_c0_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0_c0_c0_c0_c0[0].w;
+ {
+ vec2 origCoord = coord + vec2(3.0, 0.0) * uImageIncrement_Stage1_c1_c0_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0_c0_c0.xy, uTexDom_Stage1_c1_c0_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0_c0_c0_c0_c0[1].x;
+ {
+ vec2 origCoord = coord + vec2(4.0, 0.0) * uImageIncrement_Stage1_c1_c0_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0_c0_c0.xy, uTexDom_Stage1_c1_c0_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0_c0_c0_c0_c0[1].y;
+ {
+ vec2 origCoord = coord + vec2(5.0, 0.0) * uImageIncrement_Stage1_c1_c0_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0_c0_c0.xy, uTexDom_Stage1_c1_c0_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0_c0_c0_c0_c0[1].z;
+ {
+ vec2 origCoord = coord + vec2(6.0, 0.0) * uImageIncrement_Stage1_c1_c0_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0_c0_c0.xy, uTexDom_Stage1_c1_c0_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0_c0_c0_c0_c0[1].w;
+ {
+ vec2 origCoord = coord + vec2(7.0, 0.0) * uImageIncrement_Stage1_c1_c0_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0_c0_c0.xy, uTexDom_Stage1_c1_c0_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0_c0_c0_c0_c0[2].x;
+ {
+ vec2 origCoord = coord + vec2(8.0, 0.0) * uImageIncrement_Stage1_c1_c0_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0_c0_c0.xy, uTexDom_Stage1_c1_c0_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0_c0_c0_c0_c0[2].y;
+ {
+ vec2 origCoord = coord + vec2(9.0, 0.0) * uImageIncrement_Stage1_c1_c0_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0_c0_c0.xy, uTexDom_Stage1_c1_c0_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0_c0_c0_c0_c0[2].z;
+ {
+ vec2 origCoord = coord + vec2(10.0, 0.0) * uImageIncrement_Stage1_c1_c0_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0_c0_c0.xy, uTexDom_Stage1_c1_c0_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0_c0_c0_c0_c0[2].w;
+ {
+ vec2 origCoord = coord + vec2(11.0, 0.0) * uImageIncrement_Stage1_c1_c0_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0_c0_c0.xy, uTexDom_Stage1_c1_c0_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0_c0_c0_c0_c0[3].x;
+ {
+ vec2 origCoord = coord + vec2(12.0, 0.0) * uImageIncrement_Stage1_c1_c0_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0_c0_c0.xy, uTexDom_Stage1_c1_c0_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0_c0_c0_c0_c0[3].y;
+ {
+ vec2 origCoord = coord + vec2(13.0, 0.0) * uImageIncrement_Stage1_c1_c0_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0_c0_c0.xy, uTexDom_Stage1_c1_c0_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0_c0_c0_c0_c0[3].z;
+ {
+ vec2 origCoord = coord + vec2(14.0, 0.0) * uImageIncrement_Stage1_c1_c0_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0_c0_c0.xy, uTexDom_Stage1_c1_c0_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0_c0_c0_c0_c0[3].w;
+ {
+ vec2 origCoord = coord + vec2(15.0, 0.0) * uImageIncrement_Stage1_c1_c0_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0_c0_c0.xy, uTexDom_Stage1_c1_c0_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0_c0_c0_c0_c0[4].x;
+ {
+ vec2 origCoord = coord + vec2(16.0, 0.0) * uImageIncrement_Stage1_c1_c0_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0_c0_c0.xy, uTexDom_Stage1_c1_c0_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0_c0_c0_c0_c0[4].y;
+ {
+ vec2 origCoord = coord + vec2(17.0, 0.0) * uImageIncrement_Stage1_c1_c0_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0_c0_c0.xy, uTexDom_Stage1_c1_c0_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0_c0_c0_c0_c0[4].z;
+ {
+ vec2 origCoord = coord + vec2(18.0, 0.0) * uImageIncrement_Stage1_c1_c0_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0_c0_c0.xy, uTexDom_Stage1_c1_c0_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0_c0_c0_c0_c0[4].w;
+ {
+ vec2 origCoord = coord + vec2(19.0, 0.0) * uImageIncrement_Stage1_c1_c0_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0_c0_c0.xy, uTexDom_Stage1_c1_c0_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0_c0_c0_c0_c0[5].x;
+ {
+ vec2 origCoord = coord + vec2(20.0, 0.0) * uImageIncrement_Stage1_c1_c0_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0_c0_c0.xy, uTexDom_Stage1_c1_c0_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0_c0_c0_c0_c0[5].y;
+ {
+ vec2 origCoord = coord + vec2(21.0, 0.0) * uImageIncrement_Stage1_c1_c0_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0_c0_c0.xy, uTexDom_Stage1_c1_c0_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0_c0_c0_c0_c0[5].z;
+ {
+ vec2 origCoord = coord + vec2(22.0, 0.0) * uImageIncrement_Stage1_c1_c0_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0_c0_c0.xy, uTexDom_Stage1_c1_c0_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0_c0_c0_c0_c0[5].w;
+ {
+ vec2 origCoord = coord + vec2(23.0, 0.0) * uImageIncrement_Stage1_c1_c0_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0_c0_c0.xy, uTexDom_Stage1_c1_c0_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ vec2 origCoord = vTransformedCoords_1_Stage0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0_c0_c0.xy, uTexDom_Stage1_c1_c0_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ _output.w = c.w;
+ _output.xyz = clamp(sum.xyz * uGain_Stage1_c1_c0_c0_c0_c0_c0 + uBias_Stage1_c1_c0_c0_c0_c0_c0, 0.0, 1.0);
+ _output.xyz *= _output.w;
+ _output *= _input;
+ return _output;
+}
+vec4 EllipticalRRect_Stage1_c1_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 dxy0 = uinnerRect_Stage1_c1_c0_c0_c0_c1_c0.xy - gl_FragCoord.xy;
+ vec2 dxy1 = gl_FragCoord.xy - uinnerRect_Stage1_c1_c0_c0_c0_c1_c0.zw;
+ vec2 dxy = max(max(dxy0, dxy1), 0.0);
+ vec2 Z = max(max(dxy0 * uinvRadiiLTRB_Stage1_c1_c0_c0_c0_c1_c0.xy, dxy1 * uinvRadiiLTRB_Stage1_c1_c0_c0_c0_c1_c0.zw), 0.0);
+ float implicit = dot(Z, dxy) - 1.0;
+ float grad_dot = 4.0 * dot(Z, Z);
+ grad_dot = max(grad_dot, 9.9999997473787516e-05);
+ float approx_dist = implicit * inversesqrt(grad_dot);
+ float alpha = clamp(0.5 + approx_dist, 0.0, 1.0);
+ _output = _input * alpha;
+ return _output;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 blend_darken(vec4 src, vec4 dst) {
+ vec4 result = blend_src_over(src, dst);
+ result.xyz = min(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
+ return result;
+}
+vec4 ComposeTwo_Stage1_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_darken(MatrixConvolution_Stage1_c1_c0_c0_c0_c0_c0(inputColor), EllipticalRRect_Stage1_c1_c0_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 Big_Ole_Key_Stage1_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = _input;
+ return _output;
+}
+vec4 ComposeTwo_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_darken(ComposeTwo_Stage1_c1_c0_c0_c0(inputColor), Big_Ole_Key_Stage1_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+float _blend_overlay_component(float sc, float sa, float dc, float da) {
+ if (2.0 * dc <= da) {
+ return (2.0 * sc) * dc;
+ }
+ return sa * da - (2.0 * (da - dc)) * (sa - sc);
+}
+vec4 blend_overlay(vec4 src, vec4 dst) {
+ vec4 result = vec4(_blend_overlay_component(src.x, src.w, dst.x, dst.w), _blend_overlay_component(src.y, src.w, dst.y, dst.w), _blend_overlay_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+ result.xyz += dst.xyz * (1.0 - src.w) + src.xyz * (1.0 - dst.w);
+ return result;
+}
+vec4 blend_hard_light(vec4 src, vec4 dst) {
+ return blend_overlay(dst, src);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ vec4 circleEdge;
+ circleEdge = vinCircleEdge_Stage0;
+ outputColor_Stage0 = vinColor_Stage0;
+ float d = length(circleEdge.xy);
+ float distanceToOuterEdge = circleEdge.z * (1.0 - d);
+ float edgeAlpha = clamp(distanceToOuterEdge, 0.0, 1.0);
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_hard_light(ComposeTwo_Stage1_c0_c0(inputColor), ComposeTwo_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ sk_FragColor = outputCoverage_Stage0 * output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec4 inCircleEdge;
+noperspective out vec4 vinCircleEdge_Stage0;
+noperspective out vec4 vinColor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vinCircleEdge_Stage0 = inCircleEdge;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1786.shader_test b/shaders/skia/1786.shader_test
new file mode 100644
index 0000000..29c30b4
--- /dev/null
+++ b/shaders/skia/1786.shader_test
@@ -0,0 +1,47 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform sampler2D uTextureSampler_0_Stage0;
+flat in vec4 vcolor_Stage0;
+noperspective in vec2 vlocalCoord_Stage0;
+flat in vec4 vtexDomain_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ vec2 texCoord;
+ texCoord = vlocalCoord_Stage0;
+ vec4 domain;
+ domain = vtexDomain_Stage0;
+ texCoord = clamp(texCoord, domain.xy, domain.zw);
+ outputColor_Stage0 = texture(uTextureSampler_0_Stage0, texCoord) * outputColor_Stage0;
+ outputColor_Stage0 = clamp(outputColor_Stage0, 0.0, 1.0);
+ }
+ {
+ sk_FragColor = outputColor_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+in vec4 texDomain;
+flat out vec4 vcolor_Stage0;
+noperspective out vec2 vlocalCoord_Stage0;
+flat out vec4 vtexDomain_Stage0;
+void main() {
+ vcolor_Stage0 = color;
+ vlocalCoord_Stage0 = localCoord;
+ vtexDomain_Stage0 = texDomain;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1789.shader_test b/shaders/skia/1789.shader_test
new file mode 100644
index 0000000..4fdbdc4
--- /dev/null
+++ b/shaders/skia/1789.shader_test
@@ -0,0 +1,217 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uColor_Stage0;
+uniform float uinnerThreshold_Stage1;
+uniform float uouterThreshold_Stage1;
+uniform vec4 urectUniform_Stage2;
+uniform vec2 uScale_Stage3_c0_c0;
+uniform vec4 uTexDom_Stage3_c0_c0;
+uniform vec3 uDecalParams_Stage3_c0_c0;
+uniform vec2 uScale_Stage3_c1_c0;
+uniform vec4 uTexDom_Stage3_c1_c0;
+uniform vec3 uDecalParams_Stage3_c1_c0;
+uniform vec4 uscale0_1_Stage4_c2_c0_c1_c0;
+uniform vec4 uscale2_3_Stage4_c2_c0_c1_c0;
+uniform vec4 uscale4_5_Stage4_c2_c0_c1_c0;
+uniform vec4 ubias0_1_Stage4_c2_c0_c1_c0;
+uniform vec4 ubias2_3_Stage4_c2_c0_c1_c0;
+uniform vec4 ubias4_5_Stage4_c2_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage4_c2_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage4_c2_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage3;
+uniform sampler2D uTextureSampler_1_Stage3;
+uniform sampler2D uTextureSampler_2_Stage3;
+uniform sampler2D uTextureSampler_3_Stage3;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+noperspective in vec2 vTransformedCoords_3_Stage0;
+noperspective in vec2 vTransformedCoords_4_Stage0;
+noperspective in vec2 vTransformedCoords_5_Stage0;
+noperspective in float vinCoverage_Stage0;
+vec4 DisplacementMap_Stage3_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 dColor = texture(uTextureSampler_0_Stage3, vTransformedCoords_1_Stage0);
+ dColor.xyz = dColor.w < 9.9999999747524271e-07 ? vec3(0.0) : clamp(dColor.xyz / dColor.w, 0.0, 1.0);
+ vec2 cCoords = vTransformedCoords_2_Stage0 + uScale_Stage3_c0_c0 * (dColor.ww - vec2(0.5));
+ {
+ vec2 origCoord = cCoords;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage3_c0_c0.xy, uTexDom_Stage3_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage3, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage3_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage3_c0_c0.y);
+ if (err > uDecalParams_Stage3_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage3_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ _output = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ return _output;
+}
+vec4 DisplacementMap_Stage3_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 dColor = texture(uTextureSampler_2_Stage3, vTransformedCoords_3_Stage0);
+ dColor.xyz = dColor.w < 9.9999999747524271e-07 ? vec3(0.0) : clamp(dColor.xyz / dColor.w, 0.0, 1.0);
+ vec2 cCoords = vTransformedCoords_4_Stage0 + uScale_Stage3_c1_c0 * (dColor.yw - vec2(0.5));
+ {
+ vec2 origCoord = cCoords;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage3_c1_c0.xy, uTexDom_Stage3_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_3_Stage3, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage3_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage3_c1_c0.y);
+ if (err > uDecalParams_Stage3_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage3_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ _output = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ return _output;
+}
+vec4 LinearGradientLayout_Stage4_c2_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_5_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage4_c2_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage4_c2_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage4_c2_c0_c1_c0.x) {
+ scale = uscale0_1_Stage4_c2_c0_c1_c0;
+ bias = ubias0_1_Stage4_c2_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage4_c2_c0_c1_c0;
+ bias = ubias2_3_Stage4_c2_c0_c1_c0;
+ }
+ } else {
+ {
+ scale = uscale4_5_Stage4_c2_c0_c1_c0;
+ bias = ubias4_5_Stage4_c2_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage4_c2_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage4_c2_c0_c0_c0(vec4(1.0));
+ {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage4_c2_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_difference(vec4 src, vec4 dst) {
+ return vec4((src.xyz + dst.xyz) - 2.0 * min(src.xyz * dst.w, dst.xyz * src.w), src.w + (1.0 - src.w) * dst.w);
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ float alpha = 1.0;
+ alpha = vinCoverage_Stage0;
+ outputCoverage_Stage0 = vec4(alpha);
+ }
+ vec4 output_Stage1;
+ {
+ vec4 color = outputCoverage_Stage0;
+ vec4 mask_color = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ if (mask_color.w < 0.5) {
+ if (color.w > uouterThreshold_Stage1) {
+ float scale = uouterThreshold_Stage1 / color.w;
+ color.xyz *= scale;
+ color.w = uouterThreshold_Stage1;
+ }
+ } else if (color.w < uinnerThreshold_Stage1) {
+ float scale = uinnerThreshold_Stage1 / max(0.0010000000474974513, color.w);
+ color.xyz *= scale;
+ color.w = uinnerThreshold_Stage1;
+ }
+ output_Stage1 = color;
+ }
+ vec4 output_Stage2;
+ {
+ float alpha;
+ {
+ float xSub, ySub;
+ xSub = min(gl_FragCoord.x - urectUniform_Stage2.x, 0.0);
+ xSub += min(urectUniform_Stage2.z - gl_FragCoord.x, 0.0);
+ ySub = min(gl_FragCoord.y - urectUniform_Stage2.y, 0.0);
+ ySub += min(urectUniform_Stage2.w - gl_FragCoord.y, 0.0);
+ alpha = (1.0 + max(xSub, -1.0)) * (1.0 + max(ySub, -1.0));
+ }
+ output_Stage2 = output_Stage1 * alpha;
+ }
+ vec4 output_Stage3;
+ {
+ vec4 inputColor = vec4(output_Stage2.xyz, 1.0);
+ output_Stage3 = blend_difference(DisplacementMap_Stage3_c0_c0(inputColor), DisplacementMap_Stage3_c1_c0(inputColor));
+ output_Stage3 *= output_Stage2.w;
+ }
+ vec4 output_Stage4;
+ {
+ output_Stage4 = blend_dst_in(output_Stage3, TiledGradientEffect_Stage4_c2_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage4;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+uniform mat3 uCoordTransformMatrix_3_Stage0;
+uniform mat3 uCoordTransformMatrix_4_Stage0;
+uniform mat3 uCoordTransformMatrix_5_Stage0;
+in vec2 inPosition;
+in float inCoverage;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+noperspective out vec2 vTransformedCoords_3_Stage0;
+noperspective out vec2 vTransformedCoords_4_Stage0;
+noperspective out vec2 vTransformedCoords_5_Stage0;
+noperspective out float vinCoverage_Stage0;
+void main() {
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_3_Stage0 = (uCoordTransformMatrix_3_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_4_Stage0 = (uCoordTransformMatrix_4_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_5_Stage0 = (uCoordTransformMatrix_5_Stage0 * vec3(inPosition, 1.0)).xy;
+ vinCoverage_Stage0 = inCoverage;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1792.shader_test b/shaders/skia/1792.shader_test
new file mode 100644
index 0000000..71beadd
--- /dev/null
+++ b/shaders/skia/1792.shader_test
@@ -0,0 +1,78 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+uniform float uinnerThreshold_Stage1;
+uniform float uouterThreshold_Stage1;
+uniform vec4 urectUniform_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vEllipseOffsets0_Stage0;
+noperspective in vec2 vEllipseOffsets1_Stage0;
+noperspective in vec4 vinColor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ vec2 scaledOffset = vEllipseOffsets0_Stage0;
+ float test = dot(scaledOffset, scaledOffset) - 1.0;
+ vec2 duvdx = dFdx(vEllipseOffsets0_Stage0);
+ vec2 duvdy = dFdy(vEllipseOffsets0_Stage0);
+ vec2 grad = vec2(vEllipseOffsets0_Stage0.x * duvdx.x + vEllipseOffsets0_Stage0.y * duvdx.y, vEllipseOffsets0_Stage0.x * duvdy.x + vEllipseOffsets0_Stage0.y * duvdy.y);
+ float grad_dot = 4.0 * dot(grad, grad);
+ grad_dot = max(grad_dot, 1.1754999560161448e-38);
+ float invlen = inversesqrt(grad_dot);
+ float edgeAlpha = clamp(0.5 - test * invlen, 0.0, 1.0);
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ {
+ vec4 color = outputCoverage_Stage0;
+ vec4 mask_color = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ if (mask_color.w < 0.5) {
+ if (color.w > uouterThreshold_Stage1) {
+ float scale = uouterThreshold_Stage1 / color.w;
+ color.xyz *= scale;
+ color.w = uouterThreshold_Stage1;
+ }
+ } else if (color.w < uinnerThreshold_Stage1) {
+ float scale = uinnerThreshold_Stage1 / max(0.0010000000474974513, color.w);
+ color.xyz *= scale;
+ color.w = uinnerThreshold_Stage1;
+ }
+ }
+ {
+ float alpha;
+ {
+ alpha = float(all(greaterThan(vec4(gl_FragCoord.xy, urectUniform_Stage2.zw), vec4(urectUniform_Stage2.xy, gl_FragCoord.xy))) ? 1 : 0);
+ }
+ {
+ alpha = 1.0 - alpha;
+ }
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec2 inEllipseOffsets0;
+in vec2 inEllipseOffsets1;
+noperspective out vec2 vEllipseOffsets0_Stage0;
+noperspective out vec2 vEllipseOffsets1_Stage0;
+noperspective out vec4 vinColor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vEllipseOffsets0_Stage0 = inEllipseOffsets0;
+ vEllipseOffsets1_Stage0 = inEllipseOffsets1;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = (uViewM_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1795.shader_test b/shaders/skia/1795.shader_test
new file mode 100644
index 0000000..d536044
--- /dev/null
+++ b/shaders/skia/1795.shader_test
@@ -0,0 +1,139 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+noperspective in vec4 vinCircleEdge_Stage0;
+noperspective in vec3 vinClipPlane_Stage0;
+noperspective in vec3 vinIsectPlane_Stage0;
+noperspective in vec4 vinColor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ vec4 circleEdge;
+ circleEdge = vinCircleEdge_Stage0;
+ vec3 clipPlane;
+ clipPlane = vinClipPlane_Stage0;
+ vec3 isectPlane;
+ isectPlane = vinIsectPlane_Stage0;
+ float d = length(circleEdge.xy);
+ float distanceToOuterEdge = circleEdge.z * (1.0 - d);
+ float edgeAlpha = clamp(distanceToOuterEdge, 0.0, 1.0);
+ float distanceToInnerEdge = circleEdge.z * (d - circleEdge.w);
+ float innerAlpha = clamp(distanceToInnerEdge, 0.0, 1.0);
+ edgeAlpha *= innerAlpha;
+ float clip = clamp(circleEdge.z * dot(circleEdge.xy, clipPlane.xy) + clipPlane.z, 0.0, 1.0);
+ clip *= clamp(circleEdge.z * dot(circleEdge.xy, isectPlane.xy) + isectPlane.z, 0.0, 1.0);
+ edgeAlpha *= clip;
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_dst_in(outputCoverage_Stage0, ClampedGradientEffect_Stage1_c0_c0(vec4(1.0)));
+ }
+ vec4 output_Stage2;
+ {
+ {
+ float alpha = clamp(output_Stage1.w, 0.0, 1.0);
+ output_Stage2 = vec4(clamp(output_Stage1.xyz, 0.0, alpha), alpha);
+ }
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec4 inCircleEdge;
+in vec3 inClipPlane;
+in vec3 inIsectPlane;
+noperspective out vec4 vinCircleEdge_Stage0;
+noperspective out vec3 vinClipPlane_Stage0;
+noperspective out vec3 vinIsectPlane_Stage0;
+noperspective out vec4 vinColor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vinCircleEdge_Stage0 = inCircleEdge;
+ vinClipPlane_Stage0 = inClipPlane;
+ vinIsectPlane_Stage0 = inIsectPlane;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1798.shader_test b/shaders/skia/1798.shader_test
new file mode 100644
index 0000000..02e7eb2
--- /dev/null
+++ b/shaders/skia/1798.shader_test
@@ -0,0 +1,250 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uColor_Stage0;
+uniform vec4 ucircleData_Stage1_c0_c0_c0_c0_c0_c0;
+uniform vec4 ucolor0_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 ucolor1_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 ucolor2_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 ucolor3_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 ucolor4_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 ucolor5_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 uboundsUniform_Stage1_c0_c0_c1_c0;
+uniform float uxInvZoom_Stage1_c0_c0_c1_c0;
+uniform float uyInvZoom_Stage1_c0_c0_c1_c0;
+uniform float uxInvInset_Stage1_c0_c0_c1_c0;
+uniform float uyInvInset_Stage1_c0_c0_c1_c0;
+uniform vec2 uoffset_Stage1_c0_c0_c1_c0;
+uniform vec4 ucircleData_Stage1_c1_c0_c0_c0_c0_c0;
+uniform vec4 uboundsUniform_Stage1_c1_c0_c1_c0;
+uniform float uxInvZoom_Stage1_c1_c0_c1_c0;
+uniform float uyInvZoom_Stage1_c1_c0_c1_c0;
+uniform float uxInvInset_Stage1_c1_c0_c1_c0;
+uniform float uyInvInset_Stage1_c1_c0_c1_c0;
+uniform vec2 uoffset_Stage1_c1_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+uniform sampler2D uTextureSampler_2_Stage1;
+uniform sampler2D uTextureSampler_3_Stage1;
+uniform sampler2D uTextureSampler_4_Stage1;
+in vec2 vTransformedCoords_0_Stage0;
+in vec2 vTransformedCoords_1_Stage0;
+in vec2 vTransformedCoords_2_Stage0;
+vec4 CircleBlurFragmentProcessor_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 vec = vec2((gl_FragCoord.x - ucircleData_Stage1_c0_c0_c0_c0_c0_c0.x) * ucircleData_Stage1_c0_c0_c0_c0_c0_c0.w, (gl_FragCoord.y - ucircleData_Stage1_c0_c0_c0_c0_c0_c0.y) * ucircleData_Stage1_c0_c0_c0_c0_c0_c0.w);
+ float dist = length(vec) + (0.5 - ucircleData_Stage1_c0_c0_c0_c0_c0_c0.z) * ucircleData_Stage1_c0_c0_c0_c0_c0_c0.w;
+ _output = _input * texture(uTextureSampler_0_Stage1, vec2(dist, 0.5)).w;
+ return _output;
+}
+vec4 Overdraw_Stage1_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = _input;
+ float alpha = 255.0 * _output.w;
+ if (alpha < 0.5) {
+ _output = ucolor0_Stage1_c0_c0_c0_c0_c1_c0;
+ } else if (alpha < 1.5) {
+ _output = ucolor1_Stage1_c0_c0_c0_c0_c1_c0;
+ } else if (alpha < 2.5) {
+ _output = ucolor2_Stage1_c0_c0_c0_c0_c1_c0;
+ } else if (alpha < 3.5) {
+ _output = ucolor3_Stage1_c0_c0_c0_c0_c1_c0;
+ } else if (alpha < 4.5) {
+ _output = ucolor4_Stage1_c0_c0_c0_c0_c1_c0;
+ } else {
+ _output = ucolor5_Stage1_c0_c0_c0_c0_c1_c0;
+ }
+ return _output;
+}
+vec4 blend_src_atop(vec4 src, vec4 dst) {
+ return dst.w * src + (1.0 - src.w) * dst;
+}
+vec4 ComposeTwo_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_src_atop(CircleBlurFragmentProcessor_Stage1_c0_c0_c0_c0_c0_c0(inputColor), Overdraw_Stage1_c0_c0_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 MagnifierEffect_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coord = vTransformedCoords_1_Stage0;
+ vec2 zoom_coord = uoffset_Stage1_c0_c0_c1_c0 + coord * vec2(uxInvZoom_Stage1_c0_c0_c1_c0, uyInvZoom_Stage1_c0_c0_c1_c0);
+ vec2 delta = (coord - uboundsUniform_Stage1_c0_c0_c1_c0.xy) * uboundsUniform_Stage1_c0_c0_c1_c0.zw;
+ delta = min(delta, vec2(1.0, 1.0) - delta);
+ delta *= vec2(uxInvInset_Stage1_c0_c0_c1_c0, uyInvInset_Stage1_c0_c0_c1_c0);
+ float weight = 0.0;
+ if (delta.x < 2.0 && delta.y < 2.0) {
+ delta = vec2(2.0, 2.0) - delta;
+ float dist = length(delta);
+ dist = max(2.0 - dist, 0.0);
+ weight = min(dist * dist, 1.0);
+ } else {
+ vec2 delta_squared = delta * delta;
+ weight = min(min(delta_squared.x, delta_squared.y), 1.0);
+ }
+ _output = texture(uTextureSampler_1_Stage1, mix(coord, zoom_coord, weight));
+ return _output;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 ComposeTwo_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_src_over(ComposeTwo_Stage1_c0_c0_c0_c0(inputColor), MagnifierEffect_Stage1_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 CircleBlurFragmentProcessor_Stage1_c1_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 vec = vec2((gl_FragCoord.x - ucircleData_Stage1_c1_c0_c0_c0_c0_c0.x) * ucircleData_Stage1_c1_c0_c0_c0_c0_c0.w, (gl_FragCoord.y - ucircleData_Stage1_c1_c0_c0_c0_c0_c0.y) * ucircleData_Stage1_c1_c0_c0_c0_c0_c0.w);
+ float dist = length(vec) + (0.5 - ucircleData_Stage1_c1_c0_c0_c0_c0_c0.z) * ucircleData_Stage1_c1_c0_c0_c0_c0_c0.w;
+ _output = _input * texture(uTextureSampler_2_Stage1, vec2(dist, 0.5)).w;
+ return _output;
+}
+vec4 ColorTableEffect_Stage1_c1_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float nonZeroAlpha = max(_input.w, 9.9999997473787516e-05);
+ vec4 coord = vec4(_input.xyz / nonZeroAlpha, nonZeroAlpha);
+ coord = coord * 0.9960939884185791 + vec4(0.0019529999699443579, 0.0019529999699443579, 0.0019529999699443579, 0.0019529999699443579);
+ _output.w = texture(uTextureSampler_3_Stage1, vec2(coord.w, 0.125)).w;
+ _output.x = texture(uTextureSampler_3_Stage1, vec2(coord.x, 0.375)).w;
+ _output.y = texture(uTextureSampler_3_Stage1, vec2(coord.y, 0.625)).w;
+ _output.z = texture(uTextureSampler_3_Stage1, vec2(coord.z, 0.875)).w;
+ _output.xyz *= _output.w;
+ return _output;
+}
+vec4 ComposeTwo_Stage1_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_src_atop(CircleBlurFragmentProcessor_Stage1_c1_c0_c0_c0_c0_c0(inputColor), ColorTableEffect_Stage1_c1_c0_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 MagnifierEffect_Stage1_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coord = vTransformedCoords_2_Stage0;
+ vec2 zoom_coord = uoffset_Stage1_c1_c0_c1_c0 + coord * vec2(uxInvZoom_Stage1_c1_c0_c1_c0, uyInvZoom_Stage1_c1_c0_c1_c0);
+ vec2 delta = (coord - uboundsUniform_Stage1_c1_c0_c1_c0.xy) * uboundsUniform_Stage1_c1_c0_c1_c0.zw;
+ delta = min(delta, vec2(1.0, 1.0) - delta);
+ delta *= vec2(uxInvInset_Stage1_c1_c0_c1_c0, uyInvInset_Stage1_c1_c0_c1_c0);
+ float weight = 0.0;
+ if (delta.x < 2.0 && delta.y < 2.0) {
+ delta = vec2(2.0, 2.0) - delta;
+ float dist = length(delta);
+ dist = max(2.0 - dist, 0.0);
+ weight = min(dist * dist, 1.0);
+ } else {
+ vec2 delta_squared = delta * delta;
+ weight = min(min(delta_squared.x, delta_squared.y), 1.0);
+ }
+ _output = texture(uTextureSampler_4_Stage1, mix(coord, zoom_coord, weight));
+ return _output;
+}
+float _blend_color_saturation(vec3 color) {
+ return max(max(color.x, color.y), color.z) - min(min(color.x, color.y), color.z);
+}
+vec3 _blend_set_color_saturation_helper(vec3 minMidMax, float sat) {
+ if (minMidMax.x < minMidMax.z) {
+ return vec3(0.0, (sat * (minMidMax.y - minMidMax.x)) / (minMidMax.z - minMidMax.x), sat);
+ }
+ return vec3(0.0);
+}
+vec3 _blend_set_color_saturation(vec3 hueLumColor, vec3 satColor) {
+ float sat = _blend_color_saturation(satColor);
+ if (hueLumColor.x <= hueLumColor.y) {
+ if (hueLumColor.y <= hueLumColor.z) {
+ hueLumColor.xyz = _blend_set_color_saturation_helper(hueLumColor, sat);
+ } else if (hueLumColor.x <= hueLumColor.z) {
+ hueLumColor.xzy = _blend_set_color_saturation_helper(hueLumColor.xzy, sat);
+ } else {
+ hueLumColor.zxy = _blend_set_color_saturation_helper(hueLumColor.zxy, sat);
+ }
+ } else if (hueLumColor.x <= hueLumColor.z) {
+ hueLumColor.yxz = _blend_set_color_saturation_helper(hueLumColor.yxz, sat);
+ } else if (hueLumColor.y <= hueLumColor.z) {
+ hueLumColor.yzx = _blend_set_color_saturation_helper(hueLumColor.yzx, sat);
+ } else {
+ hueLumColor.zyx = _blend_set_color_saturation_helper(hueLumColor.zyx, sat);
+ }
+ return hueLumColor;
+}
+float _blend_color_luminance(vec3 color) {
+ return dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), color);
+}
+vec3 _blend_set_color_luminance(vec3 hueSatColor, float alpha, vec3 lumColor) {
+ float lum = _blend_color_luminance(lumColor);
+ vec3 result = (lum - _blend_color_luminance(hueSatColor)) + hueSatColor;
+ float minComp = min(min(result.x, result.y), result.z);
+ float maxComp = max(max(result.x, result.y), result.z);
+ if (minComp < 0.0 && lum != minComp) {
+ result = lum + ((result - lum) * lum) / (lum - minComp);
+ }
+ if (maxComp > alpha && maxComp != lum) {
+ return lum + ((result - lum) * (alpha - lum)) / (maxComp - lum);
+ }
+ return result;
+}
+vec4 blend_saturation(vec4 src, vec4 dst) {
+ float alpha = dst.w * src.w;
+ vec3 sda = src.xyz * dst.w;
+ vec3 dsa = dst.xyz * src.w;
+ return vec4((((_blend_set_color_luminance(_blend_set_color_saturation(dsa, sda), alpha, dsa) + dst.xyz) - dsa) + src.xyz) - sda, (src.w + dst.w) - alpha);
+}
+vec4 ComposeTwo_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_saturation(ComposeTwo_Stage1_c1_c0_c0_c0(inputColor), MagnifierEffect_Stage1_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 blend_hue(vec4 src, vec4 dst) {
+ float alpha = dst.w * src.w;
+ vec3 sda = src.xyz * dst.w;
+ vec3 dsa = dst.xyz * src.w;
+ return vec4((((_blend_set_color_luminance(_blend_set_color_saturation(sda, dsa), alpha, dsa) + dst.xyz) - dsa) + src.xyz) - sda, (src.w + dst.w) - alpha);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = uColor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_hue(ComposeTwo_Stage1_c0_c0(inputColor), ComposeTwo_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+in vec2 position;
+out vec2 vTransformedCoords_0_Stage0;
+out vec2 vTransformedCoords_1_Stage0;
+out vec2 vTransformedCoords_2_Stage0;
+void main() {
+ vec3 pos3 = uViewM_Stage0 * vec3(position, 1.0);
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(position, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(position, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(position, 1.0)).xy;
+ gl_Position = vec4(pos3.x, pos3.y, 0.0, pos3.z);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1801.shader_test b/shaders/skia/1801.shader_test
new file mode 100644
index 0000000..3b4dc90
--- /dev/null
+++ b/shaders/skia/1801.shader_test
@@ -0,0 +1,46 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_KHR_blend_equation_advanced : require
+out vec4 sk_FragColor;
+layout (blend_support_all_equations) out ;
+uniform vec4 urectUniform_Stage1;
+noperspective in vec4 vcolor_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ float alpha;
+ {
+ alpha = float(all(greaterThan(vec4(gl_FragCoord.xy, urectUniform_Stage1.zw), vec4(urectUniform_Stage1.xy, gl_FragCoord.xy))) ? 1 : 0);
+ }
+ output_Stage1 = outputColor_Stage0 * alpha;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 inPosition;
+in vec4 inColor;
+in float inCoverage;
+noperspective out vec4 vcolor_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color * inCoverage;
+ vcolor_Stage0 = color;
+ vec2 pos2 = inPosition;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1804.shader_test b/shaders/skia/1804.shader_test
new file mode 100644
index 0000000..181c5c8
--- /dev/null
+++ b/shaders/skia/1804.shader_test
@@ -0,0 +1,75 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform float ubias_Stage1_c0_c0_c0_c0;
+uniform float uscale_Stage1_c0_c0_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 SweepGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float angle;
+ {
+ angle = atan(-vTransformedCoords_0_Stage0.y, -vTransformedCoords_0_Stage0.x);
+ }
+ float t = ((angle * 0.15915493667125702 + 0.5) + ubias_Stage1_c0_c0_c0_c0) * uscale_Stage1_c0_c0_c0_c0;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = SweepGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ {
+ blend_dst_in(vec4(1.0), ClampedGradientEffect_Stage1_c0_c0(vec4(1.0)));
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 color = inColor;
+ vcolor_Stage0 = color;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1807.shader_test b/shaders/skia/1807.shader_test
new file mode 100644
index 0000000..603b536
--- /dev/null
+++ b/shaders/skia/1807.shader_test
@@ -0,0 +1,109 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uColor_Stage0;
+uniform vec4 urectH_Stage1_c0_c0;
+uniform float uinvSixSigma_Stage1_c0_c0;
+uniform vec3 uedges_Stage1_c1_c0[8];
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec3 vDashParams_Stage0;
+noperspective in vec4 vRectParams_Stage0;
+vec4 RectBlurEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ float xCoverage, yCoverage;
+ {
+ float x, y;
+ {
+ x = max(urectH_Stage1_c0_c0.x - gl_FragCoord.x, gl_FragCoord.x - urectH_Stage1_c0_c0.z);
+ y = max(urectH_Stage1_c0_c0.y - gl_FragCoord.y, gl_FragCoord.y - urectH_Stage1_c0_c0.w);
+ }
+ xCoverage = texture(uTextureSampler_0_Stage1, vec2(x * uinvSixSigma_Stage1_c0_c0, 0.5)).w;
+ yCoverage = texture(uTextureSampler_0_Stage1, vec2(y * uinvSixSigma_Stage1_c0_c0, 0.5)).w;
+ _output = (_input * xCoverage) * yCoverage;
+ }
+ _output = (_input * xCoverage) * yCoverage;
+ return _output;
+}
+vec4 ConvexPoly_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ float alpha = 1.0;
+ float edge;
+ edge = dot(uedges_Stage1_c1_c0[0], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage1_c1_c0[1], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage1_c1_c0[2], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage1_c1_c0[3], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage1_c1_c0[4], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage1_c1_c0[5], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage1_c1_c0[6], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage1_c1_c0[7], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ _output = _input * alpha;
+ return _output;
+}
+vec4 blend_dst_atop(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src + src.w * dst;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = uColor_Stage0;
+ float xShifted = vDashParams_Stage0.x - floor(vDashParams_Stage0.x / vDashParams_Stage0.z) * vDashParams_Stage0.z;
+ vec2 fragPosShifted = vec2(xShifted, vDashParams_Stage0.y);
+ float xSub, ySub;
+ xSub = min(fragPosShifted.x - vRectParams_Stage0.x, 0.0);
+ xSub += min(vRectParams_Stage0.z - fragPosShifted.x, 0.0);
+ ySub = min(fragPosShifted.y - vRectParams_Stage0.y, 0.0);
+ ySub += min(vRectParams_Stage0.w - fragPosShifted.y, 0.0);
+ float alpha = (1.0 + max(xSub, -1.0)) * (1.0 + max(ySub, -1.0));
+ outputCoverage_Stage0 = vec4(alpha);
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_dst_atop(RectBlurEffect_Stage1_c0_c0(inputColor), ConvexPoly_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ sk_FragColor = (1.0 - output_Stage1.w) * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 inPosition;
+in vec3 inDashParams;
+in vec4 inRect;
+noperspective out vec3 vDashParams_Stage0;
+noperspective out vec4 vRectParams_Stage0;
+void main() {
+ vDashParams_Stage0 = inDashParams;
+ vRectParams_Stage0 = inRect;
+ vec2 pos2 = inPosition;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/181-2.shader_test b/shaders/skia/181-2.shader_test
new file mode 100644
index 0000000..ff7be4e
--- /dev/null
+++ b/shaders/skia/181-2.shader_test
@@ -0,0 +1,82 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage2_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c1_c0;
+ }
+ return _output;
+}
+vec4 blend_dst_atop(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src + src.w * dst;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_dst_atop(ConstColorProcessor_Stage2_c1_c0(vec4(1.0)), output_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/181-3.shader_test b/shaders/skia/181-3.shader_test
new file mode 100644
index 0000000..d2bda80
--- /dev/null
+++ b/shaders/skia/181-3.shader_test
@@ -0,0 +1,193 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform float uSurfaceScale_Stage1;
+uniform vec3 uLightColor_Stage1;
+uniform float uKD_Stage1;
+uniform vec4 uTexDom_Stage1;
+uniform vec3 uDecalParams_Stage1;
+uniform vec3 uLightLocation_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 light_Stage1(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ float colorScale = uKD_Stage1 * dot(normal, surfaceToLight);
+ return vec4(lightColor * clamp(colorScale, 0.0, 1.0), 1.0);
+}
+float sobel_Stage1(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage1(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage1(float m[9], float surfaceScale) {
+ return pointToNormal_Stage1(sobel_Stage1(m[1], m[2], m[4], m[5], m[7], m[8], 0.5), sobel_Stage1(0.0, 0.0, m[1], m[7], m[2], m[8], 0.33333298563957214), surfaceScale);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ vec2 coord = vTransformedCoords_0_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp0 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp5 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp6 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp7 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp8 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = normalize(uLightLocation_Stage1 - vec3(gl_FragCoord.xy, uSurfaceScale_Stage1 * m[4]));
+ output_Stage1 = light_Stage1(normal_Stage1(m, uSurfaceScale_Stage1), surfaceToLight, uLightColor_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/181-6.shader_test b/shaders/skia/181-6.shader_test
new file mode 100644
index 0000000..d99e73a
--- /dev/null
+++ b/shaders/skia/181-6.shader_test
@@ -0,0 +1,91 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform vec2 uBounds_Stage1;
+uniform vec4 uKernel_Stage1[4];
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0 - 6.0 * uImageIncrement_Stage1;
+ vec2 coordSampled = vec2(0.0, 0.0);
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].x;
+ coord += uImageIncrement_Stage1;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ sk_FragColor = sk_FragColor.wwww;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/181-7.shader_test b/shaders/skia/181-7.shader_test
new file mode 100644
index 0000000..fe84a2f
--- /dev/null
+++ b/shaders/skia/181-7.shader_test
@@ -0,0 +1,46 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec3 uedges_Stage2[1];
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ float alpha = 1.0;
+ float edge;
+ edge = dot(uedges_Stage2[0], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ alpha = 1.0 - alpha;
+ output_Stage2 = output_Stage1 * alpha;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/181.shader_test b/shaders/skia/181.shader_test
new file mode 100644
index 0000000..21b3a93
--- /dev/null
+++ b/shaders/skia/181.shader_test
@@ -0,0 +1,81 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 ucolor_Stage1_c0_c0_c0_c0;
+uniform vec4 ucolor_Stage2_c1_c0;
+noperspective in vec4 vcolor_Stage0;
+vec4 ConstColorProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = _input.w * ucolor_Stage1_c0_c0_c0_c0;
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = ConstColorProcessor_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c1_c0;
+ }
+ return _output;
+}
+vec4 blend_src_out(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 blend_darken(vec4 src, vec4 dst) {
+ vec4 result = blend_src_over(src, dst);
+ result.xyz = min(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
+ return result;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_src_out(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_darken(ConstColorProcessor_Stage2_c1_c0(vec4(1.0)), output_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 position;
+in vec4 inColor;
+noperspective out vec4 vcolor_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1810.shader_test b/shaders/skia/1810.shader_test
new file mode 100644
index 0000000..662ccbb
--- /dev/null
+++ b/shaders/skia/1810.shader_test
@@ -0,0 +1,216 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 urectH_Stage2;
+uniform float uinvSixSigma_Stage2;
+uniform vec4 ucolor_Stage3;
+uniform vec4 uleftBorderColor_Stage4_c1_c0;
+uniform vec4 urightBorderColor_Stage4_c1_c0;
+uniform float ubias_Stage4_c1_c0_c0_c0;
+uniform float uscale_Stage4_c1_c0_c0_c0;
+uniform vec4 uscale0_1_Stage4_c1_c0_c1_c0;
+uniform vec4 uscale2_3_Stage4_c1_c0_c1_c0;
+uniform vec4 uscale4_5_Stage4_c1_c0_c1_c0;
+uniform vec4 ubias0_1_Stage4_c1_c0_c1_c0;
+uniform vec4 ubias2_3_Stage4_c1_c0_c1_c0;
+uniform vec4 ubias4_5_Stage4_c1_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage4_c1_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage4_c1_c0_c1_c0;
+uniform vec4 uellipse_Stage5;
+uniform vec4 uinnerRect_Stage6;
+uniform vec4 uinvRadiiLTRB_Stage6;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vEllipseOffsets_Stage0;
+noperspective in vec4 vEllipseRadii_Stage0;
+noperspective in vec4 vinColor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 ColorTableEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ float nonZeroAlpha = max(_input.w, 9.9999997473787516e-05);
+ vec4 coord = vec4(_input.xyz / nonZeroAlpha, nonZeroAlpha);
+ coord = coord * 0.9960939884185791 + vec4(0.0019529999699443579, 0.0019529999699443579, 0.0019529999699443579, 0.0019529999699443579);
+ _output.w = texture(uTextureSampler_0_Stage1, vec2(coord.w, 0.125)).w;
+ _output.x = texture(uTextureSampler_0_Stage1, vec2(coord.x, 0.375)).w;
+ _output.y = texture(uTextureSampler_0_Stage1, vec2(coord.y, 0.625)).w;
+ _output.z = texture(uTextureSampler_0_Stage1, vec2(coord.z, 0.875)).w;
+ _output.xyz *= _output.w;
+ return _output;
+}
+vec4 SweepGradientLayout_Stage4_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float angle;
+ {
+ angle = atan(-vTransformedCoords_0_Stage0.y, -vTransformedCoords_0_Stage0.x);
+ }
+ float t = ((angle * 0.15915493667125702 + 0.5) + ubias_Stage4_c1_c0_c0_c0) * uscale_Stage4_c1_c0_c0_c0;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage4_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage4_c1_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage4_c1_c0_c1_c0.x) {
+ scale = uscale0_1_Stage4_c1_c0_c1_c0;
+ bias = ubias0_1_Stage4_c1_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage4_c1_c0_c1_c0;
+ bias = ubias2_3_Stage4_c1_c0_c1_c0;
+ }
+ } else {
+ {
+ scale = uscale4_5_Stage4_c1_c0_c1_c0;
+ bias = ubias4_5_Stage4_c1_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage4_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = SweepGradientLayout_Stage4_c1_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage4_c1_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage4_c1_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage4_c1_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+float _blend_overlay_component(float sc, float sa, float dc, float da) {
+ if (2.0 * dc <= da) {
+ return (2.0 * sc) * dc;
+ }
+ return sa * da - (2.0 * (da - dc)) * (sa - sc);
+}
+vec4 blend_overlay(vec4 src, vec4 dst) {
+ vec4 result = vec4(_blend_overlay_component(src.x, src.w, dst.x, dst.w), _blend_overlay_component(src.y, src.w, dst.y, dst.w), _blend_overlay_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+ result.xyz += dst.xyz * (1.0 - src.w) + src.xyz * (1.0 - dst.w);
+ return result;
+}
+vec4 blend_hard_light(vec4 src, vec4 dst) {
+ return blend_overlay(dst, src);
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vinColor_Stage0;
+ vec2 offset = vEllipseOffsets_Stage0;
+ offset *= vEllipseRadii_Stage0.xy;
+ float test = dot(offset, offset) - 1.0;
+ vec2 grad = (2.0 * offset) * vEllipseRadii_Stage0.xy;
+ float grad_dot = dot(grad, grad);
+ grad_dot = max(grad_dot, 1.1754999560161448e-38);
+ float invlen = inversesqrt(grad_dot);
+ float edgeAlpha = clamp(0.5 - test * invlen, 0.0, 1.0);
+ offset = vEllipseOffsets_Stage0 * vEllipseRadii_Stage0.zw;
+ test = dot(offset, offset) - 1.0;
+ grad = (2.0 * offset) * vEllipseRadii_Stage0.zw;
+ grad_dot = dot(grad, grad);
+ invlen = inversesqrt(grad_dot);
+ edgeAlpha *= clamp(0.5 + test * invlen, 0.0, 1.0);
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_hard_light(outputColor_Stage0, ColorTableEffect_Stage1_c0_c0(vec4(1.0)));
+ }
+ vec4 output_Stage2;
+ {
+ float xCoverage, yCoverage;
+ {
+ float x, y;
+ {
+ x = max(urectH_Stage2.x - gl_FragCoord.x, gl_FragCoord.x - urectH_Stage2.z);
+ y = max(urectH_Stage2.y - gl_FragCoord.y, gl_FragCoord.y - urectH_Stage2.w);
+ }
+ xCoverage = texture(uTextureSampler_0_Stage2, vec2(x * uinvSixSigma_Stage2, 0.5)).w;
+ yCoverage = texture(uTextureSampler_0_Stage2, vec2(y * uinvSixSigma_Stage2, 0.5)).w;
+ output_Stage2 = (output_Stage1 * xCoverage) * yCoverage;
+ }
+ output_Stage2 = (output_Stage1 * xCoverage) * yCoverage;
+ }
+ vec4 output_Stage3;
+ {
+ {
+ output_Stage3 = ucolor_Stage3;
+ }
+ }
+ vec4 output_Stage4;
+ {
+ output_Stage4 = blend_dst_in(output_Stage3, ClampedGradientEffect_Stage4_c1_c0(vec4(1.0)));
+ }
+ vec4 output_Stage5;
+ {
+ vec2 d = gl_FragCoord.xy - uellipse_Stage5.xy;
+ vec2 Z = d * uellipse_Stage5.zw;
+ float implicit = dot(Z, d) - 1.0;
+ float grad_dot = 4.0 * dot(Z, Z);
+ {
+ grad_dot = max(grad_dot, 1.1754999560161448e-38);
+ }
+ float approx_dist = implicit * inversesqrt(grad_dot);
+ float alpha;
+ {
+ alpha = clamp(0.5 + approx_dist, 0.0, 1.0);
+ }
+ output_Stage5 = output_Stage4 * alpha;
+ }
+ vec4 output_Stage6;
+ {
+ vec2 dxy0 = uinnerRect_Stage6.xy - gl_FragCoord.xy;
+ vec2 dxy1 = gl_FragCoord.xy - uinnerRect_Stage6.zw;
+ vec2 dxy = max(max(dxy0, dxy1), 0.0);
+ vec2 Z = max(max(dxy0 * uinvRadiiLTRB_Stage6.xy, dxy1 * uinvRadiiLTRB_Stage6.zw), 0.0);
+ float implicit = dot(Z, dxy) - 1.0;
+ float grad_dot = 4.0 * dot(Z, Z);
+ grad_dot = max(grad_dot, 9.9999997473787516e-05);
+ float approx_dist = implicit * inversesqrt(grad_dot);
+ float alpha = clamp(0.5 - approx_dist, 0.0, 1.0);
+ output_Stage6 = output_Stage5 * alpha;
+ }
+ {
+ sk_FragColor = output_Stage2 * output_Stage6;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec2 inEllipseOffset;
+in vec4 inEllipseRadii;
+noperspective out vec2 vEllipseOffsets_Stage0;
+noperspective out vec4 vEllipseRadii_Stage0;
+noperspective out vec4 vinColor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vEllipseOffsets_Stage0 = inEllipseOffset;
+ vEllipseRadii_Stage0 = inEllipseRadii;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1813.shader_test b/shaders/skia/1813.shader_test
new file mode 100644
index 0000000..536f243
--- /dev/null
+++ b/shaders/skia/1813.shader_test
@@ -0,0 +1,244 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+uniform vec2 uImageIncrement_Stage1;
+uniform float uSurfaceScale_Stage1;
+uniform vec3 uLightColor_Stage1;
+uniform float uKD_Stage1;
+uniform vec4 uTexDom_Stage1;
+uniform vec3 uDecalParams_Stage1;
+uniform vec3 uLightLocation_Stage1;
+uniform float uExponent_Stage1;
+uniform float uCosInnerConeAngle_Stage1;
+uniform float uCosOuterConeAngle_Stage1;
+uniform float uConeScale_Stage1;
+uniform vec3 uS_Stage1;
+uniform mat4 um_Stage2;
+uniform vec4 uv_Stage2;
+uniform vec4 uboundsUniform_Stage3;
+uniform float uxInvZoom_Stage3;
+uniform float uyInvZoom_Stage3;
+uniform float uxInvInset_Stage3;
+uniform float uyInvInset_Stage3;
+uniform vec2 uoffset_Stage3;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage3;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 light_Stage1(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ float colorScale = uKD_Stage1 * dot(normal, surfaceToLight);
+ return vec4(lightColor * clamp(colorScale, 0.0, 1.0), 1.0);
+}
+float sobel_Stage1(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage1(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage1(float m[9], float surfaceScale) {
+ return pointToNormal_Stage1(sobel_Stage1(0.0, 0.0, m[4], m[5], m[7], m[8], 0.66666698455810547), sobel_Stage1(0.0, 0.0, m[4], m[7], m[5], m[8], 0.66666698455810547), surfaceScale);
+}
+vec3 lightColor_Stage1(vec3 surfaceToLight) {
+ float cosAngle = -dot(surfaceToLight, uS_Stage1);
+ if (cosAngle < uCosOuterConeAngle_Stage1) {
+ return vec3(0.0);
+ }
+ float scale = pow(cosAngle, uExponent_Stage1);
+ if (cosAngle < uCosInnerConeAngle_Stage1) {
+ return ((uLightColor_Stage1 * scale) * (cosAngle - uCosOuterConeAngle_Stage1)) * uConeScale_Stage1;
+ }
+ return uLightColor_Stage1;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ vec2 coord = vTransformedCoords_0_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp0 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp5 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp6 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp7 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp8 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = normalize(uLightLocation_Stage1 - vec3(gl_FragCoord.xy, uSurfaceScale_Stage1 * m[4]));
+ output_Stage1 = light_Stage1(normal_Stage1(m, uSurfaceScale_Stage1), surfaceToLight, lightColor_Stage1(surfaceToLight));
+ }
+ vec4 output_Stage2;
+ {
+ vec4 inputColor = output_Stage1;
+ output_Stage2 = um_Stage2 * inputColor + uv_Stage2;
+ {
+ output_Stage2 = clamp(output_Stage2, 0.0, 1.0);
+ }
+ }
+ {
+ vec2 coord = vTransformedCoords_1_Stage0;
+ vec2 delta = (coord - uboundsUniform_Stage3.xy) * uboundsUniform_Stage3.zw;
+ delta = min(delta, vec2(1.0, 1.0) - delta);
+ delta *= vec2(uxInvInset_Stage3, uyInvInset_Stage3);
+ if (delta.x < 2.0 && delta.y < 2.0) {
+ delta = vec2(2.0, 2.0) - delta;
+ float dist = length(delta);
+ dist = max(2.0 - dist, 0.0);
+ }
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec2 inLocalCoord;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vec4 color = inColor;
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1816.shader_test b/shaders/skia/1816.shader_test
new file mode 100644
index 0000000..e7c2c8c
--- /dev/null
+++ b/shaders/skia/1816.shader_test
@@ -0,0 +1,294 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uScale_Stage1_c0_c0_c0_c0;
+uniform vec4 uTexDom_Stage1_c0_c0_c0_c0;
+uniform vec3 uDecalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 uboundsUniform_Stage1_c0_c0_c1_c0;
+uniform float uxInvZoom_Stage1_c0_c0_c1_c0;
+uniform float uyInvZoom_Stage1_c0_c0_c1_c0;
+uniform float uxInvInset_Stage1_c0_c0_c1_c0;
+uniform float uyInvInset_Stage1_c0_c0_c1_c0;
+uniform vec2 uoffset_Stage1_c0_c0_c1_c0;
+uniform vec2 uImageIncrement_Stage1_c1_c0_c0_c0;
+uniform vec2 uBounds_Stage1_c1_c0_c0_c0;
+uniform vec4 uKernel_Stage1_c1_c0_c0_c0[5];
+uniform vec3 uedges_Stage1_c1_c0_c1_c0_c0_c0[2];
+uniform vec4 uinnerRect_Stage1_c1_c0_c1_c0_c1_c0;
+uniform vec2 uradiusPlusHalf_Stage1_c1_c0_c1_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+uniform sampler2D uTextureSampler_2_Stage1;
+uniform sampler2D uTextureSampler_3_Stage1;
+noperspective in vec2 vTextureCoords_Stage0;
+flat in int vTexIndex_Stage0;
+noperspective in vec4 vinColor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+noperspective in vec2 vTransformedCoords_3_Stage0;
+vec4 DisplacementMap_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 dColor = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ dColor.xyz = dColor.w < 9.9999999747524271e-07 ? vec3(0.0) : clamp(dColor.xyz / dColor.w, 0.0, 1.0);
+ vec2 cCoords = vTransformedCoords_1_Stage0 + uScale_Stage1_c0_c0_c0_c0 * (dColor.wz - vec2(0.5));
+ {
+ vec2 origCoord = cCoords;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ _output = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ return _output;
+}
+vec4 MagnifierEffect_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coord = vTransformedCoords_2_Stage0;
+ vec2 zoom_coord = uoffset_Stage1_c0_c0_c1_c0 + coord * vec2(uxInvZoom_Stage1_c0_c0_c1_c0, uyInvZoom_Stage1_c0_c0_c1_c0);
+ vec2 delta = (coord - uboundsUniform_Stage1_c0_c0_c1_c0.xy) * uboundsUniform_Stage1_c0_c0_c1_c0.zw;
+ delta = min(delta, vec2(1.0, 1.0) - delta);
+ delta *= vec2(uxInvInset_Stage1_c0_c0_c1_c0, uyInvInset_Stage1_c0_c0_c1_c0);
+ float weight = 0.0;
+ if (delta.x < 2.0 && delta.y < 2.0) {
+ delta = vec2(2.0, 2.0) - delta;
+ float dist = length(delta);
+ dist = max(2.0 - dist, 0.0);
+ weight = min(dist * dist, 1.0);
+ } else {
+ vec2 delta_squared = delta * delta;
+ weight = min(min(delta_squared.x, delta_squared.y), 1.0);
+ }
+ _output = texture(uTextureSampler_2_Stage1, mix(coord, zoom_coord, weight));
+ return _output;
+}
+vec4 blend_multiply(vec4 src, vec4 dst) {
+ return vec4(((1.0 - src.w) * dst.xyz + (1.0 - dst.w) * src.xyz) + src.xyz * dst.xyz, src.w + (1.0 - src.w) * dst.w);
+}
+vec4 ComposeTwo_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_multiply(DisplacementMap_Stage1_c0_c0_c0_c0(inputColor), MagnifierEffect_Stage1_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 GaussianConvolution_Stage1_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_3_Stage0 - 9.0 * uImageIncrement_Stage1_c1_c0_c0_c0;
+ vec2 coordSampled = vec2(0.0, 0.0);
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1_c1_c0_c0_c0.x, uBounds_Stage1_c1_c0_c0_c0.y);
+ _output += texture(uTextureSampler_3_Stage1, coordSampled) * uKernel_Stage1_c1_c0_c0_c0[0].x;
+ coord += uImageIncrement_Stage1_c1_c0_c0_c0;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1_c1_c0_c0_c0.x, uBounds_Stage1_c1_c0_c0_c0.y);
+ _output += texture(uTextureSampler_3_Stage1, coordSampled) * uKernel_Stage1_c1_c0_c0_c0[0].y;
+ coord += uImageIncrement_Stage1_c1_c0_c0_c0;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1_c1_c0_c0_c0.x, uBounds_Stage1_c1_c0_c0_c0.y);
+ _output += texture(uTextureSampler_3_Stage1, coordSampled) * uKernel_Stage1_c1_c0_c0_c0[0].z;
+ coord += uImageIncrement_Stage1_c1_c0_c0_c0;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1_c1_c0_c0_c0.x, uBounds_Stage1_c1_c0_c0_c0.y);
+ _output += texture(uTextureSampler_3_Stage1, coordSampled) * uKernel_Stage1_c1_c0_c0_c0[0].w;
+ coord += uImageIncrement_Stage1_c1_c0_c0_c0;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1_c1_c0_c0_c0.x, uBounds_Stage1_c1_c0_c0_c0.y);
+ _output += texture(uTextureSampler_3_Stage1, coordSampled) * uKernel_Stage1_c1_c0_c0_c0[1].x;
+ coord += uImageIncrement_Stage1_c1_c0_c0_c0;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1_c1_c0_c0_c0.x, uBounds_Stage1_c1_c0_c0_c0.y);
+ _output += texture(uTextureSampler_3_Stage1, coordSampled) * uKernel_Stage1_c1_c0_c0_c0[1].y;
+ coord += uImageIncrement_Stage1_c1_c0_c0_c0;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1_c1_c0_c0_c0.x, uBounds_Stage1_c1_c0_c0_c0.y);
+ _output += texture(uTextureSampler_3_Stage1, coordSampled) * uKernel_Stage1_c1_c0_c0_c0[1].z;
+ coord += uImageIncrement_Stage1_c1_c0_c0_c0;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1_c1_c0_c0_c0.x, uBounds_Stage1_c1_c0_c0_c0.y);
+ _output += texture(uTextureSampler_3_Stage1, coordSampled) * uKernel_Stage1_c1_c0_c0_c0[1].w;
+ coord += uImageIncrement_Stage1_c1_c0_c0_c0;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1_c1_c0_c0_c0.x, uBounds_Stage1_c1_c0_c0_c0.y);
+ _output += texture(uTextureSampler_3_Stage1, coordSampled) * uKernel_Stage1_c1_c0_c0_c0[2].x;
+ coord += uImageIncrement_Stage1_c1_c0_c0_c0;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1_c1_c0_c0_c0.x, uBounds_Stage1_c1_c0_c0_c0.y);
+ _output += texture(uTextureSampler_3_Stage1, coordSampled) * uKernel_Stage1_c1_c0_c0_c0[2].y;
+ coord += uImageIncrement_Stage1_c1_c0_c0_c0;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1_c1_c0_c0_c0.x, uBounds_Stage1_c1_c0_c0_c0.y);
+ _output += texture(uTextureSampler_3_Stage1, coordSampled) * uKernel_Stage1_c1_c0_c0_c0[2].z;
+ coord += uImageIncrement_Stage1_c1_c0_c0_c0;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1_c1_c0_c0_c0.x, uBounds_Stage1_c1_c0_c0_c0.y);
+ _output += texture(uTextureSampler_3_Stage1, coordSampled) * uKernel_Stage1_c1_c0_c0_c0[2].w;
+ coord += uImageIncrement_Stage1_c1_c0_c0_c0;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1_c1_c0_c0_c0.x, uBounds_Stage1_c1_c0_c0_c0.y);
+ _output += texture(uTextureSampler_3_Stage1, coordSampled) * uKernel_Stage1_c1_c0_c0_c0[3].x;
+ coord += uImageIncrement_Stage1_c1_c0_c0_c0;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1_c1_c0_c0_c0.x, uBounds_Stage1_c1_c0_c0_c0.y);
+ _output += texture(uTextureSampler_3_Stage1, coordSampled) * uKernel_Stage1_c1_c0_c0_c0[3].y;
+ coord += uImageIncrement_Stage1_c1_c0_c0_c0;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1_c1_c0_c0_c0.x, uBounds_Stage1_c1_c0_c0_c0.y);
+ _output += texture(uTextureSampler_3_Stage1, coordSampled) * uKernel_Stage1_c1_c0_c0_c0[3].z;
+ coord += uImageIncrement_Stage1_c1_c0_c0_c0;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1_c1_c0_c0_c0.x, uBounds_Stage1_c1_c0_c0_c0.y);
+ _output += texture(uTextureSampler_3_Stage1, coordSampled) * uKernel_Stage1_c1_c0_c0_c0[3].w;
+ coord += uImageIncrement_Stage1_c1_c0_c0_c0;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1_c1_c0_c0_c0.x, uBounds_Stage1_c1_c0_c0_c0.y);
+ _output += texture(uTextureSampler_3_Stage1, coordSampled) * uKernel_Stage1_c1_c0_c0_c0[4].x;
+ coord += uImageIncrement_Stage1_c1_c0_c0_c0;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1_c1_c0_c0_c0.x, uBounds_Stage1_c1_c0_c0_c0.y);
+ _output += texture(uTextureSampler_3_Stage1, coordSampled) * uKernel_Stage1_c1_c0_c0_c0[4].y;
+ coord += uImageIncrement_Stage1_c1_c0_c0_c0;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1_c1_c0_c0_c0.x, uBounds_Stage1_c1_c0_c0_c0.y);
+ _output += texture(uTextureSampler_3_Stage1, coordSampled) * uKernel_Stage1_c1_c0_c0_c0[4].z;
+ coord += uImageIncrement_Stage1_c1_c0_c0_c0;
+ _output *= _input;
+ return _output;
+}
+vec4 ConvexPoly_Stage1_c1_c0_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float alpha = 1.0;
+ float edge;
+ edge = dot(uedges_Stage1_c1_c0_c1_c0_c0_c0[0], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage1_c1_c0_c1_c0_c0_c0[1], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ alpha = 1.0 - alpha;
+ _output = _input * alpha;
+ return _output;
+}
+vec4 CircularRRect_Stage1_c1_c0_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 dxy0 = uinnerRect_Stage1_c1_c0_c1_c0_c1_c0.xy - gl_FragCoord.xy;
+ vec2 dxy1 = gl_FragCoord.xy - uinnerRect_Stage1_c1_c0_c1_c0_c1_c0.zw;
+ vec2 dxy = max(max(dxy0, dxy1), 0.0);
+ float alpha = clamp(uradiusPlusHalf_Stage1_c1_c0_c1_c0_c1_c0.x - length(dxy), 0.0, 1.0);
+ alpha = 1.0 - alpha;
+ _output = _input * alpha;
+ return _output;
+}
+vec4 blend_dst_over(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src + dst;
+}
+vec4 ComposeTwo_Stage1_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_dst_over(ConvexPoly_Stage1_c1_c0_c1_c0_c0_c0(inputColor), CircularRRect_Stage1_c1_c0_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 blend_darken(vec4 src, vec4 dst) {
+ vec4 result = blend_src_over(src, dst);
+ result.xyz = min(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
+ return result;
+}
+vec4 ComposeTwo_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_darken(GaussianConvolution_Stage1_c1_c0_c0_c0(inputColor), ComposeTwo_Stage1_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+float _blend_color_luminance(vec3 color) {
+ return dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), color);
+}
+vec3 _blend_set_color_luminance(vec3 hueSatColor, float alpha, vec3 lumColor) {
+ float lum = _blend_color_luminance(lumColor);
+ vec3 result = (lum - _blend_color_luminance(hueSatColor)) + hueSatColor;
+ float minComp = min(min(result.x, result.y), result.z);
+ float maxComp = max(max(result.x, result.y), result.z);
+ if (minComp < 0.0 && lum != minComp) {
+ result = lum + ((result - lum) * lum) / (lum - minComp);
+ }
+ if (maxComp > alpha && maxComp != lum) {
+ return lum + ((result - lum) * (alpha - lum)) / (maxComp - lum);
+ }
+ return result;
+}
+vec4 blend_color(vec4 src, vec4 dst) {
+ float alpha = dst.w * src.w;
+ vec3 sda = src.xyz * dst.w;
+ vec3 dsa = dst.xyz * src.w;
+ return vec4((((_blend_set_color_luminance(sda, alpha, dsa) + dst.xyz) - dsa) + src.xyz) - sda, (src.w + dst.w) - alpha);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vinColor_Stage0;
+ vec4 texColor;
+ {
+ texColor = texture(uTextureSampler_0_Stage0, vTextureCoords_Stage0);
+ }
+ outputCoverage_Stage0 = texColor;
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_color(ComposeTwo_Stage1_c0_c0(inputColor), ComposeTwo_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ sk_FragColor = output_Stage1 * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform vec2 uAtlasSizeInv_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+uniform mat3 uCoordTransformMatrix_3_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in uvec2 inTextureCoords;
+noperspective out vec2 vTextureCoords_Stage0;
+flat out int vTexIndex_Stage0;
+noperspective out vec4 vinColor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+noperspective out vec2 vTransformedCoords_3_Stage0;
+void main() {
+ ivec2 signedCoords = ivec2(int(inTextureCoords.x), int(inTextureCoords.y));
+ vec2 unormTexCoords = vec2(float(signedCoords.x / 2), float(signedCoords.y / 2));
+ vTextureCoords_Stage0 = unormTexCoords * uAtlasSizeInv_Stage0;
+ vTexIndex_Stage0 = 0;
+ vinColor_Stage0 = inColor;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_3_Stage0 = (uCoordTransformMatrix_3_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(inPosition.x, inPosition.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1819.shader_test b/shaders/skia/1819.shader_test
new file mode 100644
index 0000000..499f363
--- /dev/null
+++ b/shaders/skia/1819.shader_test
@@ -0,0 +1,36 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+uniform vec4 uColor_Stage0;
+noperspective in vec3 vDashParams_Stage0;
+noperspective in vec4 vRectParams_Stage0;
+void main() {
+ {
+ float xShifted = vDashParams_Stage0.x - floor(vDashParams_Stage0.x / vDashParams_Stage0.z) * vDashParams_Stage0.z;
+ vec2 fragPosShifted = vec2(xShifted, vDashParams_Stage0.y);
+ float xSub;
+ xSub = min(fragPosShifted.x - vRectParams_Stage0.x, 0.0);
+ xSub += min(vRectParams_Stage0.z - fragPosShifted.x, 0.0);
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 inPosition;
+in vec3 inDashParams;
+in vec4 inRect;
+noperspective out vec3 vDashParams_Stage0;
+noperspective out vec4 vRectParams_Stage0;
+void main() {
+ vDashParams_Stage0 = inDashParams;
+ vRectParams_Stage0 = inRect;
+ vec2 pos2 = inPosition;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1825.shader_test b/shaders/skia/1825.shader_test
new file mode 100644
index 0000000..8c14e25
--- /dev/null
+++ b/shaders/skia/1825.shader_test
@@ -0,0 +1,127 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 uscale01_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias01_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale23_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias23_Stage1_c0_c0_c1_c0;
+uniform float uthreshold_Stage1_c0_c0_c1_c0;
+uniform float uPixelSize_Stage2;
+uniform vec2 uRange_Stage2;
+uniform vec4 ucolor_Stage3;
+uniform sampler2D uTextureSampler_0_Stage0;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTextureCoords_Stage0;
+flat in int vTexIndex_Stage0;
+noperspective in vec4 vinColor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 RadialGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = length(vTransformedCoords_0_Stage0);
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 DualIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthreshold_Stage1_c0_c0_c1_c0) {
+ scale = uscale01_Stage1_c0_c0_c1_c0;
+ bias = ubias01_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale23_Stage1_c0_c0_c1_c0;
+ bias = ubias23_Stage1_c0_c0_c1_c0;
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = RadialGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = DualIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ vec4 texColor;
+ {
+ texColor = texture(uTextureSampler_0_Stage0, vTextureCoords_Stage0);
+ }
+ outputCoverage_Stage0 = texColor;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_dst_in(outputCoverage_Stage0, ClampedGradientEffect_Stage1_c0_c0(vec4(1.0)));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = vec4(1.0, 1.0, 1.0, 1.0);
+ vec2 coord = vTransformedCoords_1_Stage0;
+ coord.x -= 7.0 * uPixelSize_Stage2;
+ for (int i = 0;i < 15; i++) {
+ output_Stage2 = min(output_Stage2, texture(uTextureSampler_0_Stage2, coord));
+ coord.x += uPixelSize_Stage2;
+ }
+ output_Stage2 *= output_Stage1;
+ }
+ vec4 output_Stage3;
+ {
+ {
+ output_Stage3 = output_Stage2 * ucolor_Stage3;
+ }
+ }
+ {
+ sk_FragColor = 1.0 - output_Stage3;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform vec2 uAtlasSizeInv_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in uvec2 inTextureCoords;
+noperspective out vec2 vTextureCoords_Stage0;
+flat out int vTexIndex_Stage0;
+noperspective out vec4 vinColor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ ivec2 signedCoords = ivec2(int(inTextureCoords.x), int(inTextureCoords.y));
+ vec2 unormTexCoords = vec2(float(signedCoords.x / 2), float(signedCoords.y / 2));
+ vTextureCoords_Stage0 = unormTexCoords * uAtlasSizeInv_Stage0;
+ vTexIndex_Stage0 = 0;
+ vinColor_Stage0 = inColor;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(inPosition.x, inPosition.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1831.shader_test b/shaders/skia/1831.shader_test
new file mode 100644
index 0000000..99394b8
--- /dev/null
+++ b/shaders/skia/1831.shader_test
@@ -0,0 +1,133 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+uniform vec4 urectUniform_Stage1;
+uniform vec4 uleftBorderColor_Stage2_c0_c0;
+uniform vec4 urightBorderColor_Stage2_c0_c0;
+uniform vec4 uscale0_1_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage2_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage2_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage2_c0_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vtextureCoords_Stage0;
+flat in vec4 vtextureDomain_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 RadialGradientLayout_Stage2_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = length(vTransformedCoords_0_Stage0);
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage2_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage2_c0_c0_c1_c0;
+ bias = ubias0_1_Stage2_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage2_c0_c0_c1_c0;
+ bias = ubias2_3_Stage2_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage2_c0_c0_c1_c0;
+ bias = ubias4_5_Stage2_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage2_c0_c0_c1_c0;
+ bias = ubias6_7_Stage2_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = RadialGradientLayout_Stage2_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage2_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage2_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage2_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ vec2 textureCoords;
+ textureCoords = vtextureCoords_Stage0;
+ vec4 textureDomain;
+ textureDomain = vtextureDomain_Stage0;
+ outputColor_Stage0 = vcolor_Stage0;
+ outputColor_Stage0 = texture(uTextureSampler_0_Stage0, clamp(textureCoords, textureDomain.xy, textureDomain.zw)) * outputColor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ float alpha;
+ {
+ float xSub, ySub;
+ xSub = min(gl_FragCoord.x - urectUniform_Stage1.x, 0.0);
+ xSub += min(urectUniform_Stage1.z - gl_FragCoord.x, 0.0);
+ ySub = min(gl_FragCoord.y - urectUniform_Stage1.y, 0.0);
+ ySub += min(urectUniform_Stage1.w - gl_FragCoord.y, 0.0);
+ alpha = (1.0 + max(xSub, -1.0)) * (1.0 + max(ySub, -1.0));
+ }
+ {
+ alpha = 1.0 - alpha;
+ }
+ output_Stage1 = vec4(alpha);
+ }
+ {
+ blend_dst_in(output_Stage1, ClampedGradientEffect_Stage2_c0_c0(vec4(1.0)));
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 textureCoords;
+in vec4 textureDomain;
+in vec4 color;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vtextureCoords_Stage0;
+flat out vec4 vtextureDomain_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vec2 pos2 = position;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(textureCoords, 1.0)).xy;
+ vtextureCoords_Stage0 = textureCoords;
+ vtextureDomain_Stage0 = textureDomain;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1834.shader_test b/shaders/skia/1834.shader_test
new file mode 100644
index 0000000..dea34de
--- /dev/null
+++ b/shaders/skia/1834.shader_test
@@ -0,0 +1,93 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uinnerRect_Stage1_c0_c0;
+uniform vec2 uinvRadiiXY_Stage1_c0_c0;
+uniform vec3 uedges_Stage1_c1_c0[6];
+noperspective in vec4 vcolor_Stage0;
+noperspective in float vinCoverage_Stage0;
+vec4 EllipticalRRect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 dxy0 = uinnerRect_Stage1_c0_c0.xy - gl_FragCoord.xy;
+ vec2 dxy1 = gl_FragCoord.xy - uinnerRect_Stage1_c0_c0.zw;
+ vec2 dxy = max(max(dxy0, dxy1), 0.0);
+ vec2 Z = dxy * uinvRadiiXY_Stage1_c0_c0;
+ float implicit = dot(Z, dxy) - 1.0;
+ float grad_dot = 4.0 * dot(Z, Z);
+ grad_dot = max(grad_dot, 9.9999997473787516e-05);
+ float approx_dist = implicit * inversesqrt(grad_dot);
+ float alpha = clamp(0.5 + approx_dist, 0.0, 1.0);
+ _output = _input * alpha;
+ return _output;
+}
+vec4 ConvexPoly_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ float alpha = 1.0;
+ float edge;
+ edge = dot(uedges_Stage1_c1_c0[0], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage1_c1_c0[1], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage1_c1_c0[2], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage1_c1_c0[3], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage1_c1_c0[4], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage1_c1_c0[5], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ alpha = 1.0 - alpha;
+ _output = _input * alpha;
+ return _output;
+}
+vec4 blend_dst_out(vec4 src, vec4 dst) {
+ return (1.0 - src.w) * dst;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ float alpha = 1.0;
+ alpha = vinCoverage_Stage0;
+ outputCoverage_Stage0 = vec4(alpha);
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_dst_out(EllipticalRRect_Stage1_c0_c0(inputColor), ConvexPoly_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ sk_FragColor = output_Stage1 * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 inPosition;
+in vec4 inColor;
+in float inCoverage;
+noperspective out vec4 vcolor_Stage0;
+noperspective out float vinCoverage_Stage0;
+void main() {
+ vec4 color = inColor;
+ vcolor_Stage0 = color;
+ vec2 pos2 = inPosition;
+ vinCoverage_Stage0 = inCoverage;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/184-2.shader_test b/shaders/skia/184-2.shader_test
new file mode 100644
index 0000000..f2a89ca
--- /dev/null
+++ b/shaders/skia/184-2.shader_test
@@ -0,0 +1,92 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage2_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c1_c0;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+vec4 blend_dst_atop(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src + src.w * dst;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_dst_in(outputColor_Stage0, ClampedGradientEffect_Stage1_c0_c0(vec4(1.0)));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_dst_atop(ConstColorProcessor_Stage2_c1_c0(vec4(1.0)), output_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/184-3.shader_test b/shaders/skia/184-3.shader_test
new file mode 100644
index 0000000..3113b1c
--- /dev/null
+++ b/shaders/skia/184-3.shader_test
@@ -0,0 +1,193 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform float uSurfaceScale_Stage1;
+uniform vec3 uLightColor_Stage1;
+uniform float uKD_Stage1;
+uniform vec4 uTexDom_Stage1;
+uniform vec3 uDecalParams_Stage1;
+uniform vec3 uLightLocation_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 light_Stage1(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ float colorScale = uKD_Stage1 * dot(normal, surfaceToLight);
+ return vec4(lightColor * clamp(colorScale, 0.0, 1.0), 1.0);
+}
+float sobel_Stage1(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage1(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage1(float m[9], float surfaceScale) {
+ return pointToNormal_Stage1(sobel_Stage1(m[0], m[2], m[3], m[5], m[6], m[8], 0.25), sobel_Stage1(m[0], m[6], m[1], m[7], m[2], m[8], 0.25), surfaceScale);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ vec2 coord = vTransformedCoords_0_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp0 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp5 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp6 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp7 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp8 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = normalize(uLightLocation_Stage1 - vec3(gl_FragCoord.xy, uSurfaceScale_Stage1 * m[4]));
+ output_Stage1 = light_Stage1(normal_Stage1(m, uSurfaceScale_Stage1), surfaceToLight, uLightColor_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/184-6.shader_test b/shaders/skia/184-6.shader_test
new file mode 100644
index 0000000..6b87d93
--- /dev/null
+++ b/shaders/skia/184-6.shader_test
@@ -0,0 +1,85 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 ucolor_Stage1_c0_c0;
+uniform vec4 urectUniform_Stage2;
+uniform vec4 ucolor_Stage3;
+uniform vec2 uDstTextureUpperLeft_Stage5;
+uniform vec2 uDstTextureCoordScale_Stage5;
+uniform sampler2D uDstTextureSampler_Stage5;
+noperspective in vec4 vcolor_Stage0;
+noperspective in float vinCoverage_Stage0;
+vec4 ConstColorProcessor_Stage1_c0_c0(vec4 _input, vec2 _coords) {
+ vec4 _output;
+ {
+ _output = _input * ucolor_Stage1_c0_c0;
+ }
+ return _output;
+}
+vec4 blend_dst_atop(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src + src.w * dst;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ float alpha = 1.0;
+ alpha = vinCoverage_Stage0;
+ outputCoverage_Stage0 = vec4(alpha);
+ }
+ {
+ ConstColorProcessor_Stage1_c0_c0(outputColor_Stage0, gl_FragCoord.xy);
+ }
+ {
+ {
+ float xSub, ySub;
+ xSub = min(gl_FragCoord.x - urectUniform_Stage2.x, 0.0);
+ xSub += min(urectUniform_Stage2.z - gl_FragCoord.x, 0.0);
+ ySub = min(gl_FragCoord.y - urectUniform_Stage2.y, 0.0);
+ ySub += min(urectUniform_Stage2.w - gl_FragCoord.y, 0.0);
+ }
+ }
+ vec4 output_Stage3;
+ {
+ {
+ output_Stage3 = ucolor_Stage3;
+ }
+ }
+ vec4 output_Stage4;
+ {
+ output_Stage4 = output_Stage3;
+ }
+ {
+ if (all(lessThanEqual(outputCoverage_Stage0.xyz, vec3(0.0)))) {
+ discard;
+ }
+ vec2 _dstTexCoord = (gl_FragCoord.xy - uDstTextureUpperLeft_Stage5) * uDstTextureCoordScale_Stage5;
+ vec4 _dstColor = texture(uDstTextureSampler_Stage5, _dstTexCoord);
+ sk_FragColor = blend_dst_atop(output_Stage4, _dstColor);
+ sk_FragColor = outputCoverage_Stage0 * sk_FragColor + (vec4(1.0) - outputCoverage_Stage0) * _dstColor;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 inPosition;
+in vec4 inColor;
+in float inCoverage;
+noperspective out vec4 vcolor_Stage0;
+noperspective out float vinCoverage_Stage0;
+void main() {
+ vec4 color = inColor;
+ vcolor_Stage0 = color;
+ vec2 pos2 = inPosition;
+ vinCoverage_Stage0 = inCoverage;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/184-7.shader_test b/shaders/skia/184-7.shader_test
new file mode 100644
index 0000000..54d2f91
--- /dev/null
+++ b/shaders/skia/184-7.shader_test
@@ -0,0 +1,63 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec3 uedges_Stage2[7];
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ float alpha = 1.0;
+ float edge;
+ edge = dot(uedges_Stage2[0], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage2[1], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage2[2], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage2[3], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage2[4], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage2[5], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage2[6], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ output_Stage2 = output_Stage1 * alpha;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/184.shader_test b/shaders/skia/184.shader_test
new file mode 100644
index 0000000..c48b446
--- /dev/null
+++ b/shaders/skia/184.shader_test
@@ -0,0 +1,145 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage2;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.w) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ } else {
+ {
+ if (t < uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+vec4 ComposeOne_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_dst_in(_input, TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0)));
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = ComposeOne_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 blend_src_out(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_src_out(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ {
+ output_Stage2 = output_Stage1 * ucolor_Stage2;
+ }
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 inColor;
+in vec2 inLocalCoord;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1840.shader_test b/shaders/skia/1840.shader_test
new file mode 100644
index 0000000..bed9892
--- /dev/null
+++ b/shaders/skia/1840.shader_test
@@ -0,0 +1,177 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_KHR_blend_equation_advanced : require
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+layout (blend_support_all_equations) out ;
+uniform vec4 urectUniform_Stage1_c1_c0_c0_c0_c0_c0;
+uniform vec2 uImageIncrement_Stage1_c1_c0_c0_c0_c1_c0;
+uniform vec2 uBounds_Stage1_c1_c0_c0_c0_c1_c0;
+uniform vec4 uKernel_Stage1_c1_c0_c0_c0_c1_c0[4];
+uniform vec4 ucircle_Stage1_c1_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec4 vinCircleEdge_Stage0;
+noperspective in vec4 vinColor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 ConfigConversionEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = floor(_input * 255.0 + 0.5) / 255.0;
+ {
+ _output.xyz = floor((_output.xyz * _output.w) * 255.0 + 0.5) / 255.0;
+ }
+ return _output;
+}
+vec4 AARectEffect_Stage1_c1_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float alpha;
+ {
+ alpha = float(all(greaterThan(vec4(gl_FragCoord.xy, urectUniform_Stage1_c1_c0_c0_c0_c0_c0.zw), vec4(urectUniform_Stage1_c1_c0_c0_c0_c0_c0.xy, gl_FragCoord.xy))) ? 1 : 0);
+ }
+ _output = _input * alpha;
+ return _output;
+}
+vec4 GaussianConvolution_Stage1_c1_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0 - 6.0 * uImageIncrement_Stage1_c1_c0_c0_c0_c1_c0;
+ vec2 coordSampled = vec2(0.0, 0.0);
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage1_c1_c0_c0_c0_c1_c0.x, uBounds_Stage1_c1_c0_c0_c0_c1_c0.y - uBounds_Stage1_c1_c0_c0_c0_c1_c0.x) + uBounds_Stage1_c1_c0_c0_c0_c1_c0.x;
+ _output += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1_c1_c0_c0_c0_c1_c0[0].x;
+ coord += uImageIncrement_Stage1_c1_c0_c0_c0_c1_c0;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage1_c1_c0_c0_c0_c1_c0.x, uBounds_Stage1_c1_c0_c0_c0_c1_c0.y - uBounds_Stage1_c1_c0_c0_c0_c1_c0.x) + uBounds_Stage1_c1_c0_c0_c0_c1_c0.x;
+ _output += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1_c1_c0_c0_c0_c1_c0[0].y;
+ coord += uImageIncrement_Stage1_c1_c0_c0_c0_c1_c0;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage1_c1_c0_c0_c0_c1_c0.x, uBounds_Stage1_c1_c0_c0_c0_c1_c0.y - uBounds_Stage1_c1_c0_c0_c0_c1_c0.x) + uBounds_Stage1_c1_c0_c0_c0_c1_c0.x;
+ _output += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1_c1_c0_c0_c0_c1_c0[0].z;
+ coord += uImageIncrement_Stage1_c1_c0_c0_c0_c1_c0;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage1_c1_c0_c0_c0_c1_c0.x, uBounds_Stage1_c1_c0_c0_c0_c1_c0.y - uBounds_Stage1_c1_c0_c0_c0_c1_c0.x) + uBounds_Stage1_c1_c0_c0_c0_c1_c0.x;
+ _output += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1_c1_c0_c0_c0_c1_c0[0].w;
+ coord += uImageIncrement_Stage1_c1_c0_c0_c0_c1_c0;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage1_c1_c0_c0_c0_c1_c0.x, uBounds_Stage1_c1_c0_c0_c0_c1_c0.y - uBounds_Stage1_c1_c0_c0_c0_c1_c0.x) + uBounds_Stage1_c1_c0_c0_c0_c1_c0.x;
+ _output += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1_c1_c0_c0_c0_c1_c0[1].x;
+ coord += uImageIncrement_Stage1_c1_c0_c0_c0_c1_c0;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage1_c1_c0_c0_c0_c1_c0.x, uBounds_Stage1_c1_c0_c0_c0_c1_c0.y - uBounds_Stage1_c1_c0_c0_c0_c1_c0.x) + uBounds_Stage1_c1_c0_c0_c0_c1_c0.x;
+ _output += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1_c1_c0_c0_c0_c1_c0[1].y;
+ coord += uImageIncrement_Stage1_c1_c0_c0_c0_c1_c0;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage1_c1_c0_c0_c0_c1_c0.x, uBounds_Stage1_c1_c0_c0_c0_c1_c0.y - uBounds_Stage1_c1_c0_c0_c0_c1_c0.x) + uBounds_Stage1_c1_c0_c0_c0_c1_c0.x;
+ _output += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1_c1_c0_c0_c0_c1_c0[1].z;
+ coord += uImageIncrement_Stage1_c1_c0_c0_c0_c1_c0;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage1_c1_c0_c0_c0_c1_c0.x, uBounds_Stage1_c1_c0_c0_c0_c1_c0.y - uBounds_Stage1_c1_c0_c0_c0_c1_c0.x) + uBounds_Stage1_c1_c0_c0_c0_c1_c0.x;
+ _output += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1_c1_c0_c0_c0_c1_c0[1].w;
+ coord += uImageIncrement_Stage1_c1_c0_c0_c0_c1_c0;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage1_c1_c0_c0_c0_c1_c0.x, uBounds_Stage1_c1_c0_c0_c0_c1_c0.y - uBounds_Stage1_c1_c0_c0_c0_c1_c0.x) + uBounds_Stage1_c1_c0_c0_c0_c1_c0.x;
+ _output += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1_c1_c0_c0_c0_c1_c0[2].x;
+ coord += uImageIncrement_Stage1_c1_c0_c0_c0_c1_c0;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage1_c1_c0_c0_c0_c1_c0.x, uBounds_Stage1_c1_c0_c0_c0_c1_c0.y - uBounds_Stage1_c1_c0_c0_c0_c1_c0.x) + uBounds_Stage1_c1_c0_c0_c0_c1_c0.x;
+ _output += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1_c1_c0_c0_c0_c1_c0[2].y;
+ coord += uImageIncrement_Stage1_c1_c0_c0_c0_c1_c0;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage1_c1_c0_c0_c0_c1_c0.x, uBounds_Stage1_c1_c0_c0_c0_c1_c0.y - uBounds_Stage1_c1_c0_c0_c0_c1_c0.x) + uBounds_Stage1_c1_c0_c0_c0_c1_c0.x;
+ _output += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1_c1_c0_c0_c0_c1_c0[2].z;
+ coord += uImageIncrement_Stage1_c1_c0_c0_c0_c1_c0;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage1_c1_c0_c0_c0_c1_c0.x, uBounds_Stage1_c1_c0_c0_c0_c1_c0.y - uBounds_Stage1_c1_c0_c0_c0_c1_c0.x) + uBounds_Stage1_c1_c0_c0_c0_c1_c0.x;
+ _output += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1_c1_c0_c0_c0_c1_c0[2].w;
+ coord += uImageIncrement_Stage1_c1_c0_c0_c0_c1_c0;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage1_c1_c0_c0_c0_c1_c0.x, uBounds_Stage1_c1_c0_c0_c0_c1_c0.y - uBounds_Stage1_c1_c0_c0_c0_c1_c0.x) + uBounds_Stage1_c1_c0_c0_c0_c1_c0.x;
+ _output += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1_c1_c0_c0_c0_c1_c0[3].x;
+ coord += uImageIncrement_Stage1_c1_c0_c0_c0_c1_c0;
+ _output *= _input;
+ return _output;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 ComposeTwo_Stage1_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_src_over(AARectEffect_Stage1_c1_c0_c0_c0_c0_c0(inputColor), GaussianConvolution_Stage1_c1_c0_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 CircleEffect_Stage1_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float d;
+ {
+ d = (length((ucircle_Stage1_c1_c0_c1_c0.xy - gl_FragCoord.xy) * ucircle_Stage1_c1_c0_c1_c0.w) - 1.0) * ucircle_Stage1_c1_c0_c1_c0.z;
+ }
+ {
+ _output = _input * clamp(d, 0.0, 1.0);
+ }
+ return _output;
+}
+vec4 blend_modulate(vec4 src, vec4 dst) {
+ return src * dst;
+}
+vec4 ComposeTwo_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_modulate(ComposeTwo_Stage1_c1_c0_c0_c0(inputColor), CircleEffect_Stage1_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 blend_screen(vec4 src, vec4 dst) {
+ return src + (1.0 - src) * dst;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ vec4 circleEdge;
+ circleEdge = vinCircleEdge_Stage0;
+ outputColor_Stage0 = vinColor_Stage0;
+ float d = length(circleEdge.xy);
+ float distanceToOuterEdge = circleEdge.z * (1.0 - d);
+ float edgeAlpha = clamp(distanceToOuterEdge, 0.0, 1.0);
+ float distanceToInnerEdge = circleEdge.z * (d - circleEdge.w);
+ float innerAlpha = clamp(distanceToInnerEdge, 0.0, 1.0);
+ edgeAlpha *= innerAlpha;
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_screen(ConfigConversionEffect_Stage1_c0_c0(inputColor), ComposeTwo_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ sk_FragColor = outputCoverage_Stage0 * output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec4 inCircleEdge;
+noperspective out vec4 vinCircleEdge_Stage0;
+noperspective out vec4 vinColor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vinCircleEdge_Stage0 = inCircleEdge;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1843.shader_test b/shaders/skia/1843.shader_test
new file mode 100644
index 0000000..15ea7ed
--- /dev/null
+++ b/shaders/skia/1843.shader_test
@@ -0,0 +1,40 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uColor_Stage0;
+noperspective in vec3 vDashParams_Stage0;
+noperspective in vec4 vRectParams_Stage0;
+void main() {
+ {
+ float xShifted = vDashParams_Stage0.x - floor(vDashParams_Stage0.x / vDashParams_Stage0.z) * vDashParams_Stage0.z;
+ vec2 fragPosShifted = vec2(xShifted, vDashParams_Stage0.y);
+ float alpha = 1.0;
+ alpha *= fragPosShifted.x - vRectParams_Stage0.x > -0.5 ? 1.0 : 0.0;
+ alpha *= vRectParams_Stage0.z - fragPosShifted.x >= -0.5 ? 1.0 : 0.0;
+ }
+ {
+ sk_FragColor = vec4(0.0);
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 inPosition;
+in vec3 inDashParams;
+in vec4 inRect;
+noperspective out vec3 vDashParams_Stage0;
+noperspective out vec4 vRectParams_Stage0;
+void main() {
+ vDashParams_Stage0 = inDashParams;
+ vRectParams_Stage0 = inRect;
+ vec2 pos2 = inPosition;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1846.shader_test b/shaders/skia/1846.shader_test
new file mode 100644
index 0000000..2096598
--- /dev/null
+++ b/shaders/skia/1846.shader_test
@@ -0,0 +1,98 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+uniform float uSrcTF_Stage0[7];
+uniform mat3 uColorXform_Stage0;
+uniform float uDstTF_Stage0[7];
+uniform vec4 urectUniform_Stage1;
+uniform sampler2D uTextureSampler_0_Stage0;
+noperspective in vec2 vtextureCoords_Stage0;
+flat in vec4 vtextureDomain_Stage0;
+flat in vec4 vcolor_Stage0;
+float src_tf_Stage0(float x) {
+ float G = uSrcTF_Stage0[0];
+ float A = uSrcTF_Stage0[1];
+ float B = uSrcTF_Stage0[2];
+ float C = uSrcTF_Stage0[3];
+ float D = uSrcTF_Stage0[4];
+ float E = uSrcTF_Stage0[5];
+ float F = uSrcTF_Stage0[6];
+ float s = sign(x);
+ x = abs(x);
+ x = x < D ? C * x + F : pow(A * x + B, G) + E;
+ return s * x;
+}
+float dst_tf_Stage0(float x) {
+ float G = uDstTF_Stage0[0];
+ float A = uDstTF_Stage0[1];
+ float B = uDstTF_Stage0[2];
+ float C = uDstTF_Stage0[3];
+ float D = uDstTF_Stage0[4];
+ float E = uDstTF_Stage0[5];
+ float F = uDstTF_Stage0[6];
+ float s = sign(x);
+ x = abs(x);
+ x = x < D ? C * x + F : pow(A * x + B, G) + E;
+ return s * x;
+}
+vec4 gamut_xform_Stage0(vec4 color) {
+ color.xyz = uColorXform_Stage0 * color.xyz;
+ return color;
+}
+vec4 color_xform_Stage0(vec4 color) {
+ float nonZeroAlpha = max(color.w, 9.9999997473787516e-05);
+ color = vec4(color.xyz / nonZeroAlpha, nonZeroAlpha);
+ color.x = src_tf_Stage0(color.x);
+ color.y = src_tf_Stage0(color.y);
+ color.z = src_tf_Stage0(color.z);
+ color = gamut_xform_Stage0(color);
+ color.x = dst_tf_Stage0(color.x);
+ color.y = dst_tf_Stage0(color.y);
+ color.z = dst_tf_Stage0(color.z);
+ color.xyz *= color.w;
+ return color;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ vec2 textureCoords;
+ textureCoords = vtextureCoords_Stage0;
+ vec4 textureDomain;
+ textureDomain = vtextureDomain_Stage0;
+ outputColor_Stage0 = vcolor_Stage0;
+ outputColor_Stage0 = color_xform_Stage0(texture(uTextureSampler_0_Stage0, clamp(textureCoords, textureDomain.xy, textureDomain.zw))) * outputColor_Stage0;
+ }
+ {
+ float alpha;
+ {
+ alpha = float(all(greaterThan(vec4(gl_FragCoord.xy, urectUniform_Stage1.zw), vec4(urectUniform_Stage1.xy, gl_FragCoord.xy))) ? 1 : 0);
+ }
+ {
+ alpha = 1.0 - alpha;
+ }
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 position;
+in vec2 textureCoords;
+in vec4 textureDomain;
+in vec4 color;
+noperspective out vec2 vtextureCoords_Stage0;
+flat out vec4 vtextureDomain_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vec2 pos2 = position;
+ vtextureCoords_Stage0 = textureCoords;
+ vtextureDomain_Stage0 = textureDomain;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1849.shader_test b/shaders/skia/1849.shader_test
new file mode 100644
index 0000000..2006b7e
--- /dev/null
+++ b/shaders/skia/1849.shader_test
@@ -0,0 +1,130 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uColor_Stage0;
+uniform vec4 uscale01_Stage2_c1_c0_c1_c0;
+uniform vec4 ubias01_Stage2_c1_c0_c1_c0;
+uniform vec4 uscale23_Stage2_c1_c0_c1_c0;
+uniform vec4 ubias23_Stage2_c1_c0_c1_c0;
+uniform float uthreshold_Stage2_c1_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 ClampFragmentProcessor_Stage1_c0_c0(vec4 _input, vec2 _coords) {
+ vec4 _output;
+ {
+ float alpha = clamp(_input.w, 0.0, 1.0);
+ _output = vec4(clamp(_input.xyz, 0.0, alpha), alpha);
+ }
+ return _output;
+}
+vec4 RadialGradientLayout_Stage2_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = length(vTransformedCoords_1_Stage0);
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 DualIntervalGradientColorizer_Stage2_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthreshold_Stage2_c1_c0_c1_c0) {
+ scale = uscale01_Stage2_c1_c0_c1_c0;
+ bias = ubias01_Stage2_c1_c0_c1_c0;
+ } else {
+ scale = uscale23_Stage2_c1_c0_c1_c0;
+ bias = ubias23_Stage2_c1_c0_c1_c0;
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = RadialGradientLayout_Stage2_c1_c0_c0_c0(vec4(1.0));
+ {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = DualIntervalGradientColorizer_Stage2_c1_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = uColor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec2 coord = vTransformedCoords_0_Stage0 - vec2(0.5);
+ vec2 f = fract(coord);
+ coord += 0.5 - f;
+ vec4 wx = mat4(0.055555555555555552, 0.88888888888888884, 0.055555555555555552, 0.0, -0.5, 0.0, 0.5, 0.0, 0.83333333333333337, -2.0, 1.5, -0.33333333333333331, -0.3888888888888889, 1.1666666666666667, -1.1666666666666667, 0.3888888888888889) * vec4(1.0, f.x, f.x * f.x, (f.x * f.x) * f.x);
+ vec4 wy = mat4(0.055555555555555552, 0.88888888888888884, 0.055555555555555552, 0.0, -0.5, 0.0, 0.5, 0.0, 0.83333333333333337, -2.0, 1.5, -0.33333333333333331, -0.3888888888888889, 1.1666666666666667, -1.1666666666666667, 0.3888888888888889) * vec4(1.0, f.y, f.y * f.y, (f.y * f.y) * f.y);
+ vec4 rowColors[4];
+ rowColors[0] = ClampFragmentProcessor_Stage1_c0_c0(vec4(1.0), coord + vec2(-1.0, -1.0));
+ rowColors[1] = ClampFragmentProcessor_Stage1_c0_c0(vec4(1.0), coord + vec2(0.0, -1.0));
+ rowColors[2] = ClampFragmentProcessor_Stage1_c0_c0(vec4(1.0), coord + vec2(1.0, -1.0));
+ rowColors[3] = ClampFragmentProcessor_Stage1_c0_c0(vec4(1.0), coord + vec2(2.0, -1.0));
+ vec4 s0 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ rowColors[0] = ClampFragmentProcessor_Stage1_c0_c0(vec4(1.0), coord + vec2(-1.0, 0.0));
+ rowColors[1] = ClampFragmentProcessor_Stage1_c0_c0(vec4(1.0), coord);
+ rowColors[2] = ClampFragmentProcessor_Stage1_c0_c0(vec4(1.0), coord + vec2(1.0, 0.0));
+ rowColors[3] = ClampFragmentProcessor_Stage1_c0_c0(vec4(1.0), coord + vec2(2.0, 0.0));
+ vec4 s1 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ rowColors[0] = ClampFragmentProcessor_Stage1_c0_c0(vec4(1.0), coord + vec2(-1.0, 1.0));
+ rowColors[1] = ClampFragmentProcessor_Stage1_c0_c0(vec4(1.0), coord + vec2(0.0, 1.0));
+ rowColors[2] = ClampFragmentProcessor_Stage1_c0_c0(vec4(1.0), coord + vec2(1.0, 1.0));
+ rowColors[3] = ClampFragmentProcessor_Stage1_c0_c0(vec4(1.0), coord + vec2(2.0, 1.0));
+ vec4 s2 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ rowColors[0] = ClampFragmentProcessor_Stage1_c0_c0(vec4(1.0), coord + vec2(-1.0, 2.0));
+ rowColors[1] = ClampFragmentProcessor_Stage1_c0_c0(vec4(1.0), coord + vec2(0.0, 2.0));
+ rowColors[2] = ClampFragmentProcessor_Stage1_c0_c0(vec4(1.0), coord + vec2(1.0, 2.0));
+ rowColors[3] = ClampFragmentProcessor_Stage1_c0_c0(vec4(1.0), coord + vec2(2.0, 2.0));
+ vec4 s3 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ vec4 bicubicColor = ((wy.x * s0 + wy.y * s1) + wy.z * s2) + wy.w * s3;
+ bicubicColor = clamp(bicubicColor, 0.0, 1.0);
+ output_Stage1 = bicubicColor;
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_dst_in(output_Stage1, TiledGradientEffect_Stage2_c1_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = outputColor_Stage0 * output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 inLocalCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1852.shader_test b/shaders/skia/1852.shader_test
new file mode 100644
index 0000000..5631e94
--- /dev/null
+++ b/shaders/skia/1852.shader_test
@@ -0,0 +1,132 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uCoordTransformMatrix_1_Stage0;
+uniform vec4 uinnerRect_Stage1;
+uniform vec2 uinvRadiiXY_Stage1;
+uniform vec4 uinnerRect_Stage3;
+uniform vec2 uradiusPlusHalf_Stage3;
+uniform vec4 uinnerRect_Stage5;
+uniform vec4 uinvRadiiLTRB_Stage5;
+uniform vec2 uDstTextureUpperLeft_Stage6;
+uniform vec2 uDstTextureCoordScale_Stage6;
+uniform sampler2D uTextureSampler_0_Stage4;
+uniform sampler2D uDstTextureSampler_Stage6;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in float vinCoverage_Stage0;
+vec4 TextureEffect_Stage4_c0_c0(vec4 _input, vec2 _coords) {
+ _coords = _coords * uCoordTransformMatrix_1_Stage0.xz + uCoordTransformMatrix_1_Stage0.yw;
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage4, _coords) * _input;
+ return _output;
+}
+vec4 blend_src(vec4 src, vec4 dst) {
+ return src;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ float alpha = 1.0;
+ alpha = vinCoverage_Stage0;
+ outputCoverage_Stage0 = vec4(alpha);
+ }
+ vec4 output_Stage1;
+ {
+ vec2 dxy0 = uinnerRect_Stage1.xy - gl_FragCoord.xy;
+ vec2 dxy1 = gl_FragCoord.xy - uinnerRect_Stage1.zw;
+ vec2 dxy = max(max(dxy0, dxy1), 0.0);
+ vec2 Z = dxy * uinvRadiiXY_Stage1;
+ float implicit = dot(Z, dxy) - 1.0;
+ float grad_dot = 4.0 * dot(Z, Z);
+ grad_dot = max(grad_dot, 9.9999997473787516e-05);
+ float approx_dist = implicit * inversesqrt(grad_dot);
+ float alpha = clamp(0.5 + approx_dist, 0.0, 1.0);
+ output_Stage1 = outputColor_Stage0 * alpha;
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = floor(output_Stage1 * 255.0 + 0.5) / 255.0;
+ {
+ output_Stage2.xyz = floor((output_Stage2.xyz * output_Stage2.w) * 255.0 + 0.5) / 255.0;
+ }
+ }
+ vec4 output_Stage3;
+ {
+ vec2 dxy0 = uinnerRect_Stage3.xy - gl_FragCoord.xy;
+ vec2 dxy1 = gl_FragCoord.xy - uinnerRect_Stage3.zw;
+ vec2 dxy = max(max(dxy0, dxy1), 0.0);
+ float alpha = clamp(uradiusPlusHalf_Stage3.x - length(dxy), 0.0, 1.0);
+ alpha = 1.0 - alpha;
+ output_Stage3 = output_Stage2 * alpha;
+ }
+ vec4 output_Stage4;
+ {
+ float coord = vTransformedCoords_0_Stage0.y - 0.5;
+ float f = fract(coord);
+ coord += 0.5 - f;
+ float f2 = f * f;
+ vec4 w = mat4(0.055555555555555552, 0.88888888888888884, 0.055555555555555552, 0.0, -0.5, 0.0, 0.5, 0.0, 0.83333333333333337, -2.0, 1.5, -0.33333333333333331, -0.3888888888888889, 1.1666666666666667, -1.1666666666666667, 0.3888888888888889) * vec4(1.0, f, f2, f2 * f);
+ vec4 c[4];
+ c[0] = TextureEffect_Stage4_c0_c0(vec4(1.0), vec2(vTransformedCoords_0_Stage0.x, coord + -1.0));
+ c[1] = TextureEffect_Stage4_c0_c0(vec4(1.0), vec2(vTransformedCoords_0_Stage0.x, coord));
+ c[2] = TextureEffect_Stage4_c0_c0(vec4(1.0), vec2(vTransformedCoords_0_Stage0.x, coord + 1.0));
+ c[3] = TextureEffect_Stage4_c0_c0(vec4(1.0), vec2(vTransformedCoords_0_Stage0.x, coord + 2.0));
+ vec4 bicubicColor = ((c[0] * w.x + c[1] * w.y) + c[2] * w.z) + c[3] * w.w;
+ bicubicColor.xyz = max(vec3(0.0), min(bicubicColor.xyz, bicubicColor.www));
+ output_Stage4 = bicubicColor * outputCoverage_Stage0;
+ }
+ vec4 output_Stage5;
+ {
+ vec2 dxy0 = uinnerRect_Stage5.xy - gl_FragCoord.xy;
+ vec2 dxy1 = gl_FragCoord.xy - uinnerRect_Stage5.zw;
+ vec2 dxy = max(max(dxy0, dxy1), 0.0);
+ vec2 Z = max(max(dxy0 * uinvRadiiLTRB_Stage5.xy, dxy1 * uinvRadiiLTRB_Stage5.zw), 0.0);
+ float implicit = dot(Z, dxy) - 1.0;
+ float grad_dot = 4.0 * dot(Z, Z);
+ grad_dot = max(grad_dot, 9.9999997473787516e-05);
+ float approx_dist = implicit * inversesqrt(grad_dot);
+ float alpha = clamp(0.5 + approx_dist, 0.0, 1.0);
+ output_Stage5 = output_Stage4 * alpha;
+ }
+ {
+ if (all(lessThanEqual(output_Stage5.xyz, vec3(0.0)))) {
+ discard;
+ }
+ vec2 _dstTexCoord = (gl_FragCoord.xy - uDstTextureUpperLeft_Stage6) * uDstTextureCoordScale_Stage6;
+ _dstTexCoord.y = 1.0 - _dstTexCoord.y;
+ vec4 _dstColor = texture(uDstTextureSampler_Stage6, _dstTexCoord);
+ sk_FragColor = blend_src(output_Stage3, _dstColor);
+ sk_FragColor = output_Stage5 * sk_FragColor + (vec4(1.0) - output_Stage5) * _dstColor;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in float inCoverage;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out float vinCoverage_Stage0;
+void main() {
+ vec4 color = inColor;
+ vcolor_Stage0 = color;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ vinCoverage_Stage0 = inCoverage;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1855.shader_test b/shaders/skia/1855.shader_test
new file mode 100644
index 0000000..af5e559
--- /dev/null
+++ b/shaders/skia/1855.shader_test
@@ -0,0 +1,211 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+uniform vec2 uImageIncrement_Stage1;
+uniform float uSurfaceScale_Stage1;
+uniform vec3 uLightColor_Stage1;
+uniform float uKD_Stage1;
+uniform vec4 uTexDom_Stage1;
+uniform vec3 uDecalParams_Stage1;
+uniform vec3 uLightLocation_Stage1;
+uniform float uExponent_Stage1;
+uniform float uCosInnerConeAngle_Stage1;
+uniform float uCosOuterConeAngle_Stage1;
+uniform float uConeScale_Stage1;
+uniform vec3 uS_Stage1;
+uniform vec4 urectH_Stage2;
+uniform float uinvSixSigma_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 light_Stage1(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ float colorScale = uKD_Stage1 * dot(normal, surfaceToLight);
+ return vec4(lightColor * clamp(colorScale, 0.0, 1.0), 1.0);
+}
+float sobel_Stage1(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage1(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage1(float m[9], float surfaceScale) {
+ return pointToNormal_Stage1(sobel_Stage1(0.0, 0.0, m[4], m[5], m[7], m[8], 0.66666698455810547), sobel_Stage1(0.0, 0.0, m[4], m[7], m[5], m[8], 0.66666698455810547), surfaceScale);
+}
+vec3 lightColor_Stage1(vec3 surfaceToLight) {
+ float cosAngle = -dot(surfaceToLight, uS_Stage1);
+ if (cosAngle < uCosOuterConeAngle_Stage1) {
+ return vec3(0.0);
+ }
+ float scale = pow(cosAngle, uExponent_Stage1);
+ if (cosAngle < uCosInnerConeAngle_Stage1) {
+ return ((uLightColor_Stage1 * scale) * (cosAngle - uCosOuterConeAngle_Stage1)) * uConeScale_Stage1;
+ }
+ return uLightColor_Stage1;
+}
+void main() {
+ {
+ vec2 coord = vTransformedCoords_0_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp0 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp5 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp6 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp7 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp8 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = normalize(uLightLocation_Stage1 - vec3(gl_FragCoord.xy, uSurfaceScale_Stage1 * m[4]));
+ light_Stage1(normal_Stage1(m, uSurfaceScale_Stage1), surfaceToLight, lightColor_Stage1(surfaceToLight));
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec2 inLocalCoord;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 color = inColor;
+ vcolor_Stage0 = color;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1861.shader_test b/shaders/skia/1861.shader_test
new file mode 100644
index 0000000..1e837f5
--- /dev/null
+++ b/shaders/skia/1861.shader_test
@@ -0,0 +1,300 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_KHR_blend_equation_advanced : require
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+layout (blend_support_all_equations) out ;
+uniform vec2 uImageIncrement_Stage1_c0_c0_c0_c0;
+uniform float uSurfaceScale_Stage1_c0_c0_c0_c0;
+uniform vec3 uLightColor_Stage1_c0_c0_c0_c0;
+uniform float uKS_Stage1_c0_c0_c0_c0;
+uniform float uShininess_Stage1_c0_c0_c0_c0;
+uniform vec4 uTexDom_Stage1_c0_c0_c0_c0;
+uniform vec3 uDecalParams_Stage1_c0_c0_c0_c0;
+uniform vec3 uLightLocation_Stage1_c0_c0_c0_c0;
+uniform vec4 ucircleData_Stage1_c1_c0_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+uniform sampler2D uTextureSampler_2_Stage1;
+noperspective in vec2 vEllipseOffsets_Stage0;
+noperspective in vec4 vEllipseRadii_Stage0;
+noperspective in vec4 vinColor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec3 vTransformedCoords_1_Stage0;
+vec4 light_Stage1_c0_c0_c0_c0(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ vec3 halfDir = normalize(surfaceToLight + vec3(0.0, 0.0, 1.0));
+ float colorScale = uKS_Stage1_c0_c0_c0_c0 * pow(dot(normal, halfDir), uShininess_Stage1_c0_c0_c0_c0);
+ vec3 color = lightColor * clamp(colorScale, 0.0, 1.0);
+ return vec4(color, max(max(color.x, color.y), color.z));
+}
+float sobel_Stage1_c0_c0_c0_c0(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage1_c0_c0_c0_c0(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage1_c0_c0_c0_c0(float m[9], float surfaceScale) {
+ return pointToNormal_Stage1_c0_c0_c0_c0(sobel_Stage1_c0_c0_c0_c0(m[0], m[1], m[3], m[4], 0.0, 0.0, 0.66666698455810547), sobel_Stage1_c0_c0_c0_c0(m[0], m[3], m[1], m[4], 0.0, 0.0, 0.66666698455810547), surfaceScale);
+}
+vec4 SpecularLighting_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coord = vTransformedCoords_0_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage1_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp0 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage1_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp5 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage1_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp6 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage1_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp7 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage1_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp8 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = normalize(uLightLocation_Stage1_c0_c0_c0_c0 - vec3(gl_FragCoord.xy, uSurfaceScale_Stage1_c0_c0_c0_c0 * m[4]));
+ _output = light_Stage1_c0_c0_c0_c0(normal_Stage1_c0_c0_c0_c0(m, uSurfaceScale_Stage1_c0_c0_c0_c0), surfaceToLight, uLightColor_Stage1_c0_c0_c0_c0);
+ _output *= _input;
+ return _output;
+}
+vec4 ConfigConversionEffect_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = floor(_input * 255.0 + 0.5) / 255.0;
+ {
+ _output.xyz = _output.w <= 0.0 ? vec3(0.0) : floor((_output.xyz / _output.w) * 255.0 + 0.5) / 255.0;
+ }
+ return _output;
+}
+float _guarded_divide(float n, float d) {
+ return n / d;
+}
+float _color_dodge_component(float sc, float sa, float dc, float da) {
+ if (dc == 0.0) {
+ return sc * (1.0 - da);
+ } else {
+ float d = sa - sc;
+ if (d == 0.0) {
+ return (sa * da + sc * (1.0 - da)) + dc * (1.0 - sa);
+ }
+ d = min(da, _guarded_divide(dc * sa, d));
+ return (d * sa + sc * (1.0 - da)) + dc * (1.0 - sa);
+ }
+}
+vec4 blend_color_dodge(vec4 src, vec4 dst) {
+ return vec4(_color_dodge_component(src.x, src.w, dst.x, dst.w), _color_dodge_component(src.y, src.w, dst.y, dst.w), _color_dodge_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+}
+vec4 ComposeTwo_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_color_dodge(SpecularLighting_Stage1_c0_c0_c0_c0(inputColor), ConfigConversionEffect_Stage1_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 CircleBlurFragmentProcessor_Stage1_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 vec = vec2((gl_FragCoord.x - ucircleData_Stage1_c1_c0_c0_c0.x) * ucircleData_Stage1_c1_c0_c0_c0.w, (gl_FragCoord.y - ucircleData_Stage1_c1_c0_c0_c0.y) * ucircleData_Stage1_c1_c0_c0_c0.w);
+ float dist = length(vec) + (0.5 - ucircleData_Stage1_c1_c0_c0_c0.z) * ucircleData_Stage1_c1_c0_c0_c0.w;
+ _output = _input * texture(uTextureSampler_1_Stage1, vec2(dist, 0.5)).w;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = textureProj(uTextureSampler_2_Stage1, vTransformedCoords_1_Stage0) * _input;
+ return _output;
+}
+vec4 blend_difference(vec4 src, vec4 dst) {
+ return vec4((src.xyz + dst.xyz) - 2.0 * min(src.xyz * dst.w, dst.xyz * src.w), src.w + (1.0 - src.w) * dst.w);
+}
+vec4 ComposeTwo_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_difference(CircleBlurFragmentProcessor_Stage1_c1_c0_c0_c0(inputColor), TextureEffect_Stage1_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vinColor_Stage0;
+ vec2 offset = vEllipseOffsets_Stage0;
+ offset *= vEllipseRadii_Stage0.xy;
+ float test = dot(offset, offset) - 1.0;
+ vec2 grad = (2.0 * offset) * vEllipseRadii_Stage0.xy;
+ float grad_dot = dot(grad, grad);
+ grad_dot = max(grad_dot, 1.1754999560161448e-38);
+ float invlen = inversesqrt(grad_dot);
+ float edgeAlpha = clamp(0.5 - test * invlen, 0.0, 1.0);
+ offset = vEllipseOffsets_Stage0 * vEllipseRadii_Stage0.zw;
+ test = dot(offset, offset) - 1.0;
+ grad = (2.0 * offset) * vEllipseRadii_Stage0.zw;
+ grad_dot = dot(grad, grad);
+ invlen = inversesqrt(grad_dot);
+ edgeAlpha *= clamp(0.5 + test * invlen, 0.0, 1.0);
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_difference(ComposeTwo_Stage1_c0_c0(inputColor), ComposeTwo_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ sk_FragColor = outputCoverage_Stage0 * output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec2 inEllipseOffset;
+in vec4 inEllipseRadii;
+noperspective out vec2 vEllipseOffsets_Stage0;
+noperspective out vec4 vEllipseRadii_Stage0;
+noperspective out vec4 vinColor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec3 vTransformedCoords_1_Stage0;
+void main() {
+ vEllipseOffsets_Stage0 = inEllipseOffset;
+ vEllipseRadii_Stage0 = inEllipseRadii;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = uCoordTransformMatrix_1_Stage0 * vec3(inPosition, 1.0);
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1867.shader_test b/shaders/skia/1867.shader_test
new file mode 100644
index 0000000..fc7d601
--- /dev/null
+++ b/shaders/skia/1867.shader_test
@@ -0,0 +1,61 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uColor_Stage0;
+uniform vec4 urectUniform_Stage2;
+noperspective in vec3 vDashParams_Stage0;
+noperspective in vec4 vRectParams_Stage0;
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ float xShifted = vDashParams_Stage0.x - floor(vDashParams_Stage0.x / vDashParams_Stage0.z) * vDashParams_Stage0.z;
+ vec2 fragPosShifted = vec2(xShifted, vDashParams_Stage0.y);
+ float xSub;
+ xSub = min(fragPosShifted.x - vRectParams_Stage0.x, 0.0);
+ xSub += min(vRectParams_Stage0.z - fragPosShifted.x, 0.0);
+ float alpha = 1.0 + max(xSub, -1.0);
+ outputCoverage_Stage0 = vec4(alpha);
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = outputCoverage_Stage0;
+ }
+ vec4 output_Stage2;
+ {
+ float alpha;
+ {
+ float xSub, ySub;
+ xSub = min(gl_FragCoord.x - urectUniform_Stage2.x, 0.0);
+ xSub += min(urectUniform_Stage2.z - gl_FragCoord.x, 0.0);
+ ySub = min(gl_FragCoord.y - urectUniform_Stage2.y, 0.0);
+ ySub += min(urectUniform_Stage2.w - gl_FragCoord.y, 0.0);
+ alpha = (1.0 + max(xSub, -1.0)) * (1.0 + max(ySub, -1.0));
+ }
+ output_Stage2 = output_Stage1 * alpha;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 inPosition;
+in vec3 inDashParams;
+in vec4 inRect;
+noperspective out vec3 vDashParams_Stage0;
+noperspective out vec4 vRectParams_Stage0;
+void main() {
+ vDashParams_Stage0 = inDashParams;
+ vRectParams_Stage0 = inRect;
+ vec2 pos2 = inPosition;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/187-2.shader_test b/shaders/skia/187-2.shader_test
new file mode 100644
index 0000000..86dadcb
--- /dev/null
+++ b/shaders/skia/187-2.shader_test
@@ -0,0 +1,75 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage2_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c1_c0;
+ }
+ return _output;
+}
+vec4 blend_xor(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src + (1.0 - src.w) * dst;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_xor(ConstColorProcessor_Stage2_c1_c0(vec4(1.0)), output_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/187-3.shader_test b/shaders/skia/187-3.shader_test
new file mode 100644
index 0000000..be82bf0
--- /dev/null
+++ b/shaders/skia/187-3.shader_test
@@ -0,0 +1,193 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform float uSurfaceScale_Stage1;
+uniform vec3 uLightColor_Stage1;
+uniform float uKD_Stage1;
+uniform vec4 uTexDom_Stage1;
+uniform vec3 uDecalParams_Stage1;
+uniform vec3 uLightLocation_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 light_Stage1(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ float colorScale = uKD_Stage1 * dot(normal, surfaceToLight);
+ return vec4(lightColor * clamp(colorScale, 0.0, 1.0), 1.0);
+}
+float sobel_Stage1(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage1(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage1(float m[9], float surfaceScale) {
+ return pointToNormal_Stage1(sobel_Stage1(m[0], m[1], m[3], m[4], m[6], m[7], 0.5), sobel_Stage1(m[0], m[6], m[1], m[7], 0.0, 0.0, 0.33333298563957214), surfaceScale);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ vec2 coord = vTransformedCoords_0_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp0 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp5 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp6 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp7 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp8 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = normalize(uLightLocation_Stage1 - vec3(gl_FragCoord.xy, uSurfaceScale_Stage1 * m[4]));
+ output_Stage1 = light_Stage1(normal_Stage1(m, uSurfaceScale_Stage1), surfaceToLight, uLightColor_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/187-6.shader_test b/shaders/skia/187-6.shader_test
new file mode 100644
index 0000000..7f222f6
--- /dev/null
+++ b/shaders/skia/187-6.shader_test
@@ -0,0 +1,108 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage2;
+uniform vec2 uBounds_Stage2;
+uniform vec4 uKernel_Stage2[4];
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_1_Stage0 - 7.0 * uImageIncrement_Stage2;
+ vec2 coordSampled = vec2(0.0, 0.0);
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage2.x, uBounds_Stage2.y - uBounds_Stage2.x) + uBounds_Stage2.x;
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[0].x;
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage2.x, uBounds_Stage2.y - uBounds_Stage2.x) + uBounds_Stage2.x;
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[0].y;
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage2.x, uBounds_Stage2.y - uBounds_Stage2.x) + uBounds_Stage2.x;
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[0].z;
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage2.x, uBounds_Stage2.y - uBounds_Stage2.x) + uBounds_Stage2.x;
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[0].w;
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage2.x, uBounds_Stage2.y - uBounds_Stage2.x) + uBounds_Stage2.x;
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[1].x;
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage2.x, uBounds_Stage2.y - uBounds_Stage2.x) + uBounds_Stage2.x;
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[1].y;
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage2.x, uBounds_Stage2.y - uBounds_Stage2.x) + uBounds_Stage2.x;
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[1].z;
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage2.x, uBounds_Stage2.y - uBounds_Stage2.x) + uBounds_Stage2.x;
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[1].w;
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage2.x, uBounds_Stage2.y - uBounds_Stage2.x) + uBounds_Stage2.x;
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[2].x;
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage2.x, uBounds_Stage2.y - uBounds_Stage2.x) + uBounds_Stage2.x;
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[2].y;
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage2.x, uBounds_Stage2.y - uBounds_Stage2.x) + uBounds_Stage2.x;
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[2].z;
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage2.x, uBounds_Stage2.y - uBounds_Stage2.x) + uBounds_Stage2.x;
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[2].w;
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage2.x, uBounds_Stage2.y - uBounds_Stage2.x) + uBounds_Stage2.x;
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[3].x;
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage2.x, uBounds_Stage2.y - uBounds_Stage2.x) + uBounds_Stage2.x;
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[3].y;
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage2.x, uBounds_Stage2.y - uBounds_Stage2.x) + uBounds_Stage2.x;
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[3].z;
+ coord += uImageIncrement_Stage2;
+ output_Stage2 *= output_Stage1;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/187.shader_test b/shaders/skia/187.shader_test
new file mode 100644
index 0000000..e5ac831
--- /dev/null
+++ b/shaders/skia/187.shader_test
@@ -0,0 +1,68 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 ucolor_Stage1_c0_c0_c0_c0;
+uniform vec4 ucolor_Stage2;
+noperspective in vec4 vcolor_Stage0;
+vec4 ConstColorProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = _input.w * ucolor_Stage1_c0_c0_c0_c0;
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = ConstColorProcessor_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 blend_src_out(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_src_out(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ {
+ output_Stage2 = output_Stage1 * ucolor_Stage2;
+ }
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 position;
+in vec4 inColor;
+noperspective out vec4 vcolor_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1870.shader_test b/shaders/skia/1870.shader_test
new file mode 100644
index 0000000..a6b6442
--- /dev/null
+++ b/shaders/skia/1870.shader_test
@@ -0,0 +1,26 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uColor_Stage0;
+void main() {
+ {
+ sk_FragColor = 1.0 - vec4(1.0);
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 position;
+void main() {
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1873.shader_test b/shaders/skia/1873.shader_test
new file mode 100644
index 0000000..429b318
--- /dev/null
+++ b/shaders/skia/1873.shader_test
@@ -0,0 +1,174 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_KHR_blend_equation_advanced : require
+out vec4 sk_FragColor;
+layout (blend_support_all_equations) out ;
+uniform float uSrcTF_Stage0[7];
+uniform mat3 uColorXform_Stage0;
+uniform float uDstTF_Stage0[7];
+uniform vec4 uleftBorderColor_Stage2_c0_c0;
+uniform vec4 urightBorderColor_Stage2_c0_c0;
+uniform vec4 uscale0_1_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage2_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage2_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage2_c0_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vtextureCoords_Stage0;
+flat in vec4 vtextureDomain_Stage0;
+flat in vec4 vcolor_Stage0;
+float src_tf_Stage0(float x) {
+ float G = uSrcTF_Stage0[0];
+ float A = uSrcTF_Stage0[1];
+ float B = uSrcTF_Stage0[2];
+ float C = uSrcTF_Stage0[3];
+ float D = uSrcTF_Stage0[4];
+ float E = uSrcTF_Stage0[5];
+ float F = uSrcTF_Stage0[6];
+ float s = sign(x);
+ x = abs(x);
+ x = x < D ? C * x + F : pow(A * x + B, G) + E;
+ return s * x;
+}
+float dst_tf_Stage0(float x) {
+ float G = uDstTF_Stage0[0];
+ float A = uDstTF_Stage0[1];
+ float B = uDstTF_Stage0[2];
+ float C = uDstTF_Stage0[3];
+ float D = uDstTF_Stage0[4];
+ float E = uDstTF_Stage0[5];
+ float F = uDstTF_Stage0[6];
+ float s = sign(x);
+ x = abs(x);
+ x = x < D ? C * x + F : pow(A * x + B, G) + E;
+ return s * x;
+}
+vec4 gamut_xform_Stage0(vec4 color) {
+ color.xyz = uColorXform_Stage0 * color.xyz;
+ return color;
+}
+vec4 color_xform_Stage0(vec4 color) {
+ float nonZeroAlpha = max(color.w, 9.9999997473787516e-05);
+ color = vec4(color.xyz / nonZeroAlpha, nonZeroAlpha);
+ color.x = src_tf_Stage0(color.x);
+ color.y = src_tf_Stage0(color.y);
+ color.z = src_tf_Stage0(color.z);
+ color = gamut_xform_Stage0(color);
+ color.x = dst_tf_Stage0(color.x);
+ color.y = dst_tf_Stage0(color.y);
+ color.z = dst_tf_Stage0(color.z);
+ color.xyz *= color.w;
+ return color;
+}
+vec4 LinearGradientLayout_Stage2_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage2_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage2_c0_c0_c1_c0;
+ bias = ubias0_1_Stage2_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage2_c0_c0_c1_c0;
+ bias = ubias2_3_Stage2_c0_c0_c1_c0;
+ }
+ } else {
+ {
+ scale = uscale4_5_Stage2_c0_c0_c1_c0;
+ bias = ubias4_5_Stage2_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage2_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage2_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage2_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage2_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ vec2 textureCoords;
+ textureCoords = vtextureCoords_Stage0;
+ vec4 textureDomain;
+ textureDomain = vtextureDomain_Stage0;
+ outputColor_Stage0 = vcolor_Stage0;
+ outputColor_Stage0 = color_xform_Stage0(texture(uTextureSampler_0_Stage0, clamp(textureCoords, textureDomain.xy, textureDomain.zw))) * outputColor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ float nonZeroAlpha = max(outputColor_Stage0.w, 9.9999997473787516e-05);
+ vec4 coord = vec4(outputColor_Stage0.xyz / nonZeroAlpha, nonZeroAlpha);
+ coord = coord * 0.9960939884185791 + vec4(0.0019529999699443579, 0.0019529999699443579, 0.0019529999699443579, 0.0019529999699443579);
+ output_Stage1.w = texture(uTextureSampler_0_Stage1, vec2(coord.w, 0.125)).w;
+ output_Stage1.x = texture(uTextureSampler_0_Stage1, vec2(coord.x, 0.375)).w;
+ output_Stage1.y = texture(uTextureSampler_0_Stage1, vec2(coord.y, 0.625)).w;
+ output_Stage1.z = texture(uTextureSampler_0_Stage1, vec2(coord.z, 0.875)).w;
+ output_Stage1.xyz *= output_Stage1.w;
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_dst_in(vec4(1.0), ClampedGradientEffect_Stage2_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage2 * output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 textureCoords;
+in vec4 textureDomain;
+in vec4 color;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vtextureCoords_Stage0;
+flat out vec4 vtextureDomain_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vec2 pos2 = position;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(textureCoords, 1.0)).xy;
+ vtextureCoords_Stage0 = textureCoords;
+ vtextureDomain_Stage0 = textureDomain;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1876.shader_test b/shaders/skia/1876.shader_test
new file mode 100644
index 0000000..ce9119c
--- /dev/null
+++ b/shaders/skia/1876.shader_test
@@ -0,0 +1,113 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_KHR_blend_equation_advanced : require
+out vec4 sk_FragColor;
+layout (blend_support_all_equations) out ;
+uniform vec4 uColor_Stage0;
+uniform vec4 ucircle_Stage1_c0_c0_c0_c0;
+uniform vec4 ucolor_Stage1_c0_c0_c1_c0;
+uniform vec4 ucircle_Stage1_c1_c0;
+noperspective in vec3 vDashParams_Stage0;
+noperspective in vec4 vRectParams_Stage0;
+vec4 CircleEffect_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float d;
+ {
+ d = (1.0 - length((ucircle_Stage1_c0_c0_c0_c0.xy - gl_FragCoord.xy) * ucircle_Stage1_c0_c0_c0_c0.w)) * ucircle_Stage1_c0_c0_c0_c0.z;
+ }
+ {
+ _output = d > 0.5 ? _input : vec4(0.0);
+ }
+ return _output;
+}
+vec4 ConstColorProcessor_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = _input.w * ucolor_Stage1_c0_c0_c1_c0;
+ }
+ return _output;
+}
+vec4 blend_dst_over(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src + dst;
+}
+vec4 ComposeTwo_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_dst_over(CircleEffect_Stage1_c0_c0_c0_c0(inputColor), ConstColorProcessor_Stage1_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 CircleEffect_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ float d;
+ {
+ d = (1.0 - length((ucircle_Stage1_c1_c0.xy - gl_FragCoord.xy) * ucircle_Stage1_c1_c0.w)) * ucircle_Stage1_c1_c0.z;
+ }
+ {
+ _output = _input * clamp(d, 0.0, 1.0);
+ }
+ return _output;
+}
+float _guarded_divide(float n, float d) {
+ return n / d;
+}
+float _color_dodge_component(float sc, float sa, float dc, float da) {
+ if (dc == 0.0) {
+ return sc * (1.0 - da);
+ } else {
+ float d = sa - sc;
+ if (d == 0.0) {
+ return (sa * da + sc * (1.0 - da)) + dc * (1.0 - sa);
+ }
+ d = min(da, _guarded_divide(dc * sa, d));
+ return (d * sa + sc * (1.0 - da)) + dc * (1.0 - sa);
+ }
+}
+vec4 blend_color_dodge(vec4 src, vec4 dst) {
+ return vec4(_color_dodge_component(src.x, src.w, dst.x, dst.w), _color_dodge_component(src.y, src.w, dst.y, dst.w), _color_dodge_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = uColor_Stage0;
+ float xShifted = vDashParams_Stage0.x - floor(vDashParams_Stage0.x / vDashParams_Stage0.z) * vDashParams_Stage0.z;
+ vec2 fragPosShifted = vec2(xShifted, vDashParams_Stage0.y);
+ float xSub;
+ xSub = min(fragPosShifted.x - vRectParams_Stage0.x, 0.0);
+ xSub += min(vRectParams_Stage0.z - fragPosShifted.x, 0.0);
+ float alpha = 1.0 + max(xSub, -1.0);
+ outputCoverage_Stage0 = vec4(alpha);
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_color_dodge(ComposeTwo_Stage1_c0_c0(inputColor), CircleEffect_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ sk_FragColor = outputCoverage_Stage0 * output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 inPosition;
+in vec3 inDashParams;
+in vec4 inRect;
+noperspective out vec3 vDashParams_Stage0;
+noperspective out vec4 vRectParams_Stage0;
+void main() {
+ vDashParams_Stage0 = inDashParams;
+ vRectParams_Stage0 = inRect;
+ vec2 pos2 = inPosition;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1879.shader_test b/shaders/skia/1879.shader_test
new file mode 100644
index 0000000..6359002
--- /dev/null
+++ b/shaders/skia/1879.shader_test
@@ -0,0 +1,219 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_KHR_blend_equation_advanced : require
+out vec4 sk_FragColor;
+layout (blend_support_all_equations) out ;
+uniform vec2 uImageIncrement_Stage1;
+uniform float uSurfaceScale_Stage1;
+uniform vec3 uLightColor_Stage1;
+uniform float uKS_Stage1;
+uniform float uShininess_Stage1;
+uniform vec4 uTexDom_Stage1;
+uniform vec3 uDecalParams_Stage1;
+uniform vec3 uLightLocation_Stage1;
+uniform sampler2D uTextureSampler_0_Stage0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vtextureCoords_Stage0;
+flat in vec4 vtextureDomain_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 light_Stage1(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ vec3 halfDir = normalize(surfaceToLight + vec3(0.0, 0.0, 1.0));
+ float colorScale = uKS_Stage1 * pow(dot(normal, halfDir), uShininess_Stage1);
+ vec3 color = lightColor * clamp(colorScale, 0.0, 1.0);
+ return vec4(color, max(max(color.x, color.y), color.z));
+}
+float sobel_Stage1(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage1(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage1(float m[9], float surfaceScale) {
+ return pointToNormal_Stage1(sobel_Stage1(m[1], m[2], m[4], m[5], 0.0, 0.0, 0.66666698455810547), sobel_Stage1(0.0, 0.0, m[1], m[4], m[2], m[5], 0.66666698455810547), surfaceScale);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ vec2 textureCoords;
+ textureCoords = vtextureCoords_Stage0;
+ vec4 textureDomain;
+ textureDomain = vtextureDomain_Stage0;
+ outputColor_Stage0 = vcolor_Stage0;
+ outputColor_Stage0 = texture(uTextureSampler_0_Stage0, clamp(textureCoords, textureDomain.xy, textureDomain.zw)) * outputColor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec2 coord = vTransformedCoords_0_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp0 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp5 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp6 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp7 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp8 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = normalize(uLightLocation_Stage1 - vec3(gl_FragCoord.xy, uSurfaceScale_Stage1 * m[4]));
+ output_Stage1 = light_Stage1(normal_Stage1(m, uSurfaceScale_Stage1), surfaceToLight, uLightColor_Stage1);
+ output_Stage1 *= outputColor_Stage0;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 textureCoords;
+in vec4 textureDomain;
+in vec4 color;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vtextureCoords_Stage0;
+flat out vec4 vtextureDomain_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vec2 pos2 = position;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(textureCoords, 1.0)).xy;
+ vtextureCoords_Stage0 = textureCoords;
+ vtextureDomain_Stage0 = textureDomain;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1882.shader_test b/shaders/skia/1882.shader_test
new file mode 100644
index 0000000..3a02cd6
--- /dev/null
+++ b/shaders/skia/1882.shader_test
@@ -0,0 +1,92 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+uniform vec3 uedges_Stage1[1];
+uniform vec2 ubaseFrequency_Stage2;
+uniform float uz_Stage2;
+uniform sampler2D uTextureSampler_0_Stage2;
+uniform sampler2D uTextureSampler_1_Stage2;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec3 vTransformedCoords_0_Stage0;
+vec3 fade_Stage2(vec3 t) {
+ return ((t * t) * t) * (t * (t * 6.0 - 15.0) + 10.0);
+}
+float perm_Stage2(float x) {
+ return texture(uTextureSampler_0_Stage2, vec2(fract(x / 256.0), 0.0)).x * 255.0;
+}
+float grad_Stage2(float x, vec3 p) {
+ return dot(texture(uTextureSampler_1_Stage2, vec2(fract(x / 16.0), 0.0)).xyz * 255.0 - vec3(1.0), p);
+}
+float lerp_Stage2(float a, float b, float w) {
+ return a + w * (b - a);
+}
+float noise_Stage2(vec3 p) {
+ vec3 P = mod(floor(p), 256.0);
+ p -= floor(p);
+ vec3 f = fade_Stage2(p);
+ float A = perm_Stage2(P.x) + P.y;
+ float AA = perm_Stage2(A) + P.z;
+ float AB = perm_Stage2(A + 1.0) + P.z;
+ float B = perm_Stage2(P.x + 1.0) + P.y;
+ float BA = perm_Stage2(B) + P.z;
+ float BB = perm_Stage2(B + 1.0) + P.z;
+ float result = lerp_Stage2(lerp_Stage2(lerp_Stage2(grad_Stage2(perm_Stage2(AA), p), grad_Stage2(perm_Stage2(BA), p + vec3(-1.0, 0.0, 0.0)), f.x), lerp_Stage2(grad_Stage2(perm_Stage2(AB), p + vec3(0.0, -1.0, 0.0)), grad_Stage2(perm_Stage2(BB), p + vec3(-1.0, -1.0, 0.0)), f.x), f.y), lerp_Stage2(lerp_Stage2(grad_Stage2(perm_Stage2(AA + 1.0), p + vec3(0.0, 0.0, -1.0)), grad_Stage2(perm_Stage2(BA + 1.0), p + vec3(-1.0, 0.0, -1.0)), f.x), lerp_Stage2(grad_Stage2(perm_Stage2(AB + 1.0), p + vec3(0.0, -1.0, -1.0)), grad_Stage2(perm_Stage2(BB + 1.0), p + vec3(-1.0, -1.0, -1.0)), f.x), f.y), f.z);
+ return result;
+}
+float noiseOctaves_Stage2(vec3 p) {
+ float result = 0.0;
+ float ratio = 1.0;
+ for (float i = 0.0;i < 7.0; i++) {
+ result += noise_Stage2(p) / ratio;
+ p *= 2.0;
+ ratio *= 2.0;
+ }
+ return (result + 1.0) / 2.0;
+}
+void main() {
+ {
+ float alpha = 1.0;
+ float edge;
+ edge = dot(uedges_Stage1[0], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ alpha = 1.0 - alpha;
+ }
+ vec4 output_Stage2;
+ {
+ vec2 vTransformedCoords_0_Stage0_ensure2D = vTransformedCoords_0_Stage0.xy / vTransformedCoords_0_Stage0.z;
+ vec2 coords = vTransformedCoords_0_Stage0_ensure2D * ubaseFrequency_Stage2;
+ float r = noiseOctaves_Stage2(vec3(coords, uz_Stage2));
+ float g = noiseOctaves_Stage2(vec3(coords, uz_Stage2));
+ float b = noiseOctaves_Stage2(vec3(coords, uz_Stage2));
+ float a = noiseOctaves_Stage2(vec3(coords, uz_Stage2));
+ output_Stage2 = vec4(r, g, b, a);
+ output_Stage2 = clamp(output_Stage2, 0.0, 1.0);
+ output_Stage2 = vec4(output_Stage2.xyz * output_Stage2.www, output_Stage2.w);
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec3 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 color = inColor;
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0);
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1885.shader_test b/shaders/skia/1885.shader_test
new file mode 100644
index 0000000..ac06888
--- /dev/null
+++ b/shaders/skia/1885.shader_test
@@ -0,0 +1,363 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uColor_Stage0;
+uniform vec4 ucircle_Stage1_c0_c0_c0_c0_c0_c0;
+uniform vec2 uImageIncrement_Stage1_c0_c0_c0_c0_c1_c0;
+uniform float uSurfaceScale_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec3 uLightColor_Stage1_c0_c0_c0_c0_c1_c0;
+uniform float uKD_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 uTexDom_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec3 uDecalParams_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec3 uLightLocation_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 uinnerRect_Stage1_c0_c0_c1_c0;
+uniform vec4 uinvRadiiLTRB_Stage1_c0_c0_c1_c0;
+uniform float uPixelSize_Stage1_c1_c0_c0_c0_c0_c0;
+uniform vec2 uRange_Stage1_c1_c0_c0_c0_c0_c0;
+uniform vec4 uinnerRect_Stage1_c1_c0_c0_c0_c1_c0;
+uniform vec2 uradiusPlusHalf_Stage1_c1_c0_c0_c0_c1_c0;
+uniform vec4 uboundsUniform_Stage1_c1_c0_c1_c0_c0_c0;
+uniform float uxInvZoom_Stage1_c1_c0_c1_c0_c0_c0;
+uniform float uyInvZoom_Stage1_c1_c0_c1_c0_c0_c0;
+uniform float uxInvInset_Stage1_c1_c0_c1_c0_c0_c0;
+uniform float uyInvInset_Stage1_c1_c0_c1_c0_c0_c0;
+uniform vec2 uoffset_Stage1_c1_c0_c1_c0_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+uniform sampler2D uTextureSampler_2_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+vec4 CircleEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float d;
+ {
+ d = (1.0 - length((ucircle_Stage1_c0_c0_c0_c0_c0_c0.xy - gl_FragCoord.xy) * ucircle_Stage1_c0_c0_c0_c0_c0_c0.w)) * ucircle_Stage1_c0_c0_c0_c0_c0_c0.z;
+ }
+ {
+ _output = _input * clamp(d, 0.0, 1.0);
+ }
+ return _output;
+}
+vec4 light_Stage1_c0_c0_c0_c0_c1_c0(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ float colorScale = uKD_Stage1_c0_c0_c0_c0_c1_c0 * dot(normal, surfaceToLight);
+ return vec4(lightColor * clamp(colorScale, 0.0, 1.0), 1.0);
+}
+float sobel_Stage1_c0_c0_c0_c0_c1_c0(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage1_c0_c0_c0_c0_c1_c0(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage1_c0_c0_c0_c0_c1_c0(float m[9], float surfaceScale) {
+ return pointToNormal_Stage1_c0_c0_c0_c0_c1_c0(sobel_Stage1_c0_c0_c0_c0_c1_c0(m[0], m[1], m[3], m[4], 0.0, 0.0, 0.66666698455810547), sobel_Stage1_c0_c0_c0_c0_c1_c0(m[0], m[3], m[1], m[4], 0.0, 0.0, 0.66666698455810547), surfaceScale);
+}
+vec4 DiffuseLighting_Stage1_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coord = vTransformedCoords_0_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage1_c0_c0_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0_c1_c0.xy, uTexDom_Stage1_c0_c0_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp0 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1_c0_c0_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0_c1_c0.xy, uTexDom_Stage1_c0_c0_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1_c0_c0_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0_c1_c0.xy, uTexDom_Stage1_c0_c0_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage1_c0_c0_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0_c1_c0.xy, uTexDom_Stage1_c0_c0_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0_c1_c0.xy, uTexDom_Stage1_c0_c0_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1_c0_c0_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0_c1_c0.xy, uTexDom_Stage1_c0_c0_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp5 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage1_c0_c0_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0_c1_c0.xy, uTexDom_Stage1_c0_c0_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp6 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage1_c0_c0_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0_c1_c0.xy, uTexDom_Stage1_c0_c0_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp7 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage1_c0_c0_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0_c1_c0.xy, uTexDom_Stage1_c0_c0_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp8 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = normalize(uLightLocation_Stage1_c0_c0_c0_c0_c1_c0 - vec3(gl_FragCoord.xy, uSurfaceScale_Stage1_c0_c0_c0_c0_c1_c0 * m[4]));
+ _output = light_Stage1_c0_c0_c0_c0_c1_c0(normal_Stage1_c0_c0_c0_c0_c1_c0(m, uSurfaceScale_Stage1_c0_c0_c0_c0_c1_c0), surfaceToLight, uLightColor_Stage1_c0_c0_c0_c0_c1_c0);
+ _output *= _input;
+ return _output;
+}
+vec4 blend_exclusion(vec4 src, vec4 dst) {
+ return vec4((dst.xyz + src.xyz) - (2.0 * dst.xyz) * src.xyz, src.w + (1.0 - src.w) * dst.w);
+}
+vec4 ComposeTwo_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_exclusion(CircleEffect_Stage1_c0_c0_c0_c0_c0_c0(inputColor), DiffuseLighting_Stage1_c0_c0_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 EllipticalRRect_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 dxy0 = uinnerRect_Stage1_c0_c0_c1_c0.xy - gl_FragCoord.xy;
+ vec2 dxy1 = gl_FragCoord.xy - uinnerRect_Stage1_c0_c0_c1_c0.zw;
+ vec2 dxy = max(max(dxy0, dxy1), 0.0);
+ vec2 Z = max(max(dxy0 * uinvRadiiLTRB_Stage1_c0_c0_c1_c0.xy, dxy1 * uinvRadiiLTRB_Stage1_c0_c0_c1_c0.zw), 0.0);
+ float implicit = dot(Z, dxy) - 1.0;
+ float grad_dot = 4.0 * dot(Z, Z);
+ grad_dot = max(grad_dot, 9.9999997473787516e-05);
+ float approx_dist = implicit * inversesqrt(grad_dot);
+ float alpha = clamp(0.5 - approx_dist, 0.0, 1.0);
+ _output = _input * alpha;
+ return _output;
+}
+vec4 blend_xor(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src + (1.0 - src.w) * dst;
+}
+vec4 ComposeTwo_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_xor(ComposeTwo_Stage1_c0_c0_c0_c0(inputColor), EllipticalRRect_Stage1_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 Morphology_Stage1_c1_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_1_Stage0;
+ coord.y -= 5.0 * uPixelSize_Stage1_c1_c0_c0_c0_c0_c0;
+ for (int i = 0;i < 11; i++) {
+ _output = max(_output, texture(uTextureSampler_1_Stage1, coord));
+ coord.y += uPixelSize_Stage1_c1_c0_c0_c0_c0_c0;
+ }
+ _output *= _input;
+ return _output;
+}
+vec4 CircularRRect_Stage1_c1_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 dxy0 = uinnerRect_Stage1_c1_c0_c0_c0_c1_c0.xy - gl_FragCoord.xy;
+ vec2 dxy1 = gl_FragCoord.xy - uinnerRect_Stage1_c1_c0_c0_c0_c1_c0.zw;
+ vec2 dxy = max(max(dxy0, dxy1), 0.0);
+ float alpha = clamp(uradiusPlusHalf_Stage1_c1_c0_c0_c0_c1_c0.x - length(dxy), 0.0, 1.0);
+ _output = _input * alpha;
+ return _output;
+}
+vec4 blend_screen(vec4 src, vec4 dst) {
+ return src + (1.0 - src) * dst;
+}
+vec4 ComposeTwo_Stage1_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_screen(Morphology_Stage1_c1_c0_c0_c0_c0_c0(inputColor), CircularRRect_Stage1_c1_c0_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 MagnifierEffect_Stage1_c1_c0_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coord = vTransformedCoords_2_Stage0;
+ vec2 zoom_coord = uoffset_Stage1_c1_c0_c1_c0_c0_c0 + coord * vec2(uxInvZoom_Stage1_c1_c0_c1_c0_c0_c0, uyInvZoom_Stage1_c1_c0_c1_c0_c0_c0);
+ vec2 delta = (coord - uboundsUniform_Stage1_c1_c0_c1_c0_c0_c0.xy) * uboundsUniform_Stage1_c1_c0_c1_c0_c0_c0.zw;
+ delta = min(delta, vec2(1.0, 1.0) - delta);
+ delta *= vec2(uxInvInset_Stage1_c1_c0_c1_c0_c0_c0, uyInvInset_Stage1_c1_c0_c1_c0_c0_c0);
+ float weight = 0.0;
+ if (delta.x < 2.0 && delta.y < 2.0) {
+ delta = vec2(2.0, 2.0) - delta;
+ float dist = length(delta);
+ dist = max(2.0 - dist, 0.0);
+ weight = min(dist * dist, 1.0);
+ } else {
+ vec2 delta_squared = delta * delta;
+ weight = min(min(delta_squared.x, delta_squared.y), 1.0);
+ }
+ _output = texture(uTextureSampler_2_Stage1, mix(coord, zoom_coord, weight));
+ return _output;
+}
+vec4 ConfigConversionEffect_Stage1_c1_c0_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = floor(_input * 255.0 + 0.5) / 255.0;
+ {
+ _output.xyz = _output.w <= 0.0 ? vec3(0.0) : floor((_output.xyz / _output.w) * 255.0 + 0.5) / 255.0;
+ }
+ return _output;
+}
+float _blend_overlay_component(float sc, float sa, float dc, float da) {
+ if (2.0 * dc <= da) {
+ return (2.0 * sc) * dc;
+ }
+ return sa * da - (2.0 * (da - dc)) * (sa - sc);
+}
+vec4 blend_overlay(vec4 src, vec4 dst) {
+ vec4 result = vec4(_blend_overlay_component(src.x, src.w, dst.x, dst.w), _blend_overlay_component(src.y, src.w, dst.y, dst.w), _blend_overlay_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+ result.xyz += dst.xyz * (1.0 - src.w) + src.xyz * (1.0 - dst.w);
+ return result;
+}
+vec4 ComposeTwo_Stage1_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_overlay(MagnifierEffect_Stage1_c1_c0_c1_c0_c0_c0(inputColor), ConfigConversionEffect_Stage1_c1_c0_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 ComposeTwo_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_overlay(ComposeTwo_Stage1_c1_c0_c0_c0(inputColor), ComposeTwo_Stage1_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 blend_dst_out(vec4 src, vec4 dst) {
+ return (1.0 - src.w) * dst;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = uColor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_dst_out(ComposeTwo_Stage1_c0_c0(inputColor), ComposeTwo_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+in vec2 inPosition;
+in vec2 inLocalCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+void main() {
+ vec2 pos2 = (uViewM_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1888.shader_test b/shaders/skia/1888.shader_test
new file mode 100644
index 0000000..7bb5260
--- /dev/null
+++ b/shaders/skia/1888.shader_test
@@ -0,0 +1,56 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 ucircleData_Stage1;
+uniform sampler2D uTextureSampler_0_Stage0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTextureCoords_Stage0;
+flat in int vTexIndex_Stage0;
+noperspective in vec4 vinColor_Stage0;
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ vec4 texColor;
+ {
+ texColor = texture(uTextureSampler_0_Stage0, vTextureCoords_Stage0);
+ }
+ outputCoverage_Stage0 = texColor;
+ }
+ vec4 output_Stage1;
+ {
+ vec2 vec = vec2((gl_FragCoord.x - ucircleData_Stage1.x) * ucircleData_Stage1.w, (gl_FragCoord.y - ucircleData_Stage1.y) * ucircleData_Stage1.w);
+ float dist = length(vec) + (0.5 - ucircleData_Stage1.z) * ucircleData_Stage1.w;
+ output_Stage1 = outputCoverage_Stage0 * texture(uTextureSampler_0_Stage1, vec2(dist, 0.5)).w;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform vec2 uAtlasSizeInv_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in uvec2 inTextureCoords;
+noperspective out vec2 vTextureCoords_Stage0;
+flat out int vTexIndex_Stage0;
+noperspective out vec4 vinColor_Stage0;
+void main() {
+ ivec2 signedCoords = ivec2(int(inTextureCoords.x), int(inTextureCoords.y));
+ vec2 unormTexCoords = vec2(float(signedCoords.x / 2), float(signedCoords.y / 2));
+ vTextureCoords_Stage0 = unormTexCoords * uAtlasSizeInv_Stage0;
+ vTexIndex_Stage0 = 0;
+ vinColor_Stage0 = inColor;
+ gl_Position = vec4(inPosition.x, inPosition.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1891.shader_test b/shaders/skia/1891.shader_test
new file mode 100644
index 0000000..1e995ad
--- /dev/null
+++ b/shaders/skia/1891.shader_test
@@ -0,0 +1,242 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_KHR_blend_equation_advanced : require
+out vec4 sk_FragColor;
+layout (blend_support_all_equations) out ;
+uniform vec2 ubaseFrequency_Stage1;
+uniform float uz_Stage1;
+uniform float uPixelSize_Stage2;
+uniform vec2 uRange_Stage2;
+uniform vec2 uImageIncrement_Stage3;
+uniform vec2 uBounds_Stage3;
+uniform vec4 uKernel_Stage3[3];
+uniform mat4 um_Stage4;
+uniform vec4 uv_Stage4;
+uniform vec2 ubaseFrequency_Stage6;
+uniform float uz_Stage6;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+uniform sampler2D uTextureSampler_0_Stage3;
+uniform sampler2D uTextureSampler_0_Stage6;
+uniform sampler2D uTextureSampler_1_Stage6;
+noperspective in vec3 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+noperspective in vec2 vTransformedCoords_3_Stage0;
+noperspective in vec2 vTransformedCoords_4_Stage0;
+flat in vec4 vcolor_Stage0;
+vec3 fade_Stage1(vec3 t) {
+ return ((t * t) * t) * (t * (t * 6.0 - 15.0) + 10.0);
+}
+float perm_Stage1(float x) {
+ return texture(uTextureSampler_0_Stage1, vec2(fract(x / 256.0), 0.0)).x * 255.0;
+}
+float grad_Stage1(float x, vec3 p) {
+ return dot(texture(uTextureSampler_1_Stage1, vec2(fract(x / 16.0), 0.0)).xyz * 255.0 - vec3(1.0), p);
+}
+float lerp_Stage1(float a, float b, float w) {
+ return a + w * (b - a);
+}
+float noise_Stage1(vec3 p) {
+ vec3 P = mod(floor(p), 256.0);
+ p -= floor(p);
+ vec3 f = fade_Stage1(p);
+ float A = perm_Stage1(P.x) + P.y;
+ float AA = perm_Stage1(A) + P.z;
+ float AB = perm_Stage1(A + 1.0) + P.z;
+ float B = perm_Stage1(P.x + 1.0) + P.y;
+ float BA = perm_Stage1(B) + P.z;
+ float BB = perm_Stage1(B + 1.0) + P.z;
+ float result = lerp_Stage1(lerp_Stage1(lerp_Stage1(grad_Stage1(perm_Stage1(AA), p), grad_Stage1(perm_Stage1(BA), p + vec3(-1.0, 0.0, 0.0)), f.x), lerp_Stage1(grad_Stage1(perm_Stage1(AB), p + vec3(0.0, -1.0, 0.0)), grad_Stage1(perm_Stage1(BB), p + vec3(-1.0, -1.0, 0.0)), f.x), f.y), lerp_Stage1(lerp_Stage1(grad_Stage1(perm_Stage1(AA + 1.0), p + vec3(0.0, 0.0, -1.0)), grad_Stage1(perm_Stage1(BA + 1.0), p + vec3(-1.0, 0.0, -1.0)), f.x), lerp_Stage1(grad_Stage1(perm_Stage1(AB + 1.0), p + vec3(0.0, -1.0, -1.0)), grad_Stage1(perm_Stage1(BB + 1.0), p + vec3(-1.0, -1.0, -1.0)), f.x), f.y), f.z);
+ return result;
+}
+float noiseOctaves_Stage1(vec3 p) {
+ float result = 0.0;
+ float ratio = 1.0;
+ for (float i = 0.0;i < 9.0; i++) {
+ result += noise_Stage1(p) / ratio;
+ p *= 2.0;
+ ratio *= 2.0;
+ }
+ return (result + 1.0) / 2.0;
+}
+vec3 fade_Stage6(vec3 t) {
+ return ((t * t) * t) * (t * (t * 6.0 - 15.0) + 10.0);
+}
+float perm_Stage6(float x) {
+ return texture(uTextureSampler_0_Stage6, vec2(fract(x / 256.0), 0.0)).x * 255.0;
+}
+float grad_Stage6(float x, vec3 p) {
+ return dot(texture(uTextureSampler_1_Stage6, vec2(fract(x / 16.0), 0.0)).xyz * 255.0 - vec3(1.0), p);
+}
+float lerp_Stage6(float a, float b, float w) {
+ return a + w * (b - a);
+}
+float noise_Stage6(vec3 p) {
+ vec3 P = mod(floor(p), 256.0);
+ p -= floor(p);
+ vec3 f = fade_Stage6(p);
+ float A = perm_Stage6(P.x) + P.y;
+ float AA = perm_Stage6(A) + P.z;
+ float AB = perm_Stage6(A + 1.0) + P.z;
+ float B = perm_Stage6(P.x + 1.0) + P.y;
+ float BA = perm_Stage6(B) + P.z;
+ float BB = perm_Stage6(B + 1.0) + P.z;
+ float result = lerp_Stage6(lerp_Stage6(lerp_Stage6(grad_Stage6(perm_Stage6(AA), p), grad_Stage6(perm_Stage6(BA), p + vec3(-1.0, 0.0, 0.0)), f.x), lerp_Stage6(grad_Stage6(perm_Stage6(AB), p + vec3(0.0, -1.0, 0.0)), grad_Stage6(perm_Stage6(BB), p + vec3(-1.0, -1.0, 0.0)), f.x), f.y), lerp_Stage6(lerp_Stage6(grad_Stage6(perm_Stage6(AA + 1.0), p + vec3(0.0, 0.0, -1.0)), grad_Stage6(perm_Stage6(BA + 1.0), p + vec3(-1.0, 0.0, -1.0)), f.x), lerp_Stage6(grad_Stage6(perm_Stage6(AB + 1.0), p + vec3(0.0, -1.0, -1.0)), grad_Stage6(perm_Stage6(BB + 1.0), p + vec3(-1.0, -1.0, -1.0)), f.x), f.y), f.z);
+ return result;
+}
+float noiseOctaves_Stage6(vec3 p) {
+ float result = 0.0;
+ float ratio = 1.0;
+ for (float i = 0.0;i < 2.0; i++) {
+ result += noise_Stage6(p) / ratio;
+ p *= 2.0;
+ ratio *= 2.0;
+ }
+ return (result + 1.0) / 2.0;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec2 vTransformedCoords_0_Stage0_ensure2D = vTransformedCoords_0_Stage0.xy / vTransformedCoords_0_Stage0.z;
+ vec2 coords = vTransformedCoords_0_Stage0_ensure2D * ubaseFrequency_Stage1;
+ float r = noiseOctaves_Stage1(vec3(coords, uz_Stage1));
+ float g = noiseOctaves_Stage1(vec3(coords, uz_Stage1));
+ float b = noiseOctaves_Stage1(vec3(coords, uz_Stage1));
+ float a = noiseOctaves_Stage1(vec3(coords, uz_Stage1));
+ output_Stage1 = vec4(r, g, b, a);
+ output_Stage1 = clamp(output_Stage1, 0.0, 1.0);
+ output_Stage1 = vec4(output_Stage1.xyz * output_Stage1.www, output_Stage1.w);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = vec4(1.0, 1.0, 1.0, 1.0);
+ vec2 coord = vTransformedCoords_1_Stage0;
+ coord.x -= 2.0 * uPixelSize_Stage2;
+ for (int i = 0;i < 5; i++) {
+ output_Stage2 = min(output_Stage2, texture(uTextureSampler_0_Stage2, coord));
+ coord.x += uPixelSize_Stage2;
+ }
+ output_Stage2 *= output_Stage1;
+ }
+ vec4 output_Stage3;
+ {
+ output_Stage3 = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_2_Stage0 - 4.0 * uImageIncrement_Stage3;
+ vec2 coordSampled = vec2(0.0, 0.0);
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage3.x, uBounds_Stage3.y - uBounds_Stage3.x) + uBounds_Stage3.x;
+ output_Stage3 += texture(uTextureSampler_0_Stage3, coordSampled) * uKernel_Stage3[0].x;
+ coord += uImageIncrement_Stage3;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage3.x, uBounds_Stage3.y - uBounds_Stage3.x) + uBounds_Stage3.x;
+ output_Stage3 += texture(uTextureSampler_0_Stage3, coordSampled) * uKernel_Stage3[0].y;
+ coord += uImageIncrement_Stage3;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage3.x, uBounds_Stage3.y - uBounds_Stage3.x) + uBounds_Stage3.x;
+ output_Stage3 += texture(uTextureSampler_0_Stage3, coordSampled) * uKernel_Stage3[0].z;
+ coord += uImageIncrement_Stage3;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage3.x, uBounds_Stage3.y - uBounds_Stage3.x) + uBounds_Stage3.x;
+ output_Stage3 += texture(uTextureSampler_0_Stage3, coordSampled) * uKernel_Stage3[0].w;
+ coord += uImageIncrement_Stage3;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage3.x, uBounds_Stage3.y - uBounds_Stage3.x) + uBounds_Stage3.x;
+ output_Stage3 += texture(uTextureSampler_0_Stage3, coordSampled) * uKernel_Stage3[1].x;
+ coord += uImageIncrement_Stage3;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage3.x, uBounds_Stage3.y - uBounds_Stage3.x) + uBounds_Stage3.x;
+ output_Stage3 += texture(uTextureSampler_0_Stage3, coordSampled) * uKernel_Stage3[1].y;
+ coord += uImageIncrement_Stage3;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage3.x, uBounds_Stage3.y - uBounds_Stage3.x) + uBounds_Stage3.x;
+ output_Stage3 += texture(uTextureSampler_0_Stage3, coordSampled) * uKernel_Stage3[1].z;
+ coord += uImageIncrement_Stage3;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage3.x, uBounds_Stage3.y - uBounds_Stage3.x) + uBounds_Stage3.x;
+ output_Stage3 += texture(uTextureSampler_0_Stage3, coordSampled) * uKernel_Stage3[1].w;
+ coord += uImageIncrement_Stage3;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage3.x, uBounds_Stage3.y - uBounds_Stage3.x) + uBounds_Stage3.x;
+ output_Stage3 += texture(uTextureSampler_0_Stage3, coordSampled) * uKernel_Stage3[2].x;
+ coord += uImageIncrement_Stage3;
+ output_Stage3 *= output_Stage2;
+ }
+ vec4 output_Stage4;
+ {
+ vec4 inputColor = output_Stage3;
+ {
+ float nonZeroAlpha = max(inputColor.w, 9.9999997473787516e-05);
+ inputColor = vec4(inputColor.xyz / nonZeroAlpha, inputColor.w);
+ }
+ output_Stage4 = um_Stage4 * inputColor + uv_Stage4;
+ {
+ output_Stage4 = clamp(output_Stage4, 0.0, 1.0);
+ }
+ }
+ vec4 output_Stage5;
+ {
+ output_Stage5 = output_Stage4;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_3_Stage0.x);
+ uint y = uint(vTransformedCoords_3_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ output_Stage5 = vec4(clamp(output_Stage5.xyz + value * 0.0039215688593685627, 0.0, output_Stage5.w), output_Stage5.w);
+ }
+ vec4 output_Stage6;
+ {
+ vec2 coords = vTransformedCoords_4_Stage0 * ubaseFrequency_Stage6;
+ float r = noiseOctaves_Stage6(vec3(coords, uz_Stage6));
+ float g = noiseOctaves_Stage6(vec3(coords, uz_Stage6));
+ float b = noiseOctaves_Stage6(vec3(coords, uz_Stage6));
+ float a = noiseOctaves_Stage6(vec3(coords, uz_Stage6));
+ output_Stage6 = vec4(r, g, b, a);
+ output_Stage6 = clamp(output_Stage6, 0.0, 1.0);
+ output_Stage6 = vec4(output_Stage6.xyz * output_Stage6.www, output_Stage6.w);
+ }
+ {
+ sk_FragColor = output_Stage6 * outputColor_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+uniform mat3 uCoordTransformMatrix_3_Stage0;
+uniform mat3 uCoordTransformMatrix_4_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec3 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+noperspective out vec2 vTransformedCoords_3_Stage0;
+noperspective out vec2 vTransformedCoords_4_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0);
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_3_Stage0 = (uCoordTransformMatrix_3_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_4_Stage0 = (uCoordTransformMatrix_4_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1894.shader_test b/shaders/skia/1894.shader_test
new file mode 100644
index 0000000..210d1f4
--- /dev/null
+++ b/shaders/skia/1894.shader_test
@@ -0,0 +1,161 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_KHR_blend_equation_advanced : require
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+layout (blend_support_all_equations) out ;
+uniform vec4 ucolor_Stage1_c0_c0;
+uniform vec3 uedges_Stage1_c1_c0_c0_c0[6];
+uniform vec4 urectUniform_Stage1_c1_c0_c1_c0_c0_c0;
+uniform vec4 uinnerRect_Stage1_c1_c0_c1_c0_c1_c0;
+uniform vec4 uinvRadiiLTRB_Stage1_c1_c0_c1_c0_c1_c0;
+noperspective in vec4 vcolor_Stage0;
+noperspective in float vinCoverage_Stage0;
+vec4 ConstColorProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage1_c0_c0;
+ }
+ return _output;
+}
+vec4 ConvexPoly_Stage1_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float alpha = 1.0;
+ float edge;
+ edge = dot(uedges_Stage1_c1_c0_c0_c0[0], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage1_c1_c0_c0_c0[1], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage1_c1_c0_c0_c0[2], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage1_c1_c0_c0_c0[3], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage1_c1_c0_c0_c0[4], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage1_c1_c0_c0_c0[5], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ alpha = 1.0 - alpha;
+ _output = _input * alpha;
+ return _output;
+}
+vec4 AARectEffect_Stage1_c1_c0_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float alpha;
+ {
+ float xSub, ySub;
+ xSub = min(gl_FragCoord.x - urectUniform_Stage1_c1_c0_c1_c0_c0_c0.x, 0.0);
+ xSub += min(urectUniform_Stage1_c1_c0_c1_c0_c0_c0.z - gl_FragCoord.x, 0.0);
+ ySub = min(gl_FragCoord.y - urectUniform_Stage1_c1_c0_c1_c0_c0_c0.y, 0.0);
+ ySub += min(urectUniform_Stage1_c1_c0_c1_c0_c0_c0.w - gl_FragCoord.y, 0.0);
+ alpha = (1.0 + max(xSub, -1.0)) * (1.0 + max(ySub, -1.0));
+ }
+ {
+ alpha = 1.0 - alpha;
+ }
+ _output = _input * alpha;
+ return _output;
+}
+vec4 EllipticalRRect_Stage1_c1_c0_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 dxy0 = uinnerRect_Stage1_c1_c0_c1_c0_c1_c0.xy - gl_FragCoord.xy;
+ vec2 dxy1 = gl_FragCoord.xy - uinnerRect_Stage1_c1_c0_c1_c0_c1_c0.zw;
+ vec2 dxy = max(max(dxy0, dxy1), 0.0);
+ vec2 Z = max(max(dxy0 * uinvRadiiLTRB_Stage1_c1_c0_c1_c0_c1_c0.xy, dxy1 * uinvRadiiLTRB_Stage1_c1_c0_c1_c0_c1_c0.zw), 0.0);
+ float implicit = dot(Z, dxy) - 1.0;
+ float grad_dot = 4.0 * dot(Z, Z);
+ grad_dot = max(grad_dot, 9.9999997473787516e-05);
+ float approx_dist = implicit * inversesqrt(grad_dot);
+ float alpha = clamp(0.5 - approx_dist, 0.0, 1.0);
+ _output = _input * alpha;
+ return _output;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 ComposeTwo_Stage1_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_src_over(AARectEffect_Stage1_c1_c0_c1_c0_c0_c0(inputColor), EllipticalRRect_Stage1_c1_c0_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+float _guarded_divide(float n, float d) {
+ return n / d;
+}
+float _soft_light_component(float sc, float sa, float dc, float da) {
+ if (2.0 * sc <= sa) {
+ return (_guarded_divide((dc * dc) * (sa - 2.0 * sc), da) + (1.0 - da) * sc) + dc * ((-sa + 2.0 * sc) + 1.0);
+ } else if (4.0 * dc <= da) {
+ float DSqd = dc * dc;
+ float DCub = DSqd * dc;
+ float DaSqd = da * da;
+ float DaCub = DaSqd * da;
+ return _guarded_divide(((DaSqd * (sc - dc * ((3.0 * sa - 6.0 * sc) - 1.0)) + ((12.0 * da) * DSqd) * (sa - 2.0 * sc)) - (16.0 * DCub) * (sa - 2.0 * sc)) - DaCub * sc, DaSqd);
+ }
+ return ((dc * ((sa - 2.0 * sc) + 1.0) + sc) - sqrt(da * dc) * (sa - 2.0 * sc)) - da * sc;
+}
+vec4 blend_soft_light(vec4 src, vec4 dst) {
+ if (dst.w == 0.0) {
+ return src;
+ }
+ return vec4(_soft_light_component(src.x, src.w, dst.x, dst.w), _soft_light_component(src.y, src.w, dst.y, dst.w), _soft_light_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+}
+vec4 ComposeTwo_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_soft_light(ConvexPoly_Stage1_c1_c0_c0_c0(inputColor), ComposeTwo_Stage1_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 blend_dst_over(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src + dst;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ float alpha = 1.0;
+ alpha = vinCoverage_Stage0;
+ outputCoverage_Stage0 = vec4(alpha);
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_dst_over(ConstColorProcessor_Stage1_c0_c0(inputColor), ComposeTwo_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ sk_FragColor = outputCoverage_Stage0 * output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 inPosition;
+in vec4 inColor;
+in float inCoverage;
+noperspective out vec4 vcolor_Stage0;
+noperspective out float vinCoverage_Stage0;
+void main() {
+ vec4 color = inColor;
+ vcolor_Stage0 = color;
+ vec2 pos2 = inPosition;
+ vinCoverage_Stage0 = inCoverage;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1897.shader_test b/shaders/skia/1897.shader_test
new file mode 100644
index 0000000..47b39c0
--- /dev/null
+++ b/shaders/skia/1897.shader_test
@@ -0,0 +1,120 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_KHR_blend_equation_advanced : require
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+layout (blend_support_all_equations) out ;
+uniform vec4 uCoordTransformMatrix_1_Stage0;
+uniform vec2 uScale_Stage3;
+uniform vec4 uTexDom_Stage3;
+uniform vec3 uDecalParams_Stage3;
+uniform sampler2D uTextureSampler_0_Stage2;
+uniform sampler2D uTextureSampler_0_Stage3;
+uniform sampler2D uTextureSampler_1_Stage3;
+noperspective in vec4 vinCircleEdge_Stage0;
+noperspective in vec4 vinColor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+noperspective in vec2 vTransformedCoords_3_Stage0;
+vec4 ConfigConversionEffect_Stage1_c0_c0(vec4 _input, vec2 _coords) {
+ vec4 _output;
+ _output = floor(_input * 255.0 + 0.5) / 255.0;
+ {
+ _output.xyz = _output.w <= 0.0 ? vec3(0.0) : floor((_output.xyz / _output.w) * 255.0 + 0.5) / 255.0;
+ }
+ return _output;
+}
+vec4 TextureEffect_Stage2_c1_c0(vec4 _input, vec2 _coords) {
+ _coords = _coords * uCoordTransformMatrix_1_Stage0.xz + uCoordTransformMatrix_1_Stage0.yw;
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage2, _coords) * _input;
+ return _output;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ vec4 circleEdge;
+ circleEdge = vinCircleEdge_Stage0;
+ outputColor_Stage0 = vinColor_Stage0;
+ float d = length(circleEdge.xy);
+ float distanceToOuterEdge = circleEdge.z * (1.0 - d);
+ float edgeAlpha = clamp(distanceToOuterEdge, 0.0, 1.0);
+ float distanceToInnerEdge = circleEdge.z * (d - circleEdge.w);
+ float innerAlpha = clamp(distanceToInnerEdge, 0.0, 1.0);
+ edgeAlpha *= innerAlpha;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ConfigConversionEffect_Stage1_c0_c0(outputColor_Stage0, gl_FragCoord.xy);
+ }
+ vec4 output_Stage2;
+ {
+ float coord = vTransformedCoords_0_Stage0.y - 0.5;
+ float f = fract(coord);
+ coord += 0.5 - f;
+ float f2 = f * f;
+ vec4 w = mat4(0.055555555555555552, 0.88888888888888884, 0.055555555555555552, 0.0, -0.5, 0.0, 0.5, 0.0, 0.83333333333333337, -2.0, 1.5, -0.33333333333333331, -0.3888888888888889, 1.1666666666666667, -1.1666666666666667, 0.3888888888888889) * vec4(1.0, f, f2, f2 * f);
+ vec4 c[4];
+ c[0] = TextureEffect_Stage2_c1_c0(vec4(1.0), vec2(vTransformedCoords_0_Stage0.x, coord + -1.0));
+ c[1] = TextureEffect_Stage2_c1_c0(vec4(1.0), vec2(vTransformedCoords_0_Stage0.x, coord));
+ c[2] = TextureEffect_Stage2_c1_c0(vec4(1.0), vec2(vTransformedCoords_0_Stage0.x, coord + 1.0));
+ c[3] = TextureEffect_Stage2_c1_c0(vec4(1.0), vec2(vTransformedCoords_0_Stage0.x, coord + 2.0));
+ vec4 bicubicColor = ((c[0] * w.x + c[1] * w.y) + c[2] * w.z) + c[3] * w.w;
+ bicubicColor.xyz = max(vec3(0.0), min(bicubicColor.xyz, bicubicColor.www));
+ output_Stage2 = bicubicColor * output_Stage1;
+ }
+ vec4 output_Stage3;
+ {
+ vec4 dColor = texture(uTextureSampler_0_Stage3, vTransformedCoords_2_Stage0);
+ dColor.xyz = dColor.w < 9.9999999747524271e-07 ? vec3(0.0) : clamp(dColor.xyz / dColor.w, 0.0, 1.0);
+ vec2 cCoords = vTransformedCoords_3_Stage0 + uScale_Stage3 * (dColor.zz - vec2(0.5));
+ {
+ vec2 origCoord = cCoords;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage3.xy, uTexDom_Stage3.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage3, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage3.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage3.y);
+ if (err > uDecalParams_Stage3.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage3.z < 1.0) {
+ err = 0.0;
+ }
+ output_Stage3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ }
+ {
+ sk_FragColor = output_Stage3 * output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+uniform mat3 uCoordTransformMatrix_3_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec4 inCircleEdge;
+noperspective out vec4 vinCircleEdge_Stage0;
+noperspective out vec4 vinColor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+noperspective out vec2 vTransformedCoords_3_Stage0;
+void main() {
+ vinCircleEdge_Stage0 = inCircleEdge;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_3_Stage0 = (uCoordTransformMatrix_3_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/19-1.shader_test b/shaders/skia/19-1.shader_test
new file mode 100644
index 0000000..9a64d08
--- /dev/null
+++ b/shaders/skia/19-1.shader_test
@@ -0,0 +1,117 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uborder_Stage1_c0_c0;
+uniform vec4 usubset_Stage1_c0_c0;
+uniform vec4 uclamp_Stage1_c0_c0;
+uniform vec4 unorm_Stage1_c0_c0;
+uniform vec4 uborder_Stage1_c1_c0;
+uniform vec4 usubset_Stage1_c1_c0;
+uniform vec4 uclamp_Stage1_c1_c0;
+uniform vec4 unorm_Stage1_c1_c0;
+uniform vec4 uborder_Stage1_c2_c0;
+uniform vec4 usubset_Stage1_c2_c0;
+uniform vec4 uclamp_Stage1_c2_c0;
+uniform vec4 unorm_Stage1_c2_c0;
+uniform mat3 ucolorSpaceMatrix_Stage1;
+uniform vec3 ucolorSpaceTranslate_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+uniform sampler2D uTextureSampler_2_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+vec4 TextureEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 inCoord = vTransformedCoords_0_Stage0;
+ inCoord *= unorm_Stage1_c0_c0.xy;
+ vec2 subsetCoord;
+ subsetCoord.x = inCoord.x;
+ subsetCoord.y = inCoord.y;
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage1_c0_c0.x, uclamp_Stage1_c0_c0.z);
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage1_c0_c0.y, uclamp_Stage1_c0_c0.w);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord * unorm_Stage1_c0_c0.zw);
+ float errX = subsetCoord.x - clampedCoord.x;
+ float errY = subsetCoord.y - clampedCoord.y;
+ textureColor = mix(textureColor, uborder_Stage1_c0_c0, min(abs(errX), 1.0));
+ textureColor = mix(textureColor, uborder_Stage1_c0_c0, min(abs(errY), 1.0));
+ _output = _input * textureColor;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 inCoord = vTransformedCoords_1_Stage0;
+ inCoord *= unorm_Stage1_c1_c0.xy;
+ vec2 subsetCoord;
+ subsetCoord.x = inCoord.x;
+ subsetCoord.y = inCoord.y;
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage1_c1_c0.x, uclamp_Stage1_c1_c0.z);
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage1_c1_c0.y, uclamp_Stage1_c1_c0.w);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord * unorm_Stage1_c1_c0.zw);
+ float errX = subsetCoord.x - clampedCoord.x;
+ float errY = subsetCoord.y - clampedCoord.y;
+ textureColor = mix(textureColor, uborder_Stage1_c1_c0, min(abs(errX), 1.0));
+ textureColor = mix(textureColor, uborder_Stage1_c1_c0, min(abs(errY), 1.0));
+ _output = _input * textureColor;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c2_c0(vec4 _input) {
+ vec4 _output;
+ vec2 inCoord = vTransformedCoords_2_Stage0;
+ inCoord *= unorm_Stage1_c2_c0.xy;
+ vec2 subsetCoord;
+ subsetCoord.x = inCoord.x;
+ subsetCoord.y = inCoord.y;
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage1_c2_c0.x, uclamp_Stage1_c2_c0.z);
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage1_c2_c0.y, uclamp_Stage1_c2_c0.w);
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord * unorm_Stage1_c2_c0.zw);
+ float errX = subsetCoord.x - clampedCoord.x;
+ float errY = subsetCoord.y - clampedCoord.y;
+ textureColor = mix(textureColor, uborder_Stage1_c2_c0, min(abs(errX), 1.0));
+ textureColor = mix(textureColor, uborder_Stage1_c2_c0, min(abs(errY), 1.0));
+ _output = _input * textureColor;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ vec4 planes[3];
+ planes[0] = TextureEffect_Stage1_c0_c0(vec4(1.0));
+ planes[1] = TextureEffect_Stage1_c1_c0(vec4(1.0));
+ planes[2] = TextureEffect_Stage1_c2_c0(vec4(1.0));
+ vec4 color = vec4(planes[0].x, planes[1].x, planes[2].x, 1.0);
+ color.xyz = clamp(color.xyz * ucolorSpaceMatrix_Stage1 + ucolorSpaceTranslate_Stage1, 0.0, 1.0);
+ output_Stage1 = color;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/19-10.shader_test b/shaders/skia/19-10.shader_test
new file mode 100644
index 0000000..aa37b75
--- /dev/null
+++ b/shaders/skia/19-10.shader_test
@@ -0,0 +1,58 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 ucolor_Stage1;
+uniform vec4 ucolor_Stage2_c0_c0;
+noperspective in vec4 vcolor_Stage0;
+vec4 ConstColorProcessor_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c0_c0;
+ }
+ return _output;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 blend_darken(vec4 src, vec4 dst) {
+ vec4 result = blend_src_over(src, dst);
+ result.xyz = min(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
+ return result;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ {
+ output_Stage1 = ucolor_Stage1;
+ }
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_darken(ConstColorProcessor_Stage2_c0_c0(vec4(1.0)), output_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 position;
+in vec4 inColor;
+noperspective out vec4 vcolor_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = position;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/19-100.shader_test b/shaders/skia/19-100.shader_test
new file mode 100644
index 0000000..50a5ee6
--- /dev/null
+++ b/shaders/skia/19-100.shader_test
@@ -0,0 +1,89 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_0_Stage0;
+ float t = -1.0;
+ {
+ {
+ float r0 = ufocalParams_Stage1_c0_c0_c0_c0.x;
+ {
+ t = -length(p) - r0;
+ }
+ }
+ }
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else {
+ {
+ t.x = fract(t.x);
+ }
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TiledGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_1_Stage0.x);
+ uint y = uint(vTransformedCoords_1_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ output_Stage2 = vec4(clamp(output_Stage2.xyz + value * 0.0039215688593685627, 0.0, output_Stage2.w), output_Stage2.w);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/19-101.shader_test b/shaders/skia/19-101.shader_test
new file mode 100644
index 0000000..95b1cbb
--- /dev/null
+++ b/shaders/skia/19-101.shader_test
@@ -0,0 +1,127 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_0_Stage0;
+ float t = -1.0;
+ float v = 1.0;
+ {
+ {
+ float fx = ufocalParams_Stage1_c0_c0_c0_c0.y;
+ float x_t = -1.0;
+ {
+ x_t = dot(p, p) / p.x;
+ }
+ {
+ if (x_t <= 0.0) {
+ v = -1.0;
+ }
+ }
+ {
+ {
+ t = x_t + fx;
+ }
+ }
+ }
+ }
+ _output = vec4(t, v, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_1_Stage0.x);
+ uint y = uint(vTransformedCoords_1_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ output_Stage2 = vec4(clamp(output_Stage2.xyz + value * 0.0039215688593685627, 0.0, output_Stage2.w), output_Stage2.w);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/19-103.shader_test b/shaders/skia/19-103.shader_test
new file mode 100644
index 0000000..bd7c86d
--- /dev/null
+++ b/shaders/skia/19-103.shader_test
@@ -0,0 +1,92 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_0_Stage0;
+ float t = -1.0;
+ {
+ {
+ float r0 = ufocalParams_Stage1_c0_c0_c0_c0.x;
+ {
+ t = -length(p) - r0;
+ }
+ }
+ }
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_1_Stage0.x);
+ uint y = uint(vTransformedCoords_1_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ output_Stage2 = vec4(clamp(output_Stage2.xyz + value * 0.0039215688593685627, 0.0, output_Stage2.w), output_Stage2.w);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/19-105.shader_test b/shaders/skia/19-105.shader_test
new file mode 100644
index 0000000..23d4428
--- /dev/null
+++ b/shaders/skia/19-105.shader_test
@@ -0,0 +1,109 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+in float vcoverage_Stage0;
+flat in vec4 vgeomDomain_Stage0;
+vec4 RadialGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = length(vTransformedCoords_0_Stage0);
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = RadialGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ float coverage = vcoverage_Stage0 * gl_FragCoord.w;
+ vec4 geoDomain;
+ geoDomain = vgeomDomain_Stage0;
+ if (coverage < 0.5) {
+ vec4 dists4 = clamp(vec4(1.0, 1.0, -1.0, -1.0) * (gl_FragCoord.xyxy - geoDomain), 0.0, 1.0);
+ vec2 dists2 = dists4.xy * dists4.zw;
+ coverage = min(coverage, dists2.x * dists2.y);
+ }
+ outputCoverage_Stage0 = vec4(coverage);
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1 * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec4 positionWithCoverage;
+in vec4 color;
+in vec2 localCoord;
+in vec4 geomDomain;
+out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+out float vcoverage_Stage0;
+flat out vec4 vgeomDomain_Stage0;
+void main() {
+ vec3 position = positionWithCoverage.xyz;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ vcoverage_Stage0 = positionWithCoverage.w * positionWithCoverage.z;
+ vgeomDomain_Stage0 = geomDomain;
+ gl_Position = vec4(position.x, position.y, 0.0, position.z);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/19-106.shader_test b/shaders/skia/19-106.shader_test
new file mode 100644
index 0000000..8ffe2c3
--- /dev/null
+++ b/shaders/skia/19-106.shader_test
@@ -0,0 +1,125 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+in vec2 vTransformedCoords_0_Stage0;
+in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+in float vcoverage_Stage0;
+flat in vec4 vgeomDomain_Stage0;
+vec4 RadialGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = length(vTransformedCoords_0_Stage0);
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = RadialGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ float coverage = vcoverage_Stage0 * gl_FragCoord.w;
+ vec4 geoDomain;
+ geoDomain = vgeomDomain_Stage0;
+ if (coverage < 0.5) {
+ vec4 dists4 = clamp(vec4(1.0, 1.0, -1.0, -1.0) * (gl_FragCoord.xyxy - geoDomain), 0.0, 1.0);
+ vec2 dists2 = dists4.xy * dists4.zw;
+ coverage = min(coverage, dists2.x * dists2.y);
+ }
+ outputCoverage_Stage0 = vec4(coverage);
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_1_Stage0.x);
+ uint y = uint(vTransformedCoords_1_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ output_Stage2 = vec4(clamp(output_Stage2.xyz + value * 0.0039215688593685627, 0.0, output_Stage2.w), output_Stage2.w);
+ }
+ {
+ sk_FragColor = output_Stage2 * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec4 positionWithCoverage;
+in vec4 color;
+in vec2 localCoord;
+in vec4 geomDomain;
+out vec2 vTransformedCoords_0_Stage0;
+out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+out float vcoverage_Stage0;
+flat out vec4 vgeomDomain_Stage0;
+void main() {
+ vec3 position = positionWithCoverage.xyz;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ vcoverage_Stage0 = positionWithCoverage.w * positionWithCoverage.z;
+ vgeomDomain_Stage0 = geomDomain;
+ gl_Position = vec4(position.x, position.y, 0.0, position.z);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/19-107.shader_test b/shaders/skia/19-107.shader_test
new file mode 100644
index 0000000..5f450de
--- /dev/null
+++ b/shaders/skia/19-107.shader_test
@@ -0,0 +1,88 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+noperspective in vec3 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 RadialGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 vTransformedCoords_0_Stage0_ensure2D = vTransformedCoords_0_Stage0.xy / vTransformedCoords_0_Stage0.z;
+ float t = length(vTransformedCoords_0_Stage0_ensure2D);
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = RadialGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec3 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0);
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/19-108.shader_test b/shaders/skia/19-108.shader_test
new file mode 100644
index 0000000..4ea4fde
--- /dev/null
+++ b/shaders/skia/19-108.shader_test
@@ -0,0 +1,104 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+noperspective in vec3 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 RadialGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 vTransformedCoords_0_Stage0_ensure2D = vTransformedCoords_0_Stage0.xy / vTransformedCoords_0_Stage0.z;
+ float t = length(vTransformedCoords_0_Stage0_ensure2D);
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = RadialGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_1_Stage0.x);
+ uint y = uint(vTransformedCoords_1_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ output_Stage2 = vec4(clamp(output_Stage2.xyz + value * 0.0039215688593685627, 0.0, output_Stage2.w), output_Stage2.w);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec3 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0);
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/19-114.shader_test b/shaders/skia/19-114.shader_test
new file mode 100644
index 0000000..50025a9
--- /dev/null
+++ b/shaders/skia/19-114.shader_test
@@ -0,0 +1,37 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_KHR_blend_equation_advanced : require
+out vec4 sk_FragColor;
+layout (blend_support_all_equations) out ;
+noperspective in vec4 vcolor_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ {
+ sk_FragColor = outputColor_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform vec4 uColor_Stage0;
+in vec2 inPosition;
+in float inCoverage;
+noperspective out vec4 vcolor_Stage0;
+void main() {
+ vec4 color = uColor_Stage0;
+ color = color * inCoverage;
+ vcolor_Stage0 = color;
+ vec2 pos2 = inPosition;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/19-115.shader_test b/shaders/skia/19-115.shader_test
new file mode 100644
index 0000000..0b5cf08
--- /dev/null
+++ b/shaders/skia/19-115.shader_test
@@ -0,0 +1,60 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 urectUniform_Stage1;
+uniform vec4 uinnerRect_Stage2;
+uniform vec2 uradiusPlusHalf_Stage2;
+flat in vec4 vcolor_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ float alpha;
+ {
+ float xSub, ySub;
+ xSub = min(gl_FragCoord.x - urectUniform_Stage1.x, 0.0);
+ xSub += min(urectUniform_Stage1.z - gl_FragCoord.x, 0.0);
+ ySub = min(gl_FragCoord.y - urectUniform_Stage1.y, 0.0);
+ ySub += min(urectUniform_Stage1.w - gl_FragCoord.y, 0.0);
+ alpha = (1.0 + max(xSub, -1.0)) * (1.0 + max(ySub, -1.0));
+ }
+ {
+ alpha = 1.0 - alpha;
+ }
+ output_Stage1 = vec4(alpha);
+ }
+ vec4 output_Stage2;
+ {
+ vec2 dxy0 = uinnerRect_Stage2.xy - gl_FragCoord.xy;
+ vec2 dxy1 = gl_FragCoord.xy - uinnerRect_Stage2.zw;
+ vec2 dxy = max(max(dxy0, dxy1), 0.0);
+ float alpha = clamp(uradiusPlusHalf_Stage2.x - length(dxy), 0.0, 1.0);
+ output_Stage2 = output_Stage1 * alpha;
+ }
+ {
+ sk_FragColor = outputColor_Stage0 * output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 position;
+in vec4 color;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/19-119.shader_test b/shaders/skia/19-119.shader_test
new file mode 100644
index 0000000..d00189d
--- /dev/null
+++ b/shaders/skia/19-119.shader_test
@@ -0,0 +1,67 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 TextureEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = TextureEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = OverrideInputFragmentProcessor_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 blend_dst_over(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src + dst;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_dst_over(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec2 inLocalCoord;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 color = inColor;
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/19-12.shader_test b/shaders/skia/19-12.shader_test
new file mode 100644
index 0000000..82a5733
--- /dev/null
+++ b/shaders/skia/19-12.shader_test
@@ -0,0 +1,42 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 TextureEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+vec4 color_xform_Stage1(vec4 color) {
+ color.xyz *= color.w;
+ return color;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = color_xform_Stage1(TextureEffect_Stage1_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/19-120.shader_test b/shaders/skia/19-120.shader_test
new file mode 100644
index 0000000..bcd987d
--- /dev/null
+++ b/shaders/skia/19-120.shader_test
@@ -0,0 +1,95 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 ucolor_Stage2;
+uniform vec4 ucolor_Stage3_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 TextureEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+vec4 ComposeOne_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_dst_in(_input, TextureEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0)));
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = ComposeOne_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 ConstColorProcessor_Stage3_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage3_c1_c0;
+ }
+ return _output;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 blend_modulate(vec4 src, vec4 dst) {
+ return src * dst;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_src_over(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ {
+ output_Stage2 = output_Stage1 * ucolor_Stage2;
+ }
+ }
+ vec4 output_Stage3;
+ {
+ output_Stage3 = blend_modulate(ConstColorProcessor_Stage3_c1_c0(vec4(1.0)), output_Stage2);
+ }
+ {
+ sk_FragColor = output_Stage3;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec2 inLocalCoord;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 color = inColor;
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/19-125.shader_test b/shaders/skia/19-125.shader_test
new file mode 100644
index 0000000..5ad472b
--- /dev/null
+++ b/shaders/skia/19-125.shader_test
@@ -0,0 +1,66 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec3 uedges_Stage1[8];
+flat in vec4 vcolor_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ float alpha = 1.0;
+ float edge;
+ edge = dot(uedges_Stage1[0], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage1[1], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage1[2], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage1[3], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage1[4], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage1[5], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage1[6], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage1[7], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ output_Stage1 = vec4(alpha);
+ }
+ {
+ sk_FragColor = outputColor_Stage0 * output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 inPosition;
+in vec2 inLocalCoords;
+in vec4 color;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vcolor_Stage0 = color;
+ vec2 pos2 = inPosition;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/19-126.shader_test b/shaders/skia/19-126.shader_test
new file mode 100644
index 0000000..0219f2c
--- /dev/null
+++ b/shaders/skia/19-126.shader_test
@@ -0,0 +1,62 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec3 uedges_Stage1[6];
+uniform sampler2D uTextureSampler_0_Stage0;
+noperspective in vec2 vlocalCoord_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vec4(1.0);
+ vec2 texCoord;
+ texCoord = vlocalCoord_Stage0;
+ outputColor_Stage0 = texture(uTextureSampler_0_Stage0, texCoord);
+ }
+ vec4 output_Stage1;
+ {
+ float alpha = 1.0;
+ float edge;
+ edge = dot(uedges_Stage1[0], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage1[1], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage1[2], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage1[3], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage1[4], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage1[5], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ output_Stage1 = vec4(alpha);
+ }
+ {
+ sk_FragColor = outputColor_Stage0 * output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vlocalCoord_Stage0;
+void main() {
+ vlocalCoord_Stage0 = localCoord;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/19-128.shader_test b/shaders/skia/19-128.shader_test
new file mode 100644
index 0000000..8c5ff5c
--- /dev/null
+++ b/shaders/skia/19-128.shader_test
@@ -0,0 +1,88 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 ustart_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c0_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+in vec2 vTransformedCoords_0_Stage0;
+in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c0_c0_c1_c0;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+vec4 ComposeOne_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_dst_in(_input, TiledGradientEffect_Stage1_c0_c0_c0_c0(vec4(1.0)));
+ return _output;
+}
+vec4 TextureEffect_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_1_Stage0) * _input;
+ return _output;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TextureEffect_Stage1_c1_c0(ComposeOne_Stage1_c0_c0(outputColor_Stage0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec3 position;
+in vec4 color;
+in vec2 localCoord;
+out vec2 vTransformedCoords_0_Stage0;
+out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, position.z);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/19-129.shader_test b/shaders/skia/19-129.shader_test
new file mode 100644
index 0000000..8fc8582
--- /dev/null
+++ b/shaders/skia/19-129.shader_test
@@ -0,0 +1,121 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 uleftBorderColor_Stage1_c1_c0_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c1_c0_c0_c0;
+uniform vec4 ustart_Stage1_c1_c0_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c1_c0_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = ClampedGradientEffect_Stage1_c0_c0_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ return _output;
+}
+vec4 LinearGradientLayout_Stage1_c1_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_1_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c1_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c1_c0_c0_c0_c1_c0 + t * uend_Stage1_c1_c0_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c1_c0_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c1_c0_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c1_c0_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c1_c0_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = ClampedGradientEffect_Stage1_c1_c0_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ return _output;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_src_over(OverrideInputFragmentProcessor_Stage1_c0_c0(inputColor), OverrideInputFragmentProcessor_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/19-134.shader_test b/shaders/skia/19-134.shader_test
new file mode 100644
index 0000000..cf670ed
--- /dev/null
+++ b/shaders/skia/19-134.shader_test
@@ -0,0 +1,73 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uCoordTransformMatrix_0_Stage0;
+uniform vec4 uinnerRect_Stage2_c1_c0;
+uniform vec2 uradiusPlusHalf_Stage2_c1_c0;
+uniform vec4 uinnerRect_Stage2_c2_c0;
+uniform vec2 uradiusPlusHalf_Stage2_c2_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0(vec4 _input, vec2 _coords) {
+ _coords = _coords * uCoordTransformMatrix_0_Stage0.xz + uCoordTransformMatrix_0_Stage0.yw;
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, _coords) * _input;
+ return _output;
+}
+vec4 CircularRRect_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 dxy0 = uinnerRect_Stage2_c1_c0.xy - gl_FragCoord.xy;
+ vec2 dxy1 = gl_FragCoord.xy - uinnerRect_Stage2_c1_c0.zw;
+ vec2 dxy = max(max(dxy0, dxy1), 0.0);
+ float alpha = clamp(uradiusPlusHalf_Stage2_c1_c0.x - length(dxy), 0.0, 1.0);
+ alpha = 1.0 - alpha;
+ _output = _input * alpha;
+ return _output;
+}
+vec4 CircularRRect_Stage2_c2_c0(vec4 _input) {
+ vec4 _output;
+ vec2 dxy0 = uinnerRect_Stage2_c2_c0.xy - gl_FragCoord.xy;
+ vec2 dxy1 = gl_FragCoord.xy - uinnerRect_Stage2_c2_c0.zw;
+ vec2 dxy = max(max(dxy0, dxy1), 0.0);
+ float alpha = clamp(uradiusPlusHalf_Stage2_c2_c0.x - length(dxy), 0.0, 1.0);
+ alpha = 1.0 - alpha;
+ _output = _input * alpha;
+ return _output;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TextureEffect_Stage1_c0_c0(vec4(1.0), gl_FragCoord.xy);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = CircularRRect_Stage2_c2_c0(CircularRRect_Stage2_c1_c0(output_Stage1));
+ }
+ {
+ sk_FragColor = outputColor_Stage0 * output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 position;
+in vec4 color;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/19-135.shader_test b/shaders/skia/19-135.shader_test
new file mode 100644
index 0000000..461dbc8
--- /dev/null
+++ b/shaders/skia/19-135.shader_test
@@ -0,0 +1,85 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uCoordTransformMatrix_0_Stage0;
+uniform vec4 urectUniform_Stage2_c1_c0;
+uniform vec4 urectUniform_Stage2_c2_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0(vec4 _input, vec2 _coords) {
+ _coords = _coords * uCoordTransformMatrix_0_Stage0.xz + uCoordTransformMatrix_0_Stage0.yw;
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, _coords) * _input;
+ return _output;
+}
+vec4 AARectEffect_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ float alpha;
+ {
+ float xSub, ySub;
+ xSub = min(gl_FragCoord.x - urectUniform_Stage2_c1_c0.x, 0.0);
+ xSub += min(urectUniform_Stage2_c1_c0.z - gl_FragCoord.x, 0.0);
+ ySub = min(gl_FragCoord.y - urectUniform_Stage2_c1_c0.y, 0.0);
+ ySub += min(urectUniform_Stage2_c1_c0.w - gl_FragCoord.y, 0.0);
+ alpha = (1.0 + max(xSub, -1.0)) * (1.0 + max(ySub, -1.0));
+ }
+ {
+ alpha = 1.0 - alpha;
+ }
+ _output = _input * alpha;
+ return _output;
+}
+vec4 AARectEffect_Stage2_c2_c0(vec4 _input) {
+ vec4 _output;
+ float alpha;
+ {
+ float xSub, ySub;
+ xSub = min(gl_FragCoord.x - urectUniform_Stage2_c2_c0.x, 0.0);
+ xSub += min(urectUniform_Stage2_c2_c0.z - gl_FragCoord.x, 0.0);
+ ySub = min(gl_FragCoord.y - urectUniform_Stage2_c2_c0.y, 0.0);
+ ySub += min(urectUniform_Stage2_c2_c0.w - gl_FragCoord.y, 0.0);
+ alpha = (1.0 + max(xSub, -1.0)) * (1.0 + max(ySub, -1.0));
+ }
+ {
+ alpha = 1.0 - alpha;
+ }
+ _output = _input * alpha;
+ return _output;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TextureEffect_Stage1_c0_c0(vec4(1.0), gl_FragCoord.xy);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = AARectEffect_Stage2_c2_c0(AARectEffect_Stage2_c1_c0(output_Stage1));
+ }
+ {
+ sk_FragColor = outputColor_Stage0 * output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 position;
+in vec4 color;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/19-142.shader_test b/shaders/skia/19-142.shader_test
new file mode 100644
index 0000000..2e7f163
--- /dev/null
+++ b/shaders/skia/19-142.shader_test
@@ -0,0 +1,105 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c0_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 RadialGradientLayout_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = length(vTransformedCoords_0_Stage0);
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = RadialGradientLayout_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = ClampedGradientEffect_Stage1_c0_c0_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ return _output;
+}
+vec4 TextureEffect_Stage1_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_1_Stage0) * _input;
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = TextureEffect_Stage1_c1_c0_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ return _output;
+}
+float _guarded_divide(float n, float d) {
+ return n / d;
+}
+float _color_burn_component(float sc, float sa, float dc, float da) {
+ if (da == dc) {
+ return (sa * da + sc * (1.0 - da)) + dc * (1.0 - sa);
+ } else if (sc == 0.0) {
+ return dc * (1.0 - sa);
+ }
+ float d = max(0.0, da - _guarded_divide((da - dc) * sa, sc));
+ return (d * sa + sc * (1.0 - da)) + dc * (1.0 - sa);
+}
+vec4 blend_color_burn(vec4 src, vec4 dst) {
+ return vec4(_color_burn_component(src.x, src.w, dst.x, dst.w), _color_burn_component(src.y, src.w, dst.y, dst.w), _color_burn_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_color_burn(OverrideInputFragmentProcessor_Stage1_c0_c0(inputColor), OverrideInputFragmentProcessor_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/19-149.shader_test b/shaders/skia/19-149.shader_test
new file mode 100644
index 0000000..ee12e90
--- /dev/null
+++ b/shaders/skia/19-149.shader_test
@@ -0,0 +1,115 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_0_Stage0;
+ float t = -1.0;
+ {
+ {
+ float invR1 = ufocalParams_Stage1_c0_c0_c0_c0.x;
+ float fx = ufocalParams_Stage1_c0_c0_c0_c0.y;
+ float x_t = -1.0;
+ {
+ x_t = length(p) - p.x * invR1;
+ }
+ {
+ {
+ t = x_t + fx;
+ }
+ }
+ }
+ }
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = texture(uTextureSampler_0_Stage2, vTransformedCoords_1_Stage0);
+ }
+ {
+ sk_FragColor = output_Stage1 * output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/19-15.shader_test b/shaders/skia/19-15.shader_test
new file mode 100644
index 0000000..7c0ed7f
--- /dev/null
+++ b/shaders/skia/19-15.shader_test
@@ -0,0 +1,66 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uclamp_Stage1_c0_c0;
+uniform vec4 ucolor_Stage2_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 inCoord = vTransformedCoords_0_Stage0;
+ vec2 subsetCoord;
+ subsetCoord.x = inCoord.x;
+ subsetCoord.y = inCoord.y;
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage1_c0_c0.x, uclamp_Stage1_c0_c0.z);
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage1_c0_c0.y, uclamp_Stage1_c0_c0.w);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ _output = _input * textureColor;
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c1_c0;
+ }
+ return _output;
+}
+vec4 blend_src(vec4 src, vec4 dst) {
+ return src;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TextureEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_src(ConstColorProcessor_Stage2_c1_c0(vec4(1.0)), output_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/19-162.shader_test b/shaders/skia/19-162.shader_test
new file mode 100644
index 0000000..8f5fc5b
--- /dev/null
+++ b/shaders/skia/19-162.shader_test
@@ -0,0 +1,122 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform vec2 uBounds_Stage1;
+uniform vec4 uKernel_Stage1[6];
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0 - 10.0 * uImageIncrement_Stage1;
+ vec2 coordSampled = vec2(0.0, 0.0);
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[4].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[4].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[4].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[4].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[5].x;
+ coord += uImageIncrement_Stage1;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/19-166.shader_test b/shaders/skia/19-166.shader_test
new file mode 100644
index 0000000..15662c9
--- /dev/null
+++ b/shaders/skia/19-166.shader_test
@@ -0,0 +1,68 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uCoordTransformMatrix_1_Stage0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 TextureEffect_Stage1_c0_c0(vec4 _input, vec2 _coords) {
+ _coords = _coords * uCoordTransformMatrix_1_Stage0.xz + uCoordTransformMatrix_1_Stage0.yw;
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, _coords) * _input;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ vec2 coord = vTransformedCoords_0_Stage0 - vec2(0.5);
+ vec2 f = fract(coord);
+ coord += 0.5 - f;
+ vec4 wx = mat4(0.055555555555555552, 0.88888888888888884, 0.055555555555555552, 0.0, -0.5, 0.0, 0.5, 0.0, 0.83333333333333337, -2.0, 1.5, -0.33333333333333331, -0.3888888888888889, 1.1666666666666667, -1.1666666666666667, 0.3888888888888889) * vec4(1.0, f.x, f.x * f.x, (f.x * f.x) * f.x);
+ vec4 wy = mat4(0.055555555555555552, 0.88888888888888884, 0.055555555555555552, 0.0, -0.5, 0.0, 0.5, 0.0, 0.83333333333333337, -2.0, 1.5, -0.33333333333333331, -0.3888888888888889, 1.1666666666666667, -1.1666666666666667, 0.3888888888888889) * vec4(1.0, f.y, f.y * f.y, (f.y * f.y) * f.y);
+ vec4 rowColors[4];
+ rowColors[0] = TextureEffect_Stage1_c0_c0(vec4(1.0), coord + vec2(-1.0, -1.0));
+ rowColors[1] = TextureEffect_Stage1_c0_c0(vec4(1.0), coord + vec2(0.0, -1.0));
+ rowColors[2] = TextureEffect_Stage1_c0_c0(vec4(1.0), coord + vec2(1.0, -1.0));
+ rowColors[3] = TextureEffect_Stage1_c0_c0(vec4(1.0), coord + vec2(2.0, -1.0));
+ vec4 s0 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ rowColors[0] = TextureEffect_Stage1_c0_c0(vec4(1.0), coord + vec2(-1.0, 0.0));
+ rowColors[1] = TextureEffect_Stage1_c0_c0(vec4(1.0), coord);
+ rowColors[2] = TextureEffect_Stage1_c0_c0(vec4(1.0), coord + vec2(1.0, 0.0));
+ rowColors[3] = TextureEffect_Stage1_c0_c0(vec4(1.0), coord + vec2(2.0, 0.0));
+ vec4 s1 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ rowColors[0] = TextureEffect_Stage1_c0_c0(vec4(1.0), coord + vec2(-1.0, 1.0));
+ rowColors[1] = TextureEffect_Stage1_c0_c0(vec4(1.0), coord + vec2(0.0, 1.0));
+ rowColors[2] = TextureEffect_Stage1_c0_c0(vec4(1.0), coord + vec2(1.0, 1.0));
+ rowColors[3] = TextureEffect_Stage1_c0_c0(vec4(1.0), coord + vec2(2.0, 1.0));
+ vec4 s2 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ rowColors[0] = TextureEffect_Stage1_c0_c0(vec4(1.0), coord + vec2(-1.0, 2.0));
+ rowColors[1] = TextureEffect_Stage1_c0_c0(vec4(1.0), coord + vec2(0.0, 2.0));
+ rowColors[2] = TextureEffect_Stage1_c0_c0(vec4(1.0), coord + vec2(1.0, 2.0));
+ rowColors[3] = TextureEffect_Stage1_c0_c0(vec4(1.0), coord + vec2(2.0, 2.0));
+ vec4 s3 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ vec4 bicubicColor = ((wy.x * s0 + wy.y * s1) + wy.z * s2) + wy.w * s3;
+ bicubicColor.xyz = max(vec3(0.0), min(bicubicColor.xyz, bicubicColor.www));
+ output_Stage1 = bicubicColor;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/19-169.shader_test b/shaders/skia/19-169.shader_test
new file mode 100644
index 0000000..df102bf
--- /dev/null
+++ b/shaders/skia/19-169.shader_test
@@ -0,0 +1,52 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uCoordTransformMatrix_1_Stage0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 TextureEffect_Stage1_c0_c0(vec4 _input, vec2 _coords) {
+ _coords = _coords * uCoordTransformMatrix_1_Stage0.xz + uCoordTransformMatrix_1_Stage0.yw;
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, _coords) * _input;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ float coord = vTransformedCoords_0_Stage0.x - 0.5;
+ float f = fract(coord);
+ coord += 0.5 - f;
+ float f2 = f * f;
+ vec4 w = mat4(0.055555555555555552, 0.88888888888888884, 0.055555555555555552, 0.0, -0.5, 0.0, 0.5, 0.0, 0.83333333333333337, -2.0, 1.5, -0.33333333333333331, -0.3888888888888889, 1.1666666666666667, -1.1666666666666667, 0.3888888888888889) * vec4(1.0, f, f2, f2 * f);
+ vec4 c[4];
+ c[0] = TextureEffect_Stage1_c0_c0(vec4(1.0), vec2(coord + -1.0, vTransformedCoords_0_Stage0.y));
+ c[1] = TextureEffect_Stage1_c0_c0(vec4(1.0), vec2(coord, vTransformedCoords_0_Stage0.y));
+ c[2] = TextureEffect_Stage1_c0_c0(vec4(1.0), vec2(coord + 1.0, vTransformedCoords_0_Stage0.y));
+ c[3] = TextureEffect_Stage1_c0_c0(vec4(1.0), vec2(coord + 2.0, vTransformedCoords_0_Stage0.y));
+ vec4 bicubicColor = ((c[0] * w.x + c[1] * w.y) + c[2] * w.z) + c[3] * w.w;
+ bicubicColor.xyz = max(vec3(0.0), min(bicubicColor.xyz, bicubicColor.www));
+ output_Stage1 = bicubicColor;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/19-17.shader_test b/shaders/skia/19-17.shader_test
new file mode 100644
index 0000000..80b8874
--- /dev/null
+++ b/shaders/skia/19-17.shader_test
@@ -0,0 +1,67 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec2 uDstTextureUpperLeft_Stage1;
+uniform vec2 uDstTextureCoordScale_Stage1;
+uniform sampler2D uTextureSampler_0_Stage0;
+uniform sampler2D uDstTextureSampler_Stage1;
+noperspective in vec2 vTextureCoords_Stage0;
+flat in int vTexIndex_Stage0;
+noperspective in vec4 vinColor_Stage0;
+vec4 blend_difference(vec4 src, vec4 dst) {
+ return vec4((src.xyz + dst.xyz) - 2.0 * min(src.xyz * dst.w, dst.xyz * src.w), src.w + (1.0 - src.w) * dst.w);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vinColor_Stage0;
+ vec4 texColor;
+ {
+ texColor = texture(uTextureSampler_0_Stage0, vTextureCoords_Stage0);
+ }
+ outputCoverage_Stage0 = texColor;
+ }
+ {
+ if (all(lessThanEqual(outputCoverage_Stage0.xyz, vec3(0.0)))) {
+ discard;
+ }
+ vec2 _dstTexCoord = (gl_FragCoord.xy - uDstTextureUpperLeft_Stage1) * uDstTextureCoordScale_Stage1;
+ _dstTexCoord.y = 1.0 - _dstTexCoord.y;
+ vec4 _dstColor = texture(uDstTextureSampler_Stage1, _dstTexCoord);
+ sk_FragColor = blend_difference(outputColor_Stage0, _dstColor);
+ float lerpRed = mix(_dstColor.w, sk_FragColor.w, outputCoverage_Stage0.x);
+ float lerpBlue = mix(_dstColor.w, sk_FragColor.w, outputCoverage_Stage0.y);
+ float lerpGreen = mix(_dstColor.w, sk_FragColor.w, outputCoverage_Stage0.z);
+ sk_FragColor = outputCoverage_Stage0 * sk_FragColor + (vec4(1.0) - outputCoverage_Stage0) * _dstColor;
+ sk_FragColor.w = max(max(lerpRed, lerpBlue), lerpGreen);
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform vec2 uAtlasSizeInv_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in uvec2 inTextureCoords;
+noperspective out vec2 vTextureCoords_Stage0;
+flat out int vTexIndex_Stage0;
+noperspective out vec4 vinColor_Stage0;
+void main() {
+ ivec2 signedCoords = ivec2(int(inTextureCoords.x), int(inTextureCoords.y));
+ vec2 unormTexCoords = vec2(float(signedCoords.x / 2), float(signedCoords.y / 2));
+ vTextureCoords_Stage0 = unormTexCoords * uAtlasSizeInv_Stage0;
+ vTexIndex_Stage0 = 0;
+ vinColor_Stage0 = inColor;
+ gl_Position = vec4(inPosition.x, inPosition.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/19-175.shader_test b/shaders/skia/19-175.shader_test
new file mode 100644
index 0000000..a697621
--- /dev/null
+++ b/shaders/skia/19-175.shader_test
@@ -0,0 +1,113 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale8_9_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale10_11_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale12_13_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias8_9_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias10_11_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias12_13_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.w) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c1_c0;
+ }
+ }
+ } else {
+ if (t < uthresholds9_13_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds9_13_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale8_9_Stage1_c0_c0_c1_c0;
+ bias = ubias8_9_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale10_11_Stage1_c0_c0_c1_c0;
+ bias = ubias10_11_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ {
+ scale = uscale12_13_Stage1_c0_c0_c1_c0;
+ bias = ubias12_13_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/19-18.shader_test b/shaders/skia/19-18.shader_test
new file mode 100644
index 0000000..9df0c62
--- /dev/null
+++ b/shaders/skia/19-18.shader_test
@@ -0,0 +1,68 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 usubset_Stage1;
+uniform vec4 uclamp_Stage1;
+uniform vec4 unorm_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+flat in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec2 inCoord = vTransformedCoords_0_Stage0;
+ inCoord *= unorm_Stage1.xy;
+ float extraRepeatCoordY;
+ float repeatCoordWeightY;
+ vec2 subsetCoord;
+ subsetCoord.x = inCoord.x;
+ {
+ float w = usubset_Stage1.w - usubset_Stage1.y;
+ float w2 = 2.0 * w;
+ float d = inCoord.y - usubset_Stage1.y;
+ float m = mod(d, w2);
+ float o = mix(m, w2 - m, step(w, m));
+ subsetCoord.y = o + usubset_Stage1.y;
+ extraRepeatCoordY = (w - o) + usubset_Stage1.y;
+ float hw = w / 2.0;
+ float n = mod(d - hw, w2);
+ repeatCoordWeightY = clamp((mix(n, w2 - n, step(w, n)) - hw) + 0.5, 0.0, 1.0);
+ }
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage1.x, uclamp_Stage1.z);
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage1.y, uclamp_Stage1.w);
+ extraRepeatCoordY = clamp(extraRepeatCoordY, uclamp_Stage1.y, uclamp_Stage1.w);
+ vec4 textureColor = mix(texture(uTextureSampler_0_Stage1, clampedCoord * unorm_Stage1.zw), texture(uTextureSampler_0_Stage1, vec2(clampedCoord.x, extraRepeatCoordY) * unorm_Stage1.zw), repeatCoordWeightY);
+ output_Stage1 = outputColor_Stage0 * textureColor;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec2 inLocalCoords;
+in vec4 color;
+flat out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vcolor_Stage0 = color;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoords, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/19-181.shader_test b/shaders/skia/19-181.shader_test
new file mode 100644
index 0000000..b40689d
--- /dev/null
+++ b/shaders/skia/19-181.shader_test
@@ -0,0 +1,31 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uColor_Stage0;
+uniform float uCoverage_Stage0;
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ outputCoverage_Stage0 = vec4(uCoverage_Stage0);
+ }
+ {
+ sk_FragColor = outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 inPosition;
+void main() {
+ vec2 pos2 = (uViewM_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/19-182.shader_test b/shaders/skia/19-182.shader_test
new file mode 100644
index 0000000..a4b9efb
--- /dev/null
+++ b/shaders/skia/19-182.shader_test
@@ -0,0 +1,108 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 ubaseFrequency_Stage2_c0_c0;
+uniform vec2 ustitchData_Stage2_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+uniform sampler2D uTextureSampler_1_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+float perlinnoise_Stage2_c0_c0(float chanCoord, vec2 noiseVec, vec2 stitchData) {
+ vec4 floorVal;
+ floorVal.xy = floor(noiseVec);
+ floorVal.zw = floorVal.xy + vec2(1.0);
+ vec2 fractVal = fract(noiseVec);
+ vec2 noiseSmooth = (fractVal * fractVal) * (vec2(3.0) - vec2(2.0) * fractVal);
+ if (floorVal.x >= stitchData.x) {
+ floorVal.x -= stitchData.x;
+ }
+ if (floorVal.y >= stitchData.y) {
+ floorVal.y -= stitchData.y;
+ }
+ if (floorVal.z >= stitchData.x) {
+ floorVal.z -= stitchData.x;
+ }
+ if (floorVal.w >= stitchData.y) {
+ floorVal.w -= stitchData.y;
+ }
+ floorVal = fract(floor(mod(floorVal, 256.0)) / vec4(256.0));
+ vec2 latticeIdx;
+ latticeIdx.x = texture(uTextureSampler_0_Stage2, vec2(floorVal.x, 0.5)).x;
+ latticeIdx.y = texture(uTextureSampler_0_Stage2, vec2(floorVal.z, 0.5)).x;
+ vec4 bcoords = fract(latticeIdx.xyxy + floorVal.yyww);
+ vec2 uv;
+ vec4 lattice = texture(uTextureSampler_1_Stage2, vec2(bcoords.x, chanCoord)).zyxw;
+ uv.x = dot((lattice.yw + lattice.xz * vec2(0.00390625)) * vec2(2.0) - vec2(1.0), fractVal);
+ fractVal.x -= 1.0;
+ lattice = texture(uTextureSampler_1_Stage2, vec2(bcoords.y, chanCoord)).zyxw;
+ uv.y = dot((lattice.yw + lattice.xz * vec2(0.00390625)) * vec2(2.0) - vec2(1.0), fractVal);
+ vec2 ab;
+ ab.x = mix(uv.x, uv.y, noiseSmooth.x);
+ fractVal.y -= 1.0;
+ lattice = texture(uTextureSampler_1_Stage2, vec2(bcoords.w, chanCoord)).zyxw;
+ uv.y = dot((lattice.yw + lattice.xz * vec2(0.00390625)) * vec2(2.0) - vec2(1.0), fractVal);
+ fractVal.x += 1.0;
+ lattice = texture(uTextureSampler_1_Stage2, vec2(bcoords.z, chanCoord)).zyxw;
+ uv.x = dot((lattice.yw + lattice.xz * vec2(0.00390625)) * vec2(2.0) - vec2(1.0), fractVal);
+ ab.y = mix(uv.x, uv.y, noiseSmooth.x);
+ return mix(ab.x, ab.y, noiseSmooth.y);
+}
+vec4 PerlinNoise_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 noiseVec = floor(vTransformedCoords_1_Stage0) * ubaseFrequency_Stage2_c0_c0;
+ _output = vec4(0.0);
+ vec2 stitchData = ustitchData_Stage2_c0_c0;
+ float ratio = 1.0;
+ for (int octave = 0;octave < 3; ++octave) {
+ _output += vec4(perlinnoise_Stage2_c0_c0(0.125, noiseVec, stitchData), perlinnoise_Stage2_c0_c0(0.375, noiseVec, stitchData), perlinnoise_Stage2_c0_c0(0.625, noiseVec, stitchData), perlinnoise_Stage2_c0_c0(0.875, noiseVec, stitchData)) * ratio;
+ noiseVec *= vec2(2.0);
+ ratio *= 0.5;
+ stitchData *= vec2(2.0);
+ }
+ _output = _output * vec4(0.5) + vec4(0.5);
+ _output = clamp(_output, 0.0, 1.0);
+ _output = vec4(_output.xyz * _output.www, _output.w);
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_dst_in(output_Stage1, PerlinNoise_Stage2_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/19-183.shader_test b/shaders/skia/19-183.shader_test
new file mode 100644
index 0000000..11b72ba
--- /dev/null
+++ b/shaders/skia/19-183.shader_test
@@ -0,0 +1,77 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uCoordTransformMatrix_2_Stage0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 TextureEffect_Stage2_c0_c0(vec4 _input, vec2 _coords) {
+ _coords = _coords * uCoordTransformMatrix_2_Stage0.xz + uCoordTransformMatrix_2_Stage0.yw;
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage2, _coords) * _input;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ vec2 coord = vTransformedCoords_1_Stage0 - vec2(0.5);
+ vec2 f = fract(coord);
+ coord += 0.5 - f;
+ vec4 wx = mat4(0.055555555555555552, 0.88888888888888884, 0.055555555555555552, 0.0, -0.5, 0.0, 0.5, 0.0, 0.83333333333333337, -2.0, 1.5, -0.33333333333333331, -0.3888888888888889, 1.1666666666666667, -1.1666666666666667, 0.3888888888888889) * vec4(1.0, f.x, f.x * f.x, (f.x * f.x) * f.x);
+ vec4 wy = mat4(0.055555555555555552, 0.88888888888888884, 0.055555555555555552, 0.0, -0.5, 0.0, 0.5, 0.0, 0.83333333333333337, -2.0, 1.5, -0.33333333333333331, -0.3888888888888889, 1.1666666666666667, -1.1666666666666667, 0.3888888888888889) * vec4(1.0, f.y, f.y * f.y, (f.y * f.y) * f.y);
+ vec4 rowColors[4];
+ rowColors[0] = TextureEffect_Stage2_c0_c0(vec4(1.0), coord + vec2(-1.0, -1.0));
+ rowColors[1] = TextureEffect_Stage2_c0_c0(vec4(1.0), coord + vec2(0.0, -1.0));
+ rowColors[2] = TextureEffect_Stage2_c0_c0(vec4(1.0), coord + vec2(1.0, -1.0));
+ rowColors[3] = TextureEffect_Stage2_c0_c0(vec4(1.0), coord + vec2(2.0, -1.0));
+ vec4 s0 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ rowColors[0] = TextureEffect_Stage2_c0_c0(vec4(1.0), coord + vec2(-1.0, 0.0));
+ rowColors[1] = TextureEffect_Stage2_c0_c0(vec4(1.0), coord);
+ rowColors[2] = TextureEffect_Stage2_c0_c0(vec4(1.0), coord + vec2(1.0, 0.0));
+ rowColors[3] = TextureEffect_Stage2_c0_c0(vec4(1.0), coord + vec2(2.0, 0.0));
+ vec4 s1 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ rowColors[0] = TextureEffect_Stage2_c0_c0(vec4(1.0), coord + vec2(-1.0, 1.0));
+ rowColors[1] = TextureEffect_Stage2_c0_c0(vec4(1.0), coord + vec2(0.0, 1.0));
+ rowColors[2] = TextureEffect_Stage2_c0_c0(vec4(1.0), coord + vec2(1.0, 1.0));
+ rowColors[3] = TextureEffect_Stage2_c0_c0(vec4(1.0), coord + vec2(2.0, 1.0));
+ vec4 s2 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ rowColors[0] = TextureEffect_Stage2_c0_c0(vec4(1.0), coord + vec2(-1.0, 2.0));
+ rowColors[1] = TextureEffect_Stage2_c0_c0(vec4(1.0), coord + vec2(0.0, 2.0));
+ rowColors[2] = TextureEffect_Stage2_c0_c0(vec4(1.0), coord + vec2(1.0, 2.0));
+ rowColors[3] = TextureEffect_Stage2_c0_c0(vec4(1.0), coord + vec2(2.0, 2.0));
+ vec4 s3 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ vec4 bicubicColor = ((wy.x * s0 + wy.y * s1) + wy.z * s2) + wy.w * s3;
+ bicubicColor.xyz = max(vec3(0.0), min(bicubicColor.xyz, bicubicColor.www));
+ output_Stage2 = bicubicColor * output_Stage1;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/19-184.shader_test b/shaders/skia/19-184.shader_test
new file mode 100644
index 0000000..a039dcd
--- /dev/null
+++ b/shaders/skia/19-184.shader_test
@@ -0,0 +1,66 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uborder_Stage1;
+uniform vec4 usubset_Stage1;
+uniform vec4 unorm_Stage1;
+uniform vec4 ucolor_Stage2_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 ConstColorProcessor_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c0_c0;
+ }
+ return _output;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ vec2 inCoord = vTransformedCoords_0_Stage0;
+ inCoord *= unorm_Stage1.xy;
+ vec2 subsetCoord;
+ subsetCoord.x = inCoord.x;
+ subsetCoord.y = inCoord.y;
+ vec2 clampedCoord;
+ clampedCoord.x = subsetCoord.x;
+ clampedCoord.y = subsetCoord.y;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord * unorm_Stage1.zw);
+ if (inCoord.x < usubset_Stage1.x || inCoord.x > usubset_Stage1.z) {
+ textureColor = uborder_Stage1;
+ }
+ if (inCoord.y < usubset_Stage1.y || inCoord.y > usubset_Stage1.w) {
+ textureColor = uborder_Stage1;
+ }
+ output_Stage1 = textureColor;
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_src_over(output_Stage1, ConstColorProcessor_Stage2_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/19-19.shader_test b/shaders/skia/19-19.shader_test
new file mode 100644
index 0000000..780021a
--- /dev/null
+++ b/shaders/skia/19-19.shader_test
@@ -0,0 +1,59 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 usubset_Stage1;
+uniform vec4 uclamp_Stage1;
+uniform vec4 unorm_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+flat in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec2 inCoord = vTransformedCoords_0_Stage0;
+ inCoord *= unorm_Stage1.xy;
+ vec2 subsetCoord;
+ subsetCoord.x = inCoord.x;
+ subsetCoord.y = mod(inCoord.y - usubset_Stage1.y, usubset_Stage1.w - usubset_Stage1.y) + usubset_Stage1.y;
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage1.x, uclamp_Stage1.z);
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage1.y, uclamp_Stage1.w);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord * unorm_Stage1.zw);
+ float errY = subsetCoord.y - clampedCoord.y;
+ float repeatCoordY = errY > 0.0 ? uclamp_Stage1.y : uclamp_Stage1.w;
+ if (errY != 0.0) {
+ textureColor = mix(textureColor, texture(uTextureSampler_0_Stage1, vec2(clampedCoord.x, repeatCoordY) * unorm_Stage1.zw), abs(errY));
+ }
+ output_Stage1 = outputColor_Stage0 * textureColor;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec2 inLocalCoords;
+in vec4 color;
+flat out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vcolor_Stage0 = color;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoords, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/19-2.shader_test b/shaders/skia/19-2.shader_test
new file mode 100644
index 0000000..44bc999
--- /dev/null
+++ b/shaders/skia/19-2.shader_test
@@ -0,0 +1,63 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+uniform sampler2D uTextureSampler_2_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+vec4 TextureEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_1_Stage1, vTransformedCoords_1_Stage0) * _input;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c2_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_2_Stage1, vTransformedCoords_2_Stage0) * _input;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ vec4 planes[3];
+ planes[0] = TextureEffect_Stage1_c0_c0(vec4(1.0));
+ planes[1] = TextureEffect_Stage1_c1_c0(vec4(1.0));
+ planes[2] = TextureEffect_Stage1_c2_c0(vec4(1.0));
+ vec4 color = vec4(planes[0].x, planes[1].x, planes[2].x, 1.0);
+ output_Stage1 = color;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/19-21.shader_test b/shaders/skia/19-21.shader_test
new file mode 100644
index 0000000..9d5defe
--- /dev/null
+++ b/shaders/skia/19-21.shader_test
@@ -0,0 +1,52 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 usubset_Stage1;
+uniform vec4 uclamp_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+flat in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec2 inCoord = vTransformedCoords_0_Stage0;
+ vec2 subsetCoord;
+ subsetCoord.x = inCoord.x;
+ subsetCoord.y = mod(inCoord.y - usubset_Stage1.y, usubset_Stage1.w - usubset_Stage1.y) + usubset_Stage1.y;
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage1.x, uclamp_Stage1.z);
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage1.y, uclamp_Stage1.w);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ output_Stage1 = outputColor_Stage0 * textureColor;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec2 inLocalCoords;
+in vec4 color;
+flat out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vcolor_Stage0 = color;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoords, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/19-23.shader_test b/shaders/skia/19-23.shader_test
new file mode 100644
index 0000000..ffb54a0
--- /dev/null
+++ b/shaders/skia/19-23.shader_test
@@ -0,0 +1,111 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 uscale01_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias01_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale23_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias23_Stage1_c0_c0_c1_c0;
+uniform float uthreshold_Stage1_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage2_c1_c0_c0_c0;
+uniform vec4 ucolor_Stage2_c2_c0_c0_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 RadialGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = length(vTransformedCoords_0_Stage0);
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 DualIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthreshold_Stage1_c0_c0_c1_c0) {
+ scale = uscale01_Stage1_c0_c0_c1_c0;
+ bias = ubias01_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale23_Stage1_c0_c0_c1_c0;
+ bias = ubias23_Stage1_c0_c0_c1_c0;
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = RadialGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = DualIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c1_c0_c0_c0;
+ }
+ return _output;
+}
+vec4 blend_xor(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src + (1.0 - src.w) * dst;
+}
+vec4 ComposeOne_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_xor(ConstColorProcessor_Stage2_c1_c0_c0_c0(vec4(1.0)), _input);
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c2_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c2_c0_c0_c0;
+ }
+ return _output;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 ComposeOne_Stage2_c2_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_src_over(ConstColorProcessor_Stage2_c2_c0_c0_c0(vec4(1.0)), _input);
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = ComposeOne_Stage2_c2_c0(ComposeOne_Stage2_c1_c0(output_Stage1));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/19-24.shader_test b/shaders/skia/19-24.shader_test
new file mode 100644
index 0000000..60c3255
--- /dev/null
+++ b/shaders/skia/19-24.shader_test
@@ -0,0 +1,124 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 uscale01_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias01_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale23_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias23_Stage1_c0_c0_c1_c0;
+uniform float uthreshold_Stage1_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage2_c1_c0_c0_c0;
+uniform vec4 ucolor_Stage2_c2_c0_c0_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 RadialGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = length(vTransformedCoords_0_Stage0);
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 DualIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthreshold_Stage1_c0_c0_c1_c0) {
+ scale = uscale01_Stage1_c0_c0_c1_c0;
+ bias = ubias01_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale23_Stage1_c0_c0_c1_c0;
+ bias = ubias23_Stage1_c0_c0_c1_c0;
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = RadialGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = DualIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c1_c0_c0_c0;
+ }
+ return _output;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 blend_darken(vec4 src, vec4 dst) {
+ vec4 result = blend_src_over(src, dst);
+ result.xyz = min(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
+ return result;
+}
+vec4 ComposeOne_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_darken(ConstColorProcessor_Stage2_c1_c0_c0_c0(vec4(1.0)), _input);
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c2_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c2_c0_c0_c0;
+ }
+ return _output;
+}
+float _blend_overlay_component(float sc, float sa, float dc, float da) {
+ if (2.0 * dc <= da) {
+ return (2.0 * sc) * dc;
+ }
+ return sa * da - (2.0 * (da - dc)) * (sa - sc);
+}
+vec4 blend_overlay(vec4 src, vec4 dst) {
+ vec4 result = vec4(_blend_overlay_component(src.x, src.w, dst.x, dst.w), _blend_overlay_component(src.y, src.w, dst.y, dst.w), _blend_overlay_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+ result.xyz += dst.xyz * (1.0 - src.w) + src.xyz * (1.0 - dst.w);
+ return result;
+}
+vec4 ComposeOne_Stage2_c2_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_overlay(ConstColorProcessor_Stage2_c2_c0_c0_c0(vec4(1.0)), _input);
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = ComposeOne_Stage2_c2_c0(ComposeOne_Stage2_c1_c0(output_Stage1));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/19-27.shader_test b/shaders/skia/19-27.shader_test
new file mode 100644
index 0000000..38cd356
--- /dev/null
+++ b/shaders/skia/19-27.shader_test
@@ -0,0 +1,26 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uColor_Stage0;
+void main() {
+ {
+ sk_FragColor = vec4(0.0);
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 position;
+void main() {
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/19-3.shader_test b/shaders/skia/19-3.shader_test
new file mode 100644
index 0000000..963d06a
--- /dev/null
+++ b/shaders/skia/19-3.shader_test
@@ -0,0 +1,27 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+flat in vec4 vcolor_Stage0;
+void main() {
+ {
+ sk_FragColor = vec4(0.0);
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 position;
+in vec4 color;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/19-31.shader_test b/shaders/skia/19-31.shader_test
new file mode 100644
index 0000000..12921f8
--- /dev/null
+++ b/shaders/skia/19-31.shader_test
@@ -0,0 +1,52 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+flat in vec4 vcolor_Stage0;
+noperspective in float vcoverage_Stage0;
+flat in vec4 vgeomDomain_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ float coverage = vcoverage_Stage0;
+ vec4 geoDomain;
+ geoDomain = vgeomDomain_Stage0;
+ if (coverage < 0.5) {
+ vec4 dists4 = clamp(vec4(1.0, 1.0, -1.0, -1.0) * (gl_FragCoord.xyxy - geoDomain), 0.0, 1.0);
+ vec2 dists2 = dists4.xy * dists4.zw;
+ coverage = min(coverage, dists2.x * dists2.y);
+ }
+ outputCoverage_Stage0 = vec4(coverage);
+ }
+ {
+ sk_FragColor = outputColor_Stage0 * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 position;
+in float coverage;
+in vec4 color;
+in vec4 geomDomain;
+flat out vec4 vcolor_Stage0;
+noperspective out float vcoverage_Stage0;
+flat out vec4 vgeomDomain_Stage0;
+void main() {
+ vec2 position = position;
+ vcolor_Stage0 = color;
+ vcoverage_Stage0 = coverage;
+ vgeomDomain_Stage0 = geomDomain;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/19-34.shader_test b/shaders/skia/19-34.shader_test
new file mode 100644
index 0000000..b0a6c9a
--- /dev/null
+++ b/shaders/skia/19-34.shader_test
@@ -0,0 +1,86 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+vec4 ComposeOne_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_dst_in(_input, TextureEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0)));
+ return _output;
+}
+vec4 ComposeOne_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_src_in(_input, ComposeOne_Stage1_c0_c0_c0_c0(vec4(1.0)));
+ return _output;
+}
+vec4 TextureEffect_Stage1_c1_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_1_Stage1, vTransformedCoords_1_Stage0) * _input;
+ return _output;
+}
+vec4 ComposeOne_Stage1_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_dst_in(_input, TextureEffect_Stage1_c1_c0_c0_c0_c0_c0(vec4(1.0)));
+ return _output;
+}
+vec4 ComposeOne_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_src_in(_input, ComposeOne_Stage1_c1_c0_c0_c0(vec4(1.0)));
+ return _output;
+}
+vec4 blend_src_out(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(vec4(1.0).xyz, 1.0);
+ output_Stage1 = blend_src_out(ComposeOne_Stage1_c0_c0(inputColor), ComposeOne_Stage1_c1_c0(inputColor));
+ }
+ {
+ sk_FragColor = outputColor_Stage0 * output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/19-35.shader_test b/shaders/skia/19-35.shader_test
new file mode 100644
index 0000000..41eded4
--- /dev/null
+++ b/shaders/skia/19-35.shader_test
@@ -0,0 +1,90 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform vec2 uBounds_Stage1;
+uniform vec4 uKernel_Stage1[4];
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0 - 6.0 * uImageIncrement_Stage1;
+ vec2 coordSampled = vec2(0.0, 0.0);
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].x;
+ coord += uImageIncrement_Stage1;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/19-36.shader_test b/shaders/skia/19-36.shader_test
new file mode 100644
index 0000000..5375477
--- /dev/null
+++ b/shaders/skia/19-36.shader_test
@@ -0,0 +1,48 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uinnerRect_Stage1;
+uniform vec2 uinvRadiiXY_Stage1;
+flat in vec4 vcolor_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec2 dxy0 = uinnerRect_Stage1.xy - gl_FragCoord.xy;
+ vec2 dxy1 = gl_FragCoord.xy - uinnerRect_Stage1.zw;
+ vec2 dxy = max(max(dxy0, dxy1), 0.0);
+ vec2 Z = dxy * uinvRadiiXY_Stage1;
+ float implicit = dot(Z, dxy) - 1.0;
+ float grad_dot = 4.0 * dot(Z, Z);
+ grad_dot = max(grad_dot, 9.9999997473787516e-05);
+ float approx_dist = implicit * inversesqrt(grad_dot);
+ float alpha = clamp(0.5 - approx_dist, 0.0, 1.0);
+ output_Stage1 = vec4(alpha);
+ }
+ {
+ sk_FragColor = outputColor_Stage0 * output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 position;
+in vec4 color;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/19-37.shader_test b/shaders/skia/19-37.shader_test
new file mode 100644
index 0000000..8e77302
--- /dev/null
+++ b/shaders/skia/19-37.shader_test
@@ -0,0 +1,67 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform sampler2D uTextureSampler_0_Stage0;
+noperspective in vec2 vTextureCoords_Stage0;
+flat in int vTexIndex_Stage0;
+noperspective in vec2 vIntTextureCoords_Stage0;
+noperspective in vec4 vinColor_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vinColor_Stage0;
+ vec2 uv = vTextureCoords_Stage0;
+ vec4 texColor;
+ {
+ texColor = texture(uTextureSampler_0_Stage0, uv);
+ }
+ float distance = 7.96875 * (texColor.x - 0.50196081399917603);
+ float afwidth;
+ vec2 dist_grad = vec2(dFdx(distance), -dFdy(distance));
+ float dg_len2 = dot(dist_grad, dist_grad);
+ if (dg_len2 < 9.9999997473787516e-05) {
+ dist_grad = vec2(0.70709997415542603, 0.70709997415542603);
+ } else {
+ dist_grad = dist_grad * inversesqrt(dg_len2);
+ }
+ vec2 Jdx = dFdx(vIntTextureCoords_Stage0);
+ vec2 Jdy = -dFdy(vIntTextureCoords_Stage0);
+ vec2 grad = vec2(dist_grad.x * Jdx.x + dist_grad.y * Jdy.x, dist_grad.x * Jdx.y + dist_grad.y * Jdy.y);
+ afwidth = 0.64999997615814209 * length(grad);
+ float val = smoothstep(-afwidth, afwidth, distance);
+ outputCoverage_Stage0 = vec4(val);
+ }
+ {
+ sk_FragColor = outputColor_Stage0 * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform vec2 uAtlasDimensionsInv_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in uvec2 inTextureCoords;
+noperspective out vec2 vTextureCoords_Stage0;
+flat out int vTexIndex_Stage0;
+noperspective out vec2 vIntTextureCoords_Stage0;
+noperspective out vec4 vinColor_Stage0;
+void main() {
+ ivec2 signedCoords = ivec2(int(inTextureCoords.x), int(inTextureCoords.y));
+ vec2 unormTexCoords = vec2(float(signedCoords.x / 2), float(signedCoords.y / 2));
+ vTextureCoords_Stage0 = unormTexCoords * uAtlasDimensionsInv_Stage0;
+ vTexIndex_Stage0 = 0;
+ vIntTextureCoords_Stage0 = unormTexCoords;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = inPosition;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/19-39.shader_test b/shaders/skia/19-39.shader_test
new file mode 100644
index 0000000..dc08e35
--- /dev/null
+++ b/shaders/skia/19-39.shader_test
@@ -0,0 +1,63 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uclamp_Stage1_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 inCoord = vTransformedCoords_0_Stage0;
+ vec2 subsetCoord;
+ subsetCoord.x = inCoord.x;
+ subsetCoord.y = inCoord.y;
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage1_c0_c0.x, uclamp_Stage1_c0_c0.z);
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage1_c0_c0.y, uclamp_Stage1_c0_c0.w);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ _output = _input * textureColor;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TextureEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ float nonZeroAlpha = max(output_Stage1.w, 9.9999997473787516e-05);
+ vec4 coord = vec4(output_Stage1.xyz / nonZeroAlpha, nonZeroAlpha);
+ coord = coord * 0.9960939884185791 + vec4(0.0019529999699443579, 0.0019529999699443579, 0.0019529999699443579, 0.0019529999699443579);
+ output_Stage2.w = texture(uTextureSampler_0_Stage2, vec2(coord.w, 0.125)).w;
+ output_Stage2.x = texture(uTextureSampler_0_Stage2, vec2(coord.x, 0.375)).w;
+ output_Stage2.y = texture(uTextureSampler_0_Stage2, vec2(coord.y, 0.625)).w;
+ output_Stage2.z = texture(uTextureSampler_0_Stage2, vec2(coord.z, 0.875)).w;
+ output_Stage2.xyz *= output_Stage2.w;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/19-4.shader_test b/shaders/skia/19-4.shader_test
new file mode 100644
index 0000000..7c26c47
--- /dev/null
+++ b/shaders/skia/19-4.shader_test
@@ -0,0 +1,35 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_KHR_blend_equation_advanced : require
+out vec4 sk_FragColor;
+layout (blend_support_all_equations) out ;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/19-42.shader_test b/shaders/skia/19-42.shader_test
new file mode 100644
index 0000000..db5937c
--- /dev/null
+++ b/shaders/skia/19-42.shader_test
@@ -0,0 +1,73 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uclamp_Stage1_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+in float vcoverage_Stage0;
+flat in vec4 vgeomDomain_Stage0;
+vec4 TextureEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 inCoord = vTransformedCoords_0_Stage0;
+ vec2 subsetCoord;
+ subsetCoord.x = inCoord.x;
+ subsetCoord.y = inCoord.y;
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage1_c0_c0.x, uclamp_Stage1_c0_c0.z);
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage1_c0_c0.y, uclamp_Stage1_c0_c0.w);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ _output = _input * textureColor;
+ return _output;
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ float coverage = vcoverage_Stage0 * gl_FragCoord.w;
+ vec4 geoDomain;
+ geoDomain = vgeomDomain_Stage0;
+ if (coverage < 0.5) {
+ vec4 dists4 = clamp(vec4(1.0, 1.0, -1.0, -1.0) * (gl_FragCoord.xyxy - geoDomain), 0.0, 1.0);
+ vec2 dists2 = dists4.xy * dists4.zw;
+ coverage = min(coverage, dists2.x * dists2.y);
+ }
+ outputCoverage_Stage0 = vec4(coverage);
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TextureEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1 * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec4 positionWithCoverage;
+in vec4 color;
+in vec2 localCoord;
+in vec4 geomDomain;
+out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+out float vcoverage_Stage0;
+flat out vec4 vgeomDomain_Stage0;
+void main() {
+ vec3 position = positionWithCoverage.xyz;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ vcoverage_Stage0 = positionWithCoverage.w * positionWithCoverage.z;
+ vgeomDomain_Stage0 = geomDomain;
+ gl_Position = vec4(position.x, position.y, 0.0, position.z);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/19-49.shader_test b/shaders/skia/19-49.shader_test
new file mode 100644
index 0000000..2b489dc
--- /dev/null
+++ b/shaders/skia/19-49.shader_test
@@ -0,0 +1,120 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+noperspective in vec4 vinCircleEdge_Stage0;
+flat in vec4 vinDashParams_Stage0;
+flat in vec4 vwrapDashes_Stage0;
+flat in float vlastIntervalLength_Stage0;
+flat in vec4 vinColor_Stage0;
+float coverage_from_dash_edge_Stage0(float angleToEdge, float diameter) {
+ float linearDist;
+ angleToEdge = clamp(angleToEdge, -3.1414999961853027, 3.1414999961853027);
+ linearDist = diameter * sin(angleToEdge / 2.0);
+ return clamp(linearDist + 0.5, 0.0, 1.0);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ vec4 circleEdge;
+ circleEdge = vinCircleEdge_Stage0;
+ vec4 dashParams;
+ dashParams = vinDashParams_Stage0;
+ vec4 wrapDashes = vwrapDashes_Stage0;
+ float lastIntervalLength = vlastIntervalLength_Stage0;
+ outputColor_Stage0 = vinColor_Stage0;
+ float d = length(circleEdge.xy) * circleEdge.z;
+ float distanceToOuterEdge = circleEdge.z - d;
+ float edgeAlpha = clamp(distanceToOuterEdge, 0.0, 1.0);
+ float distanceToInnerEdge = d - circleEdge.z * circleEdge.w;
+ float innerAlpha = clamp(distanceToInnerEdge, 0.0, 1.0);
+ edgeAlpha *= innerAlpha;
+ float angleFromStart = atan(circleEdge.y, circleEdge.x) - dashParams.z;
+ angleFromStart = mod(angleFromStart, 6.2831854820251465);
+ float x = mod(angleFromStart, dashParams.y);
+ d *= 2.0;
+ vec2 currDash = vec2(-dashParams.w, dashParams.x - dashParams.w);
+ vec2 nextDash = vec2(dashParams.y - dashParams.w, (dashParams.y + dashParams.x) - dashParams.w);
+ vec2 prevDash = vec2(-dashParams.y - dashParams.w, (-dashParams.y + dashParams.x) - dashParams.w);
+ float dashAlpha = 0.0;
+ if ((angleFromStart - x) + dashParams.y >= 6.2831854820251465) {
+ dashAlpha += coverage_from_dash_edge_Stage0(x - wrapDashes.z, d) * coverage_from_dash_edge_Stage0(wrapDashes.w - x, d);
+ currDash.y = min(currDash.y, lastIntervalLength);
+ if (nextDash.x >= lastIntervalLength) {
+ nextDash.xy = vec2(1000.0);
+ } else {
+ nextDash.y = min(nextDash.y, lastIntervalLength);
+ }
+ }
+ if ((angleFromStart - x) - dashParams.y < -0.0099999997764825821) {
+ dashAlpha += coverage_from_dash_edge_Stage0(x - wrapDashes.x, d) * coverage_from_dash_edge_Stage0(wrapDashes.y - x, d);
+ currDash.x = max(currDash.x, 0.0);
+ if (prevDash.y <= 0.0) {
+ prevDash.xy = vec2(1000.0);
+ } else {
+ prevDash.x = max(prevDash.x, 0.0);
+ }
+ }
+ dashAlpha += coverage_from_dash_edge_Stage0(x - currDash.x, d) * coverage_from_dash_edge_Stage0(currDash.y - x, d);
+ dashAlpha += coverage_from_dash_edge_Stage0(x - nextDash.x, d) * coverage_from_dash_edge_Stage0(nextDash.y - x, d);
+ dashAlpha += coverage_from_dash_edge_Stage0(x - prevDash.x, d) * coverage_from_dash_edge_Stage0(prevDash.y - x, d);
+ dashAlpha = min(dashAlpha, 1.0);
+ edgeAlpha *= dashAlpha;
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ {
+ sk_FragColor = outputColor_Stage0 * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 inPosition;
+in vec4 inColor;
+in vec4 inCircleEdge;
+in vec4 inDashParams;
+noperspective out vec4 vinCircleEdge_Stage0;
+flat out vec4 vinDashParams_Stage0;
+flat out vec4 vwrapDashes_Stage0;
+flat out float vlastIntervalLength_Stage0;
+flat out vec4 vinColor_Stage0;
+void main() {
+ vinCircleEdge_Stage0 = inCircleEdge;
+ vinDashParams_Stage0 = inDashParams;
+ vec4 dashParams = inDashParams;
+ vec4 wrapDashes;
+ float lastIntervalLength = mod(6.2831854820251465, dashParams.y);
+ if (0.0 == lastIntervalLength) {
+ lastIntervalLength = dashParams.y;
+ }
+ float offset = 0.0;
+ if (-dashParams.w >= lastIntervalLength) {
+ offset = -dashParams.y;
+ } else if (dashParams.w > dashParams.y - lastIntervalLength) {
+ offset = dashParams.y;
+ }
+ wrapDashes.x = (-lastIntervalLength + offset) - dashParams.w;
+ wrapDashes.y = min(wrapDashes.x + dashParams.x, 0.0);
+ offset = 0.0;
+ if (dashParams.w >= dashParams.x) {
+ offset = dashParams.y;
+ } else if (-dashParams.w > dashParams.y - dashParams.x) {
+ offset = -dashParams.y;
+ }
+ wrapDashes.z = (lastIntervalLength + offset) - dashParams.w;
+ wrapDashes.w = wrapDashes.z + dashParams.x;
+ wrapDashes.z = max(wrapDashes.z, lastIntervalLength);
+ vwrapDashes_Stage0 = wrapDashes;
+ vlastIntervalLength_Stage0 = lastIntervalLength;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = inPosition;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/19-5.shader_test b/shaders/skia/19-5.shader_test
new file mode 100644
index 0000000..286770b
--- /dev/null
+++ b/shaders/skia/19-5.shader_test
@@ -0,0 +1,50 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 TextureEffect_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage2, vTransformedCoords_1_Stage0) * _input;
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_src_in(output_Stage1, TextureEffect_Stage2_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/19-52.shader_test b/shaders/skia/19-52.shader_test
new file mode 100644
index 0000000..895a4e1
--- /dev/null
+++ b/shaders/skia/19-52.shader_test
@@ -0,0 +1,44 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform float uPixelSize_Stage1;
+uniform vec2 uRange_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0;
+ coord.x -= 25.0 * uPixelSize_Stage1;
+ float highBound = min(uRange_Stage1.y, coord.x + 50.0 * uPixelSize_Stage1);
+ coord.x = max(uRange_Stage1.x, coord.x);
+ for (int i = 0;i < 51; i++) {
+ output_Stage1 = max(output_Stage1, texture(uTextureSampler_0_Stage1, coord));
+ coord.x += uPixelSize_Stage1;
+ coord.x = min(highBound, coord.x);
+ }
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/19-53.shader_test b/shaders/skia/19-53.shader_test
new file mode 100644
index 0000000..ce2689f
--- /dev/null
+++ b/shaders/skia/19-53.shader_test
@@ -0,0 +1,82 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage2_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c1_c0;
+ }
+ return _output;
+}
+vec4 blend_src(vec4 src, vec4 dst) {
+ return src;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_src(ConstColorProcessor_Stage2_c1_c0(vec4(1.0)), output_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/19-54.shader_test b/shaders/skia/19-54.shader_test
new file mode 100644
index 0000000..941b6cd
--- /dev/null
+++ b/shaders/skia/19-54.shader_test
@@ -0,0 +1,229 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform vec4 uKernel_Stage1[3];
+uniform vec2 uKernelOffset_Stage1;
+uniform float uGain_Stage1;
+uniform float uBias_Stage1;
+uniform vec4 uTexDom_Stage1;
+uniform vec3 uDecalParams_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ vec4 sum = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0 - uKernelOffset_Stage1 * uImageIncrement_Stage1;
+ vec4 c;
+ {
+ float k = uKernel_Stage1[0].x;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[0].y;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[0].z;
+ {
+ vec2 origCoord = coord + vec2(2.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[0].w;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[1].x;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[1].y;
+ {
+ vec2 origCoord = coord + vec2(2.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[1].z;
+ {
+ vec2 origCoord = coord + vec2(0.0, 2.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[1].w;
+ {
+ vec2 origCoord = coord + vec2(1.0, 2.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[2].x;
+ {
+ vec2 origCoord = coord + vec2(2.0, 2.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ vec2 origCoord = vTransformedCoords_0_Stage0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ output_Stage1.w = c.w;
+ output_Stage1.xyz = clamp(sum.xyz * uGain_Stage1 + uBias_Stage1, 0.0, 1.0);
+ output_Stage1.xyz *= output_Stage1.w;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/19-57.shader_test b/shaders/skia/19-57.shader_test
new file mode 100644
index 0000000..c0c69ad
--- /dev/null
+++ b/shaders/skia/19-57.shader_test
@@ -0,0 +1,137 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform float uSurfaceScale_Stage1;
+uniform vec3 uLightColor_Stage1;
+uniform float uKD_Stage1;
+uniform vec3 uLightLocation_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 light_Stage1(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ float colorScale = uKD_Stage1 * dot(normal, surfaceToLight);
+ return vec4(lightColor * clamp(colorScale, 0.0, 1.0), 1.0);
+}
+float sobel_Stage1(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage1(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage1(float m[9], float surfaceScale) {
+ return pointToNormal_Stage1(sobel_Stage1(m[0], m[1], m[3], m[4], m[6], m[7], 0.5), sobel_Stage1(m[0], m[6], m[1], m[7], 0.0, 0.0, 0.33333298563957214), surfaceScale);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ vec2 coord = vTransformedCoords_0_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp0 = textureColor;
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp1 = textureColor;
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp2 = textureColor;
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp3 = textureColor;
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp4 = textureColor;
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp5 = textureColor;
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp6 = textureColor;
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp7 = textureColor;
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp8 = textureColor;
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = normalize(uLightLocation_Stage1 - vec3(gl_FragCoord.xy, uSurfaceScale_Stage1 * m[4]));
+ output_Stage1 = light_Stage1(normal_Stage1(m, uSurfaceScale_Stage1), surfaceToLight, uLightColor_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/19-58.shader_test b/shaders/skia/19-58.shader_test
new file mode 100644
index 0000000..13ea0be
--- /dev/null
+++ b/shaders/skia/19-58.shader_test
@@ -0,0 +1,67 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec2 uDstTextureUpperLeft_Stage1;
+uniform vec2 uDstTextureCoordScale_Stage1;
+uniform sampler2D uTextureSampler_0_Stage0;
+uniform sampler2D uDstTextureSampler_Stage1;
+noperspective in vec2 vTextureCoords_Stage0;
+flat in int vTexIndex_Stage0;
+noperspective in vec4 vinColor_Stage0;
+vec4 blend_dst_over(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src + dst;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vinColor_Stage0;
+ vec4 texColor;
+ {
+ texColor = texture(uTextureSampler_0_Stage0, vTextureCoords_Stage0);
+ }
+ outputCoverage_Stage0 = texColor;
+ }
+ {
+ if (all(lessThanEqual(outputCoverage_Stage0.xyz, vec3(0.0)))) {
+ discard;
+ }
+ vec2 _dstTexCoord = (gl_FragCoord.xy - uDstTextureUpperLeft_Stage1) * uDstTextureCoordScale_Stage1;
+ _dstTexCoord.y = 1.0 - _dstTexCoord.y;
+ vec4 _dstColor = texture(uDstTextureSampler_Stage1, _dstTexCoord);
+ sk_FragColor = blend_dst_over(outputColor_Stage0, _dstColor);
+ float lerpRed = mix(_dstColor.w, sk_FragColor.w, outputCoverage_Stage0.x);
+ float lerpBlue = mix(_dstColor.w, sk_FragColor.w, outputCoverage_Stage0.y);
+ float lerpGreen = mix(_dstColor.w, sk_FragColor.w, outputCoverage_Stage0.z);
+ sk_FragColor = outputCoverage_Stage0 * sk_FragColor + (vec4(1.0) - outputCoverage_Stage0) * _dstColor;
+ sk_FragColor.w = max(max(lerpRed, lerpBlue), lerpGreen);
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform vec2 uAtlasSizeInv_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in uvec2 inTextureCoords;
+noperspective out vec2 vTextureCoords_Stage0;
+flat out int vTexIndex_Stage0;
+noperspective out vec4 vinColor_Stage0;
+void main() {
+ ivec2 signedCoords = ivec2(int(inTextureCoords.x), int(inTextureCoords.y));
+ vec2 unormTexCoords = vec2(float(signedCoords.x / 2), float(signedCoords.y / 2));
+ vTextureCoords_Stage0 = unormTexCoords * uAtlasSizeInv_Stage0;
+ vTexIndex_Stage0 = 0;
+ vinColor_Stage0 = inColor;
+ gl_Position = vec4(inPosition.x, inPosition.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/19-6.shader_test b/shaders/skia/19-6.shader_test
new file mode 100644
index 0000000..90e2300
--- /dev/null
+++ b/shaders/skia/19-6.shader_test
@@ -0,0 +1,103 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uclamp_Stage1_c0_c0_c0_c0;
+uniform vec4 uclamp_Stage1_c0_c0_c1_c0;
+uniform vec4 uclamp_Stage1_c0_c0_c2_c0;
+uniform mat3 ucolorSpaceMatrix_Stage1_c0_c0;
+uniform vec3 ucolorSpaceTranslate_Stage1_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+uniform sampler2D uTextureSampler_2_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 inCoord = vTransformedCoords_0_Stage0;
+ vec2 subsetCoord;
+ subsetCoord.x = inCoord.x;
+ subsetCoord.y = inCoord.y;
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage1_c0_c0_c0_c0.x, uclamp_Stage1_c0_c0_c0_c0.z);
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage1_c0_c0_c0_c0.y, uclamp_Stage1_c0_c0_c0_c0.w);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ _output = _input * textureColor;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 inCoord = vTransformedCoords_1_Stage0;
+ vec2 subsetCoord;
+ subsetCoord.x = inCoord.x;
+ subsetCoord.y = inCoord.y;
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage1_c0_c0_c1_c0.x, uclamp_Stage1_c0_c0_c1_c0.z);
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage1_c0_c0_c1_c0.y, uclamp_Stage1_c0_c0_c1_c0.w);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ _output = _input * textureColor;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c0_c0_c2_c0(vec4 _input) {
+ vec4 _output;
+ vec2 inCoord = vTransformedCoords_2_Stage0;
+ vec2 subsetCoord;
+ subsetCoord.x = inCoord.x;
+ subsetCoord.y = inCoord.y;
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage1_c0_c0_c2_c0.x, uclamp_Stage1_c0_c0_c2_c0.z);
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage1_c0_c0_c2_c0.y, uclamp_Stage1_c0_c0_c2_c0.w);
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ _output = _input * textureColor;
+ return _output;
+}
+vec4 YUVtoRGBEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 planes[3];
+ planes[0] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0));
+ planes[1] = TextureEffect_Stage1_c0_c0_c1_c0(vec4(1.0));
+ planes[2] = TextureEffect_Stage1_c0_c0_c2_c0(vec4(1.0));
+ vec4 color = vec4(planes[0].x, planes[1].x, planes[1].y, planes[2].w);
+ color.xyz = clamp(color.xyz * ucolorSpaceMatrix_Stage1_c0_c0 + ucolorSpaceTranslate_Stage1_c0_c0, 0.0, 1.0);
+ color.xyz *= color.w;
+ _output = color;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = YUVtoRGBEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/19-60.shader_test b/shaders/skia/19-60.shader_test
new file mode 100644
index 0000000..5133a16
--- /dev/null
+++ b/shaders/skia/19-60.shader_test
@@ -0,0 +1,43 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uclamp_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ vec2 inCoord = vTransformedCoords_0_Stage0;
+ vec2 subsetCoord;
+ subsetCoord.x = inCoord.x;
+ subsetCoord.y = inCoord.y;
+ vec2 clampedCoord;
+ clampedCoord.x = subsetCoord.x;
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage1.y, uclamp_Stage1.w);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ output_Stage1 = textureColor;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ sk_FragColor = sk_FragColor.wwww;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/19-63.shader_test b/shaders/skia/19-63.shader_test
new file mode 100644
index 0000000..dc7db8f
--- /dev/null
+++ b/shaders/skia/19-63.shader_test
@@ -0,0 +1,76 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform vec4 uKernel_Stage1[4];
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0 - 6.0 * uImageIncrement_Stage1;
+ vec2 coordSampled = vec2(0.0, 0.0);
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].x;
+ coord += uImageIncrement_Stage1;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/19-66.shader_test b/shaders/skia/19-66.shader_test
new file mode 100644
index 0000000..7e245c3
--- /dev/null
+++ b/shaders/skia/19-66.shader_test
@@ -0,0 +1,123 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uclamp_Stage1_c0_c0_c0_c0;
+uniform vec4 uclamp_Stage1_c0_c0_c1_c0;
+uniform vec4 uclamp_Stage1_c0_c0_c2_c0;
+uniform vec4 uclamp_Stage1_c0_c0_c3_c0;
+uniform mat3 ucolorSpaceMatrix_Stage1_c0_c0;
+uniform vec3 ucolorSpaceTranslate_Stage1_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+uniform sampler2D uTextureSampler_2_Stage1;
+uniform sampler2D uTextureSampler_3_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+noperspective in vec2 vTransformedCoords_3_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 inCoord = vTransformedCoords_0_Stage0;
+ vec2 subsetCoord;
+ subsetCoord.x = inCoord.x;
+ subsetCoord.y = inCoord.y;
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage1_c0_c0_c0_c0.x, uclamp_Stage1_c0_c0_c0_c0.z);
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage1_c0_c0_c0_c0.y, uclamp_Stage1_c0_c0_c0_c0.w);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ _output = _input * textureColor;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 inCoord = vTransformedCoords_1_Stage0;
+ vec2 subsetCoord;
+ subsetCoord.x = inCoord.x;
+ subsetCoord.y = inCoord.y;
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage1_c0_c0_c1_c0.x, uclamp_Stage1_c0_c0_c1_c0.z);
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage1_c0_c0_c1_c0.y, uclamp_Stage1_c0_c0_c1_c0.w);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ _output = _input * textureColor;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c0_c0_c2_c0(vec4 _input) {
+ vec4 _output;
+ vec2 inCoord = vTransformedCoords_2_Stage0;
+ vec2 subsetCoord;
+ subsetCoord.x = inCoord.x;
+ subsetCoord.y = inCoord.y;
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage1_c0_c0_c2_c0.x, uclamp_Stage1_c0_c0_c2_c0.z);
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage1_c0_c0_c2_c0.y, uclamp_Stage1_c0_c0_c2_c0.w);
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ _output = _input * textureColor;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c0_c0_c3_c0(vec4 _input) {
+ vec4 _output;
+ vec2 inCoord = vTransformedCoords_3_Stage0;
+ vec2 subsetCoord;
+ subsetCoord.x = inCoord.x;
+ subsetCoord.y = inCoord.y;
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage1_c0_c0_c3_c0.x, uclamp_Stage1_c0_c0_c3_c0.z);
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage1_c0_c0_c3_c0.y, uclamp_Stage1_c0_c0_c3_c0.w);
+ vec4 textureColor = texture(uTextureSampler_3_Stage1, clampedCoord);
+ _output = _input * textureColor;
+ return _output;
+}
+vec4 YUVtoRGBEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 planes[4];
+ planes[0] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0));
+ planes[1] = TextureEffect_Stage1_c0_c0_c1_c0(vec4(1.0));
+ planes[2] = TextureEffect_Stage1_c0_c0_c2_c0(vec4(1.0));
+ planes[3] = TextureEffect_Stage1_c0_c0_c3_c0(vec4(1.0));
+ vec4 color = vec4(planes[0].x, planes[1].x, planes[2].x, planes[3].x);
+ color.xyz = clamp(color.xyz * ucolorSpaceMatrix_Stage1_c0_c0 + ucolorSpaceTranslate_Stage1_c0_c0, 0.0, 1.0);
+ color.xyz *= color.w;
+ _output = color;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = YUVtoRGBEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+uniform mat3 uCoordTransformMatrix_3_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+noperspective out vec2 vTransformedCoords_3_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_3_Stage0 = (uCoordTransformMatrix_3_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/19-7.shader_test b/shaders/skia/19-7.shader_test
new file mode 100644
index 0000000..7c0c3c7
--- /dev/null
+++ b/shaders/skia/19-7.shader_test
@@ -0,0 +1,45 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform mat3 ucolorSpaceMatrix_Stage1;
+uniform vec3 ucolorSpaceTranslate_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 TextureEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ vec4 planes[1];
+ planes[0] = TextureEffect_Stage1_c0_c0(vec4(1.0));
+ vec4 color = vec4(planes[0].x, planes[0].y, planes[0].z, planes[0].w);
+ color.xyz = clamp(color.xyz * ucolorSpaceMatrix_Stage1 + ucolorSpaceTranslate_Stage1, 0.0, 1.0);
+ color.xyz *= color.w;
+ output_Stage1 = color;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/19-72.shader_test b/shaders/skia/19-72.shader_test
new file mode 100644
index 0000000..ecc5b69
--- /dev/null
+++ b/shaders/skia/19-72.shader_test
@@ -0,0 +1,66 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform vec2 uBounds_Stage1;
+uniform vec4 uKernel_Stage1[2];
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0 - 3.0 * uImageIncrement_Stage1;
+ vec2 coordSampled = vec2(0.0, 0.0);
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].z;
+ coord += uImageIncrement_Stage1;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/19-77.shader_test b/shaders/skia/19-77.shader_test
new file mode 100644
index 0000000..86f5104
--- /dev/null
+++ b/shaders/skia/19-77.shader_test
@@ -0,0 +1,68 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uborder_Stage1;
+uniform vec4 usubset_Stage1;
+uniform vec4 unorm_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 TextureEffect_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage2, vTransformedCoords_1_Stage0) * _input;
+ return _output;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ vec2 inCoord = vTransformedCoords_0_Stage0;
+ inCoord *= unorm_Stage1.xy;
+ vec2 subsetCoord;
+ subsetCoord.x = inCoord.x;
+ subsetCoord.y = inCoord.y;
+ vec2 clampedCoord;
+ clampedCoord.x = subsetCoord.x;
+ clampedCoord.y = subsetCoord.y;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord * unorm_Stage1.zw);
+ if (inCoord.x < usubset_Stage1.x || inCoord.x > usubset_Stage1.z) {
+ textureColor = uborder_Stage1;
+ }
+ if (inCoord.y < usubset_Stage1.y || inCoord.y > usubset_Stage1.w) {
+ textureColor = uborder_Stage1;
+ }
+ output_Stage1 = textureColor;
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_src_over(output_Stage1, TextureEffect_Stage2_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/19-8.shader_test b/shaders/skia/19-8.shader_test
new file mode 100644
index 0000000..9d88e98
--- /dev/null
+++ b/shaders/skia/19-8.shader_test
@@ -0,0 +1,87 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform mat3 ucolorSpaceMatrix_Stage1_c0_c0;
+uniform vec3 ucolorSpaceTranslate_Stage1_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+uniform sampler2D uTextureSampler_2_Stage1;
+uniform sampler2D uTextureSampler_3_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+noperspective in vec2 vTransformedCoords_3_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_1_Stage1, vTransformedCoords_1_Stage0) * _input;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c0_c0_c2_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_2_Stage1, vTransformedCoords_2_Stage0) * _input;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c0_c0_c3_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_3_Stage1, vTransformedCoords_3_Stage0) * _input;
+ return _output;
+}
+vec4 YUVtoRGBEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 planes[4];
+ planes[0] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0));
+ planes[1] = TextureEffect_Stage1_c0_c0_c1_c0(vec4(1.0));
+ planes[2] = TextureEffect_Stage1_c0_c0_c2_c0(vec4(1.0));
+ planes[3] = TextureEffect_Stage1_c0_c0_c3_c0(vec4(1.0));
+ vec4 color = vec4(planes[0].x, planes[1].x, planes[2].x, planes[3].w);
+ color.xyz = clamp(color.xyz * ucolorSpaceMatrix_Stage1_c0_c0 + ucolorSpaceTranslate_Stage1_c0_c0, 0.0, 1.0);
+ color.xyz *= color.w;
+ _output = color;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = YUVtoRGBEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+uniform mat3 uCoordTransformMatrix_3_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+noperspective out vec2 vTransformedCoords_3_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_3_Stage0 = (uCoordTransformMatrix_3_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/19-85.shader_test b/shaders/skia/19-85.shader_test
new file mode 100644
index 0000000..cfe3bb5
--- /dev/null
+++ b/shaders/skia/19-85.shader_test
@@ -0,0 +1,62 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform float ucontrast_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TextureEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ vec4 color = output_Stage1;
+ float nonZeroAlpha = max(color.w, 9.9999997473787516e-05);
+ color = vec4(color.xyz / nonZeroAlpha, nonZeroAlpha);
+ color.xyz = color.xyz * color.xyz;
+ float luma = dot(color, vec4(0.2125999927520752, 0.71520000696182251, 0.072200000286102295, 0.0));
+ color = vec4(luma, luma, luma, 0.0);
+ if (ucontrast_Stage2 != 0.0) {
+ float m = (1.0 + ucontrast_Stage2) / (1.0 - ucontrast_Stage2);
+ float off = -0.5 * m + 0.5;
+ color = m * color + off;
+ }
+ color = clamp(color, 0.0, 1.0);
+ color.xyz = sqrt(color.xyz);
+ color.w = output_Stage1.w;
+ color.xyz *= color.w;
+ output_Stage2 = color;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/19-87.shader_test b/shaders/skia/19-87.shader_test
new file mode 100644
index 0000000..027ef75
--- /dev/null
+++ b/shaders/skia/19-87.shader_test
@@ -0,0 +1,29 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uColor_Stage0;
+noperspective in float vinCoverage_Stage0;
+void main() {
+ {
+ sk_FragColor = vec4(0.0);
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 inPosition;
+in float inCoverage;
+noperspective out float vinCoverage_Stage0;
+void main() {
+ vec2 pos2 = inPosition;
+ vinCoverage_Stage0 = inCoverage;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/19-92.shader_test b/shaders/skia/19-92.shader_test
new file mode 100644
index 0000000..474f89b
--- /dev/null
+++ b/shaders/skia/19-92.shader_test
@@ -0,0 +1,111 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_0_Stage0;
+ float t = -1.0;
+ float v = 1.0;
+ {
+ {
+ float fx = ufocalParams_Stage1_c0_c0_c0_c0.y;
+ float x_t = -1.0;
+ {
+ x_t = dot(p, p) / p.x;
+ }
+ {
+ if (x_t <= 0.0) {
+ v = -1.0;
+ }
+ }
+ {
+ {
+ t = x_t + fx;
+ }
+ }
+ }
+ }
+ _output = vec4(t, v, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/19-94.shader_test b/shaders/skia/19-94.shader_test
new file mode 100644
index 0000000..2c5bbbc
--- /dev/null
+++ b/shaders/skia/19-94.shader_test
@@ -0,0 +1,76 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_0_Stage0;
+ float t = -1.0;
+ {
+ {
+ float r0 = ufocalParams_Stage1_c0_c0_c0_c0.x;
+ {
+ t = -length(p) - r0;
+ }
+ }
+ }
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/19-95.shader_test b/shaders/skia/19-95.shader_test
new file mode 100644
index 0000000..121f9cd
--- /dev/null
+++ b/shaders/skia/19-95.shader_test
@@ -0,0 +1,126 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_0_Stage0;
+ float t = -1.0;
+ float v = 1.0;
+ {
+ {
+ float fx = ufocalParams_Stage1_c0_c0_c0_c0.y;
+ float x_t = -1.0;
+ {
+ x_t = dot(p, p) / p.x;
+ }
+ {
+ if (x_t <= 0.0) {
+ v = -1.0;
+ }
+ }
+ {
+ {
+ t = x_t + fx;
+ }
+ }
+ }
+ }
+ _output = vec4(t, v, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TiledGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_1_Stage0.x);
+ uint y = uint(vTransformedCoords_1_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ output_Stage2 = vec4(clamp(output_Stage2.xyz + value * 0.0039215688593685627, 0.0, output_Stage2.w), output_Stage2.w);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/19-96.shader_test b/shaders/skia/19-96.shader_test
new file mode 100644
index 0000000..2f3b96b
--- /dev/null
+++ b/shaders/skia/19-96.shader_test
@@ -0,0 +1,132 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_0_Stage0;
+ float t = -1.0;
+ float v = 1.0;
+ {
+ {
+ float invR1 = ufocalParams_Stage1_c0_c0_c0_c0.x;
+ float fx = ufocalParams_Stage1_c0_c0_c0_c0.y;
+ float x_t = -1.0;
+ {
+ float temp = p.x * p.x - p.y * p.y;
+ if (temp >= 0.0) {
+ {
+ x_t = -sqrt(temp) - p.x * invR1;
+ }
+ }
+ }
+ {
+ if (x_t <= 0.0) {
+ v = -1.0;
+ }
+ }
+ {
+ {
+ t = -x_t + fx;
+ }
+ }
+ }
+ }
+ _output = vec4(t, v, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TiledGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_1_Stage0.x);
+ uint y = uint(vTransformedCoords_1_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ output_Stage2 = vec4(clamp(output_Stage2.xyz + value * 0.0039215688593685627, 0.0, output_Stage2.w), output_Stage2.w);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/19-97.shader_test b/shaders/skia/19-97.shader_test
new file mode 100644
index 0000000..5debed4
--- /dev/null
+++ b/shaders/skia/19-97.shader_test
@@ -0,0 +1,91 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_0_Stage0;
+ float t = -1.0;
+ {
+ {
+ float r0 = ufocalParams_Stage1_c0_c0_c0_c0.x;
+ {
+ t = -length(p) - r0;
+ }
+ }
+ }
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TiledGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_1_Stage0.x);
+ uint y = uint(vTransformedCoords_1_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ output_Stage2 = vec4(clamp(output_Stage2.xyz + value * 0.0039215688593685627, 0.0, output_Stage2.w), output_Stage2.w);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/19-98.shader_test b/shaders/skia/19-98.shader_test
new file mode 100644
index 0000000..4683152
--- /dev/null
+++ b/shaders/skia/19-98.shader_test
@@ -0,0 +1,124 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_0_Stage0;
+ float t = -1.0;
+ float v = 1.0;
+ {
+ {
+ float fx = ufocalParams_Stage1_c0_c0_c0_c0.y;
+ float x_t = -1.0;
+ {
+ x_t = dot(p, p) / p.x;
+ }
+ {
+ if (x_t <= 0.0) {
+ v = -1.0;
+ }
+ }
+ {
+ {
+ t = x_t + fx;
+ }
+ }
+ }
+ }
+ _output = vec4(t, v, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else {
+ {
+ t.x = fract(t.x);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TiledGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_1_Stage0.x);
+ uint y = uint(vTransformedCoords_1_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ output_Stage2 = vec4(clamp(output_Stage2.xyz + value * 0.0039215688593685627, 0.0, output_Stage2.w), output_Stage2.w);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/19-99.shader_test b/shaders/skia/19-99.shader_test
new file mode 100644
index 0000000..9c79330
--- /dev/null
+++ b/shaders/skia/19-99.shader_test
@@ -0,0 +1,130 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_0_Stage0;
+ float t = -1.0;
+ float v = 1.0;
+ {
+ {
+ float invR1 = ufocalParams_Stage1_c0_c0_c0_c0.x;
+ float fx = ufocalParams_Stage1_c0_c0_c0_c0.y;
+ float x_t = -1.0;
+ {
+ float temp = p.x * p.x - p.y * p.y;
+ if (temp >= 0.0) {
+ {
+ x_t = -sqrt(temp) - p.x * invR1;
+ }
+ }
+ }
+ {
+ if (x_t <= 0.0) {
+ v = -1.0;
+ }
+ }
+ {
+ {
+ t = -x_t + fx;
+ }
+ }
+ }
+ }
+ _output = vec4(t, v, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else {
+ {
+ t.x = fract(t.x);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TiledGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_1_Stage0.x);
+ uint y = uint(vTransformedCoords_1_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ output_Stage2 = vec4(clamp(output_Stage2.xyz + value * 0.0039215688593685627, 0.0, output_Stage2.w), output_Stage2.w);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/19.shader_test b/shaders/skia/19.shader_test
new file mode 100644
index 0000000..3cfd853
--- /dev/null
+++ b/shaders/skia/19.shader_test
@@ -0,0 +1,75 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform sampler2DRect uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0_c0_c0(vec4 _input, vec2 _coords) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, _coords) * _input;
+ return _output;
+}
+vec4 Bicubic_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coord = vTransformedCoords_0_Stage0 - vec2(0.5);
+ vec2 f = fract(coord);
+ coord += 0.5 - f;
+ vec4 wx = mat4(0.055555555555555552, 0.88888888888888884, 0.055555555555555552, 0.0, -0.5, 0.0, 0.5, 0.0, 0.83333333333333337, -2.0, 1.5, -0.33333333333333331, -0.3888888888888889, 1.1666666666666667, -1.1666666666666667, 0.3888888888888889) * vec4(1.0, f.x, f.x * f.x, (f.x * f.x) * f.x);
+ vec4 wy = mat4(0.055555555555555552, 0.88888888888888884, 0.055555555555555552, 0.0, -0.5, 0.0, 0.5, 0.0, 0.83333333333333337, -2.0, 1.5, -0.33333333333333331, -0.3888888888888889, 1.1666666666666667, -1.1666666666666667, 0.3888888888888889) * vec4(1.0, f.y, f.y * f.y, (f.y * f.y) * f.y);
+ vec4 rowColors[4];
+ rowColors[0] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(-1.0, -1.0));
+ rowColors[1] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(0.0, -1.0));
+ rowColors[2] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(1.0, -1.0));
+ rowColors[3] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(2.0, -1.0));
+ vec4 s0 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ rowColors[0] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(-1.0, 0.0));
+ rowColors[1] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord);
+ rowColors[2] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(1.0, 0.0));
+ rowColors[3] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(2.0, 0.0));
+ vec4 s1 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ rowColors[0] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(-1.0, 1.0));
+ rowColors[1] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(0.0, 1.0));
+ rowColors[2] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(1.0, 1.0));
+ rowColors[3] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(2.0, 1.0));
+ vec4 s2 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ rowColors[0] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(-1.0, 2.0));
+ rowColors[1] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(0.0, 2.0));
+ rowColors[2] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(1.0, 2.0));
+ rowColors[3] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(2.0, 2.0));
+ vec4 s3 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ vec4 bicubicColor = ((wy.x * s0 + wy.y * s1) + wy.z * s2) + wy.w * s3;
+ bicubicColor = clamp(bicubicColor, 0.0, 1.0);
+ _output = bicubicColor * _input;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = Bicubic_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/190-2.shader_test b/shaders/skia/190-2.shader_test
new file mode 100644
index 0000000..8edaa5b
--- /dev/null
+++ b/shaders/skia/190-2.shader_test
@@ -0,0 +1,79 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage2_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c1_c0;
+ }
+ return _output;
+}
+vec4 blend_xor(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src + (1.0 - src.w) * dst;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_xor(ConstColorProcessor_Stage2_c1_c0(vec4(1.0)), output_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/190-3.shader_test b/shaders/skia/190-3.shader_test
new file mode 100644
index 0000000..a348925
--- /dev/null
+++ b/shaders/skia/190-3.shader_test
@@ -0,0 +1,193 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform float uSurfaceScale_Stage1;
+uniform vec3 uLightColor_Stage1;
+uniform float uKD_Stage1;
+uniform vec4 uTexDom_Stage1;
+uniform vec3 uDecalParams_Stage1;
+uniform vec3 uLightLocation_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 light_Stage1(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ float colorScale = uKD_Stage1 * dot(normal, surfaceToLight);
+ return vec4(lightColor * clamp(colorScale, 0.0, 1.0), 1.0);
+}
+float sobel_Stage1(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage1(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage1(float m[9], float surfaceScale) {
+ return pointToNormal_Stage1(sobel_Stage1(m[1], m[2], m[4], m[5], 0.0, 0.0, 0.66666698455810547), sobel_Stage1(0.0, 0.0, m[1], m[4], m[2], m[5], 0.66666698455810547), surfaceScale);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ vec2 coord = vTransformedCoords_0_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp0 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp5 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp6 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp7 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp8 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = normalize(uLightLocation_Stage1 - vec3(gl_FragCoord.xy, uSurfaceScale_Stage1 * m[4]));
+ output_Stage1 = light_Stage1(normal_Stage1(m, uSurfaceScale_Stage1), surfaceToLight, uLightColor_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/190-5.shader_test b/shaders/skia/190-5.shader_test
new file mode 100644
index 0000000..ecbbb1c
--- /dev/null
+++ b/shaders/skia/190-5.shader_test
@@ -0,0 +1,39 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+noperspective in vec4 vcolor_Stage0;
+noperspective in float vinCoverage_Stage0;
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ float alpha = 1.0;
+ alpha = vinCoverage_Stage0;
+ outputCoverage_Stage0 = vec4(alpha);
+ }
+ {
+ sk_FragColor = outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 inPosition;
+in vec4 inColor;
+in float inCoverage;
+noperspective out vec4 vcolor_Stage0;
+noperspective out float vinCoverage_Stage0;
+void main() {
+ vec4 color = inColor;
+ vcolor_Stage0 = color;
+ vec2 pos2 = inPosition;
+ vinCoverage_Stage0 = inCoverage;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/190-6.shader_test b/shaders/skia/190-6.shader_test
new file mode 100644
index 0000000..245762c
--- /dev/null
+++ b/shaders/skia/190-6.shader_test
@@ -0,0 +1,116 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage2;
+uniform vec2 uBounds_Stage2;
+uniform vec4 uKernel_Stage2[5];
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_1_Stage0 - 8.0 * uImageIncrement_Stage2;
+ vec2 coordSampled = vec2(0.0, 0.0);
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage2.x, uBounds_Stage2.y);
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[0].x;
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage2.x, uBounds_Stage2.y);
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[0].y;
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage2.x, uBounds_Stage2.y);
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[0].z;
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage2.x, uBounds_Stage2.y);
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[0].w;
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage2.x, uBounds_Stage2.y);
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[1].x;
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage2.x, uBounds_Stage2.y);
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[1].y;
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage2.x, uBounds_Stage2.y);
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[1].z;
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage2.x, uBounds_Stage2.y);
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[1].w;
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage2.x, uBounds_Stage2.y);
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[2].x;
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage2.x, uBounds_Stage2.y);
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[2].y;
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage2.x, uBounds_Stage2.y);
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[2].z;
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage2.x, uBounds_Stage2.y);
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[2].w;
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage2.x, uBounds_Stage2.y);
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[3].x;
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage2.x, uBounds_Stage2.y);
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[3].y;
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage2.x, uBounds_Stage2.y);
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[3].z;
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage2.x, uBounds_Stage2.y);
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[3].w;
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage2.x, uBounds_Stage2.y);
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[4].x;
+ coord += uImageIncrement_Stage2;
+ output_Stage2 *= output_Stage1;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/190.shader_test b/shaders/skia/190.shader_test
new file mode 100644
index 0000000..4d15724
--- /dev/null
+++ b/shaders/skia/190.shader_test
@@ -0,0 +1,165 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage2;
+uniform vec4 ucolor_Stage3_c1_c0;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.w) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ } else {
+ {
+ if (t < uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+vec4 ComposeOne_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_dst_in(_input, TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0)));
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = ComposeOne_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 ConstColorProcessor_Stage3_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage3_c1_c0;
+ }
+ return _output;
+}
+vec4 blend_src_out(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 blend_darken(vec4 src, vec4 dst) {
+ vec4 result = blend_src_over(src, dst);
+ result.xyz = min(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
+ return result;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_src_out(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ {
+ output_Stage2 = output_Stage1 * ucolor_Stage2;
+ }
+ }
+ vec4 output_Stage3;
+ {
+ output_Stage3 = blend_darken(ConstColorProcessor_Stage3_c1_c0(vec4(1.0)), output_Stage2);
+ }
+ {
+ sk_FragColor = output_Stage3;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 inColor;
+in vec2 inLocalCoord;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1900.shader_test b/shaders/skia/1900.shader_test
new file mode 100644
index 0000000..66193c4
--- /dev/null
+++ b/shaders/skia/1900.shader_test
@@ -0,0 +1,206 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 ucolor_Stage1_c0_c0_c0_c0;
+uniform vec4 uellipse_Stage1_c0_c0_c1_c0_c1_c0;
+uniform vec2 ubaseFrequency_Stage1_c1_c0_c0_c0;
+uniform float uz_Stage1_c1_c0_c0_c0;
+uniform vec4 ucolor_Stage1_c1_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 ConstColorProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = _input.w * ucolor_Stage1_c0_c0_c0_c0;
+ }
+ return _output;
+}
+vec4 ClampFragmentProcessor_Stage1_c0_c0_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ float alpha = clamp(_input.w, 0.0, 1.0);
+ _output = vec4(clamp(_input.xyz, 0.0, alpha), alpha);
+ }
+ return _output;
+}
+vec4 EllipseEffect_Stage1_c0_c0_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 d = gl_FragCoord.xy - uellipse_Stage1_c0_c0_c1_c0_c1_c0.xy;
+ vec2 Z = d * uellipse_Stage1_c0_c0_c1_c0_c1_c0.zw;
+ float implicit = dot(Z, d) - 1.0;
+ float grad_dot = 4.0 * dot(Z, Z);
+ {
+ grad_dot = max(grad_dot, 1.1754999560161448e-38);
+ }
+ float approx_dist = implicit * inversesqrt(grad_dot);
+ float alpha;
+ {
+ alpha = clamp(0.5 - approx_dist, 0.0, 1.0);
+ }
+ _output = _input * alpha;
+ return _output;
+}
+vec4 blend_src_atop(vec4 src, vec4 dst) {
+ return dst.w * src + (1.0 - src.w) * dst;
+}
+vec4 ComposeTwo_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_src_atop(ClampFragmentProcessor_Stage1_c0_c0_c1_c0_c0_c0(inputColor), EllipseEffect_Stage1_c0_c0_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+float _blend_color_saturation(vec3 color) {
+ return max(max(color.x, color.y), color.z) - min(min(color.x, color.y), color.z);
+}
+vec3 _blend_set_color_saturation_helper(vec3 minMidMax, float sat) {
+ if (minMidMax.x < minMidMax.z) {
+ return vec3(0.0, (sat * (minMidMax.y - minMidMax.x)) / (minMidMax.z - minMidMax.x), sat);
+ }
+ return vec3(0.0);
+}
+vec3 _blend_set_color_saturation(vec3 hueLumColor, vec3 satColor) {
+ float sat = _blend_color_saturation(satColor);
+ if (hueLumColor.x <= hueLumColor.y) {
+ if (hueLumColor.y <= hueLumColor.z) {
+ hueLumColor.xyz = _blend_set_color_saturation_helper(hueLumColor, sat);
+ } else if (hueLumColor.x <= hueLumColor.z) {
+ hueLumColor.xzy = _blend_set_color_saturation_helper(hueLumColor.xzy, sat);
+ } else {
+ hueLumColor.zxy = _blend_set_color_saturation_helper(hueLumColor.zxy, sat);
+ }
+ } else if (hueLumColor.x <= hueLumColor.z) {
+ hueLumColor.yxz = _blend_set_color_saturation_helper(hueLumColor.yxz, sat);
+ } else if (hueLumColor.y <= hueLumColor.z) {
+ hueLumColor.yzx = _blend_set_color_saturation_helper(hueLumColor.yzx, sat);
+ } else {
+ hueLumColor.zyx = _blend_set_color_saturation_helper(hueLumColor.zyx, sat);
+ }
+ return hueLumColor;
+}
+float _blend_color_luminance(vec3 color) {
+ return dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), color);
+}
+vec3 _blend_set_color_luminance(vec3 hueSatColor, float alpha, vec3 lumColor) {
+ float lum = _blend_color_luminance(lumColor);
+ vec3 result = (lum - _blend_color_luminance(hueSatColor)) + hueSatColor;
+ float minComp = min(min(result.x, result.y), result.z);
+ float maxComp = max(max(result.x, result.y), result.z);
+ if (minComp < 0.0 && lum != minComp) {
+ result = lum + ((result - lum) * lum) / (lum - minComp);
+ }
+ if (maxComp > alpha && maxComp != lum) {
+ return lum + ((result - lum) * (alpha - lum)) / (maxComp - lum);
+ }
+ return result;
+}
+vec4 blend_saturation(vec4 src, vec4 dst) {
+ float alpha = dst.w * src.w;
+ vec3 sda = src.xyz * dst.w;
+ vec3 dsa = dst.xyz * src.w;
+ return vec4((((_blend_set_color_luminance(_blend_set_color_saturation(dsa, sda), alpha, dsa) + dst.xyz) - dsa) + src.xyz) - sda, (src.w + dst.w) - alpha);
+}
+vec4 ComposeTwo_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_saturation(ConstColorProcessor_Stage1_c0_c0_c0_c0(inputColor), ComposeTwo_Stage1_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec3 fade_Stage1_c1_c0_c0_c0(vec3 t) {
+ return ((t * t) * t) * (t * (t * 6.0 - 15.0) + 10.0);
+}
+float perm_Stage1_c1_c0_c0_c0(float x) {
+ return texture(uTextureSampler_0_Stage1, vec2(fract(x / 256.0), 0.0)).x * 255.0;
+}
+float grad_Stage1_c1_c0_c0_c0(float x, vec3 p) {
+ return dot(texture(uTextureSampler_1_Stage1, vec2(fract(x / 16.0), 0.0)).xyz * 255.0 - vec3(1.0), p);
+}
+float lerp_Stage1_c1_c0_c0_c0(float a, float b, float w) {
+ return a + w * (b - a);
+}
+float noise_Stage1_c1_c0_c0_c0(vec3 p) {
+ vec3 P = mod(floor(p), 256.0);
+ p -= floor(p);
+ vec3 f = fade_Stage1_c1_c0_c0_c0(p);
+ float A = perm_Stage1_c1_c0_c0_c0(P.x) + P.y;
+ float AA = perm_Stage1_c1_c0_c0_c0(A) + P.z;
+ float AB = perm_Stage1_c1_c0_c0_c0(A + 1.0) + P.z;
+ float B = perm_Stage1_c1_c0_c0_c0(P.x + 1.0) + P.y;
+ float BA = perm_Stage1_c1_c0_c0_c0(B) + P.z;
+ float BB = perm_Stage1_c1_c0_c0_c0(B + 1.0) + P.z;
+ float result = lerp_Stage1_c1_c0_c0_c0(lerp_Stage1_c1_c0_c0_c0(lerp_Stage1_c1_c0_c0_c0(grad_Stage1_c1_c0_c0_c0(perm_Stage1_c1_c0_c0_c0(AA), p), grad_Stage1_c1_c0_c0_c0(perm_Stage1_c1_c0_c0_c0(BA), p + vec3(-1.0, 0.0, 0.0)), f.x), lerp_Stage1_c1_c0_c0_c0(grad_Stage1_c1_c0_c0_c0(perm_Stage1_c1_c0_c0_c0(AB), p + vec3(0.0, -1.0, 0.0)), grad_Stage1_c1_c0_c0_c0(perm_Stage1_c1_c0_c0_c0(BB), p + vec3(-1.0, -1.0, 0.0)), f.x), f.y), lerp_Stage1_c1_c0_c0_c0(lerp_Stage1_c1_c0_c0_c0(grad_Stage1_c1_c0_c0_c0(perm_Stage1_c1_c0_c0_c0(AA + 1.0), p + vec3(0.0, 0.0, -1.0)), grad_Stage1_c1_c0_c0_c0(perm_Stage1_c1_c0_c0_c0(BA + 1.0), p + vec3(-1.0, 0.0, -1.0)), f.x), lerp_Stage1_c1_c0_c0_c0(grad_Stage1_c1_c0_c0_c0(perm_Stage1_c1_c0_c0_c0(AB + 1.0), p + vec3(0.0, -1.0, -1.0)), grad_Stage1_c1_c0_c0_c0(perm_Stage1_c1_c0_c0_c0(BB + 1.0), p + vec3(-1.0, -1.0, -1.0)), f.x), f.y), f.z);
+ return result;
+}
+float noiseOctaves_Stage1_c1_c0_c0_c0(vec3 p) {
+ float result = 0.0;
+ float ratio = 1.0;
+ for (float i = 0.0;i < 5.0; i++) {
+ result += noise_Stage1_c1_c0_c0_c0(p) / ratio;
+ p *= 2.0;
+ ratio *= 2.0;
+ }
+ return (result + 1.0) / 2.0;
+}
+vec4 ImprovedPerlinNoise_Stage1_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coords = vTransformedCoords_0_Stage0 * ubaseFrequency_Stage1_c1_c0_c0_c0;
+ float r = noiseOctaves_Stage1_c1_c0_c0_c0(vec3(coords, uz_Stage1_c1_c0_c0_c0));
+ float g = noiseOctaves_Stage1_c1_c0_c0_c0(vec3(coords, uz_Stage1_c1_c0_c0_c0));
+ float b = noiseOctaves_Stage1_c1_c0_c0_c0(vec3(coords, uz_Stage1_c1_c0_c0_c0));
+ float a = noiseOctaves_Stage1_c1_c0_c0_c0(vec3(coords, uz_Stage1_c1_c0_c0_c0));
+ _output = vec4(r, g, b, a);
+ _output = clamp(_output, 0.0, 1.0);
+ _output = vec4(_output.xyz * _output.www, _output.w);
+ return _output;
+}
+vec4 ConstColorProcessor_Stage1_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = _input.w * ucolor_Stage1_c1_c0_c1_c0;
+ }
+ return _output;
+}
+vec4 blend_multiply(vec4 src, vec4 dst) {
+ return vec4(((1.0 - src.w) * dst.xyz + (1.0 - dst.w) * src.xyz) + src.xyz * dst.xyz, src.w + (1.0 - src.w) * dst.w);
+}
+vec4 ComposeTwo_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_multiply(ImprovedPerlinNoise_Stage1_c1_c0_c0_c0(inputColor), ConstColorProcessor_Stage1_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(vec4(1.0).xyz, 1.0);
+ output_Stage1 = blend_src_in(ComposeTwo_Stage1_c0_c0(inputColor), ComposeTwo_Stage1_c1_c0(inputColor));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1903.shader_test b/shaders/skia/1903.shader_test
new file mode 100644
index 0000000..847a8fe
--- /dev/null
+++ b/shaders/skia/1903.shader_test
@@ -0,0 +1,148 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_KHR_blend_equation_advanced : require
+out vec4 sk_FragColor;
+layout (blend_support_all_equations) out ;
+uniform float uPixelSize_Stage1_c0_c0;
+uniform vec2 uRange_Stage1_c0_c0;
+uniform vec4 uellipse_Stage1_c1_c0_c0_c0_c0_c0;
+uniform vec4 ucircle_Stage1_c1_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+noperspective in vec2 vEllipseOffsets_Stage0;
+noperspective in vec4 vEllipseRadii_Stage0;
+noperspective in vec4 vinColor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 Morphology_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0;
+ coord.y -= 7.0 * uPixelSize_Stage1_c0_c0;
+ for (int i = 0;i < 15; i++) {
+ _output = max(_output, texture(uTextureSampler_0_Stage1, coord));
+ coord.y += uPixelSize_Stage1_c0_c0;
+ }
+ _output *= _input;
+ return _output;
+}
+vec4 EllipseEffect_Stage1_c1_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 d = gl_FragCoord.xy - uellipse_Stage1_c1_c0_c0_c0_c0_c0.xy;
+ vec2 Z = d * uellipse_Stage1_c1_c0_c0_c0_c0_c0.zw;
+ float implicit = dot(Z, d) - 1.0;
+ float grad_dot = 4.0 * dot(Z, Z);
+ {
+ grad_dot = max(grad_dot, 1.1754999560161448e-38);
+ }
+ float approx_dist = implicit * inversesqrt(grad_dot);
+ float alpha;
+ {
+ alpha = approx_dist > 0.0 ? 0.0 : 1.0;
+ }
+ _output = _input * alpha;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c1_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_1_Stage1, vTransformedCoords_1_Stage0) * _input;
+ return _output;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 ComposeTwo_Stage1_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_src_over(EllipseEffect_Stage1_c1_c0_c0_c0_c0_c0(inputColor), TextureEffect_Stage1_c1_c0_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 CircleEffect_Stage1_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float d;
+ {
+ d = (length((ucircle_Stage1_c1_c0_c1_c0.xy - gl_FragCoord.xy) * ucircle_Stage1_c1_c0_c1_c0.w) - 1.0) * ucircle_Stage1_c1_c0_c1_c0.z;
+ }
+ {
+ _output = d > 0.5 ? _input : vec4(0.0);
+ }
+ return _output;
+}
+vec4 blend_dst_out(vec4 src, vec4 dst) {
+ return (1.0 - src.w) * dst;
+}
+vec4 ComposeTwo_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_dst_out(ComposeTwo_Stage1_c1_c0_c0_c0(inputColor), CircleEffect_Stage1_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 blend_darken(vec4 src, vec4 dst) {
+ vec4 result = blend_src_over(src, dst);
+ result.xyz = min(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
+ return result;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vinColor_Stage0;
+ vec2 offset = vEllipseOffsets_Stage0;
+ offset *= vEllipseRadii_Stage0.xy;
+ float test = dot(offset, offset) - 1.0;
+ vec2 grad = (2.0 * offset) * vEllipseRadii_Stage0.xy;
+ float grad_dot = dot(grad, grad);
+ grad_dot = max(grad_dot, 1.1754999560161448e-38);
+ float invlen = inversesqrt(grad_dot);
+ float edgeAlpha = clamp(0.5 - test * invlen, 0.0, 1.0);
+ offset = vEllipseOffsets_Stage0 * vEllipseRadii_Stage0.zw;
+ test = dot(offset, offset) - 1.0;
+ grad = (2.0 * offset) * vEllipseRadii_Stage0.zw;
+ grad_dot = dot(grad, grad);
+ invlen = inversesqrt(grad_dot);
+ edgeAlpha *= clamp(0.5 + test * invlen, 0.0, 1.0);
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_darken(Morphology_Stage1_c0_c0(inputColor), ComposeTwo_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ sk_FragColor = outputCoverage_Stage0 * output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec2 inEllipseOffset;
+in vec4 inEllipseRadii;
+noperspective out vec2 vEllipseOffsets_Stage0;
+noperspective out vec4 vEllipseRadii_Stage0;
+noperspective out vec4 vinColor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vEllipseOffsets_Stage0 = inEllipseOffset;
+ vEllipseRadii_Stage0 = inEllipseRadii;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1906.shader_test b/shaders/skia/1906.shader_test
new file mode 100644
index 0000000..5349761
--- /dev/null
+++ b/shaders/skia/1906.shader_test
@@ -0,0 +1,497 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform float uSrcTF_Stage0[7];
+uniform mat3 uColorXform_Stage0;
+uniform float uDstTF_Stage0[7];
+uniform vec2 uImageIncrement_Stage1_c0_c0_c0_c0;
+uniform vec4 uKernel_Stage1_c0_c0_c0_c0[4];
+uniform vec2 uKernelOffset_Stage1_c0_c0_c0_c0;
+uniform float uGain_Stage1_c0_c0_c0_c0;
+uniform float uBias_Stage1_c0_c0_c0_c0;
+uniform float ucornerRadius_Stage1_c0_c0_c1_c0_c0_c0;
+uniform vec4 uproxyRect_Stage1_c0_c0_c1_c0_c0_c0;
+uniform float ublurRadius_Stage1_c0_c0_c1_c0_c0_c0;
+uniform vec4 urectH_Stage1_c1_c0_c0_c0_c1_c0;
+uniform float uinvSixSigma_Stage1_c1_c0_c0_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+uniform sampler2D uTextureSampler_2_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+noperspective in vec2 vtextureCoords_Stage0;
+flat in vec4 vtextureDomain_Stage0;
+flat in vec4 vcolor_Stage0;
+float src_tf_Stage0(float x) {
+ float G = uSrcTF_Stage0[0];
+ float A = uSrcTF_Stage0[1];
+ float B = uSrcTF_Stage0[2];
+ float C = uSrcTF_Stage0[3];
+ float D = uSrcTF_Stage0[4];
+ float E = uSrcTF_Stage0[5];
+ float F = uSrcTF_Stage0[6];
+ float s = sign(x);
+ x = abs(x);
+ x = x < D ? C * x + F : pow(A * x + B, G) + E;
+ return s * x;
+}
+float dst_tf_Stage0(float x) {
+ float G = uDstTF_Stage0[0];
+ float A = uDstTF_Stage0[1];
+ float B = uDstTF_Stage0[2];
+ float C = uDstTF_Stage0[3];
+ float D = uDstTF_Stage0[4];
+ float E = uDstTF_Stage0[5];
+ float F = uDstTF_Stage0[6];
+ float s = sign(x);
+ x = abs(x);
+ x = x < D ? C * x + F : pow(A * x + B, G) + E;
+ return s * x;
+}
+vec4 gamut_xform_Stage0(vec4 color) {
+ color.xyz = uColorXform_Stage0 * color.xyz;
+ return color;
+}
+vec4 color_xform_Stage0(vec4 color) {
+ float nonZeroAlpha = max(color.w, 9.9999997473787516e-05);
+ color = vec4(color.xyz / nonZeroAlpha, nonZeroAlpha);
+ color.x = src_tf_Stage0(color.x);
+ color.y = src_tf_Stage0(color.y);
+ color.z = src_tf_Stage0(color.z);
+ color = gamut_xform_Stage0(color);
+ color.x = dst_tf_Stage0(color.x);
+ color.y = dst_tf_Stage0(color.y);
+ color.z = dst_tf_Stage0(color.z);
+ color.xyz *= color.w;
+ return color;
+}
+vec4 MatrixConvolution_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 sum = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0 - uKernelOffset_Stage1_c0_c0_c0_c0 * uImageIncrement_Stage1_c0_c0_c0_c0;
+ vec4 c;
+ {
+ float k = uKernel_Stage1_c0_c0_c0_c0[0].x;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c0_c0[0].y;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c0_c0[0].z;
+ {
+ vec2 origCoord = coord + vec2(2.0, 0.0) * uImageIncrement_Stage1_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c0_c0[0].w;
+ {
+ vec2 origCoord = coord + vec2(3.0, 0.0) * uImageIncrement_Stage1_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c0_c0[1].x;
+ {
+ vec2 origCoord = coord + vec2(4.0, 0.0) * uImageIncrement_Stage1_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c0_c0[1].y;
+ {
+ vec2 origCoord = coord + vec2(5.0, 0.0) * uImageIncrement_Stage1_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c0_c0[1].z;
+ {
+ vec2 origCoord = coord + vec2(6.0, 0.0) * uImageIncrement_Stage1_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c0_c0[1].w;
+ {
+ vec2 origCoord = coord + vec2(7.0, 0.0) * uImageIncrement_Stage1_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c0_c0[2].x;
+ {
+ vec2 origCoord = coord + vec2(8.0, 0.0) * uImageIncrement_Stage1_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c0_c0[2].y;
+ {
+ vec2 origCoord = coord + vec2(9.0, 0.0) * uImageIncrement_Stage1_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c0_c0[2].z;
+ {
+ vec2 origCoord = coord + vec2(10.0, 0.0) * uImageIncrement_Stage1_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c0_c0[2].w;
+ {
+ vec2 origCoord = coord + vec2(11.0, 0.0) * uImageIncrement_Stage1_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c0_c0[3].x;
+ {
+ vec2 origCoord = coord + vec2(12.0, 0.0) * uImageIncrement_Stage1_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c0_c0[3].y;
+ {
+ vec2 origCoord = coord + vec2(13.0, 0.0) * uImageIncrement_Stage1_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c0_c0[3].z;
+ {
+ vec2 origCoord = coord + vec2(14.0, 0.0) * uImageIncrement_Stage1_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c0_c0[3].w;
+ {
+ vec2 origCoord = coord + vec2(15.0, 0.0) * uImageIncrement_Stage1_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ _output = sum * uGain_Stage1_c0_c0_c0_c0 + uBias_Stage1_c0_c0_c0_c0;
+ _output.w = clamp(_output.w, 0.0, 1.0);
+ _output.xyz = clamp(_output.xyz, 0.0, _output.w);
+ _output *= _input;
+ return _output;
+}
+vec4 RRectBlurEffect_Stage1_c0_c0_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 translatedFragPos = gl_FragCoord.xy - uproxyRect_Stage1_c0_c0_c1_c0_c0_c0.xy;
+ float threshold = ucornerRadius_Stage1_c0_c0_c1_c0_c0_c0 + 2.0 * ublurRadius_Stage1_c0_c0_c1_c0_c0_c0;
+ vec2 middle = (uproxyRect_Stage1_c0_c0_c1_c0_c0_c0.zw - uproxyRect_Stage1_c0_c0_c1_c0_c0_c0.xy) - 2.0 * threshold;
+ if (translatedFragPos.x >= threshold && translatedFragPos.x < middle.x + threshold) {
+ translatedFragPos.x = threshold;
+ } else if (translatedFragPos.x >= middle.x + threshold) {
+ translatedFragPos.x -= middle.x - 1.0;
+ }
+ if (translatedFragPos.y > threshold && translatedFragPos.y < middle.y + threshold) {
+ translatedFragPos.y = threshold;
+ } else if (translatedFragPos.y >= middle.y + threshold) {
+ translatedFragPos.y -= middle.y - 1.0;
+ }
+ vec2 proxyDims = vec2(2.0 * threshold + 1.0);
+ vec2 texCoord = translatedFragPos / proxyDims;
+ _output = _input * texture(uTextureSampler_1_Stage1, texCoord);
+ return _output;
+}
+vec4 Dither_Stage1_c0_c0_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = _input;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_1_Stage0.x);
+ uint y = uint(vTransformedCoords_1_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ _output = vec4(clamp(_output.xyz + value * 0.01587301678955555, 0.0, _output.w), _output.w);
+ return _output;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 blend_darken(vec4 src, vec4 dst) {
+ vec4 result = blend_src_over(src, dst);
+ result.xyz = min(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
+ return result;
+}
+vec4 ComposeTwo_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_darken(RRectBlurEffect_Stage1_c0_c0_c1_c0_c0_c0(inputColor), Dither_Stage1_c0_c0_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+float _blend_color_saturation(vec3 color) {
+ return max(max(color.x, color.y), color.z) - min(min(color.x, color.y), color.z);
+}
+vec3 _blend_set_color_saturation_helper(vec3 minMidMax, float sat) {
+ if (minMidMax.x < minMidMax.z) {
+ return vec3(0.0, (sat * (minMidMax.y - minMidMax.x)) / (minMidMax.z - minMidMax.x), sat);
+ }
+ return vec3(0.0);
+}
+vec3 _blend_set_color_saturation(vec3 hueLumColor, vec3 satColor) {
+ float sat = _blend_color_saturation(satColor);
+ if (hueLumColor.x <= hueLumColor.y) {
+ if (hueLumColor.y <= hueLumColor.z) {
+ hueLumColor.xyz = _blend_set_color_saturation_helper(hueLumColor, sat);
+ } else if (hueLumColor.x <= hueLumColor.z) {
+ hueLumColor.xzy = _blend_set_color_saturation_helper(hueLumColor.xzy, sat);
+ } else {
+ hueLumColor.zxy = _blend_set_color_saturation_helper(hueLumColor.zxy, sat);
+ }
+ } else if (hueLumColor.x <= hueLumColor.z) {
+ hueLumColor.yxz = _blend_set_color_saturation_helper(hueLumColor.yxz, sat);
+ } else if (hueLumColor.y <= hueLumColor.z) {
+ hueLumColor.yzx = _blend_set_color_saturation_helper(hueLumColor.yzx, sat);
+ } else {
+ hueLumColor.zyx = _blend_set_color_saturation_helper(hueLumColor.zyx, sat);
+ }
+ return hueLumColor;
+}
+float _blend_color_luminance(vec3 color) {
+ return dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), color);
+}
+vec3 _blend_set_color_luminance(vec3 hueSatColor, float alpha, vec3 lumColor) {
+ float lum = _blend_color_luminance(lumColor);
+ vec3 result = (lum - _blend_color_luminance(hueSatColor)) + hueSatColor;
+ float minComp = min(min(result.x, result.y), result.z);
+ float maxComp = max(max(result.x, result.y), result.z);
+ if (minComp < 0.0 && lum != minComp) {
+ result = lum + ((result - lum) * lum) / (lum - minComp);
+ }
+ if (maxComp > alpha && maxComp != lum) {
+ return lum + ((result - lum) * (alpha - lum)) / (maxComp - lum);
+ }
+ return result;
+}
+vec4 blend_saturation(vec4 src, vec4 dst) {
+ float alpha = dst.w * src.w;
+ vec3 sda = src.xyz * dst.w;
+ vec3 dsa = dst.xyz * src.w;
+ return vec4((((_blend_set_color_luminance(_blend_set_color_saturation(dsa, sda), alpha, dsa) + dst.xyz) - dsa) + src.xyz) - sda, (src.w + dst.w) - alpha);
+}
+vec4 ComposeTwo_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_saturation(MatrixConvolution_Stage1_c0_c0_c0_c0(inputColor), ComposeTwo_Stage1_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 ConfigConversionEffect_Stage1_c1_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = floor(_input * 255.0 + 0.5) / 255.0;
+ {
+ _output.xyz = floor((_output.xyz * _output.w) * 255.0 + 0.5) / 255.0;
+ }
+ return _output;
+}
+vec4 RectBlurEffect_Stage1_c1_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float xCoverage, yCoverage;
+ {
+ float x, y;
+ {
+ x = max(urectH_Stage1_c1_c0_c0_c0_c1_c0.x - gl_FragCoord.x, gl_FragCoord.x - urectH_Stage1_c1_c0_c0_c0_c1_c0.z);
+ y = max(urectH_Stage1_c1_c0_c0_c0_c1_c0.y - gl_FragCoord.y, gl_FragCoord.y - urectH_Stage1_c1_c0_c0_c0_c1_c0.w);
+ }
+ xCoverage = texture(uTextureSampler_2_Stage1, vec2(x * uinvSixSigma_Stage1_c1_c0_c0_c0_c1_c0, 0.5)).w;
+ yCoverage = texture(uTextureSampler_2_Stage1, vec2(y * uinvSixSigma_Stage1_c1_c0_c0_c0_c1_c0, 0.5)).w;
+ _output = (_input * xCoverage) * yCoverage;
+ }
+ _output = (_input * xCoverage) * yCoverage;
+ return _output;
+}
+float _blend_overlay_component(float sc, float sa, float dc, float da) {
+ if (2.0 * dc <= da) {
+ return (2.0 * sc) * dc;
+ }
+ return sa * da - (2.0 * (da - dc)) * (sa - sc);
+}
+vec4 blend_overlay(vec4 src, vec4 dst) {
+ vec4 result = vec4(_blend_overlay_component(src.x, src.w, dst.x, dst.w), _blend_overlay_component(src.y, src.w, dst.y, dst.w), _blend_overlay_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+ result.xyz += dst.xyz * (1.0 - src.w) + src.xyz * (1.0 - dst.w);
+ return result;
+}
+vec4 ComposeTwo_Stage1_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_overlay(ConfigConversionEffect_Stage1_c1_c0_c0_c0_c0_c0(inputColor), RectBlurEffect_Stage1_c1_c0_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 ConfigConversionEffect_Stage1_c1_c0_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = floor(_input * 255.0 + 0.5) / 255.0;
+ {
+ _output.xyz = floor((_output.xyz * _output.w) * 255.0 + 0.5) / 255.0;
+ }
+ return _output;
+}
+vec4 Dither_Stage1_c1_c0_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = _input;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_2_Stage0.x);
+ uint y = uint(vTransformedCoords_2_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ _output = vec4(clamp(_output.xyz + value * 0.066666670143604279, 0.0, _output.w), _output.w);
+ return _output;
+}
+vec4 ComposeTwo_Stage1_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_src_over(ConfigConversionEffect_Stage1_c1_c0_c1_c0_c0_c0(inputColor), Dither_Stage1_c1_c0_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 ComposeTwo_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_src_over(ComposeTwo_Stage1_c1_c0_c0_c0(inputColor), ComposeTwo_Stage1_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 blend_dst_over(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src + dst;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ vec2 textureCoords;
+ textureCoords = vtextureCoords_Stage0;
+ vec4 textureDomain;
+ textureDomain = vtextureDomain_Stage0;
+ outputColor_Stage0 = vcolor_Stage0;
+ outputColor_Stage0 = color_xform_Stage0(texture(uTextureSampler_0_Stage0, clamp(textureCoords, textureDomain.xy, textureDomain.zw))) * outputColor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_dst_over(ComposeTwo_Stage1_c0_c0(inputColor), ComposeTwo_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+in vec2 position;
+in vec2 textureCoords;
+in vec4 textureDomain;
+in vec4 color;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+noperspective out vec2 vtextureCoords_Stage0;
+flat out vec4 vtextureDomain_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vec2 pos2 = position;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(textureCoords, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(textureCoords, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(textureCoords, 1.0)).xy;
+ vtextureCoords_Stage0 = textureCoords;
+ vtextureDomain_Stage0 = textureDomain;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1909.shader_test b/shaders/skia/1909.shader_test
new file mode 100644
index 0000000..0b78ec1
--- /dev/null
+++ b/shaders/skia/1909.shader_test
@@ -0,0 +1,50 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+uniform vec4 urectUniform_Stage1;
+noperspective in vec2 vEllipseOffsets_Stage0;
+noperspective in vec4 vEllipseRadii_Stage0;
+noperspective in vec4 vinColor_Stage0;
+void main() {
+ {
+ vec2 offset = vEllipseOffsets_Stage0;
+ vec2 grad = (2.0 * offset) * vEllipseRadii_Stage0.xy;
+ float grad_dot = dot(grad, grad);
+ grad_dot = max(grad_dot, 1.1754999560161448e-38);
+ }
+ {
+ {
+ float xSub, ySub;
+ xSub = min(gl_FragCoord.x - urectUniform_Stage1.x, 0.0);
+ xSub += min(urectUniform_Stage1.z - gl_FragCoord.x, 0.0);
+ ySub = min(gl_FragCoord.y - urectUniform_Stage1.y, 0.0);
+ ySub += min(urectUniform_Stage1.w - gl_FragCoord.y, 0.0);
+ }
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 inPosition;
+in vec4 inColor;
+in vec2 inEllipseOffset;
+in vec4 inEllipseRadii;
+noperspective out vec2 vEllipseOffsets_Stage0;
+noperspective out vec4 vEllipseRadii_Stage0;
+noperspective out vec4 vinColor_Stage0;
+void main() {
+ vEllipseOffsets_Stage0 = inEllipseOffset;
+ vEllipseRadii_Stage0 = inEllipseRadii;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = inPosition;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1912.shader_test b/shaders/skia/1912.shader_test
new file mode 100644
index 0000000..3a9f18d
--- /dev/null
+++ b/shaders/skia/1912.shader_test
@@ -0,0 +1,41 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+noperspective in vec4 vinCircleEdge_Stage0;
+noperspective in vec4 vinColor_Stage0;
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ vec4 circleEdge;
+ circleEdge = vinCircleEdge_Stage0;
+ float d = length(circleEdge.xy);
+ float distanceToOuterEdge = circleEdge.z * (1.0 - d);
+ float edgeAlpha = clamp(distanceToOuterEdge, 0.0, 1.0);
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ {
+ sk_FragColor = outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 inPosition;
+in vec4 inColor;
+in vec4 inCircleEdge;
+noperspective out vec4 vinCircleEdge_Stage0;
+noperspective out vec4 vinColor_Stage0;
+void main() {
+ vinCircleEdge_Stage0 = inCircleEdge;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = inPosition;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1915.shader_test b/shaders/skia/1915.shader_test
new file mode 100644
index 0000000..02bc123
--- /dev/null
+++ b/shaders/skia/1915.shader_test
@@ -0,0 +1,206 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_KHR_blend_equation_advanced : require
+out vec4 sk_FragColor;
+layout (blend_support_all_equations) out ;
+uniform vec4 ucolor_Stage1_c0_c0_c0_c0_c0_c0;
+uniform vec4 urectUniform_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 uboundsUniform_Stage1_c0_c0_c1_c0;
+uniform float uxInvZoom_Stage1_c0_c0_c1_c0;
+uniform float uyInvZoom_Stage1_c0_c0_c1_c0;
+uniform float uxInvInset_Stage1_c0_c0_c1_c0;
+uniform float uyInvInset_Stage1_c0_c0_c1_c0;
+uniform vec2 uoffset_Stage1_c0_c0_c1_c0;
+uniform vec2 ubaseFrequency_Stage1_c1_c0;
+uniform float uz_Stage1_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+uniform sampler2D uTextureSampler_2_Stage1;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 ConstColorProcessor_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = _input * ucolor_Stage1_c0_c0_c0_c0_c0_c0;
+ }
+ return _output;
+}
+vec4 AARectEffect_Stage1_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float alpha;
+ {
+ float xSub, ySub;
+ xSub = min(gl_FragCoord.x - urectUniform_Stage1_c0_c0_c0_c0_c1_c0.x, 0.0);
+ xSub += min(urectUniform_Stage1_c0_c0_c0_c0_c1_c0.z - gl_FragCoord.x, 0.0);
+ ySub = min(gl_FragCoord.y - urectUniform_Stage1_c0_c0_c0_c0_c1_c0.y, 0.0);
+ ySub += min(urectUniform_Stage1_c0_c0_c0_c0_c1_c0.w - gl_FragCoord.y, 0.0);
+ alpha = (1.0 + max(xSub, -1.0)) * (1.0 + max(ySub, -1.0));
+ }
+ {
+ alpha = 1.0 - alpha;
+ }
+ _output = _input * alpha;
+ return _output;
+}
+vec4 blend_src_atop(vec4 src, vec4 dst) {
+ return dst.w * src + (1.0 - src.w) * dst;
+}
+vec4 ComposeTwo_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_src_atop(ConstColorProcessor_Stage1_c0_c0_c0_c0_c0_c0(inputColor), AARectEffect_Stage1_c0_c0_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 MagnifierEffect_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coord = vTransformedCoords_0_Stage0;
+ vec2 zoom_coord = uoffset_Stage1_c0_c0_c1_c0 + coord * vec2(uxInvZoom_Stage1_c0_c0_c1_c0, uyInvZoom_Stage1_c0_c0_c1_c0);
+ vec2 delta = (coord - uboundsUniform_Stage1_c0_c0_c1_c0.xy) * uboundsUniform_Stage1_c0_c0_c1_c0.zw;
+ delta = min(delta, vec2(1.0, 1.0) - delta);
+ delta *= vec2(uxInvInset_Stage1_c0_c0_c1_c0, uyInvInset_Stage1_c0_c0_c1_c0);
+ float weight = 0.0;
+ if (delta.x < 2.0 && delta.y < 2.0) {
+ delta = vec2(2.0, 2.0) - delta;
+ float dist = length(delta);
+ dist = max(2.0 - dist, 0.0);
+ weight = min(dist * dist, 1.0);
+ } else {
+ vec2 delta_squared = delta * delta;
+ weight = min(min(delta_squared.x, delta_squared.y), 1.0);
+ }
+ _output = texture(uTextureSampler_0_Stage1, mix(coord, zoom_coord, weight));
+ return _output;
+}
+float _blend_overlay_component(float sc, float sa, float dc, float da) {
+ if (2.0 * dc <= da) {
+ return (2.0 * sc) * dc;
+ }
+ return sa * da - (2.0 * (da - dc)) * (sa - sc);
+}
+vec4 blend_overlay(vec4 src, vec4 dst) {
+ vec4 result = vec4(_blend_overlay_component(src.x, src.w, dst.x, dst.w), _blend_overlay_component(src.y, src.w, dst.y, dst.w), _blend_overlay_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+ result.xyz += dst.xyz * (1.0 - src.w) + src.xyz * (1.0 - dst.w);
+ return result;
+}
+vec4 blend_hard_light(vec4 src, vec4 dst) {
+ return blend_overlay(dst, src);
+}
+vec4 ComposeTwo_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_hard_light(ComposeTwo_Stage1_c0_c0_c0_c0(inputColor), MagnifierEffect_Stage1_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec3 fade_Stage1_c1_c0(vec3 t) {
+ return ((t * t) * t) * (t * (t * 6.0 - 15.0) + 10.0);
+}
+float perm_Stage1_c1_c0(float x) {
+ return texture(uTextureSampler_1_Stage1, vec2(fract(x / 256.0), 0.0)).x * 255.0;
+}
+float grad_Stage1_c1_c0(float x, vec3 p) {
+ return dot(texture(uTextureSampler_2_Stage1, vec2(fract(x / 16.0), 0.0)).xyz * 255.0 - vec3(1.0), p);
+}
+float lerp_Stage1_c1_c0(float a, float b, float w) {
+ return a + w * (b - a);
+}
+float noise_Stage1_c1_c0(vec3 p) {
+ vec3 P = mod(floor(p), 256.0);
+ p -= floor(p);
+ vec3 f = fade_Stage1_c1_c0(p);
+ float A = perm_Stage1_c1_c0(P.x) + P.y;
+ float AA = perm_Stage1_c1_c0(A) + P.z;
+ float AB = perm_Stage1_c1_c0(A + 1.0) + P.z;
+ float B = perm_Stage1_c1_c0(P.x + 1.0) + P.y;
+ float BA = perm_Stage1_c1_c0(B) + P.z;
+ float BB = perm_Stage1_c1_c0(B + 1.0) + P.z;
+ float result = lerp_Stage1_c1_c0(lerp_Stage1_c1_c0(lerp_Stage1_c1_c0(grad_Stage1_c1_c0(perm_Stage1_c1_c0(AA), p), grad_Stage1_c1_c0(perm_Stage1_c1_c0(BA), p + vec3(-1.0, 0.0, 0.0)), f.x), lerp_Stage1_c1_c0(grad_Stage1_c1_c0(perm_Stage1_c1_c0(AB), p + vec3(0.0, -1.0, 0.0)), grad_Stage1_c1_c0(perm_Stage1_c1_c0(BB), p + vec3(-1.0, -1.0, 0.0)), f.x), f.y), lerp_Stage1_c1_c0(lerp_Stage1_c1_c0(grad_Stage1_c1_c0(perm_Stage1_c1_c0(AA + 1.0), p + vec3(0.0, 0.0, -1.0)), grad_Stage1_c1_c0(perm_Stage1_c1_c0(BA + 1.0), p + vec3(-1.0, 0.0, -1.0)), f.x), lerp_Stage1_c1_c0(grad_Stage1_c1_c0(perm_Stage1_c1_c0(AB + 1.0), p + vec3(0.0, -1.0, -1.0)), grad_Stage1_c1_c0(perm_Stage1_c1_c0(BB + 1.0), p + vec3(-1.0, -1.0, -1.0)), f.x), f.y), f.z);
+ return result;
+}
+float noiseOctaves_Stage1_c1_c0(vec3 p) {
+ float result = 0.0;
+ float ratio = 1.0;
+ for (float i = 0.0;i < 5.0; i++) {
+ result += noise_Stage1_c1_c0(p) / ratio;
+ p *= 2.0;
+ ratio *= 2.0;
+ }
+ return (result + 1.0) / 2.0;
+}
+vec4 ImprovedPerlinNoise_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coords = vTransformedCoords_1_Stage0 * ubaseFrequency_Stage1_c1_c0;
+ float r = noiseOctaves_Stage1_c1_c0(vec3(coords, uz_Stage1_c1_c0));
+ float g = noiseOctaves_Stage1_c1_c0(vec3(coords, uz_Stage1_c1_c0));
+ float b = noiseOctaves_Stage1_c1_c0(vec3(coords, uz_Stage1_c1_c0));
+ float a = noiseOctaves_Stage1_c1_c0(vec3(coords, uz_Stage1_c1_c0));
+ _output = vec4(r, g, b, a);
+ _output = clamp(_output, 0.0, 1.0);
+ _output = vec4(_output.xyz * _output.www, _output.w);
+ return _output;
+}
+float _guarded_divide(float n, float d) {
+ return n / d;
+}
+float _soft_light_component(float sc, float sa, float dc, float da) {
+ if (2.0 * sc <= sa) {
+ return (_guarded_divide((dc * dc) * (sa - 2.0 * sc), da) + (1.0 - da) * sc) + dc * ((-sa + 2.0 * sc) + 1.0);
+ } else if (4.0 * dc <= da) {
+ float DSqd = dc * dc;
+ float DCub = DSqd * dc;
+ float DaSqd = da * da;
+ float DaCub = DaSqd * da;
+ return _guarded_divide(((DaSqd * (sc - dc * ((3.0 * sa - 6.0 * sc) - 1.0)) + ((12.0 * da) * DSqd) * (sa - 2.0 * sc)) - (16.0 * DCub) * (sa - 2.0 * sc)) - DaCub * sc, DaSqd);
+ }
+ return ((dc * ((sa - 2.0 * sc) + 1.0) + sc) - sqrt(da * dc) * (sa - 2.0 * sc)) - da * sc;
+}
+vec4 blend_soft_light(vec4 src, vec4 dst) {
+ if (dst.w == 0.0) {
+ return src;
+ }
+ return vec4(_soft_light_component(src.x, src.w, dst.x, dst.w), _soft_light_component(src.y, src.w, dst.y, dst.w), _soft_light_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_soft_light(ComposeTwo_Stage1_c0_c0(inputColor), ImprovedPerlinNoise_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec2 inLocalCoord;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vec4 color = inColor;
+ vcolor_Stage0 = color;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1918.shader_test b/shaders/skia/1918.shader_test
new file mode 100644
index 0000000..cc2ead2
--- /dev/null
+++ b/shaders/skia/1918.shader_test
@@ -0,0 +1,49 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+noperspective in vec4 vinCircleEdge_Stage0;
+noperspective in vec3 vinClipPlane_Stage0;
+noperspective in vec4 vinColor_Stage0;
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ vec4 circleEdge;
+ circleEdge = vinCircleEdge_Stage0;
+ vec3 clipPlane;
+ clipPlane = vinClipPlane_Stage0;
+ float d = length(circleEdge.xy);
+ float distanceToOuterEdge = circleEdge.z * (1.0 - d);
+ float edgeAlpha = clamp(distanceToOuterEdge, 0.0, 1.0);
+ float clip = clamp(circleEdge.z * dot(circleEdge.xy, clipPlane.xy) + clipPlane.z, 0.0, 1.0);
+ edgeAlpha *= clip;
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ {
+ sk_FragColor = 1.0 - outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 inPosition;
+in vec4 inColor;
+in vec4 inCircleEdge;
+in vec3 inClipPlane;
+noperspective out vec4 vinCircleEdge_Stage0;
+noperspective out vec3 vinClipPlane_Stage0;
+noperspective out vec4 vinColor_Stage0;
+void main() {
+ vinCircleEdge_Stage0 = inCircleEdge;
+ vinClipPlane_Stage0 = inClipPlane;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = inPosition;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1921.shader_test b/shaders/skia/1921.shader_test
new file mode 100644
index 0000000..98bff7a
--- /dev/null
+++ b/shaders/skia/1921.shader_test
@@ -0,0 +1,116 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_KHR_blend_equation_advanced : require
+out vec4 sk_FragColor;
+layout (blend_support_all_equations) out ;
+uniform vec4 ucircle_Stage1_c0_c0_c0_c0;
+uniform float uinnerThreshold_Stage1_c0_c0_c1_c0;
+uniform float uouterThreshold_Stage1_c0_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in float vinCoverage_Stage0;
+vec4 CircleEffect_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float d;
+ {
+ d = (length((ucircle_Stage1_c0_c0_c0_c0.xy - gl_FragCoord.xy) * ucircle_Stage1_c0_c0_c0_c0.w) - 1.0) * ucircle_Stage1_c0_c0_c0_c0.z;
+ }
+ {
+ _output = _input * clamp(d, 0.0, 1.0);
+ }
+ return _output;
+}
+vec4 AlphaThresholdFragmentProcessor_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 color = _input;
+ vec4 mask_color = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ if (mask_color.w < 0.5) {
+ if (color.w > uouterThreshold_Stage1_c0_c0_c1_c0) {
+ float scale = uouterThreshold_Stage1_c0_c0_c1_c0 / color.w;
+ color.xyz *= scale;
+ color.w = uouterThreshold_Stage1_c0_c0_c1_c0;
+ }
+ } else if (color.w < uinnerThreshold_Stage1_c0_c0_c1_c0) {
+ float scale = uinnerThreshold_Stage1_c0_c0_c1_c0 / max(0.0010000000474974513, color.w);
+ color.xyz *= scale;
+ color.w = uinnerThreshold_Stage1_c0_c0_c1_c0;
+ }
+ _output = color;
+ return _output;
+}
+vec4 blend_difference(vec4 src, vec4 dst) {
+ return vec4((src.xyz + dst.xyz) - 2.0 * min(src.xyz * dst.w, dst.xyz * src.w), src.w + (1.0 - src.w) * dst.w);
+}
+vec4 ComposeTwo_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_difference(CircleEffect_Stage1_c0_c0_c0_c0(inputColor), AlphaThresholdFragmentProcessor_Stage1_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 Dither_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = _input;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_1_Stage0.x);
+ uint y = uint(vTransformedCoords_1_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ _output = vec4(clamp(_output.xyz + value * 0.01587301678955555, 0.0, _output.w), _output.w);
+ return _output;
+}
+vec4 blend_plus(vec4 src, vec4 dst) {
+ return min(src + dst, 1.0);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ float alpha = 1.0;
+ alpha = vinCoverage_Stage0;
+ outputCoverage_Stage0 = vec4(alpha);
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_plus(ComposeTwo_Stage1_c0_c0(inputColor), Dither_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ sk_FragColor = outputCoverage_Stage0 * output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in float inCoverage;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out float vinCoverage_Stage0;
+void main() {
+ vec4 color = inColor;
+ vcolor_Stage0 = color;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(inPosition, 1.0)).xy;
+ vinCoverage_Stage0 = inCoverage;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/193-2.shader_test b/shaders/skia/193-2.shader_test
new file mode 100644
index 0000000..3d93e42
--- /dev/null
+++ b/shaders/skia/193-2.shader_test
@@ -0,0 +1,89 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage2_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c1_c0;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+vec4 blend_xor(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src + (1.0 - src.w) * dst;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_dst_in(outputColor_Stage0, ClampedGradientEffect_Stage1_c0_c0(vec4(1.0)));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_xor(ConstColorProcessor_Stage2_c1_c0(vec4(1.0)), output_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/193-3.shader_test b/shaders/skia/193-3.shader_test
new file mode 100644
index 0000000..0398cdb
--- /dev/null
+++ b/shaders/skia/193-3.shader_test
@@ -0,0 +1,193 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform float uSurfaceScale_Stage1;
+uniform vec3 uLightColor_Stage1;
+uniform float uKD_Stage1;
+uniform vec4 uTexDom_Stage1;
+uniform vec3 uDecalParams_Stage1;
+uniform vec3 uLightLocation_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 light_Stage1(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ float colorScale = uKD_Stage1 * dot(normal, surfaceToLight);
+ return vec4(lightColor * clamp(colorScale, 0.0, 1.0), 1.0);
+}
+float sobel_Stage1(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage1(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage1(float m[9], float surfaceScale) {
+ return pointToNormal_Stage1(sobel_Stage1(m[0], m[2], m[3], m[5], 0.0, 0.0, 0.33333298563957214), sobel_Stage1(m[0], m[3], m[1], m[4], m[2], m[5], 0.5), surfaceScale);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ vec2 coord = vTransformedCoords_0_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp0 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp5 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp6 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp7 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp8 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = normalize(uLightLocation_Stage1 - vec3(gl_FragCoord.xy, uSurfaceScale_Stage1 * m[4]));
+ output_Stage1 = light_Stage1(normal_Stage1(m, uSurfaceScale_Stage1), surfaceToLight, uLightColor_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/193-5.shader_test b/shaders/skia/193-5.shader_test
new file mode 100644
index 0000000..5614142
--- /dev/null
+++ b/shaders/skia/193-5.shader_test
@@ -0,0 +1,735 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 ubaseFrequency_Stage1_c0_c0_c0_c0_c0_c0;
+uniform float uz_Stage1_c0_c0_c0_c0_c0_c0;
+uniform vec2 uImageIncrement_Stage1_c0_c0_c1_c0_c0_c0;
+uniform vec4 uKernel_Stage1_c0_c0_c1_c0_c0_c0[5];
+uniform vec2 uKernelOffset_Stage1_c0_c0_c1_c0_c0_c0;
+uniform float uGain_Stage1_c0_c0_c1_c0_c0_c0;
+uniform float uBias_Stage1_c0_c0_c1_c0_c0_c0;
+uniform vec4 uTexDom_Stage1_c0_c0_c1_c0_c0_c0;
+uniform vec2 uImageIncrement_Stage1_c0_c0_c1_c0_c1_c0;
+uniform float uSurfaceScale_Stage1_c0_c0_c1_c0_c1_c0;
+uniform vec3 uLightColor_Stage1_c0_c0_c1_c0_c1_c0;
+uniform float uKD_Stage1_c0_c0_c1_c0_c1_c0;
+uniform vec4 uTexDom_Stage1_c0_c0_c1_c0_c1_c0;
+uniform vec3 uDecalParams_Stage1_c0_c0_c1_c0_c1_c0;
+uniform vec3 uLightDirection_Stage1_c0_c0_c1_c0_c1_c0;
+uniform vec2 ubaseFrequency_Stage1_c1_c0_c0_c0_c0_c0;
+uniform float uz_Stage1_c1_c0_c0_c0_c0_c0;
+uniform vec4 ucircleData_Stage1_c1_c0_c0_c0_c1_c0;
+uniform vec3 uedges_Stage1_c1_c0_c1_c0_c0_c0[1];
+uniform vec4 uinnerRect_Stage1_c1_c0_c1_c0_c1_c0;
+uniform vec2 uradiusPlusHalf_Stage1_c1_c0_c1_c0_c1_c0;
+uniform vec2 uDstTextureUpperLeft_Stage2;
+uniform vec2 uDstTextureCoordScale_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+uniform sampler2D uTextureSampler_2_Stage1;
+uniform sampler2D uTextureSampler_3_Stage1;
+uniform sampler2D uTextureSampler_4_Stage1;
+uniform sampler2D uTextureSampler_5_Stage1;
+uniform sampler2D uTextureSampler_6_Stage1;
+uniform sampler2D uDstTextureSampler_Stage2;
+in vec2 vEllipseOffsets0_Stage0;
+in vec2 vEllipseOffsets1_Stage0;
+in vec4 vinColor_Stage0;
+in vec2 vTransformedCoords_0_Stage0;
+in vec2 vTransformedCoords_1_Stage0;
+in vec2 vTransformedCoords_2_Stage0;
+in vec2 vTransformedCoords_3_Stage0;
+vec3 fade_Stage1_c0_c0_c0_c0_c0_c0(vec3 t) {
+ return ((t * t) * t) * (t * (t * 6.0 - 15.0) + 10.0);
+}
+float perm_Stage1_c0_c0_c0_c0_c0_c0(float x) {
+ return texture(uTextureSampler_0_Stage1, vec2(fract(x / 256.0), 0.0)).x * 255.0;
+}
+float grad_Stage1_c0_c0_c0_c0_c0_c0(float x, vec3 p) {
+ return dot(texture(uTextureSampler_1_Stage1, vec2(fract(x / 16.0), 0.0)).xyz * 255.0 - vec3(1.0), p);
+}
+float lerp_Stage1_c0_c0_c0_c0_c0_c0(float a, float b, float w) {
+ return a + w * (b - a);
+}
+float noise_Stage1_c0_c0_c0_c0_c0_c0(vec3 p) {
+ vec3 P = mod(floor(p), 256.0);
+ p -= floor(p);
+ vec3 f = fade_Stage1_c0_c0_c0_c0_c0_c0(p);
+ float A = perm_Stage1_c0_c0_c0_c0_c0_c0(P.x) + P.y;
+ float AA = perm_Stage1_c0_c0_c0_c0_c0_c0(A) + P.z;
+ float AB = perm_Stage1_c0_c0_c0_c0_c0_c0(A + 1.0) + P.z;
+ float B = perm_Stage1_c0_c0_c0_c0_c0_c0(P.x + 1.0) + P.y;
+ float BA = perm_Stage1_c0_c0_c0_c0_c0_c0(B) + P.z;
+ float BB = perm_Stage1_c0_c0_c0_c0_c0_c0(B + 1.0) + P.z;
+ float result = lerp_Stage1_c0_c0_c0_c0_c0_c0(lerp_Stage1_c0_c0_c0_c0_c0_c0(lerp_Stage1_c0_c0_c0_c0_c0_c0(grad_Stage1_c0_c0_c0_c0_c0_c0(perm_Stage1_c0_c0_c0_c0_c0_c0(AA), p), grad_Stage1_c0_c0_c0_c0_c0_c0(perm_Stage1_c0_c0_c0_c0_c0_c0(BA), p + vec3(-1.0, 0.0, 0.0)), f.x), lerp_Stage1_c0_c0_c0_c0_c0_c0(grad_Stage1_c0_c0_c0_c0_c0_c0(perm_Stage1_c0_c0_c0_c0_c0_c0(AB), p + vec3(0.0, -1.0, 0.0)), grad_Stage1_c0_c0_c0_c0_c0_c0(perm_Stage1_c0_c0_c0_c0_c0_c0(BB), p + vec3(-1.0, -1.0, 0.0)), f.x), f.y), lerp_Stage1_c0_c0_c0_c0_c0_c0(lerp_Stage1_c0_c0_c0_c0_c0_c0(grad_Stage1_c0_c0_c0_c0_c0_c0(perm_Stage1_c0_c0_c0_c0_c0_c0(AA + 1.0), p + vec3(0.0, 0.0, -1.0)), grad_Stage1_c0_c0_c0_c0_c0_c0(perm_Stage1_c0_c0_c0_c0_c0_c0(BA + 1.0), p + vec3(-1.0, 0.0, -1.0)), f.x), lerp_Stage1_c0_c0_c0_c0_c0_c0(grad_Stage1_c0_c0_c0_c0_c0_c0(perm_Stage1_c0_c0_c0_c0_c0_c0(AB + 1.0), p + vec3(0.0, -1.0, -1.0)), grad_Stage1_c0_c0_c0_c0_c0_c0(perm_Stage1_c0_c0_c0_c0_c0_c0(BB + 1.0), p + vec3(-1.0, -1.0, -1.0)), f.x), f.y), f.z);
+ return result;
+}
+float noiseOctaves_Stage1_c0_c0_c0_c0_c0_c0(vec3 p) {
+ float result = 0.0;
+ float ratio = 1.0;
+ for (float i = 0.0;i < 5.0; i++) {
+ result += noise_Stage1_c0_c0_c0_c0_c0_c0(p) / ratio;
+ p *= 2.0;
+ ratio *= 2.0;
+ }
+ return (result + 1.0) / 2.0;
+}
+vec4 ImprovedPerlinNoise_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coords = vTransformedCoords_0_Stage0 * ubaseFrequency_Stage1_c0_c0_c0_c0_c0_c0;
+ float r = noiseOctaves_Stage1_c0_c0_c0_c0_c0_c0(vec3(coords, uz_Stage1_c0_c0_c0_c0_c0_c0));
+ float g = noiseOctaves_Stage1_c0_c0_c0_c0_c0_c0(vec3(coords, uz_Stage1_c0_c0_c0_c0_c0_c0));
+ float b = noiseOctaves_Stage1_c0_c0_c0_c0_c0_c0(vec3(coords, uz_Stage1_c0_c0_c0_c0_c0_c0));
+ float a = noiseOctaves_Stage1_c0_c0_c0_c0_c0_c0(vec3(coords, uz_Stage1_c0_c0_c0_c0_c0_c0));
+ _output = vec4(r, g, b, a);
+ _output = clamp(_output, 0.0, 1.0);
+ _output = vec4(_output.xyz * _output.www, _output.w);
+ return _output;
+}
+vec4 ClampFragmentProcessor_Stage1_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = clamp(_input, 0.0, 1.0);
+ }
+ return _output;
+}
+float _blend_color_luminance(vec3 color) {
+ return dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), color);
+}
+vec3 _blend_set_color_luminance(vec3 hueSatColor, float alpha, vec3 lumColor) {
+ float lum = _blend_color_luminance(lumColor);
+ vec3 result = (lum - _blend_color_luminance(hueSatColor)) + hueSatColor;
+ float minComp = min(min(result.x, result.y), result.z);
+ float maxComp = max(max(result.x, result.y), result.z);
+ if (minComp < 0.0 && lum != minComp) {
+ result = lum + ((result - lum) * lum) / (lum - minComp);
+ }
+ if (maxComp > alpha && maxComp != lum) {
+ return lum + ((result - lum) * (alpha - lum)) / (maxComp - lum);
+ }
+ return result;
+}
+vec4 blend_luminosity(vec4 src, vec4 dst) {
+ float alpha = dst.w * src.w;
+ vec3 sda = src.xyz * dst.w;
+ vec3 dsa = dst.xyz * src.w;
+ return vec4((((_blend_set_color_luminance(dsa, alpha, sda) + dst.xyz) - dsa) + src.xyz) - sda, (src.w + dst.w) - alpha);
+}
+vec4 ComposeTwo_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_luminosity(ImprovedPerlinNoise_Stage1_c0_c0_c0_c0_c0_c0(inputColor), ClampFragmentProcessor_Stage1_c0_c0_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 MatrixConvolution_Stage1_c0_c0_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 sum = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_1_Stage0 - uKernelOffset_Stage1_c0_c0_c1_c0_c0_c0 * uImageIncrement_Stage1_c0_c0_c1_c0_c0_c0;
+ vec4 c;
+ {
+ float k = uKernel_Stage1_c0_c0_c1_c0_c0_c0[0].x;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c1_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c1_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c1_c0_c0_c0[0].y;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1_c0_c0_c1_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c1_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c1_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c1_c0_c0_c0[0].z;
+ {
+ vec2 origCoord = coord + vec2(2.0, 0.0) * uImageIncrement_Stage1_c0_c0_c1_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c1_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c1_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c1_c0_c0_c0[0].w;
+ {
+ vec2 origCoord = coord + vec2(3.0, 0.0) * uImageIncrement_Stage1_c0_c0_c1_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c1_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c1_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c1_c0_c0_c0[1].x;
+ {
+ vec2 origCoord = coord + vec2(4.0, 0.0) * uImageIncrement_Stage1_c0_c0_c1_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c1_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c1_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c1_c0_c0_c0[1].y;
+ {
+ vec2 origCoord = coord + vec2(5.0, 0.0) * uImageIncrement_Stage1_c0_c0_c1_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c1_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c1_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c1_c0_c0_c0[1].z;
+ {
+ vec2 origCoord = coord + vec2(6.0, 0.0) * uImageIncrement_Stage1_c0_c0_c1_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c1_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c1_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c1_c0_c0_c0[1].w;
+ {
+ vec2 origCoord = coord + vec2(7.0, 0.0) * uImageIncrement_Stage1_c0_c0_c1_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c1_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c1_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c1_c0_c0_c0[2].x;
+ {
+ vec2 origCoord = coord + vec2(8.0, 0.0) * uImageIncrement_Stage1_c0_c0_c1_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c1_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c1_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c1_c0_c0_c0[2].y;
+ {
+ vec2 origCoord = coord + vec2(9.0, 0.0) * uImageIncrement_Stage1_c0_c0_c1_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c1_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c1_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c1_c0_c0_c0[2].z;
+ {
+ vec2 origCoord = coord + vec2(10.0, 0.0) * uImageIncrement_Stage1_c0_c0_c1_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c1_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c1_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c1_c0_c0_c0[2].w;
+ {
+ vec2 origCoord = coord + vec2(11.0, 0.0) * uImageIncrement_Stage1_c0_c0_c1_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c1_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c1_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c1_c0_c0_c0[3].x;
+ {
+ vec2 origCoord = coord + vec2(12.0, 0.0) * uImageIncrement_Stage1_c0_c0_c1_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c1_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c1_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c1_c0_c0_c0[3].y;
+ {
+ vec2 origCoord = coord + vec2(13.0, 0.0) * uImageIncrement_Stage1_c0_c0_c1_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c1_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c1_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c1_c0_c0_c0[3].z;
+ {
+ vec2 origCoord = coord + vec2(14.0, 0.0) * uImageIncrement_Stage1_c0_c0_c1_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c1_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c1_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c1_c0_c0_c0[3].w;
+ {
+ vec2 origCoord = coord + vec2(15.0, 0.0) * uImageIncrement_Stage1_c0_c0_c1_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c1_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c1_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c1_c0_c0_c0[4].x;
+ {
+ vec2 origCoord = coord + vec2(16.0, 0.0) * uImageIncrement_Stage1_c0_c0_c1_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c1_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c1_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c1_c0_c0_c0[4].y;
+ {
+ vec2 origCoord = coord + vec2(17.0, 0.0) * uImageIncrement_Stage1_c0_c0_c1_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c1_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c1_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c1_c0_c0_c0[4].z;
+ {
+ vec2 origCoord = coord + vec2(18.0, 0.0) * uImageIncrement_Stage1_c0_c0_c1_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c1_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c1_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c1_c0_c0_c0[4].w;
+ {
+ vec2 origCoord = coord + vec2(19.0, 0.0) * uImageIncrement_Stage1_c0_c0_c1_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c1_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c1_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ _output = sum * uGain_Stage1_c0_c0_c1_c0_c0_c0 + uBias_Stage1_c0_c0_c1_c0_c0_c0;
+ _output.w = clamp(_output.w, 0.0, 1.0);
+ _output.xyz = clamp(_output.xyz, 0.0, _output.w);
+ _output *= _input;
+ return _output;
+}
+vec4 light_Stage1_c0_c0_c1_c0_c1_c0(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ float colorScale = uKD_Stage1_c0_c0_c1_c0_c1_c0 * dot(normal, surfaceToLight);
+ return vec4(lightColor * clamp(colorScale, 0.0, 1.0), 1.0);
+}
+float sobel_Stage1_c0_c0_c1_c0_c1_c0(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage1_c0_c0_c1_c0_c1_c0(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage1_c0_c0_c1_c0_c1_c0(float m[9], float surfaceScale) {
+ return pointToNormal_Stage1_c0_c0_c1_c0_c1_c0(sobel_Stage1_c0_c0_c1_c0_c1_c0(m[1], m[2], m[4], m[5], m[7], m[8], 0.5), sobel_Stage1_c0_c0_c1_c0_c1_c0(0.0, 0.0, m[1], m[7], m[2], m[8], 0.33333298563957214), surfaceScale);
+}
+vec4 DiffuseLighting_Stage1_c0_c0_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coord = vTransformedCoords_2_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage1_c0_c0_c1_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c1_c0_c1_c0.xy, uTexDom_Stage1_c0_c0_c1_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_3_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c1_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c1_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c1_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c1_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp0 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1_c0_c0_c1_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c1_c0_c1_c0.xy, uTexDom_Stage1_c0_c0_c1_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_3_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c1_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c1_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c1_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c1_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1_c0_c0_c1_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c1_c0_c1_c0.xy, uTexDom_Stage1_c0_c0_c1_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_3_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c1_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c1_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c1_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c1_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage1_c0_c0_c1_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c1_c0_c1_c0.xy, uTexDom_Stage1_c0_c0_c1_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_3_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c1_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c1_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c1_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c1_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c1_c0_c1_c0.xy, uTexDom_Stage1_c0_c0_c1_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_3_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c1_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c1_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c1_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c1_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1_c0_c0_c1_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c1_c0_c1_c0.xy, uTexDom_Stage1_c0_c0_c1_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_3_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c1_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c1_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c1_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c1_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp5 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage1_c0_c0_c1_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c1_c0_c1_c0.xy, uTexDom_Stage1_c0_c0_c1_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_3_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c1_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c1_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c1_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c1_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp6 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage1_c0_c0_c1_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c1_c0_c1_c0.xy, uTexDom_Stage1_c0_c0_c1_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_3_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c1_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c1_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c1_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c1_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp7 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage1_c0_c0_c1_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c1_c0_c1_c0.xy, uTexDom_Stage1_c0_c0_c1_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_3_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c1_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c1_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c1_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c1_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp8 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = uLightDirection_Stage1_c0_c0_c1_c0_c1_c0;
+ _output = light_Stage1_c0_c0_c1_c0_c1_c0(normal_Stage1_c0_c0_c1_c0_c1_c0(m, uSurfaceScale_Stage1_c0_c0_c1_c0_c1_c0), surfaceToLight, uLightColor_Stage1_c0_c0_c1_c0_c1_c0);
+ _output *= _input;
+ return _output;
+}
+vec4 ComposeTwo_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_luminosity(MatrixConvolution_Stage1_c0_c0_c1_c0_c0_c0(inputColor), DiffuseLighting_Stage1_c0_c0_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 blend_modulate(vec4 src, vec4 dst) {
+ return src * dst;
+}
+vec4 ComposeTwo_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_modulate(ComposeTwo_Stage1_c0_c0_c0_c0(inputColor), ComposeTwo_Stage1_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec3 fade_Stage1_c1_c0_c0_c0_c0_c0(vec3 t) {
+ return ((t * t) * t) * (t * (t * 6.0 - 15.0) + 10.0);
+}
+float perm_Stage1_c1_c0_c0_c0_c0_c0(float x) {
+ return texture(uTextureSampler_4_Stage1, vec2(fract(x / 256.0), 0.0)).x * 255.0;
+}
+float grad_Stage1_c1_c0_c0_c0_c0_c0(float x, vec3 p) {
+ return dot(texture(uTextureSampler_5_Stage1, vec2(fract(x / 16.0), 0.0)).xyz * 255.0 - vec3(1.0), p);
+}
+float lerp_Stage1_c1_c0_c0_c0_c0_c0(float a, float b, float w) {
+ return a + w * (b - a);
+}
+float noise_Stage1_c1_c0_c0_c0_c0_c0(vec3 p) {
+ vec3 P = mod(floor(p), 256.0);
+ p -= floor(p);
+ vec3 f = fade_Stage1_c1_c0_c0_c0_c0_c0(p);
+ float A = perm_Stage1_c1_c0_c0_c0_c0_c0(P.x) + P.y;
+ float AA = perm_Stage1_c1_c0_c0_c0_c0_c0(A) + P.z;
+ float AB = perm_Stage1_c1_c0_c0_c0_c0_c0(A + 1.0) + P.z;
+ float B = perm_Stage1_c1_c0_c0_c0_c0_c0(P.x + 1.0) + P.y;
+ float BA = perm_Stage1_c1_c0_c0_c0_c0_c0(B) + P.z;
+ float BB = perm_Stage1_c1_c0_c0_c0_c0_c0(B + 1.0) + P.z;
+ float result = lerp_Stage1_c1_c0_c0_c0_c0_c0(lerp_Stage1_c1_c0_c0_c0_c0_c0(lerp_Stage1_c1_c0_c0_c0_c0_c0(grad_Stage1_c1_c0_c0_c0_c0_c0(perm_Stage1_c1_c0_c0_c0_c0_c0(AA), p), grad_Stage1_c1_c0_c0_c0_c0_c0(perm_Stage1_c1_c0_c0_c0_c0_c0(BA), p + vec3(-1.0, 0.0, 0.0)), f.x), lerp_Stage1_c1_c0_c0_c0_c0_c0(grad_Stage1_c1_c0_c0_c0_c0_c0(perm_Stage1_c1_c0_c0_c0_c0_c0(AB), p + vec3(0.0, -1.0, 0.0)), grad_Stage1_c1_c0_c0_c0_c0_c0(perm_Stage1_c1_c0_c0_c0_c0_c0(BB), p + vec3(-1.0, -1.0, 0.0)), f.x), f.y), lerp_Stage1_c1_c0_c0_c0_c0_c0(lerp_Stage1_c1_c0_c0_c0_c0_c0(grad_Stage1_c1_c0_c0_c0_c0_c0(perm_Stage1_c1_c0_c0_c0_c0_c0(AA + 1.0), p + vec3(0.0, 0.0, -1.0)), grad_Stage1_c1_c0_c0_c0_c0_c0(perm_Stage1_c1_c0_c0_c0_c0_c0(BA + 1.0), p + vec3(-1.0, 0.0, -1.0)), f.x), lerp_Stage1_c1_c0_c0_c0_c0_c0(grad_Stage1_c1_c0_c0_c0_c0_c0(perm_Stage1_c1_c0_c0_c0_c0_c0(AB + 1.0), p + vec3(0.0, -1.0, -1.0)), grad_Stage1_c1_c0_c0_c0_c0_c0(perm_Stage1_c1_c0_c0_c0_c0_c0(BB + 1.0), p + vec3(-1.0, -1.0, -1.0)), f.x), f.y), f.z);
+ return result;
+}
+float noiseOctaves_Stage1_c1_c0_c0_c0_c0_c0(vec3 p) {
+ float result = 0.0;
+ float ratio = 1.0;
+ for (float i = 0.0;i < 3.0; i++) {
+ result += noise_Stage1_c1_c0_c0_c0_c0_c0(p) / ratio;
+ p *= 2.0;
+ ratio *= 2.0;
+ }
+ return (result + 1.0) / 2.0;
+}
+vec4 ImprovedPerlinNoise_Stage1_c1_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coords = vTransformedCoords_3_Stage0 * ubaseFrequency_Stage1_c1_c0_c0_c0_c0_c0;
+ float r = noiseOctaves_Stage1_c1_c0_c0_c0_c0_c0(vec3(coords, uz_Stage1_c1_c0_c0_c0_c0_c0));
+ float g = noiseOctaves_Stage1_c1_c0_c0_c0_c0_c0(vec3(coords, uz_Stage1_c1_c0_c0_c0_c0_c0));
+ float b = noiseOctaves_Stage1_c1_c0_c0_c0_c0_c0(vec3(coords, uz_Stage1_c1_c0_c0_c0_c0_c0));
+ float a = noiseOctaves_Stage1_c1_c0_c0_c0_c0_c0(vec3(coords, uz_Stage1_c1_c0_c0_c0_c0_c0));
+ _output = vec4(r, g, b, a);
+ _output = clamp(_output, 0.0, 1.0);
+ _output = vec4(_output.xyz * _output.www, _output.w);
+ return _output;
+}
+vec4 CircleBlurFragmentProcessor_Stage1_c1_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 vec = vec2((gl_FragCoord.x - ucircleData_Stage1_c1_c0_c0_c0_c1_c0.x) * ucircleData_Stage1_c1_c0_c0_c0_c1_c0.w, (gl_FragCoord.y - ucircleData_Stage1_c1_c0_c0_c0_c1_c0.y) * ucircleData_Stage1_c1_c0_c0_c0_c1_c0.w);
+ float dist = length(vec) + (0.5 - ucircleData_Stage1_c1_c0_c0_c0_c1_c0.z) * ucircleData_Stage1_c1_c0_c0_c0_c1_c0.w;
+ _output = _input * texture(uTextureSampler_6_Stage1, vec2(dist, 0.5)).w;
+ return _output;
+}
+vec4 ComposeTwo_Stage1_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_luminosity(ImprovedPerlinNoise_Stage1_c1_c0_c0_c0_c0_c0(inputColor), CircleBlurFragmentProcessor_Stage1_c1_c0_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 ConvexPoly_Stage1_c1_c0_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float alpha = 1.0;
+ float edge;
+ edge = dot(uedges_Stage1_c1_c0_c1_c0_c0_c0[0], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ _output = _input * alpha;
+ return _output;
+}
+vec4 CircularRRect_Stage1_c1_c0_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 dxy0 = uinnerRect_Stage1_c1_c0_c1_c0_c1_c0.xy - gl_FragCoord.xy;
+ vec2 dxy1 = gl_FragCoord.xy - uinnerRect_Stage1_c1_c0_c1_c0_c1_c0.zw;
+ vec2 dxy = max(max(dxy0, dxy1), 0.0);
+ float alpha = clamp(uradiusPlusHalf_Stage1_c1_c0_c1_c0_c1_c0.x - length(dxy), 0.0, 1.0);
+ alpha = 1.0 - alpha;
+ _output = _input * alpha;
+ return _output;
+}
+float _blend_color_saturation(vec3 color) {
+ return max(max(color.x, color.y), color.z) - min(min(color.x, color.y), color.z);
+}
+vec3 _blend_set_color_saturation_helper(vec3 minMidMax, float sat) {
+ if (minMidMax.x < minMidMax.z) {
+ return vec3(0.0, (sat * (minMidMax.y - minMidMax.x)) / (minMidMax.z - minMidMax.x), sat);
+ }
+ return vec3(0.0);
+}
+vec3 _blend_set_color_saturation(vec3 hueLumColor, vec3 satColor) {
+ float sat = _blend_color_saturation(satColor);
+ if (hueLumColor.x <= hueLumColor.y) {
+ if (hueLumColor.y <= hueLumColor.z) {
+ hueLumColor.xyz = _blend_set_color_saturation_helper(hueLumColor, sat);
+ } else if (hueLumColor.x <= hueLumColor.z) {
+ hueLumColor.xzy = _blend_set_color_saturation_helper(hueLumColor.xzy, sat);
+ } else {
+ hueLumColor.zxy = _blend_set_color_saturation_helper(hueLumColor.zxy, sat);
+ }
+ } else if (hueLumColor.x <= hueLumColor.z) {
+ hueLumColor.yxz = _blend_set_color_saturation_helper(hueLumColor.yxz, sat);
+ } else if (hueLumColor.y <= hueLumColor.z) {
+ hueLumColor.yzx = _blend_set_color_saturation_helper(hueLumColor.yzx, sat);
+ } else {
+ hueLumColor.zyx = _blend_set_color_saturation_helper(hueLumColor.zyx, sat);
+ }
+ return hueLumColor;
+}
+vec4 blend_hue(vec4 src, vec4 dst) {
+ float alpha = dst.w * src.w;
+ vec3 sda = src.xyz * dst.w;
+ vec3 dsa = dst.xyz * src.w;
+ return vec4((((_blend_set_color_luminance(_blend_set_color_saturation(sda, dsa), alpha, dsa) + dst.xyz) - dsa) + src.xyz) - sda, (src.w + dst.w) - alpha);
+}
+vec4 ComposeTwo_Stage1_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_hue(ConvexPoly_Stage1_c1_c0_c1_c0_c0_c0(inputColor), CircularRRect_Stage1_c1_c0_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 ComposeTwo_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_hue(ComposeTwo_Stage1_c1_c0_c0_c0(inputColor), ComposeTwo_Stage1_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 blend_dst_out(vec4 src, vec4 dst) {
+ return (1.0 - src.w) * dst;
+}
+vec4 blend_dst_atop(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src + src.w * dst;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vinColor_Stage0;
+ vec2 scaledOffset = vEllipseOffsets0_Stage0;
+ float test = dot(scaledOffset, scaledOffset) - 1.0;
+ vec2 duvdx = dFdx(vEllipseOffsets0_Stage0);
+ vec2 duvdy = dFdy(vEllipseOffsets0_Stage0);
+ vec2 grad = vec2(vEllipseOffsets0_Stage0.x * duvdx.x + vEllipseOffsets0_Stage0.y * duvdx.y, vEllipseOffsets0_Stage0.x * duvdy.x + vEllipseOffsets0_Stage0.y * duvdy.y);
+ float grad_dot = 4.0 * dot(grad, grad);
+ grad_dot = max(grad_dot, 1.1754999560161448e-38);
+ float invlen = inversesqrt(grad_dot);
+ float edgeAlpha = clamp(1.0 - test * invlen, 0.0, 1.0);
+ edgeAlpha *= clamp(1.0 + test * invlen, 0.0, 1.0);
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_dst_out(ComposeTwo_Stage1_c0_c0(inputColor), ComposeTwo_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ if (all(lessThanEqual(outputCoverage_Stage0.xyz, vec3(0.0)))) {
+ discard;
+ }
+ vec2 _dstTexCoord = (gl_FragCoord.xy - uDstTextureUpperLeft_Stage2) * uDstTextureCoordScale_Stage2;
+ vec4 _dstColor = texture(uDstTextureSampler_Stage2, _dstTexCoord);
+ sk_FragColor = blend_dst_atop(output_Stage1, _dstColor);
+ sk_FragColor = outputCoverage_Stage0 * sk_FragColor + (vec4(1.0) - outputCoverage_Stage0) * _dstColor;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+uniform mat3 uCoordTransformMatrix_3_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec2 inEllipseOffsets0;
+in vec2 inEllipseOffsets1;
+out vec2 vEllipseOffsets0_Stage0;
+out vec2 vEllipseOffsets1_Stage0;
+out vec4 vinColor_Stage0;
+out vec2 vTransformedCoords_0_Stage0;
+out vec2 vTransformedCoords_1_Stage0;
+out vec2 vTransformedCoords_2_Stage0;
+out vec2 vTransformedCoords_3_Stage0;
+void main() {
+ vEllipseOffsets0_Stage0 = inEllipseOffsets0;
+ vEllipseOffsets1_Stage0 = inEllipseOffsets1;
+ vinColor_Stage0 = inColor;
+ vec3 pos3 = uViewM_Stage0 * vec3(inPosition, 1.0);
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_3_Stage0 = (uCoordTransformMatrix_3_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos3.x, pos3.y, 0.0, pos3.z);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/193-6.shader_test b/shaders/skia/193-6.shader_test
new file mode 100644
index 0000000..d5d9ec8
--- /dev/null
+++ b/shaders/skia/193-6.shader_test
@@ -0,0 +1,68 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage2;
+uniform vec4 uKernel_Stage2[2];
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_1_Stage0 - 3.0 * uImageIncrement_Stage2;
+ vec2 coordSampled = vec2(0.0, 0.0);
+ coordSampled = coord;
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[0].x;
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[0].y;
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[0].z;
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[0].w;
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[1].x;
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[1].y;
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[1].z;
+ coord += uImageIncrement_Stage2;
+ output_Stage2 *= output_Stage1;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/193.shader_test b/shaders/skia/193.shader_test
new file mode 100644
index 0000000..610afb7
--- /dev/null
+++ b/shaders/skia/193.shader_test
@@ -0,0 +1,88 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 ucolor_Stage1_c0_c0_c0_c0;
+uniform vec4 ucolor_Stage2;
+uniform vec4 ucolor_Stage3_c1_c0;
+noperspective in vec4 vcolor_Stage0;
+vec4 ConstColorProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = _input.w * ucolor_Stage1_c0_c0_c0_c0;
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = ConstColorProcessor_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 ConstColorProcessor_Stage3_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage3_c1_c0;
+ }
+ return _output;
+}
+vec4 blend_src_out(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 blend_darken(vec4 src, vec4 dst) {
+ vec4 result = blend_src_over(src, dst);
+ result.xyz = min(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
+ return result;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_src_out(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ {
+ output_Stage2 = output_Stage1 * ucolor_Stage2;
+ }
+ }
+ vec4 output_Stage3;
+ {
+ output_Stage3 = blend_darken(ConstColorProcessor_Stage3_c1_c0(vec4(1.0)), output_Stage2);
+ }
+ {
+ sk_FragColor = output_Stage3;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 position;
+in vec4 inColor;
+noperspective out vec4 vcolor_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1930.shader_test b/shaders/skia/1930.shader_test
new file mode 100644
index 0000000..9ec0b66
--- /dev/null
+++ b/shaders/skia/1930.shader_test
@@ -0,0 +1,133 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_KHR_blend_equation_advanced : require
+out vec4 sk_FragColor;
+layout (blend_support_all_equations) out ;
+uniform vec4 uellipse_Stage1_c0_c0;
+uniform vec4 ucolor_Stage1_c1_c0_c0_c0;
+uniform float uPixelSize_Stage1_c1_c0_c1_c0;
+uniform vec2 uRange_Stage1_c1_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec4 vQuadEdge_Stage0;
+noperspective in vec4 vinColor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 EllipseEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 d = gl_FragCoord.xy - uellipse_Stage1_c0_c0.xy;
+ vec2 Z = d * uellipse_Stage1_c0_c0.zw;
+ float implicit = dot(Z, d) - 1.0;
+ float grad_dot = 4.0 * dot(Z, Z);
+ {
+ grad_dot = max(grad_dot, 1.1754999560161448e-38);
+ }
+ float approx_dist = implicit * inversesqrt(grad_dot);
+ float alpha;
+ {
+ alpha = approx_dist > 0.0 ? 1.0 : 0.0;
+ }
+ _output = _input * alpha;
+ return _output;
+}
+vec4 ConstColorProcessor_Stage1_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = _input * ucolor_Stage1_c1_c0_c0_c0;
+ }
+ return _output;
+}
+vec4 Morphology_Stage1_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0;
+ coord.y -= 3.0 * uPixelSize_Stage1_c1_c0_c1_c0;
+ for (int i = 0;i < 7; i++) {
+ _output = max(_output, texture(uTextureSampler_0_Stage1, coord));
+ coord.y += uPixelSize_Stage1_c1_c0_c1_c0;
+ }
+ _output *= _input;
+ return _output;
+}
+vec4 blend_plus(vec4 src, vec4 dst) {
+ return min(src + dst, 1.0);
+}
+vec4 ComposeTwo_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_plus(ConstColorProcessor_Stage1_c1_c0_c0_c0(inputColor), Morphology_Stage1_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+float _blend_color_luminance(vec3 color) {
+ return dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), color);
+}
+vec3 _blend_set_color_luminance(vec3 hueSatColor, float alpha, vec3 lumColor) {
+ float lum = _blend_color_luminance(lumColor);
+ vec3 result = (lum - _blend_color_luminance(hueSatColor)) + hueSatColor;
+ float minComp = min(min(result.x, result.y), result.z);
+ float maxComp = max(max(result.x, result.y), result.z);
+ if (minComp < 0.0 && lum != minComp) {
+ result = lum + ((result - lum) * lum) / (lum - minComp);
+ }
+ if (maxComp > alpha && maxComp != lum) {
+ return lum + ((result - lum) * (alpha - lum)) / (maxComp - lum);
+ }
+ return result;
+}
+vec4 blend_luminosity(vec4 src, vec4 dst) {
+ float alpha = dst.w * src.w;
+ vec3 sda = src.xyz * dst.w;
+ vec3 dsa = dst.xyz * src.w;
+ return vec4((((_blend_set_color_luminance(dsa, alpha, sda) + dst.xyz) - dsa) + src.xyz) - sda, (src.w + dst.w) - alpha);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vinColor_Stage0;
+ float edgeAlpha;
+ vec2 duvdx = dFdx(vQuadEdge_Stage0.xy);
+ vec2 duvdy = dFdy(vQuadEdge_Stage0.xy);
+ if (vQuadEdge_Stage0.z > 0.0 && vQuadEdge_Stage0.w > 0.0) {
+ edgeAlpha = min(min(vQuadEdge_Stage0.z, vQuadEdge_Stage0.w) + 0.5, 1.0);
+ } else {
+ vec2 gF = vec2((2.0 * vQuadEdge_Stage0.x) * duvdx.x - duvdx.y, (2.0 * vQuadEdge_Stage0.x) * duvdy.x - duvdy.y);
+ edgeAlpha = vQuadEdge_Stage0.x * vQuadEdge_Stage0.x - vQuadEdge_Stage0.y;
+ edgeAlpha = clamp(0.5 - edgeAlpha / length(gF), 0.0, 1.0);
+ }
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_luminosity(EllipseEffect_Stage1_c0_c0(inputColor), ComposeTwo_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ sk_FragColor = outputCoverage_Stage0 * output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec4 inQuadEdge;
+noperspective out vec4 vQuadEdge_Stage0;
+noperspective out vec4 vinColor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vQuadEdge_Stage0 = inQuadEdge;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1933.shader_test b/shaders/skia/1933.shader_test
new file mode 100644
index 0000000..dc58a49
--- /dev/null
+++ b/shaders/skia/1933.shader_test
@@ -0,0 +1,165 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uCoordTransformMatrix_1_Stage0;
+uniform vec4 uscale0_1_Stage2_c1_c0_c1_c0;
+uniform vec4 uscale2_3_Stage2_c1_c0_c1_c0;
+uniform vec4 uscale4_5_Stage2_c1_c0_c1_c0;
+uniform vec4 uscale6_7_Stage2_c1_c0_c1_c0;
+uniform vec4 ubias0_1_Stage2_c1_c0_c1_c0;
+uniform vec4 ubias2_3_Stage2_c1_c0_c1_c0;
+uniform vec4 ubias4_5_Stage2_c1_c0_c1_c0;
+uniform vec4 ubias6_7_Stage2_c1_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage2_c1_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage2_c1_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vEllipseOffsets0_Stage0;
+noperspective in vec2 vEllipseOffsets1_Stage0;
+noperspective in vec4 vinColor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+vec4 TextureEffect_Stage1_c0_c0(vec4 _input, vec2 _coords) {
+ _coords = _coords * uCoordTransformMatrix_1_Stage0.xz + uCoordTransformMatrix_1_Stage0.yw;
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, _coords) * _input;
+ return _output;
+}
+vec4 RadialGradientLayout_Stage2_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = length(vTransformedCoords_2_Stage0);
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage2_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage2_c1_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage2_c1_c0_c1_c0.x) {
+ scale = uscale0_1_Stage2_c1_c0_c1_c0;
+ bias = ubias0_1_Stage2_c1_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage2_c1_c0_c1_c0;
+ bias = ubias2_3_Stage2_c1_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage2_c1_c0_c1_c0.z) {
+ scale = uscale4_5_Stage2_c1_c0_c1_c0;
+ bias = ubias4_5_Stage2_c1_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage2_c1_c0_c1_c0;
+ bias = ubias6_7_Stage2_c1_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = RadialGradientLayout_Stage2_c1_c0_c0_c0(vec4(1.0));
+ {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage2_c1_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ vec2 scaledOffset = vEllipseOffsets0_Stage0;
+ float test = dot(scaledOffset, scaledOffset) - 1.0;
+ vec2 duvdx = dFdx(vEllipseOffsets0_Stage0);
+ vec2 duvdy = -dFdy(vEllipseOffsets0_Stage0);
+ vec2 grad = vec2(vEllipseOffsets0_Stage0.x * duvdx.x + vEllipseOffsets0_Stage0.y * duvdx.y, vEllipseOffsets0_Stage0.x * duvdy.x + vEllipseOffsets0_Stage0.y * duvdy.y);
+ float grad_dot = 4.0 * dot(grad, grad);
+ grad_dot = max(grad_dot, 1.1754999560161448e-38);
+ float invlen = inversesqrt(grad_dot);
+ float edgeAlpha = clamp(0.5 - test * invlen, 0.0, 1.0);
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ vec4 output_Stage1;
+ {
+ vec2 coord = vTransformedCoords_0_Stage0 - vec2(0.5);
+ vec2 f = fract(coord);
+ coord += 0.5 - f;
+ vec4 wx = mat4(0.055555555555555552, 0.88888888888888884, 0.055555555555555552, 0.0, -0.5, 0.0, 0.5, 0.0, 0.83333333333333337, -2.0, 1.5, -0.33333333333333331, -0.3888888888888889, 1.1666666666666667, -1.1666666666666667, 0.3888888888888889) * vec4(1.0, f.x, f.x * f.x, (f.x * f.x) * f.x);
+ vec4 wy = mat4(0.055555555555555552, 0.88888888888888884, 0.055555555555555552, 0.0, -0.5, 0.0, 0.5, 0.0, 0.83333333333333337, -2.0, 1.5, -0.33333333333333331, -0.3888888888888889, 1.1666666666666667, -1.1666666666666667, 0.3888888888888889) * vec4(1.0, f.y, f.y * f.y, (f.y * f.y) * f.y);
+ vec4 rowColors[4];
+ rowColors[0] = TextureEffect_Stage1_c0_c0(vec4(1.0), coord + vec2(-1.0, -1.0));
+ rowColors[1] = TextureEffect_Stage1_c0_c0(vec4(1.0), coord + vec2(0.0, -1.0));
+ rowColors[2] = TextureEffect_Stage1_c0_c0(vec4(1.0), coord + vec2(1.0, -1.0));
+ rowColors[3] = TextureEffect_Stage1_c0_c0(vec4(1.0), coord + vec2(2.0, -1.0));
+ vec4 s0 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ rowColors[0] = TextureEffect_Stage1_c0_c0(vec4(1.0), coord + vec2(-1.0, 0.0));
+ rowColors[1] = TextureEffect_Stage1_c0_c0(vec4(1.0), coord);
+ rowColors[2] = TextureEffect_Stage1_c0_c0(vec4(1.0), coord + vec2(1.0, 0.0));
+ rowColors[3] = TextureEffect_Stage1_c0_c0(vec4(1.0), coord + vec2(2.0, 0.0));
+ vec4 s1 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ rowColors[0] = TextureEffect_Stage1_c0_c0(vec4(1.0), coord + vec2(-1.0, 1.0));
+ rowColors[1] = TextureEffect_Stage1_c0_c0(vec4(1.0), coord + vec2(0.0, 1.0));
+ rowColors[2] = TextureEffect_Stage1_c0_c0(vec4(1.0), coord + vec2(1.0, 1.0));
+ rowColors[3] = TextureEffect_Stage1_c0_c0(vec4(1.0), coord + vec2(2.0, 1.0));
+ vec4 s2 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ rowColors[0] = TextureEffect_Stage1_c0_c0(vec4(1.0), coord + vec2(-1.0, 2.0));
+ rowColors[1] = TextureEffect_Stage1_c0_c0(vec4(1.0), coord + vec2(0.0, 2.0));
+ rowColors[2] = TextureEffect_Stage1_c0_c0(vec4(1.0), coord + vec2(1.0, 2.0));
+ rowColors[3] = TextureEffect_Stage1_c0_c0(vec4(1.0), coord + vec2(2.0, 2.0));
+ vec4 s3 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ vec4 bicubicColor = ((wy.x * s0 + wy.y * s1) + wy.z * s2) + wy.w * s3;
+ bicubicColor.xyz = max(vec3(0.0), min(bicubicColor.xyz, bicubicColor.www));
+ output_Stage1 = bicubicColor * outputCoverage_Stage0;
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_dst_in(output_Stage1, TiledGradientEffect_Stage2_c1_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = 1.0 - output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec2 inEllipseOffsets0;
+in vec2 inEllipseOffsets1;
+noperspective out vec2 vEllipseOffsets0_Stage0;
+noperspective out vec2 vEllipseOffsets1_Stage0;
+noperspective out vec4 vinColor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+void main() {
+ vEllipseOffsets0_Stage0 = inEllipseOffsets0;
+ vEllipseOffsets1_Stage0 = inEllipseOffsets1;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1936.shader_test b/shaders/skia/1936.shader_test
new file mode 100644
index 0000000..db242f5
--- /dev/null
+++ b/shaders/skia/1936.shader_test
@@ -0,0 +1,238 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_KHR_blend_equation_advanced : require
+out vec4 sk_FragColor;
+layout (blend_support_all_equations) out ;
+uniform vec2 uImageIncrement_Stage1_c0_c0;
+uniform vec2 uBounds_Stage1_c0_c0;
+uniform vec4 uKernel_Stage1_c0_c0[4];
+uniform vec2 uImageIncrement_Stage1_c1_c0_c1_c0_c0_c0;
+uniform vec4 uKernel_Stage1_c1_c0_c1_c0_c0_c0[4];
+uniform vec4 ucolor_Stage1_c1_c0_c1_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+uniform sampler2D uTextureSampler_2_Stage1;
+in vec4 vcolor_Stage0;
+in vec2 vTransformedCoords_0_Stage0;
+in vec2 vTransformedCoords_1_Stage0;
+in vec2 vTransformedCoords_2_Stage0;
+vec4 GaussianConvolution_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0 - 7.0 * uImageIncrement_Stage1_c0_c0;
+ vec2 coordSampled = vec2(0.0, 0.0);
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1_c0_c0.x, uBounds_Stage1_c0_c0.y);
+ _output += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1_c0_c0[0].x;
+ coord += uImageIncrement_Stage1_c0_c0;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1_c0_c0.x, uBounds_Stage1_c0_c0.y);
+ _output += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1_c0_c0[0].y;
+ coord += uImageIncrement_Stage1_c0_c0;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1_c0_c0.x, uBounds_Stage1_c0_c0.y);
+ _output += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1_c0_c0[0].z;
+ coord += uImageIncrement_Stage1_c0_c0;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1_c0_c0.x, uBounds_Stage1_c0_c0.y);
+ _output += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1_c0_c0[0].w;
+ coord += uImageIncrement_Stage1_c0_c0;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1_c0_c0.x, uBounds_Stage1_c0_c0.y);
+ _output += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1_c0_c0[1].x;
+ coord += uImageIncrement_Stage1_c0_c0;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1_c0_c0.x, uBounds_Stage1_c0_c0.y);
+ _output += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1_c0_c0[1].y;
+ coord += uImageIncrement_Stage1_c0_c0;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1_c0_c0.x, uBounds_Stage1_c0_c0.y);
+ _output += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1_c0_c0[1].z;
+ coord += uImageIncrement_Stage1_c0_c0;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1_c0_c0.x, uBounds_Stage1_c0_c0.y);
+ _output += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1_c0_c0[1].w;
+ coord += uImageIncrement_Stage1_c0_c0;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1_c0_c0.x, uBounds_Stage1_c0_c0.y);
+ _output += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1_c0_c0[2].x;
+ coord += uImageIncrement_Stage1_c0_c0;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1_c0_c0.x, uBounds_Stage1_c0_c0.y);
+ _output += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1_c0_c0[2].y;
+ coord += uImageIncrement_Stage1_c0_c0;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1_c0_c0.x, uBounds_Stage1_c0_c0.y);
+ _output += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1_c0_c0[2].z;
+ coord += uImageIncrement_Stage1_c0_c0;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1_c0_c0.x, uBounds_Stage1_c0_c0.y);
+ _output += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1_c0_c0[2].w;
+ coord += uImageIncrement_Stage1_c0_c0;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1_c0_c0.x, uBounds_Stage1_c0_c0.y);
+ _output += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1_c0_c0[3].x;
+ coord += uImageIncrement_Stage1_c0_c0;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1_c0_c0.x, uBounds_Stage1_c0_c0.y);
+ _output += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1_c0_c0[3].y;
+ coord += uImageIncrement_Stage1_c0_c0;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1_c0_c0.x, uBounds_Stage1_c0_c0.y);
+ _output += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1_c0_c0[3].z;
+ coord += uImageIncrement_Stage1_c0_c0;
+ _output *= _input;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_1_Stage1, vTransformedCoords_1_Stage0) * _input;
+ return _output;
+}
+vec4 GaussianConvolution_Stage1_c1_c0_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_2_Stage0 - 7.0 * uImageIncrement_Stage1_c1_c0_c1_c0_c0_c0;
+ vec2 coordSampled = vec2(0.0, 0.0);
+ coordSampled = coord;
+ _output += texture(uTextureSampler_2_Stage1, coordSampled) * uKernel_Stage1_c1_c0_c1_c0_c0_c0[0].x;
+ coord += uImageIncrement_Stage1_c1_c0_c1_c0_c0_c0;
+ coordSampled = coord;
+ _output += texture(uTextureSampler_2_Stage1, coordSampled) * uKernel_Stage1_c1_c0_c1_c0_c0_c0[0].y;
+ coord += uImageIncrement_Stage1_c1_c0_c1_c0_c0_c0;
+ coordSampled = coord;
+ _output += texture(uTextureSampler_2_Stage1, coordSampled) * uKernel_Stage1_c1_c0_c1_c0_c0_c0[0].z;
+ coord += uImageIncrement_Stage1_c1_c0_c1_c0_c0_c0;
+ coordSampled = coord;
+ _output += texture(uTextureSampler_2_Stage1, coordSampled) * uKernel_Stage1_c1_c0_c1_c0_c0_c0[0].w;
+ coord += uImageIncrement_Stage1_c1_c0_c1_c0_c0_c0;
+ coordSampled = coord;
+ _output += texture(uTextureSampler_2_Stage1, coordSampled) * uKernel_Stage1_c1_c0_c1_c0_c0_c0[1].x;
+ coord += uImageIncrement_Stage1_c1_c0_c1_c0_c0_c0;
+ coordSampled = coord;
+ _output += texture(uTextureSampler_2_Stage1, coordSampled) * uKernel_Stage1_c1_c0_c1_c0_c0_c0[1].y;
+ coord += uImageIncrement_Stage1_c1_c0_c1_c0_c0_c0;
+ coordSampled = coord;
+ _output += texture(uTextureSampler_2_Stage1, coordSampled) * uKernel_Stage1_c1_c0_c1_c0_c0_c0[1].z;
+ coord += uImageIncrement_Stage1_c1_c0_c1_c0_c0_c0;
+ coordSampled = coord;
+ _output += texture(uTextureSampler_2_Stage1, coordSampled) * uKernel_Stage1_c1_c0_c1_c0_c0_c0[1].w;
+ coord += uImageIncrement_Stage1_c1_c0_c1_c0_c0_c0;
+ coordSampled = coord;
+ _output += texture(uTextureSampler_2_Stage1, coordSampled) * uKernel_Stage1_c1_c0_c1_c0_c0_c0[2].x;
+ coord += uImageIncrement_Stage1_c1_c0_c1_c0_c0_c0;
+ coordSampled = coord;
+ _output += texture(uTextureSampler_2_Stage1, coordSampled) * uKernel_Stage1_c1_c0_c1_c0_c0_c0[2].y;
+ coord += uImageIncrement_Stage1_c1_c0_c1_c0_c0_c0;
+ coordSampled = coord;
+ _output += texture(uTextureSampler_2_Stage1, coordSampled) * uKernel_Stage1_c1_c0_c1_c0_c0_c0[2].z;
+ coord += uImageIncrement_Stage1_c1_c0_c1_c0_c0_c0;
+ coordSampled = coord;
+ _output += texture(uTextureSampler_2_Stage1, coordSampled) * uKernel_Stage1_c1_c0_c1_c0_c0_c0[2].w;
+ coord += uImageIncrement_Stage1_c1_c0_c1_c0_c0_c0;
+ coordSampled = coord;
+ _output += texture(uTextureSampler_2_Stage1, coordSampled) * uKernel_Stage1_c1_c0_c1_c0_c0_c0[3].x;
+ coord += uImageIncrement_Stage1_c1_c0_c1_c0_c0_c0;
+ coordSampled = coord;
+ _output += texture(uTextureSampler_2_Stage1, coordSampled) * uKernel_Stage1_c1_c0_c1_c0_c0_c0[3].y;
+ coord += uImageIncrement_Stage1_c1_c0_c1_c0_c0_c0;
+ coordSampled = coord;
+ _output += texture(uTextureSampler_2_Stage1, coordSampled) * uKernel_Stage1_c1_c0_c1_c0_c0_c0[3].z;
+ coord += uImageIncrement_Stage1_c1_c0_c1_c0_c0_c0;
+ _output *= _input;
+ return _output;
+}
+vec4 ConstColorProcessor_Stage1_c1_c0_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = _input * ucolor_Stage1_c1_c0_c1_c0_c1_c0;
+ }
+ return _output;
+}
+vec4 blend_xor(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src + (1.0 - src.w) * dst;
+}
+vec4 ComposeTwo_Stage1_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_xor(GaussianConvolution_Stage1_c1_c0_c1_c0_c0_c0(inputColor), ConstColorProcessor_Stage1_c1_c0_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+float _blend_color_luminance(vec3 color) {
+ return dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), color);
+}
+vec3 _blend_set_color_luminance(vec3 hueSatColor, float alpha, vec3 lumColor) {
+ float lum = _blend_color_luminance(lumColor);
+ vec3 result = (lum - _blend_color_luminance(hueSatColor)) + hueSatColor;
+ float minComp = min(min(result.x, result.y), result.z);
+ float maxComp = max(max(result.x, result.y), result.z);
+ if (minComp < 0.0 && lum != minComp) {
+ result = lum + ((result - lum) * lum) / (lum - minComp);
+ }
+ if (maxComp > alpha && maxComp != lum) {
+ return lum + ((result - lum) * (alpha - lum)) / (maxComp - lum);
+ }
+ return result;
+}
+vec4 blend_luminosity(vec4 src, vec4 dst) {
+ float alpha = dst.w * src.w;
+ vec3 sda = src.xyz * dst.w;
+ vec3 dsa = dst.xyz * src.w;
+ return vec4((((_blend_set_color_luminance(dsa, alpha, sda) + dst.xyz) - dsa) + src.xyz) - sda, (src.w + dst.w) - alpha);
+}
+vec4 ComposeTwo_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_luminosity(TextureEffect_Stage1_c1_c0_c0_c0(inputColor), ComposeTwo_Stage1_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 blend_src_out(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_src_out(GaussianConvolution_Stage1_c0_c0(inputColor), ComposeTwo_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+out vec4 vcolor_Stage0;
+out vec2 vTransformedCoords_0_Stage0;
+out vec2 vTransformedCoords_1_Stage0;
+out vec2 vTransformedCoords_2_Stage0;
+void main() {
+ vec4 color = inColor;
+ vcolor_Stage0 = color;
+ vec3 pos3 = uViewM_Stage0 * vec3(inPosition, 1.0);
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos3.x, pos3.y, 0.0, pos3.z);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1939.shader_test b/shaders/skia/1939.shader_test
new file mode 100644
index 0000000..7ec0529
--- /dev/null
+++ b/shaders/skia/1939.shader_test
@@ -0,0 +1,190 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_KHR_blend_equation_advanced : require
+out vec4 sk_FragColor;
+layout (blend_support_all_equations) out ;
+uniform vec4 ucolor_Stage1;
+uniform vec2 ubaseFrequency_Stage2;
+uniform float uz_Stage2;
+uniform vec2 ubaseFrequency_Stage4;
+uniform float uz_Stage4;
+uniform sampler2D uTextureSampler_0_Stage0;
+uniform sampler2D uTextureSampler_0_Stage2;
+uniform sampler2D uTextureSampler_1_Stage2;
+uniform sampler2D uTextureSampler_0_Stage4;
+uniform sampler2D uTextureSampler_1_Stage4;
+uniform sampler2D uTextureSampler_0_Stage5;
+in vec2 vTextureCoords_Stage0;
+flat in int vTexIndex_Stage0;
+in vec2 vIntTextureCoords_Stage0;
+in vec4 vinColor_Stage0;
+in vec2 vTransformedCoords_0_Stage0;
+in vec2 vTransformedCoords_1_Stage0;
+vec3 fade_Stage2(vec3 t) {
+ return ((t * t) * t) * (t * (t * 6.0 - 15.0) + 10.0);
+}
+float perm_Stage2(float x) {
+ return texture(uTextureSampler_0_Stage2, vec2(fract(x / 256.0), 0.0)).x * 255.0;
+}
+float grad_Stage2(float x, vec3 p) {
+ return dot(texture(uTextureSampler_1_Stage2, vec2(fract(x / 16.0), 0.0)).xyz * 255.0 - vec3(1.0), p);
+}
+float lerp_Stage2(float a, float b, float w) {
+ return a + w * (b - a);
+}
+float noise_Stage2(vec3 p) {
+ vec3 P = mod(floor(p), 256.0);
+ p -= floor(p);
+ vec3 f = fade_Stage2(p);
+ float A = perm_Stage2(P.x) + P.y;
+ float AA = perm_Stage2(A) + P.z;
+ float AB = perm_Stage2(A + 1.0) + P.z;
+ float B = perm_Stage2(P.x + 1.0) + P.y;
+ float BA = perm_Stage2(B) + P.z;
+ float BB = perm_Stage2(B + 1.0) + P.z;
+ float result = lerp_Stage2(lerp_Stage2(lerp_Stage2(grad_Stage2(perm_Stage2(AA), p), grad_Stage2(perm_Stage2(BA), p + vec3(-1.0, 0.0, 0.0)), f.x), lerp_Stage2(grad_Stage2(perm_Stage2(AB), p + vec3(0.0, -1.0, 0.0)), grad_Stage2(perm_Stage2(BB), p + vec3(-1.0, -1.0, 0.0)), f.x), f.y), lerp_Stage2(lerp_Stage2(grad_Stage2(perm_Stage2(AA + 1.0), p + vec3(0.0, 0.0, -1.0)), grad_Stage2(perm_Stage2(BA + 1.0), p + vec3(-1.0, 0.0, -1.0)), f.x), lerp_Stage2(grad_Stage2(perm_Stage2(AB + 1.0), p + vec3(0.0, -1.0, -1.0)), grad_Stage2(perm_Stage2(BB + 1.0), p + vec3(-1.0, -1.0, -1.0)), f.x), f.y), f.z);
+ return result;
+}
+float noiseOctaves_Stage2(vec3 p) {
+ float result = 0.0;
+ float ratio = 1.0;
+ for (float i = 0.0;i < 7.0; i++) {
+ result += noise_Stage2(p) / ratio;
+ p *= 2.0;
+ ratio *= 2.0;
+ }
+ return (result + 1.0) / 2.0;
+}
+vec3 fade_Stage4(vec3 t) {
+ return ((t * t) * t) * (t * (t * 6.0 - 15.0) + 10.0);
+}
+float perm_Stage4(float x) {
+ return texture(uTextureSampler_0_Stage4, vec2(fract(x / 256.0), 0.0)).x * 255.0;
+}
+float grad_Stage4(float x, vec3 p) {
+ return dot(texture(uTextureSampler_1_Stage4, vec2(fract(x / 16.0), 0.0)).xyz * 255.0 - vec3(1.0), p);
+}
+float lerp_Stage4(float a, float b, float w) {
+ return a + w * (b - a);
+}
+float noise_Stage4(vec3 p) {
+ vec3 P = mod(floor(p), 256.0);
+ p -= floor(p);
+ vec3 f = fade_Stage4(p);
+ float A = perm_Stage4(P.x) + P.y;
+ float AA = perm_Stage4(A) + P.z;
+ float AB = perm_Stage4(A + 1.0) + P.z;
+ float B = perm_Stage4(P.x + 1.0) + P.y;
+ float BA = perm_Stage4(B) + P.z;
+ float BB = perm_Stage4(B + 1.0) + P.z;
+ float result = lerp_Stage4(lerp_Stage4(lerp_Stage4(grad_Stage4(perm_Stage4(AA), p), grad_Stage4(perm_Stage4(BA), p + vec3(-1.0, 0.0, 0.0)), f.x), lerp_Stage4(grad_Stage4(perm_Stage4(AB), p + vec3(0.0, -1.0, 0.0)), grad_Stage4(perm_Stage4(BB), p + vec3(-1.0, -1.0, 0.0)), f.x), f.y), lerp_Stage4(lerp_Stage4(grad_Stage4(perm_Stage4(AA + 1.0), p + vec3(0.0, 0.0, -1.0)), grad_Stage4(perm_Stage4(BA + 1.0), p + vec3(-1.0, 0.0, -1.0)), f.x), lerp_Stage4(grad_Stage4(perm_Stage4(AB + 1.0), p + vec3(0.0, -1.0, -1.0)), grad_Stage4(perm_Stage4(BB + 1.0), p + vec3(-1.0, -1.0, -1.0)), f.x), f.y), f.z);
+ return result;
+}
+float noiseOctaves_Stage4(vec3 p) {
+ float result = 0.0;
+ float ratio = 1.0;
+ for (float i = 0.0;i < 8.0; i++) {
+ result += noise_Stage4(p) / ratio;
+ p *= 2.0;
+ ratio *= 2.0;
+ }
+ return (result + 1.0) / 2.0;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vinColor_Stage0;
+ vec2 uv = vTextureCoords_Stage0;
+ vec4 texColor;
+ {
+ texColor = texture(uTextureSampler_0_Stage0, uv);
+ }
+ float distance = 7.96875 * (texColor.x - 0.50196081399917603);
+ vec2 dist_grad = vec2(dFdx(distance), -dFdy(distance));
+ float dg_len2 = dot(dist_grad, dist_grad);
+ if (dg_len2 < 9.9999997473787516e-05) {
+ dist_grad = vec2(0.70709997415542603, 0.70709997415542603);
+ } else {
+ dist_grad = dist_grad * inversesqrt(dg_len2);
+ }
+ }
+ vec4 output_Stage2;
+ {
+ vec2 coords = vTransformedCoords_0_Stage0 * ubaseFrequency_Stage2;
+ float r = noiseOctaves_Stage2(vec3(coords, uz_Stage2));
+ float g = noiseOctaves_Stage2(vec3(coords, uz_Stage2));
+ float b = noiseOctaves_Stage2(vec3(coords, uz_Stage2));
+ float a = noiseOctaves_Stage2(vec3(coords, uz_Stage2));
+ output_Stage2 = vec4(r, g, b, a);
+ output_Stage2 = clamp(output_Stage2, 0.0, 1.0);
+ output_Stage2 = vec4(output_Stage2.xyz * output_Stage2.www, output_Stage2.w);
+ }
+ vec4 output_Stage3;
+ {
+ output_Stage3 = floor(output_Stage2 * 255.0 + 0.5) / 255.0;
+ {
+ output_Stage3.xyz = floor((output_Stage3.xyz * output_Stage3.w) * 255.0 + 0.5) / 255.0;
+ }
+ }
+ vec4 output_Stage4;
+ {
+ vec2 coords = vTransformedCoords_1_Stage0 * ubaseFrequency_Stage4;
+ float r = noiseOctaves_Stage4(vec3(coords, uz_Stage4));
+ float g = noiseOctaves_Stage4(vec3(coords, uz_Stage4));
+ float b = noiseOctaves_Stage4(vec3(coords, uz_Stage4));
+ float a = noiseOctaves_Stage4(vec3(coords, uz_Stage4));
+ output_Stage4 = vec4(r, g, b, a);
+ output_Stage4 = clamp(output_Stage4, 0.0, 1.0);
+ output_Stage4 = vec4(output_Stage4.xyz * output_Stage4.www, output_Stage4.w);
+ }
+ vec4 output_Stage5;
+ {
+ float nonZeroAlpha = max(output_Stage4.w, 9.9999997473787516e-05);
+ vec4 coord = vec4(output_Stage4.xyz / nonZeroAlpha, nonZeroAlpha);
+ coord = coord * 0.9960939884185791 + vec4(0.0019529999699443579, 0.0019529999699443579, 0.0019529999699443579, 0.0019529999699443579);
+ output_Stage5.w = texture(uTextureSampler_0_Stage5, vec2(coord.w, 0.125)).w;
+ output_Stage5.x = texture(uTextureSampler_0_Stage5, vec2(coord.x, 0.375)).w;
+ output_Stage5.y = texture(uTextureSampler_0_Stage5, vec2(coord.y, 0.625)).w;
+ output_Stage5.z = texture(uTextureSampler_0_Stage5, vec2(coord.z, 0.875)).w;
+ output_Stage5.xyz *= output_Stage5.w;
+ }
+ {
+ sk_FragColor = output_Stage5 * outputColor_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform vec2 uAtlasDimensionsInv_Stage0;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in uvec2 inTextureCoords;
+out vec2 vTextureCoords_Stage0;
+flat out int vTexIndex_Stage0;
+out vec2 vIntTextureCoords_Stage0;
+out vec4 vinColor_Stage0;
+out vec2 vTransformedCoords_0_Stage0;
+out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ ivec2 signedCoords = ivec2(int(inTextureCoords.x), int(inTextureCoords.y));
+ vec2 unormTexCoords = vec2(float(signedCoords.x / 2), float(signedCoords.y / 2));
+ vTextureCoords_Stage0 = unormTexCoords * uAtlasDimensionsInv_Stage0;
+ vTexIndex_Stage0 = 0;
+ vIntTextureCoords_Stage0 = unormTexCoords;
+ vinColor_Stage0 = inColor;
+ vec3 pos3 = uViewM_Stage0 * vec3(inPosition, 1.0);
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos3.x, pos3.y, 0.0, pos3.z);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1942.shader_test b/shaders/skia/1942.shader_test
new file mode 100644
index 0000000..128d96d
--- /dev/null
+++ b/shaders/skia/1942.shader_test
@@ -0,0 +1,283 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uinnerRect_Stage1_c0_c0_c0_c0;
+uniform vec2 uradiusPlusHalf_Stage1_c0_c0_c0_c0;
+uniform vec3 uedges_Stage1_c0_c0_c1_c0_c0_c0[8];
+uniform vec2 uScale_Stage1_c0_c0_c1_c0_c1_c0;
+uniform vec4 uTexDom_Stage1_c0_c0_c1_c0_c1_c0;
+uniform vec3 uDecalParams_Stage1_c0_c0_c1_c0_c1_c0;
+uniform float uPixelSize_Stage1_c1_c0_c0_c0_c0_c0;
+uniform vec2 uRange_Stage1_c1_c0_c0_c0_c0_c0;
+uniform vec4 uellipse_Stage1_c1_c0_c0_c0_c1_c0;
+uniform vec3 uedges_Stage1_c1_c0_c1_c0[5];
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+uniform sampler2D uTextureSampler_2_Stage1;
+noperspective in vec2 vEllipseOffsets0_Stage0;
+noperspective in vec2 vEllipseOffsets1_Stage0;
+noperspective in vec4 vinColor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+vec4 CircularRRect_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 dxy0 = uinnerRect_Stage1_c0_c0_c0_c0.xy - gl_FragCoord.xy;
+ vec2 dxy1 = gl_FragCoord.xy - uinnerRect_Stage1_c0_c0_c0_c0.zw;
+ vec2 dxy = max(max(dxy0, dxy1), 0.0);
+ float alpha = clamp(uradiusPlusHalf_Stage1_c0_c0_c0_c0.x - length(dxy), 0.0, 1.0);
+ _output = _input * alpha;
+ return _output;
+}
+vec4 ConvexPoly_Stage1_c0_c0_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float alpha = 1.0;
+ float edge;
+ edge = dot(uedges_Stage1_c0_c0_c1_c0_c0_c0[0], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage1_c0_c0_c1_c0_c0_c0[1], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage1_c0_c0_c1_c0_c0_c0[2], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage1_c0_c0_c1_c0_c0_c0[3], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage1_c0_c0_c1_c0_c0_c0[4], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage1_c0_c0_c1_c0_c0_c0[5], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage1_c0_c0_c1_c0_c0_c0[6], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage1_c0_c0_c1_c0_c0_c0[7], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ alpha = 1.0 - alpha;
+ _output = _input * alpha;
+ return _output;
+}
+vec4 DisplacementMap_Stage1_c0_c0_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 dColor = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ dColor.xyz = dColor.w < 9.9999999747524271e-07 ? vec3(0.0) : clamp(dColor.xyz / dColor.w, 0.0, 1.0);
+ vec2 cCoords = vTransformedCoords_1_Stage0 + uScale_Stage1_c0_c0_c1_c0_c1_c0 * (dColor.yy - vec2(0.5));
+ {
+ vec2 origCoord = cCoords;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c1_c0_c1_c0.xy, uTexDom_Stage1_c0_c0_c1_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c1_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c1_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c1_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c1_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ _output = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ return _output;
+}
+vec4 blend_plus(vec4 src, vec4 dst) {
+ return min(src + dst, 1.0);
+}
+vec4 ComposeTwo_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_plus(ConvexPoly_Stage1_c0_c0_c1_c0_c0_c0(inputColor), DisplacementMap_Stage1_c0_c0_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 blend_src_atop(vec4 src, vec4 dst) {
+ return dst.w * src + (1.0 - src.w) * dst;
+}
+vec4 ComposeTwo_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_src_atop(CircularRRect_Stage1_c0_c0_c0_c0(inputColor), ComposeTwo_Stage1_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 Morphology_Stage1_c1_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_2_Stage0;
+ coord.y -= 9.0 * uPixelSize_Stage1_c1_c0_c0_c0_c0_c0;
+ for (int i = 0;i < 19; i++) {
+ _output = max(_output, texture(uTextureSampler_2_Stage1, coord));
+ coord.y += uPixelSize_Stage1_c1_c0_c0_c0_c0_c0;
+ }
+ _output *= _input;
+ return _output;
+}
+vec4 EllipseEffect_Stage1_c1_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 d = gl_FragCoord.xy - uellipse_Stage1_c1_c0_c0_c0_c1_c0.xy;
+ vec2 Z = d * uellipse_Stage1_c1_c0_c0_c0_c1_c0.zw;
+ float implicit = dot(Z, d) - 1.0;
+ float grad_dot = 4.0 * dot(Z, Z);
+ {
+ grad_dot = max(grad_dot, 1.1754999560161448e-38);
+ }
+ float approx_dist = implicit * inversesqrt(grad_dot);
+ float alpha;
+ {
+ alpha = approx_dist > 0.0 ? 0.0 : 1.0;
+ }
+ _output = _input * alpha;
+ return _output;
+}
+vec4 blend_difference(vec4 src, vec4 dst) {
+ return vec4((src.xyz + dst.xyz) - 2.0 * min(src.xyz * dst.w, dst.xyz * src.w), src.w + (1.0 - src.w) * dst.w);
+}
+vec4 ComposeTwo_Stage1_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_difference(Morphology_Stage1_c1_c0_c0_c0_c0_c0(inputColor), EllipseEffect_Stage1_c1_c0_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 ConvexPoly_Stage1_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float alpha = 1.0;
+ float edge;
+ edge = dot(uedges_Stage1_c1_c0_c1_c0[0], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage1_c1_c0_c1_c0[1], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage1_c1_c0_c1_c0[2], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage1_c1_c0_c1_c0[3], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage1_c1_c0_c1_c0[4], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ alpha = 1.0 - alpha;
+ _output = _input * alpha;
+ return _output;
+}
+float _blend_color_saturation(vec3 color) {
+ return max(max(color.x, color.y), color.z) - min(min(color.x, color.y), color.z);
+}
+vec3 _blend_set_color_saturation_helper(vec3 minMidMax, float sat) {
+ if (minMidMax.x < minMidMax.z) {
+ return vec3(0.0, (sat * (minMidMax.y - minMidMax.x)) / (minMidMax.z - minMidMax.x), sat);
+ }
+ return vec3(0.0);
+}
+vec3 _blend_set_color_saturation(vec3 hueLumColor, vec3 satColor) {
+ float sat = _blend_color_saturation(satColor);
+ if (hueLumColor.x <= hueLumColor.y) {
+ if (hueLumColor.y <= hueLumColor.z) {
+ hueLumColor.xyz = _blend_set_color_saturation_helper(hueLumColor, sat);
+ } else if (hueLumColor.x <= hueLumColor.z) {
+ hueLumColor.xzy = _blend_set_color_saturation_helper(hueLumColor.xzy, sat);
+ } else {
+ hueLumColor.zxy = _blend_set_color_saturation_helper(hueLumColor.zxy, sat);
+ }
+ } else if (hueLumColor.x <= hueLumColor.z) {
+ hueLumColor.yxz = _blend_set_color_saturation_helper(hueLumColor.yxz, sat);
+ } else if (hueLumColor.y <= hueLumColor.z) {
+ hueLumColor.yzx = _blend_set_color_saturation_helper(hueLumColor.yzx, sat);
+ } else {
+ hueLumColor.zyx = _blend_set_color_saturation_helper(hueLumColor.zyx, sat);
+ }
+ return hueLumColor;
+}
+float _blend_color_luminance(vec3 color) {
+ return dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), color);
+}
+vec3 _blend_set_color_luminance(vec3 hueSatColor, float alpha, vec3 lumColor) {
+ float lum = _blend_color_luminance(lumColor);
+ vec3 result = (lum - _blend_color_luminance(hueSatColor)) + hueSatColor;
+ float minComp = min(min(result.x, result.y), result.z);
+ float maxComp = max(max(result.x, result.y), result.z);
+ if (minComp < 0.0 && lum != minComp) {
+ result = lum + ((result - lum) * lum) / (lum - minComp);
+ }
+ if (maxComp > alpha && maxComp != lum) {
+ return lum + ((result - lum) * (alpha - lum)) / (maxComp - lum);
+ }
+ return result;
+}
+vec4 blend_saturation(vec4 src, vec4 dst) {
+ float alpha = dst.w * src.w;
+ vec3 sda = src.xyz * dst.w;
+ vec3 dsa = dst.xyz * src.w;
+ return vec4((((_blend_set_color_luminance(_blend_set_color_saturation(dsa, sda), alpha, dsa) + dst.xyz) - dsa) + src.xyz) - sda, (src.w + dst.w) - alpha);
+}
+vec4 ComposeTwo_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_saturation(ComposeTwo_Stage1_c1_c0_c0_c0(inputColor), ConvexPoly_Stage1_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vinColor_Stage0;
+ vec2 scaledOffset = vEllipseOffsets0_Stage0;
+ float test = dot(scaledOffset, scaledOffset) - 1.0;
+ vec2 duvdx = dFdx(vEllipseOffsets0_Stage0);
+ vec2 duvdy = dFdy(vEllipseOffsets0_Stage0);
+ vec2 grad = vec2(vEllipseOffsets0_Stage0.x * duvdx.x + vEllipseOffsets0_Stage0.y * duvdx.y, vEllipseOffsets0_Stage0.x * duvdy.x + vEllipseOffsets0_Stage0.y * duvdy.y);
+ float grad_dot = 4.0 * dot(grad, grad);
+ grad_dot = max(grad_dot, 1.1754999560161448e-38);
+ float invlen = inversesqrt(grad_dot);
+ float edgeAlpha = clamp(0.5 - test * invlen, 0.0, 1.0);
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_difference(ComposeTwo_Stage1_c0_c0(inputColor), ComposeTwo_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ sk_FragColor = output_Stage1 * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec2 inEllipseOffsets0;
+in vec2 inEllipseOffsets1;
+noperspective out vec2 vEllipseOffsets0_Stage0;
+noperspective out vec2 vEllipseOffsets1_Stage0;
+noperspective out vec4 vinColor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+void main() {
+ vEllipseOffsets0_Stage0 = inEllipseOffsets0;
+ vEllipseOffsets1_Stage0 = inEllipseOffsets1;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = (uViewM_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1945.shader_test b/shaders/skia/1945.shader_test
new file mode 100644
index 0000000..5a29325
--- /dev/null
+++ b/shaders/skia/1945.shader_test
@@ -0,0 +1,127 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uScale_Stage1;
+uniform vec4 uTexDom_Stage1;
+uniform vec3 uDecalParams_Stage1;
+uniform vec4 ucircleData_Stage3;
+uniform vec4 urectH_Stage4_c0_c0;
+uniform float uinvSixSigma_Stage4_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+uniform sampler2D uTextureSampler_0_Stage3;
+uniform sampler2D uTextureSampler_0_Stage4;
+uniform sampler2D uTextureSampler_1_Stage4;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vtextureCoords_Stage0;
+flat in vec4 vtextureDomain_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 RectBlurEffect_Stage4_c0_c0(vec4 _input) {
+ vec4 _output;
+ float xCoverage, yCoverage;
+ {
+ float x, y;
+ {
+ x = max(urectH_Stage4_c0_c0.x - gl_FragCoord.x, gl_FragCoord.x - urectH_Stage4_c0_c0.z);
+ y = max(urectH_Stage4_c0_c0.y - gl_FragCoord.y, gl_FragCoord.y - urectH_Stage4_c0_c0.w);
+ }
+ xCoverage = texture(uTextureSampler_0_Stage4, vec2(x * uinvSixSigma_Stage4_c0_c0, 0.5)).w;
+ yCoverage = texture(uTextureSampler_0_Stage4, vec2(y * uinvSixSigma_Stage4_c0_c0, 0.5)).w;
+ _output = (_input * xCoverage) * yCoverage;
+ }
+ _output = (_input * xCoverage) * yCoverage;
+ return _output;
+}
+vec4 ColorTableEffect_Stage4_c1_c0(vec4 _input) {
+ vec4 _output;
+ float nonZeroAlpha = max(_input.w, 9.9999997473787516e-05);
+ vec4 coord = vec4(_input.xyz / nonZeroAlpha, nonZeroAlpha);
+ coord = coord * 0.9960939884185791 + vec4(0.0019529999699443579, 0.0019529999699443579, 0.0019529999699443579, 0.0019529999699443579);
+ _output.w = texture(uTextureSampler_1_Stage4, vec2(coord.w, 0.125)).w;
+ _output.x = texture(uTextureSampler_1_Stage4, vec2(coord.x, 0.375)).w;
+ _output.y = texture(uTextureSampler_1_Stage4, vec2(coord.y, 0.625)).w;
+ _output.z = texture(uTextureSampler_1_Stage4, vec2(coord.z, 0.875)).w;
+ _output.xyz *= _output.w;
+ return _output;
+}
+vec4 blend_src_out(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ vec2 textureCoords;
+ textureCoords = vtextureCoords_Stage0;
+ vec4 textureDomain;
+ textureDomain = vtextureDomain_Stage0;
+ outputColor_Stage0 = vcolor_Stage0;
+ outputColor_Stage0 = texture(uTextureSampler_0_Stage0, clamp(textureCoords, textureDomain.xy, textureDomain.zw)) * outputColor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec4 dColor = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ dColor.xyz = dColor.w < 9.9999999747524271e-07 ? vec3(0.0) : clamp(dColor.xyz / dColor.w, 0.0, 1.0);
+ vec2 cCoords = vTransformedCoords_1_Stage0 + uScale_Stage1 * (dColor.zy - vec2(0.5));
+ {
+ vec2 origCoord = cCoords;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ output_Stage1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ }
+ vec4 output_Stage3;
+ {
+ vec2 vec = vec2((gl_FragCoord.x - ucircleData_Stage3.x) * ucircleData_Stage3.w, (gl_FragCoord.y - ucircleData_Stage3.y) * ucircleData_Stage3.w);
+ float dist = length(vec) + (0.5 - ucircleData_Stage3.z) * ucircleData_Stage3.w;
+ output_Stage3 = vec4(texture(uTextureSampler_0_Stage3, vec2(dist, 0.5)).w);
+ }
+ vec4 output_Stage4;
+ {
+ vec4 inputColor = vec4(output_Stage3.xyz, 1.0);
+ output_Stage4 = blend_src_out(RectBlurEffect_Stage4_c0_c0(inputColor), ColorTableEffect_Stage4_c1_c0(inputColor));
+ output_Stage4 *= output_Stage3.w;
+ }
+ {
+ sk_FragColor = output_Stage1 * output_Stage4;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 textureCoords;
+in vec4 textureDomain;
+in vec4 color;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vtextureCoords_Stage0;
+flat out vec4 vtextureDomain_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vec2 pos2 = position;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(textureCoords, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(textureCoords, 1.0)).xy;
+ vtextureCoords_Stage0 = textureCoords;
+ vtextureDomain_Stage0 = textureDomain;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1948.shader_test b/shaders/skia/1948.shader_test
new file mode 100644
index 0000000..d3d2f83
--- /dev/null
+++ b/shaders/skia/1948.shader_test
@@ -0,0 +1,677 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_KHR_blend_equation_advanced : require
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+layout (blend_support_all_equations) out ;
+uniform vec4 uColor_Stage0;
+uniform vec2 uImageIncrement_Stage1_c0_c0_c0_c0_c0_c0;
+uniform vec4 uKernel_Stage1_c0_c0_c0_c0_c0_c0[3];
+uniform vec2 uKernelOffset_Stage1_c0_c0_c0_c0_c0_c0;
+uniform float uGain_Stage1_c0_c0_c0_c0_c0_c0;
+uniform float uBias_Stage1_c0_c0_c0_c0_c0_c0;
+uniform vec4 uTexDom_Stage1_c0_c0_c0_c0_c0_c0;
+uniform vec3 uDecalParams_Stage1_c0_c0_c0_c0_c0_c0;
+uniform vec2 uImageIncrement_Stage1_c0_c0_c1_c0;
+uniform float uSurfaceScale_Stage1_c0_c0_c1_c0;
+uniform vec3 uLightColor_Stage1_c0_c0_c1_c0;
+uniform float uKS_Stage1_c0_c0_c1_c0;
+uniform float uShininess_Stage1_c0_c0_c1_c0;
+uniform vec4 uTexDom_Stage1_c0_c0_c1_c0;
+uniform vec3 uDecalParams_Stage1_c0_c0_c1_c0;
+uniform vec3 uLightLocation_Stage1_c0_c0_c1_c0;
+uniform float uExponent_Stage1_c0_c0_c1_c0;
+uniform float uCosInnerConeAngle_Stage1_c0_c0_c1_c0;
+uniform float uCosOuterConeAngle_Stage1_c0_c0_c1_c0;
+uniform float uConeScale_Stage1_c0_c0_c1_c0;
+uniform vec3 uS_Stage1_c0_c0_c1_c0;
+uniform vec3 uedges_Stage1_c1_c0_c0_c0_c0_c0[6];
+uniform vec4 uboundsUniform_Stage1_c1_c0_c0_c0_c1_c0;
+uniform float uxInvZoom_Stage1_c1_c0_c0_c0_c1_c0;
+uniform float uyInvZoom_Stage1_c1_c0_c0_c0_c1_c0;
+uniform float uxInvInset_Stage1_c1_c0_c0_c0_c1_c0;
+uniform float uyInvInset_Stage1_c1_c0_c0_c0_c1_c0;
+uniform vec2 uoffset_Stage1_c1_c0_c0_c0_c1_c0;
+uniform mat4 um_Stage1_c1_c0_c1_c0_c0_c0;
+uniform vec4 uv_Stage1_c1_c0_c1_c0_c0_c0;
+uniform float ucornerRadius_Stage1_c1_c0_c1_c0_c1_c0;
+uniform vec4 uproxyRect_Stage1_c1_c0_c1_c0_c1_c0;
+uniform float ublurRadius_Stage1_c1_c0_c1_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+uniform sampler2D uTextureSampler_2_Stage1;
+uniform sampler2D uTextureSampler_3_Stage1;
+in vec2 vTransformedCoords_0_Stage0;
+in vec2 vTransformedCoords_1_Stage0;
+in vec2 vTransformedCoords_2_Stage0;
+vec4 MatrixConvolution_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 sum = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0 - uKernelOffset_Stage1_c0_c0_c0_c0_c0_c0 * uImageIncrement_Stage1_c0_c0_c0_c0_c0_c0;
+ vec4 c;
+ {
+ float k = uKernel_Stage1_c0_c0_c0_c0_c0_c0[0].x;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c0_c0_c0_c0[0].y;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1_c0_c0_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c0_c0_c0_c0[0].z;
+ {
+ vec2 origCoord = coord + vec2(2.0, 0.0) * uImageIncrement_Stage1_c0_c0_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c0_c0_c0_c0[0].w;
+ {
+ vec2 origCoord = coord + vec2(3.0, 0.0) * uImageIncrement_Stage1_c0_c0_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c0_c0_c0_c0[1].x;
+ {
+ vec2 origCoord = coord + vec2(4.0, 0.0) * uImageIncrement_Stage1_c0_c0_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c0_c0_c0_c0[1].y;
+ {
+ vec2 origCoord = coord + vec2(5.0, 0.0) * uImageIncrement_Stage1_c0_c0_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c0_c0_c0_c0[1].z;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1_c0_c0_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c0_c0_c0_c0[1].w;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1_c0_c0_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c0_c0_c0_c0[2].x;
+ {
+ vec2 origCoord = coord + vec2(2.0, 1.0) * uImageIncrement_Stage1_c0_c0_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c0_c0_c0_c0[2].y;
+ {
+ vec2 origCoord = coord + vec2(3.0, 1.0) * uImageIncrement_Stage1_c0_c0_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c0_c0_c0_c0[2].z;
+ {
+ vec2 origCoord = coord + vec2(4.0, 1.0) * uImageIncrement_Stage1_c0_c0_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c0_c0_c0_c0[2].w;
+ {
+ vec2 origCoord = coord + vec2(5.0, 1.0) * uImageIncrement_Stage1_c0_c0_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ vec2 origCoord = vTransformedCoords_0_Stage0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ _output.w = c.w;
+ _output.xyz = clamp(sum.xyz * uGain_Stage1_c0_c0_c0_c0_c0_c0 + uBias_Stage1_c0_c0_c0_c0_c0_c0, 0.0, 1.0);
+ _output.xyz *= _output.w;
+ _output *= _input;
+ return _output;
+}
+vec4 Big_Ole_Key_Stage1_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = _input;
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+vec4 ComposeTwo_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_dst_in(MatrixConvolution_Stage1_c0_c0_c0_c0_c0_c0(inputColor), Big_Ole_Key_Stage1_c0_c0_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 light_Stage1_c0_c0_c1_c0(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ vec3 halfDir = normalize(surfaceToLight + vec3(0.0, 0.0, 1.0));
+ float colorScale = uKS_Stage1_c0_c0_c1_c0 * pow(dot(normal, halfDir), uShininess_Stage1_c0_c0_c1_c0);
+ vec3 color = lightColor * clamp(colorScale, 0.0, 1.0);
+ return vec4(color, max(max(color.x, color.y), color.z));
+}
+float sobel_Stage1_c0_c0_c1_c0(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage1_c0_c0_c1_c0(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage1_c0_c0_c1_c0(float m[9], float surfaceScale) {
+ return pointToNormal_Stage1_c0_c0_c1_c0(sobel_Stage1_c0_c0_c1_c0(m[0], m[2], m[3], m[5], m[6], m[8], 0.25), sobel_Stage1_c0_c0_c1_c0(m[0], m[6], m[1], m[7], m[2], m[8], 0.25), surfaceScale);
+}
+vec3 lightColor_Stage1_c0_c0_c1_c0(vec3 surfaceToLight) {
+ float cosAngle = -dot(surfaceToLight, uS_Stage1_c0_c0_c1_c0);
+ if (cosAngle < uCosOuterConeAngle_Stage1_c0_c0_c1_c0) {
+ return vec3(0.0);
+ }
+ float scale = pow(cosAngle, uExponent_Stage1_c0_c0_c1_c0);
+ if (cosAngle < uCosInnerConeAngle_Stage1_c0_c0_c1_c0) {
+ return ((uLightColor_Stage1_c0_c0_c1_c0 * scale) * (cosAngle - uCosOuterConeAngle_Stage1_c0_c0_c1_c0)) * uConeScale_Stage1_c0_c0_c1_c0;
+ }
+ return uLightColor_Stage1_c0_c0_c1_c0;
+}
+vec4 SpecularLighting_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coord = vTransformedCoords_1_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage1_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c1_c0.xy, uTexDom_Stage1_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp0 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c1_c0.xy, uTexDom_Stage1_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c1_c0.xy, uTexDom_Stage1_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage1_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c1_c0.xy, uTexDom_Stage1_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c1_c0.xy, uTexDom_Stage1_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c1_c0.xy, uTexDom_Stage1_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp5 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage1_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c1_c0.xy, uTexDom_Stage1_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp6 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage1_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c1_c0.xy, uTexDom_Stage1_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp7 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage1_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c1_c0.xy, uTexDom_Stage1_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp8 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = normalize(uLightLocation_Stage1_c0_c0_c1_c0 - vec3(gl_FragCoord.xy, uSurfaceScale_Stage1_c0_c0_c1_c0 * m[4]));
+ _output = light_Stage1_c0_c0_c1_c0(normal_Stage1_c0_c0_c1_c0(m, uSurfaceScale_Stage1_c0_c0_c1_c0), surfaceToLight, lightColor_Stage1_c0_c0_c1_c0(surfaceToLight));
+ _output *= _input;
+ return _output;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 blend_darken(vec4 src, vec4 dst) {
+ vec4 result = blend_src_over(src, dst);
+ result.xyz = min(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
+ return result;
+}
+vec4 ComposeTwo_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_darken(ComposeTwo_Stage1_c0_c0_c0_c0(inputColor), SpecularLighting_Stage1_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 ConvexPoly_Stage1_c1_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float alpha = 1.0;
+ float edge;
+ edge = dot(uedges_Stage1_c1_c0_c0_c0_c0_c0[0], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage1_c1_c0_c0_c0_c0_c0[1], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage1_c1_c0_c0_c0_c0_c0[2], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage1_c1_c0_c0_c0_c0_c0[3], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage1_c1_c0_c0_c0_c0_c0[4], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage1_c1_c0_c0_c0_c0_c0[5], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ _output = _input * alpha;
+ return _output;
+}
+vec4 MagnifierEffect_Stage1_c1_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coord = vTransformedCoords_2_Stage0;
+ vec2 zoom_coord = uoffset_Stage1_c1_c0_c0_c0_c1_c0 + coord * vec2(uxInvZoom_Stage1_c1_c0_c0_c0_c1_c0, uyInvZoom_Stage1_c1_c0_c0_c0_c1_c0);
+ vec2 delta = (coord - uboundsUniform_Stage1_c1_c0_c0_c0_c1_c0.xy) * uboundsUniform_Stage1_c1_c0_c0_c0_c1_c0.zw;
+ delta = min(delta, vec2(1.0, 1.0) - delta);
+ delta *= vec2(uxInvInset_Stage1_c1_c0_c0_c0_c1_c0, uyInvInset_Stage1_c1_c0_c0_c0_c1_c0);
+ float weight = 0.0;
+ if (delta.x < 2.0 && delta.y < 2.0) {
+ delta = vec2(2.0, 2.0) - delta;
+ float dist = length(delta);
+ dist = max(2.0 - dist, 0.0);
+ weight = min(dist * dist, 1.0);
+ } else {
+ vec2 delta_squared = delta * delta;
+ weight = min(min(delta_squared.x, delta_squared.y), 1.0);
+ }
+ _output = texture(uTextureSampler_2_Stage1, mix(coord, zoom_coord, weight));
+ return _output;
+}
+vec4 blend_multiply(vec4 src, vec4 dst) {
+ return vec4(((1.0 - src.w) * dst.xyz + (1.0 - dst.w) * src.xyz) + src.xyz * dst.xyz, src.w + (1.0 - src.w) * dst.w);
+}
+vec4 ComposeTwo_Stage1_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_multiply(ConvexPoly_Stage1_c1_c0_c0_c0_c0_c0(inputColor), MagnifierEffect_Stage1_c1_c0_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 ColorMatrixFragmentProcessor_Stage1_c1_c0_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = _input;
+ _output = um_Stage1_c1_c0_c1_c0_c0_c0 * inputColor + uv_Stage1_c1_c0_c1_c0_c0_c0;
+ {
+ _output = clamp(_output, 0.0, 1.0);
+ }
+ return _output;
+}
+vec4 RRectBlurEffect_Stage1_c1_c0_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 translatedFragPos = gl_FragCoord.xy - uproxyRect_Stage1_c1_c0_c1_c0_c1_c0.xy;
+ float threshold = ucornerRadius_Stage1_c1_c0_c1_c0_c1_c0 + 2.0 * ublurRadius_Stage1_c1_c0_c1_c0_c1_c0;
+ vec2 middle = (uproxyRect_Stage1_c1_c0_c1_c0_c1_c0.zw - uproxyRect_Stage1_c1_c0_c1_c0_c1_c0.xy) - 2.0 * threshold;
+ if (translatedFragPos.x >= threshold && translatedFragPos.x < middle.x + threshold) {
+ translatedFragPos.x = threshold;
+ } else if (translatedFragPos.x >= middle.x + threshold) {
+ translatedFragPos.x -= middle.x - 1.0;
+ }
+ if (translatedFragPos.y > threshold && translatedFragPos.y < middle.y + threshold) {
+ translatedFragPos.y = threshold;
+ } else if (translatedFragPos.y >= middle.y + threshold) {
+ translatedFragPos.y -= middle.y - 1.0;
+ }
+ vec2 proxyDims = vec2(2.0 * threshold + 1.0);
+ vec2 texCoord = translatedFragPos / proxyDims;
+ _output = _input * texture(uTextureSampler_3_Stage1, texCoord);
+ return _output;
+}
+vec4 ComposeTwo_Stage1_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_src_in(ColorMatrixFragmentProcessor_Stage1_c1_c0_c1_c0_c0_c0(inputColor), RRectBlurEffect_Stage1_c1_c0_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+float _guarded_divide(float n, float d) {
+ return n / d;
+}
+float _soft_light_component(float sc, float sa, float dc, float da) {
+ if (2.0 * sc <= sa) {
+ return (_guarded_divide((dc * dc) * (sa - 2.0 * sc), da) + (1.0 - da) * sc) + dc * ((-sa + 2.0 * sc) + 1.0);
+ } else if (4.0 * dc <= da) {
+ float DSqd = dc * dc;
+ float DCub = DSqd * dc;
+ float DaSqd = da * da;
+ float DaCub = DaSqd * da;
+ return _guarded_divide(((DaSqd * (sc - dc * ((3.0 * sa - 6.0 * sc) - 1.0)) + ((12.0 * da) * DSqd) * (sa - 2.0 * sc)) - (16.0 * DCub) * (sa - 2.0 * sc)) - DaCub * sc, DaSqd);
+ }
+ return ((dc * ((sa - 2.0 * sc) + 1.0) + sc) - sqrt(da * dc) * (sa - 2.0 * sc)) - da * sc;
+}
+vec4 blend_soft_light(vec4 src, vec4 dst) {
+ if (dst.w == 0.0) {
+ return src;
+ }
+ return vec4(_soft_light_component(src.x, src.w, dst.x, dst.w), _soft_light_component(src.y, src.w, dst.y, dst.w), _soft_light_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+}
+vec4 ComposeTwo_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_soft_light(ComposeTwo_Stage1_c1_c0_c0_c0(inputColor), ComposeTwo_Stage1_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+float _color_dodge_component(float sc, float sa, float dc, float da) {
+ if (dc == 0.0) {
+ return sc * (1.0 - da);
+ } else {
+ float d = sa - sc;
+ if (d == 0.0) {
+ return (sa * da + sc * (1.0 - da)) + dc * (1.0 - sa);
+ }
+ d = min(da, _guarded_divide(dc * sa, d));
+ return (d * sa + sc * (1.0 - da)) + dc * (1.0 - sa);
+ }
+}
+vec4 blend_color_dodge(vec4 src, vec4 dst) {
+ return vec4(_color_dodge_component(src.x, src.w, dst.x, dst.w), _color_dodge_component(src.y, src.w, dst.y, dst.w), _color_dodge_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = uColor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_color_dodge(ComposeTwo_Stage1_c0_c0(inputColor), ComposeTwo_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+in vec2 inPosition;
+out vec2 vTransformedCoords_0_Stage0;
+out vec2 vTransformedCoords_1_Stage0;
+out vec2 vTransformedCoords_2_Stage0;
+void main() {
+ vec3 pos3 = uViewM_Stage0 * vec3(inPosition, 1.0);
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos3.x, pos3.y, 0.0, pos3.z);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1951.shader_test b/shaders/skia/1951.shader_test
new file mode 100644
index 0000000..6d428cf
--- /dev/null
+++ b/shaders/skia/1951.shader_test
@@ -0,0 +1,155 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_KHR_blend_equation_advanced : require
+out vec4 sk_FragColor;
+layout (blend_support_all_equations) out ;
+uniform vec4 uColor_Stage0;
+uniform float uCoverage_Stage0;
+uniform vec4 uscale01_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias01_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale23_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias23_Stage1_c0_c0_c1_c0;
+uniform float uthreshold_Stage1_c0_c0_c1_c0;
+uniform vec4 uleftBorderColor_Stage2_c1_c0;
+uniform vec4 urightBorderColor_Stage2_c1_c0;
+uniform vec2 ufocalParams_Stage2_c1_c0_c0_c0;
+uniform vec4 uscale01_Stage2_c1_c0_c1_c0;
+uniform vec4 ubias01_Stage2_c1_c0_c1_c0;
+uniform vec4 uscale23_Stage2_c1_c0_c1_c0;
+uniform vec4 ubias23_Stage2_c1_c0_c1_c0;
+uniform float uthreshold_Stage2_c1_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 DualIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthreshold_Stage1_c0_c0_c1_c0) {
+ scale = uscale01_Stage1_c0_c0_c1_c0;
+ bias = ubias01_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale23_Stage1_c0_c0_c1_c0;
+ bias = ubias23_Stage1_c0_c0_c1_c0;
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = DualIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 TwoPointConicalGradientLayout_Stage2_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_1_Stage0;
+ float t = -1.0;
+ float v = 1.0;
+ {
+ {
+ float r0_2 = ufocalParams_Stage2_c1_c0_c0_c0.y;
+ t = r0_2 - p.y * p.y;
+ if (t >= 0.0) {
+ t = p.x + sqrt(t);
+ } else {
+ v = -1.0;
+ }
+ }
+ }
+ _output = vec4(t, v, 0.0, 0.0);
+ return _output;
+}
+vec4 DualIntervalGradientColorizer_Stage2_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthreshold_Stage2_c1_c0_c1_c0) {
+ scale = uscale01_Stage2_c1_c0_c1_c0;
+ bias = ubias01_Stage2_c1_c0_c1_c0;
+ } else {
+ scale = uscale23_Stage2_c1_c0_c1_c0;
+ bias = ubias23_Stage2_c1_c0_c1_c0;
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage2_c1_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage2_c1_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage2_c1_c0;
+ } else {
+ _output = DualIntervalGradientColorizer_Stage2_c1_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = uColor_Stage0;
+ outputCoverage_Stage0 = vec4(uCoverage_Stage0);
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_dst_in(outputColor_Stage0, TiledGradientEffect_Stage1_c0_c0(vec4(1.0)));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_dst_in(outputCoverage_Stage0, ClampedGradientEffect_Stage2_c1_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage2 * output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 inPosition;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1954.shader_test b/shaders/skia/1954.shader_test
new file mode 100644
index 0000000..2fb10b0
--- /dev/null
+++ b/shaders/skia/1954.shader_test
@@ -0,0 +1,256 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uColor_Stage0;
+uniform vec4 uellipse_Stage1_c0_c0;
+uniform vec2 uImageIncrement_Stage1_c1_c0_c0_c0_c1_c0;
+uniform vec2 uBounds_Stage1_c1_c0_c0_c0_c1_c0;
+uniform vec4 uKernel_Stage1_c1_c0_c0_c0_c1_c0[7];
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+uniform sampler2D uTextureSampler_2_Stage1;
+uniform sampler2D uTextureSampler_3_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec3 vTransformedCoords_2_Stage0;
+vec4 EllipseEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 d = gl_FragCoord.xy - uellipse_Stage1_c0_c0.xy;
+ vec2 Z = d * uellipse_Stage1_c0_c0.zw;
+ float implicit = dot(Z, d) - 1.0;
+ float grad_dot = 4.0 * dot(Z, Z);
+ {
+ grad_dot = max(grad_dot, 1.1754999560161448e-38);
+ }
+ float approx_dist = implicit * inversesqrt(grad_dot);
+ float alpha;
+ {
+ alpha = approx_dist > 0.0 ? 1.0 : 0.0;
+ }
+ _output = _input * alpha;
+ return _output;
+}
+vec4 ColorTableEffect_Stage1_c1_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float nonZeroAlpha = max(_input.w, 9.9999997473787516e-05);
+ vec4 coord = vec4(_input.xyz / nonZeroAlpha, nonZeroAlpha);
+ coord = coord * 0.9960939884185791 + vec4(0.0019529999699443579, 0.0019529999699443579, 0.0019529999699443579, 0.0019529999699443579);
+ _output.w = texture(uTextureSampler_0_Stage1, vec2(coord.w, 0.125)).w;
+ _output.x = texture(uTextureSampler_0_Stage1, vec2(coord.x, 0.375)).w;
+ _output.y = texture(uTextureSampler_0_Stage1, vec2(coord.y, 0.625)).w;
+ _output.z = texture(uTextureSampler_0_Stage1, vec2(coord.z, 0.875)).w;
+ _output.xyz *= _output.w;
+ return _output;
+}
+vec4 GaussianConvolution_Stage1_c1_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0 - 12.0 * uImageIncrement_Stage1_c1_c0_c0_c0_c1_c0;
+ vec2 coordSampled = vec2(0.0, 0.0);
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1_c1_c0_c0_c0_c1_c0.x, uBounds_Stage1_c1_c0_c0_c0_c1_c0.y);
+ _output += texture(uTextureSampler_1_Stage1, coordSampled) * uKernel_Stage1_c1_c0_c0_c0_c1_c0[0].x;
+ coord += uImageIncrement_Stage1_c1_c0_c0_c0_c1_c0;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1_c1_c0_c0_c0_c1_c0.x, uBounds_Stage1_c1_c0_c0_c0_c1_c0.y);
+ _output += texture(uTextureSampler_1_Stage1, coordSampled) * uKernel_Stage1_c1_c0_c0_c0_c1_c0[0].y;
+ coord += uImageIncrement_Stage1_c1_c0_c0_c0_c1_c0;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1_c1_c0_c0_c0_c1_c0.x, uBounds_Stage1_c1_c0_c0_c0_c1_c0.y);
+ _output += texture(uTextureSampler_1_Stage1, coordSampled) * uKernel_Stage1_c1_c0_c0_c0_c1_c0[0].z;
+ coord += uImageIncrement_Stage1_c1_c0_c0_c0_c1_c0;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1_c1_c0_c0_c0_c1_c0.x, uBounds_Stage1_c1_c0_c0_c0_c1_c0.y);
+ _output += texture(uTextureSampler_1_Stage1, coordSampled) * uKernel_Stage1_c1_c0_c0_c0_c1_c0[0].w;
+ coord += uImageIncrement_Stage1_c1_c0_c0_c0_c1_c0;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1_c1_c0_c0_c0_c1_c0.x, uBounds_Stage1_c1_c0_c0_c0_c1_c0.y);
+ _output += texture(uTextureSampler_1_Stage1, coordSampled) * uKernel_Stage1_c1_c0_c0_c0_c1_c0[1].x;
+ coord += uImageIncrement_Stage1_c1_c0_c0_c0_c1_c0;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1_c1_c0_c0_c0_c1_c0.x, uBounds_Stage1_c1_c0_c0_c0_c1_c0.y);
+ _output += texture(uTextureSampler_1_Stage1, coordSampled) * uKernel_Stage1_c1_c0_c0_c0_c1_c0[1].y;
+ coord += uImageIncrement_Stage1_c1_c0_c0_c0_c1_c0;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1_c1_c0_c0_c0_c1_c0.x, uBounds_Stage1_c1_c0_c0_c0_c1_c0.y);
+ _output += texture(uTextureSampler_1_Stage1, coordSampled) * uKernel_Stage1_c1_c0_c0_c0_c1_c0[1].z;
+ coord += uImageIncrement_Stage1_c1_c0_c0_c0_c1_c0;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1_c1_c0_c0_c0_c1_c0.x, uBounds_Stage1_c1_c0_c0_c0_c1_c0.y);
+ _output += texture(uTextureSampler_1_Stage1, coordSampled) * uKernel_Stage1_c1_c0_c0_c0_c1_c0[1].w;
+ coord += uImageIncrement_Stage1_c1_c0_c0_c0_c1_c0;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1_c1_c0_c0_c0_c1_c0.x, uBounds_Stage1_c1_c0_c0_c0_c1_c0.y);
+ _output += texture(uTextureSampler_1_Stage1, coordSampled) * uKernel_Stage1_c1_c0_c0_c0_c1_c0[2].x;
+ coord += uImageIncrement_Stage1_c1_c0_c0_c0_c1_c0;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1_c1_c0_c0_c0_c1_c0.x, uBounds_Stage1_c1_c0_c0_c0_c1_c0.y);
+ _output += texture(uTextureSampler_1_Stage1, coordSampled) * uKernel_Stage1_c1_c0_c0_c0_c1_c0[2].y;
+ coord += uImageIncrement_Stage1_c1_c0_c0_c0_c1_c0;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1_c1_c0_c0_c0_c1_c0.x, uBounds_Stage1_c1_c0_c0_c0_c1_c0.y);
+ _output += texture(uTextureSampler_1_Stage1, coordSampled) * uKernel_Stage1_c1_c0_c0_c0_c1_c0[2].z;
+ coord += uImageIncrement_Stage1_c1_c0_c0_c0_c1_c0;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1_c1_c0_c0_c0_c1_c0.x, uBounds_Stage1_c1_c0_c0_c0_c1_c0.y);
+ _output += texture(uTextureSampler_1_Stage1, coordSampled) * uKernel_Stage1_c1_c0_c0_c0_c1_c0[2].w;
+ coord += uImageIncrement_Stage1_c1_c0_c0_c0_c1_c0;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1_c1_c0_c0_c0_c1_c0.x, uBounds_Stage1_c1_c0_c0_c0_c1_c0.y);
+ _output += texture(uTextureSampler_1_Stage1, coordSampled) * uKernel_Stage1_c1_c0_c0_c0_c1_c0[3].x;
+ coord += uImageIncrement_Stage1_c1_c0_c0_c0_c1_c0;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1_c1_c0_c0_c0_c1_c0.x, uBounds_Stage1_c1_c0_c0_c0_c1_c0.y);
+ _output += texture(uTextureSampler_1_Stage1, coordSampled) * uKernel_Stage1_c1_c0_c0_c0_c1_c0[3].y;
+ coord += uImageIncrement_Stage1_c1_c0_c0_c0_c1_c0;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1_c1_c0_c0_c0_c1_c0.x, uBounds_Stage1_c1_c0_c0_c0_c1_c0.y);
+ _output += texture(uTextureSampler_1_Stage1, coordSampled) * uKernel_Stage1_c1_c0_c0_c0_c1_c0[3].z;
+ coord += uImageIncrement_Stage1_c1_c0_c0_c0_c1_c0;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1_c1_c0_c0_c0_c1_c0.x, uBounds_Stage1_c1_c0_c0_c0_c1_c0.y);
+ _output += texture(uTextureSampler_1_Stage1, coordSampled) * uKernel_Stage1_c1_c0_c0_c0_c1_c0[3].w;
+ coord += uImageIncrement_Stage1_c1_c0_c0_c0_c1_c0;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1_c1_c0_c0_c0_c1_c0.x, uBounds_Stage1_c1_c0_c0_c0_c1_c0.y);
+ _output += texture(uTextureSampler_1_Stage1, coordSampled) * uKernel_Stage1_c1_c0_c0_c0_c1_c0[4].x;
+ coord += uImageIncrement_Stage1_c1_c0_c0_c0_c1_c0;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1_c1_c0_c0_c0_c1_c0.x, uBounds_Stage1_c1_c0_c0_c0_c1_c0.y);
+ _output += texture(uTextureSampler_1_Stage1, coordSampled) * uKernel_Stage1_c1_c0_c0_c0_c1_c0[4].y;
+ coord += uImageIncrement_Stage1_c1_c0_c0_c0_c1_c0;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1_c1_c0_c0_c0_c1_c0.x, uBounds_Stage1_c1_c0_c0_c0_c1_c0.y);
+ _output += texture(uTextureSampler_1_Stage1, coordSampled) * uKernel_Stage1_c1_c0_c0_c0_c1_c0[4].z;
+ coord += uImageIncrement_Stage1_c1_c0_c0_c0_c1_c0;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1_c1_c0_c0_c0_c1_c0.x, uBounds_Stage1_c1_c0_c0_c0_c1_c0.y);
+ _output += texture(uTextureSampler_1_Stage1, coordSampled) * uKernel_Stage1_c1_c0_c0_c0_c1_c0[4].w;
+ coord += uImageIncrement_Stage1_c1_c0_c0_c0_c1_c0;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1_c1_c0_c0_c0_c1_c0.x, uBounds_Stage1_c1_c0_c0_c0_c1_c0.y);
+ _output += texture(uTextureSampler_1_Stage1, coordSampled) * uKernel_Stage1_c1_c0_c0_c0_c1_c0[5].x;
+ coord += uImageIncrement_Stage1_c1_c0_c0_c0_c1_c0;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1_c1_c0_c0_c0_c1_c0.x, uBounds_Stage1_c1_c0_c0_c0_c1_c0.y);
+ _output += texture(uTextureSampler_1_Stage1, coordSampled) * uKernel_Stage1_c1_c0_c0_c0_c1_c0[5].y;
+ coord += uImageIncrement_Stage1_c1_c0_c0_c0_c1_c0;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1_c1_c0_c0_c0_c1_c0.x, uBounds_Stage1_c1_c0_c0_c0_c1_c0.y);
+ _output += texture(uTextureSampler_1_Stage1, coordSampled) * uKernel_Stage1_c1_c0_c0_c0_c1_c0[5].z;
+ coord += uImageIncrement_Stage1_c1_c0_c0_c0_c1_c0;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1_c1_c0_c0_c0_c1_c0.x, uBounds_Stage1_c1_c0_c0_c0_c1_c0.y);
+ _output += texture(uTextureSampler_1_Stage1, coordSampled) * uKernel_Stage1_c1_c0_c0_c0_c1_c0[5].w;
+ coord += uImageIncrement_Stage1_c1_c0_c0_c0_c1_c0;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1_c1_c0_c0_c0_c1_c0.x, uBounds_Stage1_c1_c0_c0_c0_c1_c0.y);
+ _output += texture(uTextureSampler_1_Stage1, coordSampled) * uKernel_Stage1_c1_c0_c0_c0_c1_c0[6].x;
+ coord += uImageIncrement_Stage1_c1_c0_c0_c0_c1_c0;
+ _output *= _input;
+ return _output;
+}
+vec4 blend_multiply(vec4 src, vec4 dst) {
+ return vec4(((1.0 - src.w) * dst.xyz + (1.0 - dst.w) * src.xyz) + src.xyz * dst.xyz, src.w + (1.0 - src.w) * dst.w);
+}
+vec4 ComposeTwo_Stage1_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_multiply(ColorTableEffect_Stage1_c1_c0_c0_c0_c0_c0(inputColor), GaussianConvolution_Stage1_c1_c0_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c1_c0_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_2_Stage1, vTransformedCoords_1_Stage0) * _input;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c1_c0_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = textureProj(uTextureSampler_3_Stage1, vTransformedCoords_2_Stage0) * _input;
+ return _output;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 blend_lighten(vec4 src, vec4 dst) {
+ vec4 result = blend_src_over(src, dst);
+ result.xyz = max(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
+ return result;
+}
+vec4 ComposeTwo_Stage1_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_lighten(TextureEffect_Stage1_c1_c0_c1_c0_c0_c0(inputColor), TextureEffect_Stage1_c1_c0_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+float _guarded_divide(float n, float d) {
+ return n / d;
+}
+float _color_dodge_component(float sc, float sa, float dc, float da) {
+ if (dc == 0.0) {
+ return sc * (1.0 - da);
+ } else {
+ float d = sa - sc;
+ if (d == 0.0) {
+ return (sa * da + sc * (1.0 - da)) + dc * (1.0 - sa);
+ }
+ d = min(da, _guarded_divide(dc * sa, d));
+ return (d * sa + sc * (1.0 - da)) + dc * (1.0 - sa);
+ }
+}
+vec4 blend_color_dodge(vec4 src, vec4 dst) {
+ return vec4(_color_dodge_component(src.x, src.w, dst.x, dst.w), _color_dodge_component(src.y, src.w, dst.y, dst.w), _color_dodge_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+}
+vec4 ComposeTwo_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_color_dodge(ComposeTwo_Stage1_c1_c0_c0_c0(inputColor), ComposeTwo_Stage1_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 blend_src_atop(vec4 src, vec4 dst) {
+ return dst.w * src + (1.0 - src.w) * dst;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = uColor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_src_atop(EllipseEffect_Stage1_c0_c0(inputColor), ComposeTwo_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+in vec2 inPosition;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec3 vTransformedCoords_2_Stage0;
+void main() {
+ vec2 pos2 = (uViewM_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = uCoordTransformMatrix_2_Stage0 * vec3(inPosition, 1.0);
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1957.shader_test b/shaders/skia/1957.shader_test
new file mode 100644
index 0000000..69bea35
--- /dev/null
+++ b/shaders/skia/1957.shader_test
@@ -0,0 +1,248 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uColor_Stage0;
+uniform vec4 ucolor_Stage1_c0_c0_c0_c0_c0_c0;
+uniform vec4 ucircle_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage1_c0_c0_c1_c0_c0_c0;
+uniform vec4 ucircle_Stage1_c1_c0_c0_c0;
+uniform vec3 uedges_Stage1_c1_c0_c1_c0_c0_c0[4];
+uniform mat4 um_Stage1_c1_c0_c1_c0_c1_c0;
+uniform vec4 uv_Stage1_c1_c0_c1_c0_c1_c0;
+noperspective in vec3 vDashParams_Stage0;
+noperspective in vec4 vRectParams_Stage0;
+vec4 ConstColorProcessor_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = _input.w * ucolor_Stage1_c0_c0_c0_c0_c0_c0;
+ }
+ return _output;
+}
+vec4 CircleEffect_Stage1_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float d;
+ {
+ d = (1.0 - length((ucircle_Stage1_c0_c0_c0_c0_c1_c0.xy - gl_FragCoord.xy) * ucircle_Stage1_c0_c0_c0_c0_c1_c0.w)) * ucircle_Stage1_c0_c0_c0_c0_c1_c0.z;
+ }
+ {
+ _output = _input * clamp(d, 0.0, 1.0);
+ }
+ return _output;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 blend_darken(vec4 src, vec4 dst) {
+ vec4 result = blend_src_over(src, dst);
+ result.xyz = min(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
+ return result;
+}
+vec4 ComposeTwo_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_darken(ConstColorProcessor_Stage1_c0_c0_c0_c0_c0_c0(inputColor), CircleEffect_Stage1_c0_c0_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 ConstColorProcessor_Stage1_c0_c0_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage1_c0_c0_c1_c0_c0_c0;
+ }
+ return _output;
+}
+vec4 ConfigConversionEffect_Stage1_c0_c0_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = floor(_input * 255.0 + 0.5) / 255.0;
+ {
+ _output.xyz = floor((_output.xyz * _output.w) * 255.0 + 0.5) / 255.0;
+ }
+ return _output;
+}
+float _blend_color_luminance(vec3 color) {
+ return dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), color);
+}
+vec3 _blend_set_color_luminance(vec3 hueSatColor, float alpha, vec3 lumColor) {
+ float lum = _blend_color_luminance(lumColor);
+ vec3 result = (lum - _blend_color_luminance(hueSatColor)) + hueSatColor;
+ float minComp = min(min(result.x, result.y), result.z);
+ float maxComp = max(max(result.x, result.y), result.z);
+ if (minComp < 0.0 && lum != minComp) {
+ result = lum + ((result - lum) * lum) / (lum - minComp);
+ }
+ if (maxComp > alpha && maxComp != lum) {
+ return lum + ((result - lum) * (alpha - lum)) / (maxComp - lum);
+ }
+ return result;
+}
+vec4 blend_luminosity(vec4 src, vec4 dst) {
+ float alpha = dst.w * src.w;
+ vec3 sda = src.xyz * dst.w;
+ vec3 dsa = dst.xyz * src.w;
+ return vec4((((_blend_set_color_luminance(dsa, alpha, sda) + dst.xyz) - dsa) + src.xyz) - sda, (src.w + dst.w) - alpha);
+}
+vec4 ComposeTwo_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_luminosity(ConstColorProcessor_Stage1_c0_c0_c1_c0_c0_c0(inputColor), ConfigConversionEffect_Stage1_c0_c0_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 ComposeTwo_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_luminosity(ComposeTwo_Stage1_c0_c0_c0_c0(inputColor), ComposeTwo_Stage1_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 CircleEffect_Stage1_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float d;
+ {
+ d = (length((ucircle_Stage1_c1_c0_c0_c0.xy - gl_FragCoord.xy) * ucircle_Stage1_c1_c0_c0_c0.w) - 1.0) * ucircle_Stage1_c1_c0_c0_c0.z;
+ }
+ {
+ _output = d > 0.5 ? _input : vec4(0.0);
+ }
+ return _output;
+}
+vec4 ConvexPoly_Stage1_c1_c0_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float alpha = 1.0;
+ float edge;
+ edge = dot(uedges_Stage1_c1_c0_c1_c0_c0_c0[0], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage1_c1_c0_c1_c0_c0_c0[1], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage1_c1_c0_c1_c0_c0_c0[2], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage1_c1_c0_c1_c0_c0_c0[3], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ alpha = 1.0 - alpha;
+ _output = _input * alpha;
+ return _output;
+}
+vec4 ColorMatrixFragmentProcessor_Stage1_c1_c0_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = _input;
+ {
+ float nonZeroAlpha = max(inputColor.w, 9.9999997473787516e-05);
+ inputColor = vec4(inputColor.xyz / nonZeroAlpha, inputColor.w);
+ }
+ _output = um_Stage1_c1_c0_c1_c0_c1_c0 * inputColor + uv_Stage1_c1_c0_c1_c0_c1_c0;
+ {
+ _output.w = clamp(_output.w, 0.0, 1.0);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+float _blend_color_saturation(vec3 color) {
+ return max(max(color.x, color.y), color.z) - min(min(color.x, color.y), color.z);
+}
+vec3 _blend_set_color_saturation_helper(vec3 minMidMax, float sat) {
+ if (minMidMax.x < minMidMax.z) {
+ return vec3(0.0, (sat * (minMidMax.y - minMidMax.x)) / (minMidMax.z - minMidMax.x), sat);
+ }
+ return vec3(0.0);
+}
+vec3 _blend_set_color_saturation(vec3 hueLumColor, vec3 satColor) {
+ float sat = _blend_color_saturation(satColor);
+ if (hueLumColor.x <= hueLumColor.y) {
+ if (hueLumColor.y <= hueLumColor.z) {
+ hueLumColor.xyz = _blend_set_color_saturation_helper(hueLumColor, sat);
+ } else if (hueLumColor.x <= hueLumColor.z) {
+ hueLumColor.xzy = _blend_set_color_saturation_helper(hueLumColor.xzy, sat);
+ } else {
+ hueLumColor.zxy = _blend_set_color_saturation_helper(hueLumColor.zxy, sat);
+ }
+ } else if (hueLumColor.x <= hueLumColor.z) {
+ hueLumColor.yxz = _blend_set_color_saturation_helper(hueLumColor.yxz, sat);
+ } else if (hueLumColor.y <= hueLumColor.z) {
+ hueLumColor.yzx = _blend_set_color_saturation_helper(hueLumColor.yzx, sat);
+ } else {
+ hueLumColor.zyx = _blend_set_color_saturation_helper(hueLumColor.zyx, sat);
+ }
+ return hueLumColor;
+}
+vec4 blend_saturation(vec4 src, vec4 dst) {
+ float alpha = dst.w * src.w;
+ vec3 sda = src.xyz * dst.w;
+ vec3 dsa = dst.xyz * src.w;
+ return vec4((((_blend_set_color_luminance(_blend_set_color_saturation(dsa, sda), alpha, dsa) + dst.xyz) - dsa) + src.xyz) - sda, (src.w + dst.w) - alpha);
+}
+vec4 ComposeTwo_Stage1_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_saturation(ConvexPoly_Stage1_c1_c0_c1_c0_c0_c0(inputColor), ColorMatrixFragmentProcessor_Stage1_c1_c0_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 blend_hue(vec4 src, vec4 dst) {
+ float alpha = dst.w * src.w;
+ vec3 sda = src.xyz * dst.w;
+ vec3 dsa = dst.xyz * src.w;
+ return vec4((((_blend_set_color_luminance(_blend_set_color_saturation(sda, dsa), alpha, dsa) + dst.xyz) - dsa) + src.xyz) - sda, (src.w + dst.w) - alpha);
+}
+vec4 ComposeTwo_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_hue(CircleEffect_Stage1_c1_c0_c0_c0(inputColor), ComposeTwo_Stage1_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 blend_multiply(vec4 src, vec4 dst) {
+ return vec4(((1.0 - src.w) * dst.xyz + (1.0 - dst.w) * src.xyz) + src.xyz * dst.xyz, src.w + (1.0 - src.w) * dst.w);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = uColor_Stage0;
+ float xShifted = vDashParams_Stage0.x - floor(vDashParams_Stage0.x / vDashParams_Stage0.z) * vDashParams_Stage0.z;
+ vec2 fragPosShifted = vec2(xShifted, vDashParams_Stage0.y);
+ float xSub, ySub;
+ xSub = min(fragPosShifted.x - vRectParams_Stage0.x, 0.0);
+ xSub += min(vRectParams_Stage0.z - fragPosShifted.x, 0.0);
+ ySub = min(fragPosShifted.y - vRectParams_Stage0.y, 0.0);
+ ySub += min(vRectParams_Stage0.w - fragPosShifted.y, 0.0);
+ float alpha = (1.0 + max(xSub, -1.0)) * (1.0 + max(ySub, -1.0));
+ outputCoverage_Stage0 = vec4(alpha);
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_multiply(ComposeTwo_Stage1_c0_c0(inputColor), ComposeTwo_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ sk_FragColor = output_Stage1 * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 inPosition;
+in vec3 inDashParams;
+in vec4 inRect;
+noperspective out vec3 vDashParams_Stage0;
+noperspective out vec4 vRectParams_Stage0;
+void main() {
+ vDashParams_Stage0 = inDashParams;
+ vRectParams_Stage0 = inRect;
+ vec2 pos2 = inPosition;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/196-2.shader_test b/shaders/skia/196-2.shader_test
new file mode 100644
index 0000000..3ae6d9c
--- /dev/null
+++ b/shaders/skia/196-2.shader_test
@@ -0,0 +1,78 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage2_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c1_c0;
+ }
+ return _output;
+}
+vec4 blend_xor(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src + (1.0 - src.w) * dst;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_xor(ConstColorProcessor_Stage2_c1_c0(vec4(1.0)), output_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/196-3.shader_test b/shaders/skia/196-3.shader_test
new file mode 100644
index 0000000..7e27f80
--- /dev/null
+++ b/shaders/skia/196-3.shader_test
@@ -0,0 +1,193 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform float uSurfaceScale_Stage1;
+uniform vec3 uLightColor_Stage1;
+uniform float uKD_Stage1;
+uniform vec4 uTexDom_Stage1;
+uniform vec3 uDecalParams_Stage1;
+uniform vec3 uLightLocation_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 light_Stage1(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ float colorScale = uKD_Stage1 * dot(normal, surfaceToLight);
+ return vec4(lightColor * clamp(colorScale, 0.0, 1.0), 1.0);
+}
+float sobel_Stage1(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage1(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage1(float m[9], float surfaceScale) {
+ return pointToNormal_Stage1(sobel_Stage1(m[0], m[1], m[3], m[4], 0.0, 0.0, 0.66666698455810547), sobel_Stage1(m[0], m[3], m[1], m[4], 0.0, 0.0, 0.66666698455810547), surfaceScale);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ vec2 coord = vTransformedCoords_0_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp0 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp5 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp6 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp7 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp8 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = normalize(uLightLocation_Stage1 - vec3(gl_FragCoord.xy, uSurfaceScale_Stage1 * m[4]));
+ output_Stage1 = light_Stage1(normal_Stage1(m, uSurfaceScale_Stage1), surfaceToLight, uLightColor_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/196-5.shader_test b/shaders/skia/196-5.shader_test
new file mode 100644
index 0000000..0d9b932
--- /dev/null
+++ b/shaders/skia/196-5.shader_test
@@ -0,0 +1,268 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uColor_Stage0;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform float ubias_Stage1_c0_c0_c0_c0;
+uniform float uscale_Stage1_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+uniform vec2 uImageIncrement_Stage2;
+uniform vec2 uBounds_Stage2;
+uniform vec4 uKernel_Stage2[2];
+uniform mat4 um_Stage3;
+uniform vec4 uv_Stage3;
+uniform vec2 uScale_Stage4;
+uniform vec4 uTexDom_Stage4;
+uniform vec3 uDecalParams_Stage4;
+uniform vec4 uscale0_1_Stage5_c1_c0_c1_c0;
+uniform vec4 uscale2_3_Stage5_c1_c0_c1_c0;
+uniform vec4 uscale4_5_Stage5_c1_c0_c1_c0;
+uniform vec4 uscale6_7_Stage5_c1_c0_c1_c0;
+uniform vec4 uscale8_9_Stage5_c1_c0_c1_c0;
+uniform vec4 ubias0_1_Stage5_c1_c0_c1_c0;
+uniform vec4 ubias2_3_Stage5_c1_c0_c1_c0;
+uniform vec4 ubias4_5_Stage5_c1_c0_c1_c0;
+uniform vec4 ubias6_7_Stage5_c1_c0_c1_c0;
+uniform vec4 ubias8_9_Stage5_c1_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage5_c1_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage5_c1_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage2;
+uniform sampler2D uTextureSampler_0_Stage4;
+uniform sampler2D uTextureSampler_1_Stage4;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+noperspective in vec2 vTransformedCoords_3_Stage0;
+noperspective in vec2 vTransformedCoords_4_Stage0;
+vec4 SweepGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float angle;
+ {
+ angle = atan(-vTransformedCoords_0_Stage0.y, -vTransformedCoords_0_Stage0.x);
+ }
+ float t = ((angle * 0.15915493667125702 + 0.5) + ubias_Stage1_c0_c0_c0_c0) * uscale_Stage1_c0_c0_c0_c0;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = SweepGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 LinearGradientLayout_Stage5_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_4_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage5_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthresholds1_7_Stage5_c1_c0_c1_c0.w) {
+ if (t < uthresholds1_7_Stage5_c1_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage5_c1_c0_c1_c0.x) {
+ scale = uscale0_1_Stage5_c1_c0_c1_c0;
+ bias = ubias0_1_Stage5_c1_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage5_c1_c0_c1_c0;
+ bias = ubias2_3_Stage5_c1_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage5_c1_c0_c1_c0.z) {
+ scale = uscale4_5_Stage5_c1_c0_c1_c0;
+ bias = ubias4_5_Stage5_c1_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage5_c1_c0_c1_c0;
+ bias = ubias6_7_Stage5_c1_c0_c1_c0;
+ }
+ }
+ } else {
+ {
+ {
+ scale = uscale8_9_Stage5_c1_c0_c1_c0;
+ bias = ubias8_9_Stage5_c1_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage5_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage5_c1_c0_c0_c0(vec4(1.0));
+ {
+ {
+ t.x = fract(t.x);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage5_c1_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = uColor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_dst_in(outputColor_Stage0, ClampedGradientEffect_Stage1_c0_c0(vec4(1.0)));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_1_Stage0 - 3.0 * uImageIncrement_Stage2;
+ vec2 coordSampled = vec2(0.0, 0.0);
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage2.x, uBounds_Stage2.y - uBounds_Stage2.x) + uBounds_Stage2.x;
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[0].x;
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage2.x, uBounds_Stage2.y - uBounds_Stage2.x) + uBounds_Stage2.x;
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[0].y;
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage2.x, uBounds_Stage2.y - uBounds_Stage2.x) + uBounds_Stage2.x;
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[0].z;
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage2.x, uBounds_Stage2.y - uBounds_Stage2.x) + uBounds_Stage2.x;
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[0].w;
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage2.x, uBounds_Stage2.y - uBounds_Stage2.x) + uBounds_Stage2.x;
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[1].x;
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage2.x, uBounds_Stage2.y - uBounds_Stage2.x) + uBounds_Stage2.x;
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[1].y;
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage2.x, uBounds_Stage2.y - uBounds_Stage2.x) + uBounds_Stage2.x;
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[1].z;
+ coord += uImageIncrement_Stage2;
+ output_Stage2 *= output_Stage1;
+ }
+ vec4 output_Stage3;
+ {
+ vec4 inputColor = output_Stage2;
+ output_Stage3 = um_Stage3 * inputColor + uv_Stage3;
+ {
+ output_Stage3 = clamp(output_Stage3, 0.0, 1.0);
+ }
+ }
+ vec4 output_Stage4;
+ {
+ vec4 dColor = texture(uTextureSampler_0_Stage4, vTransformedCoords_2_Stage0);
+ dColor.xyz = dColor.w < 9.9999999747524271e-07 ? vec3(0.0) : clamp(dColor.xyz / dColor.w, 0.0, 1.0);
+ vec2 cCoords = vTransformedCoords_3_Stage0 + uScale_Stage4 * (dColor.yz - vec2(0.5));
+ {
+ vec2 origCoord = cCoords;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage4.xy, uTexDom_Stage4.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage4, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage4.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage4.y);
+ if (err > uDecalParams_Stage4.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage4.z < 1.0) {
+ err = 0.0;
+ }
+ output_Stage4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ }
+ vec4 output_Stage5;
+ {
+ output_Stage5 = blend_dst_in(output_Stage4, TiledGradientEffect_Stage5_c1_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage5;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+uniform mat3 uCoordTransformMatrix_3_Stage0;
+uniform mat3 uCoordTransformMatrix_4_Stage0;
+in vec2 inPosition;
+in vec2 inLocalCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+noperspective out vec2 vTransformedCoords_3_Stage0;
+noperspective out vec2 vTransformedCoords_4_Stage0;
+void main() {
+ vec2 pos2 = (uViewM_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ vTransformedCoords_3_Stage0 = (uCoordTransformMatrix_3_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ vTransformedCoords_4_Stage0 = (uCoordTransformMatrix_4_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/196-6.shader_test b/shaders/skia/196-6.shader_test
new file mode 100644
index 0000000..f179beb
--- /dev/null
+++ b/shaders/skia/196-6.shader_test
@@ -0,0 +1,116 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage2;
+uniform vec2 uBounds_Stage2;
+uniform vec4 uKernel_Stage2[5];
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_1_Stage0 - 8.0 * uImageIncrement_Stage2;
+ vec2 coordSampled = vec2(0.0, 0.0);
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage2.x, uBounds_Stage2.y - uBounds_Stage2.x) + uBounds_Stage2.x;
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[0].x;
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage2.x, uBounds_Stage2.y - uBounds_Stage2.x) + uBounds_Stage2.x;
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[0].y;
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage2.x, uBounds_Stage2.y - uBounds_Stage2.x) + uBounds_Stage2.x;
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[0].z;
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage2.x, uBounds_Stage2.y - uBounds_Stage2.x) + uBounds_Stage2.x;
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[0].w;
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage2.x, uBounds_Stage2.y - uBounds_Stage2.x) + uBounds_Stage2.x;
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[1].x;
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage2.x, uBounds_Stage2.y - uBounds_Stage2.x) + uBounds_Stage2.x;
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[1].y;
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage2.x, uBounds_Stage2.y - uBounds_Stage2.x) + uBounds_Stage2.x;
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[1].z;
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage2.x, uBounds_Stage2.y - uBounds_Stage2.x) + uBounds_Stage2.x;
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[1].w;
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage2.x, uBounds_Stage2.y - uBounds_Stage2.x) + uBounds_Stage2.x;
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[2].x;
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage2.x, uBounds_Stage2.y - uBounds_Stage2.x) + uBounds_Stage2.x;
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[2].y;
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage2.x, uBounds_Stage2.y - uBounds_Stage2.x) + uBounds_Stage2.x;
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[2].z;
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage2.x, uBounds_Stage2.y - uBounds_Stage2.x) + uBounds_Stage2.x;
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[2].w;
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage2.x, uBounds_Stage2.y - uBounds_Stage2.x) + uBounds_Stage2.x;
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[3].x;
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage2.x, uBounds_Stage2.y - uBounds_Stage2.x) + uBounds_Stage2.x;
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[3].y;
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage2.x, uBounds_Stage2.y - uBounds_Stage2.x) + uBounds_Stage2.x;
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[3].z;
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage2.x, uBounds_Stage2.y - uBounds_Stage2.x) + uBounds_Stage2.x;
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[3].w;
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage2.x, uBounds_Stage2.y - uBounds_Stage2.x) + uBounds_Stage2.x;
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[4].x;
+ coord += uImageIncrement_Stage2;
+ output_Stage2 *= output_Stage1;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/196-7.shader_test b/shaders/skia/196-7.shader_test
new file mode 100644
index 0000000..a950688
--- /dev/null
+++ b/shaders/skia/196-7.shader_test
@@ -0,0 +1,57 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 ClampFragmentProcessor_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = clamp(_input, 0.0, 1.0);
+ }
+ return _output;
+}
+vec4 ClampFragmentProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ float alpha = clamp(_input.w, 0.0, 1.0);
+ _output = vec4(clamp(_input.xyz, 0.0, alpha), alpha);
+ }
+ return _output;
+}
+vec4 blend_difference(vec4 src, vec4 dst) {
+ return vec4((src.xyz + dst.xyz) - 2.0 * min(src.xyz * dst.w, dst.xyz * src.w), src.w + (1.0 - src.w) * dst.w);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ vec4 inputColor = vec4(output_Stage1.xyz, 1.0);
+ output_Stage2 = blend_difference(ClampFragmentProcessor_Stage2_c0_c0(inputColor), ClampFragmentProcessor_Stage2_c1_c0(inputColor));
+ output_Stage2 *= output_Stage1.w;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/196.shader_test b/shaders/skia/196.shader_test
new file mode 100644
index 0000000..af85f42
--- /dev/null
+++ b/shaders/skia/196.shader_test
@@ -0,0 +1,132 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.w) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ } else {
+ {
+ if (t < uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = OverrideInputFragmentProcessor_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 blend_dst_out(vec4 src, vec4 dst) {
+ return (1.0 - src.w) * dst;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_dst_out(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 inColor;
+in vec2 inLocalCoord;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1960.shader_test b/shaders/skia/1960.shader_test
new file mode 100644
index 0000000..875b239
--- /dev/null
+++ b/shaders/skia/1960.shader_test
@@ -0,0 +1,166 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_KHR_blend_equation_advanced : require
+out vec4 sk_FragColor;
+layout (blend_support_all_equations) out ;
+uniform vec4 uColor_Stage0;
+uniform vec4 ucircle_Stage1;
+uniform vec2 ubaseFrequency_Stage2_c0_c0;
+uniform vec4 uellipse_Stage3;
+uniform vec4 uscale01_Stage4_c1_c0_c1_c0;
+uniform vec4 ubias01_Stage4_c1_c0_c1_c0;
+uniform vec4 uscale23_Stage4_c1_c0_c1_c0;
+uniform vec4 ubias23_Stage4_c1_c0_c1_c0;
+uniform float uthreshold_Stage4_c1_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage2;
+uniform sampler2D uTextureSampler_1_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+float perlinnoise_Stage2_c0_c0(float chanCoord, vec2 noiseVec) {
+ vec4 floorVal;
+ floorVal.xy = floor(noiseVec);
+ floorVal.zw = floorVal.xy + vec2(1.0);
+ vec2 fractVal = fract(noiseVec);
+ vec2 noiseSmooth = (fractVal * fractVal) * (vec2(3.0) - vec2(2.0) * fractVal);
+ floorVal = fract(floor(mod(floorVal, 256.0)) / vec4(256.0));
+ vec2 latticeIdx;
+ latticeIdx.x = texture(uTextureSampler_0_Stage2, vec2(floorVal.x, 0.5)).x;
+ latticeIdx.y = texture(uTextureSampler_0_Stage2, vec2(floorVal.z, 0.5)).x;
+ vec4 bcoords = fract(latticeIdx.xyxy + floorVal.yyww);
+ vec2 uv;
+ vec4 lattice = texture(uTextureSampler_1_Stage2, vec2(bcoords.x, chanCoord)).zyxw;
+ uv.x = dot((lattice.yw + lattice.xz * vec2(0.00390625)) * vec2(2.0) - vec2(1.0), fractVal);
+ fractVal.x -= 1.0;
+ lattice = texture(uTextureSampler_1_Stage2, vec2(bcoords.y, chanCoord)).zyxw;
+ uv.y = dot((lattice.yw + lattice.xz * vec2(0.00390625)) * vec2(2.0) - vec2(1.0), fractVal);
+ vec2 ab;
+ ab.x = mix(uv.x, uv.y, noiseSmooth.x);
+ fractVal.y -= 1.0;
+ lattice = texture(uTextureSampler_1_Stage2, vec2(bcoords.w, chanCoord)).zyxw;
+ uv.y = dot((lattice.yw + lattice.xz * vec2(0.00390625)) * vec2(2.0) - vec2(1.0), fractVal);
+ fractVal.x += 1.0;
+ lattice = texture(uTextureSampler_1_Stage2, vec2(bcoords.z, chanCoord)).zyxw;
+ uv.x = dot((lattice.yw + lattice.xz * vec2(0.00390625)) * vec2(2.0) - vec2(1.0), fractVal);
+ ab.y = mix(uv.x, uv.y, noiseSmooth.x);
+ return mix(ab.x, ab.y, noiseSmooth.y);
+}
+vec4 PerlinNoise_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 noiseVec = floor(vTransformedCoords_0_Stage0) * ubaseFrequency_Stage2_c0_c0;
+ _output = vec4(0.0);
+ float ratio = 1.0;
+ for (int octave = 0;octave < 5; ++octave) {
+ _output += abs(vec4(perlinnoise_Stage2_c0_c0(0.125, noiseVec), perlinnoise_Stage2_c0_c0(0.375, noiseVec), perlinnoise_Stage2_c0_c0(0.625, noiseVec), perlinnoise_Stage2_c0_c0(0.875, noiseVec))) * ratio;
+ noiseVec *= vec2(2.0);
+ ratio *= 0.5;
+ }
+ _output = clamp(_output, 0.0, 1.0);
+ _output = vec4(_output.xyz * _output.www, _output.w);
+ return _output;
+}
+vec4 LinearGradientLayout_Stage4_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_1_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 DualIntervalGradientColorizer_Stage4_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthreshold_Stage4_c1_c0_c1_c0) {
+ scale = uscale01_Stage4_c1_c0_c1_c0;
+ bias = ubias01_Stage4_c1_c0_c1_c0;
+ } else {
+ scale = uscale23_Stage4_c1_c0_c1_c0;
+ bias = ubias23_Stage4_c1_c0_c1_c0;
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage4_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage4_c1_c0_c0_c0(vec4(1.0));
+ {
+ {
+ t.x = fract(t.x);
+ }
+ _output = DualIntervalGradientColorizer_Stage4_c1_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = uColor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ float d;
+ {
+ d = (length((ucircle_Stage1.xy - gl_FragCoord.xy) * ucircle_Stage1.w) - 1.0) * ucircle_Stage1.z;
+ }
+ {
+ output_Stage1 = d > 0.5 ? vec4(1.0) : vec4(0.0);
+ }
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_dst_in(output_Stage1, PerlinNoise_Stage2_c0_c0(vec4(1.0)));
+ }
+ vec4 output_Stage3;
+ {
+ vec2 d = gl_FragCoord.xy - uellipse_Stage3.xy;
+ vec2 Z = d * uellipse_Stage3.zw;
+ float implicit = dot(Z, d) - 1.0;
+ float grad_dot = 4.0 * dot(Z, Z);
+ {
+ grad_dot = max(grad_dot, 1.1754999560161448e-38);
+ }
+ float approx_dist = implicit * inversesqrt(grad_dot);
+ float alpha;
+ {
+ alpha = clamp(0.5 - approx_dist, 0.0, 1.0);
+ }
+ output_Stage3 = output_Stage2 * alpha;
+ }
+ vec4 output_Stage4;
+ {
+ output_Stage4 = blend_dst_in(output_Stage3, TiledGradientEffect_Stage4_c1_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage4 * outputColor_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 inPosition;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vec2 pos2 = (uViewM_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1963.shader_test b/shaders/skia/1963.shader_test
new file mode 100644
index 0000000..c85c2a6
--- /dev/null
+++ b/shaders/skia/1963.shader_test
@@ -0,0 +1,488 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_KHR_blend_equation_advanced : require
+out vec4 sk_FragColor;
+layout (blend_support_all_equations) out ;
+uniform vec4 uinnerRect_Stage1_c0_c0_c0_c0_c0_c0;
+uniform vec2 uradiusPlusHalf_Stage1_c0_c0_c0_c0_c0_c0;
+uniform vec2 ubaseFrequency_Stage1_c0_c0_c0_c0_c1_c0;
+uniform float uz_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 urectH_Stage1_c0_c0_c1_c0;
+uniform float uinvSixSigma_Stage1_c0_c0_c1_c0;
+uniform vec2 uImageIncrement_Stage1_c1_c0_c0_c0_c0_c0;
+uniform float uSurfaceScale_Stage1_c1_c0_c0_c0_c0_c0;
+uniform vec3 uLightColor_Stage1_c1_c0_c0_c0_c0_c0;
+uniform float uKS_Stage1_c1_c0_c0_c0_c0_c0;
+uniform float uShininess_Stage1_c1_c0_c0_c0_c0_c0;
+uniform vec4 uTexDom_Stage1_c1_c0_c0_c0_c0_c0;
+uniform vec3 uDecalParams_Stage1_c1_c0_c0_c0_c0_c0;
+uniform vec3 uLightLocation_Stage1_c1_c0_c0_c0_c0_c0;
+uniform float uExponent_Stage1_c1_c0_c0_c0_c0_c0;
+uniform float uCosInnerConeAngle_Stage1_c1_c0_c0_c0_c0_c0;
+uniform float uCosOuterConeAngle_Stage1_c1_c0_c0_c0_c0_c0;
+uniform float uConeScale_Stage1_c1_c0_c0_c0_c0_c0;
+uniform vec3 uS_Stage1_c1_c0_c0_c0_c0_c0;
+uniform float uinnerThreshold_Stage1_c1_c0_c0_c0_c1_c0;
+uniform float uouterThreshold_Stage1_c1_c0_c0_c0_c1_c0;
+uniform float uinnerThreshold_Stage1_c1_c0_c1_c0_c0_c0;
+uniform float uouterThreshold_Stage1_c1_c0_c1_c0_c0_c0;
+uniform vec4 ucolor_Stage1_c1_c0_c1_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+uniform sampler2D uTextureSampler_2_Stage1;
+uniform sampler2D uTextureSampler_3_Stage1;
+uniform sampler2D uTextureSampler_4_Stage1;
+uniform sampler2D uTextureSampler_5_Stage1;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec3 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+noperspective in vec2 vTransformedCoords_3_Stage0;
+noperspective in float vinCoverage_Stage0;
+vec4 CircularRRect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 dxy0 = uinnerRect_Stage1_c0_c0_c0_c0_c0_c0.xy - gl_FragCoord.xy;
+ vec2 dxy1 = gl_FragCoord.xy - uinnerRect_Stage1_c0_c0_c0_c0_c0_c0.zw;
+ vec2 dxy = max(max(dxy0, dxy1), 0.0);
+ float alpha = clamp(uradiusPlusHalf_Stage1_c0_c0_c0_c0_c0_c0.x - length(dxy), 0.0, 1.0);
+ alpha = 1.0 - alpha;
+ _output = _input * alpha;
+ return _output;
+}
+vec3 fade_Stage1_c0_c0_c0_c0_c1_c0(vec3 t) {
+ return ((t * t) * t) * (t * (t * 6.0 - 15.0) + 10.0);
+}
+float perm_Stage1_c0_c0_c0_c0_c1_c0(float x) {
+ return texture(uTextureSampler_0_Stage1, vec2(fract(x / 256.0), 0.0)).x * 255.0;
+}
+float grad_Stage1_c0_c0_c0_c0_c1_c0(float x, vec3 p) {
+ return dot(texture(uTextureSampler_1_Stage1, vec2(fract(x / 16.0), 0.0)).xyz * 255.0 - vec3(1.0), p);
+}
+float lerp_Stage1_c0_c0_c0_c0_c1_c0(float a, float b, float w) {
+ return a + w * (b - a);
+}
+float noise_Stage1_c0_c0_c0_c0_c1_c0(vec3 p) {
+ vec3 P = mod(floor(p), 256.0);
+ p -= floor(p);
+ vec3 f = fade_Stage1_c0_c0_c0_c0_c1_c0(p);
+ float A = perm_Stage1_c0_c0_c0_c0_c1_c0(P.x) + P.y;
+ float AA = perm_Stage1_c0_c0_c0_c0_c1_c0(A) + P.z;
+ float AB = perm_Stage1_c0_c0_c0_c0_c1_c0(A + 1.0) + P.z;
+ float B = perm_Stage1_c0_c0_c0_c0_c1_c0(P.x + 1.0) + P.y;
+ float BA = perm_Stage1_c0_c0_c0_c0_c1_c0(B) + P.z;
+ float BB = perm_Stage1_c0_c0_c0_c0_c1_c0(B + 1.0) + P.z;
+ float result = lerp_Stage1_c0_c0_c0_c0_c1_c0(lerp_Stage1_c0_c0_c0_c0_c1_c0(lerp_Stage1_c0_c0_c0_c0_c1_c0(grad_Stage1_c0_c0_c0_c0_c1_c0(perm_Stage1_c0_c0_c0_c0_c1_c0(AA), p), grad_Stage1_c0_c0_c0_c0_c1_c0(perm_Stage1_c0_c0_c0_c0_c1_c0(BA), p + vec3(-1.0, 0.0, 0.0)), f.x), lerp_Stage1_c0_c0_c0_c0_c1_c0(grad_Stage1_c0_c0_c0_c0_c1_c0(perm_Stage1_c0_c0_c0_c0_c1_c0(AB), p + vec3(0.0, -1.0, 0.0)), grad_Stage1_c0_c0_c0_c0_c1_c0(perm_Stage1_c0_c0_c0_c0_c1_c0(BB), p + vec3(-1.0, -1.0, 0.0)), f.x), f.y), lerp_Stage1_c0_c0_c0_c0_c1_c0(lerp_Stage1_c0_c0_c0_c0_c1_c0(grad_Stage1_c0_c0_c0_c0_c1_c0(perm_Stage1_c0_c0_c0_c0_c1_c0(AA + 1.0), p + vec3(0.0, 0.0, -1.0)), grad_Stage1_c0_c0_c0_c0_c1_c0(perm_Stage1_c0_c0_c0_c0_c1_c0(BA + 1.0), p + vec3(-1.0, 0.0, -1.0)), f.x), lerp_Stage1_c0_c0_c0_c0_c1_c0(grad_Stage1_c0_c0_c0_c0_c1_c0(perm_Stage1_c0_c0_c0_c0_c1_c0(AB + 1.0), p + vec3(0.0, -1.0, -1.0)), grad_Stage1_c0_c0_c0_c0_c1_c0(perm_Stage1_c0_c0_c0_c0_c1_c0(BB + 1.0), p + vec3(-1.0, -1.0, -1.0)), f.x), f.y), f.z);
+ return result;
+}
+float noiseOctaves_Stage1_c0_c0_c0_c0_c1_c0(vec3 p) {
+ float result = 0.0;
+ float ratio = 1.0;
+ for (float i = 0.0;i < 9.0; i++) {
+ result += noise_Stage1_c0_c0_c0_c0_c1_c0(p) / ratio;
+ p *= 2.0;
+ ratio *= 2.0;
+ }
+ return (result + 1.0) / 2.0;
+}
+vec4 ImprovedPerlinNoise_Stage1_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 vTransformedCoords_0_Stage0_ensure2D = vTransformedCoords_0_Stage0.xy / vTransformedCoords_0_Stage0.z;
+ vec2 coords = vTransformedCoords_0_Stage0_ensure2D * ubaseFrequency_Stage1_c0_c0_c0_c0_c1_c0;
+ float r = noiseOctaves_Stage1_c0_c0_c0_c0_c1_c0(vec3(coords, uz_Stage1_c0_c0_c0_c0_c1_c0));
+ float g = noiseOctaves_Stage1_c0_c0_c0_c0_c1_c0(vec3(coords, uz_Stage1_c0_c0_c0_c0_c1_c0));
+ float b = noiseOctaves_Stage1_c0_c0_c0_c0_c1_c0(vec3(coords, uz_Stage1_c0_c0_c0_c0_c1_c0));
+ float a = noiseOctaves_Stage1_c0_c0_c0_c0_c1_c0(vec3(coords, uz_Stage1_c0_c0_c0_c0_c1_c0));
+ _output = vec4(r, g, b, a);
+ _output = clamp(_output, 0.0, 1.0);
+ _output = vec4(_output.xyz * _output.www, _output.w);
+ return _output;
+}
+float _guarded_divide(float n, float d) {
+ return n / d;
+}
+float _color_burn_component(float sc, float sa, float dc, float da) {
+ if (da == dc) {
+ return (sa * da + sc * (1.0 - da)) + dc * (1.0 - sa);
+ } else if (sc == 0.0) {
+ return dc * (1.0 - sa);
+ }
+ float d = max(0.0, da - _guarded_divide((da - dc) * sa, sc));
+ return (d * sa + sc * (1.0 - da)) + dc * (1.0 - sa);
+}
+vec4 blend_color_burn(vec4 src, vec4 dst) {
+ return vec4(_color_burn_component(src.x, src.w, dst.x, dst.w), _color_burn_component(src.y, src.w, dst.y, dst.w), _color_burn_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+}
+vec4 ComposeTwo_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_color_burn(CircularRRect_Stage1_c0_c0_c0_c0_c0_c0(inputColor), ImprovedPerlinNoise_Stage1_c0_c0_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 RectBlurEffect_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float xCoverage, yCoverage;
+ {
+ float x, y;
+ {
+ x = max(urectH_Stage1_c0_c0_c1_c0.x - gl_FragCoord.x, gl_FragCoord.x - urectH_Stage1_c0_c0_c1_c0.z);
+ y = max(urectH_Stage1_c0_c0_c1_c0.y - gl_FragCoord.y, gl_FragCoord.y - urectH_Stage1_c0_c0_c1_c0.w);
+ }
+ xCoverage = texture(uTextureSampler_2_Stage1, vec2(x * uinvSixSigma_Stage1_c0_c0_c1_c0, 0.5)).w;
+ yCoverage = texture(uTextureSampler_2_Stage1, vec2(y * uinvSixSigma_Stage1_c0_c0_c1_c0, 0.5)).w;
+ _output = (_input * xCoverage) * yCoverage;
+ }
+ _output = (_input * xCoverage) * yCoverage;
+ return _output;
+}
+float _blend_color_saturation(vec3 color) {
+ return max(max(color.x, color.y), color.z) - min(min(color.x, color.y), color.z);
+}
+vec3 _blend_set_color_saturation_helper(vec3 minMidMax, float sat) {
+ if (minMidMax.x < minMidMax.z) {
+ return vec3(0.0, (sat * (minMidMax.y - minMidMax.x)) / (minMidMax.z - minMidMax.x), sat);
+ }
+ return vec3(0.0);
+}
+vec3 _blend_set_color_saturation(vec3 hueLumColor, vec3 satColor) {
+ float sat = _blend_color_saturation(satColor);
+ if (hueLumColor.x <= hueLumColor.y) {
+ if (hueLumColor.y <= hueLumColor.z) {
+ hueLumColor.xyz = _blend_set_color_saturation_helper(hueLumColor, sat);
+ } else if (hueLumColor.x <= hueLumColor.z) {
+ hueLumColor.xzy = _blend_set_color_saturation_helper(hueLumColor.xzy, sat);
+ } else {
+ hueLumColor.zxy = _blend_set_color_saturation_helper(hueLumColor.zxy, sat);
+ }
+ } else if (hueLumColor.x <= hueLumColor.z) {
+ hueLumColor.yxz = _blend_set_color_saturation_helper(hueLumColor.yxz, sat);
+ } else if (hueLumColor.y <= hueLumColor.z) {
+ hueLumColor.yzx = _blend_set_color_saturation_helper(hueLumColor.yzx, sat);
+ } else {
+ hueLumColor.zyx = _blend_set_color_saturation_helper(hueLumColor.zyx, sat);
+ }
+ return hueLumColor;
+}
+float _blend_color_luminance(vec3 color) {
+ return dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), color);
+}
+vec3 _blend_set_color_luminance(vec3 hueSatColor, float alpha, vec3 lumColor) {
+ float lum = _blend_color_luminance(lumColor);
+ vec3 result = (lum - _blend_color_luminance(hueSatColor)) + hueSatColor;
+ float minComp = min(min(result.x, result.y), result.z);
+ float maxComp = max(max(result.x, result.y), result.z);
+ if (minComp < 0.0 && lum != minComp) {
+ result = lum + ((result - lum) * lum) / (lum - minComp);
+ }
+ if (maxComp > alpha && maxComp != lum) {
+ return lum + ((result - lum) * (alpha - lum)) / (maxComp - lum);
+ }
+ return result;
+}
+vec4 blend_hue(vec4 src, vec4 dst) {
+ float alpha = dst.w * src.w;
+ vec3 sda = src.xyz * dst.w;
+ vec3 dsa = dst.xyz * src.w;
+ return vec4((((_blend_set_color_luminance(_blend_set_color_saturation(sda, dsa), alpha, dsa) + dst.xyz) - dsa) + src.xyz) - sda, (src.w + dst.w) - alpha);
+}
+vec4 ComposeTwo_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_hue(ComposeTwo_Stage1_c0_c0_c0_c0(inputColor), RectBlurEffect_Stage1_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 light_Stage1_c1_c0_c0_c0_c0_c0(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ vec3 halfDir = normalize(surfaceToLight + vec3(0.0, 0.0, 1.0));
+ float colorScale = uKS_Stage1_c1_c0_c0_c0_c0_c0 * pow(dot(normal, halfDir), uShininess_Stage1_c1_c0_c0_c0_c0_c0);
+ vec3 color = lightColor * clamp(colorScale, 0.0, 1.0);
+ return vec4(color, max(max(color.x, color.y), color.z));
+}
+float sobel_Stage1_c1_c0_c0_c0_c0_c0(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage1_c1_c0_c0_c0_c0_c0(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage1_c1_c0_c0_c0_c0_c0(float m[9], float surfaceScale) {
+ return pointToNormal_Stage1_c1_c0_c0_c0_c0_c0(sobel_Stage1_c1_c0_c0_c0_c0_c0(m[0], m[1], m[3], m[4], m[6], m[7], 0.5), sobel_Stage1_c1_c0_c0_c0_c0_c0(m[0], m[6], m[1], m[7], 0.0, 0.0, 0.33333298563957214), surfaceScale);
+}
+vec3 lightColor_Stage1_c1_c0_c0_c0_c0_c0(vec3 surfaceToLight) {
+ float cosAngle = -dot(surfaceToLight, uS_Stage1_c1_c0_c0_c0_c0_c0);
+ if (cosAngle < uCosOuterConeAngle_Stage1_c1_c0_c0_c0_c0_c0) {
+ return vec3(0.0);
+ }
+ float scale = pow(cosAngle, uExponent_Stage1_c1_c0_c0_c0_c0_c0);
+ if (cosAngle < uCosInnerConeAngle_Stage1_c1_c0_c0_c0_c0_c0) {
+ return ((uLightColor_Stage1_c1_c0_c0_c0_c0_c0 * scale) * (cosAngle - uCosOuterConeAngle_Stage1_c1_c0_c0_c0_c0_c0)) * uConeScale_Stage1_c1_c0_c0_c0_c0_c0;
+ }
+ return uLightColor_Stage1_c1_c0_c0_c0_c0_c0;
+}
+vec4 SpecularLighting_Stage1_c1_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coord = vTransformedCoords_1_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage1_c1_c0_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0_c0_c0.xy, uTexDom_Stage1_c1_c0_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_3_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp0 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1_c1_c0_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0_c0_c0.xy, uTexDom_Stage1_c1_c0_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_3_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1_c1_c0_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0_c0_c0.xy, uTexDom_Stage1_c1_c0_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_3_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage1_c1_c0_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0_c0_c0.xy, uTexDom_Stage1_c1_c0_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_3_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0_c0_c0.xy, uTexDom_Stage1_c1_c0_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_3_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1_c1_c0_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0_c0_c0.xy, uTexDom_Stage1_c1_c0_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_3_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp5 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage1_c1_c0_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0_c0_c0.xy, uTexDom_Stage1_c1_c0_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_3_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp6 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage1_c1_c0_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0_c0_c0.xy, uTexDom_Stage1_c1_c0_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_3_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp7 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage1_c1_c0_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0_c0_c0.xy, uTexDom_Stage1_c1_c0_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_3_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp8 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = normalize(uLightLocation_Stage1_c1_c0_c0_c0_c0_c0 - vec3(gl_FragCoord.xy, uSurfaceScale_Stage1_c1_c0_c0_c0_c0_c0 * m[4]));
+ _output = light_Stage1_c1_c0_c0_c0_c0_c0(normal_Stage1_c1_c0_c0_c0_c0_c0(m, uSurfaceScale_Stage1_c1_c0_c0_c0_c0_c0), surfaceToLight, lightColor_Stage1_c1_c0_c0_c0_c0_c0(surfaceToLight));
+ _output *= _input;
+ return _output;
+}
+vec4 AlphaThresholdFragmentProcessor_Stage1_c1_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 color = _input;
+ vec4 mask_color = texture(uTextureSampler_4_Stage1, vTransformedCoords_2_Stage0);
+ if (mask_color.w < 0.5) {
+ if (color.w > uouterThreshold_Stage1_c1_c0_c0_c0_c1_c0) {
+ float scale = uouterThreshold_Stage1_c1_c0_c0_c0_c1_c0 / color.w;
+ color.xyz *= scale;
+ color.w = uouterThreshold_Stage1_c1_c0_c0_c0_c1_c0;
+ }
+ } else if (color.w < uinnerThreshold_Stage1_c1_c0_c0_c0_c1_c0) {
+ float scale = uinnerThreshold_Stage1_c1_c0_c0_c0_c1_c0 / max(0.0010000000474974513, color.w);
+ color.xyz *= scale;
+ color.w = uinnerThreshold_Stage1_c1_c0_c0_c0_c1_c0;
+ }
+ _output = color;
+ return _output;
+}
+vec4 blend_screen(vec4 src, vec4 dst) {
+ return src + (1.0 - src) * dst;
+}
+vec4 ComposeTwo_Stage1_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_screen(SpecularLighting_Stage1_c1_c0_c0_c0_c0_c0(inputColor), AlphaThresholdFragmentProcessor_Stage1_c1_c0_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 AlphaThresholdFragmentProcessor_Stage1_c1_c0_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 color = _input;
+ vec4 mask_color = texture(uTextureSampler_5_Stage1, vTransformedCoords_3_Stage0);
+ if (mask_color.w < 0.5) {
+ if (color.w > uouterThreshold_Stage1_c1_c0_c1_c0_c0_c0) {
+ float scale = uouterThreshold_Stage1_c1_c0_c1_c0_c0_c0 / color.w;
+ color.xyz *= scale;
+ color.w = uouterThreshold_Stage1_c1_c0_c1_c0_c0_c0;
+ }
+ } else if (color.w < uinnerThreshold_Stage1_c1_c0_c1_c0_c0_c0) {
+ float scale = uinnerThreshold_Stage1_c1_c0_c1_c0_c0_c0 / max(0.0010000000474974513, color.w);
+ color.xyz *= scale;
+ color.w = uinnerThreshold_Stage1_c1_c0_c1_c0_c0_c0;
+ }
+ _output = color;
+ return _output;
+}
+vec4 ConstColorProcessor_Stage1_c1_c0_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage1_c1_c0_c1_c0_c1_c0;
+ }
+ return _output;
+}
+vec4 blend_src_atop(vec4 src, vec4 dst) {
+ return dst.w * src + (1.0 - src.w) * dst;
+}
+vec4 ComposeTwo_Stage1_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_src_atop(AlphaThresholdFragmentProcessor_Stage1_c1_c0_c1_c0_c0_c0(inputColor), ConstColorProcessor_Stage1_c1_c0_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 ComposeTwo_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_color_burn(ComposeTwo_Stage1_c1_c0_c0_c0(inputColor), ComposeTwo_Stage1_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ float alpha = 1.0;
+ alpha = vinCoverage_Stage0;
+ outputCoverage_Stage0 = vec4(alpha);
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_hue(ComposeTwo_Stage1_c0_c0(inputColor), ComposeTwo_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ sk_FragColor = outputCoverage_Stage0 * output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+uniform mat3 uCoordTransformMatrix_3_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in float inCoverage;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec3 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+noperspective out vec2 vTransformedCoords_3_Stage0;
+noperspective out float vinCoverage_Stage0;
+void main() {
+ vec4 color = inColor;
+ vcolor_Stage0 = color;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0);
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_3_Stage0 = (uCoordTransformMatrix_3_Stage0 * vec3(inPosition, 1.0)).xy;
+ vinCoverage_Stage0 = inCoverage;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1966.shader_test b/shaders/skia/1966.shader_test
new file mode 100644
index 0000000..b3811a7
--- /dev/null
+++ b/shaders/skia/1966.shader_test
@@ -0,0 +1,86 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform float uSrcTF_Stage0[7];
+uniform mat3 uColorXform_Stage0;
+uniform float uDstTF_Stage0[7];
+uniform sampler2D uTextureSampler_0_Stage0;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vlocalCoord_Stage0;
+float src_tf_Stage0(float x) {
+ float G = uSrcTF_Stage0[0];
+ float A = uSrcTF_Stage0[1];
+ float B = uSrcTF_Stage0[2];
+ float C = uSrcTF_Stage0[3];
+ float D = uSrcTF_Stage0[4];
+ float E = uSrcTF_Stage0[5];
+ float F = uSrcTF_Stage0[6];
+ float s = sign(x);
+ x = abs(x);
+ x = x < D ? C * x + F : pow(A * x + B, G) + E;
+ return s * x;
+}
+float dst_tf_Stage0(float x) {
+ float G = uDstTF_Stage0[0];
+ float A = uDstTF_Stage0[1];
+ float B = uDstTF_Stage0[2];
+ float C = uDstTF_Stage0[3];
+ float D = uDstTF_Stage0[4];
+ float E = uDstTF_Stage0[5];
+ float F = uDstTF_Stage0[6];
+ float s = sign(x);
+ x = abs(x);
+ x = x < D ? C * x + F : pow(A * x + B, G) + E;
+ return s * x;
+}
+vec4 gamut_xform_Stage0(vec4 color) {
+ color.xyz = uColorXform_Stage0 * color.xyz;
+ return color;
+}
+vec4 color_xform_Stage0(vec4 color) {
+ float nonZeroAlpha = max(color.w, 9.9999997473787516e-05);
+ color = vec4(color.xyz / nonZeroAlpha, nonZeroAlpha);
+ color.x = src_tf_Stage0(color.x);
+ color.y = src_tf_Stage0(color.y);
+ color.z = src_tf_Stage0(color.z);
+ color = gamut_xform_Stage0(color);
+ color.x = dst_tf_Stage0(color.x);
+ color.y = dst_tf_Stage0(color.y);
+ color.z = dst_tf_Stage0(color.z);
+ color.xyz *= color.w;
+ return color;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ vec2 texCoord;
+ texCoord = vlocalCoord_Stage0;
+ outputColor_Stage0 = color_xform_Stage0(texture(uTextureSampler_0_Stage0, texCoord)) * outputColor_Stage0;
+ outputColor_Stage0 = clamp(outputColor_Stage0, 0.0, 1.0);
+ }
+ {
+ sk_FragColor = outputColor_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vlocalCoord_Stage0;
+void main() {
+ vcolor_Stage0 = color;
+ vlocalCoord_Stage0 = localCoord;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1978.shader_test b/shaders/skia/1978.shader_test
new file mode 100644
index 0000000..6d28e5e
--- /dev/null
+++ b/shaders/skia/1978.shader_test
@@ -0,0 +1,287 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_KHR_blend_equation_advanced : require
+out vec4 sk_FragColor;
+layout (blend_support_all_equations) out ;
+uniform vec4 urectUniform_Stage1;
+uniform vec4 uboundsUniform_Stage2;
+uniform float uxInvZoom_Stage2;
+uniform float uyInvZoom_Stage2;
+uniform float uxInvInset_Stage2;
+uniform float uyInvInset_Stage2;
+uniform vec2 uoffset_Stage2;
+uniform vec2 uImageIncrement_Stage3;
+uniform vec2 uBounds_Stage3;
+uniform vec4 uKernel_Stage3[5];
+uniform vec4 uleftBorderColor_Stage4_c0_c0;
+uniform vec4 urightBorderColor_Stage4_c0_c0;
+uniform vec4 uscale0_1_Stage4_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage4_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage4_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage4_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage4_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage4_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage4_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage4_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage4_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage4_c0_c0_c1_c0;
+uniform vec2 uImageIncrement_Stage5;
+uniform vec2 uBounds_Stage5;
+uniform vec4 uKernel_Stage5[3];
+uniform sampler2D uTextureSampler_0_Stage2;
+uniform sampler2D uTextureSampler_0_Stage3;
+uniform sampler2D uTextureSampler_0_Stage5;
+noperspective in vec2 vEllipseOffsets_Stage0;
+noperspective in vec4 vEllipseRadii_Stage0;
+noperspective in vec4 vinColor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+noperspective in vec2 vTransformedCoords_3_Stage0;
+vec4 RadialGradientLayout_Stage4_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = length(vTransformedCoords_2_Stage0);
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage4_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage4_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage4_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage4_c0_c0_c1_c0;
+ bias = ubias0_1_Stage4_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage4_c0_c0_c1_c0;
+ bias = ubias2_3_Stage4_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage4_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage4_c0_c0_c1_c0;
+ bias = ubias4_5_Stage4_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage4_c0_c0_c1_c0;
+ bias = ubias6_7_Stage4_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage4_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = RadialGradientLayout_Stage4_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage4_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage4_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage4_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ vec2 offset = vEllipseOffsets_Stage0;
+ float test = dot(offset, offset) - 1.0;
+ vec2 grad = (2.0 * offset) * vEllipseRadii_Stage0.xy;
+ float grad_dot = dot(grad, grad);
+ grad_dot = max(grad_dot, 1.1754999560161448e-38);
+ float invlen = inversesqrt(grad_dot);
+ float edgeAlpha = clamp(0.5 - test * invlen, 0.0, 1.0);
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ vec4 output_Stage2;
+ {
+ vec2 coord = vTransformedCoords_0_Stage0;
+ vec2 zoom_coord = uoffset_Stage2 + coord * vec2(uxInvZoom_Stage2, uyInvZoom_Stage2);
+ vec2 delta = (coord - uboundsUniform_Stage2.xy) * uboundsUniform_Stage2.zw;
+ delta = min(delta, vec2(1.0, 1.0) - delta);
+ delta *= vec2(uxInvInset_Stage2, uyInvInset_Stage2);
+ float weight = 0.0;
+ if (delta.x < 2.0 && delta.y < 2.0) {
+ delta = vec2(2.0, 2.0) - delta;
+ float dist = length(delta);
+ dist = max(2.0 - dist, 0.0);
+ weight = min(dist * dist, 1.0);
+ } else {
+ vec2 delta_squared = delta * delta;
+ weight = min(min(delta_squared.x, delta_squared.y), 1.0);
+ }
+ output_Stage2 = texture(uTextureSampler_0_Stage2, mix(coord, zoom_coord, weight));
+ }
+ vec4 output_Stage3;
+ {
+ output_Stage3 = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_1_Stage0 - 8.0 * uImageIncrement_Stage3;
+ vec2 coordSampled = vec2(0.0, 0.0);
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage3.x, uBounds_Stage3.y);
+ output_Stage3 += texture(uTextureSampler_0_Stage3, coordSampled) * uKernel_Stage3[0].x;
+ coord += uImageIncrement_Stage3;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage3.x, uBounds_Stage3.y);
+ output_Stage3 += texture(uTextureSampler_0_Stage3, coordSampled) * uKernel_Stage3[0].y;
+ coord += uImageIncrement_Stage3;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage3.x, uBounds_Stage3.y);
+ output_Stage3 += texture(uTextureSampler_0_Stage3, coordSampled) * uKernel_Stage3[0].z;
+ coord += uImageIncrement_Stage3;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage3.x, uBounds_Stage3.y);
+ output_Stage3 += texture(uTextureSampler_0_Stage3, coordSampled) * uKernel_Stage3[0].w;
+ coord += uImageIncrement_Stage3;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage3.x, uBounds_Stage3.y);
+ output_Stage3 += texture(uTextureSampler_0_Stage3, coordSampled) * uKernel_Stage3[1].x;
+ coord += uImageIncrement_Stage3;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage3.x, uBounds_Stage3.y);
+ output_Stage3 += texture(uTextureSampler_0_Stage3, coordSampled) * uKernel_Stage3[1].y;
+ coord += uImageIncrement_Stage3;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage3.x, uBounds_Stage3.y);
+ output_Stage3 += texture(uTextureSampler_0_Stage3, coordSampled) * uKernel_Stage3[1].z;
+ coord += uImageIncrement_Stage3;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage3.x, uBounds_Stage3.y);
+ output_Stage3 += texture(uTextureSampler_0_Stage3, coordSampled) * uKernel_Stage3[1].w;
+ coord += uImageIncrement_Stage3;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage3.x, uBounds_Stage3.y);
+ output_Stage3 += texture(uTextureSampler_0_Stage3, coordSampled) * uKernel_Stage3[2].x;
+ coord += uImageIncrement_Stage3;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage3.x, uBounds_Stage3.y);
+ output_Stage3 += texture(uTextureSampler_0_Stage3, coordSampled) * uKernel_Stage3[2].y;
+ coord += uImageIncrement_Stage3;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage3.x, uBounds_Stage3.y);
+ output_Stage3 += texture(uTextureSampler_0_Stage3, coordSampled) * uKernel_Stage3[2].z;
+ coord += uImageIncrement_Stage3;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage3.x, uBounds_Stage3.y);
+ output_Stage3 += texture(uTextureSampler_0_Stage3, coordSampled) * uKernel_Stage3[2].w;
+ coord += uImageIncrement_Stage3;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage3.x, uBounds_Stage3.y);
+ output_Stage3 += texture(uTextureSampler_0_Stage3, coordSampled) * uKernel_Stage3[3].x;
+ coord += uImageIncrement_Stage3;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage3.x, uBounds_Stage3.y);
+ output_Stage3 += texture(uTextureSampler_0_Stage3, coordSampled) * uKernel_Stage3[3].y;
+ coord += uImageIncrement_Stage3;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage3.x, uBounds_Stage3.y);
+ output_Stage3 += texture(uTextureSampler_0_Stage3, coordSampled) * uKernel_Stage3[3].z;
+ coord += uImageIncrement_Stage3;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage3.x, uBounds_Stage3.y);
+ output_Stage3 += texture(uTextureSampler_0_Stage3, coordSampled) * uKernel_Stage3[3].w;
+ coord += uImageIncrement_Stage3;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage3.x, uBounds_Stage3.y);
+ output_Stage3 += texture(uTextureSampler_0_Stage3, coordSampled) * uKernel_Stage3[4].x;
+ coord += uImageIncrement_Stage3;
+ output_Stage3 *= outputCoverage_Stage0;
+ }
+ vec4 output_Stage4;
+ {
+ output_Stage4 = blend_dst_in(output_Stage3, ClampedGradientEffect_Stage4_c0_c0(vec4(1.0)));
+ }
+ vec4 output_Stage5;
+ {
+ output_Stage5 = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_3_Stage0 - 4.0 * uImageIncrement_Stage5;
+ vec2 coordSampled = vec2(0.0, 0.0);
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage5.x, uBounds_Stage5.y);
+ output_Stage5 += texture(uTextureSampler_0_Stage5, coordSampled) * uKernel_Stage5[0].x;
+ coord += uImageIncrement_Stage5;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage5.x, uBounds_Stage5.y);
+ output_Stage5 += texture(uTextureSampler_0_Stage5, coordSampled) * uKernel_Stage5[0].y;
+ coord += uImageIncrement_Stage5;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage5.x, uBounds_Stage5.y);
+ output_Stage5 += texture(uTextureSampler_0_Stage5, coordSampled) * uKernel_Stage5[0].z;
+ coord += uImageIncrement_Stage5;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage5.x, uBounds_Stage5.y);
+ output_Stage5 += texture(uTextureSampler_0_Stage5, coordSampled) * uKernel_Stage5[0].w;
+ coord += uImageIncrement_Stage5;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage5.x, uBounds_Stage5.y);
+ output_Stage5 += texture(uTextureSampler_0_Stage5, coordSampled) * uKernel_Stage5[1].x;
+ coord += uImageIncrement_Stage5;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage5.x, uBounds_Stage5.y);
+ output_Stage5 += texture(uTextureSampler_0_Stage5, coordSampled) * uKernel_Stage5[1].y;
+ coord += uImageIncrement_Stage5;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage5.x, uBounds_Stage5.y);
+ output_Stage5 += texture(uTextureSampler_0_Stage5, coordSampled) * uKernel_Stage5[1].z;
+ coord += uImageIncrement_Stage5;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage5.x, uBounds_Stage5.y);
+ output_Stage5 += texture(uTextureSampler_0_Stage5, coordSampled) * uKernel_Stage5[1].w;
+ coord += uImageIncrement_Stage5;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage5.x, uBounds_Stage5.y);
+ output_Stage5 += texture(uTextureSampler_0_Stage5, coordSampled) * uKernel_Stage5[2].x;
+ coord += uImageIncrement_Stage5;
+ output_Stage5 *= output_Stage4;
+ }
+ {
+ sk_FragColor = output_Stage5 * output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+uniform mat3 uCoordTransformMatrix_3_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec2 inEllipseOffset;
+in vec4 inEllipseRadii;
+noperspective out vec2 vEllipseOffsets_Stage0;
+noperspective out vec4 vEllipseRadii_Stage0;
+noperspective out vec4 vinColor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+noperspective out vec2 vTransformedCoords_3_Stage0;
+void main() {
+ vEllipseOffsets_Stage0 = inEllipseOffset;
+ vEllipseRadii_Stage0 = inEllipseRadii;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_3_Stage0 = (uCoordTransformMatrix_3_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1981.shader_test b/shaders/skia/1981.shader_test
new file mode 100644
index 0000000..370e928
--- /dev/null
+++ b/shaders/skia/1981.shader_test
@@ -0,0 +1,250 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_KHR_blend_equation_advanced : require
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+layout (blend_support_all_equations) out ;
+uniform vec4 urectH_Stage1_c0_c0_c0_c0_c0_c0;
+uniform float uinvSixSigma_Stage1_c0_c0_c0_c0_c0_c0;
+uniform vec3 uedges_Stage1_c0_c0_c1_c0_c0_c0[1];
+uniform vec4 urectUniform_Stage1_c0_c0_c1_c0_c1_c0;
+uniform vec4 ucircle_Stage1_c1_c0_c0_c0_c1_c0;
+uniform float ucornerRadius_Stage1_c1_c0_c1_c0_c0_c0;
+uniform vec4 uproxyRect_Stage1_c1_c0_c1_c0_c0_c0;
+uniform float ublurRadius_Stage1_c1_c0_c1_c0_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in float vinCoverage_Stage0;
+vec4 RectBlurEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float xCoverage, yCoverage;
+ {
+ float x, y;
+ {
+ x = max(urectH_Stage1_c0_c0_c0_c0_c0_c0.x - gl_FragCoord.x, gl_FragCoord.x - urectH_Stage1_c0_c0_c0_c0_c0_c0.z);
+ y = max(urectH_Stage1_c0_c0_c0_c0_c0_c0.y - gl_FragCoord.y, gl_FragCoord.y - urectH_Stage1_c0_c0_c0_c0_c0_c0.w);
+ }
+ xCoverage = texture(uTextureSampler_0_Stage1, vec2(x * uinvSixSigma_Stage1_c0_c0_c0_c0_c0_c0, 0.5)).w;
+ yCoverage = texture(uTextureSampler_0_Stage1, vec2(y * uinvSixSigma_Stage1_c0_c0_c0_c0_c0_c0, 0.5)).w;
+ _output = (_input * xCoverage) * yCoverage;
+ }
+ _output = (_input * xCoverage) * yCoverage;
+ return _output;
+}
+vec4 Big_Ole_Key_Stage1_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = _input;
+ return _output;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 blend_darken(vec4 src, vec4 dst) {
+ vec4 result = blend_src_over(src, dst);
+ result.xyz = min(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
+ return result;
+}
+vec4 ComposeTwo_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_darken(RectBlurEffect_Stage1_c0_c0_c0_c0_c0_c0(inputColor), Big_Ole_Key_Stage1_c0_c0_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 ConvexPoly_Stage1_c0_c0_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float alpha = 1.0;
+ float edge;
+ edge = dot(uedges_Stage1_c0_c0_c1_c0_c0_c0[0], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ _output = _input * alpha;
+ return _output;
+}
+vec4 AARectEffect_Stage1_c0_c0_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float alpha;
+ {
+ alpha = float(all(greaterThan(vec4(gl_FragCoord.xy, urectUniform_Stage1_c0_c0_c1_c0_c1_c0.zw), vec4(urectUniform_Stage1_c0_c0_c1_c0_c1_c0.xy, gl_FragCoord.xy))) ? 1 : 0);
+ }
+ _output = _input * alpha;
+ return _output;
+}
+vec4 blend_exclusion(vec4 src, vec4 dst) {
+ return vec4((dst.xyz + src.xyz) - (2.0 * dst.xyz) * src.xyz, src.w + (1.0 - src.w) * dst.w);
+}
+vec4 ComposeTwo_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_exclusion(ConvexPoly_Stage1_c0_c0_c1_c0_c0_c0(inputColor), AARectEffect_Stage1_c0_c0_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+float _blend_color_luminance(vec3 color) {
+ return dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), color);
+}
+vec3 _blend_set_color_luminance(vec3 hueSatColor, float alpha, vec3 lumColor) {
+ float lum = _blend_color_luminance(lumColor);
+ vec3 result = (lum - _blend_color_luminance(hueSatColor)) + hueSatColor;
+ float minComp = min(min(result.x, result.y), result.z);
+ float maxComp = max(max(result.x, result.y), result.z);
+ if (minComp < 0.0 && lum != minComp) {
+ result = lum + ((result - lum) * lum) / (lum - minComp);
+ }
+ if (maxComp > alpha && maxComp != lum) {
+ return lum + ((result - lum) * (alpha - lum)) / (maxComp - lum);
+ }
+ return result;
+}
+vec4 blend_color(vec4 src, vec4 dst) {
+ float alpha = dst.w * src.w;
+ vec3 sda = src.xyz * dst.w;
+ vec3 dsa = dst.xyz * src.w;
+ return vec4((((_blend_set_color_luminance(sda, alpha, dsa) + dst.xyz) - dsa) + src.xyz) - sda, (src.w + dst.w) - alpha);
+}
+vec4 ComposeTwo_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_color(ComposeTwo_Stage1_c0_c0_c0_c0(inputColor), ComposeTwo_Stage1_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 Dither_Stage1_c1_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = _input;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_0_Stage0.x);
+ uint y = uint(vTransformedCoords_0_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ _output = vec4(clamp(_output.xyz + value * 0.0039215688593685627, 0.0, _output.w), _output.w);
+ return _output;
+}
+vec4 CircleEffect_Stage1_c1_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float d;
+ {
+ d = (1.0 - length((ucircle_Stage1_c1_c0_c0_c0_c1_c0.xy - gl_FragCoord.xy) * ucircle_Stage1_c1_c0_c0_c0_c1_c0.w)) * ucircle_Stage1_c1_c0_c0_c0_c1_c0.z;
+ }
+ {
+ _output = d > 0.5 ? _input : vec4(0.0);
+ }
+ return _output;
+}
+vec4 ComposeTwo_Stage1_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_src_over(Dither_Stage1_c1_c0_c0_c0_c0_c0(inputColor), CircleEffect_Stage1_c1_c0_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 RRectBlurEffect_Stage1_c1_c0_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 translatedFragPos = gl_FragCoord.xy - uproxyRect_Stage1_c1_c0_c1_c0_c0_c0.xy;
+ float threshold = ucornerRadius_Stage1_c1_c0_c1_c0_c0_c0 + 2.0 * ublurRadius_Stage1_c1_c0_c1_c0_c0_c0;
+ vec2 middle = (uproxyRect_Stage1_c1_c0_c1_c0_c0_c0.zw - uproxyRect_Stage1_c1_c0_c1_c0_c0_c0.xy) - 2.0 * threshold;
+ if (translatedFragPos.x >= threshold && translatedFragPos.x < middle.x + threshold) {
+ translatedFragPos.x = threshold;
+ } else if (translatedFragPos.x >= middle.x + threshold) {
+ translatedFragPos.x -= middle.x - 1.0;
+ }
+ if (translatedFragPos.y > threshold && translatedFragPos.y < middle.y + threshold) {
+ translatedFragPos.y = threshold;
+ } else if (translatedFragPos.y >= middle.y + threshold) {
+ translatedFragPos.y -= middle.y - 1.0;
+ }
+ vec2 proxyDims = vec2(2.0 * threshold + 1.0);
+ vec2 texCoord = translatedFragPos / proxyDims;
+ _output = _input * texture(uTextureSampler_1_Stage1, texCoord);
+ return _output;
+}
+vec4 Big_Ole_Key_Stage1_c1_c0_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = _input;
+ return _output;
+}
+float _guarded_divide(float n, float d) {
+ return n / d;
+}
+float _soft_light_component(float sc, float sa, float dc, float da) {
+ if (2.0 * sc <= sa) {
+ return (_guarded_divide((dc * dc) * (sa - 2.0 * sc), da) + (1.0 - da) * sc) + dc * ((-sa + 2.0 * sc) + 1.0);
+ } else if (4.0 * dc <= da) {
+ float DSqd = dc * dc;
+ float DCub = DSqd * dc;
+ float DaSqd = da * da;
+ float DaCub = DaSqd * da;
+ return _guarded_divide(((DaSqd * (sc - dc * ((3.0 * sa - 6.0 * sc) - 1.0)) + ((12.0 * da) * DSqd) * (sa - 2.0 * sc)) - (16.0 * DCub) * (sa - 2.0 * sc)) - DaCub * sc, DaSqd);
+ }
+ return ((dc * ((sa - 2.0 * sc) + 1.0) + sc) - sqrt(da * dc) * (sa - 2.0 * sc)) - da * sc;
+}
+vec4 blend_soft_light(vec4 src, vec4 dst) {
+ if (dst.w == 0.0) {
+ return src;
+ }
+ return vec4(_soft_light_component(src.x, src.w, dst.x, dst.w), _soft_light_component(src.y, src.w, dst.y, dst.w), _soft_light_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+}
+vec4 ComposeTwo_Stage1_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_soft_light(RRectBlurEffect_Stage1_c1_c0_c1_c0_c0_c0(inputColor), Big_Ole_Key_Stage1_c1_c0_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 ComposeTwo_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_darken(ComposeTwo_Stage1_c1_c0_c0_c0(inputColor), ComposeTwo_Stage1_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ float alpha = 1.0;
+ alpha = vinCoverage_Stage0;
+ outputCoverage_Stage0 = vec4(alpha);
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_exclusion(ComposeTwo_Stage1_c0_c0(inputColor), ComposeTwo_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ sk_FragColor = outputCoverage_Stage0 * output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in float inCoverage;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out float vinCoverage_Stage0;
+void main() {
+ vec4 color = inColor;
+ vcolor_Stage0 = color;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ vinCoverage_Stage0 = inCoverage;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1984.shader_test b/shaders/skia/1984.shader_test
new file mode 100644
index 0000000..ebbd495
--- /dev/null
+++ b/shaders/skia/1984.shader_test
@@ -0,0 +1,145 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uColor_Stage0;
+uniform vec2 uImageIncrement_Stage2;
+uniform vec2 uBounds_Stage2;
+uniform vec4 uKernel_Stage2[6];
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+in vec2 vTransformedCoords_0_Stage0;
+in vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = uColor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * outputColor_Stage0;
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_1_Stage0 - 11.0 * uImageIncrement_Stage2;
+ vec2 coordSampled = vec2(0.0, 0.0);
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage2.x, uBounds_Stage2.y - uBounds_Stage2.x) + uBounds_Stage2.x;
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[0].x;
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage2.x, uBounds_Stage2.y - uBounds_Stage2.x) + uBounds_Stage2.x;
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[0].y;
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage2.x, uBounds_Stage2.y - uBounds_Stage2.x) + uBounds_Stage2.x;
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[0].z;
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage2.x, uBounds_Stage2.y - uBounds_Stage2.x) + uBounds_Stage2.x;
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[0].w;
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage2.x, uBounds_Stage2.y - uBounds_Stage2.x) + uBounds_Stage2.x;
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[1].x;
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage2.x, uBounds_Stage2.y - uBounds_Stage2.x) + uBounds_Stage2.x;
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[1].y;
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage2.x, uBounds_Stage2.y - uBounds_Stage2.x) + uBounds_Stage2.x;
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[1].z;
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage2.x, uBounds_Stage2.y - uBounds_Stage2.x) + uBounds_Stage2.x;
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[1].w;
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage2.x, uBounds_Stage2.y - uBounds_Stage2.x) + uBounds_Stage2.x;
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[2].x;
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage2.x, uBounds_Stage2.y - uBounds_Stage2.x) + uBounds_Stage2.x;
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[2].y;
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage2.x, uBounds_Stage2.y - uBounds_Stage2.x) + uBounds_Stage2.x;
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[2].z;
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage2.x, uBounds_Stage2.y - uBounds_Stage2.x) + uBounds_Stage2.x;
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[2].w;
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage2.x, uBounds_Stage2.y - uBounds_Stage2.x) + uBounds_Stage2.x;
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[3].x;
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage2.x, uBounds_Stage2.y - uBounds_Stage2.x) + uBounds_Stage2.x;
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[3].y;
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage2.x, uBounds_Stage2.y - uBounds_Stage2.x) + uBounds_Stage2.x;
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[3].z;
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage2.x, uBounds_Stage2.y - uBounds_Stage2.x) + uBounds_Stage2.x;
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[3].w;
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage2.x, uBounds_Stage2.y - uBounds_Stage2.x) + uBounds_Stage2.x;
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[4].x;
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage2.x, uBounds_Stage2.y - uBounds_Stage2.x) + uBounds_Stage2.x;
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[4].y;
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage2.x, uBounds_Stage2.y - uBounds_Stage2.x) + uBounds_Stage2.x;
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[4].z;
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage2.x, uBounds_Stage2.y - uBounds_Stage2.x) + uBounds_Stage2.x;
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[4].w;
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage2.x, uBounds_Stage2.y - uBounds_Stage2.x) + uBounds_Stage2.x;
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[5].x;
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage2.x, uBounds_Stage2.y - uBounds_Stage2.x) + uBounds_Stage2.x;
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[5].y;
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage2.x, uBounds_Stage2.y - uBounds_Stage2.x) + uBounds_Stage2.x;
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[5].z;
+ coord += uImageIncrement_Stage2;
+ }
+ {
+ sk_FragColor = output_Stage1 * output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+out vec2 vTransformedCoords_0_Stage0;
+out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vec3 pos3 = uViewM_Stage0 * vec3(position, 1.0);
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(position, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(position, 1.0)).xy;
+ gl_Position = vec4(pos3.x, pos3.y, 0.0, pos3.z);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1987.shader_test b/shaders/skia/1987.shader_test
new file mode 100644
index 0000000..38d00ae
--- /dev/null
+++ b/shaders/skia/1987.shader_test
@@ -0,0 +1,115 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_KHR_blend_equation_advanced : require
+out vec4 sk_FragColor;
+layout (blend_support_all_equations) out ;
+uniform float uinnerThreshold_Stage1_c0_c0;
+uniform float uouterThreshold_Stage1_c0_c0;
+uniform vec4 uboundsUniform_Stage1_c1_c0;
+uniform float uxInvZoom_Stage1_c1_c0;
+uniform float uyInvZoom_Stage1_c1_c0;
+uniform float uxInvInset_Stage1_c1_c0;
+uniform float uyInvInset_Stage1_c1_c0;
+uniform vec2 uoffset_Stage1_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+noperspective in vec4 vQuadEdge_Stage0;
+noperspective in vec4 vinColor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 AlphaThresholdFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 color = _input;
+ vec4 mask_color = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ if (mask_color.w < 0.5) {
+ if (color.w > uouterThreshold_Stage1_c0_c0) {
+ float scale = uouterThreshold_Stage1_c0_c0 / color.w;
+ color.xyz *= scale;
+ color.w = uouterThreshold_Stage1_c0_c0;
+ }
+ } else if (color.w < uinnerThreshold_Stage1_c0_c0) {
+ float scale = uinnerThreshold_Stage1_c0_c0 / max(0.0010000000474974513, color.w);
+ color.xyz *= scale;
+ color.w = uinnerThreshold_Stage1_c0_c0;
+ }
+ _output = color;
+ return _output;
+}
+vec4 MagnifierEffect_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coord = vTransformedCoords_1_Stage0;
+ vec2 zoom_coord = uoffset_Stage1_c1_c0 + coord * vec2(uxInvZoom_Stage1_c1_c0, uyInvZoom_Stage1_c1_c0);
+ vec2 delta = (coord - uboundsUniform_Stage1_c1_c0.xy) * uboundsUniform_Stage1_c1_c0.zw;
+ delta = min(delta, vec2(1.0, 1.0) - delta);
+ delta *= vec2(uxInvInset_Stage1_c1_c0, uyInvInset_Stage1_c1_c0);
+ float weight = 0.0;
+ if (delta.x < 2.0 && delta.y < 2.0) {
+ delta = vec2(2.0, 2.0) - delta;
+ float dist = length(delta);
+ dist = max(2.0 - dist, 0.0);
+ weight = min(dist * dist, 1.0);
+ } else {
+ vec2 delta_squared = delta * delta;
+ weight = min(min(delta_squared.x, delta_squared.y), 1.0);
+ }
+ _output = texture(uTextureSampler_1_Stage1, mix(coord, zoom_coord, weight));
+ return _output;
+}
+vec4 blend_exclusion(vec4 src, vec4 dst) {
+ return vec4((dst.xyz + src.xyz) - (2.0 * dst.xyz) * src.xyz, src.w + (1.0 - src.w) * dst.w);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vinColor_Stage0;
+ float edgeAlpha;
+ vec2 duvdx = dFdx(vQuadEdge_Stage0.xy);
+ vec2 duvdy = -dFdy(vQuadEdge_Stage0.xy);
+ if (vQuadEdge_Stage0.z > 0.0 && vQuadEdge_Stage0.w > 0.0) {
+ edgeAlpha = min(min(vQuadEdge_Stage0.z, vQuadEdge_Stage0.w) + 0.5, 1.0);
+ } else {
+ vec2 gF = vec2((2.0 * vQuadEdge_Stage0.x) * duvdx.x - duvdx.y, (2.0 * vQuadEdge_Stage0.x) * duvdy.x - duvdy.y);
+ edgeAlpha = vQuadEdge_Stage0.x * vQuadEdge_Stage0.x - vQuadEdge_Stage0.y;
+ edgeAlpha = clamp(0.5 - edgeAlpha / length(gF), 0.0, 1.0);
+ }
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_exclusion(AlphaThresholdFragmentProcessor_Stage1_c0_c0(inputColor), MagnifierEffect_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ sk_FragColor = outputCoverage_Stage0 * output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec4 inQuadEdge;
+noperspective out vec4 vQuadEdge_Stage0;
+noperspective out vec4 vinColor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vQuadEdge_Stage0 = inQuadEdge;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/199-2.shader_test b/shaders/skia/199-2.shader_test
new file mode 100644
index 0000000..87b4101
--- /dev/null
+++ b/shaders/skia/199-2.shader_test
@@ -0,0 +1,82 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage2_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c1_c0;
+ }
+ return _output;
+}
+vec4 blend_xor(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src + (1.0 - src.w) * dst;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_xor(ConstColorProcessor_Stage2_c1_c0(vec4(1.0)), output_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/199-3.shader_test b/shaders/skia/199-3.shader_test
new file mode 100644
index 0000000..0f20dd9
--- /dev/null
+++ b/shaders/skia/199-3.shader_test
@@ -0,0 +1,191 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform float uSurfaceScale_Stage1;
+uniform vec3 uLightColor_Stage1;
+uniform float uKD_Stage1;
+uniform vec4 uTexDom_Stage1;
+uniform vec3 uDecalParams_Stage1;
+uniform vec3 uLightDirection_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 light_Stage1(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ float colorScale = uKD_Stage1 * dot(normal, surfaceToLight);
+ return vec4(lightColor * clamp(colorScale, 0.0, 1.0), 1.0);
+}
+float sobel_Stage1(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage1(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage1(float m[9], float surfaceScale) {
+ return pointToNormal_Stage1(sobel_Stage1(0.0, 0.0, m[4], m[5], m[7], m[8], 0.66666698455810547), sobel_Stage1(0.0, 0.0, m[4], m[7], m[5], m[8], 0.66666698455810547), surfaceScale);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ vec2 coord = vTransformedCoords_0_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp0 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp5 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp6 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp7 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp8 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = uLightDirection_Stage1;
+ output_Stage1 = light_Stage1(normal_Stage1(m, uSurfaceScale_Stage1), surfaceToLight, uLightColor_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/199-5.shader_test b/shaders/skia/199-5.shader_test
new file mode 100644
index 0000000..2a53834
--- /dev/null
+++ b/shaders/skia/199-5.shader_test
@@ -0,0 +1,25 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uColor_Stage0;
+void main() {
+ {
+ sk_FragColor = vec4(1.0);
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 inPosition;
+void main() {
+ vec2 pos2 = inPosition;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/199-6.shader_test b/shaders/skia/199-6.shader_test
new file mode 100644
index 0000000..d339027
--- /dev/null
+++ b/shaders/skia/199-6.shader_test
@@ -0,0 +1,100 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage2;
+uniform vec2 uBounds_Stage2;
+uniform vec4 uKernel_Stage2[4];
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_1_Stage0 - 6.0 * uImageIncrement_Stage2;
+ vec2 coordSampled = vec2(0.0, 0.0);
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage2.x, uBounds_Stage2.y);
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[0].x;
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage2.x, uBounds_Stage2.y);
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[0].y;
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage2.x, uBounds_Stage2.y);
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[0].z;
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage2.x, uBounds_Stage2.y);
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[0].w;
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage2.x, uBounds_Stage2.y);
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[1].x;
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage2.x, uBounds_Stage2.y);
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[1].y;
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage2.x, uBounds_Stage2.y);
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[1].z;
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage2.x, uBounds_Stage2.y);
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[1].w;
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage2.x, uBounds_Stage2.y);
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[2].x;
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage2.x, uBounds_Stage2.y);
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[2].y;
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage2.x, uBounds_Stage2.y);
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[2].z;
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage2.x, uBounds_Stage2.y);
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[2].w;
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage2.x, uBounds_Stage2.y);
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[3].x;
+ coord += uImageIncrement_Stage2;
+ output_Stage2 *= output_Stage1;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/199-7.shader_test b/shaders/skia/199-7.shader_test
new file mode 100644
index 0000000..7aac316
--- /dev/null
+++ b/shaders/skia/199-7.shader_test
@@ -0,0 +1,72 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 ClampFragmentProcessor_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ float alpha = clamp(_input.w, 0.0, 1.0);
+ _output = vec4(clamp(_input.xyz, 0.0, alpha), alpha);
+ }
+ return _output;
+}
+vec4 Dither_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = _input;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_1_Stage0.x);
+ uint y = uint(vTransformedCoords_1_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ _output = vec4(clamp(_output.xyz + value * 0.01587301678955555, 0.0, _output.w), _output.w);
+ return _output;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 blend_lighten(vec4 src, vec4 dst) {
+ vec4 result = blend_src_over(src, dst);
+ result.xyz = max(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
+ return result;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ vec4 inputColor = vec4(output_Stage1.xyz, 1.0);
+ output_Stage2 = blend_lighten(ClampFragmentProcessor_Stage2_c0_c0(inputColor), Dither_Stage2_c1_c0(inputColor));
+ output_Stage2 *= output_Stage1.w;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/199.shader_test b/shaders/skia/199.shader_test
new file mode 100644
index 0000000..971aa4d
--- /dev/null
+++ b/shaders/skia/199.shader_test
@@ -0,0 +1,61 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 ucolor_Stage1_c0_c0_c0_c0;
+noperspective in vec4 vcolor_Stage0;
+vec4 ConstColorProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = _input.w * ucolor_Stage1_c0_c0_c0_c0;
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = ConstColorProcessor_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 blend_dst_out(vec4 src, vec4 dst) {
+ return (1.0 - src.w) * dst;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_dst_out(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 position;
+in vec4 inColor;
+noperspective out vec4 vcolor_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1993.shader_test b/shaders/skia/1993.shader_test
new file mode 100644
index 0000000..64db284
--- /dev/null
+++ b/shaders/skia/1993.shader_test
@@ -0,0 +1,26 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uColor_Stage0;
+void main() {
+ {
+ sk_FragColor = vec4(1.0);
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 inPosition;
+void main() {
+ vec3 pos3 = uViewM_Stage0 * vec3(inPosition, 1.0);
+ gl_Position = vec4(pos3.x, pos3.y, 0.0, pos3.z);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1996.shader_test b/shaders/skia/1996.shader_test
new file mode 100644
index 0000000..7fc88df
--- /dev/null
+++ b/shaders/skia/1996.shader_test
@@ -0,0 +1,607 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_KHR_blend_equation_advanced : require
+out vec4 sk_FragColor;
+layout (blend_support_all_equations) out ;
+uniform float uSrcTF_Stage0[7];
+uniform mat3 uColorXform_Stage0;
+uniform float uDstTF_Stage0[7];
+uniform vec2 uImageIncrement_Stage1;
+uniform vec4 uKernel_Stage1[6];
+uniform vec2 uKernelOffset_Stage1;
+uniform float uGain_Stage1;
+uniform float uBias_Stage1;
+uniform vec4 uTexDom_Stage1;
+uniform vec3 uDecalParams_Stage1;
+uniform vec4 ustart_Stage2_c0_c0_c1_c0;
+uniform vec4 uend_Stage2_c0_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vtextureCoords_Stage0;
+flat in vec4 vtextureDomain_Stage0;
+flat in vec4 vcolor_Stage0;
+float src_tf_Stage0(float x) {
+ float G = uSrcTF_Stage0[0];
+ float A = uSrcTF_Stage0[1];
+ float B = uSrcTF_Stage0[2];
+ float C = uSrcTF_Stage0[3];
+ float D = uSrcTF_Stage0[4];
+ float E = uSrcTF_Stage0[5];
+ float F = uSrcTF_Stage0[6];
+ float s = sign(x);
+ x = abs(x);
+ x = x < D ? C * x + F : pow(A * x + B, G) + E;
+ return s * x;
+}
+float dst_tf_Stage0(float x) {
+ float G = uDstTF_Stage0[0];
+ float A = uDstTF_Stage0[1];
+ float B = uDstTF_Stage0[2];
+ float C = uDstTF_Stage0[3];
+ float D = uDstTF_Stage0[4];
+ float E = uDstTF_Stage0[5];
+ float F = uDstTF_Stage0[6];
+ float s = sign(x);
+ x = abs(x);
+ x = x < D ? C * x + F : pow(A * x + B, G) + E;
+ return s * x;
+}
+vec4 gamut_xform_Stage0(vec4 color) {
+ color.xyz = uColorXform_Stage0 * color.xyz;
+ return color;
+}
+vec4 color_xform_Stage0(vec4 color) {
+ float nonZeroAlpha = max(color.w, 9.9999997473787516e-05);
+ color = vec4(color.xyz / nonZeroAlpha, nonZeroAlpha);
+ color.x = src_tf_Stage0(color.x);
+ color.y = src_tf_Stage0(color.y);
+ color.z = src_tf_Stage0(color.z);
+ color = gamut_xform_Stage0(color);
+ color.x = dst_tf_Stage0(color.x);
+ color.y = dst_tf_Stage0(color.y);
+ color.z = dst_tf_Stage0(color.z);
+ color.xyz *= color.w;
+ return color;
+}
+vec4 LinearGradientLayout_Stage2_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_1_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage2_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage2_c0_c0_c1_c0 + t * uend_Stage2_c0_c0_c1_c0;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage2_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ t.x = fract(t.x);
+ }
+ _output = SingleIntervalGradientColorizer_Stage2_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ vec2 textureCoords;
+ textureCoords = vtextureCoords_Stage0;
+ vec4 textureDomain;
+ textureDomain = vtextureDomain_Stage0;
+ outputColor_Stage0 = vcolor_Stage0;
+ outputColor_Stage0 = color_xform_Stage0(texture(uTextureSampler_0_Stage0, clamp(textureCoords, textureDomain.xy, textureDomain.zw))) * outputColor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec4 sum = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0 - uKernelOffset_Stage1 * uImageIncrement_Stage1;
+ vec4 c;
+ {
+ float k = uKernel_Stage1[0].x;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[0].y;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[0].z;
+ {
+ vec2 origCoord = coord + vec2(2.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[0].w;
+ {
+ vec2 origCoord = coord + vec2(3.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[1].x;
+ {
+ vec2 origCoord = coord + vec2(4.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[1].y;
+ {
+ vec2 origCoord = coord + vec2(5.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[1].z;
+ {
+ vec2 origCoord = coord + vec2(6.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[1].w;
+ {
+ vec2 origCoord = coord + vec2(7.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[2].x;
+ {
+ vec2 origCoord = coord + vec2(8.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[2].y;
+ {
+ vec2 origCoord = coord + vec2(9.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[2].z;
+ {
+ vec2 origCoord = coord + vec2(10.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[2].w;
+ {
+ vec2 origCoord = coord + vec2(11.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[3].x;
+ {
+ vec2 origCoord = coord + vec2(12.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[3].y;
+ {
+ vec2 origCoord = coord + vec2(13.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[3].z;
+ {
+ vec2 origCoord = coord + vec2(14.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[3].w;
+ {
+ vec2 origCoord = coord + vec2(15.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[4].x;
+ {
+ vec2 origCoord = coord + vec2(16.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[4].y;
+ {
+ vec2 origCoord = coord + vec2(17.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[4].z;
+ {
+ vec2 origCoord = coord + vec2(18.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[4].w;
+ {
+ vec2 origCoord = coord + vec2(19.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[5].x;
+ {
+ vec2 origCoord = coord + vec2(20.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[5].y;
+ {
+ vec2 origCoord = coord + vec2(21.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[5].z;
+ {
+ vec2 origCoord = coord + vec2(22.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ vec2 origCoord = vTransformedCoords_0_Stage0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ output_Stage1.w = c.w;
+ output_Stage1.xyz = clamp(sum.xyz * uGain_Stage1 + uBias_Stage1, 0.0, 1.0);
+ output_Stage1.xyz *= output_Stage1.w;
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_dst_in(output_Stage1, TiledGradientEffect_Stage2_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage2 * outputColor_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 textureCoords;
+in vec4 textureDomain;
+in vec4 color;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vtextureCoords_Stage0;
+flat out vec4 vtextureDomain_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vec2 pos2 = position;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(textureCoords, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(textureCoords, 1.0)).xy;
+ vtextureCoords_Stage0 = textureCoords;
+ vtextureDomain_Stage0 = textureDomain;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/1999.shader_test b/shaders/skia/1999.shader_test
new file mode 100644
index 0000000..4173910
--- /dev/null
+++ b/shaders/skia/1999.shader_test
@@ -0,0 +1,29 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uColor_Stage0;
+void main() {
+ {
+ sk_FragColor = vec4(0.0);
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 inPosition;
+void main() {
+ vec2 pos2 = inPosition;
+ {
+ vec2 _posTmp = pos2;
+ _posTmp = floor(_posTmp) + vec2(0.5, 0.5);
+ gl_Position = vec4(_posTmp, 0.0, 1.0);
+ }
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/2002.shader_test b/shaders/skia/2002.shader_test
new file mode 100644
index 0000000..c67c523
--- /dev/null
+++ b/shaders/skia/2002.shader_test
@@ -0,0 +1,283 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform float uSrcTF_Stage0[7];
+uniform mat3 uColorXform_Stage0;
+uniform float uDstTF_Stage0[7];
+uniform vec4 uinnerRect_Stage1;
+uniform vec4 uinvRadiiLTRB_Stage1;
+uniform vec2 uImageIncrement_Stage2;
+uniform float uSurfaceScale_Stage2;
+uniform vec3 uLightColor_Stage2;
+uniform float uKD_Stage2;
+uniform vec4 uTexDom_Stage2;
+uniform vec3 uDecalParams_Stage2;
+uniform vec3 uLightLocation_Stage2;
+uniform vec4 ucircleData_Stage3;
+uniform sampler2D uTextureSampler_0_Stage0;
+uniform sampler2D uTextureSampler_0_Stage2;
+uniform sampler2D uTextureSampler_0_Stage3;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vtextureCoords_Stage0;
+flat in vec4 vtextureDomain_Stage0;
+flat in vec4 vcolor_Stage0;
+float src_tf_Stage0(float x) {
+ float G = uSrcTF_Stage0[0];
+ float A = uSrcTF_Stage0[1];
+ float B = uSrcTF_Stage0[2];
+ float C = uSrcTF_Stage0[3];
+ float D = uSrcTF_Stage0[4];
+ float E = uSrcTF_Stage0[5];
+ float F = uSrcTF_Stage0[6];
+ float s = sign(x);
+ x = abs(x);
+ x = x < D ? C * x + F : pow(A * x + B, G) + E;
+ return s * x;
+}
+float dst_tf_Stage0(float x) {
+ float G = uDstTF_Stage0[0];
+ float A = uDstTF_Stage0[1];
+ float B = uDstTF_Stage0[2];
+ float C = uDstTF_Stage0[3];
+ float D = uDstTF_Stage0[4];
+ float E = uDstTF_Stage0[5];
+ float F = uDstTF_Stage0[6];
+ float s = sign(x);
+ x = abs(x);
+ x = x < D ? C * x + F : pow(A * x + B, G) + E;
+ return s * x;
+}
+vec4 gamut_xform_Stage0(vec4 color) {
+ color.xyz = uColorXform_Stage0 * color.xyz;
+ return color;
+}
+vec4 color_xform_Stage0(vec4 color) {
+ float nonZeroAlpha = max(color.w, 9.9999997473787516e-05);
+ color = vec4(color.xyz / nonZeroAlpha, nonZeroAlpha);
+ color.x = src_tf_Stage0(color.x);
+ color.y = src_tf_Stage0(color.y);
+ color.z = src_tf_Stage0(color.z);
+ color = gamut_xform_Stage0(color);
+ color.x = dst_tf_Stage0(color.x);
+ color.y = dst_tf_Stage0(color.y);
+ color.z = dst_tf_Stage0(color.z);
+ color.xyz *= color.w;
+ return color;
+}
+vec4 light_Stage2(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ float colorScale = uKD_Stage2 * dot(normal, surfaceToLight);
+ return vec4(lightColor * clamp(colorScale, 0.0, 1.0), 1.0);
+}
+float sobel_Stage2(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage2(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage2(float m[9], float surfaceScale) {
+ return pointToNormal_Stage2(sobel_Stage2(m[0], m[2], m[3], m[5], m[6], m[8], 0.25), sobel_Stage2(m[0], m[6], m[1], m[7], m[2], m[8], 0.25), surfaceScale);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ vec2 textureCoords;
+ textureCoords = vtextureCoords_Stage0;
+ vec4 textureDomain;
+ textureDomain = vtextureDomain_Stage0;
+ outputColor_Stage0 = vcolor_Stage0;
+ outputColor_Stage0 = color_xform_Stage0(texture(uTextureSampler_0_Stage0, clamp(textureCoords, textureDomain.xy, textureDomain.zw))) * outputColor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec2 dxy0 = uinnerRect_Stage1.xy - gl_FragCoord.xy;
+ vec2 dxy1 = gl_FragCoord.xy - uinnerRect_Stage1.zw;
+ vec2 dxy = max(max(dxy0, dxy1), 0.0);
+ vec2 Z = max(max(dxy0 * uinvRadiiLTRB_Stage1.xy, dxy1 * uinvRadiiLTRB_Stage1.zw), 0.0);
+ float implicit = dot(Z, dxy) - 1.0;
+ float grad_dot = 4.0 * dot(Z, Z);
+ grad_dot = max(grad_dot, 9.9999997473787516e-05);
+ float approx_dist = implicit * inversesqrt(grad_dot);
+ float alpha = clamp(0.5 - approx_dist, 0.0, 1.0);
+ output_Stage1 = outputColor_Stage0 * alpha;
+ }
+ vec4 output_Stage2;
+ {
+ vec2 coord = vTransformedCoords_0_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp0 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp5 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp6 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp7 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp8 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = normalize(uLightLocation_Stage2 - vec3(gl_FragCoord.xy, uSurfaceScale_Stage2 * m[4]));
+ output_Stage2 = light_Stage2(normal_Stage2(m, uSurfaceScale_Stage2), surfaceToLight, uLightColor_Stage2);
+ output_Stage2 *= output_Stage1;
+ }
+ vec4 output_Stage3;
+ {
+ vec2 vec = vec2((gl_FragCoord.x - ucircleData_Stage3.x) * ucircleData_Stage3.w, (gl_FragCoord.y - ucircleData_Stage3.y) * ucircleData_Stage3.w);
+ float dist = length(vec) + (0.5 - ucircleData_Stage3.z) * ucircleData_Stage3.w;
+ output_Stage3 = output_Stage2 * texture(uTextureSampler_0_Stage3, vec2(dist, 0.5)).w;
+ }
+ {
+ sk_FragColor = output_Stage3;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 textureCoords;
+in vec4 textureDomain;
+in vec4 color;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vtextureCoords_Stage0;
+flat out vec4 vtextureDomain_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vec2 pos2 = position;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(textureCoords, 1.0)).xy;
+ vtextureCoords_Stage0 = textureCoords;
+ vtextureDomain_Stage0 = textureDomain;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/2008.shader_test b/shaders/skia/2008.shader_test
new file mode 100644
index 0000000..e2af36e
--- /dev/null
+++ b/shaders/skia/2008.shader_test
@@ -0,0 +1,69 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 Big_Ole_Key_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = _input;
+ return _output;
+}
+vec4 Dither_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = _input;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_0_Stage0.x);
+ uint y = uint(vTransformedCoords_0_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ _output = vec4(clamp(_output.xyz + value * 0.01587301678955555, 0.0, _output.w), _output.w);
+ return _output;
+}
+vec4 blend_src_atop(vec4 src, vec4 dst) {
+ return dst.w * src + (1.0 - src.w) * dst;
+}
+vec4 ComposeTwo_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_src_atop(Big_Ole_Key_Stage1_c0_c0_c0_c0(inputColor), Dither_Stage1_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 Big_Ole_Key_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = _input;
+ return _output;
+}
+vec4 blend_exclusion(vec4 src, vec4 dst) {
+ return vec4((dst.xyz + src.xyz) - (2.0 * dst.xyz) * src.xyz, src.w + (1.0 - src.w) * dst.w);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(vec4(1.0).xyz, 1.0);
+ output_Stage1 = blend_exclusion(ComposeTwo_Stage1_c0_c0(inputColor), Big_Ole_Key_Stage1_c1_c0(inputColor));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/2017.shader_test b/shaders/skia/2017.shader_test
new file mode 100644
index 0000000..1a73ea7
--- /dev/null
+++ b/shaders/skia/2017.shader_test
@@ -0,0 +1,43 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+noperspective in vec4 vinCircleEdge_Stage0;
+noperspective in vec3 vinClipPlane_Stage0;
+noperspective in vec4 vinColor_Stage0;
+void main() {
+ {
+ vec4 circleEdge;
+ circleEdge = vinCircleEdge_Stage0;
+ vec3 clipPlane;
+ clipPlane = vinClipPlane_Stage0;
+ float d = length(circleEdge.xy);
+ float distanceToOuterEdge = circleEdge.z * (1.0 - d);
+ float edgeAlpha = clamp(distanceToOuterEdge, 0.0, 1.0);
+ float clip = clamp(circleEdge.z * dot(circleEdge.xy, clipPlane.xy) + clipPlane.z, 0.0, 1.0);
+ edgeAlpha *= clip;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 inPosition;
+in vec4 inColor;
+in vec4 inCircleEdge;
+in vec3 inClipPlane;
+noperspective out vec4 vinCircleEdge_Stage0;
+noperspective out vec3 vinClipPlane_Stage0;
+noperspective out vec4 vinColor_Stage0;
+void main() {
+ vinCircleEdge_Stage0 = inCircleEdge;
+ vinClipPlane_Stage0 = inClipPlane;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = inPosition;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/202-2.shader_test b/shaders/skia/202-2.shader_test
new file mode 100644
index 0000000..7ffbe03
--- /dev/null
+++ b/shaders/skia/202-2.shader_test
@@ -0,0 +1,92 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage2_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c1_c0;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+vec4 blend_xor(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src + (1.0 - src.w) * dst;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_dst_in(outputColor_Stage0, ClampedGradientEffect_Stage1_c0_c0(vec4(1.0)));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_xor(ConstColorProcessor_Stage2_c1_c0(vec4(1.0)), output_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/202-3.shader_test b/shaders/skia/202-3.shader_test
new file mode 100644
index 0000000..c64b8e2
--- /dev/null
+++ b/shaders/skia/202-3.shader_test
@@ -0,0 +1,191 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform float uSurfaceScale_Stage1;
+uniform vec3 uLightColor_Stage1;
+uniform float uKD_Stage1;
+uniform vec4 uTexDom_Stage1;
+uniform vec3 uDecalParams_Stage1;
+uniform vec3 uLightDirection_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 light_Stage1(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ float colorScale = uKD_Stage1 * dot(normal, surfaceToLight);
+ return vec4(lightColor * clamp(colorScale, 0.0, 1.0), 1.0);
+}
+float sobel_Stage1(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage1(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage1(float m[9], float surfaceScale) {
+ return pointToNormal_Stage1(sobel_Stage1(0.0, 0.0, m[3], m[5], m[6], m[8], 0.33333298563957214), sobel_Stage1(0.0, 0.0, m[4], m[7], m[5], m[8], 0.5), surfaceScale);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ vec2 coord = vTransformedCoords_0_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp0 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp5 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp6 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp7 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp8 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = uLightDirection_Stage1;
+ output_Stage1 = light_Stage1(normal_Stage1(m, uSurfaceScale_Stage1), surfaceToLight, uLightColor_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/202-6.shader_test b/shaders/skia/202-6.shader_test
new file mode 100644
index 0000000..cc5a247
--- /dev/null
+++ b/shaders/skia/202-6.shader_test
@@ -0,0 +1,74 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage2;
+uniform vec4 uKernel_Stage2[3];
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_1_Stage0 - 4.0 * uImageIncrement_Stage2;
+ vec2 coordSampled = vec2(0.0, 0.0);
+ coordSampled = coord;
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[0].x;
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[0].y;
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[0].z;
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[0].w;
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[1].x;
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[1].y;
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[1].z;
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[1].w;
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[2].x;
+ coord += uImageIncrement_Stage2;
+ output_Stage2 *= output_Stage1;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/202-7.shader_test b/shaders/skia/202-7.shader_test
new file mode 100644
index 0000000..196fd28
--- /dev/null
+++ b/shaders/skia/202-7.shader_test
@@ -0,0 +1,61 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform mat4 um_Stage2_c0_c0;
+uniform vec4 uv_Stage2_c0_c0;
+uniform vec4 ucolor_Stage2_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 ColorMatrixFragmentProcessor_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = _input;
+ _output = um_Stage2_c0_c0 * inputColor + uv_Stage2_c0_c0;
+ {
+ _output.w = clamp(_output.w, 0.0, 1.0);
+ }
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = _input * ucolor_Stage2_c1_c0;
+ }
+ return _output;
+}
+vec4 blend_difference(vec4 src, vec4 dst) {
+ return vec4((src.xyz + dst.xyz) - 2.0 * min(src.xyz * dst.w, dst.xyz * src.w), src.w + (1.0 - src.w) * dst.w);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ vec4 inputColor = vec4(output_Stage1.xyz, 1.0);
+ output_Stage2 = blend_difference(ColorMatrixFragmentProcessor_Stage2_c0_c0(inputColor), ConstColorProcessor_Stage2_c1_c0(inputColor));
+ output_Stage2 *= output_Stage1.w;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/202.shader_test b/shaders/skia/202.shader_test
new file mode 100644
index 0000000..94f3136
--- /dev/null
+++ b/shaders/skia/202.shader_test
@@ -0,0 +1,152 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage2_c1_c0;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.w) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ } else {
+ {
+ if (t < uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = OverrideInputFragmentProcessor_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c1_c0;
+ }
+ return _output;
+}
+vec4 blend_dst_out(vec4 src, vec4 dst) {
+ return (1.0 - src.w) * dst;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 blend_darken(vec4 src, vec4 dst) {
+ vec4 result = blend_src_over(src, dst);
+ result.xyz = min(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
+ return result;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_dst_out(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_darken(ConstColorProcessor_Stage2_c1_c0(vec4(1.0)), output_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 inColor;
+in vec2 inLocalCoord;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/2020.shader_test b/shaders/skia/2020.shader_test
new file mode 100644
index 0000000..d0788dd
--- /dev/null
+++ b/shaders/skia/2020.shader_test
@@ -0,0 +1,413 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 ubaseFrequency_Stage1_c0_c0;
+uniform float uz_Stage1_c0_c0;
+uniform vec2 uImageIncrement_Stage1_c1_c0;
+uniform vec4 uKernel_Stage1_c1_c0[6];
+uniform vec2 uKernelOffset_Stage1_c1_c0;
+uniform float uGain_Stage1_c1_c0;
+uniform float uBias_Stage1_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+uniform sampler2D uTextureSampler_2_Stage1;
+noperspective in vec2 vTextureCoords_Stage0;
+flat in int vTexIndex_Stage0;
+noperspective in vec4 vinColor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec3 fade_Stage1_c0_c0(vec3 t) {
+ return ((t * t) * t) * (t * (t * 6.0 - 15.0) + 10.0);
+}
+float perm_Stage1_c0_c0(float x) {
+ return texture(uTextureSampler_0_Stage1, vec2(fract(x / 256.0), 0.0)).x * 255.0;
+}
+float grad_Stage1_c0_c0(float x, vec3 p) {
+ return dot(texture(uTextureSampler_1_Stage1, vec2(fract(x / 16.0), 0.0)).xyz * 255.0 - vec3(1.0), p);
+}
+float lerp_Stage1_c0_c0(float a, float b, float w) {
+ return a + w * (b - a);
+}
+float noise_Stage1_c0_c0(vec3 p) {
+ vec3 P = mod(floor(p), 256.0);
+ p -= floor(p);
+ vec3 f = fade_Stage1_c0_c0(p);
+ float A = perm_Stage1_c0_c0(P.x) + P.y;
+ float AA = perm_Stage1_c0_c0(A) + P.z;
+ float AB = perm_Stage1_c0_c0(A + 1.0) + P.z;
+ float B = perm_Stage1_c0_c0(P.x + 1.0) + P.y;
+ float BA = perm_Stage1_c0_c0(B) + P.z;
+ float BB = perm_Stage1_c0_c0(B + 1.0) + P.z;
+ float result = lerp_Stage1_c0_c0(lerp_Stage1_c0_c0(lerp_Stage1_c0_c0(grad_Stage1_c0_c0(perm_Stage1_c0_c0(AA), p), grad_Stage1_c0_c0(perm_Stage1_c0_c0(BA), p + vec3(-1.0, 0.0, 0.0)), f.x), lerp_Stage1_c0_c0(grad_Stage1_c0_c0(perm_Stage1_c0_c0(AB), p + vec3(0.0, -1.0, 0.0)), grad_Stage1_c0_c0(perm_Stage1_c0_c0(BB), p + vec3(-1.0, -1.0, 0.0)), f.x), f.y), lerp_Stage1_c0_c0(lerp_Stage1_c0_c0(grad_Stage1_c0_c0(perm_Stage1_c0_c0(AA + 1.0), p + vec3(0.0, 0.0, -1.0)), grad_Stage1_c0_c0(perm_Stage1_c0_c0(BA + 1.0), p + vec3(-1.0, 0.0, -1.0)), f.x), lerp_Stage1_c0_c0(grad_Stage1_c0_c0(perm_Stage1_c0_c0(AB + 1.0), p + vec3(0.0, -1.0, -1.0)), grad_Stage1_c0_c0(perm_Stage1_c0_c0(BB + 1.0), p + vec3(-1.0, -1.0, -1.0)), f.x), f.y), f.z);
+ return result;
+}
+float noiseOctaves_Stage1_c0_c0(vec3 p) {
+ float result = 0.0;
+ float ratio = 1.0;
+ for (float i = 0.0;i < 9.0; i++) {
+ result += noise_Stage1_c0_c0(p) / ratio;
+ p *= 2.0;
+ ratio *= 2.0;
+ }
+ return (result + 1.0) / 2.0;
+}
+vec4 ImprovedPerlinNoise_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coords = vTransformedCoords_0_Stage0 * ubaseFrequency_Stage1_c0_c0;
+ float r = noiseOctaves_Stage1_c0_c0(vec3(coords, uz_Stage1_c0_c0));
+ float g = noiseOctaves_Stage1_c0_c0(vec3(coords, uz_Stage1_c0_c0));
+ float b = noiseOctaves_Stage1_c0_c0(vec3(coords, uz_Stage1_c0_c0));
+ float a = noiseOctaves_Stage1_c0_c0(vec3(coords, uz_Stage1_c0_c0));
+ _output = vec4(r, g, b, a);
+ _output = clamp(_output, 0.0, 1.0);
+ _output = vec4(_output.xyz * _output.www, _output.w);
+ return _output;
+}
+vec4 MatrixConvolution_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 sum = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_1_Stage0 - uKernelOffset_Stage1_c1_c0 * uImageIncrement_Stage1_c1_c0;
+ vec4 c;
+ {
+ float k = uKernel_Stage1_c1_c0[0].x;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0[0].y;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0[0].z;
+ {
+ vec2 origCoord = coord + vec2(2.0, 0.0) * uImageIncrement_Stage1_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0[0].w;
+ {
+ vec2 origCoord = coord + vec2(3.0, 0.0) * uImageIncrement_Stage1_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0[1].x;
+ {
+ vec2 origCoord = coord + vec2(4.0, 0.0) * uImageIncrement_Stage1_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0[1].y;
+ {
+ vec2 origCoord = coord + vec2(5.0, 0.0) * uImageIncrement_Stage1_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0[1].z;
+ {
+ vec2 origCoord = coord + vec2(6.0, 0.0) * uImageIncrement_Stage1_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0[1].w;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0[2].x;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0[2].y;
+ {
+ vec2 origCoord = coord + vec2(2.0, 1.0) * uImageIncrement_Stage1_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0[2].z;
+ {
+ vec2 origCoord = coord + vec2(3.0, 1.0) * uImageIncrement_Stage1_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0[2].w;
+ {
+ vec2 origCoord = coord + vec2(4.0, 1.0) * uImageIncrement_Stage1_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0[3].x;
+ {
+ vec2 origCoord = coord + vec2(5.0, 1.0) * uImageIncrement_Stage1_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0[3].y;
+ {
+ vec2 origCoord = coord + vec2(6.0, 1.0) * uImageIncrement_Stage1_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0[3].z;
+ {
+ vec2 origCoord = coord + vec2(0.0, 2.0) * uImageIncrement_Stage1_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0[3].w;
+ {
+ vec2 origCoord = coord + vec2(1.0, 2.0) * uImageIncrement_Stage1_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0[4].x;
+ {
+ vec2 origCoord = coord + vec2(2.0, 2.0) * uImageIncrement_Stage1_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0[4].y;
+ {
+ vec2 origCoord = coord + vec2(3.0, 2.0) * uImageIncrement_Stage1_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0[4].z;
+ {
+ vec2 origCoord = coord + vec2(4.0, 2.0) * uImageIncrement_Stage1_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0[4].w;
+ {
+ vec2 origCoord = coord + vec2(5.0, 2.0) * uImageIncrement_Stage1_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0[5].x;
+ {
+ vec2 origCoord = coord + vec2(6.0, 2.0) * uImageIncrement_Stage1_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ vec2 origCoord = vTransformedCoords_1_Stage0;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ _output.w = c.w;
+ _output.xyz = clamp(sum.xyz * uGain_Stage1_c1_c0 + uBias_Stage1_c1_c0, 0.0, 1.0);
+ _output.xyz *= _output.w;
+ _output *= _input;
+ return _output;
+}
+vec4 blend_exclusion(vec4 src, vec4 dst) {
+ return vec4((dst.xyz + src.xyz) - (2.0 * dst.xyz) * src.xyz, src.w + (1.0 - src.w) * dst.w);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vinColor_Stage0;
+ vec4 texColor;
+ {
+ texColor = texture(uTextureSampler_0_Stage0, vTextureCoords_Stage0);
+ }
+ outputCoverage_Stage0 = texColor;
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_exclusion(ImprovedPerlinNoise_Stage1_c0_c0(inputColor), MatrixConvolution_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ sk_FragColor = output_Stage1 * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform vec2 uAtlasSizeInv_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in uvec2 inTextureCoords;
+noperspective out vec2 vTextureCoords_Stage0;
+flat out int vTexIndex_Stage0;
+noperspective out vec4 vinColor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ ivec2 signedCoords = ivec2(int(inTextureCoords.x), int(inTextureCoords.y));
+ vec2 unormTexCoords = vec2(float(signedCoords.x / 2), float(signedCoords.y / 2));
+ vTextureCoords_Stage0 = unormTexCoords * uAtlasSizeInv_Stage0;
+ vTexIndex_Stage0 = 0;
+ vinColor_Stage0 = inColor;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(inPosition.x, inPosition.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/2023.shader_test b/shaders/skia/2023.shader_test
new file mode 100644
index 0000000..682440c
--- /dev/null
+++ b/shaders/skia/2023.shader_test
@@ -0,0 +1,225 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_KHR_blend_equation_advanced : require
+out vec4 sk_FragColor;
+layout (blend_support_all_equations) out ;
+uniform vec4 uColor_Stage0;
+uniform vec3 uedges_Stage1_c0_c0_c0_c0_c0_c0[7];
+uniform vec4 ucolor_Stage1_c0_c0_c1_c0;
+uniform vec2 ubaseFrequency_Stage1_c1_c0;
+uniform float uz_Stage1_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 ConvexPoly_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float alpha = 1.0;
+ float edge;
+ edge = dot(uedges_Stage1_c0_c0_c0_c0_c0_c0[0], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage1_c0_c0_c0_c0_c0_c0[1], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage1_c0_c0_c0_c0_c0_c0[2], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage1_c0_c0_c0_c0_c0_c0[3], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage1_c0_c0_c0_c0_c0_c0[4], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage1_c0_c0_c0_c0_c0_c0[5], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage1_c0_c0_c0_c0_c0_c0[6], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ _output = _input * alpha;
+ return _output;
+}
+vec4 ClampFragmentProcessor_Stage1_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = clamp(_input, 0.0, 1.0);
+ }
+ return _output;
+}
+float _blend_overlay_component(float sc, float sa, float dc, float da) {
+ if (2.0 * dc <= da) {
+ return (2.0 * sc) * dc;
+ }
+ return sa * da - (2.0 * (da - dc)) * (sa - sc);
+}
+vec4 blend_overlay(vec4 src, vec4 dst) {
+ vec4 result = vec4(_blend_overlay_component(src.x, src.w, dst.x, dst.w), _blend_overlay_component(src.y, src.w, dst.y, dst.w), _blend_overlay_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+ result.xyz += dst.xyz * (1.0 - src.w) + src.xyz * (1.0 - dst.w);
+ return result;
+}
+vec4 blend_hard_light(vec4 src, vec4 dst) {
+ return blend_overlay(dst, src);
+}
+vec4 ComposeTwo_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_hard_light(ConvexPoly_Stage1_c0_c0_c0_c0_c0_c0(inputColor), ClampFragmentProcessor_Stage1_c0_c0_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 ConstColorProcessor_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = _input.w * ucolor_Stage1_c0_c0_c1_c0;
+ }
+ return _output;
+}
+float _blend_color_saturation(vec3 color) {
+ return max(max(color.x, color.y), color.z) - min(min(color.x, color.y), color.z);
+}
+vec3 _blend_set_color_saturation_helper(vec3 minMidMax, float sat) {
+ if (minMidMax.x < minMidMax.z) {
+ return vec3(0.0, (sat * (minMidMax.y - minMidMax.x)) / (minMidMax.z - minMidMax.x), sat);
+ }
+ return vec3(0.0);
+}
+vec3 _blend_set_color_saturation(vec3 hueLumColor, vec3 satColor) {
+ float sat = _blend_color_saturation(satColor);
+ if (hueLumColor.x <= hueLumColor.y) {
+ if (hueLumColor.y <= hueLumColor.z) {
+ hueLumColor.xyz = _blend_set_color_saturation_helper(hueLumColor, sat);
+ } else if (hueLumColor.x <= hueLumColor.z) {
+ hueLumColor.xzy = _blend_set_color_saturation_helper(hueLumColor.xzy, sat);
+ } else {
+ hueLumColor.zxy = _blend_set_color_saturation_helper(hueLumColor.zxy, sat);
+ }
+ } else if (hueLumColor.x <= hueLumColor.z) {
+ hueLumColor.yxz = _blend_set_color_saturation_helper(hueLumColor.yxz, sat);
+ } else if (hueLumColor.y <= hueLumColor.z) {
+ hueLumColor.yzx = _blend_set_color_saturation_helper(hueLumColor.yzx, sat);
+ } else {
+ hueLumColor.zyx = _blend_set_color_saturation_helper(hueLumColor.zyx, sat);
+ }
+ return hueLumColor;
+}
+float _blend_color_luminance(vec3 color) {
+ return dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), color);
+}
+vec3 _blend_set_color_luminance(vec3 hueSatColor, float alpha, vec3 lumColor) {
+ float lum = _blend_color_luminance(lumColor);
+ vec3 result = (lum - _blend_color_luminance(hueSatColor)) + hueSatColor;
+ float minComp = min(min(result.x, result.y), result.z);
+ float maxComp = max(max(result.x, result.y), result.z);
+ if (minComp < 0.0 && lum != minComp) {
+ result = lum + ((result - lum) * lum) / (lum - minComp);
+ }
+ if (maxComp > alpha && maxComp != lum) {
+ return lum + ((result - lum) * (alpha - lum)) / (maxComp - lum);
+ }
+ return result;
+}
+vec4 blend_saturation(vec4 src, vec4 dst) {
+ float alpha = dst.w * src.w;
+ vec3 sda = src.xyz * dst.w;
+ vec3 dsa = dst.xyz * src.w;
+ return vec4((((_blend_set_color_luminance(_blend_set_color_saturation(dsa, sda), alpha, dsa) + dst.xyz) - dsa) + src.xyz) - sda, (src.w + dst.w) - alpha);
+}
+vec4 ComposeTwo_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_saturation(ComposeTwo_Stage1_c0_c0_c0_c0(inputColor), ConstColorProcessor_Stage1_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec3 fade_Stage1_c1_c0(vec3 t) {
+ return ((t * t) * t) * (t * (t * 6.0 - 15.0) + 10.0);
+}
+float perm_Stage1_c1_c0(float x) {
+ return texture(uTextureSampler_0_Stage1, vec2(fract(x / 256.0), 0.0)).x * 255.0;
+}
+float grad_Stage1_c1_c0(float x, vec3 p) {
+ return dot(texture(uTextureSampler_1_Stage1, vec2(fract(x / 16.0), 0.0)).xyz * 255.0 - vec3(1.0), p);
+}
+float lerp_Stage1_c1_c0(float a, float b, float w) {
+ return a + w * (b - a);
+}
+float noise_Stage1_c1_c0(vec3 p) {
+ vec3 P = mod(floor(p), 256.0);
+ p -= floor(p);
+ vec3 f = fade_Stage1_c1_c0(p);
+ float A = perm_Stage1_c1_c0(P.x) + P.y;
+ float AA = perm_Stage1_c1_c0(A) + P.z;
+ float AB = perm_Stage1_c1_c0(A + 1.0) + P.z;
+ float B = perm_Stage1_c1_c0(P.x + 1.0) + P.y;
+ float BA = perm_Stage1_c1_c0(B) + P.z;
+ float BB = perm_Stage1_c1_c0(B + 1.0) + P.z;
+ float result = lerp_Stage1_c1_c0(lerp_Stage1_c1_c0(lerp_Stage1_c1_c0(grad_Stage1_c1_c0(perm_Stage1_c1_c0(AA), p), grad_Stage1_c1_c0(perm_Stage1_c1_c0(BA), p + vec3(-1.0, 0.0, 0.0)), f.x), lerp_Stage1_c1_c0(grad_Stage1_c1_c0(perm_Stage1_c1_c0(AB), p + vec3(0.0, -1.0, 0.0)), grad_Stage1_c1_c0(perm_Stage1_c1_c0(BB), p + vec3(-1.0, -1.0, 0.0)), f.x), f.y), lerp_Stage1_c1_c0(lerp_Stage1_c1_c0(grad_Stage1_c1_c0(perm_Stage1_c1_c0(AA + 1.0), p + vec3(0.0, 0.0, -1.0)), grad_Stage1_c1_c0(perm_Stage1_c1_c0(BA + 1.0), p + vec3(-1.0, 0.0, -1.0)), f.x), lerp_Stage1_c1_c0(grad_Stage1_c1_c0(perm_Stage1_c1_c0(AB + 1.0), p + vec3(0.0, -1.0, -1.0)), grad_Stage1_c1_c0(perm_Stage1_c1_c0(BB + 1.0), p + vec3(-1.0, -1.0, -1.0)), f.x), f.y), f.z);
+ return result;
+}
+float noiseOctaves_Stage1_c1_c0(vec3 p) {
+ float result = 0.0;
+ float ratio = 1.0;
+ for (float i = 0.0;i < 6.0; i++) {
+ result += noise_Stage1_c1_c0(p) / ratio;
+ p *= 2.0;
+ ratio *= 2.0;
+ }
+ return (result + 1.0) / 2.0;
+}
+vec4 ImprovedPerlinNoise_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coords = vTransformedCoords_0_Stage0 * ubaseFrequency_Stage1_c1_c0;
+ float r = noiseOctaves_Stage1_c1_c0(vec3(coords, uz_Stage1_c1_c0));
+ float g = noiseOctaves_Stage1_c1_c0(vec3(coords, uz_Stage1_c1_c0));
+ float b = noiseOctaves_Stage1_c1_c0(vec3(coords, uz_Stage1_c1_c0));
+ float a = noiseOctaves_Stage1_c1_c0(vec3(coords, uz_Stage1_c1_c0));
+ _output = vec4(r, g, b, a);
+ _output = clamp(_output, 0.0, 1.0);
+ _output = vec4(_output.xyz * _output.www, _output.w);
+ return _output;
+}
+vec4 blend_color(vec4 src, vec4 dst) {
+ float alpha = dst.w * src.w;
+ vec3 sda = src.xyz * dst.w;
+ vec3 dsa = dst.xyz * src.w;
+ return vec4((((_blend_set_color_luminance(sda, alpha, dsa) + dst.xyz) - dsa) + src.xyz) - sda, (src.w + dst.w) - alpha);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = uColor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_color(ComposeTwo_Stage1_c0_c0(inputColor), ImprovedPerlinNoise_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec2 pos2 = (uViewM_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ {
+ vec2 _posTmp = pos2;
+ _posTmp = floor(_posTmp) + vec2(0.5, 0.5);
+ gl_Position = vec4(_posTmp, 0.0, 1.0);
+ }
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/2026.shader_test b/shaders/skia/2026.shader_test
new file mode 100644
index 0000000..9621f99
--- /dev/null
+++ b/shaders/skia/2026.shader_test
@@ -0,0 +1,117 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_KHR_blend_equation_advanced : require
+out vec4 sk_FragColor;
+layout (blend_support_all_equations) out ;
+uniform vec4 uColor_Stage0;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_0_Stage0;
+ float t = -1.0;
+ {
+ {
+ float r0 = ufocalParams_Stage1_c0_c0_c0_c0.x;
+ {
+ t = length(p) - r0;
+ }
+ }
+ }
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = uColor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_dst_in(outputColor_Stage0, TiledGradientEffect_Stage1_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec2 inLocalCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec2 pos2 = (uViewM_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/2029.shader_test b/shaders/skia/2029.shader_test
new file mode 100644
index 0000000..1fe6c56
--- /dev/null
+++ b/shaders/skia/2029.shader_test
@@ -0,0 +1,249 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_KHR_blend_equation_advanced : require
+out vec4 sk_FragColor;
+layout (blend_support_all_equations) out ;
+uniform float uPixelSize_Stage1_c1_c0_c0_c0_c0_c0;
+uniform vec2 uRange_Stage1_c1_c0_c0_c0_c0_c0;
+uniform vec2 uImageIncrement_Stage1_c1_c0_c1_c0;
+uniform vec2 uBounds_Stage1_c1_c0_c1_c0;
+uniform vec4 uKernel_Stage1_c1_c0_c1_c0[7];
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+uniform sampler2D uTextureSampler_2_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+noperspective in vec2 vTransformedCoords_3_Stage0;
+vec4 TextureEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+vec4 Morphology_Stage1_c1_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_1_Stage0;
+ coord.x -= 2.0 * uPixelSize_Stage1_c1_c0_c0_c0_c0_c0;
+ for (int i = 0;i < 5; i++) {
+ _output = max(_output, texture(uTextureSampler_1_Stage1, coord));
+ coord.x += uPixelSize_Stage1_c1_c0_c0_c0_c0_c0;
+ }
+ _output *= _input;
+ return _output;
+}
+vec4 Dither_Stage1_c1_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = _input;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_2_Stage0.x);
+ uint y = uint(vTransformedCoords_2_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ _output = vec4(clamp(_output.xyz + value * 0.01587301678955555, 0.0, _output.w), _output.w);
+ return _output;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 ComposeTwo_Stage1_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_src_over(Morphology_Stage1_c1_c0_c0_c0_c0_c0(inputColor), Dither_Stage1_c1_c0_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 GaussianConvolution_Stage1_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_3_Stage0 - 12.0 * uImageIncrement_Stage1_c1_c0_c1_c0;
+ vec2 coordSampled = vec2(0.0, 0.0);
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1_c1_c0_c1_c0.x && coord.x <= uBounds_Stage1_c1_c0_c1_c0.y) {
+ _output += texture(uTextureSampler_2_Stage1, coordSampled) * uKernel_Stage1_c1_c0_c1_c0[0].x;
+ }
+ coord += uImageIncrement_Stage1_c1_c0_c1_c0;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1_c1_c0_c1_c0.x && coord.x <= uBounds_Stage1_c1_c0_c1_c0.y) {
+ _output += texture(uTextureSampler_2_Stage1, coordSampled) * uKernel_Stage1_c1_c0_c1_c0[0].y;
+ }
+ coord += uImageIncrement_Stage1_c1_c0_c1_c0;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1_c1_c0_c1_c0.x && coord.x <= uBounds_Stage1_c1_c0_c1_c0.y) {
+ _output += texture(uTextureSampler_2_Stage1, coordSampled) * uKernel_Stage1_c1_c0_c1_c0[0].z;
+ }
+ coord += uImageIncrement_Stage1_c1_c0_c1_c0;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1_c1_c0_c1_c0.x && coord.x <= uBounds_Stage1_c1_c0_c1_c0.y) {
+ _output += texture(uTextureSampler_2_Stage1, coordSampled) * uKernel_Stage1_c1_c0_c1_c0[0].w;
+ }
+ coord += uImageIncrement_Stage1_c1_c0_c1_c0;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1_c1_c0_c1_c0.x && coord.x <= uBounds_Stage1_c1_c0_c1_c0.y) {
+ _output += texture(uTextureSampler_2_Stage1, coordSampled) * uKernel_Stage1_c1_c0_c1_c0[1].x;
+ }
+ coord += uImageIncrement_Stage1_c1_c0_c1_c0;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1_c1_c0_c1_c0.x && coord.x <= uBounds_Stage1_c1_c0_c1_c0.y) {
+ _output += texture(uTextureSampler_2_Stage1, coordSampled) * uKernel_Stage1_c1_c0_c1_c0[1].y;
+ }
+ coord += uImageIncrement_Stage1_c1_c0_c1_c0;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1_c1_c0_c1_c0.x && coord.x <= uBounds_Stage1_c1_c0_c1_c0.y) {
+ _output += texture(uTextureSampler_2_Stage1, coordSampled) * uKernel_Stage1_c1_c0_c1_c0[1].z;
+ }
+ coord += uImageIncrement_Stage1_c1_c0_c1_c0;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1_c1_c0_c1_c0.x && coord.x <= uBounds_Stage1_c1_c0_c1_c0.y) {
+ _output += texture(uTextureSampler_2_Stage1, coordSampled) * uKernel_Stage1_c1_c0_c1_c0[1].w;
+ }
+ coord += uImageIncrement_Stage1_c1_c0_c1_c0;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1_c1_c0_c1_c0.x && coord.x <= uBounds_Stage1_c1_c0_c1_c0.y) {
+ _output += texture(uTextureSampler_2_Stage1, coordSampled) * uKernel_Stage1_c1_c0_c1_c0[2].x;
+ }
+ coord += uImageIncrement_Stage1_c1_c0_c1_c0;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1_c1_c0_c1_c0.x && coord.x <= uBounds_Stage1_c1_c0_c1_c0.y) {
+ _output += texture(uTextureSampler_2_Stage1, coordSampled) * uKernel_Stage1_c1_c0_c1_c0[2].y;
+ }
+ coord += uImageIncrement_Stage1_c1_c0_c1_c0;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1_c1_c0_c1_c0.x && coord.x <= uBounds_Stage1_c1_c0_c1_c0.y) {
+ _output += texture(uTextureSampler_2_Stage1, coordSampled) * uKernel_Stage1_c1_c0_c1_c0[2].z;
+ }
+ coord += uImageIncrement_Stage1_c1_c0_c1_c0;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1_c1_c0_c1_c0.x && coord.x <= uBounds_Stage1_c1_c0_c1_c0.y) {
+ _output += texture(uTextureSampler_2_Stage1, coordSampled) * uKernel_Stage1_c1_c0_c1_c0[2].w;
+ }
+ coord += uImageIncrement_Stage1_c1_c0_c1_c0;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1_c1_c0_c1_c0.x && coord.x <= uBounds_Stage1_c1_c0_c1_c0.y) {
+ _output += texture(uTextureSampler_2_Stage1, coordSampled) * uKernel_Stage1_c1_c0_c1_c0[3].x;
+ }
+ coord += uImageIncrement_Stage1_c1_c0_c1_c0;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1_c1_c0_c1_c0.x && coord.x <= uBounds_Stage1_c1_c0_c1_c0.y) {
+ _output += texture(uTextureSampler_2_Stage1, coordSampled) * uKernel_Stage1_c1_c0_c1_c0[3].y;
+ }
+ coord += uImageIncrement_Stage1_c1_c0_c1_c0;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1_c1_c0_c1_c0.x && coord.x <= uBounds_Stage1_c1_c0_c1_c0.y) {
+ _output += texture(uTextureSampler_2_Stage1, coordSampled) * uKernel_Stage1_c1_c0_c1_c0[3].z;
+ }
+ coord += uImageIncrement_Stage1_c1_c0_c1_c0;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1_c1_c0_c1_c0.x && coord.x <= uBounds_Stage1_c1_c0_c1_c0.y) {
+ _output += texture(uTextureSampler_2_Stage1, coordSampled) * uKernel_Stage1_c1_c0_c1_c0[3].w;
+ }
+ coord += uImageIncrement_Stage1_c1_c0_c1_c0;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1_c1_c0_c1_c0.x && coord.x <= uBounds_Stage1_c1_c0_c1_c0.y) {
+ _output += texture(uTextureSampler_2_Stage1, coordSampled) * uKernel_Stage1_c1_c0_c1_c0[4].x;
+ }
+ coord += uImageIncrement_Stage1_c1_c0_c1_c0;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1_c1_c0_c1_c0.x && coord.x <= uBounds_Stage1_c1_c0_c1_c0.y) {
+ _output += texture(uTextureSampler_2_Stage1, coordSampled) * uKernel_Stage1_c1_c0_c1_c0[4].y;
+ }
+ coord += uImageIncrement_Stage1_c1_c0_c1_c0;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1_c1_c0_c1_c0.x && coord.x <= uBounds_Stage1_c1_c0_c1_c0.y) {
+ _output += texture(uTextureSampler_2_Stage1, coordSampled) * uKernel_Stage1_c1_c0_c1_c0[4].z;
+ }
+ coord += uImageIncrement_Stage1_c1_c0_c1_c0;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1_c1_c0_c1_c0.x && coord.x <= uBounds_Stage1_c1_c0_c1_c0.y) {
+ _output += texture(uTextureSampler_2_Stage1, coordSampled) * uKernel_Stage1_c1_c0_c1_c0[4].w;
+ }
+ coord += uImageIncrement_Stage1_c1_c0_c1_c0;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1_c1_c0_c1_c0.x && coord.x <= uBounds_Stage1_c1_c0_c1_c0.y) {
+ _output += texture(uTextureSampler_2_Stage1, coordSampled) * uKernel_Stage1_c1_c0_c1_c0[5].x;
+ }
+ coord += uImageIncrement_Stage1_c1_c0_c1_c0;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1_c1_c0_c1_c0.x && coord.x <= uBounds_Stage1_c1_c0_c1_c0.y) {
+ _output += texture(uTextureSampler_2_Stage1, coordSampled) * uKernel_Stage1_c1_c0_c1_c0[5].y;
+ }
+ coord += uImageIncrement_Stage1_c1_c0_c1_c0;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1_c1_c0_c1_c0.x && coord.x <= uBounds_Stage1_c1_c0_c1_c0.y) {
+ _output += texture(uTextureSampler_2_Stage1, coordSampled) * uKernel_Stage1_c1_c0_c1_c0[5].z;
+ }
+ coord += uImageIncrement_Stage1_c1_c0_c1_c0;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1_c1_c0_c1_c0.x && coord.x <= uBounds_Stage1_c1_c0_c1_c0.y) {
+ _output += texture(uTextureSampler_2_Stage1, coordSampled) * uKernel_Stage1_c1_c0_c1_c0[5].w;
+ }
+ coord += uImageIncrement_Stage1_c1_c0_c1_c0;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1_c1_c0_c1_c0.x && coord.x <= uBounds_Stage1_c1_c0_c1_c0.y) {
+ _output += texture(uTextureSampler_2_Stage1, coordSampled) * uKernel_Stage1_c1_c0_c1_c0[6].x;
+ }
+ coord += uImageIncrement_Stage1_c1_c0_c1_c0;
+ _output *= _input;
+ return _output;
+}
+vec4 blend_multiply(vec4 src, vec4 dst) {
+ return vec4(((1.0 - src.w) * dst.xyz + (1.0 - dst.w) * src.xyz) + src.xyz * dst.xyz, src.w + (1.0 - src.w) * dst.w);
+}
+vec4 ComposeTwo_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_multiply(ComposeTwo_Stage1_c1_c0_c0_c0(inputColor), GaussianConvolution_Stage1_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+float _blend_overlay_component(float sc, float sa, float dc, float da) {
+ if (2.0 * dc <= da) {
+ return (2.0 * sc) * dc;
+ }
+ return sa * da - (2.0 * (da - dc)) * (sa - sc);
+}
+vec4 blend_overlay(vec4 src, vec4 dst) {
+ vec4 result = vec4(_blend_overlay_component(src.x, src.w, dst.x, dst.w), _blend_overlay_component(src.y, src.w, dst.y, dst.w), _blend_overlay_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+ result.xyz += dst.xyz * (1.0 - src.w) + src.xyz * (1.0 - dst.w);
+ return result;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(vec4(1.0).xyz, 1.0);
+ output_Stage1 = blend_overlay(TextureEffect_Stage1_c0_c0(inputColor), ComposeTwo_Stage1_c1_c0(inputColor));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+uniform mat3 uCoordTransformMatrix_3_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+noperspective out vec2 vTransformedCoords_3_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_3_Stage0 = (uCoordTransformMatrix_3_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/2041.shader_test b/shaders/skia/2041.shader_test
new file mode 100644
index 0000000..34dc220
--- /dev/null
+++ b/shaders/skia/2041.shader_test
@@ -0,0 +1,556 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 urectH_Stage1_c0_c0_c0_c0_c1_c0;
+uniform float uinvSixSigma_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 urectUniform_Stage1_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage1_c1_c0_c0_c0_c0_c0;
+uniform vec2 uImageIncrement_Stage1_c1_c0_c0_c0_c1_c0;
+uniform vec4 uKernel_Stage1_c1_c0_c0_c0_c1_c0[5];
+uniform vec2 uKernelOffset_Stage1_c1_c0_c0_c0_c1_c0;
+uniform float uGain_Stage1_c1_c0_c0_c0_c1_c0;
+uniform float uBias_Stage1_c1_c0_c0_c0_c1_c0;
+uniform vec4 uTexDom_Stage1_c1_c0_c0_c0_c1_c0;
+uniform vec3 uDecalParams_Stage1_c1_c0_c0_c0_c1_c0;
+uniform vec2 ubaseFrequency_Stage1_c1_c0_c1_c0_c0_c0;
+uniform float uz_Stage1_c1_c0_c1_c0_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+uniform sampler2D uTextureSampler_2_Stage1;
+uniform sampler2D uTextureSampler_3_Stage1;
+noperspective in vec4 vinCircleEdge_Stage0;
+noperspective in vec4 vinColor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec3 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+vec4 ConfigConversionEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = floor(_input * 255.0 + 0.5) / 255.0;
+ {
+ _output.xyz = floor((_output.xyz * _output.w) * 255.0 + 0.5) / 255.0;
+ }
+ return _output;
+}
+vec4 RectBlurEffect_Stage1_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float xCoverage, yCoverage;
+ {
+ float x, y;
+ {
+ x = max(urectH_Stage1_c0_c0_c0_c0_c1_c0.x - gl_FragCoord.x, gl_FragCoord.x - urectH_Stage1_c0_c0_c0_c0_c1_c0.z);
+ y = max(urectH_Stage1_c0_c0_c0_c0_c1_c0.y - gl_FragCoord.y, gl_FragCoord.y - urectH_Stage1_c0_c0_c0_c0_c1_c0.w);
+ }
+ xCoverage = texture(uTextureSampler_0_Stage1, vec2(x * uinvSixSigma_Stage1_c0_c0_c0_c0_c1_c0, 0.5)).w;
+ yCoverage = texture(uTextureSampler_0_Stage1, vec2(y * uinvSixSigma_Stage1_c0_c0_c0_c0_c1_c0, 0.5)).w;
+ _output = (_input * xCoverage) * yCoverage;
+ }
+ _output = (_input * xCoverage) * yCoverage;
+ return _output;
+}
+vec4 blend_xor(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src + (1.0 - src.w) * dst;
+}
+vec4 ComposeTwo_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_xor(ConfigConversionEffect_Stage1_c0_c0_c0_c0_c0_c0(inputColor), RectBlurEffect_Stage1_c0_c0_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 AARectEffect_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float alpha;
+ {
+ float xSub, ySub;
+ xSub = min(gl_FragCoord.x - urectUniform_Stage1_c0_c0_c1_c0.x, 0.0);
+ xSub += min(urectUniform_Stage1_c0_c0_c1_c0.z - gl_FragCoord.x, 0.0);
+ ySub = min(gl_FragCoord.y - urectUniform_Stage1_c0_c0_c1_c0.y, 0.0);
+ ySub += min(urectUniform_Stage1_c0_c0_c1_c0.w - gl_FragCoord.y, 0.0);
+ alpha = (1.0 + max(xSub, -1.0)) * (1.0 + max(ySub, -1.0));
+ }
+ {
+ alpha = 1.0 - alpha;
+ }
+ _output = _input * alpha;
+ return _output;
+}
+vec4 blend_modulate(vec4 src, vec4 dst) {
+ return src * dst;
+}
+vec4 ComposeTwo_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_modulate(ComposeTwo_Stage1_c0_c0_c0_c0(inputColor), AARectEffect_Stage1_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 ConstColorProcessor_Stage1_c1_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage1_c1_c0_c0_c0_c0_c0;
+ }
+ return _output;
+}
+vec4 MatrixConvolution_Stage1_c1_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 sum = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0 - uKernelOffset_Stage1_c1_c0_c0_c0_c1_c0 * uImageIncrement_Stage1_c1_c0_c0_c0_c1_c0;
+ vec4 c;
+ {
+ float k = uKernel_Stage1_c1_c0_c0_c0_c1_c0[0].x;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0_c1_c0.xy, uTexDom_Stage1_c1_c0_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0_c0_c0_c1_c0[0].y;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1_c1_c0_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0_c1_c0.xy, uTexDom_Stage1_c1_c0_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0_c0_c0_c1_c0[0].z;
+ {
+ vec2 origCoord = coord + vec2(2.0, 0.0) * uImageIncrement_Stage1_c1_c0_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0_c1_c0.xy, uTexDom_Stage1_c1_c0_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0_c0_c0_c1_c0[0].w;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1_c1_c0_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0_c1_c0.xy, uTexDom_Stage1_c1_c0_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0_c0_c0_c1_c0[1].x;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1_c1_c0_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0_c1_c0.xy, uTexDom_Stage1_c1_c0_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0_c0_c0_c1_c0[1].y;
+ {
+ vec2 origCoord = coord + vec2(2.0, 1.0) * uImageIncrement_Stage1_c1_c0_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0_c1_c0.xy, uTexDom_Stage1_c1_c0_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0_c0_c0_c1_c0[1].z;
+ {
+ vec2 origCoord = coord + vec2(0.0, 2.0) * uImageIncrement_Stage1_c1_c0_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0_c1_c0.xy, uTexDom_Stage1_c1_c0_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0_c0_c0_c1_c0[1].w;
+ {
+ vec2 origCoord = coord + vec2(1.0, 2.0) * uImageIncrement_Stage1_c1_c0_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0_c1_c0.xy, uTexDom_Stage1_c1_c0_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0_c0_c0_c1_c0[2].x;
+ {
+ vec2 origCoord = coord + vec2(2.0, 2.0) * uImageIncrement_Stage1_c1_c0_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0_c1_c0.xy, uTexDom_Stage1_c1_c0_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0_c0_c0_c1_c0[2].y;
+ {
+ vec2 origCoord = coord + vec2(0.0, 3.0) * uImageIncrement_Stage1_c1_c0_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0_c1_c0.xy, uTexDom_Stage1_c1_c0_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0_c0_c0_c1_c0[2].z;
+ {
+ vec2 origCoord = coord + vec2(1.0, 3.0) * uImageIncrement_Stage1_c1_c0_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0_c1_c0.xy, uTexDom_Stage1_c1_c0_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0_c0_c0_c1_c0[2].w;
+ {
+ vec2 origCoord = coord + vec2(2.0, 3.0) * uImageIncrement_Stage1_c1_c0_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0_c1_c0.xy, uTexDom_Stage1_c1_c0_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0_c0_c0_c1_c0[3].x;
+ {
+ vec2 origCoord = coord + vec2(0.0, 4.0) * uImageIncrement_Stage1_c1_c0_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0_c1_c0.xy, uTexDom_Stage1_c1_c0_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0_c0_c0_c1_c0[3].y;
+ {
+ vec2 origCoord = coord + vec2(1.0, 4.0) * uImageIncrement_Stage1_c1_c0_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0_c1_c0.xy, uTexDom_Stage1_c1_c0_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0_c0_c0_c1_c0[3].z;
+ {
+ vec2 origCoord = coord + vec2(2.0, 4.0) * uImageIncrement_Stage1_c1_c0_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0_c1_c0.xy, uTexDom_Stage1_c1_c0_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0_c0_c0_c1_c0[3].w;
+ {
+ vec2 origCoord = coord + vec2(0.0, 5.0) * uImageIncrement_Stage1_c1_c0_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0_c1_c0.xy, uTexDom_Stage1_c1_c0_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0_c0_c0_c1_c0[4].x;
+ {
+ vec2 origCoord = coord + vec2(1.0, 5.0) * uImageIncrement_Stage1_c1_c0_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0_c1_c0.xy, uTexDom_Stage1_c1_c0_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0_c0_c0_c1_c0[4].y;
+ {
+ vec2 origCoord = coord + vec2(2.0, 5.0) * uImageIncrement_Stage1_c1_c0_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0_c1_c0.xy, uTexDom_Stage1_c1_c0_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ _output = sum * uGain_Stage1_c1_c0_c0_c0_c1_c0 + uBias_Stage1_c1_c0_c0_c0_c1_c0;
+ _output.w = clamp(_output.w, 0.0, 1.0);
+ _output.xyz = clamp(_output.xyz, 0.0, _output.w);
+ _output *= _input;
+ return _output;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 ComposeTwo_Stage1_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_src_over(ConstColorProcessor_Stage1_c1_c0_c0_c0_c0_c0(inputColor), MatrixConvolution_Stage1_c1_c0_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec3 fade_Stage1_c1_c0_c1_c0_c0_c0(vec3 t) {
+ return ((t * t) * t) * (t * (t * 6.0 - 15.0) + 10.0);
+}
+float perm_Stage1_c1_c0_c1_c0_c0_c0(float x) {
+ return texture(uTextureSampler_2_Stage1, vec2(fract(x / 256.0), 0.0)).x * 255.0;
+}
+float grad_Stage1_c1_c0_c1_c0_c0_c0(float x, vec3 p) {
+ return dot(texture(uTextureSampler_3_Stage1, vec2(fract(x / 16.0), 0.0)).xyz * 255.0 - vec3(1.0), p);
+}
+float lerp_Stage1_c1_c0_c1_c0_c0_c0(float a, float b, float w) {
+ return a + w * (b - a);
+}
+float noise_Stage1_c1_c0_c1_c0_c0_c0(vec3 p) {
+ vec3 P = mod(floor(p), 256.0);
+ p -= floor(p);
+ vec3 f = fade_Stage1_c1_c0_c1_c0_c0_c0(p);
+ float A = perm_Stage1_c1_c0_c1_c0_c0_c0(P.x) + P.y;
+ float AA = perm_Stage1_c1_c0_c1_c0_c0_c0(A) + P.z;
+ float AB = perm_Stage1_c1_c0_c1_c0_c0_c0(A + 1.0) + P.z;
+ float B = perm_Stage1_c1_c0_c1_c0_c0_c0(P.x + 1.0) + P.y;
+ float BA = perm_Stage1_c1_c0_c1_c0_c0_c0(B) + P.z;
+ float BB = perm_Stage1_c1_c0_c1_c0_c0_c0(B + 1.0) + P.z;
+ float result = lerp_Stage1_c1_c0_c1_c0_c0_c0(lerp_Stage1_c1_c0_c1_c0_c0_c0(lerp_Stage1_c1_c0_c1_c0_c0_c0(grad_Stage1_c1_c0_c1_c0_c0_c0(perm_Stage1_c1_c0_c1_c0_c0_c0(AA), p), grad_Stage1_c1_c0_c1_c0_c0_c0(perm_Stage1_c1_c0_c1_c0_c0_c0(BA), p + vec3(-1.0, 0.0, 0.0)), f.x), lerp_Stage1_c1_c0_c1_c0_c0_c0(grad_Stage1_c1_c0_c1_c0_c0_c0(perm_Stage1_c1_c0_c1_c0_c0_c0(AB), p + vec3(0.0, -1.0, 0.0)), grad_Stage1_c1_c0_c1_c0_c0_c0(perm_Stage1_c1_c0_c1_c0_c0_c0(BB), p + vec3(-1.0, -1.0, 0.0)), f.x), f.y), lerp_Stage1_c1_c0_c1_c0_c0_c0(lerp_Stage1_c1_c0_c1_c0_c0_c0(grad_Stage1_c1_c0_c1_c0_c0_c0(perm_Stage1_c1_c0_c1_c0_c0_c0(AA + 1.0), p + vec3(0.0, 0.0, -1.0)), grad_Stage1_c1_c0_c1_c0_c0_c0(perm_Stage1_c1_c0_c1_c0_c0_c0(BA + 1.0), p + vec3(-1.0, 0.0, -1.0)), f.x), lerp_Stage1_c1_c0_c1_c0_c0_c0(grad_Stage1_c1_c0_c1_c0_c0_c0(perm_Stage1_c1_c0_c1_c0_c0_c0(AB + 1.0), p + vec3(0.0, -1.0, -1.0)), grad_Stage1_c1_c0_c1_c0_c0_c0(perm_Stage1_c1_c0_c1_c0_c0_c0(BB + 1.0), p + vec3(-1.0, -1.0, -1.0)), f.x), f.y), f.z);
+ return result;
+}
+float noiseOctaves_Stage1_c1_c0_c1_c0_c0_c0(vec3 p) {
+ float result = 0.0;
+ float ratio = 1.0;
+ for (float i = 0.0;i < 3.0; i++) {
+ result += noise_Stage1_c1_c0_c1_c0_c0_c0(p) / ratio;
+ p *= 2.0;
+ ratio *= 2.0;
+ }
+ return (result + 1.0) / 2.0;
+}
+vec4 ImprovedPerlinNoise_Stage1_c1_c0_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 vTransformedCoords_1_Stage0_ensure2D = vTransformedCoords_1_Stage0.xy / vTransformedCoords_1_Stage0.z;
+ vec2 coords = vTransformedCoords_1_Stage0_ensure2D * ubaseFrequency_Stage1_c1_c0_c1_c0_c0_c0;
+ float r = noiseOctaves_Stage1_c1_c0_c1_c0_c0_c0(vec3(coords, uz_Stage1_c1_c0_c1_c0_c0_c0));
+ float g = noiseOctaves_Stage1_c1_c0_c1_c0_c0_c0(vec3(coords, uz_Stage1_c1_c0_c1_c0_c0_c0));
+ float b = noiseOctaves_Stage1_c1_c0_c1_c0_c0_c0(vec3(coords, uz_Stage1_c1_c0_c1_c0_c0_c0));
+ float a = noiseOctaves_Stage1_c1_c0_c1_c0_c0_c0(vec3(coords, uz_Stage1_c1_c0_c1_c0_c0_c0));
+ _output = vec4(r, g, b, a);
+ _output = clamp(_output, 0.0, 1.0);
+ _output = vec4(_output.xyz * _output.www, _output.w);
+ return _output;
+}
+vec4 Dither_Stage1_c1_c0_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = _input;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_2_Stage0.x);
+ uint y = uint(vTransformedCoords_2_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ _output = vec4(clamp(_output.xyz + value * 0.0039215688593685627, 0.0, _output.w), _output.w);
+ return _output;
+}
+vec4 blend_darken(vec4 src, vec4 dst) {
+ vec4 result = blend_src_over(src, dst);
+ result.xyz = min(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
+ return result;
+}
+vec4 ComposeTwo_Stage1_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_darken(ImprovedPerlinNoise_Stage1_c1_c0_c1_c0_c0_c0(inputColor), Dither_Stage1_c1_c0_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 ComposeTwo_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_xor(ComposeTwo_Stage1_c1_c0_c0_c0(inputColor), ComposeTwo_Stage1_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 blend_difference(vec4 src, vec4 dst) {
+ return vec4((src.xyz + dst.xyz) - 2.0 * min(src.xyz * dst.w, dst.xyz * src.w), src.w + (1.0 - src.w) * dst.w);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ vec4 circleEdge;
+ circleEdge = vinCircleEdge_Stage0;
+ outputColor_Stage0 = vinColor_Stage0;
+ float d = length(circleEdge.xy);
+ float distanceToOuterEdge = circleEdge.z * (1.0 - d);
+ float edgeAlpha = clamp(distanceToOuterEdge, 0.0, 1.0);
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_difference(ComposeTwo_Stage1_c0_c0(inputColor), ComposeTwo_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ sk_FragColor = output_Stage1 * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec4 inCircleEdge;
+noperspective out vec4 vinCircleEdge_Stage0;
+noperspective out vec4 vinColor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec3 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+void main() {
+ vinCircleEdge_Stage0 = inCircleEdge;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = uCoordTransformMatrix_1_Stage0 * vec3(inPosition, 1.0);
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/2044.shader_test b/shaders/skia/2044.shader_test
new file mode 100644
index 0000000..e799dd8
--- /dev/null
+++ b/shaders/skia/2044.shader_test
@@ -0,0 +1,375 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform float uSrcTF_Stage0[7];
+uniform mat3 uColorXform_Stage0;
+uniform float uDstTF_Stage0[7];
+uniform vec3 uedges_Stage1[8];
+uniform vec2 uImageIncrement_Stage2;
+uniform float uSurfaceScale_Stage2;
+uniform vec3 uLightColor_Stage2;
+uniform float uKS_Stage2;
+uniform float uShininess_Stage2;
+uniform vec4 uTexDom_Stage2;
+uniform vec3 uDecalParams_Stage2;
+uniform vec3 uLightDirection_Stage2;
+uniform vec4 uinnerRect_Stage4;
+uniform vec2 uinvRadiiXY_Stage4;
+uniform vec4 uleftBorderColor_Stage5_c0_c0;
+uniform vec4 urightBorderColor_Stage5_c0_c0;
+uniform vec4 ustart_Stage5_c0_c0_c1_c0;
+uniform vec4 uend_Stage5_c0_c0_c1_c0;
+uniform vec4 urectUniform_Stage6;
+uniform sampler2D uTextureSampler_0_Stage0;
+uniform sampler2D uTextureSampler_0_Stage2;
+uniform sampler2D uTextureSampler_0_Stage3;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec3 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+noperspective in vec2 vtextureCoords_Stage0;
+flat in vec4 vtextureDomain_Stage0;
+flat in vec4 vcolor_Stage0;
+float src_tf_Stage0(float x) {
+ float G = uSrcTF_Stage0[0];
+ float A = uSrcTF_Stage0[1];
+ float B = uSrcTF_Stage0[2];
+ float C = uSrcTF_Stage0[3];
+ float D = uSrcTF_Stage0[4];
+ float E = uSrcTF_Stage0[5];
+ float F = uSrcTF_Stage0[6];
+ float s = sign(x);
+ x = abs(x);
+ x = x < D ? C * x + F : pow(A * x + B, G) + E;
+ return s * x;
+}
+float dst_tf_Stage0(float x) {
+ float G = uDstTF_Stage0[0];
+ float A = uDstTF_Stage0[1];
+ float B = uDstTF_Stage0[2];
+ float C = uDstTF_Stage0[3];
+ float D = uDstTF_Stage0[4];
+ float E = uDstTF_Stage0[5];
+ float F = uDstTF_Stage0[6];
+ float s = sign(x);
+ x = abs(x);
+ x = x < D ? C * x + F : pow(A * x + B, G) + E;
+ return s * x;
+}
+vec4 gamut_xform_Stage0(vec4 color) {
+ color.xyz = uColorXform_Stage0 * color.xyz;
+ return color;
+}
+vec4 color_xform_Stage0(vec4 color) {
+ float nonZeroAlpha = max(color.w, 9.9999997473787516e-05);
+ color = vec4(color.xyz / nonZeroAlpha, nonZeroAlpha);
+ color.x = src_tf_Stage0(color.x);
+ color.y = src_tf_Stage0(color.y);
+ color.z = src_tf_Stage0(color.z);
+ color = gamut_xform_Stage0(color);
+ color.x = dst_tf_Stage0(color.x);
+ color.y = dst_tf_Stage0(color.y);
+ color.z = dst_tf_Stage0(color.z);
+ color.xyz *= color.w;
+ return color;
+}
+vec4 light_Stage2(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ vec3 halfDir = normalize(surfaceToLight + vec3(0.0, 0.0, 1.0));
+ float colorScale = uKS_Stage2 * pow(dot(normal, halfDir), uShininess_Stage2);
+ vec3 color = lightColor * clamp(colorScale, 0.0, 1.0);
+ return vec4(color, max(max(color.x, color.y), color.z));
+}
+float sobel_Stage2(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage2(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage2(float m[9], float surfaceScale) {
+ return pointToNormal_Stage2(sobel_Stage2(0.0, 0.0, m[4], m[5], m[7], m[8], 0.66666698455810547), sobel_Stage2(0.0, 0.0, m[4], m[7], m[5], m[8], 0.66666698455810547), surfaceScale);
+}
+vec4 RadialGradientLayout_Stage5_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = length(vTransformedCoords_2_Stage0);
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage5_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage5_c0_c0_c1_c0 + t * uend_Stage5_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage5_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = RadialGradientLayout_Stage5_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage5_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage5_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage5_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ vec2 textureCoords;
+ textureCoords = vtextureCoords_Stage0;
+ vec4 textureDomain;
+ textureDomain = vtextureDomain_Stage0;
+ outputColor_Stage0 = vcolor_Stage0;
+ outputColor_Stage0 = color_xform_Stage0(texture(uTextureSampler_0_Stage0, clamp(textureCoords, textureDomain.xy, textureDomain.zw))) * outputColor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ float alpha = 1.0;
+ float edge;
+ edge = dot(uedges_Stage1[0], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage1[1], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage1[2], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage1[3], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage1[4], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage1[5], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage1[6], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage1[7], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ output_Stage1 = outputColor_Stage0 * alpha;
+ }
+ vec4 output_Stage2;
+ {
+ vec2 coord = vTransformedCoords_0_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp0 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp5 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp6 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp7 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp8 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = uLightDirection_Stage2;
+ output_Stage2 = light_Stage2(normal_Stage2(m, uSurfaceScale_Stage2), surfaceToLight, uLightColor_Stage2);
+ output_Stage2 *= output_Stage1;
+ }
+ vec4 output_Stage3;
+ {
+ output_Stage3 = textureProj(uTextureSampler_0_Stage3, vTransformedCoords_1_Stage0) * output_Stage2;
+ }
+ vec4 output_Stage4;
+ {
+ vec2 dxy0 = uinnerRect_Stage4.xy - gl_FragCoord.xy;
+ vec2 dxy1 = gl_FragCoord.xy - uinnerRect_Stage4.zw;
+ vec2 dxy = max(max(dxy0, dxy1), 0.0);
+ vec2 Z = dxy * uinvRadiiXY_Stage4;
+ float implicit = dot(Z, dxy) - 1.0;
+ float grad_dot = 4.0 * dot(Z, Z);
+ grad_dot = max(grad_dot, 9.9999997473787516e-05);
+ float approx_dist = implicit * inversesqrt(grad_dot);
+ float alpha = clamp(0.5 - approx_dist, 0.0, 1.0);
+ output_Stage4 = output_Stage3 * alpha;
+ }
+ vec4 output_Stage5;
+ {
+ output_Stage5 = blend_dst_in(vec4(1.0), ClampedGradientEffect_Stage5_c0_c0(vec4(1.0)));
+ }
+ vec4 output_Stage6;
+ {
+ float alpha;
+ {
+ alpha = float(all(greaterThan(vec4(gl_FragCoord.xy, urectUniform_Stage6.zw), vec4(urectUniform_Stage6.xy, gl_FragCoord.xy))) ? 1 : 0);
+ }
+ {
+ alpha = 1.0 - alpha;
+ }
+ output_Stage6 = output_Stage5 * alpha;
+ }
+ {
+ sk_FragColor = output_Stage4 * output_Stage6;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+in vec2 position;
+in vec2 textureCoords;
+in vec4 textureDomain;
+in vec4 color;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec3 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+noperspective out vec2 vtextureCoords_Stage0;
+flat out vec4 vtextureDomain_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vec2 pos2 = position;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(textureCoords, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = uCoordTransformMatrix_1_Stage0 * vec3(textureCoords, 1.0);
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(textureCoords, 1.0)).xy;
+ vtextureCoords_Stage0 = textureCoords;
+ vtextureDomain_Stage0 = textureDomain;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/2047.shader_test b/shaders/skia/2047.shader_test
new file mode 100644
index 0000000..c411b60
--- /dev/null
+++ b/shaders/skia/2047.shader_test
@@ -0,0 +1,171 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_KHR_blend_equation_advanced : require
+out vec4 sk_FragColor;
+layout (blend_support_all_equations) out ;
+uniform vec4 uColor_Stage0;
+uniform vec4 uinnerRect_Stage1_c1_c0_c0_c0;
+uniform vec2 uradiusPlusHalf_Stage1_c1_c0_c0_c0;
+uniform vec2 ubaseFrequency_Stage1_c1_c0_c1_c0_c0_c0;
+uniform float uz_Stage1_c1_c0_c1_c0_c0_c0;
+uniform vec4 ucolor_Stage1_c1_c0_c1_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+uniform sampler2D uTextureSampler_2_Stage1;
+in vec2 vTransformedCoords_0_Stage0;
+vec4 ClampFragmentProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ float alpha = clamp(_input.w, 0.0, 1.0);
+ _output = vec4(clamp(_input.xyz, 0.0, alpha), alpha);
+ }
+ return _output;
+}
+vec4 ColorTableEffect_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float nonZeroAlpha = max(_input.w, 9.9999997473787516e-05);
+ vec4 coord = vec4(_input.xyz / nonZeroAlpha, nonZeroAlpha);
+ coord = coord * 0.9960939884185791 + vec4(0.0019529999699443579, 0.0019529999699443579, 0.0019529999699443579, 0.0019529999699443579);
+ _output.w = texture(uTextureSampler_0_Stage1, vec2(coord.w, 0.125)).w;
+ _output.x = texture(uTextureSampler_0_Stage1, vec2(coord.x, 0.375)).w;
+ _output.y = texture(uTextureSampler_0_Stage1, vec2(coord.y, 0.625)).w;
+ _output.z = texture(uTextureSampler_0_Stage1, vec2(coord.z, 0.875)).w;
+ _output.xyz *= _output.w;
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+vec4 ComposeTwo_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_dst_in(ClampFragmentProcessor_Stage1_c0_c0_c0_c0(inputColor), ColorTableEffect_Stage1_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 CircularRRect_Stage1_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 dxy0 = uinnerRect_Stage1_c1_c0_c0_c0.xy - gl_FragCoord.xy;
+ vec2 dxy1 = gl_FragCoord.xy - uinnerRect_Stage1_c1_c0_c0_c0.zw;
+ vec2 dxy = max(max(dxy0, dxy1), 0.0);
+ float alpha = clamp(uradiusPlusHalf_Stage1_c1_c0_c0_c0.x - length(dxy), 0.0, 1.0);
+ alpha = 1.0 - alpha;
+ _output = _input * alpha;
+ return _output;
+}
+vec3 fade_Stage1_c1_c0_c1_c0_c0_c0(vec3 t) {
+ return ((t * t) * t) * (t * (t * 6.0 - 15.0) + 10.0);
+}
+float perm_Stage1_c1_c0_c1_c0_c0_c0(float x) {
+ return texture(uTextureSampler_1_Stage1, vec2(fract(x / 256.0), 0.0)).x * 255.0;
+}
+float grad_Stage1_c1_c0_c1_c0_c0_c0(float x, vec3 p) {
+ return dot(texture(uTextureSampler_2_Stage1, vec2(fract(x / 16.0), 0.0)).xyz * 255.0 - vec3(1.0), p);
+}
+float lerp_Stage1_c1_c0_c1_c0_c0_c0(float a, float b, float w) {
+ return a + w * (b - a);
+}
+float noise_Stage1_c1_c0_c1_c0_c0_c0(vec3 p) {
+ vec3 P = mod(floor(p), 256.0);
+ p -= floor(p);
+ vec3 f = fade_Stage1_c1_c0_c1_c0_c0_c0(p);
+ float A = perm_Stage1_c1_c0_c1_c0_c0_c0(P.x) + P.y;
+ float AA = perm_Stage1_c1_c0_c1_c0_c0_c0(A) + P.z;
+ float AB = perm_Stage1_c1_c0_c1_c0_c0_c0(A + 1.0) + P.z;
+ float B = perm_Stage1_c1_c0_c1_c0_c0_c0(P.x + 1.0) + P.y;
+ float BA = perm_Stage1_c1_c0_c1_c0_c0_c0(B) + P.z;
+ float BB = perm_Stage1_c1_c0_c1_c0_c0_c0(B + 1.0) + P.z;
+ float result = lerp_Stage1_c1_c0_c1_c0_c0_c0(lerp_Stage1_c1_c0_c1_c0_c0_c0(lerp_Stage1_c1_c0_c1_c0_c0_c0(grad_Stage1_c1_c0_c1_c0_c0_c0(perm_Stage1_c1_c0_c1_c0_c0_c0(AA), p), grad_Stage1_c1_c0_c1_c0_c0_c0(perm_Stage1_c1_c0_c1_c0_c0_c0(BA), p + vec3(-1.0, 0.0, 0.0)), f.x), lerp_Stage1_c1_c0_c1_c0_c0_c0(grad_Stage1_c1_c0_c1_c0_c0_c0(perm_Stage1_c1_c0_c1_c0_c0_c0(AB), p + vec3(0.0, -1.0, 0.0)), grad_Stage1_c1_c0_c1_c0_c0_c0(perm_Stage1_c1_c0_c1_c0_c0_c0(BB), p + vec3(-1.0, -1.0, 0.0)), f.x), f.y), lerp_Stage1_c1_c0_c1_c0_c0_c0(lerp_Stage1_c1_c0_c1_c0_c0_c0(grad_Stage1_c1_c0_c1_c0_c0_c0(perm_Stage1_c1_c0_c1_c0_c0_c0(AA + 1.0), p + vec3(0.0, 0.0, -1.0)), grad_Stage1_c1_c0_c1_c0_c0_c0(perm_Stage1_c1_c0_c1_c0_c0_c0(BA + 1.0), p + vec3(-1.0, 0.0, -1.0)), f.x), lerp_Stage1_c1_c0_c1_c0_c0_c0(grad_Stage1_c1_c0_c1_c0_c0_c0(perm_Stage1_c1_c0_c1_c0_c0_c0(AB + 1.0), p + vec3(0.0, -1.0, -1.0)), grad_Stage1_c1_c0_c1_c0_c0_c0(perm_Stage1_c1_c0_c1_c0_c0_c0(BB + 1.0), p + vec3(-1.0, -1.0, -1.0)), f.x), f.y), f.z);
+ return result;
+}
+float noiseOctaves_Stage1_c1_c0_c1_c0_c0_c0(vec3 p) {
+ float result = 0.0;
+ float ratio = 1.0;
+ for (float i = 0.0;i < 6.0; i++) {
+ result += noise_Stage1_c1_c0_c1_c0_c0_c0(p) / ratio;
+ p *= 2.0;
+ ratio *= 2.0;
+ }
+ return (result + 1.0) / 2.0;
+}
+vec4 ImprovedPerlinNoise_Stage1_c1_c0_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coords = vTransformedCoords_0_Stage0 * ubaseFrequency_Stage1_c1_c0_c1_c0_c0_c0;
+ float r = noiseOctaves_Stage1_c1_c0_c1_c0_c0_c0(vec3(coords, uz_Stage1_c1_c0_c1_c0_c0_c0));
+ float g = noiseOctaves_Stage1_c1_c0_c1_c0_c0_c0(vec3(coords, uz_Stage1_c1_c0_c1_c0_c0_c0));
+ float b = noiseOctaves_Stage1_c1_c0_c1_c0_c0_c0(vec3(coords, uz_Stage1_c1_c0_c1_c0_c0_c0));
+ float a = noiseOctaves_Stage1_c1_c0_c1_c0_c0_c0(vec3(coords, uz_Stage1_c1_c0_c1_c0_c0_c0));
+ _output = vec4(r, g, b, a);
+ _output = clamp(_output, 0.0, 1.0);
+ _output = vec4(_output.xyz * _output.www, _output.w);
+ return _output;
+}
+vec4 ConstColorProcessor_Stage1_c1_c0_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage1_c1_c0_c1_c0_c1_c0;
+ }
+ return _output;
+}
+vec4 blend_multiply(vec4 src, vec4 dst) {
+ return vec4(((1.0 - src.w) * dst.xyz + (1.0 - dst.w) * src.xyz) + src.xyz * dst.xyz, src.w + (1.0 - src.w) * dst.w);
+}
+vec4 ComposeTwo_Stage1_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_multiply(ImprovedPerlinNoise_Stage1_c1_c0_c1_c0_c0_c0(inputColor), ConstColorProcessor_Stage1_c1_c0_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 blend_dst_over(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src + dst;
+}
+vec4 ComposeTwo_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_dst_over(CircularRRect_Stage1_c1_c0_c0_c0(inputColor), ComposeTwo_Stage1_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 blend_src_out(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = uColor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_src_out(ComposeTwo_Stage1_c0_c0(inputColor), ComposeTwo_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec2 inLocalCoord;
+out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec3 pos3 = uViewM_Stage0 * vec3(inPosition, 1.0);
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos3.x, pos3.y, 0.0, pos3.z);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/205-2.shader_test b/shaders/skia/205-2.shader_test
new file mode 100644
index 0000000..a11c2d0
--- /dev/null
+++ b/shaders/skia/205-2.shader_test
@@ -0,0 +1,75 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage2_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c1_c0;
+ }
+ return _output;
+}
+vec4 blend_plus(vec4 src, vec4 dst) {
+ return min(src + dst, 1.0);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_plus(ConstColorProcessor_Stage2_c1_c0(vec4(1.0)), output_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/205-3.shader_test b/shaders/skia/205-3.shader_test
new file mode 100644
index 0000000..02bd2cc
--- /dev/null
+++ b/shaders/skia/205-3.shader_test
@@ -0,0 +1,191 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform float uSurfaceScale_Stage1;
+uniform vec3 uLightColor_Stage1;
+uniform float uKD_Stage1;
+uniform vec4 uTexDom_Stage1;
+uniform vec3 uDecalParams_Stage1;
+uniform vec3 uLightDirection_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 light_Stage1(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ float colorScale = uKD_Stage1 * dot(normal, surfaceToLight);
+ return vec4(lightColor * clamp(colorScale, 0.0, 1.0), 1.0);
+}
+float sobel_Stage1(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage1(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage1(float m[9], float surfaceScale) {
+ return pointToNormal_Stage1(sobel_Stage1(0.0, 0.0, m[3], m[4], m[6], m[7], 0.66666698455810547), sobel_Stage1(m[3], m[6], m[4], m[7], 0.0, 0.0, 0.66666698455810547), surfaceScale);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ vec2 coord = vTransformedCoords_0_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp0 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp5 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp6 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp7 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp8 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = uLightDirection_Stage1;
+ output_Stage1 = light_Stage1(normal_Stage1(m, uSurfaceScale_Stage1), surfaceToLight, uLightColor_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/205-4.shader_test b/shaders/skia/205-4.shader_test
new file mode 100644
index 0000000..6276a44
--- /dev/null
+++ b/shaders/skia/205-4.shader_test
@@ -0,0 +1,201 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_KHR_blend_equation_advanced : require
+out vec4 sk_FragColor;
+layout (blend_support_all_equations) out ;
+uniform vec4 ucircle_Stage1_c0_c0_c1_c0;
+uniform vec4 uinnerRect_Stage1_c1_c0_c0_c0;
+uniform vec2 uradiusPlusHalf_Stage1_c1_c0_c0_c0;
+uniform vec4 urectH_Stage1_c1_c0_c1_c0;
+uniform float uinvSixSigma_Stage1_c1_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+noperspective in vec2 vEllipseOffsets0_Stage0;
+noperspective in vec2 vEllipseOffsets1_Stage0;
+noperspective in vec4 vinColor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 TextureEffect_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+vec4 CircleEffect_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float d;
+ {
+ d = (1.0 - length((ucircle_Stage1_c0_c0_c1_c0.xy - gl_FragCoord.xy) * ucircle_Stage1_c0_c0_c1_c0.w)) * ucircle_Stage1_c0_c0_c1_c0.z;
+ }
+ {
+ _output = _input * clamp(d, 0.0, 1.0);
+ }
+ return _output;
+}
+float _blend_color_saturation(vec3 color) {
+ return max(max(color.x, color.y), color.z) - min(min(color.x, color.y), color.z);
+}
+vec3 _blend_set_color_saturation_helper(vec3 minMidMax, float sat) {
+ if (minMidMax.x < minMidMax.z) {
+ return vec3(0.0, (sat * (minMidMax.y - minMidMax.x)) / (minMidMax.z - minMidMax.x), sat);
+ }
+ return vec3(0.0);
+}
+vec3 _blend_set_color_saturation(vec3 hueLumColor, vec3 satColor) {
+ float sat = _blend_color_saturation(satColor);
+ if (hueLumColor.x <= hueLumColor.y) {
+ if (hueLumColor.y <= hueLumColor.z) {
+ hueLumColor.xyz = _blend_set_color_saturation_helper(hueLumColor, sat);
+ } else if (hueLumColor.x <= hueLumColor.z) {
+ hueLumColor.xzy = _blend_set_color_saturation_helper(hueLumColor.xzy, sat);
+ } else {
+ hueLumColor.zxy = _blend_set_color_saturation_helper(hueLumColor.zxy, sat);
+ }
+ } else if (hueLumColor.x <= hueLumColor.z) {
+ hueLumColor.yxz = _blend_set_color_saturation_helper(hueLumColor.yxz, sat);
+ } else if (hueLumColor.y <= hueLumColor.z) {
+ hueLumColor.yzx = _blend_set_color_saturation_helper(hueLumColor.yzx, sat);
+ } else {
+ hueLumColor.zyx = _blend_set_color_saturation_helper(hueLumColor.zyx, sat);
+ }
+ return hueLumColor;
+}
+float _blend_color_luminance(vec3 color) {
+ return dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), color);
+}
+vec3 _blend_set_color_luminance(vec3 hueSatColor, float alpha, vec3 lumColor) {
+ float lum = _blend_color_luminance(lumColor);
+ vec3 result = (lum - _blend_color_luminance(hueSatColor)) + hueSatColor;
+ float minComp = min(min(result.x, result.y), result.z);
+ float maxComp = max(max(result.x, result.y), result.z);
+ if (minComp < 0.0 && lum != minComp) {
+ result = lum + ((result - lum) * lum) / (lum - minComp);
+ }
+ if (maxComp > alpha && maxComp != lum) {
+ return lum + ((result - lum) * (alpha - lum)) / (maxComp - lum);
+ }
+ return result;
+}
+vec4 blend_hue(vec4 src, vec4 dst) {
+ float alpha = dst.w * src.w;
+ vec3 sda = src.xyz * dst.w;
+ vec3 dsa = dst.xyz * src.w;
+ return vec4((((_blend_set_color_luminance(_blend_set_color_saturation(sda, dsa), alpha, dsa) + dst.xyz) - dsa) + src.xyz) - sda, (src.w + dst.w) - alpha);
+}
+vec4 ComposeTwo_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_hue(TextureEffect_Stage1_c0_c0_c0_c0(inputColor), CircleEffect_Stage1_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 CircularRRect_Stage1_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 dxy0 = uinnerRect_Stage1_c1_c0_c0_c0.xy - gl_FragCoord.xy;
+ vec2 dxy1 = gl_FragCoord.xy - uinnerRect_Stage1_c1_c0_c0_c0.zw;
+ vec2 dxy = max(max(dxy0, dxy1), 0.0);
+ float alpha = clamp(uradiusPlusHalf_Stage1_c1_c0_c0_c0.x - length(dxy), 0.0, 1.0);
+ alpha = 1.0 - alpha;
+ _output = _input * alpha;
+ return _output;
+}
+vec4 RectBlurEffect_Stage1_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float xCoverage, yCoverage;
+ {
+ float x, y;
+ {
+ x = max(urectH_Stage1_c1_c0_c1_c0.x - gl_FragCoord.x, gl_FragCoord.x - urectH_Stage1_c1_c0_c1_c0.z);
+ y = max(urectH_Stage1_c1_c0_c1_c0.y - gl_FragCoord.y, gl_FragCoord.y - urectH_Stage1_c1_c0_c1_c0.w);
+ }
+ xCoverage = texture(uTextureSampler_1_Stage1, vec2(x * uinvSixSigma_Stage1_c1_c0_c1_c0, 0.5)).w;
+ yCoverage = texture(uTextureSampler_1_Stage1, vec2(y * uinvSixSigma_Stage1_c1_c0_c1_c0, 0.5)).w;
+ _output = (_input * xCoverage) * yCoverage;
+ }
+ _output = (_input * xCoverage) * yCoverage;
+ return _output;
+}
+float _guarded_divide(float n, float d) {
+ return n / d;
+}
+float _soft_light_component(float sc, float sa, float dc, float da) {
+ if (2.0 * sc <= sa) {
+ return (_guarded_divide((dc * dc) * (sa - 2.0 * sc), da) + (1.0 - da) * sc) + dc * ((-sa + 2.0 * sc) + 1.0);
+ } else if (4.0 * dc <= da) {
+ float DSqd = dc * dc;
+ float DCub = DSqd * dc;
+ float DaSqd = da * da;
+ float DaCub = DaSqd * da;
+ return _guarded_divide(((DaSqd * (sc - dc * ((3.0 * sa - 6.0 * sc) - 1.0)) + ((12.0 * da) * DSqd) * (sa - 2.0 * sc)) - (16.0 * DCub) * (sa - 2.0 * sc)) - DaCub * sc, DaSqd);
+ }
+ return ((dc * ((sa - 2.0 * sc) + 1.0) + sc) - sqrt(da * dc) * (sa - 2.0 * sc)) - da * sc;
+}
+vec4 blend_soft_light(vec4 src, vec4 dst) {
+ if (dst.w == 0.0) {
+ return src;
+ }
+ return vec4(_soft_light_component(src.x, src.w, dst.x, dst.w), _soft_light_component(src.y, src.w, dst.y, dst.w), _soft_light_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+}
+vec4 ComposeTwo_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_soft_light(CircularRRect_Stage1_c1_c0_c0_c0(inputColor), RectBlurEffect_Stage1_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 blend_difference(vec4 src, vec4 dst) {
+ return vec4((src.xyz + dst.xyz) - 2.0 * min(src.xyz * dst.w, dst.xyz * src.w), src.w + (1.0 - src.w) * dst.w);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vinColor_Stage0;
+ vec2 scaledOffset = vEllipseOffsets0_Stage0;
+ float test = dot(scaledOffset, scaledOffset) - 1.0;
+ vec2 duvdx = dFdx(vEllipseOffsets0_Stage0);
+ vec2 duvdy = dFdy(vEllipseOffsets0_Stage0);
+ vec2 grad = vec2(vEllipseOffsets0_Stage0.x * duvdx.x + vEllipseOffsets0_Stage0.y * duvdx.y, vEllipseOffsets0_Stage0.x * duvdy.x + vEllipseOffsets0_Stage0.y * duvdy.y);
+ float grad_dot = 4.0 * dot(grad, grad);
+ grad_dot = max(grad_dot, 1.1754999560161448e-38);
+ float invlen = inversesqrt(grad_dot);
+ float edgeAlpha = clamp(0.5 - test * invlen, 0.0, 1.0);
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_difference(ComposeTwo_Stage1_c0_c0(inputColor), ComposeTwo_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ sk_FragColor = outputCoverage_Stage0 * output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec2 inEllipseOffsets0;
+in vec2 inEllipseOffsets1;
+noperspective out vec2 vEllipseOffsets0_Stage0;
+noperspective out vec2 vEllipseOffsets1_Stage0;
+noperspective out vec4 vinColor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vEllipseOffsets0_Stage0 = inEllipseOffsets0;
+ vEllipseOffsets1_Stage0 = inEllipseOffsets1;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = (uViewM_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/205-5.shader_test b/shaders/skia/205-5.shader_test
new file mode 100644
index 0000000..1ffbc16
--- /dev/null
+++ b/shaders/skia/205-5.shader_test
@@ -0,0 +1,163 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage2;
+uniform vec2 uBounds_Stage2;
+uniform vec4 uKernel_Stage2[6];
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_1_Stage0 - 11.0 * uImageIncrement_Stage2;
+ vec2 coordSampled = vec2(0.0, 0.0);
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage2.x && coord.y <= uBounds_Stage2.y) {
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[0].x;
+ }
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage2.x && coord.y <= uBounds_Stage2.y) {
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[0].y;
+ }
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage2.x && coord.y <= uBounds_Stage2.y) {
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[0].z;
+ }
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage2.x && coord.y <= uBounds_Stage2.y) {
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[0].w;
+ }
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage2.x && coord.y <= uBounds_Stage2.y) {
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[1].x;
+ }
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage2.x && coord.y <= uBounds_Stage2.y) {
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[1].y;
+ }
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage2.x && coord.y <= uBounds_Stage2.y) {
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[1].z;
+ }
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage2.x && coord.y <= uBounds_Stage2.y) {
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[1].w;
+ }
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage2.x && coord.y <= uBounds_Stage2.y) {
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[2].x;
+ }
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage2.x && coord.y <= uBounds_Stage2.y) {
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[2].y;
+ }
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage2.x && coord.y <= uBounds_Stage2.y) {
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[2].z;
+ }
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage2.x && coord.y <= uBounds_Stage2.y) {
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[2].w;
+ }
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage2.x && coord.y <= uBounds_Stage2.y) {
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[3].x;
+ }
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage2.x && coord.y <= uBounds_Stage2.y) {
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[3].y;
+ }
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage2.x && coord.y <= uBounds_Stage2.y) {
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[3].z;
+ }
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage2.x && coord.y <= uBounds_Stage2.y) {
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[3].w;
+ }
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage2.x && coord.y <= uBounds_Stage2.y) {
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[4].x;
+ }
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage2.x && coord.y <= uBounds_Stage2.y) {
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[4].y;
+ }
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage2.x && coord.y <= uBounds_Stage2.y) {
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[4].z;
+ }
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage2.x && coord.y <= uBounds_Stage2.y) {
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[4].w;
+ }
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage2.x && coord.y <= uBounds_Stage2.y) {
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[5].x;
+ }
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage2.x && coord.y <= uBounds_Stage2.y) {
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[5].y;
+ }
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage2.x && coord.y <= uBounds_Stage2.y) {
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[5].z;
+ }
+ coord += uImageIncrement_Stage2;
+ output_Stage2 *= output_Stage1;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/205-6.shader_test b/shaders/skia/205-6.shader_test
new file mode 100644
index 0000000..9af9f84
--- /dev/null
+++ b/shaders/skia/205-6.shader_test
@@ -0,0 +1,61 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 urectUniform_Stage2_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 ClampFragmentProcessor_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = clamp(_input, 0.0, 1.0);
+ }
+ return _output;
+}
+vec4 AARectEffect_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ float alpha;
+ {
+ alpha = float(all(greaterThan(vec4(gl_FragCoord.xy, urectUniform_Stage2_c1_c0.zw), vec4(urectUniform_Stage2_c1_c0.xy, gl_FragCoord.xy))) ? 1 : 0);
+ }
+ _output = _input * alpha;
+ return _output;
+}
+vec4 blend_plus(vec4 src, vec4 dst) {
+ return min(src + dst, 1.0);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ vec4 inputColor = vec4(output_Stage1.xyz, 1.0);
+ output_Stage2 = blend_plus(ClampFragmentProcessor_Stage2_c0_c0(inputColor), AARectEffect_Stage2_c1_c0(inputColor));
+ output_Stage2 *= output_Stage1.w;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/205.shader_test b/shaders/skia/205.shader_test
new file mode 100644
index 0000000..e7ca00a
--- /dev/null
+++ b/shaders/skia/205.shader_test
@@ -0,0 +1,81 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 ucolor_Stage1_c0_c0_c0_c0;
+uniform vec4 ucolor_Stage2_c1_c0;
+noperspective in vec4 vcolor_Stage0;
+vec4 ConstColorProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = _input.w * ucolor_Stage1_c0_c0_c0_c0;
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = ConstColorProcessor_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c1_c0;
+ }
+ return _output;
+}
+vec4 blend_dst_out(vec4 src, vec4 dst) {
+ return (1.0 - src.w) * dst;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 blend_darken(vec4 src, vec4 dst) {
+ vec4 result = blend_src_over(src, dst);
+ result.xyz = min(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
+ return result;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_dst_out(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_darken(ConstColorProcessor_Stage2_c1_c0(vec4(1.0)), output_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 position;
+in vec4 inColor;
+noperspective out vec4 vcolor_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/2050.shader_test b/shaders/skia/2050.shader_test
new file mode 100644
index 0000000..04640eb
--- /dev/null
+++ b/shaders/skia/2050.shader_test
@@ -0,0 +1,79 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec3 uedges_Stage1[4];
+uniform sampler2D uTextureSampler_0_Stage2;
+in vec2 vEllipseOffsets0_Stage0;
+in vec2 vEllipseOffsets1_Stage0;
+in vec4 vinColor_Stage0;
+in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ vec2 scaledOffset = vEllipseOffsets0_Stage0;
+ float test = dot(scaledOffset, scaledOffset) - 1.0;
+ vec2 duvdx = dFdx(vEllipseOffsets0_Stage0);
+ vec2 duvdy = dFdy(vEllipseOffsets0_Stage0);
+ vec2 grad = vec2(vEllipseOffsets0_Stage0.x * duvdx.x + vEllipseOffsets0_Stage0.y * duvdx.y, vEllipseOffsets0_Stage0.x * duvdy.x + vEllipseOffsets0_Stage0.y * duvdy.y);
+ float grad_dot = 4.0 * dot(grad, grad);
+ grad_dot = max(grad_dot, 1.1754999560161448e-38);
+ float invlen = inversesqrt(grad_dot);
+ float edgeAlpha = clamp(0.5 - test * invlen, 0.0, 1.0);
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ vec4 output_Stage1;
+ {
+ float alpha = 1.0;
+ float edge;
+ edge = dot(uedges_Stage1[0], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage1[1], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage1[2], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage1[3], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ alpha = 1.0 - alpha;
+ output_Stage1 = outputCoverage_Stage0 * alpha;
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = texture(uTextureSampler_0_Stage2, vTransformedCoords_0_Stage0) * output_Stage1;
+ }
+ {
+ sk_FragColor = 1.0 - output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec2 inEllipseOffsets0;
+in vec2 inEllipseOffsets1;
+out vec2 vEllipseOffsets0_Stage0;
+out vec2 vEllipseOffsets1_Stage0;
+out vec4 vinColor_Stage0;
+out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vEllipseOffsets0_Stage0 = inEllipseOffsets0;
+ vEllipseOffsets1_Stage0 = inEllipseOffsets1;
+ vinColor_Stage0 = inColor;
+ vec3 pos3 = uViewM_Stage0 * vec3(inPosition, 1.0);
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos3.x, pos3.y, 0.0, pos3.z);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/2053.shader_test b/shaders/skia/2053.shader_test
new file mode 100644
index 0000000..f44c4f2
--- /dev/null
+++ b/shaders/skia/2053.shader_test
@@ -0,0 +1,110 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform float uSrcTF_Stage0[7];
+uniform mat3 uColorXform_Stage0;
+uniform float uDstTF_Stage0[7];
+uniform vec4 urectH_Stage1;
+uniform float uinvSixSigma_Stage1;
+uniform sampler2D uTextureSampler_0_Stage0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vtextureCoords_Stage0;
+flat in vec4 vtextureDomain_Stage0;
+flat in vec4 vcolor_Stage0;
+float src_tf_Stage0(float x) {
+ float G = uSrcTF_Stage0[0];
+ float A = uSrcTF_Stage0[1];
+ float B = uSrcTF_Stage0[2];
+ float C = uSrcTF_Stage0[3];
+ float D = uSrcTF_Stage0[4];
+ float E = uSrcTF_Stage0[5];
+ float F = uSrcTF_Stage0[6];
+ float s = sign(x);
+ x = abs(x);
+ x = x < D ? C * x + F : pow(A * x + B, G) + E;
+ return s * x;
+}
+float dst_tf_Stage0(float x) {
+ float G = uDstTF_Stage0[0];
+ float A = uDstTF_Stage0[1];
+ float B = uDstTF_Stage0[2];
+ float C = uDstTF_Stage0[3];
+ float D = uDstTF_Stage0[4];
+ float E = uDstTF_Stage0[5];
+ float F = uDstTF_Stage0[6];
+ float s = sign(x);
+ x = abs(x);
+ x = x < D ? C * x + F : pow(A * x + B, G) + E;
+ return s * x;
+}
+vec4 gamut_xform_Stage0(vec4 color) {
+ color.xyz = uColorXform_Stage0 * color.xyz;
+ return color;
+}
+vec4 color_xform_Stage0(vec4 color) {
+ float nonZeroAlpha = max(color.w, 9.9999997473787516e-05);
+ color = vec4(color.xyz / nonZeroAlpha, nonZeroAlpha);
+ color.x = src_tf_Stage0(color.x);
+ color.y = src_tf_Stage0(color.y);
+ color.z = src_tf_Stage0(color.z);
+ color = gamut_xform_Stage0(color);
+ color.x = dst_tf_Stage0(color.x);
+ color.y = dst_tf_Stage0(color.y);
+ color.z = dst_tf_Stage0(color.z);
+ color.xyz *= color.w;
+ return color;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ vec2 textureCoords;
+ textureCoords = vtextureCoords_Stage0;
+ vec4 textureDomain;
+ textureDomain = vtextureDomain_Stage0;
+ outputColor_Stage0 = vcolor_Stage0;
+ outputColor_Stage0 = color_xform_Stage0(texture(uTextureSampler_0_Stage0, clamp(textureCoords, textureDomain.xy, textureDomain.zw))) * outputColor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ float xCoverage, yCoverage;
+ {
+ float x, y;
+ {
+ x = max(urectH_Stage1.x - gl_FragCoord.x, gl_FragCoord.x - urectH_Stage1.z);
+ y = max(urectH_Stage1.y - gl_FragCoord.y, gl_FragCoord.y - urectH_Stage1.w);
+ }
+ xCoverage = texture(uTextureSampler_0_Stage1, vec2(x * uinvSixSigma_Stage1, 0.5)).w;
+ yCoverage = texture(uTextureSampler_0_Stage1, vec2(y * uinvSixSigma_Stage1, 0.5)).w;
+ output_Stage1 = vec4(xCoverage) * yCoverage;
+ }
+ output_Stage1 = vec4(xCoverage) * yCoverage;
+ }
+ {
+ sk_FragColor = 1.0 - output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 position;
+in vec2 textureCoords;
+in vec4 textureDomain;
+in vec4 color;
+noperspective out vec2 vtextureCoords_Stage0;
+flat out vec4 vtextureDomain_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vec2 pos2 = position;
+ vtextureCoords_Stage0 = textureCoords;
+ vtextureDomain_Stage0 = textureDomain;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/2056.shader_test b/shaders/skia/2056.shader_test
new file mode 100644
index 0000000..5a7d244
--- /dev/null
+++ b/shaders/skia/2056.shader_test
@@ -0,0 +1,61 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uinnerRect_Stage1;
+uniform vec4 uinvRadiiLTRB_Stage1;
+noperspective in vec4 vinCircleEdge_Stage0;
+noperspective in vec4 vinColor_Stage0;
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ vec4 circleEdge;
+ circleEdge = vinCircleEdge_Stage0;
+ float d = length(circleEdge.xy);
+ float distanceToOuterEdge = circleEdge.z * (1.0 - d);
+ float edgeAlpha = clamp(distanceToOuterEdge, 0.0, 1.0);
+ float distanceToInnerEdge = circleEdge.z * (d - circleEdge.w);
+ float innerAlpha = clamp(distanceToInnerEdge, 0.0, 1.0);
+ edgeAlpha *= innerAlpha;
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ vec4 output_Stage1;
+ {
+ vec2 dxy0 = uinnerRect_Stage1.xy - gl_FragCoord.xy;
+ vec2 dxy1 = gl_FragCoord.xy - uinnerRect_Stage1.zw;
+ vec2 dxy = max(max(dxy0, dxy1), 0.0);
+ vec2 Z = max(max(dxy0 * uinvRadiiLTRB_Stage1.xy, dxy1 * uinvRadiiLTRB_Stage1.zw), 0.0);
+ float implicit = dot(Z, dxy) - 1.0;
+ float grad_dot = 4.0 * dot(Z, Z);
+ grad_dot = max(grad_dot, 9.9999997473787516e-05);
+ float approx_dist = implicit * inversesqrt(grad_dot);
+ float alpha = clamp(0.5 - approx_dist, 0.0, 1.0);
+ output_Stage1 = outputCoverage_Stage0 * alpha;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 inPosition;
+in vec4 inColor;
+in vec4 inCircleEdge;
+noperspective out vec4 vinCircleEdge_Stage0;
+noperspective out vec4 vinColor_Stage0;
+void main() {
+ vinCircleEdge_Stage0 = inCircleEdge;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = inPosition;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/2059.shader_test b/shaders/skia/2059.shader_test
new file mode 100644
index 0000000..aaeddb2
--- /dev/null
+++ b/shaders/skia/2059.shader_test
@@ -0,0 +1,116 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+uniform float uPixelSize_Stage3;
+uniform vec2 uRange_Stage3;
+uniform sampler2D uTextureSampler_0_Stage3;
+noperspective in vec2 vEllipseOffsets_Stage0;
+noperspective in vec4 vEllipseRadii_Stage0;
+noperspective in vec4 vinColor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ vec2 offset = vEllipseOffsets_Stage0;
+ float test = dot(offset, offset) - 1.0;
+ vec2 grad = (2.0 * offset) * vEllipseRadii_Stage0.xy;
+ float grad_dot = dot(grad, grad);
+ grad_dot = max(grad_dot, 1.1754999560161448e-38);
+ float invlen = inversesqrt(grad_dot);
+ float edgeAlpha = clamp(0.5 - test * invlen, 0.0, 1.0);
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_dst_in(outputCoverage_Stage0, ClampedGradientEffect_Stage1_c0_c0(vec4(1.0)));
+ }
+ vec4 output_Stage2;
+ {
+ {
+ output_Stage2 = clamp(output_Stage1, 0.0, 1.0);
+ }
+ }
+ vec4 output_Stage3;
+ {
+ output_Stage3 = vec4(1.0, 1.0, 1.0, 1.0);
+ vec2 coord = vTransformedCoords_1_Stage0;
+ coord.y -= 8.0 * uPixelSize_Stage3;
+ for (int i = 0;i < 17; i++) {
+ output_Stage3 = min(output_Stage3, texture(uTextureSampler_0_Stage3, coord));
+ coord.y += uPixelSize_Stage3;
+ }
+ output_Stage3 *= output_Stage2;
+ }
+ {
+ sk_FragColor = output_Stage3;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec2 inEllipseOffset;
+in vec4 inEllipseRadii;
+noperspective out vec2 vEllipseOffsets_Stage0;
+noperspective out vec4 vEllipseRadii_Stage0;
+noperspective out vec4 vinColor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vEllipseOffsets_Stage0 = inEllipseOffset;
+ vEllipseRadii_Stage0 = inEllipseRadii;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/2068.shader_test b/shaders/skia/2068.shader_test
new file mode 100644
index 0000000..fb014bc
--- /dev/null
+++ b/shaders/skia/2068.shader_test
@@ -0,0 +1,149 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 ucircle_Stage1_c0_c0;
+uniform mat4 um_Stage1_c1_c0_c0_c0;
+uniform vec4 uv_Stage1_c1_c0_c0_c0;
+uniform vec4 urectUniform_Stage1_c1_c0_c1_c0_c0_c0;
+uniform vec3 uedges_Stage1_c1_c0_c1_c0_c1_c0[3];
+uniform vec2 uDstTextureUpperLeft_Stage2;
+uniform vec2 uDstTextureCoordScale_Stage2;
+uniform sampler2D uDstTextureSampler_Stage2;
+noperspective in vec4 vcolor_Stage0;
+noperspective in float vinCoverage_Stage0;
+vec4 CircleEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ float d;
+ {
+ d = (1.0 - length((ucircle_Stage1_c0_c0.xy - gl_FragCoord.xy) * ucircle_Stage1_c0_c0.w)) * ucircle_Stage1_c0_c0.z;
+ }
+ {
+ _output = _input * clamp(d, 0.0, 1.0);
+ }
+ return _output;
+}
+vec4 ColorMatrixFragmentProcessor_Stage1_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = _input;
+ _output = um_Stage1_c1_c0_c0_c0 * inputColor + uv_Stage1_c1_c0_c0_c0;
+ {
+ _output = clamp(_output, 0.0, 1.0);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 AARectEffect_Stage1_c1_c0_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float alpha;
+ {
+ float xSub, ySub;
+ xSub = min(gl_FragCoord.x - urectUniform_Stage1_c1_c0_c1_c0_c0_c0.x, 0.0);
+ xSub += min(urectUniform_Stage1_c1_c0_c1_c0_c0_c0.z - gl_FragCoord.x, 0.0);
+ ySub = min(gl_FragCoord.y - urectUniform_Stage1_c1_c0_c1_c0_c0_c0.y, 0.0);
+ ySub += min(urectUniform_Stage1_c1_c0_c1_c0_c0_c0.w - gl_FragCoord.y, 0.0);
+ alpha = (1.0 + max(xSub, -1.0)) * (1.0 + max(ySub, -1.0));
+ }
+ _output = _input * alpha;
+ return _output;
+}
+vec4 ConvexPoly_Stage1_c1_c0_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float alpha = 1.0;
+ float edge;
+ edge = dot(uedges_Stage1_c1_c0_c1_c0_c1_c0[0], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage1_c1_c0_c1_c0_c1_c0[1], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage1_c1_c0_c1_c0_c1_c0[2], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ alpha = 1.0 - alpha;
+ _output = _input * alpha;
+ return _output;
+}
+vec4 blend_xor(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src + (1.0 - src.w) * dst;
+}
+vec4 ComposeTwo_Stage1_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_xor(AARectEffect_Stage1_c1_c0_c1_c0_c0_c0(inputColor), ConvexPoly_Stage1_c1_c0_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 blend_dst_over(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src + dst;
+}
+vec4 ComposeTwo_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_dst_over(ColorMatrixFragmentProcessor_Stage1_c1_c0_c0_c0(inputColor), ComposeTwo_Stage1_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+float _blend_overlay_component(float sc, float sa, float dc, float da) {
+ if (2.0 * dc <= da) {
+ return (2.0 * sc) * dc;
+ }
+ return sa * da - (2.0 * (da - dc)) * (sa - sc);
+}
+vec4 blend_overlay(vec4 src, vec4 dst) {
+ vec4 result = vec4(_blend_overlay_component(src.x, src.w, dst.x, dst.w), _blend_overlay_component(src.y, src.w, dst.y, dst.w), _blend_overlay_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+ result.xyz += dst.xyz * (1.0 - src.w) + src.xyz * (1.0 - dst.w);
+ return result;
+}
+vec4 blend_src_out(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ float alpha = 1.0;
+ alpha = vinCoverage_Stage0;
+ outputCoverage_Stage0 = vec4(alpha);
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_overlay(CircleEffect_Stage1_c0_c0(inputColor), ComposeTwo_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ if (all(lessThanEqual(outputCoverage_Stage0.xyz, vec3(0.0)))) {
+ discard;
+ }
+ vec2 _dstTexCoord = (gl_FragCoord.xy - uDstTextureUpperLeft_Stage2) * uDstTextureCoordScale_Stage2;
+ vec4 _dstColor = texture(uDstTextureSampler_Stage2, _dstTexCoord);
+ sk_FragColor = blend_src_out(output_Stage1, _dstColor);
+ sk_FragColor = outputCoverage_Stage0 * sk_FragColor + (vec4(1.0) - outputCoverage_Stage0) * _dstColor;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 inPosition;
+in vec4 inColor;
+in float inCoverage;
+noperspective out vec4 vcolor_Stage0;
+noperspective out float vinCoverage_Stage0;
+void main() {
+ vec4 color = inColor;
+ vcolor_Stage0 = color;
+ vec2 pos2 = inPosition;
+ vinCoverage_Stage0 = inCoverage;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/2074.shader_test b/shaders/skia/2074.shader_test
new file mode 100644
index 0000000..a5f051e
--- /dev/null
+++ b/shaders/skia/2074.shader_test
@@ -0,0 +1,130 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_KHR_blend_equation_advanced : require
+out vec4 sk_FragColor;
+layout (blend_support_all_equations) out ;
+uniform vec4 ucircle_Stage1_c0_c0_c0_c0;
+uniform vec4 ucircle_Stage1_c0_c0_c1_c0_c0_c0;
+uniform float uPixelSize_Stage1_c0_c0_c1_c0_c1_c0;
+uniform vec2 uRange_Stage1_c0_c0_c1_c0_c1_c0;
+uniform vec4 uinnerRect_Stage1_c1_c0;
+uniform vec4 uinvRadiiLTRB_Stage1_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec4 vinCircleEdge_Stage0;
+noperspective in vec4 vinColor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 CircleEffect_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float d;
+ {
+ d = (1.0 - length((ucircle_Stage1_c0_c0_c0_c0.xy - gl_FragCoord.xy) * ucircle_Stage1_c0_c0_c0_c0.w)) * ucircle_Stage1_c0_c0_c0_c0.z;
+ }
+ {
+ _output = _input * clamp(d, 0.0, 1.0);
+ }
+ return _output;
+}
+vec4 CircleEffect_Stage1_c0_c0_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float d;
+ {
+ d = (1.0 - length((ucircle_Stage1_c0_c0_c1_c0_c0_c0.xy - gl_FragCoord.xy) * ucircle_Stage1_c0_c0_c1_c0_c0_c0.w)) * ucircle_Stage1_c0_c0_c1_c0_c0_c0.z;
+ }
+ {
+ _output = d > 0.5 ? _input : vec4(0.0);
+ }
+ return _output;
+}
+vec4 Morphology_Stage1_c0_c0_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = vec4(1.0, 1.0, 1.0, 1.0);
+ vec2 coord = vTransformedCoords_0_Stage0;
+ coord.y -= 6.0 * uPixelSize_Stage1_c0_c0_c1_c0_c1_c0;
+ for (int i = 0;i < 13; i++) {
+ _output = min(_output, texture(uTextureSampler_0_Stage1, coord));
+ coord.y += uPixelSize_Stage1_c0_c0_c1_c0_c1_c0;
+ }
+ _output *= _input;
+ return _output;
+}
+vec4 blend_exclusion(vec4 src, vec4 dst) {
+ return vec4((dst.xyz + src.xyz) - (2.0 * dst.xyz) * src.xyz, src.w + (1.0 - src.w) * dst.w);
+}
+vec4 ComposeTwo_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_exclusion(CircleEffect_Stage1_c0_c0_c1_c0_c0_c0(inputColor), Morphology_Stage1_c0_c0_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 blend_multiply(vec4 src, vec4 dst) {
+ return vec4(((1.0 - src.w) * dst.xyz + (1.0 - dst.w) * src.xyz) + src.xyz * dst.xyz, src.w + (1.0 - src.w) * dst.w);
+}
+vec4 ComposeTwo_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_multiply(CircleEffect_Stage1_c0_c0_c0_c0(inputColor), ComposeTwo_Stage1_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 EllipticalRRect_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 dxy0 = uinnerRect_Stage1_c1_c0.xy - gl_FragCoord.xy;
+ vec2 dxy1 = gl_FragCoord.xy - uinnerRect_Stage1_c1_c0.zw;
+ vec2 dxy = max(max(dxy0, dxy1), 0.0);
+ vec2 Z = max(max(dxy0 * uinvRadiiLTRB_Stage1_c1_c0.xy, dxy1 * uinvRadiiLTRB_Stage1_c1_c0.zw), 0.0);
+ float implicit = dot(Z, dxy) - 1.0;
+ float grad_dot = 4.0 * dot(Z, Z);
+ grad_dot = max(grad_dot, 9.9999997473787516e-05);
+ float approx_dist = implicit * inversesqrt(grad_dot);
+ float alpha = clamp(0.5 + approx_dist, 0.0, 1.0);
+ _output = _input * alpha;
+ return _output;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ vec4 circleEdge;
+ circleEdge = vinCircleEdge_Stage0;
+ outputColor_Stage0 = vinColor_Stage0;
+ float d = length(circleEdge.xy);
+ float distanceToOuterEdge = circleEdge.z * (1.0 - d);
+ float edgeAlpha = clamp(distanceToOuterEdge, 0.0, 1.0);
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_exclusion(ComposeTwo_Stage1_c0_c0(inputColor), EllipticalRRect_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ sk_FragColor = outputCoverage_Stage0 * output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec4 inCircleEdge;
+noperspective out vec4 vinCircleEdge_Stage0;
+noperspective out vec4 vinColor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vinCircleEdge_Stage0 = inCircleEdge;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/2077.shader_test b/shaders/skia/2077.shader_test
new file mode 100644
index 0000000..3865a2c
--- /dev/null
+++ b/shaders/skia/2077.shader_test
@@ -0,0 +1,44 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_KHR_blend_equation_advanced : require
+out vec4 sk_FragColor;
+layout (blend_support_all_equations) out ;
+uniform vec4 uColor_Stage0;
+uniform float uCoverage_Stage0;
+uniform sampler2D uTextureSampler_0_Stage1;
+in vec3 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = uColor_Stage0;
+ outputCoverage_Stage0 = vec4(uCoverage_Stage0);
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = textureProj(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * outputColor_Stage0;
+ }
+ {
+ sk_FragColor = outputCoverage_Stage0 * output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+out vec3 vTransformedCoords_0_Stage0;
+void main() {
+ vec3 pos3 = uViewM_Stage0 * vec3(inPosition, 1.0);
+ vTransformedCoords_0_Stage0 = uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0);
+ gl_Position = vec4(pos3.x, pos3.y, 0.0, pos3.z);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/208-2.shader_test b/shaders/skia/208-2.shader_test
new file mode 100644
index 0000000..a97d742
--- /dev/null
+++ b/shaders/skia/208-2.shader_test
@@ -0,0 +1,79 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage2_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c1_c0;
+ }
+ return _output;
+}
+vec4 blend_plus(vec4 src, vec4 dst) {
+ return min(src + dst, 1.0);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_plus(ConstColorProcessor_Stage2_c1_c0(vec4(1.0)), output_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/208-3.shader_test b/shaders/skia/208-3.shader_test
new file mode 100644
index 0000000..9cf1736
--- /dev/null
+++ b/shaders/skia/208-3.shader_test
@@ -0,0 +1,191 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform float uSurfaceScale_Stage1;
+uniform vec3 uLightColor_Stage1;
+uniform float uKD_Stage1;
+uniform vec4 uTexDom_Stage1;
+uniform vec3 uDecalParams_Stage1;
+uniform vec3 uLightDirection_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 light_Stage1(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ float colorScale = uKD_Stage1 * dot(normal, surfaceToLight);
+ return vec4(lightColor * clamp(colorScale, 0.0, 1.0), 1.0);
+}
+float sobel_Stage1(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage1(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage1(float m[9], float surfaceScale) {
+ return pointToNormal_Stage1(sobel_Stage1(m[1], m[2], m[4], m[5], m[7], m[8], 0.5), sobel_Stage1(0.0, 0.0, m[1], m[7], m[2], m[8], 0.33333298563957214), surfaceScale);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ vec2 coord = vTransformedCoords_0_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp0 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp5 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp6 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp7 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp8 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = uLightDirection_Stage1;
+ output_Stage1 = light_Stage1(normal_Stage1(m, uSurfaceScale_Stage1), surfaceToLight, uLightColor_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/208-4.shader_test b/shaders/skia/208-4.shader_test
new file mode 100644
index 0000000..50b17dd
--- /dev/null
+++ b/shaders/skia/208-4.shader_test
@@ -0,0 +1,200 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+uniform vec4 uleftBorderColor_Stage2_c0_c0;
+uniform vec4 urightBorderColor_Stage2_c0_c0;
+uniform vec4 uscale0_1_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale8_9_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias8_9_Stage2_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage2_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage2_c0_c0_c1_c0;
+uniform vec4 uleftBorderColor_Stage3_c1_c0;
+uniform vec4 urightBorderColor_Stage3_c1_c0;
+uniform vec4 uscale0_1_Stage3_c1_c0_c1_c0;
+uniform vec4 uscale2_3_Stage3_c1_c0_c1_c0;
+uniform vec4 uscale4_5_Stage3_c1_c0_c1_c0;
+uniform vec4 ubias0_1_Stage3_c1_c0_c1_c0;
+uniform vec4 ubias2_3_Stage3_c1_c0_c1_c0;
+uniform vec4 ubias4_5_Stage3_c1_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage3_c1_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage3_c1_c0_c1_c0;
+noperspective in vec2 vEllipseOffsets_Stage0;
+noperspective in vec4 vEllipseRadii_Stage0;
+noperspective in vec4 vinColor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 LinearGradientLayout_Stage2_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage2_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.w) {
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage2_c0_c0_c1_c0;
+ bias = ubias0_1_Stage2_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage2_c0_c0_c1_c0;
+ bias = ubias2_3_Stage2_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage2_c0_c0_c1_c0;
+ bias = ubias4_5_Stage2_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage2_c0_c0_c1_c0;
+ bias = ubias6_7_Stage2_c0_c0_c1_c0;
+ }
+ }
+ } else {
+ {
+ {
+ scale = uscale8_9_Stage2_c0_c0_c1_c0;
+ bias = ubias8_9_Stage2_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage2_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage2_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage2_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage2_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 RadialGradientLayout_Stage3_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = length(vTransformedCoords_1_Stage0);
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage3_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage3_c1_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage3_c1_c0_c1_c0.x) {
+ scale = uscale0_1_Stage3_c1_c0_c1_c0;
+ bias = ubias0_1_Stage3_c1_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage3_c1_c0_c1_c0;
+ bias = ubias2_3_Stage3_c1_c0_c1_c0;
+ }
+ } else {
+ {
+ scale = uscale4_5_Stage3_c1_c0_c1_c0;
+ bias = ubias4_5_Stage3_c1_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage3_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = RadialGradientLayout_Stage3_c1_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage3_c1_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage3_c1_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage3_c1_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ vec2 offset = vEllipseOffsets_Stage0;
+ offset *= vEllipseRadii_Stage0.xy;
+ float test = dot(offset, offset) - 1.0;
+ vec2 grad = (2.0 * offset) * vEllipseRadii_Stage0.xy;
+ float grad_dot = dot(grad, grad);
+ grad_dot = max(grad_dot, 1.1754999560161448e-38);
+ float invlen = inversesqrt(grad_dot);
+ float edgeAlpha = clamp(0.5 - test * invlen, 0.0, 1.0);
+ offset = vEllipseOffsets_Stage0 * vEllipseRadii_Stage0.zw;
+ test = dot(offset, offset) - 1.0;
+ grad = (2.0 * offset) * vEllipseRadii_Stage0.zw;
+ grad_dot = dot(grad, grad);
+ invlen = inversesqrt(grad_dot);
+ edgeAlpha *= clamp(0.5 + test * invlen, 0.0, 1.0);
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = floor(outputCoverage_Stage0 * 255.0 + 0.5) / 255.0;
+ {
+ output_Stage1.xyz = floor((output_Stage1.xyz * output_Stage1.w) * 255.0 + 0.5) / 255.0;
+ }
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_dst_in(output_Stage1, ClampedGradientEffect_Stage2_c0_c0(vec4(1.0)));
+ }
+ {
+ blend_dst_in(output_Stage2, ClampedGradientEffect_Stage3_c1_c0(vec4(1.0)));
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec2 inEllipseOffset;
+in vec4 inEllipseRadii;
+noperspective out vec2 vEllipseOffsets_Stage0;
+noperspective out vec4 vEllipseRadii_Stage0;
+noperspective out vec4 vinColor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vEllipseOffsets_Stage0 = inEllipseOffset;
+ vEllipseRadii_Stage0 = inEllipseRadii;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/208-5.shader_test b/shaders/skia/208-5.shader_test
new file mode 100644
index 0000000..3ab3a32
--- /dev/null
+++ b/shaders/skia/208-5.shader_test
@@ -0,0 +1,84 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage2;
+uniform vec2 uBounds_Stage2;
+uniform vec4 uKernel_Stage2[3];
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_1_Stage0 - 4.0 * uImageIncrement_Stage2;
+ vec2 coordSampled = vec2(0.0, 0.0);
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage2.x, uBounds_Stage2.y - uBounds_Stage2.x) + uBounds_Stage2.x;
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[0].x;
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage2.x, uBounds_Stage2.y - uBounds_Stage2.x) + uBounds_Stage2.x;
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[0].y;
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage2.x, uBounds_Stage2.y - uBounds_Stage2.x) + uBounds_Stage2.x;
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[0].z;
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage2.x, uBounds_Stage2.y - uBounds_Stage2.x) + uBounds_Stage2.x;
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[0].w;
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage2.x, uBounds_Stage2.y - uBounds_Stage2.x) + uBounds_Stage2.x;
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[1].x;
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage2.x, uBounds_Stage2.y - uBounds_Stage2.x) + uBounds_Stage2.x;
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[1].y;
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage2.x, uBounds_Stage2.y - uBounds_Stage2.x) + uBounds_Stage2.x;
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[1].z;
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage2.x, uBounds_Stage2.y - uBounds_Stage2.x) + uBounds_Stage2.x;
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[1].w;
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage2.x, uBounds_Stage2.y - uBounds_Stage2.x) + uBounds_Stage2.x;
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[2].x;
+ coord += uImageIncrement_Stage2;
+ output_Stage2 *= output_Stage1;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/208.shader_test b/shaders/skia/208.shader_test
new file mode 100644
index 0000000..56d81f3
--- /dev/null
+++ b/shaders/skia/208.shader_test
@@ -0,0 +1,145 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage2;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.w) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ } else {
+ {
+ if (t < uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+vec4 ComposeOne_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_dst_in(_input, TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0)));
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = ComposeOne_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 blend_dst_out(vec4 src, vec4 dst) {
+ return (1.0 - src.w) * dst;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_dst_out(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ {
+ output_Stage2 = output_Stage1 * ucolor_Stage2;
+ }
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 inColor;
+in vec2 inLocalCoord;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/2080.shader_test b/shaders/skia/2080.shader_test
new file mode 100644
index 0000000..fe0300b
--- /dev/null
+++ b/shaders/skia/2080.shader_test
@@ -0,0 +1,364 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_KHR_blend_equation_advanced : require
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+layout (blend_support_all_equations) out ;
+uniform vec3 uedges_Stage1_c0_c0_c0_c0[8];
+uniform mat4 um_Stage1_c0_c0_c1_c0_c0_c0;
+uniform vec4 uv_Stage1_c0_c0_c1_c0_c0_c0;
+uniform vec2 uImageIncrement_Stage1_c1_c0_c0_c0;
+uniform float uSurfaceScale_Stage1_c1_c0_c0_c0;
+uniform vec3 uLightColor_Stage1_c1_c0_c0_c0;
+uniform float uKD_Stage1_c1_c0_c0_c0;
+uniform vec4 uTexDom_Stage1_c1_c0_c0_c0;
+uniform vec3 uDecalParams_Stage1_c1_c0_c0_c0;
+uniform vec3 uLightLocation_Stage1_c1_c0_c0_c0;
+uniform vec2 uImageIncrement_Stage1_c1_c0_c1_c0;
+uniform vec2 uBounds_Stage1_c1_c0_c1_c0;
+uniform vec4 uKernel_Stage1_c1_c0_c1_c0[3];
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in float vinCoverage_Stage0;
+vec4 ConvexPoly_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float alpha = 1.0;
+ float edge;
+ edge = dot(uedges_Stage1_c0_c0_c0_c0[0], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage1_c0_c0_c0_c0[1], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage1_c0_c0_c0_c0[2], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage1_c0_c0_c0_c0[3], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage1_c0_c0_c0_c0[4], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage1_c0_c0_c0_c0[5], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage1_c0_c0_c0_c0[6], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage1_c0_c0_c0_c0[7], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ alpha = 1.0 - alpha;
+ _output = _input * alpha;
+ return _output;
+}
+vec4 ColorMatrixFragmentProcessor_Stage1_c0_c0_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = _input;
+ {
+ float nonZeroAlpha = max(inputColor.w, 9.9999997473787516e-05);
+ inputColor = vec4(inputColor.xyz / nonZeroAlpha, inputColor.w);
+ }
+ _output = um_Stage1_c0_c0_c1_c0_c0_c0 * inputColor + uv_Stage1_c0_c0_c1_c0_c0_c0;
+ {
+ _output = clamp(_output, 0.0, 1.0);
+ }
+ return _output;
+}
+vec4 ClampFragmentProcessor_Stage1_c0_c0_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ float alpha = clamp(_input.w, 0.0, 1.0);
+ _output = vec4(clamp(_input.xyz, 0.0, alpha), alpha);
+ }
+ return _output;
+}
+vec4 blend_src_atop(vec4 src, vec4 dst) {
+ return dst.w * src + (1.0 - src.w) * dst;
+}
+vec4 ComposeTwo_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_src_atop(ColorMatrixFragmentProcessor_Stage1_c0_c0_c1_c0_c0_c0(inputColor), ClampFragmentProcessor_Stage1_c0_c0_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 blend_src_out(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src;
+}
+vec4 ComposeTwo_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_src_out(ConvexPoly_Stage1_c0_c0_c0_c0(inputColor), ComposeTwo_Stage1_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 light_Stage1_c1_c0_c0_c0(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ float colorScale = uKD_Stage1_c1_c0_c0_c0 * dot(normal, surfaceToLight);
+ return vec4(lightColor * clamp(colorScale, 0.0, 1.0), 1.0);
+}
+float sobel_Stage1_c1_c0_c0_c0(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage1_c1_c0_c0_c0(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage1_c1_c0_c0_c0(float m[9], float surfaceScale) {
+ return pointToNormal_Stage1_c1_c0_c0_c0(sobel_Stage1_c1_c0_c0_c0(m[1], m[2], m[4], m[5], 0.0, 0.0, 0.66666698455810547), sobel_Stage1_c1_c0_c0_c0(0.0, 0.0, m[1], m[4], m[2], m[5], 0.66666698455810547), surfaceScale);
+}
+vec4 DiffuseLighting_Stage1_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coord = vTransformedCoords_0_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage1_c1_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0.xy, uTexDom_Stage1_c1_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp0 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1_c1_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0.xy, uTexDom_Stage1_c1_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1_c1_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0.xy, uTexDom_Stage1_c1_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage1_c1_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0.xy, uTexDom_Stage1_c1_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0.xy, uTexDom_Stage1_c1_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1_c1_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0.xy, uTexDom_Stage1_c1_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp5 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage1_c1_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0.xy, uTexDom_Stage1_c1_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp6 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage1_c1_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0.xy, uTexDom_Stage1_c1_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp7 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage1_c1_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0.xy, uTexDom_Stage1_c1_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp8 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = normalize(uLightLocation_Stage1_c1_c0_c0_c0 - vec3(gl_FragCoord.xy, uSurfaceScale_Stage1_c1_c0_c0_c0 * m[4]));
+ _output = light_Stage1_c1_c0_c0_c0(normal_Stage1_c1_c0_c0_c0(m, uSurfaceScale_Stage1_c1_c0_c0_c0), surfaceToLight, uLightColor_Stage1_c1_c0_c0_c0);
+ _output *= _input;
+ return _output;
+}
+vec4 GaussianConvolution_Stage1_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_1_Stage0 - 4.0 * uImageIncrement_Stage1_c1_c0_c1_c0;
+ vec2 coordSampled = vec2(0.0, 0.0);
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1_c1_c0_c1_c0.x, uBounds_Stage1_c1_c0_c1_c0.y);
+ _output += texture(uTextureSampler_1_Stage1, coordSampled) * uKernel_Stage1_c1_c0_c1_c0[0].x;
+ coord += uImageIncrement_Stage1_c1_c0_c1_c0;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1_c1_c0_c1_c0.x, uBounds_Stage1_c1_c0_c1_c0.y);
+ _output += texture(uTextureSampler_1_Stage1, coordSampled) * uKernel_Stage1_c1_c0_c1_c0[0].y;
+ coord += uImageIncrement_Stage1_c1_c0_c1_c0;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1_c1_c0_c1_c0.x, uBounds_Stage1_c1_c0_c1_c0.y);
+ _output += texture(uTextureSampler_1_Stage1, coordSampled) * uKernel_Stage1_c1_c0_c1_c0[0].z;
+ coord += uImageIncrement_Stage1_c1_c0_c1_c0;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1_c1_c0_c1_c0.x, uBounds_Stage1_c1_c0_c1_c0.y);
+ _output += texture(uTextureSampler_1_Stage1, coordSampled) * uKernel_Stage1_c1_c0_c1_c0[0].w;
+ coord += uImageIncrement_Stage1_c1_c0_c1_c0;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1_c1_c0_c1_c0.x, uBounds_Stage1_c1_c0_c1_c0.y);
+ _output += texture(uTextureSampler_1_Stage1, coordSampled) * uKernel_Stage1_c1_c0_c1_c0[1].x;
+ coord += uImageIncrement_Stage1_c1_c0_c1_c0;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1_c1_c0_c1_c0.x, uBounds_Stage1_c1_c0_c1_c0.y);
+ _output += texture(uTextureSampler_1_Stage1, coordSampled) * uKernel_Stage1_c1_c0_c1_c0[1].y;
+ coord += uImageIncrement_Stage1_c1_c0_c1_c0;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1_c1_c0_c1_c0.x, uBounds_Stage1_c1_c0_c1_c0.y);
+ _output += texture(uTextureSampler_1_Stage1, coordSampled) * uKernel_Stage1_c1_c0_c1_c0[1].z;
+ coord += uImageIncrement_Stage1_c1_c0_c1_c0;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1_c1_c0_c1_c0.x, uBounds_Stage1_c1_c0_c1_c0.y);
+ _output += texture(uTextureSampler_1_Stage1, coordSampled) * uKernel_Stage1_c1_c0_c1_c0[1].w;
+ coord += uImageIncrement_Stage1_c1_c0_c1_c0;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1_c1_c0_c1_c0.x, uBounds_Stage1_c1_c0_c1_c0.y);
+ _output += texture(uTextureSampler_1_Stage1, coordSampled) * uKernel_Stage1_c1_c0_c1_c0[2].x;
+ coord += uImageIncrement_Stage1_c1_c0_c1_c0;
+ _output *= _input;
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+vec4 ComposeTwo_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_dst_in(DiffuseLighting_Stage1_c1_c0_c0_c0(inputColor), GaussianConvolution_Stage1_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 blend_dst_over(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src + dst;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ float alpha = 1.0;
+ alpha = vinCoverage_Stage0;
+ outputCoverage_Stage0 = vec4(alpha);
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_dst_over(ComposeTwo_Stage1_c0_c0(inputColor), ComposeTwo_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ sk_FragColor = outputCoverage_Stage0 * output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in float inCoverage;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out float vinCoverage_Stage0;
+void main() {
+ vec4 color = inColor;
+ vcolor_Stage0 = color;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(inPosition, 1.0)).xy;
+ vinCoverage_Stage0 = inCoverage;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/2083.shader_test b/shaders/skia/2083.shader_test
new file mode 100644
index 0000000..67e6b75
--- /dev/null
+++ b/shaders/skia/2083.shader_test
@@ -0,0 +1,335 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_KHR_blend_equation_advanced : require
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+layout (blend_support_all_equations) out ;
+uniform vec4 uCoordTransformMatrix_5_Stage0;
+uniform vec2 uImageIncrement_Stage2_c0_c0;
+uniform vec4 uKernel_Stage2_c0_c0[3];
+uniform vec2 uKernelOffset_Stage2_c0_c0;
+uniform float uGain_Stage2_c0_c0;
+uniform float uBias_Stage2_c0_c0;
+uniform vec4 uTexDom_Stage2_c0_c0;
+uniform float uPixelSize_Stage2_c1_c0;
+uniform vec2 uRange_Stage2_c1_c0;
+uniform vec4 uinnerRect_Stage3_c3_c0;
+uniform vec4 uinvRadiiLTRB_Stage3_c3_c0;
+uniform vec2 uScale_Stage4;
+uniform vec4 uTexDom_Stage4;
+uniform vec3 uDecalParams_Stage4;
+uniform sampler2D uTextureSampler_0_Stage2;
+uniform sampler2D uTextureSampler_1_Stage2;
+uniform sampler2D uTextureSampler_0_Stage4;
+uniform sampler2D uTextureSampler_1_Stage4;
+uniform sampler2D uTextureSampler_0_Stage5;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+noperspective in vec2 vTransformedCoords_3_Stage0;
+noperspective in vec2 vTransformedCoords_4_Stage0;
+noperspective in float vinCoverage_Stage0;
+vec4 MatrixConvolution_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 sum = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0 - uKernelOffset_Stage2_c0_c0 * uImageIncrement_Stage2_c0_c0;
+ vec4 c;
+ {
+ float k = uKernel_Stage2_c0_c0[0].x;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2_c0_c0[0].y;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2_c0_c0[0].z;
+ {
+ vec2 origCoord = coord + vec2(2.0, 0.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2_c0_c0[0].w;
+ {
+ vec2 origCoord = coord + vec2(3.0, 0.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2_c0_c0[1].x;
+ {
+ vec2 origCoord = coord + vec2(4.0, 0.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2_c0_c0[1].y;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2_c0_c0[1].z;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2_c0_c0[1].w;
+ {
+ vec2 origCoord = coord + vec2(2.0, 1.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2_c0_c0[2].x;
+ {
+ vec2 origCoord = coord + vec2(3.0, 1.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2_c0_c0[2].y;
+ {
+ vec2 origCoord = coord + vec2(4.0, 1.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ vec2 origCoord = vTransformedCoords_0_Stage0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ c = textureColor;
+ }
+ _output.w = c.w;
+ _output.xyz = clamp(sum.xyz * uGain_Stage2_c0_c0 + uBias_Stage2_c0_c0, 0.0, 1.0);
+ _output.xyz *= _output.w;
+ _output *= _input;
+ return _output;
+}
+vec4 Morphology_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = vec4(1.0, 1.0, 1.0, 1.0);
+ vec2 coord = vTransformedCoords_1_Stage0;
+ coord.x -= 9.0 * uPixelSize_Stage2_c1_c0;
+ for (int i = 0;i < 19; i++) {
+ _output = min(_output, texture(uTextureSampler_1_Stage2, coord));
+ coord.x += uPixelSize_Stage2_c1_c0;
+ }
+ _output *= _input;
+ return _output;
+}
+vec4 ClampFragmentProcessor_Stage3_c2_c0(vec4 _input) {
+ vec4 _output;
+ {
+ float alpha = clamp(_input.w, 0.0, 1.0);
+ _output = vec4(clamp(_input.xyz, 0.0, alpha), alpha);
+ }
+ return _output;
+}
+vec4 EllipticalRRect_Stage3_c3_c0(vec4 _input) {
+ vec4 _output;
+ vec2 dxy0 = uinnerRect_Stage3_c3_c0.xy - gl_FragCoord.xy;
+ vec2 dxy1 = gl_FragCoord.xy - uinnerRect_Stage3_c3_c0.zw;
+ vec2 dxy = max(max(dxy0, dxy1), 0.0);
+ vec2 Z = max(max(dxy0 * uinvRadiiLTRB_Stage3_c3_c0.xy, dxy1 * uinvRadiiLTRB_Stage3_c3_c0.zw), 0.0);
+ float implicit = dot(Z, dxy) - 1.0;
+ float grad_dot = 4.0 * dot(Z, Z);
+ grad_dot = max(grad_dot, 9.9999997473787516e-05);
+ float approx_dist = implicit * inversesqrt(grad_dot);
+ float alpha = clamp(0.5 - approx_dist, 0.0, 1.0);
+ _output = _input * alpha;
+ return _output;
+}
+vec4 TextureEffect_Stage5_c4_c0(vec4 _input, vec2 _coords) {
+ _coords = _coords * uCoordTransformMatrix_5_Stage0.xz + uCoordTransformMatrix_5_Stage0.yw;
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage5, _coords) * _input;
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+vec4 blend_screen(vec4 src, vec4 dst) {
+ return src + (1.0 - src) * dst;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ float alpha = 1.0;
+ alpha = vinCoverage_Stage0;
+ outputCoverage_Stage0 = vec4(alpha);
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = floor(outputColor_Stage0 * 255.0 + 0.5) / 255.0;
+ {
+ output_Stage1.xyz = floor((output_Stage1.xyz * output_Stage1.w) * 255.0 + 0.5) / 255.0;
+ }
+ }
+ vec4 output_Stage2;
+ {
+ vec4 inputColor = vec4(output_Stage1.xyz, 1.0);
+ output_Stage2 = blend_dst_in(MatrixConvolution_Stage2_c0_c0(inputColor), Morphology_Stage2_c1_c0(inputColor));
+ output_Stage2 *= output_Stage1.w;
+ }
+ vec4 output_Stage3;
+ {
+ vec4 inputColor = vec4(outputCoverage_Stage0.xyz, 1.0);
+ output_Stage3 = blend_screen(ClampFragmentProcessor_Stage3_c2_c0(inputColor), EllipticalRRect_Stage3_c3_c0(inputColor));
+ output_Stage3 *= outputCoverage_Stage0.w;
+ }
+ vec4 output_Stage4;
+ {
+ vec4 dColor = texture(uTextureSampler_0_Stage4, vTransformedCoords_2_Stage0);
+ dColor.xyz = dColor.w < 9.9999999747524271e-07 ? vec3(0.0) : clamp(dColor.xyz / dColor.w, 0.0, 1.0);
+ vec2 cCoords = vTransformedCoords_3_Stage0 + uScale_Stage4 * (dColor.zw - vec2(0.5));
+ {
+ vec2 origCoord = cCoords;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage4.xy, uTexDom_Stage4.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage4, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage4.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage4.y);
+ if (err > uDecalParams_Stage4.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage4.z < 1.0) {
+ err = 0.0;
+ }
+ output_Stage4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ }
+ vec4 output_Stage5;
+ {
+ float coord = vTransformedCoords_4_Stage0.x - 0.5;
+ float f = fract(coord);
+ coord += 0.5 - f;
+ float f2 = f * f;
+ vec4 w = mat4(0.055555555555555552, 0.88888888888888884, 0.055555555555555552, 0.0, -0.5, 0.0, 0.5, 0.0, 0.83333333333333337, -2.0, 1.5, -0.33333333333333331, -0.3888888888888889, 1.1666666666666667, -1.1666666666666667, 0.3888888888888889) * vec4(1.0, f, f2, f2 * f);
+ vec4 c[4];
+ c[0] = TextureEffect_Stage5_c4_c0(vec4(1.0), vec2(coord + -1.0, vTransformedCoords_4_Stage0.y));
+ c[1] = TextureEffect_Stage5_c4_c0(vec4(1.0), vec2(coord, vTransformedCoords_4_Stage0.y));
+ c[2] = TextureEffect_Stage5_c4_c0(vec4(1.0), vec2(coord + 1.0, vTransformedCoords_4_Stage0.y));
+ c[3] = TextureEffect_Stage5_c4_c0(vec4(1.0), vec2(coord + 2.0, vTransformedCoords_4_Stage0.y));
+ vec4 bicubicColor = ((c[0] * w.x + c[1] * w.y) + c[2] * w.z) + c[3] * w.w;
+ bicubicColor.xyz = max(vec3(0.0), min(bicubicColor.xyz, bicubicColor.www));
+ output_Stage5 = bicubicColor * output_Stage4;
+ }
+ {
+ sk_FragColor = output_Stage5 * output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+uniform mat3 uCoordTransformMatrix_3_Stage0;
+uniform mat3 uCoordTransformMatrix_4_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in float inCoverage;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+noperspective out vec2 vTransformedCoords_3_Stage0;
+noperspective out vec2 vTransformedCoords_4_Stage0;
+noperspective out float vinCoverage_Stage0;
+void main() {
+ vec4 color = inColor;
+ vcolor_Stage0 = color;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_3_Stage0 = (uCoordTransformMatrix_3_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_4_Stage0 = (uCoordTransformMatrix_4_Stage0 * vec3(inPosition, 1.0)).xy;
+ vinCoverage_Stage0 = inCoverage;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/2089.shader_test b/shaders/skia/2089.shader_test
new file mode 100644
index 0000000..075d2ed
--- /dev/null
+++ b/shaders/skia/2089.shader_test
@@ -0,0 +1,326 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1_c0_c0_c0_c0;
+uniform float uSurfaceScale_Stage1_c0_c0_c0_c0;
+uniform vec3 uLightColor_Stage1_c0_c0_c0_c0;
+uniform float uKD_Stage1_c0_c0_c0_c0;
+uniform vec4 uTexDom_Stage1_c0_c0_c0_c0;
+uniform vec3 uDecalParams_Stage1_c0_c0_c0_c0;
+uniform vec3 uLightDirection_Stage1_c0_c0_c0_c0;
+uniform vec2 uScale_Stage1_c0_c0_c1_c0;
+uniform vec4 uTexDom_Stage1_c0_c0_c1_c0;
+uniform vec3 uDecalParams_Stage1_c0_c0_c1_c0;
+uniform float ucornerRadius_Stage1_c1_c0;
+uniform vec4 uproxyRect_Stage1_c1_c0;
+uniform float ublurRadius_Stage1_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+uniform sampler2D uTextureSampler_2_Stage1;
+uniform sampler2D uTextureSampler_3_Stage1;
+in vec4 vcolor_Stage0;
+in vec2 vTransformedCoords_0_Stage0;
+in vec2 vTransformedCoords_1_Stage0;
+in vec2 vTransformedCoords_2_Stage0;
+vec4 light_Stage1_c0_c0_c0_c0(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ float colorScale = uKD_Stage1_c0_c0_c0_c0 * dot(normal, surfaceToLight);
+ return vec4(lightColor * clamp(colorScale, 0.0, 1.0), 1.0);
+}
+float sobel_Stage1_c0_c0_c0_c0(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage1_c0_c0_c0_c0(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage1_c0_c0_c0_c0(float m[9], float surfaceScale) {
+ return pointToNormal_Stage1_c0_c0_c0_c0(sobel_Stage1_c0_c0_c0_c0(m[1], m[2], m[4], m[5], 0.0, 0.0, 0.66666698455810547), sobel_Stage1_c0_c0_c0_c0(0.0, 0.0, m[1], m[4], m[2], m[5], 0.66666698455810547), surfaceScale);
+}
+vec4 DiffuseLighting_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coord = vTransformedCoords_0_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage1_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp0 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage1_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp5 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage1_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp6 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage1_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp7 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage1_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp8 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = uLightDirection_Stage1_c0_c0_c0_c0;
+ _output = light_Stage1_c0_c0_c0_c0(normal_Stage1_c0_c0_c0_c0(m, uSurfaceScale_Stage1_c0_c0_c0_c0), surfaceToLight, uLightColor_Stage1_c0_c0_c0_c0);
+ _output *= _input;
+ return _output;
+}
+vec4 DisplacementMap_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 dColor = texture(uTextureSampler_1_Stage1, vTransformedCoords_1_Stage0);
+ dColor.xyz = dColor.w < 9.9999999747524271e-07 ? vec3(0.0) : clamp(dColor.xyz / dColor.w, 0.0, 1.0);
+ vec2 cCoords = vTransformedCoords_2_Stage0 + uScale_Stage1_c0_c0_c1_c0 * (dColor.yz - vec2(0.5));
+ {
+ vec2 origCoord = cCoords;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c1_c0.xy, uTexDom_Stage1_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ _output = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ return _output;
+}
+vec4 blend_src_atop(vec4 src, vec4 dst) {
+ return dst.w * src + (1.0 - src.w) * dst;
+}
+vec4 ComposeTwo_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_src_atop(DiffuseLighting_Stage1_c0_c0_c0_c0(inputColor), DisplacementMap_Stage1_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 RRectBlurEffect_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 translatedFragPos = gl_FragCoord.xy - uproxyRect_Stage1_c1_c0.xy;
+ float threshold = ucornerRadius_Stage1_c1_c0 + 2.0 * ublurRadius_Stage1_c1_c0;
+ vec2 middle = (uproxyRect_Stage1_c1_c0.zw - uproxyRect_Stage1_c1_c0.xy) - 2.0 * threshold;
+ if (translatedFragPos.x >= threshold && translatedFragPos.x < middle.x + threshold) {
+ translatedFragPos.x = threshold;
+ } else if (translatedFragPos.x >= middle.x + threshold) {
+ translatedFragPos.x -= middle.x - 1.0;
+ }
+ if (translatedFragPos.y > threshold && translatedFragPos.y < middle.y + threshold) {
+ translatedFragPos.y = threshold;
+ } else if (translatedFragPos.y >= middle.y + threshold) {
+ translatedFragPos.y -= middle.y - 1.0;
+ }
+ vec2 proxyDims = vec2(2.0 * threshold + 1.0);
+ vec2 texCoord = translatedFragPos / proxyDims;
+ _output = _input * texture(uTextureSampler_3_Stage1, texCoord);
+ return _output;
+}
+float _blend_color_saturation(vec3 color) {
+ return max(max(color.x, color.y), color.z) - min(min(color.x, color.y), color.z);
+}
+vec3 _blend_set_color_saturation_helper(vec3 minMidMax, float sat) {
+ if (minMidMax.x < minMidMax.z) {
+ return vec3(0.0, (sat * (minMidMax.y - minMidMax.x)) / (minMidMax.z - minMidMax.x), sat);
+ }
+ return vec3(0.0);
+}
+vec3 _blend_set_color_saturation(vec3 hueLumColor, vec3 satColor) {
+ float sat = _blend_color_saturation(satColor);
+ if (hueLumColor.x <= hueLumColor.y) {
+ if (hueLumColor.y <= hueLumColor.z) {
+ hueLumColor.xyz = _blend_set_color_saturation_helper(hueLumColor, sat);
+ } else if (hueLumColor.x <= hueLumColor.z) {
+ hueLumColor.xzy = _blend_set_color_saturation_helper(hueLumColor.xzy, sat);
+ } else {
+ hueLumColor.zxy = _blend_set_color_saturation_helper(hueLumColor.zxy, sat);
+ }
+ } else if (hueLumColor.x <= hueLumColor.z) {
+ hueLumColor.yxz = _blend_set_color_saturation_helper(hueLumColor.yxz, sat);
+ } else if (hueLumColor.y <= hueLumColor.z) {
+ hueLumColor.yzx = _blend_set_color_saturation_helper(hueLumColor.yzx, sat);
+ } else {
+ hueLumColor.zyx = _blend_set_color_saturation_helper(hueLumColor.zyx, sat);
+ }
+ return hueLumColor;
+}
+float _blend_color_luminance(vec3 color) {
+ return dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), color);
+}
+vec3 _blend_set_color_luminance(vec3 hueSatColor, float alpha, vec3 lumColor) {
+ float lum = _blend_color_luminance(lumColor);
+ vec3 result = (lum - _blend_color_luminance(hueSatColor)) + hueSatColor;
+ float minComp = min(min(result.x, result.y), result.z);
+ float maxComp = max(max(result.x, result.y), result.z);
+ if (minComp < 0.0 && lum != minComp) {
+ result = lum + ((result - lum) * lum) / (lum - minComp);
+ }
+ if (maxComp > alpha && maxComp != lum) {
+ return lum + ((result - lum) * (alpha - lum)) / (maxComp - lum);
+ }
+ return result;
+}
+vec4 blend_saturation(vec4 src, vec4 dst) {
+ float alpha = dst.w * src.w;
+ vec3 sda = src.xyz * dst.w;
+ vec3 dsa = dst.xyz * src.w;
+ return vec4((((_blend_set_color_luminance(_blend_set_color_saturation(dsa, sda), alpha, dsa) + dst.xyz) - dsa) + src.xyz) - sda, (src.w + dst.w) - alpha);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_saturation(ComposeTwo_Stage1_c0_c0(inputColor), RRectBlurEffect_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+out vec4 vcolor_Stage0;
+out vec2 vTransformedCoords_0_Stage0;
+out vec2 vTransformedCoords_1_Stage0;
+out vec2 vTransformedCoords_2_Stage0;
+void main() {
+ vec4 color = inColor;
+ vcolor_Stage0 = color;
+ vec3 pos3 = uViewM_Stage0 * vec3(inPosition, 1.0);
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos3.x, pos3.y, 0.0, pos3.z);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/2092.shader_test b/shaders/skia/2092.shader_test
new file mode 100644
index 0000000..a73594b
--- /dev/null
+++ b/shaders/skia/2092.shader_test
@@ -0,0 +1,125 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage0;
+noperspective in vec2 vTextureCoords_Stage0;
+flat in int vTexIndex_Stage0;
+noperspective in vec4 vinColor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_0_Stage0;
+ float t = -1.0;
+ {
+ {
+ float r0 = ufocalParams_Stage1_c0_c0_c0_c0.x;
+ {
+ t = length(p) - r0;
+ }
+ }
+ }
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ vec4 texColor;
+ {
+ texColor = texture(uTextureSampler_0_Stage0, vTextureCoords_Stage0);
+ }
+ outputCoverage_Stage0 = texColor;
+ }
+ {
+ blend_dst_in(outputCoverage_Stage0, TiledGradientEffect_Stage1_c0_c0(vec4(1.0)));
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform vec2 uAtlasSizeInv_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in uvec2 inTextureCoords;
+noperspective out vec2 vTextureCoords_Stage0;
+flat out int vTexIndex_Stage0;
+noperspective out vec4 vinColor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ ivec2 signedCoords = ivec2(int(inTextureCoords.x), int(inTextureCoords.y));
+ vec2 unormTexCoords = vec2(float(signedCoords.x / 2), float(signedCoords.y / 2));
+ vTextureCoords_Stage0 = unormTexCoords * uAtlasSizeInv_Stage0;
+ vTexIndex_Stage0 = 0;
+ vinColor_Stage0 = inColor;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(inPosition.x, inPosition.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/2095.shader_test b/shaders/skia/2095.shader_test
new file mode 100644
index 0000000..7305636
--- /dev/null
+++ b/shaders/skia/2095.shader_test
@@ -0,0 +1,52 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform float uinnerThreshold_Stage1;
+uniform float uouterThreshold_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ vec4 color = vec4(1.0);
+ vec4 mask_color = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ if (mask_color.w < 0.5) {
+ if (1.0 > uouterThreshold_Stage1) {
+ float scale = uouterThreshold_Stage1;
+ color.xyz *= scale;
+ color.w = uouterThreshold_Stage1;
+ }
+ } else if (1.0 < uinnerThreshold_Stage1) {
+ float scale = uinnerThreshold_Stage1 / max(0.0010000000474974513, 1.0);
+ color.xyz *= scale;
+ color.w = uinnerThreshold_Stage1;
+ }
+ output_Stage1 = color;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/2098.shader_test b/shaders/skia/2098.shader_test
new file mode 100644
index 0000000..9524b55
--- /dev/null
+++ b/shaders/skia/2098.shader_test
@@ -0,0 +1,201 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uCoordTransformMatrix_2_Stage0;
+uniform vec2 uImageIncrement_Stage2;
+uniform vec2 uBounds_Stage2;
+uniform vec4 uKernel_Stage2[3];
+uniform vec4 uboundsUniform_Stage4;
+uniform float uxInvZoom_Stage4;
+uniform float uyInvZoom_Stage4;
+uniform float uxInvInset_Stage4;
+uniform float uyInvInset_Stage4;
+uniform vec2 uoffset_Stage4;
+uniform sampler2D uTextureSampler_0_Stage2;
+uniform sampler2D uTextureSampler_0_Stage3;
+uniform sampler2D uTextureSampler_0_Stage4;
+in vec2 vEllipseOffsets0_Stage0;
+in vec2 vEllipseOffsets1_Stage0;
+in vec4 vinColor_Stage0;
+in vec2 vTransformedCoords_0_Stage0;
+in vec2 vTransformedCoords_1_Stage0;
+in vec2 vTransformedCoords_3_Stage0;
+vec4 ClampFragmentProcessor_Stage1_c0_c0(vec4 _input, vec2 _coords) {
+ vec4 _output;
+ {
+ float alpha = clamp(_input.w, 0.0, 1.0);
+ _output = vec4(clamp(_input.xyz, 0.0, alpha), alpha);
+ }
+ return _output;
+}
+vec4 TextureEffect_Stage3_c1_c0(vec4 _input, vec2 _coords) {
+ _coords = _coords * uCoordTransformMatrix_2_Stage0.xz + uCoordTransformMatrix_2_Stage0.yw;
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage3, _coords) * _input;
+ return _output;
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ vec2 scaledOffset = vEllipseOffsets0_Stage0;
+ float test = dot(scaledOffset, scaledOffset) - 1.0;
+ vec2 duvdx = dFdx(vEllipseOffsets0_Stage0);
+ vec2 duvdy = dFdy(vEllipseOffsets0_Stage0);
+ vec2 grad = vec2(vEllipseOffsets0_Stage0.x * duvdx.x + vEllipseOffsets0_Stage0.y * duvdx.y, vEllipseOffsets0_Stage0.x * duvdy.x + vEllipseOffsets0_Stage0.y * duvdy.y);
+ float grad_dot = 4.0 * dot(grad, grad);
+ grad_dot = max(grad_dot, 1.1754999560161448e-38);
+ float invlen = inversesqrt(grad_dot);
+ float edgeAlpha = clamp(0.5 - test * invlen, 0.0, 1.0);
+ scaledOffset = vEllipseOffsets1_Stage0;
+ test = dot(scaledOffset, scaledOffset) - 1.0;
+ duvdx = dFdx(vEllipseOffsets1_Stage0);
+ duvdy = dFdy(vEllipseOffsets1_Stage0);
+ grad = vec2(vEllipseOffsets1_Stage0.x * duvdx.x + vEllipseOffsets1_Stage0.y * duvdx.y, vEllipseOffsets1_Stage0.x * duvdy.x + vEllipseOffsets1_Stage0.y * duvdy.y);
+ grad_dot = 4.0 * dot(grad, grad);
+ invlen = inversesqrt(grad_dot);
+ edgeAlpha *= clamp(0.5 + test * invlen, 0.0, 1.0);
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampFragmentProcessor_Stage1_c0_c0(outputCoverage_Stage0, gl_FragCoord.xy);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0 - 5.0 * uImageIncrement_Stage2;
+ vec2 coordSampled = vec2(0.0, 0.0);
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage2.x, uBounds_Stage2.y - uBounds_Stage2.x) + uBounds_Stage2.x;
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[0].x;
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage2.x, uBounds_Stage2.y - uBounds_Stage2.x) + uBounds_Stage2.x;
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[0].y;
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage2.x, uBounds_Stage2.y - uBounds_Stage2.x) + uBounds_Stage2.x;
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[0].z;
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage2.x, uBounds_Stage2.y - uBounds_Stage2.x) + uBounds_Stage2.x;
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[0].w;
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage2.x, uBounds_Stage2.y - uBounds_Stage2.x) + uBounds_Stage2.x;
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[1].x;
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage2.x, uBounds_Stage2.y - uBounds_Stage2.x) + uBounds_Stage2.x;
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[1].y;
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage2.x, uBounds_Stage2.y - uBounds_Stage2.x) + uBounds_Stage2.x;
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[1].z;
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage2.x, uBounds_Stage2.y - uBounds_Stage2.x) + uBounds_Stage2.x;
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[1].w;
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage2.x, uBounds_Stage2.y - uBounds_Stage2.x) + uBounds_Stage2.x;
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[2].x;
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage2.x, uBounds_Stage2.y - uBounds_Stage2.x) + uBounds_Stage2.x;
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[2].y;
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage2.x, uBounds_Stage2.y - uBounds_Stage2.x) + uBounds_Stage2.x;
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[2].z;
+ coord += uImageIncrement_Stage2;
+ output_Stage2 *= output_Stage1;
+ }
+ {
+ vec2 coord = vTransformedCoords_1_Stage0 - vec2(0.5);
+ vec2 f = fract(coord);
+ coord += 0.5 - f;
+ vec4 wx = mat4(0.055555555555555552, 0.88888888888888884, 0.055555555555555552, 0.0, -0.5, 0.0, 0.5, 0.0, 0.83333333333333337, -2.0, 1.5, -0.33333333333333331, -0.3888888888888889, 1.1666666666666667, -1.1666666666666667, 0.3888888888888889) * vec4(1.0, f.x, f.x * f.x, (f.x * f.x) * f.x);
+ vec4 wy = mat4(0.055555555555555552, 0.88888888888888884, 0.055555555555555552, 0.0, -0.5, 0.0, 0.5, 0.0, 0.83333333333333337, -2.0, 1.5, -0.33333333333333331, -0.3888888888888889, 1.1666666666666667, -1.1666666666666667, 0.3888888888888889) * vec4(1.0, f.y, f.y * f.y, (f.y * f.y) * f.y);
+ vec4 rowColors[4];
+ rowColors[0] = TextureEffect_Stage3_c1_c0(vec4(1.0), coord + vec2(-1.0, -1.0));
+ rowColors[1] = TextureEffect_Stage3_c1_c0(vec4(1.0), coord + vec2(0.0, -1.0));
+ rowColors[2] = TextureEffect_Stage3_c1_c0(vec4(1.0), coord + vec2(1.0, -1.0));
+ rowColors[3] = TextureEffect_Stage3_c1_c0(vec4(1.0), coord + vec2(2.0, -1.0));
+ vec4 s0 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ rowColors[0] = TextureEffect_Stage3_c1_c0(vec4(1.0), coord + vec2(-1.0, 0.0));
+ rowColors[1] = TextureEffect_Stage3_c1_c0(vec4(1.0), coord);
+ rowColors[2] = TextureEffect_Stage3_c1_c0(vec4(1.0), coord + vec2(1.0, 0.0));
+ rowColors[3] = TextureEffect_Stage3_c1_c0(vec4(1.0), coord + vec2(2.0, 0.0));
+ vec4 s1 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ rowColors[0] = TextureEffect_Stage3_c1_c0(vec4(1.0), coord + vec2(-1.0, 1.0));
+ rowColors[1] = TextureEffect_Stage3_c1_c0(vec4(1.0), coord + vec2(0.0, 1.0));
+ rowColors[2] = TextureEffect_Stage3_c1_c0(vec4(1.0), coord + vec2(1.0, 1.0));
+ rowColors[3] = TextureEffect_Stage3_c1_c0(vec4(1.0), coord + vec2(2.0, 1.0));
+ vec4 s2 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ rowColors[0] = TextureEffect_Stage3_c1_c0(vec4(1.0), coord + vec2(-1.0, 2.0));
+ rowColors[1] = TextureEffect_Stage3_c1_c0(vec4(1.0), coord + vec2(0.0, 2.0));
+ rowColors[2] = TextureEffect_Stage3_c1_c0(vec4(1.0), coord + vec2(1.0, 2.0));
+ rowColors[3] = TextureEffect_Stage3_c1_c0(vec4(1.0), coord + vec2(2.0, 2.0));
+ vec4 s3 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ vec4 bicubicColor = ((wy.x * s0 + wy.y * s1) + wy.z * s2) + wy.w * s3;
+ bicubicColor.xyz = max(vec3(0.0), min(bicubicColor.xyz, bicubicColor.www));
+ }
+ vec4 output_Stage4;
+ {
+ vec2 coord = vTransformedCoords_3_Stage0;
+ vec2 zoom_coord = uoffset_Stage4 + coord * vec2(uxInvZoom_Stage4, uyInvZoom_Stage4);
+ vec2 delta = (coord - uboundsUniform_Stage4.xy) * uboundsUniform_Stage4.zw;
+ delta = min(delta, vec2(1.0, 1.0) - delta);
+ delta *= vec2(uxInvInset_Stage4, uyInvInset_Stage4);
+ float weight = 0.0;
+ if (delta.x < 2.0 && delta.y < 2.0) {
+ delta = vec2(2.0, 2.0) - delta;
+ float dist = length(delta);
+ dist = max(2.0 - dist, 0.0);
+ weight = min(dist * dist, 1.0);
+ } else {
+ vec2 delta_squared = delta * delta;
+ weight = min(min(delta_squared.x, delta_squared.y), 1.0);
+ }
+ output_Stage4 = texture(uTextureSampler_0_Stage4, mix(coord, zoom_coord, weight));
+ }
+ {
+ sk_FragColor = output_Stage4;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_3_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec2 inEllipseOffsets0;
+in vec2 inEllipseOffsets1;
+out vec2 vEllipseOffsets0_Stage0;
+out vec2 vEllipseOffsets1_Stage0;
+out vec4 vinColor_Stage0;
+out vec2 vTransformedCoords_0_Stage0;
+out vec2 vTransformedCoords_1_Stage0;
+out vec2 vTransformedCoords_3_Stage0;
+void main() {
+ vEllipseOffsets0_Stage0 = inEllipseOffsets0;
+ vEllipseOffsets1_Stage0 = inEllipseOffsets1;
+ vinColor_Stage0 = inColor;
+ vec3 pos3 = uViewM_Stage0 * vec3(inPosition, 1.0);
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_3_Stage0 = (uCoordTransformMatrix_3_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos3.x, pos3.y, 0.0, pos3.z);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/2104.shader_test b/shaders/skia/2104.shader_test
new file mode 100644
index 0000000..cf9727f
--- /dev/null
+++ b/shaders/skia/2104.shader_test
@@ -0,0 +1,161 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+uniform vec2 uScale_Stage1;
+uniform vec4 uTexDom_Stage1;
+uniform vec3 uDecalParams_Stage1;
+uniform vec4 ucircleData_Stage2;
+uniform vec2 uImageIncrement_Stage3;
+uniform vec2 uBounds_Stage3;
+uniform vec4 uKernel_Stage3[4];
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+uniform sampler2D uTextureSampler_0_Stage3;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+noperspective in float vinCoverage_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ vec4 dColor = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ dColor.xyz = dColor.w < 9.9999999747524271e-07 ? vec3(0.0) : clamp(dColor.xyz / dColor.w, 0.0, 1.0);
+ vec2 cCoords = vTransformedCoords_1_Stage0 + uScale_Stage1 * (dColor.zy - vec2(0.5));
+ {
+ vec2 origCoord = cCoords;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ output_Stage1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ }
+ vec4 output_Stage2;
+ {
+ vec2 vec = vec2((gl_FragCoord.x - ucircleData_Stage2.x) * ucircleData_Stage2.w, (gl_FragCoord.y - ucircleData_Stage2.y) * ucircleData_Stage2.w);
+ float dist = length(vec) + (0.5 - ucircleData_Stage2.z) * ucircleData_Stage2.w;
+ output_Stage2 = output_Stage1 * texture(uTextureSampler_0_Stage2, vec2(dist, 0.5)).w;
+ }
+ vec4 output_Stage3;
+ {
+ output_Stage3 = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_2_Stage0 - 7.0 * uImageIncrement_Stage3;
+ vec2 coordSampled = vec2(0.0, 0.0);
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage3.x && coord.y <= uBounds_Stage3.y) {
+ output_Stage3 += texture(uTextureSampler_0_Stage3, coordSampled) * uKernel_Stage3[0].x;
+ }
+ coord += uImageIncrement_Stage3;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage3.x && coord.y <= uBounds_Stage3.y) {
+ output_Stage3 += texture(uTextureSampler_0_Stage3, coordSampled) * uKernel_Stage3[0].y;
+ }
+ coord += uImageIncrement_Stage3;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage3.x && coord.y <= uBounds_Stage3.y) {
+ output_Stage3 += texture(uTextureSampler_0_Stage3, coordSampled) * uKernel_Stage3[0].z;
+ }
+ coord += uImageIncrement_Stage3;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage3.x && coord.y <= uBounds_Stage3.y) {
+ output_Stage3 += texture(uTextureSampler_0_Stage3, coordSampled) * uKernel_Stage3[0].w;
+ }
+ coord += uImageIncrement_Stage3;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage3.x && coord.y <= uBounds_Stage3.y) {
+ output_Stage3 += texture(uTextureSampler_0_Stage3, coordSampled) * uKernel_Stage3[1].x;
+ }
+ coord += uImageIncrement_Stage3;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage3.x && coord.y <= uBounds_Stage3.y) {
+ output_Stage3 += texture(uTextureSampler_0_Stage3, coordSampled) * uKernel_Stage3[1].y;
+ }
+ coord += uImageIncrement_Stage3;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage3.x && coord.y <= uBounds_Stage3.y) {
+ output_Stage3 += texture(uTextureSampler_0_Stage3, coordSampled) * uKernel_Stage3[1].z;
+ }
+ coord += uImageIncrement_Stage3;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage3.x && coord.y <= uBounds_Stage3.y) {
+ output_Stage3 += texture(uTextureSampler_0_Stage3, coordSampled) * uKernel_Stage3[1].w;
+ }
+ coord += uImageIncrement_Stage3;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage3.x && coord.y <= uBounds_Stage3.y) {
+ output_Stage3 += texture(uTextureSampler_0_Stage3, coordSampled) * uKernel_Stage3[2].x;
+ }
+ coord += uImageIncrement_Stage3;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage3.x && coord.y <= uBounds_Stage3.y) {
+ output_Stage3 += texture(uTextureSampler_0_Stage3, coordSampled) * uKernel_Stage3[2].y;
+ }
+ coord += uImageIncrement_Stage3;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage3.x && coord.y <= uBounds_Stage3.y) {
+ output_Stage3 += texture(uTextureSampler_0_Stage3, coordSampled) * uKernel_Stage3[2].z;
+ }
+ coord += uImageIncrement_Stage3;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage3.x && coord.y <= uBounds_Stage3.y) {
+ output_Stage3 += texture(uTextureSampler_0_Stage3, coordSampled) * uKernel_Stage3[2].w;
+ }
+ coord += uImageIncrement_Stage3;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage3.x && coord.y <= uBounds_Stage3.y) {
+ output_Stage3 += texture(uTextureSampler_0_Stage3, coordSampled) * uKernel_Stage3[3].x;
+ }
+ coord += uImageIncrement_Stage3;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage3.x && coord.y <= uBounds_Stage3.y) {
+ output_Stage3 += texture(uTextureSampler_0_Stage3, coordSampled) * uKernel_Stage3[3].y;
+ }
+ coord += uImageIncrement_Stage3;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage3.x && coord.y <= uBounds_Stage3.y) {
+ output_Stage3 += texture(uTextureSampler_0_Stage3, coordSampled) * uKernel_Stage3[3].z;
+ }
+ coord += uImageIncrement_Stage3;
+ output_Stage3 *= output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in float inCoverage;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+noperspective out float vinCoverage_Stage0;
+void main() {
+ vec4 color = inColor;
+ vcolor_Stage0 = color;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(inPosition, 1.0)).xy;
+ vinCoverage_Stage0 = inCoverage;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/2107.shader_test b/shaders/skia/2107.shader_test
new file mode 100644
index 0000000..2b3b38b
--- /dev/null
+++ b/shaders/skia/2107.shader_test
@@ -0,0 +1,57 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uColor_Stage0;
+uniform vec4 ucircle_Stage1;
+uniform vec4 urectUniform_Stage2;
+void main() {
+ vec4 output_Stage1;
+ {
+ float d;
+ {
+ d = (length((ucircle_Stage1.xy - gl_FragCoord.xy) * ucircle_Stage1.w) - 1.0) * ucircle_Stage1.z;
+ }
+ {
+ output_Stage1 = vec4(clamp(d, 0.0, 1.0));
+ }
+ }
+ vec4 output_Stage2;
+ {
+ float alpha;
+ {
+ float xSub, ySub;
+ xSub = min(gl_FragCoord.x - urectUniform_Stage2.x, 0.0);
+ xSub += min(urectUniform_Stage2.z - gl_FragCoord.x, 0.0);
+ ySub = min(gl_FragCoord.y - urectUniform_Stage2.y, 0.0);
+ ySub += min(urectUniform_Stage2.w - gl_FragCoord.y, 0.0);
+ alpha = (1.0 + max(xSub, -1.0)) * (1.0 + max(ySub, -1.0));
+ }
+ output_Stage2 = output_Stage1 * alpha;
+ }
+ {
+ sk_FragColor = 1.0 - output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 inPosition;
+void main() {
+ vec2 pos2 = (uViewM_Stage0 * vec3(inPosition, 1.0)).xy;
+ {
+ vec2 _posTmp = pos2;
+ _posTmp = floor(_posTmp) + vec2(0.5, 0.5);
+ gl_Position = vec4(_posTmp, 0.0, 1.0);
+ }
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/211-2.shader_test b/shaders/skia/211-2.shader_test
new file mode 100644
index 0000000..2689daa
--- /dev/null
+++ b/shaders/skia/211-2.shader_test
@@ -0,0 +1,89 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage2_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c1_c0;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+vec4 blend_plus(vec4 src, vec4 dst) {
+ return min(src + dst, 1.0);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_dst_in(outputColor_Stage0, ClampedGradientEffect_Stage1_c0_c0(vec4(1.0)));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_plus(ConstColorProcessor_Stage2_c1_c0(vec4(1.0)), output_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/211-3.shader_test b/shaders/skia/211-3.shader_test
new file mode 100644
index 0000000..7dbf6ef
--- /dev/null
+++ b/shaders/skia/211-3.shader_test
@@ -0,0 +1,191 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform float uSurfaceScale_Stage1;
+uniform vec3 uLightColor_Stage1;
+uniform float uKD_Stage1;
+uniform vec4 uTexDom_Stage1;
+uniform vec3 uDecalParams_Stage1;
+uniform vec3 uLightDirection_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 light_Stage1(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ float colorScale = uKD_Stage1 * dot(normal, surfaceToLight);
+ return vec4(lightColor * clamp(colorScale, 0.0, 1.0), 1.0);
+}
+float sobel_Stage1(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage1(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage1(float m[9], float surfaceScale) {
+ return pointToNormal_Stage1(sobel_Stage1(m[0], m[2], m[3], m[5], m[6], m[8], 0.25), sobel_Stage1(m[0], m[6], m[1], m[7], m[2], m[8], 0.25), surfaceScale);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ vec2 coord = vTransformedCoords_0_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp0 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp5 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp6 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp7 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp8 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = uLightDirection_Stage1;
+ output_Stage1 = light_Stage1(normal_Stage1(m, uSurfaceScale_Stage1), surfaceToLight, uLightColor_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/211-4.shader_test b/shaders/skia/211-4.shader_test
new file mode 100644
index 0000000..7bb1305
--- /dev/null
+++ b/shaders/skia/211-4.shader_test
@@ -0,0 +1,85 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform float uSrcTF_Stage0[7];
+uniform mat3 uColorXform_Stage0;
+uniform float uDstTF_Stage0[7];
+uniform sampler2D uTextureSampler_0_Stage0;
+flat in vec4 vcolor_Stage0;
+noperspective in vec2 vlocalCoord_Stage0;
+float src_tf_Stage0(float x) {
+ float G = uSrcTF_Stage0[0];
+ float A = uSrcTF_Stage0[1];
+ float B = uSrcTF_Stage0[2];
+ float C = uSrcTF_Stage0[3];
+ float D = uSrcTF_Stage0[4];
+ float E = uSrcTF_Stage0[5];
+ float F = uSrcTF_Stage0[6];
+ float s = sign(x);
+ x = abs(x);
+ x = x < D ? C * x + F : pow(A * x + B, G) + E;
+ return s * x;
+}
+float dst_tf_Stage0(float x) {
+ float G = uDstTF_Stage0[0];
+ float A = uDstTF_Stage0[1];
+ float B = uDstTF_Stage0[2];
+ float C = uDstTF_Stage0[3];
+ float D = uDstTF_Stage0[4];
+ float E = uDstTF_Stage0[5];
+ float F = uDstTF_Stage0[6];
+ float s = sign(x);
+ x = abs(x);
+ x = x < D ? C * x + F : pow(A * x + B, G) + E;
+ return s * x;
+}
+vec4 gamut_xform_Stage0(vec4 color) {
+ color.xyz = uColorXform_Stage0 * color.xyz;
+ return color;
+}
+vec4 color_xform_Stage0(vec4 color) {
+ float nonZeroAlpha = max(color.w, 9.9999997473787516e-05);
+ color = vec4(color.xyz / nonZeroAlpha, nonZeroAlpha);
+ color.x = src_tf_Stage0(color.x);
+ color.y = src_tf_Stage0(color.y);
+ color.z = src_tf_Stage0(color.z);
+ color = gamut_xform_Stage0(color);
+ color.x = dst_tf_Stage0(color.x);
+ color.y = dst_tf_Stage0(color.y);
+ color.z = dst_tf_Stage0(color.z);
+ color.xyz *= color.w;
+ return color;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ vec2 texCoord;
+ texCoord = vlocalCoord_Stage0;
+ outputColor_Stage0 = color_xform_Stage0(texture(uTextureSampler_0_Stage0, texCoord)) * outputColor_Stage0;
+ }
+ {
+ sk_FragColor = outputColor_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+flat out vec4 vcolor_Stage0;
+noperspective out vec2 vlocalCoord_Stage0;
+void main() {
+ vcolor_Stage0 = color;
+ vlocalCoord_Stage0 = localCoord;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/211-5.shader_test b/shaders/skia/211-5.shader_test
new file mode 100644
index 0000000..bdafd1f
--- /dev/null
+++ b/shaders/skia/211-5.shader_test
@@ -0,0 +1,68 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage2;
+uniform vec2 uBounds_Stage2;
+uniform vec4 uKernel_Stage2[2];
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_1_Stage0 - 2.0 * uImageIncrement_Stage2;
+ vec2 coordSampled = vec2(0.0, 0.0);
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage2.x, uBounds_Stage2.y - uBounds_Stage2.x) + uBounds_Stage2.x;
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[0].x;
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage2.x, uBounds_Stage2.y - uBounds_Stage2.x) + uBounds_Stage2.x;
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[0].y;
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage2.x, uBounds_Stage2.y - uBounds_Stage2.x) + uBounds_Stage2.x;
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[0].z;
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage2.x, uBounds_Stage2.y - uBounds_Stage2.x) + uBounds_Stage2.x;
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[0].w;
+ coord += uImageIncrement_Stage2;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage2.x, uBounds_Stage2.y - uBounds_Stage2.x) + uBounds_Stage2.x;
+ output_Stage2 += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2[1].x;
+ coord += uImageIncrement_Stage2;
+ output_Stage2 *= output_Stage1;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/211-6.shader_test b/shaders/skia/211-6.shader_test
new file mode 100644
index 0000000..d909765
--- /dev/null
+++ b/shaders/skia/211-6.shader_test
@@ -0,0 +1,284 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage2_c0_c0;
+uniform float uSurfaceScale_Stage2_c0_c0;
+uniform vec3 uLightColor_Stage2_c0_c0;
+uniform float uKD_Stage2_c0_c0;
+uniform vec4 uTexDom_Stage2_c0_c0;
+uniform vec3 uDecalParams_Stage2_c0_c0;
+uniform vec3 uLightLocation_Stage2_c0_c0;
+uniform float uExponent_Stage2_c0_c0;
+uniform float uCosInnerConeAngle_Stage2_c0_c0;
+uniform float uCosOuterConeAngle_Stage2_c0_c0;
+uniform float uConeScale_Stage2_c0_c0;
+uniform vec3 uS_Stage2_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 light_Stage2_c0_c0(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ float colorScale = uKD_Stage2_c0_c0 * dot(normal, surfaceToLight);
+ return vec4(lightColor * clamp(colorScale, 0.0, 1.0), 1.0);
+}
+float sobel_Stage2_c0_c0(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage2_c0_c0(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage2_c0_c0(float m[9], float surfaceScale) {
+ return pointToNormal_Stage2_c0_c0(sobel_Stage2_c0_c0(m[0], m[1], m[3], m[4], 0.0, 0.0, 0.66666698455810547), sobel_Stage2_c0_c0(m[0], m[3], m[1], m[4], 0.0, 0.0, 0.66666698455810547), surfaceScale);
+}
+vec3 lightColor_Stage2_c0_c0(vec3 surfaceToLight) {
+ float cosAngle = -dot(surfaceToLight, uS_Stage2_c0_c0);
+ if (cosAngle < uCosOuterConeAngle_Stage2_c0_c0) {
+ return vec3(0.0);
+ }
+ float scale = pow(cosAngle, uExponent_Stage2_c0_c0);
+ if (cosAngle < uCosInnerConeAngle_Stage2_c0_c0) {
+ return ((uLightColor_Stage2_c0_c0 * scale) * (cosAngle - uCosOuterConeAngle_Stage2_c0_c0)) * uConeScale_Stage2_c0_c0;
+ }
+ return uLightColor_Stage2_c0_c0;
+}
+vec4 DiffuseLighting_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coord = vTransformedCoords_1_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c0_c0.y);
+ if (err > uDecalParams_Stage2_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp0 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c0_c0.y);
+ if (err > uDecalParams_Stage2_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c0_c0.y);
+ if (err > uDecalParams_Stage2_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c0_c0.y);
+ if (err > uDecalParams_Stage2_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c0_c0.y);
+ if (err > uDecalParams_Stage2_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c0_c0.y);
+ if (err > uDecalParams_Stage2_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp5 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c0_c0.y);
+ if (err > uDecalParams_Stage2_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp6 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c0_c0.y);
+ if (err > uDecalParams_Stage2_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp7 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c0_c0.y);
+ if (err > uDecalParams_Stage2_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp8 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = normalize(uLightLocation_Stage2_c0_c0 - vec3(gl_FragCoord.xy, uSurfaceScale_Stage2_c0_c0 * m[4]));
+ _output = light_Stage2_c0_c0(normal_Stage2_c0_c0(m, uSurfaceScale_Stage2_c0_c0), surfaceToLight, lightColor_Stage2_c0_c0(surfaceToLight));
+ _output *= _input;
+ return _output;
+}
+vec4 ClampFragmentProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ float alpha = clamp(_input.w, 0.0, 1.0);
+ _output = vec4(clamp(_input.xyz, 0.0, alpha), alpha);
+ }
+ return _output;
+}
+float _blend_color_saturation(vec3 color) {
+ return max(max(color.x, color.y), color.z) - min(min(color.x, color.y), color.z);
+}
+vec3 _blend_set_color_saturation_helper(vec3 minMidMax, float sat) {
+ if (minMidMax.x < minMidMax.z) {
+ return vec3(0.0, (sat * (minMidMax.y - minMidMax.x)) / (minMidMax.z - minMidMax.x), sat);
+ }
+ return vec3(0.0);
+}
+vec3 _blend_set_color_saturation(vec3 hueLumColor, vec3 satColor) {
+ float sat = _blend_color_saturation(satColor);
+ if (hueLumColor.x <= hueLumColor.y) {
+ if (hueLumColor.y <= hueLumColor.z) {
+ hueLumColor.xyz = _blend_set_color_saturation_helper(hueLumColor, sat);
+ } else if (hueLumColor.x <= hueLumColor.z) {
+ hueLumColor.xzy = _blend_set_color_saturation_helper(hueLumColor.xzy, sat);
+ } else {
+ hueLumColor.zxy = _blend_set_color_saturation_helper(hueLumColor.zxy, sat);
+ }
+ } else if (hueLumColor.x <= hueLumColor.z) {
+ hueLumColor.yxz = _blend_set_color_saturation_helper(hueLumColor.yxz, sat);
+ } else if (hueLumColor.y <= hueLumColor.z) {
+ hueLumColor.yzx = _blend_set_color_saturation_helper(hueLumColor.yzx, sat);
+ } else {
+ hueLumColor.zyx = _blend_set_color_saturation_helper(hueLumColor.zyx, sat);
+ }
+ return hueLumColor;
+}
+float _blend_color_luminance(vec3 color) {
+ return dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), color);
+}
+vec3 _blend_set_color_luminance(vec3 hueSatColor, float alpha, vec3 lumColor) {
+ float lum = _blend_color_luminance(lumColor);
+ vec3 result = (lum - _blend_color_luminance(hueSatColor)) + hueSatColor;
+ float minComp = min(min(result.x, result.y), result.z);
+ float maxComp = max(max(result.x, result.y), result.z);
+ if (minComp < 0.0 && lum != minComp) {
+ result = lum + ((result - lum) * lum) / (lum - minComp);
+ }
+ if (maxComp > alpha && maxComp != lum) {
+ return lum + ((result - lum) * (alpha - lum)) / (maxComp - lum);
+ }
+ return result;
+}
+vec4 blend_saturation(vec4 src, vec4 dst) {
+ float alpha = dst.w * src.w;
+ vec3 sda = src.xyz * dst.w;
+ vec3 dsa = dst.xyz * src.w;
+ return vec4((((_blend_set_color_luminance(_blend_set_color_saturation(dsa, sda), alpha, dsa) + dst.xyz) - dsa) + src.xyz) - sda, (src.w + dst.w) - alpha);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ vec4 inputColor = vec4(output_Stage1.xyz, 1.0);
+ output_Stage2 = blend_saturation(DiffuseLighting_Stage2_c0_c0(inputColor), ClampFragmentProcessor_Stage2_c1_c0(inputColor));
+ output_Stage2 *= output_Stage1.w;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/211.shader_test b/shaders/skia/211.shader_test
new file mode 100644
index 0000000..0efafba
--- /dev/null
+++ b/shaders/skia/211.shader_test
@@ -0,0 +1,68 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 ucolor_Stage1_c0_c0_c0_c0;
+uniform vec4 ucolor_Stage2;
+noperspective in vec4 vcolor_Stage0;
+vec4 ConstColorProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = _input.w * ucolor_Stage1_c0_c0_c0_c0;
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = ConstColorProcessor_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 blend_dst_out(vec4 src, vec4 dst) {
+ return (1.0 - src.w) * dst;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_dst_out(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ {
+ output_Stage2 = output_Stage1 * ucolor_Stage2;
+ }
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 position;
+in vec4 inColor;
+noperspective out vec4 vcolor_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/2110.shader_test b/shaders/skia/2110.shader_test
new file mode 100644
index 0000000..5cf35a3
--- /dev/null
+++ b/shaders/skia/2110.shader_test
@@ -0,0 +1,90 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec2 uDstTextureUpperLeft_Stage2;
+uniform vec2 uDstTextureCoordScale_Stage2;
+uniform sampler2D uTextureSampler_0_Stage0;
+uniform sampler2D uDstTextureSampler_Stage2;
+in vec2 vTextureCoords_Stage0;
+flat in int vTexIndex_Stage0;
+in vec2 vIntTextureCoords_Stage0;
+in vec4 vinColor_Stage0;
+vec4 Big_Ole_Key_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = _input;
+ return _output;
+}
+vec4 blend_src(vec4 src, vec4 dst) {
+ return src;
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ vec2 uv = vTextureCoords_Stage0;
+ vec4 texColor;
+ {
+ texColor = texture(uTextureSampler_0_Stage0, uv);
+ }
+ float distance = 7.96875 * (texColor.x - 0.50196081399917603);
+ float afwidth;
+ vec2 dist_grad = vec2(dFdx(distance), -dFdy(distance));
+ float dg_len2 = dot(dist_grad, dist_grad);
+ if (dg_len2 < 9.9999997473787516e-05) {
+ dist_grad = vec2(0.70709997415542603, 0.70709997415542603);
+ } else {
+ dist_grad = dist_grad * inversesqrt(dg_len2);
+ }
+ vec2 Jdx = dFdx(vIntTextureCoords_Stage0);
+ vec2 Jdy = -dFdy(vIntTextureCoords_Stage0);
+ vec2 grad = vec2(dist_grad.x * Jdx.x + dist_grad.y * Jdy.x, dist_grad.x * Jdx.y + dist_grad.y * Jdy.y);
+ afwidth = 0.64999997615814209 * length(grad);
+ float val = clamp((distance + afwidth) / (2.0 * afwidth), 0.0, 1.0);
+ outputCoverage_Stage0 = vec4(val);
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = Big_Ole_Key_Stage1_c0_c0(vec4(1.0));
+ }
+ {
+ if (all(lessThanEqual(outputCoverage_Stage0.xyz, vec3(0.0)))) {
+ discard;
+ }
+ vec2 _dstTexCoord = (gl_FragCoord.xy - uDstTextureUpperLeft_Stage2) * uDstTextureCoordScale_Stage2;
+ _dstTexCoord.y = 1.0 - _dstTexCoord.y;
+ vec4 _dstColor = texture(uDstTextureSampler_Stage2, _dstTexCoord);
+ sk_FragColor = blend_src(output_Stage1, _dstColor);
+ sk_FragColor = outputCoverage_Stage0 * sk_FragColor + (vec4(1.0) - outputCoverage_Stage0) * _dstColor;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform vec2 uAtlasDimensionsInv_Stage0;
+uniform mat3 uViewM_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in uvec2 inTextureCoords;
+out vec2 vTextureCoords_Stage0;
+flat out int vTexIndex_Stage0;
+out vec2 vIntTextureCoords_Stage0;
+out vec4 vinColor_Stage0;
+void main() {
+ ivec2 signedCoords = ivec2(int(inTextureCoords.x), int(inTextureCoords.y));
+ vec2 unormTexCoords = vec2(float(signedCoords.x / 2), float(signedCoords.y / 2));
+ vTextureCoords_Stage0 = unormTexCoords * uAtlasDimensionsInv_Stage0;
+ vTexIndex_Stage0 = 0;
+ vIntTextureCoords_Stage0 = unormTexCoords;
+ vinColor_Stage0 = inColor;
+ vec3 pos3 = uViewM_Stage0 * vec3(inPosition, 1.0);
+ gl_Position = vec4(pos3.x, pos3.y, 0.0, pos3.z);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/2113.shader_test b/shaders/skia/2113.shader_test
new file mode 100644
index 0000000..963eb77
--- /dev/null
+++ b/shaders/skia/2113.shader_test
@@ -0,0 +1,34 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uColor_Stage0;
+vec4 Big_Ole_Key_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = _input;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = Big_Ole_Key_Stage1_c0_c0(vec4(1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 inPosition;
+void main() {
+ vec2 pos2 = inPosition;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/2116.shader_test b/shaders/skia/2116.shader_test
new file mode 100644
index 0000000..0e003e5
--- /dev/null
+++ b/shaders/skia/2116.shader_test
@@ -0,0 +1,70 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec2 uDstTextureUpperLeft_Stage2;
+uniform vec2 uDstTextureCoordScale_Stage2;
+uniform sampler2D uTextureSampler_0_Stage0;
+uniform sampler2D uDstTextureSampler_Stage2;
+noperspective in vec2 vTextureCoords_Stage0;
+flat in int vTexIndex_Stage0;
+noperspective in vec4 vinColor_Stage0;
+vec4 Big_Ole_Key_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = _input;
+ return _output;
+}
+vec4 blend_src(vec4 src, vec4 dst) {
+ return src;
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ vec4 texColor;
+ {
+ texColor = texture(uTextureSampler_0_Stage0, vTextureCoords_Stage0);
+ }
+ outputCoverage_Stage0 = texColor;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = Big_Ole_Key_Stage1_c0_c0(vec4(1.0));
+ }
+ {
+ if (all(lessThanEqual(outputCoverage_Stage0.xyz, vec3(0.0)))) {
+ discard;
+ }
+ vec2 _dstTexCoord = (gl_FragCoord.xy - uDstTextureUpperLeft_Stage2) * uDstTextureCoordScale_Stage2;
+ _dstTexCoord.y = 1.0 - _dstTexCoord.y;
+ vec4 _dstColor = texture(uDstTextureSampler_Stage2, _dstTexCoord);
+ sk_FragColor = blend_src(output_Stage1, _dstColor);
+ sk_FragColor = outputCoverage_Stage0 * sk_FragColor + (vec4(1.0) - outputCoverage_Stage0) * _dstColor;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform vec2 uAtlasSizeInv_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in uvec2 inTextureCoords;
+noperspective out vec2 vTextureCoords_Stage0;
+flat out int vTexIndex_Stage0;
+noperspective out vec4 vinColor_Stage0;
+void main() {
+ ivec2 signedCoords = ivec2(int(inTextureCoords.x), int(inTextureCoords.y));
+ vec2 unormTexCoords = vec2(float(signedCoords.x / 2), float(signedCoords.y / 2));
+ vTextureCoords_Stage0 = unormTexCoords * uAtlasSizeInv_Stage0;
+ vTexIndex_Stage0 = 0;
+ vinColor_Stage0 = inColor;
+ gl_Position = vec4(inPosition.x, inPosition.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/2119.shader_test b/shaders/skia/2119.shader_test
new file mode 100644
index 0000000..1af6a92
--- /dev/null
+++ b/shaders/skia/2119.shader_test
@@ -0,0 +1,70 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec2 uDstTextureUpperLeft_Stage2;
+uniform vec2 uDstTextureCoordScale_Stage2;
+uniform sampler2D uDstTextureSampler_Stage2;
+noperspective in vec4 vQuadEdge_Stage0;
+noperspective in vec4 vinColor_Stage0;
+vec4 Big_Ole_Key_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = _input;
+ return _output;
+}
+vec4 blend_src(vec4 src, vec4 dst) {
+ return src;
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ float edgeAlpha;
+ vec2 duvdx = dFdx(vQuadEdge_Stage0.xy);
+ vec2 duvdy = -dFdy(vQuadEdge_Stage0.xy);
+ if (vQuadEdge_Stage0.z > 0.0 && vQuadEdge_Stage0.w > 0.0) {
+ edgeAlpha = min(min(vQuadEdge_Stage0.z, vQuadEdge_Stage0.w) + 0.5, 1.0);
+ } else {
+ vec2 gF = vec2((2.0 * vQuadEdge_Stage0.x) * duvdx.x - duvdx.y, (2.0 * vQuadEdge_Stage0.x) * duvdy.x - duvdy.y);
+ edgeAlpha = vQuadEdge_Stage0.x * vQuadEdge_Stage0.x - vQuadEdge_Stage0.y;
+ edgeAlpha = clamp(0.5 - edgeAlpha / length(gF), 0.0, 1.0);
+ }
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = Big_Ole_Key_Stage1_c0_c0(vec4(1.0));
+ }
+ {
+ if (all(lessThanEqual(outputCoverage_Stage0.xyz, vec3(0.0)))) {
+ discard;
+ }
+ vec2 _dstTexCoord = (gl_FragCoord.xy - uDstTextureUpperLeft_Stage2) * uDstTextureCoordScale_Stage2;
+ _dstTexCoord.y = 1.0 - _dstTexCoord.y;
+ vec4 _dstColor = texture(uDstTextureSampler_Stage2, _dstTexCoord);
+ sk_FragColor = blend_src(output_Stage1, _dstColor);
+ sk_FragColor = outputCoverage_Stage0 * sk_FragColor + (vec4(1.0) - outputCoverage_Stage0) * _dstColor;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 inPosition;
+in vec4 inColor;
+in vec4 inQuadEdge;
+noperspective out vec4 vQuadEdge_Stage0;
+noperspective out vec4 vinColor_Stage0;
+void main() {
+ vQuadEdge_Stage0 = inQuadEdge;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = inPosition;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/2122.shader_test b/shaders/skia/2122.shader_test
new file mode 100644
index 0000000..3a80d6a
--- /dev/null
+++ b/shaders/skia/2122.shader_test
@@ -0,0 +1,54 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uColor_Stage0;
+uniform float uCoverage_Stage0;
+uniform vec2 uDstTextureUpperLeft_Stage2;
+uniform vec2 uDstTextureCoordScale_Stage2;
+uniform sampler2D uDstTextureSampler_Stage2;
+vec4 Big_Ole_Key_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = _input;
+ return _output;
+}
+vec4 blend_src(vec4 src, vec4 dst) {
+ return src;
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ outputCoverage_Stage0 = vec4(uCoverage_Stage0);
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = Big_Ole_Key_Stage1_c0_c0(vec4(1.0));
+ }
+ {
+ if (all(lessThanEqual(outputCoverage_Stage0.xyz, vec3(0.0)))) {
+ discard;
+ }
+ vec2 _dstTexCoord = (gl_FragCoord.xy - uDstTextureUpperLeft_Stage2) * uDstTextureCoordScale_Stage2;
+ _dstTexCoord.y = 1.0 - _dstTexCoord.y;
+ vec4 _dstColor = texture(uDstTextureSampler_Stage2, _dstTexCoord);
+ sk_FragColor = blend_src(output_Stage1, _dstColor);
+ sk_FragColor = outputCoverage_Stage0 * sk_FragColor + (vec4(1.0) - outputCoverage_Stage0) * _dstColor;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 inPosition;
+void main() {
+ vec2 pos2 = inPosition;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/2125.shader_test b/shaders/skia/2125.shader_test
new file mode 100644
index 0000000..19b6d61
--- /dev/null
+++ b/shaders/skia/2125.shader_test
@@ -0,0 +1,86 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec2 uDstTextureUpperLeft_Stage2;
+uniform vec2 uDstTextureCoordScale_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uDstTextureSampler_Stage2;
+noperspective in vec2 vEllipseOffsets_Stage0;
+noperspective in vec4 vEllipseRadii_Stage0;
+noperspective in vec4 vinColor_Stage0;
+vec4 ColorTableEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ float nonZeroAlpha = max(_input.w, 9.9999997473787516e-05);
+ vec4 coord = vec4(_input.xyz / nonZeroAlpha, nonZeroAlpha);
+ coord = coord * 0.9960939884185791 + vec4(0.0019529999699443579, 0.0019529999699443579, 0.0019529999699443579, 0.0019529999699443579);
+ _output.w = texture(uTextureSampler_0_Stage1, vec2(coord.w, 0.125)).w;
+ _output.x = texture(uTextureSampler_0_Stage1, vec2(coord.x, 0.375)).w;
+ _output.y = texture(uTextureSampler_0_Stage1, vec2(coord.y, 0.625)).w;
+ _output.z = texture(uTextureSampler_0_Stage1, vec2(coord.z, 0.875)).w;
+ _output.xyz *= _output.w;
+ return _output;
+}
+vec4 blend_src(vec4 src, vec4 dst) {
+ return src;
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ vec2 offset = vEllipseOffsets_Stage0;
+ offset *= vEllipseRadii_Stage0.xy;
+ float test = dot(offset, offset) - 1.0;
+ vec2 grad = (2.0 * offset) * vEllipseRadii_Stage0.xy;
+ float grad_dot = dot(grad, grad);
+ grad_dot = max(grad_dot, 1.1754999560161448e-38);
+ float invlen = inversesqrt(grad_dot);
+ float edgeAlpha = clamp(0.5 - test * invlen, 0.0, 1.0);
+ offset = vEllipseOffsets_Stage0 * vEllipseRadii_Stage0.zw;
+ test = dot(offset, offset) - 1.0;
+ grad = (2.0 * offset) * vEllipseRadii_Stage0.zw;
+ grad_dot = dot(grad, grad);
+ invlen = inversesqrt(grad_dot);
+ edgeAlpha *= clamp(0.5 + test * invlen, 0.0, 1.0);
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ColorTableEffect_Stage1_c0_c0(vec4(1.0));
+ }
+ {
+ if (all(lessThanEqual(outputCoverage_Stage0.xyz, vec3(0.0)))) {
+ discard;
+ }
+ vec2 _dstTexCoord = (gl_FragCoord.xy - uDstTextureUpperLeft_Stage2) * uDstTextureCoordScale_Stage2;
+ _dstTexCoord.y = 1.0 - _dstTexCoord.y;
+ vec4 _dstColor = texture(uDstTextureSampler_Stage2, _dstTexCoord);
+ sk_FragColor = blend_src(output_Stage1, _dstColor);
+ sk_FragColor = outputCoverage_Stage0 * sk_FragColor + (vec4(1.0) - outputCoverage_Stage0) * _dstColor;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 inPosition;
+in vec4 inColor;
+in vec2 inEllipseOffset;
+in vec4 inEllipseRadii;
+noperspective out vec2 vEllipseOffsets_Stage0;
+noperspective out vec4 vEllipseRadii_Stage0;
+noperspective out vec4 vinColor_Stage0;
+void main() {
+ vEllipseOffsets_Stage0 = inEllipseOffset;
+ vEllipseRadii_Stage0 = inEllipseRadii;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = inPosition;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/2128.shader_test b/shaders/skia/2128.shader_test
new file mode 100644
index 0000000..adb6173
--- /dev/null
+++ b/shaders/skia/2128.shader_test
@@ -0,0 +1,82 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec2 uDstTextureUpperLeft_Stage2;
+uniform vec2 uDstTextureCoordScale_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uDstTextureSampler_Stage2;
+in vec2 vEllipseOffsets0_Stage0;
+in vec2 vEllipseOffsets1_Stage0;
+in vec4 vinColor_Stage0;
+vec4 ColorTableEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ float nonZeroAlpha = max(_input.w, 9.9999997473787516e-05);
+ vec4 coord = vec4(_input.xyz / nonZeroAlpha, nonZeroAlpha);
+ coord = coord * 0.9960939884185791 + vec4(0.0019529999699443579, 0.0019529999699443579, 0.0019529999699443579, 0.0019529999699443579);
+ _output.w = texture(uTextureSampler_0_Stage1, vec2(coord.w, 0.125)).w;
+ _output.x = texture(uTextureSampler_0_Stage1, vec2(coord.x, 0.375)).w;
+ _output.y = texture(uTextureSampler_0_Stage1, vec2(coord.y, 0.625)).w;
+ _output.z = texture(uTextureSampler_0_Stage1, vec2(coord.z, 0.875)).w;
+ _output.xyz *= _output.w;
+ return _output;
+}
+vec4 blend_src(vec4 src, vec4 dst) {
+ return src;
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ vec2 scaledOffset = vEllipseOffsets0_Stage0;
+ float test = dot(scaledOffset, scaledOffset) - 1.0;
+ vec2 duvdx = dFdx(vEllipseOffsets0_Stage0);
+ vec2 duvdy = -dFdy(vEllipseOffsets0_Stage0);
+ vec2 grad = vec2(vEllipseOffsets0_Stage0.x * duvdx.x + vEllipseOffsets0_Stage0.y * duvdx.y, vEllipseOffsets0_Stage0.x * duvdy.x + vEllipseOffsets0_Stage0.y * duvdy.y);
+ float grad_dot = 4.0 * dot(grad, grad);
+ grad_dot = max(grad_dot, 1.1754999560161448e-38);
+ float invlen = inversesqrt(grad_dot);
+ float edgeAlpha = clamp(0.5 - test * invlen, 0.0, 1.0);
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ColorTableEffect_Stage1_c0_c0(vec4(1.0));
+ }
+ {
+ if (all(lessThanEqual(outputCoverage_Stage0.xyz, vec3(0.0)))) {
+ discard;
+ }
+ vec2 _dstTexCoord = (gl_FragCoord.xy - uDstTextureUpperLeft_Stage2) * uDstTextureCoordScale_Stage2;
+ _dstTexCoord.y = 1.0 - _dstTexCoord.y;
+ vec4 _dstColor = texture(uDstTextureSampler_Stage2, _dstTexCoord);
+ sk_FragColor = blend_src(output_Stage1, _dstColor);
+ sk_FragColor = outputCoverage_Stage0 * sk_FragColor + (vec4(1.0) - outputCoverage_Stage0) * _dstColor;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec2 inEllipseOffsets0;
+in vec2 inEllipseOffsets1;
+out vec2 vEllipseOffsets0_Stage0;
+out vec2 vEllipseOffsets1_Stage0;
+out vec4 vinColor_Stage0;
+void main() {
+ vEllipseOffsets0_Stage0 = inEllipseOffsets0;
+ vEllipseOffsets1_Stage0 = inEllipseOffsets1;
+ vinColor_Stage0 = inColor;
+ vec3 pos3 = uViewM_Stage0 * vec3(inPosition, 1.0);
+ gl_Position = vec4(pos3.x, pos3.y, 0.0, pos3.z);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/2131.shader_test b/shaders/skia/2131.shader_test
new file mode 100644
index 0000000..47782d8
--- /dev/null
+++ b/shaders/skia/2131.shader_test
@@ -0,0 +1,48 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec4 vcolor_Stage0;
+vec4 ColorTableEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ float nonZeroAlpha = max(_input.w, 9.9999997473787516e-05);
+ vec4 coord = vec4(_input.xyz / nonZeroAlpha, nonZeroAlpha);
+ coord = coord * 0.9960939884185791 + vec4(0.0019529999699443579, 0.0019529999699443579, 0.0019529999699443579, 0.0019529999699443579);
+ _output.w = texture(uTextureSampler_0_Stage1, vec2(coord.w, 0.125)).w;
+ _output.x = texture(uTextureSampler_0_Stage1, vec2(coord.x, 0.375)).w;
+ _output.y = texture(uTextureSampler_0_Stage1, vec2(coord.y, 0.625)).w;
+ _output.z = texture(uTextureSampler_0_Stage1, vec2(coord.z, 0.875)).w;
+ _output.xyz *= _output.w;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ColorTableEffect_Stage1_c0_c0(vec4(1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec2 inLocalCoord;
+noperspective out vec4 vcolor_Stage0;
+void main() {
+ vec4 color = inColor;
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/2134.shader_test b/shaders/skia/2134.shader_test
new file mode 100644
index 0000000..9a2560a
--- /dev/null
+++ b/shaders/skia/2134.shader_test
@@ -0,0 +1,133 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec2 ubaseFrequency_Stage1_c0_c0_c0_c0;
+uniform vec2 uDstTextureUpperLeft_Stage2;
+uniform vec2 uDstTextureCoordScale_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+uniform sampler2D uDstTextureSampler_Stage2;
+noperspective in vec2 vEllipseOffsets_Stage0;
+noperspective in vec4 vEllipseRadii_Stage0;
+noperspective in vec4 vinColor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+float perlinnoise_Stage1_c0_c0_c0_c0(float chanCoord, vec2 noiseVec) {
+ vec4 floorVal;
+ floorVal.xy = floor(noiseVec);
+ floorVal.zw = floorVal.xy + vec2(1.0);
+ vec2 fractVal = fract(noiseVec);
+ vec2 noiseSmooth = (fractVal * fractVal) * (vec2(3.0) - vec2(2.0) * fractVal);
+ floorVal = fract(floor(mod(floorVal, 256.0)) / vec4(256.0));
+ vec2 latticeIdx;
+ latticeIdx.x = texture(uTextureSampler_0_Stage1, vec2(floorVal.x, 0.5)).x;
+ latticeIdx.y = texture(uTextureSampler_0_Stage1, vec2(floorVal.z, 0.5)).x;
+ vec4 bcoords = fract(latticeIdx.xyxy + floorVal.yyww);
+ vec2 uv;
+ vec4 lattice = texture(uTextureSampler_1_Stage1, vec2(bcoords.x, chanCoord)).zyxw;
+ uv.x = dot((lattice.yw + lattice.xz * vec2(0.00390625)) * vec2(2.0) - vec2(1.0), fractVal);
+ fractVal.x -= 1.0;
+ lattice = texture(uTextureSampler_1_Stage1, vec2(bcoords.y, chanCoord)).zyxw;
+ uv.y = dot((lattice.yw + lattice.xz * vec2(0.00390625)) * vec2(2.0) - vec2(1.0), fractVal);
+ vec2 ab;
+ ab.x = mix(uv.x, uv.y, noiseSmooth.x);
+ fractVal.y -= 1.0;
+ lattice = texture(uTextureSampler_1_Stage1, vec2(bcoords.w, chanCoord)).zyxw;
+ uv.y = dot((lattice.yw + lattice.xz * vec2(0.00390625)) * vec2(2.0) - vec2(1.0), fractVal);
+ fractVal.x += 1.0;
+ lattice = texture(uTextureSampler_1_Stage1, vec2(bcoords.z, chanCoord)).zyxw;
+ uv.x = dot((lattice.yw + lattice.xz * vec2(0.00390625)) * vec2(2.0) - vec2(1.0), fractVal);
+ ab.y = mix(uv.x, uv.y, noiseSmooth.x);
+ return mix(ab.x, ab.y, noiseSmooth.y);
+}
+vec4 PerlinNoise_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 noiseVec = floor(vTransformedCoords_0_Stage0) * ubaseFrequency_Stage1_c0_c0_c0_c0;
+ _output = vec4(0.0);
+ float ratio = 1.0;
+ for (int octave = 0;octave < 9; ++octave) {
+ _output += abs(vec4(perlinnoise_Stage1_c0_c0_c0_c0(0.125, noiseVec), perlinnoise_Stage1_c0_c0_c0_c0(0.375, noiseVec), perlinnoise_Stage1_c0_c0_c0_c0(0.625, noiseVec), perlinnoise_Stage1_c0_c0_c0_c0(0.875, noiseVec))) * ratio;
+ noiseVec *= vec2(2.0);
+ ratio *= 0.5;
+ }
+ _output = clamp(_output, 0.0, 1.0);
+ _output = vec4(_output.xyz * _output.www, _output.w);
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+vec4 ComposeOne_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_dst_in(_input, PerlinNoise_Stage1_c0_c0_c0_c0(vec4(1.0)));
+ return _output;
+}
+vec4 blend_src(vec4 src, vec4 dst) {
+ return src;
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ vec2 offset = vEllipseOffsets_Stage0;
+ offset *= vEllipseRadii_Stage0.xy;
+ float test = dot(offset, offset) - 1.0;
+ vec2 grad = (2.0 * offset) * vEllipseRadii_Stage0.xy;
+ float grad_dot = dot(grad, grad);
+ grad_dot = max(grad_dot, 1.1754999560161448e-38);
+ float invlen = inversesqrt(grad_dot);
+ float edgeAlpha = clamp(0.5 - test * invlen, 0.0, 1.0);
+ offset = vEllipseOffsets_Stage0 * vEllipseRadii_Stage0.zw;
+ test = dot(offset, offset) - 1.0;
+ grad = (2.0 * offset) * vEllipseRadii_Stage0.zw;
+ grad_dot = dot(grad, grad);
+ invlen = inversesqrt(grad_dot);
+ edgeAlpha *= clamp(0.5 + test * invlen, 0.0, 1.0);
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ComposeOne_Stage1_c0_c0(vec4(1.0));
+ }
+ {
+ if (all(lessThanEqual(outputCoverage_Stage0.xyz, vec3(0.0)))) {
+ discard;
+ }
+ vec2 _dstTexCoord = (gl_FragCoord.xy - uDstTextureUpperLeft_Stage2) * uDstTextureCoordScale_Stage2;
+ _dstTexCoord.y = 1.0 - _dstTexCoord.y;
+ vec4 _dstColor = texture(uDstTextureSampler_Stage2, _dstTexCoord);
+ sk_FragColor = blend_src(output_Stage1, _dstColor);
+ sk_FragColor = outputCoverage_Stage0 * sk_FragColor + (vec4(1.0) - outputCoverage_Stage0) * _dstColor;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec2 inEllipseOffset;
+in vec4 inEllipseRadii;
+noperspective out vec2 vEllipseOffsets_Stage0;
+noperspective out vec4 vEllipseRadii_Stage0;
+noperspective out vec4 vinColor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vEllipseOffsets_Stage0 = inEllipseOffset;
+ vEllipseRadii_Stage0 = inEllipseRadii;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/2137.shader_test b/shaders/skia/2137.shader_test
new file mode 100644
index 0000000..8c915aa
--- /dev/null
+++ b/shaders/skia/2137.shader_test
@@ -0,0 +1,135 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec2 ubaseFrequency_Stage1_c0_c0_c0_c0;
+uniform vec2 ustitchData_Stage1_c0_c0_c0_c0;
+uniform vec2 uDstTextureUpperLeft_Stage2;
+uniform vec2 uDstTextureCoordScale_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+uniform sampler2D uDstTextureSampler_Stage2;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec3 vTransformedCoords_0_Stage0;
+noperspective in float vinCoverage_Stage0;
+float perlinnoise_Stage1_c0_c0_c0_c0(float chanCoord, vec2 noiseVec, vec2 stitchData) {
+ vec4 floorVal;
+ floorVal.xy = floor(noiseVec);
+ floorVal.zw = floorVal.xy + vec2(1.0);
+ vec2 fractVal = fract(noiseVec);
+ vec2 noiseSmooth = (fractVal * fractVal) * (vec2(3.0) - vec2(2.0) * fractVal);
+ if (floorVal.x >= stitchData.x) {
+ floorVal.x -= stitchData.x;
+ }
+ if (floorVal.y >= stitchData.y) {
+ floorVal.y -= stitchData.y;
+ }
+ if (floorVal.z >= stitchData.x) {
+ floorVal.z -= stitchData.x;
+ }
+ if (floorVal.w >= stitchData.y) {
+ floorVal.w -= stitchData.y;
+ }
+ floorVal = fract(floor(mod(floorVal, 256.0)) / vec4(256.0));
+ vec2 latticeIdx;
+ latticeIdx.x = texture(uTextureSampler_0_Stage1, vec2(floorVal.x, 0.5)).x;
+ latticeIdx.y = texture(uTextureSampler_0_Stage1, vec2(floorVal.z, 0.5)).x;
+ vec4 bcoords = fract(latticeIdx.xyxy + floorVal.yyww);
+ vec2 uv;
+ vec4 lattice = texture(uTextureSampler_1_Stage1, vec2(bcoords.x, chanCoord)).zyxw;
+ uv.x = dot((lattice.yw + lattice.xz * vec2(0.00390625)) * vec2(2.0) - vec2(1.0), fractVal);
+ fractVal.x -= 1.0;
+ lattice = texture(uTextureSampler_1_Stage1, vec2(bcoords.y, chanCoord)).zyxw;
+ uv.y = dot((lattice.yw + lattice.xz * vec2(0.00390625)) * vec2(2.0) - vec2(1.0), fractVal);
+ vec2 ab;
+ ab.x = mix(uv.x, uv.y, noiseSmooth.x);
+ fractVal.y -= 1.0;
+ lattice = texture(uTextureSampler_1_Stage1, vec2(bcoords.w, chanCoord)).zyxw;
+ uv.y = dot((lattice.yw + lattice.xz * vec2(0.00390625)) * vec2(2.0) - vec2(1.0), fractVal);
+ fractVal.x += 1.0;
+ lattice = texture(uTextureSampler_1_Stage1, vec2(bcoords.z, chanCoord)).zyxw;
+ uv.x = dot((lattice.yw + lattice.xz * vec2(0.00390625)) * vec2(2.0) - vec2(1.0), fractVal);
+ ab.y = mix(uv.x, uv.y, noiseSmooth.x);
+ return mix(ab.x, ab.y, noiseSmooth.y);
+}
+vec4 PerlinNoise_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 vTransformedCoords_0_Stage0_ensure2D = vTransformedCoords_0_Stage0.xy / vTransformedCoords_0_Stage0.z;
+ vec2 noiseVec = floor(vTransformedCoords_0_Stage0_ensure2D) * ubaseFrequency_Stage1_c0_c0_c0_c0;
+ _output = vec4(0.0);
+ vec2 stitchData = ustitchData_Stage1_c0_c0_c0_c0;
+ float ratio = 1.0;
+ for (int octave = 0;octave < 4; ++octave) {
+ _output += vec4(perlinnoise_Stage1_c0_c0_c0_c0(0.125, noiseVec, stitchData), perlinnoise_Stage1_c0_c0_c0_c0(0.375, noiseVec, stitchData), perlinnoise_Stage1_c0_c0_c0_c0(0.625, noiseVec, stitchData), perlinnoise_Stage1_c0_c0_c0_c0(0.875, noiseVec, stitchData)) * ratio;
+ noiseVec *= vec2(2.0);
+ ratio *= 0.5;
+ stitchData *= vec2(2.0);
+ }
+ _output = _output * vec4(0.5) + vec4(0.5);
+ _output = clamp(_output, 0.0, 1.0);
+ _output = vec4(_output.xyz * _output.www, _output.w);
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+vec4 ComposeOne_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_dst_in(_input, PerlinNoise_Stage1_c0_c0_c0_c0(vec4(1.0)));
+ return _output;
+}
+vec4 blend_src(vec4 src, vec4 dst) {
+ return src;
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ float alpha = 1.0;
+ alpha = vinCoverage_Stage0;
+ outputCoverage_Stage0 = vec4(alpha);
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ComposeOne_Stage1_c0_c0(vec4(1.0));
+ }
+ {
+ if (all(lessThanEqual(outputCoverage_Stage0.xyz, vec3(0.0)))) {
+ discard;
+ }
+ vec2 _dstTexCoord = (gl_FragCoord.xy - uDstTextureUpperLeft_Stage2) * uDstTextureCoordScale_Stage2;
+ _dstTexCoord.y = 1.0 - _dstTexCoord.y;
+ vec4 _dstColor = texture(uDstTextureSampler_Stage2, _dstTexCoord);
+ sk_FragColor = blend_src(output_Stage1, _dstColor);
+ sk_FragColor = outputCoverage_Stage0 * sk_FragColor + (vec4(1.0) - outputCoverage_Stage0) * _dstColor;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in float inCoverage;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec3 vTransformedCoords_0_Stage0;
+noperspective out float vinCoverage_Stage0;
+void main() {
+ vec4 color = inColor;
+ vcolor_Stage0 = color;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0);
+ vinCoverage_Stage0 = inCoverage;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/214-2.shader_test b/shaders/skia/214-2.shader_test
new file mode 100644
index 0000000..196a81c
--- /dev/null
+++ b/shaders/skia/214-2.shader_test
@@ -0,0 +1,78 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage2_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c1_c0;
+ }
+ return _output;
+}
+vec4 blend_plus(vec4 src, vec4 dst) {
+ return min(src + dst, 1.0);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_plus(ConstColorProcessor_Stage2_c1_c0(vec4(1.0)), output_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/214-3.shader_test b/shaders/skia/214-3.shader_test
new file mode 100644
index 0000000..d917e42
--- /dev/null
+++ b/shaders/skia/214-3.shader_test
@@ -0,0 +1,191 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform float uSurfaceScale_Stage1;
+uniform vec3 uLightColor_Stage1;
+uniform float uKD_Stage1;
+uniform vec4 uTexDom_Stage1;
+uniform vec3 uDecalParams_Stage1;
+uniform vec3 uLightDirection_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 light_Stage1(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ float colorScale = uKD_Stage1 * dot(normal, surfaceToLight);
+ return vec4(lightColor * clamp(colorScale, 0.0, 1.0), 1.0);
+}
+float sobel_Stage1(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage1(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage1(float m[9], float surfaceScale) {
+ return pointToNormal_Stage1(sobel_Stage1(m[0], m[1], m[3], m[4], m[6], m[7], 0.5), sobel_Stage1(m[0], m[6], m[1], m[7], 0.0, 0.0, 0.33333298563957214), surfaceScale);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ vec2 coord = vTransformedCoords_0_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp0 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp5 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp6 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp7 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp8 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = uLightDirection_Stage1;
+ output_Stage1 = light_Stage1(normal_Stage1(m, uSurfaceScale_Stage1), surfaceToLight, uLightColor_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/214-4.shader_test b/shaders/skia/214-4.shader_test
new file mode 100644
index 0000000..2246afe
--- /dev/null
+++ b/shaders/skia/214-4.shader_test
@@ -0,0 +1,59 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+uniform mat4 um_Stage1;
+uniform vec4 uv_Stage1;
+noperspective in vec4 vQuadEdge_Stage0;
+noperspective in vec4 vinColor_Stage0;
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ float edgeAlpha;
+ vec2 duvdx = dFdx(vQuadEdge_Stage0.xy);
+ vec2 duvdy = -dFdy(vQuadEdge_Stage0.xy);
+ if (vQuadEdge_Stage0.z > 0.0 && vQuadEdge_Stage0.w > 0.0) {
+ edgeAlpha = min(min(vQuadEdge_Stage0.z, vQuadEdge_Stage0.w) + 0.5, 1.0);
+ } else {
+ vec2 gF = vec2((2.0 * vQuadEdge_Stage0.x) * duvdx.x - duvdx.y, (2.0 * vQuadEdge_Stage0.x) * duvdy.x - duvdy.y);
+ edgeAlpha = vQuadEdge_Stage0.x * vQuadEdge_Stage0.x - vQuadEdge_Stage0.y;
+ edgeAlpha = clamp(0.5 - edgeAlpha / length(gF), 0.0, 1.0);
+ }
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = outputCoverage_Stage0;
+ {
+ float nonZeroAlpha = max(inputColor.w, 9.9999997473787516e-05);
+ inputColor = vec4(inputColor.xyz / nonZeroAlpha, inputColor.w);
+ }
+ output_Stage1 = um_Stage1 * inputColor + uv_Stage1;
+ {
+ output_Stage1.w = clamp(output_Stage1.w, 0.0, 1.0);
+ }
+ {
+ output_Stage1.xyz *= output_Stage1.w;
+ }
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 inPosition;
+in vec4 inColor;
+in vec4 inQuadEdge;
+noperspective out vec4 vQuadEdge_Stage0;
+noperspective out vec4 vinColor_Stage0;
+void main() {
+ vQuadEdge_Stage0 = inQuadEdge;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = inPosition;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/214-5.shader_test b/shaders/skia/214-5.shader_test
new file mode 100644
index 0000000..25f5ac7
--- /dev/null
+++ b/shaders/skia/214-5.shader_test
@@ -0,0 +1,239 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage2;
+uniform vec4 uKernel_Stage2[3];
+uniform vec2 uKernelOffset_Stage2;
+uniform float uGain_Stage2;
+uniform float uBias_Stage2;
+uniform vec4 uTexDom_Stage2;
+uniform vec3 uDecalParams_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ vec4 sum = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_1_Stage0 - uKernelOffset_Stage2 * uImageIncrement_Stage2;
+ vec4 c;
+ {
+ float k = uKernel_Stage2[0].x;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[0].y;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[0].z;
+ {
+ vec2 origCoord = coord + vec2(2.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[0].w;
+ {
+ vec2 origCoord = coord + vec2(3.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[1].x;
+ {
+ vec2 origCoord = coord + vec2(4.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[1].y;
+ {
+ vec2 origCoord = coord + vec2(5.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[1].z;
+ {
+ vec2 origCoord = coord + vec2(6.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[1].w;
+ {
+ vec2 origCoord = coord + vec2(7.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[2].x;
+ {
+ vec2 origCoord = coord + vec2(8.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ vec2 origCoord = vTransformedCoords_1_Stage0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ output_Stage2.w = c.w;
+ output_Stage2.xyz = clamp(sum.xyz * uGain_Stage2 + uBias_Stage2, 0.0, 1.0);
+ output_Stage2.xyz *= output_Stage2.w;
+ output_Stage2 *= output_Stage1;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/214-6.shader_test b/shaders/skia/214-6.shader_test
new file mode 100644
index 0000000..c9c8db0
--- /dev/null
+++ b/shaders/skia/214-6.shader_test
@@ -0,0 +1,130 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec3 uedges_Stage2_c1_c0[8];
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 ClampFragmentProcessor_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = clamp(_input, 0.0, 1.0);
+ }
+ return _output;
+}
+vec4 ConvexPoly_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ float alpha = 1.0;
+ float edge;
+ edge = dot(uedges_Stage2_c1_c0[0], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage2_c1_c0[1], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage2_c1_c0[2], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage2_c1_c0[3], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage2_c1_c0[4], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage2_c1_c0[5], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage2_c1_c0[6], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage2_c1_c0[7], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ _output = _input * alpha;
+ return _output;
+}
+float _blend_color_saturation(vec3 color) {
+ return max(max(color.x, color.y), color.z) - min(min(color.x, color.y), color.z);
+}
+vec3 _blend_set_color_saturation_helper(vec3 minMidMax, float sat) {
+ if (minMidMax.x < minMidMax.z) {
+ return vec3(0.0, (sat * (minMidMax.y - minMidMax.x)) / (minMidMax.z - minMidMax.x), sat);
+ }
+ return vec3(0.0);
+}
+vec3 _blend_set_color_saturation(vec3 hueLumColor, vec3 satColor) {
+ float sat = _blend_color_saturation(satColor);
+ if (hueLumColor.x <= hueLumColor.y) {
+ if (hueLumColor.y <= hueLumColor.z) {
+ hueLumColor.xyz = _blend_set_color_saturation_helper(hueLumColor, sat);
+ } else if (hueLumColor.x <= hueLumColor.z) {
+ hueLumColor.xzy = _blend_set_color_saturation_helper(hueLumColor.xzy, sat);
+ } else {
+ hueLumColor.zxy = _blend_set_color_saturation_helper(hueLumColor.zxy, sat);
+ }
+ } else if (hueLumColor.x <= hueLumColor.z) {
+ hueLumColor.yxz = _blend_set_color_saturation_helper(hueLumColor.yxz, sat);
+ } else if (hueLumColor.y <= hueLumColor.z) {
+ hueLumColor.yzx = _blend_set_color_saturation_helper(hueLumColor.yzx, sat);
+ } else {
+ hueLumColor.zyx = _blend_set_color_saturation_helper(hueLumColor.zyx, sat);
+ }
+ return hueLumColor;
+}
+float _blend_color_luminance(vec3 color) {
+ return dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), color);
+}
+vec3 _blend_set_color_luminance(vec3 hueSatColor, float alpha, vec3 lumColor) {
+ float lum = _blend_color_luminance(lumColor);
+ vec3 result = (lum - _blend_color_luminance(hueSatColor)) + hueSatColor;
+ float minComp = min(min(result.x, result.y), result.z);
+ float maxComp = max(max(result.x, result.y), result.z);
+ if (minComp < 0.0 && lum != minComp) {
+ result = lum + ((result - lum) * lum) / (lum - minComp);
+ }
+ if (maxComp > alpha && maxComp != lum) {
+ return lum + ((result - lum) * (alpha - lum)) / (maxComp - lum);
+ }
+ return result;
+}
+vec4 blend_saturation(vec4 src, vec4 dst) {
+ float alpha = dst.w * src.w;
+ vec3 sda = src.xyz * dst.w;
+ vec3 dsa = dst.xyz * src.w;
+ return vec4((((_blend_set_color_luminance(_blend_set_color_saturation(dsa, sda), alpha, dsa) + dst.xyz) - dsa) + src.xyz) - sda, (src.w + dst.w) - alpha);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ vec4 inputColor = vec4(output_Stage1.xyz, 1.0);
+ output_Stage2 = blend_saturation(ClampFragmentProcessor_Stage2_c0_c0(inputColor), ConvexPoly_Stage2_c1_c0(inputColor));
+ output_Stage2 *= output_Stage1.w;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/214.shader_test b/shaders/skia/214.shader_test
new file mode 100644
index 0000000..ebeee17
--- /dev/null
+++ b/shaders/skia/214.shader_test
@@ -0,0 +1,165 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage2;
+uniform vec4 ucolor_Stage3_c1_c0;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.w) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ } else {
+ {
+ if (t < uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+vec4 ComposeOne_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_dst_in(_input, TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0)));
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = ComposeOne_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 ConstColorProcessor_Stage3_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage3_c1_c0;
+ }
+ return _output;
+}
+vec4 blend_dst_out(vec4 src, vec4 dst) {
+ return (1.0 - src.w) * dst;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 blend_darken(vec4 src, vec4 dst) {
+ vec4 result = blend_src_over(src, dst);
+ result.xyz = min(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
+ return result;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_dst_out(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ {
+ output_Stage2 = output_Stage1 * ucolor_Stage2;
+ }
+ }
+ vec4 output_Stage3;
+ {
+ output_Stage3 = blend_darken(ConstColorProcessor_Stage3_c1_c0(vec4(1.0)), output_Stage2);
+ }
+ {
+ sk_FragColor = output_Stage3;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 inColor;
+in vec2 inLocalCoord;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/2140.shader_test b/shaders/skia/2140.shader_test
new file mode 100644
index 0000000..089d5e0
--- /dev/null
+++ b/shaders/skia/2140.shader_test
@@ -0,0 +1,145 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec2 ubaseFrequency_Stage1_c0_c0_c0_c0;
+uniform vec2 ustitchData_Stage1_c0_c0_c0_c0;
+uniform vec2 uDstTextureUpperLeft_Stage2;
+uniform vec2 uDstTextureCoordScale_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+uniform sampler2D uDstTextureSampler_Stage2;
+noperspective in vec2 vEllipseOffsets0_Stage0;
+noperspective in vec2 vEllipseOffsets1_Stage0;
+noperspective in vec4 vinColor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+float perlinnoise_Stage1_c0_c0_c0_c0(float chanCoord, vec2 noiseVec, vec2 stitchData) {
+ vec4 floorVal;
+ floorVal.xy = floor(noiseVec);
+ floorVal.zw = floorVal.xy + vec2(1.0);
+ vec2 fractVal = fract(noiseVec);
+ vec2 noiseSmooth = (fractVal * fractVal) * (vec2(3.0) - vec2(2.0) * fractVal);
+ if (floorVal.x >= stitchData.x) {
+ floorVal.x -= stitchData.x;
+ }
+ if (floorVal.y >= stitchData.y) {
+ floorVal.y -= stitchData.y;
+ }
+ if (floorVal.z >= stitchData.x) {
+ floorVal.z -= stitchData.x;
+ }
+ if (floorVal.w >= stitchData.y) {
+ floorVal.w -= stitchData.y;
+ }
+ floorVal = fract(floor(mod(floorVal, 256.0)) / vec4(256.0));
+ vec2 latticeIdx;
+ latticeIdx.x = texture(uTextureSampler_0_Stage1, vec2(floorVal.x, 0.5)).x;
+ latticeIdx.y = texture(uTextureSampler_0_Stage1, vec2(floorVal.z, 0.5)).x;
+ vec4 bcoords = fract(latticeIdx.xyxy + floorVal.yyww);
+ vec2 uv;
+ vec4 lattice = texture(uTextureSampler_1_Stage1, vec2(bcoords.x, chanCoord)).zyxw;
+ uv.x = dot((lattice.yw + lattice.xz * vec2(0.00390625)) * vec2(2.0) - vec2(1.0), fractVal);
+ fractVal.x -= 1.0;
+ lattice = texture(uTextureSampler_1_Stage1, vec2(bcoords.y, chanCoord)).zyxw;
+ uv.y = dot((lattice.yw + lattice.xz * vec2(0.00390625)) * vec2(2.0) - vec2(1.0), fractVal);
+ vec2 ab;
+ ab.x = mix(uv.x, uv.y, noiseSmooth.x);
+ fractVal.y -= 1.0;
+ lattice = texture(uTextureSampler_1_Stage1, vec2(bcoords.w, chanCoord)).zyxw;
+ uv.y = dot((lattice.yw + lattice.xz * vec2(0.00390625)) * vec2(2.0) - vec2(1.0), fractVal);
+ fractVal.x += 1.0;
+ lattice = texture(uTextureSampler_1_Stage1, vec2(bcoords.z, chanCoord)).zyxw;
+ uv.x = dot((lattice.yw + lattice.xz * vec2(0.00390625)) * vec2(2.0) - vec2(1.0), fractVal);
+ ab.y = mix(uv.x, uv.y, noiseSmooth.x);
+ return mix(ab.x, ab.y, noiseSmooth.y);
+}
+vec4 PerlinNoise_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 noiseVec = floor(vTransformedCoords_0_Stage0) * ubaseFrequency_Stage1_c0_c0_c0_c0;
+ _output = vec4(0.0);
+ vec2 stitchData = ustitchData_Stage1_c0_c0_c0_c0;
+ float ratio = 1.0;
+ for (int octave = 0;octave < 7; ++octave) {
+ _output += vec4(perlinnoise_Stage1_c0_c0_c0_c0(0.125, noiseVec, stitchData), perlinnoise_Stage1_c0_c0_c0_c0(0.375, noiseVec, stitchData), perlinnoise_Stage1_c0_c0_c0_c0(0.625, noiseVec, stitchData), perlinnoise_Stage1_c0_c0_c0_c0(0.875, noiseVec, stitchData)) * ratio;
+ noiseVec *= vec2(2.0);
+ ratio *= 0.5;
+ stitchData *= vec2(2.0);
+ }
+ _output = _output * vec4(0.5) + vec4(0.5);
+ _output = clamp(_output, 0.0, 1.0);
+ _output = vec4(_output.xyz * _output.www, _output.w);
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+vec4 ComposeOne_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_dst_in(_input, PerlinNoise_Stage1_c0_c0_c0_c0(vec4(1.0)));
+ return _output;
+}
+vec4 blend_src(vec4 src, vec4 dst) {
+ return src;
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ vec2 scaledOffset = vEllipseOffsets0_Stage0;
+ float test = dot(scaledOffset, scaledOffset) - 1.0;
+ vec2 duvdx = dFdx(vEllipseOffsets0_Stage0);
+ vec2 duvdy = -dFdy(vEllipseOffsets0_Stage0);
+ vec2 grad = vec2(vEllipseOffsets0_Stage0.x * duvdx.x + vEllipseOffsets0_Stage0.y * duvdx.y, vEllipseOffsets0_Stage0.x * duvdy.x + vEllipseOffsets0_Stage0.y * duvdy.y);
+ float grad_dot = 4.0 * dot(grad, grad);
+ grad_dot = max(grad_dot, 1.1754999560161448e-38);
+ float invlen = inversesqrt(grad_dot);
+ float edgeAlpha = clamp(0.5 - test * invlen, 0.0, 1.0);
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ComposeOne_Stage1_c0_c0(vec4(1.0));
+ }
+ {
+ if (all(lessThanEqual(outputCoverage_Stage0.xyz, vec3(0.0)))) {
+ discard;
+ }
+ vec2 _dstTexCoord = (gl_FragCoord.xy - uDstTextureUpperLeft_Stage2) * uDstTextureCoordScale_Stage2;
+ _dstTexCoord.y = 1.0 - _dstTexCoord.y;
+ vec4 _dstColor = texture(uDstTextureSampler_Stage2, _dstTexCoord);
+ sk_FragColor = blend_src(output_Stage1, _dstColor);
+ sk_FragColor = outputCoverage_Stage0 * sk_FragColor + (vec4(1.0) - outputCoverage_Stage0) * _dstColor;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec2 inEllipseOffsets0;
+in vec2 inEllipseOffsets1;
+noperspective out vec2 vEllipseOffsets0_Stage0;
+noperspective out vec2 vEllipseOffsets1_Stage0;
+noperspective out vec4 vinColor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vEllipseOffsets0_Stage0 = inEllipseOffsets0;
+ vEllipseOffsets1_Stage0 = inEllipseOffsets1;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = (uViewM_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/2143.shader_test b/shaders/skia/2143.shader_test
new file mode 100644
index 0000000..f263df0
--- /dev/null
+++ b/shaders/skia/2143.shader_test
@@ -0,0 +1,110 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uColor_Stage0;
+uniform float uCoverage_Stage0;
+uniform vec2 ubaseFrequency_Stage1_c0_c0_c0_c0;
+uniform vec2 uDstTextureUpperLeft_Stage2;
+uniform vec2 uDstTextureCoordScale_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+uniform sampler2D uDstTextureSampler_Stage2;
+in vec2 vTransformedCoords_0_Stage0;
+float perlinnoise_Stage1_c0_c0_c0_c0(float chanCoord, vec2 noiseVec) {
+ vec4 floorVal;
+ floorVal.xy = floor(noiseVec);
+ floorVal.zw = floorVal.xy + vec2(1.0);
+ vec2 fractVal = fract(noiseVec);
+ vec2 noiseSmooth = (fractVal * fractVal) * (vec2(3.0) - vec2(2.0) * fractVal);
+ floorVal = fract(floor(mod(floorVal, 256.0)) / vec4(256.0));
+ vec2 latticeIdx;
+ latticeIdx.x = texture(uTextureSampler_0_Stage1, vec2(floorVal.x, 0.5)).x;
+ latticeIdx.y = texture(uTextureSampler_0_Stage1, vec2(floorVal.z, 0.5)).x;
+ vec4 bcoords = fract(latticeIdx.xyxy + floorVal.yyww);
+ vec2 uv;
+ vec4 lattice = texture(uTextureSampler_1_Stage1, vec2(bcoords.x, chanCoord)).zyxw;
+ uv.x = dot((lattice.yw + lattice.xz * vec2(0.00390625)) * vec2(2.0) - vec2(1.0), fractVal);
+ fractVal.x -= 1.0;
+ lattice = texture(uTextureSampler_1_Stage1, vec2(bcoords.y, chanCoord)).zyxw;
+ uv.y = dot((lattice.yw + lattice.xz * vec2(0.00390625)) * vec2(2.0) - vec2(1.0), fractVal);
+ vec2 ab;
+ ab.x = mix(uv.x, uv.y, noiseSmooth.x);
+ fractVal.y -= 1.0;
+ lattice = texture(uTextureSampler_1_Stage1, vec2(bcoords.w, chanCoord)).zyxw;
+ uv.y = dot((lattice.yw + lattice.xz * vec2(0.00390625)) * vec2(2.0) - vec2(1.0), fractVal);
+ fractVal.x += 1.0;
+ lattice = texture(uTextureSampler_1_Stage1, vec2(bcoords.z, chanCoord)).zyxw;
+ uv.x = dot((lattice.yw + lattice.xz * vec2(0.00390625)) * vec2(2.0) - vec2(1.0), fractVal);
+ ab.y = mix(uv.x, uv.y, noiseSmooth.x);
+ return mix(ab.x, ab.y, noiseSmooth.y);
+}
+vec4 PerlinNoise_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 noiseVec = floor(vTransformedCoords_0_Stage0) * ubaseFrequency_Stage1_c0_c0_c0_c0;
+ _output = vec4(0.0);
+ float ratio = 1.0;
+ for (int octave = 0;octave < 3; ++octave) {
+ _output += abs(vec4(perlinnoise_Stage1_c0_c0_c0_c0(0.125, noiseVec), perlinnoise_Stage1_c0_c0_c0_c0(0.375, noiseVec), perlinnoise_Stage1_c0_c0_c0_c0(0.625, noiseVec), perlinnoise_Stage1_c0_c0_c0_c0(0.875, noiseVec))) * ratio;
+ noiseVec *= vec2(2.0);
+ ratio *= 0.5;
+ }
+ _output = clamp(_output, 0.0, 1.0);
+ _output = vec4(_output.xyz * _output.www, _output.w);
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+vec4 ComposeOne_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_dst_in(_input, PerlinNoise_Stage1_c0_c0_c0_c0(vec4(1.0)));
+ return _output;
+}
+vec4 blend_src(vec4 src, vec4 dst) {
+ return src;
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ outputCoverage_Stage0 = vec4(uCoverage_Stage0);
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ComposeOne_Stage1_c0_c0(vec4(1.0));
+ }
+ {
+ if (all(lessThanEqual(outputCoverage_Stage0.xyz, vec3(0.0)))) {
+ discard;
+ }
+ vec2 _dstTexCoord = (gl_FragCoord.xy - uDstTextureUpperLeft_Stage2) * uDstTextureCoordScale_Stage2;
+ _dstTexCoord.y = 1.0 - _dstTexCoord.y;
+ vec4 _dstColor = texture(uDstTextureSampler_Stage2, _dstTexCoord);
+ sk_FragColor = blend_src(output_Stage1, _dstColor);
+ sk_FragColor = outputCoverage_Stage0 * sk_FragColor + (vec4(1.0) - outputCoverage_Stage0) * _dstColor;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec3 pos3 = uViewM_Stage0 * vec3(inPosition, 1.0);
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos3.x, pos3.y, 0.0, pos3.z);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/2146.shader_test b/shaders/skia/2146.shader_test
new file mode 100644
index 0000000..9eb197c
--- /dev/null
+++ b/shaders/skia/2146.shader_test
@@ -0,0 +1,134 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec2 ubaseFrequency_Stage1_c0_c0_c0_c0;
+uniform vec2 ustitchData_Stage1_c0_c0_c0_c0;
+uniform vec2 uDstTextureUpperLeft_Stage2;
+uniform vec2 uDstTextureCoordScale_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+uniform sampler2D uDstTextureSampler_Stage2;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in float vinCoverage_Stage0;
+float perlinnoise_Stage1_c0_c0_c0_c0(float chanCoord, vec2 noiseVec, vec2 stitchData) {
+ vec4 floorVal;
+ floorVal.xy = floor(noiseVec);
+ floorVal.zw = floorVal.xy + vec2(1.0);
+ vec2 fractVal = fract(noiseVec);
+ vec2 noiseSmooth = (fractVal * fractVal) * (vec2(3.0) - vec2(2.0) * fractVal);
+ if (floorVal.x >= stitchData.x) {
+ floorVal.x -= stitchData.x;
+ }
+ if (floorVal.y >= stitchData.y) {
+ floorVal.y -= stitchData.y;
+ }
+ if (floorVal.z >= stitchData.x) {
+ floorVal.z -= stitchData.x;
+ }
+ if (floorVal.w >= stitchData.y) {
+ floorVal.w -= stitchData.y;
+ }
+ floorVal = fract(floor(mod(floorVal, 256.0)) / vec4(256.0));
+ vec2 latticeIdx;
+ latticeIdx.x = texture(uTextureSampler_0_Stage1, vec2(floorVal.x, 0.5)).x;
+ latticeIdx.y = texture(uTextureSampler_0_Stage1, vec2(floorVal.z, 0.5)).x;
+ vec4 bcoords = fract(latticeIdx.xyxy + floorVal.yyww);
+ vec2 uv;
+ vec4 lattice = texture(uTextureSampler_1_Stage1, vec2(bcoords.x, chanCoord)).zyxw;
+ uv.x = dot((lattice.yw + lattice.xz * vec2(0.00390625)) * vec2(2.0) - vec2(1.0), fractVal);
+ fractVal.x -= 1.0;
+ lattice = texture(uTextureSampler_1_Stage1, vec2(bcoords.y, chanCoord)).zyxw;
+ uv.y = dot((lattice.yw + lattice.xz * vec2(0.00390625)) * vec2(2.0) - vec2(1.0), fractVal);
+ vec2 ab;
+ ab.x = mix(uv.x, uv.y, noiseSmooth.x);
+ fractVal.y -= 1.0;
+ lattice = texture(uTextureSampler_1_Stage1, vec2(bcoords.w, chanCoord)).zyxw;
+ uv.y = dot((lattice.yw + lattice.xz * vec2(0.00390625)) * vec2(2.0) - vec2(1.0), fractVal);
+ fractVal.x += 1.0;
+ lattice = texture(uTextureSampler_1_Stage1, vec2(bcoords.z, chanCoord)).zyxw;
+ uv.x = dot((lattice.yw + lattice.xz * vec2(0.00390625)) * vec2(2.0) - vec2(1.0), fractVal);
+ ab.y = mix(uv.x, uv.y, noiseSmooth.x);
+ return mix(ab.x, ab.y, noiseSmooth.y);
+}
+vec4 PerlinNoise_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 noiseVec = floor(vTransformedCoords_0_Stage0) * ubaseFrequency_Stage1_c0_c0_c0_c0;
+ _output = vec4(0.0);
+ vec2 stitchData = ustitchData_Stage1_c0_c0_c0_c0;
+ float ratio = 1.0;
+ for (int octave = 0;octave < 4; ++octave) {
+ _output += vec4(perlinnoise_Stage1_c0_c0_c0_c0(0.125, noiseVec, stitchData), perlinnoise_Stage1_c0_c0_c0_c0(0.375, noiseVec, stitchData), perlinnoise_Stage1_c0_c0_c0_c0(0.625, noiseVec, stitchData), perlinnoise_Stage1_c0_c0_c0_c0(0.875, noiseVec, stitchData)) * ratio;
+ noiseVec *= vec2(2.0);
+ ratio *= 0.5;
+ stitchData *= vec2(2.0);
+ }
+ _output = _output * vec4(0.5) + vec4(0.5);
+ _output = clamp(_output, 0.0, 1.0);
+ _output = vec4(_output.xyz * _output.www, _output.w);
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+vec4 ComposeOne_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_dst_in(_input, PerlinNoise_Stage1_c0_c0_c0_c0(vec4(1.0)));
+ return _output;
+}
+vec4 blend_src(vec4 src, vec4 dst) {
+ return src;
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ float alpha = 1.0;
+ alpha = vinCoverage_Stage0;
+ outputCoverage_Stage0 = vec4(alpha);
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ComposeOne_Stage1_c0_c0(vec4(1.0));
+ }
+ {
+ if (all(lessThanEqual(outputCoverage_Stage0.xyz, vec3(0.0)))) {
+ discard;
+ }
+ vec2 _dstTexCoord = (gl_FragCoord.xy - uDstTextureUpperLeft_Stage2) * uDstTextureCoordScale_Stage2;
+ _dstTexCoord.y = 1.0 - _dstTexCoord.y;
+ vec4 _dstColor = texture(uDstTextureSampler_Stage2, _dstTexCoord);
+ sk_FragColor = blend_src(output_Stage1, _dstColor);
+ sk_FragColor = outputCoverage_Stage0 * sk_FragColor + (vec4(1.0) - outputCoverage_Stage0) * _dstColor;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in float inCoverage;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out float vinCoverage_Stage0;
+void main() {
+ vec4 color = inColor;
+ vcolor_Stage0 = color;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ vinCoverage_Stage0 = inCoverage;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/2149.shader_test b/shaders/skia/2149.shader_test
new file mode 100644
index 0000000..f8d77fd
--- /dev/null
+++ b/shaders/skia/2149.shader_test
@@ -0,0 +1,140 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec2 ubaseFrequency_Stage1_c0_c0_c0_c0;
+uniform vec2 ustitchData_Stage1_c0_c0_c0_c0;
+uniform vec2 uDstTextureUpperLeft_Stage2;
+uniform vec2 uDstTextureCoordScale_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+uniform sampler2D uDstTextureSampler_Stage2;
+noperspective in vec4 vQuadEdge_Stage0;
+noperspective in vec4 vinColor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+float perlinnoise_Stage1_c0_c0_c0_c0(float chanCoord, vec2 noiseVec, vec2 stitchData) {
+ vec4 floorVal;
+ floorVal.xy = floor(noiseVec);
+ floorVal.zw = floorVal.xy + vec2(1.0);
+ vec2 fractVal = fract(noiseVec);
+ vec2 noiseSmooth = (fractVal * fractVal) * (vec2(3.0) - vec2(2.0) * fractVal);
+ if (floorVal.x >= stitchData.x) {
+ floorVal.x -= stitchData.x;
+ }
+ if (floorVal.y >= stitchData.y) {
+ floorVal.y -= stitchData.y;
+ }
+ if (floorVal.z >= stitchData.x) {
+ floorVal.z -= stitchData.x;
+ }
+ if (floorVal.w >= stitchData.y) {
+ floorVal.w -= stitchData.y;
+ }
+ floorVal = fract(floor(mod(floorVal, 256.0)) / vec4(256.0));
+ vec2 latticeIdx;
+ latticeIdx.x = texture(uTextureSampler_0_Stage1, vec2(floorVal.x, 0.5)).x;
+ latticeIdx.y = texture(uTextureSampler_0_Stage1, vec2(floorVal.z, 0.5)).x;
+ vec4 bcoords = fract(latticeIdx.xyxy + floorVal.yyww);
+ vec2 uv;
+ vec4 lattice = texture(uTextureSampler_1_Stage1, vec2(bcoords.x, chanCoord)).zyxw;
+ uv.x = dot((lattice.yw + lattice.xz * vec2(0.00390625)) * vec2(2.0) - vec2(1.0), fractVal);
+ fractVal.x -= 1.0;
+ lattice = texture(uTextureSampler_1_Stage1, vec2(bcoords.y, chanCoord)).zyxw;
+ uv.y = dot((lattice.yw + lattice.xz * vec2(0.00390625)) * vec2(2.0) - vec2(1.0), fractVal);
+ vec2 ab;
+ ab.x = mix(uv.x, uv.y, noiseSmooth.x);
+ fractVal.y -= 1.0;
+ lattice = texture(uTextureSampler_1_Stage1, vec2(bcoords.w, chanCoord)).zyxw;
+ uv.y = dot((lattice.yw + lattice.xz * vec2(0.00390625)) * vec2(2.0) - vec2(1.0), fractVal);
+ fractVal.x += 1.0;
+ lattice = texture(uTextureSampler_1_Stage1, vec2(bcoords.z, chanCoord)).zyxw;
+ uv.x = dot((lattice.yw + lattice.xz * vec2(0.00390625)) * vec2(2.0) - vec2(1.0), fractVal);
+ ab.y = mix(uv.x, uv.y, noiseSmooth.x);
+ return mix(ab.x, ab.y, noiseSmooth.y);
+}
+vec4 PerlinNoise_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 noiseVec = floor(vTransformedCoords_0_Stage0) * ubaseFrequency_Stage1_c0_c0_c0_c0;
+ _output = vec4(0.0);
+ vec2 stitchData = ustitchData_Stage1_c0_c0_c0_c0;
+ float ratio = 1.0;
+ for (int octave = 0;octave < 3; ++octave) {
+ _output += abs(vec4(perlinnoise_Stage1_c0_c0_c0_c0(0.125, noiseVec, stitchData), perlinnoise_Stage1_c0_c0_c0_c0(0.375, noiseVec, stitchData), perlinnoise_Stage1_c0_c0_c0_c0(0.625, noiseVec, stitchData), perlinnoise_Stage1_c0_c0_c0_c0(0.875, noiseVec, stitchData))) * ratio;
+ noiseVec *= vec2(2.0);
+ ratio *= 0.5;
+ stitchData *= vec2(2.0);
+ }
+ _output = clamp(_output, 0.0, 1.0);
+ _output = vec4(_output.xyz * _output.www, _output.w);
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+vec4 ComposeOne_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_dst_in(_input, PerlinNoise_Stage1_c0_c0_c0_c0(vec4(1.0)));
+ return _output;
+}
+vec4 blend_src(vec4 src, vec4 dst) {
+ return src;
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ float edgeAlpha;
+ vec2 duvdx = dFdx(vQuadEdge_Stage0.xy);
+ vec2 duvdy = -dFdy(vQuadEdge_Stage0.xy);
+ if (vQuadEdge_Stage0.z > 0.0 && vQuadEdge_Stage0.w > 0.0) {
+ edgeAlpha = min(min(vQuadEdge_Stage0.z, vQuadEdge_Stage0.w) + 0.5, 1.0);
+ } else {
+ vec2 gF = vec2((2.0 * vQuadEdge_Stage0.x) * duvdx.x - duvdx.y, (2.0 * vQuadEdge_Stage0.x) * duvdy.x - duvdy.y);
+ edgeAlpha = vQuadEdge_Stage0.x * vQuadEdge_Stage0.x - vQuadEdge_Stage0.y;
+ edgeAlpha = clamp(0.5 - edgeAlpha / length(gF), 0.0, 1.0);
+ }
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ComposeOne_Stage1_c0_c0(vec4(1.0));
+ }
+ {
+ if (all(lessThanEqual(outputCoverage_Stage0.xyz, vec3(0.0)))) {
+ discard;
+ }
+ vec2 _dstTexCoord = (gl_FragCoord.xy - uDstTextureUpperLeft_Stage2) * uDstTextureCoordScale_Stage2;
+ _dstTexCoord.y = 1.0 - _dstTexCoord.y;
+ vec4 _dstColor = texture(uDstTextureSampler_Stage2, _dstTexCoord);
+ sk_FragColor = blend_src(output_Stage1, _dstColor);
+ sk_FragColor = outputCoverage_Stage0 * sk_FragColor + (vec4(1.0) - outputCoverage_Stage0) * _dstColor;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec4 inQuadEdge;
+noperspective out vec4 vQuadEdge_Stage0;
+noperspective out vec4 vinColor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vQuadEdge_Stage0 = inQuadEdge;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/2152.shader_test b/shaders/skia/2152.shader_test
new file mode 100644
index 0000000..e709b50
--- /dev/null
+++ b/shaders/skia/2152.shader_test
@@ -0,0 +1,132 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec2 ubaseFrequency_Stage1_c0_c0;
+uniform float uz_Stage1_c0_c0;
+uniform vec2 uDstTextureUpperLeft_Stage2;
+uniform vec2 uDstTextureCoordScale_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+uniform sampler2D uDstTextureSampler_Stage2;
+noperspective in vec2 vEllipseOffsets0_Stage0;
+noperspective in vec2 vEllipseOffsets1_Stage0;
+noperspective in vec4 vinColor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec3 fade_Stage1_c0_c0(vec3 t) {
+ return ((t * t) * t) * (t * (t * 6.0 - 15.0) + 10.0);
+}
+float perm_Stage1_c0_c0(float x) {
+ return texture(uTextureSampler_0_Stage1, vec2(fract(x / 256.0), 0.0)).x * 255.0;
+}
+float grad_Stage1_c0_c0(float x, vec3 p) {
+ return dot(texture(uTextureSampler_1_Stage1, vec2(fract(x / 16.0), 0.0)).xyz * 255.0 - vec3(1.0), p);
+}
+float lerp_Stage1_c0_c0(float a, float b, float w) {
+ return a + w * (b - a);
+}
+float noise_Stage1_c0_c0(vec3 p) {
+ vec3 P = mod(floor(p), 256.0);
+ p -= floor(p);
+ vec3 f = fade_Stage1_c0_c0(p);
+ float A = perm_Stage1_c0_c0(P.x) + P.y;
+ float AA = perm_Stage1_c0_c0(A) + P.z;
+ float AB = perm_Stage1_c0_c0(A + 1.0) + P.z;
+ float B = perm_Stage1_c0_c0(P.x + 1.0) + P.y;
+ float BA = perm_Stage1_c0_c0(B) + P.z;
+ float BB = perm_Stage1_c0_c0(B + 1.0) + P.z;
+ float result = lerp_Stage1_c0_c0(lerp_Stage1_c0_c0(lerp_Stage1_c0_c0(grad_Stage1_c0_c0(perm_Stage1_c0_c0(AA), p), grad_Stage1_c0_c0(perm_Stage1_c0_c0(BA), p + vec3(-1.0, 0.0, 0.0)), f.x), lerp_Stage1_c0_c0(grad_Stage1_c0_c0(perm_Stage1_c0_c0(AB), p + vec3(0.0, -1.0, 0.0)), grad_Stage1_c0_c0(perm_Stage1_c0_c0(BB), p + vec3(-1.0, -1.0, 0.0)), f.x), f.y), lerp_Stage1_c0_c0(lerp_Stage1_c0_c0(grad_Stage1_c0_c0(perm_Stage1_c0_c0(AA + 1.0), p + vec3(0.0, 0.0, -1.0)), grad_Stage1_c0_c0(perm_Stage1_c0_c0(BA + 1.0), p + vec3(-1.0, 0.0, -1.0)), f.x), lerp_Stage1_c0_c0(grad_Stage1_c0_c0(perm_Stage1_c0_c0(AB + 1.0), p + vec3(0.0, -1.0, -1.0)), grad_Stage1_c0_c0(perm_Stage1_c0_c0(BB + 1.0), p + vec3(-1.0, -1.0, -1.0)), f.x), f.y), f.z);
+ return result;
+}
+float noiseOctaves_Stage1_c0_c0(vec3 p) {
+ float result = 0.0;
+ float ratio = 1.0;
+ for (float i = 0.0;i < 8.0; i++) {
+ result += noise_Stage1_c0_c0(p) / ratio;
+ p *= 2.0;
+ ratio *= 2.0;
+ }
+ return (result + 1.0) / 2.0;
+}
+vec4 ImprovedPerlinNoise_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coords = vTransformedCoords_0_Stage0 * ubaseFrequency_Stage1_c0_c0;
+ float r = noiseOctaves_Stage1_c0_c0(vec3(coords, uz_Stage1_c0_c0));
+ float g = noiseOctaves_Stage1_c0_c0(vec3(coords, uz_Stage1_c0_c0));
+ float b = noiseOctaves_Stage1_c0_c0(vec3(coords, uz_Stage1_c0_c0));
+ float a = noiseOctaves_Stage1_c0_c0(vec3(coords, uz_Stage1_c0_c0));
+ _output = vec4(r, g, b, a);
+ _output = clamp(_output, 0.0, 1.0);
+ _output = vec4(_output.xyz * _output.www, _output.w);
+ return _output;
+}
+vec4 blend_src(vec4 src, vec4 dst) {
+ return src;
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ vec2 scaledOffset = vEllipseOffsets0_Stage0;
+ float test = dot(scaledOffset, scaledOffset) - 1.0;
+ vec2 duvdx = dFdx(vEllipseOffsets0_Stage0);
+ vec2 duvdy = -dFdy(vEllipseOffsets0_Stage0);
+ vec2 grad = vec2(vEllipseOffsets0_Stage0.x * duvdx.x + vEllipseOffsets0_Stage0.y * duvdx.y, vEllipseOffsets0_Stage0.x * duvdy.x + vEllipseOffsets0_Stage0.y * duvdy.y);
+ float grad_dot = 4.0 * dot(grad, grad);
+ grad_dot = max(grad_dot, 1.1754999560161448e-38);
+ float invlen = inversesqrt(grad_dot);
+ float edgeAlpha = clamp(0.5 - test * invlen, 0.0, 1.0);
+ scaledOffset = vEllipseOffsets1_Stage0;
+ test = dot(scaledOffset, scaledOffset) - 1.0;
+ duvdx = dFdx(vEllipseOffsets1_Stage0);
+ duvdy = -dFdy(vEllipseOffsets1_Stage0);
+ grad = vec2(vEllipseOffsets1_Stage0.x * duvdx.x + vEllipseOffsets1_Stage0.y * duvdx.y, vEllipseOffsets1_Stage0.x * duvdy.x + vEllipseOffsets1_Stage0.y * duvdy.y);
+ grad_dot = 4.0 * dot(grad, grad);
+ invlen = inversesqrt(grad_dot);
+ edgeAlpha *= clamp(0.5 + test * invlen, 0.0, 1.0);
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ImprovedPerlinNoise_Stage1_c0_c0(vec4(1.0));
+ }
+ {
+ if (all(lessThanEqual(outputCoverage_Stage0.xyz, vec3(0.0)))) {
+ discard;
+ }
+ vec2 _dstTexCoord = (gl_FragCoord.xy - uDstTextureUpperLeft_Stage2) * uDstTextureCoordScale_Stage2;
+ _dstTexCoord.y = 1.0 - _dstTexCoord.y;
+ vec4 _dstColor = texture(uDstTextureSampler_Stage2, _dstTexCoord);
+ sk_FragColor = blend_src(output_Stage1, _dstColor);
+ sk_FragColor = outputCoverage_Stage0 * sk_FragColor + (vec4(1.0) - outputCoverage_Stage0) * _dstColor;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec2 inEllipseOffsets0;
+in vec2 inEllipseOffsets1;
+noperspective out vec2 vEllipseOffsets0_Stage0;
+noperspective out vec2 vEllipseOffsets1_Stage0;
+noperspective out vec4 vinColor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vEllipseOffsets0_Stage0 = inEllipseOffsets0;
+ vEllipseOffsets1_Stage0 = inEllipseOffsets1;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = (uViewM_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/2155.shader_test b/shaders/skia/2155.shader_test
new file mode 100644
index 0000000..d70f3a1
--- /dev/null
+++ b/shaders/skia/2155.shader_test
@@ -0,0 +1,89 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 ubaseFrequency_Stage1_c0_c0;
+uniform float uz_Stage1_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec3 fade_Stage1_c0_c0(vec3 t) {
+ return ((t * t) * t) * (t * (t * 6.0 - 15.0) + 10.0);
+}
+float perm_Stage1_c0_c0(float x) {
+ return texture(uTextureSampler_0_Stage1, vec2(fract(x / 256.0), 0.0)).x * 255.0;
+}
+float grad_Stage1_c0_c0(float x, vec3 p) {
+ return dot(texture(uTextureSampler_1_Stage1, vec2(fract(x / 16.0), 0.0)).xyz * 255.0 - vec3(1.0), p);
+}
+float lerp_Stage1_c0_c0(float a, float b, float w) {
+ return a + w * (b - a);
+}
+float noise_Stage1_c0_c0(vec3 p) {
+ vec3 P = mod(floor(p), 256.0);
+ p -= floor(p);
+ vec3 f = fade_Stage1_c0_c0(p);
+ float A = perm_Stage1_c0_c0(P.x) + P.y;
+ float AA = perm_Stage1_c0_c0(A) + P.z;
+ float AB = perm_Stage1_c0_c0(A + 1.0) + P.z;
+ float B = perm_Stage1_c0_c0(P.x + 1.0) + P.y;
+ float BA = perm_Stage1_c0_c0(B) + P.z;
+ float BB = perm_Stage1_c0_c0(B + 1.0) + P.z;
+ float result = lerp_Stage1_c0_c0(lerp_Stage1_c0_c0(lerp_Stage1_c0_c0(grad_Stage1_c0_c0(perm_Stage1_c0_c0(AA), p), grad_Stage1_c0_c0(perm_Stage1_c0_c0(BA), p + vec3(-1.0, 0.0, 0.0)), f.x), lerp_Stage1_c0_c0(grad_Stage1_c0_c0(perm_Stage1_c0_c0(AB), p + vec3(0.0, -1.0, 0.0)), grad_Stage1_c0_c0(perm_Stage1_c0_c0(BB), p + vec3(-1.0, -1.0, 0.0)), f.x), f.y), lerp_Stage1_c0_c0(lerp_Stage1_c0_c0(grad_Stage1_c0_c0(perm_Stage1_c0_c0(AA + 1.0), p + vec3(0.0, 0.0, -1.0)), grad_Stage1_c0_c0(perm_Stage1_c0_c0(BA + 1.0), p + vec3(-1.0, 0.0, -1.0)), f.x), lerp_Stage1_c0_c0(grad_Stage1_c0_c0(perm_Stage1_c0_c0(AB + 1.0), p + vec3(0.0, -1.0, -1.0)), grad_Stage1_c0_c0(perm_Stage1_c0_c0(BB + 1.0), p + vec3(-1.0, -1.0, -1.0)), f.x), f.y), f.z);
+ return result;
+}
+float noiseOctaves_Stage1_c0_c0(vec3 p) {
+ float result = 0.0;
+ float ratio = 1.0;
+ for (float i = 0.0;i < 7.0; i++) {
+ result += noise_Stage1_c0_c0(p) / ratio;
+ p *= 2.0;
+ ratio *= 2.0;
+ }
+ return (result + 1.0) / 2.0;
+}
+vec4 ImprovedPerlinNoise_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coords = vTransformedCoords_0_Stage0 * ubaseFrequency_Stage1_c0_c0;
+ float r = noiseOctaves_Stage1_c0_c0(vec3(coords, uz_Stage1_c0_c0));
+ float g = noiseOctaves_Stage1_c0_c0(vec3(coords, uz_Stage1_c0_c0));
+ float b = noiseOctaves_Stage1_c0_c0(vec3(coords, uz_Stage1_c0_c0));
+ float a = noiseOctaves_Stage1_c0_c0(vec3(coords, uz_Stage1_c0_c0));
+ _output = vec4(r, g, b, a);
+ _output = clamp(_output, 0.0, 1.0);
+ _output = vec4(_output.xyz * _output.www, _output.w);
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ImprovedPerlinNoise_Stage1_c0_c0(vec4(1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec2 inLocalCoord;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 color = inColor;
+ vcolor_Stage0 = color;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/2158.shader_test b/shaders/skia/2158.shader_test
new file mode 100644
index 0000000..07dea9f
--- /dev/null
+++ b/shaders/skia/2158.shader_test
@@ -0,0 +1,87 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uColor_Stage0;
+uniform vec2 ubaseFrequency_Stage1_c0_c0;
+uniform float uz_Stage1_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+in vec2 vTransformedCoords_0_Stage0;
+vec3 fade_Stage1_c0_c0(vec3 t) {
+ return ((t * t) * t) * (t * (t * 6.0 - 15.0) + 10.0);
+}
+float perm_Stage1_c0_c0(float x) {
+ return texture(uTextureSampler_0_Stage1, vec2(fract(x / 256.0), 0.0)).x * 255.0;
+}
+float grad_Stage1_c0_c0(float x, vec3 p) {
+ return dot(texture(uTextureSampler_1_Stage1, vec2(fract(x / 16.0), 0.0)).xyz * 255.0 - vec3(1.0), p);
+}
+float lerp_Stage1_c0_c0(float a, float b, float w) {
+ return a + w * (b - a);
+}
+float noise_Stage1_c0_c0(vec3 p) {
+ vec3 P = mod(floor(p), 256.0);
+ p -= floor(p);
+ vec3 f = fade_Stage1_c0_c0(p);
+ float A = perm_Stage1_c0_c0(P.x) + P.y;
+ float AA = perm_Stage1_c0_c0(A) + P.z;
+ float AB = perm_Stage1_c0_c0(A + 1.0) + P.z;
+ float B = perm_Stage1_c0_c0(P.x + 1.0) + P.y;
+ float BA = perm_Stage1_c0_c0(B) + P.z;
+ float BB = perm_Stage1_c0_c0(B + 1.0) + P.z;
+ float result = lerp_Stage1_c0_c0(lerp_Stage1_c0_c0(lerp_Stage1_c0_c0(grad_Stage1_c0_c0(perm_Stage1_c0_c0(AA), p), grad_Stage1_c0_c0(perm_Stage1_c0_c0(BA), p + vec3(-1.0, 0.0, 0.0)), f.x), lerp_Stage1_c0_c0(grad_Stage1_c0_c0(perm_Stage1_c0_c0(AB), p + vec3(0.0, -1.0, 0.0)), grad_Stage1_c0_c0(perm_Stage1_c0_c0(BB), p + vec3(-1.0, -1.0, 0.0)), f.x), f.y), lerp_Stage1_c0_c0(lerp_Stage1_c0_c0(grad_Stage1_c0_c0(perm_Stage1_c0_c0(AA + 1.0), p + vec3(0.0, 0.0, -1.0)), grad_Stage1_c0_c0(perm_Stage1_c0_c0(BA + 1.0), p + vec3(-1.0, 0.0, -1.0)), f.x), lerp_Stage1_c0_c0(grad_Stage1_c0_c0(perm_Stage1_c0_c0(AB + 1.0), p + vec3(0.0, -1.0, -1.0)), grad_Stage1_c0_c0(perm_Stage1_c0_c0(BB + 1.0), p + vec3(-1.0, -1.0, -1.0)), f.x), f.y), f.z);
+ return result;
+}
+float noiseOctaves_Stage1_c0_c0(vec3 p) {
+ float result = 0.0;
+ float ratio = 1.0;
+ for (float i = 0.0;i < 2.0; i++) {
+ result += noise_Stage1_c0_c0(p) / ratio;
+ p *= 2.0;
+ ratio *= 2.0;
+ }
+ return (result + 1.0) / 2.0;
+}
+vec4 ImprovedPerlinNoise_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coords = vTransformedCoords_0_Stage0 * ubaseFrequency_Stage1_c0_c0;
+ float r = noiseOctaves_Stage1_c0_c0(vec3(coords, uz_Stage1_c0_c0));
+ float g = noiseOctaves_Stage1_c0_c0(vec3(coords, uz_Stage1_c0_c0));
+ float b = noiseOctaves_Stage1_c0_c0(vec3(coords, uz_Stage1_c0_c0));
+ float a = noiseOctaves_Stage1_c0_c0(vec3(coords, uz_Stage1_c0_c0));
+ _output = vec4(r, g, b, a);
+ _output = clamp(_output, 0.0, 1.0);
+ _output = vec4(_output.xyz * _output.www, _output.w);
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ImprovedPerlinNoise_Stage1_c0_c0(vec4(1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 inLocalCoord;
+out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec3 pos3 = uViewM_Stage0 * vec3(position, 1.0);
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos3.x, pos3.y, 0.0, pos3.z);
+ gl_PointSize = 1.0;
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/2161.shader_test b/shaders/skia/2161.shader_test
new file mode 100644
index 0000000..4cadb28
--- /dev/null
+++ b/shaders/skia/2161.shader_test
@@ -0,0 +1,128 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec2 ubaseFrequency_Stage1_c0_c0;
+uniform float uz_Stage1_c0_c0;
+uniform vec2 uDstTextureUpperLeft_Stage2;
+uniform vec2 uDstTextureCoordScale_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+uniform sampler2D uDstTextureSampler_Stage2;
+noperspective in vec2 vEllipseOffsets_Stage0;
+noperspective in vec4 vEllipseRadii_Stage0;
+noperspective in vec4 vinColor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec3 fade_Stage1_c0_c0(vec3 t) {
+ return ((t * t) * t) * (t * (t * 6.0 - 15.0) + 10.0);
+}
+float perm_Stage1_c0_c0(float x) {
+ return texture(uTextureSampler_0_Stage1, vec2(fract(x / 256.0), 0.0)).x * 255.0;
+}
+float grad_Stage1_c0_c0(float x, vec3 p) {
+ return dot(texture(uTextureSampler_1_Stage1, vec2(fract(x / 16.0), 0.0)).xyz * 255.0 - vec3(1.0), p);
+}
+float lerp_Stage1_c0_c0(float a, float b, float w) {
+ return a + w * (b - a);
+}
+float noise_Stage1_c0_c0(vec3 p) {
+ vec3 P = mod(floor(p), 256.0);
+ p -= floor(p);
+ vec3 f = fade_Stage1_c0_c0(p);
+ float A = perm_Stage1_c0_c0(P.x) + P.y;
+ float AA = perm_Stage1_c0_c0(A) + P.z;
+ float AB = perm_Stage1_c0_c0(A + 1.0) + P.z;
+ float B = perm_Stage1_c0_c0(P.x + 1.0) + P.y;
+ float BA = perm_Stage1_c0_c0(B) + P.z;
+ float BB = perm_Stage1_c0_c0(B + 1.0) + P.z;
+ float result = lerp_Stage1_c0_c0(lerp_Stage1_c0_c0(lerp_Stage1_c0_c0(grad_Stage1_c0_c0(perm_Stage1_c0_c0(AA), p), grad_Stage1_c0_c0(perm_Stage1_c0_c0(BA), p + vec3(-1.0, 0.0, 0.0)), f.x), lerp_Stage1_c0_c0(grad_Stage1_c0_c0(perm_Stage1_c0_c0(AB), p + vec3(0.0, -1.0, 0.0)), grad_Stage1_c0_c0(perm_Stage1_c0_c0(BB), p + vec3(-1.0, -1.0, 0.0)), f.x), f.y), lerp_Stage1_c0_c0(lerp_Stage1_c0_c0(grad_Stage1_c0_c0(perm_Stage1_c0_c0(AA + 1.0), p + vec3(0.0, 0.0, -1.0)), grad_Stage1_c0_c0(perm_Stage1_c0_c0(BA + 1.0), p + vec3(-1.0, 0.0, -1.0)), f.x), lerp_Stage1_c0_c0(grad_Stage1_c0_c0(perm_Stage1_c0_c0(AB + 1.0), p + vec3(0.0, -1.0, -1.0)), grad_Stage1_c0_c0(perm_Stage1_c0_c0(BB + 1.0), p + vec3(-1.0, -1.0, -1.0)), f.x), f.y), f.z);
+ return result;
+}
+float noiseOctaves_Stage1_c0_c0(vec3 p) {
+ float result = 0.0;
+ float ratio = 1.0;
+ for (float i = 0.0;i < 2.0; i++) {
+ result += noise_Stage1_c0_c0(p) / ratio;
+ p *= 2.0;
+ ratio *= 2.0;
+ }
+ return (result + 1.0) / 2.0;
+}
+vec4 ImprovedPerlinNoise_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coords = vTransformedCoords_0_Stage0 * ubaseFrequency_Stage1_c0_c0;
+ float r = noiseOctaves_Stage1_c0_c0(vec3(coords, uz_Stage1_c0_c0));
+ float g = noiseOctaves_Stage1_c0_c0(vec3(coords, uz_Stage1_c0_c0));
+ float b = noiseOctaves_Stage1_c0_c0(vec3(coords, uz_Stage1_c0_c0));
+ float a = noiseOctaves_Stage1_c0_c0(vec3(coords, uz_Stage1_c0_c0));
+ _output = vec4(r, g, b, a);
+ _output = clamp(_output, 0.0, 1.0);
+ _output = vec4(_output.xyz * _output.www, _output.w);
+ return _output;
+}
+vec4 blend_src(vec4 src, vec4 dst) {
+ return src;
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ vec2 offset = vEllipseOffsets_Stage0;
+ offset *= vEllipseRadii_Stage0.xy;
+ float test = dot(offset, offset) - 1.0;
+ vec2 grad = (2.0 * offset) * vEllipseRadii_Stage0.xy;
+ float grad_dot = dot(grad, grad);
+ grad_dot = max(grad_dot, 1.1754999560161448e-38);
+ float invlen = inversesqrt(grad_dot);
+ float edgeAlpha = clamp(0.5 - test * invlen, 0.0, 1.0);
+ offset = vEllipseOffsets_Stage0 * vEllipseRadii_Stage0.zw;
+ test = dot(offset, offset) - 1.0;
+ grad = (2.0 * offset) * vEllipseRadii_Stage0.zw;
+ grad_dot = dot(grad, grad);
+ invlen = inversesqrt(grad_dot);
+ edgeAlpha *= clamp(0.5 + test * invlen, 0.0, 1.0);
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ImprovedPerlinNoise_Stage1_c0_c0(vec4(1.0));
+ }
+ {
+ if (all(lessThanEqual(outputCoverage_Stage0.xyz, vec3(0.0)))) {
+ discard;
+ }
+ vec2 _dstTexCoord = (gl_FragCoord.xy - uDstTextureUpperLeft_Stage2) * uDstTextureCoordScale_Stage2;
+ _dstTexCoord.y = 1.0 - _dstTexCoord.y;
+ vec4 _dstColor = texture(uDstTextureSampler_Stage2, _dstTexCoord);
+ sk_FragColor = blend_src(output_Stage1, _dstColor);
+ sk_FragColor = outputCoverage_Stage0 * sk_FragColor + (vec4(1.0) - outputCoverage_Stage0) * _dstColor;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec2 inEllipseOffset;
+in vec4 inEllipseRadii;
+noperspective out vec2 vEllipseOffsets_Stage0;
+noperspective out vec4 vEllipseRadii_Stage0;
+noperspective out vec4 vinColor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vEllipseOffsets_Stage0 = inEllipseOffset;
+ vEllipseRadii_Stage0 = inEllipseRadii;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/2164.shader_test b/shaders/skia/2164.shader_test
new file mode 100644
index 0000000..7e596d7
--- /dev/null
+++ b/shaders/skia/2164.shader_test
@@ -0,0 +1,86 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uColor_Stage0;
+uniform vec2 ubaseFrequency_Stage1_c0_c0;
+uniform float uz_Stage1_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+in vec2 vTransformedCoords_0_Stage0;
+vec3 fade_Stage1_c0_c0(vec3 t) {
+ return ((t * t) * t) * (t * (t * 6.0 - 15.0) + 10.0);
+}
+float perm_Stage1_c0_c0(float x) {
+ return texture(uTextureSampler_0_Stage1, vec2(fract(x / 256.0), 0.0)).x * 255.0;
+}
+float grad_Stage1_c0_c0(float x, vec3 p) {
+ return dot(texture(uTextureSampler_1_Stage1, vec2(fract(x / 16.0), 0.0)).xyz * 255.0 - vec3(1.0), p);
+}
+float lerp_Stage1_c0_c0(float a, float b, float w) {
+ return a + w * (b - a);
+}
+float noise_Stage1_c0_c0(vec3 p) {
+ vec3 P = mod(floor(p), 256.0);
+ p -= floor(p);
+ vec3 f = fade_Stage1_c0_c0(p);
+ float A = perm_Stage1_c0_c0(P.x) + P.y;
+ float AA = perm_Stage1_c0_c0(A) + P.z;
+ float AB = perm_Stage1_c0_c0(A + 1.0) + P.z;
+ float B = perm_Stage1_c0_c0(P.x + 1.0) + P.y;
+ float BA = perm_Stage1_c0_c0(B) + P.z;
+ float BB = perm_Stage1_c0_c0(B + 1.0) + P.z;
+ float result = lerp_Stage1_c0_c0(lerp_Stage1_c0_c0(lerp_Stage1_c0_c0(grad_Stage1_c0_c0(perm_Stage1_c0_c0(AA), p), grad_Stage1_c0_c0(perm_Stage1_c0_c0(BA), p + vec3(-1.0, 0.0, 0.0)), f.x), lerp_Stage1_c0_c0(grad_Stage1_c0_c0(perm_Stage1_c0_c0(AB), p + vec3(0.0, -1.0, 0.0)), grad_Stage1_c0_c0(perm_Stage1_c0_c0(BB), p + vec3(-1.0, -1.0, 0.0)), f.x), f.y), lerp_Stage1_c0_c0(lerp_Stage1_c0_c0(grad_Stage1_c0_c0(perm_Stage1_c0_c0(AA + 1.0), p + vec3(0.0, 0.0, -1.0)), grad_Stage1_c0_c0(perm_Stage1_c0_c0(BA + 1.0), p + vec3(-1.0, 0.0, -1.0)), f.x), lerp_Stage1_c0_c0(grad_Stage1_c0_c0(perm_Stage1_c0_c0(AB + 1.0), p + vec3(0.0, -1.0, -1.0)), grad_Stage1_c0_c0(perm_Stage1_c0_c0(BB + 1.0), p + vec3(-1.0, -1.0, -1.0)), f.x), f.y), f.z);
+ return result;
+}
+float noiseOctaves_Stage1_c0_c0(vec3 p) {
+ float result = 0.0;
+ float ratio = 1.0;
+ for (float i = 0.0;i < 7.0; i++) {
+ result += noise_Stage1_c0_c0(p) / ratio;
+ p *= 2.0;
+ ratio *= 2.0;
+ }
+ return (result + 1.0) / 2.0;
+}
+vec4 ImprovedPerlinNoise_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coords = vTransformedCoords_0_Stage0 * ubaseFrequency_Stage1_c0_c0;
+ float r = noiseOctaves_Stage1_c0_c0(vec3(coords, uz_Stage1_c0_c0));
+ float g = noiseOctaves_Stage1_c0_c0(vec3(coords, uz_Stage1_c0_c0));
+ float b = noiseOctaves_Stage1_c0_c0(vec3(coords, uz_Stage1_c0_c0));
+ float a = noiseOctaves_Stage1_c0_c0(vec3(coords, uz_Stage1_c0_c0));
+ _output = vec4(r, g, b, a);
+ _output = clamp(_output, 0.0, 1.0);
+ _output = vec4(_output.xyz * _output.www, _output.w);
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ImprovedPerlinNoise_Stage1_c0_c0(vec4(1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec2 inLocalCoord;
+out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec3 pos3 = uViewM_Stage0 * vec3(inPosition, 1.0);
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos3.x, pos3.y, 0.0, pos3.z);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/2167.shader_test b/shaders/skia/2167.shader_test
new file mode 100644
index 0000000..ca17166
--- /dev/null
+++ b/shaders/skia/2167.shader_test
@@ -0,0 +1,113 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec2 ubaseFrequency_Stage1_c0_c0;
+uniform float uz_Stage1_c0_c0;
+uniform vec2 uDstTextureUpperLeft_Stage2;
+uniform vec2 uDstTextureCoordScale_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+uniform sampler2D uDstTextureSampler_Stage2;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in float vinCoverage_Stage0;
+vec3 fade_Stage1_c0_c0(vec3 t) {
+ return ((t * t) * t) * (t * (t * 6.0 - 15.0) + 10.0);
+}
+float perm_Stage1_c0_c0(float x) {
+ return texture(uTextureSampler_0_Stage1, vec2(fract(x / 256.0), 0.0)).x * 255.0;
+}
+float grad_Stage1_c0_c0(float x, vec3 p) {
+ return dot(texture(uTextureSampler_1_Stage1, vec2(fract(x / 16.0), 0.0)).xyz * 255.0 - vec3(1.0), p);
+}
+float lerp_Stage1_c0_c0(float a, float b, float w) {
+ return a + w * (b - a);
+}
+float noise_Stage1_c0_c0(vec3 p) {
+ vec3 P = mod(floor(p), 256.0);
+ p -= floor(p);
+ vec3 f = fade_Stage1_c0_c0(p);
+ float A = perm_Stage1_c0_c0(P.x) + P.y;
+ float AA = perm_Stage1_c0_c0(A) + P.z;
+ float AB = perm_Stage1_c0_c0(A + 1.0) + P.z;
+ float B = perm_Stage1_c0_c0(P.x + 1.0) + P.y;
+ float BA = perm_Stage1_c0_c0(B) + P.z;
+ float BB = perm_Stage1_c0_c0(B + 1.0) + P.z;
+ float result = lerp_Stage1_c0_c0(lerp_Stage1_c0_c0(lerp_Stage1_c0_c0(grad_Stage1_c0_c0(perm_Stage1_c0_c0(AA), p), grad_Stage1_c0_c0(perm_Stage1_c0_c0(BA), p + vec3(-1.0, 0.0, 0.0)), f.x), lerp_Stage1_c0_c0(grad_Stage1_c0_c0(perm_Stage1_c0_c0(AB), p + vec3(0.0, -1.0, 0.0)), grad_Stage1_c0_c0(perm_Stage1_c0_c0(BB), p + vec3(-1.0, -1.0, 0.0)), f.x), f.y), lerp_Stage1_c0_c0(lerp_Stage1_c0_c0(grad_Stage1_c0_c0(perm_Stage1_c0_c0(AA + 1.0), p + vec3(0.0, 0.0, -1.0)), grad_Stage1_c0_c0(perm_Stage1_c0_c0(BA + 1.0), p + vec3(-1.0, 0.0, -1.0)), f.x), lerp_Stage1_c0_c0(grad_Stage1_c0_c0(perm_Stage1_c0_c0(AB + 1.0), p + vec3(0.0, -1.0, -1.0)), grad_Stage1_c0_c0(perm_Stage1_c0_c0(BB + 1.0), p + vec3(-1.0, -1.0, -1.0)), f.x), f.y), f.z);
+ return result;
+}
+float noiseOctaves_Stage1_c0_c0(vec3 p) {
+ float result = 0.0;
+ float ratio = 1.0;
+ for (float i = 0.0;i < 10.0; i++) {
+ result += noise_Stage1_c0_c0(p) / ratio;
+ p *= 2.0;
+ ratio *= 2.0;
+ }
+ return (result + 1.0) / 2.0;
+}
+vec4 ImprovedPerlinNoise_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coords = vTransformedCoords_0_Stage0 * ubaseFrequency_Stage1_c0_c0;
+ float r = noiseOctaves_Stage1_c0_c0(vec3(coords, uz_Stage1_c0_c0));
+ float g = noiseOctaves_Stage1_c0_c0(vec3(coords, uz_Stage1_c0_c0));
+ float b = noiseOctaves_Stage1_c0_c0(vec3(coords, uz_Stage1_c0_c0));
+ float a = noiseOctaves_Stage1_c0_c0(vec3(coords, uz_Stage1_c0_c0));
+ _output = vec4(r, g, b, a);
+ _output = clamp(_output, 0.0, 1.0);
+ _output = vec4(_output.xyz * _output.www, _output.w);
+ return _output;
+}
+vec4 blend_src(vec4 src, vec4 dst) {
+ return src;
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ float alpha = 1.0;
+ alpha = vinCoverage_Stage0;
+ outputCoverage_Stage0 = vec4(alpha);
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ImprovedPerlinNoise_Stage1_c0_c0(vec4(1.0));
+ }
+ {
+ if (all(lessThanEqual(outputCoverage_Stage0.xyz, vec3(0.0)))) {
+ discard;
+ }
+ vec2 _dstTexCoord = (gl_FragCoord.xy - uDstTextureUpperLeft_Stage2) * uDstTextureCoordScale_Stage2;
+ _dstTexCoord.y = 1.0 - _dstTexCoord.y;
+ vec4 _dstColor = texture(uDstTextureSampler_Stage2, _dstTexCoord);
+ sk_FragColor = blend_src(output_Stage1, _dstColor);
+ sk_FragColor = outputCoverage_Stage0 * sk_FragColor + (vec4(1.0) - outputCoverage_Stage0) * _dstColor;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in float inCoverage;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out float vinCoverage_Stage0;
+void main() {
+ vec4 color = inColor;
+ vcolor_Stage0 = color;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ vinCoverage_Stage0 = inCoverage;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/217-2.shader_test b/shaders/skia/217-2.shader_test
new file mode 100644
index 0000000..a169e54
--- /dev/null
+++ b/shaders/skia/217-2.shader_test
@@ -0,0 +1,82 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage2_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c1_c0;
+ }
+ return _output;
+}
+vec4 blend_plus(vec4 src, vec4 dst) {
+ return min(src + dst, 1.0);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_plus(ConstColorProcessor_Stage2_c1_c0(vec4(1.0)), output_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/217-3.shader_test b/shaders/skia/217-3.shader_test
new file mode 100644
index 0000000..560bb13
--- /dev/null
+++ b/shaders/skia/217-3.shader_test
@@ -0,0 +1,191 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform float uSurfaceScale_Stage1;
+uniform vec3 uLightColor_Stage1;
+uniform float uKD_Stage1;
+uniform vec4 uTexDom_Stage1;
+uniform vec3 uDecalParams_Stage1;
+uniform vec3 uLightDirection_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 light_Stage1(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ float colorScale = uKD_Stage1 * dot(normal, surfaceToLight);
+ return vec4(lightColor * clamp(colorScale, 0.0, 1.0), 1.0);
+}
+float sobel_Stage1(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage1(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage1(float m[9], float surfaceScale) {
+ return pointToNormal_Stage1(sobel_Stage1(m[1], m[2], m[4], m[5], 0.0, 0.0, 0.66666698455810547), sobel_Stage1(0.0, 0.0, m[1], m[4], m[2], m[5], 0.66666698455810547), surfaceScale);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ vec2 coord = vTransformedCoords_0_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp0 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp5 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp6 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp7 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp8 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = uLightDirection_Stage1;
+ output_Stage1 = light_Stage1(normal_Stage1(m, uSurfaceScale_Stage1), surfaceToLight, uLightColor_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/217-5.shader_test b/shaders/skia/217-5.shader_test
new file mode 100644
index 0000000..1ba0096
--- /dev/null
+++ b/shaders/skia/217-5.shader_test
@@ -0,0 +1,327 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage2;
+uniform vec4 uKernel_Stage2[4];
+uniform vec2 uKernelOffset_Stage2;
+uniform float uGain_Stage2;
+uniform float uBias_Stage2;
+uniform vec4 uTexDom_Stage2;
+uniform vec3 uDecalParams_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ vec4 sum = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_1_Stage0 - uKernelOffset_Stage2 * uImageIncrement_Stage2;
+ vec4 c;
+ {
+ float k = uKernel_Stage2[0].x;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[0].y;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[0].z;
+ {
+ vec2 origCoord = coord + vec2(2.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[0].w;
+ {
+ vec2 origCoord = coord + vec2(3.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[1].x;
+ {
+ vec2 origCoord = coord + vec2(4.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[1].y;
+ {
+ vec2 origCoord = coord + vec2(5.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[1].z;
+ {
+ vec2 origCoord = coord + vec2(6.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[1].w;
+ {
+ vec2 origCoord = coord + vec2(7.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[2].x;
+ {
+ vec2 origCoord = coord + vec2(8.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[2].y;
+ {
+ vec2 origCoord = coord + vec2(9.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[2].z;
+ {
+ vec2 origCoord = coord + vec2(10.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[2].w;
+ {
+ vec2 origCoord = coord + vec2(11.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[3].x;
+ {
+ vec2 origCoord = coord + vec2(12.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[3].y;
+ {
+ vec2 origCoord = coord + vec2(13.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[3].z;
+ {
+ vec2 origCoord = coord + vec2(14.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[3].w;
+ {
+ vec2 origCoord = coord + vec2(15.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ output_Stage2 = sum * uGain_Stage2 + uBias_Stage2;
+ output_Stage2.w = clamp(output_Stage2.w, 0.0, 1.0);
+ output_Stage2.xyz = clamp(output_Stage2.xyz, 0.0, output_Stage2.w);
+ output_Stage2 *= output_Stage1;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/217-6.shader_test b/shaders/skia/217-6.shader_test
new file mode 100644
index 0000000..1db7652
--- /dev/null
+++ b/shaders/skia/217-6.shader_test
@@ -0,0 +1,105 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 ubaseFrequency_Stage2_c0_c0;
+uniform float uz_Stage2_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+uniform sampler2D uTextureSampler_1_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec3 fade_Stage2_c0_c0(vec3 t) {
+ return ((t * t) * t) * (t * (t * 6.0 - 15.0) + 10.0);
+}
+float perm_Stage2_c0_c0(float x) {
+ return texture(uTextureSampler_0_Stage2, vec2(fract(x / 256.0), 0.0)).x * 255.0;
+}
+float grad_Stage2_c0_c0(float x, vec3 p) {
+ return dot(texture(uTextureSampler_1_Stage2, vec2(fract(x / 16.0), 0.0)).xyz * 255.0 - vec3(1.0), p);
+}
+float lerp_Stage2_c0_c0(float a, float b, float w) {
+ return a + w * (b - a);
+}
+float noise_Stage2_c0_c0(vec3 p) {
+ vec3 P = mod(floor(p), 256.0);
+ p -= floor(p);
+ vec3 f = fade_Stage2_c0_c0(p);
+ float A = perm_Stage2_c0_c0(P.x) + P.y;
+ float AA = perm_Stage2_c0_c0(A) + P.z;
+ float AB = perm_Stage2_c0_c0(A + 1.0) + P.z;
+ float B = perm_Stage2_c0_c0(P.x + 1.0) + P.y;
+ float BA = perm_Stage2_c0_c0(B) + P.z;
+ float BB = perm_Stage2_c0_c0(B + 1.0) + P.z;
+ float result = lerp_Stage2_c0_c0(lerp_Stage2_c0_c0(lerp_Stage2_c0_c0(grad_Stage2_c0_c0(perm_Stage2_c0_c0(AA), p), grad_Stage2_c0_c0(perm_Stage2_c0_c0(BA), p + vec3(-1.0, 0.0, 0.0)), f.x), lerp_Stage2_c0_c0(grad_Stage2_c0_c0(perm_Stage2_c0_c0(AB), p + vec3(0.0, -1.0, 0.0)), grad_Stage2_c0_c0(perm_Stage2_c0_c0(BB), p + vec3(-1.0, -1.0, 0.0)), f.x), f.y), lerp_Stage2_c0_c0(lerp_Stage2_c0_c0(grad_Stage2_c0_c0(perm_Stage2_c0_c0(AA + 1.0), p + vec3(0.0, 0.0, -1.0)), grad_Stage2_c0_c0(perm_Stage2_c0_c0(BA + 1.0), p + vec3(-1.0, 0.0, -1.0)), f.x), lerp_Stage2_c0_c0(grad_Stage2_c0_c0(perm_Stage2_c0_c0(AB + 1.0), p + vec3(0.0, -1.0, -1.0)), grad_Stage2_c0_c0(perm_Stage2_c0_c0(BB + 1.0), p + vec3(-1.0, -1.0, -1.0)), f.x), f.y), f.z);
+ return result;
+}
+float noiseOctaves_Stage2_c0_c0(vec3 p) {
+ float result = 0.0;
+ float ratio = 1.0;
+ for (float i = 0.0;i < 7.0; i++) {
+ result += noise_Stage2_c0_c0(p) / ratio;
+ p *= 2.0;
+ ratio *= 2.0;
+ }
+ return (result + 1.0) / 2.0;
+}
+vec4 ImprovedPerlinNoise_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coords = vTransformedCoords_1_Stage0 * ubaseFrequency_Stage2_c0_c0;
+ float r = noiseOctaves_Stage2_c0_c0(vec3(coords, uz_Stage2_c0_c0));
+ float g = noiseOctaves_Stage2_c0_c0(vec3(coords, uz_Stage2_c0_c0));
+ float b = noiseOctaves_Stage2_c0_c0(vec3(coords, uz_Stage2_c0_c0));
+ float a = noiseOctaves_Stage2_c0_c0(vec3(coords, uz_Stage2_c0_c0));
+ _output = vec4(r, g, b, a);
+ _output = clamp(_output, 0.0, 1.0);
+ _output = vec4(_output.xyz * _output.www, _output.w);
+ return _output;
+}
+vec4 ClampFragmentProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ float alpha = clamp(_input.w, 0.0, 1.0);
+ _output = vec4(clamp(_input.xyz, 0.0, alpha), alpha);
+ }
+ return _output;
+}
+vec4 blend_difference(vec4 src, vec4 dst) {
+ return vec4((src.xyz + dst.xyz) - 2.0 * min(src.xyz * dst.w, dst.xyz * src.w), src.w + (1.0 - src.w) * dst.w);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ vec4 inputColor = vec4(output_Stage1.xyz, 1.0);
+ output_Stage2 = blend_difference(ImprovedPerlinNoise_Stage2_c0_c0(inputColor), ClampFragmentProcessor_Stage2_c1_c0(inputColor));
+ output_Stage2 *= output_Stage1.w;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/217.shader_test b/shaders/skia/217.shader_test
new file mode 100644
index 0000000..36d6c47
--- /dev/null
+++ b/shaders/skia/217.shader_test
@@ -0,0 +1,88 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 ucolor_Stage1_c0_c0_c0_c0;
+uniform vec4 ucolor_Stage2;
+uniform vec4 ucolor_Stage3_c1_c0;
+noperspective in vec4 vcolor_Stage0;
+vec4 ConstColorProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = _input.w * ucolor_Stage1_c0_c0_c0_c0;
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = ConstColorProcessor_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 ConstColorProcessor_Stage3_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage3_c1_c0;
+ }
+ return _output;
+}
+vec4 blend_dst_out(vec4 src, vec4 dst) {
+ return (1.0 - src.w) * dst;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 blend_darken(vec4 src, vec4 dst) {
+ vec4 result = blend_src_over(src, dst);
+ result.xyz = min(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
+ return result;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_dst_out(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ {
+ output_Stage2 = output_Stage1 * ucolor_Stage2;
+ }
+ }
+ vec4 output_Stage3;
+ {
+ output_Stage3 = blend_darken(ConstColorProcessor_Stage3_c1_c0(vec4(1.0)), output_Stage2);
+ }
+ {
+ sk_FragColor = output_Stage3;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 position;
+in vec4 inColor;
+noperspective out vec4 vcolor_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/2173.shader_test b/shaders/skia/2173.shader_test
new file mode 100644
index 0000000..669a80c
--- /dev/null
+++ b/shaders/skia/2173.shader_test
@@ -0,0 +1,242 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1_c0_c0;
+uniform float uSurfaceScale_Stage1_c0_c0;
+uniform vec3 uLightColor_Stage1_c0_c0;
+uniform float uKD_Stage1_c0_c0;
+uniform vec4 uTexDom_Stage1_c0_c0;
+uniform vec3 uDecalParams_Stage1_c0_c0;
+uniform vec3 uLightDirection_Stage1_c0_c0;
+uniform vec2 uDstTextureUpperLeft_Stage2;
+uniform vec2 uDstTextureCoordScale_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uDstTextureSampler_Stage2;
+noperspective in vec2 vEllipseOffsets_Stage0;
+noperspective in vec4 vEllipseRadii_Stage0;
+noperspective in vec4 vinColor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 light_Stage1_c0_c0(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ float colorScale = uKD_Stage1_c0_c0 * dot(normal, surfaceToLight);
+ return vec4(lightColor * clamp(colorScale, 0.0, 1.0), 1.0);
+}
+float sobel_Stage1_c0_c0(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage1_c0_c0(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage1_c0_c0(float m[9], float surfaceScale) {
+ return pointToNormal_Stage1_c0_c0(sobel_Stage1_c0_c0(m[1], m[2], m[4], m[5], m[7], m[8], 0.5), sobel_Stage1_c0_c0(0.0, 0.0, m[1], m[7], m[2], m[8], 0.33333298563957214), surfaceScale);
+}
+vec4 DiffuseLighting_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coord = vTransformedCoords_0_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage1_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0.xy, uTexDom_Stage1_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp0 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0.xy, uTexDom_Stage1_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0.xy, uTexDom_Stage1_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage1_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0.xy, uTexDom_Stage1_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0.xy, uTexDom_Stage1_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0.xy, uTexDom_Stage1_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp5 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage1_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0.xy, uTexDom_Stage1_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp6 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage1_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0.xy, uTexDom_Stage1_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp7 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage1_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0.xy, uTexDom_Stage1_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp8 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = uLightDirection_Stage1_c0_c0;
+ _output = light_Stage1_c0_c0(normal_Stage1_c0_c0(m, uSurfaceScale_Stage1_c0_c0), surfaceToLight, uLightColor_Stage1_c0_c0);
+ _output *= _input;
+ return _output;
+}
+vec4 blend_src(vec4 src, vec4 dst) {
+ return src;
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ vec2 offset = vEllipseOffsets_Stage0;
+ offset *= vEllipseRadii_Stage0.xy;
+ float test = dot(offset, offset) - 1.0;
+ vec2 grad = (2.0 * offset) * vEllipseRadii_Stage0.xy;
+ float grad_dot = dot(grad, grad);
+ grad_dot = max(grad_dot, 1.1754999560161448e-38);
+ float invlen = inversesqrt(grad_dot);
+ float edgeAlpha = clamp(0.5 - test * invlen, 0.0, 1.0);
+ offset = vEllipseOffsets_Stage0 * vEllipseRadii_Stage0.zw;
+ test = dot(offset, offset) - 1.0;
+ grad = (2.0 * offset) * vEllipseRadii_Stage0.zw;
+ grad_dot = dot(grad, grad);
+ invlen = inversesqrt(grad_dot);
+ edgeAlpha *= clamp(0.5 + test * invlen, 0.0, 1.0);
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = DiffuseLighting_Stage1_c0_c0(vec4(1.0));
+ }
+ {
+ if (all(lessThanEqual(outputCoverage_Stage0.xyz, vec3(0.0)))) {
+ discard;
+ }
+ vec2 _dstTexCoord = (gl_FragCoord.xy - uDstTextureUpperLeft_Stage2) * uDstTextureCoordScale_Stage2;
+ _dstTexCoord.y = 1.0 - _dstTexCoord.y;
+ vec4 _dstColor = texture(uDstTextureSampler_Stage2, _dstTexCoord);
+ sk_FragColor = blend_src(output_Stage1, _dstColor);
+ sk_FragColor = outputCoverage_Stage0 * sk_FragColor + (vec4(1.0) - outputCoverage_Stage0) * _dstColor;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec2 inEllipseOffset;
+in vec4 inEllipseRadii;
+noperspective out vec2 vEllipseOffsets_Stage0;
+noperspective out vec4 vEllipseRadii_Stage0;
+noperspective out vec4 vinColor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vEllipseOffsets_Stage0 = inEllipseOffset;
+ vEllipseRadii_Stage0 = inEllipseRadii;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/2176.shader_test b/shaders/skia/2176.shader_test
new file mode 100644
index 0000000..2a25935
--- /dev/null
+++ b/shaders/skia/2176.shader_test
@@ -0,0 +1,253 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1_c0_c0;
+uniform float uSurfaceScale_Stage1_c0_c0;
+uniform vec3 uLightColor_Stage1_c0_c0;
+uniform float uKS_Stage1_c0_c0;
+uniform float uShininess_Stage1_c0_c0;
+uniform vec4 uTexDom_Stage1_c0_c0;
+uniform vec3 uDecalParams_Stage1_c0_c0;
+uniform vec3 uLightLocation_Stage1_c0_c0;
+uniform float uExponent_Stage1_c0_c0;
+uniform float uCosInnerConeAngle_Stage1_c0_c0;
+uniform float uCosOuterConeAngle_Stage1_c0_c0;
+uniform float uConeScale_Stage1_c0_c0;
+uniform vec3 uS_Stage1_c0_c0;
+uniform vec2 uDstTextureUpperLeft_Stage2;
+uniform vec2 uDstTextureCoordScale_Stage2;
+uniform sampler2D uTextureSampler_0_Stage0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uDstTextureSampler_Stage2;
+noperspective in vec2 vTextureCoords_Stage0;
+flat in int vTexIndex_Stage0;
+noperspective in vec4 vinColor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 light_Stage1_c0_c0(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ vec3 halfDir = normalize(surfaceToLight + vec3(0.0, 0.0, 1.0));
+ float colorScale = uKS_Stage1_c0_c0 * pow(dot(normal, halfDir), uShininess_Stage1_c0_c0);
+ vec3 color = lightColor * clamp(colorScale, 0.0, 1.0);
+ return vec4(color, max(max(color.x, color.y), color.z));
+}
+float sobel_Stage1_c0_c0(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage1_c0_c0(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage1_c0_c0(float m[9], float surfaceScale) {
+ return pointToNormal_Stage1_c0_c0(sobel_Stage1_c0_c0(0.0, 0.0, m[3], m[5], m[6], m[8], 0.33333298563957214), sobel_Stage1_c0_c0(0.0, 0.0, m[4], m[7], m[5], m[8], 0.5), surfaceScale);
+}
+vec3 lightColor_Stage1_c0_c0(vec3 surfaceToLight) {
+ float cosAngle = -dot(surfaceToLight, uS_Stage1_c0_c0);
+ if (cosAngle < uCosOuterConeAngle_Stage1_c0_c0) {
+ return vec3(0.0);
+ }
+ float scale = pow(cosAngle, uExponent_Stage1_c0_c0);
+ if (cosAngle < uCosInnerConeAngle_Stage1_c0_c0) {
+ return ((uLightColor_Stage1_c0_c0 * scale) * (cosAngle - uCosOuterConeAngle_Stage1_c0_c0)) * uConeScale_Stage1_c0_c0;
+ }
+ return uLightColor_Stage1_c0_c0;
+}
+vec4 SpecularLighting_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coord = vTransformedCoords_0_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage1_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0.xy, uTexDom_Stage1_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp0 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0.xy, uTexDom_Stage1_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0.xy, uTexDom_Stage1_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage1_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0.xy, uTexDom_Stage1_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0.xy, uTexDom_Stage1_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0.xy, uTexDom_Stage1_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp5 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage1_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0.xy, uTexDom_Stage1_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp6 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage1_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0.xy, uTexDom_Stage1_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp7 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage1_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0.xy, uTexDom_Stage1_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp8 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = normalize(uLightLocation_Stage1_c0_c0 - vec3(gl_FragCoord.xy, uSurfaceScale_Stage1_c0_c0 * m[4]));
+ _output = light_Stage1_c0_c0(normal_Stage1_c0_c0(m, uSurfaceScale_Stage1_c0_c0), surfaceToLight, lightColor_Stage1_c0_c0(surfaceToLight));
+ _output *= _input;
+ return _output;
+}
+vec4 blend_src(vec4 src, vec4 dst) {
+ return src;
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ vec4 texColor;
+ {
+ texColor = texture(uTextureSampler_0_Stage0, vTextureCoords_Stage0);
+ }
+ outputCoverage_Stage0 = texColor;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = SpecularLighting_Stage1_c0_c0(vec4(1.0));
+ }
+ {
+ if (all(lessThanEqual(outputCoverage_Stage0.xyz, vec3(0.0)))) {
+ discard;
+ }
+ vec2 _dstTexCoord = (gl_FragCoord.xy - uDstTextureUpperLeft_Stage2) * uDstTextureCoordScale_Stage2;
+ _dstTexCoord.y = 1.0 - _dstTexCoord.y;
+ vec4 _dstColor = texture(uDstTextureSampler_Stage2, _dstTexCoord);
+ sk_FragColor = blend_src(output_Stage1, _dstColor);
+ sk_FragColor = outputCoverage_Stage0 * sk_FragColor + (vec4(1.0) - outputCoverage_Stage0) * _dstColor;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform vec2 uAtlasSizeInv_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in uvec2 inTextureCoords;
+noperspective out vec2 vTextureCoords_Stage0;
+flat out int vTexIndex_Stage0;
+noperspective out vec4 vinColor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ ivec2 signedCoords = ivec2(int(inTextureCoords.x), int(inTextureCoords.y));
+ vec2 unormTexCoords = vec2(float(signedCoords.x / 2), float(signedCoords.y / 2));
+ vTextureCoords_Stage0 = unormTexCoords * uAtlasSizeInv_Stage0;
+ vTexIndex_Stage0 = 0;
+ vinColor_Stage0 = inColor;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(inPosition.x, inPosition.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/2179.shader_test b/shaders/skia/2179.shader_test
new file mode 100644
index 0000000..9e42417
--- /dev/null
+++ b/shaders/skia/2179.shader_test
@@ -0,0 +1,230 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1_c0_c0;
+uniform float uSurfaceScale_Stage1_c0_c0;
+uniform vec3 uLightColor_Stage1_c0_c0;
+uniform float uKS_Stage1_c0_c0;
+uniform float uShininess_Stage1_c0_c0;
+uniform vec4 uTexDom_Stage1_c0_c0;
+uniform vec3 uDecalParams_Stage1_c0_c0;
+uniform vec3 uLightDirection_Stage1_c0_c0;
+uniform vec2 uDstTextureUpperLeft_Stage2;
+uniform vec2 uDstTextureCoordScale_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uDstTextureSampler_Stage2;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in float vinCoverage_Stage0;
+vec4 light_Stage1_c0_c0(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ vec3 halfDir = normalize(surfaceToLight + vec3(0.0, 0.0, 1.0));
+ float colorScale = uKS_Stage1_c0_c0 * pow(dot(normal, halfDir), uShininess_Stage1_c0_c0);
+ vec3 color = lightColor * clamp(colorScale, 0.0, 1.0);
+ return vec4(color, max(max(color.x, color.y), color.z));
+}
+float sobel_Stage1_c0_c0(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage1_c0_c0(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage1_c0_c0(float m[9], float surfaceScale) {
+ return pointToNormal_Stage1_c0_c0(sobel_Stage1_c0_c0(m[0], m[2], m[3], m[5], m[6], m[8], 0.25), sobel_Stage1_c0_c0(m[0], m[6], m[1], m[7], m[2], m[8], 0.25), surfaceScale);
+}
+vec4 SpecularLighting_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coord = vTransformedCoords_0_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage1_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0.xy, uTexDom_Stage1_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp0 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0.xy, uTexDom_Stage1_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0.xy, uTexDom_Stage1_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage1_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0.xy, uTexDom_Stage1_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0.xy, uTexDom_Stage1_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0.xy, uTexDom_Stage1_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp5 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage1_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0.xy, uTexDom_Stage1_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp6 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage1_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0.xy, uTexDom_Stage1_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp7 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage1_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0.xy, uTexDom_Stage1_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp8 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = uLightDirection_Stage1_c0_c0;
+ _output = light_Stage1_c0_c0(normal_Stage1_c0_c0(m, uSurfaceScale_Stage1_c0_c0), surfaceToLight, uLightColor_Stage1_c0_c0);
+ _output *= _input;
+ return _output;
+}
+vec4 blend_src(vec4 src, vec4 dst) {
+ return src;
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ float alpha = 1.0;
+ alpha = vinCoverage_Stage0;
+ outputCoverage_Stage0 = vec4(alpha);
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = SpecularLighting_Stage1_c0_c0(vec4(1.0));
+ }
+ {
+ if (all(lessThanEqual(outputCoverage_Stage0.xyz, vec3(0.0)))) {
+ discard;
+ }
+ vec2 _dstTexCoord = (gl_FragCoord.xy - uDstTextureUpperLeft_Stage2) * uDstTextureCoordScale_Stage2;
+ _dstTexCoord.y = 1.0 - _dstTexCoord.y;
+ vec4 _dstColor = texture(uDstTextureSampler_Stage2, _dstTexCoord);
+ sk_FragColor = blend_src(output_Stage1, _dstColor);
+ sk_FragColor = outputCoverage_Stage0 * sk_FragColor + (vec4(1.0) - outputCoverage_Stage0) * _dstColor;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in float inCoverage;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out float vinCoverage_Stage0;
+void main() {
+ vec4 color = inColor;
+ vcolor_Stage0 = color;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ vinCoverage_Stage0 = inCoverage;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/2182.shader_test b/shaders/skia/2182.shader_test
new file mode 100644
index 0000000..dcdb1df
--- /dev/null
+++ b/shaders/skia/2182.shader_test
@@ -0,0 +1,202 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uColor_Stage0;
+uniform vec2 uImageIncrement_Stage1_c0_c0;
+uniform float uSurfaceScale_Stage1_c0_c0;
+uniform vec3 uLightColor_Stage1_c0_c0;
+uniform float uKS_Stage1_c0_c0;
+uniform float uShininess_Stage1_c0_c0;
+uniform vec4 uTexDom_Stage1_c0_c0;
+uniform vec3 uDecalParams_Stage1_c0_c0;
+uniform vec3 uLightDirection_Stage1_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 light_Stage1_c0_c0(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ vec3 halfDir = normalize(surfaceToLight + vec3(0.0, 0.0, 1.0));
+ float colorScale = uKS_Stage1_c0_c0 * pow(dot(normal, halfDir), uShininess_Stage1_c0_c0);
+ vec3 color = lightColor * clamp(colorScale, 0.0, 1.0);
+ return vec4(color, max(max(color.x, color.y), color.z));
+}
+float sobel_Stage1_c0_c0(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage1_c0_c0(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage1_c0_c0(float m[9], float surfaceScale) {
+ return pointToNormal_Stage1_c0_c0(sobel_Stage1_c0_c0(m[0], m[2], m[3], m[5], 0.0, 0.0, 0.33333298563957214), sobel_Stage1_c0_c0(m[0], m[3], m[1], m[4], m[2], m[5], 0.5), surfaceScale);
+}
+vec4 SpecularLighting_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coord = vTransformedCoords_0_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage1_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0.xy, uTexDom_Stage1_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp0 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0.xy, uTexDom_Stage1_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0.xy, uTexDom_Stage1_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage1_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0.xy, uTexDom_Stage1_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0.xy, uTexDom_Stage1_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0.xy, uTexDom_Stage1_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp5 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage1_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0.xy, uTexDom_Stage1_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp6 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage1_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0.xy, uTexDom_Stage1_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp7 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage1_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0.xy, uTexDom_Stage1_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp8 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = uLightDirection_Stage1_c0_c0;
+ _output = light_Stage1_c0_c0(normal_Stage1_c0_c0(m, uSurfaceScale_Stage1_c0_c0), surfaceToLight, uLightColor_Stage1_c0_c0);
+ _output *= _input;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = SpecularLighting_Stage1_c0_c0(vec4(1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec2 pos2 = position;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(position, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_PointSize = 1.0;
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/2185.shader_test b/shaders/skia/2185.shader_test
new file mode 100644
index 0000000..51c1348
--- /dev/null
+++ b/shaders/skia/2185.shader_test
@@ -0,0 +1,205 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uColor_Stage0;
+uniform vec2 uImageIncrement_Stage1_c0_c0;
+uniform float uSurfaceScale_Stage1_c0_c0;
+uniform vec3 uLightColor_Stage1_c0_c0;
+uniform float uKS_Stage1_c0_c0;
+uniform float uShininess_Stage1_c0_c0;
+uniform vec4 uTexDom_Stage1_c0_c0;
+uniform vec3 uDecalParams_Stage1_c0_c0;
+uniform vec3 uLightLocation_Stage1_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 light_Stage1_c0_c0(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ vec3 halfDir = normalize(surfaceToLight + vec3(0.0, 0.0, 1.0));
+ float colorScale = uKS_Stage1_c0_c0 * pow(dot(normal, halfDir), uShininess_Stage1_c0_c0);
+ vec3 color = lightColor * clamp(colorScale, 0.0, 1.0);
+ return vec4(color, max(max(color.x, color.y), color.z));
+}
+float sobel_Stage1_c0_c0(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage1_c0_c0(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage1_c0_c0(float m[9], float surfaceScale) {
+ return pointToNormal_Stage1_c0_c0(sobel_Stage1_c0_c0(m[0], m[2], m[3], m[5], 0.0, 0.0, 0.33333298563957214), sobel_Stage1_c0_c0(m[0], m[3], m[1], m[4], m[2], m[5], 0.5), surfaceScale);
+}
+vec4 SpecularLighting_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coord = vTransformedCoords_0_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage1_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0.xy, uTexDom_Stage1_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp0 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0.xy, uTexDom_Stage1_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0.xy, uTexDom_Stage1_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage1_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0.xy, uTexDom_Stage1_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0.xy, uTexDom_Stage1_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0.xy, uTexDom_Stage1_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp5 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage1_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0.xy, uTexDom_Stage1_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp6 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage1_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0.xy, uTexDom_Stage1_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp7 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage1_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0.xy, uTexDom_Stage1_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp8 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = normalize(uLightLocation_Stage1_c0_c0 - vec3(gl_FragCoord.xy, uSurfaceScale_Stage1_c0_c0 * m[4]));
+ _output = light_Stage1_c0_c0(normal_Stage1_c0_c0(m, uSurfaceScale_Stage1_c0_c0), surfaceToLight, uLightColor_Stage1_c0_c0);
+ _output *= _input;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = SpecularLighting_Stage1_c0_c0(vec4(1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec2 inLocalCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec2 pos2 = (uViewM_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/2188.shader_test b/shaders/skia/2188.shader_test
new file mode 100644
index 0000000..0b0fb1f
--- /dev/null
+++ b/shaders/skia/2188.shader_test
@@ -0,0 +1,221 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uColor_Stage0;
+uniform float uCoverage_Stage0;
+uniform vec2 uImageIncrement_Stage1_c0_c0;
+uniform float uSurfaceScale_Stage1_c0_c0;
+uniform vec3 uLightColor_Stage1_c0_c0;
+uniform float uKS_Stage1_c0_c0;
+uniform float uShininess_Stage1_c0_c0;
+uniform vec4 uTexDom_Stage1_c0_c0;
+uniform vec3 uDecalParams_Stage1_c0_c0;
+uniform vec3 uLightDirection_Stage1_c0_c0;
+uniform vec2 uDstTextureUpperLeft_Stage2;
+uniform vec2 uDstTextureCoordScale_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uDstTextureSampler_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 light_Stage1_c0_c0(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ vec3 halfDir = normalize(surfaceToLight + vec3(0.0, 0.0, 1.0));
+ float colorScale = uKS_Stage1_c0_c0 * pow(dot(normal, halfDir), uShininess_Stage1_c0_c0);
+ vec3 color = lightColor * clamp(colorScale, 0.0, 1.0);
+ return vec4(color, max(max(color.x, color.y), color.z));
+}
+float sobel_Stage1_c0_c0(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage1_c0_c0(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage1_c0_c0(float m[9], float surfaceScale) {
+ return pointToNormal_Stage1_c0_c0(sobel_Stage1_c0_c0(m[0], m[1], m[3], m[4], m[6], m[7], 0.5), sobel_Stage1_c0_c0(m[0], m[6], m[1], m[7], 0.0, 0.0, 0.33333298563957214), surfaceScale);
+}
+vec4 SpecularLighting_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coord = vTransformedCoords_0_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage1_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0.xy, uTexDom_Stage1_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp0 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0.xy, uTexDom_Stage1_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0.xy, uTexDom_Stage1_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage1_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0.xy, uTexDom_Stage1_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0.xy, uTexDom_Stage1_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0.xy, uTexDom_Stage1_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp5 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage1_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0.xy, uTexDom_Stage1_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp6 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage1_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0.xy, uTexDom_Stage1_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp7 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage1_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0.xy, uTexDom_Stage1_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp8 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = uLightDirection_Stage1_c0_c0;
+ _output = light_Stage1_c0_c0(normal_Stage1_c0_c0(m, uSurfaceScale_Stage1_c0_c0), surfaceToLight, uLightColor_Stage1_c0_c0);
+ _output *= _input;
+ return _output;
+}
+vec4 blend_src(vec4 src, vec4 dst) {
+ return src;
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ outputCoverage_Stage0 = vec4(uCoverage_Stage0);
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = SpecularLighting_Stage1_c0_c0(vec4(1.0));
+ }
+ {
+ if (all(lessThanEqual(outputCoverage_Stage0.xyz, vec3(0.0)))) {
+ discard;
+ }
+ vec2 _dstTexCoord = (gl_FragCoord.xy - uDstTextureUpperLeft_Stage2) * uDstTextureCoordScale_Stage2;
+ _dstTexCoord.y = 1.0 - _dstTexCoord.y;
+ vec4 _dstColor = texture(uDstTextureSampler_Stage2, _dstTexCoord);
+ sk_FragColor = blend_src(output_Stage1, _dstColor);
+ sk_FragColor = outputCoverage_Stage0 * sk_FragColor + (vec4(1.0) - outputCoverage_Stage0) * _dstColor;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/2191.shader_test b/shaders/skia/2191.shader_test
new file mode 100644
index 0000000..e38b593
--- /dev/null
+++ b/shaders/skia/2191.shader_test
@@ -0,0 +1,77 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform float uPixelSize_Stage1_c0_c0;
+uniform vec2 uRange_Stage1_c0_c0;
+uniform vec2 uDstTextureUpperLeft_Stage2;
+uniform vec2 uDstTextureCoordScale_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uDstTextureSampler_Stage2;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in float vinCoverage_Stage0;
+vec4 Morphology_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = vec4(1.0, 1.0, 1.0, 1.0);
+ vec2 coord = vTransformedCoords_0_Stage0;
+ coord.y -= 8.0 * uPixelSize_Stage1_c0_c0;
+ for (int i = 0;i < 17; i++) {
+ _output = min(_output, texture(uTextureSampler_0_Stage1, coord));
+ coord.y += uPixelSize_Stage1_c0_c0;
+ }
+ _output *= _input;
+ return _output;
+}
+vec4 blend_src(vec4 src, vec4 dst) {
+ return src;
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ float alpha = 1.0;
+ alpha = vinCoverage_Stage0;
+ outputCoverage_Stage0 = vec4(alpha);
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = Morphology_Stage1_c0_c0(vec4(1.0));
+ }
+ {
+ if (all(lessThanEqual(outputCoverage_Stage0.xyz, vec3(0.0)))) {
+ discard;
+ }
+ vec2 _dstTexCoord = (gl_FragCoord.xy - uDstTextureUpperLeft_Stage2) * uDstTextureCoordScale_Stage2;
+ _dstTexCoord.y = 1.0 - _dstTexCoord.y;
+ vec4 _dstColor = texture(uDstTextureSampler_Stage2, _dstTexCoord);
+ sk_FragColor = blend_src(output_Stage1, _dstColor);
+ sk_FragColor = outputCoverage_Stage0 * sk_FragColor + (vec4(1.0) - outputCoverage_Stage0) * _dstColor;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in float inCoverage;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out float vinCoverage_Stage0;
+void main() {
+ vec4 color = inColor;
+ vcolor_Stage0 = color;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ vinCoverage_Stage0 = inCoverage;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/2194.shader_test b/shaders/skia/2194.shader_test
new file mode 100644
index 0000000..4b7ea26
--- /dev/null
+++ b/shaders/skia/2194.shader_test
@@ -0,0 +1,49 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uColor_Stage0;
+uniform float uPixelSize_Stage1_c0_c0;
+uniform vec2 uRange_Stage1_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 Morphology_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0;
+ coord.y -= 10.0 * uPixelSize_Stage1_c0_c0;
+ for (int i = 0;i < 21; i++) {
+ _output = max(_output, texture(uTextureSampler_0_Stage1, coord));
+ coord.y += uPixelSize_Stage1_c0_c0;
+ }
+ _output *= _input;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = Morphology_Stage1_c0_c0(vec4(1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec2 pos2 = position;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(position, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_PointSize = 1.0;
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/2197.shader_test b/shaders/skia/2197.shader_test
new file mode 100644
index 0000000..3b1c142
--- /dev/null
+++ b/shaders/skia/2197.shader_test
@@ -0,0 +1,49 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uColor_Stage0;
+uniform float uPixelSize_Stage1_c0_c0;
+uniform vec2 uRange_Stage1_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 Morphology_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0;
+ coord.y -= 2.0 * uPixelSize_Stage1_c0_c0;
+ for (int i = 0;i < 5; i++) {
+ _output = max(_output, texture(uTextureSampler_0_Stage1, coord));
+ coord.y += uPixelSize_Stage1_c0_c0;
+ }
+ _output *= _input;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = Morphology_Stage1_c0_c0(vec4(1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec2 inLocalCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/22-1.shader_test b/shaders/skia/22-1.shader_test
new file mode 100644
index 0000000..cd36265
--- /dev/null
+++ b/shaders/skia/22-1.shader_test
@@ -0,0 +1,63 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+uniform sampler2D uTextureSampler_2_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+vec4 TextureEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_1_Stage1, vTransformedCoords_1_Stage0) * _input;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c2_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_2_Stage1, vTransformedCoords_2_Stage0) * _input;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ vec4 planes[3];
+ planes[0] = TextureEffect_Stage1_c0_c0(vec4(1.0));
+ planes[1] = TextureEffect_Stage1_c1_c0(vec4(1.0));
+ planes[2] = TextureEffect_Stage1_c2_c0(vec4(1.0));
+ vec4 color = vec4(planes[0].x, planes[2].x, planes[1].x, 1.0);
+ output_Stage1 = color;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/22-103.shader_test b/shaders/skia/22-103.shader_test
new file mode 100644
index 0000000..ccd1ae5
--- /dev/null
+++ b/shaders/skia/22-103.shader_test
@@ -0,0 +1,113 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform vec2 uBounds_Stage1;
+uniform vec4 uKernel_Stage1[4];
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0 - 7.0 * uImageIncrement_Stage1;
+ vec2 coordSampled = vec2(0.0, 0.0);
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1.x && coord.x <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].x;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1.x && coord.x <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].y;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1.x && coord.x <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].z;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1.x && coord.x <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].w;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1.x && coord.x <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].x;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1.x && coord.x <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].y;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1.x && coord.x <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].z;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1.x && coord.x <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].w;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1.x && coord.x <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].x;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1.x && coord.x <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].y;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1.x && coord.x <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].z;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1.x && coord.x <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].w;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1.x && coord.x <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].x;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1.x && coord.x <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].y;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1.x && coord.x <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].z;
+ }
+ coord += uImageIncrement_Stage1;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/22-108.shader_test b/shaders/skia/22-108.shader_test
new file mode 100644
index 0000000..c4d9036
--- /dev/null
+++ b/shaders/skia/22-108.shader_test
@@ -0,0 +1,85 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+in float vcoverage_Stage0;
+flat in vec4 vgeomDomain_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ float coverage = vcoverage_Stage0 * gl_FragCoord.w;
+ vec4 geoDomain;
+ geoDomain = vgeomDomain_Stage0;
+ if (coverage < 0.5) {
+ vec4 dists4 = clamp(vec4(1.0, 1.0, -1.0, -1.0) * (gl_FragCoord.xyxy - geoDomain), 0.0, 1.0);
+ vec2 dists2 = dists4.xy * dists4.zw;
+ coverage = min(coverage, dists2.x * dists2.y);
+ }
+ outputCoverage_Stage0 = vec4(coverage);
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TiledGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1 * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec4 positionWithCoverage;
+in vec4 color;
+in vec2 localCoord;
+in vec4 geomDomain;
+out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+out float vcoverage_Stage0;
+flat out vec4 vgeomDomain_Stage0;
+void main() {
+ vec3 position = positionWithCoverage.xyz;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ vcoverage_Stage0 = positionWithCoverage.w * positionWithCoverage.z;
+ vgeomDomain_Stage0 = geomDomain;
+ gl_Position = vec4(position.x, position.y, 0.0, position.z);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/22-109.shader_test b/shaders/skia/22-109.shader_test
new file mode 100644
index 0000000..687e777
--- /dev/null
+++ b/shaders/skia/22-109.shader_test
@@ -0,0 +1,67 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 TextureEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = TextureEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = OverrideInputFragmentProcessor_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_src_in(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec2 inLocalCoord;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 color = inColor;
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/22-11.shader_test b/shaders/skia/22-11.shader_test
new file mode 100644
index 0000000..be42952
--- /dev/null
+++ b/shaders/skia/22-11.shader_test
@@ -0,0 +1,70 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform float ubias_Stage1_c0_c0_c0_c0;
+uniform float uscale_Stage1_c0_c0_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 SweepGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float angle;
+ {
+ angle = atan(-vTransformedCoords_0_Stage0.y, -vTransformedCoords_0_Stage0.x);
+ }
+ float t = ((angle * 0.15915493667125702 + 0.5) + ubias_Stage1_c0_c0_c0_c0) * uscale_Stage1_c0_c0_c0_c0;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = SweepGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/22-110.shader_test b/shaders/skia/22-110.shader_test
new file mode 100644
index 0000000..74397e0
--- /dev/null
+++ b/shaders/skia/22-110.shader_test
@@ -0,0 +1,97 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 ucolor_Stage2;
+uniform vec4 ucolor_Stage3_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 TextureEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+vec4 ComposeOne_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_dst_in(_input, TextureEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0)));
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = ComposeOne_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 ConstColorProcessor_Stage3_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage3_c1_c0;
+ }
+ return _output;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 blend_modulate(vec4 src, vec4 dst) {
+ return src * dst;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_src_over(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ {
+ output_Stage2 = output_Stage1 * ucolor_Stage2;
+ }
+ }
+ vec4 output_Stage3;
+ {
+ output_Stage3 = blend_modulate(ConstColorProcessor_Stage3_c1_c0(vec4(1.0)), output_Stage2);
+ }
+ {
+ sk_FragColor = output_Stage3;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 inColor;
+in vec2 inLocalCoord;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/22-111.shader_test b/shaders/skia/22-111.shader_test
new file mode 100644
index 0000000..9a0c094
--- /dev/null
+++ b/shaders/skia/22-111.shader_test
@@ -0,0 +1,84 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec3 uDistanceAdjust_Stage0;
+uniform float ualpha_Stage1;
+uniform sampler2D uTextureSampler_0_Stage0;
+noperspective in vec4 vinColor_Stage0;
+noperspective in vec2 vTextureCoords_Stage0;
+flat in int vTexIndex_Stage0;
+noperspective in vec2 vIntTextureCoords_Stage0;
+noperspective in float vDelta_Stage0;
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ vec2 uv = vTextureCoords_Stage0;
+ vec2 st = vIntTextureCoords_Stage0;
+ vec2 Jdx = dFdx(st);
+ vec2 Jdy = -dFdy(st);
+ vec2 offset = vec2(vDelta_Stage0) * Jdx;
+ vec4 texColor;
+ {
+ texColor = texture(uTextureSampler_0_Stage0, uv);
+ }
+ vec3 distance;
+ distance.y = texColor.x;
+ vec2 uv_adjusted = uv - offset;
+ {
+ texColor = texture(uTextureSampler_0_Stage0, uv_adjusted);
+ }
+ distance.x = texColor.x;
+ uv_adjusted = uv + offset;
+ {
+ texColor = texture(uTextureSampler_0_Stage0, uv_adjusted);
+ }
+ distance.z = texColor.x;
+ distance = vec3(7.96875) * (distance - vec3(0.50196081399917603));
+ distance -= uDistanceAdjust_Stage0;
+ float afwidth;
+ vec2 dist_grad = vec2(dFdx(distance.x), -dFdy(distance.x));
+ float dg_len2 = dot(dist_grad, dist_grad);
+ if (dg_len2 < 9.9999997473787516e-05) {
+ dist_grad = vec2(0.70709997415542603, 0.70709997415542603);
+ } else {
+ dist_grad = dist_grad * inversesqrt(dg_len2);
+ }
+ vec2 grad = vec2(dist_grad.x * Jdx.x + dist_grad.y * Jdy.x, dist_grad.x * Jdx.y + dist_grad.y * Jdy.y);
+ afwidth = 0.64999997615814209 * length(grad);
+ outputCoverage_Stage0 = vec4(smoothstep(vec3(-afwidth), vec3(afwidth), distance), 1.0);
+ }
+ {
+ outputCoverage_Stage0.w = max(max(outputCoverage_Stage0.x, outputCoverage_Stage0.y), outputCoverage_Stage0.z);
+ sk_FragColor = ualpha_Stage1 * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform vec2 uAtlasDimensionsInv_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in uvec2 inTextureCoords;
+noperspective out vec4 vinColor_Stage0;
+noperspective out vec2 vTextureCoords_Stage0;
+flat out int vTexIndex_Stage0;
+noperspective out vec2 vIntTextureCoords_Stage0;
+noperspective out float vDelta_Stage0;
+void main() {
+ vinColor_Stage0 = inColor;
+ ivec2 signedCoords = ivec2(int(inTextureCoords.x), int(inTextureCoords.y));
+ vec2 unormTexCoords = vec2(float(signedCoords.x / 2), float(signedCoords.y / 2));
+ vTextureCoords_Stage0 = unormTexCoords * uAtlasDimensionsInv_Stage0;
+ vTexIndex_Stage0 = 0;
+ vIntTextureCoords_Stage0 = unormTexCoords;
+ vDelta_Stage0 = uAtlasDimensionsInv_Stage0.x / 3.0;
+ gl_Position = vec4(inPosition.x, inPosition.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/22-113.shader_test b/shaders/skia/22-113.shader_test
new file mode 100644
index 0000000..d985ced
--- /dev/null
+++ b/shaders/skia/22-113.shader_test
@@ -0,0 +1,68 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uborder_Stage2_c0_c0;
+uniform vec4 usubset_Stage2_c0_c0;
+uniform vec4 unorm_Stage2_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 TextureEffect_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 inCoord = vTransformedCoords_1_Stage0;
+ inCoord *= unorm_Stage2_c0_c0.xy;
+ vec2 subsetCoord;
+ subsetCoord.x = inCoord.x;
+ subsetCoord.y = inCoord.y;
+ vec2 clampedCoord;
+ clampedCoord.x = subsetCoord.x;
+ clampedCoord.y = subsetCoord.y;
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord * unorm_Stage2_c0_c0.zw);
+ if (inCoord.x < usubset_Stage2_c0_c0.x || inCoord.x > usubset_Stage2_c0_c0.z) {
+ textureColor = uborder_Stage2_c0_c0;
+ }
+ if (inCoord.y < usubset_Stage2_c0_c0.y || inCoord.y > usubset_Stage2_c0_c0.w) {
+ textureColor = uborder_Stage2_c0_c0;
+ }
+ _output = _input * textureColor;
+ return _output;
+}
+vec4 blend_dst_out(vec4 src, vec4 dst) {
+ return (1.0 - src.w) * dst;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_dst_out(output_Stage1, TextureEffect_Stage2_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/22-114.shader_test b/shaders/skia/22-114.shader_test
new file mode 100644
index 0000000..aa5db82
--- /dev/null
+++ b/shaders/skia/22-114.shader_test
@@ -0,0 +1,66 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec3 uedges_Stage1[8];
+flat in vec4 vcolor_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ float alpha = 1.0;
+ float edge;
+ edge = dot(uedges_Stage1[0], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage1[1], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage1[2], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage1[3], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage1[4], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage1[5], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage1[6], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage1[7], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ output_Stage1 = vec4(alpha);
+ }
+ {
+ sk_FragColor = outputColor_Stage0 * output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 inPosition;
+in vec2 inLocalCoords;
+in vec4 color;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vcolor_Stage0 = color;
+ vec2 pos2 = inPosition;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/22-115.shader_test b/shaders/skia/22-115.shader_test
new file mode 100644
index 0000000..96ebc0a
--- /dev/null
+++ b/shaders/skia/22-115.shader_test
@@ -0,0 +1,62 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec3 uedges_Stage1[6];
+uniform sampler2D uTextureSampler_0_Stage0;
+noperspective in vec2 vlocalCoord_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vec4(1.0);
+ vec2 texCoord;
+ texCoord = vlocalCoord_Stage0;
+ outputColor_Stage0 = texture(uTextureSampler_0_Stage0, texCoord);
+ }
+ vec4 output_Stage1;
+ {
+ float alpha = 1.0;
+ float edge;
+ edge = dot(uedges_Stage1[0], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage1[1], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage1[2], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage1[3], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage1[4], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage1[5], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ output_Stage1 = vec4(alpha);
+ }
+ {
+ sk_FragColor = outputColor_Stage0 * output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vlocalCoord_Stage0;
+void main() {
+ vlocalCoord_Stage0 = localCoord;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/22-117.shader_test b/shaders/skia/22-117.shader_test
new file mode 100644
index 0000000..bfdc174
--- /dev/null
+++ b/shaders/skia/22-117.shader_test
@@ -0,0 +1,127 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 uleftBorderColor_Stage1_c1_c0_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c1_c0_c0_c0;
+uniform vec4 ustart_Stage1_c1_c0_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c1_c0_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+vec4 ComposeOne_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_dst_in(_input, ClampedGradientEffect_Stage1_c0_c0_c0_c0(vec4(1.0)));
+ return _output;
+}
+vec4 LinearGradientLayout_Stage1_c1_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_1_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c1_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c1_c0_c0_c0_c1_c0 + t * uend_Stage1_c1_c0_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c1_c0_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c1_c0_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c1_c0_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c1_c0_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 ComposeOne_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_dst_in(_input, ClampedGradientEffect_Stage1_c1_c0_c0_c0(vec4(1.0)));
+ return _output;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_src_over(ComposeOne_Stage1_c0_c0(inputColor), ComposeOne_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/22-119.shader_test b/shaders/skia/22-119.shader_test
new file mode 100644
index 0000000..2697a40
--- /dev/null
+++ b/shaders/skia/22-119.shader_test
@@ -0,0 +1,56 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uCoordTransformMatrix_0_Stage0;
+uniform vec4 ucircle_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0(vec4 _input, vec2 _coords) {
+ _coords = _coords * uCoordTransformMatrix_0_Stage0.xz + uCoordTransformMatrix_0_Stage0.yw;
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, _coords) * _input;
+ return _output;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TextureEffect_Stage1_c0_c0(vec4(1.0), gl_FragCoord.xy);
+ }
+ vec4 output_Stage2;
+ {
+ float d;
+ {
+ d = (1.0 - length((ucircle_Stage2.xy - gl_FragCoord.xy) * ucircle_Stage2.w)) * ucircle_Stage2.z;
+ }
+ {
+ output_Stage2 = d > 0.5 ? output_Stage1 : vec4(0.0);
+ }
+ }
+ {
+ sk_FragColor = outputColor_Stage0 * output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 position;
+in vec4 color;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/22-121.shader_test b/shaders/skia/22-121.shader_test
new file mode 100644
index 0000000..03f810f
--- /dev/null
+++ b/shaders/skia/22-121.shader_test
@@ -0,0 +1,56 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uCoordTransformMatrix_0_Stage0;
+uniform vec4 uinnerRect_Stage2;
+uniform vec2 uradiusPlusHalf_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0(vec4 _input, vec2 _coords) {
+ _coords = _coords * uCoordTransformMatrix_0_Stage0.xz + uCoordTransformMatrix_0_Stage0.yw;
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, _coords) * _input;
+ return _output;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TextureEffect_Stage1_c0_c0(vec4(1.0), gl_FragCoord.xy);
+ }
+ vec4 output_Stage2;
+ {
+ vec2 dxy0 = uinnerRect_Stage2.xy - gl_FragCoord.xy;
+ vec2 dxy1 = gl_FragCoord.xy - uinnerRect_Stage2.zw;
+ vec2 dxy = max(max(dxy0, dxy1), 0.0);
+ float alpha = clamp(uradiusPlusHalf_Stage2.x - length(dxy), 0.0, 1.0);
+ alpha = 1.0 - alpha;
+ output_Stage2 = output_Stage1 * alpha;
+ }
+ {
+ sk_FragColor = outputColor_Stage0 * output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 position;
+in vec4 color;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/22-123.shader_test b/shaders/skia/22-123.shader_test
new file mode 100644
index 0000000..bea2efb
--- /dev/null
+++ b/shaders/skia/22-123.shader_test
@@ -0,0 +1,62 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uCoordTransformMatrix_0_Stage0;
+uniform vec4 urectUniform_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0(vec4 _input, vec2 _coords) {
+ _coords = _coords * uCoordTransformMatrix_0_Stage0.xz + uCoordTransformMatrix_0_Stage0.yw;
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, _coords) * _input;
+ return _output;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TextureEffect_Stage1_c0_c0(vec4(1.0), gl_FragCoord.xy);
+ }
+ vec4 output_Stage2;
+ {
+ float alpha;
+ {
+ float xSub, ySub;
+ xSub = min(gl_FragCoord.x - urectUniform_Stage2.x, 0.0);
+ xSub += min(urectUniform_Stage2.z - gl_FragCoord.x, 0.0);
+ ySub = min(gl_FragCoord.y - urectUniform_Stage2.y, 0.0);
+ ySub += min(urectUniform_Stage2.w - gl_FragCoord.y, 0.0);
+ alpha = (1.0 + max(xSub, -1.0)) * (1.0 + max(ySub, -1.0));
+ }
+ {
+ alpha = 1.0 - alpha;
+ }
+ output_Stage2 = output_Stage1 * alpha;
+ }
+ {
+ sk_FragColor = outputColor_Stage0 * output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 position;
+in vec4 color;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/22-128.shader_test b/shaders/skia/22-128.shader_test
new file mode 100644
index 0000000..8e1d8fd
--- /dev/null
+++ b/shaders/skia/22-128.shader_test
@@ -0,0 +1,110 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform float uweight_Stage1;
+uniform vec4 uleftBorderColor_Stage1_c1_c0_c0_c0_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c1_c0_c0_c0_c0_c0;
+uniform vec4 ustart_Stage1_c1_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c1_c0_c0_c0_c0_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ return _output;
+}
+vec4 RadialGradientLayout_Stage1_c1_c0_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = length(vTransformedCoords_1_Stage0);
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c1_c0_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c1_c0_c0_c0_c0_c0_c1_c0 + t * uend_Stage1_c1_c0_c0_c0_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c1_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = RadialGradientLayout_Stage1_c1_c0_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c1_c0_c0_c0_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c1_c0_c0_c0_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c1_c0_c0_c0_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = ClampedGradientEffect_Stage1_c1_c0_c0_c0_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ return _output;
+}
+vec4 TextureEffect_Stage1_c1_c0_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_1_Stage1, vTransformedCoords_2_Stage0) * _input;
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = TextureEffect_Stage1_c1_c0_c1_c0_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ return _output;
+}
+vec4 blend_plus(vec4 src, vec4 dst) {
+ return min(src + dst, 1.0);
+}
+vec4 ComposeTwo_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_plus(OverrideInputFragmentProcessor_Stage1_c1_c0_c0_c0(inputColor), OverrideInputFragmentProcessor_Stage1_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = mix(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), ComposeTwo_Stage1_c1_c0(vec4(1.0)), uweight_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/22-129.shader_test b/shaders/skia/22-129.shader_test
new file mode 100644
index 0000000..3f2efba
--- /dev/null
+++ b/shaders/skia/22-129.shader_test
@@ -0,0 +1,69 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform mat4 um_Stage1_c1_c0;
+uniform vec4 uv_Stage1_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ return _output;
+}
+vec4 ColorMatrixFragmentProcessor_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = _input;
+ {
+ float nonZeroAlpha = max(inputColor.w, 9.9999997473787516e-05);
+ inputColor = vec4(inputColor.xyz / nonZeroAlpha, inputColor.w);
+ }
+ _output = um_Stage1_c1_c0 * inputColor + uv_Stage1_c1_c0;
+ {
+ _output = clamp(_output, 0.0, 1.0);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ColorMatrixFragmentProcessor_Stage1_c1_c0(OverrideInputFragmentProcessor_Stage1_c0_c0(outputColor_Stage0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/22-13.shader_test b/shaders/skia/22-13.shader_test
new file mode 100644
index 0000000..537122a
--- /dev/null
+++ b/shaders/skia/22-13.shader_test
@@ -0,0 +1,42 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uclamp_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ vec2 inCoord = vTransformedCoords_0_Stage0;
+ vec2 subsetCoord;
+ subsetCoord.x = inCoord.x;
+ subsetCoord.y = inCoord.y;
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage1.x, uclamp_Stage1.z);
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage1.y, uclamp_Stage1.w);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ output_Stage1 = textureColor;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/22-133.shader_test b/shaders/skia/22-133.shader_test
new file mode 100644
index 0000000..95d80cb
--- /dev/null
+++ b/shaders/skia/22-133.shader_test
@@ -0,0 +1,61 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 ucircle_Stage1_c0_c0;
+uniform vec4 ucircle_Stage1_c1_c0;
+flat in vec4 vcolor_Stage0;
+vec4 CircleEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ float d;
+ {
+ d = (length((ucircle_Stage1_c0_c0.xy - gl_FragCoord.xy) * ucircle_Stage1_c0_c0.w) - 1.0) * ucircle_Stage1_c0_c0.z;
+ }
+ {
+ _output = d > 0.5 ? _input : vec4(0.0);
+ }
+ return _output;
+}
+vec4 CircleEffect_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ float d;
+ {
+ d = (1.0 - length((ucircle_Stage1_c1_c0.xy - gl_FragCoord.xy) * ucircle_Stage1_c1_c0.w)) * ucircle_Stage1_c1_c0.z;
+ }
+ {
+ _output = d > 0.5 ? _input : vec4(0.0);
+ }
+ return _output;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = CircleEffect_Stage1_c1_c0(CircleEffect_Stage1_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = outputColor_Stage0 * output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 position;
+in vec4 color;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/22-136.shader_test b/shaders/skia/22-136.shader_test
new file mode 100644
index 0000000..7399764
--- /dev/null
+++ b/shaders/skia/22-136.shader_test
@@ -0,0 +1,28 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+flat in vec4 vcolor_Stage0;
+void main() {
+ {
+ sk_FragColor = vec4(1.0);
+ sk_FragColor = sk_FragColor.wwww;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 position;
+in vec4 color;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/22-15.shader_test b/shaders/skia/22-15.shader_test
new file mode 100644
index 0000000..37ebba7
--- /dev/null
+++ b/shaders/skia/22-15.shader_test
@@ -0,0 +1,82 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 usubset_Stage1;
+uniform vec4 uclamp_Stage1;
+uniform vec4 unorm_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+flat in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec2 inCoord = vTransformedCoords_0_Stage0;
+ inCoord *= unorm_Stage1.xy;
+ float extraRepeatCoordX;
+ float repeatCoordWeightX;
+ float extraRepeatCoordY;
+ float repeatCoordWeightY;
+ vec2 subsetCoord;
+ {
+ float w = usubset_Stage1.z - usubset_Stage1.x;
+ float w2 = 2.0 * w;
+ float d = inCoord.x - usubset_Stage1.x;
+ float m = mod(d, w2);
+ float o = mix(m, w2 - m, step(w, m));
+ subsetCoord.x = o + usubset_Stage1.x;
+ extraRepeatCoordX = (w - o) + usubset_Stage1.x;
+ float hw = w / 2.0;
+ float n = mod(d - hw, w2);
+ repeatCoordWeightX = clamp((mix(n, w2 - n, step(w, n)) - hw) + 0.5, 0.0, 1.0);
+ }
+ {
+ float w = usubset_Stage1.w - usubset_Stage1.y;
+ float w2 = 2.0 * w;
+ float d = inCoord.y - usubset_Stage1.y;
+ float m = mod(d, w2);
+ float o = mix(m, w2 - m, step(w, m));
+ subsetCoord.y = o + usubset_Stage1.y;
+ extraRepeatCoordY = (w - o) + usubset_Stage1.y;
+ float hw = w / 2.0;
+ float n = mod(d - hw, w2);
+ repeatCoordWeightY = clamp((mix(n, w2 - n, step(w, n)) - hw) + 0.5, 0.0, 1.0);
+ }
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage1.x, uclamp_Stage1.z);
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage1.y, uclamp_Stage1.w);
+ extraRepeatCoordX = clamp(extraRepeatCoordX, uclamp_Stage1.x, uclamp_Stage1.z);
+ extraRepeatCoordY = clamp(extraRepeatCoordY, uclamp_Stage1.y, uclamp_Stage1.w);
+ vec4 textureColor = mix(mix(texture(uTextureSampler_0_Stage1, clampedCoord * unorm_Stage1.zw), texture(uTextureSampler_0_Stage1, vec2(extraRepeatCoordX, clampedCoord.y) * unorm_Stage1.zw), repeatCoordWeightX), mix(texture(uTextureSampler_0_Stage1, vec2(clampedCoord.x, extraRepeatCoordY) * unorm_Stage1.zw), texture(uTextureSampler_0_Stage1, vec2(extraRepeatCoordX, extraRepeatCoordY) * unorm_Stage1.zw), repeatCoordWeightX), repeatCoordWeightY);
+ output_Stage1 = outputColor_Stage0 * textureColor;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec2 inLocalCoords;
+in vec4 color;
+flat out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vcolor_Stage0 = color;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoords, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/22-151.shader_test b/shaders/skia/22-151.shader_test
new file mode 100644
index 0000000..16341c5
--- /dev/null
+++ b/shaders/skia/22-151.shader_test
@@ -0,0 +1,52 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uCoordTransformMatrix_1_Stage0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 TextureEffect_Stage1_c0_c0(vec4 _input, vec2 _coords) {
+ _coords = _coords * uCoordTransformMatrix_1_Stage0.xz + uCoordTransformMatrix_1_Stage0.yw;
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, _coords) * _input;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ float coord = vTransformedCoords_0_Stage0.y - 0.5;
+ float f = fract(coord);
+ coord += 0.5 - f;
+ float f2 = f * f;
+ vec4 w = mat4(0.055555555555555552, 0.88888888888888884, 0.055555555555555552, 0.0, -0.5, 0.0, 0.5, 0.0, 0.83333333333333337, -2.0, 1.5, -0.33333333333333331, -0.3888888888888889, 1.1666666666666667, -1.1666666666666667, 0.3888888888888889) * vec4(1.0, f, f2, f2 * f);
+ vec4 c[4];
+ c[0] = TextureEffect_Stage1_c0_c0(vec4(1.0), vec2(vTransformedCoords_0_Stage0.x, coord + -1.0));
+ c[1] = TextureEffect_Stage1_c0_c0(vec4(1.0), vec2(vTransformedCoords_0_Stage0.x, coord));
+ c[2] = TextureEffect_Stage1_c0_c0(vec4(1.0), vec2(vTransformedCoords_0_Stage0.x, coord + 1.0));
+ c[3] = TextureEffect_Stage1_c0_c0(vec4(1.0), vec2(vTransformedCoords_0_Stage0.x, coord + 2.0));
+ vec4 bicubicColor = ((c[0] * w.x + c[1] * w.y) + c[2] * w.z) + c[3] * w.w;
+ bicubicColor.xyz = max(vec3(0.0), min(bicubicColor.xyz, bicubicColor.www));
+ output_Stage1 = bicubicColor;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/22-152.shader_test b/shaders/skia/22-152.shader_test
new file mode 100644
index 0000000..4a51b05
--- /dev/null
+++ b/shaders/skia/22-152.shader_test
@@ -0,0 +1,70 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform float uSrcTF_Stage1[7];
+uniform vec4 uclamp_Stage1_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 TextureEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 inCoord = vTransformedCoords_0_Stage0;
+ vec2 subsetCoord;
+ subsetCoord.x = inCoord.x;
+ subsetCoord.y = inCoord.y;
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage1_c0_c0.x, uclamp_Stage1_c0_c0.z);
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage1_c0_c0.y, uclamp_Stage1_c0_c0.w);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ _output = _input * textureColor;
+ return _output;
+}
+float src_tf_Stage1(float x) {
+ float G = uSrcTF_Stage1[0];
+ float A = uSrcTF_Stage1[1];
+ float B = uSrcTF_Stage1[2];
+ float C = uSrcTF_Stage1[3];
+ float D = uSrcTF_Stage1[4];
+ float E = uSrcTF_Stage1[5];
+ float F = uSrcTF_Stage1[6];
+ float s = sign(x);
+ x = abs(x);
+ x = x < D ? C * x + F : pow(A * x + B, G) + E;
+ return s * x;
+}
+vec4 color_xform_Stage1(vec4 color) {
+ float nonZeroAlpha = max(color.w, 9.9999997473787516e-05);
+ color = vec4(color.xyz / nonZeroAlpha, nonZeroAlpha);
+ color.x = src_tf_Stage1(color.x);
+ color.y = src_tf_Stage1(color.y);
+ color.z = src_tf_Stage1(color.z);
+ color.xyz *= color.w;
+ return color;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = color_xform_Stage1(TextureEffect_Stage1_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/22-155.shader_test b/shaders/skia/22-155.shader_test
new file mode 100644
index 0000000..3c22eaf
--- /dev/null
+++ b/shaders/skia/22-155.shader_test
@@ -0,0 +1,61 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform float uSrcTF_Stage1[7];
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 TextureEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+float src_tf_Stage1(float x) {
+ float G = uSrcTF_Stage1[0];
+ float A = uSrcTF_Stage1[1];
+ float B = uSrcTF_Stage1[2];
+ float C = uSrcTF_Stage1[3];
+ float D = uSrcTF_Stage1[4];
+ float E = uSrcTF_Stage1[5];
+ float F = uSrcTF_Stage1[6];
+ float s = sign(x);
+ x = abs(x);
+ x = x < D ? C * x + F : pow(A * x + B, G) + E;
+ return s * x;
+}
+vec4 color_xform_Stage1(vec4 color) {
+ float nonZeroAlpha = max(color.w, 9.9999997473787516e-05);
+ color = vec4(color.xyz / nonZeroAlpha, nonZeroAlpha);
+ color.x = src_tf_Stage1(color.x);
+ color.y = src_tf_Stage1(color.y);
+ color.z = src_tf_Stage1(color.z);
+ color.xyz *= color.w;
+ return color;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = color_xform_Stage1(TextureEffect_Stage1_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/22-159.shader_test b/shaders/skia/22-159.shader_test
new file mode 100644
index 0000000..412f2bf
--- /dev/null
+++ b/shaders/skia/22-159.shader_test
@@ -0,0 +1,73 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uCoordTransformMatrix_2_Stage0;
+uniform vec4 uborder_Stage1;
+uniform vec4 usubset_Stage1;
+uniform vec4 unorm_Stage1;
+uniform vec4 uk_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 TextureEffect_Stage2_c0_c0(vec4 _input, vec2 _coords) {
+ _coords = _coords * uCoordTransformMatrix_2_Stage0.xz + uCoordTransformMatrix_2_Stage0.yw;
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage2, _coords) * _input;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ vec2 inCoord = vTransformedCoords_0_Stage0;
+ inCoord *= unorm_Stage1.xy;
+ vec2 subsetCoord;
+ subsetCoord.x = inCoord.x;
+ subsetCoord.y = inCoord.y;
+ vec2 clampedCoord;
+ clampedCoord.x = subsetCoord.x;
+ clampedCoord.y = subsetCoord.y;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord * unorm_Stage1.zw);
+ if (inCoord.x < usubset_Stage1.x || inCoord.x > usubset_Stage1.z) {
+ textureColor = uborder_Stage1;
+ }
+ if (inCoord.y < usubset_Stage1.y || inCoord.y > usubset_Stage1.w) {
+ textureColor = uborder_Stage1;
+ }
+ output_Stage1 = textureColor;
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ vec4 dst = TextureEffect_Stage2_c0_c0(vec4(1.0), vTransformedCoords_1_Stage0);
+ output_Stage2 = clamp((((uk_Stage2.x * output_Stage2) * dst + uk_Stage2.y * output_Stage2) + uk_Stage2.z * dst) + uk_Stage2.w, 0.0, 1.0);
+ {
+ output_Stage2.xyz = min(output_Stage2.xyz, output_Stage2.w);
+ }
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/22-16.shader_test b/shaders/skia/22-16.shader_test
new file mode 100644
index 0000000..73066dd
--- /dev/null
+++ b/shaders/skia/22-16.shader_test
@@ -0,0 +1,66 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 usubset_Stage1;
+uniform vec4 uclamp_Stage1;
+uniform vec4 unorm_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+flat in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec2 inCoord = vTransformedCoords_0_Stage0;
+ inCoord *= unorm_Stage1.xy;
+ vec2 subsetCoord;
+ subsetCoord.x = mod(inCoord.x - usubset_Stage1.x, usubset_Stage1.z - usubset_Stage1.x) + usubset_Stage1.x;
+ subsetCoord.y = mod(inCoord.y - usubset_Stage1.y, usubset_Stage1.w - usubset_Stage1.y) + usubset_Stage1.y;
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage1.x, uclamp_Stage1.z);
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage1.y, uclamp_Stage1.w);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord * unorm_Stage1.zw);
+ float errX = subsetCoord.x - clampedCoord.x;
+ float repeatCoordX = errX > 0.0 ? uclamp_Stage1.x : uclamp_Stage1.z;
+ float errY = subsetCoord.y - clampedCoord.y;
+ float repeatCoordY = errY > 0.0 ? uclamp_Stage1.y : uclamp_Stage1.w;
+ if (errX != 0.0 && errY != 0.0) {
+ errX = abs(errX);
+ textureColor = mix(mix(textureColor, texture(uTextureSampler_0_Stage1, vec2(repeatCoordX, clampedCoord.y) * unorm_Stage1.zw), errX), mix(texture(uTextureSampler_0_Stage1, vec2(clampedCoord.x, repeatCoordY) * unorm_Stage1.zw), texture(uTextureSampler_0_Stage1, vec2(repeatCoordX, repeatCoordY) * unorm_Stage1.zw), errX), abs(errY));
+ } else if (errX != 0.0) {
+ textureColor = mix(textureColor, texture(uTextureSampler_0_Stage1, vec2(repeatCoordX, clampedCoord.y) * unorm_Stage1.zw), abs(errX));
+ } else if (errY != 0.0) {
+ textureColor = mix(textureColor, texture(uTextureSampler_0_Stage1, vec2(clampedCoord.x, repeatCoordY) * unorm_Stage1.zw), abs(errY));
+ }
+ output_Stage1 = outputColor_Stage0 * textureColor;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec2 inLocalCoords;
+in vec4 color;
+flat out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vcolor_Stage0 = color;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoords, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/22-167.shader_test b/shaders/skia/22-167.shader_test
new file mode 100644
index 0000000..b3cfbe6
--- /dev/null
+++ b/shaders/skia/22-167.shader_test
@@ -0,0 +1,25 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+noperspective in vec4 vcolor_Stage0;
+void main() {
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 inPosition;
+in vec4 inColor;
+noperspective out vec4 vcolor_Stage0;
+void main() {
+ vec4 color = inColor;
+ vcolor_Stage0 = color;
+ vec2 pos2 = inPosition;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/22-168.shader_test b/shaders/skia/22-168.shader_test
new file mode 100644
index 0000000..575e525
--- /dev/null
+++ b/shaders/skia/22-168.shader_test
@@ -0,0 +1,93 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 ubaseFrequency_Stage2_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+uniform sampler2D uTextureSampler_1_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+float perlinnoise_Stage2_c0_c0(float chanCoord, vec2 noiseVec) {
+ vec4 floorVal;
+ floorVal.xy = floor(noiseVec);
+ floorVal.zw = floorVal.xy + vec2(1.0);
+ vec2 fractVal = fract(noiseVec);
+ vec2 noiseSmooth = (fractVal * fractVal) * (vec2(3.0) - vec2(2.0) * fractVal);
+ floorVal = fract(floor(mod(floorVal, 256.0)) / vec4(256.0));
+ vec2 latticeIdx;
+ latticeIdx.x = texture(uTextureSampler_0_Stage2, vec2(floorVal.x, 0.5)).x;
+ latticeIdx.y = texture(uTextureSampler_0_Stage2, vec2(floorVal.z, 0.5)).x;
+ vec4 bcoords = fract(latticeIdx.xyxy + floorVal.yyww);
+ vec2 uv;
+ vec4 lattice = texture(uTextureSampler_1_Stage2, vec2(bcoords.x, chanCoord)).zyxw;
+ uv.x = dot((lattice.yw + lattice.xz * vec2(0.00390625)) * vec2(2.0) - vec2(1.0), fractVal);
+ fractVal.x -= 1.0;
+ lattice = texture(uTextureSampler_1_Stage2, vec2(bcoords.y, chanCoord)).zyxw;
+ uv.y = dot((lattice.yw + lattice.xz * vec2(0.00390625)) * vec2(2.0) - vec2(1.0), fractVal);
+ vec2 ab;
+ ab.x = mix(uv.x, uv.y, noiseSmooth.x);
+ fractVal.y -= 1.0;
+ lattice = texture(uTextureSampler_1_Stage2, vec2(bcoords.w, chanCoord)).zyxw;
+ uv.y = dot((lattice.yw + lattice.xz * vec2(0.00390625)) * vec2(2.0) - vec2(1.0), fractVal);
+ fractVal.x += 1.0;
+ lattice = texture(uTextureSampler_1_Stage2, vec2(bcoords.z, chanCoord)).zyxw;
+ uv.x = dot((lattice.yw + lattice.xz * vec2(0.00390625)) * vec2(2.0) - vec2(1.0), fractVal);
+ ab.y = mix(uv.x, uv.y, noiseSmooth.x);
+ return mix(ab.x, ab.y, noiseSmooth.y);
+}
+vec4 PerlinNoise_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 noiseVec = floor(vTransformedCoords_1_Stage0) * ubaseFrequency_Stage2_c0_c0;
+ _output = vec4(0.0);
+ float ratio = 1.0;
+ for (int octave = 0;octave < 10; ++octave) {
+ _output += vec4(perlinnoise_Stage2_c0_c0(0.125, noiseVec), perlinnoise_Stage2_c0_c0(0.375, noiseVec), perlinnoise_Stage2_c0_c0(0.625, noiseVec), perlinnoise_Stage2_c0_c0(0.875, noiseVec)) * ratio;
+ noiseVec *= vec2(2.0);
+ ratio *= 0.5;
+ }
+ _output = _output * vec4(0.5) + vec4(0.5);
+ _output = clamp(_output, 0.0, 1.0);
+ _output = vec4(_output.xyz * _output.www, _output.w);
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_dst_in(output_Stage1, PerlinNoise_Stage2_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/22-169.shader_test b/shaders/skia/22-169.shader_test
new file mode 100644
index 0000000..89ec060
--- /dev/null
+++ b/shaders/skia/22-169.shader_test
@@ -0,0 +1,78 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uCoordTransformMatrix_2_Stage0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec3 vTransformedCoords_1_Stage0;
+vec4 TextureEffect_Stage2_c0_c0(vec4 _input, vec2 _coords) {
+ _coords = _coords * uCoordTransformMatrix_2_Stage0.xz + uCoordTransformMatrix_2_Stage0.yw;
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage2, _coords) * _input;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ vec2 vTransformedCoords_1_Stage0_ensure2D = vTransformedCoords_1_Stage0.xy / vTransformedCoords_1_Stage0.z;
+ vec2 coord = vTransformedCoords_1_Stage0_ensure2D - vec2(0.5);
+ vec2 f = fract(coord);
+ coord += 0.5 - f;
+ vec4 wx = mat4(0.055555555555555552, 0.88888888888888884, 0.055555555555555552, 0.0, -0.5, 0.0, 0.5, 0.0, 0.83333333333333337, -2.0, 1.5, -0.33333333333333331, -0.3888888888888889, 1.1666666666666667, -1.1666666666666667, 0.3888888888888889) * vec4(1.0, f.x, f.x * f.x, (f.x * f.x) * f.x);
+ vec4 wy = mat4(0.055555555555555552, 0.88888888888888884, 0.055555555555555552, 0.0, -0.5, 0.0, 0.5, 0.0, 0.83333333333333337, -2.0, 1.5, -0.33333333333333331, -0.3888888888888889, 1.1666666666666667, -1.1666666666666667, 0.3888888888888889) * vec4(1.0, f.y, f.y * f.y, (f.y * f.y) * f.y);
+ vec4 rowColors[4];
+ rowColors[0] = TextureEffect_Stage2_c0_c0(vec4(1.0), coord + vec2(-1.0, -1.0));
+ rowColors[1] = TextureEffect_Stage2_c0_c0(vec4(1.0), coord + vec2(0.0, -1.0));
+ rowColors[2] = TextureEffect_Stage2_c0_c0(vec4(1.0), coord + vec2(1.0, -1.0));
+ rowColors[3] = TextureEffect_Stage2_c0_c0(vec4(1.0), coord + vec2(2.0, -1.0));
+ vec4 s0 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ rowColors[0] = TextureEffect_Stage2_c0_c0(vec4(1.0), coord + vec2(-1.0, 0.0));
+ rowColors[1] = TextureEffect_Stage2_c0_c0(vec4(1.0), coord);
+ rowColors[2] = TextureEffect_Stage2_c0_c0(vec4(1.0), coord + vec2(1.0, 0.0));
+ rowColors[3] = TextureEffect_Stage2_c0_c0(vec4(1.0), coord + vec2(2.0, 0.0));
+ vec4 s1 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ rowColors[0] = TextureEffect_Stage2_c0_c0(vec4(1.0), coord + vec2(-1.0, 1.0));
+ rowColors[1] = TextureEffect_Stage2_c0_c0(vec4(1.0), coord + vec2(0.0, 1.0));
+ rowColors[2] = TextureEffect_Stage2_c0_c0(vec4(1.0), coord + vec2(1.0, 1.0));
+ rowColors[3] = TextureEffect_Stage2_c0_c0(vec4(1.0), coord + vec2(2.0, 1.0));
+ vec4 s2 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ rowColors[0] = TextureEffect_Stage2_c0_c0(vec4(1.0), coord + vec2(-1.0, 2.0));
+ rowColors[1] = TextureEffect_Stage2_c0_c0(vec4(1.0), coord + vec2(0.0, 2.0));
+ rowColors[2] = TextureEffect_Stage2_c0_c0(vec4(1.0), coord + vec2(1.0, 2.0));
+ rowColors[3] = TextureEffect_Stage2_c0_c0(vec4(1.0), coord + vec2(2.0, 2.0));
+ vec4 s3 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ vec4 bicubicColor = ((wy.x * s0 + wy.y * s1) + wy.z * s2) + wy.w * s3;
+ bicubicColor.xyz = max(vec3(0.0), min(bicubicColor.xyz, bicubicColor.www));
+ output_Stage2 = bicubicColor * output_Stage1;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec3 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0);
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/22-18.shader_test b/shaders/skia/22-18.shader_test
new file mode 100644
index 0000000..600ff38
--- /dev/null
+++ b/shaders/skia/22-18.shader_test
@@ -0,0 +1,52 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 usubset_Stage1;
+uniform vec4 uclamp_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+flat in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec2 inCoord = vTransformedCoords_0_Stage0;
+ vec2 subsetCoord;
+ subsetCoord.x = mod(inCoord.x - usubset_Stage1.x, usubset_Stage1.z - usubset_Stage1.x) + usubset_Stage1.x;
+ subsetCoord.y = mod(inCoord.y - usubset_Stage1.y, usubset_Stage1.w - usubset_Stage1.y) + usubset_Stage1.y;
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage1.x, uclamp_Stage1.z);
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage1.y, uclamp_Stage1.w);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ output_Stage1 = outputColor_Stage0 * textureColor;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec2 inLocalCoords;
+in vec4 color;
+flat out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vcolor_Stage0 = color;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoords, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/22-2.shader_test b/shaders/skia/22-2.shader_test
new file mode 100644
index 0000000..3c6bf25
--- /dev/null
+++ b/shaders/skia/22-2.shader_test
@@ -0,0 +1,33 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_KHR_blend_equation_advanced : require
+out vec4 sk_FragColor;
+layout (blend_support_all_equations) out ;
+flat in vec4 vcolor_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ {
+ sk_FragColor = outputColor_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 position;
+in vec4 color;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/22-20.shader_test b/shaders/skia/22-20.shader_test
new file mode 100644
index 0000000..c043ee8
--- /dev/null
+++ b/shaders/skia/22-20.shader_test
@@ -0,0 +1,111 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 uscale01_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias01_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale23_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias23_Stage1_c0_c0_c1_c0;
+uniform float uthreshold_Stage1_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage2_c1_c0_c0_c0;
+uniform vec4 ucolor_Stage2_c2_c0_c0_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 RadialGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = length(vTransformedCoords_0_Stage0);
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 DualIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthreshold_Stage1_c0_c0_c1_c0) {
+ scale = uscale01_Stage1_c0_c0_c1_c0;
+ bias = ubias01_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale23_Stage1_c0_c0_c1_c0;
+ bias = ubias23_Stage1_c0_c0_c1_c0;
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = RadialGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = DualIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c1_c0_c0_c0;
+ }
+ return _output;
+}
+vec4 blend_dst_out(vec4 src, vec4 dst) {
+ return (1.0 - src.w) * dst;
+}
+vec4 ComposeOne_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_dst_out(ConstColorProcessor_Stage2_c1_c0_c0_c0(vec4(1.0)), _input);
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c2_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c2_c0_c0_c0;
+ }
+ return _output;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 ComposeOne_Stage2_c2_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_src_over(ConstColorProcessor_Stage2_c2_c0_c0_c0(vec4(1.0)), _input);
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = ComposeOne_Stage2_c2_c0(ComposeOne_Stage2_c1_c0(output_Stage1));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/22-21.shader_test b/shaders/skia/22-21.shader_test
new file mode 100644
index 0000000..390bf41
--- /dev/null
+++ b/shaders/skia/22-21.shader_test
@@ -0,0 +1,131 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 uscale01_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias01_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale23_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias23_Stage1_c0_c0_c1_c0;
+uniform float uthreshold_Stage1_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage2_c1_c0_c0_c0;
+uniform vec4 ucolor_Stage2_c2_c0_c0_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 RadialGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = length(vTransformedCoords_0_Stage0);
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 DualIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthreshold_Stage1_c0_c0_c1_c0) {
+ scale = uscale01_Stage1_c0_c0_c1_c0;
+ bias = ubias01_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale23_Stage1_c0_c0_c1_c0;
+ bias = ubias23_Stage1_c0_c0_c1_c0;
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = RadialGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = DualIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c1_c0_c0_c0;
+ }
+ return _output;
+}
+float _guarded_divide(float n, float d) {
+ return n / d;
+}
+float _color_burn_component(float sc, float sa, float dc, float da) {
+ if (da == dc) {
+ return (sa * da + sc * (1.0 - da)) + dc * (1.0 - sa);
+ } else if (sc == 0.0) {
+ return dc * (1.0 - sa);
+ }
+ float d = max(0.0, da - _guarded_divide((da - dc) * sa, sc));
+ return (d * sa + sc * (1.0 - da)) + dc * (1.0 - sa);
+}
+vec4 blend_color_burn(vec4 src, vec4 dst) {
+ return vec4(_color_burn_component(src.x, src.w, dst.x, dst.w), _color_burn_component(src.y, src.w, dst.y, dst.w), _color_burn_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+}
+vec4 ComposeOne_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_color_burn(ConstColorProcessor_Stage2_c1_c0_c0_c0(vec4(1.0)), _input);
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c2_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c2_c0_c0_c0;
+ }
+ return _output;
+}
+float _blend_overlay_component(float sc, float sa, float dc, float da) {
+ if (2.0 * dc <= da) {
+ return (2.0 * sc) * dc;
+ }
+ return sa * da - (2.0 * (da - dc)) * (sa - sc);
+}
+vec4 blend_overlay(vec4 src, vec4 dst) {
+ vec4 result = vec4(_blend_overlay_component(src.x, src.w, dst.x, dst.w), _blend_overlay_component(src.y, src.w, dst.y, dst.w), _blend_overlay_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+ result.xyz += dst.xyz * (1.0 - src.w) + src.xyz * (1.0 - dst.w);
+ return result;
+}
+vec4 ComposeOne_Stage2_c2_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_overlay(ConstColorProcessor_Stage2_c2_c0_c0_c0(vec4(1.0)), _input);
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = ComposeOne_Stage2_c2_c0(ComposeOne_Stage2_c1_c0(output_Stage1));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/22-23.shader_test b/shaders/skia/22-23.shader_test
new file mode 100644
index 0000000..58fce00
--- /dev/null
+++ b/shaders/skia/22-23.shader_test
@@ -0,0 +1,74 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+noperspective in float vcoverage_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ float coverage = vcoverage_Stage0;
+ outputCoverage_Stage0 = vec4(coverage);
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1 * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in float coverage;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+noperspective out float vcoverage_Stage0;
+void main() {
+ vec2 position = position;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ vcoverage_Stage0 = coverage;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/22-29.shader_test b/shaders/skia/22-29.shader_test
new file mode 100644
index 0000000..3b21186
--- /dev/null
+++ b/shaders/skia/22-29.shader_test
@@ -0,0 +1,53 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+noperspective in vec2 vEllipseOffsets0_Stage0;
+noperspective in vec2 vEllipseOffsets1_Stage0;
+noperspective in vec4 vinColor_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vinColor_Stage0;
+ vec2 scaledOffset = vEllipseOffsets0_Stage0;
+ float test = dot(scaledOffset, scaledOffset) - 1.0;
+ vec2 duvdx = dFdx(vEllipseOffsets0_Stage0);
+ vec2 duvdy = -dFdy(vEllipseOffsets0_Stage0);
+ vec2 grad = vec2(vEllipseOffsets0_Stage0.x * duvdx.x + vEllipseOffsets0_Stage0.y * duvdx.y, vEllipseOffsets0_Stage0.x * duvdy.x + vEllipseOffsets0_Stage0.y * duvdy.y);
+ float grad_dot = 4.0 * dot(grad, grad);
+ grad_dot = max(grad_dot, 1.1754999560161448e-38);
+ float invlen = inversesqrt(grad_dot);
+ float edgeAlpha = clamp(1.0 - test * invlen, 0.0, 1.0);
+ edgeAlpha *= clamp(1.0 + test * invlen, 0.0, 1.0);
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ {
+ sk_FragColor = outputColor_Stage0 * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec2 inEllipseOffsets0;
+in vec2 inEllipseOffsets1;
+noperspective out vec2 vEllipseOffsets0_Stage0;
+noperspective out vec2 vEllipseOffsets1_Stage0;
+noperspective out vec4 vinColor_Stage0;
+void main() {
+ vEllipseOffsets0_Stage0 = inEllipseOffsets0;
+ vEllipseOffsets1_Stage0 = inEllipseOffsets1;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = (uViewM_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/22-3.shader_test b/shaders/skia/22-3.shader_test
new file mode 100644
index 0000000..d0757ae
--- /dev/null
+++ b/shaders/skia/22-3.shader_test
@@ -0,0 +1,41 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * outputColor_Stage0;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/22-30.shader_test b/shaders/skia/22-30.shader_test
new file mode 100644
index 0000000..ee1a8d8
--- /dev/null
+++ b/shaders/skia/22-30.shader_test
@@ -0,0 +1,86 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+vec4 ComposeOne_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_dst_in(_input, TextureEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0)));
+ return _output;
+}
+vec4 ComposeOne_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_src_in(_input, ComposeOne_Stage1_c0_c0_c0_c0(vec4(1.0)));
+ return _output;
+}
+vec4 TextureEffect_Stage1_c1_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_1_Stage1, vTransformedCoords_1_Stage0) * _input;
+ return _output;
+}
+vec4 ComposeOne_Stage1_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_dst_in(_input, TextureEffect_Stage1_c1_c0_c0_c0_c0_c0(vec4(1.0)));
+ return _output;
+}
+vec4 ComposeOne_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_src_in(_input, ComposeOne_Stage1_c1_c0_c0_c0(vec4(1.0)));
+ return _output;
+}
+vec4 blend_dst_out(vec4 src, vec4 dst) {
+ return (1.0 - src.w) * dst;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(vec4(1.0).xyz, 1.0);
+ output_Stage1 = blend_dst_out(ComposeOne_Stage1_c0_c0(inputColor), ComposeOne_Stage1_c1_c0(inputColor));
+ }
+ {
+ sk_FragColor = outputColor_Stage0 * output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/22-31.shader_test b/shaders/skia/22-31.shader_test
new file mode 100644
index 0000000..00f715f
--- /dev/null
+++ b/shaders/skia/22-31.shader_test
@@ -0,0 +1,103 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform vec2 uBounds_Stage1;
+uniform vec4 uKernel_Stage1[4];
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0 - 6.0 * uImageIncrement_Stage1;
+ vec2 coordSampled = vec2(0.0, 0.0);
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage1.x && coord.y <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].x;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage1.x && coord.y <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].y;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage1.x && coord.y <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].z;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage1.x && coord.y <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].w;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage1.x && coord.y <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].x;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage1.x && coord.y <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].y;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage1.x && coord.y <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].z;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage1.x && coord.y <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].w;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage1.x && coord.y <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].x;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage1.x && coord.y <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].y;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage1.x && coord.y <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].z;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage1.x && coord.y <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].w;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage1.x && coord.y <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].x;
+ }
+ coord += uImageIncrement_Stage1;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/22-32.shader_test b/shaders/skia/22-32.shader_test
new file mode 100644
index 0000000..67670b2
--- /dev/null
+++ b/shaders/skia/22-32.shader_test
@@ -0,0 +1,44 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 ucircle_Stage1;
+flat in vec4 vcolor_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ float d;
+ {
+ d = (1.0 - length((ucircle_Stage1.xy - gl_FragCoord.xy) * ucircle_Stage1.w)) * ucircle_Stage1.z;
+ }
+ {
+ output_Stage1 = vec4(clamp(d, 0.0, 1.0));
+ }
+ }
+ {
+ sk_FragColor = outputColor_Stage0 * output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 position;
+in vec4 color;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/22-4.shader_test b/shaders/skia/22-4.shader_test
new file mode 100644
index 0000000..1f9fe27
--- /dev/null
+++ b/shaders/skia/22-4.shader_test
@@ -0,0 +1,53 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 TextureEffect_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage2, vTransformedCoords_1_Stage0) * _input;
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_dst_in(output_Stage1, TextureEffect_Stage2_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/22-44.shader_test b/shaders/skia/22-44.shader_test
new file mode 100644
index 0000000..e1e1336
--- /dev/null
+++ b/shaders/skia/22-44.shader_test
@@ -0,0 +1,60 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+noperspective in vec2 vEllipseOffsets0_Stage0;
+noperspective in vec2 vEllipseOffsets1_Stage0;
+noperspective in vec4 vinColor_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vinColor_Stage0;
+ vec2 scaledOffset = vEllipseOffsets0_Stage0;
+ float test = dot(scaledOffset, scaledOffset) - 1.0;
+ vec2 duvdx = dFdx(vEllipseOffsets0_Stage0);
+ vec2 duvdy = -dFdy(vEllipseOffsets0_Stage0);
+ vec2 grad = vec2(vEllipseOffsets0_Stage0.x * duvdx.x + vEllipseOffsets0_Stage0.y * duvdx.y, vEllipseOffsets0_Stage0.x * duvdy.x + vEllipseOffsets0_Stage0.y * duvdy.y);
+ float grad_dot = 4.0 * dot(grad, grad);
+ grad_dot = max(grad_dot, 1.1754999560161448e-38);
+ float invlen = inversesqrt(grad_dot);
+ float edgeAlpha = clamp(0.5 - test * invlen, 0.0, 1.0);
+ scaledOffset = vEllipseOffsets1_Stage0;
+ test = dot(scaledOffset, scaledOffset) - 1.0;
+ duvdx = dFdx(vEllipseOffsets1_Stage0);
+ duvdy = -dFdy(vEllipseOffsets1_Stage0);
+ grad = vec2(vEllipseOffsets1_Stage0.x * duvdx.x + vEllipseOffsets1_Stage0.y * duvdx.y, vEllipseOffsets1_Stage0.x * duvdy.x + vEllipseOffsets1_Stage0.y * duvdy.y);
+ grad_dot = 4.0 * dot(grad, grad);
+ invlen = inversesqrt(grad_dot);
+ edgeAlpha *= clamp(0.5 + test * invlen, 0.0, 1.0);
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ {
+ sk_FragColor = outputColor_Stage0 * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec2 inEllipseOffsets0;
+in vec2 inEllipseOffsets1;
+noperspective out vec2 vEllipseOffsets0_Stage0;
+noperspective out vec2 vEllipseOffsets1_Stage0;
+noperspective out vec4 vinColor_Stage0;
+void main() {
+ vEllipseOffsets0_Stage0 = inEllipseOffsets0;
+ vEllipseOffsets1_Stage0 = inEllipseOffsets1;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = (uViewM_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/22-45.shader_test b/shaders/skia/22-45.shader_test
new file mode 100644
index 0000000..e73c498
--- /dev/null
+++ b/shaders/skia/22-45.shader_test
@@ -0,0 +1,41 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform float uPixelSize_Stage1;
+uniform vec2 uRange_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0;
+ coord.x -= 25.0 * uPixelSize_Stage1;
+ for (int i = 0;i < 51; i++) {
+ output_Stage1 = max(output_Stage1, texture(uTextureSampler_0_Stage1, coord));
+ coord.x += uPixelSize_Stage1;
+ }
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/22-46.shader_test b/shaders/skia/22-46.shader_test
new file mode 100644
index 0000000..7032025
--- /dev/null
+++ b/shaders/skia/22-46.shader_test
@@ -0,0 +1,92 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage2_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c1_c0;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+vec4 blend_src(vec4 src, vec4 dst) {
+ return src;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_dst_in(outputColor_Stage0, ClampedGradientEffect_Stage1_c0_c0(vec4(1.0)));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_src(ConstColorProcessor_Stage2_c1_c0(vec4(1.0)), output_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/22-48.shader_test b/shaders/skia/22-48.shader_test
new file mode 100644
index 0000000..f94d38a
--- /dev/null
+++ b/shaders/skia/22-48.shader_test
@@ -0,0 +1,168 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform vec4 uKernel_Stage1[3];
+uniform vec2 uKernelOffset_Stage1;
+uniform float uGain_Stage1;
+uniform float uBias_Stage1;
+uniform vec4 uTexDom_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ vec4 sum = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0 - uKernelOffset_Stage1 * uImageIncrement_Stage1;
+ vec4 c;
+ {
+ float k = uKernel_Stage1[0].x;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = mod(origCoord - uTexDom_Stage1.xy, uTexDom_Stage1.zw - uTexDom_Stage1.xy) + uTexDom_Stage1.xy;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[0].y;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = mod(origCoord - uTexDom_Stage1.xy, uTexDom_Stage1.zw - uTexDom_Stage1.xy) + uTexDom_Stage1.xy;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[0].z;
+ {
+ vec2 origCoord = coord + vec2(2.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = mod(origCoord - uTexDom_Stage1.xy, uTexDom_Stage1.zw - uTexDom_Stage1.xy) + uTexDom_Stage1.xy;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[0].w;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = mod(origCoord - uTexDom_Stage1.xy, uTexDom_Stage1.zw - uTexDom_Stage1.xy) + uTexDom_Stage1.xy;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[1].x;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = mod(origCoord - uTexDom_Stage1.xy, uTexDom_Stage1.zw - uTexDom_Stage1.xy) + uTexDom_Stage1.xy;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[1].y;
+ {
+ vec2 origCoord = coord + vec2(2.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = mod(origCoord - uTexDom_Stage1.xy, uTexDom_Stage1.zw - uTexDom_Stage1.xy) + uTexDom_Stage1.xy;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[1].z;
+ {
+ vec2 origCoord = coord + vec2(0.0, 2.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = mod(origCoord - uTexDom_Stage1.xy, uTexDom_Stage1.zw - uTexDom_Stage1.xy) + uTexDom_Stage1.xy;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[1].w;
+ {
+ vec2 origCoord = coord + vec2(1.0, 2.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = mod(origCoord - uTexDom_Stage1.xy, uTexDom_Stage1.zw - uTexDom_Stage1.xy) + uTexDom_Stage1.xy;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[2].x;
+ {
+ vec2 origCoord = coord + vec2(2.0, 2.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = mod(origCoord - uTexDom_Stage1.xy, uTexDom_Stage1.zw - uTexDom_Stage1.xy) + uTexDom_Stage1.xy;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ vec2 origCoord = vTransformedCoords_0_Stage0;
+ vec2 clampedCoord;
+ clampedCoord = mod(origCoord - uTexDom_Stage1.xy, uTexDom_Stage1.zw - uTexDom_Stage1.xy) + uTexDom_Stage1.xy;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ output_Stage1.w = c.w;
+ output_Stage1.xyz = clamp(sum.xyz * uGain_Stage1 + uBias_Stage1, 0.0, 1.0);
+ output_Stage1.xyz *= output_Stage1.w;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/22-5.shader_test b/shaders/skia/22-5.shader_test
new file mode 100644
index 0000000..2d7506e
--- /dev/null
+++ b/shaders/skia/22-5.shader_test
@@ -0,0 +1,103 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uclamp_Stage1_c0_c0_c0_c0;
+uniform vec4 uclamp_Stage1_c0_c0_c1_c0;
+uniform vec4 uclamp_Stage1_c0_c0_c2_c0;
+uniform mat3 ucolorSpaceMatrix_Stage1_c0_c0;
+uniform vec3 ucolorSpaceTranslate_Stage1_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+uniform sampler2D uTextureSampler_2_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 inCoord = vTransformedCoords_0_Stage0;
+ vec2 subsetCoord;
+ subsetCoord.x = inCoord.x;
+ subsetCoord.y = inCoord.y;
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage1_c0_c0_c0_c0.x, uclamp_Stage1_c0_c0_c0_c0.z);
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage1_c0_c0_c0_c0.y, uclamp_Stage1_c0_c0_c0_c0.w);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ _output = _input * textureColor;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 inCoord = vTransformedCoords_1_Stage0;
+ vec2 subsetCoord;
+ subsetCoord.x = inCoord.x;
+ subsetCoord.y = inCoord.y;
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage1_c0_c0_c1_c0.x, uclamp_Stage1_c0_c0_c1_c0.z);
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage1_c0_c0_c1_c0.y, uclamp_Stage1_c0_c0_c1_c0.w);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ _output = _input * textureColor;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c0_c0_c2_c0(vec4 _input) {
+ vec4 _output;
+ vec2 inCoord = vTransformedCoords_2_Stage0;
+ vec2 subsetCoord;
+ subsetCoord.x = inCoord.x;
+ subsetCoord.y = inCoord.y;
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage1_c0_c0_c2_c0.x, uclamp_Stage1_c0_c0_c2_c0.z);
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage1_c0_c0_c2_c0.y, uclamp_Stage1_c0_c0_c2_c0.w);
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ _output = _input * textureColor;
+ return _output;
+}
+vec4 YUVtoRGBEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 planes[3];
+ planes[0] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0));
+ planes[1] = TextureEffect_Stage1_c0_c0_c1_c0(vec4(1.0));
+ planes[2] = TextureEffect_Stage1_c0_c0_c2_c0(vec4(1.0));
+ vec4 color = vec4(planes[0].x, planes[1].y, planes[1].x, planes[2].w);
+ color.xyz = clamp(color.xyz * ucolorSpaceMatrix_Stage1_c0_c0 + ucolorSpaceTranslate_Stage1_c0_c0, 0.0, 1.0);
+ color.xyz *= color.w;
+ _output = color;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = YUVtoRGBEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/22-50.shader_test b/shaders/skia/22-50.shader_test
new file mode 100644
index 0000000..9db61fc
--- /dev/null
+++ b/shaders/skia/22-50.shader_test
@@ -0,0 +1,137 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform float uSurfaceScale_Stage1;
+uniform vec3 uLightColor_Stage1;
+uniform float uKD_Stage1;
+uniform vec3 uLightLocation_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 light_Stage1(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ float colorScale = uKD_Stage1 * dot(normal, surfaceToLight);
+ return vec4(lightColor * clamp(colorScale, 0.0, 1.0), 1.0);
+}
+float sobel_Stage1(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage1(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage1(float m[9], float surfaceScale) {
+ return pointToNormal_Stage1(sobel_Stage1(m[1], m[2], m[4], m[5], 0.0, 0.0, 0.66666698455810547), sobel_Stage1(0.0, 0.0, m[1], m[4], m[2], m[5], 0.66666698455810547), surfaceScale);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ vec2 coord = vTransformedCoords_0_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp0 = textureColor;
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp1 = textureColor;
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp2 = textureColor;
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp3 = textureColor;
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp4 = textureColor;
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp5 = textureColor;
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp6 = textureColor;
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp7 = textureColor;
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp8 = textureColor;
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = normalize(uLightLocation_Stage1 - vec3(gl_FragCoord.xy, uSurfaceScale_Stage1 * m[4]));
+ output_Stage1 = light_Stage1(normal_Stage1(m, uSurfaceScale_Stage1), surfaceToLight, uLightColor_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/22-51.shader_test b/shaders/skia/22-51.shader_test
new file mode 100644
index 0000000..80d3b76
--- /dev/null
+++ b/shaders/skia/22-51.shader_test
@@ -0,0 +1,67 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec2 uDstTextureUpperLeft_Stage1;
+uniform vec2 uDstTextureCoordScale_Stage1;
+uniform sampler2D uTextureSampler_0_Stage0;
+uniform sampler2D uDstTextureSampler_Stage1;
+noperspective in vec2 vTextureCoords_Stage0;
+flat in int vTexIndex_Stage0;
+noperspective in vec4 vinColor_Stage0;
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vinColor_Stage0;
+ vec4 texColor;
+ {
+ texColor = texture(uTextureSampler_0_Stage0, vTextureCoords_Stage0);
+ }
+ outputCoverage_Stage0 = texColor;
+ }
+ {
+ if (all(lessThanEqual(outputCoverage_Stage0.xyz, vec3(0.0)))) {
+ discard;
+ }
+ vec2 _dstTexCoord = (gl_FragCoord.xy - uDstTextureUpperLeft_Stage1) * uDstTextureCoordScale_Stage1;
+ _dstTexCoord.y = 1.0 - _dstTexCoord.y;
+ vec4 _dstColor = texture(uDstTextureSampler_Stage1, _dstTexCoord);
+ sk_FragColor = blend_src_in(outputColor_Stage0, _dstColor);
+ float lerpRed = mix(_dstColor.w, sk_FragColor.w, outputCoverage_Stage0.x);
+ float lerpBlue = mix(_dstColor.w, sk_FragColor.w, outputCoverage_Stage0.y);
+ float lerpGreen = mix(_dstColor.w, sk_FragColor.w, outputCoverage_Stage0.z);
+ sk_FragColor = outputCoverage_Stage0 * sk_FragColor + (vec4(1.0) - outputCoverage_Stage0) * _dstColor;
+ sk_FragColor.w = max(max(lerpRed, lerpBlue), lerpGreen);
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform vec2 uAtlasSizeInv_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in uvec2 inTextureCoords;
+noperspective out vec2 vTextureCoords_Stage0;
+flat out int vTexIndex_Stage0;
+noperspective out vec4 vinColor_Stage0;
+void main() {
+ ivec2 signedCoords = ivec2(int(inTextureCoords.x), int(inTextureCoords.y));
+ vec2 unormTexCoords = vec2(float(signedCoords.x / 2), float(signedCoords.y / 2));
+ vTextureCoords_Stage0 = unormTexCoords * uAtlasSizeInv_Stage0;
+ vTexIndex_Stage0 = 0;
+ vinColor_Stage0 = inColor;
+ gl_Position = vec4(inPosition.x, inPosition.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/22-58.shader_test b/shaders/skia/22-58.shader_test
new file mode 100644
index 0000000..d40d6ed
--- /dev/null
+++ b/shaders/skia/22-58.shader_test
@@ -0,0 +1,86 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uborder_Stage1;
+uniform vec4 usubset_Stage1;
+uniform vec4 unorm_Stage1;
+uniform vec4 uborder_Stage2_c0_c0;
+uniform vec4 usubset_Stage2_c0_c0;
+uniform vec4 unorm_Stage2_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 TextureEffect_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 inCoord = vTransformedCoords_1_Stage0;
+ inCoord *= unorm_Stage2_c0_c0.xy;
+ vec2 subsetCoord;
+ subsetCoord.x = inCoord.x;
+ subsetCoord.y = inCoord.y;
+ vec2 clampedCoord;
+ clampedCoord.x = subsetCoord.x;
+ clampedCoord.y = subsetCoord.y;
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord * unorm_Stage2_c0_c0.zw);
+ if (inCoord.x < usubset_Stage2_c0_c0.x || inCoord.x > usubset_Stage2_c0_c0.z) {
+ textureColor = uborder_Stage2_c0_c0;
+ }
+ if (inCoord.y < usubset_Stage2_c0_c0.y || inCoord.y > usubset_Stage2_c0_c0.w) {
+ textureColor = uborder_Stage2_c0_c0;
+ }
+ _output = _input * textureColor;
+ return _output;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ vec2 inCoord = vTransformedCoords_0_Stage0;
+ inCoord *= unorm_Stage1.xy;
+ vec2 subsetCoord;
+ subsetCoord.x = inCoord.x;
+ subsetCoord.y = inCoord.y;
+ vec2 clampedCoord;
+ clampedCoord.x = subsetCoord.x;
+ clampedCoord.y = subsetCoord.y;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord * unorm_Stage1.zw);
+ if (inCoord.x < usubset_Stage1.x || inCoord.x > usubset_Stage1.z) {
+ textureColor = uborder_Stage1;
+ }
+ if (inCoord.y < usubset_Stage1.y || inCoord.y > usubset_Stage1.w) {
+ textureColor = uborder_Stage1;
+ }
+ output_Stage1 = textureColor;
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_src_over(output_Stage1, TextureEffect_Stage2_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/22-59.shader_test b/shaders/skia/22-59.shader_test
new file mode 100644
index 0000000..9006b5d
--- /dev/null
+++ b/shaders/skia/22-59.shader_test
@@ -0,0 +1,143 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform vec2 uBounds_Stage1;
+uniform vec4 uKernel_Stage1[6];
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0 - 10.0 * uImageIncrement_Stage1;
+ vec2 coordSampled = vec2(0.0, 0.0);
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1.x && coord.x <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].x;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1.x && coord.x <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].y;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1.x && coord.x <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].z;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1.x && coord.x <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].w;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1.x && coord.x <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].x;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1.x && coord.x <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].y;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1.x && coord.x <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].z;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1.x && coord.x <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].w;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1.x && coord.x <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].x;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1.x && coord.x <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].y;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1.x && coord.x <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].z;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1.x && coord.x <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].w;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1.x && coord.x <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].x;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1.x && coord.x <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].y;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1.x && coord.x <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].z;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1.x && coord.x <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].w;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1.x && coord.x <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[4].x;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1.x && coord.x <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[4].y;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1.x && coord.x <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[4].z;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1.x && coord.x <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[4].w;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1.x && coord.x <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[5].x;
+ }
+ coord += uImageIncrement_Stage1;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/22-6.shader_test b/shaders/skia/22-6.shader_test
new file mode 100644
index 0000000..58c65e1
--- /dev/null
+++ b/shaders/skia/22-6.shader_test
@@ -0,0 +1,67 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform mat3 ucolorSpaceMatrix_Stage1;
+uniform vec3 ucolorSpaceTranslate_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+uniform sampler2D uTextureSampler_2_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+vec4 TextureEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_1_Stage1, vTransformedCoords_1_Stage0) * _input;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c2_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_2_Stage1, vTransformedCoords_2_Stage0) * _input;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ vec4 planes[3];
+ planes[0] = TextureEffect_Stage1_c0_c0(vec4(1.0));
+ planes[1] = TextureEffect_Stage1_c1_c0(vec4(1.0));
+ planes[2] = TextureEffect_Stage1_c2_c0(vec4(1.0));
+ vec4 color = vec4(planes[0].x, planes[1].y, planes[1].x, planes[2].w);
+ color.xyz = clamp(color.xyz * ucolorSpaceMatrix_Stage1 + ucolorSpaceTranslate_Stage1, 0.0, 1.0);
+ color.xyz *= color.w;
+ output_Stage1 = color;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/22-61.shader_test b/shaders/skia/22-61.shader_test
new file mode 100644
index 0000000..bf62f02
--- /dev/null
+++ b/shaders/skia/22-61.shader_test
@@ -0,0 +1,93 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform vec2 uBounds_Stage1;
+uniform vec4 uKernel_Stage1[3];
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0 - 5.0 * uImageIncrement_Stage1;
+ vec2 coordSampled = vec2(0.0, 0.0);
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1.x && coord.x <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].x;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1.x && coord.x <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].y;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1.x && coord.x <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].z;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1.x && coord.x <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].w;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1.x && coord.x <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].x;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1.x && coord.x <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].y;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1.x && coord.x <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].z;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1.x && coord.x <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].w;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1.x && coord.x <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].x;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1.x && coord.x <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].y;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1.x && coord.x <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].z;
+ }
+ coord += uImageIncrement_Stage1;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/22-66.shader_test b/shaders/skia/22-66.shader_test
new file mode 100644
index 0000000..59b8943
--- /dev/null
+++ b/shaders/skia/22-66.shader_test
@@ -0,0 +1,53 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform vec2 uBounds_Stage1;
+uniform vec4 uKernel_Stage1[1];
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0 - uImageIncrement_Stage1;
+ vec2 coordSampled = vec2(0.0, 0.0);
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage1.x && coord.y <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].x;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage1.x && coord.y <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].y;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage1.x && coord.y <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].z;
+ }
+ coord += uImageIncrement_Stage1;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/22-67.shader_test b/shaders/skia/22-67.shader_test
new file mode 100644
index 0000000..d85ebc0
--- /dev/null
+++ b/shaders/skia/22-67.shader_test
@@ -0,0 +1,115 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage2_c1_c0_c0_c0;
+uniform vec4 urightBorderColor_Stage2_c1_c0_c0_c0;
+uniform vec4 uscale0_1_Stage2_c1_c0_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage2_c1_c0_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage2_c1_c0_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage2_c1_c0_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage2_c1_c0_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage2_c1_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage2_c1_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage2_c1_c0_c0_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+vec4 RadialGradientLayout_Stage2_c1_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = length(vTransformedCoords_1_Stage0);
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage2_c1_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage2_c1_c0_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage2_c1_c0_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage2_c1_c0_c0_c0_c1_c0;
+ bias = ubias0_1_Stage2_c1_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage2_c1_c0_c0_c0_c1_c0;
+ bias = ubias2_3_Stage2_c1_c0_c0_c0_c1_c0;
+ }
+ } else {
+ {
+ scale = uscale4_5_Stage2_c1_c0_c0_c0_c1_c0;
+ bias = ubias4_5_Stage2_c1_c0_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage2_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = RadialGradientLayout_Stage2_c1_c0_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage2_c1_c0_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage2_c1_c0_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage2_c1_c0_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+vec4 ComposeOne_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_dst_in(_input, ClampedGradientEffect_Stage2_c1_c0_c0_c0(vec4(1.0)));
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TextureEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_src_in(vec4(1.0), ComposeOne_Stage2_c1_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage1 * output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/22-7.shader_test b/shaders/skia/22-7.shader_test
new file mode 100644
index 0000000..6587de1
--- /dev/null
+++ b/shaders/skia/22-7.shader_test
@@ -0,0 +1,87 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform mat3 ucolorSpaceMatrix_Stage1_c0_c0;
+uniform vec3 ucolorSpaceTranslate_Stage1_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+uniform sampler2D uTextureSampler_2_Stage1;
+uniform sampler2D uTextureSampler_3_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+noperspective in vec2 vTransformedCoords_3_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_1_Stage1, vTransformedCoords_1_Stage0) * _input;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c0_c0_c2_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_2_Stage1, vTransformedCoords_2_Stage0) * _input;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c0_c0_c3_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_3_Stage1, vTransformedCoords_3_Stage0) * _input;
+ return _output;
+}
+vec4 YUVtoRGBEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 planes[4];
+ planes[0] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0));
+ planes[1] = TextureEffect_Stage1_c0_c0_c1_c0(vec4(1.0));
+ planes[2] = TextureEffect_Stage1_c0_c0_c2_c0(vec4(1.0));
+ planes[3] = TextureEffect_Stage1_c0_c0_c3_c0(vec4(1.0));
+ vec4 color = vec4(planes[0].x, planes[2].x, planes[1].x, planes[3].w);
+ color.xyz = clamp(color.xyz * ucolorSpaceMatrix_Stage1_c0_c0 + ucolorSpaceTranslate_Stage1_c0_c0, 0.0, 1.0);
+ color.xyz *= color.w;
+ _output = color;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = YUVtoRGBEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+uniform mat3 uCoordTransformMatrix_3_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+noperspective out vec2 vTransformedCoords_3_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_3_Stage0 = (uCoordTransformMatrix_3_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/22-75.shader_test b/shaders/skia/22-75.shader_test
new file mode 100644
index 0000000..ad71f6b
--- /dev/null
+++ b/shaders/skia/22-75.shader_test
@@ -0,0 +1,63 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform float ucontrast_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TextureEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ vec4 color = output_Stage1;
+ float nonZeroAlpha = max(color.w, 9.9999997473787516e-05);
+ color = vec4(color.xyz / nonZeroAlpha, nonZeroAlpha);
+ color.xyz = color.xyz * color.xyz;
+ float luma = dot(color, vec4(0.2125999927520752, 0.71520000696182251, 0.072200000286102295, 0.0));
+ color = vec4(luma, luma, luma, 0.0);
+ color = vec4(1.0, 1.0, 1.0, 1.0) - color;
+ if (ucontrast_Stage2 != 0.0) {
+ float m = (1.0 + ucontrast_Stage2) / (1.0 - ucontrast_Stage2);
+ float off = -0.5 * m + 0.5;
+ color = m * color + off;
+ }
+ color = clamp(color, 0.0, 1.0);
+ color.xyz = sqrt(color.xyz);
+ color.w = output_Stage1.w;
+ color.xyz *= color.w;
+ output_Stage2 = color;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/22-76.shader_test b/shaders/skia/22-76.shader_test
new file mode 100644
index 0000000..6cca38f
--- /dev/null
+++ b/shaders/skia/22-76.shader_test
@@ -0,0 +1,84 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ t.x = fract(t.x);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TiledGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/22-77.shader_test b/shaders/skia/22-77.shader_test
new file mode 100644
index 0000000..d0c5427
--- /dev/null
+++ b/shaders/skia/22-77.shader_test
@@ -0,0 +1,27 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+noperspective in vec4 vcolor_Stage0;
+void main() {
+ {
+ sk_FragColor = vec4(0.0);
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 position;
+in vec4 color;
+noperspective out vec4 vcolor_Stage0;
+void main() {
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/22-81.shader_test b/shaders/skia/22-81.shader_test
new file mode 100644
index 0000000..da50598
--- /dev/null
+++ b/shaders/skia/22-81.shader_test
@@ -0,0 +1,91 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 uscale01_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias01_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale23_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias23_Stage1_c0_c0_c1_c0;
+uniform float uthreshold_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 RadialGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = length(vTransformedCoords_0_Stage0);
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 DualIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthreshold_Stage1_c0_c0_c1_c0) {
+ scale = uscale01_Stage1_c0_c0_c1_c0;
+ bias = ubias01_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale23_Stage1_c0_c0_c1_c0;
+ bias = ubias23_Stage1_c0_c0_c1_c0;
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = RadialGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = DualIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_1_Stage0.x);
+ uint y = uint(vTransformedCoords_1_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ output_Stage2 = vec4(clamp(output_Stage2.xyz + value * 0.0039215688593685627, 0.0, output_Stage2.w), output_Stage2.w);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/22-83.shader_test b/shaders/skia/22-83.shader_test
new file mode 100644
index 0000000..bde25dd
--- /dev/null
+++ b/shaders/skia/22-83.shader_test
@@ -0,0 +1,116 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_0_Stage0;
+ float t = -1.0;
+ float v = 1.0;
+ {
+ {
+ float invR1 = ufocalParams_Stage1_c0_c0_c0_c0.x;
+ float x_t = -1.0;
+ {
+ float temp = p.x * p.x - p.y * p.y;
+ if (temp >= 0.0) {
+ {
+ x_t = sqrt(temp) - p.x * invR1;
+ }
+ }
+ }
+ {
+ if (x_t <= 0.0) {
+ v = -1.0;
+ }
+ }
+ {
+ {
+ t = x_t;
+ }
+ }
+ }
+ }
+ _output = vec4(t, v, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/22-85.shader_test b/shaders/skia/22-85.shader_test
new file mode 100644
index 0000000..d48c29b
--- /dev/null
+++ b/shaders/skia/22-85.shader_test
@@ -0,0 +1,102 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 RadialGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = length(vTransformedCoords_0_Stage0);
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = RadialGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TiledGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_1_Stage0.x);
+ uint y = uint(vTransformedCoords_1_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ output_Stage2 = vec4(clamp(output_Stage2.xyz + value * 0.0039215688593685627, 0.0, output_Stage2.w), output_Stage2.w);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/22-86.shader_test b/shaders/skia/22-86.shader_test
new file mode 100644
index 0000000..876c3e3
--- /dev/null
+++ b/shaders/skia/22-86.shader_test
@@ -0,0 +1,131 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_0_Stage0;
+ float t = -1.0;
+ float v = 1.0;
+ {
+ {
+ float invR1 = ufocalParams_Stage1_c0_c0_c0_c0.x;
+ float x_t = -1.0;
+ {
+ float temp = p.x * p.x - p.y * p.y;
+ if (temp >= 0.0) {
+ {
+ x_t = sqrt(temp) - p.x * invR1;
+ }
+ }
+ }
+ {
+ if (x_t <= 0.0) {
+ v = -1.0;
+ }
+ }
+ {
+ {
+ t = x_t;
+ }
+ }
+ }
+ }
+ _output = vec4(t, v, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TiledGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_1_Stage0.x);
+ uint y = uint(vTransformedCoords_1_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ output_Stage2 = vec4(clamp(output_Stage2.xyz + value * 0.0039215688593685627, 0.0, output_Stage2.w), output_Stage2.w);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/22-87.shader_test b/shaders/skia/22-87.shader_test
new file mode 100644
index 0000000..bc87dfa
--- /dev/null
+++ b/shaders/skia/22-87.shader_test
@@ -0,0 +1,121 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_0_Stage0;
+ float t = -1.0;
+ {
+ {
+ float invR1 = ufocalParams_Stage1_c0_c0_c0_c0.x;
+ float fx = ufocalParams_Stage1_c0_c0_c0_c0.y;
+ float x_t = -1.0;
+ {
+ x_t = length(p) - p.x * invR1;
+ }
+ {
+ {
+ t = x_t + fx;
+ }
+ }
+ }
+ }
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TiledGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_1_Stage0.x);
+ uint y = uint(vTransformedCoords_1_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ output_Stage2 = vec4(clamp(output_Stage2.xyz + value * 0.0039215688593685627, 0.0, output_Stage2.w), output_Stage2.w);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/22-88.shader_test b/shaders/skia/22-88.shader_test
new file mode 100644
index 0000000..9320fa9
--- /dev/null
+++ b/shaders/skia/22-88.shader_test
@@ -0,0 +1,100 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 RadialGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = length(vTransformedCoords_0_Stage0);
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = RadialGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ t.x = fract(t.x);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TiledGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_1_Stage0.x);
+ uint y = uint(vTransformedCoords_1_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ output_Stage2 = vec4(clamp(output_Stage2.xyz + value * 0.0039215688593685627, 0.0, output_Stage2.w), output_Stage2.w);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/22-89.shader_test b/shaders/skia/22-89.shader_test
new file mode 100644
index 0000000..3741184
--- /dev/null
+++ b/shaders/skia/22-89.shader_test
@@ -0,0 +1,129 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_0_Stage0;
+ float t = -1.0;
+ float v = 1.0;
+ {
+ {
+ float invR1 = ufocalParams_Stage1_c0_c0_c0_c0.x;
+ float x_t = -1.0;
+ {
+ float temp = p.x * p.x - p.y * p.y;
+ if (temp >= 0.0) {
+ {
+ x_t = sqrt(temp) - p.x * invR1;
+ }
+ }
+ }
+ {
+ if (x_t <= 0.0) {
+ v = -1.0;
+ }
+ }
+ {
+ {
+ t = x_t;
+ }
+ }
+ }
+ }
+ _output = vec4(t, v, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else {
+ {
+ t.x = fract(t.x);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TiledGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_1_Stage0.x);
+ uint y = uint(vTransformedCoords_1_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ output_Stage2 = vec4(clamp(output_Stage2.xyz + value * 0.0039215688593685627, 0.0, output_Stage2.w), output_Stage2.w);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/22-9.shader_test b/shaders/skia/22-9.shader_test
new file mode 100644
index 0000000..b9068b9
--- /dev/null
+++ b/shaders/skia/22-9.shader_test
@@ -0,0 +1,42 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 ucolor_Stage1;
+noperspective in vec4 vcolor_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ {
+ output_Stage1 = outputColor_Stage0 * ucolor_Stage1;
+ }
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 position;
+in vec4 inColor;
+noperspective out vec4 vcolor_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = position;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/22-90.shader_test b/shaders/skia/22-90.shader_test
new file mode 100644
index 0000000..88be299
--- /dev/null
+++ b/shaders/skia/22-90.shader_test
@@ -0,0 +1,119 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_0_Stage0;
+ float t = -1.0;
+ {
+ {
+ float invR1 = ufocalParams_Stage1_c0_c0_c0_c0.x;
+ float fx = ufocalParams_Stage1_c0_c0_c0_c0.y;
+ float x_t = -1.0;
+ {
+ x_t = length(p) - p.x * invR1;
+ }
+ {
+ {
+ t = x_t + fx;
+ }
+ }
+ }
+ }
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else {
+ {
+ t.x = fract(t.x);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TiledGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_1_Stage0.x);
+ uint y = uint(vTransformedCoords_1_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ output_Stage2 = vec4(clamp(output_Stage2.xyz + value * 0.0039215688593685627, 0.0, output_Stage2.w), output_Stage2.w);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/22-92.shader_test b/shaders/skia/22-92.shader_test
new file mode 100644
index 0000000..b89c605
--- /dev/null
+++ b/shaders/skia/22-92.shader_test
@@ -0,0 +1,132 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_0_Stage0;
+ float t = -1.0;
+ float v = 1.0;
+ {
+ {
+ float invR1 = ufocalParams_Stage1_c0_c0_c0_c0.x;
+ float x_t = -1.0;
+ {
+ float temp = p.x * p.x - p.y * p.y;
+ if (temp >= 0.0) {
+ {
+ x_t = sqrt(temp) - p.x * invR1;
+ }
+ }
+ }
+ {
+ if (x_t <= 0.0) {
+ v = -1.0;
+ }
+ }
+ {
+ {
+ t = x_t;
+ }
+ }
+ }
+ }
+ _output = vec4(t, v, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_1_Stage0.x);
+ uint y = uint(vTransformedCoords_1_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ output_Stage2 = vec4(clamp(output_Stage2.xyz + value * 0.0039215688593685627, 0.0, output_Stage2.w), output_Stage2.w);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/22-95.shader_test b/shaders/skia/22-95.shader_test
new file mode 100644
index 0000000..d712b7e
--- /dev/null
+++ b/shaders/skia/22-95.shader_test
@@ -0,0 +1,115 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform float ubias_Stage1_c0_c0_c0_c0;
+uniform float uscale_Stage1_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+in float vcoverage_Stage0;
+flat in vec4 vgeomDomain_Stage0;
+vec4 SweepGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float angle;
+ {
+ angle = atan(-vTransformedCoords_0_Stage0.y, -vTransformedCoords_0_Stage0.x);
+ }
+ float t = ((angle * 0.15915493667125702 + 0.5) + ubias_Stage1_c0_c0_c0_c0) * uscale_Stage1_c0_c0_c0_c0;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = SweepGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ float coverage = vcoverage_Stage0 * gl_FragCoord.w;
+ vec4 geoDomain;
+ geoDomain = vgeomDomain_Stage0;
+ if (coverage < 0.5) {
+ vec4 dists4 = clamp(vec4(1.0, 1.0, -1.0, -1.0) * (gl_FragCoord.xyxy - geoDomain), 0.0, 1.0);
+ vec2 dists2 = dists4.xy * dists4.zw;
+ coverage = min(coverage, dists2.x * dists2.y);
+ }
+ outputCoverage_Stage0 = vec4(coverage);
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1 * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec4 positionWithCoverage;
+in vec4 color;
+in vec2 localCoord;
+in vec4 geomDomain;
+out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+out float vcoverage_Stage0;
+flat out vec4 vgeomDomain_Stage0;
+void main() {
+ vec3 position = positionWithCoverage.xyz;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ vcoverage_Stage0 = positionWithCoverage.w * positionWithCoverage.z;
+ vgeomDomain_Stage0 = geomDomain;
+ gl_Position = vec4(position.x, position.y, 0.0, position.z);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/22-96.shader_test b/shaders/skia/22-96.shader_test
new file mode 100644
index 0000000..e361cdd
--- /dev/null
+++ b/shaders/skia/22-96.shader_test
@@ -0,0 +1,131 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform float ubias_Stage1_c0_c0_c0_c0;
+uniform float uscale_Stage1_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+in vec2 vTransformedCoords_0_Stage0;
+in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+in float vcoverage_Stage0;
+flat in vec4 vgeomDomain_Stage0;
+vec4 SweepGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float angle;
+ {
+ angle = atan(-vTransformedCoords_0_Stage0.y, -vTransformedCoords_0_Stage0.x);
+ }
+ float t = ((angle * 0.15915493667125702 + 0.5) + ubias_Stage1_c0_c0_c0_c0) * uscale_Stage1_c0_c0_c0_c0;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = SweepGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ float coverage = vcoverage_Stage0 * gl_FragCoord.w;
+ vec4 geoDomain;
+ geoDomain = vgeomDomain_Stage0;
+ if (coverage < 0.5) {
+ vec4 dists4 = clamp(vec4(1.0, 1.0, -1.0, -1.0) * (gl_FragCoord.xyxy - geoDomain), 0.0, 1.0);
+ vec2 dists2 = dists4.xy * dists4.zw;
+ coverage = min(coverage, dists2.x * dists2.y);
+ }
+ outputCoverage_Stage0 = vec4(coverage);
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_1_Stage0.x);
+ uint y = uint(vTransformedCoords_1_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ output_Stage2 = vec4(clamp(output_Stage2.xyz + value * 0.0039215688593685627, 0.0, output_Stage2.w), output_Stage2.w);
+ }
+ {
+ sk_FragColor = output_Stage2 * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec4 positionWithCoverage;
+in vec4 color;
+in vec2 localCoord;
+in vec4 geomDomain;
+out vec2 vTransformedCoords_0_Stage0;
+out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+out float vcoverage_Stage0;
+flat out vec4 vgeomDomain_Stage0;
+void main() {
+ vec3 position = positionWithCoverage.xyz;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ vcoverage_Stage0 = positionWithCoverage.w * positionWithCoverage.z;
+ vgeomDomain_Stage0 = geomDomain;
+ gl_Position = vec4(position.x, position.y, 0.0, position.z);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/22-97.shader_test b/shaders/skia/22-97.shader_test
new file mode 100644
index 0000000..cdeb955
--- /dev/null
+++ b/shaders/skia/22-97.shader_test
@@ -0,0 +1,94 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform float ubias_Stage1_c0_c0_c0_c0;
+uniform float uscale_Stage1_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+noperspective in vec3 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 SweepGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 vTransformedCoords_0_Stage0_ensure2D = vTransformedCoords_0_Stage0.xy / vTransformedCoords_0_Stage0.z;
+ float angle;
+ {
+ angle = atan(-vTransformedCoords_0_Stage0_ensure2D.y, -vTransformedCoords_0_Stage0_ensure2D.x);
+ }
+ float t = ((angle * 0.15915493667125702 + 0.5) + ubias_Stage1_c0_c0_c0_c0) * uscale_Stage1_c0_c0_c0_c0;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = SweepGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec3 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0);
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/22-98.shader_test b/shaders/skia/22-98.shader_test
new file mode 100644
index 0000000..09c93db
--- /dev/null
+++ b/shaders/skia/22-98.shader_test
@@ -0,0 +1,110 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform float ubias_Stage1_c0_c0_c0_c0;
+uniform float uscale_Stage1_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+noperspective in vec3 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 SweepGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 vTransformedCoords_0_Stage0_ensure2D = vTransformedCoords_0_Stage0.xy / vTransformedCoords_0_Stage0.z;
+ float angle;
+ {
+ angle = atan(-vTransformedCoords_0_Stage0_ensure2D.y, -vTransformedCoords_0_Stage0_ensure2D.x);
+ }
+ float t = ((angle * 0.15915493667125702 + 0.5) + ubias_Stage1_c0_c0_c0_c0) * uscale_Stage1_c0_c0_c0_c0;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = SweepGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_1_Stage0.x);
+ uint y = uint(vTransformedCoords_1_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ output_Stage2 = vec4(clamp(output_Stage2.xyz + value * 0.0039215688593685627, 0.0, output_Stage2.w), output_Stage2.w);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec3 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0);
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/22.shader_test b/shaders/skia/22.shader_test
new file mode 100644
index 0000000..515069d
--- /dev/null
+++ b/shaders/skia/22.shader_test
@@ -0,0 +1,90 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 usubset_Stage1_c0_c0_c0_c0;
+uniform vec4 uclamp_Stage1_c0_c0_c0_c0;
+uniform sampler2DRect uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0_c0_c0(vec4 _input, vec2 _coords) {
+ vec4 _output;
+ vec2 inCoord = _coords;
+ vec2 subsetCoord;
+ subsetCoord.x = mod(inCoord.x - usubset_Stage1_c0_c0_c0_c0.x, usubset_Stage1_c0_c0_c0_c0.z - usubset_Stage1_c0_c0_c0_c0.x) + usubset_Stage1_c0_c0_c0_c0.x;
+ {
+ float w = usubset_Stage1_c0_c0_c0_c0.w - usubset_Stage1_c0_c0_c0_c0.y;
+ float w2 = 2.0 * w;
+ float m = mod(inCoord.y - usubset_Stage1_c0_c0_c0_c0.y, w2);
+ subsetCoord.y = mix(m, w2 - m, step(w, m)) + usubset_Stage1_c0_c0_c0_c0.y;
+ }
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage1_c0_c0_c0_c0.x, uclamp_Stage1_c0_c0_c0_c0.z);
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage1_c0_c0_c0_c0.y, uclamp_Stage1_c0_c0_c0_c0.w);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ _output = _input * textureColor;
+ return _output;
+}
+vec4 Bicubic_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coord = vTransformedCoords_0_Stage0 - vec2(0.5);
+ vec2 f = fract(coord);
+ coord += 0.5 - f;
+ vec4 wx = mat4(0.055555555555555552, 0.88888888888888884, 0.055555555555555552, 0.0, -0.5, 0.0, 0.5, 0.0, 0.83333333333333337, -2.0, 1.5, -0.33333333333333331, -0.3888888888888889, 1.1666666666666667, -1.1666666666666667, 0.3888888888888889) * vec4(1.0, f.x, f.x * f.x, (f.x * f.x) * f.x);
+ vec4 wy = mat4(0.055555555555555552, 0.88888888888888884, 0.055555555555555552, 0.0, -0.5, 0.0, 0.5, 0.0, 0.83333333333333337, -2.0, 1.5, -0.33333333333333331, -0.3888888888888889, 1.1666666666666667, -1.1666666666666667, 0.3888888888888889) * vec4(1.0, f.y, f.y * f.y, (f.y * f.y) * f.y);
+ vec4 rowColors[4];
+ rowColors[0] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(-1.0, -1.0));
+ rowColors[1] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(0.0, -1.0));
+ rowColors[2] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(1.0, -1.0));
+ rowColors[3] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(2.0, -1.0));
+ vec4 s0 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ rowColors[0] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(-1.0, 0.0));
+ rowColors[1] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord);
+ rowColors[2] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(1.0, 0.0));
+ rowColors[3] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(2.0, 0.0));
+ vec4 s1 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ rowColors[0] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(-1.0, 1.0));
+ rowColors[1] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(0.0, 1.0));
+ rowColors[2] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(1.0, 1.0));
+ rowColors[3] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(2.0, 1.0));
+ vec4 s2 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ rowColors[0] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(-1.0, 2.0));
+ rowColors[1] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(0.0, 2.0));
+ rowColors[2] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(1.0, 2.0));
+ rowColors[3] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(2.0, 2.0));
+ vec4 s3 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ vec4 bicubicColor = ((wy.x * s0 + wy.y * s1) + wy.z * s2) + wy.w * s3;
+ bicubicColor = clamp(bicubicColor, 0.0, 1.0);
+ _output = bicubicColor * _input;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = Bicubic_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/220-2.shader_test b/shaders/skia/220-2.shader_test
new file mode 100644
index 0000000..e3cac06
--- /dev/null
+++ b/shaders/skia/220-2.shader_test
@@ -0,0 +1,92 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage2_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c1_c0;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+vec4 blend_plus(vec4 src, vec4 dst) {
+ return min(src + dst, 1.0);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_dst_in(outputColor_Stage0, ClampedGradientEffect_Stage1_c0_c0(vec4(1.0)));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_plus(ConstColorProcessor_Stage2_c1_c0(vec4(1.0)), output_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/220-3.shader_test b/shaders/skia/220-3.shader_test
new file mode 100644
index 0000000..ab7d4d5
--- /dev/null
+++ b/shaders/skia/220-3.shader_test
@@ -0,0 +1,191 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform float uSurfaceScale_Stage1;
+uniform vec3 uLightColor_Stage1;
+uniform float uKD_Stage1;
+uniform vec4 uTexDom_Stage1;
+uniform vec3 uDecalParams_Stage1;
+uniform vec3 uLightDirection_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 light_Stage1(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ float colorScale = uKD_Stage1 * dot(normal, surfaceToLight);
+ return vec4(lightColor * clamp(colorScale, 0.0, 1.0), 1.0);
+}
+float sobel_Stage1(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage1(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage1(float m[9], float surfaceScale) {
+ return pointToNormal_Stage1(sobel_Stage1(m[0], m[2], m[3], m[5], 0.0, 0.0, 0.33333298563957214), sobel_Stage1(m[0], m[3], m[1], m[4], m[2], m[5], 0.5), surfaceScale);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ vec2 coord = vTransformedCoords_0_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp0 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp5 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp6 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp7 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp8 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = uLightDirection_Stage1;
+ output_Stage1 = light_Stage1(normal_Stage1(m, uSurfaceScale_Stage1), surfaceToLight, uLightColor_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/220-4.shader_test b/shaders/skia/220-4.shader_test
new file mode 100644
index 0000000..1161756
--- /dev/null
+++ b/shaders/skia/220-4.shader_test
@@ -0,0 +1,492 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_KHR_blend_equation_advanced : require
+out vec4 sk_FragColor;
+layout (blend_support_all_equations) out ;
+uniform vec4 uColor_Stage0;
+uniform float ucornerRadius_Stage1_c0_c0;
+uniform vec4 uproxyRect_Stage1_c0_c0;
+uniform float ublurRadius_Stage1_c0_c0;
+uniform vec2 uImageIncrement_Stage2;
+uniform vec4 uKernel_Stage2[6];
+uniform vec2 uKernelOffset_Stage2;
+uniform float uGain_Stage2;
+uniform float uBias_Stage2;
+uniform vec4 uTexDom_Stage2;
+uniform vec3 uDecalParams_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 RRectBlurEffect_Stage1_c0_c0(vec4 _input, vec2 _coords) {
+ vec4 _output;
+ vec2 translatedFragPos = gl_FragCoord.xy - uproxyRect_Stage1_c0_c0.xy;
+ float threshold = ucornerRadius_Stage1_c0_c0 + 2.0 * ublurRadius_Stage1_c0_c0;
+ vec2 middle = (uproxyRect_Stage1_c0_c0.zw - uproxyRect_Stage1_c0_c0.xy) - 2.0 * threshold;
+ if (translatedFragPos.x >= threshold && translatedFragPos.x < middle.x + threshold) {
+ translatedFragPos.x = threshold;
+ } else if (translatedFragPos.x >= middle.x + threshold) {
+ translatedFragPos.x -= middle.x - 1.0;
+ }
+ if (translatedFragPos.y > threshold && translatedFragPos.y < middle.y + threshold) {
+ translatedFragPos.y = threshold;
+ } else if (translatedFragPos.y >= middle.y + threshold) {
+ translatedFragPos.y -= middle.y - 1.0;
+ }
+ vec2 proxyDims = vec2(2.0 * threshold + 1.0);
+ vec2 texCoord = translatedFragPos / proxyDims;
+ _output = _input * texture(uTextureSampler_0_Stage1, texCoord);
+ return _output;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = uColor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = RRectBlurEffect_Stage1_c0_c0(outputColor_Stage0, gl_FragCoord.xy);
+ }
+ vec4 output_Stage2;
+ {
+ vec4 sum = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0 - uKernelOffset_Stage2 * uImageIncrement_Stage2;
+ vec4 c;
+ {
+ float k = uKernel_Stage2[0].x;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[0].y;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[0].z;
+ {
+ vec2 origCoord = coord + vec2(2.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[0].w;
+ {
+ vec2 origCoord = coord + vec2(3.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[1].x;
+ {
+ vec2 origCoord = coord + vec2(4.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[1].y;
+ {
+ vec2 origCoord = coord + vec2(5.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[1].z;
+ {
+ vec2 origCoord = coord + vec2(6.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[1].w;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[2].x;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[2].y;
+ {
+ vec2 origCoord = coord + vec2(2.0, 1.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[2].z;
+ {
+ vec2 origCoord = coord + vec2(3.0, 1.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[2].w;
+ {
+ vec2 origCoord = coord + vec2(4.0, 1.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[3].x;
+ {
+ vec2 origCoord = coord + vec2(5.0, 1.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[3].y;
+ {
+ vec2 origCoord = coord + vec2(6.0, 1.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[3].z;
+ {
+ vec2 origCoord = coord + vec2(0.0, 2.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[3].w;
+ {
+ vec2 origCoord = coord + vec2(1.0, 2.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[4].x;
+ {
+ vec2 origCoord = coord + vec2(2.0, 2.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[4].y;
+ {
+ vec2 origCoord = coord + vec2(3.0, 2.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[4].z;
+ {
+ vec2 origCoord = coord + vec2(4.0, 2.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[4].w;
+ {
+ vec2 origCoord = coord + vec2(5.0, 2.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[5].x;
+ {
+ vec2 origCoord = coord + vec2(6.0, 2.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ vec2 origCoord = vTransformedCoords_0_Stage0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ output_Stage2.w = c.w;
+ output_Stage2.xyz = clamp(sum.xyz * uGain_Stage2 + uBias_Stage2, 0.0, 1.0);
+ output_Stage2.xyz *= output_Stage2.w;
+ }
+ {
+ sk_FragColor = output_Stage2 * output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/220-5.shader_test b/shaders/skia/220-5.shader_test
new file mode 100644
index 0000000..97e3a08
--- /dev/null
+++ b/shaders/skia/220-5.shader_test
@@ -0,0 +1,505 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage2;
+uniform vec4 uKernel_Stage2[6];
+uniform vec2 uKernelOffset_Stage2;
+uniform float uGain_Stage2;
+uniform float uBias_Stage2;
+uniform vec4 uTexDom_Stage2;
+uniform vec3 uDecalParams_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ vec4 sum = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_1_Stage0 - uKernelOffset_Stage2 * uImageIncrement_Stage2;
+ vec4 c;
+ {
+ float k = uKernel_Stage2[0].x;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[0].y;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[0].z;
+ {
+ vec2 origCoord = coord + vec2(2.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[0].w;
+ {
+ vec2 origCoord = coord + vec2(3.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[1].x;
+ {
+ vec2 origCoord = coord + vec2(4.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[1].y;
+ {
+ vec2 origCoord = coord + vec2(5.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[1].z;
+ {
+ vec2 origCoord = coord + vec2(6.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[1].w;
+ {
+ vec2 origCoord = coord + vec2(7.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[2].x;
+ {
+ vec2 origCoord = coord + vec2(8.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[2].y;
+ {
+ vec2 origCoord = coord + vec2(9.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[2].z;
+ {
+ vec2 origCoord = coord + vec2(10.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[2].w;
+ {
+ vec2 origCoord = coord + vec2(11.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[3].x;
+ {
+ vec2 origCoord = coord + vec2(12.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[3].y;
+ {
+ vec2 origCoord = coord + vec2(13.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[3].z;
+ {
+ vec2 origCoord = coord + vec2(14.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[3].w;
+ {
+ vec2 origCoord = coord + vec2(15.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[4].x;
+ {
+ vec2 origCoord = coord + vec2(16.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[4].y;
+ {
+ vec2 origCoord = coord + vec2(17.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[4].z;
+ {
+ vec2 origCoord = coord + vec2(18.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[4].w;
+ {
+ vec2 origCoord = coord + vec2(19.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[5].x;
+ {
+ vec2 origCoord = coord + vec2(20.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[5].y;
+ {
+ vec2 origCoord = coord + vec2(21.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[5].z;
+ {
+ vec2 origCoord = coord + vec2(22.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ vec2 origCoord = vTransformedCoords_1_Stage0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ output_Stage2.w = c.w;
+ output_Stage2.xyz = clamp(sum.xyz * uGain_Stage2 + uBias_Stage2, 0.0, 1.0);
+ output_Stage2.xyz *= output_Stage2.w;
+ output_Stage2 *= output_Stage1;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/220-6.shader_test b/shaders/skia/220-6.shader_test
new file mode 100644
index 0000000..b6a95e3
--- /dev/null
+++ b/shaders/skia/220-6.shader_test
@@ -0,0 +1,88 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 urectUniform_Stage2_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 ClampFragmentProcessor_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = clamp(_input, 0.0, 1.0);
+ }
+ return _output;
+}
+vec4 AARectEffect_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ float alpha;
+ {
+ float xSub, ySub;
+ xSub = min(gl_FragCoord.x - urectUniform_Stage2_c1_c0.x, 0.0);
+ xSub += min(urectUniform_Stage2_c1_c0.z - gl_FragCoord.x, 0.0);
+ ySub = min(gl_FragCoord.y - urectUniform_Stage2_c1_c0.y, 0.0);
+ ySub += min(urectUniform_Stage2_c1_c0.w - gl_FragCoord.y, 0.0);
+ alpha = (1.0 + max(xSub, -1.0)) * (1.0 + max(ySub, -1.0));
+ }
+ {
+ alpha = 1.0 - alpha;
+ }
+ _output = _input * alpha;
+ return _output;
+}
+float _blend_color_luminance(vec3 color) {
+ return dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), color);
+}
+vec3 _blend_set_color_luminance(vec3 hueSatColor, float alpha, vec3 lumColor) {
+ float lum = _blend_color_luminance(lumColor);
+ vec3 result = (lum - _blend_color_luminance(hueSatColor)) + hueSatColor;
+ float minComp = min(min(result.x, result.y), result.z);
+ float maxComp = max(max(result.x, result.y), result.z);
+ if (minComp < 0.0 && lum != minComp) {
+ result = lum + ((result - lum) * lum) / (lum - minComp);
+ }
+ if (maxComp > alpha && maxComp != lum) {
+ return lum + ((result - lum) * (alpha - lum)) / (maxComp - lum);
+ }
+ return result;
+}
+vec4 blend_color(vec4 src, vec4 dst) {
+ float alpha = dst.w * src.w;
+ vec3 sda = src.xyz * dst.w;
+ vec3 dsa = dst.xyz * src.w;
+ return vec4((((_blend_set_color_luminance(sda, alpha, dsa) + dst.xyz) - dsa) + src.xyz) - sda, (src.w + dst.w) - alpha);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ vec4 inputColor = vec4(output_Stage1.xyz, 1.0);
+ output_Stage2 = blend_color(ClampFragmentProcessor_Stage2_c0_c0(inputColor), AARectEffect_Stage2_c1_c0(inputColor));
+ output_Stage2 *= output_Stage1.w;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/220.shader_test b/shaders/skia/220.shader_test
new file mode 100644
index 0000000..8d89220
--- /dev/null
+++ b/shaders/skia/220.shader_test
@@ -0,0 +1,132 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.w) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ } else {
+ {
+ if (t < uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = OverrideInputFragmentProcessor_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 blend_src_atop(vec4 src, vec4 dst) {
+ return dst.w * src + (1.0 - src.w) * dst;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_src_atop(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 inColor;
+in vec2 inLocalCoord;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/2200.shader_test b/shaders/skia/2200.shader_test
new file mode 100644
index 0000000..68cd4d9
--- /dev/null
+++ b/shaders/skia/2200.shader_test
@@ -0,0 +1,59 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uColor_Stage0;
+uniform vec4 uCoordTransformMatrix_1_Stage0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 TextureEffect_Stage1_c0_c0_c0_c0(vec4 _input, vec2 _coords) {
+ _coords = _coords * uCoordTransformMatrix_1_Stage0.xz + uCoordTransformMatrix_1_Stage0.yw;
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, _coords) * _input;
+ return _output;
+}
+vec4 Bicubic_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ float coord = vTransformedCoords_0_Stage0.y - 0.5;
+ float f = fract(coord);
+ coord += 0.5 - f;
+ float f2 = f * f;
+ vec4 w = mat4(0.055555555555555552, 0.88888888888888884, 0.055555555555555552, 0.0, -0.5, 0.0, 0.5, 0.0, 0.83333333333333337, -2.0, 1.5, -0.33333333333333331, -0.3888888888888889, 1.1666666666666667, -1.1666666666666667, 0.3888888888888889) * vec4(1.0, f, f2, f2 * f);
+ vec4 c[4];
+ c[0] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), vec2(vTransformedCoords_0_Stage0.x, coord + -1.0));
+ c[1] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), vec2(vTransformedCoords_0_Stage0.x, coord));
+ c[2] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), vec2(vTransformedCoords_0_Stage0.x, coord + 1.0));
+ c[3] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), vec2(vTransformedCoords_0_Stage0.x, coord + 2.0));
+ vec4 bicubicColor = ((c[0] * w.x + c[1] * w.y) + c[2] * w.z) + c[3] * w.w;
+ bicubicColor.xyz = max(vec3(0.0), min(bicubicColor.xyz, bicubicColor.www));
+ _output = bicubicColor * _input;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = Bicubic_Stage1_c0_c0(vec4(1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec2 pos2 = (uViewM_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/2203.shader_test b/shaders/skia/2203.shader_test
new file mode 100644
index 0000000..39bdaf3
--- /dev/null
+++ b/shaders/skia/2203.shader_test
@@ -0,0 +1,63 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uColor_Stage0;
+uniform vec4 uCoordTransformMatrix_1_Stage0;
+uniform sampler2D uTextureSampler_0_Stage1;
+in vec2 vTransformedCoords_0_Stage0;
+vec4 TextureEffect_Stage1_c0_c0_c0_c0(vec4 _input, vec2 _coords) {
+ _coords = _coords * uCoordTransformMatrix_1_Stage0.xz + uCoordTransformMatrix_1_Stage0.yw;
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, _coords) * _input;
+ return _output;
+}
+vec4 Bicubic_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ float coord = vTransformedCoords_0_Stage0.y - 0.5;
+ float f = fract(coord);
+ coord += 0.5 - f;
+ float f2 = f * f;
+ vec4 w = mat4(0.055555555555555552, 0.88888888888888884, 0.055555555555555552, 0.0, -0.5, 0.0, 0.5, 0.0, 0.83333333333333337, -2.0, 1.5, -0.33333333333333331, -0.3888888888888889, 1.1666666666666667, -1.1666666666666667, 0.3888888888888889) * vec4(1.0, f, f2, f2 * f);
+ vec4 c[4];
+ c[0] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), vec2(vTransformedCoords_0_Stage0.x, coord + -1.0));
+ c[1] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), vec2(vTransformedCoords_0_Stage0.x, coord));
+ c[2] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), vec2(vTransformedCoords_0_Stage0.x, coord + 1.0));
+ c[3] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), vec2(vTransformedCoords_0_Stage0.x, coord + 2.0));
+ vec4 bicubicColor = ((c[0] * w.x + c[1] * w.y) + c[2] * w.z) + c[3] * w.w;
+ bicubicColor.xyz = max(vec3(0.0), min(bicubicColor.xyz, bicubicColor.www));
+ _output = bicubicColor * _input;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = Bicubic_Stage1_c0_c0(vec4(1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec3 pos3 = uViewM_Stage0 * vec3(inPosition, 1.0);
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ {
+ vec2 _posTmp = vec2(pos3.x / pos3.z, pos3.y / pos3.z);
+ _posTmp = floor(_posTmp) + vec2(0.5, 0.5);
+ gl_Position = vec4(_posTmp, 0.0, 1.0);
+ }
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/2206.shader_test b/shaders/skia/2206.shader_test
new file mode 100644
index 0000000..cbaf523
--- /dev/null
+++ b/shaders/skia/2206.shader_test
@@ -0,0 +1,57 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uCoordTransformMatrix_1_Stage0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 TextureEffect_Stage1_c0_c0_c0_c0(vec4 _input, vec2 _coords) {
+ _coords = _coords * uCoordTransformMatrix_1_Stage0.xz + uCoordTransformMatrix_1_Stage0.yw;
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, _coords) * _input;
+ return _output;
+}
+vec4 Bicubic_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ float coord = vTransformedCoords_0_Stage0.x - 0.5;
+ float f = fract(coord);
+ coord += 0.5 - f;
+ float f2 = f * f;
+ vec4 w = mat4(0.055555555555555552, 0.88888888888888884, 0.055555555555555552, 0.0, -0.5, 0.0, 0.5, 0.0, 0.83333333333333337, -2.0, 1.5, -0.33333333333333331, -0.3888888888888889, 1.1666666666666667, -1.1666666666666667, 0.3888888888888889) * vec4(1.0, f, f2, f2 * f);
+ vec4 c[4];
+ c[0] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), vec2(coord + -1.0, vTransformedCoords_0_Stage0.y));
+ c[1] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), vec2(coord, vTransformedCoords_0_Stage0.y));
+ c[2] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), vec2(coord + 1.0, vTransformedCoords_0_Stage0.y));
+ c[3] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), vec2(coord + 2.0, vTransformedCoords_0_Stage0.y));
+ vec4 bicubicColor = ((c[0] * w.x + c[1] * w.y) + c[2] * w.z) + c[3] * w.w;
+ bicubicColor.xyz = max(vec3(0.0), min(bicubicColor.xyz, bicubicColor.www));
+ _output = bicubicColor * _input;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = Bicubic_Stage1_c0_c0(vec4(1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/2209.shader_test b/shaders/skia/2209.shader_test
new file mode 100644
index 0000000..ac722c0
--- /dev/null
+++ b/shaders/skia/2209.shader_test
@@ -0,0 +1,114 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uCoordTransformMatrix_1_Stage0;
+uniform vec4 usubset_Stage1_c0_c0_c0_c0;
+uniform vec4 uclamp_Stage1_c0_c0_c0_c0;
+uniform vec2 uDstTextureUpperLeft_Stage2;
+uniform vec2 uDstTextureCoordScale_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uDstTextureSampler_Stage2;
+noperspective in vec4 vQuadEdge_Stage0;
+noperspective in vec4 vinColor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 TextureEffect_Stage1_c0_c0_c0_c0(vec4 _input, vec2 _coords) {
+ _coords = _coords * uCoordTransformMatrix_1_Stage0.xz + uCoordTransformMatrix_1_Stage0.yw;
+ vec4 _output;
+ vec2 inCoord = _coords;
+ vec2 subsetCoord;
+ {
+ float w = usubset_Stage1_c0_c0_c0_c0.z - usubset_Stage1_c0_c0_c0_c0.x;
+ float w2 = 2.0 * w;
+ float m = mod(inCoord.x - usubset_Stage1_c0_c0_c0_c0.x, w2);
+ subsetCoord.x = mix(m, w2 - m, step(w, m)) + usubset_Stage1_c0_c0_c0_c0.x;
+ }
+ {
+ float w = usubset_Stage1_c0_c0_c0_c0.w - usubset_Stage1_c0_c0_c0_c0.y;
+ float w2 = 2.0 * w;
+ float m = mod(inCoord.y - usubset_Stage1_c0_c0_c0_c0.y, w2);
+ subsetCoord.y = mix(m, w2 - m, step(w, m)) + usubset_Stage1_c0_c0_c0_c0.y;
+ }
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage1_c0_c0_c0_c0.x, uclamp_Stage1_c0_c0_c0_c0.z);
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage1_c0_c0_c0_c0.y, uclamp_Stage1_c0_c0_c0_c0.w);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ _output = _input * textureColor;
+ return _output;
+}
+vec4 Bicubic_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ float coord = vTransformedCoords_0_Stage0.y - 0.5;
+ float f = fract(coord);
+ coord += 0.5 - f;
+ float f2 = f * f;
+ vec4 w = mat4(0.055555555555555552, 0.88888888888888884, 0.055555555555555552, 0.0, -0.5, 0.0, 0.5, 0.0, 0.83333333333333337, -2.0, 1.5, -0.33333333333333331, -0.3888888888888889, 1.1666666666666667, -1.1666666666666667, 0.3888888888888889) * vec4(1.0, f, f2, f2 * f);
+ vec4 c[4];
+ c[0] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), vec2(vTransformedCoords_0_Stage0.x, coord + -1.0));
+ c[1] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), vec2(vTransformedCoords_0_Stage0.x, coord));
+ c[2] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), vec2(vTransformedCoords_0_Stage0.x, coord + 1.0));
+ c[3] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), vec2(vTransformedCoords_0_Stage0.x, coord + 2.0));
+ vec4 bicubicColor = ((c[0] * w.x + c[1] * w.y) + c[2] * w.z) + c[3] * w.w;
+ bicubicColor.xyz = max(vec3(0.0), min(bicubicColor.xyz, bicubicColor.www));
+ _output = bicubicColor * _input;
+ return _output;
+}
+vec4 blend_src(vec4 src, vec4 dst) {
+ return src;
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ float edgeAlpha;
+ vec2 duvdx = dFdx(vQuadEdge_Stage0.xy);
+ vec2 duvdy = -dFdy(vQuadEdge_Stage0.xy);
+ if (vQuadEdge_Stage0.z > 0.0 && vQuadEdge_Stage0.w > 0.0) {
+ edgeAlpha = min(min(vQuadEdge_Stage0.z, vQuadEdge_Stage0.w) + 0.5, 1.0);
+ } else {
+ vec2 gF = vec2((2.0 * vQuadEdge_Stage0.x) * duvdx.x - duvdx.y, (2.0 * vQuadEdge_Stage0.x) * duvdy.x - duvdy.y);
+ edgeAlpha = vQuadEdge_Stage0.x * vQuadEdge_Stage0.x - vQuadEdge_Stage0.y;
+ edgeAlpha = clamp(0.5 - edgeAlpha / length(gF), 0.0, 1.0);
+ }
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = Bicubic_Stage1_c0_c0(vec4(1.0));
+ }
+ {
+ if (all(lessThanEqual(outputCoverage_Stage0.xyz, vec3(0.0)))) {
+ discard;
+ }
+ vec2 _dstTexCoord = (gl_FragCoord.xy - uDstTextureUpperLeft_Stage2) * uDstTextureCoordScale_Stage2;
+ _dstTexCoord.y = 1.0 - _dstTexCoord.y;
+ vec4 _dstColor = texture(uDstTextureSampler_Stage2, _dstTexCoord);
+ sk_FragColor = blend_src(output_Stage1, _dstColor);
+ sk_FragColor = outputCoverage_Stage0 * sk_FragColor + (vec4(1.0) - outputCoverage_Stage0) * _dstColor;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec4 inQuadEdge;
+noperspective out vec4 vQuadEdge_Stage0;
+noperspective out vec4 vinColor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vQuadEdge_Stage0 = inQuadEdge;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/2212.shader_test b/shaders/skia/2212.shader_test
new file mode 100644
index 0000000..a87f451
--- /dev/null
+++ b/shaders/skia/2212.shader_test
@@ -0,0 +1,84 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec3 uedges_Stage1_c0_c0[3];
+uniform vec2 uDstTextureUpperLeft_Stage2;
+uniform vec2 uDstTextureCoordScale_Stage2;
+uniform sampler2D uDstTextureSampler_Stage2;
+noperspective in vec2 vEllipseOffsets_Stage0;
+noperspective in vec4 vEllipseRadii_Stage0;
+noperspective in vec4 vinColor_Stage0;
+vec4 ConvexPoly_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ float alpha = 1.0;
+ float edge;
+ edge = dot(uedges_Stage1_c0_c0[0], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage1_c0_c0[1], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage1_c0_c0[2], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ alpha = 1.0 - alpha;
+ _output = _input * alpha;
+ return _output;
+}
+vec4 blend_src(vec4 src, vec4 dst) {
+ return src;
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ vec2 offset = vEllipseOffsets_Stage0;
+ float test = dot(offset, offset) - 1.0;
+ vec2 grad = (2.0 * offset) * vEllipseRadii_Stage0.xy;
+ float grad_dot = dot(grad, grad);
+ grad_dot = max(grad_dot, 1.1754999560161448e-38);
+ float invlen = inversesqrt(grad_dot);
+ float edgeAlpha = clamp(0.5 - test * invlen, 0.0, 1.0);
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ConvexPoly_Stage1_c0_c0(vec4(1.0));
+ }
+ {
+ if (all(lessThanEqual(outputCoverage_Stage0.xyz, vec3(0.0)))) {
+ discard;
+ }
+ vec2 _dstTexCoord = (gl_FragCoord.xy - uDstTextureUpperLeft_Stage2) * uDstTextureCoordScale_Stage2;
+ _dstTexCoord.y = 1.0 - _dstTexCoord.y;
+ vec4 _dstColor = texture(uDstTextureSampler_Stage2, _dstTexCoord);
+ sk_FragColor = blend_src(output_Stage1, _dstColor);
+ sk_FragColor = outputCoverage_Stage0 * sk_FragColor + (vec4(1.0) - outputCoverage_Stage0) * _dstColor;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 inPosition;
+in vec4 inColor;
+in vec2 inEllipseOffset;
+in vec4 inEllipseRadii;
+noperspective out vec2 vEllipseOffsets_Stage0;
+noperspective out vec4 vEllipseRadii_Stage0;
+noperspective out vec4 vinColor_Stage0;
+void main() {
+ vEllipseOffsets_Stage0 = inEllipseOffset;
+ vEllipseRadii_Stage0 = inEllipseRadii;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = inPosition;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/2215.shader_test b/shaders/skia/2215.shader_test
new file mode 100644
index 0000000..45222dc
--- /dev/null
+++ b/shaders/skia/2215.shader_test
@@ -0,0 +1,75 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec3 uedges_Stage1_c0_c0[3];
+uniform vec2 uDstTextureUpperLeft_Stage2;
+uniform vec2 uDstTextureCoordScale_Stage2;
+uniform sampler2D uDstTextureSampler_Stage2;
+noperspective in vec4 vcolor_Stage0;
+noperspective in float vinCoverage_Stage0;
+vec4 ConvexPoly_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ float alpha = 1.0;
+ float edge;
+ edge = dot(uedges_Stage1_c0_c0[0], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage1_c0_c0[1], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage1_c0_c0[2], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ _output = _input * alpha;
+ return _output;
+}
+vec4 blend_src(vec4 src, vec4 dst) {
+ return src;
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ float alpha = 1.0;
+ alpha = vinCoverage_Stage0;
+ outputCoverage_Stage0 = vec4(alpha);
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ConvexPoly_Stage1_c0_c0(vec4(1.0));
+ }
+ {
+ if (all(lessThanEqual(outputCoverage_Stage0.xyz, vec3(0.0)))) {
+ discard;
+ }
+ vec2 _dstTexCoord = (gl_FragCoord.xy - uDstTextureUpperLeft_Stage2) * uDstTextureCoordScale_Stage2;
+ _dstTexCoord.y = 1.0 - _dstTexCoord.y;
+ vec4 _dstColor = texture(uDstTextureSampler_Stage2, _dstTexCoord);
+ sk_FragColor = blend_src(output_Stage1, _dstColor);
+ sk_FragColor = outputCoverage_Stage0 * sk_FragColor + (vec4(1.0) - outputCoverage_Stage0) * _dstColor;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 inPosition;
+in vec4 inColor;
+in float inCoverage;
+noperspective out vec4 vcolor_Stage0;
+noperspective out float vinCoverage_Stage0;
+void main() {
+ vec4 color = inColor;
+ vcolor_Stage0 = color;
+ vec2 pos2 = inPosition;
+ vinCoverage_Stage0 = inCoverage;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/2218.shader_test b/shaders/skia/2218.shader_test
new file mode 100644
index 0000000..bfd3e1a
--- /dev/null
+++ b/shaders/skia/2218.shader_test
@@ -0,0 +1,480 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1_c0_c0;
+uniform vec4 uKernel_Stage1_c0_c0[6];
+uniform vec2 uKernelOffset_Stage1_c0_c0;
+uniform float uGain_Stage1_c0_c0;
+uniform float uBias_Stage1_c0_c0;
+uniform vec4 uTexDom_Stage1_c0_c0;
+uniform vec3 uDecalParams_Stage1_c0_c0;
+uniform vec2 uDstTextureUpperLeft_Stage2;
+uniform vec2 uDstTextureCoordScale_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uDstTextureSampler_Stage2;
+noperspective in vec2 vEllipseOffsets_Stage0;
+noperspective in vec4 vEllipseRadii_Stage0;
+noperspective in vec4 vinColor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 MatrixConvolution_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 sum = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0 - uKernelOffset_Stage1_c0_c0 * uImageIncrement_Stage1_c0_c0;
+ vec4 c;
+ {
+ float k = uKernel_Stage1_c0_c0[0].x;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0.xy, uTexDom_Stage1_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0[0].y;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0.xy, uTexDom_Stage1_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0[0].z;
+ {
+ vec2 origCoord = coord + vec2(2.0, 0.0) * uImageIncrement_Stage1_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0.xy, uTexDom_Stage1_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0[0].w;
+ {
+ vec2 origCoord = coord + vec2(3.0, 0.0) * uImageIncrement_Stage1_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0.xy, uTexDom_Stage1_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0[1].x;
+ {
+ vec2 origCoord = coord + vec2(4.0, 0.0) * uImageIncrement_Stage1_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0.xy, uTexDom_Stage1_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0[1].y;
+ {
+ vec2 origCoord = coord + vec2(5.0, 0.0) * uImageIncrement_Stage1_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0.xy, uTexDom_Stage1_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0[1].z;
+ {
+ vec2 origCoord = coord + vec2(6.0, 0.0) * uImageIncrement_Stage1_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0.xy, uTexDom_Stage1_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0[1].w;
+ {
+ vec2 origCoord = coord + vec2(7.0, 0.0) * uImageIncrement_Stage1_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0.xy, uTexDom_Stage1_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0[2].x;
+ {
+ vec2 origCoord = coord + vec2(8.0, 0.0) * uImageIncrement_Stage1_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0.xy, uTexDom_Stage1_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0[2].y;
+ {
+ vec2 origCoord = coord + vec2(9.0, 0.0) * uImageIncrement_Stage1_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0.xy, uTexDom_Stage1_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0[2].z;
+ {
+ vec2 origCoord = coord + vec2(10.0, 0.0) * uImageIncrement_Stage1_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0.xy, uTexDom_Stage1_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0[2].w;
+ {
+ vec2 origCoord = coord + vec2(11.0, 0.0) * uImageIncrement_Stage1_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0.xy, uTexDom_Stage1_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0[3].x;
+ {
+ vec2 origCoord = coord + vec2(12.0, 0.0) * uImageIncrement_Stage1_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0.xy, uTexDom_Stage1_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0[3].y;
+ {
+ vec2 origCoord = coord + vec2(13.0, 0.0) * uImageIncrement_Stage1_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0.xy, uTexDom_Stage1_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0[3].z;
+ {
+ vec2 origCoord = coord + vec2(14.0, 0.0) * uImageIncrement_Stage1_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0.xy, uTexDom_Stage1_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0[3].w;
+ {
+ vec2 origCoord = coord + vec2(15.0, 0.0) * uImageIncrement_Stage1_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0.xy, uTexDom_Stage1_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0[4].x;
+ {
+ vec2 origCoord = coord + vec2(16.0, 0.0) * uImageIncrement_Stage1_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0.xy, uTexDom_Stage1_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0[4].y;
+ {
+ vec2 origCoord = coord + vec2(17.0, 0.0) * uImageIncrement_Stage1_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0.xy, uTexDom_Stage1_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0[4].z;
+ {
+ vec2 origCoord = coord + vec2(18.0, 0.0) * uImageIncrement_Stage1_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0.xy, uTexDom_Stage1_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0[4].w;
+ {
+ vec2 origCoord = coord + vec2(19.0, 0.0) * uImageIncrement_Stage1_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0.xy, uTexDom_Stage1_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0[5].x;
+ {
+ vec2 origCoord = coord + vec2(20.0, 0.0) * uImageIncrement_Stage1_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0.xy, uTexDom_Stage1_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0[5].y;
+ {
+ vec2 origCoord = coord + vec2(21.0, 0.0) * uImageIncrement_Stage1_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0.xy, uTexDom_Stage1_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0[5].z;
+ {
+ vec2 origCoord = coord + vec2(22.0, 0.0) * uImageIncrement_Stage1_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0.xy, uTexDom_Stage1_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ _output = sum * uGain_Stage1_c0_c0 + uBias_Stage1_c0_c0;
+ _output.w = clamp(_output.w, 0.0, 1.0);
+ _output.xyz = clamp(_output.xyz, 0.0, _output.w);
+ _output *= _input;
+ return _output;
+}
+vec4 blend_src(vec4 src, vec4 dst) {
+ return src;
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ vec2 offset = vEllipseOffsets_Stage0;
+ float test = dot(offset, offset) - 1.0;
+ vec2 grad = (2.0 * offset) * vEllipseRadii_Stage0.xy;
+ float grad_dot = dot(grad, grad);
+ grad_dot = max(grad_dot, 1.1754999560161448e-38);
+ float invlen = inversesqrt(grad_dot);
+ float edgeAlpha = clamp(0.5 - test * invlen, 0.0, 1.0);
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = MatrixConvolution_Stage1_c0_c0(vec4(1.0));
+ }
+ {
+ if (all(lessThanEqual(outputCoverage_Stage0.xyz, vec3(0.0)))) {
+ discard;
+ }
+ vec2 _dstTexCoord = (gl_FragCoord.xy - uDstTextureUpperLeft_Stage2) * uDstTextureCoordScale_Stage2;
+ _dstTexCoord.y = 1.0 - _dstTexCoord.y;
+ vec4 _dstColor = texture(uDstTextureSampler_Stage2, _dstTexCoord);
+ sk_FragColor = blend_src(output_Stage1, _dstColor);
+ sk_FragColor = outputCoverage_Stage0 * sk_FragColor + (vec4(1.0) - outputCoverage_Stage0) * _dstColor;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec2 inEllipseOffset;
+in vec4 inEllipseRadii;
+noperspective out vec2 vEllipseOffsets_Stage0;
+noperspective out vec4 vEllipseRadii_Stage0;
+noperspective out vec4 vinColor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vEllipseOffsets_Stage0 = inEllipseOffset;
+ vEllipseRadii_Stage0 = inEllipseRadii;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/2221.shader_test b/shaders/skia/2221.shader_test
new file mode 100644
index 0000000..b521944
--- /dev/null
+++ b/shaders/skia/2221.shader_test
@@ -0,0 +1,224 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1_c0_c0;
+uniform vec4 uKernel_Stage1_c0_c0[3];
+uniform vec2 uKernelOffset_Stage1_c0_c0;
+uniform float uGain_Stage1_c0_c0;
+uniform float uBias_Stage1_c0_c0;
+uniform vec4 uTexDom_Stage1_c0_c0;
+uniform vec2 uDstTextureUpperLeft_Stage2;
+uniform vec2 uDstTextureCoordScale_Stage2;
+uniform sampler2D uTextureSampler_0_Stage0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uDstTextureSampler_Stage2;
+noperspective in vec2 vTextureCoords_Stage0;
+flat in int vTexIndex_Stage0;
+noperspective in vec4 vinColor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 MatrixConvolution_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 sum = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0 - uKernelOffset_Stage1_c0_c0 * uImageIncrement_Stage1_c0_c0;
+ vec4 c;
+ {
+ float k = uKernel_Stage1_c0_c0[0].x;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0.xy, uTexDom_Stage1_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0[0].y;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0.xy, uTexDom_Stage1_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0[0].z;
+ {
+ vec2 origCoord = coord + vec2(2.0, 0.0) * uImageIncrement_Stage1_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0.xy, uTexDom_Stage1_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0[0].w;
+ {
+ vec2 origCoord = coord + vec2(3.0, 0.0) * uImageIncrement_Stage1_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0.xy, uTexDom_Stage1_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0[1].x;
+ {
+ vec2 origCoord = coord + vec2(4.0, 0.0) * uImageIncrement_Stage1_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0.xy, uTexDom_Stage1_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0[1].y;
+ {
+ vec2 origCoord = coord + vec2(5.0, 0.0) * uImageIncrement_Stage1_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0.xy, uTexDom_Stage1_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0[1].z;
+ {
+ vec2 origCoord = coord + vec2(6.0, 0.0) * uImageIncrement_Stage1_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0.xy, uTexDom_Stage1_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0[1].w;
+ {
+ vec2 origCoord = coord + vec2(7.0, 0.0) * uImageIncrement_Stage1_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0.xy, uTexDom_Stage1_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0[2].x;
+ {
+ vec2 origCoord = coord + vec2(8.0, 0.0) * uImageIncrement_Stage1_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0.xy, uTexDom_Stage1_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0[2].y;
+ {
+ vec2 origCoord = coord + vec2(9.0, 0.0) * uImageIncrement_Stage1_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0.xy, uTexDom_Stage1_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ vec2 origCoord = vTransformedCoords_0_Stage0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0.xy, uTexDom_Stage1_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ _output.w = c.w;
+ _output.xyz = clamp(sum.xyz * uGain_Stage1_c0_c0 + uBias_Stage1_c0_c0, 0.0, 1.0);
+ _output.xyz *= _output.w;
+ _output *= _input;
+ return _output;
+}
+vec4 blend_src(vec4 src, vec4 dst) {
+ return src;
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ vec4 texColor;
+ {
+ texColor = texture(uTextureSampler_0_Stage0, vTextureCoords_Stage0);
+ }
+ outputCoverage_Stage0 = texColor;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = MatrixConvolution_Stage1_c0_c0(vec4(1.0));
+ }
+ {
+ if (all(lessThanEqual(outputCoverage_Stage0.xyz, vec3(0.0)))) {
+ discard;
+ }
+ vec2 _dstTexCoord = (gl_FragCoord.xy - uDstTextureUpperLeft_Stage2) * uDstTextureCoordScale_Stage2;
+ _dstTexCoord.y = 1.0 - _dstTexCoord.y;
+ vec4 _dstColor = texture(uDstTextureSampler_Stage2, _dstTexCoord);
+ sk_FragColor = blend_src(output_Stage1, _dstColor);
+ sk_FragColor = outputCoverage_Stage0 * sk_FragColor + (vec4(1.0) - outputCoverage_Stage0) * _dstColor;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform vec2 uAtlasSizeInv_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in uvec2 inTextureCoords;
+noperspective out vec2 vTextureCoords_Stage0;
+flat out int vTexIndex_Stage0;
+noperspective out vec4 vinColor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ ivec2 signedCoords = ivec2(int(inTextureCoords.x), int(inTextureCoords.y));
+ vec2 unormTexCoords = vec2(float(signedCoords.x / 2), float(signedCoords.y / 2));
+ vTextureCoords_Stage0 = unormTexCoords * uAtlasSizeInv_Stage0;
+ vTexIndex_Stage0 = 0;
+ vinColor_Stage0 = inColor;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(inPosition.x, inPosition.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/2224.shader_test b/shaders/skia/2224.shader_test
new file mode 100644
index 0000000..06b3a7d
--- /dev/null
+++ b/shaders/skia/2224.shader_test
@@ -0,0 +1,46 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uinnerRect_Stage1_c0_c0;
+uniform vec2 uradiusPlusHalf_Stage1_c0_c0;
+noperspective in vec4 vcolor_Stage0;
+vec4 CircularRRect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 dxy0 = uinnerRect_Stage1_c0_c0.xy - gl_FragCoord.xy;
+ vec2 dxy1 = gl_FragCoord.xy - uinnerRect_Stage1_c0_c0.zw;
+ vec2 dxy = max(max(dxy0, dxy1), 0.0);
+ float alpha = clamp(uradiusPlusHalf_Stage1_c0_c0.x - length(dxy), 0.0, 1.0);
+ _output = _input * alpha;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = CircularRRect_Stage1_c0_c0(vec4(1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 inPosition;
+in vec4 inColor;
+noperspective out vec4 vcolor_Stage0;
+void main() {
+ vec4 color = inColor;
+ vcolor_Stage0 = color;
+ vec2 pos2 = inPosition;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/2227.shader_test b/shaders/skia/2227.shader_test
new file mode 100644
index 0000000..4c5ab2a
--- /dev/null
+++ b/shaders/skia/2227.shader_test
@@ -0,0 +1,48 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uinnerRect_Stage1_c0_c0;
+uniform vec2 uradiusPlusHalf_Stage1_c0_c0;
+noperspective in vec4 vcolor_Stage0;
+vec4 CircularRRect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 dxy0 = uinnerRect_Stage1_c0_c0.xy - gl_FragCoord.xy;
+ vec2 dxy1 = gl_FragCoord.xy - uinnerRect_Stage1_c0_c0.zw;
+ vec2 dxy = max(max(dxy0, dxy1), 0.0);
+ float alpha = clamp(uradiusPlusHalf_Stage1_c0_c0.x - length(dxy), 0.0, 1.0);
+ alpha = 1.0 - alpha;
+ _output = _input * alpha;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = CircularRRect_Stage1_c0_c0(vec4(1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+noperspective out vec4 vcolor_Stage0;
+void main() {
+ vec4 color = inColor;
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/223-2.shader_test b/shaders/skia/223-2.shader_test
new file mode 100644
index 0000000..30d3da5
--- /dev/null
+++ b/shaders/skia/223-2.shader_test
@@ -0,0 +1,75 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage2_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c1_c0;
+ }
+ return _output;
+}
+vec4 blend_modulate(vec4 src, vec4 dst) {
+ return src * dst;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_modulate(ConstColorProcessor_Stage2_c1_c0(vec4(1.0)), output_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/223-3.shader_test b/shaders/skia/223-3.shader_test
new file mode 100644
index 0000000..79dd9ab
--- /dev/null
+++ b/shaders/skia/223-3.shader_test
@@ -0,0 +1,191 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform float uSurfaceScale_Stage1;
+uniform vec3 uLightColor_Stage1;
+uniform float uKD_Stage1;
+uniform vec4 uTexDom_Stage1;
+uniform vec3 uDecalParams_Stage1;
+uniform vec3 uLightDirection_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 light_Stage1(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ float colorScale = uKD_Stage1 * dot(normal, surfaceToLight);
+ return vec4(lightColor * clamp(colorScale, 0.0, 1.0), 1.0);
+}
+float sobel_Stage1(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage1(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage1(float m[9], float surfaceScale) {
+ return pointToNormal_Stage1(sobel_Stage1(m[0], m[1], m[3], m[4], 0.0, 0.0, 0.66666698455810547), sobel_Stage1(m[0], m[3], m[1], m[4], 0.0, 0.0, 0.66666698455810547), surfaceScale);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ vec2 coord = vTransformedCoords_0_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp0 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp5 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp6 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp7 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp8 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = uLightDirection_Stage1;
+ output_Stage1 = light_Stage1(normal_Stage1(m, uSurfaceScale_Stage1), surfaceToLight, uLightColor_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/223-4.shader_test b/shaders/skia/223-4.shader_test
new file mode 100644
index 0000000..b8ed253
--- /dev/null
+++ b/shaders/skia/223-4.shader_test
@@ -0,0 +1,61 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+uniform float uPixelSize_Stage1;
+uniform vec2 uRange_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vEllipseOffsets_Stage0;
+noperspective in vec4 vEllipseRadii_Stage0;
+noperspective in vec4 vinColor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ vec2 offset = vEllipseOffsets_Stage0;
+ float test = dot(offset, offset) - 1.0;
+ vec2 grad = (2.0 * offset) * vEllipseRadii_Stage0.xy;
+ float grad_dot = dot(grad, grad);
+ grad_dot = max(grad_dot, 1.1754999560161448e-38);
+ float invlen = inversesqrt(grad_dot);
+ float edgeAlpha = clamp(0.5 - test * invlen, 0.0, 1.0);
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0;
+ coord.y -= uPixelSize_Stage1;
+ for (int i = 0;i < 3; i++) {
+ output_Stage1 = max(output_Stage1, texture(uTextureSampler_0_Stage1, coord));
+ coord.y += uPixelSize_Stage1;
+ }
+ output_Stage1 *= outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec2 inEllipseOffset;
+in vec4 inEllipseRadii;
+noperspective out vec2 vEllipseOffsets_Stage0;
+noperspective out vec4 vEllipseRadii_Stage0;
+noperspective out vec4 vinColor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vEllipseOffsets_Stage0 = inEllipseOffset;
+ vEllipseRadii_Stage0 = inEllipseRadii;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/223-5.shader_test b/shaders/skia/223-5.shader_test
new file mode 100644
index 0000000..c9ba74e
--- /dev/null
+++ b/shaders/skia/223-5.shader_test
@@ -0,0 +1,277 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage2;
+uniform vec4 uKernel_Stage2[3];
+uniform vec2 uKernelOffset_Stage2;
+uniform float uGain_Stage2;
+uniform float uBias_Stage2;
+uniform vec4 uTexDom_Stage2;
+uniform vec3 uDecalParams_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ vec4 sum = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_1_Stage0 - uKernelOffset_Stage2 * uImageIncrement_Stage2;
+ vec4 c;
+ {
+ float k = uKernel_Stage2[0].x;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[0].y;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[0].z;
+ {
+ vec2 origCoord = coord + vec2(2.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[0].w;
+ {
+ vec2 origCoord = coord + vec2(3.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[1].x;
+ {
+ vec2 origCoord = coord + vec2(4.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[1].y;
+ {
+ vec2 origCoord = coord + vec2(5.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[1].z;
+ {
+ vec2 origCoord = coord + vec2(6.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[1].w;
+ {
+ vec2 origCoord = coord + vec2(7.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[2].x;
+ {
+ vec2 origCoord = coord + vec2(8.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[2].y;
+ {
+ vec2 origCoord = coord + vec2(9.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[2].z;
+ {
+ vec2 origCoord = coord + vec2(10.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ vec2 origCoord = vTransformedCoords_1_Stage0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ output_Stage2.w = c.w;
+ output_Stage2.xyz = clamp(sum.xyz * uGain_Stage2 + uBias_Stage2, 0.0, 1.0);
+ output_Stage2.xyz *= output_Stage2.w;
+ output_Stage2 *= output_Stage1;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/223.shader_test b/shaders/skia/223.shader_test
new file mode 100644
index 0000000..d6470c4
--- /dev/null
+++ b/shaders/skia/223.shader_test
@@ -0,0 +1,61 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 ucolor_Stage1_c0_c0_c0_c0;
+noperspective in vec4 vcolor_Stage0;
+vec4 ConstColorProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = _input.w * ucolor_Stage1_c0_c0_c0_c0;
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = ConstColorProcessor_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 blend_src_atop(vec4 src, vec4 dst) {
+ return dst.w * src + (1.0 - src.w) * dst;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_src_atop(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 position;
+in vec4 inColor;
+noperspective out vec4 vcolor_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/2230.shader_test b/shaders/skia/2230.shader_test
new file mode 100644
index 0000000..a53c6c3
--- /dev/null
+++ b/shaders/skia/2230.shader_test
@@ -0,0 +1,45 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uColor_Stage0;
+uniform vec4 uinnerRect_Stage1_c0_c0;
+uniform vec2 uradiusPlusHalf_Stage1_c0_c0;
+vec4 CircularRRect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 dxy0 = uinnerRect_Stage1_c0_c0.xy - gl_FragCoord.xy;
+ vec2 dxy1 = gl_FragCoord.xy - uinnerRect_Stage1_c0_c0.zw;
+ vec2 dxy = max(max(dxy0, dxy1), 0.0);
+ float alpha = clamp(uradiusPlusHalf_Stage1_c0_c0.x - length(dxy), 0.0, 1.0);
+ alpha = 1.0 - alpha;
+ _output = _input * alpha;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = CircularRRect_Stage1_c0_c0(vec4(1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 inPosition;
+in vec2 inLocalCoord;
+void main() {
+ vec2 pos2 = (uViewM_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/2233.shader_test b/shaders/skia/2233.shader_test
new file mode 100644
index 0000000..b6e35b1
--- /dev/null
+++ b/shaders/skia/2233.shader_test
@@ -0,0 +1,80 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uinnerRect_Stage1_c0_c0;
+uniform vec2 uradiusPlusHalf_Stage1_c0_c0;
+uniform vec2 uDstTextureUpperLeft_Stage2;
+uniform vec2 uDstTextureCoordScale_Stage2;
+uniform sampler2D uDstTextureSampler_Stage2;
+in vec2 vEllipseOffsets0_Stage0;
+in vec2 vEllipseOffsets1_Stage0;
+in vec4 vinColor_Stage0;
+vec4 CircularRRect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 dxy0 = uinnerRect_Stage1_c0_c0.xy - gl_FragCoord.xy;
+ vec2 dxy1 = gl_FragCoord.xy - uinnerRect_Stage1_c0_c0.zw;
+ vec2 dxy = max(max(dxy0, dxy1), 0.0);
+ float alpha = clamp(uradiusPlusHalf_Stage1_c0_c0.x - length(dxy), 0.0, 1.0);
+ _output = _input * alpha;
+ return _output;
+}
+vec4 blend_src(vec4 src, vec4 dst) {
+ return src;
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ vec2 scaledOffset = vEllipseOffsets0_Stage0;
+ float test = dot(scaledOffset, scaledOffset) - 1.0;
+ vec2 duvdx = dFdx(vEllipseOffsets0_Stage0);
+ vec2 duvdy = -dFdy(vEllipseOffsets0_Stage0);
+ vec2 grad = vec2(vEllipseOffsets0_Stage0.x * duvdx.x + vEllipseOffsets0_Stage0.y * duvdx.y, vEllipseOffsets0_Stage0.x * duvdy.x + vEllipseOffsets0_Stage0.y * duvdy.y);
+ float grad_dot = 4.0 * dot(grad, grad);
+ grad_dot = max(grad_dot, 1.1754999560161448e-38);
+ float invlen = inversesqrt(grad_dot);
+ float edgeAlpha = clamp(0.5 - test * invlen, 0.0, 1.0);
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = CircularRRect_Stage1_c0_c0(vec4(1.0));
+ }
+ {
+ if (all(lessThanEqual(outputCoverage_Stage0.xyz, vec3(0.0)))) {
+ discard;
+ }
+ vec2 _dstTexCoord = (gl_FragCoord.xy - uDstTextureUpperLeft_Stage2) * uDstTextureCoordScale_Stage2;
+ _dstTexCoord.y = 1.0 - _dstTexCoord.y;
+ vec4 _dstColor = texture(uDstTextureSampler_Stage2, _dstTexCoord);
+ sk_FragColor = blend_src(output_Stage1, _dstColor);
+ sk_FragColor = outputCoverage_Stage0 * sk_FragColor + (vec4(1.0) - outputCoverage_Stage0) * _dstColor;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec2 inEllipseOffsets0;
+in vec2 inEllipseOffsets1;
+out vec2 vEllipseOffsets0_Stage0;
+out vec2 vEllipseOffsets1_Stage0;
+out vec4 vinColor_Stage0;
+void main() {
+ vEllipseOffsets0_Stage0 = inEllipseOffsets0;
+ vEllipseOffsets1_Stage0 = inEllipseOffsets1;
+ vinColor_Stage0 = inColor;
+ vec3 pos3 = uViewM_Stage0 * vec3(inPosition, 1.0);
+ gl_Position = vec4(pos3.x, pos3.y, 0.0, pos3.z);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/2236.shader_test b/shaders/skia/2236.shader_test
new file mode 100644
index 0000000..c174383
--- /dev/null
+++ b/shaders/skia/2236.shader_test
@@ -0,0 +1,84 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uinnerRect_Stage1_c0_c0;
+uniform vec4 uinvRadiiLTRB_Stage1_c0_c0;
+uniform vec2 uDstTextureUpperLeft_Stage2;
+uniform vec2 uDstTextureCoordScale_Stage2;
+uniform sampler2D uDstTextureSampler_Stage2;
+noperspective in vec2 vEllipseOffsets0_Stage0;
+noperspective in vec2 vEllipseOffsets1_Stage0;
+noperspective in vec4 vinColor_Stage0;
+vec4 EllipticalRRect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 dxy0 = uinnerRect_Stage1_c0_c0.xy - gl_FragCoord.xy;
+ vec2 dxy1 = gl_FragCoord.xy - uinnerRect_Stage1_c0_c0.zw;
+ vec2 dxy = max(max(dxy0, dxy1), 0.0);
+ vec2 Z = max(max(dxy0 * uinvRadiiLTRB_Stage1_c0_c0.xy, dxy1 * uinvRadiiLTRB_Stage1_c0_c0.zw), 0.0);
+ float implicit = dot(Z, dxy) - 1.0;
+ float grad_dot = 4.0 * dot(Z, Z);
+ grad_dot = max(grad_dot, 9.9999997473787516e-05);
+ float approx_dist = implicit * inversesqrt(grad_dot);
+ float alpha = clamp(0.5 + approx_dist, 0.0, 1.0);
+ _output = _input * alpha;
+ return _output;
+}
+vec4 blend_src(vec4 src, vec4 dst) {
+ return src;
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ vec2 scaledOffset = vEllipseOffsets0_Stage0;
+ float test = dot(scaledOffset, scaledOffset) - 1.0;
+ vec2 duvdx = dFdx(vEllipseOffsets0_Stage0);
+ vec2 duvdy = -dFdy(vEllipseOffsets0_Stage0);
+ vec2 grad = vec2(vEllipseOffsets0_Stage0.x * duvdx.x + vEllipseOffsets0_Stage0.y * duvdx.y, vEllipseOffsets0_Stage0.x * duvdy.x + vEllipseOffsets0_Stage0.y * duvdy.y);
+ float grad_dot = 4.0 * dot(grad, grad);
+ grad_dot = max(grad_dot, 1.1754999560161448e-38);
+ float invlen = inversesqrt(grad_dot);
+ float edgeAlpha = clamp(0.5 - test * invlen, 0.0, 1.0);
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = EllipticalRRect_Stage1_c0_c0(vec4(1.0));
+ }
+ {
+ if (all(lessThanEqual(outputCoverage_Stage0.xyz, vec3(0.0)))) {
+ discard;
+ }
+ vec2 _dstTexCoord = (gl_FragCoord.xy - uDstTextureUpperLeft_Stage2) * uDstTextureCoordScale_Stage2;
+ _dstTexCoord.y = 1.0 - _dstTexCoord.y;
+ vec4 _dstColor = texture(uDstTextureSampler_Stage2, _dstTexCoord);
+ sk_FragColor = blend_src(output_Stage1, _dstColor);
+ sk_FragColor = outputCoverage_Stage0 * sk_FragColor + (vec4(1.0) - outputCoverage_Stage0) * _dstColor;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 inPosition;
+in vec4 inColor;
+in vec2 inEllipseOffsets0;
+in vec2 inEllipseOffsets1;
+noperspective out vec2 vEllipseOffsets0_Stage0;
+noperspective out vec2 vEllipseOffsets1_Stage0;
+noperspective out vec4 vinColor_Stage0;
+void main() {
+ vEllipseOffsets0_Stage0 = inEllipseOffsets0;
+ vEllipseOffsets1_Stage0 = inEllipseOffsets1;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = inPosition;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/2239.shader_test b/shaders/skia/2239.shader_test
new file mode 100644
index 0000000..2222073
--- /dev/null
+++ b/shaders/skia/2239.shader_test
@@ -0,0 +1,81 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uinnerRect_Stage1_c0_c0;
+uniform vec4 uinvRadiiLTRB_Stage1_c0_c0;
+uniform vec2 uDstTextureUpperLeft_Stage2;
+uniform vec2 uDstTextureCoordScale_Stage2;
+uniform sampler2D uTextureSampler_0_Stage0;
+uniform sampler2D uDstTextureSampler_Stage2;
+noperspective in vec2 vTextureCoords_Stage0;
+flat in int vTexIndex_Stage0;
+noperspective in vec4 vinColor_Stage0;
+vec4 EllipticalRRect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 dxy0 = uinnerRect_Stage1_c0_c0.xy - gl_FragCoord.xy;
+ vec2 dxy1 = gl_FragCoord.xy - uinnerRect_Stage1_c0_c0.zw;
+ vec2 dxy = max(max(dxy0, dxy1), 0.0);
+ vec2 Z = max(max(dxy0 * uinvRadiiLTRB_Stage1_c0_c0.xy, dxy1 * uinvRadiiLTRB_Stage1_c0_c0.zw), 0.0);
+ float implicit = dot(Z, dxy) - 1.0;
+ float grad_dot = 4.0 * dot(Z, Z);
+ grad_dot = max(grad_dot, 9.9999997473787516e-05);
+ float approx_dist = implicit * inversesqrt(grad_dot);
+ float alpha = clamp(0.5 + approx_dist, 0.0, 1.0);
+ _output = _input * alpha;
+ return _output;
+}
+vec4 blend_src(vec4 src, vec4 dst) {
+ return src;
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ vec4 texColor;
+ {
+ texColor = texture(uTextureSampler_0_Stage0, vTextureCoords_Stage0);
+ }
+ outputCoverage_Stage0 = texColor;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = EllipticalRRect_Stage1_c0_c0(vec4(1.0));
+ }
+ {
+ if (all(lessThanEqual(outputCoverage_Stage0.xyz, vec3(0.0)))) {
+ discard;
+ }
+ vec2 _dstTexCoord = (gl_FragCoord.xy - uDstTextureUpperLeft_Stage2) * uDstTextureCoordScale_Stage2;
+ _dstTexCoord.y = 1.0 - _dstTexCoord.y;
+ vec4 _dstColor = texture(uDstTextureSampler_Stage2, _dstTexCoord);
+ sk_FragColor = blend_src(output_Stage1, _dstColor);
+ sk_FragColor = outputCoverage_Stage0 * sk_FragColor + (vec4(1.0) - outputCoverage_Stage0) * _dstColor;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform vec2 uAtlasSizeInv_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in uvec2 inTextureCoords;
+noperspective out vec2 vTextureCoords_Stage0;
+flat out int vTexIndex_Stage0;
+noperspective out vec4 vinColor_Stage0;
+void main() {
+ ivec2 signedCoords = ivec2(int(inTextureCoords.x), int(inTextureCoords.y));
+ vec2 unormTexCoords = vec2(float(signedCoords.x / 2), float(signedCoords.y / 2));
+ vTextureCoords_Stage0 = unormTexCoords * uAtlasSizeInv_Stage0;
+ vTexIndex_Stage0 = 0;
+ vinColor_Stage0 = inColor;
+ gl_Position = vec4(inPosition.x, inPosition.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/2242.shader_test b/shaders/skia/2242.shader_test
new file mode 100644
index 0000000..066d490
--- /dev/null
+++ b/shaders/skia/2242.shader_test
@@ -0,0 +1,82 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uinnerRect_Stage1_c0_c0;
+uniform vec4 uinvRadiiLTRB_Stage1_c0_c0;
+uniform vec2 uDstTextureUpperLeft_Stage2;
+uniform vec2 uDstTextureCoordScale_Stage2;
+uniform sampler2D uDstTextureSampler_Stage2;
+noperspective in vec2 vEllipseOffsets_Stage0;
+noperspective in vec4 vEllipseRadii_Stage0;
+noperspective in vec4 vinColor_Stage0;
+vec4 EllipticalRRect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 dxy0 = uinnerRect_Stage1_c0_c0.xy - gl_FragCoord.xy;
+ vec2 dxy1 = gl_FragCoord.xy - uinnerRect_Stage1_c0_c0.zw;
+ vec2 dxy = max(max(dxy0, dxy1), 0.0);
+ vec2 Z = max(max(dxy0 * uinvRadiiLTRB_Stage1_c0_c0.xy, dxy1 * uinvRadiiLTRB_Stage1_c0_c0.zw), 0.0);
+ float implicit = dot(Z, dxy) - 1.0;
+ float grad_dot = 4.0 * dot(Z, Z);
+ grad_dot = max(grad_dot, 9.9999997473787516e-05);
+ float approx_dist = implicit * inversesqrt(grad_dot);
+ float alpha = clamp(0.5 - approx_dist, 0.0, 1.0);
+ _output = _input * alpha;
+ return _output;
+}
+vec4 blend_src(vec4 src, vec4 dst) {
+ return src;
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ vec2 offset = vEllipseOffsets_Stage0;
+ float test = dot(offset, offset) - 1.0;
+ vec2 grad = (2.0 * offset) * vEllipseRadii_Stage0.xy;
+ float grad_dot = dot(grad, grad);
+ grad_dot = max(grad_dot, 1.1754999560161448e-38);
+ float invlen = inversesqrt(grad_dot);
+ float edgeAlpha = clamp(0.5 - test * invlen, 0.0, 1.0);
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = EllipticalRRect_Stage1_c0_c0(vec4(1.0));
+ }
+ {
+ if (all(lessThanEqual(outputCoverage_Stage0.xyz, vec3(0.0)))) {
+ discard;
+ }
+ vec2 _dstTexCoord = (gl_FragCoord.xy - uDstTextureUpperLeft_Stage2) * uDstTextureCoordScale_Stage2;
+ _dstTexCoord.y = 1.0 - _dstTexCoord.y;
+ vec4 _dstColor = texture(uDstTextureSampler_Stage2, _dstTexCoord);
+ sk_FragColor = blend_src(output_Stage1, _dstColor);
+ sk_FragColor = outputCoverage_Stage0 * sk_FragColor + (vec4(1.0) - outputCoverage_Stage0) * _dstColor;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 inPosition;
+in vec4 inColor;
+in vec2 inEllipseOffset;
+in vec4 inEllipseRadii;
+noperspective out vec2 vEllipseOffsets_Stage0;
+noperspective out vec4 vEllipseRadii_Stage0;
+noperspective out vec4 vinColor_Stage0;
+void main() {
+ vEllipseOffsets_Stage0 = inEllipseOffset;
+ vEllipseRadii_Stage0 = inEllipseRadii;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = inPosition;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/2245.shader_test b/shaders/skia/2245.shader_test
new file mode 100644
index 0000000..4df1576
--- /dev/null
+++ b/shaders/skia/2245.shader_test
@@ -0,0 +1,81 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uinnerRect_Stage1_c0_c0;
+uniform vec2 uinvRadiiXY_Stage1_c0_c0;
+uniform vec2 uDstTextureUpperLeft_Stage2;
+uniform vec2 uDstTextureCoordScale_Stage2;
+uniform sampler2D uDstTextureSampler_Stage2;
+noperspective in vec4 vQuadEdge_Stage0;
+noperspective in vec4 vinColor_Stage0;
+vec4 EllipticalRRect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 dxy0 = uinnerRect_Stage1_c0_c0.xy - gl_FragCoord.xy;
+ vec2 dxy1 = gl_FragCoord.xy - uinnerRect_Stage1_c0_c0.zw;
+ vec2 dxy = max(max(dxy0, dxy1), 0.0);
+ vec2 Z = dxy * uinvRadiiXY_Stage1_c0_c0;
+ float implicit = dot(Z, dxy) - 1.0;
+ float grad_dot = 4.0 * dot(Z, Z);
+ grad_dot = max(grad_dot, 9.9999997473787516e-05);
+ float approx_dist = implicit * inversesqrt(grad_dot);
+ float alpha = clamp(0.5 - approx_dist, 0.0, 1.0);
+ _output = _input * alpha;
+ return _output;
+}
+vec4 blend_src(vec4 src, vec4 dst) {
+ return src;
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ float edgeAlpha;
+ vec2 duvdx = dFdx(vQuadEdge_Stage0.xy);
+ vec2 duvdy = -dFdy(vQuadEdge_Stage0.xy);
+ if (vQuadEdge_Stage0.z > 0.0 && vQuadEdge_Stage0.w > 0.0) {
+ edgeAlpha = min(min(vQuadEdge_Stage0.z, vQuadEdge_Stage0.w) + 0.5, 1.0);
+ } else {
+ vec2 gF = vec2((2.0 * vQuadEdge_Stage0.x) * duvdx.x - duvdx.y, (2.0 * vQuadEdge_Stage0.x) * duvdy.x - duvdy.y);
+ edgeAlpha = vQuadEdge_Stage0.x * vQuadEdge_Stage0.x - vQuadEdge_Stage0.y;
+ edgeAlpha = clamp(0.5 - edgeAlpha / length(gF), 0.0, 1.0);
+ }
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = EllipticalRRect_Stage1_c0_c0(vec4(1.0));
+ }
+ {
+ if (all(lessThanEqual(outputCoverage_Stage0.xyz, vec3(0.0)))) {
+ discard;
+ }
+ vec2 _dstTexCoord = (gl_FragCoord.xy - uDstTextureUpperLeft_Stage2) * uDstTextureCoordScale_Stage2;
+ _dstTexCoord.y = 1.0 - _dstTexCoord.y;
+ vec4 _dstColor = texture(uDstTextureSampler_Stage2, _dstTexCoord);
+ sk_FragColor = blend_src(output_Stage1, _dstColor);
+ sk_FragColor = outputCoverage_Stage0 * sk_FragColor + (vec4(1.0) - outputCoverage_Stage0) * _dstColor;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 inPosition;
+in vec4 inColor;
+in vec4 inQuadEdge;
+noperspective out vec4 vQuadEdge_Stage0;
+noperspective out vec4 vinColor_Stage0;
+void main() {
+ vQuadEdge_Stage0 = inQuadEdge;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = inPosition;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/2248.shader_test b/shaders/skia/2248.shader_test
new file mode 100644
index 0000000..8cffb76
--- /dev/null
+++ b/shaders/skia/2248.shader_test
@@ -0,0 +1,93 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uk_Stage1_c0_c0;
+uniform vec4 ucolor_Stage1_c0_c0_c0_c0;
+uniform vec2 uDstTextureUpperLeft_Stage2;
+uniform vec2 uDstTextureCoordScale_Stage2;
+uniform sampler2D uDstTextureSampler_Stage2;
+noperspective in vec2 vEllipseOffsets_Stage0;
+noperspective in vec4 vEllipseRadii_Stage0;
+noperspective in vec4 vinColor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 ConstColorProcessor_Stage1_c0_c0_c0_c0(vec4 _input, vec2 _coords) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage1_c0_c0_c0_c0;
+ }
+ return _output;
+}
+vec4 Arithmetic_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = _input;
+ vec4 dst = ConstColorProcessor_Stage1_c0_c0_c0_c0(vec4(1.0), vTransformedCoords_0_Stage0);
+ _output = clamp((((uk_Stage1_c0_c0.x * _output) * dst + uk_Stage1_c0_c0.y * _output) + uk_Stage1_c0_c0.z * dst) + uk_Stage1_c0_c0.w, 0.0, 1.0);
+ return _output;
+}
+vec4 blend_src(vec4 src, vec4 dst) {
+ return src;
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ vec2 offset = vEllipseOffsets_Stage0;
+ offset *= vEllipseRadii_Stage0.xy;
+ float test = dot(offset, offset) - 1.0;
+ vec2 grad = (2.0 * offset) * vEllipseRadii_Stage0.xy;
+ float grad_dot = dot(grad, grad);
+ grad_dot = max(grad_dot, 1.1754999560161448e-38);
+ float invlen = inversesqrt(grad_dot);
+ float edgeAlpha = clamp(0.5 - test * invlen, 0.0, 1.0);
+ offset = vEllipseOffsets_Stage0 * vEllipseRadii_Stage0.zw;
+ test = dot(offset, offset) - 1.0;
+ grad = (2.0 * offset) * vEllipseRadii_Stage0.zw;
+ grad_dot = dot(grad, grad);
+ invlen = inversesqrt(grad_dot);
+ edgeAlpha *= clamp(0.5 + test * invlen, 0.0, 1.0);
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = Arithmetic_Stage1_c0_c0(vec4(1.0));
+ }
+ {
+ if (all(lessThanEqual(outputCoverage_Stage0.xyz, vec3(0.0)))) {
+ discard;
+ }
+ vec2 _dstTexCoord = (gl_FragCoord.xy - uDstTextureUpperLeft_Stage2) * uDstTextureCoordScale_Stage2;
+ _dstTexCoord.y = 1.0 - _dstTexCoord.y;
+ vec4 _dstColor = texture(uDstTextureSampler_Stage2, _dstTexCoord);
+ sk_FragColor = blend_src(output_Stage1, _dstColor);
+ sk_FragColor = outputCoverage_Stage0 * sk_FragColor + (vec4(1.0) - outputCoverage_Stage0) * _dstColor;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec2 inEllipseOffset;
+in vec4 inEllipseRadii;
+noperspective out vec2 vEllipseOffsets_Stage0;
+noperspective out vec4 vEllipseRadii_Stage0;
+noperspective out vec4 vinColor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vEllipseOffsets_Stage0 = inEllipseOffset;
+ vEllipseRadii_Stage0 = inEllipseRadii;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/2251.shader_test b/shaders/skia/2251.shader_test
new file mode 100644
index 0000000..c77b921
--- /dev/null
+++ b/shaders/skia/2251.shader_test
@@ -0,0 +1,94 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 ucolor0_Stage1_c0_c0;
+uniform vec4 ucolor1_Stage1_c0_c0;
+uniform vec4 ucolor2_Stage1_c0_c0;
+uniform vec4 ucolor3_Stage1_c0_c0;
+uniform vec4 ucolor4_Stage1_c0_c0;
+uniform vec4 ucolor5_Stage1_c0_c0;
+uniform vec2 uDstTextureUpperLeft_Stage2;
+uniform vec2 uDstTextureCoordScale_Stage2;
+uniform sampler2D uDstTextureSampler_Stage2;
+noperspective in vec4 vQuadEdge_Stage0;
+noperspective in vec4 vinColor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 Overdraw_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = _input;
+ float alpha = 255.0 * _output.w;
+ if (alpha < 0.5) {
+ _output = ucolor0_Stage1_c0_c0;
+ } else if (alpha < 1.5) {
+ _output = ucolor1_Stage1_c0_c0;
+ } else if (alpha < 2.5) {
+ _output = ucolor2_Stage1_c0_c0;
+ } else if (alpha < 3.5) {
+ _output = ucolor3_Stage1_c0_c0;
+ } else if (alpha < 4.5) {
+ _output = ucolor4_Stage1_c0_c0;
+ } else {
+ _output = ucolor5_Stage1_c0_c0;
+ }
+ return _output;
+}
+vec4 blend_src(vec4 src, vec4 dst) {
+ return src;
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ float edgeAlpha;
+ vec2 duvdx = dFdx(vQuadEdge_Stage0.xy);
+ vec2 duvdy = -dFdy(vQuadEdge_Stage0.xy);
+ if (vQuadEdge_Stage0.z > 0.0 && vQuadEdge_Stage0.w > 0.0) {
+ edgeAlpha = min(min(vQuadEdge_Stage0.z, vQuadEdge_Stage0.w) + 0.5, 1.0);
+ } else {
+ vec2 gF = vec2((2.0 * vQuadEdge_Stage0.x) * duvdx.x - duvdx.y, (2.0 * vQuadEdge_Stage0.x) * duvdy.x - duvdy.y);
+ edgeAlpha = vQuadEdge_Stage0.x * vQuadEdge_Stage0.x - vQuadEdge_Stage0.y;
+ edgeAlpha = clamp(0.5 - edgeAlpha / length(gF), 0.0, 1.0);
+ }
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = Overdraw_Stage1_c0_c0(vec4(1.0));
+ }
+ {
+ if (all(lessThanEqual(outputCoverage_Stage0.xyz, vec3(0.0)))) {
+ discard;
+ }
+ vec2 _dstTexCoord = (gl_FragCoord.xy - uDstTextureUpperLeft_Stage2) * uDstTextureCoordScale_Stage2;
+ _dstTexCoord.y = 1.0 - _dstTexCoord.y;
+ vec4 _dstColor = texture(uDstTextureSampler_Stage2, _dstTexCoord);
+ sk_FragColor = blend_src(output_Stage1, _dstColor);
+ sk_FragColor = outputCoverage_Stage0 * sk_FragColor + (vec4(1.0) - outputCoverage_Stage0) * _dstColor;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec4 inQuadEdge;
+noperspective out vec4 vQuadEdge_Stage0;
+noperspective out vec4 vinColor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vQuadEdge_Stage0 = inQuadEdge;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/2254.shader_test b/shaders/skia/2254.shader_test
new file mode 100644
index 0000000..5884c0d
--- /dev/null
+++ b/shaders/skia/2254.shader_test
@@ -0,0 +1,63 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 ucolor0_Stage1_c0_c0;
+uniform vec4 ucolor1_Stage1_c0_c0;
+uniform vec4 ucolor2_Stage1_c0_c0;
+uniform vec4 ucolor3_Stage1_c0_c0;
+uniform vec4 ucolor4_Stage1_c0_c0;
+uniform vec4 ucolor5_Stage1_c0_c0;
+in vec4 vcolor_Stage0;
+in vec2 vTransformedCoords_0_Stage0;
+vec4 Overdraw_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = _input;
+ float alpha = 255.0 * _output.w;
+ if (alpha < 0.5) {
+ _output = ucolor0_Stage1_c0_c0;
+ } else if (alpha < 1.5) {
+ _output = ucolor1_Stage1_c0_c0;
+ } else if (alpha < 2.5) {
+ _output = ucolor2_Stage1_c0_c0;
+ } else if (alpha < 3.5) {
+ _output = ucolor3_Stage1_c0_c0;
+ } else if (alpha < 4.5) {
+ _output = ucolor4_Stage1_c0_c0;
+ } else {
+ _output = ucolor5_Stage1_c0_c0;
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = Overdraw_Stage1_c0_c0(vec4(1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+out vec4 vcolor_Stage0;
+out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 color = inColor;
+ vcolor_Stage0 = color;
+ vec3 pos3 = uViewM_Stage0 * vec3(inPosition, 1.0);
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos3.x, pos3.y, 0.0, pos3.z);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/2257.shader_test b/shaders/skia/2257.shader_test
new file mode 100644
index 0000000..b382b88
--- /dev/null
+++ b/shaders/skia/2257.shader_test
@@ -0,0 +1,87 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 ucolor0_Stage1_c0_c0;
+uniform vec4 ucolor1_Stage1_c0_c0;
+uniform vec4 ucolor2_Stage1_c0_c0;
+uniform vec4 ucolor3_Stage1_c0_c0;
+uniform vec4 ucolor4_Stage1_c0_c0;
+uniform vec4 ucolor5_Stage1_c0_c0;
+uniform vec2 uDstTextureUpperLeft_Stage2;
+uniform vec2 uDstTextureCoordScale_Stage2;
+uniform sampler2D uDstTextureSampler_Stage2;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in float vinCoverage_Stage0;
+vec4 Overdraw_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = _input;
+ float alpha = 255.0 * _output.w;
+ if (alpha < 0.5) {
+ _output = ucolor0_Stage1_c0_c0;
+ } else if (alpha < 1.5) {
+ _output = ucolor1_Stage1_c0_c0;
+ } else if (alpha < 2.5) {
+ _output = ucolor2_Stage1_c0_c0;
+ } else if (alpha < 3.5) {
+ _output = ucolor3_Stage1_c0_c0;
+ } else if (alpha < 4.5) {
+ _output = ucolor4_Stage1_c0_c0;
+ } else {
+ _output = ucolor5_Stage1_c0_c0;
+ }
+ return _output;
+}
+vec4 blend_src(vec4 src, vec4 dst) {
+ return src;
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ float alpha = 1.0;
+ alpha = vinCoverage_Stage0;
+ outputCoverage_Stage0 = vec4(alpha);
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = Overdraw_Stage1_c0_c0(vec4(1.0));
+ }
+ {
+ if (all(lessThanEqual(outputCoverage_Stage0.xyz, vec3(0.0)))) {
+ discard;
+ }
+ vec2 _dstTexCoord = (gl_FragCoord.xy - uDstTextureUpperLeft_Stage2) * uDstTextureCoordScale_Stage2;
+ _dstTexCoord.y = 1.0 - _dstTexCoord.y;
+ vec4 _dstColor = texture(uDstTextureSampler_Stage2, _dstTexCoord);
+ sk_FragColor = blend_src(output_Stage1, _dstColor);
+ sk_FragColor = outputCoverage_Stage0 * sk_FragColor + (vec4(1.0) - outputCoverage_Stage0) * _dstColor;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in float inCoverage;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out float vinCoverage_Stage0;
+void main() {
+ vec4 color = inColor;
+ vcolor_Stage0 = color;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ vinCoverage_Stage0 = inCoverage;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/226-2.shader_test b/shaders/skia/226-2.shader_test
new file mode 100644
index 0000000..5457ea3
--- /dev/null
+++ b/shaders/skia/226-2.shader_test
@@ -0,0 +1,79 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage2_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c1_c0;
+ }
+ return _output;
+}
+vec4 blend_modulate(vec4 src, vec4 dst) {
+ return src * dst;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_modulate(ConstColorProcessor_Stage2_c1_c0(vec4(1.0)), output_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/226-3.shader_test b/shaders/skia/226-3.shader_test
new file mode 100644
index 0000000..fa06781
--- /dev/null
+++ b/shaders/skia/226-3.shader_test
@@ -0,0 +1,209 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform float uSurfaceScale_Stage1;
+uniform vec3 uLightColor_Stage1;
+uniform float uKD_Stage1;
+uniform vec4 uTexDom_Stage1;
+uniform vec3 uDecalParams_Stage1;
+uniform vec3 uLightLocation_Stage1;
+uniform float uExponent_Stage1;
+uniform float uCosInnerConeAngle_Stage1;
+uniform float uCosOuterConeAngle_Stage1;
+uniform float uConeScale_Stage1;
+uniform vec3 uS_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 light_Stage1(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ float colorScale = uKD_Stage1 * dot(normal, surfaceToLight);
+ return vec4(lightColor * clamp(colorScale, 0.0, 1.0), 1.0);
+}
+float sobel_Stage1(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage1(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage1(float m[9], float surfaceScale) {
+ return pointToNormal_Stage1(sobel_Stage1(0.0, 0.0, m[4], m[5], m[7], m[8], 0.66666698455810547), sobel_Stage1(0.0, 0.0, m[4], m[7], m[5], m[8], 0.66666698455810547), surfaceScale);
+}
+vec3 lightColor_Stage1(vec3 surfaceToLight) {
+ float cosAngle = -dot(surfaceToLight, uS_Stage1);
+ if (cosAngle < uCosOuterConeAngle_Stage1) {
+ return vec3(0.0);
+ }
+ float scale = pow(cosAngle, uExponent_Stage1);
+ if (cosAngle < uCosInnerConeAngle_Stage1) {
+ return ((uLightColor_Stage1 * scale) * (cosAngle - uCosOuterConeAngle_Stage1)) * uConeScale_Stage1;
+ }
+ return uLightColor_Stage1;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ vec2 coord = vTransformedCoords_0_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp0 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp5 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp6 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp7 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp8 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = normalize(uLightLocation_Stage1 - vec3(gl_FragCoord.xy, uSurfaceScale_Stage1 * m[4]));
+ output_Stage1 = light_Stage1(normal_Stage1(m, uSurfaceScale_Stage1), surfaceToLight, lightColor_Stage1(surfaceToLight));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/226-4.shader_test b/shaders/skia/226-4.shader_test
new file mode 100644
index 0000000..1bfb84d
--- /dev/null
+++ b/shaders/skia/226-4.shader_test
@@ -0,0 +1,31 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uColor_Stage0;
+uniform float uCoverage_Stage0;
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ outputCoverage_Stage0 = vec4(uCoverage_Stage0);
+ }
+ {
+ sk_FragColor = 1.0 - outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 inPosition;
+void main() {
+ vec2 pos2 = (uViewM_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/226-5.shader_test b/shaders/skia/226-5.shader_test
new file mode 100644
index 0000000..8588999
--- /dev/null
+++ b/shaders/skia/226-5.shader_test
@@ -0,0 +1,429 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage2;
+uniform vec4 uKernel_Stage2[6];
+uniform vec2 uKernelOffset_Stage2;
+uniform float uGain_Stage2;
+uniform float uBias_Stage2;
+uniform vec4 uTexDom_Stage2;
+uniform vec3 uDecalParams_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ vec4 sum = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_1_Stage0 - uKernelOffset_Stage2 * uImageIncrement_Stage2;
+ vec4 c;
+ {
+ float k = uKernel_Stage2[0].x;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[0].y;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[0].z;
+ {
+ vec2 origCoord = coord + vec2(2.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[0].w;
+ {
+ vec2 origCoord = coord + vec2(3.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[1].x;
+ {
+ vec2 origCoord = coord + vec2(4.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[1].y;
+ {
+ vec2 origCoord = coord + vec2(5.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[1].z;
+ {
+ vec2 origCoord = coord + vec2(6.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[1].w;
+ {
+ vec2 origCoord = coord + vec2(7.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[2].x;
+ {
+ vec2 origCoord = coord + vec2(8.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[2].y;
+ {
+ vec2 origCoord = coord + vec2(9.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[2].z;
+ {
+ vec2 origCoord = coord + vec2(10.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[2].w;
+ {
+ vec2 origCoord = coord + vec2(11.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[3].x;
+ {
+ vec2 origCoord = coord + vec2(12.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[3].y;
+ {
+ vec2 origCoord = coord + vec2(13.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[3].z;
+ {
+ vec2 origCoord = coord + vec2(14.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[3].w;
+ {
+ vec2 origCoord = coord + vec2(15.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[4].x;
+ {
+ vec2 origCoord = coord + vec2(16.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[4].y;
+ {
+ vec2 origCoord = coord + vec2(17.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[4].z;
+ {
+ vec2 origCoord = coord + vec2(18.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[4].w;
+ {
+ vec2 origCoord = coord + vec2(19.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[5].x;
+ {
+ vec2 origCoord = coord + vec2(20.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[5].y;
+ {
+ vec2 origCoord = coord + vec2(21.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ output_Stage2 = sum * uGain_Stage2 + uBias_Stage2;
+ output_Stage2.w = clamp(output_Stage2.w, 0.0, 1.0);
+ output_Stage2.xyz = clamp(output_Stage2.xyz, 0.0, output_Stage2.w);
+ output_Stage2 *= output_Stage1;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/226.shader_test b/shaders/skia/226.shader_test
new file mode 100644
index 0000000..49ed53a
--- /dev/null
+++ b/shaders/skia/226.shader_test
@@ -0,0 +1,152 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage2_c1_c0;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.w) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ } else {
+ {
+ if (t < uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = OverrideInputFragmentProcessor_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c1_c0;
+ }
+ return _output;
+}
+vec4 blend_src_atop(vec4 src, vec4 dst) {
+ return dst.w * src + (1.0 - src.w) * dst;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 blend_darken(vec4 src, vec4 dst) {
+ vec4 result = blend_src_over(src, dst);
+ result.xyz = min(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
+ return result;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_src_atop(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_darken(ConstColorProcessor_Stage2_c1_c0(vec4(1.0)), output_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 inColor;
+in vec2 inLocalCoord;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/2260.shader_test b/shaders/skia/2260.shader_test
new file mode 100644
index 0000000..085965a
--- /dev/null
+++ b/shaders/skia/2260.shader_test
@@ -0,0 +1,45 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 TextureEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TextureEffect_Stage1_c0_c0(vec4(1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec2 inLocalCoord;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 color = inColor;
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/2263.shader_test b/shaders/skia/2263.shader_test
new file mode 100644
index 0000000..f92d3d2
--- /dev/null
+++ b/shaders/skia/2263.shader_test
@@ -0,0 +1,87 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec2 uDstTextureUpperLeft_Stage2;
+uniform vec2 uDstTextureCoordScale_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uDstTextureSampler_Stage2;
+noperspective in vec2 vEllipseOffsets0_Stage0;
+noperspective in vec2 vEllipseOffsets1_Stage0;
+noperspective in vec4 vinColor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 TextureEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+vec4 blend_src(vec4 src, vec4 dst) {
+ return src;
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ vec2 scaledOffset = vEllipseOffsets0_Stage0;
+ float test = dot(scaledOffset, scaledOffset) - 1.0;
+ vec2 duvdx = dFdx(vEllipseOffsets0_Stage0);
+ vec2 duvdy = -dFdy(vEllipseOffsets0_Stage0);
+ vec2 grad = vec2(vEllipseOffsets0_Stage0.x * duvdx.x + vEllipseOffsets0_Stage0.y * duvdx.y, vEllipseOffsets0_Stage0.x * duvdy.x + vEllipseOffsets0_Stage0.y * duvdy.y);
+ float grad_dot = 4.0 * dot(grad, grad);
+ grad_dot = max(grad_dot, 1.1754999560161448e-38);
+ float invlen = inversesqrt(grad_dot);
+ float edgeAlpha = clamp(0.5 - test * invlen, 0.0, 1.0);
+ scaledOffset = vEllipseOffsets1_Stage0;
+ test = dot(scaledOffset, scaledOffset) - 1.0;
+ duvdx = dFdx(vEllipseOffsets1_Stage0);
+ duvdy = -dFdy(vEllipseOffsets1_Stage0);
+ grad = vec2(vEllipseOffsets1_Stage0.x * duvdx.x + vEllipseOffsets1_Stage0.y * duvdx.y, vEllipseOffsets1_Stage0.x * duvdy.x + vEllipseOffsets1_Stage0.y * duvdy.y);
+ grad_dot = 4.0 * dot(grad, grad);
+ invlen = inversesqrt(grad_dot);
+ edgeAlpha *= clamp(0.5 + test * invlen, 0.0, 1.0);
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TextureEffect_Stage1_c0_c0(vec4(1.0));
+ }
+ {
+ if (all(lessThanEqual(outputCoverage_Stage0.xyz, vec3(0.0)))) {
+ discard;
+ }
+ vec2 _dstTexCoord = (gl_FragCoord.xy - uDstTextureUpperLeft_Stage2) * uDstTextureCoordScale_Stage2;
+ _dstTexCoord.y = 1.0 - _dstTexCoord.y;
+ vec4 _dstColor = texture(uDstTextureSampler_Stage2, _dstTexCoord);
+ sk_FragColor = blend_src(output_Stage1, _dstColor);
+ sk_FragColor = outputCoverage_Stage0 * sk_FragColor + (vec4(1.0) - outputCoverage_Stage0) * _dstColor;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec2 inEllipseOffsets0;
+in vec2 inEllipseOffsets1;
+noperspective out vec2 vEllipseOffsets0_Stage0;
+noperspective out vec2 vEllipseOffsets1_Stage0;
+noperspective out vec4 vinColor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vEllipseOffsets0_Stage0 = inEllipseOffsets0;
+ vEllipseOffsets1_Stage0 = inEllipseOffsets1;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = (uViewM_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/2266.shader_test b/shaders/skia/2266.shader_test
new file mode 100644
index 0000000..1bdc005
--- /dev/null
+++ b/shaders/skia/2266.shader_test
@@ -0,0 +1,93 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 TextureEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TextureEffect_Stage1_c0_c0(vec4(1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform float uSrcTF_Stage0[7];
+uniform mat3 uColorXform_Stage0;
+uniform float uDstTF_Stage0[7];
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 inColor;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+float src_tf_Stage0(float x) {
+ float G = uSrcTF_Stage0[0];
+ float A = uSrcTF_Stage0[1];
+ float B = uSrcTF_Stage0[2];
+ float C = uSrcTF_Stage0[3];
+ float D = uSrcTF_Stage0[4];
+ float E = uSrcTF_Stage0[5];
+ float F = uSrcTF_Stage0[6];
+ float s = sign(x);
+ x = abs(x);
+ x = x < D ? C * x + F : pow(A * x + B, G) + E;
+ return s * x;
+}
+float dst_tf_Stage0(float x) {
+ float G = uDstTF_Stage0[0];
+ float A = uDstTF_Stage0[1];
+ float B = uDstTF_Stage0[2];
+ float C = uDstTF_Stage0[3];
+ float D = uDstTF_Stage0[4];
+ float E = uDstTF_Stage0[5];
+ float F = uDstTF_Stage0[6];
+ float s = sign(x);
+ x = abs(x);
+ x = x < D ? C * x + F : pow(A * x + B, G) + E;
+ return s * x;
+}
+vec4 gamut_xform_Stage0(vec4 color) {
+ color.xyz = uColorXform_Stage0 * color.xyz;
+ return color;
+}
+vec4 color_xform_Stage0(vec4 color) {
+ float nonZeroAlpha = max(color.w, 9.9999997473787516e-05);
+ color = vec4(color.xyz / nonZeroAlpha, nonZeroAlpha);
+ color.x = src_tf_Stage0(color.x);
+ color.y = src_tf_Stage0(color.y);
+ color.z = src_tf_Stage0(color.z);
+ color = gamut_xform_Stage0(color);
+ color.x = dst_tf_Stage0(color.x);
+ color.y = dst_tf_Stage0(color.y);
+ color.z = dst_tf_Stage0(color.z);
+ color.xyz *= color.w;
+ return color;
+}
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = color_xform_Stage0(color);
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(position, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/2269.shader_test b/shaders/skia/2269.shader_test
new file mode 100644
index 0000000..d185683
--- /dev/null
+++ b/shaders/skia/2269.shader_test
@@ -0,0 +1,76 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec2 uDstTextureUpperLeft_Stage2;
+uniform vec2 uDstTextureCoordScale_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uDstTextureSampler_Stage2;
+noperspective in vec2 vEllipseOffsets_Stage0;
+noperspective in vec4 vEllipseRadii_Stage0;
+noperspective in vec4 vinColor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 TextureEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+vec4 blend_src(vec4 src, vec4 dst) {
+ return src;
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ vec2 offset = vEllipseOffsets_Stage0;
+ float test = dot(offset, offset) - 1.0;
+ vec2 grad = (2.0 * offset) * vEllipseRadii_Stage0.xy;
+ float grad_dot = dot(grad, grad);
+ grad_dot = max(grad_dot, 1.1754999560161448e-38);
+ float invlen = inversesqrt(grad_dot);
+ float edgeAlpha = clamp(0.5 - test * invlen, 0.0, 1.0);
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TextureEffect_Stage1_c0_c0(vec4(1.0));
+ }
+ {
+ if (all(lessThanEqual(outputCoverage_Stage0.xyz, vec3(0.0)))) {
+ discard;
+ }
+ vec2 _dstTexCoord = (gl_FragCoord.xy - uDstTextureUpperLeft_Stage2) * uDstTextureCoordScale_Stage2;
+ _dstTexCoord.y = 1.0 - _dstTexCoord.y;
+ vec4 _dstColor = texture(uDstTextureSampler_Stage2, _dstTexCoord);
+ sk_FragColor = blend_src(output_Stage1, _dstColor);
+ sk_FragColor = outputCoverage_Stage0 * sk_FragColor + (vec4(1.0) - outputCoverage_Stage0) * _dstColor;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec2 inEllipseOffset;
+in vec4 inEllipseRadii;
+noperspective out vec2 vEllipseOffsets_Stage0;
+noperspective out vec4 vEllipseRadii_Stage0;
+noperspective out vec4 vinColor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vEllipseOffsets_Stage0 = inEllipseOffset;
+ vEllipseRadii_Stage0 = inEllipseRadii;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/2272.shader_test b/shaders/skia/2272.shader_test
new file mode 100644
index 0000000..fab4231
--- /dev/null
+++ b/shaders/skia/2272.shader_test
@@ -0,0 +1,75 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec2 uDstTextureUpperLeft_Stage2;
+uniform vec2 uDstTextureCoordScale_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uDstTextureSampler_Stage2;
+noperspective in vec4 vQuadEdge_Stage0;
+noperspective in vec4 vinColor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 TextureEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+vec4 blend_src(vec4 src, vec4 dst) {
+ return src;
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ float edgeAlpha;
+ vec2 duvdx = dFdx(vQuadEdge_Stage0.xy);
+ vec2 duvdy = -dFdy(vQuadEdge_Stage0.xy);
+ if (vQuadEdge_Stage0.z > 0.0 && vQuadEdge_Stage0.w > 0.0) {
+ edgeAlpha = min(min(vQuadEdge_Stage0.z, vQuadEdge_Stage0.w) + 0.5, 1.0);
+ } else {
+ vec2 gF = vec2((2.0 * vQuadEdge_Stage0.x) * duvdx.x - duvdx.y, (2.0 * vQuadEdge_Stage0.x) * duvdy.x - duvdy.y);
+ edgeAlpha = vQuadEdge_Stage0.x * vQuadEdge_Stage0.x - vQuadEdge_Stage0.y;
+ edgeAlpha = clamp(0.5 - edgeAlpha / length(gF), 0.0, 1.0);
+ }
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TextureEffect_Stage1_c0_c0(vec4(1.0));
+ }
+ {
+ if (all(lessThanEqual(outputCoverage_Stage0.xyz, vec3(0.0)))) {
+ discard;
+ }
+ vec2 _dstTexCoord = (gl_FragCoord.xy - uDstTextureUpperLeft_Stage2) * uDstTextureCoordScale_Stage2;
+ _dstTexCoord.y = 1.0 - _dstTexCoord.y;
+ vec4 _dstColor = texture(uDstTextureSampler_Stage2, _dstTexCoord);
+ sk_FragColor = blend_src(output_Stage1, _dstColor);
+ sk_FragColor = outputCoverage_Stage0 * sk_FragColor + (vec4(1.0) - outputCoverage_Stage0) * _dstColor;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec4 inQuadEdge;
+noperspective out vec4 vQuadEdge_Stage0;
+noperspective out vec4 vinColor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vQuadEdge_Stage0 = inQuadEdge;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/2275.shader_test b/shaders/skia/2275.shader_test
new file mode 100644
index 0000000..bbedc05
--- /dev/null
+++ b/shaders/skia/2275.shader_test
@@ -0,0 +1,41 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uColor_Stage0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 TextureEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TextureEffect_Stage1_c0_c0(vec4(1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec2 inLocalCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec2 pos2 = (uViewM_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/2278.shader_test b/shaders/skia/2278.shader_test
new file mode 100644
index 0000000..5004c36
--- /dev/null
+++ b/shaders/skia/2278.shader_test
@@ -0,0 +1,141 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uColor_Stage0;
+uniform float uCoverage_Stage0;
+uniform vec2 ubaseFrequency_Stage1_c0_c0_c0_c0;
+uniform float uz_Stage1_c0_c0_c0_c0;
+uniform vec4 uellipse_Stage1_c0_c0_c1_c0;
+uniform vec2 uDstTextureUpperLeft_Stage2;
+uniform vec2 uDstTextureCoordScale_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+uniform sampler2D uDstTextureSampler_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec3 fade_Stage1_c0_c0_c0_c0(vec3 t) {
+ return ((t * t) * t) * (t * (t * 6.0 - 15.0) + 10.0);
+}
+float perm_Stage1_c0_c0_c0_c0(float x) {
+ return texture(uTextureSampler_0_Stage1, vec2(fract(x / 256.0), 0.0)).x * 255.0;
+}
+float grad_Stage1_c0_c0_c0_c0(float x, vec3 p) {
+ return dot(texture(uTextureSampler_1_Stage1, vec2(fract(x / 16.0), 0.0)).xyz * 255.0 - vec3(1.0), p);
+}
+float lerp_Stage1_c0_c0_c0_c0(float a, float b, float w) {
+ return a + w * (b - a);
+}
+float noise_Stage1_c0_c0_c0_c0(vec3 p) {
+ vec3 P = mod(floor(p), 256.0);
+ p -= floor(p);
+ vec3 f = fade_Stage1_c0_c0_c0_c0(p);
+ float A = perm_Stage1_c0_c0_c0_c0(P.x) + P.y;
+ float AA = perm_Stage1_c0_c0_c0_c0(A) + P.z;
+ float AB = perm_Stage1_c0_c0_c0_c0(A + 1.0) + P.z;
+ float B = perm_Stage1_c0_c0_c0_c0(P.x + 1.0) + P.y;
+ float BA = perm_Stage1_c0_c0_c0_c0(B) + P.z;
+ float BB = perm_Stage1_c0_c0_c0_c0(B + 1.0) + P.z;
+ float result = lerp_Stage1_c0_c0_c0_c0(lerp_Stage1_c0_c0_c0_c0(lerp_Stage1_c0_c0_c0_c0(grad_Stage1_c0_c0_c0_c0(perm_Stage1_c0_c0_c0_c0(AA), p), grad_Stage1_c0_c0_c0_c0(perm_Stage1_c0_c0_c0_c0(BA), p + vec3(-1.0, 0.0, 0.0)), f.x), lerp_Stage1_c0_c0_c0_c0(grad_Stage1_c0_c0_c0_c0(perm_Stage1_c0_c0_c0_c0(AB), p + vec3(0.0, -1.0, 0.0)), grad_Stage1_c0_c0_c0_c0(perm_Stage1_c0_c0_c0_c0(BB), p + vec3(-1.0, -1.0, 0.0)), f.x), f.y), lerp_Stage1_c0_c0_c0_c0(lerp_Stage1_c0_c0_c0_c0(grad_Stage1_c0_c0_c0_c0(perm_Stage1_c0_c0_c0_c0(AA + 1.0), p + vec3(0.0, 0.0, -1.0)), grad_Stage1_c0_c0_c0_c0(perm_Stage1_c0_c0_c0_c0(BA + 1.0), p + vec3(-1.0, 0.0, -1.0)), f.x), lerp_Stage1_c0_c0_c0_c0(grad_Stage1_c0_c0_c0_c0(perm_Stage1_c0_c0_c0_c0(AB + 1.0), p + vec3(0.0, -1.0, -1.0)), grad_Stage1_c0_c0_c0_c0(perm_Stage1_c0_c0_c0_c0(BB + 1.0), p + vec3(-1.0, -1.0, -1.0)), f.x), f.y), f.z);
+ return result;
+}
+float noiseOctaves_Stage1_c0_c0_c0_c0(vec3 p) {
+ float result = 0.0;
+ float ratio = 1.0;
+ for (float i = 0.0;i < 9.0; i++) {
+ result += noise_Stage1_c0_c0_c0_c0(p) / ratio;
+ p *= 2.0;
+ ratio *= 2.0;
+ }
+ return (result + 1.0) / 2.0;
+}
+vec4 ImprovedPerlinNoise_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coords = vTransformedCoords_0_Stage0 * ubaseFrequency_Stage1_c0_c0_c0_c0;
+ float r = noiseOctaves_Stage1_c0_c0_c0_c0(vec3(coords, uz_Stage1_c0_c0_c0_c0));
+ float g = noiseOctaves_Stage1_c0_c0_c0_c0(vec3(coords, uz_Stage1_c0_c0_c0_c0));
+ float b = noiseOctaves_Stage1_c0_c0_c0_c0(vec3(coords, uz_Stage1_c0_c0_c0_c0));
+ float a = noiseOctaves_Stage1_c0_c0_c0_c0(vec3(coords, uz_Stage1_c0_c0_c0_c0));
+ _output = vec4(r, g, b, a);
+ _output = clamp(_output, 0.0, 1.0);
+ _output = vec4(_output.xyz * _output.www, _output.w);
+ return _output;
+}
+vec4 EllipseEffect_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 d = gl_FragCoord.xy - uellipse_Stage1_c0_c0_c1_c0.xy;
+ vec2 Z = d * uellipse_Stage1_c0_c0_c1_c0.zw;
+ float implicit = dot(Z, d) - 1.0;
+ float grad_dot = 4.0 * dot(Z, Z);
+ {
+ grad_dot = max(grad_dot, 1.1754999560161448e-38);
+ }
+ float approx_dist = implicit * inversesqrt(grad_dot);
+ float alpha;
+ {
+ alpha = clamp(0.5 + approx_dist, 0.0, 1.0);
+ }
+ _output = _input * alpha;
+ return _output;
+}
+float _blend_overlay_component(float sc, float sa, float dc, float da) {
+ if (2.0 * dc <= da) {
+ return (2.0 * sc) * dc;
+ }
+ return sa * da - (2.0 * (da - dc)) * (sa - sc);
+}
+vec4 blend_overlay(vec4 src, vec4 dst) {
+ vec4 result = vec4(_blend_overlay_component(src.x, src.w, dst.x, dst.w), _blend_overlay_component(src.y, src.w, dst.y, dst.w), _blend_overlay_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+ result.xyz += dst.xyz * (1.0 - src.w) + src.xyz * (1.0 - dst.w);
+ return result;
+}
+vec4 ComposeTwo_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_overlay(ImprovedPerlinNoise_Stage1_c0_c0_c0_c0(inputColor), EllipseEffect_Stage1_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 blend_src(vec4 src, vec4 dst) {
+ return src;
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ outputCoverage_Stage0 = vec4(uCoverage_Stage0);
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ComposeTwo_Stage1_c0_c0(vec4(1.0));
+ }
+ {
+ if (all(lessThanEqual(outputCoverage_Stage0.xyz, vec3(0.0)))) {
+ discard;
+ }
+ vec2 _dstTexCoord = (gl_FragCoord.xy - uDstTextureUpperLeft_Stage2) * uDstTextureCoordScale_Stage2;
+ _dstTexCoord.y = 1.0 - _dstTexCoord.y;
+ vec4 _dstColor = texture(uDstTextureSampler_Stage2, _dstTexCoord);
+ sk_FragColor = blend_src(output_Stage1, _dstColor);
+ sk_FragColor = outputCoverage_Stage0 * sk_FragColor + (vec4(1.0) - outputCoverage_Stage0) * _dstColor;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec2 pos2 = (uViewM_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/2281.shader_test b/shaders/skia/2281.shader_test
new file mode 100644
index 0000000..47ea505
--- /dev/null
+++ b/shaders/skia/2281.shader_test
@@ -0,0 +1,85 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec2 uDstTextureUpperLeft_Stage2;
+uniform vec2 uDstTextureCoordScale_Stage2;
+uniform sampler2D uDstTextureSampler_Stage2;
+noperspective in vec2 vEllipseOffsets_Stage0;
+noperspective in vec4 vEllipseRadii_Stage0;
+noperspective in vec4 vinColor_Stage0;
+vec4 ConfigConversionEffect_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = floor(_input * 255.0 + 0.5) / 255.0;
+ {
+ _output.xyz = _output.w <= 0.0 ? vec3(0.0) : floor((_output.xyz / _output.w) * 255.0 + 0.5) / 255.0;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+vec4 ComposeOne_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_dst_in(_input, ConfigConversionEffect_Stage1_c0_c0_c0_c0(vec4(1.0)));
+ return _output;
+}
+vec4 blend_src(vec4 src, vec4 dst) {
+ return src;
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ vec2 offset = vEllipseOffsets_Stage0;
+ float test = dot(offset, offset) - 1.0;
+ vec2 grad = (2.0 * offset) * vEllipseRadii_Stage0.xy;
+ float grad_dot = dot(grad, grad);
+ grad_dot = max(grad_dot, 1.1754999560161448e-38);
+ float invlen = inversesqrt(grad_dot);
+ float edgeAlpha = clamp(0.5 - test * invlen, 0.0, 1.0);
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ComposeOne_Stage1_c0_c0(vec4(1.0));
+ }
+ {
+ if (all(lessThanEqual(outputCoverage_Stage0.xyz, vec3(0.0)))) {
+ discard;
+ }
+ vec2 _dstTexCoord = (gl_FragCoord.xy - uDstTextureUpperLeft_Stage2) * uDstTextureCoordScale_Stage2;
+ _dstTexCoord.y = 1.0 - _dstTexCoord.y;
+ vec4 _dstColor = texture(uDstTextureSampler_Stage2, _dstTexCoord);
+ sk_FragColor = blend_src(output_Stage1, _dstColor);
+ sk_FragColor = outputCoverage_Stage0 * sk_FragColor + (vec4(1.0) - outputCoverage_Stage0) * _dstColor;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 inPosition;
+in vec4 inColor;
+in vec2 inEllipseOffset;
+in vec4 inEllipseRadii;
+noperspective out vec2 vEllipseOffsets_Stage0;
+noperspective out vec4 vEllipseRadii_Stage0;
+noperspective out vec4 vinColor_Stage0;
+void main() {
+ vEllipseOffsets_Stage0 = inEllipseOffset;
+ vEllipseRadii_Stage0 = inEllipseRadii;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = inPosition;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/2284.shader_test b/shaders/skia/2284.shader_test
new file mode 100644
index 0000000..8df971f
--- /dev/null
+++ b/shaders/skia/2284.shader_test
@@ -0,0 +1,534 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1_c0_c0_c0_c0;
+uniform vec4 uKernel_Stage1_c0_c0_c0_c0[6];
+uniform vec2 uKernelOffset_Stage1_c0_c0_c0_c0;
+uniform float uGain_Stage1_c0_c0_c0_c0;
+uniform float uBias_Stage1_c0_c0_c0_c0;
+uniform vec4 uTexDom_Stage1_c0_c0_c0_c0;
+uniform vec3 uDecalParams_Stage1_c0_c0_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 MatrixConvolution_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 sum = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0 - uKernelOffset_Stage1_c0_c0_c0_c0 * uImageIncrement_Stage1_c0_c0_c0_c0;
+ vec4 c;
+ {
+ float k = uKernel_Stage1_c0_c0_c0_c0[0].x;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c0_c0[0].y;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c0_c0[0].z;
+ {
+ vec2 origCoord = coord + vec2(2.0, 0.0) * uImageIncrement_Stage1_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c0_c0[0].w;
+ {
+ vec2 origCoord = coord + vec2(3.0, 0.0) * uImageIncrement_Stage1_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c0_c0[1].x;
+ {
+ vec2 origCoord = coord + vec2(4.0, 0.0) * uImageIncrement_Stage1_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c0_c0[1].y;
+ {
+ vec2 origCoord = coord + vec2(5.0, 0.0) * uImageIncrement_Stage1_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c0_c0[1].z;
+ {
+ vec2 origCoord = coord + vec2(6.0, 0.0) * uImageIncrement_Stage1_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c0_c0[1].w;
+ {
+ vec2 origCoord = coord + vec2(7.0, 0.0) * uImageIncrement_Stage1_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c0_c0[2].x;
+ {
+ vec2 origCoord = coord + vec2(8.0, 0.0) * uImageIncrement_Stage1_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c0_c0[2].y;
+ {
+ vec2 origCoord = coord + vec2(9.0, 0.0) * uImageIncrement_Stage1_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c0_c0[2].z;
+ {
+ vec2 origCoord = coord + vec2(10.0, 0.0) * uImageIncrement_Stage1_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c0_c0[2].w;
+ {
+ vec2 origCoord = coord + vec2(11.0, 0.0) * uImageIncrement_Stage1_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c0_c0[3].x;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c0_c0[3].y;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c0_c0[3].z;
+ {
+ vec2 origCoord = coord + vec2(2.0, 1.0) * uImageIncrement_Stage1_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c0_c0[3].w;
+ {
+ vec2 origCoord = coord + vec2(3.0, 1.0) * uImageIncrement_Stage1_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c0_c0[4].x;
+ {
+ vec2 origCoord = coord + vec2(4.0, 1.0) * uImageIncrement_Stage1_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c0_c0[4].y;
+ {
+ vec2 origCoord = coord + vec2(5.0, 1.0) * uImageIncrement_Stage1_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c0_c0[4].z;
+ {
+ vec2 origCoord = coord + vec2(6.0, 1.0) * uImageIncrement_Stage1_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c0_c0[4].w;
+ {
+ vec2 origCoord = coord + vec2(7.0, 1.0) * uImageIncrement_Stage1_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c0_c0[5].x;
+ {
+ vec2 origCoord = coord + vec2(8.0, 1.0) * uImageIncrement_Stage1_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c0_c0[5].y;
+ {
+ vec2 origCoord = coord + vec2(9.0, 1.0) * uImageIncrement_Stage1_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c0_c0[5].z;
+ {
+ vec2 origCoord = coord + vec2(10.0, 1.0) * uImageIncrement_Stage1_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c0_c0[5].w;
+ {
+ vec2 origCoord = coord + vec2(11.0, 1.0) * uImageIncrement_Stage1_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ _output = sum * uGain_Stage1_c0_c0_c0_c0 + uBias_Stage1_c0_c0_c0_c0;
+ _output.w = clamp(_output.w, 0.0, 1.0);
+ _output.xyz = clamp(_output.xyz, 0.0, _output.w);
+ _output *= _input;
+ return _output;
+}
+float _blend_overlay_component(float sc, float sa, float dc, float da) {
+ if (2.0 * dc <= da) {
+ return (2.0 * sc) * dc;
+ }
+ return sa * da - (2.0 * (da - dc)) * (sa - sc);
+}
+vec4 blend_overlay(vec4 src, vec4 dst) {
+ vec4 result = vec4(_blend_overlay_component(src.x, src.w, dst.x, dst.w), _blend_overlay_component(src.y, src.w, dst.y, dst.w), _blend_overlay_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+ result.xyz += dst.xyz * (1.0 - src.w) + src.xyz * (1.0 - dst.w);
+ return result;
+}
+vec4 blend_hard_light(vec4 src, vec4 dst) {
+ return blend_overlay(dst, src);
+}
+vec4 ComposeOne_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_hard_light(MatrixConvolution_Stage1_c0_c0_c0_c0(vec4(1.0)), _input);
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ComposeOne_Stage1_c0_c0(vec4(1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform float uSrcTF_Stage0[7];
+uniform mat3 uColorXform_Stage0;
+uniform float uDstTF_Stage0[7];
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 inColor;
+in vec2 inLocalCoord;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+float src_tf_Stage0(float x) {
+ float G = uSrcTF_Stage0[0];
+ float A = uSrcTF_Stage0[1];
+ float B = uSrcTF_Stage0[2];
+ float C = uSrcTF_Stage0[3];
+ float D = uSrcTF_Stage0[4];
+ float E = uSrcTF_Stage0[5];
+ float F = uSrcTF_Stage0[6];
+ float s = sign(x);
+ x = abs(x);
+ x = x < D ? C * x + F : pow(A * x + B, G) + E;
+ return s * x;
+}
+float dst_tf_Stage0(float x) {
+ float G = uDstTF_Stage0[0];
+ float A = uDstTF_Stage0[1];
+ float B = uDstTF_Stage0[2];
+ float C = uDstTF_Stage0[3];
+ float D = uDstTF_Stage0[4];
+ float E = uDstTF_Stage0[5];
+ float F = uDstTF_Stage0[6];
+ float s = sign(x);
+ x = abs(x);
+ x = x < D ? C * x + F : pow(A * x + B, G) + E;
+ return s * x;
+}
+vec4 gamut_xform_Stage0(vec4 color) {
+ color.xyz = uColorXform_Stage0 * color.xyz;
+ return color;
+}
+vec4 color_xform_Stage0(vec4 color) {
+ float nonZeroAlpha = max(color.w, 9.9999997473787516e-05);
+ color = vec4(color.xyz / nonZeroAlpha, nonZeroAlpha);
+ color.x = src_tf_Stage0(color.x);
+ color.y = src_tf_Stage0(color.y);
+ color.z = src_tf_Stage0(color.z);
+ color = gamut_xform_Stage0(color);
+ color.x = dst_tf_Stage0(color.x);
+ color.y = dst_tf_Stage0(color.y);
+ color.z = dst_tf_Stage0(color.z);
+ color.xyz *= color.w;
+ return color;
+}
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = color_xform_Stage0(color);
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/2287.shader_test b/shaders/skia/2287.shader_test
new file mode 100644
index 0000000..754fdde
--- /dev/null
+++ b/shaders/skia/2287.shader_test
@@ -0,0 +1,364 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uColor_Stage0;
+uniform vec2 uImageIncrement_Stage1_c0_c0_c0_c0;
+uniform vec4 uKernel_Stage1_c0_c0_c0_c0[4];
+uniform vec2 uKernelOffset_Stage1_c0_c0_c0_c0;
+uniform float uGain_Stage1_c0_c0_c0_c0;
+uniform float uBias_Stage1_c0_c0_c0_c0;
+uniform vec4 uTexDom_Stage1_c0_c0_c0_c0;
+uniform vec3 uDecalParams_Stage1_c0_c0_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+in vec2 vTransformedCoords_0_Stage0;
+vec4 MatrixConvolution_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 sum = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0 - uKernelOffset_Stage1_c0_c0_c0_c0 * uImageIncrement_Stage1_c0_c0_c0_c0;
+ vec4 c;
+ {
+ float k = uKernel_Stage1_c0_c0_c0_c0[0].x;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c0_c0[0].y;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c0_c0[0].z;
+ {
+ vec2 origCoord = coord + vec2(2.0, 0.0) * uImageIncrement_Stage1_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c0_c0[0].w;
+ {
+ vec2 origCoord = coord + vec2(3.0, 0.0) * uImageIncrement_Stage1_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c0_c0[1].x;
+ {
+ vec2 origCoord = coord + vec2(4.0, 0.0) * uImageIncrement_Stage1_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c0_c0[1].y;
+ {
+ vec2 origCoord = coord + vec2(5.0, 0.0) * uImageIncrement_Stage1_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c0_c0[1].z;
+ {
+ vec2 origCoord = coord + vec2(6.0, 0.0) * uImageIncrement_Stage1_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c0_c0[1].w;
+ {
+ vec2 origCoord = coord + vec2(7.0, 0.0) * uImageIncrement_Stage1_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c0_c0[2].x;
+ {
+ vec2 origCoord = coord + vec2(8.0, 0.0) * uImageIncrement_Stage1_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c0_c0[2].y;
+ {
+ vec2 origCoord = coord + vec2(9.0, 0.0) * uImageIncrement_Stage1_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c0_c0[2].z;
+ {
+ vec2 origCoord = coord + vec2(10.0, 0.0) * uImageIncrement_Stage1_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c0_c0[2].w;
+ {
+ vec2 origCoord = coord + vec2(11.0, 0.0) * uImageIncrement_Stage1_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c0_c0[3].x;
+ {
+ vec2 origCoord = coord + vec2(12.0, 0.0) * uImageIncrement_Stage1_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c0_c0[3].y;
+ {
+ vec2 origCoord = coord + vec2(13.0, 0.0) * uImageIncrement_Stage1_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c0_c0[3].z;
+ {
+ vec2 origCoord = coord + vec2(14.0, 0.0) * uImageIncrement_Stage1_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ _output = sum * uGain_Stage1_c0_c0_c0_c0 + uBias_Stage1_c0_c0_c0_c0;
+ _output.w = clamp(_output.w, 0.0, 1.0);
+ _output.xyz = clamp(_output.xyz, 0.0, _output.w);
+ _output *= _input;
+ return _output;
+}
+float _blend_color_saturation(vec3 color) {
+ return max(max(color.x, color.y), color.z) - min(min(color.x, color.y), color.z);
+}
+vec3 _blend_set_color_saturation_helper(vec3 minMidMax, float sat) {
+ if (minMidMax.x < minMidMax.z) {
+ return vec3(0.0, (sat * (minMidMax.y - minMidMax.x)) / (minMidMax.z - minMidMax.x), sat);
+ }
+ return vec3(0.0);
+}
+vec3 _blend_set_color_saturation(vec3 hueLumColor, vec3 satColor) {
+ float sat = _blend_color_saturation(satColor);
+ if (hueLumColor.x <= hueLumColor.y) {
+ if (hueLumColor.y <= hueLumColor.z) {
+ hueLumColor.xyz = _blend_set_color_saturation_helper(hueLumColor, sat);
+ } else if (hueLumColor.x <= hueLumColor.z) {
+ hueLumColor.xzy = _blend_set_color_saturation_helper(hueLumColor.xzy, sat);
+ } else {
+ hueLumColor.zxy = _blend_set_color_saturation_helper(hueLumColor.zxy, sat);
+ }
+ } else if (hueLumColor.x <= hueLumColor.z) {
+ hueLumColor.yxz = _blend_set_color_saturation_helper(hueLumColor.yxz, sat);
+ } else if (hueLumColor.y <= hueLumColor.z) {
+ hueLumColor.yzx = _blend_set_color_saturation_helper(hueLumColor.yzx, sat);
+ } else {
+ hueLumColor.zyx = _blend_set_color_saturation_helper(hueLumColor.zyx, sat);
+ }
+ return hueLumColor;
+}
+float _blend_color_luminance(vec3 color) {
+ return dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), color);
+}
+vec3 _blend_set_color_luminance(vec3 hueSatColor, float alpha, vec3 lumColor) {
+ float lum = _blend_color_luminance(lumColor);
+ vec3 result = (lum - _blend_color_luminance(hueSatColor)) + hueSatColor;
+ float minComp = min(min(result.x, result.y), result.z);
+ float maxComp = max(max(result.x, result.y), result.z);
+ if (minComp < 0.0 && lum != minComp) {
+ result = lum + ((result - lum) * lum) / (lum - minComp);
+ }
+ if (maxComp > alpha && maxComp != lum) {
+ return lum + ((result - lum) * (alpha - lum)) / (maxComp - lum);
+ }
+ return result;
+}
+vec4 blend_hue(vec4 src, vec4 dst) {
+ float alpha = dst.w * src.w;
+ vec3 sda = src.xyz * dst.w;
+ vec3 dsa = dst.xyz * src.w;
+ return vec4((((_blend_set_color_luminance(_blend_set_color_saturation(sda, dsa), alpha, dsa) + dst.xyz) - dsa) + src.xyz) - sda, (src.w + dst.w) - alpha);
+}
+vec4 ComposeOne_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_hue(MatrixConvolution_Stage1_c0_c0_c0_c0(vec4(1.0)), _input);
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ComposeOne_Stage1_c0_c0(vec4(1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec2 inLocalCoord;
+out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec3 pos3 = uViewM_Stage0 * vec3(inPosition, 1.0);
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos3.x, pos3.y, 0.0, pos3.z);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/229-2.shader_test b/shaders/skia/229-2.shader_test
new file mode 100644
index 0000000..c786f9b
--- /dev/null
+++ b/shaders/skia/229-2.shader_test
@@ -0,0 +1,89 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage2_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c1_c0;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+vec4 blend_modulate(vec4 src, vec4 dst) {
+ return src * dst;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_dst_in(outputColor_Stage0, ClampedGradientEffect_Stage1_c0_c0(vec4(1.0)));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_modulate(ConstColorProcessor_Stage2_c1_c0(vec4(1.0)), output_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/229-3.shader_test b/shaders/skia/229-3.shader_test
new file mode 100644
index 0000000..89f4041
--- /dev/null
+++ b/shaders/skia/229-3.shader_test
@@ -0,0 +1,209 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform float uSurfaceScale_Stage1;
+uniform vec3 uLightColor_Stage1;
+uniform float uKD_Stage1;
+uniform vec4 uTexDom_Stage1;
+uniform vec3 uDecalParams_Stage1;
+uniform vec3 uLightLocation_Stage1;
+uniform float uExponent_Stage1;
+uniform float uCosInnerConeAngle_Stage1;
+uniform float uCosOuterConeAngle_Stage1;
+uniform float uConeScale_Stage1;
+uniform vec3 uS_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 light_Stage1(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ float colorScale = uKD_Stage1 * dot(normal, surfaceToLight);
+ return vec4(lightColor * clamp(colorScale, 0.0, 1.0), 1.0);
+}
+float sobel_Stage1(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage1(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage1(float m[9], float surfaceScale) {
+ return pointToNormal_Stage1(sobel_Stage1(0.0, 0.0, m[3], m[5], m[6], m[8], 0.33333298563957214), sobel_Stage1(0.0, 0.0, m[4], m[7], m[5], m[8], 0.5), surfaceScale);
+}
+vec3 lightColor_Stage1(vec3 surfaceToLight) {
+ float cosAngle = -dot(surfaceToLight, uS_Stage1);
+ if (cosAngle < uCosOuterConeAngle_Stage1) {
+ return vec3(0.0);
+ }
+ float scale = pow(cosAngle, uExponent_Stage1);
+ if (cosAngle < uCosInnerConeAngle_Stage1) {
+ return ((uLightColor_Stage1 * scale) * (cosAngle - uCosOuterConeAngle_Stage1)) * uConeScale_Stage1;
+ }
+ return uLightColor_Stage1;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ vec2 coord = vTransformedCoords_0_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp0 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp5 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp6 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp7 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp8 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = normalize(uLightLocation_Stage1 - vec3(gl_FragCoord.xy, uSurfaceScale_Stage1 * m[4]));
+ output_Stage1 = light_Stage1(normal_Stage1(m, uSurfaceScale_Stage1), surfaceToLight, lightColor_Stage1(surfaceToLight));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/229-5.shader_test b/shaders/skia/229-5.shader_test
new file mode 100644
index 0000000..95e6865
--- /dev/null
+++ b/shaders/skia/229-5.shader_test
@@ -0,0 +1,317 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage2;
+uniform vec4 uKernel_Stage2[6];
+uniform vec2 uKernelOffset_Stage2;
+uniform float uGain_Stage2;
+uniform float uBias_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ vec4 sum = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_1_Stage0 - uKernelOffset_Stage2 * uImageIncrement_Stage2;
+ vec4 c;
+ {
+ float k = uKernel_Stage2[0].x;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[0].y;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[0].z;
+ {
+ vec2 origCoord = coord + vec2(2.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[0].w;
+ {
+ vec2 origCoord = coord + vec2(3.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[1].x;
+ {
+ vec2 origCoord = coord + vec2(4.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[1].y;
+ {
+ vec2 origCoord = coord + vec2(5.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[1].z;
+ {
+ vec2 origCoord = coord + vec2(6.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[1].w;
+ {
+ vec2 origCoord = coord + vec2(7.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[2].x;
+ {
+ vec2 origCoord = coord + vec2(8.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[2].y;
+ {
+ vec2 origCoord = coord + vec2(9.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[2].z;
+ {
+ vec2 origCoord = coord + vec2(10.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[2].w;
+ {
+ vec2 origCoord = coord + vec2(11.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[3].x;
+ {
+ vec2 origCoord = coord + vec2(12.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[3].y;
+ {
+ vec2 origCoord = coord + vec2(13.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[3].z;
+ {
+ vec2 origCoord = coord + vec2(14.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[3].w;
+ {
+ vec2 origCoord = coord + vec2(15.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[4].x;
+ {
+ vec2 origCoord = coord + vec2(16.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[4].y;
+ {
+ vec2 origCoord = coord + vec2(17.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[4].z;
+ {
+ vec2 origCoord = coord + vec2(18.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[4].w;
+ {
+ vec2 origCoord = coord + vec2(19.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[5].x;
+ {
+ vec2 origCoord = coord + vec2(20.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[5].y;
+ {
+ vec2 origCoord = coord + vec2(21.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[5].z;
+ {
+ vec2 origCoord = coord + vec2(22.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[5].w;
+ {
+ vec2 origCoord = coord + vec2(23.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ output_Stage2 = sum * uGain_Stage2 + uBias_Stage2;
+ output_Stage2.w = clamp(output_Stage2.w, 0.0, 1.0);
+ output_Stage2.xyz = clamp(output_Stage2.xyz, 0.0, output_Stage2.w);
+ output_Stage2 *= output_Stage1;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/229-6.shader_test b/shaders/skia/229-6.shader_test
new file mode 100644
index 0000000..3b0478e
--- /dev/null
+++ b/shaders/skia/229-6.shader_test
@@ -0,0 +1,283 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage2_c0_c0;
+uniform float uSurfaceScale_Stage2_c0_c0;
+uniform vec3 uLightColor_Stage2_c0_c0;
+uniform float uKD_Stage2_c0_c0;
+uniform vec4 uTexDom_Stage2_c0_c0;
+uniform vec3 uDecalParams_Stage2_c0_c0;
+uniform vec3 uLightLocation_Stage2_c0_c0;
+uniform float uExponent_Stage2_c0_c0;
+uniform float uCosInnerConeAngle_Stage2_c0_c0;
+uniform float uCosOuterConeAngle_Stage2_c0_c0;
+uniform float uConeScale_Stage2_c0_c0;
+uniform vec3 uS_Stage2_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 light_Stage2_c0_c0(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ float colorScale = uKD_Stage2_c0_c0 * dot(normal, surfaceToLight);
+ return vec4(lightColor * clamp(colorScale, 0.0, 1.0), 1.0);
+}
+float sobel_Stage2_c0_c0(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage2_c0_c0(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage2_c0_c0(float m[9], float surfaceScale) {
+ return pointToNormal_Stage2_c0_c0(sobel_Stage2_c0_c0(0.0, 0.0, m[3], m[4], m[6], m[7], 0.66666698455810547), sobel_Stage2_c0_c0(m[3], m[6], m[4], m[7], 0.0, 0.0, 0.66666698455810547), surfaceScale);
+}
+vec3 lightColor_Stage2_c0_c0(vec3 surfaceToLight) {
+ float cosAngle = -dot(surfaceToLight, uS_Stage2_c0_c0);
+ if (cosAngle < uCosOuterConeAngle_Stage2_c0_c0) {
+ return vec3(0.0);
+ }
+ float scale = pow(cosAngle, uExponent_Stage2_c0_c0);
+ if (cosAngle < uCosInnerConeAngle_Stage2_c0_c0) {
+ return ((uLightColor_Stage2_c0_c0 * scale) * (cosAngle - uCosOuterConeAngle_Stage2_c0_c0)) * uConeScale_Stage2_c0_c0;
+ }
+ return uLightColor_Stage2_c0_c0;
+}
+vec4 DiffuseLighting_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coord = vTransformedCoords_1_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c0_c0.y);
+ if (err > uDecalParams_Stage2_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp0 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c0_c0.y);
+ if (err > uDecalParams_Stage2_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c0_c0.y);
+ if (err > uDecalParams_Stage2_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c0_c0.y);
+ if (err > uDecalParams_Stage2_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c0_c0.y);
+ if (err > uDecalParams_Stage2_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c0_c0.y);
+ if (err > uDecalParams_Stage2_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp5 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c0_c0.y);
+ if (err > uDecalParams_Stage2_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp6 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c0_c0.y);
+ if (err > uDecalParams_Stage2_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp7 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c0_c0.y);
+ if (err > uDecalParams_Stage2_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp8 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = normalize(uLightLocation_Stage2_c0_c0 - vec3(gl_FragCoord.xy, uSurfaceScale_Stage2_c0_c0 * m[4]));
+ _output = light_Stage2_c0_c0(normal_Stage2_c0_c0(m, uSurfaceScale_Stage2_c0_c0), surfaceToLight, lightColor_Stage2_c0_c0(surfaceToLight));
+ _output *= _input;
+ return _output;
+}
+vec4 ClampFragmentProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = clamp(_input, 0.0, 1.0);
+ }
+ return _output;
+}
+float _blend_color_saturation(vec3 color) {
+ return max(max(color.x, color.y), color.z) - min(min(color.x, color.y), color.z);
+}
+vec3 _blend_set_color_saturation_helper(vec3 minMidMax, float sat) {
+ if (minMidMax.x < minMidMax.z) {
+ return vec3(0.0, (sat * (minMidMax.y - minMidMax.x)) / (minMidMax.z - minMidMax.x), sat);
+ }
+ return vec3(0.0);
+}
+vec3 _blend_set_color_saturation(vec3 hueLumColor, vec3 satColor) {
+ float sat = _blend_color_saturation(satColor);
+ if (hueLumColor.x <= hueLumColor.y) {
+ if (hueLumColor.y <= hueLumColor.z) {
+ hueLumColor.xyz = _blend_set_color_saturation_helper(hueLumColor, sat);
+ } else if (hueLumColor.x <= hueLumColor.z) {
+ hueLumColor.xzy = _blend_set_color_saturation_helper(hueLumColor.xzy, sat);
+ } else {
+ hueLumColor.zxy = _blend_set_color_saturation_helper(hueLumColor.zxy, sat);
+ }
+ } else if (hueLumColor.x <= hueLumColor.z) {
+ hueLumColor.yxz = _blend_set_color_saturation_helper(hueLumColor.yxz, sat);
+ } else if (hueLumColor.y <= hueLumColor.z) {
+ hueLumColor.yzx = _blend_set_color_saturation_helper(hueLumColor.yzx, sat);
+ } else {
+ hueLumColor.zyx = _blend_set_color_saturation_helper(hueLumColor.zyx, sat);
+ }
+ return hueLumColor;
+}
+float _blend_color_luminance(vec3 color) {
+ return dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), color);
+}
+vec3 _blend_set_color_luminance(vec3 hueSatColor, float alpha, vec3 lumColor) {
+ float lum = _blend_color_luminance(lumColor);
+ vec3 result = (lum - _blend_color_luminance(hueSatColor)) + hueSatColor;
+ float minComp = min(min(result.x, result.y), result.z);
+ float maxComp = max(max(result.x, result.y), result.z);
+ if (minComp < 0.0 && lum != minComp) {
+ result = lum + ((result - lum) * lum) / (lum - minComp);
+ }
+ if (maxComp > alpha && maxComp != lum) {
+ return lum + ((result - lum) * (alpha - lum)) / (maxComp - lum);
+ }
+ return result;
+}
+vec4 blend_saturation(vec4 src, vec4 dst) {
+ float alpha = dst.w * src.w;
+ vec3 sda = src.xyz * dst.w;
+ vec3 dsa = dst.xyz * src.w;
+ return vec4((((_blend_set_color_luminance(_blend_set_color_saturation(dsa, sda), alpha, dsa) + dst.xyz) - dsa) + src.xyz) - sda, (src.w + dst.w) - alpha);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ vec4 inputColor = vec4(output_Stage1.xyz, 1.0);
+ output_Stage2 = blend_saturation(DiffuseLighting_Stage2_c0_c0(inputColor), ClampFragmentProcessor_Stage2_c1_c0(inputColor));
+ output_Stage2 *= output_Stage1.w;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/229.shader_test b/shaders/skia/229.shader_test
new file mode 100644
index 0000000..ee461ee
--- /dev/null
+++ b/shaders/skia/229.shader_test
@@ -0,0 +1,81 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 ucolor_Stage1_c0_c0_c0_c0;
+uniform vec4 ucolor_Stage2_c1_c0;
+noperspective in vec4 vcolor_Stage0;
+vec4 ConstColorProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = _input.w * ucolor_Stage1_c0_c0_c0_c0;
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = ConstColorProcessor_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c1_c0;
+ }
+ return _output;
+}
+vec4 blend_src_atop(vec4 src, vec4 dst) {
+ return dst.w * src + (1.0 - src.w) * dst;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 blend_darken(vec4 src, vec4 dst) {
+ vec4 result = blend_src_over(src, dst);
+ result.xyz = min(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
+ return result;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_src_atop(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_darken(ConstColorProcessor_Stage2_c1_c0(vec4(1.0)), output_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 position;
+in vec4 inColor;
+noperspective out vec4 vcolor_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/2290.shader_test b/shaders/skia/2290.shader_test
new file mode 100644
index 0000000..7497ec5
--- /dev/null
+++ b/shaders/skia/2290.shader_test
@@ -0,0 +1,300 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1_c0_c0_c0_c0;
+uniform float uSurfaceScale_Stage1_c0_c0_c0_c0;
+uniform vec3 uLightColor_Stage1_c0_c0_c0_c0;
+uniform float uKD_Stage1_c0_c0_c0_c0;
+uniform vec4 uTexDom_Stage1_c0_c0_c0_c0;
+uniform vec3 uDecalParams_Stage1_c0_c0_c0_c0;
+uniform vec3 uLightDirection_Stage1_c0_c0_c0_c0;
+uniform vec2 uDstTextureUpperLeft_Stage2;
+uniform vec2 uDstTextureCoordScale_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uDstTextureSampler_Stage2;
+noperspective in vec2 vEllipseOffsets0_Stage0;
+noperspective in vec2 vEllipseOffsets1_Stage0;
+noperspective in vec4 vinColor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 light_Stage1_c0_c0_c0_c0(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ float colorScale = uKD_Stage1_c0_c0_c0_c0 * dot(normal, surfaceToLight);
+ return vec4(lightColor * clamp(colorScale, 0.0, 1.0), 1.0);
+}
+float sobel_Stage1_c0_c0_c0_c0(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage1_c0_c0_c0_c0(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage1_c0_c0_c0_c0(float m[9], float surfaceScale) {
+ return pointToNormal_Stage1_c0_c0_c0_c0(sobel_Stage1_c0_c0_c0_c0(m[0], m[1], m[3], m[4], 0.0, 0.0, 0.66666698455810547), sobel_Stage1_c0_c0_c0_c0(m[0], m[3], m[1], m[4], 0.0, 0.0, 0.66666698455810547), surfaceScale);
+}
+vec4 DiffuseLighting_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coord = vTransformedCoords_0_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage1_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp0 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage1_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp5 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage1_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp6 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage1_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp7 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage1_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp8 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = uLightDirection_Stage1_c0_c0_c0_c0;
+ _output = light_Stage1_c0_c0_c0_c0(normal_Stage1_c0_c0_c0_c0(m, uSurfaceScale_Stage1_c0_c0_c0_c0), surfaceToLight, uLightColor_Stage1_c0_c0_c0_c0);
+ _output *= _input;
+ return _output;
+}
+float _blend_color_saturation(vec3 color) {
+ return max(max(color.x, color.y), color.z) - min(min(color.x, color.y), color.z);
+}
+vec3 _blend_set_color_saturation_helper(vec3 minMidMax, float sat) {
+ if (minMidMax.x < minMidMax.z) {
+ return vec3(0.0, (sat * (minMidMax.y - minMidMax.x)) / (minMidMax.z - minMidMax.x), sat);
+ }
+ return vec3(0.0);
+}
+vec3 _blend_set_color_saturation(vec3 hueLumColor, vec3 satColor) {
+ float sat = _blend_color_saturation(satColor);
+ if (hueLumColor.x <= hueLumColor.y) {
+ if (hueLumColor.y <= hueLumColor.z) {
+ hueLumColor.xyz = _blend_set_color_saturation_helper(hueLumColor, sat);
+ } else if (hueLumColor.x <= hueLumColor.z) {
+ hueLumColor.xzy = _blend_set_color_saturation_helper(hueLumColor.xzy, sat);
+ } else {
+ hueLumColor.zxy = _blend_set_color_saturation_helper(hueLumColor.zxy, sat);
+ }
+ } else if (hueLumColor.x <= hueLumColor.z) {
+ hueLumColor.yxz = _blend_set_color_saturation_helper(hueLumColor.yxz, sat);
+ } else if (hueLumColor.y <= hueLumColor.z) {
+ hueLumColor.yzx = _blend_set_color_saturation_helper(hueLumColor.yzx, sat);
+ } else {
+ hueLumColor.zyx = _blend_set_color_saturation_helper(hueLumColor.zyx, sat);
+ }
+ return hueLumColor;
+}
+float _blend_color_luminance(vec3 color) {
+ return dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), color);
+}
+vec3 _blend_set_color_luminance(vec3 hueSatColor, float alpha, vec3 lumColor) {
+ float lum = _blend_color_luminance(lumColor);
+ vec3 result = (lum - _blend_color_luminance(hueSatColor)) + hueSatColor;
+ float minComp = min(min(result.x, result.y), result.z);
+ float maxComp = max(max(result.x, result.y), result.z);
+ if (minComp < 0.0 && lum != minComp) {
+ result = lum + ((result - lum) * lum) / (lum - minComp);
+ }
+ if (maxComp > alpha && maxComp != lum) {
+ return lum + ((result - lum) * (alpha - lum)) / (maxComp - lum);
+ }
+ return result;
+}
+vec4 blend_saturation(vec4 src, vec4 dst) {
+ float alpha = dst.w * src.w;
+ vec3 sda = src.xyz * dst.w;
+ vec3 dsa = dst.xyz * src.w;
+ return vec4((((_blend_set_color_luminance(_blend_set_color_saturation(dsa, sda), alpha, dsa) + dst.xyz) - dsa) + src.xyz) - sda, (src.w + dst.w) - alpha);
+}
+vec4 ComposeOne_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_saturation(_input, DiffuseLighting_Stage1_c0_c0_c0_c0(vec4(1.0)));
+ return _output;
+}
+vec4 blend_src(vec4 src, vec4 dst) {
+ return src;
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ vec2 scaledOffset = vEllipseOffsets0_Stage0;
+ float test = dot(scaledOffset, scaledOffset) - 1.0;
+ vec2 duvdx = dFdx(vEllipseOffsets0_Stage0);
+ vec2 duvdy = -dFdy(vEllipseOffsets0_Stage0);
+ vec2 grad = vec2(vEllipseOffsets0_Stage0.x * duvdx.x + vEllipseOffsets0_Stage0.y * duvdx.y, vEllipseOffsets0_Stage0.x * duvdy.x + vEllipseOffsets0_Stage0.y * duvdy.y);
+ float grad_dot = 4.0 * dot(grad, grad);
+ grad_dot = max(grad_dot, 1.1754999560161448e-38);
+ float invlen = inversesqrt(grad_dot);
+ float edgeAlpha = clamp(0.5 - test * invlen, 0.0, 1.0);
+ scaledOffset = vEllipseOffsets1_Stage0;
+ test = dot(scaledOffset, scaledOffset) - 1.0;
+ duvdx = dFdx(vEllipseOffsets1_Stage0);
+ duvdy = -dFdy(vEllipseOffsets1_Stage0);
+ grad = vec2(vEllipseOffsets1_Stage0.x * duvdx.x + vEllipseOffsets1_Stage0.y * duvdx.y, vEllipseOffsets1_Stage0.x * duvdy.x + vEllipseOffsets1_Stage0.y * duvdy.y);
+ grad_dot = 4.0 * dot(grad, grad);
+ invlen = inversesqrt(grad_dot);
+ edgeAlpha *= clamp(0.5 + test * invlen, 0.0, 1.0);
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ComposeOne_Stage1_c0_c0(vec4(1.0));
+ }
+ {
+ if (all(lessThanEqual(outputCoverage_Stage0.xyz, vec3(0.0)))) {
+ discard;
+ }
+ vec2 _dstTexCoord = (gl_FragCoord.xy - uDstTextureUpperLeft_Stage2) * uDstTextureCoordScale_Stage2;
+ _dstTexCoord.y = 1.0 - _dstTexCoord.y;
+ vec4 _dstColor = texture(uDstTextureSampler_Stage2, _dstTexCoord);
+ sk_FragColor = blend_src(output_Stage1, _dstColor);
+ sk_FragColor = outputCoverage_Stage0 * sk_FragColor + (vec4(1.0) - outputCoverage_Stage0) * _dstColor;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec2 inEllipseOffsets0;
+in vec2 inEllipseOffsets1;
+noperspective out vec2 vEllipseOffsets0_Stage0;
+noperspective out vec2 vEllipseOffsets1_Stage0;
+noperspective out vec4 vinColor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vEllipseOffsets0_Stage0 = inEllipseOffsets0;
+ vEllipseOffsets1_Stage0 = inEllipseOffsets1;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/2293.shader_test b/shaders/skia/2293.shader_test
new file mode 100644
index 0000000..e0d9a64
--- /dev/null
+++ b/shaders/skia/2293.shader_test
@@ -0,0 +1,42 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 urectUniform_Stage1_c0_c0;
+vec4 AARectEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ float alpha;
+ {
+ alpha = float(all(greaterThan(vec4(gl_FragCoord.xy, urectUniform_Stage1_c0_c0.zw), vec4(urectUniform_Stage1_c0_c0.xy, gl_FragCoord.xy))) ? 1 : 0);
+ }
+ {
+ alpha = 1.0 - alpha;
+ }
+ _output = _input * alpha;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = AARectEffect_Stage1_c0_c0(vec4(1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 position;
+void main() {
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/2296.shader_test b/shaders/skia/2296.shader_test
new file mode 100644
index 0000000..f5c3baa
--- /dev/null
+++ b/shaders/skia/2296.shader_test
@@ -0,0 +1,85 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 urectUniform_Stage1_c0_c0;
+uniform vec2 uDstTextureUpperLeft_Stage2;
+uniform vec2 uDstTextureCoordScale_Stage2;
+uniform sampler2D uDstTextureSampler_Stage2;
+in vec2 vEllipseOffsets0_Stage0;
+in vec2 vEllipseOffsets1_Stage0;
+in vec4 vinColor_Stage0;
+vec4 AARectEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ float alpha;
+ {
+ float xSub, ySub;
+ xSub = min(gl_FragCoord.x - urectUniform_Stage1_c0_c0.x, 0.0);
+ xSub += min(urectUniform_Stage1_c0_c0.z - gl_FragCoord.x, 0.0);
+ ySub = min(gl_FragCoord.y - urectUniform_Stage1_c0_c0.y, 0.0);
+ ySub += min(urectUniform_Stage1_c0_c0.w - gl_FragCoord.y, 0.0);
+ alpha = (1.0 + max(xSub, -1.0)) * (1.0 + max(ySub, -1.0));
+ }
+ _output = _input * alpha;
+ return _output;
+}
+vec4 blend_src(vec4 src, vec4 dst) {
+ return src;
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ vec2 scaledOffset = vEllipseOffsets0_Stage0;
+ float test = dot(scaledOffset, scaledOffset) - 1.0;
+ vec2 duvdx = dFdx(vEllipseOffsets0_Stage0);
+ vec2 duvdy = -dFdy(vEllipseOffsets0_Stage0);
+ vec2 grad = vec2(vEllipseOffsets0_Stage0.x * duvdx.x + vEllipseOffsets0_Stage0.y * duvdx.y, vEllipseOffsets0_Stage0.x * duvdy.x + vEllipseOffsets0_Stage0.y * duvdy.y);
+ float grad_dot = 4.0 * dot(grad, grad);
+ grad_dot = max(grad_dot, 1.1754999560161448e-38);
+ float invlen = inversesqrt(grad_dot);
+ float edgeAlpha = clamp(1.0 - test * invlen, 0.0, 1.0);
+ edgeAlpha *= clamp(1.0 + test * invlen, 0.0, 1.0);
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = AARectEffect_Stage1_c0_c0(vec4(1.0));
+ }
+ {
+ if (all(lessThanEqual(outputCoverage_Stage0.xyz, vec3(0.0)))) {
+ discard;
+ }
+ vec2 _dstTexCoord = (gl_FragCoord.xy - uDstTextureUpperLeft_Stage2) * uDstTextureCoordScale_Stage2;
+ _dstTexCoord.y = 1.0 - _dstTexCoord.y;
+ vec4 _dstColor = texture(uDstTextureSampler_Stage2, _dstTexCoord);
+ sk_FragColor = blend_src(output_Stage1, _dstColor);
+ sk_FragColor = outputCoverage_Stage0 * sk_FragColor + (vec4(1.0) - outputCoverage_Stage0) * _dstColor;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec2 inEllipseOffsets0;
+in vec2 inEllipseOffsets1;
+out vec2 vEllipseOffsets0_Stage0;
+out vec2 vEllipseOffsets1_Stage0;
+out vec4 vinColor_Stage0;
+void main() {
+ vEllipseOffsets0_Stage0 = inEllipseOffsets0;
+ vEllipseOffsets1_Stage0 = inEllipseOffsets1;
+ vinColor_Stage0 = inColor;
+ vec3 pos3 = uViewM_Stage0 * vec3(inPosition, 1.0);
+ gl_Position = vec4(pos3.x, pos3.y, 0.0, pos3.z);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/2299.shader_test b/shaders/skia/2299.shader_test
new file mode 100644
index 0000000..4e9693b
--- /dev/null
+++ b/shaders/skia/2299.shader_test
@@ -0,0 +1,44 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 urectUniform_Stage1_c0_c0;
+vec4 AARectEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ float alpha;
+ {
+ float xSub, ySub;
+ xSub = min(gl_FragCoord.x - urectUniform_Stage1_c0_c0.x, 0.0);
+ xSub += min(urectUniform_Stage1_c0_c0.z - gl_FragCoord.x, 0.0);
+ ySub = min(gl_FragCoord.y - urectUniform_Stage1_c0_c0.y, 0.0);
+ ySub += min(urectUniform_Stage1_c0_c0.w - gl_FragCoord.y, 0.0);
+ alpha = (1.0 + max(xSub, -1.0)) * (1.0 + max(ySub, -1.0));
+ }
+ _output = _input * alpha;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = AARectEffect_Stage1_c0_c0(vec4(1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 position;
+void main() {
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/2302.shader_test b/shaders/skia/2302.shader_test
new file mode 100644
index 0000000..ea3a098
--- /dev/null
+++ b/shaders/skia/2302.shader_test
@@ -0,0 +1,70 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 urectUniform_Stage1_c0_c0;
+uniform vec2 uDstTextureUpperLeft_Stage2;
+uniform vec2 uDstTextureCoordScale_Stage2;
+uniform sampler2D uDstTextureSampler_Stage2;
+noperspective in float vcoverage_Stage0;
+vec4 AARectEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ float alpha;
+ {
+ float xSub, ySub;
+ xSub = min(gl_FragCoord.x - urectUniform_Stage1_c0_c0.x, 0.0);
+ xSub += min(urectUniform_Stage1_c0_c0.z - gl_FragCoord.x, 0.0);
+ ySub = min(gl_FragCoord.y - urectUniform_Stage1_c0_c0.y, 0.0);
+ ySub += min(urectUniform_Stage1_c0_c0.w - gl_FragCoord.y, 0.0);
+ alpha = (1.0 + max(xSub, -1.0)) * (1.0 + max(ySub, -1.0));
+ }
+ {
+ alpha = 1.0 - alpha;
+ }
+ _output = _input * alpha;
+ return _output;
+}
+vec4 blend_src(vec4 src, vec4 dst) {
+ return src;
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ float coverage = vcoverage_Stage0;
+ outputCoverage_Stage0 = vec4(coverage);
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = AARectEffect_Stage1_c0_c0(vec4(1.0));
+ }
+ {
+ if (all(lessThanEqual(outputCoverage_Stage0.xyz, vec3(0.0)))) {
+ discard;
+ }
+ vec2 _dstTexCoord = (gl_FragCoord.xy - uDstTextureUpperLeft_Stage2) * uDstTextureCoordScale_Stage2;
+ _dstTexCoord.y = 1.0 - _dstTexCoord.y;
+ vec4 _dstColor = texture(uDstTextureSampler_Stage2, _dstTexCoord);
+ sk_FragColor = blend_src(output_Stage1, _dstColor);
+ sk_FragColor = outputCoverage_Stage0 * sk_FragColor + (vec4(1.0) - outputCoverage_Stage0) * _dstColor;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 position;
+in float coverage;
+noperspective out float vcoverage_Stage0;
+void main() {
+ vec2 position = position;
+ vcoverage_Stage0 = coverage;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/2305.shader_test b/shaders/skia/2305.shader_test
new file mode 100644
index 0000000..9c46ca8
--- /dev/null
+++ b/shaders/skia/2305.shader_test
@@ -0,0 +1,81 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec2 uDstTextureUpperLeft_Stage2;
+uniform vec2 uDstTextureCoordScale_Stage2;
+uniform sampler2D uDstTextureSampler_Stage2;
+noperspective in vec2 vEllipseOffsets_Stage0;
+noperspective in vec4 vEllipseRadii_Stage0;
+noperspective in vec4 vinColor_Stage0;
+vec4 ClampFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ float alpha = clamp(_input.w, 0.0, 1.0);
+ _output = vec4(clamp(_input.xyz, 0.0, alpha), alpha);
+ }
+ return _output;
+}
+vec4 blend_src(vec4 src, vec4 dst) {
+ return src;
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ vec2 offset = vEllipseOffsets_Stage0;
+ offset *= vEllipseRadii_Stage0.xy;
+ float test = dot(offset, offset) - 1.0;
+ vec2 grad = (2.0 * offset) * vEllipseRadii_Stage0.xy;
+ float grad_dot = dot(grad, grad);
+ grad_dot = max(grad_dot, 1.1754999560161448e-38);
+ float invlen = inversesqrt(grad_dot);
+ float edgeAlpha = clamp(0.5 - test * invlen, 0.0, 1.0);
+ offset = vEllipseOffsets_Stage0 * vEllipseRadii_Stage0.zw;
+ test = dot(offset, offset) - 1.0;
+ grad = (2.0 * offset) * vEllipseRadii_Stage0.zw;
+ grad_dot = dot(grad, grad);
+ invlen = inversesqrt(grad_dot);
+ edgeAlpha *= clamp(0.5 + test * invlen, 0.0, 1.0);
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampFragmentProcessor_Stage1_c0_c0(vec4(1.0));
+ }
+ {
+ if (all(lessThanEqual(outputCoverage_Stage0.xyz, vec3(0.0)))) {
+ discard;
+ }
+ vec2 _dstTexCoord = (gl_FragCoord.xy - uDstTextureUpperLeft_Stage2) * uDstTextureCoordScale_Stage2;
+ _dstTexCoord.y = 1.0 - _dstTexCoord.y;
+ vec4 _dstColor = texture(uDstTextureSampler_Stage2, _dstTexCoord);
+ sk_FragColor = blend_src(output_Stage1, _dstColor);
+ sk_FragColor = outputCoverage_Stage0 * sk_FragColor + (vec4(1.0) - outputCoverage_Stage0) * _dstColor;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 inPosition;
+in vec4 inColor;
+in vec2 inEllipseOffset;
+in vec4 inEllipseRadii;
+noperspective out vec2 vEllipseOffsets_Stage0;
+noperspective out vec4 vEllipseRadii_Stage0;
+noperspective out vec4 vinColor_Stage0;
+void main() {
+ vEllipseOffsets_Stage0 = inEllipseOffset;
+ vEllipseRadii_Stage0 = inEllipseRadii;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = inPosition;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/2308.shader_test b/shaders/skia/2308.shader_test
new file mode 100644
index 0000000..0a3ede3
--- /dev/null
+++ b/shaders/skia/2308.shader_test
@@ -0,0 +1,91 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform mat4 um_Stage1_c0_c0;
+uniform vec4 uv_Stage1_c0_c0;
+uniform vec2 uDstTextureUpperLeft_Stage2;
+uniform vec2 uDstTextureCoordScale_Stage2;
+uniform sampler2D uDstTextureSampler_Stage2;
+noperspective in vec2 vEllipseOffsets_Stage0;
+noperspective in vec4 vEllipseRadii_Stage0;
+noperspective in vec4 vinColor_Stage0;
+vec4 ColorMatrixFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = _input;
+ {
+ float nonZeroAlpha = max(inputColor.w, 9.9999997473787516e-05);
+ inputColor = vec4(inputColor.xyz / nonZeroAlpha, inputColor.w);
+ }
+ _output = um_Stage1_c0_c0 * inputColor + uv_Stage1_c0_c0;
+ {
+ _output.w = clamp(_output.w, 0.0, 1.0);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_src(vec4 src, vec4 dst) {
+ return src;
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ vec2 offset = vEllipseOffsets_Stage0;
+ offset *= vEllipseRadii_Stage0.xy;
+ float test = dot(offset, offset) - 1.0;
+ vec2 grad = (2.0 * offset) * vEllipseRadii_Stage0.xy;
+ float grad_dot = dot(grad, grad);
+ grad_dot = max(grad_dot, 1.1754999560161448e-38);
+ float invlen = inversesqrt(grad_dot);
+ float edgeAlpha = clamp(0.5 - test * invlen, 0.0, 1.0);
+ offset = vEllipseOffsets_Stage0 * vEllipseRadii_Stage0.zw;
+ test = dot(offset, offset) - 1.0;
+ grad = (2.0 * offset) * vEllipseRadii_Stage0.zw;
+ grad_dot = dot(grad, grad);
+ invlen = inversesqrt(grad_dot);
+ edgeAlpha *= clamp(0.5 + test * invlen, 0.0, 1.0);
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ColorMatrixFragmentProcessor_Stage1_c0_c0(vec4(1.0));
+ }
+ {
+ if (all(lessThanEqual(outputCoverage_Stage0.xyz, vec3(0.0)))) {
+ discard;
+ }
+ vec2 _dstTexCoord = (gl_FragCoord.xy - uDstTextureUpperLeft_Stage2) * uDstTextureCoordScale_Stage2;
+ _dstTexCoord.y = 1.0 - _dstTexCoord.y;
+ vec4 _dstColor = texture(uDstTextureSampler_Stage2, _dstTexCoord);
+ sk_FragColor = blend_src(output_Stage1, _dstColor);
+ sk_FragColor = outputCoverage_Stage0 * sk_FragColor + (vec4(1.0) - outputCoverage_Stage0) * _dstColor;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 inPosition;
+in vec4 inColor;
+in vec2 inEllipseOffset;
+in vec4 inEllipseRadii;
+noperspective out vec2 vEllipseOffsets_Stage0;
+noperspective out vec4 vEllipseRadii_Stage0;
+noperspective out vec4 vinColor_Stage0;
+void main() {
+ vEllipseOffsets_Stage0 = inEllipseOffset;
+ vEllipseRadii_Stage0 = inEllipseRadii;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = inPosition;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/2311.shader_test b/shaders/skia/2311.shader_test
new file mode 100644
index 0000000..e3c73ba
--- /dev/null
+++ b/shaders/skia/2311.shader_test
@@ -0,0 +1,72 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform mat4 um_Stage1_c0_c0;
+uniform vec4 uv_Stage1_c0_c0;
+uniform vec2 uDstTextureUpperLeft_Stage2;
+uniform vec2 uDstTextureCoordScale_Stage2;
+uniform sampler2D uDstTextureSampler_Stage2;
+noperspective in vec4 vcolor_Stage0;
+noperspective in float vinCoverage_Stage0;
+vec4 ColorMatrixFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = _input;
+ _output = um_Stage1_c0_c0 * inputColor + uv_Stage1_c0_c0;
+ {
+ _output = clamp(_output, 0.0, 1.0);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_src(vec4 src, vec4 dst) {
+ return src;
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ float alpha = 1.0;
+ alpha = vinCoverage_Stage0;
+ outputCoverage_Stage0 = vec4(alpha);
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ColorMatrixFragmentProcessor_Stage1_c0_c0(vec4(1.0));
+ }
+ {
+ if (all(lessThanEqual(outputCoverage_Stage0.xyz, vec3(0.0)))) {
+ discard;
+ }
+ vec2 _dstTexCoord = (gl_FragCoord.xy - uDstTextureUpperLeft_Stage2) * uDstTextureCoordScale_Stage2;
+ _dstTexCoord.y = 1.0 - _dstTexCoord.y;
+ vec4 _dstColor = texture(uDstTextureSampler_Stage2, _dstTexCoord);
+ sk_FragColor = blend_src(output_Stage1, _dstColor);
+ sk_FragColor = outputCoverage_Stage0 * sk_FragColor + (vec4(1.0) - outputCoverage_Stage0) * _dstColor;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 inPosition;
+in vec4 inColor;
+in float inCoverage;
+noperspective out vec4 vcolor_Stage0;
+noperspective out float vinCoverage_Stage0;
+void main() {
+ vec4 color = inColor;
+ vcolor_Stage0 = color;
+ vec2 pos2 = inPosition;
+ vinCoverage_Stage0 = inCoverage;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/2314.shader_test b/shaders/skia/2314.shader_test
new file mode 100644
index 0000000..1d553dd
--- /dev/null
+++ b/shaders/skia/2314.shader_test
@@ -0,0 +1,38 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uColor_Stage0;
+vec4 ConfigConversionEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = floor(_input * 255.0 + 0.5) / 255.0;
+ {
+ _output.xyz = floor((_output.xyz * _output.w) * 255.0 + 0.5) / 255.0;
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ConfigConversionEffect_Stage1_c0_c0(vec4(1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 inPosition;
+void main() {
+ vec3 pos3 = uViewM_Stage0 * vec3(inPosition, 1.0);
+ gl_Position = vec4(pos3.x, pos3.y, 0.0, pos3.z);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/2317.shader_test b/shaders/skia/2317.shader_test
new file mode 100644
index 0000000..7b2543d
--- /dev/null
+++ b/shaders/skia/2317.shader_test
@@ -0,0 +1,43 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+noperspective in vec4 vcolor_Stage0;
+vec4 ConfigConversionEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = floor(_input * 255.0 + 0.5) / 255.0;
+ {
+ _output.xyz = floor((_output.xyz * _output.w) * 255.0 + 0.5) / 255.0;
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ConfigConversionEffect_Stage1_c0_c0(vec4(1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec2 inLocalCoord;
+noperspective out vec4 vcolor_Stage0;
+void main() {
+ vec4 color = inColor;
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/232-2.shader_test b/shaders/skia/232-2.shader_test
new file mode 100644
index 0000000..e4d1dda
--- /dev/null
+++ b/shaders/skia/232-2.shader_test
@@ -0,0 +1,78 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage2_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c1_c0;
+ }
+ return _output;
+}
+vec4 blend_modulate(vec4 src, vec4 dst) {
+ return src * dst;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_modulate(ConstColorProcessor_Stage2_c1_c0(vec4(1.0)), output_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/232-3.shader_test b/shaders/skia/232-3.shader_test
new file mode 100644
index 0000000..5cf53ad
--- /dev/null
+++ b/shaders/skia/232-3.shader_test
@@ -0,0 +1,209 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform float uSurfaceScale_Stage1;
+uniform vec3 uLightColor_Stage1;
+uniform float uKD_Stage1;
+uniform vec4 uTexDom_Stage1;
+uniform vec3 uDecalParams_Stage1;
+uniform vec3 uLightLocation_Stage1;
+uniform float uExponent_Stage1;
+uniform float uCosInnerConeAngle_Stage1;
+uniform float uCosOuterConeAngle_Stage1;
+uniform float uConeScale_Stage1;
+uniform vec3 uS_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 light_Stage1(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ float colorScale = uKD_Stage1 * dot(normal, surfaceToLight);
+ return vec4(lightColor * clamp(colorScale, 0.0, 1.0), 1.0);
+}
+float sobel_Stage1(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage1(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage1(float m[9], float surfaceScale) {
+ return pointToNormal_Stage1(sobel_Stage1(0.0, 0.0, m[3], m[4], m[6], m[7], 0.66666698455810547), sobel_Stage1(m[3], m[6], m[4], m[7], 0.0, 0.0, 0.66666698455810547), surfaceScale);
+}
+vec3 lightColor_Stage1(vec3 surfaceToLight) {
+ float cosAngle = -dot(surfaceToLight, uS_Stage1);
+ if (cosAngle < uCosOuterConeAngle_Stage1) {
+ return vec3(0.0);
+ }
+ float scale = pow(cosAngle, uExponent_Stage1);
+ if (cosAngle < uCosInnerConeAngle_Stage1) {
+ return ((uLightColor_Stage1 * scale) * (cosAngle - uCosOuterConeAngle_Stage1)) * uConeScale_Stage1;
+ }
+ return uLightColor_Stage1;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ vec2 coord = vTransformedCoords_0_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp0 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp5 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp6 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp7 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp8 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = normalize(uLightLocation_Stage1 - vec3(gl_FragCoord.xy, uSurfaceScale_Stage1 * m[4]));
+ output_Stage1 = light_Stage1(normal_Stage1(m, uSurfaceScale_Stage1), surfaceToLight, lightColor_Stage1(surfaceToLight));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/232-5.shader_test b/shaders/skia/232-5.shader_test
new file mode 100644
index 0000000..8572ecd
--- /dev/null
+++ b/shaders/skia/232-5.shader_test
@@ -0,0 +1,386 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage2;
+uniform vec4 uKernel_Stage2[7];
+uniform vec2 uKernelOffset_Stage2;
+uniform float uGain_Stage2;
+uniform float uBias_Stage2;
+uniform vec4 uTexDom_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ vec4 sum = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_1_Stage0 - uKernelOffset_Stage2 * uImageIncrement_Stage2;
+ vec4 c;
+ {
+ float k = uKernel_Stage2[0].x;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[0].y;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[0].z;
+ {
+ vec2 origCoord = coord + vec2(2.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[0].w;
+ {
+ vec2 origCoord = coord + vec2(3.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[1].x;
+ {
+ vec2 origCoord = coord + vec2(4.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[1].y;
+ {
+ vec2 origCoord = coord + vec2(5.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[1].z;
+ {
+ vec2 origCoord = coord + vec2(6.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[1].w;
+ {
+ vec2 origCoord = coord + vec2(7.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[2].x;
+ {
+ vec2 origCoord = coord + vec2(8.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[2].y;
+ {
+ vec2 origCoord = coord + vec2(9.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[2].z;
+ {
+ vec2 origCoord = coord + vec2(10.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[2].w;
+ {
+ vec2 origCoord = coord + vec2(11.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[3].x;
+ {
+ vec2 origCoord = coord + vec2(12.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[3].y;
+ {
+ vec2 origCoord = coord + vec2(13.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[3].z;
+ {
+ vec2 origCoord = coord + vec2(14.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[3].w;
+ {
+ vec2 origCoord = coord + vec2(15.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[4].x;
+ {
+ vec2 origCoord = coord + vec2(16.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[4].y;
+ {
+ vec2 origCoord = coord + vec2(17.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[4].z;
+ {
+ vec2 origCoord = coord + vec2(18.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[4].w;
+ {
+ vec2 origCoord = coord + vec2(19.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[5].x;
+ {
+ vec2 origCoord = coord + vec2(20.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[5].y;
+ {
+ vec2 origCoord = coord + vec2(21.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[5].z;
+ {
+ vec2 origCoord = coord + vec2(22.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[5].w;
+ {
+ vec2 origCoord = coord + vec2(23.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[6].x;
+ {
+ vec2 origCoord = coord + vec2(24.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ vec2 origCoord = vTransformedCoords_1_Stage0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ c = textureColor;
+ }
+ output_Stage2.w = c.w;
+ output_Stage2.xyz = clamp(sum.xyz * uGain_Stage2 + uBias_Stage2, 0.0, 1.0);
+ output_Stage2.xyz *= output_Stage2.w;
+ output_Stage2 *= output_Stage1;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/232.shader_test b/shaders/skia/232.shader_test
new file mode 100644
index 0000000..eca7ee0
--- /dev/null
+++ b/shaders/skia/232.shader_test
@@ -0,0 +1,145 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage2;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.w) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ } else {
+ {
+ if (t < uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+vec4 ComposeOne_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_dst_in(_input, TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0)));
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = ComposeOne_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 blend_src_atop(vec4 src, vec4 dst) {
+ return dst.w * src + (1.0 - src.w) * dst;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_src_atop(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ {
+ output_Stage2 = output_Stage1 * ucolor_Stage2;
+ }
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 inColor;
+in vec2 inLocalCoord;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/2320.shader_test b/shaders/skia/2320.shader_test
new file mode 100644
index 0000000..52e2247
--- /dev/null
+++ b/shaders/skia/2320.shader_test
@@ -0,0 +1,44 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+noperspective in vec4 vcolor_Stage0;
+vec4 ConfigConversionEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = floor(_input * 255.0 + 0.5) / 255.0;
+ {
+ _output.xyz = floor((_output.xyz * _output.w) * 255.0 + 0.5) / 255.0;
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ConfigConversionEffect_Stage1_c0_c0(vec4(1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 position;
+in vec4 inColor;
+noperspective out vec4 vcolor_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/2323.shader_test b/shaders/skia/2323.shader_test
new file mode 100644
index 0000000..7c7dd70
--- /dev/null
+++ b/shaders/skia/2323.shader_test
@@ -0,0 +1,73 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec2 uDstTextureUpperLeft_Stage2;
+uniform vec2 uDstTextureCoordScale_Stage2;
+uniform sampler2D uDstTextureSampler_Stage2;
+noperspective in vec4 vQuadEdge_Stage0;
+noperspective in vec4 vinColor_Stage0;
+vec4 ConfigConversionEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = floor(_input * 255.0 + 0.5) / 255.0;
+ {
+ _output.xyz = _output.w <= 0.0 ? vec3(0.0) : floor((_output.xyz / _output.w) * 255.0 + 0.5) / 255.0;
+ }
+ return _output;
+}
+vec4 blend_src(vec4 src, vec4 dst) {
+ return src;
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ float edgeAlpha;
+ vec2 duvdx = dFdx(vQuadEdge_Stage0.xy);
+ vec2 duvdy = -dFdy(vQuadEdge_Stage0.xy);
+ if (vQuadEdge_Stage0.z > 0.0 && vQuadEdge_Stage0.w > 0.0) {
+ edgeAlpha = min(min(vQuadEdge_Stage0.z, vQuadEdge_Stage0.w) + 0.5, 1.0);
+ } else {
+ vec2 gF = vec2((2.0 * vQuadEdge_Stage0.x) * duvdx.x - duvdx.y, (2.0 * vQuadEdge_Stage0.x) * duvdy.x - duvdy.y);
+ edgeAlpha = vQuadEdge_Stage0.x * vQuadEdge_Stage0.x - vQuadEdge_Stage0.y;
+ edgeAlpha = clamp(0.5 - edgeAlpha / length(gF), 0.0, 1.0);
+ }
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ConfigConversionEffect_Stage1_c0_c0(vec4(1.0));
+ }
+ {
+ if (all(lessThanEqual(outputCoverage_Stage0.xyz, vec3(0.0)))) {
+ discard;
+ }
+ vec2 _dstTexCoord = (gl_FragCoord.xy - uDstTextureUpperLeft_Stage2) * uDstTextureCoordScale_Stage2;
+ _dstTexCoord.y = 1.0 - _dstTexCoord.y;
+ vec4 _dstColor = texture(uDstTextureSampler_Stage2, _dstTexCoord);
+ sk_FragColor = blend_src(output_Stage1, _dstColor);
+ sk_FragColor = outputCoverage_Stage0 * sk_FragColor + (vec4(1.0) - outputCoverage_Stage0) * _dstColor;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 inPosition;
+in vec4 inColor;
+in vec4 inQuadEdge;
+noperspective out vec4 vQuadEdge_Stage0;
+noperspective out vec4 vinColor_Stage0;
+void main() {
+ vQuadEdge_Stage0 = inQuadEdge;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = inPosition;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/2326.shader_test b/shaders/skia/2326.shader_test
new file mode 100644
index 0000000..42d0f50
--- /dev/null
+++ b/shaders/skia/2326.shader_test
@@ -0,0 +1,66 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec2 uDstTextureUpperLeft_Stage2;
+uniform vec2 uDstTextureCoordScale_Stage2;
+uniform sampler2D uDstTextureSampler_Stage2;
+noperspective in vec4 vcolor_Stage0;
+noperspective in float vinCoverage_Stage0;
+vec4 ConfigConversionEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = floor(_input * 255.0 + 0.5) / 255.0;
+ {
+ _output.xyz = floor((_output.xyz * _output.w) * 255.0 + 0.5) / 255.0;
+ }
+ return _output;
+}
+vec4 blend_src(vec4 src, vec4 dst) {
+ return src;
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ float alpha = 1.0;
+ alpha = vinCoverage_Stage0;
+ outputCoverage_Stage0 = vec4(alpha);
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ConfigConversionEffect_Stage1_c0_c0(vec4(1.0));
+ }
+ {
+ if (all(lessThanEqual(outputCoverage_Stage0.xyz, vec3(0.0)))) {
+ discard;
+ }
+ vec2 _dstTexCoord = (gl_FragCoord.xy - uDstTextureUpperLeft_Stage2) * uDstTextureCoordScale_Stage2;
+ _dstTexCoord.y = 1.0 - _dstTexCoord.y;
+ vec4 _dstColor = texture(uDstTextureSampler_Stage2, _dstTexCoord);
+ sk_FragColor = blend_src(output_Stage1, _dstColor);
+ sk_FragColor = outputCoverage_Stage0 * sk_FragColor + (vec4(1.0) - outputCoverage_Stage0) * _dstColor;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 inPosition;
+in vec4 inColor;
+in float inCoverage;
+noperspective out vec4 vcolor_Stage0;
+noperspective out float vinCoverage_Stage0;
+void main() {
+ vec4 color = inColor;
+ vcolor_Stage0 = color;
+ vec2 pos2 = inPosition;
+ vinCoverage_Stage0 = inCoverage;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/2329.shader_test b/shaders/skia/2329.shader_test
new file mode 100644
index 0000000..e2ee8b9
--- /dev/null
+++ b/shaders/skia/2329.shader_test
@@ -0,0 +1,74 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 ucolor_Stage1_c0_c0;
+uniform vec2 uDstTextureUpperLeft_Stage2;
+uniform vec2 uDstTextureCoordScale_Stage2;
+uniform sampler2D uDstTextureSampler_Stage2;
+noperspective in vec2 vEllipseOffsets_Stage0;
+noperspective in vec4 vEllipseRadii_Stage0;
+noperspective in vec4 vinColor_Stage0;
+vec4 ConstColorProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage1_c0_c0;
+ }
+ return _output;
+}
+vec4 blend_src(vec4 src, vec4 dst) {
+ return src;
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ vec2 offset = vEllipseOffsets_Stage0;
+ float test = dot(offset, offset) - 1.0;
+ vec2 grad = (2.0 * offset) * vEllipseRadii_Stage0.xy;
+ float grad_dot = dot(grad, grad);
+ grad_dot = max(grad_dot, 1.1754999560161448e-38);
+ float invlen = inversesqrt(grad_dot);
+ float edgeAlpha = clamp(0.5 - test * invlen, 0.0, 1.0);
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ConstColorProcessor_Stage1_c0_c0(vec4(1.0));
+ }
+ {
+ if (all(lessThanEqual(outputCoverage_Stage0.xyz, vec3(0.0)))) {
+ discard;
+ }
+ vec2 _dstTexCoord = (gl_FragCoord.xy - uDstTextureUpperLeft_Stage2) * uDstTextureCoordScale_Stage2;
+ _dstTexCoord.y = 1.0 - _dstTexCoord.y;
+ vec4 _dstColor = texture(uDstTextureSampler_Stage2, _dstTexCoord);
+ sk_FragColor = blend_src(output_Stage1, _dstColor);
+ sk_FragColor = outputCoverage_Stage0 * sk_FragColor + (vec4(1.0) - outputCoverage_Stage0) * _dstColor;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 inPosition;
+in vec4 inColor;
+in vec2 inEllipseOffset;
+in vec4 inEllipseRadii;
+noperspective out vec2 vEllipseOffsets_Stage0;
+noperspective out vec4 vEllipseRadii_Stage0;
+noperspective out vec4 vinColor_Stage0;
+void main() {
+ vEllipseOffsets_Stage0 = inEllipseOffset;
+ vEllipseRadii_Stage0 = inEllipseRadii;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = inPosition;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/2332.shader_test b/shaders/skia/2332.shader_test
new file mode 100644
index 0000000..4dfe488
--- /dev/null
+++ b/shaders/skia/2332.shader_test
@@ -0,0 +1,43 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 ucolor_Stage1_c0_c0;
+noperspective in vec4 vcolor_Stage0;
+vec4 ConstColorProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = _input.w * ucolor_Stage1_c0_c0;
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ConstColorProcessor_Stage1_c0_c0(vec4(1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec2 inLocalCoord;
+noperspective out vec4 vcolor_Stage0;
+void main() {
+ vec4 color = inColor;
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/2335.shader_test b/shaders/skia/2335.shader_test
new file mode 100644
index 0000000..84d7161
--- /dev/null
+++ b/shaders/skia/2335.shader_test
@@ -0,0 +1,43 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 ucolor_Stage1_c0_c0;
+noperspective in vec4 vcolor_Stage0;
+vec4 ConstColorProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = _input * ucolor_Stage1_c0_c0;
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ConstColorProcessor_Stage1_c0_c0(vec4(1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec2 inLocalCoord;
+noperspective out vec4 vcolor_Stage0;
+void main() {
+ vec4 color = inColor;
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/2338.shader_test b/shaders/skia/2338.shader_test
new file mode 100644
index 0000000..3c9199b
--- /dev/null
+++ b/shaders/skia/2338.shader_test
@@ -0,0 +1,91 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 ucolor_Stage1_c0_c0;
+in vec4 vcolor_Stage0;
+vec4 ConstColorProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage1_c0_c0;
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ConstColorProcessor_Stage1_c0_c0(vec4(1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform float uSrcTF_Stage0[7];
+uniform mat3 uColorXform_Stage0;
+uniform float uDstTF_Stage0[7];
+uniform mat3 uViewM_Stage0;
+in vec2 position;
+in vec4 inColor;
+out vec4 vcolor_Stage0;
+float src_tf_Stage0(float x) {
+ float G = uSrcTF_Stage0[0];
+ float A = uSrcTF_Stage0[1];
+ float B = uSrcTF_Stage0[2];
+ float C = uSrcTF_Stage0[3];
+ float D = uSrcTF_Stage0[4];
+ float E = uSrcTF_Stage0[5];
+ float F = uSrcTF_Stage0[6];
+ float s = sign(x);
+ x = abs(x);
+ x = x < D ? C * x + F : pow(A * x + B, G) + E;
+ return s * x;
+}
+float dst_tf_Stage0(float x) {
+ float G = uDstTF_Stage0[0];
+ float A = uDstTF_Stage0[1];
+ float B = uDstTF_Stage0[2];
+ float C = uDstTF_Stage0[3];
+ float D = uDstTF_Stage0[4];
+ float E = uDstTF_Stage0[5];
+ float F = uDstTF_Stage0[6];
+ float s = sign(x);
+ x = abs(x);
+ x = x < D ? C * x + F : pow(A * x + B, G) + E;
+ return s * x;
+}
+vec4 gamut_xform_Stage0(vec4 color) {
+ color.xyz = uColorXform_Stage0 * color.xyz;
+ return color;
+}
+vec4 color_xform_Stage0(vec4 color) {
+ float nonZeroAlpha = max(color.w, 9.9999997473787516e-05);
+ color = vec4(color.xyz / nonZeroAlpha, nonZeroAlpha);
+ color.x = src_tf_Stage0(color.x);
+ color.y = src_tf_Stage0(color.y);
+ color.z = src_tf_Stage0(color.z);
+ color = gamut_xform_Stage0(color);
+ color.x = dst_tf_Stage0(color.x);
+ color.y = dst_tf_Stage0(color.y);
+ color.z = dst_tf_Stage0(color.z);
+ color.xyz *= color.w;
+ return color;
+}
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = color_xform_Stage0(color);
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec3 pos3 = uViewM_Stage0 * vec3(position, 1.0);
+ gl_Position = vec4(pos3.x, pos3.y, 0.0, pos3.z);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/2341.shader_test b/shaders/skia/2341.shader_test
new file mode 100644
index 0000000..5499b5c
--- /dev/null
+++ b/shaders/skia/2341.shader_test
@@ -0,0 +1,91 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 ucolor_Stage1_c0_c0;
+noperspective in vec4 vcolor_Stage0;
+vec4 ConstColorProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = _input.w * ucolor_Stage1_c0_c0;
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ConstColorProcessor_Stage1_c0_c0(vec4(1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform float uSrcTF_Stage0[7];
+uniform mat3 uColorXform_Stage0;
+uniform float uDstTF_Stage0[7];
+uniform mat3 uViewM_Stage0;
+in vec2 position;
+in vec4 inColor;
+noperspective out vec4 vcolor_Stage0;
+float src_tf_Stage0(float x) {
+ float G = uSrcTF_Stage0[0];
+ float A = uSrcTF_Stage0[1];
+ float B = uSrcTF_Stage0[2];
+ float C = uSrcTF_Stage0[3];
+ float D = uSrcTF_Stage0[4];
+ float E = uSrcTF_Stage0[5];
+ float F = uSrcTF_Stage0[6];
+ float s = sign(x);
+ x = abs(x);
+ x = x < D ? C * x + F : pow(A * x + B, G) + E;
+ return s * x;
+}
+float dst_tf_Stage0(float x) {
+ float G = uDstTF_Stage0[0];
+ float A = uDstTF_Stage0[1];
+ float B = uDstTF_Stage0[2];
+ float C = uDstTF_Stage0[3];
+ float D = uDstTF_Stage0[4];
+ float E = uDstTF_Stage0[5];
+ float F = uDstTF_Stage0[6];
+ float s = sign(x);
+ x = abs(x);
+ x = x < D ? C * x + F : pow(A * x + B, G) + E;
+ return s * x;
+}
+vec4 gamut_xform_Stage0(vec4 color) {
+ color.xyz = uColorXform_Stage0 * color.xyz;
+ return color;
+}
+vec4 color_xform_Stage0(vec4 color) {
+ float nonZeroAlpha = max(color.w, 9.9999997473787516e-05);
+ color = vec4(color.xyz / nonZeroAlpha, nonZeroAlpha);
+ color.x = src_tf_Stage0(color.x);
+ color.y = src_tf_Stage0(color.y);
+ color.z = src_tf_Stage0(color.z);
+ color = gamut_xform_Stage0(color);
+ color.x = dst_tf_Stage0(color.x);
+ color.y = dst_tf_Stage0(color.y);
+ color.z = dst_tf_Stage0(color.z);
+ color.xyz *= color.w;
+ return color;
+}
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = color_xform_Stage0(color);
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/2344.shader_test b/shaders/skia/2344.shader_test
new file mode 100644
index 0000000..9ed69ec
--- /dev/null
+++ b/shaders/skia/2344.shader_test
@@ -0,0 +1,81 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 ucolor_Stage1_c0_c0;
+uniform vec2 uDstTextureUpperLeft_Stage2;
+uniform vec2 uDstTextureCoordScale_Stage2;
+uniform sampler2D uDstTextureSampler_Stage2;
+noperspective in vec2 vEllipseOffsets_Stage0;
+noperspective in vec4 vEllipseRadii_Stage0;
+noperspective in vec4 vinColor_Stage0;
+vec4 ConstColorProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage1_c0_c0;
+ }
+ return _output;
+}
+vec4 blend_src(vec4 src, vec4 dst) {
+ return src;
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ vec2 offset = vEllipseOffsets_Stage0;
+ offset *= vEllipseRadii_Stage0.xy;
+ float test = dot(offset, offset) - 1.0;
+ vec2 grad = (2.0 * offset) * vEllipseRadii_Stage0.xy;
+ float grad_dot = dot(grad, grad);
+ grad_dot = max(grad_dot, 1.1754999560161448e-38);
+ float invlen = inversesqrt(grad_dot);
+ float edgeAlpha = clamp(0.5 - test * invlen, 0.0, 1.0);
+ offset = vEllipseOffsets_Stage0 * vEllipseRadii_Stage0.zw;
+ test = dot(offset, offset) - 1.0;
+ grad = (2.0 * offset) * vEllipseRadii_Stage0.zw;
+ grad_dot = dot(grad, grad);
+ invlen = inversesqrt(grad_dot);
+ edgeAlpha *= clamp(0.5 + test * invlen, 0.0, 1.0);
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ConstColorProcessor_Stage1_c0_c0(vec4(1.0));
+ }
+ {
+ if (all(lessThanEqual(outputCoverage_Stage0.xyz, vec3(0.0)))) {
+ discard;
+ }
+ vec2 _dstTexCoord = (gl_FragCoord.xy - uDstTextureUpperLeft_Stage2) * uDstTextureCoordScale_Stage2;
+ _dstTexCoord.y = 1.0 - _dstTexCoord.y;
+ vec4 _dstColor = texture(uDstTextureSampler_Stage2, _dstTexCoord);
+ sk_FragColor = blend_src(output_Stage1, _dstColor);
+ sk_FragColor = outputCoverage_Stage0 * sk_FragColor + (vec4(1.0) - outputCoverage_Stage0) * _dstColor;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 inPosition;
+in vec4 inColor;
+in vec2 inEllipseOffset;
+in vec4 inEllipseRadii;
+noperspective out vec2 vEllipseOffsets_Stage0;
+noperspective out vec4 vEllipseRadii_Stage0;
+noperspective out vec4 vinColor_Stage0;
+void main() {
+ vEllipseOffsets_Stage0 = inEllipseOffset;
+ vEllipseRadii_Stage0 = inEllipseRadii;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = inPosition;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/2347.shader_test b/shaders/skia/2347.shader_test
new file mode 100644
index 0000000..73d28f9
--- /dev/null
+++ b/shaders/skia/2347.shader_test
@@ -0,0 +1,38 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uColor_Stage0;
+uniform vec4 ucolor_Stage1_c0_c0;
+vec4 ConstColorProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = _input * ucolor_Stage1_c0_c0;
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ConstColorProcessor_Stage1_c0_c0(vec4(1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 position;
+void main() {
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/235-2.shader_test b/shaders/skia/235-2.shader_test
new file mode 100644
index 0000000..d47b537
--- /dev/null
+++ b/shaders/skia/235-2.shader_test
@@ -0,0 +1,82 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage2_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c1_c0;
+ }
+ return _output;
+}
+vec4 blend_modulate(vec4 src, vec4 dst) {
+ return src * dst;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_modulate(ConstColorProcessor_Stage2_c1_c0(vec4(1.0)), output_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/235-3.shader_test b/shaders/skia/235-3.shader_test
new file mode 100644
index 0000000..cbb228c
--- /dev/null
+++ b/shaders/skia/235-3.shader_test
@@ -0,0 +1,209 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform float uSurfaceScale_Stage1;
+uniform vec3 uLightColor_Stage1;
+uniform float uKD_Stage1;
+uniform vec4 uTexDom_Stage1;
+uniform vec3 uDecalParams_Stage1;
+uniform vec3 uLightLocation_Stage1;
+uniform float uExponent_Stage1;
+uniform float uCosInnerConeAngle_Stage1;
+uniform float uCosOuterConeAngle_Stage1;
+uniform float uConeScale_Stage1;
+uniform vec3 uS_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 light_Stage1(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ float colorScale = uKD_Stage1 * dot(normal, surfaceToLight);
+ return vec4(lightColor * clamp(colorScale, 0.0, 1.0), 1.0);
+}
+float sobel_Stage1(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage1(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage1(float m[9], float surfaceScale) {
+ return pointToNormal_Stage1(sobel_Stage1(m[1], m[2], m[4], m[5], m[7], m[8], 0.5), sobel_Stage1(0.0, 0.0, m[1], m[7], m[2], m[8], 0.33333298563957214), surfaceScale);
+}
+vec3 lightColor_Stage1(vec3 surfaceToLight) {
+ float cosAngle = -dot(surfaceToLight, uS_Stage1);
+ if (cosAngle < uCosOuterConeAngle_Stage1) {
+ return vec3(0.0);
+ }
+ float scale = pow(cosAngle, uExponent_Stage1);
+ if (cosAngle < uCosInnerConeAngle_Stage1) {
+ return ((uLightColor_Stage1 * scale) * (cosAngle - uCosOuterConeAngle_Stage1)) * uConeScale_Stage1;
+ }
+ return uLightColor_Stage1;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ vec2 coord = vTransformedCoords_0_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp0 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp5 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp6 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp7 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp8 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = normalize(uLightLocation_Stage1 - vec3(gl_FragCoord.xy, uSurfaceScale_Stage1 * m[4]));
+ output_Stage1 = light_Stage1(normal_Stage1(m, uSurfaceScale_Stage1), surfaceToLight, lightColor_Stage1(surfaceToLight));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/235-4.shader_test b/shaders/skia/235-4.shader_test
new file mode 100644
index 0000000..18e7615
--- /dev/null
+++ b/shaders/skia/235-4.shader_test
@@ -0,0 +1,30 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+noperspective in vec4 vcolor_Stage0;
+void main() {
+ {
+ sk_FragColor = vec4(1.0);
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+noperspective out vec4 vcolor_Stage0;
+void main() {
+ vec4 color = inColor;
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/235-5.shader_test b/shaders/skia/235-5.shader_test
new file mode 100644
index 0000000..00ed87b
--- /dev/null
+++ b/shaders/skia/235-5.shader_test
@@ -0,0 +1,346 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage2;
+uniform vec4 uKernel_Stage2[6];
+uniform vec2 uKernelOffset_Stage2;
+uniform float uGain_Stage2;
+uniform float uBias_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ vec4 sum = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_1_Stage0 - uKernelOffset_Stage2 * uImageIncrement_Stage2;
+ vec4 c;
+ {
+ float k = uKernel_Stage2[0].x;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[0].y;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[0].z;
+ {
+ vec2 origCoord = coord + vec2(2.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[0].w;
+ {
+ vec2 origCoord = coord + vec2(3.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[1].x;
+ {
+ vec2 origCoord = coord + vec2(4.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[1].y;
+ {
+ vec2 origCoord = coord + vec2(5.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[1].z;
+ {
+ vec2 origCoord = coord + vec2(6.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[1].w;
+ {
+ vec2 origCoord = coord + vec2(7.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[2].x;
+ {
+ vec2 origCoord = coord + vec2(8.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[2].y;
+ {
+ vec2 origCoord = coord + vec2(9.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[2].z;
+ {
+ vec2 origCoord = coord + vec2(10.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[2].w;
+ {
+ vec2 origCoord = coord + vec2(11.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[3].x;
+ {
+ vec2 origCoord = coord + vec2(12.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[3].y;
+ {
+ vec2 origCoord = coord + vec2(13.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[3].z;
+ {
+ vec2 origCoord = coord + vec2(14.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[3].w;
+ {
+ vec2 origCoord = coord + vec2(15.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[4].x;
+ {
+ vec2 origCoord = coord + vec2(16.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[4].y;
+ {
+ vec2 origCoord = coord + vec2(17.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[4].z;
+ {
+ vec2 origCoord = coord + vec2(18.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[4].w;
+ {
+ vec2 origCoord = coord + vec2(19.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[5].x;
+ {
+ vec2 origCoord = coord + vec2(20.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[5].y;
+ {
+ vec2 origCoord = coord + vec2(21.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ vec2 origCoord = vTransformedCoords_1_Stage0;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ c = textureColor;
+ }
+ output_Stage2.w = c.w;
+ output_Stage2.xyz = clamp(sum.xyz * uGain_Stage2 + uBias_Stage2, 0.0, 1.0);
+ output_Stage2.xyz *= output_Stage2.w;
+ output_Stage2 *= output_Stage1;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/235.shader_test b/shaders/skia/235.shader_test
new file mode 100644
index 0000000..3af3e08
--- /dev/null
+++ b/shaders/skia/235.shader_test
@@ -0,0 +1,68 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 ucolor_Stage1_c0_c0_c0_c0;
+uniform vec4 ucolor_Stage2;
+noperspective in vec4 vcolor_Stage0;
+vec4 ConstColorProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = _input.w * ucolor_Stage1_c0_c0_c0_c0;
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = ConstColorProcessor_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 blend_src_atop(vec4 src, vec4 dst) {
+ return dst.w * src + (1.0 - src.w) * dst;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_src_atop(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ {
+ output_Stage2 = output_Stage1 * ucolor_Stage2;
+ }
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 position;
+in vec4 inColor;
+noperspective out vec4 vcolor_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/2350.shader_test b/shaders/skia/2350.shader_test
new file mode 100644
index 0000000..717e422
--- /dev/null
+++ b/shaders/skia/2350.shader_test
@@ -0,0 +1,109 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 urectH_Stage1_c0_c0_c0_c0;
+uniform float uinvSixSigma_Stage1_c0_c0_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+in vec4 vcolor_Stage0;
+vec4 RectBlurEffect_Stage1_c0_c0_c0_c0(vec4 _input, vec2 _coords) {
+ vec4 _output;
+ float xCoverage, yCoverage;
+ {
+ float x, y;
+ {
+ x = max(urectH_Stage1_c0_c0_c0_c0.x - gl_FragCoord.x, gl_FragCoord.x - urectH_Stage1_c0_c0_c0_c0.z);
+ y = max(urectH_Stage1_c0_c0_c0_c0.y - gl_FragCoord.y, gl_FragCoord.y - urectH_Stage1_c0_c0_c0_c0.w);
+ }
+ xCoverage = texture(uTextureSampler_0_Stage1, vec2(x * uinvSixSigma_Stage1_c0_c0_c0_c0, 0.5)).w;
+ yCoverage = texture(uTextureSampler_0_Stage1, vec2(y * uinvSixSigma_Stage1_c0_c0_c0_c0, 0.5)).w;
+ _output = (_input * xCoverage) * yCoverage;
+ }
+ _output = (_input * xCoverage) * yCoverage;
+ return _output;
+}
+vec4 DeviceSpaceEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = RectBlurEffect_Stage1_c0_c0_c0_c0(_input, gl_FragCoord.xy);
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = DeviceSpaceEffect_Stage1_c0_c0(vec4(1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform float uSrcTF_Stage0[7];
+uniform mat3 uColorXform_Stage0;
+uniform float uDstTF_Stage0[7];
+uniform mat3 uViewM_Stage0;
+in vec2 position;
+in vec4 inColor;
+out vec4 vcolor_Stage0;
+float src_tf_Stage0(float x) {
+ float G = uSrcTF_Stage0[0];
+ float A = uSrcTF_Stage0[1];
+ float B = uSrcTF_Stage0[2];
+ float C = uSrcTF_Stage0[3];
+ float D = uSrcTF_Stage0[4];
+ float E = uSrcTF_Stage0[5];
+ float F = uSrcTF_Stage0[6];
+ float s = sign(x);
+ x = abs(x);
+ x = x < D ? C * x + F : pow(A * x + B, G) + E;
+ return s * x;
+}
+float dst_tf_Stage0(float x) {
+ float G = uDstTF_Stage0[0];
+ float A = uDstTF_Stage0[1];
+ float B = uDstTF_Stage0[2];
+ float C = uDstTF_Stage0[3];
+ float D = uDstTF_Stage0[4];
+ float E = uDstTF_Stage0[5];
+ float F = uDstTF_Stage0[6];
+ float s = sign(x);
+ x = abs(x);
+ x = x < D ? C * x + F : pow(A * x + B, G) + E;
+ return s * x;
+}
+vec4 gamut_xform_Stage0(vec4 color) {
+ color.xyz = uColorXform_Stage0 * color.xyz;
+ return color;
+}
+vec4 color_xform_Stage0(vec4 color) {
+ float nonZeroAlpha = max(color.w, 9.9999997473787516e-05);
+ color = vec4(color.xyz / nonZeroAlpha, nonZeroAlpha);
+ color.x = src_tf_Stage0(color.x);
+ color.y = src_tf_Stage0(color.y);
+ color.z = src_tf_Stage0(color.z);
+ color = gamut_xform_Stage0(color);
+ color.x = dst_tf_Stage0(color.x);
+ color.y = dst_tf_Stage0(color.y);
+ color.z = dst_tf_Stage0(color.z);
+ color.xyz *= color.w;
+ return color;
+}
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = color_xform_Stage0(color);
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec3 pos3 = uViewM_Stage0 * vec3(position, 1.0);
+ gl_Position = vec4(pos3.x, pos3.y, 0.0, pos3.z);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/2353.shader_test b/shaders/skia/2353.shader_test
new file mode 100644
index 0000000..bf82167
--- /dev/null
+++ b/shaders/skia/2353.shader_test
@@ -0,0 +1,72 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 ucircleData_Stage1_c0_c0_c0_c0;
+uniform vec2 uDstTextureUpperLeft_Stage2;
+uniform vec2 uDstTextureCoordScale_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uDstTextureSampler_Stage2;
+noperspective in vec4 vcolor_Stage0;
+noperspective in float vinCoverage_Stage0;
+vec4 CircleBlurFragmentProcessor_Stage1_c0_c0_c0_c0(vec4 _input, vec2 _coords) {
+ vec4 _output;
+ vec2 vec = vec2((gl_FragCoord.x - ucircleData_Stage1_c0_c0_c0_c0.x) * ucircleData_Stage1_c0_c0_c0_c0.w, (gl_FragCoord.y - ucircleData_Stage1_c0_c0_c0_c0.y) * ucircleData_Stage1_c0_c0_c0_c0.w);
+ float dist = length(vec) + (0.5 - ucircleData_Stage1_c0_c0_c0_c0.z) * ucircleData_Stage1_c0_c0_c0_c0.w;
+ _output = _input * texture(uTextureSampler_0_Stage1, vec2(dist, 0.5)).w;
+ return _output;
+}
+vec4 DeviceSpaceEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = CircleBlurFragmentProcessor_Stage1_c0_c0_c0_c0(_input, gl_FragCoord.xy);
+ return _output;
+}
+vec4 blend_src(vec4 src, vec4 dst) {
+ return src;
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ float alpha = 1.0;
+ alpha = vinCoverage_Stage0;
+ outputCoverage_Stage0 = vec4(alpha);
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = DeviceSpaceEffect_Stage1_c0_c0(vec4(1.0));
+ }
+ {
+ if (all(lessThanEqual(outputCoverage_Stage0.xyz, vec3(0.0)))) {
+ discard;
+ }
+ vec2 _dstTexCoord = (gl_FragCoord.xy - uDstTextureUpperLeft_Stage2) * uDstTextureCoordScale_Stage2;
+ _dstTexCoord.y = 1.0 - _dstTexCoord.y;
+ vec4 _dstColor = texture(uDstTextureSampler_Stage2, _dstTexCoord);
+ sk_FragColor = blend_src(output_Stage1, _dstColor);
+ sk_FragColor = outputCoverage_Stage0 * sk_FragColor + (vec4(1.0) - outputCoverage_Stage0) * _dstColor;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 inPosition;
+in vec4 inColor;
+in float inCoverage;
+noperspective out vec4 vcolor_Stage0;
+noperspective out float vinCoverage_Stage0;
+void main() {
+ vec4 color = inColor;
+ vcolor_Stage0 = color;
+ vec2 pos2 = inPosition;
+ vinCoverage_Stage0 = inCoverage;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/2359.shader_test b/shaders/skia/2359.shader_test
new file mode 100644
index 0000000..cd62f62
--- /dev/null
+++ b/shaders/skia/2359.shader_test
@@ -0,0 +1,95 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uboundsUniform_Stage1_c0_c0;
+uniform float uxInvZoom_Stage1_c0_c0;
+uniform float uyInvZoom_Stage1_c0_c0;
+uniform float uxInvInset_Stage1_c0_c0;
+uniform float uyInvInset_Stage1_c0_c0;
+uniform vec2 uoffset_Stage1_c0_c0;
+uniform vec2 uDstTextureUpperLeft_Stage2;
+uniform vec2 uDstTextureCoordScale_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uDstTextureSampler_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in float vcoverage_Stage0;
+flat in vec4 vgeomDomain_Stage0;
+vec4 MagnifierEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coord = vTransformedCoords_0_Stage0;
+ vec2 zoom_coord = uoffset_Stage1_c0_c0 + coord * vec2(uxInvZoom_Stage1_c0_c0, uyInvZoom_Stage1_c0_c0);
+ vec2 delta = (coord - uboundsUniform_Stage1_c0_c0.xy) * uboundsUniform_Stage1_c0_c0.zw;
+ delta = min(delta, vec2(1.0, 1.0) - delta);
+ delta *= vec2(uxInvInset_Stage1_c0_c0, uyInvInset_Stage1_c0_c0);
+ float weight = 0.0;
+ if (delta.x < 2.0 && delta.y < 2.0) {
+ delta = vec2(2.0, 2.0) - delta;
+ float dist = length(delta);
+ dist = max(2.0 - dist, 0.0);
+ weight = min(dist * dist, 1.0);
+ } else {
+ vec2 delta_squared = delta * delta;
+ weight = min(min(delta_squared.x, delta_squared.y), 1.0);
+ }
+ _output = texture(uTextureSampler_0_Stage1, mix(coord, zoom_coord, weight));
+ return _output;
+}
+vec4 blend_src(vec4 src, vec4 dst) {
+ return src;
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ float coverage = vcoverage_Stage0;
+ vec4 geoDomain;
+ geoDomain = vgeomDomain_Stage0;
+ if (coverage < 0.5) {
+ vec4 dists4 = clamp(vec4(1.0, 1.0, -1.0, -1.0) * (gl_FragCoord.xyxy - geoDomain), 0.0, 1.0);
+ vec2 dists2 = dists4.xy * dists4.zw;
+ coverage = min(coverage, dists2.x * dists2.y);
+ }
+ outputCoverage_Stage0 = vec4(coverage);
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = MagnifierEffect_Stage1_c0_c0(vec4(1.0));
+ }
+ {
+ if (all(lessThanEqual(outputCoverage_Stage0.xyz, vec3(0.0)))) {
+ discard;
+ }
+ vec2 _dstTexCoord = (gl_FragCoord.xy - uDstTextureUpperLeft_Stage2) * uDstTextureCoordScale_Stage2;
+ _dstTexCoord.y = 1.0 - _dstTexCoord.y;
+ vec4 _dstColor = texture(uDstTextureSampler_Stage2, _dstTexCoord);
+ sk_FragColor = blend_src(output_Stage1, _dstColor);
+ sk_FragColor = outputCoverage_Stage0 * sk_FragColor + (vec4(1.0) - outputCoverage_Stage0) * _dstColor;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in float coverage;
+in vec2 localCoord;
+in vec4 geomDomain;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out float vcoverage_Stage0;
+flat out vec4 vgeomDomain_Stage0;
+void main() {
+ vec2 position = position;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcoverage_Stage0 = coverage;
+ vgeomDomain_Stage0 = geomDomain;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/2362.shader_test b/shaders/skia/2362.shader_test
new file mode 100644
index 0000000..d392716
--- /dev/null
+++ b/shaders/skia/2362.shader_test
@@ -0,0 +1,61 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uColor_Stage0;
+uniform vec4 uboundsUniform_Stage1_c0_c0;
+uniform float uxInvZoom_Stage1_c0_c0;
+uniform float uyInvZoom_Stage1_c0_c0;
+uniform float uxInvInset_Stage1_c0_c0;
+uniform float uyInvInset_Stage1_c0_c0;
+uniform vec2 uoffset_Stage1_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 MagnifierEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coord = vTransformedCoords_0_Stage0;
+ vec2 zoom_coord = uoffset_Stage1_c0_c0 + coord * vec2(uxInvZoom_Stage1_c0_c0, uyInvZoom_Stage1_c0_c0);
+ vec2 delta = (coord - uboundsUniform_Stage1_c0_c0.xy) * uboundsUniform_Stage1_c0_c0.zw;
+ delta = min(delta, vec2(1.0, 1.0) - delta);
+ delta *= vec2(uxInvInset_Stage1_c0_c0, uyInvInset_Stage1_c0_c0);
+ float weight = 0.0;
+ if (delta.x < 2.0 && delta.y < 2.0) {
+ delta = vec2(2.0, 2.0) - delta;
+ float dist = length(delta);
+ dist = max(2.0 - dist, 0.0);
+ weight = min(dist * dist, 1.0);
+ } else {
+ vec2 delta_squared = delta * delta;
+ weight = min(min(delta_squared.x, delta_squared.y), 1.0);
+ }
+ _output = texture(uTextureSampler_0_Stage1, mix(coord, zoom_coord, weight));
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = MagnifierEffect_Stage1_c0_c0(vec4(1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec2 pos2 = (uViewM_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/2365.shader_test b/shaders/skia/2365.shader_test
new file mode 100644
index 0000000..b2ae65d
--- /dev/null
+++ b/shaders/skia/2365.shader_test
@@ -0,0 +1,85 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uColor_Stage0;
+uniform vec4 uboundsUniform_Stage1_c0_c0;
+uniform float uxInvZoom_Stage1_c0_c0;
+uniform float uyInvZoom_Stage1_c0_c0;
+uniform float uxInvInset_Stage1_c0_c0;
+uniform float uyInvInset_Stage1_c0_c0;
+uniform vec2 uoffset_Stage1_c0_c0;
+uniform vec2 uDstTextureUpperLeft_Stage2;
+uniform vec2 uDstTextureCoordScale_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uDstTextureSampler_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in float vinCoverage_Stage0;
+vec4 MagnifierEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coord = vTransformedCoords_0_Stage0;
+ vec2 zoom_coord = uoffset_Stage1_c0_c0 + coord * vec2(uxInvZoom_Stage1_c0_c0, uyInvZoom_Stage1_c0_c0);
+ vec2 delta = (coord - uboundsUniform_Stage1_c0_c0.xy) * uboundsUniform_Stage1_c0_c0.zw;
+ delta = min(delta, vec2(1.0, 1.0) - delta);
+ delta *= vec2(uxInvInset_Stage1_c0_c0, uyInvInset_Stage1_c0_c0);
+ float weight = 0.0;
+ if (delta.x < 2.0 && delta.y < 2.0) {
+ delta = vec2(2.0, 2.0) - delta;
+ float dist = length(delta);
+ dist = max(2.0 - dist, 0.0);
+ weight = min(dist * dist, 1.0);
+ } else {
+ vec2 delta_squared = delta * delta;
+ weight = min(min(delta_squared.x, delta_squared.y), 1.0);
+ }
+ _output = texture(uTextureSampler_0_Stage1, mix(coord, zoom_coord, weight));
+ return _output;
+}
+vec4 blend_src(vec4 src, vec4 dst) {
+ return src;
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ float alpha = 1.0;
+ alpha = vinCoverage_Stage0;
+ outputCoverage_Stage0 = vec4(alpha);
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = MagnifierEffect_Stage1_c0_c0(vec4(1.0));
+ }
+ {
+ if (all(lessThanEqual(outputCoverage_Stage0.xyz, vec3(0.0)))) {
+ discard;
+ }
+ vec2 _dstTexCoord = (gl_FragCoord.xy - uDstTextureUpperLeft_Stage2) * uDstTextureCoordScale_Stage2;
+ _dstTexCoord.y = 1.0 - _dstTexCoord.y;
+ vec4 _dstColor = texture(uDstTextureSampler_Stage2, _dstTexCoord);
+ sk_FragColor = blend_src(output_Stage1, _dstColor);
+ sk_FragColor = outputCoverage_Stage0 * sk_FragColor + (vec4(1.0) - outputCoverage_Stage0) * _dstColor;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in float inCoverage;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out float vinCoverage_Stage0;
+void main() {
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ vinCoverage_Stage0 = inCoverage;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/2368.shader_test b/shaders/skia/2368.shader_test
new file mode 100644
index 0000000..3fc9a4f
--- /dev/null
+++ b/shaders/skia/2368.shader_test
@@ -0,0 +1,60 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uColor_Stage0;
+uniform vec4 uboundsUniform_Stage1_c0_c0;
+uniform float uxInvZoom_Stage1_c0_c0;
+uniform float uyInvZoom_Stage1_c0_c0;
+uniform float uxInvInset_Stage1_c0_c0;
+uniform float uyInvInset_Stage1_c0_c0;
+uniform vec2 uoffset_Stage1_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 MagnifierEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coord = vTransformedCoords_0_Stage0;
+ vec2 zoom_coord = uoffset_Stage1_c0_c0 + coord * vec2(uxInvZoom_Stage1_c0_c0, uyInvZoom_Stage1_c0_c0);
+ vec2 delta = (coord - uboundsUniform_Stage1_c0_c0.xy) * uboundsUniform_Stage1_c0_c0.zw;
+ delta = min(delta, vec2(1.0, 1.0) - delta);
+ delta *= vec2(uxInvInset_Stage1_c0_c0, uyInvInset_Stage1_c0_c0);
+ float weight = 0.0;
+ if (delta.x < 2.0 && delta.y < 2.0) {
+ delta = vec2(2.0, 2.0) - delta;
+ float dist = length(delta);
+ dist = max(2.0 - dist, 0.0);
+ weight = min(dist * dist, 1.0);
+ } else {
+ vec2 delta_squared = delta * delta;
+ weight = min(min(delta_squared.x, delta_squared.y), 1.0);
+ }
+ _output = texture(uTextureSampler_0_Stage1, mix(coord, zoom_coord, weight));
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = MagnifierEffect_Stage1_c0_c0(vec4(1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/2374.shader_test b/shaders/skia/2374.shader_test
new file mode 100644
index 0000000..9ab7547
--- /dev/null
+++ b/shaders/skia/2374.shader_test
@@ -0,0 +1,53 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform float ucornerRadius_Stage1_c0_c0;
+uniform vec4 uproxyRect_Stage1_c0_c0;
+uniform float ublurRadius_Stage1_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+vec4 RRectBlurEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 translatedFragPos = gl_FragCoord.xy - uproxyRect_Stage1_c0_c0.xy;
+ float threshold = ucornerRadius_Stage1_c0_c0 + 2.0 * ublurRadius_Stage1_c0_c0;
+ vec2 middle = (uproxyRect_Stage1_c0_c0.zw - uproxyRect_Stage1_c0_c0.xy) - 2.0 * threshold;
+ if (translatedFragPos.x >= threshold && translatedFragPos.x < middle.x + threshold) {
+ translatedFragPos.x = threshold;
+ } else if (translatedFragPos.x >= middle.x + threshold) {
+ translatedFragPos.x -= middle.x - 1.0;
+ }
+ if (translatedFragPos.y > threshold && translatedFragPos.y < middle.y + threshold) {
+ translatedFragPos.y = threshold;
+ } else if (translatedFragPos.y >= middle.y + threshold) {
+ translatedFragPos.y -= middle.y - 1.0;
+ }
+ vec2 proxyDims = vec2(2.0 * threshold + 1.0);
+ vec2 texCoord = translatedFragPos / proxyDims;
+ _output = _input * texture(uTextureSampler_0_Stage1, texCoord);
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = RRectBlurEffect_Stage1_c0_c0(vec4(1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 position;
+void main() {
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/2377.shader_test b/shaders/skia/2377.shader_test
new file mode 100644
index 0000000..4b95f94
--- /dev/null
+++ b/shaders/skia/2377.shader_test
@@ -0,0 +1,60 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform float ucornerRadius_Stage1_c0_c0;
+uniform vec4 uproxyRect_Stage1_c0_c0;
+uniform float ublurRadius_Stage1_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec4 vcolor_Stage0;
+vec4 RRectBlurEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 translatedFragPos = gl_FragCoord.xy - uproxyRect_Stage1_c0_c0.xy;
+ float threshold = ucornerRadius_Stage1_c0_c0 + 2.0 * ublurRadius_Stage1_c0_c0;
+ vec2 middle = (uproxyRect_Stage1_c0_c0.zw - uproxyRect_Stage1_c0_c0.xy) - 2.0 * threshold;
+ if (translatedFragPos.x >= threshold && translatedFragPos.x < middle.x + threshold) {
+ translatedFragPos.x = threshold;
+ } else if (translatedFragPos.x >= middle.x + threshold) {
+ translatedFragPos.x -= middle.x - 1.0;
+ }
+ if (translatedFragPos.y > threshold && translatedFragPos.y < middle.y + threshold) {
+ translatedFragPos.y = threshold;
+ } else if (translatedFragPos.y >= middle.y + threshold) {
+ translatedFragPos.y -= middle.y - 1.0;
+ }
+ vec2 proxyDims = vec2(2.0 * threshold + 1.0);
+ vec2 texCoord = translatedFragPos / proxyDims;
+ _output = _input * texture(uTextureSampler_0_Stage1, texCoord);
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = RRectBlurEffect_Stage1_c0_c0(vec4(1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 inPosition;
+in vec4 inColor;
+in vec2 inLocalCoord;
+noperspective out vec4 vcolor_Stage0;
+void main() {
+ vec4 color = inColor;
+ vcolor_Stage0 = color;
+ vec2 pos2 = inPosition;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/238-2.shader_test b/shaders/skia/238-2.shader_test
new file mode 100644
index 0000000..43cd6b0
--- /dev/null
+++ b/shaders/skia/238-2.shader_test
@@ -0,0 +1,92 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage2_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c1_c0;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+vec4 blend_modulate(vec4 src, vec4 dst) {
+ return src * dst;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_dst_in(outputColor_Stage0, ClampedGradientEffect_Stage1_c0_c0(vec4(1.0)));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_modulate(ConstColorProcessor_Stage2_c1_c0(vec4(1.0)), output_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/238-3.shader_test b/shaders/skia/238-3.shader_test
new file mode 100644
index 0000000..c4e5d43
--- /dev/null
+++ b/shaders/skia/238-3.shader_test
@@ -0,0 +1,209 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform float uSurfaceScale_Stage1;
+uniform vec3 uLightColor_Stage1;
+uniform float uKD_Stage1;
+uniform vec4 uTexDom_Stage1;
+uniform vec3 uDecalParams_Stage1;
+uniform vec3 uLightLocation_Stage1;
+uniform float uExponent_Stage1;
+uniform float uCosInnerConeAngle_Stage1;
+uniform float uCosOuterConeAngle_Stage1;
+uniform float uConeScale_Stage1;
+uniform vec3 uS_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 light_Stage1(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ float colorScale = uKD_Stage1 * dot(normal, surfaceToLight);
+ return vec4(lightColor * clamp(colorScale, 0.0, 1.0), 1.0);
+}
+float sobel_Stage1(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage1(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage1(float m[9], float surfaceScale) {
+ return pointToNormal_Stage1(sobel_Stage1(m[0], m[2], m[3], m[5], m[6], m[8], 0.25), sobel_Stage1(m[0], m[6], m[1], m[7], m[2], m[8], 0.25), surfaceScale);
+}
+vec3 lightColor_Stage1(vec3 surfaceToLight) {
+ float cosAngle = -dot(surfaceToLight, uS_Stage1);
+ if (cosAngle < uCosOuterConeAngle_Stage1) {
+ return vec3(0.0);
+ }
+ float scale = pow(cosAngle, uExponent_Stage1);
+ if (cosAngle < uCosInnerConeAngle_Stage1) {
+ return ((uLightColor_Stage1 * scale) * (cosAngle - uCosOuterConeAngle_Stage1)) * uConeScale_Stage1;
+ }
+ return uLightColor_Stage1;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ vec2 coord = vTransformedCoords_0_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp0 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp5 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp6 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp7 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp8 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = normalize(uLightLocation_Stage1 - vec3(gl_FragCoord.xy, uSurfaceScale_Stage1 * m[4]));
+ output_Stage1 = light_Stage1(normal_Stage1(m, uSurfaceScale_Stage1), surfaceToLight, lightColor_Stage1(surfaceToLight));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/238-4.shader_test b/shaders/skia/238-4.shader_test
new file mode 100644
index 0000000..9bd2a94
--- /dev/null
+++ b/shaders/skia/238-4.shader_test
@@ -0,0 +1,40 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+noperspective in vec2 vEllipseOffsets0_Stage0;
+noperspective in vec2 vEllipseOffsets1_Stage0;
+noperspective in vec4 vinColor_Stage0;
+void main() {
+ {
+ vec2 duvdx = dFdx(vEllipseOffsets0_Stage0);
+ vec2 duvdy = -dFdy(vEllipseOffsets0_Stage0);
+ vec2 grad = vec2(vEllipseOffsets0_Stage0.x * duvdx.x + vEllipseOffsets0_Stage0.y * duvdx.y, vEllipseOffsets0_Stage0.x * duvdy.x + vEllipseOffsets0_Stage0.y * duvdy.y);
+ float grad_dot = 4.0 * dot(grad, grad);
+ grad_dot = max(grad_dot, 1.1754999560161448e-38);
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec2 inEllipseOffsets0;
+in vec2 inEllipseOffsets1;
+noperspective out vec2 vEllipseOffsets0_Stage0;
+noperspective out vec2 vEllipseOffsets1_Stage0;
+noperspective out vec4 vinColor_Stage0;
+void main() {
+ vEllipseOffsets0_Stage0 = inEllipseOffsets0;
+ vEllipseOffsets1_Stage0 = inEllipseOffsets1;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = (uViewM_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/238-5.shader_test b/shaders/skia/238-5.shader_test
new file mode 100644
index 0000000..94dd389
--- /dev/null
+++ b/shaders/skia/238-5.shader_test
@@ -0,0 +1,448 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage2;
+uniform vec4 uKernel_Stage2[5];
+uniform vec2 uKernelOffset_Stage2;
+uniform float uGain_Stage2;
+uniform float uBias_Stage2;
+uniform vec4 uTexDom_Stage2;
+uniform vec3 uDecalParams_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ vec4 sum = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_1_Stage0 - uKernelOffset_Stage2 * uImageIncrement_Stage2;
+ vec4 c;
+ {
+ float k = uKernel_Stage2[0].x;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[0].y;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[0].z;
+ {
+ vec2 origCoord = coord + vec2(2.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[0].w;
+ {
+ vec2 origCoord = coord + vec2(3.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[1].x;
+ {
+ vec2 origCoord = coord + vec2(4.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[1].y;
+ {
+ vec2 origCoord = coord + vec2(5.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[1].z;
+ {
+ vec2 origCoord = coord + vec2(6.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[1].w;
+ {
+ vec2 origCoord = coord + vec2(7.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[2].x;
+ {
+ vec2 origCoord = coord + vec2(8.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[2].y;
+ {
+ vec2 origCoord = coord + vec2(9.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[2].z;
+ {
+ vec2 origCoord = coord + vec2(10.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[2].w;
+ {
+ vec2 origCoord = coord + vec2(11.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[3].x;
+ {
+ vec2 origCoord = coord + vec2(12.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[3].y;
+ {
+ vec2 origCoord = coord + vec2(13.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[3].z;
+ {
+ vec2 origCoord = coord + vec2(14.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[3].w;
+ {
+ vec2 origCoord = coord + vec2(15.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[4].x;
+ {
+ vec2 origCoord = coord + vec2(16.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[4].y;
+ {
+ vec2 origCoord = coord + vec2(17.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[4].z;
+ {
+ vec2 origCoord = coord + vec2(18.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[4].w;
+ {
+ vec2 origCoord = coord + vec2(19.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ vec2 origCoord = vTransformedCoords_1_Stage0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ output_Stage2.w = c.w;
+ output_Stage2.xyz = clamp(sum.xyz * uGain_Stage2 + uBias_Stage2, 0.0, 1.0);
+ output_Stage2.xyz *= output_Stage2.w;
+ output_Stage2 *= output_Stage1;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/238-6.shader_test b/shaders/skia/238-6.shader_test
new file mode 100644
index 0000000..897aeda
--- /dev/null
+++ b/shaders/skia/238-6.shader_test
@@ -0,0 +1,80 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 ucolor_Stage2_c0_c0;
+uniform mat4 um_Stage2_c1_c0;
+uniform vec4 uv_Stage2_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 ConstColorProcessor_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = _input.w * ucolor_Stage2_c0_c0;
+ }
+ return _output;
+}
+vec4 ColorMatrixFragmentProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = _input;
+ {
+ float nonZeroAlpha = max(inputColor.w, 9.9999997473787516e-05);
+ inputColor = vec4(inputColor.xyz / nonZeroAlpha, inputColor.w);
+ }
+ _output = um_Stage2_c1_c0 * inputColor + uv_Stage2_c1_c0;
+ {
+ _output = clamp(_output, 0.0, 1.0);
+ }
+ return _output;
+}
+float _guarded_divide(float n, float d) {
+ return n / d;
+}
+float _color_dodge_component(float sc, float sa, float dc, float da) {
+ if (dc == 0.0) {
+ return sc * (1.0 - da);
+ } else {
+ float d = sa - sc;
+ if (d == 0.0) {
+ return (sa * da + sc * (1.0 - da)) + dc * (1.0 - sa);
+ }
+ d = min(da, _guarded_divide(dc * sa, d));
+ return (d * sa + sc * (1.0 - da)) + dc * (1.0 - sa);
+ }
+}
+vec4 blend_color_dodge(vec4 src, vec4 dst) {
+ return vec4(_color_dodge_component(src.x, src.w, dst.x, dst.w), _color_dodge_component(src.y, src.w, dst.y, dst.w), _color_dodge_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ vec4 inputColor = vec4(output_Stage1.xyz, 1.0);
+ output_Stage2 = blend_color_dodge(ConstColorProcessor_Stage2_c0_c0(inputColor), ColorMatrixFragmentProcessor_Stage2_c1_c0(inputColor));
+ output_Stage2 *= output_Stage1.w;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/238.shader_test b/shaders/skia/238.shader_test
new file mode 100644
index 0000000..b327635
--- /dev/null
+++ b/shaders/skia/238.shader_test
@@ -0,0 +1,165 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage2;
+uniform vec4 ucolor_Stage3_c1_c0;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.w) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ } else {
+ {
+ if (t < uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+vec4 ComposeOne_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_dst_in(_input, TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0)));
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = ComposeOne_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 ConstColorProcessor_Stage3_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage3_c1_c0;
+ }
+ return _output;
+}
+vec4 blend_src_atop(vec4 src, vec4 dst) {
+ return dst.w * src + (1.0 - src.w) * dst;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 blend_darken(vec4 src, vec4 dst) {
+ vec4 result = blend_src_over(src, dst);
+ result.xyz = min(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
+ return result;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_src_atop(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ {
+ output_Stage2 = output_Stage1 * ucolor_Stage2;
+ }
+ }
+ vec4 output_Stage3;
+ {
+ output_Stage3 = blend_darken(ConstColorProcessor_Stage3_c1_c0(vec4(1.0)), output_Stage2);
+ }
+ {
+ sk_FragColor = output_Stage3;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 inColor;
+in vec2 inLocalCoord;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/2386.shader_test b/shaders/skia/2386.shader_test
new file mode 100644
index 0000000..49194de
--- /dev/null
+++ b/shaders/skia/2386.shader_test
@@ -0,0 +1,56 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uColor_Stage0;
+uniform float ucornerRadius_Stage1_c0_c0;
+uniform vec4 uproxyRect_Stage1_c0_c0;
+uniform float ublurRadius_Stage1_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+vec4 RRectBlurEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 translatedFragPos = gl_FragCoord.xy - uproxyRect_Stage1_c0_c0.xy;
+ float threshold = ucornerRadius_Stage1_c0_c0 + 2.0 * ublurRadius_Stage1_c0_c0;
+ vec2 middle = (uproxyRect_Stage1_c0_c0.zw - uproxyRect_Stage1_c0_c0.xy) - 2.0 * threshold;
+ if (translatedFragPos.x >= threshold && translatedFragPos.x < middle.x + threshold) {
+ translatedFragPos.x = threshold;
+ } else if (translatedFragPos.x >= middle.x + threshold) {
+ translatedFragPos.x -= middle.x - 1.0;
+ }
+ if (translatedFragPos.y > threshold && translatedFragPos.y < middle.y + threshold) {
+ translatedFragPos.y = threshold;
+ } else if (translatedFragPos.y >= middle.y + threshold) {
+ translatedFragPos.y -= middle.y - 1.0;
+ }
+ vec2 proxyDims = vec2(2.0 * threshold + 1.0);
+ vec2 texCoord = translatedFragPos / proxyDims;
+ _output = _input * texture(uTextureSampler_0_Stage1, texCoord);
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = RRectBlurEffect_Stage1_c0_c0(vec4(1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 position;
+void main() {
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/2398.shader_test b/shaders/skia/2398.shader_test
new file mode 100644
index 0000000..5da1986
--- /dev/null
+++ b/shaders/skia/2398.shader_test
@@ -0,0 +1,84 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 urectH_Stage1_c0_c0;
+uniform float uinvSixSigma_Stage1_c0_c0;
+uniform vec2 uDstTextureUpperLeft_Stage2;
+uniform vec2 uDstTextureCoordScale_Stage2;
+uniform sampler2D uTextureSampler_0_Stage0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uDstTextureSampler_Stage2;
+noperspective in vec2 vTextureCoords_Stage0;
+flat in int vTexIndex_Stage0;
+noperspective in vec4 vinColor_Stage0;
+vec4 RectBlurEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ float xCoverage, yCoverage;
+ {
+ float x, y;
+ {
+ x = max(urectH_Stage1_c0_c0.x - gl_FragCoord.x, gl_FragCoord.x - urectH_Stage1_c0_c0.z);
+ y = max(urectH_Stage1_c0_c0.y - gl_FragCoord.y, gl_FragCoord.y - urectH_Stage1_c0_c0.w);
+ }
+ xCoverage = texture(uTextureSampler_0_Stage1, vec2(x * uinvSixSigma_Stage1_c0_c0, 0.5)).w;
+ yCoverage = texture(uTextureSampler_0_Stage1, vec2(y * uinvSixSigma_Stage1_c0_c0, 0.5)).w;
+ _output = (_input * xCoverage) * yCoverage;
+ }
+ _output = (_input * xCoverage) * yCoverage;
+ return _output;
+}
+vec4 blend_src(vec4 src, vec4 dst) {
+ return src;
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ vec4 texColor;
+ {
+ texColor = texture(uTextureSampler_0_Stage0, vTextureCoords_Stage0);
+ }
+ outputCoverage_Stage0 = texColor;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = RectBlurEffect_Stage1_c0_c0(vec4(1.0));
+ }
+ {
+ if (all(lessThanEqual(outputCoverage_Stage0.xyz, vec3(0.0)))) {
+ discard;
+ }
+ vec2 _dstTexCoord = (gl_FragCoord.xy - uDstTextureUpperLeft_Stage2) * uDstTextureCoordScale_Stage2;
+ _dstTexCoord.y = 1.0 - _dstTexCoord.y;
+ vec4 _dstColor = texture(uDstTextureSampler_Stage2, _dstTexCoord);
+ sk_FragColor = blend_src(output_Stage1, _dstColor);
+ sk_FragColor = outputCoverage_Stage0 * sk_FragColor + (vec4(1.0) - outputCoverage_Stage0) * _dstColor;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform vec2 uAtlasSizeInv_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in uvec2 inTextureCoords;
+noperspective out vec2 vTextureCoords_Stage0;
+flat out int vTexIndex_Stage0;
+noperspective out vec4 vinColor_Stage0;
+void main() {
+ ivec2 signedCoords = ivec2(int(inTextureCoords.x), int(inTextureCoords.y));
+ vec2 unormTexCoords = vec2(float(signedCoords.x / 2), float(signedCoords.y / 2));
+ vTextureCoords_Stage0 = unormTexCoords * uAtlasSizeInv_Stage0;
+ vTexIndex_Stage0 = 0;
+ vinColor_Stage0 = inColor;
+ gl_Position = vec4(inPosition.x, inPosition.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/2401.shader_test b/shaders/skia/2401.shader_test
new file mode 100644
index 0000000..5821e54
--- /dev/null
+++ b/shaders/skia/2401.shader_test
@@ -0,0 +1,88 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 urectH_Stage1_c0_c0;
+uniform float uinvSixSigma_Stage1_c0_c0;
+uniform vec2 uDstTextureUpperLeft_Stage2;
+uniform vec2 uDstTextureCoordScale_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uDstTextureSampler_Stage2;
+noperspective in vec2 vEllipseOffsets0_Stage0;
+noperspective in vec2 vEllipseOffsets1_Stage0;
+noperspective in vec4 vinColor_Stage0;
+vec4 RectBlurEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ float xCoverage, yCoverage;
+ {
+ float x, y;
+ {
+ x = max(urectH_Stage1_c0_c0.x - gl_FragCoord.x, gl_FragCoord.x - urectH_Stage1_c0_c0.z);
+ y = max(urectH_Stage1_c0_c0.y - gl_FragCoord.y, gl_FragCoord.y - urectH_Stage1_c0_c0.w);
+ }
+ xCoverage = texture(uTextureSampler_0_Stage1, vec2(x * uinvSixSigma_Stage1_c0_c0, 0.5)).w;
+ yCoverage = texture(uTextureSampler_0_Stage1, vec2(y * uinvSixSigma_Stage1_c0_c0, 0.5)).w;
+ _output = (_input * xCoverage) * yCoverage;
+ }
+ _output = (_input * xCoverage) * yCoverage;
+ return _output;
+}
+vec4 blend_src(vec4 src, vec4 dst) {
+ return src;
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ vec2 scaledOffset = vEllipseOffsets0_Stage0;
+ float test = dot(scaledOffset, scaledOffset) - 1.0;
+ vec2 duvdx = dFdx(vEllipseOffsets0_Stage0);
+ vec2 duvdy = -dFdy(vEllipseOffsets0_Stage0);
+ vec2 grad = vec2(vEllipseOffsets0_Stage0.x * duvdx.x + vEllipseOffsets0_Stage0.y * duvdx.y, vEllipseOffsets0_Stage0.x * duvdy.x + vEllipseOffsets0_Stage0.y * duvdy.y);
+ float grad_dot = 4.0 * dot(grad, grad);
+ grad_dot = max(grad_dot, 1.1754999560161448e-38);
+ float invlen = inversesqrt(grad_dot);
+ float edgeAlpha = clamp(0.5 - test * invlen, 0.0, 1.0);
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = RectBlurEffect_Stage1_c0_c0(vec4(1.0));
+ }
+ {
+ if (all(lessThanEqual(outputCoverage_Stage0.xyz, vec3(0.0)))) {
+ discard;
+ }
+ vec2 _dstTexCoord = (gl_FragCoord.xy - uDstTextureUpperLeft_Stage2) * uDstTextureCoordScale_Stage2;
+ _dstTexCoord.y = 1.0 - _dstTexCoord.y;
+ vec4 _dstColor = texture(uDstTextureSampler_Stage2, _dstTexCoord);
+ sk_FragColor = blend_src(output_Stage1, _dstColor);
+ sk_FragColor = outputCoverage_Stage0 * sk_FragColor + (vec4(1.0) - outputCoverage_Stage0) * _dstColor;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec2 inEllipseOffsets0;
+in vec2 inEllipseOffsets1;
+noperspective out vec2 vEllipseOffsets0_Stage0;
+noperspective out vec2 vEllipseOffsets1_Stage0;
+noperspective out vec4 vinColor_Stage0;
+void main() {
+ vEllipseOffsets0_Stage0 = inEllipseOffsets0;
+ vEllipseOffsets1_Stage0 = inEllipseOffsets1;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = (uViewM_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/2404.shader_test b/shaders/skia/2404.shader_test
new file mode 100644
index 0000000..78b76e7
--- /dev/null
+++ b/shaders/skia/2404.shader_test
@@ -0,0 +1,138 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uscale0_1_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale8_9_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias8_9_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec2 uDstTextureUpperLeft_Stage2;
+uniform vec2 uDstTextureCoordScale_Stage2;
+uniform sampler2D uDstTextureSampler_Stage2;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in float vinCoverage_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c1_c0.w) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ } else {
+ {
+ {
+ scale = uscale8_9_Stage1_c0_c0_c0_c0_c1_c0;
+ bias = ubias8_9_Stage1_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ t.x = fract(t.x);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+vec4 ComposeOne_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_dst_in(_input, TiledGradientEffect_Stage1_c0_c0_c0_c0(vec4(1.0)));
+ return _output;
+}
+vec4 blend_src(vec4 src, vec4 dst) {
+ return src;
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ float alpha = 1.0;
+ alpha = vinCoverage_Stage0;
+ outputCoverage_Stage0 = vec4(alpha);
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ComposeOne_Stage1_c0_c0(vec4(1.0));
+ }
+ {
+ if (all(lessThanEqual(outputCoverage_Stage0.xyz, vec3(0.0)))) {
+ discard;
+ }
+ vec2 _dstTexCoord = (gl_FragCoord.xy - uDstTextureUpperLeft_Stage2) * uDstTextureCoordScale_Stage2;
+ _dstTexCoord.y = 1.0 - _dstTexCoord.y;
+ vec4 _dstColor = texture(uDstTextureSampler_Stage2, _dstTexCoord);
+ sk_FragColor = blend_src(output_Stage1, _dstColor);
+ sk_FragColor = outputCoverage_Stage0 * sk_FragColor + (vec4(1.0) - outputCoverage_Stage0) * _dstColor;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in float inCoverage;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out float vinCoverage_Stage0;
+void main() {
+ vec4 color = inColor;
+ vcolor_Stage0 = color;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ vinCoverage_Stage0 = inCoverage;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/2407.shader_test b/shaders/skia/2407.shader_test
new file mode 100644
index 0000000..bc4283f
--- /dev/null
+++ b/shaders/skia/2407.shader_test
@@ -0,0 +1,99 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uColor_Stage0;
+uniform vec4 uleftBorderColor_Stage1_c0_c0_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c0_c0_c1_c0;
+ }
+ } else {
+ {
+ scale = uscale4_5_Stage1_c0_c0_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+vec4 ComposeOne_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_dst_in(_input, ClampedGradientEffect_Stage1_c0_c0_c0_c0(vec4(1.0)));
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ComposeOne_Stage1_c0_c0(vec4(1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec2 pos2 = (uViewM_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/241-2.shader_test b/shaders/skia/241-2.shader_test
new file mode 100644
index 0000000..ff56d1e
--- /dev/null
+++ b/shaders/skia/241-2.shader_test
@@ -0,0 +1,209 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform float uSurfaceScale_Stage1;
+uniform vec3 uLightColor_Stage1;
+uniform float uKD_Stage1;
+uniform vec4 uTexDom_Stage1;
+uniform vec3 uDecalParams_Stage1;
+uniform vec3 uLightLocation_Stage1;
+uniform float uExponent_Stage1;
+uniform float uCosInnerConeAngle_Stage1;
+uniform float uCosOuterConeAngle_Stage1;
+uniform float uConeScale_Stage1;
+uniform vec3 uS_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 light_Stage1(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ float colorScale = uKD_Stage1 * dot(normal, surfaceToLight);
+ return vec4(lightColor * clamp(colorScale, 0.0, 1.0), 1.0);
+}
+float sobel_Stage1(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage1(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage1(float m[9], float surfaceScale) {
+ return pointToNormal_Stage1(sobel_Stage1(m[0], m[1], m[3], m[4], m[6], m[7], 0.5), sobel_Stage1(m[0], m[6], m[1], m[7], 0.0, 0.0, 0.33333298563957214), surfaceScale);
+}
+vec3 lightColor_Stage1(vec3 surfaceToLight) {
+ float cosAngle = -dot(surfaceToLight, uS_Stage1);
+ if (cosAngle < uCosOuterConeAngle_Stage1) {
+ return vec3(0.0);
+ }
+ float scale = pow(cosAngle, uExponent_Stage1);
+ if (cosAngle < uCosInnerConeAngle_Stage1) {
+ return ((uLightColor_Stage1 * scale) * (cosAngle - uCosOuterConeAngle_Stage1)) * uConeScale_Stage1;
+ }
+ return uLightColor_Stage1;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ vec2 coord = vTransformedCoords_0_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp0 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp5 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp6 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp7 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp8 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = normalize(uLightLocation_Stage1 - vec3(gl_FragCoord.xy, uSurfaceScale_Stage1 * m[4]));
+ output_Stage1 = light_Stage1(normal_Stage1(m, uSurfaceScale_Stage1), surfaceToLight, lightColor_Stage1(surfaceToLight));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/241-3.shader_test b/shaders/skia/241-3.shader_test
new file mode 100644
index 0000000..f94d01e
--- /dev/null
+++ b/shaders/skia/241-3.shader_test
@@ -0,0 +1,123 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform vec2 uBounds_Stage1;
+uniform vec4 uKernel_Stage1[6];
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0 - 10.0 * uImageIncrement_Stage1;
+ vec2 coordSampled = vec2(0.0, 0.0);
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[4].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[4].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[4].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[4].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[5].x;
+ coord += uImageIncrement_Stage1;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ sk_FragColor = sk_FragColor.wwww;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/241-4.shader_test b/shaders/skia/241-4.shader_test
new file mode 100644
index 0000000..918fbd6
--- /dev/null
+++ b/shaders/skia/241-4.shader_test
@@ -0,0 +1,45 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uinnerRect_Stage2;
+uniform vec2 uradiusPlusHalf_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ vec2 dxy0 = uinnerRect_Stage2.xy - gl_FragCoord.xy;
+ vec2 dxy1 = gl_FragCoord.xy - uinnerRect_Stage2.zw;
+ vec2 dxy = max(max(dxy0, dxy1), 0.0);
+ float alpha = clamp(uradiusPlusHalf_Stage2.x - length(dxy), 0.0, 1.0);
+ output_Stage2 = output_Stage1 * alpha;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/241.shader_test b/shaders/skia/241.shader_test
new file mode 100644
index 0000000..5e4e6f3
--- /dev/null
+++ b/shaders/skia/241.shader_test
@@ -0,0 +1,88 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 ucolor_Stage1_c0_c0_c0_c0;
+uniform vec4 ucolor_Stage2;
+uniform vec4 ucolor_Stage3_c1_c0;
+noperspective in vec4 vcolor_Stage0;
+vec4 ConstColorProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = _input.w * ucolor_Stage1_c0_c0_c0_c0;
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = ConstColorProcessor_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 ConstColorProcessor_Stage3_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage3_c1_c0;
+ }
+ return _output;
+}
+vec4 blend_src_atop(vec4 src, vec4 dst) {
+ return dst.w * src + (1.0 - src.w) * dst;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 blend_darken(vec4 src, vec4 dst) {
+ vec4 result = blend_src_over(src, dst);
+ result.xyz = min(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
+ return result;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_src_atop(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ {
+ output_Stage2 = output_Stage1 * ucolor_Stage2;
+ }
+ }
+ vec4 output_Stage3;
+ {
+ output_Stage3 = blend_darken(ConstColorProcessor_Stage3_c1_c0(vec4(1.0)), output_Stage2);
+ }
+ {
+ sk_FragColor = output_Stage3;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 position;
+in vec4 inColor;
+noperspective out vec4 vcolor_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/2410.shader_test b/shaders/skia/2410.shader_test
new file mode 100644
index 0000000..0a3caf5
--- /dev/null
+++ b/shaders/skia/2410.shader_test
@@ -0,0 +1,102 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uColor_Stage0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c0_c0_c1_c0;
+in vec2 vTransformedCoords_0_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ t.x = fract(t.x);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+vec4 ComposeOne_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_dst_in(_input, TiledGradientEffect_Stage1_c0_c0_c0_c0(vec4(1.0)));
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ComposeOne_Stage1_c0_c0(vec4(1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec2 inLocalCoord;
+out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec3 pos3 = uViewM_Stage0 * vec3(inPosition, 1.0);
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos3.x, pos3.y, 0.0, pos3.z);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/2413.shader_test b/shaders/skia/2413.shader_test
new file mode 100644
index 0000000..b07a97f
--- /dev/null
+++ b/shaders/skia/2413.shader_test
@@ -0,0 +1,105 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uscale0_1_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c0_c0_c1_c0;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 RadialGradientLayout_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = length(vTransformedCoords_0_Stage0);
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = RadialGradientLayout_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ t.x = fract(t.x);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+vec4 ComposeOne_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_dst_in(_input, TiledGradientEffect_Stage1_c0_c0_c0_c0(vec4(1.0)));
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ComposeOne_Stage1_c0_c0(vec4(1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 color = inColor;
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/2416.shader_test b/shaders/skia/2416.shader_test
new file mode 100644
index 0000000..7e977f8
--- /dev/null
+++ b/shaders/skia/2416.shader_test
@@ -0,0 +1,124 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uscale0_1_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec2 uDstTextureUpperLeft_Stage2;
+uniform vec2 uDstTextureCoordScale_Stage2;
+uniform sampler2D uDstTextureSampler_Stage2;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in float vinCoverage_Stage0;
+vec4 RadialGradientLayout_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = length(vTransformedCoords_0_Stage0);
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c0_c0_c1_c0;
+ }
+ } else {
+ {
+ scale = uscale4_5_Stage1_c0_c0_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = RadialGradientLayout_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ t.x = fract(t.x);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+vec4 ComposeOne_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_dst_in(_input, TiledGradientEffect_Stage1_c0_c0_c0_c0(vec4(1.0)));
+ return _output;
+}
+vec4 blend_src(vec4 src, vec4 dst) {
+ return src;
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ float alpha = 1.0;
+ alpha = vinCoverage_Stage0;
+ outputCoverage_Stage0 = vec4(alpha);
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ComposeOne_Stage1_c0_c0(vec4(1.0));
+ }
+ {
+ if (all(lessThanEqual(outputCoverage_Stage0.xyz, vec3(0.0)))) {
+ discard;
+ }
+ vec2 _dstTexCoord = (gl_FragCoord.xy - uDstTextureUpperLeft_Stage2) * uDstTextureCoordScale_Stage2;
+ _dstTexCoord.y = 1.0 - _dstTexCoord.y;
+ vec4 _dstColor = texture(uDstTextureSampler_Stage2, _dstTexCoord);
+ sk_FragColor = blend_src(output_Stage1, _dstColor);
+ sk_FragColor = outputCoverage_Stage0 * sk_FragColor + (vec4(1.0) - outputCoverage_Stage0) * _dstColor;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in float inCoverage;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out float vinCoverage_Stage0;
+void main() {
+ vec4 color = inColor;
+ vcolor_Stage0 = color;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ vinCoverage_Stage0 = inCoverage;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/2419.shader_test b/shaders/skia/2419.shader_test
new file mode 100644
index 0000000..f464881
--- /dev/null
+++ b/shaders/skia/2419.shader_test
@@ -0,0 +1,100 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uColor_Stage0;
+uniform vec4 uleftBorderColor_Stage1_c0_c0_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 RadialGradientLayout_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = length(vTransformedCoords_0_Stage0);
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c0_c0_c1_c0;
+ }
+ } else {
+ {
+ scale = uscale4_5_Stage1_c0_c0_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = RadialGradientLayout_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+vec4 ComposeOne_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_dst_in(_input, ClampedGradientEffect_Stage1_c0_c0_c0_c0(vec4(1.0)));
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ComposeOne_Stage1_c0_c0(vec4(1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec2 inLocalCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec2 pos2 = (uViewM_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/2422.shader_test b/shaders/skia/2422.shader_test
new file mode 100644
index 0000000..8be512d
--- /dev/null
+++ b/shaders/skia/2422.shader_test
@@ -0,0 +1,115 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uColor_Stage0;
+uniform float uCoverage_Stage0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec2 uDstTextureUpperLeft_Stage2;
+uniform vec2 uDstTextureCoordScale_Stage2;
+uniform sampler2D uDstTextureSampler_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 RadialGradientLayout_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = length(vTransformedCoords_0_Stage0);
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c0_c0_c1_c0;
+ }
+ } else {
+ {
+ scale = uscale4_5_Stage1_c0_c0_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = RadialGradientLayout_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ t.x = fract(t.x);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+vec4 ComposeOne_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_dst_in(_input, TiledGradientEffect_Stage1_c0_c0_c0_c0(vec4(1.0)));
+ return _output;
+}
+vec4 blend_src(vec4 src, vec4 dst) {
+ return src;
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ outputCoverage_Stage0 = vec4(uCoverage_Stage0);
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ComposeOne_Stage1_c0_c0(vec4(1.0));
+ }
+ {
+ if (all(lessThanEqual(outputCoverage_Stage0.xyz, vec3(0.0)))) {
+ discard;
+ }
+ vec2 _dstTexCoord = (gl_FragCoord.xy - uDstTextureUpperLeft_Stage2) * uDstTextureCoordScale_Stage2;
+ _dstTexCoord.y = 1.0 - _dstTexCoord.y;
+ vec4 _dstColor = texture(uDstTextureSampler_Stage2, _dstTexCoord);
+ sk_FragColor = blend_src(output_Stage1, _dstColor);
+ sk_FragColor = outputCoverage_Stage0 * sk_FragColor + (vec4(1.0) - outputCoverage_Stage0) * _dstColor;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/2425.shader_test b/shaders/skia/2425.shader_test
new file mode 100644
index 0000000..f790c2c
--- /dev/null
+++ b/shaders/skia/2425.shader_test
@@ -0,0 +1,154 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c0_c0_c1_c0;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 RadialGradientLayout_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = length(vTransformedCoords_0_Stage0);
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c0_c0_c1_c0;
+ }
+ } else {
+ {
+ scale = uscale4_5_Stage1_c0_c0_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = RadialGradientLayout_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+vec4 ComposeOne_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_dst_in(_input, ClampedGradientEffect_Stage1_c0_c0_c0_c0(vec4(1.0)));
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ComposeOne_Stage1_c0_c0(vec4(1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform float uSrcTF_Stage0[7];
+uniform mat3 uColorXform_Stage0;
+uniform float uDstTF_Stage0[7];
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 inColor;
+in vec2 inLocalCoord;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+float src_tf_Stage0(float x) {
+ float G = uSrcTF_Stage0[0];
+ float A = uSrcTF_Stage0[1];
+ float B = uSrcTF_Stage0[2];
+ float C = uSrcTF_Stage0[3];
+ float D = uSrcTF_Stage0[4];
+ float E = uSrcTF_Stage0[5];
+ float F = uSrcTF_Stage0[6];
+ float s = sign(x);
+ x = abs(x);
+ x = x < D ? C * x + F : pow(A * x + B, G) + E;
+ return s * x;
+}
+float dst_tf_Stage0(float x) {
+ float G = uDstTF_Stage0[0];
+ float A = uDstTF_Stage0[1];
+ float B = uDstTF_Stage0[2];
+ float C = uDstTF_Stage0[3];
+ float D = uDstTF_Stage0[4];
+ float E = uDstTF_Stage0[5];
+ float F = uDstTF_Stage0[6];
+ float s = sign(x);
+ x = abs(x);
+ x = x < D ? C * x + F : pow(A * x + B, G) + E;
+ return s * x;
+}
+vec4 gamut_xform_Stage0(vec4 color) {
+ color.xyz = uColorXform_Stage0 * color.xyz;
+ return color;
+}
+vec4 color_xform_Stage0(vec4 color) {
+ float nonZeroAlpha = max(color.w, 9.9999997473787516e-05);
+ color = vec4(color.xyz / nonZeroAlpha, nonZeroAlpha);
+ color.x = src_tf_Stage0(color.x);
+ color.y = src_tf_Stage0(color.y);
+ color.z = src_tf_Stage0(color.z);
+ color = gamut_xform_Stage0(color);
+ color.x = dst_tf_Stage0(color.x);
+ color.y = dst_tf_Stage0(color.y);
+ color.z = dst_tf_Stage0(color.z);
+ color.xyz *= color.w;
+ return color;
+}
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = color_xform_Stage0(color);
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_PointSize = 1.0;
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/2428.shader_test b/shaders/skia/2428.shader_test
new file mode 100644
index 0000000..12afb08
--- /dev/null
+++ b/shaders/skia/2428.shader_test
@@ -0,0 +1,107 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uColor_Stage0;
+uniform float uCoverage_Stage0;
+uniform vec4 uleftBorderColor_Stage1_c0_c0_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0_c0_c0;
+uniform vec4 uscale01_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias01_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale23_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias23_Stage1_c0_c0_c0_c0_c1_c0;
+uniform float uthreshold_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec2 uDstTextureUpperLeft_Stage2;
+uniform vec2 uDstTextureCoordScale_Stage2;
+uniform sampler2D uDstTextureSampler_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 RadialGradientLayout_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = length(vTransformedCoords_0_Stage0);
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 DualIntervalGradientColorizer_Stage1_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthreshold_Stage1_c0_c0_c0_c0_c1_c0) {
+ scale = uscale01_Stage1_c0_c0_c0_c0_c1_c0;
+ bias = ubias01_Stage1_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale23_Stage1_c0_c0_c0_c0_c1_c0;
+ bias = ubias23_Stage1_c0_c0_c0_c0_c1_c0;
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = RadialGradientLayout_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0_c0_c0;
+ } else {
+ _output = DualIntervalGradientColorizer_Stage1_c0_c0_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+vec4 ComposeOne_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_dst_in(_input, ClampedGradientEffect_Stage1_c0_c0_c0_c0(vec4(1.0)));
+ return _output;
+}
+vec4 blend_src(vec4 src, vec4 dst) {
+ return src;
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ outputCoverage_Stage0 = vec4(uCoverage_Stage0);
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ComposeOne_Stage1_c0_c0(vec4(1.0));
+ }
+ {
+ if (all(lessThanEqual(outputCoverage_Stage0.xyz, vec3(0.0)))) {
+ discard;
+ }
+ vec2 _dstTexCoord = (gl_FragCoord.xy - uDstTextureUpperLeft_Stage2) * uDstTextureCoordScale_Stage2;
+ _dstTexCoord.y = 1.0 - _dstTexCoord.y;
+ vec4 _dstColor = texture(uDstTextureSampler_Stage2, _dstTexCoord);
+ sk_FragColor = blend_src(output_Stage1, _dstColor);
+ sk_FragColor = outputCoverage_Stage0 * sk_FragColor + (vec4(1.0) - outputCoverage_Stage0) * _dstColor;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec2 pos2 = (uViewM_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/2431.shader_test b/shaders/skia/2431.shader_test
new file mode 100644
index 0000000..441bd1d
--- /dev/null
+++ b/shaders/skia/2431.shader_test
@@ -0,0 +1,99 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uscale0_1_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 RadialGradientLayout_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = length(vTransformedCoords_0_Stage0);
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = RadialGradientLayout_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ t.x = fract(t.x);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+vec4 ComposeOne_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_dst_in(_input, TiledGradientEffect_Stage1_c0_c0_c0_c0(vec4(1.0)));
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ComposeOne_Stage1_c0_c0(vec4(1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/2434.shader_test b/shaders/skia/2434.shader_test
new file mode 100644
index 0000000..38e8254
--- /dev/null
+++ b/shaders/skia/2434.shader_test
@@ -0,0 +1,145 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0_c0_c0;
+uniform float ubias_Stage1_c0_c0_c0_c0_c0_c0;
+uniform float uscale_Stage1_c0_c0_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec2 uDstTextureUpperLeft_Stage2;
+uniform vec2 uDstTextureCoordScale_Stage2;
+uniform sampler2D uDstTextureSampler_Stage2;
+noperspective in vec4 vQuadEdge_Stage0;
+noperspective in vec4 vinColor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 SweepGradientLayout_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float angle;
+ {
+ angle = atan(-vTransformedCoords_0_Stage0.y, -vTransformedCoords_0_Stage0.x);
+ }
+ float t = ((angle * 0.15915493667125702 + 0.5) + ubias_Stage1_c0_c0_c0_c0_c0_c0) * uscale_Stage1_c0_c0_c0_c0_c0_c0;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = SweepGradientLayout_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+vec4 ComposeOne_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_dst_in(_input, ClampedGradientEffect_Stage1_c0_c0_c0_c0(vec4(1.0)));
+ return _output;
+}
+vec4 blend_src(vec4 src, vec4 dst) {
+ return src;
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ float edgeAlpha;
+ vec2 duvdx = dFdx(vQuadEdge_Stage0.xy);
+ vec2 duvdy = -dFdy(vQuadEdge_Stage0.xy);
+ if (vQuadEdge_Stage0.z > 0.0 && vQuadEdge_Stage0.w > 0.0) {
+ edgeAlpha = min(min(vQuadEdge_Stage0.z, vQuadEdge_Stage0.w) + 0.5, 1.0);
+ } else {
+ vec2 gF = vec2((2.0 * vQuadEdge_Stage0.x) * duvdx.x - duvdx.y, (2.0 * vQuadEdge_Stage0.x) * duvdy.x - duvdy.y);
+ edgeAlpha = vQuadEdge_Stage0.x * vQuadEdge_Stage0.x - vQuadEdge_Stage0.y;
+ edgeAlpha = clamp(0.5 - edgeAlpha / length(gF), 0.0, 1.0);
+ }
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ComposeOne_Stage1_c0_c0(vec4(1.0));
+ }
+ {
+ if (all(lessThanEqual(outputCoverage_Stage0.xyz, vec3(0.0)))) {
+ discard;
+ }
+ vec2 _dstTexCoord = (gl_FragCoord.xy - uDstTextureUpperLeft_Stage2) * uDstTextureCoordScale_Stage2;
+ _dstTexCoord.y = 1.0 - _dstTexCoord.y;
+ vec4 _dstColor = texture(uDstTextureSampler_Stage2, _dstTexCoord);
+ sk_FragColor = blend_src(output_Stage1, _dstColor);
+ sk_FragColor = outputCoverage_Stage0 * sk_FragColor + (vec4(1.0) - outputCoverage_Stage0) * _dstColor;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec4 inQuadEdge;
+noperspective out vec4 vQuadEdge_Stage0;
+noperspective out vec4 vinColor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vQuadEdge_Stage0 = inQuadEdge;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/2437.shader_test b/shaders/skia/2437.shader_test
new file mode 100644
index 0000000..5c845c2
--- /dev/null
+++ b/shaders/skia/2437.shader_test
@@ -0,0 +1,98 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0_c0_c0;
+uniform float ubias_Stage1_c0_c0_c0_c0_c0_c0;
+uniform float uscale_Stage1_c0_c0_c0_c0_c0_c0;
+uniform vec4 uscale01_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias01_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale23_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias23_Stage1_c0_c0_c0_c0_c1_c0;
+uniform float uthreshold_Stage1_c0_c0_c0_c0_c1_c0;
+in vec4 vcolor_Stage0;
+in vec2 vTransformedCoords_0_Stage0;
+vec4 SweepGradientLayout_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float angle;
+ {
+ angle = atan(-vTransformedCoords_0_Stage0.y, -vTransformedCoords_0_Stage0.x);
+ }
+ float t = ((angle * 0.15915493667125702 + 0.5) + ubias_Stage1_c0_c0_c0_c0_c0_c0) * uscale_Stage1_c0_c0_c0_c0_c0_c0;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 DualIntervalGradientColorizer_Stage1_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthreshold_Stage1_c0_c0_c0_c0_c1_c0) {
+ scale = uscale01_Stage1_c0_c0_c0_c0_c1_c0;
+ bias = ubias01_Stage1_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale23_Stage1_c0_c0_c0_c0_c1_c0;
+ bias = ubias23_Stage1_c0_c0_c0_c0_c1_c0;
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = SweepGradientLayout_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0_c0_c0;
+ } else {
+ _output = DualIntervalGradientColorizer_Stage1_c0_c0_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+vec4 ComposeOne_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_dst_in(_input, ClampedGradientEffect_Stage1_c0_c0_c0_c0(vec4(1.0)));
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ComposeOne_Stage1_c0_c0(vec4(1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec2 inLocalCoord;
+out vec4 vcolor_Stage0;
+out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 color = inColor;
+ vcolor_Stage0 = color;
+ vec3 pos3 = uViewM_Stage0 * vec3(inPosition, 1.0);
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos3.x, pos3.y, 0.0, pos3.z);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/244-2.shader_test b/shaders/skia/244-2.shader_test
new file mode 100644
index 0000000..8fa37a5
--- /dev/null
+++ b/shaders/skia/244-2.shader_test
@@ -0,0 +1,209 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform float uSurfaceScale_Stage1;
+uniform vec3 uLightColor_Stage1;
+uniform float uKD_Stage1;
+uniform vec4 uTexDom_Stage1;
+uniform vec3 uDecalParams_Stage1;
+uniform vec3 uLightLocation_Stage1;
+uniform float uExponent_Stage1;
+uniform float uCosInnerConeAngle_Stage1;
+uniform float uCosOuterConeAngle_Stage1;
+uniform float uConeScale_Stage1;
+uniform vec3 uS_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 light_Stage1(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ float colorScale = uKD_Stage1 * dot(normal, surfaceToLight);
+ return vec4(lightColor * clamp(colorScale, 0.0, 1.0), 1.0);
+}
+float sobel_Stage1(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage1(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage1(float m[9], float surfaceScale) {
+ return pointToNormal_Stage1(sobel_Stage1(m[1], m[2], m[4], m[5], 0.0, 0.0, 0.66666698455810547), sobel_Stage1(0.0, 0.0, m[1], m[4], m[2], m[5], 0.66666698455810547), surfaceScale);
+}
+vec3 lightColor_Stage1(vec3 surfaceToLight) {
+ float cosAngle = -dot(surfaceToLight, uS_Stage1);
+ if (cosAngle < uCosOuterConeAngle_Stage1) {
+ return vec3(0.0);
+ }
+ float scale = pow(cosAngle, uExponent_Stage1);
+ if (cosAngle < uCosInnerConeAngle_Stage1) {
+ return ((uLightColor_Stage1 * scale) * (cosAngle - uCosOuterConeAngle_Stage1)) * uConeScale_Stage1;
+ }
+ return uLightColor_Stage1;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ vec2 coord = vTransformedCoords_0_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp0 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp5 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp6 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp7 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp8 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = normalize(uLightLocation_Stage1 - vec3(gl_FragCoord.xy, uSurfaceScale_Stage1 * m[4]));
+ output_Stage1 = light_Stage1(normal_Stage1(m, uSurfaceScale_Stage1), surfaceToLight, lightColor_Stage1(surfaceToLight));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/244-4.shader_test b/shaders/skia/244-4.shader_test
new file mode 100644
index 0000000..c954f4d
--- /dev/null
+++ b/shaders/skia/244-4.shader_test
@@ -0,0 +1,46 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uinnerRect_Stage2;
+uniform vec2 uradiusPlusHalf_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ vec2 dxy0 = uinnerRect_Stage2.xy - gl_FragCoord.xy;
+ vec2 dxy1 = gl_FragCoord.xy - uinnerRect_Stage2.zw;
+ vec2 dxy = max(max(dxy0, dxy1), 0.0);
+ float alpha = clamp(uradiusPlusHalf_Stage2.x - length(dxy), 0.0, 1.0);
+ alpha = 1.0 - alpha;
+ output_Stage2 = output_Stage1 * alpha;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/244.shader_test b/shaders/skia/244.shader_test
new file mode 100644
index 0000000..5117621
--- /dev/null
+++ b/shaders/skia/244.shader_test
@@ -0,0 +1,132 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.w) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ } else {
+ {
+ if (t < uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = OverrideInputFragmentProcessor_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 blend_dst_atop(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src + src.w * dst;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_dst_atop(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 inColor;
+in vec2 inLocalCoord;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/2440.shader_test b/shaders/skia/2440.shader_test
new file mode 100644
index 0000000..d17b7c6
--- /dev/null
+++ b/shaders/skia/2440.shader_test
@@ -0,0 +1,111 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uColor_Stage0;
+uniform vec4 uleftBorderColor_Stage1_c0_c0_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0_c0_c0;
+uniform float ubias_Stage1_c0_c0_c0_c0_c0_c0;
+uniform float uscale_Stage1_c0_c0_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 SweepGradientLayout_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float angle;
+ {
+ angle = atan(-vTransformedCoords_0_Stage0.y, -vTransformedCoords_0_Stage0.x);
+ }
+ float t = ((angle * 0.15915493667125702 + 0.5) + ubias_Stage1_c0_c0_c0_c0_c0_c0) * uscale_Stage1_c0_c0_c0_c0_c0_c0;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = SweepGradientLayout_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+vec4 ComposeOne_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_dst_in(_input, ClampedGradientEffect_Stage1_c0_c0_c0_c0(vec4(1.0)));
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ComposeOne_Stage1_c0_c0(vec4(1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec2 inLocalCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec2 pos2 = (uViewM_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/2443.shader_test b/shaders/skia/2443.shader_test
new file mode 100644
index 0000000..ca98eb7
--- /dev/null
+++ b/shaders/skia/2443.shader_test
@@ -0,0 +1,154 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0_c0_c0;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec2 uDstTextureUpperLeft_Stage2;
+uniform vec2 uDstTextureCoordScale_Stage2;
+uniform sampler2D uDstTextureSampler_Stage2;
+noperspective in vec2 vEllipseOffsets_Stage0;
+noperspective in vec4 vEllipseRadii_Stage0;
+noperspective in vec4 vinColor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_0_Stage0;
+ float t = -1.0;
+ {
+ {
+ float r0 = ufocalParams_Stage1_c0_c0_c0_c0_c0_c0.x;
+ {
+ t = -length(p) - r0;
+ }
+ }
+ }
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c0_c0_c1_c0;
+ }
+ } else {
+ {
+ scale = uscale4_5_Stage1_c0_c0_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+vec4 ComposeOne_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_dst_in(_input, ClampedGradientEffect_Stage1_c0_c0_c0_c0(vec4(1.0)));
+ return _output;
+}
+vec4 blend_src(vec4 src, vec4 dst) {
+ return src;
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ vec2 offset = vEllipseOffsets_Stage0;
+ offset *= vEllipseRadii_Stage0.xy;
+ float test = dot(offset, offset) - 1.0;
+ vec2 grad = (2.0 * offset) * vEllipseRadii_Stage0.xy;
+ float grad_dot = dot(grad, grad);
+ grad_dot = max(grad_dot, 1.1754999560161448e-38);
+ float invlen = inversesqrt(grad_dot);
+ float edgeAlpha = clamp(0.5 - test * invlen, 0.0, 1.0);
+ offset = vEllipseOffsets_Stage0 * vEllipseRadii_Stage0.zw;
+ test = dot(offset, offset) - 1.0;
+ grad = (2.0 * offset) * vEllipseRadii_Stage0.zw;
+ grad_dot = dot(grad, grad);
+ invlen = inversesqrt(grad_dot);
+ edgeAlpha *= clamp(0.5 + test * invlen, 0.0, 1.0);
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ComposeOne_Stage1_c0_c0(vec4(1.0));
+ }
+ {
+ if (all(lessThanEqual(outputCoverage_Stage0.xyz, vec3(0.0)))) {
+ discard;
+ }
+ vec2 _dstTexCoord = (gl_FragCoord.xy - uDstTextureUpperLeft_Stage2) * uDstTextureCoordScale_Stage2;
+ _dstTexCoord.y = 1.0 - _dstTexCoord.y;
+ vec4 _dstColor = texture(uDstTextureSampler_Stage2, _dstTexCoord);
+ sk_FragColor = blend_src(output_Stage1, _dstColor);
+ sk_FragColor = outputCoverage_Stage0 * sk_FragColor + (vec4(1.0) - outputCoverage_Stage0) * _dstColor;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec2 inEllipseOffset;
+in vec4 inEllipseRadii;
+noperspective out vec2 vEllipseOffsets_Stage0;
+noperspective out vec4 vEllipseRadii_Stage0;
+noperspective out vec4 vinColor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vEllipseOffsets_Stage0 = inEllipseOffset;
+ vEllipseRadii_Stage0 = inEllipseRadii;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/2446.shader_test b/shaders/skia/2446.shader_test
new file mode 100644
index 0000000..e3b677a
--- /dev/null
+++ b/shaders/skia/2446.shader_test
@@ -0,0 +1,106 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec2 uScale_Stage1_c0_c0;
+uniform vec4 uTexDom_Stage1_c0_c0;
+uniform vec3 uDecalParams_Stage1_c0_c0;
+uniform vec2 uDstTextureUpperLeft_Stage2;
+uniform vec2 uDstTextureCoordScale_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+uniform sampler2D uDstTextureSampler_Stage2;
+noperspective in vec2 vEllipseOffsets_Stage0;
+noperspective in vec4 vEllipseRadii_Stage0;
+noperspective in vec4 vinColor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 DisplacementMap_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 dColor = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ dColor.xyz = dColor.w < 9.9999999747524271e-07 ? vec3(0.0) : clamp(dColor.xyz / dColor.w, 0.0, 1.0);
+ vec2 cCoords = vTransformedCoords_1_Stage0 + uScale_Stage1_c0_c0 * (dColor.zy - vec2(0.5));
+ {
+ vec2 origCoord = cCoords;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0.xy, uTexDom_Stage1_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ _output = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ return _output;
+}
+vec4 blend_src(vec4 src, vec4 dst) {
+ return src;
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ vec2 offset = vEllipseOffsets_Stage0;
+ offset *= vEllipseRadii_Stage0.xy;
+ float test = dot(offset, offset) - 1.0;
+ vec2 grad = (2.0 * offset) * vEllipseRadii_Stage0.xy;
+ float grad_dot = dot(grad, grad);
+ grad_dot = max(grad_dot, 1.1754999560161448e-38);
+ float invlen = inversesqrt(grad_dot);
+ float edgeAlpha = clamp(0.5 - test * invlen, 0.0, 1.0);
+ offset = vEllipseOffsets_Stage0 * vEllipseRadii_Stage0.zw;
+ test = dot(offset, offset) - 1.0;
+ grad = (2.0 * offset) * vEllipseRadii_Stage0.zw;
+ grad_dot = dot(grad, grad);
+ invlen = inversesqrt(grad_dot);
+ edgeAlpha *= clamp(0.5 + test * invlen, 0.0, 1.0);
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = DisplacementMap_Stage1_c0_c0(vec4(1.0));
+ }
+ {
+ if (all(lessThanEqual(outputCoverage_Stage0.xyz, vec3(0.0)))) {
+ discard;
+ }
+ vec2 _dstTexCoord = (gl_FragCoord.xy - uDstTextureUpperLeft_Stage2) * uDstTextureCoordScale_Stage2;
+ _dstTexCoord.y = 1.0 - _dstTexCoord.y;
+ vec4 _dstColor = texture(uDstTextureSampler_Stage2, _dstTexCoord);
+ sk_FragColor = blend_src(output_Stage1, _dstColor);
+ sk_FragColor = outputCoverage_Stage0 * sk_FragColor + (vec4(1.0) - outputCoverage_Stage0) * _dstColor;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec2 inEllipseOffset;
+in vec4 inEllipseRadii;
+noperspective out vec2 vEllipseOffsets_Stage0;
+noperspective out vec4 vEllipseRadii_Stage0;
+noperspective out vec4 vinColor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vEllipseOffsets_Stage0 = inEllipseOffset;
+ vEllipseRadii_Stage0 = inEllipseRadii;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/2449.shader_test b/shaders/skia/2449.shader_test
new file mode 100644
index 0000000..0e4fb3e
--- /dev/null
+++ b/shaders/skia/2449.shader_test
@@ -0,0 +1,66 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uScale_Stage1_c0_c0;
+uniform vec4 uTexDom_Stage1_c0_c0;
+uniform vec3 uDecalParams_Stage1_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 DisplacementMap_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 dColor = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ dColor.xyz = dColor.w < 9.9999999747524271e-07 ? vec3(0.0) : clamp(dColor.xyz / dColor.w, 0.0, 1.0);
+ vec2 cCoords = vTransformedCoords_1_Stage0 + uScale_Stage1_c0_c0 * (dColor.zz - vec2(0.5));
+ {
+ vec2 origCoord = cCoords;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0.xy, uTexDom_Stage1_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ _output = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = DisplacementMap_Stage1_c0_c0(vec4(1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vec4 color = inColor;
+ vcolor_Stage0 = color;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/2452.shader_test b/shaders/skia/2452.shader_test
new file mode 100644
index 0000000..919a1a5
--- /dev/null
+++ b/shaders/skia/2452.shader_test
@@ -0,0 +1,67 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uScale_Stage1_c0_c0;
+uniform vec4 uTexDom_Stage1_c0_c0;
+uniform vec3 uDecalParams_Stage1_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 DisplacementMap_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 dColor = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ dColor.xyz = dColor.w < 9.9999999747524271e-07 ? vec3(0.0) : clamp(dColor.xyz / dColor.w, 0.0, 1.0);
+ vec2 cCoords = vTransformedCoords_1_Stage0 + uScale_Stage1_c0_c0 * (dColor.zy - vec2(0.5));
+ {
+ vec2 origCoord = cCoords;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0.xy, uTexDom_Stage1_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ _output = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = DisplacementMap_Stage1_c0_c0(vec4(1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vec4 color = inColor;
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/2455.shader_test b/shaders/skia/2455.shader_test
new file mode 100644
index 0000000..dc50e11
--- /dev/null
+++ b/shaders/skia/2455.shader_test
@@ -0,0 +1,91 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec2 uScale_Stage1_c0_c0;
+uniform vec4 uTexDom_Stage1_c0_c0;
+uniform vec3 uDecalParams_Stage1_c0_c0;
+uniform vec2 uDstTextureUpperLeft_Stage2;
+uniform vec2 uDstTextureCoordScale_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+uniform sampler2D uDstTextureSampler_Stage2;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in float vinCoverage_Stage0;
+vec4 DisplacementMap_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 dColor = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ dColor.xyz = dColor.w < 9.9999999747524271e-07 ? vec3(0.0) : clamp(dColor.xyz / dColor.w, 0.0, 1.0);
+ vec2 cCoords = vTransformedCoords_1_Stage0 + uScale_Stage1_c0_c0 * (dColor.wz - vec2(0.5));
+ {
+ vec2 origCoord = cCoords;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0.xy, uTexDom_Stage1_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ _output = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ return _output;
+}
+vec4 blend_src(vec4 src, vec4 dst) {
+ return src;
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ float alpha = 1.0;
+ alpha = vinCoverage_Stage0;
+ outputCoverage_Stage0 = vec4(alpha);
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = DisplacementMap_Stage1_c0_c0(vec4(1.0));
+ }
+ {
+ if (all(lessThanEqual(outputCoverage_Stage0.xyz, vec3(0.0)))) {
+ discard;
+ }
+ vec2 _dstTexCoord = (gl_FragCoord.xy - uDstTextureUpperLeft_Stage2) * uDstTextureCoordScale_Stage2;
+ _dstTexCoord.y = 1.0 - _dstTexCoord.y;
+ vec4 _dstColor = texture(uDstTextureSampler_Stage2, _dstTexCoord);
+ sk_FragColor = blend_src(output_Stage1, _dstColor);
+ sk_FragColor = outputCoverage_Stage0 * sk_FragColor + (vec4(1.0) - outputCoverage_Stage0) * _dstColor;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in float inCoverage;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out float vinCoverage_Stage0;
+void main() {
+ vec4 color = inColor;
+ vcolor_Stage0 = color;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(inPosition, 1.0)).xy;
+ vinCoverage_Stage0 = inCoverage;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/2458.shader_test b/shaders/skia/2458.shader_test
new file mode 100644
index 0000000..9565ac8
--- /dev/null
+++ b/shaders/skia/2458.shader_test
@@ -0,0 +1,68 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uScale_Stage1_c0_c0;
+uniform vec4 uTexDom_Stage1_c0_c0;
+uniform vec3 uDecalParams_Stage1_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 DisplacementMap_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 dColor = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ dColor.xyz = dColor.w < 9.9999999747524271e-07 ? vec3(0.0) : clamp(dColor.xyz / dColor.w, 0.0, 1.0);
+ vec2 cCoords = vTransformedCoords_1_Stage0 + uScale_Stage1_c0_c0 * (dColor.yz - vec2(0.5));
+ {
+ vec2 origCoord = cCoords;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0.xy, uTexDom_Stage1_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ _output = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = DisplacementMap_Stage1_c0_c0(vec4(1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec2 inLocalCoord;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vec4 color = inColor;
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/2461.shader_test b/shaders/skia/2461.shader_test
new file mode 100644
index 0000000..ff58777
--- /dev/null
+++ b/shaders/skia/2461.shader_test
@@ -0,0 +1,83 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uScale_Stage1_c0_c0;
+uniform vec4 uTexDom_Stage1_c0_c0;
+uniform vec3 uDecalParams_Stage1_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vtextureCoords_Stage0;
+flat in vec4 vtextureDomain_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 DisplacementMap_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 dColor = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ dColor.xyz = dColor.w < 9.9999999747524271e-07 ? vec3(0.0) : clamp(dColor.xyz / dColor.w, 0.0, 1.0);
+ vec2 cCoords = vTransformedCoords_1_Stage0 + uScale_Stage1_c0_c0 * (dColor.yz - vec2(0.5));
+ {
+ vec2 origCoord = cCoords;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0.xy, uTexDom_Stage1_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ _output = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ return _output;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ vec2 textureCoords;
+ textureCoords = vtextureCoords_Stage0;
+ vec4 textureDomain;
+ textureDomain = vtextureDomain_Stage0;
+ outputColor_Stage0 = vcolor_Stage0;
+ outputColor_Stage0 = texture(uTextureSampler_0_Stage0, clamp(textureCoords, textureDomain.xy, textureDomain.zw)) * outputColor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = DisplacementMap_Stage1_c0_c0(vec4(1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 textureCoords;
+in vec4 textureDomain;
+in vec4 color;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vtextureCoords_Stage0;
+flat out vec4 vtextureDomain_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vec2 pos2 = position;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(textureCoords, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(textureCoords, 1.0)).xy;
+ vtextureCoords_Stage0 = textureCoords;
+ vtextureDomain_Stage0 = textureDomain;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/2467.shader_test b/shaders/skia/2467.shader_test
new file mode 100644
index 0000000..81da11e
--- /dev/null
+++ b/shaders/skia/2467.shader_test
@@ -0,0 +1,56 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uColor_Stage0;
+uniform float uinnerThreshold_Stage1_c0_c0;
+uniform float uouterThreshold_Stage1_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 AlphaThresholdFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 color = _input;
+ vec4 mask_color = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ if (mask_color.w < 0.5) {
+ if (color.w > uouterThreshold_Stage1_c0_c0) {
+ float scale = uouterThreshold_Stage1_c0_c0 / color.w;
+ color.xyz *= scale;
+ color.w = uouterThreshold_Stage1_c0_c0;
+ }
+ } else if (color.w < uinnerThreshold_Stage1_c0_c0) {
+ float scale = uinnerThreshold_Stage1_c0_c0 / max(0.0010000000474974513, color.w);
+ color.xyz *= scale;
+ color.w = uinnerThreshold_Stage1_c0_c0;
+ }
+ _output = color;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = AlphaThresholdFragmentProcessor_Stage1_c0_c0(vec4(1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec2 inLocalCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec2 pos2 = (uViewM_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/247-2.shader_test b/shaders/skia/247-2.shader_test
new file mode 100644
index 0000000..b5175ad
--- /dev/null
+++ b/shaders/skia/247-2.shader_test
@@ -0,0 +1,209 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform float uSurfaceScale_Stage1;
+uniform vec3 uLightColor_Stage1;
+uniform float uKD_Stage1;
+uniform vec4 uTexDom_Stage1;
+uniform vec3 uDecalParams_Stage1;
+uniform vec3 uLightLocation_Stage1;
+uniform float uExponent_Stage1;
+uniform float uCosInnerConeAngle_Stage1;
+uniform float uCosOuterConeAngle_Stage1;
+uniform float uConeScale_Stage1;
+uniform vec3 uS_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 light_Stage1(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ float colorScale = uKD_Stage1 * dot(normal, surfaceToLight);
+ return vec4(lightColor * clamp(colorScale, 0.0, 1.0), 1.0);
+}
+float sobel_Stage1(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage1(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage1(float m[9], float surfaceScale) {
+ return pointToNormal_Stage1(sobel_Stage1(m[0], m[2], m[3], m[5], 0.0, 0.0, 0.33333298563957214), sobel_Stage1(m[0], m[3], m[1], m[4], m[2], m[5], 0.5), surfaceScale);
+}
+vec3 lightColor_Stage1(vec3 surfaceToLight) {
+ float cosAngle = -dot(surfaceToLight, uS_Stage1);
+ if (cosAngle < uCosOuterConeAngle_Stage1) {
+ return vec3(0.0);
+ }
+ float scale = pow(cosAngle, uExponent_Stage1);
+ if (cosAngle < uCosInnerConeAngle_Stage1) {
+ return ((uLightColor_Stage1 * scale) * (cosAngle - uCosOuterConeAngle_Stage1)) * uConeScale_Stage1;
+ }
+ return uLightColor_Stage1;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ vec2 coord = vTransformedCoords_0_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp0 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp5 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp6 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp7 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp8 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = normalize(uLightLocation_Stage1 - vec3(gl_FragCoord.xy, uSurfaceScale_Stage1 * m[4]));
+ output_Stage1 = light_Stage1(normal_Stage1(m, uSurfaceScale_Stage1), surfaceToLight, lightColor_Stage1(surfaceToLight));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/247-3.shader_test b/shaders/skia/247-3.shader_test
new file mode 100644
index 0000000..ee85a53
--- /dev/null
+++ b/shaders/skia/247-3.shader_test
@@ -0,0 +1,23 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+uniform vec4 uColor_Stage0;
+void main() {
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 inPosition;
+in vec2 inLocalCoord;
+void main() {
+ vec2 pos2 = (uViewM_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/247-4.shader_test b/shaders/skia/247-4.shader_test
new file mode 100644
index 0000000..40fa08f
--- /dev/null
+++ b/shaders/skia/247-4.shader_test
@@ -0,0 +1,50 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uinnerRect_Stage2;
+uniform vec2 uinvRadiiXY_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ vec2 dxy0 = uinnerRect_Stage2.xy - gl_FragCoord.xy;
+ vec2 dxy1 = gl_FragCoord.xy - uinnerRect_Stage2.zw;
+ vec2 dxy = max(max(dxy0, dxy1), 0.0);
+ vec2 Z = dxy * uinvRadiiXY_Stage2;
+ float implicit = dot(Z, dxy) - 1.0;
+ float grad_dot = 4.0 * dot(Z, Z);
+ grad_dot = max(grad_dot, 9.9999997473787516e-05);
+ float approx_dist = implicit * inversesqrt(grad_dot);
+ float alpha = clamp(0.5 - approx_dist, 0.0, 1.0);
+ output_Stage2 = output_Stage1 * alpha;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/247.shader_test b/shaders/skia/247.shader_test
new file mode 100644
index 0000000..3b6b340
--- /dev/null
+++ b/shaders/skia/247.shader_test
@@ -0,0 +1,61 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 ucolor_Stage1_c0_c0_c0_c0;
+noperspective in vec4 vcolor_Stage0;
+vec4 ConstColorProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = _input.w * ucolor_Stage1_c0_c0_c0_c0;
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = ConstColorProcessor_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 blend_dst_atop(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src + src.w * dst;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_dst_atop(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 position;
+in vec4 inColor;
+noperspective out vec4 vcolor_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/2470.shader_test b/shaders/skia/2470.shader_test
new file mode 100644
index 0000000..09f1a96
--- /dev/null
+++ b/shaders/skia/2470.shader_test
@@ -0,0 +1,54 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uColor_Stage0;
+uniform float uinnerThreshold_Stage1_c0_c0;
+uniform float uouterThreshold_Stage1_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 AlphaThresholdFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 color = _input;
+ vec4 mask_color = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ if (mask_color.w < 0.5) {
+ if (color.w > uouterThreshold_Stage1_c0_c0) {
+ float scale = uouterThreshold_Stage1_c0_c0 / color.w;
+ color.xyz *= scale;
+ color.w = uouterThreshold_Stage1_c0_c0;
+ }
+ } else if (color.w < uinnerThreshold_Stage1_c0_c0) {
+ float scale = uinnerThreshold_Stage1_c0_c0 / max(0.0010000000474974513, color.w);
+ color.xyz *= scale;
+ color.w = uinnerThreshold_Stage1_c0_c0;
+ }
+ _output = color;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = AlphaThresholdFragmentProcessor_Stage1_c0_c0(vec4(1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/2473.shader_test b/shaders/skia/2473.shader_test
new file mode 100644
index 0000000..06bf33b
--- /dev/null
+++ b/shaders/skia/2473.shader_test
@@ -0,0 +1,59 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform float uinnerThreshold_Stage1_c0_c0;
+uniform float uouterThreshold_Stage1_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 AlphaThresholdFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 color = _input;
+ vec4 mask_color = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ if (mask_color.w < 0.5) {
+ if (color.w > uouterThreshold_Stage1_c0_c0) {
+ float scale = uouterThreshold_Stage1_c0_c0 / color.w;
+ color.xyz *= scale;
+ color.w = uouterThreshold_Stage1_c0_c0;
+ }
+ } else if (color.w < uinnerThreshold_Stage1_c0_c0) {
+ float scale = uinnerThreshold_Stage1_c0_c0 / max(0.0010000000474974513, color.w);
+ color.xyz *= scale;
+ color.w = uinnerThreshold_Stage1_c0_c0;
+ }
+ _output = color;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = AlphaThresholdFragmentProcessor_Stage1_c0_c0(vec4(1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec2 inLocalCoord;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 color = inColor;
+ vcolor_Stage0 = color;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/2476.shader_test b/shaders/skia/2476.shader_test
new file mode 100644
index 0000000..24b2d2c
--- /dev/null
+++ b/shaders/skia/2476.shader_test
@@ -0,0 +1,81 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 ucircle_Stage1_c0_c0;
+uniform vec2 uDstTextureUpperLeft_Stage2;
+uniform vec2 uDstTextureCoordScale_Stage2;
+uniform sampler2D uDstTextureSampler_Stage2;
+noperspective in vec2 vEllipseOffsets0_Stage0;
+noperspective in vec2 vEllipseOffsets1_Stage0;
+noperspective in vec4 vinColor_Stage0;
+vec4 CircleEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ float d;
+ {
+ d = (length((ucircle_Stage1_c0_c0.xy - gl_FragCoord.xy) * ucircle_Stage1_c0_c0.w) - 1.0) * ucircle_Stage1_c0_c0.z;
+ }
+ {
+ _output = d > 0.5 ? _input : vec4(0.0);
+ }
+ return _output;
+}
+vec4 blend_src(vec4 src, vec4 dst) {
+ return src;
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ vec2 scaledOffset = vEllipseOffsets0_Stage0;
+ float test = dot(scaledOffset, scaledOffset) - 1.0;
+ vec2 duvdx = dFdx(vEllipseOffsets0_Stage0);
+ vec2 duvdy = -dFdy(vEllipseOffsets0_Stage0);
+ vec2 grad = vec2(vEllipseOffsets0_Stage0.x * duvdx.x + vEllipseOffsets0_Stage0.y * duvdx.y, vEllipseOffsets0_Stage0.x * duvdy.x + vEllipseOffsets0_Stage0.y * duvdy.y);
+ float grad_dot = 4.0 * dot(grad, grad);
+ grad_dot = max(grad_dot, 1.1754999560161448e-38);
+ float invlen = inversesqrt(grad_dot);
+ float edgeAlpha = clamp(0.5 - test * invlen, 0.0, 1.0);
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = CircleEffect_Stage1_c0_c0(vec4(1.0));
+ }
+ {
+ if (all(lessThanEqual(outputCoverage_Stage0.xyz, vec3(0.0)))) {
+ discard;
+ }
+ vec2 _dstTexCoord = (gl_FragCoord.xy - uDstTextureUpperLeft_Stage2) * uDstTextureCoordScale_Stage2;
+ _dstTexCoord.y = 1.0 - _dstTexCoord.y;
+ vec4 _dstColor = texture(uDstTextureSampler_Stage2, _dstTexCoord);
+ sk_FragColor = blend_src(output_Stage1, _dstColor);
+ sk_FragColor = outputCoverage_Stage0 * sk_FragColor + (vec4(1.0) - outputCoverage_Stage0) * _dstColor;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec2 inEllipseOffsets0;
+in vec2 inEllipseOffsets1;
+noperspective out vec2 vEllipseOffsets0_Stage0;
+noperspective out vec2 vEllipseOffsets1_Stage0;
+noperspective out vec4 vinColor_Stage0;
+void main() {
+ vEllipseOffsets0_Stage0 = inEllipseOffsets0;
+ vEllipseOffsets1_Stage0 = inEllipseOffsets1;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = (uViewM_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/2479.shader_test b/shaders/skia/2479.shader_test
new file mode 100644
index 0000000..9644d7b
--- /dev/null
+++ b/shaders/skia/2479.shader_test
@@ -0,0 +1,85 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 ucircle_Stage1_c0_c0;
+uniform vec2 uDstTextureUpperLeft_Stage2;
+uniform vec2 uDstTextureCoordScale_Stage2;
+uniform sampler2D uDstTextureSampler_Stage2;
+noperspective in vec2 vEllipseOffsets_Stage0;
+noperspective in vec4 vEllipseRadii_Stage0;
+noperspective in vec4 vinColor_Stage0;
+vec4 CircleEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ float d;
+ {
+ d = (length((ucircle_Stage1_c0_c0.xy - gl_FragCoord.xy) * ucircle_Stage1_c0_c0.w) - 1.0) * ucircle_Stage1_c0_c0.z;
+ }
+ {
+ _output = d > 0.5 ? _input : vec4(0.0);
+ }
+ return _output;
+}
+vec4 blend_src(vec4 src, vec4 dst) {
+ return src;
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ vec2 offset = vEllipseOffsets_Stage0;
+ offset *= vEllipseRadii_Stage0.xy;
+ float test = dot(offset, offset) - 1.0;
+ vec2 grad = (2.0 * offset) * vEllipseRadii_Stage0.xy;
+ float grad_dot = dot(grad, grad);
+ grad_dot = max(grad_dot, 1.1754999560161448e-38);
+ float invlen = inversesqrt(grad_dot);
+ float edgeAlpha = clamp(0.5 - test * invlen, 0.0, 1.0);
+ offset = vEllipseOffsets_Stage0 * vEllipseRadii_Stage0.zw;
+ test = dot(offset, offset) - 1.0;
+ grad = (2.0 * offset) * vEllipseRadii_Stage0.zw;
+ grad_dot = dot(grad, grad);
+ invlen = inversesqrt(grad_dot);
+ edgeAlpha *= clamp(0.5 + test * invlen, 0.0, 1.0);
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = CircleEffect_Stage1_c0_c0(vec4(1.0));
+ }
+ {
+ if (all(lessThanEqual(outputCoverage_Stage0.xyz, vec3(0.0)))) {
+ discard;
+ }
+ vec2 _dstTexCoord = (gl_FragCoord.xy - uDstTextureUpperLeft_Stage2) * uDstTextureCoordScale_Stage2;
+ _dstTexCoord.y = 1.0 - _dstTexCoord.y;
+ vec4 _dstColor = texture(uDstTextureSampler_Stage2, _dstTexCoord);
+ sk_FragColor = blend_src(output_Stage1, _dstColor);
+ sk_FragColor = outputCoverage_Stage0 * sk_FragColor + (vec4(1.0) - outputCoverage_Stage0) * _dstColor;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 inPosition;
+in vec4 inColor;
+in vec2 inEllipseOffset;
+in vec4 inEllipseRadii;
+noperspective out vec2 vEllipseOffsets_Stage0;
+noperspective out vec4 vEllipseRadii_Stage0;
+noperspective out vec4 vinColor_Stage0;
+void main() {
+ vEllipseOffsets_Stage0 = inEllipseOffset;
+ vEllipseRadii_Stage0 = inEllipseRadii;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = inPosition;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/2482.shader_test b/shaders/skia/2482.shader_test
new file mode 100644
index 0000000..c35e056
--- /dev/null
+++ b/shaders/skia/2482.shader_test
@@ -0,0 +1,85 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 ucircle_Stage1_c0_c0;
+uniform vec2 uDstTextureUpperLeft_Stage2;
+uniform vec2 uDstTextureCoordScale_Stage2;
+uniform sampler2D uDstTextureSampler_Stage2;
+noperspective in vec2 vEllipseOffsets_Stage0;
+noperspective in vec4 vEllipseRadii_Stage0;
+noperspective in vec4 vinColor_Stage0;
+vec4 CircleEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ float d;
+ {
+ d = (1.0 - length((ucircle_Stage1_c0_c0.xy - gl_FragCoord.xy) * ucircle_Stage1_c0_c0.w)) * ucircle_Stage1_c0_c0.z;
+ }
+ {
+ _output = _input * clamp(d, 0.0, 1.0);
+ }
+ return _output;
+}
+vec4 blend_src(vec4 src, vec4 dst) {
+ return src;
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ vec2 offset = vEllipseOffsets_Stage0;
+ offset *= vEllipseRadii_Stage0.xy;
+ float test = dot(offset, offset) - 1.0;
+ vec2 grad = (2.0 * offset) * vEllipseRadii_Stage0.xy;
+ float grad_dot = dot(grad, grad);
+ grad_dot = max(grad_dot, 1.1754999560161448e-38);
+ float invlen = inversesqrt(grad_dot);
+ float edgeAlpha = clamp(0.5 - test * invlen, 0.0, 1.0);
+ offset = vEllipseOffsets_Stage0 * vEllipseRadii_Stage0.zw;
+ test = dot(offset, offset) - 1.0;
+ grad = (2.0 * offset) * vEllipseRadii_Stage0.zw;
+ grad_dot = dot(grad, grad);
+ invlen = inversesqrt(grad_dot);
+ edgeAlpha *= clamp(0.5 + test * invlen, 0.0, 1.0);
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = CircleEffect_Stage1_c0_c0(vec4(1.0));
+ }
+ {
+ if (all(lessThanEqual(outputCoverage_Stage0.xyz, vec3(0.0)))) {
+ discard;
+ }
+ vec2 _dstTexCoord = (gl_FragCoord.xy - uDstTextureUpperLeft_Stage2) * uDstTextureCoordScale_Stage2;
+ _dstTexCoord.y = 1.0 - _dstTexCoord.y;
+ vec4 _dstColor = texture(uDstTextureSampler_Stage2, _dstTexCoord);
+ sk_FragColor = blend_src(output_Stage1, _dstColor);
+ sk_FragColor = outputCoverage_Stage0 * sk_FragColor + (vec4(1.0) - outputCoverage_Stage0) * _dstColor;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 inPosition;
+in vec4 inColor;
+in vec2 inEllipseOffset;
+in vec4 inEllipseRadii;
+noperspective out vec2 vEllipseOffsets_Stage0;
+noperspective out vec4 vEllipseRadii_Stage0;
+noperspective out vec4 vinColor_Stage0;
+void main() {
+ vEllipseOffsets_Stage0 = inEllipseOffset;
+ vEllipseRadii_Stage0 = inEllipseRadii;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = inPosition;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/2485.shader_test b/shaders/skia/2485.shader_test
new file mode 100644
index 0000000..c58ea5c
--- /dev/null
+++ b/shaders/skia/2485.shader_test
@@ -0,0 +1,77 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 ucircle_Stage1_c0_c0;
+uniform vec2 uDstTextureUpperLeft_Stage2;
+uniform vec2 uDstTextureCoordScale_Stage2;
+uniform sampler2D uDstTextureSampler_Stage2;
+noperspective in vec4 vQuadEdge_Stage0;
+noperspective in vec4 vinColor_Stage0;
+vec4 CircleEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ float d;
+ {
+ d = (length((ucircle_Stage1_c0_c0.xy - gl_FragCoord.xy) * ucircle_Stage1_c0_c0.w) - 1.0) * ucircle_Stage1_c0_c0.z;
+ }
+ {
+ _output = _input * clamp(d, 0.0, 1.0);
+ }
+ return _output;
+}
+vec4 blend_src(vec4 src, vec4 dst) {
+ return src;
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ float edgeAlpha;
+ vec2 duvdx = dFdx(vQuadEdge_Stage0.xy);
+ vec2 duvdy = -dFdy(vQuadEdge_Stage0.xy);
+ if (vQuadEdge_Stage0.z > 0.0 && vQuadEdge_Stage0.w > 0.0) {
+ edgeAlpha = min(min(vQuadEdge_Stage0.z, vQuadEdge_Stage0.w) + 0.5, 1.0);
+ } else {
+ vec2 gF = vec2((2.0 * vQuadEdge_Stage0.x) * duvdx.x - duvdx.y, (2.0 * vQuadEdge_Stage0.x) * duvdy.x - duvdy.y);
+ edgeAlpha = vQuadEdge_Stage0.x * vQuadEdge_Stage0.x - vQuadEdge_Stage0.y;
+ edgeAlpha = clamp(0.5 - edgeAlpha / length(gF), 0.0, 1.0);
+ }
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = CircleEffect_Stage1_c0_c0(vec4(1.0));
+ }
+ {
+ if (all(lessThanEqual(outputCoverage_Stage0.xyz, vec3(0.0)))) {
+ discard;
+ }
+ vec2 _dstTexCoord = (gl_FragCoord.xy - uDstTextureUpperLeft_Stage2) * uDstTextureCoordScale_Stage2;
+ _dstTexCoord.y = 1.0 - _dstTexCoord.y;
+ vec4 _dstColor = texture(uDstTextureSampler_Stage2, _dstTexCoord);
+ sk_FragColor = blend_src(output_Stage1, _dstColor);
+ sk_FragColor = outputCoverage_Stage0 * sk_FragColor + (vec4(1.0) - outputCoverage_Stage0) * _dstColor;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 inPosition;
+in vec4 inColor;
+in vec4 inQuadEdge;
+noperspective out vec4 vQuadEdge_Stage0;
+noperspective out vec4 vinColor_Stage0;
+void main() {
+ vQuadEdge_Stage0 = inQuadEdge;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = inPosition;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/2488.shader_test b/shaders/skia/2488.shader_test
new file mode 100644
index 0000000..e07071c
--- /dev/null
+++ b/shaders/skia/2488.shader_test
@@ -0,0 +1,91 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uellipse_Stage1_c0_c0;
+uniform vec2 uDstTextureUpperLeft_Stage2;
+uniform vec2 uDstTextureCoordScale_Stage2;
+uniform sampler2D uDstTextureSampler_Stage2;
+noperspective in vec2 vEllipseOffsets_Stage0;
+noperspective in vec4 vEllipseRadii_Stage0;
+noperspective in vec4 vinColor_Stage0;
+vec4 EllipseEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 d = gl_FragCoord.xy - uellipse_Stage1_c0_c0.xy;
+ vec2 Z = d * uellipse_Stage1_c0_c0.zw;
+ float implicit = dot(Z, d) - 1.0;
+ float grad_dot = 4.0 * dot(Z, Z);
+ {
+ grad_dot = max(grad_dot, 1.1754999560161448e-38);
+ }
+ float approx_dist = implicit * inversesqrt(grad_dot);
+ float alpha;
+ {
+ alpha = clamp(0.5 + approx_dist, 0.0, 1.0);
+ }
+ _output = _input * alpha;
+ return _output;
+}
+vec4 blend_src(vec4 src, vec4 dst) {
+ return src;
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ vec2 offset = vEllipseOffsets_Stage0;
+ offset *= vEllipseRadii_Stage0.xy;
+ float test = dot(offset, offset) - 1.0;
+ vec2 grad = (2.0 * offset) * vEllipseRadii_Stage0.xy;
+ float grad_dot = dot(grad, grad);
+ grad_dot = max(grad_dot, 1.1754999560161448e-38);
+ float invlen = inversesqrt(grad_dot);
+ float edgeAlpha = clamp(0.5 - test * invlen, 0.0, 1.0);
+ offset = vEllipseOffsets_Stage0 * vEllipseRadii_Stage0.zw;
+ test = dot(offset, offset) - 1.0;
+ grad = (2.0 * offset) * vEllipseRadii_Stage0.zw;
+ grad_dot = dot(grad, grad);
+ invlen = inversesqrt(grad_dot);
+ edgeAlpha *= clamp(0.5 + test * invlen, 0.0, 1.0);
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = EllipseEffect_Stage1_c0_c0(vec4(1.0));
+ }
+ {
+ if (all(lessThanEqual(outputCoverage_Stage0.xyz, vec3(0.0)))) {
+ discard;
+ }
+ vec2 _dstTexCoord = (gl_FragCoord.xy - uDstTextureUpperLeft_Stage2) * uDstTextureCoordScale_Stage2;
+ _dstTexCoord.y = 1.0 - _dstTexCoord.y;
+ vec4 _dstColor = texture(uDstTextureSampler_Stage2, _dstTexCoord);
+ sk_FragColor = blend_src(output_Stage1, _dstColor);
+ sk_FragColor = outputCoverage_Stage0 * sk_FragColor + (vec4(1.0) - outputCoverage_Stage0) * _dstColor;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 inPosition;
+in vec4 inColor;
+in vec2 inEllipseOffset;
+in vec4 inEllipseRadii;
+noperspective out vec2 vEllipseOffsets_Stage0;
+noperspective out vec4 vEllipseRadii_Stage0;
+noperspective out vec4 vinColor_Stage0;
+void main() {
+ vEllipseOffsets_Stage0 = inEllipseOffset;
+ vEllipseRadii_Stage0 = inEllipseRadii;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = inPosition;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/2491.shader_test b/shaders/skia/2491.shader_test
new file mode 100644
index 0000000..b4988fd
--- /dev/null
+++ b/shaders/skia/2491.shader_test
@@ -0,0 +1,91 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uellipse_Stage1_c0_c0;
+uniform vec2 uDstTextureUpperLeft_Stage2;
+uniform vec2 uDstTextureCoordScale_Stage2;
+uniform sampler2D uDstTextureSampler_Stage2;
+noperspective in vec2 vEllipseOffsets_Stage0;
+noperspective in vec4 vEllipseRadii_Stage0;
+noperspective in vec4 vinColor_Stage0;
+vec4 EllipseEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 d = gl_FragCoord.xy - uellipse_Stage1_c0_c0.xy;
+ vec2 Z = d * uellipse_Stage1_c0_c0.zw;
+ float implicit = dot(Z, d) - 1.0;
+ float grad_dot = 4.0 * dot(Z, Z);
+ {
+ grad_dot = max(grad_dot, 1.1754999560161448e-38);
+ }
+ float approx_dist = implicit * inversesqrt(grad_dot);
+ float alpha;
+ {
+ alpha = approx_dist > 0.0 ? 1.0 : 0.0;
+ }
+ _output = _input * alpha;
+ return _output;
+}
+vec4 blend_src(vec4 src, vec4 dst) {
+ return src;
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ vec2 offset = vEllipseOffsets_Stage0;
+ offset *= vEllipseRadii_Stage0.xy;
+ float test = dot(offset, offset) - 1.0;
+ vec2 grad = (2.0 * offset) * vEllipseRadii_Stage0.xy;
+ float grad_dot = dot(grad, grad);
+ grad_dot = max(grad_dot, 1.1754999560161448e-38);
+ float invlen = inversesqrt(grad_dot);
+ float edgeAlpha = clamp(0.5 - test * invlen, 0.0, 1.0);
+ offset = vEllipseOffsets_Stage0 * vEllipseRadii_Stage0.zw;
+ test = dot(offset, offset) - 1.0;
+ grad = (2.0 * offset) * vEllipseRadii_Stage0.zw;
+ grad_dot = dot(grad, grad);
+ invlen = inversesqrt(grad_dot);
+ edgeAlpha *= clamp(0.5 + test * invlen, 0.0, 1.0);
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = EllipseEffect_Stage1_c0_c0(vec4(1.0));
+ }
+ {
+ if (all(lessThanEqual(outputCoverage_Stage0.xyz, vec3(0.0)))) {
+ discard;
+ }
+ vec2 _dstTexCoord = (gl_FragCoord.xy - uDstTextureUpperLeft_Stage2) * uDstTextureCoordScale_Stage2;
+ _dstTexCoord.y = 1.0 - _dstTexCoord.y;
+ vec4 _dstColor = texture(uDstTextureSampler_Stage2, _dstTexCoord);
+ sk_FragColor = blend_src(output_Stage1, _dstColor);
+ sk_FragColor = outputCoverage_Stage0 * sk_FragColor + (vec4(1.0) - outputCoverage_Stage0) * _dstColor;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 inPosition;
+in vec4 inColor;
+in vec2 inEllipseOffset;
+in vec4 inEllipseRadii;
+noperspective out vec2 vEllipseOffsets_Stage0;
+noperspective out vec4 vEllipseRadii_Stage0;
+noperspective out vec4 vinColor_Stage0;
+void main() {
+ vEllipseOffsets_Stage0 = inEllipseOffset;
+ vEllipseRadii_Stage0 = inEllipseRadii;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = inPosition;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/25-1.shader_test b/shaders/skia/25-1.shader_test
new file mode 100644
index 0000000..0972102
--- /dev/null
+++ b/shaders/skia/25-1.shader_test
@@ -0,0 +1,63 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+uniform sampler2D uTextureSampler_2_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+vec4 TextureEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_1_Stage1, vTransformedCoords_1_Stage0) * _input;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c2_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_2_Stage1, vTransformedCoords_2_Stage0) * _input;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ vec4 planes[3];
+ planes[0] = TextureEffect_Stage1_c0_c0(vec4(1.0));
+ planes[1] = TextureEffect_Stage1_c1_c0(vec4(1.0));
+ planes[2] = TextureEffect_Stage1_c2_c0(vec4(1.0));
+ vec4 color = vec4(planes[1].x, planes[0].x, planes[2].x, 1.0);
+ output_Stage1 = color;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/25-101.shader_test b/shaders/skia/25-101.shader_test
new file mode 100644
index 0000000..abab0d5
--- /dev/null
+++ b/shaders/skia/25-101.shader_test
@@ -0,0 +1,121 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 uleftBorderColor_Stage1_c1_c0_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c1_c0_c0_c0;
+uniform vec4 ustart_Stage1_c1_c0_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c1_c0_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = ClampedGradientEffect_Stage1_c0_c0_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ return _output;
+}
+vec4 LinearGradientLayout_Stage1_c1_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_1_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c1_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c1_c0_c0_c0_c1_c0 + t * uend_Stage1_c1_c0_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c1_c0_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c1_c0_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c1_c0_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c1_c0_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = ClampedGradientEffect_Stage1_c1_c0_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ return _output;
+}
+vec4 blend_dst_over(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src + dst;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_dst_over(OverrideInputFragmentProcessor_Stage1_c0_c0(inputColor), OverrideInputFragmentProcessor_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/25-108.shader_test b/shaders/skia/25-108.shader_test
new file mode 100644
index 0000000..dbb26c6
--- /dev/null
+++ b/shaders/skia/25-108.shader_test
@@ -0,0 +1,93 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c0_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 RadialGradientLayout_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = length(vTransformedCoords_0_Stage0);
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = RadialGradientLayout_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = ClampedGradientEffect_Stage1_c0_c0_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ return _output;
+}
+vec4 TextureEffect_Stage1_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_1_Stage0) * _input;
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = TextureEffect_Stage1_c1_c0_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ return _output;
+}
+vec4 blend_plus(vec4 src, vec4 dst) {
+ return min(src + dst, 1.0);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_plus(OverrideInputFragmentProcessor_Stage1_c0_c0(inputColor), OverrideInputFragmentProcessor_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/25-109.shader_test b/shaders/skia/25-109.shader_test
new file mode 100644
index 0000000..6e4b1ff
--- /dev/null
+++ b/shaders/skia/25-109.shader_test
@@ -0,0 +1,67 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 ucolor_Stage1_c1_c0_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ return _output;
+}
+vec4 ConstColorProcessor_Stage1_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage1_c1_c0_c0_c0;
+ }
+ return _output;
+}
+vec4 blend_src(vec4 src, vec4 dst) {
+ return src;
+}
+vec4 ComposeOne_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_src(ConstColorProcessor_Stage1_c1_c0_c0_c0(vec4(1.0)), _input);
+ return _output;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ComposeOne_Stage1_c1_c0(OverrideInputFragmentProcessor_Stage1_c0_c0(outputColor_Stage0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/25-11.shader_test b/shaders/skia/25-11.shader_test
new file mode 100644
index 0000000..b797451
--- /dev/null
+++ b/shaders/skia/25-11.shader_test
@@ -0,0 +1,67 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform float ubias_Stage1_c0_c0_c0_c0;
+uniform float uscale_Stage1_c0_c0_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 SweepGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float angle;
+ {
+ angle = atan(-vTransformedCoords_0_Stage0.y, -vTransformedCoords_0_Stage0.x);
+ }
+ float t = ((angle * 0.15915493667125702 + 0.5) + ubias_Stage1_c0_c0_c0_c0) * uscale_Stage1_c0_c0_c0_c0;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = SweepGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ t.x = fract(t.x);
+ }
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TiledGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/25-112.shader_test b/shaders/skia/25-112.shader_test
new file mode 100644
index 0000000..a91fd14
--- /dev/null
+++ b/shaders/skia/25-112.shader_test
@@ -0,0 +1,61 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 ucircle_Stage1_c0_c0;
+uniform vec4 ucircle_Stage1_c1_c0;
+flat in vec4 vcolor_Stage0;
+vec4 CircleEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ float d;
+ {
+ d = (1.0 - length((ucircle_Stage1_c0_c0.xy - gl_FragCoord.xy) * ucircle_Stage1_c0_c0.w)) * ucircle_Stage1_c0_c0.z;
+ }
+ {
+ _output = d > 0.5 ? _input : vec4(0.0);
+ }
+ return _output;
+}
+vec4 CircleEffect_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ float d;
+ {
+ d = (1.0 - length((ucircle_Stage1_c1_c0.xy - gl_FragCoord.xy) * ucircle_Stage1_c1_c0.w)) * ucircle_Stage1_c1_c0.z;
+ }
+ {
+ _output = d > 0.5 ? _input : vec4(0.0);
+ }
+ return _output;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = CircleEffect_Stage1_c1_c0(CircleEffect_Stage1_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = outputColor_Stage0 * output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 position;
+in vec4 color;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/25-114.shader_test b/shaders/skia/25-114.shader_test
new file mode 100644
index 0000000..d94e8fa
--- /dev/null
+++ b/shaders/skia/25-114.shader_test
@@ -0,0 +1,116 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+uniform vec4 ucircleData_Stage2;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_0_Stage0;
+ float t = -1.0;
+ {
+ {
+ float invR1 = ufocalParams_Stage1_c0_c0_c0_c0.x;
+ float fx = ufocalParams_Stage1_c0_c0_c0_c0.y;
+ float x_t = -1.0;
+ {
+ x_t = length(p) - p.x * invR1;
+ }
+ {
+ {
+ t = x_t + fx;
+ }
+ }
+ }
+ }
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ vec2 vec = vec2((gl_FragCoord.x - ucircleData_Stage2.x) * ucircleData_Stage2.w, (gl_FragCoord.y - ucircleData_Stage2.y) * ucircleData_Stage2.w);
+ float dist = length(vec) + (0.5 - ucircleData_Stage2.z) * ucircleData_Stage2.w;
+ output_Stage2 = vec4(texture(uTextureSampler_0_Stage2, vec2(dist, 0.5)).w);
+ }
+ {
+ sk_FragColor = output_Stage1 * output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/25-119.shader_test b/shaders/skia/25-119.shader_test
new file mode 100644
index 0000000..4bb3ac2
--- /dev/null
+++ b/shaders/skia/25-119.shader_test
@@ -0,0 +1,106 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 ustart_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 uclamp_Stage1_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c0_c0_c1_c0;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+vec4 ComposeOne_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_dst_in(_input, TiledGradientEffect_Stage1_c0_c0_c0_c0(vec4(1.0)));
+ return _output;
+}
+vec4 TextureEffect_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 inCoord = vTransformedCoords_1_Stage0;
+ vec2 subsetCoord;
+ subsetCoord.x = inCoord.x;
+ subsetCoord.y = inCoord.y;
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage1_c1_c0.x, uclamp_Stage1_c1_c0.z);
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage1_c1_c0.y, uclamp_Stage1_c1_c0.w);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ _output = _input * textureColor;
+ return _output;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TextureEffect_Stage1_c1_c0(ComposeOne_Stage1_c0_c0(outputColor_Stage0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = texture(uTextureSampler_0_Stage2, vTransformedCoords_2_Stage0);
+ }
+ {
+ sk_FragColor = output_Stage1 * output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/25-121.shader_test b/shaders/skia/25-121.shader_test
new file mode 100644
index 0000000..71d3d4c
--- /dev/null
+++ b/shaders/skia/25-121.shader_test
@@ -0,0 +1,66 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uclamp_Stage1_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 inCoord = vTransformedCoords_0_Stage0;
+ vec2 subsetCoord;
+ subsetCoord.x = inCoord.x;
+ subsetCoord.y = inCoord.y;
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage1_c0_c0.x, uclamp_Stage1_c0_c0.z);
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage1_c0_c0.y, uclamp_Stage1_c0_c0.w);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ _output = _input * textureColor;
+ return _output;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TextureEffect_Stage1_c0_c0(vec4(1.0));
+ output_Stage1.xyz *= outputColor_Stage0.xyz;
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = texture(uTextureSampler_0_Stage2, vTransformedCoords_1_Stage0);
+ }
+ {
+ sk_FragColor = output_Stage1 * output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/25-123.shader_test b/shaders/skia/25-123.shader_test
new file mode 100644
index 0000000..9282548
--- /dev/null
+++ b/shaders/skia/25-123.shader_test
@@ -0,0 +1,60 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uclamp_Stage1_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 inCoord = vTransformedCoords_0_Stage0;
+ vec2 subsetCoord;
+ subsetCoord.x = inCoord.x;
+ subsetCoord.y = inCoord.y;
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage1_c0_c0.x, uclamp_Stage1_c0_c0.z);
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage1_c0_c0.y, uclamp_Stage1_c0_c0.w);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ _output = _input * textureColor;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TextureEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = texture(uTextureSampler_0_Stage2, vTransformedCoords_1_Stage0);
+ }
+ {
+ sk_FragColor = output_Stage1 * output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/25-13.shader_test b/shaders/skia/25-13.shader_test
new file mode 100644
index 0000000..9cd47d1
--- /dev/null
+++ b/shaders/skia/25-13.shader_test
@@ -0,0 +1,73 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 usubset_Stage1;
+uniform vec4 uclamp_Stage1;
+uniform vec4 unorm_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+flat in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec2 inCoord = vTransformedCoords_0_Stage0;
+ inCoord *= unorm_Stage1.xy;
+ float extraRepeatCoordY;
+ float repeatCoordWeightY;
+ vec2 subsetCoord;
+ {
+ float w = usubset_Stage1.z - usubset_Stage1.x;
+ float w2 = 2.0 * w;
+ float m = mod(inCoord.x - usubset_Stage1.x, w2);
+ subsetCoord.x = mix(m, w2 - m, step(w, m)) + usubset_Stage1.x;
+ }
+ {
+ float w = usubset_Stage1.w - usubset_Stage1.y;
+ float w2 = 2.0 * w;
+ float d = inCoord.y - usubset_Stage1.y;
+ float m = mod(d, w2);
+ float o = mix(m, w2 - m, step(w, m));
+ subsetCoord.y = o + usubset_Stage1.y;
+ extraRepeatCoordY = (w - o) + usubset_Stage1.y;
+ float hw = w / 2.0;
+ float n = mod(d - hw, w2);
+ repeatCoordWeightY = clamp((mix(n, w2 - n, step(w, n)) - hw) + 0.5, 0.0, 1.0);
+ }
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage1.x, uclamp_Stage1.z);
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage1.y, uclamp_Stage1.w);
+ extraRepeatCoordY = clamp(extraRepeatCoordY, uclamp_Stage1.y, uclamp_Stage1.w);
+ vec4 textureColor = mix(texture(uTextureSampler_0_Stage1, clampedCoord * unorm_Stage1.zw), texture(uTextureSampler_0_Stage1, vec2(clampedCoord.x, extraRepeatCoordY) * unorm_Stage1.zw), repeatCoordWeightY);
+ output_Stage1 = outputColor_Stage0 * textureColor;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec2 inLocalCoords;
+in vec4 color;
+flat out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vcolor_Stage0 = color;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoords, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/25-131.shader_test b/shaders/skia/25-131.shader_test
new file mode 100644
index 0000000..6bdc24e
--- /dev/null
+++ b/shaders/skia/25-131.shader_test
@@ -0,0 +1,73 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uCoordTransformMatrix_2_Stage0;
+uniform vec4 uk_Stage2;
+uniform vec4 uborder_Stage2_c0_c0;
+uniform vec4 usubset_Stage2_c0_c0;
+uniform vec4 unorm_Stage2_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 TextureEffect_Stage2_c0_c0(vec4 _input, vec2 _coords) {
+ _coords = _coords * uCoordTransformMatrix_2_Stage0.xz + uCoordTransformMatrix_2_Stage0.yw;
+ vec4 _output;
+ vec2 inCoord = _coords;
+ inCoord *= unorm_Stage2_c0_c0.xy;
+ vec2 subsetCoord;
+ subsetCoord.x = inCoord.x;
+ subsetCoord.y = inCoord.y;
+ vec2 clampedCoord;
+ clampedCoord.x = subsetCoord.x;
+ clampedCoord.y = subsetCoord.y;
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord * unorm_Stage2_c0_c0.zw);
+ if (inCoord.x < usubset_Stage2_c0_c0.x || inCoord.x > usubset_Stage2_c0_c0.z) {
+ textureColor = uborder_Stage2_c0_c0;
+ }
+ if (inCoord.y < usubset_Stage2_c0_c0.y || inCoord.y > usubset_Stage2_c0_c0.w) {
+ textureColor = uborder_Stage2_c0_c0;
+ }
+ _output = _input * textureColor;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ vec4 dst = TextureEffect_Stage2_c0_c0(vec4(1.0), vTransformedCoords_1_Stage0);
+ output_Stage2 = clamp((((uk_Stage2.x * output_Stage2) * dst + uk_Stage2.y * output_Stage2) + uk_Stage2.z * dst) + uk_Stage2.w, 0.0, 1.0);
+ {
+ output_Stage2.xyz = min(output_Stage2.xyz, output_Stage2.w);
+ }
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/25-133.shader_test b/shaders/skia/25-133.shader_test
new file mode 100644
index 0000000..4690ef6
--- /dev/null
+++ b/shaders/skia/25-133.shader_test
@@ -0,0 +1,63 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec2 uDstTextureUpperLeft_Stage1;
+uniform vec2 uDstTextureCoordScale_Stage1;
+uniform sampler2D uDstTextureSampler_Stage1;
+noperspective in vec4 vQuadEdge_Stage0;
+noperspective in vec4 vinColor_Stage0;
+vec4 blend_src(vec4 src, vec4 dst) {
+ return src;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vinColor_Stage0;
+ float edgeAlpha;
+ vec2 duvdx = dFdx(vQuadEdge_Stage0.xy);
+ vec2 duvdy = -dFdy(vQuadEdge_Stage0.xy);
+ if (vQuadEdge_Stage0.z > 0.0 && vQuadEdge_Stage0.w > 0.0) {
+ edgeAlpha = min(min(vQuadEdge_Stage0.z, vQuadEdge_Stage0.w) + 0.5, 1.0);
+ } else {
+ vec2 gF = vec2((2.0 * vQuadEdge_Stage0.x) * duvdx.x - duvdx.y, (2.0 * vQuadEdge_Stage0.x) * duvdy.x - duvdy.y);
+ edgeAlpha = vQuadEdge_Stage0.x * vQuadEdge_Stage0.x - vQuadEdge_Stage0.y;
+ edgeAlpha = clamp(0.5 - edgeAlpha / length(gF), 0.0, 1.0);
+ }
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ {
+ if (all(lessThanEqual(outputCoverage_Stage0.xyz, vec3(0.0)))) {
+ discard;
+ }
+ vec2 _dstTexCoord = (gl_FragCoord.xy - uDstTextureUpperLeft_Stage1) * uDstTextureCoordScale_Stage1;
+ _dstTexCoord.y = 1.0 - _dstTexCoord.y;
+ vec4 _dstColor = texture(uDstTextureSampler_Stage1, _dstTexCoord);
+ sk_FragColor = blend_src(outputColor_Stage0, _dstColor);
+ sk_FragColor = outputCoverage_Stage0 * sk_FragColor + (vec4(1.0) - outputCoverage_Stage0) * _dstColor;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 inPosition;
+in vec4 inColor;
+in vec4 inQuadEdge;
+noperspective out vec4 vQuadEdge_Stage0;
+noperspective out vec4 vinColor_Stage0;
+void main() {
+ vQuadEdge_Stage0 = inQuadEdge;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = inPosition;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/25-137.shader_test b/shaders/skia/25-137.shader_test
new file mode 100644
index 0000000..64393db
--- /dev/null
+++ b/shaders/skia/25-137.shader_test
@@ -0,0 +1,93 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 ubaseFrequency_Stage2_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+uniform sampler2D uTextureSampler_1_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+float perlinnoise_Stage2_c0_c0(float chanCoord, vec2 noiseVec) {
+ vec4 floorVal;
+ floorVal.xy = floor(noiseVec);
+ floorVal.zw = floorVal.xy + vec2(1.0);
+ vec2 fractVal = fract(noiseVec);
+ vec2 noiseSmooth = (fractVal * fractVal) * (vec2(3.0) - vec2(2.0) * fractVal);
+ floorVal = fract(floor(mod(floorVal, 256.0)) / vec4(256.0));
+ vec2 latticeIdx;
+ latticeIdx.x = texture(uTextureSampler_0_Stage2, vec2(floorVal.x, 0.5)).x;
+ latticeIdx.y = texture(uTextureSampler_0_Stage2, vec2(floorVal.z, 0.5)).x;
+ vec4 bcoords = fract(latticeIdx.xyxy + floorVal.yyww);
+ vec2 uv;
+ vec4 lattice = texture(uTextureSampler_1_Stage2, vec2(bcoords.x, chanCoord)).zyxw;
+ uv.x = dot((lattice.yw + lattice.xz * vec2(0.00390625)) * vec2(2.0) - vec2(1.0), fractVal);
+ fractVal.x -= 1.0;
+ lattice = texture(uTextureSampler_1_Stage2, vec2(bcoords.y, chanCoord)).zyxw;
+ uv.y = dot((lattice.yw + lattice.xz * vec2(0.00390625)) * vec2(2.0) - vec2(1.0), fractVal);
+ vec2 ab;
+ ab.x = mix(uv.x, uv.y, noiseSmooth.x);
+ fractVal.y -= 1.0;
+ lattice = texture(uTextureSampler_1_Stage2, vec2(bcoords.w, chanCoord)).zyxw;
+ uv.y = dot((lattice.yw + lattice.xz * vec2(0.00390625)) * vec2(2.0) - vec2(1.0), fractVal);
+ fractVal.x += 1.0;
+ lattice = texture(uTextureSampler_1_Stage2, vec2(bcoords.z, chanCoord)).zyxw;
+ uv.x = dot((lattice.yw + lattice.xz * vec2(0.00390625)) * vec2(2.0) - vec2(1.0), fractVal);
+ ab.y = mix(uv.x, uv.y, noiseSmooth.x);
+ return mix(ab.x, ab.y, noiseSmooth.y);
+}
+vec4 PerlinNoise_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 noiseVec = floor(vTransformedCoords_1_Stage0) * ubaseFrequency_Stage2_c0_c0;
+ _output = vec4(0.0);
+ float ratio = 1.0;
+ for (int octave = 0;octave < 3; ++octave) {
+ _output += vec4(perlinnoise_Stage2_c0_c0(0.125, noiseVec), perlinnoise_Stage2_c0_c0(0.375, noiseVec), perlinnoise_Stage2_c0_c0(0.625, noiseVec), perlinnoise_Stage2_c0_c0(0.875, noiseVec)) * ratio;
+ noiseVec *= vec2(2.0);
+ ratio *= 0.5;
+ }
+ _output = _output * vec4(0.5) + vec4(0.5);
+ _output = clamp(_output, 0.0, 1.0);
+ _output = vec4(_output.xyz * _output.www, _output.w);
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_dst_in(output_Stage1, PerlinNoise_Stage2_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/25-138.shader_test b/shaders/skia/25-138.shader_test
new file mode 100644
index 0000000..3ae98d4
--- /dev/null
+++ b/shaders/skia/25-138.shader_test
@@ -0,0 +1,61 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uCoordTransformMatrix_2_Stage0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 TextureEffect_Stage2_c0_c0(vec4 _input, vec2 _coords) {
+ _coords = _coords * uCoordTransformMatrix_2_Stage0.xz + uCoordTransformMatrix_2_Stage0.yw;
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage2, _coords) * _input;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ float coord = vTransformedCoords_1_Stage0.x - 0.5;
+ float f = fract(coord);
+ coord += 0.5 - f;
+ float f2 = f * f;
+ vec4 w = mat4(0.055555555555555552, 0.88888888888888884, 0.055555555555555552, 0.0, -0.5, 0.0, 0.5, 0.0, 0.83333333333333337, -2.0, 1.5, -0.33333333333333331, -0.3888888888888889, 1.1666666666666667, -1.1666666666666667, 0.3888888888888889) * vec4(1.0, f, f2, f2 * f);
+ vec4 c[4];
+ c[0] = TextureEffect_Stage2_c0_c0(vec4(1.0), vec2(coord + -1.0, vTransformedCoords_1_Stage0.y));
+ c[1] = TextureEffect_Stage2_c0_c0(vec4(1.0), vec2(coord, vTransformedCoords_1_Stage0.y));
+ c[2] = TextureEffect_Stage2_c0_c0(vec4(1.0), vec2(coord + 1.0, vTransformedCoords_1_Stage0.y));
+ c[3] = TextureEffect_Stage2_c0_c0(vec4(1.0), vec2(coord + 2.0, vTransformedCoords_1_Stage0.y));
+ vec4 bicubicColor = ((c[0] * w.x + c[1] * w.y) + c[2] * w.z) + c[3] * w.w;
+ bicubicColor.xyz = max(vec3(0.0), min(bicubicColor.xyz, bicubicColor.www));
+ output_Stage2 = bicubicColor * output_Stage1;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/25-14.shader_test b/shaders/skia/25-14.shader_test
new file mode 100644
index 0000000..c4bcfdb
--- /dev/null
+++ b/shaders/skia/25-14.shader_test
@@ -0,0 +1,64 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 usubset_Stage1;
+uniform vec4 uclamp_Stage1;
+uniform vec4 unorm_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+flat in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec2 inCoord = vTransformedCoords_0_Stage0;
+ inCoord *= unorm_Stage1.xy;
+ vec2 subsetCoord;
+ {
+ float w = usubset_Stage1.z - usubset_Stage1.x;
+ float w2 = 2.0 * w;
+ float m = mod(inCoord.x - usubset_Stage1.x, w2);
+ subsetCoord.x = mix(m, w2 - m, step(w, m)) + usubset_Stage1.x;
+ }
+ subsetCoord.y = mod(inCoord.y - usubset_Stage1.y, usubset_Stage1.w - usubset_Stage1.y) + usubset_Stage1.y;
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage1.x, uclamp_Stage1.z);
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage1.y, uclamp_Stage1.w);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord * unorm_Stage1.zw);
+ float errY = subsetCoord.y - clampedCoord.y;
+ float repeatCoordY = errY > 0.0 ? uclamp_Stage1.y : uclamp_Stage1.w;
+ if (errY != 0.0) {
+ textureColor = mix(textureColor, texture(uTextureSampler_0_Stage1, vec2(clampedCoord.x, repeatCoordY) * unorm_Stage1.zw), abs(errY));
+ }
+ output_Stage1 = outputColor_Stage0 * textureColor;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec2 inLocalCoords;
+in vec4 color;
+flat out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vcolor_Stage0 = color;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoords, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/25-16.shader_test b/shaders/skia/25-16.shader_test
new file mode 100644
index 0000000..50e9a94
--- /dev/null
+++ b/shaders/skia/25-16.shader_test
@@ -0,0 +1,57 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 usubset_Stage1;
+uniform vec4 uclamp_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+flat in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec2 inCoord = vTransformedCoords_0_Stage0;
+ vec2 subsetCoord;
+ {
+ float w = usubset_Stage1.z - usubset_Stage1.x;
+ float w2 = 2.0 * w;
+ float m = mod(inCoord.x - usubset_Stage1.x, w2);
+ subsetCoord.x = mix(m, w2 - m, step(w, m)) + usubset_Stage1.x;
+ }
+ subsetCoord.y = mod(inCoord.y - usubset_Stage1.y, usubset_Stage1.w - usubset_Stage1.y) + usubset_Stage1.y;
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage1.x, uclamp_Stage1.z);
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage1.y, uclamp_Stage1.w);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ output_Stage1 = outputColor_Stage0 * textureColor;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec2 inLocalCoords;
+in vec4 color;
+flat out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vcolor_Stage0 = color;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoords, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/25-18.shader_test b/shaders/skia/25-18.shader_test
new file mode 100644
index 0000000..0cdb541
--- /dev/null
+++ b/shaders/skia/25-18.shader_test
@@ -0,0 +1,111 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 uscale01_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias01_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale23_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias23_Stage1_c0_c0_c1_c0;
+uniform float uthreshold_Stage1_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage2_c1_c0_c0_c0;
+uniform vec4 ucolor_Stage2_c2_c0_c0_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 RadialGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = length(vTransformedCoords_0_Stage0);
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 DualIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthreshold_Stage1_c0_c0_c1_c0) {
+ scale = uscale01_Stage1_c0_c0_c1_c0;
+ bias = ubias01_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale23_Stage1_c0_c0_c1_c0;
+ bias = ubias23_Stage1_c0_c0_c1_c0;
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = RadialGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = DualIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c1_c0_c0_c0;
+ }
+ return _output;
+}
+vec4 blend_src_atop(vec4 src, vec4 dst) {
+ return dst.w * src + (1.0 - src.w) * dst;
+}
+vec4 ComposeOne_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_src_atop(ConstColorProcessor_Stage2_c1_c0_c0_c0(vec4(1.0)), _input);
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c2_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c2_c0_c0_c0;
+ }
+ return _output;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 ComposeOne_Stage2_c2_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_src_over(ConstColorProcessor_Stage2_c2_c0_c0_c0(vec4(1.0)), _input);
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = ComposeOne_Stage2_c2_c0(ComposeOne_Stage2_c1_c0(output_Stage1));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/25-19.shader_test b/shaders/skia/25-19.shader_test
new file mode 100644
index 0000000..34c2326
--- /dev/null
+++ b/shaders/skia/25-19.shader_test
@@ -0,0 +1,119 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 uscale01_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias01_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale23_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias23_Stage1_c0_c0_c1_c0;
+uniform float uthreshold_Stage1_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage2_c1_c0_c0_c0;
+uniform vec4 ucolor_Stage2_c2_c0_c0_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 RadialGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = length(vTransformedCoords_0_Stage0);
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 DualIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthreshold_Stage1_c0_c0_c1_c0) {
+ scale = uscale01_Stage1_c0_c0_c1_c0;
+ bias = ubias01_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale23_Stage1_c0_c0_c1_c0;
+ bias = ubias23_Stage1_c0_c0_c1_c0;
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = RadialGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = DualIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c1_c0_c0_c0;
+ }
+ return _output;
+}
+vec4 blend_exclusion(vec4 src, vec4 dst) {
+ return vec4((dst.xyz + src.xyz) - (2.0 * dst.xyz) * src.xyz, src.w + (1.0 - src.w) * dst.w);
+}
+vec4 ComposeOne_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_exclusion(ConstColorProcessor_Stage2_c1_c0_c0_c0(vec4(1.0)), _input);
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c2_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c2_c0_c0_c0;
+ }
+ return _output;
+}
+float _blend_overlay_component(float sc, float sa, float dc, float da) {
+ if (2.0 * dc <= da) {
+ return (2.0 * sc) * dc;
+ }
+ return sa * da - (2.0 * (da - dc)) * (sa - sc);
+}
+vec4 blend_overlay(vec4 src, vec4 dst) {
+ vec4 result = vec4(_blend_overlay_component(src.x, src.w, dst.x, dst.w), _blend_overlay_component(src.y, src.w, dst.y, dst.w), _blend_overlay_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+ result.xyz += dst.xyz * (1.0 - src.w) + src.xyz * (1.0 - dst.w);
+ return result;
+}
+vec4 ComposeOne_Stage2_c2_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_overlay(ConstColorProcessor_Stage2_c2_c0_c0_c0(vec4(1.0)), _input);
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = ComposeOne_Stage2_c2_c0(ComposeOne_Stage2_c1_c0(output_Stage1));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/25-2.shader_test b/shaders/skia/25-2.shader_test
new file mode 100644
index 0000000..195e47f
--- /dev/null
+++ b/shaders/skia/25-2.shader_test
@@ -0,0 +1,44 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_KHR_blend_equation_advanced : require
+out vec4 sk_FragColor;
+layout (blend_support_all_equations) out ;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TextureEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/25-20.shader_test b/shaders/skia/25-20.shader_test
new file mode 100644
index 0000000..123dffc
--- /dev/null
+++ b/shaders/skia/25-20.shader_test
@@ -0,0 +1,77 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+noperspective in vec4 vinCircleEdge_Stage0;
+noperspective in vec4 vinColor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ vec4 circleEdge;
+ circleEdge = vinCircleEdge_Stage0;
+ float d = length(circleEdge.xy);
+ float distanceToOuterEdge = circleEdge.z * (1.0 - d);
+ float edgeAlpha = clamp(distanceToOuterEdge, 0.0, 1.0);
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1 * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec4 inCircleEdge;
+noperspective out vec4 vinCircleEdge_Stage0;
+noperspective out vec4 vinColor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vinCircleEdge_Stage0 = inCircleEdge;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/25-21.shader_test b/shaders/skia/25-21.shader_test
new file mode 100644
index 0000000..28c9f2c
--- /dev/null
+++ b/shaders/skia/25-21.shader_test
@@ -0,0 +1,61 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+flat in vec4 vcolor_Stage0;
+noperspective in vec4 varccoord_Stage0;
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ outputCoverage_Stage0 = vec4(1.0);
+ if (vec2(0.0) != varccoord_Stage0.xy) {
+ float fn = dot(varccoord_Stage0.xy, varccoord_Stage0.xy) - 1.0;
+ if (fn > 0.0) {
+ outputCoverage_Stage0 = vec4(0.0);
+ }
+ }
+ }
+ {
+ sk_FragColor = outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec4 radii_selector;
+in vec4 corner_and_radius_outsets;
+in vec4 skew;
+in vec2 translate;
+in vec4 radii_x;
+in vec4 radii_y;
+in vec4 color;
+flat out vec4 vcolor_Stage0;
+noperspective out vec4 varccoord_Stage0;
+void main() {
+ vcolor_Stage0 = color;
+ vec2 corner = corner_and_radius_outsets.xy;
+ vec2 radius_outset = corner_and_radius_outsets.zw;
+ vec2 radii;
+ radii.x = dot(radii_selector, radii_x);
+ radii.y = dot(radii_selector, radii_y);
+ bool is_arc_section = radii.x > 0.0;
+ radii = abs(radii);
+ vec2 vertexpos = corner + radius_outset * radii;
+ mat2 skewmatrix = mat2(skew.xy, skew.zw);
+ vec2 devcoord = vertexpos * skewmatrix + translate;
+ if (is_arc_section) {
+ varccoord_Stage0.xy = 1.0 - abs(radius_outset);
+ mat2 derivatives = inverse(skewmatrix);
+ varccoord_Stage0.zw = derivatives * (((varccoord_Stage0.xy / radii) * corner) * 2.0);
+ } else {
+ varccoord_Stage0 = vec4(0.0);
+ }
+ gl_Position = vec4(devcoord.x, devcoord.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/25-27.shader_test b/shaders/skia/25-27.shader_test
new file mode 100644
index 0000000..8cf1e66
--- /dev/null
+++ b/shaders/skia/25-27.shader_test
@@ -0,0 +1,86 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+vec4 ComposeOne_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_dst_in(_input, TextureEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0)));
+ return _output;
+}
+vec4 ComposeOne_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_src_in(_input, ComposeOne_Stage1_c0_c0_c0_c0(vec4(1.0)));
+ return _output;
+}
+vec4 TextureEffect_Stage1_c1_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_1_Stage1, vTransformedCoords_1_Stage0) * _input;
+ return _output;
+}
+vec4 ComposeOne_Stage1_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_dst_in(_input, TextureEffect_Stage1_c1_c0_c0_c0_c0_c0(vec4(1.0)));
+ return _output;
+}
+vec4 ComposeOne_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_src_in(_input, ComposeOne_Stage1_c1_c0_c0_c0(vec4(1.0)));
+ return _output;
+}
+vec4 blend_xor(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src + (1.0 - src.w) * dst;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(vec4(1.0).xyz, 1.0);
+ output_Stage1 = blend_xor(ComposeOne_Stage1_c0_c0(inputColor), ComposeOne_Stage1_c1_c0(inputColor));
+ }
+ {
+ sk_FragColor = outputColor_Stage0 * output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/25-28.shader_test b/shaders/skia/25-28.shader_test
new file mode 100644
index 0000000..157dad7
--- /dev/null
+++ b/shaders/skia/25-28.shader_test
@@ -0,0 +1,90 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform vec2 uBounds_Stage1;
+uniform vec4 uKernel_Stage1[4];
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0 - 6.0 * uImageIncrement_Stage1;
+ vec2 coordSampled = vec2(0.0, 0.0);
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].x;
+ coord += uImageIncrement_Stage1;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/25-29.shader_test b/shaders/skia/25-29.shader_test
new file mode 100644
index 0000000..84bc135
--- /dev/null
+++ b/shaders/skia/25-29.shader_test
@@ -0,0 +1,43 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uinnerRect_Stage1;
+uniform vec2 uradiusPlusHalf_Stage1;
+flat in vec4 vcolor_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec2 dxy = max(uinnerRect_Stage1.xy - gl_FragCoord.xy, 0.0);
+ float rightAlpha = clamp(uinnerRect_Stage1.z - gl_FragCoord.x, 0.0, 1.0);
+ float bottomAlpha = clamp(uinnerRect_Stage1.w - gl_FragCoord.y, 0.0, 1.0);
+ float alpha = (bottomAlpha * rightAlpha) * clamp(uradiusPlusHalf_Stage1.x - length(dxy), 0.0, 1.0);
+ output_Stage1 = vec4(alpha);
+ }
+ {
+ sk_FragColor = outputColor_Stage0 * output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 position;
+in vec4 color;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/25-3.shader_test b/shaders/skia/25-3.shader_test
new file mode 100644
index 0000000..5dae879
--- /dev/null
+++ b/shaders/skia/25-3.shader_test
@@ -0,0 +1,39 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform sampler2D uTextureSampler_0_Stage0;
+flat in vec4 vcolor_Stage0;
+noperspective in vec2 vlocalCoord_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ vec2 texCoord;
+ texCoord = vlocalCoord_Stage0;
+ outputColor_Stage0 = texture(uTextureSampler_0_Stage0, texCoord) * outputColor_Stage0;
+ }
+ {
+ sk_FragColor = outputColor_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+flat out vec4 vcolor_Stage0;
+noperspective out vec2 vlocalCoord_Stage0;
+void main() {
+ vcolor_Stage0 = color;
+ vlocalCoord_Stage0 = localCoord;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/25-35.shader_test b/shaders/skia/25-35.shader_test
new file mode 100644
index 0000000..31c9375
--- /dev/null
+++ b/shaders/skia/25-35.shader_test
@@ -0,0 +1,75 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 uscale01_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias01_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale23_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias23_Stage1_c0_c0_c1_c0;
+uniform float uthreshold_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 DualIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthreshold_Stage1_c0_c0_c1_c0) {
+ scale = uscale01_Stage1_c0_c0_c1_c0;
+ bias = ubias01_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale23_Stage1_c0_c0_c1_c0;
+ bias = ubias23_Stage1_c0_c0_c1_c0;
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = DualIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/25-37.shader_test b/shaders/skia/25-37.shader_test
new file mode 100644
index 0000000..bc4403a
--- /dev/null
+++ b/shaders/skia/25-37.shader_test
@@ -0,0 +1,44 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform float uPixelSize_Stage1;
+uniform vec2 uRange_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0;
+ coord.y -= 25.0 * uPixelSize_Stage1;
+ float highBound = min(uRange_Stage1.y, coord.y + 50.0 * uPixelSize_Stage1);
+ coord.y = max(uRange_Stage1.x, coord.y);
+ for (int i = 0;i < 51; i++) {
+ output_Stage1 = max(output_Stage1, texture(uTextureSampler_0_Stage1, coord));
+ coord.y += uPixelSize_Stage1;
+ coord.y = min(highBound, coord.y);
+ }
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/25-38.shader_test b/shaders/skia/25-38.shader_test
new file mode 100644
index 0000000..4a34418
--- /dev/null
+++ b/shaders/skia/25-38.shader_test
@@ -0,0 +1,60 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/25-4.shader_test b/shaders/skia/25-4.shader_test
new file mode 100644
index 0000000..9a50073
--- /dev/null
+++ b/shaders/skia/25-4.shader_test
@@ -0,0 +1,50 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 TextureEffect_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage2, vTransformedCoords_1_Stage0) * _input;
+ return _output;
+}
+vec4 blend_src_out(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_src_out(output_Stage1, TextureEffect_Stage2_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/25-40.shader_test b/shaders/skia/25-40.shader_test
new file mode 100644
index 0000000..d9f6f50
--- /dev/null
+++ b/shaders/skia/25-40.shader_test
@@ -0,0 +1,137 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform float uSurfaceScale_Stage1;
+uniform vec3 uLightColor_Stage1;
+uniform float uKD_Stage1;
+uniform vec3 uLightLocation_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 light_Stage1(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ float colorScale = uKD_Stage1 * dot(normal, surfaceToLight);
+ return vec4(lightColor * clamp(colorScale, 0.0, 1.0), 1.0);
+}
+float sobel_Stage1(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage1(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage1(float m[9], float surfaceScale) {
+ return pointToNormal_Stage1(sobel_Stage1(m[0], m[2], m[3], m[5], 0.0, 0.0, 0.33333298563957214), sobel_Stage1(m[0], m[3], m[1], m[4], m[2], m[5], 0.5), surfaceScale);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ vec2 coord = vTransformedCoords_0_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp0 = textureColor;
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp1 = textureColor;
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp2 = textureColor;
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp3 = textureColor;
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp4 = textureColor;
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp5 = textureColor;
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp6 = textureColor;
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp7 = textureColor;
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp8 = textureColor;
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = normalize(uLightLocation_Stage1 - vec3(gl_FragCoord.xy, uSurfaceScale_Stage1 * m[4]));
+ output_Stage1 = light_Stage1(normal_Stage1(m, uSurfaceScale_Stage1), surfaceToLight, uLightColor_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/25-41.shader_test b/shaders/skia/25-41.shader_test
new file mode 100644
index 0000000..1bd981d
--- /dev/null
+++ b/shaders/skia/25-41.shader_test
@@ -0,0 +1,70 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec2 uDstTextureUpperLeft_Stage1;
+uniform vec2 uDstTextureCoordScale_Stage1;
+uniform sampler2D uTextureSampler_0_Stage0;
+uniform sampler2D uDstTextureSampler_Stage1;
+noperspective in vec2 vTextureCoords_Stage0;
+flat in int vTexIndex_Stage0;
+noperspective in vec4 vinColor_Stage0;
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vinColor_Stage0;
+ vec4 texColor;
+ {
+ texColor = texture(uTextureSampler_0_Stage0, vTextureCoords_Stage0);
+ }
+ outputCoverage_Stage0 = texColor;
+ }
+ {
+ if (all(lessThanEqual(outputCoverage_Stage0.xyz, vec3(0.0)))) {
+ discard;
+ }
+ vec2 _dstTexCoord = (gl_FragCoord.xy - uDstTextureUpperLeft_Stage1) * uDstTextureCoordScale_Stage1;
+ _dstTexCoord.y = 1.0 - _dstTexCoord.y;
+ vec4 _dstColor = texture(uDstTextureSampler_Stage1, _dstTexCoord);
+ sk_FragColor = blend_dst_in(outputColor_Stage0, _dstColor);
+ float lerpRed = mix(_dstColor.w, sk_FragColor.w, outputCoverage_Stage0.x);
+ float lerpBlue = mix(_dstColor.w, sk_FragColor.w, outputCoverage_Stage0.y);
+ float lerpGreen = mix(_dstColor.w, sk_FragColor.w, outputCoverage_Stage0.z);
+ sk_FragColor = outputCoverage_Stage0 * sk_FragColor + (vec4(1.0) - outputCoverage_Stage0) * _dstColor;
+ sk_FragColor.w = max(max(lerpRed, lerpBlue), lerpGreen);
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform vec2 uAtlasSizeInv_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in uvec2 inTextureCoords;
+noperspective out vec2 vTextureCoords_Stage0;
+flat out int vTexIndex_Stage0;
+noperspective out vec4 vinColor_Stage0;
+void main() {
+ ivec2 signedCoords = ivec2(int(inTextureCoords.x), int(inTextureCoords.y));
+ vec2 unormTexCoords = vec2(float(signedCoords.x / 2), float(signedCoords.y / 2));
+ vTextureCoords_Stage0 = unormTexCoords * uAtlasSizeInv_Stage0;
+ vTexIndex_Stage0 = 0;
+ vinColor_Stage0 = inColor;
+ gl_Position = vec4(inPosition.x, inPosition.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/25-47.shader_test b/shaders/skia/25-47.shader_test
new file mode 100644
index 0000000..403f80e
--- /dev/null
+++ b/shaders/skia/25-47.shader_test
@@ -0,0 +1,122 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform vec2 uBounds_Stage1;
+uniform vec4 uKernel_Stage1[6];
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0 - 10.0 * uImageIncrement_Stage1;
+ vec2 coordSampled = vec2(0.0, 0.0);
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[4].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[4].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[4].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[4].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[5].x;
+ coord += uImageIncrement_Stage1;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/25-49.shader_test b/shaders/skia/25-49.shader_test
new file mode 100644
index 0000000..dbdccc6
--- /dev/null
+++ b/shaders/skia/25-49.shader_test
@@ -0,0 +1,82 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform vec2 uBounds_Stage1;
+uniform vec4 uKernel_Stage1[3];
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0 - 5.0 * uImageIncrement_Stage1;
+ vec2 coordSampled = vec2(0.0, 0.0);
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].z;
+ coord += uImageIncrement_Stage1;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/25-5.shader_test b/shaders/skia/25-5.shader_test
new file mode 100644
index 0000000..840f84b
--- /dev/null
+++ b/shaders/skia/25-5.shader_test
@@ -0,0 +1,123 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uclamp_Stage1_c0_c0_c0_c0;
+uniform vec4 uclamp_Stage1_c0_c0_c1_c0;
+uniform vec4 uclamp_Stage1_c0_c0_c2_c0;
+uniform vec4 uclamp_Stage1_c0_c0_c3_c0;
+uniform mat3 ucolorSpaceMatrix_Stage1_c0_c0;
+uniform vec3 ucolorSpaceTranslate_Stage1_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+uniform sampler2D uTextureSampler_2_Stage1;
+uniform sampler2D uTextureSampler_3_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+noperspective in vec2 vTransformedCoords_3_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 inCoord = vTransformedCoords_0_Stage0;
+ vec2 subsetCoord;
+ subsetCoord.x = inCoord.x;
+ subsetCoord.y = inCoord.y;
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage1_c0_c0_c0_c0.x, uclamp_Stage1_c0_c0_c0_c0.z);
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage1_c0_c0_c0_c0.y, uclamp_Stage1_c0_c0_c0_c0.w);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ _output = _input * textureColor;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 inCoord = vTransformedCoords_1_Stage0;
+ vec2 subsetCoord;
+ subsetCoord.x = inCoord.x;
+ subsetCoord.y = inCoord.y;
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage1_c0_c0_c1_c0.x, uclamp_Stage1_c0_c0_c1_c0.z);
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage1_c0_c0_c1_c0.y, uclamp_Stage1_c0_c0_c1_c0.w);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ _output = _input * textureColor;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c0_c0_c2_c0(vec4 _input) {
+ vec4 _output;
+ vec2 inCoord = vTransformedCoords_2_Stage0;
+ vec2 subsetCoord;
+ subsetCoord.x = inCoord.x;
+ subsetCoord.y = inCoord.y;
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage1_c0_c0_c2_c0.x, uclamp_Stage1_c0_c0_c2_c0.z);
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage1_c0_c0_c2_c0.y, uclamp_Stage1_c0_c0_c2_c0.w);
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ _output = _input * textureColor;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c0_c0_c3_c0(vec4 _input) {
+ vec4 _output;
+ vec2 inCoord = vTransformedCoords_3_Stage0;
+ vec2 subsetCoord;
+ subsetCoord.x = inCoord.x;
+ subsetCoord.y = inCoord.y;
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage1_c0_c0_c3_c0.x, uclamp_Stage1_c0_c0_c3_c0.z);
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage1_c0_c0_c3_c0.y, uclamp_Stage1_c0_c0_c3_c0.w);
+ vec4 textureColor = texture(uTextureSampler_3_Stage1, clampedCoord);
+ _output = _input * textureColor;
+ return _output;
+}
+vec4 YUVtoRGBEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 planes[4];
+ planes[0] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0));
+ planes[1] = TextureEffect_Stage1_c0_c0_c1_c0(vec4(1.0));
+ planes[2] = TextureEffect_Stage1_c0_c0_c2_c0(vec4(1.0));
+ planes[3] = TextureEffect_Stage1_c0_c0_c3_c0(vec4(1.0));
+ vec4 color = vec4(planes[0].x, planes[1].x, planes[2].x, planes[3].w);
+ color.xyz = clamp(color.xyz * ucolorSpaceMatrix_Stage1_c0_c0 + ucolorSpaceTranslate_Stage1_c0_c0, 0.0, 1.0);
+ color.xyz *= color.w;
+ _output = color;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = YUVtoRGBEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+uniform mat3 uCoordTransformMatrix_3_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+noperspective out vec2 vTransformedCoords_3_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_3_Stage0 = (uCoordTransformMatrix_3_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/25-54.shader_test b/shaders/skia/25-54.shader_test
new file mode 100644
index 0000000..1f861a6
--- /dev/null
+++ b/shaders/skia/25-54.shader_test
@@ -0,0 +1,50 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform vec2 uBounds_Stage1;
+uniform vec4 uKernel_Stage1[1];
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0 - uImageIncrement_Stage1;
+ vec2 coordSampled = vec2(0.0, 0.0);
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].z;
+ coord += uImageIncrement_Stage1;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/25-57.shader_test b/shaders/skia/25-57.shader_test
new file mode 100644
index 0000000..e92446b
--- /dev/null
+++ b/shaders/skia/25-57.shader_test
@@ -0,0 +1,138 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform vec2 uBounds_Stage1;
+uniform vec4 uKernel_Stage1[7];
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0 - 12.0 * uImageIncrement_Stage1;
+ vec2 coordSampled = vec2(0.0, 0.0);
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage1.x, uBounds_Stage1.y - uBounds_Stage1.x) + uBounds_Stage1.x;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage1.x, uBounds_Stage1.y - uBounds_Stage1.x) + uBounds_Stage1.x;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage1.x, uBounds_Stage1.y - uBounds_Stage1.x) + uBounds_Stage1.x;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage1.x, uBounds_Stage1.y - uBounds_Stage1.x) + uBounds_Stage1.x;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage1.x, uBounds_Stage1.y - uBounds_Stage1.x) + uBounds_Stage1.x;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage1.x, uBounds_Stage1.y - uBounds_Stage1.x) + uBounds_Stage1.x;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage1.x, uBounds_Stage1.y - uBounds_Stage1.x) + uBounds_Stage1.x;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage1.x, uBounds_Stage1.y - uBounds_Stage1.x) + uBounds_Stage1.x;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage1.x, uBounds_Stage1.y - uBounds_Stage1.x) + uBounds_Stage1.x;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage1.x, uBounds_Stage1.y - uBounds_Stage1.x) + uBounds_Stage1.x;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage1.x, uBounds_Stage1.y - uBounds_Stage1.x) + uBounds_Stage1.x;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage1.x, uBounds_Stage1.y - uBounds_Stage1.x) + uBounds_Stage1.x;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage1.x, uBounds_Stage1.y - uBounds_Stage1.x) + uBounds_Stage1.x;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage1.x, uBounds_Stage1.y - uBounds_Stage1.x) + uBounds_Stage1.x;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage1.x, uBounds_Stage1.y - uBounds_Stage1.x) + uBounds_Stage1.x;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage1.x, uBounds_Stage1.y - uBounds_Stage1.x) + uBounds_Stage1.x;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage1.x, uBounds_Stage1.y - uBounds_Stage1.x) + uBounds_Stage1.x;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[4].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage1.x, uBounds_Stage1.y - uBounds_Stage1.x) + uBounds_Stage1.x;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[4].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage1.x, uBounds_Stage1.y - uBounds_Stage1.x) + uBounds_Stage1.x;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[4].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage1.x, uBounds_Stage1.y - uBounds_Stage1.x) + uBounds_Stage1.x;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[4].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage1.x, uBounds_Stage1.y - uBounds_Stage1.x) + uBounds_Stage1.x;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[5].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage1.x, uBounds_Stage1.y - uBounds_Stage1.x) + uBounds_Stage1.x;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[5].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage1.x, uBounds_Stage1.y - uBounds_Stage1.x) + uBounds_Stage1.x;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[5].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage1.x, uBounds_Stage1.y - uBounds_Stage1.x) + uBounds_Stage1.x;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[5].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage1.x, uBounds_Stage1.y - uBounds_Stage1.x) + uBounds_Stage1.x;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[6].x;
+ coord += uImageIncrement_Stage1;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/25-6.shader_test b/shaders/skia/25-6.shader_test
new file mode 100644
index 0000000..de1a182
--- /dev/null
+++ b/shaders/skia/25-6.shader_test
@@ -0,0 +1,64 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+uniform sampler2D uTextureSampler_2_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+vec4 TextureEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_1_Stage1, vTransformedCoords_1_Stage0) * _input;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c2_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_2_Stage1, vTransformedCoords_2_Stage0) * _input;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ vec4 planes[3];
+ planes[0] = TextureEffect_Stage1_c0_c0(vec4(1.0));
+ planes[1] = TextureEffect_Stage1_c1_c0(vec4(1.0));
+ planes[2] = TextureEffect_Stage1_c2_c0(vec4(1.0));
+ vec4 color = vec4(planes[0].w, planes[1].x, planes[1].y, planes[2].w);
+ color.xyz *= color.w;
+ output_Stage1 = color;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/25-61.shader_test b/shaders/skia/25-61.shader_test
new file mode 100644
index 0000000..25e3e58
--- /dev/null
+++ b/shaders/skia/25-61.shader_test
@@ -0,0 +1,100 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform float ucontrast_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+float hue2rgb_Stage2(float p, float q, float t) {
+ if (t < 0.0) t += 1.0;
+ if (t > 1.0) t -= 1.0;
+ if (t < 0.16666666666666666) return p + ((q - p) * 6.0) * t;
+ if (t < 0.5) return q;
+ if (t < 0.66666666666666663) return p + ((q - p) * (0.66666666666666663 - t)) * 6.0;
+ return p;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TextureEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ vec4 color = output_Stage1;
+ float nonZeroAlpha = max(color.w, 9.9999997473787516e-05);
+ color = vec4(color.xyz / nonZeroAlpha, nonZeroAlpha);
+ color.xyz = color.xyz * color.xyz;
+ float luma = dot(color, vec4(0.2125999927520752, 0.71520000696182251, 0.072200000286102295, 0.0));
+ color = vec4(luma, luma, luma, 0.0);
+ float fmax = max(color.x, max(color.y, color.z));
+ float fmin = min(color.x, min(color.y, color.z));
+ float l = (fmax + fmin) / 2.0;
+ float h;
+ float s;
+ if (fmax == fmin) {
+ h = 0.0;
+ s = 0.0;
+ } else {
+ float d = fmax - fmin;
+ s = l > 0.5 ? d / ((2.0 - fmax) - fmin) : d / (fmax + fmin);
+ if (color.x >= color.y && color.x >= color.z) {
+ h = (color.y - color.z) / d + float(color.y < color.z ? 6 : 0);
+ } else if (color.y >= color.z) {
+ h = (color.z - color.x) / d + 2.0;
+ } else {
+ h = (color.x - color.y) / d + 4.0;
+ }
+ }
+ h /= 6.0;
+ l = 1.0 - l;
+ if (s == 0.0) {
+ color = vec4(l, l, l, 0.0);
+ } else {
+ float q = l < 0.5 ? l * (1.0 + s) : (l + s) - l * s;
+ float p = 2.0 * l - q;
+ color.x = hue2rgb_Stage2(p, q, h + 0.33333333333333331);
+ color.y = hue2rgb_Stage2(p, q, h);
+ color.z = hue2rgb_Stage2(p, q, h - 0.33333333333333331);
+ }
+ if (ucontrast_Stage2 != 0.0) {
+ float m = (1.0 + ucontrast_Stage2) / (1.0 - ucontrast_Stage2);
+ float off = -0.5 * m + 0.5;
+ color = m * color + off;
+ }
+ color = clamp(color, 0.0, 1.0);
+ color.xyz = sqrt(color.xyz);
+ color.w = output_Stage1.w;
+ color.xyz *= color.w;
+ output_Stage2 = color;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/25-62.shader_test b/shaders/skia/25-62.shader_test
new file mode 100644
index 0000000..c9e3717
--- /dev/null
+++ b/shaders/skia/25-62.shader_test
@@ -0,0 +1,86 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TiledGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/25-66.shader_test b/shaders/skia/25-66.shader_test
new file mode 100644
index 0000000..373509b
--- /dev/null
+++ b/shaders/skia/25-66.shader_test
@@ -0,0 +1,81 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform float ubias_Stage1_c0_c0_c0_c0;
+uniform float uscale_Stage1_c0_c0_c0_c0;
+uniform vec4 uscale01_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias01_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale23_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias23_Stage1_c0_c0_c1_c0;
+uniform float uthreshold_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 SweepGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float angle;
+ {
+ angle = atan(-vTransformedCoords_0_Stage0.y, -vTransformedCoords_0_Stage0.x);
+ }
+ float t = ((angle * 0.15915493667125702 + 0.5) + ubias_Stage1_c0_c0_c0_c0) * uscale_Stage1_c0_c0_c0_c0;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 DualIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthreshold_Stage1_c0_c0_c1_c0) {
+ scale = uscale01_Stage1_c0_c0_c1_c0;
+ bias = ubias01_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale23_Stage1_c0_c0_c1_c0;
+ bias = ubias23_Stage1_c0_c0_c1_c0;
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = SweepGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = DualIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/25-67.shader_test b/shaders/skia/25-67.shader_test
new file mode 100644
index 0000000..2c96d92
--- /dev/null
+++ b/shaders/skia/25-67.shader_test
@@ -0,0 +1,97 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform float ubias_Stage1_c0_c0_c0_c0;
+uniform float uscale_Stage1_c0_c0_c0_c0;
+uniform vec4 uscale01_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias01_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale23_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias23_Stage1_c0_c0_c1_c0;
+uniform float uthreshold_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 SweepGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float angle;
+ {
+ angle = atan(-vTransformedCoords_0_Stage0.y, -vTransformedCoords_0_Stage0.x);
+ }
+ float t = ((angle * 0.15915493667125702 + 0.5) + ubias_Stage1_c0_c0_c0_c0) * uscale_Stage1_c0_c0_c0_c0;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 DualIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthreshold_Stage1_c0_c0_c1_c0) {
+ scale = uscale01_Stage1_c0_c0_c1_c0;
+ bias = ubias01_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale23_Stage1_c0_c0_c1_c0;
+ bias = ubias23_Stage1_c0_c0_c1_c0;
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = SweepGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = DualIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_1_Stage0.x);
+ uint y = uint(vTransformedCoords_1_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ output_Stage2 = vec4(clamp(output_Stage2.xyz + value * 0.0039215688593685627, 0.0, output_Stage2.w), output_Stage2.w);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/25-68.shader_test b/shaders/skia/25-68.shader_test
new file mode 100644
index 0000000..96ac03d
--- /dev/null
+++ b/shaders/skia/25-68.shader_test
@@ -0,0 +1,122 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_0_Stage0;
+ float t = -1.0;
+ float v = 1.0;
+ {
+ {
+ float invR1 = ufocalParams_Stage1_c0_c0_c0_c0.x;
+ float fx = ufocalParams_Stage1_c0_c0_c0_c0.y;
+ float x_t = -1.0;
+ {
+ float temp = p.x * p.x - p.y * p.y;
+ if (temp >= 0.0) {
+ {
+ x_t = sqrt(temp) - p.x * invR1;
+ }
+ }
+ }
+ {
+ if (x_t <= 0.0) {
+ v = -1.0;
+ }
+ }
+ {
+ {
+ t = x_t + fx;
+ }
+ }
+ }
+ }
+ _output = vec4(t, v, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/25-69.shader_test b/shaders/skia/25-69.shader_test
new file mode 100644
index 0000000..a937868
--- /dev/null
+++ b/shaders/skia/25-69.shader_test
@@ -0,0 +1,119 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_0_Stage0;
+ float t = -1.0;
+ float v = 1.0;
+ {
+ {
+ float invR1 = ufocalParams_Stage1_c0_c0_c0_c0.x;
+ float x_t = -1.0;
+ {
+ float temp = p.x * p.x - p.y * p.y;
+ if (temp >= 0.0) {
+ {
+ x_t = -sqrt(temp) - p.x * invR1;
+ }
+ }
+ }
+ {
+ if (x_t <= 0.0) {
+ v = -1.0;
+ }
+ }
+ {
+ {
+ t = x_t;
+ }
+ }
+ {
+ t = 1.0 - t;
+ }
+ }
+ }
+ _output = vec4(t, v, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/25-7.shader_test b/shaders/skia/25-7.shader_test
new file mode 100644
index 0000000..981b9b0
--- /dev/null
+++ b/shaders/skia/25-7.shader_test
@@ -0,0 +1,64 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform mat3 ucolorSpaceMatrix_Stage1_c0_c0;
+uniform vec3 ucolorSpaceTranslate_Stage1_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_1_Stage1, vTransformedCoords_1_Stage0) * _input;
+ return _output;
+}
+vec4 YUVtoRGBEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 planes[2];
+ planes[0] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0));
+ planes[1] = TextureEffect_Stage1_c0_c0_c1_c0(vec4(1.0));
+ vec4 color = vec4(planes[0].x, planes[1].x, planes[1].y, 1.0);
+ color.xyz = clamp(color.xyz * ucolorSpaceMatrix_Stage1_c0_c0 + ucolorSpaceTranslate_Stage1_c0_c0, 0.0, 1.0);
+ _output = color;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = YUVtoRGBEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/25-70.shader_test b/shaders/skia/25-70.shader_test
new file mode 100644
index 0000000..bbd6e89
--- /dev/null
+++ b/shaders/skia/25-70.shader_test
@@ -0,0 +1,106 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_0_Stage0;
+ float t = -1.0;
+ {
+ {
+ float invR1 = ufocalParams_Stage1_c0_c0_c0_c0.x;
+ float fx = ufocalParams_Stage1_c0_c0_c0_c0.y;
+ float x_t = -1.0;
+ {
+ x_t = length(p) - p.x * invR1;
+ }
+ {
+ {
+ t = -x_t + fx;
+ }
+ }
+ }
+ }
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/25-71.shader_test b/shaders/skia/25-71.shader_test
new file mode 100644
index 0000000..25e88f9
--- /dev/null
+++ b/shaders/skia/25-71.shader_test
@@ -0,0 +1,137 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_0_Stage0;
+ float t = -1.0;
+ float v = 1.0;
+ {
+ {
+ float invR1 = ufocalParams_Stage1_c0_c0_c0_c0.x;
+ float fx = ufocalParams_Stage1_c0_c0_c0_c0.y;
+ float x_t = -1.0;
+ {
+ float temp = p.x * p.x - p.y * p.y;
+ if (temp >= 0.0) {
+ {
+ x_t = sqrt(temp) - p.x * invR1;
+ }
+ }
+ }
+ {
+ if (x_t <= 0.0) {
+ v = -1.0;
+ }
+ }
+ {
+ {
+ t = x_t + fx;
+ }
+ }
+ }
+ }
+ _output = vec4(t, v, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TiledGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_1_Stage0.x);
+ uint y = uint(vTransformedCoords_1_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ output_Stage2 = vec4(clamp(output_Stage2.xyz + value * 0.0039215688593685627, 0.0, output_Stage2.w), output_Stage2.w);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/25-72.shader_test b/shaders/skia/25-72.shader_test
new file mode 100644
index 0000000..33b7f58
--- /dev/null
+++ b/shaders/skia/25-72.shader_test
@@ -0,0 +1,134 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_0_Stage0;
+ float t = -1.0;
+ float v = 1.0;
+ {
+ {
+ float invR1 = ufocalParams_Stage1_c0_c0_c0_c0.x;
+ float x_t = -1.0;
+ {
+ float temp = p.x * p.x - p.y * p.y;
+ if (temp >= 0.0) {
+ {
+ x_t = -sqrt(temp) - p.x * invR1;
+ }
+ }
+ }
+ {
+ if (x_t <= 0.0) {
+ v = -1.0;
+ }
+ }
+ {
+ {
+ t = x_t;
+ }
+ }
+ {
+ t = 1.0 - t;
+ }
+ }
+ }
+ _output = vec4(t, v, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TiledGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_1_Stage0.x);
+ uint y = uint(vTransformedCoords_1_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ output_Stage2 = vec4(clamp(output_Stage2.xyz + value * 0.0039215688593685627, 0.0, output_Stage2.w), output_Stage2.w);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/25-73.shader_test b/shaders/skia/25-73.shader_test
new file mode 100644
index 0000000..1bcfb7a
--- /dev/null
+++ b/shaders/skia/25-73.shader_test
@@ -0,0 +1,121 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_0_Stage0;
+ float t = -1.0;
+ {
+ {
+ float invR1 = ufocalParams_Stage1_c0_c0_c0_c0.x;
+ float fx = ufocalParams_Stage1_c0_c0_c0_c0.y;
+ float x_t = -1.0;
+ {
+ x_t = length(p) - p.x * invR1;
+ }
+ {
+ {
+ t = -x_t + fx;
+ }
+ }
+ }
+ }
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TiledGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_1_Stage0.x);
+ uint y = uint(vTransformedCoords_1_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ output_Stage2 = vec4(clamp(output_Stage2.xyz + value * 0.0039215688593685627, 0.0, output_Stage2.w), output_Stage2.w);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/25-74.shader_test b/shaders/skia/25-74.shader_test
new file mode 100644
index 0000000..6d4ad17
--- /dev/null
+++ b/shaders/skia/25-74.shader_test
@@ -0,0 +1,135 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_0_Stage0;
+ float t = -1.0;
+ float v = 1.0;
+ {
+ {
+ float invR1 = ufocalParams_Stage1_c0_c0_c0_c0.x;
+ float fx = ufocalParams_Stage1_c0_c0_c0_c0.y;
+ float x_t = -1.0;
+ {
+ float temp = p.x * p.x - p.y * p.y;
+ if (temp >= 0.0) {
+ {
+ x_t = sqrt(temp) - p.x * invR1;
+ }
+ }
+ }
+ {
+ if (x_t <= 0.0) {
+ v = -1.0;
+ }
+ }
+ {
+ {
+ t = x_t + fx;
+ }
+ }
+ }
+ }
+ _output = vec4(t, v, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else {
+ {
+ t.x = fract(t.x);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TiledGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_1_Stage0.x);
+ uint y = uint(vTransformedCoords_1_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ output_Stage2 = vec4(clamp(output_Stage2.xyz + value * 0.0039215688593685627, 0.0, output_Stage2.w), output_Stage2.w);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/25-75.shader_test b/shaders/skia/25-75.shader_test
new file mode 100644
index 0000000..dd40f68
--- /dev/null
+++ b/shaders/skia/25-75.shader_test
@@ -0,0 +1,132 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_0_Stage0;
+ float t = -1.0;
+ float v = 1.0;
+ {
+ {
+ float invR1 = ufocalParams_Stage1_c0_c0_c0_c0.x;
+ float x_t = -1.0;
+ {
+ float temp = p.x * p.x - p.y * p.y;
+ if (temp >= 0.0) {
+ {
+ x_t = -sqrt(temp) - p.x * invR1;
+ }
+ }
+ }
+ {
+ if (x_t <= 0.0) {
+ v = -1.0;
+ }
+ }
+ {
+ {
+ t = x_t;
+ }
+ }
+ {
+ t = 1.0 - t;
+ }
+ }
+ }
+ _output = vec4(t, v, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else {
+ {
+ t.x = fract(t.x);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TiledGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_1_Stage0.x);
+ uint y = uint(vTransformedCoords_1_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ output_Stage2 = vec4(clamp(output_Stage2.xyz + value * 0.0039215688593685627, 0.0, output_Stage2.w), output_Stage2.w);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/25-76.shader_test b/shaders/skia/25-76.shader_test
new file mode 100644
index 0000000..ad9998b
--- /dev/null
+++ b/shaders/skia/25-76.shader_test
@@ -0,0 +1,119 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_0_Stage0;
+ float t = -1.0;
+ {
+ {
+ float invR1 = ufocalParams_Stage1_c0_c0_c0_c0.x;
+ float fx = ufocalParams_Stage1_c0_c0_c0_c0.y;
+ float x_t = -1.0;
+ {
+ x_t = length(p) - p.x * invR1;
+ }
+ {
+ {
+ t = -x_t + fx;
+ }
+ }
+ }
+ }
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else {
+ {
+ t.x = fract(t.x);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TiledGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_1_Stage0.x);
+ uint y = uint(vTransformedCoords_1_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ output_Stage2 = vec4(clamp(output_Stage2.xyz + value * 0.0039215688593685627, 0.0, output_Stage2.w), output_Stage2.w);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/25-77.shader_test b/shaders/skia/25-77.shader_test
new file mode 100644
index 0000000..bf24716
--- /dev/null
+++ b/shaders/skia/25-77.shader_test
@@ -0,0 +1,138 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_0_Stage0;
+ float t = -1.0;
+ float v = 1.0;
+ {
+ {
+ float invR1 = ufocalParams_Stage1_c0_c0_c0_c0.x;
+ float fx = ufocalParams_Stage1_c0_c0_c0_c0.y;
+ float x_t = -1.0;
+ {
+ float temp = p.x * p.x - p.y * p.y;
+ if (temp >= 0.0) {
+ {
+ x_t = sqrt(temp) - p.x * invR1;
+ }
+ }
+ }
+ {
+ if (x_t <= 0.0) {
+ v = -1.0;
+ }
+ }
+ {
+ {
+ t = x_t + fx;
+ }
+ }
+ }
+ }
+ _output = vec4(t, v, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_1_Stage0.x);
+ uint y = uint(vTransformedCoords_1_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ output_Stage2 = vec4(clamp(output_Stage2.xyz + value * 0.0039215688593685627, 0.0, output_Stage2.w), output_Stage2.w);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/25-78.shader_test b/shaders/skia/25-78.shader_test
new file mode 100644
index 0000000..fb399d2
--- /dev/null
+++ b/shaders/skia/25-78.shader_test
@@ -0,0 +1,135 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_0_Stage0;
+ float t = -1.0;
+ float v = 1.0;
+ {
+ {
+ float invR1 = ufocalParams_Stage1_c0_c0_c0_c0.x;
+ float x_t = -1.0;
+ {
+ float temp = p.x * p.x - p.y * p.y;
+ if (temp >= 0.0) {
+ {
+ x_t = -sqrt(temp) - p.x * invR1;
+ }
+ }
+ }
+ {
+ if (x_t <= 0.0) {
+ v = -1.0;
+ }
+ }
+ {
+ {
+ t = x_t;
+ }
+ }
+ {
+ t = 1.0 - t;
+ }
+ }
+ }
+ _output = vec4(t, v, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_1_Stage0.x);
+ uint y = uint(vTransformedCoords_1_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ output_Stage2 = vec4(clamp(output_Stage2.xyz + value * 0.0039215688593685627, 0.0, output_Stage2.w), output_Stage2.w);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/25-79.shader_test b/shaders/skia/25-79.shader_test
new file mode 100644
index 0000000..36f1ef9
--- /dev/null
+++ b/shaders/skia/25-79.shader_test
@@ -0,0 +1,122 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_0_Stage0;
+ float t = -1.0;
+ {
+ {
+ float invR1 = ufocalParams_Stage1_c0_c0_c0_c0.x;
+ float fx = ufocalParams_Stage1_c0_c0_c0_c0.y;
+ float x_t = -1.0;
+ {
+ x_t = length(p) - p.x * invR1;
+ }
+ {
+ {
+ t = -x_t + fx;
+ }
+ }
+ }
+ }
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_1_Stage0.x);
+ uint y = uint(vTransformedCoords_1_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ output_Stage2 = vec4(clamp(output_Stage2.xyz + value * 0.0039215688593685627, 0.0, output_Stage2.w), output_Stage2.w);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/25-80.shader_test b/shaders/skia/25-80.shader_test
new file mode 100644
index 0000000..d60b413
--- /dev/null
+++ b/shaders/skia/25-80.shader_test
@@ -0,0 +1,128 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+in float vcoverage_Stage0;
+flat in vec4 vgeomDomain_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_0_Stage0;
+ float t = -1.0;
+ {
+ {
+ float invR1 = ufocalParams_Stage1_c0_c0_c0_c0.x;
+ float fx = ufocalParams_Stage1_c0_c0_c0_c0.y;
+ float x_t = -1.0;
+ {
+ x_t = length(p) - p.x * invR1;
+ }
+ {
+ {
+ t = x_t + fx;
+ }
+ }
+ }
+ }
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ float coverage = vcoverage_Stage0 * gl_FragCoord.w;
+ vec4 geoDomain;
+ geoDomain = vgeomDomain_Stage0;
+ if (coverage < 0.5) {
+ vec4 dists4 = clamp(vec4(1.0, 1.0, -1.0, -1.0) * (gl_FragCoord.xyxy - geoDomain), 0.0, 1.0);
+ vec2 dists2 = dists4.xy * dists4.zw;
+ coverage = min(coverage, dists2.x * dists2.y);
+ }
+ outputCoverage_Stage0 = vec4(coverage);
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1 * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec4 positionWithCoverage;
+in vec4 color;
+in vec2 localCoord;
+in vec4 geomDomain;
+out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+out float vcoverage_Stage0;
+flat out vec4 vgeomDomain_Stage0;
+void main() {
+ vec3 position = positionWithCoverage.xyz;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ vcoverage_Stage0 = positionWithCoverage.w * positionWithCoverage.z;
+ vgeomDomain_Stage0 = geomDomain;
+ gl_Position = vec4(position.x, position.y, 0.0, position.z);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/25-81.shader_test b/shaders/skia/25-81.shader_test
new file mode 100644
index 0000000..937a7b3
--- /dev/null
+++ b/shaders/skia/25-81.shader_test
@@ -0,0 +1,144 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+in vec2 vTransformedCoords_0_Stage0;
+in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+in float vcoverage_Stage0;
+flat in vec4 vgeomDomain_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_0_Stage0;
+ float t = -1.0;
+ {
+ {
+ float invR1 = ufocalParams_Stage1_c0_c0_c0_c0.x;
+ float fx = ufocalParams_Stage1_c0_c0_c0_c0.y;
+ float x_t = -1.0;
+ {
+ x_t = length(p) - p.x * invR1;
+ }
+ {
+ {
+ t = x_t + fx;
+ }
+ }
+ }
+ }
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ float coverage = vcoverage_Stage0 * gl_FragCoord.w;
+ vec4 geoDomain;
+ geoDomain = vgeomDomain_Stage0;
+ if (coverage < 0.5) {
+ vec4 dists4 = clamp(vec4(1.0, 1.0, -1.0, -1.0) * (gl_FragCoord.xyxy - geoDomain), 0.0, 1.0);
+ vec2 dists2 = dists4.xy * dists4.zw;
+ coverage = min(coverage, dists2.x * dists2.y);
+ }
+ outputCoverage_Stage0 = vec4(coverage);
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_1_Stage0.x);
+ uint y = uint(vTransformedCoords_1_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ output_Stage2 = vec4(clamp(output_Stage2.xyz + value * 0.0039215688593685627, 0.0, output_Stage2.w), output_Stage2.w);
+ }
+ {
+ sk_FragColor = output_Stage2 * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec4 positionWithCoverage;
+in vec4 color;
+in vec2 localCoord;
+in vec4 geomDomain;
+out vec2 vTransformedCoords_0_Stage0;
+out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+out float vcoverage_Stage0;
+flat out vec4 vgeomDomain_Stage0;
+void main() {
+ vec3 position = positionWithCoverage.xyz;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ vcoverage_Stage0 = positionWithCoverage.w * positionWithCoverage.z;
+ vgeomDomain_Stage0 = geomDomain;
+ gl_Position = vec4(position.x, position.y, 0.0, position.z);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/25-82.shader_test b/shaders/skia/25-82.shader_test
new file mode 100644
index 0000000..1f50116
--- /dev/null
+++ b/shaders/skia/25-82.shader_test
@@ -0,0 +1,107 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+noperspective in vec3 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 vTransformedCoords_0_Stage0_ensure2D = vTransformedCoords_0_Stage0.xy / vTransformedCoords_0_Stage0.z;
+ vec2 p = vTransformedCoords_0_Stage0_ensure2D;
+ float t = -1.0;
+ {
+ {
+ float invR1 = ufocalParams_Stage1_c0_c0_c0_c0.x;
+ float fx = ufocalParams_Stage1_c0_c0_c0_c0.y;
+ float x_t = -1.0;
+ {
+ x_t = length(p) - p.x * invR1;
+ }
+ {
+ {
+ t = x_t + fx;
+ }
+ }
+ }
+ }
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec3 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0);
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/25-83.shader_test b/shaders/skia/25-83.shader_test
new file mode 100644
index 0000000..14df820
--- /dev/null
+++ b/shaders/skia/25-83.shader_test
@@ -0,0 +1,123 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+noperspective in vec3 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 vTransformedCoords_0_Stage0_ensure2D = vTransformedCoords_0_Stage0.xy / vTransformedCoords_0_Stage0.z;
+ vec2 p = vTransformedCoords_0_Stage0_ensure2D;
+ float t = -1.0;
+ {
+ {
+ float invR1 = ufocalParams_Stage1_c0_c0_c0_c0.x;
+ float fx = ufocalParams_Stage1_c0_c0_c0_c0.y;
+ float x_t = -1.0;
+ {
+ x_t = length(p) - p.x * invR1;
+ }
+ {
+ {
+ t = x_t + fx;
+ }
+ }
+ }
+ }
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_1_Stage0.x);
+ uint y = uint(vTransformedCoords_1_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ output_Stage2 = vec4(clamp(output_Stage2.xyz + value * 0.0039215688593685627, 0.0, output_Stage2.w), output_Stage2.w);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec3 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0);
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/25-88.shader_test b/shaders/skia/25-88.shader_test
new file mode 100644
index 0000000..0435402
--- /dev/null
+++ b/shaders/skia/25-88.shader_test
@@ -0,0 +1,113 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform vec2 uBounds_Stage1;
+uniform vec4 uKernel_Stage1[4];
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0 - 7.0 * uImageIncrement_Stage1;
+ vec2 coordSampled = vec2(0.0, 0.0);
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage1.x && coord.y <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].x;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage1.x && coord.y <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].y;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage1.x && coord.y <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].z;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage1.x && coord.y <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].w;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage1.x && coord.y <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].x;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage1.x && coord.y <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].y;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage1.x && coord.y <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].z;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage1.x && coord.y <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].w;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage1.x && coord.y <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].x;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage1.x && coord.y <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].y;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage1.x && coord.y <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].z;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage1.x && coord.y <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].w;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage1.x && coord.y <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].x;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage1.x && coord.y <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].y;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage1.x && coord.y <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].z;
+ }
+ coord += uImageIncrement_Stage1;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/25-89.shader_test b/shaders/skia/25-89.shader_test
new file mode 100644
index 0000000..f3fef7a
--- /dev/null
+++ b/shaders/skia/25-89.shader_test
@@ -0,0 +1,50 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_KHR_blend_equation_advanced : require
+out vec4 sk_FragColor;
+layout (blend_support_all_equations) out ;
+uniform sampler2D uTextureSampler_0_Stage0;
+noperspective in vec2 vTextureCoords_Stage0;
+flat in int vTexIndex_Stage0;
+noperspective in vec4 vinColor_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vinColor_Stage0;
+ vec4 texColor;
+ {
+ texColor = texture(uTextureSampler_0_Stage0, vTextureCoords_Stage0);
+ }
+ outputCoverage_Stage0 = texColor;
+ }
+ {
+ sk_FragColor = outputCoverage_Stage0 * outputColor_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform vec2 uAtlasSizeInv_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in uvec2 inTextureCoords;
+noperspective out vec2 vTextureCoords_Stage0;
+flat out int vTexIndex_Stage0;
+noperspective out vec4 vinColor_Stage0;
+void main() {
+ ivec2 signedCoords = ivec2(int(inTextureCoords.x), int(inTextureCoords.y));
+ vec2 unormTexCoords = vec2(float(signedCoords.x / 2), float(signedCoords.y / 2));
+ vTextureCoords_Stage0 = unormTexCoords * uAtlasSizeInv_Stage0;
+ vTexIndex_Stage0 = 0;
+ vinColor_Stage0 = inColor;
+ gl_Position = vec4(inPosition.x, inPosition.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/25-9.shader_test b/shaders/skia/25-9.shader_test
new file mode 100644
index 0000000..0338f46
--- /dev/null
+++ b/shaders/skia/25-9.shader_test
@@ -0,0 +1,114 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uColor_Stage0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale8_9_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale10_11_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias8_9_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias10_11_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.w) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c1_c0;
+ }
+ }
+ } else {
+ {
+ if (t < uthresholds9_13_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale8_9_Stage1_c0_c0_c1_c0;
+ bias = ubias8_9_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale10_11_Stage1_c0_c0_c1_c0;
+ bias = ubias10_11_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = uColor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_dst_in(outputColor_Stage0, TiledGradientEffect_Stage1_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 inLocalCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/25-90.shader_test b/shaders/skia/25-90.shader_test
new file mode 100644
index 0000000..8119c09
--- /dev/null
+++ b/shaders/skia/25-90.shader_test
@@ -0,0 +1,58 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 ucircle_Stage1;
+uniform vec4 urectUniform_Stage2;
+flat in vec4 vcolor_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ float d;
+ {
+ d = (length((ucircle_Stage1.xy - gl_FragCoord.xy) * ucircle_Stage1.w) - 1.0) * ucircle_Stage1.z;
+ }
+ {
+ output_Stage1 = vec4(clamp(d, 0.0, 1.0));
+ }
+ }
+ vec4 output_Stage2;
+ {
+ float alpha;
+ {
+ float xSub, ySub;
+ xSub = min(gl_FragCoord.x - urectUniform_Stage2.x, 0.0);
+ xSub += min(urectUniform_Stage2.z - gl_FragCoord.x, 0.0);
+ ySub = min(gl_FragCoord.y - urectUniform_Stage2.y, 0.0);
+ ySub += min(urectUniform_Stage2.w - gl_FragCoord.y, 0.0);
+ alpha = (1.0 + max(xSub, -1.0)) * (1.0 + max(ySub, -1.0));
+ }
+ output_Stage2 = output_Stage1 * alpha;
+ }
+ {
+ sk_FragColor = outputColor_Stage0 * output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 position;
+in vec4 color;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/25-93.shader_test b/shaders/skia/25-93.shader_test
new file mode 100644
index 0000000..6519081
--- /dev/null
+++ b/shaders/skia/25-93.shader_test
@@ -0,0 +1,70 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 TextureEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = TextureEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = OverrideInputFragmentProcessor_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_dst_in(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec2 inLocalCoord;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 color = inColor;
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/25-98.shader_test b/shaders/skia/25-98.shader_test
new file mode 100644
index 0000000..8161184
--- /dev/null
+++ b/shaders/skia/25-98.shader_test
@@ -0,0 +1,67 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec3 uedges_Stage1[8];
+flat in vec4 vcolor_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ float alpha = 1.0;
+ float edge;
+ edge = dot(uedges_Stage1[0], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage1[1], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage1[2], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage1[3], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage1[4], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage1[5], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage1[6], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage1[7], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ alpha = 1.0 - alpha;
+ output_Stage1 = vec4(alpha);
+ }
+ {
+ sk_FragColor = outputColor_Stage0 * output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 inPosition;
+in vec2 inLocalCoords;
+in vec4 color;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vcolor_Stage0 = color;
+ vec2 pos2 = inPosition;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/25-99.shader_test b/shaders/skia/25-99.shader_test
new file mode 100644
index 0000000..e4989d3
--- /dev/null
+++ b/shaders/skia/25-99.shader_test
@@ -0,0 +1,75 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec3 uedges_Stage1[6];
+uniform sampler2D uTextureSampler_0_Stage0;
+noperspective in vec2 vTextureCoords_Stage0;
+flat in int vTexIndex_Stage0;
+noperspective in vec4 vinColor_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vinColor_Stage0;
+ vec4 texColor;
+ {
+ texColor = texture(uTextureSampler_0_Stage0, vTextureCoords_Stage0);
+ }
+ outputCoverage_Stage0 = texColor;
+ }
+ vec4 output_Stage1;
+ {
+ float alpha = 1.0;
+ float edge;
+ edge = dot(uedges_Stage1[0], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage1[1], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage1[2], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage1[3], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage1[4], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage1[5], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ output_Stage1 = outputCoverage_Stage0 * alpha;
+ }
+ {
+ sk_FragColor = outputColor_Stage0 * output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform vec2 uAtlasSizeInv_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in uvec2 inTextureCoords;
+noperspective out vec2 vTextureCoords_Stage0;
+flat out int vTexIndex_Stage0;
+noperspective out vec4 vinColor_Stage0;
+void main() {
+ ivec2 signedCoords = ivec2(int(inTextureCoords.x), int(inTextureCoords.y));
+ vec2 unormTexCoords = vec2(float(signedCoords.x / 2), float(signedCoords.y / 2));
+ vTextureCoords_Stage0 = unormTexCoords * uAtlasSizeInv_Stage0;
+ vTexIndex_Stage0 = 0;
+ vinColor_Stage0 = inColor;
+ gl_Position = vec4(inPosition.x, inPosition.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/25.shader_test b/shaders/skia/25.shader_test
new file mode 100644
index 0000000..66d33d0
--- /dev/null
+++ b/shaders/skia/25.shader_test
@@ -0,0 +1,84 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uclamp_Stage1_c0_c0_c0_c0;
+uniform sampler2DRect uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0_c0_c0(vec4 _input, vec2 _coords) {
+ vec4 _output;
+ vec2 inCoord = _coords;
+ vec2 subsetCoord;
+ subsetCoord.x = inCoord.x;
+ subsetCoord.y = inCoord.y;
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage1_c0_c0_c0_c0.x, uclamp_Stage1_c0_c0_c0_c0.z);
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage1_c0_c0_c0_c0.y, uclamp_Stage1_c0_c0_c0_c0.w);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ _output = _input * textureColor;
+ return _output;
+}
+vec4 Bicubic_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coord = vTransformedCoords_0_Stage0 - vec2(0.5);
+ vec2 f = fract(coord);
+ coord += 0.5 - f;
+ vec4 wx = mat4(0.055555555555555552, 0.88888888888888884, 0.055555555555555552, 0.0, -0.5, 0.0, 0.5, 0.0, 0.83333333333333337, -2.0, 1.5, -0.33333333333333331, -0.3888888888888889, 1.1666666666666667, -1.1666666666666667, 0.3888888888888889) * vec4(1.0, f.x, f.x * f.x, (f.x * f.x) * f.x);
+ vec4 wy = mat4(0.055555555555555552, 0.88888888888888884, 0.055555555555555552, 0.0, -0.5, 0.0, 0.5, 0.0, 0.83333333333333337, -2.0, 1.5, -0.33333333333333331, -0.3888888888888889, 1.1666666666666667, -1.1666666666666667, 0.3888888888888889) * vec4(1.0, f.y, f.y * f.y, (f.y * f.y) * f.y);
+ vec4 rowColors[4];
+ rowColors[0] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(-1.0, -1.0));
+ rowColors[1] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(0.0, -1.0));
+ rowColors[2] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(1.0, -1.0));
+ rowColors[3] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(2.0, -1.0));
+ vec4 s0 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ rowColors[0] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(-1.0, 0.0));
+ rowColors[1] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord);
+ rowColors[2] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(1.0, 0.0));
+ rowColors[3] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(2.0, 0.0));
+ vec4 s1 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ rowColors[0] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(-1.0, 1.0));
+ rowColors[1] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(0.0, 1.0));
+ rowColors[2] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(1.0, 1.0));
+ rowColors[3] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(2.0, 1.0));
+ vec4 s2 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ rowColors[0] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(-1.0, 2.0));
+ rowColors[1] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(0.0, 2.0));
+ rowColors[2] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(1.0, 2.0));
+ rowColors[3] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(2.0, 2.0));
+ vec4 s3 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ vec4 bicubicColor = ((wy.x * s0 + wy.y * s1) + wy.z * s2) + wy.w * s3;
+ bicubicColor = clamp(bicubicColor, 0.0, 1.0);
+ _output = bicubicColor * _input;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = Bicubic_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/250-2.shader_test b/shaders/skia/250-2.shader_test
new file mode 100644
index 0000000..6c887ff
--- /dev/null
+++ b/shaders/skia/250-2.shader_test
@@ -0,0 +1,209 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform float uSurfaceScale_Stage1;
+uniform vec3 uLightColor_Stage1;
+uniform float uKD_Stage1;
+uniform vec4 uTexDom_Stage1;
+uniform vec3 uDecalParams_Stage1;
+uniform vec3 uLightLocation_Stage1;
+uniform float uExponent_Stage1;
+uniform float uCosInnerConeAngle_Stage1;
+uniform float uCosOuterConeAngle_Stage1;
+uniform float uConeScale_Stage1;
+uniform vec3 uS_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 light_Stage1(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ float colorScale = uKD_Stage1 * dot(normal, surfaceToLight);
+ return vec4(lightColor * clamp(colorScale, 0.0, 1.0), 1.0);
+}
+float sobel_Stage1(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage1(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage1(float m[9], float surfaceScale) {
+ return pointToNormal_Stage1(sobel_Stage1(m[0], m[1], m[3], m[4], 0.0, 0.0, 0.66666698455810547), sobel_Stage1(m[0], m[3], m[1], m[4], 0.0, 0.0, 0.66666698455810547), surfaceScale);
+}
+vec3 lightColor_Stage1(vec3 surfaceToLight) {
+ float cosAngle = -dot(surfaceToLight, uS_Stage1);
+ if (cosAngle < uCosOuterConeAngle_Stage1) {
+ return vec3(0.0);
+ }
+ float scale = pow(cosAngle, uExponent_Stage1);
+ if (cosAngle < uCosInnerConeAngle_Stage1) {
+ return ((uLightColor_Stage1 * scale) * (cosAngle - uCosOuterConeAngle_Stage1)) * uConeScale_Stage1;
+ }
+ return uLightColor_Stage1;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ vec2 coord = vTransformedCoords_0_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp0 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp5 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp6 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp7 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp8 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = normalize(uLightLocation_Stage1 - vec3(gl_FragCoord.xy, uSurfaceScale_Stage1 * m[4]));
+ output_Stage1 = light_Stage1(normal_Stage1(m, uSurfaceScale_Stage1), surfaceToLight, lightColor_Stage1(surfaceToLight));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/250-3.shader_test b/shaders/skia/250-3.shader_test
new file mode 100644
index 0000000..34dff02
--- /dev/null
+++ b/shaders/skia/250-3.shader_test
@@ -0,0 +1,146 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+uniform vec2 uImageIncrement_Stage1;
+uniform vec4 uKernel_Stage1[6];
+uniform float uinnerThreshold_Stage2;
+uniform float uouterThreshold_Stage2;
+uniform vec4 ucolor_Stage3;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec4 vinCircleEdge_Stage0;
+noperspective in vec4 vinColor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ vec4 circleEdge;
+ circleEdge = vinCircleEdge_Stage0;
+ float d = length(circleEdge.xy);
+ float distanceToOuterEdge = circleEdge.z * (1.0 - d);
+ float edgeAlpha = clamp(distanceToOuterEdge, 0.0, 1.0);
+ float distanceToInnerEdge = circleEdge.z * (d - circleEdge.w);
+ float innerAlpha = clamp(distanceToInnerEdge, 0.0, 1.0);
+ edgeAlpha *= innerAlpha;
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0 - 11.0 * uImageIncrement_Stage1;
+ vec2 coordSampled = vec2(0.0, 0.0);
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[4].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[4].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[4].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[4].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[5].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[5].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[5].z;
+ coord += uImageIncrement_Stage1;
+ output_Stage1 *= outputCoverage_Stage0;
+ }
+ {
+ vec4 color = output_Stage1;
+ vec4 mask_color = texture(uTextureSampler_0_Stage2, vTransformedCoords_1_Stage0);
+ if (mask_color.w < 0.5) {
+ if (color.w > uouterThreshold_Stage2) {
+ float scale = uouterThreshold_Stage2 / color.w;
+ color.xyz *= scale;
+ color.w = uouterThreshold_Stage2;
+ }
+ } else if (color.w < uinnerThreshold_Stage2) {
+ float scale = uinnerThreshold_Stage2 / max(0.0010000000474974513, color.w);
+ color.xyz *= scale;
+ color.w = uinnerThreshold_Stage2;
+ }
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec4 inCircleEdge;
+noperspective out vec4 vinCircleEdge_Stage0;
+noperspective out vec4 vinColor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vinCircleEdge_Stage0 = inCircleEdge;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/250-4.shader_test b/shaders/skia/250-4.shader_test
new file mode 100644
index 0000000..e82f6a6
--- /dev/null
+++ b/shaders/skia/250-4.shader_test
@@ -0,0 +1,50 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uinnerRect_Stage2;
+uniform vec4 uinvRadiiLTRB_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ vec2 dxy0 = uinnerRect_Stage2.xy - gl_FragCoord.xy;
+ vec2 dxy1 = gl_FragCoord.xy - uinnerRect_Stage2.zw;
+ vec2 dxy = max(max(dxy0, dxy1), 0.0);
+ vec2 Z = max(max(dxy0 * uinvRadiiLTRB_Stage2.xy, dxy1 * uinvRadiiLTRB_Stage2.zw), 0.0);
+ float implicit = dot(Z, dxy) - 1.0;
+ float grad_dot = 4.0 * dot(Z, Z);
+ grad_dot = max(grad_dot, 9.9999997473787516e-05);
+ float approx_dist = implicit * inversesqrt(grad_dot);
+ float alpha = clamp(0.5 - approx_dist, 0.0, 1.0);
+ output_Stage2 = output_Stage1 * alpha;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/250.shader_test b/shaders/skia/250.shader_test
new file mode 100644
index 0000000..0e895a7
--- /dev/null
+++ b/shaders/skia/250.shader_test
@@ -0,0 +1,152 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage2_c1_c0;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.w) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ } else {
+ {
+ if (t < uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = OverrideInputFragmentProcessor_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c1_c0;
+ }
+ return _output;
+}
+vec4 blend_dst_atop(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src + src.w * dst;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 blend_darken(vec4 src, vec4 dst) {
+ vec4 result = blend_src_over(src, dst);
+ result.xyz = min(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
+ return result;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_dst_atop(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_darken(ConstColorProcessor_Stage2_c1_c0(vec4(1.0)), output_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 inColor;
+in vec2 inLocalCoord;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/253-2.shader_test b/shaders/skia/253-2.shader_test
new file mode 100644
index 0000000..82b14e6
--- /dev/null
+++ b/shaders/skia/253-2.shader_test
@@ -0,0 +1,196 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform float uSurfaceScale_Stage1;
+uniform vec3 uLightColor_Stage1;
+uniform float uKS_Stage1;
+uniform float uShininess_Stage1;
+uniform vec4 uTexDom_Stage1;
+uniform vec3 uDecalParams_Stage1;
+uniform vec3 uLightLocation_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 light_Stage1(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ vec3 halfDir = normalize(surfaceToLight + vec3(0.0, 0.0, 1.0));
+ float colorScale = uKS_Stage1 * pow(dot(normal, halfDir), uShininess_Stage1);
+ vec3 color = lightColor * clamp(colorScale, 0.0, 1.0);
+ return vec4(color, max(max(color.x, color.y), color.z));
+}
+float sobel_Stage1(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage1(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage1(float m[9], float surfaceScale) {
+ return pointToNormal_Stage1(sobel_Stage1(0.0, 0.0, m[4], m[5], m[7], m[8], 0.66666698455810547), sobel_Stage1(0.0, 0.0, m[4], m[7], m[5], m[8], 0.66666698455810547), surfaceScale);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ vec2 coord = vTransformedCoords_0_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp0 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp5 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp6 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp7 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp8 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = normalize(uLightLocation_Stage1 - vec3(gl_FragCoord.xy, uSurfaceScale_Stage1 * m[4]));
+ output_Stage1 = light_Stage1(normal_Stage1(m, uSurfaceScale_Stage1), surfaceToLight, uLightColor_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/253-3.shader_test b/shaders/skia/253-3.shader_test
new file mode 100644
index 0000000..a35d85c
--- /dev/null
+++ b/shaders/skia/253-3.shader_test
@@ -0,0 +1,417 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_KHR_blend_equation_advanced : require
+out vec4 sk_FragColor;
+layout (blend_support_all_equations) out ;
+uniform vec4 urectUniform_Stage1;
+uniform vec4 urectUniform_Stage2;
+uniform float uinnerThreshold_Stage3_c0_c0;
+uniform float uouterThreshold_Stage3_c0_c0;
+uniform vec2 uImageIncrement_Stage3_c1_c0;
+uniform vec2 uBounds_Stage3_c1_c0;
+uniform vec4 uKernel_Stage3_c1_c0[6];
+uniform vec2 uScale_Stage4;
+uniform vec4 uTexDom_Stage4;
+uniform vec3 uDecalParams_Stage4;
+uniform vec2 uImageIncrement_Stage5;
+uniform float uSurfaceScale_Stage5;
+uniform vec3 uLightColor_Stage5;
+uniform float uKS_Stage5;
+uniform float uShininess_Stage5;
+uniform vec4 uTexDom_Stage5;
+uniform vec3 uDecalParams_Stage5;
+uniform vec3 uLightLocation_Stage5;
+uniform sampler2D uTextureSampler_0_Stage3;
+uniform sampler2D uTextureSampler_1_Stage3;
+uniform sampler2D uTextureSampler_0_Stage4;
+uniform sampler2D uTextureSampler_1_Stage4;
+uniform sampler2D uTextureSampler_0_Stage5;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+noperspective in vec2 vTransformedCoords_3_Stage0;
+noperspective in vec2 vTransformedCoords_4_Stage0;
+vec4 AlphaThresholdFragmentProcessor_Stage3_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 color = _input;
+ vec4 mask_color = texture(uTextureSampler_0_Stage3, vTransformedCoords_0_Stage0);
+ if (mask_color.w < 0.5) {
+ if (color.w > uouterThreshold_Stage3_c0_c0) {
+ float scale = uouterThreshold_Stage3_c0_c0 / color.w;
+ color.xyz *= scale;
+ color.w = uouterThreshold_Stage3_c0_c0;
+ }
+ } else if (color.w < uinnerThreshold_Stage3_c0_c0) {
+ float scale = uinnerThreshold_Stage3_c0_c0 / max(0.0010000000474974513, color.w);
+ color.xyz *= scale;
+ color.w = uinnerThreshold_Stage3_c0_c0;
+ }
+ _output = color;
+ return _output;
+}
+vec4 GaussianConvolution_Stage3_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_1_Stage0 - 11.0 * uImageIncrement_Stage3_c1_c0;
+ vec2 coordSampled = vec2(0.0, 0.0);
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage3_c1_c0.x, uBounds_Stage3_c1_c0.y - uBounds_Stage3_c1_c0.x) + uBounds_Stage3_c1_c0.x;
+ _output += texture(uTextureSampler_1_Stage3, coordSampled) * uKernel_Stage3_c1_c0[0].x;
+ coord += uImageIncrement_Stage3_c1_c0;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage3_c1_c0.x, uBounds_Stage3_c1_c0.y - uBounds_Stage3_c1_c0.x) + uBounds_Stage3_c1_c0.x;
+ _output += texture(uTextureSampler_1_Stage3, coordSampled) * uKernel_Stage3_c1_c0[0].y;
+ coord += uImageIncrement_Stage3_c1_c0;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage3_c1_c0.x, uBounds_Stage3_c1_c0.y - uBounds_Stage3_c1_c0.x) + uBounds_Stage3_c1_c0.x;
+ _output += texture(uTextureSampler_1_Stage3, coordSampled) * uKernel_Stage3_c1_c0[0].z;
+ coord += uImageIncrement_Stage3_c1_c0;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage3_c1_c0.x, uBounds_Stage3_c1_c0.y - uBounds_Stage3_c1_c0.x) + uBounds_Stage3_c1_c0.x;
+ _output += texture(uTextureSampler_1_Stage3, coordSampled) * uKernel_Stage3_c1_c0[0].w;
+ coord += uImageIncrement_Stage3_c1_c0;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage3_c1_c0.x, uBounds_Stage3_c1_c0.y - uBounds_Stage3_c1_c0.x) + uBounds_Stage3_c1_c0.x;
+ _output += texture(uTextureSampler_1_Stage3, coordSampled) * uKernel_Stage3_c1_c0[1].x;
+ coord += uImageIncrement_Stage3_c1_c0;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage3_c1_c0.x, uBounds_Stage3_c1_c0.y - uBounds_Stage3_c1_c0.x) + uBounds_Stage3_c1_c0.x;
+ _output += texture(uTextureSampler_1_Stage3, coordSampled) * uKernel_Stage3_c1_c0[1].y;
+ coord += uImageIncrement_Stage3_c1_c0;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage3_c1_c0.x, uBounds_Stage3_c1_c0.y - uBounds_Stage3_c1_c0.x) + uBounds_Stage3_c1_c0.x;
+ _output += texture(uTextureSampler_1_Stage3, coordSampled) * uKernel_Stage3_c1_c0[1].z;
+ coord += uImageIncrement_Stage3_c1_c0;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage3_c1_c0.x, uBounds_Stage3_c1_c0.y - uBounds_Stage3_c1_c0.x) + uBounds_Stage3_c1_c0.x;
+ _output += texture(uTextureSampler_1_Stage3, coordSampled) * uKernel_Stage3_c1_c0[1].w;
+ coord += uImageIncrement_Stage3_c1_c0;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage3_c1_c0.x, uBounds_Stage3_c1_c0.y - uBounds_Stage3_c1_c0.x) + uBounds_Stage3_c1_c0.x;
+ _output += texture(uTextureSampler_1_Stage3, coordSampled) * uKernel_Stage3_c1_c0[2].x;
+ coord += uImageIncrement_Stage3_c1_c0;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage3_c1_c0.x, uBounds_Stage3_c1_c0.y - uBounds_Stage3_c1_c0.x) + uBounds_Stage3_c1_c0.x;
+ _output += texture(uTextureSampler_1_Stage3, coordSampled) * uKernel_Stage3_c1_c0[2].y;
+ coord += uImageIncrement_Stage3_c1_c0;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage3_c1_c0.x, uBounds_Stage3_c1_c0.y - uBounds_Stage3_c1_c0.x) + uBounds_Stage3_c1_c0.x;
+ _output += texture(uTextureSampler_1_Stage3, coordSampled) * uKernel_Stage3_c1_c0[2].z;
+ coord += uImageIncrement_Stage3_c1_c0;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage3_c1_c0.x, uBounds_Stage3_c1_c0.y - uBounds_Stage3_c1_c0.x) + uBounds_Stage3_c1_c0.x;
+ _output += texture(uTextureSampler_1_Stage3, coordSampled) * uKernel_Stage3_c1_c0[2].w;
+ coord += uImageIncrement_Stage3_c1_c0;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage3_c1_c0.x, uBounds_Stage3_c1_c0.y - uBounds_Stage3_c1_c0.x) + uBounds_Stage3_c1_c0.x;
+ _output += texture(uTextureSampler_1_Stage3, coordSampled) * uKernel_Stage3_c1_c0[3].x;
+ coord += uImageIncrement_Stage3_c1_c0;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage3_c1_c0.x, uBounds_Stage3_c1_c0.y - uBounds_Stage3_c1_c0.x) + uBounds_Stage3_c1_c0.x;
+ _output += texture(uTextureSampler_1_Stage3, coordSampled) * uKernel_Stage3_c1_c0[3].y;
+ coord += uImageIncrement_Stage3_c1_c0;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage3_c1_c0.x, uBounds_Stage3_c1_c0.y - uBounds_Stage3_c1_c0.x) + uBounds_Stage3_c1_c0.x;
+ _output += texture(uTextureSampler_1_Stage3, coordSampled) * uKernel_Stage3_c1_c0[3].z;
+ coord += uImageIncrement_Stage3_c1_c0;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage3_c1_c0.x, uBounds_Stage3_c1_c0.y - uBounds_Stage3_c1_c0.x) + uBounds_Stage3_c1_c0.x;
+ _output += texture(uTextureSampler_1_Stage3, coordSampled) * uKernel_Stage3_c1_c0[3].w;
+ coord += uImageIncrement_Stage3_c1_c0;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage3_c1_c0.x, uBounds_Stage3_c1_c0.y - uBounds_Stage3_c1_c0.x) + uBounds_Stage3_c1_c0.x;
+ _output += texture(uTextureSampler_1_Stage3, coordSampled) * uKernel_Stage3_c1_c0[4].x;
+ coord += uImageIncrement_Stage3_c1_c0;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage3_c1_c0.x, uBounds_Stage3_c1_c0.y - uBounds_Stage3_c1_c0.x) + uBounds_Stage3_c1_c0.x;
+ _output += texture(uTextureSampler_1_Stage3, coordSampled) * uKernel_Stage3_c1_c0[4].y;
+ coord += uImageIncrement_Stage3_c1_c0;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage3_c1_c0.x, uBounds_Stage3_c1_c0.y - uBounds_Stage3_c1_c0.x) + uBounds_Stage3_c1_c0.x;
+ _output += texture(uTextureSampler_1_Stage3, coordSampled) * uKernel_Stage3_c1_c0[4].z;
+ coord += uImageIncrement_Stage3_c1_c0;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage3_c1_c0.x, uBounds_Stage3_c1_c0.y - uBounds_Stage3_c1_c0.x) + uBounds_Stage3_c1_c0.x;
+ _output += texture(uTextureSampler_1_Stage3, coordSampled) * uKernel_Stage3_c1_c0[4].w;
+ coord += uImageIncrement_Stage3_c1_c0;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage3_c1_c0.x, uBounds_Stage3_c1_c0.y - uBounds_Stage3_c1_c0.x) + uBounds_Stage3_c1_c0.x;
+ _output += texture(uTextureSampler_1_Stage3, coordSampled) * uKernel_Stage3_c1_c0[5].x;
+ coord += uImageIncrement_Stage3_c1_c0;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage3_c1_c0.x, uBounds_Stage3_c1_c0.y - uBounds_Stage3_c1_c0.x) + uBounds_Stage3_c1_c0.x;
+ _output += texture(uTextureSampler_1_Stage3, coordSampled) * uKernel_Stage3_c1_c0[5].y;
+ coord += uImageIncrement_Stage3_c1_c0;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage3_c1_c0.x, uBounds_Stage3_c1_c0.y - uBounds_Stage3_c1_c0.x) + uBounds_Stage3_c1_c0.x;
+ _output += texture(uTextureSampler_1_Stage3, coordSampled) * uKernel_Stage3_c1_c0[5].z;
+ coord += uImageIncrement_Stage3_c1_c0;
+ _output *= _input;
+ return _output;
+}
+vec4 light_Stage5(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ vec3 halfDir = normalize(surfaceToLight + vec3(0.0, 0.0, 1.0));
+ float colorScale = uKS_Stage5 * pow(dot(normal, halfDir), uShininess_Stage5);
+ vec3 color = lightColor * clamp(colorScale, 0.0, 1.0);
+ return vec4(color, max(max(color.x, color.y), color.z));
+}
+float sobel_Stage5(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage5(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage5(float m[9], float surfaceScale) {
+ return pointToNormal_Stage5(sobel_Stage5(0.0, 0.0, m[4], m[5], m[7], m[8], 0.66666698455810547), sobel_Stage5(0.0, 0.0, m[4], m[7], m[5], m[8], 0.66666698455810547), surfaceScale);
+}
+float _blend_overlay_component(float sc, float sa, float dc, float da) {
+ if (2.0 * dc <= da) {
+ return (2.0 * sc) * dc;
+ }
+ return sa * da - (2.0 * (da - dc)) * (sa - sc);
+}
+vec4 blend_overlay(vec4 src, vec4 dst) {
+ vec4 result = vec4(_blend_overlay_component(src.x, src.w, dst.x, dst.w), _blend_overlay_component(src.y, src.w, dst.y, dst.w), _blend_overlay_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+ result.xyz += dst.xyz * (1.0 - src.w) + src.xyz * (1.0 - dst.w);
+ return result;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ float alpha;
+ {
+ float xSub, ySub;
+ xSub = min(gl_FragCoord.x - urectUniform_Stage1.x, 0.0);
+ xSub += min(urectUniform_Stage1.z - gl_FragCoord.x, 0.0);
+ ySub = min(gl_FragCoord.y - urectUniform_Stage1.y, 0.0);
+ ySub += min(urectUniform_Stage1.w - gl_FragCoord.y, 0.0);
+ alpha = (1.0 + max(xSub, -1.0)) * (1.0 + max(ySub, -1.0));
+ }
+ output_Stage1 = vec4(alpha);
+ }
+ vec4 output_Stage2;
+ {
+ float alpha;
+ {
+ float xSub, ySub;
+ xSub = min(gl_FragCoord.x - urectUniform_Stage2.x, 0.0);
+ xSub += min(urectUniform_Stage2.z - gl_FragCoord.x, 0.0);
+ ySub = min(gl_FragCoord.y - urectUniform_Stage2.y, 0.0);
+ ySub += min(urectUniform_Stage2.w - gl_FragCoord.y, 0.0);
+ alpha = (1.0 + max(xSub, -1.0)) * (1.0 + max(ySub, -1.0));
+ }
+ output_Stage2 = output_Stage1 * alpha;
+ }
+ vec4 output_Stage3;
+ {
+ vec4 inputColor = vec4(output_Stage2.xyz, 1.0);
+ output_Stage3 = blend_overlay(AlphaThresholdFragmentProcessor_Stage3_c0_c0(inputColor), GaussianConvolution_Stage3_c1_c0(inputColor));
+ output_Stage3 *= output_Stage2.w;
+ }
+ vec4 output_Stage4;
+ {
+ vec4 dColor = texture(uTextureSampler_0_Stage4, vTransformedCoords_2_Stage0);
+ dColor.xyz = dColor.w < 9.9999999747524271e-07 ? vec3(0.0) : clamp(dColor.xyz / dColor.w, 0.0, 1.0);
+ vec2 cCoords = vTransformedCoords_3_Stage0 + uScale_Stage4 * (dColor.zy - vec2(0.5));
+ {
+ vec2 origCoord = cCoords;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage4.xy, uTexDom_Stage4.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage4, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage4.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage4.y);
+ if (err > uDecalParams_Stage4.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage4.z < 1.0) {
+ err = 0.0;
+ }
+ output_Stage4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ }
+ vec4 output_Stage5;
+ {
+ vec2 coord = vTransformedCoords_4_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage5;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage5.xy, uTexDom_Stage5.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage5, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage5.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage5.y);
+ if (err > uDecalParams_Stage5.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage5.z < 1.0) {
+ err = 0.0;
+ }
+ temp0 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage5;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage5.xy, uTexDom_Stage5.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage5, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage5.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage5.y);
+ if (err > uDecalParams_Stage5.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage5.z < 1.0) {
+ err = 0.0;
+ }
+ temp1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage5;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage5.xy, uTexDom_Stage5.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage5, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage5.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage5.y);
+ if (err > uDecalParams_Stage5.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage5.z < 1.0) {
+ err = 0.0;
+ }
+ temp2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage5;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage5.xy, uTexDom_Stage5.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage5, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage5.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage5.y);
+ if (err > uDecalParams_Stage5.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage5.z < 1.0) {
+ err = 0.0;
+ }
+ temp3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage5.xy, uTexDom_Stage5.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage5, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage5.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage5.y);
+ if (err > uDecalParams_Stage5.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage5.z < 1.0) {
+ err = 0.0;
+ }
+ temp4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage5;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage5.xy, uTexDom_Stage5.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage5, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage5.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage5.y);
+ if (err > uDecalParams_Stage5.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage5.z < 1.0) {
+ err = 0.0;
+ }
+ temp5 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage5;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage5.xy, uTexDom_Stage5.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage5, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage5.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage5.y);
+ if (err > uDecalParams_Stage5.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage5.z < 1.0) {
+ err = 0.0;
+ }
+ temp6 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage5;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage5.xy, uTexDom_Stage5.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage5, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage5.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage5.y);
+ if (err > uDecalParams_Stage5.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage5.z < 1.0) {
+ err = 0.0;
+ }
+ temp7 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage5;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage5.xy, uTexDom_Stage5.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage5, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage5.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage5.y);
+ if (err > uDecalParams_Stage5.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage5.z < 1.0) {
+ err = 0.0;
+ }
+ temp8 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = normalize(uLightLocation_Stage5 - vec3(gl_FragCoord.xy, uSurfaceScale_Stage5 * m[4]));
+ output_Stage5 = light_Stage5(normal_Stage5(m, uSurfaceScale_Stage5), surfaceToLight, uLightColor_Stage5);
+ output_Stage5 *= output_Stage4;
+ }
+ {
+ sk_FragColor = output_Stage5 * outputColor_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+uniform mat3 uCoordTransformMatrix_3_Stage0;
+uniform mat3 uCoordTransformMatrix_4_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+noperspective out vec2 vTransformedCoords_3_Stage0;
+noperspective out vec2 vTransformedCoords_4_Stage0;
+void main() {
+ vec4 color = inColor;
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_3_Stage0 = (uCoordTransformMatrix_3_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_4_Stage0 = (uCoordTransformMatrix_4_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/253-4.shader_test b/shaders/skia/253-4.shader_test
new file mode 100644
index 0000000..a7a34c6
--- /dev/null
+++ b/shaders/skia/253-4.shader_test
@@ -0,0 +1,50 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uinnerRect_Stage2;
+uniform vec4 uinvRadiiLTRB_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ vec2 dxy0 = uinnerRect_Stage2.xy - gl_FragCoord.xy;
+ vec2 dxy1 = gl_FragCoord.xy - uinnerRect_Stage2.zw;
+ vec2 dxy = max(max(dxy0, dxy1), 0.0);
+ vec2 Z = max(max(dxy0 * uinvRadiiLTRB_Stage2.xy, dxy1 * uinvRadiiLTRB_Stage2.zw), 0.0);
+ float implicit = dot(Z, dxy) - 1.0;
+ float grad_dot = 4.0 * dot(Z, Z);
+ grad_dot = max(grad_dot, 9.9999997473787516e-05);
+ float approx_dist = implicit * inversesqrt(grad_dot);
+ float alpha = clamp(0.5 + approx_dist, 0.0, 1.0);
+ output_Stage2 = output_Stage1 * alpha;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/253-5.shader_test b/shaders/skia/253-5.shader_test
new file mode 100644
index 0000000..4c5810a
--- /dev/null
+++ b/shaders/skia/253-5.shader_test
@@ -0,0 +1,64 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 ucircle_Stage2_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 CircleEffect_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ float d;
+ {
+ d = (length((ucircle_Stage2_c0_c0.xy - gl_FragCoord.xy) * ucircle_Stage2_c0_c0.w) - 1.0) * ucircle_Stage2_c0_c0.z;
+ }
+ {
+ _output = d > 0.5 ? _input : vec4(0.0);
+ }
+ return _output;
+}
+vec4 ClampFragmentProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ float alpha = clamp(_input.w, 0.0, 1.0);
+ _output = vec4(clamp(_input.xyz, 0.0, alpha), alpha);
+ }
+ return _output;
+}
+vec4 blend_dst_over(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src + dst;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ vec4 inputColor = vec4(output_Stage1.xyz, 1.0);
+ output_Stage2 = blend_dst_over(CircleEffect_Stage2_c0_c0(inputColor), ClampFragmentProcessor_Stage2_c1_c0(inputColor));
+ output_Stage2 *= output_Stage1.w;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/253.shader_test b/shaders/skia/253.shader_test
new file mode 100644
index 0000000..67709f5
--- /dev/null
+++ b/shaders/skia/253.shader_test
@@ -0,0 +1,81 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 ucolor_Stage1_c0_c0_c0_c0;
+uniform vec4 ucolor_Stage2_c1_c0;
+noperspective in vec4 vcolor_Stage0;
+vec4 ConstColorProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = _input.w * ucolor_Stage1_c0_c0_c0_c0;
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = ConstColorProcessor_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c1_c0;
+ }
+ return _output;
+}
+vec4 blend_dst_atop(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src + src.w * dst;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 blend_darken(vec4 src, vec4 dst) {
+ vec4 result = blend_src_over(src, dst);
+ result.xyz = min(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
+ return result;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_dst_atop(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_darken(ConstColorProcessor_Stage2_c1_c0(vec4(1.0)), output_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 position;
+in vec4 inColor;
+noperspective out vec4 vcolor_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/256-2.shader_test b/shaders/skia/256-2.shader_test
new file mode 100644
index 0000000..306e89f
--- /dev/null
+++ b/shaders/skia/256-2.shader_test
@@ -0,0 +1,196 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform float uSurfaceScale_Stage1;
+uniform vec3 uLightColor_Stage1;
+uniform float uKS_Stage1;
+uniform float uShininess_Stage1;
+uniform vec4 uTexDom_Stage1;
+uniform vec3 uDecalParams_Stage1;
+uniform vec3 uLightLocation_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 light_Stage1(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ vec3 halfDir = normalize(surfaceToLight + vec3(0.0, 0.0, 1.0));
+ float colorScale = uKS_Stage1 * pow(dot(normal, halfDir), uShininess_Stage1);
+ vec3 color = lightColor * clamp(colorScale, 0.0, 1.0);
+ return vec4(color, max(max(color.x, color.y), color.z));
+}
+float sobel_Stage1(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage1(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage1(float m[9], float surfaceScale) {
+ return pointToNormal_Stage1(sobel_Stage1(0.0, 0.0, m[3], m[5], m[6], m[8], 0.33333298563957214), sobel_Stage1(0.0, 0.0, m[4], m[7], m[5], m[8], 0.5), surfaceScale);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ vec2 coord = vTransformedCoords_0_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp0 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp5 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp6 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp7 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp8 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = normalize(uLightLocation_Stage1 - vec3(gl_FragCoord.xy, uSurfaceScale_Stage1 * m[4]));
+ output_Stage1 = light_Stage1(normal_Stage1(m, uSurfaceScale_Stage1), surfaceToLight, uLightColor_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/256-3.shader_test b/shaders/skia/256-3.shader_test
new file mode 100644
index 0000000..da90d0f
--- /dev/null
+++ b/shaders/skia/256-3.shader_test
@@ -0,0 +1,47 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+noperspective in vec2 vEllipseOffsets_Stage0;
+noperspective in vec4 vEllipseRadii_Stage0;
+noperspective in vec4 vinColor_Stage0;
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ vec2 offset = vEllipseOffsets_Stage0;
+ float test = dot(offset, offset) - 1.0;
+ vec2 grad = (2.0 * offset) * vEllipseRadii_Stage0.xy;
+ float grad_dot = dot(grad, grad);
+ grad_dot = max(grad_dot, 1.1754999560161448e-38);
+ float invlen = inversesqrt(grad_dot);
+ float edgeAlpha = clamp(0.5 - test * invlen, 0.0, 1.0);
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ {
+ sk_FragColor = 1.0 - outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 inPosition;
+in vec4 inColor;
+in vec2 inEllipseOffset;
+in vec4 inEllipseRadii;
+noperspective out vec2 vEllipseOffsets_Stage0;
+noperspective out vec4 vEllipseRadii_Stage0;
+noperspective out vec4 vinColor_Stage0;
+void main() {
+ vEllipseOffsets_Stage0 = inEllipseOffset;
+ vEllipseRadii_Stage0 = inEllipseRadii;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = inPosition;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/256-4.shader_test b/shaders/skia/256-4.shader_test
new file mode 100644
index 0000000..36d671d
--- /dev/null
+++ b/shaders/skia/256-4.shader_test
@@ -0,0 +1,50 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uinnerRect_Stage2;
+uniform vec2 uinvRadiiXY_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ vec2 dxy0 = uinnerRect_Stage2.xy - gl_FragCoord.xy;
+ vec2 dxy1 = gl_FragCoord.xy - uinnerRect_Stage2.zw;
+ vec2 dxy = max(max(dxy0, dxy1), 0.0);
+ vec2 Z = dxy * uinvRadiiXY_Stage2;
+ float implicit = dot(Z, dxy) - 1.0;
+ float grad_dot = 4.0 * dot(Z, Z);
+ grad_dot = max(grad_dot, 9.9999997473787516e-05);
+ float approx_dist = implicit * inversesqrt(grad_dot);
+ float alpha = clamp(0.5 + approx_dist, 0.0, 1.0);
+ output_Stage2 = output_Stage1 * alpha;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/256-5.shader_test b/shaders/skia/256-5.shader_test
new file mode 100644
index 0000000..5f4f984
--- /dev/null
+++ b/shaders/skia/256-5.shader_test
@@ -0,0 +1,100 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uboundsUniform_Stage2_c0_c0;
+uniform float uxInvZoom_Stage2_c0_c0;
+uniform float uyInvZoom_Stage2_c0_c0;
+uniform float uxInvInset_Stage2_c0_c0;
+uniform float uyInvInset_Stage2_c0_c0;
+uniform vec2 uoffset_Stage2_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 MagnifierEffect_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coord = vTransformedCoords_1_Stage0;
+ vec2 zoom_coord = uoffset_Stage2_c0_c0 + coord * vec2(uxInvZoom_Stage2_c0_c0, uyInvZoom_Stage2_c0_c0);
+ vec2 delta = (coord - uboundsUniform_Stage2_c0_c0.xy) * uboundsUniform_Stage2_c0_c0.zw;
+ delta = min(delta, vec2(1.0, 1.0) - delta);
+ delta *= vec2(uxInvInset_Stage2_c0_c0, uyInvInset_Stage2_c0_c0);
+ float weight = 0.0;
+ if (delta.x < 2.0 && delta.y < 2.0) {
+ delta = vec2(2.0, 2.0) - delta;
+ float dist = length(delta);
+ dist = max(2.0 - dist, 0.0);
+ weight = min(dist * dist, 1.0);
+ } else {
+ vec2 delta_squared = delta * delta;
+ weight = min(min(delta_squared.x, delta_squared.y), 1.0);
+ }
+ _output = texture(uTextureSampler_0_Stage2, mix(coord, zoom_coord, weight));
+ return _output;
+}
+vec4 ClampFragmentProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ float alpha = clamp(_input.w, 0.0, 1.0);
+ _output = vec4(clamp(_input.xyz, 0.0, alpha), alpha);
+ }
+ return _output;
+}
+float _blend_color_luminance(vec3 color) {
+ return dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), color);
+}
+vec3 _blend_set_color_luminance(vec3 hueSatColor, float alpha, vec3 lumColor) {
+ float lum = _blend_color_luminance(lumColor);
+ vec3 result = (lum - _blend_color_luminance(hueSatColor)) + hueSatColor;
+ float minComp = min(min(result.x, result.y), result.z);
+ float maxComp = max(max(result.x, result.y), result.z);
+ if (minComp < 0.0 && lum != minComp) {
+ result = lum + ((result - lum) * lum) / (lum - minComp);
+ }
+ if (maxComp > alpha && maxComp != lum) {
+ return lum + ((result - lum) * (alpha - lum)) / (maxComp - lum);
+ }
+ return result;
+}
+vec4 blend_color(vec4 src, vec4 dst) {
+ float alpha = dst.w * src.w;
+ vec3 sda = src.xyz * dst.w;
+ vec3 dsa = dst.xyz * src.w;
+ return vec4((((_blend_set_color_luminance(sda, alpha, dsa) + dst.xyz) - dsa) + src.xyz) - sda, (src.w + dst.w) - alpha);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ vec4 inputColor = vec4(output_Stage1.xyz, 1.0);
+ output_Stage2 = blend_color(MagnifierEffect_Stage2_c0_c0(inputColor), ClampFragmentProcessor_Stage2_c1_c0(inputColor));
+ output_Stage2 *= output_Stage1.w;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/256.shader_test b/shaders/skia/256.shader_test
new file mode 100644
index 0000000..e6042b8
--- /dev/null
+++ b/shaders/skia/256.shader_test
@@ -0,0 +1,145 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage2;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.w) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ } else {
+ {
+ if (t < uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+vec4 ComposeOne_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_dst_in(_input, TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0)));
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = ComposeOne_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 blend_dst_atop(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src + src.w * dst;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_dst_atop(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ {
+ output_Stage2 = output_Stage1 * ucolor_Stage2;
+ }
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 inColor;
+in vec2 inLocalCoord;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/259-2.shader_test b/shaders/skia/259-2.shader_test
new file mode 100644
index 0000000..26315ee
--- /dev/null
+++ b/shaders/skia/259-2.shader_test
@@ -0,0 +1,196 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform float uSurfaceScale_Stage1;
+uniform vec3 uLightColor_Stage1;
+uniform float uKS_Stage1;
+uniform float uShininess_Stage1;
+uniform vec4 uTexDom_Stage1;
+uniform vec3 uDecalParams_Stage1;
+uniform vec3 uLightLocation_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 light_Stage1(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ vec3 halfDir = normalize(surfaceToLight + vec3(0.0, 0.0, 1.0));
+ float colorScale = uKS_Stage1 * pow(dot(normal, halfDir), uShininess_Stage1);
+ vec3 color = lightColor * clamp(colorScale, 0.0, 1.0);
+ return vec4(color, max(max(color.x, color.y), color.z));
+}
+float sobel_Stage1(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage1(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage1(float m[9], float surfaceScale) {
+ return pointToNormal_Stage1(sobel_Stage1(0.0, 0.0, m[3], m[4], m[6], m[7], 0.66666698455810547), sobel_Stage1(m[3], m[6], m[4], m[7], 0.0, 0.0, 0.66666698455810547), surfaceScale);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ vec2 coord = vTransformedCoords_0_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp0 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp5 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp6 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp7 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp8 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = normalize(uLightLocation_Stage1 - vec3(gl_FragCoord.xy, uSurfaceScale_Stage1 * m[4]));
+ output_Stage1 = light_Stage1(normal_Stage1(m, uSurfaceScale_Stage1), surfaceToLight, uLightColor_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/259-3.shader_test b/shaders/skia/259-3.shader_test
new file mode 100644
index 0000000..ca4a59c
--- /dev/null
+++ b/shaders/skia/259-3.shader_test
@@ -0,0 +1,51 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_KHR_blend_equation_advanced : require
+out vec4 sk_FragColor;
+layout (blend_support_all_equations) out ;
+noperspective in vec2 vEllipseOffsets_Stage0;
+noperspective in vec4 vEllipseRadii_Stage0;
+noperspective in vec4 vinColor_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vinColor_Stage0;
+ vec2 offset = vEllipseOffsets_Stage0;
+ float test = dot(offset, offset) - 1.0;
+ vec2 grad = (2.0 * offset) * vEllipseRadii_Stage0.xy;
+ float grad_dot = dot(grad, grad);
+ grad_dot = max(grad_dot, 1.1754999560161448e-38);
+ float invlen = inversesqrt(grad_dot);
+ float edgeAlpha = clamp(0.5 - test * invlen, 0.0, 1.0);
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ {
+ sk_FragColor = outputCoverage_Stage0 * outputColor_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 inPosition;
+in vec4 inColor;
+in vec2 inEllipseOffset;
+in vec4 inEllipseRadii;
+noperspective out vec2 vEllipseOffsets_Stage0;
+noperspective out vec4 vEllipseRadii_Stage0;
+noperspective out vec4 vinColor_Stage0;
+void main() {
+ vEllipseOffsets_Stage0 = inEllipseOffset;
+ vEllipseRadii_Stage0 = inEllipseRadii;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = inPosition;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/259-4.shader_test b/shaders/skia/259-4.shader_test
new file mode 100644
index 0000000..13c50f7
--- /dev/null
+++ b/shaders/skia/259-4.shader_test
@@ -0,0 +1,52 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uk_Stage2;
+uniform vec4 ucolor_Stage2_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 ConstColorProcessor_Stage2_c0_c0(vec4 _input, vec2 _coords) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c0_c0;
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ vec4 dst = ConstColorProcessor_Stage2_c0_c0(vec4(1.0), vTransformedCoords_1_Stage0);
+ output_Stage2 = clamp((((uk_Stage2.x * output_Stage2) * dst + uk_Stage2.y * output_Stage2) + uk_Stage2.z * dst) + uk_Stage2.w, 0.0, 1.0);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/259-5.shader_test b/shaders/skia/259-5.shader_test
new file mode 100644
index 0000000..3d2696e
--- /dev/null
+++ b/shaders/skia/259-5.shader_test
@@ -0,0 +1,219 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage2_c0_c0;
+uniform float uSurfaceScale_Stage2_c0_c0;
+uniform vec3 uLightColor_Stage2_c0_c0;
+uniform float uKD_Stage2_c0_c0;
+uniform vec4 uTexDom_Stage2_c0_c0;
+uniform vec3 uDecalParams_Stage2_c0_c0;
+uniform vec3 uLightDirection_Stage2_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 light_Stage2_c0_c0(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ float colorScale = uKD_Stage2_c0_c0 * dot(normal, surfaceToLight);
+ return vec4(lightColor * clamp(colorScale, 0.0, 1.0), 1.0);
+}
+float sobel_Stage2_c0_c0(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage2_c0_c0(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage2_c0_c0(float m[9], float surfaceScale) {
+ return pointToNormal_Stage2_c0_c0(sobel_Stage2_c0_c0(0.0, 0.0, m[3], m[5], m[6], m[8], 0.33333298563957214), sobel_Stage2_c0_c0(0.0, 0.0, m[4], m[7], m[5], m[8], 0.5), surfaceScale);
+}
+vec4 DiffuseLighting_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coord = vTransformedCoords_1_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c0_c0.y);
+ if (err > uDecalParams_Stage2_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp0 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c0_c0.y);
+ if (err > uDecalParams_Stage2_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c0_c0.y);
+ if (err > uDecalParams_Stage2_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c0_c0.y);
+ if (err > uDecalParams_Stage2_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c0_c0.y);
+ if (err > uDecalParams_Stage2_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c0_c0.y);
+ if (err > uDecalParams_Stage2_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp5 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c0_c0.y);
+ if (err > uDecalParams_Stage2_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp6 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c0_c0.y);
+ if (err > uDecalParams_Stage2_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp7 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c0_c0.y);
+ if (err > uDecalParams_Stage2_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp8 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = uLightDirection_Stage2_c0_c0;
+ _output = light_Stage2_c0_c0(normal_Stage2_c0_c0(m, uSurfaceScale_Stage2_c0_c0), surfaceToLight, uLightColor_Stage2_c0_c0);
+ _output *= _input;
+ return _output;
+}
+vec4 ClampFragmentProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ float alpha = clamp(_input.w, 0.0, 1.0);
+ _output = vec4(clamp(_input.xyz, 0.0, alpha), alpha);
+ }
+ return _output;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ vec4 inputColor = vec4(output_Stage1.xyz, 1.0);
+ output_Stage2 = blend_src_over(DiffuseLighting_Stage2_c0_c0(inputColor), ClampFragmentProcessor_Stage2_c1_c0(inputColor));
+ output_Stage2 *= output_Stage1.w;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/259.shader_test b/shaders/skia/259.shader_test
new file mode 100644
index 0000000..791d473
--- /dev/null
+++ b/shaders/skia/259.shader_test
@@ -0,0 +1,68 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 ucolor_Stage1_c0_c0_c0_c0;
+uniform vec4 ucolor_Stage2;
+noperspective in vec4 vcolor_Stage0;
+vec4 ConstColorProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = _input.w * ucolor_Stage1_c0_c0_c0_c0;
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = ConstColorProcessor_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 blend_dst_atop(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src + src.w * dst;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_dst_atop(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ {
+ output_Stage2 = output_Stage1 * ucolor_Stage2;
+ }
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 position;
+in vec4 inColor;
+noperspective out vec4 vcolor_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/262-2.shader_test b/shaders/skia/262-2.shader_test
new file mode 100644
index 0000000..8f21e4c
--- /dev/null
+++ b/shaders/skia/262-2.shader_test
@@ -0,0 +1,196 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform float uSurfaceScale_Stage1;
+uniform vec3 uLightColor_Stage1;
+uniform float uKS_Stage1;
+uniform float uShininess_Stage1;
+uniform vec4 uTexDom_Stage1;
+uniform vec3 uDecalParams_Stage1;
+uniform vec3 uLightLocation_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 light_Stage1(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ vec3 halfDir = normalize(surfaceToLight + vec3(0.0, 0.0, 1.0));
+ float colorScale = uKS_Stage1 * pow(dot(normal, halfDir), uShininess_Stage1);
+ vec3 color = lightColor * clamp(colorScale, 0.0, 1.0);
+ return vec4(color, max(max(color.x, color.y), color.z));
+}
+float sobel_Stage1(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage1(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage1(float m[9], float surfaceScale) {
+ return pointToNormal_Stage1(sobel_Stage1(m[1], m[2], m[4], m[5], m[7], m[8], 0.5), sobel_Stage1(0.0, 0.0, m[1], m[7], m[2], m[8], 0.33333298563957214), surfaceScale);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ vec2 coord = vTransformedCoords_0_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp0 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp5 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp6 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp7 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp8 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = normalize(uLightLocation_Stage1 - vec3(gl_FragCoord.xy, uSurfaceScale_Stage1 * m[4]));
+ output_Stage1 = light_Stage1(normal_Stage1(m, uSurfaceScale_Stage1), surfaceToLight, uLightColor_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/262-3.shader_test b/shaders/skia/262-3.shader_test
new file mode 100644
index 0000000..d5321b0
--- /dev/null
+++ b/shaders/skia/262-3.shader_test
@@ -0,0 +1,30 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uColor_Stage0;
+void main() {
+ {
+ sk_FragColor = vec4(1.0);
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 inPosition;
+void main() {
+ vec3 pos3 = uViewM_Stage0 * vec3(inPosition, 1.0);
+ {
+ vec2 _posTmp = vec2(pos3.x / pos3.z, pos3.y / pos3.z);
+ _posTmp = floor(_posTmp) + vec2(0.5, 0.5);
+ gl_Position = vec4(_posTmp, 0.0, 1.0);
+ }
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/262-4.shader_test b/shaders/skia/262-4.shader_test
new file mode 100644
index 0000000..eb77f26
--- /dev/null
+++ b/shaders/skia/262-4.shader_test
@@ -0,0 +1,61 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 ucolor0_Stage2;
+uniform vec4 ucolor1_Stage2;
+uniform vec4 ucolor2_Stage2;
+uniform vec4 ucolor3_Stage2;
+uniform vec4 ucolor4_Stage2;
+uniform vec4 ucolor5_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ float alpha = 255.0 * output_Stage2.w;
+ if (alpha < 0.5) {
+ output_Stage2 = ucolor0_Stage2;
+ } else if (alpha < 1.5) {
+ output_Stage2 = ucolor1_Stage2;
+ } else if (alpha < 2.5) {
+ output_Stage2 = ucolor2_Stage2;
+ } else if (alpha < 3.5) {
+ output_Stage2 = ucolor3_Stage2;
+ } else if (alpha < 4.5) {
+ output_Stage2 = ucolor4_Stage2;
+ } else {
+ output_Stage2 = ucolor5_Stage2;
+ }
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/262.shader_test b/shaders/skia/262.shader_test
new file mode 100644
index 0000000..1e6bc26
--- /dev/null
+++ b/shaders/skia/262.shader_test
@@ -0,0 +1,165 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage2;
+uniform vec4 ucolor_Stage3_c1_c0;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.w) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ } else {
+ {
+ if (t < uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+vec4 ComposeOne_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_dst_in(_input, TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0)));
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = ComposeOne_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 ConstColorProcessor_Stage3_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage3_c1_c0;
+ }
+ return _output;
+}
+vec4 blend_dst_atop(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src + src.w * dst;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 blend_darken(vec4 src, vec4 dst) {
+ vec4 result = blend_src_over(src, dst);
+ result.xyz = min(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
+ return result;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_dst_atop(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ {
+ output_Stage2 = output_Stage1 * ucolor_Stage2;
+ }
+ }
+ vec4 output_Stage3;
+ {
+ output_Stage3 = blend_darken(ConstColorProcessor_Stage3_c1_c0(vec4(1.0)), output_Stage2);
+ }
+ {
+ sk_FragColor = output_Stage3;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 inColor;
+in vec2 inLocalCoord;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/265-2.shader_test b/shaders/skia/265-2.shader_test
new file mode 100644
index 0000000..c7b2796
--- /dev/null
+++ b/shaders/skia/265-2.shader_test
@@ -0,0 +1,196 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform float uSurfaceScale_Stage1;
+uniform vec3 uLightColor_Stage1;
+uniform float uKS_Stage1;
+uniform float uShininess_Stage1;
+uniform vec4 uTexDom_Stage1;
+uniform vec3 uDecalParams_Stage1;
+uniform vec3 uLightLocation_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 light_Stage1(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ vec3 halfDir = normalize(surfaceToLight + vec3(0.0, 0.0, 1.0));
+ float colorScale = uKS_Stage1 * pow(dot(normal, halfDir), uShininess_Stage1);
+ vec3 color = lightColor * clamp(colorScale, 0.0, 1.0);
+ return vec4(color, max(max(color.x, color.y), color.z));
+}
+float sobel_Stage1(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage1(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage1(float m[9], float surfaceScale) {
+ return pointToNormal_Stage1(sobel_Stage1(m[0], m[2], m[3], m[5], m[6], m[8], 0.25), sobel_Stage1(m[0], m[6], m[1], m[7], m[2], m[8], 0.25), surfaceScale);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ vec2 coord = vTransformedCoords_0_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp0 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp5 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp6 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp7 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp8 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = normalize(uLightLocation_Stage1 - vec3(gl_FragCoord.xy, uSurfaceScale_Stage1 * m[4]));
+ output_Stage1 = light_Stage1(normal_Stage1(m, uSurfaceScale_Stage1), surfaceToLight, uLightColor_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/265-3.shader_test b/shaders/skia/265-3.shader_test
new file mode 100644
index 0000000..8d3fddc
--- /dev/null
+++ b/shaders/skia/265-3.shader_test
@@ -0,0 +1,27 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+flat in vec4 vcolor_Stage0;
+void main() {
+ {
+ sk_FragColor = vec4(1.0);
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 position;
+in vec4 color;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/265-4.shader_test b/shaders/skia/265-4.shader_test
new file mode 100644
index 0000000..114e4cc
--- /dev/null
+++ b/shaders/skia/265-4.shader_test
@@ -0,0 +1,49 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_1_Stage0.x);
+ uint y = uint(vTransformedCoords_1_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ output_Stage2 = vec4(clamp(output_Stage2.xyz + value * 0.066666670143604279, 0.0, output_Stage2.w), output_Stage2.w);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/265.shader_test b/shaders/skia/265.shader_test
new file mode 100644
index 0000000..6dabe8d
--- /dev/null
+++ b/shaders/skia/265.shader_test
@@ -0,0 +1,88 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 ucolor_Stage1_c0_c0_c0_c0;
+uniform vec4 ucolor_Stage2;
+uniform vec4 ucolor_Stage3_c1_c0;
+noperspective in vec4 vcolor_Stage0;
+vec4 ConstColorProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = _input.w * ucolor_Stage1_c0_c0_c0_c0;
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = ConstColorProcessor_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 ConstColorProcessor_Stage3_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage3_c1_c0;
+ }
+ return _output;
+}
+vec4 blend_dst_atop(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src + src.w * dst;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 blend_darken(vec4 src, vec4 dst) {
+ vec4 result = blend_src_over(src, dst);
+ result.xyz = min(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
+ return result;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_dst_atop(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ {
+ output_Stage2 = output_Stage1 * ucolor_Stage2;
+ }
+ }
+ vec4 output_Stage3;
+ {
+ output_Stage3 = blend_darken(ConstColorProcessor_Stage3_c1_c0(vec4(1.0)), output_Stage2);
+ }
+ {
+ sk_FragColor = output_Stage3;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 position;
+in vec4 inColor;
+noperspective out vec4 vcolor_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/268-2.shader_test b/shaders/skia/268-2.shader_test
new file mode 100644
index 0000000..e05fbd5
--- /dev/null
+++ b/shaders/skia/268-2.shader_test
@@ -0,0 +1,196 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform float uSurfaceScale_Stage1;
+uniform vec3 uLightColor_Stage1;
+uniform float uKS_Stage1;
+uniform float uShininess_Stage1;
+uniform vec4 uTexDom_Stage1;
+uniform vec3 uDecalParams_Stage1;
+uniform vec3 uLightLocation_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 light_Stage1(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ vec3 halfDir = normalize(surfaceToLight + vec3(0.0, 0.0, 1.0));
+ float colorScale = uKS_Stage1 * pow(dot(normal, halfDir), uShininess_Stage1);
+ vec3 color = lightColor * clamp(colorScale, 0.0, 1.0);
+ return vec4(color, max(max(color.x, color.y), color.z));
+}
+float sobel_Stage1(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage1(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage1(float m[9], float surfaceScale) {
+ return pointToNormal_Stage1(sobel_Stage1(m[0], m[1], m[3], m[4], m[6], m[7], 0.5), sobel_Stage1(m[0], m[6], m[1], m[7], 0.0, 0.0, 0.33333298563957214), surfaceScale);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ vec2 coord = vTransformedCoords_0_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp0 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp5 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp6 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp7 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp8 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = normalize(uLightLocation_Stage1 - vec3(gl_FragCoord.xy, uSurfaceScale_Stage1 * m[4]));
+ output_Stage1 = light_Stage1(normal_Stage1(m, uSurfaceScale_Stage1), surfaceToLight, uLightColor_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/268-4.shader_test b/shaders/skia/268-4.shader_test
new file mode 100644
index 0000000..fde36a5
--- /dev/null
+++ b/shaders/skia/268-4.shader_test
@@ -0,0 +1,49 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_1_Stage0.x);
+ uint y = uint(vTransformedCoords_1_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ output_Stage2 = vec4(clamp(output_Stage2.xyz + value * 0.01587301678955555, 0.0, output_Stage2.w), output_Stage2.w);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/268-5.shader_test b/shaders/skia/268-5.shader_test
new file mode 100644
index 0000000..db2e7c1
--- /dev/null
+++ b/shaders/skia/268-5.shader_test
@@ -0,0 +1,103 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 ClampFragmentProcessor_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = clamp(_input, 0.0, 1.0);
+ }
+ return _output;
+}
+vec4 ClampFragmentProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = clamp(_input, 0.0, 1.0);
+ }
+ return _output;
+}
+float _blend_color_saturation(vec3 color) {
+ return max(max(color.x, color.y), color.z) - min(min(color.x, color.y), color.z);
+}
+vec3 _blend_set_color_saturation_helper(vec3 minMidMax, float sat) {
+ if (minMidMax.x < minMidMax.z) {
+ return vec3(0.0, (sat * (minMidMax.y - minMidMax.x)) / (minMidMax.z - minMidMax.x), sat);
+ }
+ return vec3(0.0);
+}
+vec3 _blend_set_color_saturation(vec3 hueLumColor, vec3 satColor) {
+ float sat = _blend_color_saturation(satColor);
+ if (hueLumColor.x <= hueLumColor.y) {
+ if (hueLumColor.y <= hueLumColor.z) {
+ hueLumColor.xyz = _blend_set_color_saturation_helper(hueLumColor, sat);
+ } else if (hueLumColor.x <= hueLumColor.z) {
+ hueLumColor.xzy = _blend_set_color_saturation_helper(hueLumColor.xzy, sat);
+ } else {
+ hueLumColor.zxy = _blend_set_color_saturation_helper(hueLumColor.zxy, sat);
+ }
+ } else if (hueLumColor.x <= hueLumColor.z) {
+ hueLumColor.yxz = _blend_set_color_saturation_helper(hueLumColor.yxz, sat);
+ } else if (hueLumColor.y <= hueLumColor.z) {
+ hueLumColor.yzx = _blend_set_color_saturation_helper(hueLumColor.yzx, sat);
+ } else {
+ hueLumColor.zyx = _blend_set_color_saturation_helper(hueLumColor.zyx, sat);
+ }
+ return hueLumColor;
+}
+float _blend_color_luminance(vec3 color) {
+ return dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), color);
+}
+vec3 _blend_set_color_luminance(vec3 hueSatColor, float alpha, vec3 lumColor) {
+ float lum = _blend_color_luminance(lumColor);
+ vec3 result = (lum - _blend_color_luminance(hueSatColor)) + hueSatColor;
+ float minComp = min(min(result.x, result.y), result.z);
+ float maxComp = max(max(result.x, result.y), result.z);
+ if (minComp < 0.0 && lum != minComp) {
+ result = lum + ((result - lum) * lum) / (lum - minComp);
+ }
+ if (maxComp > alpha && maxComp != lum) {
+ return lum + ((result - lum) * (alpha - lum)) / (maxComp - lum);
+ }
+ return result;
+}
+vec4 blend_saturation(vec4 src, vec4 dst) {
+ float alpha = dst.w * src.w;
+ vec3 sda = src.xyz * dst.w;
+ vec3 dsa = dst.xyz * src.w;
+ return vec4((((_blend_set_color_luminance(_blend_set_color_saturation(dsa, sda), alpha, dsa) + dst.xyz) - dsa) + src.xyz) - sda, (src.w + dst.w) - alpha);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ vec4 inputColor = vec4(output_Stage1.xyz, 1.0);
+ output_Stage2 = blend_saturation(ClampFragmentProcessor_Stage2_c0_c0(inputColor), ClampFragmentProcessor_Stage2_c1_c0(inputColor));
+ output_Stage2 *= output_Stage1.w;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/268.shader_test b/shaders/skia/268.shader_test
new file mode 100644
index 0000000..db13e09
--- /dev/null
+++ b/shaders/skia/268.shader_test
@@ -0,0 +1,132 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.w) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ } else {
+ {
+ if (t < uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = OverrideInputFragmentProcessor_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 blend_xor(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src + (1.0 - src.w) * dst;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_xor(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 inColor;
+in vec2 inLocalCoord;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/271-2.shader_test b/shaders/skia/271-2.shader_test
new file mode 100644
index 0000000..99edb9a
--- /dev/null
+++ b/shaders/skia/271-2.shader_test
@@ -0,0 +1,196 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform float uSurfaceScale_Stage1;
+uniform vec3 uLightColor_Stage1;
+uniform float uKS_Stage1;
+uniform float uShininess_Stage1;
+uniform vec4 uTexDom_Stage1;
+uniform vec3 uDecalParams_Stage1;
+uniform vec3 uLightLocation_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 light_Stage1(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ vec3 halfDir = normalize(surfaceToLight + vec3(0.0, 0.0, 1.0));
+ float colorScale = uKS_Stage1 * pow(dot(normal, halfDir), uShininess_Stage1);
+ vec3 color = lightColor * clamp(colorScale, 0.0, 1.0);
+ return vec4(color, max(max(color.x, color.y), color.z));
+}
+float sobel_Stage1(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage1(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage1(float m[9], float surfaceScale) {
+ return pointToNormal_Stage1(sobel_Stage1(m[1], m[2], m[4], m[5], 0.0, 0.0, 0.66666698455810547), sobel_Stage1(0.0, 0.0, m[1], m[4], m[2], m[5], 0.66666698455810547), surfaceScale);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ vec2 coord = vTransformedCoords_0_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp0 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp5 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp6 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp7 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp8 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = normalize(uLightLocation_Stage1 - vec3(gl_FragCoord.xy, uSurfaceScale_Stage1 * m[4]));
+ output_Stage1 = light_Stage1(normal_Stage1(m, uSurfaceScale_Stage1), surfaceToLight, uLightColor_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/271-3.shader_test b/shaders/skia/271-3.shader_test
new file mode 100644
index 0000000..856d608
--- /dev/null
+++ b/shaders/skia/271-3.shader_test
@@ -0,0 +1,157 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 ubaseFrequency_Stage1_c0_c0;
+uniform vec4 uleftBorderColor_Stage2_c1_c0;
+uniform vec4 urightBorderColor_Stage2_c1_c0;
+uniform float ubias_Stage2_c1_c0_c0_c0;
+uniform float uscale_Stage2_c1_c0_c0_c0;
+uniform vec4 uscale01_Stage2_c1_c0_c1_c0;
+uniform vec4 ubias01_Stage2_c1_c0_c1_c0;
+uniform vec4 uscale23_Stage2_c1_c0_c1_c0;
+uniform vec4 ubias23_Stage2_c1_c0_c1_c0;
+uniform float uthreshold_Stage2_c1_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in float vinCoverage_Stage0;
+float perlinnoise_Stage1_c0_c0(float chanCoord, vec2 noiseVec) {
+ vec4 floorVal;
+ floorVal.xy = floor(noiseVec);
+ floorVal.zw = floorVal.xy + vec2(1.0);
+ vec2 fractVal = fract(noiseVec);
+ vec2 noiseSmooth = (fractVal * fractVal) * (vec2(3.0) - vec2(2.0) * fractVal);
+ floorVal = fract(floor(mod(floorVal, 256.0)) / vec4(256.0));
+ vec2 latticeIdx;
+ latticeIdx.x = texture(uTextureSampler_0_Stage1, vec2(floorVal.x, 0.5)).x;
+ latticeIdx.y = texture(uTextureSampler_0_Stage1, vec2(floorVal.z, 0.5)).x;
+ vec4 bcoords = fract(latticeIdx.xyxy + floorVal.yyww);
+ vec2 uv;
+ vec4 lattice = texture(uTextureSampler_1_Stage1, vec2(bcoords.x, chanCoord)).zyxw;
+ uv.x = dot((lattice.yw + lattice.xz * vec2(0.00390625)) * vec2(2.0) - vec2(1.0), fractVal);
+ fractVal.x -= 1.0;
+ lattice = texture(uTextureSampler_1_Stage1, vec2(bcoords.y, chanCoord)).zyxw;
+ uv.y = dot((lattice.yw + lattice.xz * vec2(0.00390625)) * vec2(2.0) - vec2(1.0), fractVal);
+ vec2 ab;
+ ab.x = mix(uv.x, uv.y, noiseSmooth.x);
+ fractVal.y -= 1.0;
+ lattice = texture(uTextureSampler_1_Stage1, vec2(bcoords.w, chanCoord)).zyxw;
+ uv.y = dot((lattice.yw + lattice.xz * vec2(0.00390625)) * vec2(2.0) - vec2(1.0), fractVal);
+ fractVal.x += 1.0;
+ lattice = texture(uTextureSampler_1_Stage1, vec2(bcoords.z, chanCoord)).zyxw;
+ uv.x = dot((lattice.yw + lattice.xz * vec2(0.00390625)) * vec2(2.0) - vec2(1.0), fractVal);
+ ab.y = mix(uv.x, uv.y, noiseSmooth.x);
+ return mix(ab.x, ab.y, noiseSmooth.y);
+}
+vec4 PerlinNoise_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 noiseVec = floor(vTransformedCoords_0_Stage0) * ubaseFrequency_Stage1_c0_c0;
+ _output = vec4(0.0);
+ float ratio = 1.0;
+ for (int octave = 0;octave < 6; ++octave) {
+ _output += vec4(perlinnoise_Stage1_c0_c0(0.125, noiseVec), perlinnoise_Stage1_c0_c0(0.375, noiseVec), perlinnoise_Stage1_c0_c0(0.625, noiseVec), perlinnoise_Stage1_c0_c0(0.875, noiseVec)) * ratio;
+ noiseVec *= vec2(2.0);
+ ratio *= 0.5;
+ }
+ _output = _output * vec4(0.5) + vec4(0.5);
+ _output = clamp(_output, 0.0, 1.0);
+ _output = vec4(_output.xyz * _output.www, _output.w);
+ return _output;
+}
+vec4 SweepGradientLayout_Stage2_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float angle;
+ {
+ angle = atan(-vTransformedCoords_1_Stage0.y, -vTransformedCoords_1_Stage0.x);
+ }
+ float t = ((angle * 0.15915493667125702 + 0.5) + ubias_Stage2_c1_c0_c0_c0) * uscale_Stage2_c1_c0_c0_c0;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 DualIntervalGradientColorizer_Stage2_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthreshold_Stage2_c1_c0_c1_c0) {
+ scale = uscale01_Stage2_c1_c0_c1_c0;
+ bias = ubias01_Stage2_c1_c0_c1_c0;
+ } else {
+ scale = uscale23_Stage2_c1_c0_c1_c0;
+ bias = ubias23_Stage2_c1_c0_c1_c0;
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = SweepGradientLayout_Stage2_c1_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage2_c1_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage2_c1_c0;
+ } else {
+ _output = DualIntervalGradientColorizer_Stage2_c1_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ float alpha = 1.0;
+ alpha = vinCoverage_Stage0;
+ outputCoverage_Stage0 = vec4(alpha);
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_dst_in(outputColor_Stage0, PerlinNoise_Stage1_c0_c0(vec4(1.0)));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_dst_in(outputCoverage_Stage0, ClampedGradientEffect_Stage2_c1_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = (vec4(1.0) - output_Stage1) * output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in float inCoverage;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out float vinCoverage_Stage0;
+void main() {
+ vec4 color = inColor;
+ vcolor_Stage0 = color;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(inPosition, 1.0)).xy;
+ vinCoverage_Stage0 = inCoverage;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/271-4.shader_test b/shaders/skia/271-4.shader_test
new file mode 100644
index 0000000..53cddee
--- /dev/null
+++ b/shaders/skia/271-4.shader_test
@@ -0,0 +1,55 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uk_Stage2;
+uniform vec4 ucolor_Stage2_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 ConstColorProcessor_Stage2_c0_c0(vec4 _input, vec2 _coords) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c0_c0;
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ vec4 dst = ConstColorProcessor_Stage2_c0_c0(vec4(1.0), vTransformedCoords_1_Stage0);
+ output_Stage2 = clamp((((uk_Stage2.x * output_Stage2) * dst + uk_Stage2.y * output_Stage2) + uk_Stage2.z * dst) + uk_Stage2.w, 0.0, 1.0);
+ {
+ output_Stage2.xyz = min(output_Stage2.xyz, output_Stage2.w);
+ }
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/271-5.shader_test b/shaders/skia/271-5.shader_test
new file mode 100644
index 0000000..c9b7431
--- /dev/null
+++ b/shaders/skia/271-5.shader_test
@@ -0,0 +1,103 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage2_c0_c0;
+uniform vec4 uKernel_Stage2_c0_c0[2];
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 GaussianConvolution_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_1_Stage0 - 3.0 * uImageIncrement_Stage2_c0_c0;
+ vec2 coordSampled = vec2(0.0, 0.0);
+ coordSampled = coord;
+ _output += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2_c0_c0[0].x;
+ coord += uImageIncrement_Stage2_c0_c0;
+ coordSampled = coord;
+ _output += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2_c0_c0[0].y;
+ coord += uImageIncrement_Stage2_c0_c0;
+ coordSampled = coord;
+ _output += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2_c0_c0[0].z;
+ coord += uImageIncrement_Stage2_c0_c0;
+ coordSampled = coord;
+ _output += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2_c0_c0[0].w;
+ coord += uImageIncrement_Stage2_c0_c0;
+ coordSampled = coord;
+ _output += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2_c0_c0[1].x;
+ coord += uImageIncrement_Stage2_c0_c0;
+ coordSampled = coord;
+ _output += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2_c0_c0[1].y;
+ coord += uImageIncrement_Stage2_c0_c0;
+ coordSampled = coord;
+ _output += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2_c0_c0[1].z;
+ coord += uImageIncrement_Stage2_c0_c0;
+ _output *= _input;
+ return _output;
+}
+vec4 ClampFragmentProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = clamp(_input, 0.0, 1.0);
+ }
+ return _output;
+}
+float _guarded_divide(float n, float d) {
+ return n / d;
+}
+float _soft_light_component(float sc, float sa, float dc, float da) {
+ if (2.0 * sc <= sa) {
+ return (_guarded_divide((dc * dc) * (sa - 2.0 * sc), da) + (1.0 - da) * sc) + dc * ((-sa + 2.0 * sc) + 1.0);
+ } else if (4.0 * dc <= da) {
+ float DSqd = dc * dc;
+ float DCub = DSqd * dc;
+ float DaSqd = da * da;
+ float DaCub = DaSqd * da;
+ return _guarded_divide(((DaSqd * (sc - dc * ((3.0 * sa - 6.0 * sc) - 1.0)) + ((12.0 * da) * DSqd) * (sa - 2.0 * sc)) - (16.0 * DCub) * (sa - 2.0 * sc)) - DaCub * sc, DaSqd);
+ }
+ return ((dc * ((sa - 2.0 * sc) + 1.0) + sc) - sqrt(da * dc) * (sa - 2.0 * sc)) - da * sc;
+}
+vec4 blend_soft_light(vec4 src, vec4 dst) {
+ if (dst.w == 0.0) {
+ return src;
+ }
+ return vec4(_soft_light_component(src.x, src.w, dst.x, dst.w), _soft_light_component(src.y, src.w, dst.y, dst.w), _soft_light_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ vec4 inputColor = vec4(output_Stage1.xyz, 1.0);
+ output_Stage2 = blend_soft_light(GaussianConvolution_Stage2_c0_c0(inputColor), ClampFragmentProcessor_Stage2_c1_c0(inputColor));
+ output_Stage2 *= output_Stage1.w;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/271.shader_test b/shaders/skia/271.shader_test
new file mode 100644
index 0000000..0bacfcd
--- /dev/null
+++ b/shaders/skia/271.shader_test
@@ -0,0 +1,61 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 ucolor_Stage1_c0_c0_c0_c0;
+noperspective in vec4 vcolor_Stage0;
+vec4 ConstColorProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = _input.w * ucolor_Stage1_c0_c0_c0_c0;
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = ConstColorProcessor_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 blend_xor(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src + (1.0 - src.w) * dst;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_xor(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 position;
+in vec4 inColor;
+noperspective out vec4 vcolor_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/274-2.shader_test b/shaders/skia/274-2.shader_test
new file mode 100644
index 0000000..48f7d78
--- /dev/null
+++ b/shaders/skia/274-2.shader_test
@@ -0,0 +1,196 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform float uSurfaceScale_Stage1;
+uniform vec3 uLightColor_Stage1;
+uniform float uKS_Stage1;
+uniform float uShininess_Stage1;
+uniform vec4 uTexDom_Stage1;
+uniform vec3 uDecalParams_Stage1;
+uniform vec3 uLightLocation_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 light_Stage1(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ vec3 halfDir = normalize(surfaceToLight + vec3(0.0, 0.0, 1.0));
+ float colorScale = uKS_Stage1 * pow(dot(normal, halfDir), uShininess_Stage1);
+ vec3 color = lightColor * clamp(colorScale, 0.0, 1.0);
+ return vec4(color, max(max(color.x, color.y), color.z));
+}
+float sobel_Stage1(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage1(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage1(float m[9], float surfaceScale) {
+ return pointToNormal_Stage1(sobel_Stage1(m[0], m[2], m[3], m[5], 0.0, 0.0, 0.33333298563957214), sobel_Stage1(m[0], m[3], m[1], m[4], m[2], m[5], 0.5), surfaceScale);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ vec2 coord = vTransformedCoords_0_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp0 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp5 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp6 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp7 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp8 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = normalize(uLightLocation_Stage1 - vec3(gl_FragCoord.xy, uSurfaceScale_Stage1 * m[4]));
+ output_Stage1 = light_Stage1(normal_Stage1(m, uSurfaceScale_Stage1), surfaceToLight, uLightColor_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/274-4.shader_test b/shaders/skia/274-4.shader_test
new file mode 100644
index 0000000..dcc8364
--- /dev/null
+++ b/shaders/skia/274-4.shader_test
@@ -0,0 +1,49 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_1_Stage0.x);
+ uint y = uint(vTransformedCoords_1_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ output_Stage2 = vec4(clamp(output_Stage2.xyz + value * 0.0039215688593685627, 0.0, output_Stage2.w), output_Stage2.w);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/274.shader_test b/shaders/skia/274.shader_test
new file mode 100644
index 0000000..4426d22
--- /dev/null
+++ b/shaders/skia/274.shader_test
@@ -0,0 +1,152 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage2_c1_c0;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.w) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ } else {
+ {
+ if (t < uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = OverrideInputFragmentProcessor_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c1_c0;
+ }
+ return _output;
+}
+vec4 blend_xor(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src + (1.0 - src.w) * dst;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 blend_darken(vec4 src, vec4 dst) {
+ vec4 result = blend_src_over(src, dst);
+ result.xyz = min(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
+ return result;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_xor(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_darken(ConstColorProcessor_Stage2_c1_c0(vec4(1.0)), output_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 inColor;
+in vec2 inLocalCoord;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/277-2.shader_test b/shaders/skia/277-2.shader_test
new file mode 100644
index 0000000..0c89eb3
--- /dev/null
+++ b/shaders/skia/277-2.shader_test
@@ -0,0 +1,196 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform float uSurfaceScale_Stage1;
+uniform vec3 uLightColor_Stage1;
+uniform float uKS_Stage1;
+uniform float uShininess_Stage1;
+uniform vec4 uTexDom_Stage1;
+uniform vec3 uDecalParams_Stage1;
+uniform vec3 uLightLocation_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 light_Stage1(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ vec3 halfDir = normalize(surfaceToLight + vec3(0.0, 0.0, 1.0));
+ float colorScale = uKS_Stage1 * pow(dot(normal, halfDir), uShininess_Stage1);
+ vec3 color = lightColor * clamp(colorScale, 0.0, 1.0);
+ return vec4(color, max(max(color.x, color.y), color.z));
+}
+float sobel_Stage1(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage1(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage1(float m[9], float surfaceScale) {
+ return pointToNormal_Stage1(sobel_Stage1(m[0], m[1], m[3], m[4], 0.0, 0.0, 0.66666698455810547), sobel_Stage1(m[0], m[3], m[1], m[4], 0.0, 0.0, 0.66666698455810547), surfaceScale);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ vec2 coord = vTransformedCoords_0_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp0 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp5 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp6 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp7 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp8 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = normalize(uLightLocation_Stage1 - vec3(gl_FragCoord.xy, uSurfaceScale_Stage1 * m[4]));
+ output_Stage1 = light_Stage1(normal_Stage1(m, uSurfaceScale_Stage1), surfaceToLight, uLightColor_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/277-3.shader_test b/shaders/skia/277-3.shader_test
new file mode 100644
index 0000000..4e64025
--- /dev/null
+++ b/shaders/skia/277-3.shader_test
@@ -0,0 +1,273 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uColor_Stage0;
+uniform vec2 uImageIncrement_Stage1;
+uniform float uSurfaceScale_Stage1;
+uniform vec3 uLightColor_Stage1;
+uniform float uKD_Stage1;
+uniform vec4 uTexDom_Stage1;
+uniform vec3 uDecalParams_Stage1;
+uniform vec3 uLightLocation_Stage1;
+uniform float uExponent_Stage1;
+uniform float uCosInnerConeAngle_Stage1;
+uniform float uCosOuterConeAngle_Stage1;
+uniform float uConeScale_Stage1;
+uniform vec3 uS_Stage1;
+uniform vec4 urectUniform_Stage2;
+uniform mat4 um_Stage3;
+uniform vec4 uv_Stage3;
+uniform mat4 um_Stage4;
+uniform vec4 uv_Stage4;
+uniform vec4 ucircleData_Stage5;
+uniform vec4 ucolor_Stage6;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage5;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 light_Stage1(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ float colorScale = uKD_Stage1 * dot(normal, surfaceToLight);
+ return vec4(lightColor * clamp(colorScale, 0.0, 1.0), 1.0);
+}
+float sobel_Stage1(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage1(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage1(float m[9], float surfaceScale) {
+ return pointToNormal_Stage1(sobel_Stage1(m[0], m[2], m[3], m[5], 0.0, 0.0, 0.33333298563957214), sobel_Stage1(m[0], m[3], m[1], m[4], m[2], m[5], 0.5), surfaceScale);
+}
+vec3 lightColor_Stage1(vec3 surfaceToLight) {
+ float cosAngle = -dot(surfaceToLight, uS_Stage1);
+ if (cosAngle < uCosOuterConeAngle_Stage1) {
+ return vec3(0.0);
+ }
+ float scale = pow(cosAngle, uExponent_Stage1);
+ if (cosAngle < uCosInnerConeAngle_Stage1) {
+ return ((uLightColor_Stage1 * scale) * (cosAngle - uCosOuterConeAngle_Stage1)) * uConeScale_Stage1;
+ }
+ return uLightColor_Stage1;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = uColor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec2 coord = vTransformedCoords_0_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp0 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp5 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp6 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp7 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp8 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = normalize(uLightLocation_Stage1 - vec3(gl_FragCoord.xy, uSurfaceScale_Stage1 * m[4]));
+ output_Stage1 = light_Stage1(normal_Stage1(m, uSurfaceScale_Stage1), surfaceToLight, lightColor_Stage1(surfaceToLight));
+ output_Stage1 *= outputColor_Stage0;
+ }
+ vec4 output_Stage2;
+ {
+ float alpha;
+ {
+ float xSub, ySub;
+ xSub = min(gl_FragCoord.x - urectUniform_Stage2.x, 0.0);
+ xSub += min(urectUniform_Stage2.z - gl_FragCoord.x, 0.0);
+ ySub = min(gl_FragCoord.y - urectUniform_Stage2.y, 0.0);
+ ySub += min(urectUniform_Stage2.w - gl_FragCoord.y, 0.0);
+ alpha = (1.0 + max(xSub, -1.0)) * (1.0 + max(ySub, -1.0));
+ }
+ output_Stage2 = output_Stage1 * alpha;
+ }
+ vec4 output_Stage3;
+ {
+ vec4 inputColor = vec4(1.0);
+ {
+ float nonZeroAlpha = max(1.0, 9.9999997473787516e-05);
+ inputColor = vec4(vec4(1.0).xyz / nonZeroAlpha, 1.0);
+ }
+ output_Stage3 = um_Stage3 * inputColor + uv_Stage3;
+ {
+ output_Stage3 = clamp(output_Stage3, 0.0, 1.0);
+ }
+ }
+ vec4 output_Stage4;
+ {
+ vec4 inputColor = output_Stage3;
+ {
+ float nonZeroAlpha = max(inputColor.w, 9.9999997473787516e-05);
+ inputColor = vec4(inputColor.xyz / nonZeroAlpha, inputColor.w);
+ }
+ output_Stage4 = um_Stage4 * inputColor + uv_Stage4;
+ {
+ output_Stage4.w = clamp(output_Stage4.w, 0.0, 1.0);
+ }
+ }
+ vec4 output_Stage5;
+ {
+ vec2 vec = vec2((gl_FragCoord.x - ucircleData_Stage5.x) * ucircleData_Stage5.w, (gl_FragCoord.y - ucircleData_Stage5.y) * ucircleData_Stage5.w);
+ float dist = length(vec) + (0.5 - ucircleData_Stage5.z) * ucircleData_Stage5.w;
+ output_Stage5 = output_Stage4 * texture(uTextureSampler_0_Stage5, vec2(dist, 0.5)).w;
+ }
+ vec4 output_Stage6;
+ {
+ {
+ output_Stage6 = output_Stage5.w * ucolor_Stage6;
+ }
+ }
+ {
+ sk_FragColor = output_Stage2 * output_Stage6;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec2 pos2 = (uViewM_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/277-4.shader_test b/shaders/skia/277-4.shader_test
new file mode 100644
index 0000000..c164826
--- /dev/null
+++ b/shaders/skia/277-4.shader_test
@@ -0,0 +1,42 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = texture(uTextureSampler_0_Stage2, vTransformedCoords_1_Stage0) * output_Stage1;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/277.shader_test b/shaders/skia/277.shader_test
new file mode 100644
index 0000000..7ce7211
--- /dev/null
+++ b/shaders/skia/277.shader_test
@@ -0,0 +1,81 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 ucolor_Stage1_c0_c0_c0_c0;
+uniform vec4 ucolor_Stage2_c1_c0;
+noperspective in vec4 vcolor_Stage0;
+vec4 ConstColorProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = _input.w * ucolor_Stage1_c0_c0_c0_c0;
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = ConstColorProcessor_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c1_c0;
+ }
+ return _output;
+}
+vec4 blend_xor(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src + (1.0 - src.w) * dst;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 blend_darken(vec4 src, vec4 dst) {
+ vec4 result = blend_src_over(src, dst);
+ result.xyz = min(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
+ return result;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_xor(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_darken(ConstColorProcessor_Stage2_c1_c0(vec4(1.0)), output_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 position;
+in vec4 inColor;
+noperspective out vec4 vcolor_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/28-1.shader_test b/shaders/skia/28-1.shader_test
new file mode 100644
index 0000000..1d82673
--- /dev/null
+++ b/shaders/skia/28-1.shader_test
@@ -0,0 +1,63 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+uniform sampler2D uTextureSampler_2_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+vec4 TextureEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_1_Stage1, vTransformedCoords_1_Stage0) * _input;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c2_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_2_Stage1, vTransformedCoords_2_Stage0) * _input;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ vec4 planes[3];
+ planes[0] = TextureEffect_Stage1_c0_c0(vec4(1.0));
+ planes[1] = TextureEffect_Stage1_c1_c0(vec4(1.0));
+ planes[2] = TextureEffect_Stage1_c2_c0(vec4(1.0));
+ vec4 color = vec4(planes[1].x, planes[2].x, planes[0].x, 1.0);
+ output_Stage1 = color;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/28-100.shader_test b/shaders/skia/28-100.shader_test
new file mode 100644
index 0000000..d6a5687
--- /dev/null
+++ b/shaders/skia/28-100.shader_test
@@ -0,0 +1,110 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform float uweight_Stage1;
+uniform vec4 uleftBorderColor_Stage1_c1_c0_c0_c0_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c1_c0_c0_c0_c0_c0;
+uniform vec4 ustart_Stage1_c1_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c1_c0_c0_c0_c0_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ return _output;
+}
+vec4 RadialGradientLayout_Stage1_c1_c0_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = length(vTransformedCoords_1_Stage0);
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c1_c0_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c1_c0_c0_c0_c0_c0_c1_c0 + t * uend_Stage1_c1_c0_c0_c0_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c1_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = RadialGradientLayout_Stage1_c1_c0_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c1_c0_c0_c0_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c1_c0_c0_c0_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c1_c0_c0_c0_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = ClampedGradientEffect_Stage1_c1_c0_c0_c0_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ return _output;
+}
+vec4 TextureEffect_Stage1_c1_c0_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_1_Stage1, vTransformedCoords_2_Stage0) * _input;
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = TextureEffect_Stage1_c1_c0_c1_c0_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ return _output;
+}
+vec4 blend_dst_atop(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src + src.w * dst;
+}
+vec4 ComposeTwo_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_dst_atop(OverrideInputFragmentProcessor_Stage1_c1_c0_c0_c0(inputColor), OverrideInputFragmentProcessor_Stage1_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = mix(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), ComposeTwo_Stage1_c1_c0(vec4(1.0)), uweight_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/28-11.shader_test b/shaders/skia/28-11.shader_test
new file mode 100644
index 0000000..d4cd555
--- /dev/null
+++ b/shaders/skia/28-11.shader_test
@@ -0,0 +1,69 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform float ubias_Stage1_c0_c0_c0_c0;
+uniform float uscale_Stage1_c0_c0_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 SweepGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float angle;
+ {
+ angle = atan(-vTransformedCoords_0_Stage0.y, -vTransformedCoords_0_Stage0.x);
+ }
+ float t = ((angle * 0.15915493667125702 + 0.5) + ubias_Stage1_c0_c0_c0_c0) * uscale_Stage1_c0_c0_c0_c0;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = SweepGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TiledGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/28-110.shader_test b/shaders/skia/28-110.shader_test
new file mode 100644
index 0000000..00b30a2
--- /dev/null
+++ b/shaders/skia/28-110.shader_test
@@ -0,0 +1,97 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 ustart_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 uclamp_Stage1_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c0_c0_c1_c0;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+vec4 ComposeOne_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_dst_in(_input, TiledGradientEffect_Stage1_c0_c0_c0_c0(vec4(1.0)));
+ return _output;
+}
+vec4 TextureEffect_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 inCoord = vTransformedCoords_1_Stage0;
+ vec2 subsetCoord;
+ subsetCoord.x = inCoord.x;
+ subsetCoord.y = inCoord.y;
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage1_c1_c0.x, uclamp_Stage1_c1_c0.z);
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage1_c1_c0.y, uclamp_Stage1_c1_c0.w);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ _output = _input * textureColor;
+ return _output;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TextureEffect_Stage1_c1_c0(ComposeOne_Stage1_c0_c0(outputColor_Stage0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/28-112.shader_test b/shaders/skia/28-112.shader_test
new file mode 100644
index 0000000..f375b31
--- /dev/null
+++ b/shaders/skia/28-112.shader_test
@@ -0,0 +1,46 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform sampler2D uTextureSampler_0_Stage0;
+flat in vec4 vcolor_Stage0;
+noperspective in vec2 vlocalCoord_Stage0;
+flat in vec4 vtexDomain_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ vec2 texCoord;
+ texCoord = vlocalCoord_Stage0;
+ vec4 domain;
+ domain = vtexDomain_Stage0;
+ texCoord = clamp(texCoord, domain.xy, domain.zw);
+ outputColor_Stage0 = texture(uTextureSampler_0_Stage0, texCoord) * outputColor_Stage0;
+ }
+ {
+ sk_FragColor = outputColor_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+in vec4 texDomain;
+flat out vec4 vcolor_Stage0;
+noperspective out vec2 vlocalCoord_Stage0;
+flat out vec4 vtexDomain_Stage0;
+void main() {
+ vcolor_Stage0 = color;
+ vlocalCoord_Stage0 = localCoord;
+ vtexDomain_Stage0 = texDomain;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/28-117.shader_test b/shaders/skia/28-117.shader_test
new file mode 100644
index 0000000..16f5cc6
--- /dev/null
+++ b/shaders/skia/28-117.shader_test
@@ -0,0 +1,63 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec3 uedges_Stage2[4];
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TextureEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ float alpha = 1.0;
+ float edge;
+ edge = dot(uedges_Stage2[0], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage2[1], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage2[2], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage2[3], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ output_Stage2 = vec4(alpha);
+ }
+ {
+ sk_FragColor = output_Stage1 * output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/28-119.shader_test b/shaders/skia/28-119.shader_test
new file mode 100644
index 0000000..7d0edb7
--- /dev/null
+++ b/shaders/skia/28-119.shader_test
@@ -0,0 +1,61 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform float uDstTF_Stage1[7];
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 TextureEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+float dst_tf_Stage1(float x) {
+ float G = uDstTF_Stage1[0];
+ float A = uDstTF_Stage1[1];
+ float B = uDstTF_Stage1[2];
+ float C = uDstTF_Stage1[3];
+ float D = uDstTF_Stage1[4];
+ float E = uDstTF_Stage1[5];
+ float F = uDstTF_Stage1[6];
+ float s = sign(x);
+ x = abs(x);
+ x = x < D ? C * x + F : pow(A * x + B, G) + E;
+ return s * x;
+}
+vec4 color_xform_Stage1(vec4 color) {
+ float nonZeroAlpha = max(color.w, 9.9999997473787516e-05);
+ color = vec4(color.xyz / nonZeroAlpha, nonZeroAlpha);
+ color.x = dst_tf_Stage1(color.x);
+ color.y = dst_tf_Stage1(color.y);
+ color.z = dst_tf_Stage1(color.z);
+ color.xyz *= color.w;
+ return color;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = color_xform_Stage1(TextureEffect_Stage1_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/28-12.shader_test b/shaders/skia/28-12.shader_test
new file mode 100644
index 0000000..0670050
--- /dev/null
+++ b/shaders/skia/28-12.shader_test
@@ -0,0 +1,71 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uborder_Stage1;
+uniform vec4 usubset_Stage1;
+uniform vec4 uclamp_Stage1;
+uniform vec4 unorm_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+flat in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec2 inCoord = vTransformedCoords_0_Stage0;
+ inCoord *= unorm_Stage1.xy;
+ float extraRepeatCoordY;
+ float repeatCoordWeightY;
+ vec2 subsetCoord;
+ subsetCoord.x = inCoord.x;
+ {
+ float w = usubset_Stage1.w - usubset_Stage1.y;
+ float w2 = 2.0 * w;
+ float d = inCoord.y - usubset_Stage1.y;
+ float m = mod(d, w2);
+ float o = mix(m, w2 - m, step(w, m));
+ subsetCoord.y = o + usubset_Stage1.y;
+ extraRepeatCoordY = (w - o) + usubset_Stage1.y;
+ float hw = w / 2.0;
+ float n = mod(d - hw, w2);
+ repeatCoordWeightY = clamp((mix(n, w2 - n, step(w, n)) - hw) + 0.5, 0.0, 1.0);
+ }
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage1.x, uclamp_Stage1.z);
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage1.y, uclamp_Stage1.w);
+ extraRepeatCoordY = clamp(extraRepeatCoordY, uclamp_Stage1.y, uclamp_Stage1.w);
+ vec4 textureColor = mix(texture(uTextureSampler_0_Stage1, clampedCoord * unorm_Stage1.zw), texture(uTextureSampler_0_Stage1, vec2(clampedCoord.x, extraRepeatCoordY) * unorm_Stage1.zw), repeatCoordWeightY);
+ float errX = subsetCoord.x - clampedCoord.x;
+ textureColor = mix(textureColor, uborder_Stage1, min(abs(errX), 1.0));
+ output_Stage1 = outputColor_Stage0 * textureColor;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec2 inLocalCoords;
+in vec4 color;
+flat out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vcolor_Stage0 = color;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoords, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/28-125.shader_test b/shaders/skia/28-125.shader_test
new file mode 100644
index 0000000..15bea4c
--- /dev/null
+++ b/shaders/skia/28-125.shader_test
@@ -0,0 +1,92 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 ubaseFrequency_Stage2_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+uniform sampler2D uTextureSampler_1_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+float perlinnoise_Stage2_c0_c0(float chanCoord, vec2 noiseVec) {
+ vec4 floorVal;
+ floorVal.xy = floor(noiseVec);
+ floorVal.zw = floorVal.xy + vec2(1.0);
+ vec2 fractVal = fract(noiseVec);
+ vec2 noiseSmooth = (fractVal * fractVal) * (vec2(3.0) - vec2(2.0) * fractVal);
+ floorVal = fract(floor(mod(floorVal, 256.0)) / vec4(256.0));
+ vec2 latticeIdx;
+ latticeIdx.x = texture(uTextureSampler_0_Stage2, vec2(floorVal.x, 0.5)).x;
+ latticeIdx.y = texture(uTextureSampler_0_Stage2, vec2(floorVal.z, 0.5)).x;
+ vec4 bcoords = fract(latticeIdx.xyxy + floorVal.yyww);
+ vec2 uv;
+ vec4 lattice = texture(uTextureSampler_1_Stage2, vec2(bcoords.x, chanCoord)).zyxw;
+ uv.x = dot((lattice.yw + lattice.xz * vec2(0.00390625)) * vec2(2.0) - vec2(1.0), fractVal);
+ fractVal.x -= 1.0;
+ lattice = texture(uTextureSampler_1_Stage2, vec2(bcoords.y, chanCoord)).zyxw;
+ uv.y = dot((lattice.yw + lattice.xz * vec2(0.00390625)) * vec2(2.0) - vec2(1.0), fractVal);
+ vec2 ab;
+ ab.x = mix(uv.x, uv.y, noiseSmooth.x);
+ fractVal.y -= 1.0;
+ lattice = texture(uTextureSampler_1_Stage2, vec2(bcoords.w, chanCoord)).zyxw;
+ uv.y = dot((lattice.yw + lattice.xz * vec2(0.00390625)) * vec2(2.0) - vec2(1.0), fractVal);
+ fractVal.x += 1.0;
+ lattice = texture(uTextureSampler_1_Stage2, vec2(bcoords.z, chanCoord)).zyxw;
+ uv.x = dot((lattice.yw + lattice.xz * vec2(0.00390625)) * vec2(2.0) - vec2(1.0), fractVal);
+ ab.y = mix(uv.x, uv.y, noiseSmooth.x);
+ return mix(ab.x, ab.y, noiseSmooth.y);
+}
+vec4 PerlinNoise_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 noiseVec = floor(vTransformedCoords_1_Stage0) * ubaseFrequency_Stage2_c0_c0;
+ _output = vec4(0.0);
+ float ratio = 1.0;
+ for (int octave = 0;octave < 3; ++octave) {
+ _output += abs(vec4(perlinnoise_Stage2_c0_c0(0.125, noiseVec), perlinnoise_Stage2_c0_c0(0.375, noiseVec), perlinnoise_Stage2_c0_c0(0.625, noiseVec), perlinnoise_Stage2_c0_c0(0.875, noiseVec))) * ratio;
+ noiseVec *= vec2(2.0);
+ ratio *= 0.5;
+ }
+ _output = clamp(_output, 0.0, 1.0);
+ _output = vec4(_output.xyz * _output.www, _output.w);
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_dst_in(output_Stage1, PerlinNoise_Stage2_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/28-126.shader_test b/shaders/skia/28-126.shader_test
new file mode 100644
index 0000000..3f5df6f
--- /dev/null
+++ b/shaders/skia/28-126.shader_test
@@ -0,0 +1,66 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uinnerRect_Stage2_c0_c0;
+uniform vec2 uradiusPlusHalf_Stage2_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 CircularRRect_Stage2_c0_c0(vec4 _input, vec2 _coords) {
+ vec4 _output;
+ vec2 dxy0 = uinnerRect_Stage2_c0_c0.xy - gl_FragCoord.xy;
+ vec2 dxy1 = gl_FragCoord.xy - uinnerRect_Stage2_c0_c0.zw;
+ vec2 dxy = max(max(dxy0, dxy1), 0.0);
+ float alpha = clamp(uradiusPlusHalf_Stage2_c0_c0.x - length(dxy), 0.0, 1.0);
+ _output = _input * alpha;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ float coord = vTransformedCoords_1_Stage0.y - 0.5;
+ float f = fract(coord);
+ coord += 0.5 - f;
+ float f2 = f * f;
+ vec4 w = mat4(0.055555555555555552, 0.88888888888888884, 0.055555555555555552, 0.0, -0.5, 0.0, 0.5, 0.0, 0.83333333333333337, -2.0, 1.5, -0.33333333333333331, -0.3888888888888889, 1.1666666666666667, -1.1666666666666667, 0.3888888888888889) * vec4(1.0, f, f2, f2 * f);
+ vec4 c[4];
+ c[0] = CircularRRect_Stage2_c0_c0(vec4(1.0), vec2(vTransformedCoords_1_Stage0.x, coord + -1.0));
+ c[1] = CircularRRect_Stage2_c0_c0(vec4(1.0), vec2(vTransformedCoords_1_Stage0.x, coord));
+ c[2] = CircularRRect_Stage2_c0_c0(vec4(1.0), vec2(vTransformedCoords_1_Stage0.x, coord + 1.0));
+ c[3] = CircularRRect_Stage2_c0_c0(vec4(1.0), vec2(vTransformedCoords_1_Stage0.x, coord + 2.0));
+ vec4 bicubicColor = ((c[0] * w.x + c[1] * w.y) + c[2] * w.z) + c[3] * w.w;
+ bicubicColor = clamp(bicubicColor, 0.0, 1.0);
+ output_Stage2 = bicubicColor * output_Stage1;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/28-13.shader_test b/shaders/skia/28-13.shader_test
new file mode 100644
index 0000000..8d4bfc2
--- /dev/null
+++ b/shaders/skia/28-13.shader_test
@@ -0,0 +1,62 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uborder_Stage1;
+uniform vec4 usubset_Stage1;
+uniform vec4 uclamp_Stage1;
+uniform vec4 unorm_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+flat in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec2 inCoord = vTransformedCoords_0_Stage0;
+ inCoord *= unorm_Stage1.xy;
+ vec2 subsetCoord;
+ subsetCoord.x = inCoord.x;
+ subsetCoord.y = mod(inCoord.y - usubset_Stage1.y, usubset_Stage1.w - usubset_Stage1.y) + usubset_Stage1.y;
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage1.x, uclamp_Stage1.z);
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage1.y, uclamp_Stage1.w);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord * unorm_Stage1.zw);
+ float errX = subsetCoord.x - clampedCoord.x;
+ float errY = subsetCoord.y - clampedCoord.y;
+ float repeatCoordY = errY > 0.0 ? uclamp_Stage1.y : uclamp_Stage1.w;
+ if (errY != 0.0) {
+ textureColor = mix(textureColor, texture(uTextureSampler_0_Stage1, vec2(clampedCoord.x, repeatCoordY) * unorm_Stage1.zw), abs(errY));
+ }
+ textureColor = mix(textureColor, uborder_Stage1, min(abs(errX), 1.0));
+ output_Stage1 = outputColor_Stage0 * textureColor;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec2 inLocalCoords;
+in vec4 color;
+flat out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vcolor_Stage0 = color;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoords, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/28-15.shader_test b/shaders/skia/28-15.shader_test
new file mode 100644
index 0000000..3f7cea9
--- /dev/null
+++ b/shaders/skia/28-15.shader_test
@@ -0,0 +1,58 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uborder_Stage1;
+uniform vec4 usubset_Stage1;
+uniform vec4 uclamp_Stage1;
+uniform vec4 unorm_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+flat in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec2 inCoord = vTransformedCoords_0_Stage0;
+ inCoord *= unorm_Stage1.xy;
+ vec2 subsetCoord;
+ subsetCoord.x = inCoord.x;
+ subsetCoord.y = mod(inCoord.y - usubset_Stage1.y, usubset_Stage1.w - usubset_Stage1.y) + usubset_Stage1.y;
+ vec2 clampedCoord;
+ clampedCoord.x = subsetCoord.x;
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage1.y, uclamp_Stage1.w);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord * unorm_Stage1.zw);
+ if (inCoord.x < usubset_Stage1.x || inCoord.x > usubset_Stage1.z) {
+ textureColor = uborder_Stage1;
+ }
+ output_Stage1 = outputColor_Stage0 * textureColor;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec2 inLocalCoords;
+in vec4 color;
+flat out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vcolor_Stage0 = color;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoords, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/28-17.shader_test b/shaders/skia/28-17.shader_test
new file mode 100644
index 0000000..fcb3399
--- /dev/null
+++ b/shaders/skia/28-17.shader_test
@@ -0,0 +1,111 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 uscale01_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias01_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale23_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias23_Stage1_c0_c0_c1_c0;
+uniform float uthreshold_Stage1_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage2_c1_c0_c0_c0;
+uniform vec4 ucolor_Stage2_c2_c0_c0_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 RadialGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = length(vTransformedCoords_0_Stage0);
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 DualIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthreshold_Stage1_c0_c0_c1_c0) {
+ scale = uscale01_Stage1_c0_c0_c1_c0;
+ bias = ubias01_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale23_Stage1_c0_c0_c1_c0;
+ bias = ubias23_Stage1_c0_c0_c1_c0;
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = RadialGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = DualIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c1_c0_c0_c0;
+ }
+ return _output;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 ComposeOne_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_src_over(ConstColorProcessor_Stage2_c1_c0_c0_c0(vec4(1.0)), _input);
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c2_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c2_c0_c0_c0;
+ }
+ return _output;
+}
+vec4 blend_xor(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src + (1.0 - src.w) * dst;
+}
+vec4 ComposeOne_Stage2_c2_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_xor(ConstColorProcessor_Stage2_c2_c0_c0_c0(vec4(1.0)), _input);
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = ComposeOne_Stage2_c2_c0(ComposeOne_Stage2_c1_c0(output_Stage1));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/28-18.shader_test b/shaders/skia/28-18.shader_test
new file mode 100644
index 0000000..d220364
--- /dev/null
+++ b/shaders/skia/28-18.shader_test
@@ -0,0 +1,124 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 uscale01_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias01_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale23_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias23_Stage1_c0_c0_c1_c0;
+uniform float uthreshold_Stage1_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage2_c1_c0_c0_c0;
+uniform vec4 ucolor_Stage2_c2_c0_c0_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 RadialGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = length(vTransformedCoords_0_Stage0);
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 DualIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthreshold_Stage1_c0_c0_c1_c0) {
+ scale = uscale01_Stage1_c0_c0_c1_c0;
+ bias = ubias01_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale23_Stage1_c0_c0_c1_c0;
+ bias = ubias23_Stage1_c0_c0_c1_c0;
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = RadialGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = DualIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c1_c0_c0_c0;
+ }
+ return _output;
+}
+float _blend_overlay_component(float sc, float sa, float dc, float da) {
+ if (2.0 * dc <= da) {
+ return (2.0 * sc) * dc;
+ }
+ return sa * da - (2.0 * (da - dc)) * (sa - sc);
+}
+vec4 blend_overlay(vec4 src, vec4 dst) {
+ vec4 result = vec4(_blend_overlay_component(src.x, src.w, dst.x, dst.w), _blend_overlay_component(src.y, src.w, dst.y, dst.w), _blend_overlay_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+ result.xyz += dst.xyz * (1.0 - src.w) + src.xyz * (1.0 - dst.w);
+ return result;
+}
+vec4 ComposeOne_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_overlay(ConstColorProcessor_Stage2_c1_c0_c0_c0(vec4(1.0)), _input);
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c2_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c2_c0_c0_c0;
+ }
+ return _output;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 blend_darken(vec4 src, vec4 dst) {
+ vec4 result = blend_src_over(src, dst);
+ result.xyz = min(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
+ return result;
+}
+vec4 ComposeOne_Stage2_c2_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_darken(ConstColorProcessor_Stage2_c2_c0_c0_c0(vec4(1.0)), _input);
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = ComposeOne_Stage2_c2_c0(ComposeOne_Stage2_c1_c0(output_Stage1));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/28-19.shader_test b/shaders/skia/28-19.shader_test
new file mode 100644
index 0000000..4eb606f
--- /dev/null
+++ b/shaders/skia/28-19.shader_test
@@ -0,0 +1,82 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+noperspective in vec4 vQuadEdge_Stage0;
+noperspective in vec4 vinColor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ float edgeAlpha;
+ vec2 duvdx = dFdx(vQuadEdge_Stage0.xy);
+ vec2 duvdy = -dFdy(vQuadEdge_Stage0.xy);
+ if (vQuadEdge_Stage0.z > 0.0 && vQuadEdge_Stage0.w > 0.0) {
+ edgeAlpha = min(min(vQuadEdge_Stage0.z, vQuadEdge_Stage0.w) + 0.5, 1.0);
+ } else {
+ vec2 gF = vec2((2.0 * vQuadEdge_Stage0.x) * duvdx.x - duvdx.y, (2.0 * vQuadEdge_Stage0.x) * duvdy.x - duvdy.y);
+ edgeAlpha = vQuadEdge_Stage0.x * vQuadEdge_Stage0.x - vQuadEdge_Stage0.y;
+ edgeAlpha = clamp(0.5 - edgeAlpha / length(gF), 0.0, 1.0);
+ }
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1 * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec4 inQuadEdge;
+noperspective out vec4 vQuadEdge_Stage0;
+noperspective out vec4 vinColor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vQuadEdge_Stage0 = inQuadEdge;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/28-2.shader_test b/shaders/skia/28-2.shader_test
new file mode 100644
index 0000000..d04f49a
--- /dev/null
+++ b/shaders/skia/28-2.shader_test
@@ -0,0 +1,54 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_KHR_blend_equation_advanced : require
+out vec4 sk_FragColor;
+layout (blend_support_all_equations) out ;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_dst_in(outputColor_Stage0, TextureEffect_Stage1_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/28-20.shader_test b/shaders/skia/28-20.shader_test
new file mode 100644
index 0000000..69ab5ee
--- /dev/null
+++ b/shaders/skia/28-20.shader_test
@@ -0,0 +1,46 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform sampler2D uTextureSampler_0_Stage0;
+noperspective in vec2 vTextureCoords_Stage0;
+flat in int vTexIndex_Stage0;
+noperspective in vec4 vinColor_Stage0;
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ vec4 texColor;
+ {
+ texColor = texture(uTextureSampler_0_Stage0, vTextureCoords_Stage0);
+ }
+ outputCoverage_Stage0 = texColor;
+ }
+ {
+ sk_FragColor = outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform vec2 uAtlasSizeInv_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in uvec2 inTextureCoords;
+noperspective out vec2 vTextureCoords_Stage0;
+flat out int vTexIndex_Stage0;
+noperspective out vec4 vinColor_Stage0;
+void main() {
+ ivec2 signedCoords = ivec2(int(inTextureCoords.x), int(inTextureCoords.y));
+ vec2 unormTexCoords = vec2(float(signedCoords.x / 2), float(signedCoords.y / 2));
+ vTextureCoords_Stage0 = unormTexCoords * uAtlasSizeInv_Stage0;
+ vTexIndex_Stage0 = 0;
+ vinColor_Stage0 = inColor;
+ gl_Position = vec4(inPosition.x, inPosition.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/28-25.shader_test b/shaders/skia/28-25.shader_test
new file mode 100644
index 0000000..9b86dc9
--- /dev/null
+++ b/shaders/skia/28-25.shader_test
@@ -0,0 +1,66 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec2 uDstTextureUpperLeft_Stage3;
+uniform vec2 uDstTextureCoordScale_Stage3;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+uniform sampler2D uDstTextureSampler_Stage3;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+vec4 blend_src_out(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TextureEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = texture(uTextureSampler_0_Stage2, vTransformedCoords_1_Stage0);
+ }
+ {
+ if (all(lessThanEqual(output_Stage2.xyz, vec3(0.0)))) {
+ discard;
+ }
+ vec2 _dstTexCoord = (gl_FragCoord.xy - uDstTextureUpperLeft_Stage3) * uDstTextureCoordScale_Stage3;
+ _dstTexCoord.y = 1.0 - _dstTexCoord.y;
+ vec4 _dstColor = texture(uDstTextureSampler_Stage3, _dstTexCoord);
+ sk_FragColor = blend_src_out(output_Stage1, _dstColor);
+ sk_FragColor = output_Stage2 * sk_FragColor + (vec4(1.0) - output_Stage2) * _dstColor;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/28-26.shader_test b/shaders/skia/28-26.shader_test
new file mode 100644
index 0000000..b5aef9b
--- /dev/null
+++ b/shaders/skia/28-26.shader_test
@@ -0,0 +1,43 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uinnerRect_Stage1;
+uniform vec2 uradiusPlusHalf_Stage1;
+flat in vec4 vcolor_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec2 dxy = max(vec2(gl_FragCoord.x - uinnerRect_Stage1.z, uinnerRect_Stage1.y - gl_FragCoord.y), 0.0);
+ float leftAlpha = clamp(gl_FragCoord.x - uinnerRect_Stage1.x, 0.0, 1.0);
+ float bottomAlpha = clamp(uinnerRect_Stage1.w - gl_FragCoord.y, 0.0, 1.0);
+ float alpha = (bottomAlpha * leftAlpha) * clamp(uradiusPlusHalf_Stage1.x - length(dxy), 0.0, 1.0);
+ output_Stage1 = vec4(alpha);
+ }
+ {
+ sk_FragColor = outputColor_Stage0 * output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 position;
+in vec4 color;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/28-29.shader_test b/shaders/skia/28-29.shader_test
new file mode 100644
index 0000000..217976a
--- /dev/null
+++ b/shaders/skia/28-29.shader_test
@@ -0,0 +1,69 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec3 vTransformedCoords_0_Stage0;
+vec4 TextureEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = textureProj(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = TextureEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = OverrideInputFragmentProcessor_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 blend_modulate(vec4 src, vec4 dst) {
+ return src * dst;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_modulate(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 inColor;
+in vec2 inLocalCoord;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec3 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0);
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/28-3.shader_test b/shaders/skia/28-3.shader_test
new file mode 100644
index 0000000..754e94d
--- /dev/null
+++ b/shaders/skia/28-3.shader_test
@@ -0,0 +1,43 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_KHR_blend_equation_advanced : require
+out vec4 sk_FragColor;
+layout (blend_support_all_equations) out ;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * outputColor_Stage0;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/28-30.shader_test b/shaders/skia/28-30.shader_test
new file mode 100644
index 0000000..6221d0c
--- /dev/null
+++ b/shaders/skia/28-30.shader_test
@@ -0,0 +1,69 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 TextureEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = TextureEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = OverrideInputFragmentProcessor_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 blend_modulate(vec4 src, vec4 dst) {
+ return src * dst;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_modulate(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 inColor;
+in vec2 inLocalCoord;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/28-34.shader_test b/shaders/skia/28-34.shader_test
new file mode 100644
index 0000000..07881d8
--- /dev/null
+++ b/shaders/skia/28-34.shader_test
@@ -0,0 +1,41 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform float uPixelSize_Stage1;
+uniform vec2 uRange_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0;
+ coord.y -= 25.0 * uPixelSize_Stage1;
+ for (int i = 0;i < 51; i++) {
+ output_Stage1 = max(output_Stage1, texture(uTextureSampler_0_Stage1, coord));
+ coord.y += uPixelSize_Stage1;
+ }
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/28-37.shader_test b/shaders/skia/28-37.shader_test
new file mode 100644
index 0000000..e602da4
--- /dev/null
+++ b/shaders/skia/28-37.shader_test
@@ -0,0 +1,137 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform float uSurfaceScale_Stage1;
+uniform vec3 uLightColor_Stage1;
+uniform float uKD_Stage1;
+uniform vec3 uLightLocation_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 light_Stage1(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ float colorScale = uKD_Stage1 * dot(normal, surfaceToLight);
+ return vec4(lightColor * clamp(colorScale, 0.0, 1.0), 1.0);
+}
+float sobel_Stage1(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage1(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage1(float m[9], float surfaceScale) {
+ return pointToNormal_Stage1(sobel_Stage1(m[0], m[1], m[3], m[4], 0.0, 0.0, 0.66666698455810547), sobel_Stage1(m[0], m[3], m[1], m[4], 0.0, 0.0, 0.66666698455810547), surfaceScale);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ vec2 coord = vTransformedCoords_0_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp0 = textureColor;
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp1 = textureColor;
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp2 = textureColor;
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp3 = textureColor;
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp4 = textureColor;
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp5 = textureColor;
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp6 = textureColor;
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp7 = textureColor;
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp8 = textureColor;
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = normalize(uLightLocation_Stage1 - vec3(gl_FragCoord.xy, uSurfaceScale_Stage1 * m[4]));
+ output_Stage1 = light_Stage1(normal_Stage1(m, uSurfaceScale_Stage1), surfaceToLight, uLightColor_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/28-38.shader_test b/shaders/skia/28-38.shader_test
new file mode 100644
index 0000000..3d083aa
--- /dev/null
+++ b/shaders/skia/28-38.shader_test
@@ -0,0 +1,67 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec2 uDstTextureUpperLeft_Stage1;
+uniform vec2 uDstTextureCoordScale_Stage1;
+uniform sampler2D uTextureSampler_0_Stage0;
+uniform sampler2D uDstTextureSampler_Stage1;
+noperspective in vec2 vTextureCoords_Stage0;
+flat in int vTexIndex_Stage0;
+noperspective in vec4 vinColor_Stage0;
+vec4 blend_src_out(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vinColor_Stage0;
+ vec4 texColor;
+ {
+ texColor = texture(uTextureSampler_0_Stage0, vTextureCoords_Stage0);
+ }
+ outputCoverage_Stage0 = texColor;
+ }
+ {
+ if (all(lessThanEqual(outputCoverage_Stage0.xyz, vec3(0.0)))) {
+ discard;
+ }
+ vec2 _dstTexCoord = (gl_FragCoord.xy - uDstTextureUpperLeft_Stage1) * uDstTextureCoordScale_Stage1;
+ _dstTexCoord.y = 1.0 - _dstTexCoord.y;
+ vec4 _dstColor = texture(uDstTextureSampler_Stage1, _dstTexCoord);
+ sk_FragColor = blend_src_out(outputColor_Stage0, _dstColor);
+ float lerpRed = mix(_dstColor.w, sk_FragColor.w, outputCoverage_Stage0.x);
+ float lerpBlue = mix(_dstColor.w, sk_FragColor.w, outputCoverage_Stage0.y);
+ float lerpGreen = mix(_dstColor.w, sk_FragColor.w, outputCoverage_Stage0.z);
+ sk_FragColor = outputCoverage_Stage0 * sk_FragColor + (vec4(1.0) - outputCoverage_Stage0) * _dstColor;
+ sk_FragColor.w = max(max(lerpRed, lerpBlue), lerpGreen);
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform vec2 uAtlasSizeInv_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in uvec2 inTextureCoords;
+noperspective out vec2 vTextureCoords_Stage0;
+flat out int vTexIndex_Stage0;
+noperspective out vec4 vinColor_Stage0;
+void main() {
+ ivec2 signedCoords = ivec2(int(inTextureCoords.x), int(inTextureCoords.y));
+ vec2 unormTexCoords = vec2(float(signedCoords.x / 2), float(signedCoords.y / 2));
+ vTextureCoords_Stage0 = unormTexCoords * uAtlasSizeInv_Stage0;
+ vTexIndex_Stage0 = 0;
+ vinColor_Stage0 = inColor;
+ gl_Position = vec4(inPosition.x, inPosition.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/28-4.shader_test b/shaders/skia/28-4.shader_test
new file mode 100644
index 0000000..da62743
--- /dev/null
+++ b/shaders/skia/28-4.shader_test
@@ -0,0 +1,50 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 TextureEffect_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage2, vTransformedCoords_1_Stage0) * _input;
+ return _output;
+}
+vec4 blend_dst_out(vec4 src, vec4 dst) {
+ return (1.0 - src.w) * dst;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_dst_out(output_Stage1, TextureEffect_Stage2_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/28-43.shader_test b/shaders/skia/28-43.shader_test
new file mode 100644
index 0000000..0dd1f9a
--- /dev/null
+++ b/shaders/skia/28-43.shader_test
@@ -0,0 +1,152 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uCoordTransformMatrix_1_Stage0;
+uniform vec4 uCoordTransformMatrix_2_Stage0;
+uniform vec4 uCoordTransformMatrix_3_Stage0;
+uniform vec4 uCoordTransformMatrix_4_Stage0;
+uniform vec4 uclamp_Stage1_c0_c0_c0_c0_c0_c0;
+uniform vec4 uclamp_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 uclamp_Stage1_c0_c0_c0_c0_c2_c0;
+uniform vec4 uclamp_Stage1_c0_c0_c0_c0_c3_c0;
+uniform mat3 ucolorSpaceMatrix_Stage1_c0_c0_c0_c0;
+uniform vec3 ucolorSpaceTranslate_Stage1_c0_c0_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+uniform sampler2D uTextureSampler_2_Stage1;
+uniform sampler2D uTextureSampler_3_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input, vec2 _coords) {
+ _coords = _coords * uCoordTransformMatrix_1_Stage0.xz + uCoordTransformMatrix_1_Stage0.yw;
+ vec4 _output;
+ vec2 inCoord = _coords;
+ vec2 subsetCoord;
+ subsetCoord.x = inCoord.x;
+ subsetCoord.y = inCoord.y;
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage1_c0_c0_c0_c0_c0_c0.x, uclamp_Stage1_c0_c0_c0_c0_c0_c0.z);
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage1_c0_c0_c0_c0_c0_c0.y, uclamp_Stage1_c0_c0_c0_c0_c0_c0.w);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ _output = _input * textureColor;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c0_c0_c0_c0_c1_c0(vec4 _input, vec2 _coords) {
+ _coords = _coords * uCoordTransformMatrix_2_Stage0.xz + uCoordTransformMatrix_2_Stage0.yw;
+ vec4 _output;
+ vec2 inCoord = _coords;
+ vec2 subsetCoord;
+ subsetCoord.x = inCoord.x;
+ subsetCoord.y = inCoord.y;
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage1_c0_c0_c0_c0_c1_c0.x, uclamp_Stage1_c0_c0_c0_c0_c1_c0.z);
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage1_c0_c0_c0_c0_c1_c0.y, uclamp_Stage1_c0_c0_c0_c0_c1_c0.w);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ _output = _input * textureColor;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c0_c0_c0_c0_c2_c0(vec4 _input, vec2 _coords) {
+ _coords = _coords * uCoordTransformMatrix_3_Stage0.xz + uCoordTransformMatrix_3_Stage0.yw;
+ vec4 _output;
+ vec2 inCoord = _coords;
+ vec2 subsetCoord;
+ subsetCoord.x = inCoord.x;
+ subsetCoord.y = inCoord.y;
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage1_c0_c0_c0_c0_c2_c0.x, uclamp_Stage1_c0_c0_c0_c0_c2_c0.z);
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage1_c0_c0_c0_c0_c2_c0.y, uclamp_Stage1_c0_c0_c0_c0_c2_c0.w);
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ _output = _input * textureColor;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c0_c0_c0_c0_c3_c0(vec4 _input, vec2 _coords) {
+ _coords = _coords * uCoordTransformMatrix_4_Stage0.xz + uCoordTransformMatrix_4_Stage0.yw;
+ vec4 _output;
+ vec2 inCoord = _coords;
+ vec2 subsetCoord;
+ subsetCoord.x = inCoord.x;
+ subsetCoord.y = inCoord.y;
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage1_c0_c0_c0_c0_c3_c0.x, uclamp_Stage1_c0_c0_c0_c0_c3_c0.z);
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage1_c0_c0_c0_c0_c3_c0.y, uclamp_Stage1_c0_c0_c0_c0_c3_c0.w);
+ vec4 textureColor = texture(uTextureSampler_3_Stage1, clampedCoord);
+ _output = _input * textureColor;
+ return _output;
+}
+vec4 YUVtoRGBEffect_Stage1_c0_c0_c0_c0(vec4 _input, vec2 _coords) {
+ vec4 _output;
+ vec4 planes[4];
+ planes[0] = TextureEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0), _coords);
+ planes[1] = TextureEffect_Stage1_c0_c0_c0_c0_c1_c0(vec4(1.0), _coords);
+ planes[2] = TextureEffect_Stage1_c0_c0_c0_c0_c2_c0(vec4(1.0), _coords);
+ planes[3] = TextureEffect_Stage1_c0_c0_c0_c0_c3_c0(vec4(1.0), _coords);
+ vec4 color = vec4(planes[0].x, planes[1].x, planes[2].x, planes[3].x);
+ color.xyz = clamp(color.xyz * ucolorSpaceMatrix_Stage1_c0_c0_c0_c0 + ucolorSpaceTranslate_Stage1_c0_c0_c0_c0, 0.0, 1.0);
+ color.xyz *= color.w;
+ _output = color;
+ return _output;
+}
+vec4 Bicubic_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coord = vTransformedCoords_0_Stage0 - vec2(0.5);
+ vec2 f = fract(coord);
+ coord += 0.5 - f;
+ vec4 wx = mat4(0.055555555555555552, 0.88888888888888884, 0.055555555555555552, 0.0, -0.5, 0.0, 0.5, 0.0, 0.83333333333333337, -2.0, 1.5, -0.33333333333333331, -0.3888888888888889, 1.1666666666666667, -1.1666666666666667, 0.3888888888888889) * vec4(1.0, f.x, f.x * f.x, (f.x * f.x) * f.x);
+ vec4 wy = mat4(0.055555555555555552, 0.88888888888888884, 0.055555555555555552, 0.0, -0.5, 0.0, 0.5, 0.0, 0.83333333333333337, -2.0, 1.5, -0.33333333333333331, -0.3888888888888889, 1.1666666666666667, -1.1666666666666667, 0.3888888888888889) * vec4(1.0, f.y, f.y * f.y, (f.y * f.y) * f.y);
+ vec4 rowColors[4];
+ rowColors[0] = YUVtoRGBEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(-1.0, -1.0));
+ rowColors[1] = YUVtoRGBEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(0.0, -1.0));
+ rowColors[2] = YUVtoRGBEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(1.0, -1.0));
+ rowColors[3] = YUVtoRGBEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(2.0, -1.0));
+ vec4 s0 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ rowColors[0] = YUVtoRGBEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(-1.0, 0.0));
+ rowColors[1] = YUVtoRGBEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord);
+ rowColors[2] = YUVtoRGBEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(1.0, 0.0));
+ rowColors[3] = YUVtoRGBEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(2.0, 0.0));
+ vec4 s1 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ rowColors[0] = YUVtoRGBEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(-1.0, 1.0));
+ rowColors[1] = YUVtoRGBEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(0.0, 1.0));
+ rowColors[2] = YUVtoRGBEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(1.0, 1.0));
+ rowColors[3] = YUVtoRGBEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(2.0, 1.0));
+ vec4 s2 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ rowColors[0] = YUVtoRGBEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(-1.0, 2.0));
+ rowColors[1] = YUVtoRGBEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(0.0, 2.0));
+ rowColors[2] = YUVtoRGBEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(1.0, 2.0));
+ rowColors[3] = YUVtoRGBEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(2.0, 2.0));
+ vec4 s3 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ vec4 bicubicColor = ((wy.x * s0 + wy.y * s1) + wy.z * s2) + wy.w * s3;
+ bicubicColor.xyz = max(vec3(0.0), min(bicubicColor.xyz, bicubicColor.www));
+ _output = bicubicColor * _input;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = Bicubic_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/28-46.shader_test b/shaders/skia/28-46.shader_test
new file mode 100644
index 0000000..174a0f3
--- /dev/null
+++ b/shaders/skia/28-46.shader_test
@@ -0,0 +1,93 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform vec2 uBounds_Stage1;
+uniform vec4 uKernel_Stage1[3];
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0 - 5.0 * uImageIncrement_Stage1;
+ vec2 coordSampled = vec2(0.0, 0.0);
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage1.x && coord.y <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].x;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage1.x && coord.y <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].y;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage1.x && coord.y <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].z;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage1.x && coord.y <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].w;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage1.x && coord.y <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].x;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage1.x && coord.y <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].y;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage1.x && coord.y <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].z;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage1.x && coord.y <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].w;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage1.x && coord.y <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].x;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage1.x && coord.y <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].y;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage1.x && coord.y <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].z;
+ }
+ coord += uImageIncrement_Stage1;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/28-5.shader_test b/shaders/skia/28-5.shader_test
new file mode 100644
index 0000000..fa76605
--- /dev/null
+++ b/shaders/skia/28-5.shader_test
@@ -0,0 +1,123 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uclamp_Stage1_c0_c0_c0_c0;
+uniform vec4 uclamp_Stage1_c0_c0_c1_c0;
+uniform vec4 uclamp_Stage1_c0_c0_c2_c0;
+uniform vec4 uclamp_Stage1_c0_c0_c3_c0;
+uniform mat3 ucolorSpaceMatrix_Stage1_c0_c0;
+uniform vec3 ucolorSpaceTranslate_Stage1_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+uniform sampler2D uTextureSampler_2_Stage1;
+uniform sampler2D uTextureSampler_3_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+noperspective in vec2 vTransformedCoords_3_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 inCoord = vTransformedCoords_0_Stage0;
+ vec2 subsetCoord;
+ subsetCoord.x = inCoord.x;
+ subsetCoord.y = inCoord.y;
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage1_c0_c0_c0_c0.x, uclamp_Stage1_c0_c0_c0_c0.z);
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage1_c0_c0_c0_c0.y, uclamp_Stage1_c0_c0_c0_c0.w);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ _output = _input * textureColor;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 inCoord = vTransformedCoords_1_Stage0;
+ vec2 subsetCoord;
+ subsetCoord.x = inCoord.x;
+ subsetCoord.y = inCoord.y;
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage1_c0_c0_c1_c0.x, uclamp_Stage1_c0_c0_c1_c0.z);
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage1_c0_c0_c1_c0.y, uclamp_Stage1_c0_c0_c1_c0.w);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ _output = _input * textureColor;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c0_c0_c2_c0(vec4 _input) {
+ vec4 _output;
+ vec2 inCoord = vTransformedCoords_2_Stage0;
+ vec2 subsetCoord;
+ subsetCoord.x = inCoord.x;
+ subsetCoord.y = inCoord.y;
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage1_c0_c0_c2_c0.x, uclamp_Stage1_c0_c0_c2_c0.z);
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage1_c0_c0_c2_c0.y, uclamp_Stage1_c0_c0_c2_c0.w);
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ _output = _input * textureColor;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c0_c0_c3_c0(vec4 _input) {
+ vec4 _output;
+ vec2 inCoord = vTransformedCoords_3_Stage0;
+ vec2 subsetCoord;
+ subsetCoord.x = inCoord.x;
+ subsetCoord.y = inCoord.y;
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage1_c0_c0_c3_c0.x, uclamp_Stage1_c0_c0_c3_c0.z);
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage1_c0_c0_c3_c0.y, uclamp_Stage1_c0_c0_c3_c0.w);
+ vec4 textureColor = texture(uTextureSampler_3_Stage1, clampedCoord);
+ _output = _input * textureColor;
+ return _output;
+}
+vec4 YUVtoRGBEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 planes[4];
+ planes[0] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0));
+ planes[1] = TextureEffect_Stage1_c0_c0_c1_c0(vec4(1.0));
+ planes[2] = TextureEffect_Stage1_c0_c0_c2_c0(vec4(1.0));
+ planes[3] = TextureEffect_Stage1_c0_c0_c3_c0(vec4(1.0));
+ vec4 color = vec4(planes[0].x, planes[2].x, planes[1].x, planes[3].w);
+ color.xyz = clamp(color.xyz * ucolorSpaceMatrix_Stage1_c0_c0 + ucolorSpaceTranslate_Stage1_c0_c0, 0.0, 1.0);
+ color.xyz *= color.w;
+ _output = color;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = YUVtoRGBEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+uniform mat3 uCoordTransformMatrix_3_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+noperspective out vec2 vTransformedCoords_3_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_3_Stage0 = (uCoordTransformMatrix_3_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/28-6.shader_test b/shaders/skia/28-6.shader_test
new file mode 100644
index 0000000..54e7664
--- /dev/null
+++ b/shaders/skia/28-6.shader_test
@@ -0,0 +1,42 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 TextureEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ vec4 planes[1];
+ planes[0] = TextureEffect_Stage1_c0_c0(vec4(1.0));
+ vec4 color = vec4(planes[0].y, planes[0].z, planes[0].x, planes[0].w);
+ color.xyz *= color.w;
+ output_Stage1 = color;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/28-61.shader_test b/shaders/skia/28-61.shader_test
new file mode 100644
index 0000000..babad9b
--- /dev/null
+++ b/shaders/skia/28-61.shader_test
@@ -0,0 +1,94 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 uscale01_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias01_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale23_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias23_Stage1_c0_c0_c1_c0;
+uniform float uthreshold_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_0_Stage0;
+ float t = -1.0;
+ {
+ {
+ float invR1 = ufocalParams_Stage1_c0_c0_c0_c0.x;
+ float fx = ufocalParams_Stage1_c0_c0_c0_c0.y;
+ float x_t = -1.0;
+ {
+ x_t = length(p) - p.x * invR1;
+ }
+ {
+ {
+ t = x_t + fx;
+ }
+ }
+ }
+ }
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 DualIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthreshold_Stage1_c0_c0_c1_c0) {
+ scale = uscale01_Stage1_c0_c0_c1_c0;
+ bias = ubias01_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale23_Stage1_c0_c0_c1_c0;
+ bias = ubias23_Stage1_c0_c0_c1_c0;
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = DualIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/28-62.shader_test b/shaders/skia/28-62.shader_test
new file mode 100644
index 0000000..0bb0f0d
--- /dev/null
+++ b/shaders/skia/28-62.shader_test
@@ -0,0 +1,110 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 uscale01_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias01_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale23_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias23_Stage1_c0_c0_c1_c0;
+uniform float uthreshold_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_0_Stage0;
+ float t = -1.0;
+ {
+ {
+ float invR1 = ufocalParams_Stage1_c0_c0_c0_c0.x;
+ float fx = ufocalParams_Stage1_c0_c0_c0_c0.y;
+ float x_t = -1.0;
+ {
+ x_t = length(p) - p.x * invR1;
+ }
+ {
+ {
+ t = x_t + fx;
+ }
+ }
+ }
+ }
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 DualIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthreshold_Stage1_c0_c0_c1_c0) {
+ scale = uscale01_Stage1_c0_c0_c1_c0;
+ bias = ubias01_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale23_Stage1_c0_c0_c1_c0;
+ bias = ubias23_Stage1_c0_c0_c1_c0;
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = DualIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_1_Stage0.x);
+ uint y = uint(vTransformedCoords_1_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ output_Stage2 = vec4(clamp(output_Stage2.xyz + value * 0.0039215688593685627, 0.0, output_Stage2.w), output_Stage2.w);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/28-63.shader_test b/shaders/skia/28-63.shader_test
new file mode 100644
index 0000000..622d028
--- /dev/null
+++ b/shaders/skia/28-63.shader_test
@@ -0,0 +1,115 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_0_Stage0;
+ float t = -1.0;
+ float v = 1.0;
+ {
+ {
+ float x_t = -1.0;
+ {
+ x_t = dot(p, p) / p.x;
+ }
+ {
+ if (x_t <= 0.0) {
+ v = -1.0;
+ }
+ }
+ {
+ {
+ t = x_t;
+ }
+ }
+ }
+ }
+ _output = vec4(t, v, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/28-64.shader_test b/shaders/skia/28-64.shader_test
new file mode 100644
index 0000000..5c75e95
--- /dev/null
+++ b/shaders/skia/28-64.shader_test
@@ -0,0 +1,103 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_0_Stage0;
+ float t = -1.0;
+ float v = 1.0;
+ {
+ {
+ float r0_2 = ufocalParams_Stage1_c0_c0_c0_c0.y;
+ t = r0_2 - p.y * p.y;
+ if (t >= 0.0) {
+ t = p.x + sqrt(t);
+ } else {
+ v = -1.0;
+ }
+ }
+ }
+ _output = vec4(t, v, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/28-65.shader_test b/shaders/skia/28-65.shader_test
new file mode 100644
index 0000000..3c28a91
--- /dev/null
+++ b/shaders/skia/28-65.shader_test
@@ -0,0 +1,99 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_0_Stage0;
+ float t = -1.0;
+ {
+ {
+ float r0 = ufocalParams_Stage1_c0_c0_c0_c0.x;
+ {
+ t = length(p) - r0;
+ }
+ }
+ }
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/28-66.shader_test b/shaders/skia/28-66.shader_test
new file mode 100644
index 0000000..1ac8f41
--- /dev/null
+++ b/shaders/skia/28-66.shader_test
@@ -0,0 +1,130 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_0_Stage0;
+ float t = -1.0;
+ float v = 1.0;
+ {
+ {
+ float x_t = -1.0;
+ {
+ x_t = dot(p, p) / p.x;
+ }
+ {
+ if (x_t <= 0.0) {
+ v = -1.0;
+ }
+ }
+ {
+ {
+ t = x_t;
+ }
+ }
+ }
+ }
+ _output = vec4(t, v, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TiledGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_1_Stage0.x);
+ uint y = uint(vTransformedCoords_1_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ output_Stage2 = vec4(clamp(output_Stage2.xyz + value * 0.0039215688593685627, 0.0, output_Stage2.w), output_Stage2.w);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/28-67.shader_test b/shaders/skia/28-67.shader_test
new file mode 100644
index 0000000..a2e68cf
--- /dev/null
+++ b/shaders/skia/28-67.shader_test
@@ -0,0 +1,118 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_0_Stage0;
+ float t = -1.0;
+ float v = 1.0;
+ {
+ {
+ float r0_2 = ufocalParams_Stage1_c0_c0_c0_c0.y;
+ t = r0_2 - p.y * p.y;
+ if (t >= 0.0) {
+ t = p.x + sqrt(t);
+ } else {
+ v = -1.0;
+ }
+ }
+ }
+ _output = vec4(t, v, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TiledGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_1_Stage0.x);
+ uint y = uint(vTransformedCoords_1_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ output_Stage2 = vec4(clamp(output_Stage2.xyz + value * 0.0039215688593685627, 0.0, output_Stage2.w), output_Stage2.w);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/28-68.shader_test b/shaders/skia/28-68.shader_test
new file mode 100644
index 0000000..699780d
--- /dev/null
+++ b/shaders/skia/28-68.shader_test
@@ -0,0 +1,114 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_0_Stage0;
+ float t = -1.0;
+ {
+ {
+ float r0 = ufocalParams_Stage1_c0_c0_c0_c0.x;
+ {
+ t = length(p) - r0;
+ }
+ }
+ }
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TiledGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_1_Stage0.x);
+ uint y = uint(vTransformedCoords_1_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ output_Stage2 = vec4(clamp(output_Stage2.xyz + value * 0.0039215688593685627, 0.0, output_Stage2.w), output_Stage2.w);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/28-69.shader_test b/shaders/skia/28-69.shader_test
new file mode 100644
index 0000000..868aa14
--- /dev/null
+++ b/shaders/skia/28-69.shader_test
@@ -0,0 +1,128 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_0_Stage0;
+ float t = -1.0;
+ float v = 1.0;
+ {
+ {
+ float x_t = -1.0;
+ {
+ x_t = dot(p, p) / p.x;
+ }
+ {
+ if (x_t <= 0.0) {
+ v = -1.0;
+ }
+ }
+ {
+ {
+ t = x_t;
+ }
+ }
+ }
+ }
+ _output = vec4(t, v, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else {
+ {
+ t.x = fract(t.x);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TiledGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_1_Stage0.x);
+ uint y = uint(vTransformedCoords_1_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ output_Stage2 = vec4(clamp(output_Stage2.xyz + value * 0.0039215688593685627, 0.0, output_Stage2.w), output_Stage2.w);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/28-7.shader_test b/shaders/skia/28-7.shader_test
new file mode 100644
index 0000000..f39cac6
--- /dev/null
+++ b/shaders/skia/28-7.shader_test
@@ -0,0 +1,64 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform mat3 ucolorSpaceMatrix_Stage1_c0_c0;
+uniform vec3 ucolorSpaceTranslate_Stage1_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_1_Stage1, vTransformedCoords_1_Stage0) * _input;
+ return _output;
+}
+vec4 YUVtoRGBEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 planes[2];
+ planes[0] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0));
+ planes[1] = TextureEffect_Stage1_c0_c0_c1_c0(vec4(1.0));
+ vec4 color = vec4(planes[0].x, planes[1].y, planes[1].x, 1.0);
+ color.xyz = clamp(color.xyz * ucolorSpaceMatrix_Stage1_c0_c0 + ucolorSpaceTranslate_Stage1_c0_c0, 0.0, 1.0);
+ _output = color;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = YUVtoRGBEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/28-70.shader_test b/shaders/skia/28-70.shader_test
new file mode 100644
index 0000000..9d036fd
--- /dev/null
+++ b/shaders/skia/28-70.shader_test
@@ -0,0 +1,116 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_0_Stage0;
+ float t = -1.0;
+ float v = 1.0;
+ {
+ {
+ float r0_2 = ufocalParams_Stage1_c0_c0_c0_c0.y;
+ t = r0_2 - p.y * p.y;
+ if (t >= 0.0) {
+ t = p.x + sqrt(t);
+ } else {
+ v = -1.0;
+ }
+ }
+ }
+ _output = vec4(t, v, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else {
+ {
+ t.x = fract(t.x);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TiledGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_1_Stage0.x);
+ uint y = uint(vTransformedCoords_1_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ output_Stage2 = vec4(clamp(output_Stage2.xyz + value * 0.0039215688593685627, 0.0, output_Stage2.w), output_Stage2.w);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/28-71.shader_test b/shaders/skia/28-71.shader_test
new file mode 100644
index 0000000..aa39e22
--- /dev/null
+++ b/shaders/skia/28-71.shader_test
@@ -0,0 +1,112 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_0_Stage0;
+ float t = -1.0;
+ {
+ {
+ float r0 = ufocalParams_Stage1_c0_c0_c0_c0.x;
+ {
+ t = length(p) - r0;
+ }
+ }
+ }
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else {
+ {
+ t.x = fract(t.x);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TiledGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_1_Stage0.x);
+ uint y = uint(vTransformedCoords_1_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ output_Stage2 = vec4(clamp(output_Stage2.xyz + value * 0.0039215688593685627, 0.0, output_Stage2.w), output_Stage2.w);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/28-72.shader_test b/shaders/skia/28-72.shader_test
new file mode 100644
index 0000000..dda2843
--- /dev/null
+++ b/shaders/skia/28-72.shader_test
@@ -0,0 +1,131 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_0_Stage0;
+ float t = -1.0;
+ float v = 1.0;
+ {
+ {
+ float x_t = -1.0;
+ {
+ x_t = dot(p, p) / p.x;
+ }
+ {
+ if (x_t <= 0.0) {
+ v = -1.0;
+ }
+ }
+ {
+ {
+ t = x_t;
+ }
+ }
+ }
+ }
+ _output = vec4(t, v, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_1_Stage0.x);
+ uint y = uint(vTransformedCoords_1_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ output_Stage2 = vec4(clamp(output_Stage2.xyz + value * 0.0039215688593685627, 0.0, output_Stage2.w), output_Stage2.w);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/28-73.shader_test b/shaders/skia/28-73.shader_test
new file mode 100644
index 0000000..d844a66
--- /dev/null
+++ b/shaders/skia/28-73.shader_test
@@ -0,0 +1,119 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_0_Stage0;
+ float t = -1.0;
+ float v = 1.0;
+ {
+ {
+ float r0_2 = ufocalParams_Stage1_c0_c0_c0_c0.y;
+ t = r0_2 - p.y * p.y;
+ if (t >= 0.0) {
+ t = p.x + sqrt(t);
+ } else {
+ v = -1.0;
+ }
+ }
+ }
+ _output = vec4(t, v, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_1_Stage0.x);
+ uint y = uint(vTransformedCoords_1_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ output_Stage2 = vec4(clamp(output_Stage2.xyz + value * 0.0039215688593685627, 0.0, output_Stage2.w), output_Stage2.w);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/28-74.shader_test b/shaders/skia/28-74.shader_test
new file mode 100644
index 0000000..07fc4ae
--- /dev/null
+++ b/shaders/skia/28-74.shader_test
@@ -0,0 +1,115 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_0_Stage0;
+ float t = -1.0;
+ {
+ {
+ float r0 = ufocalParams_Stage1_c0_c0_c0_c0.x;
+ {
+ t = length(p) - r0;
+ }
+ }
+ }
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_1_Stage0.x);
+ uint y = uint(vTransformedCoords_1_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ output_Stage2 = vec4(clamp(output_Stage2.xyz + value * 0.0039215688593685627, 0.0, output_Stage2.w), output_Stage2.w);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/28-75.shader_test b/shaders/skia/28-75.shader_test
new file mode 100644
index 0000000..496fe0f
--- /dev/null
+++ b/shaders/skia/28-75.shader_test
@@ -0,0 +1,139 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+in float vcoverage_Stage0;
+flat in vec4 vgeomDomain_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_0_Stage0;
+ float t = -1.0;
+ float v = 1.0;
+ {
+ {
+ float invR1 = ufocalParams_Stage1_c0_c0_c0_c0.x;
+ float fx = ufocalParams_Stage1_c0_c0_c0_c0.y;
+ float x_t = -1.0;
+ {
+ float temp = p.x * p.x - p.y * p.y;
+ if (temp >= 0.0) {
+ {
+ x_t = -sqrt(temp) - p.x * invR1;
+ }
+ }
+ }
+ {
+ if (x_t <= 0.0) {
+ v = -1.0;
+ }
+ }
+ {
+ {
+ t = -x_t + fx;
+ }
+ }
+ }
+ }
+ _output = vec4(t, v, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ float coverage = vcoverage_Stage0 * gl_FragCoord.w;
+ vec4 geoDomain;
+ geoDomain = vgeomDomain_Stage0;
+ if (coverage < 0.5) {
+ vec4 dists4 = clamp(vec4(1.0, 1.0, -1.0, -1.0) * (gl_FragCoord.xyxy - geoDomain), 0.0, 1.0);
+ vec2 dists2 = dists4.xy * dists4.zw;
+ coverage = min(coverage, dists2.x * dists2.y);
+ }
+ outputCoverage_Stage0 = vec4(coverage);
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1 * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec4 positionWithCoverage;
+in vec4 color;
+in vec2 localCoord;
+in vec4 geomDomain;
+out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+out float vcoverage_Stage0;
+flat out vec4 vgeomDomain_Stage0;
+void main() {
+ vec3 position = positionWithCoverage.xyz;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ vcoverage_Stage0 = positionWithCoverage.w * positionWithCoverage.z;
+ vgeomDomain_Stage0 = geomDomain;
+ gl_Position = vec4(position.x, position.y, 0.0, position.z);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/28-76.shader_test b/shaders/skia/28-76.shader_test
new file mode 100644
index 0000000..d4d4e9d
--- /dev/null
+++ b/shaders/skia/28-76.shader_test
@@ -0,0 +1,155 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+in vec2 vTransformedCoords_0_Stage0;
+in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+in float vcoverage_Stage0;
+flat in vec4 vgeomDomain_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_0_Stage0;
+ float t = -1.0;
+ float v = 1.0;
+ {
+ {
+ float invR1 = ufocalParams_Stage1_c0_c0_c0_c0.x;
+ float fx = ufocalParams_Stage1_c0_c0_c0_c0.y;
+ float x_t = -1.0;
+ {
+ float temp = p.x * p.x - p.y * p.y;
+ if (temp >= 0.0) {
+ {
+ x_t = -sqrt(temp) - p.x * invR1;
+ }
+ }
+ }
+ {
+ if (x_t <= 0.0) {
+ v = -1.0;
+ }
+ }
+ {
+ {
+ t = -x_t + fx;
+ }
+ }
+ }
+ }
+ _output = vec4(t, v, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ float coverage = vcoverage_Stage0 * gl_FragCoord.w;
+ vec4 geoDomain;
+ geoDomain = vgeomDomain_Stage0;
+ if (coverage < 0.5) {
+ vec4 dists4 = clamp(vec4(1.0, 1.0, -1.0, -1.0) * (gl_FragCoord.xyxy - geoDomain), 0.0, 1.0);
+ vec2 dists2 = dists4.xy * dists4.zw;
+ coverage = min(coverage, dists2.x * dists2.y);
+ }
+ outputCoverage_Stage0 = vec4(coverage);
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_1_Stage0.x);
+ uint y = uint(vTransformedCoords_1_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ output_Stage2 = vec4(clamp(output_Stage2.xyz + value * 0.0039215688593685627, 0.0, output_Stage2.w), output_Stage2.w);
+ }
+ {
+ sk_FragColor = output_Stage2 * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec4 positionWithCoverage;
+in vec4 color;
+in vec2 localCoord;
+in vec4 geomDomain;
+out vec2 vTransformedCoords_0_Stage0;
+out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+out float vcoverage_Stage0;
+flat out vec4 vgeomDomain_Stage0;
+void main() {
+ vec3 position = positionWithCoverage.xyz;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ vcoverage_Stage0 = positionWithCoverage.w * positionWithCoverage.z;
+ vgeomDomain_Stage0 = geomDomain;
+ gl_Position = vec4(position.x, position.y, 0.0, position.z);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/28-77.shader_test b/shaders/skia/28-77.shader_test
new file mode 100644
index 0000000..26dbe3a
--- /dev/null
+++ b/shaders/skia/28-77.shader_test
@@ -0,0 +1,118 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+noperspective in vec3 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 vTransformedCoords_0_Stage0_ensure2D = vTransformedCoords_0_Stage0.xy / vTransformedCoords_0_Stage0.z;
+ vec2 p = vTransformedCoords_0_Stage0_ensure2D;
+ float t = -1.0;
+ float v = 1.0;
+ {
+ {
+ float invR1 = ufocalParams_Stage1_c0_c0_c0_c0.x;
+ float fx = ufocalParams_Stage1_c0_c0_c0_c0.y;
+ float x_t = -1.0;
+ {
+ float temp = p.x * p.x - p.y * p.y;
+ if (temp >= 0.0) {
+ {
+ x_t = -sqrt(temp) - p.x * invR1;
+ }
+ }
+ }
+ {
+ if (x_t <= 0.0) {
+ v = -1.0;
+ }
+ }
+ {
+ {
+ t = -x_t + fx;
+ }
+ }
+ }
+ }
+ _output = vec4(t, v, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec3 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0);
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/28-78.shader_test b/shaders/skia/28-78.shader_test
new file mode 100644
index 0000000..a7e3866
--- /dev/null
+++ b/shaders/skia/28-78.shader_test
@@ -0,0 +1,134 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+noperspective in vec3 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 vTransformedCoords_0_Stage0_ensure2D = vTransformedCoords_0_Stage0.xy / vTransformedCoords_0_Stage0.z;
+ vec2 p = vTransformedCoords_0_Stage0_ensure2D;
+ float t = -1.0;
+ float v = 1.0;
+ {
+ {
+ float invR1 = ufocalParams_Stage1_c0_c0_c0_c0.x;
+ float fx = ufocalParams_Stage1_c0_c0_c0_c0.y;
+ float x_t = -1.0;
+ {
+ float temp = p.x * p.x - p.y * p.y;
+ if (temp >= 0.0) {
+ {
+ x_t = -sqrt(temp) - p.x * invR1;
+ }
+ }
+ }
+ {
+ if (x_t <= 0.0) {
+ v = -1.0;
+ }
+ }
+ {
+ {
+ t = -x_t + fx;
+ }
+ }
+ }
+ }
+ _output = vec4(t, v, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_1_Stage0.x);
+ uint y = uint(vTransformedCoords_1_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ output_Stage2 = vec4(clamp(output_Stage2.xyz + value * 0.0039215688593685627, 0.0, output_Stage2.w), output_Stage2.w);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec3 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0);
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/28-85.shader_test b/shaders/skia/28-85.shader_test
new file mode 100644
index 0000000..e332d62
--- /dev/null
+++ b/shaders/skia/28-85.shader_test
@@ -0,0 +1,54 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 ucircle_Stage1;
+uniform vec4 uinnerRect_Stage2;
+uniform vec2 uradiusPlusHalf_Stage2;
+flat in vec4 vcolor_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ float d;
+ {
+ d = (length((ucircle_Stage1.xy - gl_FragCoord.xy) * ucircle_Stage1.w) - 1.0) * ucircle_Stage1.z;
+ }
+ {
+ output_Stage1 = vec4(clamp(d, 0.0, 1.0));
+ }
+ }
+ vec4 output_Stage2;
+ {
+ vec2 dxy0 = uinnerRect_Stage2.xy - gl_FragCoord.xy;
+ vec2 dxy1 = gl_FragCoord.xy - uinnerRect_Stage2.zw;
+ vec2 dxy = max(max(dxy0, dxy1), 0.0);
+ float alpha = clamp(uradiusPlusHalf_Stage2.x - length(dxy), 0.0, 1.0);
+ output_Stage2 = output_Stage1 * alpha;
+ }
+ {
+ sk_FragColor = outputColor_Stage0 * output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 position;
+in vec4 color;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/28-88.shader_test b/shaders/skia/28-88.shader_test
new file mode 100644
index 0000000..7d36867
--- /dev/null
+++ b/shaders/skia/28-88.shader_test
@@ -0,0 +1,67 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 TextureEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = TextureEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = OverrideInputFragmentProcessor_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 blend_src_out(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_src_out(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec2 inLocalCoord;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 color = inColor;
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/28-89.shader_test b/shaders/skia/28-89.shader_test
new file mode 100644
index 0000000..ad2d98b
--- /dev/null
+++ b/shaders/skia/28-89.shader_test
@@ -0,0 +1,69 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 TextureEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = TextureEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = OverrideInputFragmentProcessor_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 blend_plus(vec4 src, vec4 dst) {
+ return min(src + dst, 1.0);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_plus(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 inColor;
+in vec2 inLocalCoord;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/28-9.shader_test b/shaders/skia/28-9.shader_test
new file mode 100644
index 0000000..f8c21eb
--- /dev/null
+++ b/shaders/skia/28-9.shader_test
@@ -0,0 +1,45 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 ucolor_Stage1;
+uniform vec4 ucolor_Stage2;
+noperspective in vec4 vcolor_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ {
+ output_Stage1 = ucolor_Stage1;
+ }
+ }
+ vec4 output_Stage2;
+ {
+ {
+ output_Stage2 = output_Stage1 * ucolor_Stage2;
+ }
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 position;
+in vec4 inColor;
+noperspective out vec4 vcolor_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = position;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/28-91.shader_test b/shaders/skia/28-91.shader_test
new file mode 100644
index 0000000..dcf3fa9
--- /dev/null
+++ b/shaders/skia/28-91.shader_test
@@ -0,0 +1,70 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uCoordTransformMatrix_2_Stage0;
+uniform vec4 uk_Stage2;
+uniform vec4 uborder_Stage2_c0_c0;
+uniform vec4 usubset_Stage2_c0_c0;
+uniform vec4 unorm_Stage2_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 TextureEffect_Stage2_c0_c0(vec4 _input, vec2 _coords) {
+ _coords = _coords * uCoordTransformMatrix_2_Stage0.xz + uCoordTransformMatrix_2_Stage0.yw;
+ vec4 _output;
+ vec2 inCoord = _coords;
+ inCoord *= unorm_Stage2_c0_c0.xy;
+ vec2 subsetCoord;
+ subsetCoord.x = inCoord.x;
+ subsetCoord.y = inCoord.y;
+ vec2 clampedCoord;
+ clampedCoord.x = subsetCoord.x;
+ clampedCoord.y = subsetCoord.y;
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord * unorm_Stage2_c0_c0.zw);
+ if (inCoord.x < usubset_Stage2_c0_c0.x || inCoord.x > usubset_Stage2_c0_c0.z) {
+ textureColor = uborder_Stage2_c0_c0;
+ }
+ if (inCoord.y < usubset_Stage2_c0_c0.y || inCoord.y > usubset_Stage2_c0_c0.w) {
+ textureColor = uborder_Stage2_c0_c0;
+ }
+ _output = _input * textureColor;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ vec4 dst = TextureEffect_Stage2_c0_c0(vec4(1.0), vTransformedCoords_1_Stage0);
+ output_Stage2 = clamp((((uk_Stage2.x * output_Stage2) * dst + uk_Stage2.y * output_Stage2) + uk_Stage2.z * dst) + uk_Stage2.w, 0.0, 1.0);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/28-92.shader_test b/shaders/skia/28-92.shader_test
new file mode 100644
index 0000000..eb8ed79
--- /dev/null
+++ b/shaders/skia/28-92.shader_test
@@ -0,0 +1,67 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec3 uedges_Stage1[8];
+flat in vec4 vcolor_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ float alpha = 1.0;
+ float edge;
+ edge = dot(uedges_Stage1[0], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage1[1], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage1[2], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage1[3], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage1[4], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage1[5], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage1[6], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage1[7], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ alpha = 1.0 - alpha;
+ output_Stage1 = vec4(alpha);
+ }
+ {
+ sk_FragColor = outputColor_Stage0 * output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 inPosition;
+in vec2 inLocalCoords;
+in vec4 color;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vcolor_Stage0 = color;
+ vec2 pos2 = inPosition;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/28-93.shader_test b/shaders/skia/28-93.shader_test
new file mode 100644
index 0000000..37ea01b
--- /dev/null
+++ b/shaders/skia/28-93.shader_test
@@ -0,0 +1,75 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec3 uedges_Stage1[6];
+uniform sampler2D uTextureSampler_0_Stage0;
+noperspective in vec2 vTextureCoords_Stage0;
+flat in int vTexIndex_Stage0;
+noperspective in vec4 vinColor_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vinColor_Stage0;
+ vec4 texColor;
+ {
+ texColor = texture(uTextureSampler_0_Stage0, vTextureCoords_Stage0);
+ }
+ outputCoverage_Stage0 = texColor;
+ }
+ vec4 output_Stage1;
+ {
+ float alpha = 1.0;
+ float edge;
+ edge = dot(uedges_Stage1[0], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage1[1], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage1[2], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage1[3], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage1[4], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage1[5], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ output_Stage1 = outputCoverage_Stage0 * alpha;
+ }
+ {
+ sk_FragColor = outputColor_Stage0 * output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform vec2 uAtlasSizeInv_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in uvec2 inTextureCoords;
+noperspective out vec2 vTextureCoords_Stage0;
+flat out int vTexIndex_Stage0;
+noperspective out vec4 vinColor_Stage0;
+void main() {
+ ivec2 signedCoords = ivec2(int(inTextureCoords.x), int(inTextureCoords.y));
+ vec2 unormTexCoords = vec2(float(signedCoords.x / 2), float(signedCoords.y / 2));
+ vTextureCoords_Stage0 = unormTexCoords * uAtlasSizeInv_Stage0;
+ vTexIndex_Stage0 = 0;
+ vinColor_Stage0 = inColor;
+ gl_Position = vec4(inPosition.x, inPosition.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/28-95.shader_test b/shaders/skia/28-95.shader_test
new file mode 100644
index 0000000..86d6927
--- /dev/null
+++ b/shaders/skia/28-95.shader_test
@@ -0,0 +1,127 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 uleftBorderColor_Stage1_c1_c0_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c1_c0_c0_c0;
+uniform vec4 ustart_Stage1_c1_c0_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c1_c0_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+vec4 ComposeOne_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_dst_in(_input, ClampedGradientEffect_Stage1_c0_c0_c0_c0(vec4(1.0)));
+ return _output;
+}
+vec4 LinearGradientLayout_Stage1_c1_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_1_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c1_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c1_c0_c0_c0_c1_c0 + t * uend_Stage1_c1_c0_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c1_c0_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c1_c0_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c1_c0_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c1_c0_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 ComposeOne_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_dst_in(_input, ClampedGradientEffect_Stage1_c1_c0_c0_c0(vec4(1.0)));
+ return _output;
+}
+vec4 blend_dst_over(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src + dst;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_dst_over(ComposeOne_Stage1_c0_c0(inputColor), ComposeOne_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/28-97.shader_test b/shaders/skia/28-97.shader_test
new file mode 100644
index 0000000..84f8052
--- /dev/null
+++ b/shaders/skia/28-97.shader_test
@@ -0,0 +1,56 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uCoordTransformMatrix_0_Stage0;
+uniform vec4 ucircle_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0(vec4 _input, vec2 _coords) {
+ _coords = _coords * uCoordTransformMatrix_0_Stage0.xz + uCoordTransformMatrix_0_Stage0.yw;
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, _coords) * _input;
+ return _output;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TextureEffect_Stage1_c0_c0(vec4(1.0), gl_FragCoord.xy);
+ }
+ vec4 output_Stage2;
+ {
+ float d;
+ {
+ d = (length((ucircle_Stage2.xy - gl_FragCoord.xy) * ucircle_Stage2.w) - 1.0) * ucircle_Stage2.z;
+ }
+ {
+ output_Stage2 = d > 0.5 ? output_Stage1 : vec4(0.0);
+ }
+ }
+ {
+ sk_FragColor = outputColor_Stage0 * output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 position;
+in vec4 color;
+noperspective out vec4 vcolor_Stage0;
+void main() {
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/28.shader_test b/shaders/skia/28.shader_test
new file mode 100644
index 0000000..e3abe77
--- /dev/null
+++ b/shaders/skia/28.shader_test
@@ -0,0 +1,42 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TextureEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/280-2.shader_test b/shaders/skia/280-2.shader_test
new file mode 100644
index 0000000..da0b6af
--- /dev/null
+++ b/shaders/skia/280-2.shader_test
@@ -0,0 +1,194 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform float uSurfaceScale_Stage1;
+uniform vec3 uLightColor_Stage1;
+uniform float uKS_Stage1;
+uniform float uShininess_Stage1;
+uniform vec4 uTexDom_Stage1;
+uniform vec3 uDecalParams_Stage1;
+uniform vec3 uLightDirection_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 light_Stage1(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ vec3 halfDir = normalize(surfaceToLight + vec3(0.0, 0.0, 1.0));
+ float colorScale = uKS_Stage1 * pow(dot(normal, halfDir), uShininess_Stage1);
+ vec3 color = lightColor * clamp(colorScale, 0.0, 1.0);
+ return vec4(color, max(max(color.x, color.y), color.z));
+}
+float sobel_Stage1(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage1(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage1(float m[9], float surfaceScale) {
+ return pointToNormal_Stage1(sobel_Stage1(0.0, 0.0, m[4], m[5], m[7], m[8], 0.66666698455810547), sobel_Stage1(0.0, 0.0, m[4], m[7], m[5], m[8], 0.66666698455810547), surfaceScale);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ vec2 coord = vTransformedCoords_0_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp0 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp5 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp6 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp7 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp8 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = uLightDirection_Stage1;
+ output_Stage1 = light_Stage1(normal_Stage1(m, uSurfaceScale_Stage1), surfaceToLight, uLightColor_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/280-3.shader_test b/shaders/skia/280-3.shader_test
new file mode 100644
index 0000000..0952676
--- /dev/null
+++ b/shaders/skia/280-3.shader_test
@@ -0,0 +1,148 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uColor_Stage0;
+uniform vec4 uboundsUniform_Stage1_c0_c0_c0_c0_c0_c0;
+uniform float uxInvZoom_Stage1_c0_c0_c0_c0_c0_c0;
+uniform float uyInvZoom_Stage1_c0_c0_c0_c0_c0_c0;
+uniform float uxInvInset_Stage1_c0_c0_c0_c0_c0_c0;
+uniform float uyInvInset_Stage1_c0_c0_c0_c0_c0_c0;
+uniform vec2 uoffset_Stage1_c0_c0_c0_c0_c0_c0;
+uniform vec4 urectH_Stage1_c0_c0_c0_c0_c1_c0;
+uniform float uinvSixSigma_Stage1_c0_c0_c0_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+uniform sampler2D uTextureSampler_2_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 MagnifierEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coord = vTransformedCoords_0_Stage0;
+ vec2 zoom_coord = uoffset_Stage1_c0_c0_c0_c0_c0_c0 + coord * vec2(uxInvZoom_Stage1_c0_c0_c0_c0_c0_c0, uyInvZoom_Stage1_c0_c0_c0_c0_c0_c0);
+ vec2 delta = (coord - uboundsUniform_Stage1_c0_c0_c0_c0_c0_c0.xy) * uboundsUniform_Stage1_c0_c0_c0_c0_c0_c0.zw;
+ delta = min(delta, vec2(1.0, 1.0) - delta);
+ delta *= vec2(uxInvInset_Stage1_c0_c0_c0_c0_c0_c0, uyInvInset_Stage1_c0_c0_c0_c0_c0_c0);
+ float weight = 0.0;
+ if (delta.x < 2.0 && delta.y < 2.0) {
+ delta = vec2(2.0, 2.0) - delta;
+ float dist = length(delta);
+ dist = max(2.0 - dist, 0.0);
+ weight = min(dist * dist, 1.0);
+ } else {
+ vec2 delta_squared = delta * delta;
+ weight = min(min(delta_squared.x, delta_squared.y), 1.0);
+ }
+ _output = texture(uTextureSampler_0_Stage1, mix(coord, zoom_coord, weight));
+ return _output;
+}
+vec4 RectBlurEffect_Stage1_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float xCoverage, yCoverage;
+ {
+ float x, y;
+ {
+ x = max(urectH_Stage1_c0_c0_c0_c0_c1_c0.x - gl_FragCoord.x, gl_FragCoord.x - urectH_Stage1_c0_c0_c0_c0_c1_c0.z);
+ y = max(urectH_Stage1_c0_c0_c0_c0_c1_c0.y - gl_FragCoord.y, gl_FragCoord.y - urectH_Stage1_c0_c0_c0_c0_c1_c0.w);
+ }
+ xCoverage = texture(uTextureSampler_1_Stage1, vec2(x * uinvSixSigma_Stage1_c0_c0_c0_c0_c1_c0, 0.5)).w;
+ yCoverage = texture(uTextureSampler_1_Stage1, vec2(y * uinvSixSigma_Stage1_c0_c0_c0_c0_c1_c0, 0.5)).w;
+ _output = (_input * xCoverage) * yCoverage;
+ }
+ _output = (_input * xCoverage) * yCoverage;
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+vec4 ComposeTwo_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_dst_in(MagnifierEffect_Stage1_c0_c0_c0_c0_c0_c0(inputColor), RectBlurEffect_Stage1_c0_c0_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 Big_Ole_Key_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = _input;
+ return _output;
+}
+vec4 blend_screen(vec4 src, vec4 dst) {
+ return src + (1.0 - src) * dst;
+}
+vec4 ComposeTwo_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_screen(ComposeTwo_Stage1_c0_c0_c0_c0(inputColor), Big_Ole_Key_Stage1_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_2_Stage1, vTransformedCoords_1_Stage0) * _input;
+ return _output;
+}
+float _blend_color_luminance(vec3 color) {
+ return dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), color);
+}
+vec3 _blend_set_color_luminance(vec3 hueSatColor, float alpha, vec3 lumColor) {
+ float lum = _blend_color_luminance(lumColor);
+ vec3 result = (lum - _blend_color_luminance(hueSatColor)) + hueSatColor;
+ float minComp = min(min(result.x, result.y), result.z);
+ float maxComp = max(max(result.x, result.y), result.z);
+ if (minComp < 0.0 && lum != minComp) {
+ result = lum + ((result - lum) * lum) / (lum - minComp);
+ }
+ if (maxComp > alpha && maxComp != lum) {
+ return lum + ((result - lum) * (alpha - lum)) / (maxComp - lum);
+ }
+ return result;
+}
+vec4 blend_color(vec4 src, vec4 dst) {
+ float alpha = dst.w * src.w;
+ vec3 sda = src.xyz * dst.w;
+ vec3 dsa = dst.xyz * src.w;
+ return vec4((((_blend_set_color_luminance(sda, alpha, dsa) + dst.xyz) - dsa) + src.xyz) - sda, (src.w + dst.w) - alpha);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = uColor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_color(ComposeTwo_Stage1_c0_c0(inputColor), TextureEffect_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 inPosition;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vec2 pos2 = (uViewM_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/280-4.shader_test b/shaders/skia/280-4.shader_test
new file mode 100644
index 0000000..a6cab03
--- /dev/null
+++ b/shaders/skia/280-4.shader_test
@@ -0,0 +1,42 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec3 vTransformedCoords_1_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = textureProj(uTextureSampler_0_Stage2, vTransformedCoords_1_Stage0) * output_Stage1;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec3 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0);
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/280-5.shader_test b/shaders/skia/280-5.shader_test
new file mode 100644
index 0000000..1ce0528
--- /dev/null
+++ b/shaders/skia/280-5.shader_test
@@ -0,0 +1,76 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 ClampFragmentProcessor_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = clamp(_input, 0.0, 1.0);
+ }
+ return _output;
+}
+vec4 ConfigConversionEffect_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = floor(_input * 255.0 + 0.5) / 255.0;
+ {
+ _output.xyz = floor((_output.xyz * _output.w) * 255.0 + 0.5) / 255.0;
+ }
+ return _output;
+}
+float _blend_color_luminance(vec3 color) {
+ return dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), color);
+}
+vec3 _blend_set_color_luminance(vec3 hueSatColor, float alpha, vec3 lumColor) {
+ float lum = _blend_color_luminance(lumColor);
+ vec3 result = (lum - _blend_color_luminance(hueSatColor)) + hueSatColor;
+ float minComp = min(min(result.x, result.y), result.z);
+ float maxComp = max(max(result.x, result.y), result.z);
+ if (minComp < 0.0 && lum != minComp) {
+ result = lum + ((result - lum) * lum) / (lum - minComp);
+ }
+ if (maxComp > alpha && maxComp != lum) {
+ return lum + ((result - lum) * (alpha - lum)) / (maxComp - lum);
+ }
+ return result;
+}
+vec4 blend_color(vec4 src, vec4 dst) {
+ float alpha = dst.w * src.w;
+ vec3 sda = src.xyz * dst.w;
+ vec3 dsa = dst.xyz * src.w;
+ return vec4((((_blend_set_color_luminance(sda, alpha, dsa) + dst.xyz) - dsa) + src.xyz) - sda, (src.w + dst.w) - alpha);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ vec4 inputColor = vec4(output_Stage1.xyz, 1.0);
+ output_Stage2 = blend_color(ClampFragmentProcessor_Stage2_c0_c0(inputColor), ConfigConversionEffect_Stage2_c1_c0(inputColor));
+ output_Stage2 *= output_Stage1.w;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/280.shader_test b/shaders/skia/280.shader_test
new file mode 100644
index 0000000..1d0a5dd
--- /dev/null
+++ b/shaders/skia/280.shader_test
@@ -0,0 +1,145 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage2;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.w) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ } else {
+ {
+ if (t < uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+vec4 ComposeOne_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_dst_in(_input, TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0)));
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = ComposeOne_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 blend_xor(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src + (1.0 - src.w) * dst;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_xor(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ {
+ output_Stage2 = output_Stage1 * ucolor_Stage2;
+ }
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 inColor;
+in vec2 inLocalCoord;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/283-2.shader_test b/shaders/skia/283-2.shader_test
new file mode 100644
index 0000000..5f0baac
--- /dev/null
+++ b/shaders/skia/283-2.shader_test
@@ -0,0 +1,194 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform float uSurfaceScale_Stage1;
+uniform vec3 uLightColor_Stage1;
+uniform float uKS_Stage1;
+uniform float uShininess_Stage1;
+uniform vec4 uTexDom_Stage1;
+uniform vec3 uDecalParams_Stage1;
+uniform vec3 uLightDirection_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 light_Stage1(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ vec3 halfDir = normalize(surfaceToLight + vec3(0.0, 0.0, 1.0));
+ float colorScale = uKS_Stage1 * pow(dot(normal, halfDir), uShininess_Stage1);
+ vec3 color = lightColor * clamp(colorScale, 0.0, 1.0);
+ return vec4(color, max(max(color.x, color.y), color.z));
+}
+float sobel_Stage1(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage1(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage1(float m[9], float surfaceScale) {
+ return pointToNormal_Stage1(sobel_Stage1(0.0, 0.0, m[3], m[5], m[6], m[8], 0.33333298563957214), sobel_Stage1(0.0, 0.0, m[4], m[7], m[5], m[8], 0.5), surfaceScale);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ vec2 coord = vTransformedCoords_0_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp0 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp5 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp6 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp7 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp8 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = uLightDirection_Stage1;
+ output_Stage1 = light_Stage1(normal_Stage1(m, uSurfaceScale_Stage1), surfaceToLight, uLightColor_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/283-4.shader_test b/shaders/skia/283-4.shader_test
new file mode 100644
index 0000000..0536476
--- /dev/null
+++ b/shaders/skia/283-4.shader_test
@@ -0,0 +1,100 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uinnerRect_Stage2_c0_c0;
+uniform vec4 uinvRadiiLTRB_Stage2_c0_c0;
+uniform float uinnerThreshold_Stage2_c1_c0;
+uniform float uouterThreshold_Stage2_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 EllipticalRRect_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 dxy0 = uinnerRect_Stage2_c0_c0.xy - gl_FragCoord.xy;
+ vec2 dxy1 = gl_FragCoord.xy - uinnerRect_Stage2_c0_c0.zw;
+ vec2 dxy = max(max(dxy0, dxy1), 0.0);
+ vec2 Z = max(max(dxy0 * uinvRadiiLTRB_Stage2_c0_c0.xy, dxy1 * uinvRadiiLTRB_Stage2_c0_c0.zw), 0.0);
+ float implicit = dot(Z, dxy) - 1.0;
+ float grad_dot = 4.0 * dot(Z, Z);
+ grad_dot = max(grad_dot, 9.9999997473787516e-05);
+ float approx_dist = implicit * inversesqrt(grad_dot);
+ float alpha = clamp(0.5 - approx_dist, 0.0, 1.0);
+ _output = _input * alpha;
+ return _output;
+}
+vec4 AlphaThresholdFragmentProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 color = _input;
+ vec4 mask_color = texture(uTextureSampler_0_Stage2, vTransformedCoords_1_Stage0);
+ if (mask_color.w < 0.5) {
+ if (color.w > uouterThreshold_Stage2_c1_c0) {
+ float scale = uouterThreshold_Stage2_c1_c0 / color.w;
+ color.xyz *= scale;
+ color.w = uouterThreshold_Stage2_c1_c0;
+ }
+ } else if (color.w < uinnerThreshold_Stage2_c1_c0) {
+ float scale = uinnerThreshold_Stage2_c1_c0 / max(0.0010000000474974513, color.w);
+ color.xyz *= scale;
+ color.w = uinnerThreshold_Stage2_c1_c0;
+ }
+ _output = color;
+ return _output;
+}
+float _guarded_divide(float n, float d) {
+ return n / d;
+}
+float _color_dodge_component(float sc, float sa, float dc, float da) {
+ if (dc == 0.0) {
+ return sc * (1.0 - da);
+ } else {
+ float d = sa - sc;
+ if (d == 0.0) {
+ return (sa * da + sc * (1.0 - da)) + dc * (1.0 - sa);
+ }
+ d = min(da, _guarded_divide(dc * sa, d));
+ return (d * sa + sc * (1.0 - da)) + dc * (1.0 - sa);
+ }
+}
+vec4 blend_color_dodge(vec4 src, vec4 dst) {
+ return vec4(_color_dodge_component(src.x, src.w, dst.x, dst.w), _color_dodge_component(src.y, src.w, dst.y, dst.w), _color_dodge_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ vec4 inputColor = vec4(output_Stage1.xyz, 1.0);
+ output_Stage2 = blend_color_dodge(EllipticalRRect_Stage2_c0_c0(inputColor), AlphaThresholdFragmentProcessor_Stage2_c1_c0(inputColor));
+ output_Stage2 *= output_Stage1.w;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/283-5.shader_test b/shaders/skia/283-5.shader_test
new file mode 100644
index 0000000..8795c92
--- /dev/null
+++ b/shaders/skia/283-5.shader_test
@@ -0,0 +1,75 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uinnerRect_Stage2_c0_c0;
+uniform vec2 uradiusPlusHalf_Stage2_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 CircularRRect_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 dxy0 = uinnerRect_Stage2_c0_c0.xy - gl_FragCoord.xy;
+ vec2 dxy1 = gl_FragCoord.xy - uinnerRect_Stage2_c0_c0.zw;
+ vec2 dxy = max(max(dxy0, dxy1), 0.0);
+ float alpha = clamp(uradiusPlusHalf_Stage2_c0_c0.x - length(dxy), 0.0, 1.0);
+ _output = _input * alpha;
+ return _output;
+}
+vec4 ClampFragmentProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ float alpha = clamp(_input.w, 0.0, 1.0);
+ _output = vec4(clamp(_input.xyz, 0.0, alpha), alpha);
+ }
+ return _output;
+}
+float _guarded_divide(float n, float d) {
+ return n / d;
+}
+float _color_burn_component(float sc, float sa, float dc, float da) {
+ if (da == dc) {
+ return (sa * da + sc * (1.0 - da)) + dc * (1.0 - sa);
+ } else if (sc == 0.0) {
+ return dc * (1.0 - sa);
+ }
+ float d = max(0.0, da - _guarded_divide((da - dc) * sa, sc));
+ return (d * sa + sc * (1.0 - da)) + dc * (1.0 - sa);
+}
+vec4 blend_color_burn(vec4 src, vec4 dst) {
+ return vec4(_color_burn_component(src.x, src.w, dst.x, dst.w), _color_burn_component(src.y, src.w, dst.y, dst.w), _color_burn_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ vec4 inputColor = vec4(output_Stage1.xyz, 1.0);
+ output_Stage2 = blend_color_burn(CircularRRect_Stage2_c0_c0(inputColor), ClampFragmentProcessor_Stage2_c1_c0(inputColor));
+ output_Stage2 *= output_Stage1.w;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/283.shader_test b/shaders/skia/283.shader_test
new file mode 100644
index 0000000..0b53c78
--- /dev/null
+++ b/shaders/skia/283.shader_test
@@ -0,0 +1,68 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 ucolor_Stage1_c0_c0_c0_c0;
+uniform vec4 ucolor_Stage2;
+noperspective in vec4 vcolor_Stage0;
+vec4 ConstColorProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = _input.w * ucolor_Stage1_c0_c0_c0_c0;
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = ConstColorProcessor_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 blend_xor(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src + (1.0 - src.w) * dst;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_xor(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ {
+ output_Stage2 = output_Stage1 * ucolor_Stage2;
+ }
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 position;
+in vec4 inColor;
+noperspective out vec4 vcolor_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/286-2.shader_test b/shaders/skia/286-2.shader_test
new file mode 100644
index 0000000..6a9cb4e
--- /dev/null
+++ b/shaders/skia/286-2.shader_test
@@ -0,0 +1,194 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform float uSurfaceScale_Stage1;
+uniform vec3 uLightColor_Stage1;
+uniform float uKS_Stage1;
+uniform float uShininess_Stage1;
+uniform vec4 uTexDom_Stage1;
+uniform vec3 uDecalParams_Stage1;
+uniform vec3 uLightDirection_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 light_Stage1(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ vec3 halfDir = normalize(surfaceToLight + vec3(0.0, 0.0, 1.0));
+ float colorScale = uKS_Stage1 * pow(dot(normal, halfDir), uShininess_Stage1);
+ vec3 color = lightColor * clamp(colorScale, 0.0, 1.0);
+ return vec4(color, max(max(color.x, color.y), color.z));
+}
+float sobel_Stage1(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage1(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage1(float m[9], float surfaceScale) {
+ return pointToNormal_Stage1(sobel_Stage1(0.0, 0.0, m[3], m[4], m[6], m[7], 0.66666698455810547), sobel_Stage1(m[3], m[6], m[4], m[7], 0.0, 0.0, 0.66666698455810547), surfaceScale);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ vec2 coord = vTransformedCoords_0_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp0 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp5 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp6 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp7 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp8 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = uLightDirection_Stage1;
+ output_Stage1 = light_Stage1(normal_Stage1(m, uSurfaceScale_Stage1), surfaceToLight, uLightColor_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/286-3.shader_test b/shaders/skia/286-3.shader_test
new file mode 100644
index 0000000..76fb8c4
--- /dev/null
+++ b/shaders/skia/286-3.shader_test
@@ -0,0 +1,65 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform vec4 uKernel_Stage1[3];
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0 - 4.0 * uImageIncrement_Stage1;
+ vec2 coordSampled = vec2(0.0, 0.0);
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].x;
+ coord += uImageIncrement_Stage1;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ sk_FragColor = sk_FragColor.wwww;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/286-4.shader_test b/shaders/skia/286-4.shader_test
new file mode 100644
index 0000000..509fd89
--- /dev/null
+++ b/shaders/skia/286-4.shader_test
@@ -0,0 +1,64 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 ucolor_Stage2_c0_c0;
+uniform vec4 ucircle_Stage2_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 ConstColorProcessor_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = _input * ucolor_Stage2_c0_c0;
+ }
+ return _output;
+}
+vec4 CircleEffect_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ float d;
+ {
+ d = (1.0 - length((ucircle_Stage2_c1_c0.xy - gl_FragCoord.xy) * ucircle_Stage2_c1_c0.w)) * ucircle_Stage2_c1_c0.z;
+ }
+ {
+ _output = d > 0.5 ? _input : vec4(0.0);
+ }
+ return _output;
+}
+vec4 blend_src_out(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ vec4 inputColor = vec4(output_Stage1.xyz, 1.0);
+ output_Stage2 = blend_src_out(ConstColorProcessor_Stage2_c0_c0(inputColor), CircleEffect_Stage2_c1_c0(inputColor));
+ output_Stage2 *= output_Stage1.w;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/286-5.shader_test b/shaders/skia/286-5.shader_test
new file mode 100644
index 0000000..7734177
--- /dev/null
+++ b/shaders/skia/286-5.shader_test
@@ -0,0 +1,128 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage2_c0_c0;
+uniform vec2 uBounds_Stage2_c0_c0;
+uniform vec4 uKernel_Stage2_c0_c0[4];
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 GaussianConvolution_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_1_Stage0 - 6.0 * uImageIncrement_Stage2_c0_c0;
+ vec2 coordSampled = vec2(0.0, 0.0);
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage2_c0_c0.x, uBounds_Stage2_c0_c0.y);
+ _output += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2_c0_c0[0].x;
+ coord += uImageIncrement_Stage2_c0_c0;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage2_c0_c0.x, uBounds_Stage2_c0_c0.y);
+ _output += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2_c0_c0[0].y;
+ coord += uImageIncrement_Stage2_c0_c0;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage2_c0_c0.x, uBounds_Stage2_c0_c0.y);
+ _output += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2_c0_c0[0].z;
+ coord += uImageIncrement_Stage2_c0_c0;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage2_c0_c0.x, uBounds_Stage2_c0_c0.y);
+ _output += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2_c0_c0[0].w;
+ coord += uImageIncrement_Stage2_c0_c0;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage2_c0_c0.x, uBounds_Stage2_c0_c0.y);
+ _output += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2_c0_c0[1].x;
+ coord += uImageIncrement_Stage2_c0_c0;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage2_c0_c0.x, uBounds_Stage2_c0_c0.y);
+ _output += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2_c0_c0[1].y;
+ coord += uImageIncrement_Stage2_c0_c0;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage2_c0_c0.x, uBounds_Stage2_c0_c0.y);
+ _output += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2_c0_c0[1].z;
+ coord += uImageIncrement_Stage2_c0_c0;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage2_c0_c0.x, uBounds_Stage2_c0_c0.y);
+ _output += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2_c0_c0[1].w;
+ coord += uImageIncrement_Stage2_c0_c0;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage2_c0_c0.x, uBounds_Stage2_c0_c0.y);
+ _output += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2_c0_c0[2].x;
+ coord += uImageIncrement_Stage2_c0_c0;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage2_c0_c0.x, uBounds_Stage2_c0_c0.y);
+ _output += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2_c0_c0[2].y;
+ coord += uImageIncrement_Stage2_c0_c0;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage2_c0_c0.x, uBounds_Stage2_c0_c0.y);
+ _output += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2_c0_c0[2].z;
+ coord += uImageIncrement_Stage2_c0_c0;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage2_c0_c0.x, uBounds_Stage2_c0_c0.y);
+ _output += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2_c0_c0[2].w;
+ coord += uImageIncrement_Stage2_c0_c0;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage2_c0_c0.x, uBounds_Stage2_c0_c0.y);
+ _output += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2_c0_c0[3].x;
+ coord += uImageIncrement_Stage2_c0_c0;
+ _output *= _input;
+ return _output;
+}
+vec4 ClampFragmentProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = clamp(_input, 0.0, 1.0);
+ }
+ return _output;
+}
+float _blend_overlay_component(float sc, float sa, float dc, float da) {
+ if (2.0 * dc <= da) {
+ return (2.0 * sc) * dc;
+ }
+ return sa * da - (2.0 * (da - dc)) * (sa - sc);
+}
+vec4 blend_overlay(vec4 src, vec4 dst) {
+ vec4 result = vec4(_blend_overlay_component(src.x, src.w, dst.x, dst.w), _blend_overlay_component(src.y, src.w, dst.y, dst.w), _blend_overlay_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+ result.xyz += dst.xyz * (1.0 - src.w) + src.xyz * (1.0 - dst.w);
+ return result;
+}
+vec4 blend_hard_light(vec4 src, vec4 dst) {
+ return blend_overlay(dst, src);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ vec4 inputColor = vec4(output_Stage1.xyz, 1.0);
+ output_Stage2 = blend_hard_light(GaussianConvolution_Stage2_c0_c0(inputColor), ClampFragmentProcessor_Stage2_c1_c0(inputColor));
+ output_Stage2 *= output_Stage1.w;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/286.shader_test b/shaders/skia/286.shader_test
new file mode 100644
index 0000000..6d5f465
--- /dev/null
+++ b/shaders/skia/286.shader_test
@@ -0,0 +1,165 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage2;
+uniform vec4 ucolor_Stage3_c1_c0;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.w) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ } else {
+ {
+ if (t < uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+vec4 ComposeOne_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_dst_in(_input, TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0)));
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = ComposeOne_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 ConstColorProcessor_Stage3_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage3_c1_c0;
+ }
+ return _output;
+}
+vec4 blend_xor(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src + (1.0 - src.w) * dst;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 blend_darken(vec4 src, vec4 dst) {
+ vec4 result = blend_src_over(src, dst);
+ result.xyz = min(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
+ return result;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_xor(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ {
+ output_Stage2 = output_Stage1 * ucolor_Stage2;
+ }
+ }
+ vec4 output_Stage3;
+ {
+ output_Stage3 = blend_darken(ConstColorProcessor_Stage3_c1_c0(vec4(1.0)), output_Stage2);
+ }
+ {
+ sk_FragColor = output_Stage3;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 inColor;
+in vec2 inLocalCoord;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/289-2.shader_test b/shaders/skia/289-2.shader_test
new file mode 100644
index 0000000..8aa5b9d
--- /dev/null
+++ b/shaders/skia/289-2.shader_test
@@ -0,0 +1,194 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform float uSurfaceScale_Stage1;
+uniform vec3 uLightColor_Stage1;
+uniform float uKS_Stage1;
+uniform float uShininess_Stage1;
+uniform vec4 uTexDom_Stage1;
+uniform vec3 uDecalParams_Stage1;
+uniform vec3 uLightDirection_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 light_Stage1(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ vec3 halfDir = normalize(surfaceToLight + vec3(0.0, 0.0, 1.0));
+ float colorScale = uKS_Stage1 * pow(dot(normal, halfDir), uShininess_Stage1);
+ vec3 color = lightColor * clamp(colorScale, 0.0, 1.0);
+ return vec4(color, max(max(color.x, color.y), color.z));
+}
+float sobel_Stage1(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage1(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage1(float m[9], float surfaceScale) {
+ return pointToNormal_Stage1(sobel_Stage1(m[1], m[2], m[4], m[5], m[7], m[8], 0.5), sobel_Stage1(0.0, 0.0, m[1], m[7], m[2], m[8], 0.33333298563957214), surfaceScale);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ vec2 coord = vTransformedCoords_0_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp0 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp5 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp6 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp7 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp8 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = uLightDirection_Stage1;
+ output_Stage1 = light_Stage1(normal_Stage1(m, uSurfaceScale_Stage1), surfaceToLight, uLightColor_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/289-3.shader_test b/shaders/skia/289-3.shader_test
new file mode 100644
index 0000000..b9da9d0
--- /dev/null
+++ b/shaders/skia/289-3.shader_test
@@ -0,0 +1,75 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform vec2 uBounds_Stage1;
+uniform vec4 uKernel_Stage1[3];
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0 - 4.0 * uImageIncrement_Stage1;
+ vec2 coordSampled = vec2(0.0, 0.0);
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].x;
+ coord += uImageIncrement_Stage1;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ sk_FragColor = sk_FragColor.wwww;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/289-4.shader_test b/shaders/skia/289-4.shader_test
new file mode 100644
index 0000000..58c8b24
--- /dev/null
+++ b/shaders/skia/289-4.shader_test
@@ -0,0 +1,70 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 ucircleData_Stage2_c0_c0;
+uniform vec3 uedges_Stage2_c1_c0[3];
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 CircleBlurFragmentProcessor_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 vec = vec2((gl_FragCoord.x - ucircleData_Stage2_c0_c0.x) * ucircleData_Stage2_c0_c0.w, (gl_FragCoord.y - ucircleData_Stage2_c0_c0.y) * ucircleData_Stage2_c0_c0.w);
+ float dist = length(vec) + (0.5 - ucircleData_Stage2_c0_c0.z) * ucircleData_Stage2_c0_c0.w;
+ _output = _input * texture(uTextureSampler_0_Stage2, vec2(dist, 0.5)).w;
+ return _output;
+}
+vec4 ConvexPoly_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ float alpha = 1.0;
+ float edge;
+ edge = dot(uedges_Stage2_c1_c0[0], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage2_c1_c0[1], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage2_c1_c0[2], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ _output = _input * alpha;
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ vec4 inputColor = vec4(output_Stage1.xyz, 1.0);
+ output_Stage2 = blend_src_in(CircleBlurFragmentProcessor_Stage2_c0_c0(inputColor), ConvexPoly_Stage2_c1_c0(inputColor));
+ output_Stage2 *= output_Stage1.w;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/289-5.shader_test b/shaders/skia/289-5.shader_test
new file mode 100644
index 0000000..e635963
--- /dev/null
+++ b/shaders/skia/289-5.shader_test
@@ -0,0 +1,62 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uinnerRect_Stage2_c0_c0;
+uniform vec2 uradiusPlusHalf_Stage2_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 CircularRRect_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 dxy0 = uinnerRect_Stage2_c0_c0.xy - gl_FragCoord.xy;
+ vec2 dxy1 = gl_FragCoord.xy - uinnerRect_Stage2_c0_c0.zw;
+ vec2 dxy = max(max(dxy0, dxy1), 0.0);
+ float alpha = clamp(uradiusPlusHalf_Stage2_c0_c0.x - length(dxy), 0.0, 1.0);
+ _output = _input * alpha;
+ return _output;
+}
+vec4 ClampFragmentProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = clamp(_input, 0.0, 1.0);
+ }
+ return _output;
+}
+vec4 blend_plus(vec4 src, vec4 dst) {
+ return min(src + dst, 1.0);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ vec4 inputColor = vec4(output_Stage1.xyz, 1.0);
+ output_Stage2 = blend_plus(CircularRRect_Stage2_c0_c0(inputColor), ClampFragmentProcessor_Stage2_c1_c0(inputColor));
+ output_Stage2 *= output_Stage1.w;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/289.shader_test b/shaders/skia/289.shader_test
new file mode 100644
index 0000000..e351b95
--- /dev/null
+++ b/shaders/skia/289.shader_test
@@ -0,0 +1,88 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 ucolor_Stage1_c0_c0_c0_c0;
+uniform vec4 ucolor_Stage2;
+uniform vec4 ucolor_Stage3_c1_c0;
+noperspective in vec4 vcolor_Stage0;
+vec4 ConstColorProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = _input.w * ucolor_Stage1_c0_c0_c0_c0;
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = ConstColorProcessor_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 ConstColorProcessor_Stage3_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage3_c1_c0;
+ }
+ return _output;
+}
+vec4 blend_xor(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src + (1.0 - src.w) * dst;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 blend_darken(vec4 src, vec4 dst) {
+ vec4 result = blend_src_over(src, dst);
+ result.xyz = min(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
+ return result;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_xor(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ {
+ output_Stage2 = output_Stage1 * ucolor_Stage2;
+ }
+ }
+ vec4 output_Stage3;
+ {
+ output_Stage3 = blend_darken(ConstColorProcessor_Stage3_c1_c0(vec4(1.0)), output_Stage2);
+ }
+ {
+ sk_FragColor = output_Stage3;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 position;
+in vec4 inColor;
+noperspective out vec4 vcolor_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/292-2.shader_test b/shaders/skia/292-2.shader_test
new file mode 100644
index 0000000..4a2b72b
--- /dev/null
+++ b/shaders/skia/292-2.shader_test
@@ -0,0 +1,194 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform float uSurfaceScale_Stage1;
+uniform vec3 uLightColor_Stage1;
+uniform float uKS_Stage1;
+uniform float uShininess_Stage1;
+uniform vec4 uTexDom_Stage1;
+uniform vec3 uDecalParams_Stage1;
+uniform vec3 uLightDirection_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 light_Stage1(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ vec3 halfDir = normalize(surfaceToLight + vec3(0.0, 0.0, 1.0));
+ float colorScale = uKS_Stage1 * pow(dot(normal, halfDir), uShininess_Stage1);
+ vec3 color = lightColor * clamp(colorScale, 0.0, 1.0);
+ return vec4(color, max(max(color.x, color.y), color.z));
+}
+float sobel_Stage1(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage1(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage1(float m[9], float surfaceScale) {
+ return pointToNormal_Stage1(sobel_Stage1(m[0], m[2], m[3], m[5], m[6], m[8], 0.25), sobel_Stage1(m[0], m[6], m[1], m[7], m[2], m[8], 0.25), surfaceScale);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ vec2 coord = vTransformedCoords_0_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp0 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp5 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp6 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp7 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp8 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = uLightDirection_Stage1;
+ output_Stage1 = light_Stage1(normal_Stage1(m, uSurfaceScale_Stage1), surfaceToLight, uLightColor_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/292-3.shader_test b/shaders/skia/292-3.shader_test
new file mode 100644
index 0000000..7340010
--- /dev/null
+++ b/shaders/skia/292-3.shader_test
@@ -0,0 +1,27 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+noperspective in vec4 vcolor_Stage0;
+void main() {
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec2 inLocalCoord;
+noperspective out vec4 vcolor_Stage0;
+void main() {
+ vec4 color = inColor;
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/292-4.shader_test b/shaders/skia/292-4.shader_test
new file mode 100644
index 0000000..92c1277
--- /dev/null
+++ b/shaders/skia/292-4.shader_test
@@ -0,0 +1,229 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage2_c0_c0;
+uniform float uSurfaceScale_Stage2_c0_c0;
+uniform vec3 uLightColor_Stage2_c0_c0;
+uniform float uKS_Stage2_c0_c0;
+uniform float uShininess_Stage2_c0_c0;
+uniform vec4 uTexDom_Stage2_c0_c0;
+uniform vec3 uDecalParams_Stage2_c0_c0;
+uniform vec3 uLightDirection_Stage2_c0_c0;
+uniform vec4 urectUniform_Stage2_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 light_Stage2_c0_c0(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ vec3 halfDir = normalize(surfaceToLight + vec3(0.0, 0.0, 1.0));
+ float colorScale = uKS_Stage2_c0_c0 * pow(dot(normal, halfDir), uShininess_Stage2_c0_c0);
+ vec3 color = lightColor * clamp(colorScale, 0.0, 1.0);
+ return vec4(color, max(max(color.x, color.y), color.z));
+}
+float sobel_Stage2_c0_c0(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage2_c0_c0(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage2_c0_c0(float m[9], float surfaceScale) {
+ return pointToNormal_Stage2_c0_c0(sobel_Stage2_c0_c0(0.0, 0.0, m[3], m[4], m[6], m[7], 0.66666698455810547), sobel_Stage2_c0_c0(m[3], m[6], m[4], m[7], 0.0, 0.0, 0.66666698455810547), surfaceScale);
+}
+vec4 SpecularLighting_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coord = vTransformedCoords_1_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c0_c0.y);
+ if (err > uDecalParams_Stage2_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp0 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c0_c0.y);
+ if (err > uDecalParams_Stage2_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c0_c0.y);
+ if (err > uDecalParams_Stage2_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c0_c0.y);
+ if (err > uDecalParams_Stage2_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c0_c0.y);
+ if (err > uDecalParams_Stage2_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c0_c0.y);
+ if (err > uDecalParams_Stage2_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp5 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c0_c0.y);
+ if (err > uDecalParams_Stage2_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp6 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c0_c0.y);
+ if (err > uDecalParams_Stage2_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp7 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c0_c0.y);
+ if (err > uDecalParams_Stage2_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp8 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = uLightDirection_Stage2_c0_c0;
+ _output = light_Stage2_c0_c0(normal_Stage2_c0_c0(m, uSurfaceScale_Stage2_c0_c0), surfaceToLight, uLightColor_Stage2_c0_c0);
+ _output *= _input;
+ return _output;
+}
+vec4 AARectEffect_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ float alpha;
+ {
+ alpha = float(all(greaterThan(vec4(gl_FragCoord.xy, urectUniform_Stage2_c1_c0.zw), vec4(urectUniform_Stage2_c1_c0.xy, gl_FragCoord.xy))) ? 1 : 0);
+ }
+ {
+ alpha = 1.0 - alpha;
+ }
+ _output = _input * alpha;
+ return _output;
+}
+vec4 blend_xor(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src + (1.0 - src.w) * dst;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ vec4 inputColor = vec4(output_Stage1.xyz, 1.0);
+ output_Stage2 = blend_xor(SpecularLighting_Stage2_c0_c0(inputColor), AARectEffect_Stage2_c1_c0(inputColor));
+ output_Stage2 *= output_Stage1.w;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/292-5.shader_test b/shaders/skia/292-5.shader_test
new file mode 100644
index 0000000..104cff1
--- /dev/null
+++ b/shaders/skia/292-5.shader_test
@@ -0,0 +1,57 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 ClampFragmentProcessor_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = clamp(_input, 0.0, 1.0);
+ }
+ return _output;
+}
+vec4 ClampFragmentProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ float alpha = clamp(_input.w, 0.0, 1.0);
+ _output = vec4(clamp(_input.xyz, 0.0, alpha), alpha);
+ }
+ return _output;
+}
+vec4 blend_modulate(vec4 src, vec4 dst) {
+ return src * dst;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ vec4 inputColor = vec4(output_Stage1.xyz, 1.0);
+ output_Stage2 = blend_modulate(ClampFragmentProcessor_Stage2_c0_c0(inputColor), ClampFragmentProcessor_Stage2_c1_c0(inputColor));
+ output_Stage2 *= output_Stage1.w;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/292.shader_test b/shaders/skia/292.shader_test
new file mode 100644
index 0000000..8ccb2a1
--- /dev/null
+++ b/shaders/skia/292.shader_test
@@ -0,0 +1,132 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.w) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ } else {
+ {
+ if (t < uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = OverrideInputFragmentProcessor_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 blend_plus(vec4 src, vec4 dst) {
+ return min(src + dst, 1.0);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_plus(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 inColor;
+in vec2 inLocalCoord;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/295-2.shader_test b/shaders/skia/295-2.shader_test
new file mode 100644
index 0000000..a58b516
--- /dev/null
+++ b/shaders/skia/295-2.shader_test
@@ -0,0 +1,194 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform float uSurfaceScale_Stage1;
+uniform vec3 uLightColor_Stage1;
+uniform float uKS_Stage1;
+uniform float uShininess_Stage1;
+uniform vec4 uTexDom_Stage1;
+uniform vec3 uDecalParams_Stage1;
+uniform vec3 uLightDirection_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 light_Stage1(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ vec3 halfDir = normalize(surfaceToLight + vec3(0.0, 0.0, 1.0));
+ float colorScale = uKS_Stage1 * pow(dot(normal, halfDir), uShininess_Stage1);
+ vec3 color = lightColor * clamp(colorScale, 0.0, 1.0);
+ return vec4(color, max(max(color.x, color.y), color.z));
+}
+float sobel_Stage1(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage1(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage1(float m[9], float surfaceScale) {
+ return pointToNormal_Stage1(sobel_Stage1(m[0], m[1], m[3], m[4], m[6], m[7], 0.5), sobel_Stage1(m[0], m[6], m[1], m[7], 0.0, 0.0, 0.33333298563957214), surfaceScale);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ vec2 coord = vTransformedCoords_0_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp0 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp5 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp6 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp7 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp8 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = uLightDirection_Stage1;
+ output_Stage1 = light_Stage1(normal_Stage1(m, uSurfaceScale_Stage1), surfaceToLight, uLightColor_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/295-4.shader_test b/shaders/skia/295-4.shader_test
new file mode 100644
index 0000000..100bc03
--- /dev/null
+++ b/shaders/skia/295-4.shader_test
@@ -0,0 +1,100 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform float uinnerThreshold_Stage2_c0_c0;
+uniform float uouterThreshold_Stage2_c0_c0;
+uniform vec2 uScale_Stage2_c1_c0;
+uniform vec4 uTexDom_Stage2_c1_c0;
+uniform vec3 uDecalParams_Stage2_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+uniform sampler2D uTextureSampler_1_Stage2;
+uniform sampler2D uTextureSampler_2_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+noperspective in vec2 vTransformedCoords_3_Stage0;
+vec4 AlphaThresholdFragmentProcessor_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 color = _input;
+ vec4 mask_color = texture(uTextureSampler_0_Stage2, vTransformedCoords_1_Stage0);
+ if (mask_color.w < 0.5) {
+ if (color.w > uouterThreshold_Stage2_c0_c0) {
+ float scale = uouterThreshold_Stage2_c0_c0 / color.w;
+ color.xyz *= scale;
+ color.w = uouterThreshold_Stage2_c0_c0;
+ }
+ } else if (color.w < uinnerThreshold_Stage2_c0_c0) {
+ float scale = uinnerThreshold_Stage2_c0_c0 / max(0.0010000000474974513, color.w);
+ color.xyz *= scale;
+ color.w = uinnerThreshold_Stage2_c0_c0;
+ }
+ _output = color;
+ return _output;
+}
+vec4 DisplacementMap_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 dColor = texture(uTextureSampler_1_Stage2, vTransformedCoords_2_Stage0);
+ dColor.xyz = dColor.w < 9.9999999747524271e-07 ? vec3(0.0) : clamp(dColor.xyz / dColor.w, 0.0, 1.0);
+ vec2 cCoords = vTransformedCoords_3_Stage0 + uScale_Stage2_c1_c0 * (dColor.wz - vec2(0.5));
+ {
+ vec2 origCoord = cCoords;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c1_c0.xy, uTexDom_Stage2_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_2_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c1_c0.y);
+ if (err > uDecalParams_Stage2_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ _output = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ return _output;
+}
+vec4 blend_screen(vec4 src, vec4 dst) {
+ return src + (1.0 - src) * dst;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ vec4 inputColor = vec4(output_Stage1.xyz, 1.0);
+ output_Stage2 = blend_screen(AlphaThresholdFragmentProcessor_Stage2_c0_c0(inputColor), DisplacementMap_Stage2_c1_c0(inputColor));
+ output_Stage2 *= output_Stage1.w;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+uniform mat3 uCoordTransformMatrix_3_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+noperspective out vec2 vTransformedCoords_3_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_3_Stage0 = (uCoordTransformMatrix_3_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/295-5.shader_test b/shaders/skia/295-5.shader_test
new file mode 100644
index 0000000..317eb20
--- /dev/null
+++ b/shaders/skia/295-5.shader_test
@@ -0,0 +1,63 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 ucircle_Stage2_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 ClampFragmentProcessor_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = clamp(_input, 0.0, 1.0);
+ }
+ return _output;
+}
+vec4 CircleEffect_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ float d;
+ {
+ d = (length((ucircle_Stage2_c1_c0.xy - gl_FragCoord.xy) * ucircle_Stage2_c1_c0.w) - 1.0) * ucircle_Stage2_c1_c0.z;
+ }
+ {
+ _output = _input * clamp(d, 0.0, 1.0);
+ }
+ return _output;
+}
+vec4 blend_difference(vec4 src, vec4 dst) {
+ return vec4((src.xyz + dst.xyz) - 2.0 * min(src.xyz * dst.w, dst.xyz * src.w), src.w + (1.0 - src.w) * dst.w);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ vec4 inputColor = vec4(output_Stage1.xyz, 1.0);
+ output_Stage2 = blend_difference(ClampFragmentProcessor_Stage2_c0_c0(inputColor), CircleEffect_Stage2_c1_c0(inputColor));
+ output_Stage2 *= output_Stage1.w;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/295.shader_test b/shaders/skia/295.shader_test
new file mode 100644
index 0000000..309bfbb
--- /dev/null
+++ b/shaders/skia/295.shader_test
@@ -0,0 +1,61 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 ucolor_Stage1_c0_c0_c0_c0;
+noperspective in vec4 vcolor_Stage0;
+vec4 ConstColorProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = _input.w * ucolor_Stage1_c0_c0_c0_c0;
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = ConstColorProcessor_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 blend_plus(vec4 src, vec4 dst) {
+ return min(src + dst, 1.0);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_plus(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 position;
+in vec4 inColor;
+noperspective out vec4 vcolor_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/298-2.shader_test b/shaders/skia/298-2.shader_test
new file mode 100644
index 0000000..853d6d7
--- /dev/null
+++ b/shaders/skia/298-2.shader_test
@@ -0,0 +1,194 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform float uSurfaceScale_Stage1;
+uniform vec3 uLightColor_Stage1;
+uniform float uKS_Stage1;
+uniform float uShininess_Stage1;
+uniform vec4 uTexDom_Stage1;
+uniform vec3 uDecalParams_Stage1;
+uniform vec3 uLightDirection_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 light_Stage1(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ vec3 halfDir = normalize(surfaceToLight + vec3(0.0, 0.0, 1.0));
+ float colorScale = uKS_Stage1 * pow(dot(normal, halfDir), uShininess_Stage1);
+ vec3 color = lightColor * clamp(colorScale, 0.0, 1.0);
+ return vec4(color, max(max(color.x, color.y), color.z));
+}
+float sobel_Stage1(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage1(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage1(float m[9], float surfaceScale) {
+ return pointToNormal_Stage1(sobel_Stage1(m[1], m[2], m[4], m[5], 0.0, 0.0, 0.66666698455810547), sobel_Stage1(0.0, 0.0, m[1], m[4], m[2], m[5], 0.66666698455810547), surfaceScale);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ vec2 coord = vTransformedCoords_0_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp0 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp5 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp6 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp7 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp8 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = uLightDirection_Stage1;
+ output_Stage1 = light_Stage1(normal_Stage1(m, uSurfaceScale_Stage1), surfaceToLight, uLightColor_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/298-3.shader_test b/shaders/skia/298-3.shader_test
new file mode 100644
index 0000000..b39a24e
--- /dev/null
+++ b/shaders/skia/298-3.shader_test
@@ -0,0 +1,48 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_KHR_blend_equation_advanced : require
+out vec4 sk_FragColor;
+layout (blend_support_all_equations) out ;
+noperspective in vec4 vinCircleEdge_Stage0;
+noperspective in vec4 vinColor_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ vec4 circleEdge;
+ circleEdge = vinCircleEdge_Stage0;
+ outputColor_Stage0 = vinColor_Stage0;
+ float d = length(circleEdge.xy);
+ float distanceToOuterEdge = circleEdge.z * (1.0 - d);
+ float edgeAlpha = clamp(distanceToOuterEdge, 0.0, 1.0);
+ float distanceToInnerEdge = circleEdge.z * (d - circleEdge.w);
+ float innerAlpha = clamp(distanceToInnerEdge, 0.0, 1.0);
+ edgeAlpha *= innerAlpha;
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ {
+ sk_FragColor = outputCoverage_Stage0 * outputColor_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 inPosition;
+in vec4 inColor;
+in vec4 inCircleEdge;
+noperspective out vec4 vinCircleEdge_Stage0;
+noperspective out vec4 vinColor_Stage0;
+void main() {
+ vinCircleEdge_Stage0 = inCircleEdge;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = inPosition;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/298-4.shader_test b/shaders/skia/298-4.shader_test
new file mode 100644
index 0000000..bb9d8dd
--- /dev/null
+++ b/shaders/skia/298-4.shader_test
@@ -0,0 +1,228 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 ucircle_Stage2_c0_c0;
+uniform vec2 uImageIncrement_Stage2_c1_c0;
+uniform float uSurfaceScale_Stage2_c1_c0;
+uniform vec3 uLightColor_Stage2_c1_c0;
+uniform float uKS_Stage2_c1_c0;
+uniform float uShininess_Stage2_c1_c0;
+uniform vec4 uTexDom_Stage2_c1_c0;
+uniform vec3 uDecalParams_Stage2_c1_c0;
+uniform vec3 uLightLocation_Stage2_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 CircleEffect_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ float d;
+ {
+ d = (1.0 - length((ucircle_Stage2_c0_c0.xy - gl_FragCoord.xy) * ucircle_Stage2_c0_c0.w)) * ucircle_Stage2_c0_c0.z;
+ }
+ {
+ _output = d > 0.5 ? _input : vec4(0.0);
+ }
+ return _output;
+}
+vec4 light_Stage2_c1_c0(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ vec3 halfDir = normalize(surfaceToLight + vec3(0.0, 0.0, 1.0));
+ float colorScale = uKS_Stage2_c1_c0 * pow(dot(normal, halfDir), uShininess_Stage2_c1_c0);
+ vec3 color = lightColor * clamp(colorScale, 0.0, 1.0);
+ return vec4(color, max(max(color.x, color.y), color.z));
+}
+float sobel_Stage2_c1_c0(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage2_c1_c0(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage2_c1_c0(float m[9], float surfaceScale) {
+ return pointToNormal_Stage2_c1_c0(sobel_Stage2_c1_c0(m[0], m[1], m[3], m[4], 0.0, 0.0, 0.66666698455810547), sobel_Stage2_c1_c0(m[0], m[3], m[1], m[4], 0.0, 0.0, 0.66666698455810547), surfaceScale);
+}
+vec4 SpecularLighting_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coord = vTransformedCoords_1_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage2_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c1_c0.xy, uTexDom_Stage2_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c1_c0.y);
+ if (err > uDecalParams_Stage2_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp0 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage2_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c1_c0.xy, uTexDom_Stage2_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c1_c0.y);
+ if (err > uDecalParams_Stage2_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage2_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c1_c0.xy, uTexDom_Stage2_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c1_c0.y);
+ if (err > uDecalParams_Stage2_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage2_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c1_c0.xy, uTexDom_Stage2_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c1_c0.y);
+ if (err > uDecalParams_Stage2_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c1_c0.xy, uTexDom_Stage2_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c1_c0.y);
+ if (err > uDecalParams_Stage2_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage2_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c1_c0.xy, uTexDom_Stage2_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c1_c0.y);
+ if (err > uDecalParams_Stage2_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp5 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage2_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c1_c0.xy, uTexDom_Stage2_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c1_c0.y);
+ if (err > uDecalParams_Stage2_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp6 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage2_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c1_c0.xy, uTexDom_Stage2_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c1_c0.y);
+ if (err > uDecalParams_Stage2_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp7 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage2_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c1_c0.xy, uTexDom_Stage2_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c1_c0.y);
+ if (err > uDecalParams_Stage2_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp8 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = normalize(uLightLocation_Stage2_c1_c0 - vec3(gl_FragCoord.xy, uSurfaceScale_Stage2_c1_c0 * m[4]));
+ _output = light_Stage2_c1_c0(normal_Stage2_c1_c0(m, uSurfaceScale_Stage2_c1_c0), surfaceToLight, uLightColor_Stage2_c1_c0);
+ _output *= _input;
+ return _output;
+}
+vec4 blend_dst_out(vec4 src, vec4 dst) {
+ return (1.0 - src.w) * dst;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ vec4 inputColor = vec4(output_Stage1.xyz, 1.0);
+ output_Stage2 = blend_dst_out(CircleEffect_Stage2_c0_c0(inputColor), SpecularLighting_Stage2_c1_c0(inputColor));
+ output_Stage2 *= output_Stage1.w;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/298-5.shader_test b/shaders/skia/298-5.shader_test
new file mode 100644
index 0000000..ea4a415
--- /dev/null
+++ b/shaders/skia/298-5.shader_test
@@ -0,0 +1,86 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uinnerRect_Stage2_c1_c0;
+uniform vec4 uinvRadiiLTRB_Stage2_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 ClampFragmentProcessor_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = clamp(_input, 0.0, 1.0);
+ }
+ return _output;
+}
+vec4 EllipticalRRect_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 dxy0 = uinnerRect_Stage2_c1_c0.xy - gl_FragCoord.xy;
+ vec2 dxy1 = gl_FragCoord.xy - uinnerRect_Stage2_c1_c0.zw;
+ vec2 dxy = max(max(dxy0, dxy1), 0.0);
+ vec2 Z = max(max(dxy0 * uinvRadiiLTRB_Stage2_c1_c0.xy, dxy1 * uinvRadiiLTRB_Stage2_c1_c0.zw), 0.0);
+ float implicit = dot(Z, dxy) - 1.0;
+ float grad_dot = 4.0 * dot(Z, Z);
+ grad_dot = max(grad_dot, 9.9999997473787516e-05);
+ float approx_dist = implicit * inversesqrt(grad_dot);
+ float alpha = clamp(0.5 + approx_dist, 0.0, 1.0);
+ _output = _input * alpha;
+ return _output;
+}
+float _blend_color_luminance(vec3 color) {
+ return dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), color);
+}
+vec3 _blend_set_color_luminance(vec3 hueSatColor, float alpha, vec3 lumColor) {
+ float lum = _blend_color_luminance(lumColor);
+ vec3 result = (lum - _blend_color_luminance(hueSatColor)) + hueSatColor;
+ float minComp = min(min(result.x, result.y), result.z);
+ float maxComp = max(max(result.x, result.y), result.z);
+ if (minComp < 0.0 && lum != minComp) {
+ result = lum + ((result - lum) * lum) / (lum - minComp);
+ }
+ if (maxComp > alpha && maxComp != lum) {
+ return lum + ((result - lum) * (alpha - lum)) / (maxComp - lum);
+ }
+ return result;
+}
+vec4 blend_luminosity(vec4 src, vec4 dst) {
+ float alpha = dst.w * src.w;
+ vec3 sda = src.xyz * dst.w;
+ vec3 dsa = dst.xyz * src.w;
+ return vec4((((_blend_set_color_luminance(dsa, alpha, sda) + dst.xyz) - dsa) + src.xyz) - sda, (src.w + dst.w) - alpha);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ vec4 inputColor = vec4(output_Stage1.xyz, 1.0);
+ output_Stage2 = blend_luminosity(ClampFragmentProcessor_Stage2_c0_c0(inputColor), EllipticalRRect_Stage2_c1_c0(inputColor));
+ output_Stage2 *= output_Stage1.w;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/298.shader_test b/shaders/skia/298.shader_test
new file mode 100644
index 0000000..ea43b49
--- /dev/null
+++ b/shaders/skia/298.shader_test
@@ -0,0 +1,152 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage2_c1_c0;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.w) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ } else {
+ {
+ if (t < uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = OverrideInputFragmentProcessor_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c1_c0;
+ }
+ return _output;
+}
+vec4 blend_plus(vec4 src, vec4 dst) {
+ return min(src + dst, 1.0);
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 blend_darken(vec4 src, vec4 dst) {
+ vec4 result = blend_src_over(src, dst);
+ result.xyz = min(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
+ return result;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_plus(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_darken(ConstColorProcessor_Stage2_c1_c0(vec4(1.0)), output_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 inColor;
+in vec2 inLocalCoord;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/301-2.shader_test b/shaders/skia/301-2.shader_test
new file mode 100644
index 0000000..b823d60
--- /dev/null
+++ b/shaders/skia/301-2.shader_test
@@ -0,0 +1,194 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform float uSurfaceScale_Stage1;
+uniform vec3 uLightColor_Stage1;
+uniform float uKS_Stage1;
+uniform float uShininess_Stage1;
+uniform vec4 uTexDom_Stage1;
+uniform vec3 uDecalParams_Stage1;
+uniform vec3 uLightDirection_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 light_Stage1(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ vec3 halfDir = normalize(surfaceToLight + vec3(0.0, 0.0, 1.0));
+ float colorScale = uKS_Stage1 * pow(dot(normal, halfDir), uShininess_Stage1);
+ vec3 color = lightColor * clamp(colorScale, 0.0, 1.0);
+ return vec4(color, max(max(color.x, color.y), color.z));
+}
+float sobel_Stage1(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage1(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage1(float m[9], float surfaceScale) {
+ return pointToNormal_Stage1(sobel_Stage1(m[0], m[2], m[3], m[5], 0.0, 0.0, 0.33333298563957214), sobel_Stage1(m[0], m[3], m[1], m[4], m[2], m[5], 0.5), surfaceScale);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ vec2 coord = vTransformedCoords_0_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp0 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp5 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp6 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp7 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp8 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = uLightDirection_Stage1;
+ output_Stage1 = light_Stage1(normal_Stage1(m, uSurfaceScale_Stage1), surfaceToLight, uLightColor_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/301-3.shader_test b/shaders/skia/301-3.shader_test
new file mode 100644
index 0000000..108b9f5
--- /dev/null
+++ b/shaders/skia/301-3.shader_test
@@ -0,0 +1,256 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform float uSurfaceScale_Stage1;
+uniform vec3 uLightColor_Stage1;
+uniform float uKS_Stage1;
+uniform float uShininess_Stage1;
+uniform vec4 uTexDom_Stage1;
+uniform vec3 uDecalParams_Stage1;
+uniform vec3 uLightLocation_Stage1;
+uniform vec2 ubaseFrequency_Stage2;
+uniform float uz_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+uniform sampler2D uTextureSampler_1_Stage2;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec3 vTransformedCoords_1_Stage0;
+vec4 light_Stage1(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ vec3 halfDir = normalize(surfaceToLight + vec3(0.0, 0.0, 1.0));
+ float colorScale = uKS_Stage1 * pow(dot(normal, halfDir), uShininess_Stage1);
+ vec3 color = lightColor * clamp(colorScale, 0.0, 1.0);
+ return vec4(color, max(max(color.x, color.y), color.z));
+}
+float sobel_Stage1(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage1(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage1(float m[9], float surfaceScale) {
+ return pointToNormal_Stage1(sobel_Stage1(0.0, 0.0, m[3], m[5], m[6], m[8], 0.33333298563957214), sobel_Stage1(0.0, 0.0, m[4], m[7], m[5], m[8], 0.5), surfaceScale);
+}
+vec3 fade_Stage2(vec3 t) {
+ return ((t * t) * t) * (t * (t * 6.0 - 15.0) + 10.0);
+}
+float perm_Stage2(float x) {
+ return texture(uTextureSampler_0_Stage2, vec2(fract(x / 256.0), 0.0)).x * 255.0;
+}
+float grad_Stage2(float x, vec3 p) {
+ return dot(texture(uTextureSampler_1_Stage2, vec2(fract(x / 16.0), 0.0)).xyz * 255.0 - vec3(1.0), p);
+}
+float lerp_Stage2(float a, float b, float w) {
+ return a + w * (b - a);
+}
+float noise_Stage2(vec3 p) {
+ vec3 P = mod(floor(p), 256.0);
+ p -= floor(p);
+ vec3 f = fade_Stage2(p);
+ float A = perm_Stage2(P.x) + P.y;
+ float AA = perm_Stage2(A) + P.z;
+ float AB = perm_Stage2(A + 1.0) + P.z;
+ float B = perm_Stage2(P.x + 1.0) + P.y;
+ float BA = perm_Stage2(B) + P.z;
+ float BB = perm_Stage2(B + 1.0) + P.z;
+ float result = lerp_Stage2(lerp_Stage2(lerp_Stage2(grad_Stage2(perm_Stage2(AA), p), grad_Stage2(perm_Stage2(BA), p + vec3(-1.0, 0.0, 0.0)), f.x), lerp_Stage2(grad_Stage2(perm_Stage2(AB), p + vec3(0.0, -1.0, 0.0)), grad_Stage2(perm_Stage2(BB), p + vec3(-1.0, -1.0, 0.0)), f.x), f.y), lerp_Stage2(lerp_Stage2(grad_Stage2(perm_Stage2(AA + 1.0), p + vec3(0.0, 0.0, -1.0)), grad_Stage2(perm_Stage2(BA + 1.0), p + vec3(-1.0, 0.0, -1.0)), f.x), lerp_Stage2(grad_Stage2(perm_Stage2(AB + 1.0), p + vec3(0.0, -1.0, -1.0)), grad_Stage2(perm_Stage2(BB + 1.0), p + vec3(-1.0, -1.0, -1.0)), f.x), f.y), f.z);
+ return result;
+}
+float noiseOctaves_Stage2(vec3 p) {
+ float result = 0.0;
+ float ratio = 1.0;
+ for (float i = 0.0;i < 4.0; i++) {
+ result += noise_Stage2(p) / ratio;
+ p *= 2.0;
+ ratio *= 2.0;
+ }
+ return (result + 1.0) / 2.0;
+}
+void main() {
+ {
+ vec2 coord = vTransformedCoords_0_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp0 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp5 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp6 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp7 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp8 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = normalize(uLightLocation_Stage1 - vec3(gl_FragCoord.xy, uSurfaceScale_Stage1 * m[4]));
+ light_Stage1(normal_Stage1(m, uSurfaceScale_Stage1), surfaceToLight, uLightColor_Stage1);
+ }
+ vec4 output_Stage2;
+ {
+ vec2 vTransformedCoords_1_Stage0_ensure2D = vTransformedCoords_1_Stage0.xy / vTransformedCoords_1_Stage0.z;
+ vec2 coords = vTransformedCoords_1_Stage0_ensure2D * ubaseFrequency_Stage2;
+ float r = noiseOctaves_Stage2(vec3(coords, uz_Stage2));
+ float g = noiseOctaves_Stage2(vec3(coords, uz_Stage2));
+ float b = noiseOctaves_Stage2(vec3(coords, uz_Stage2));
+ float a = noiseOctaves_Stage2(vec3(coords, uz_Stage2));
+ output_Stage2 = vec4(r, g, b, a);
+ output_Stage2 = clamp(output_Stage2, 0.0, 1.0);
+ output_Stage2 = vec4(output_Stage2.xyz * output_Stage2.www, output_Stage2.w);
+ }
+ {
+ sk_FragColor = 1.0 - output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec2 inLocalCoord;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec3 vTransformedCoords_1_Stage0;
+void main() {
+ vec4 color = inColor;
+ vcolor_Stage0 = color;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = uCoordTransformMatrix_1_Stage0 * vec3(inLocalCoord, 1.0);
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/301-4.shader_test b/shaders/skia/301-4.shader_test
new file mode 100644
index 0000000..610c443
--- /dev/null
+++ b/shaders/skia/301-4.shader_test
@@ -0,0 +1,93 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uScale_Stage2_c1_c0;
+uniform vec4 uTexDom_Stage2_c1_c0;
+uniform vec3 uDecalParams_Stage2_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+uniform sampler2D uTextureSampler_1_Stage2;
+uniform sampler2D uTextureSampler_2_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+vec4 ColorTableEffect_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ float nonZeroAlpha = max(_input.w, 9.9999997473787516e-05);
+ vec4 coord = vec4(_input.xyz / nonZeroAlpha, nonZeroAlpha);
+ coord = coord * 0.9960939884185791 + vec4(0.0019529999699443579, 0.0019529999699443579, 0.0019529999699443579, 0.0019529999699443579);
+ _output.w = texture(uTextureSampler_0_Stage2, vec2(coord.w, 0.125)).w;
+ _output.x = texture(uTextureSampler_0_Stage2, vec2(coord.x, 0.375)).w;
+ _output.y = texture(uTextureSampler_0_Stage2, vec2(coord.y, 0.625)).w;
+ _output.z = texture(uTextureSampler_0_Stage2, vec2(coord.z, 0.875)).w;
+ _output.xyz *= _output.w;
+ return _output;
+}
+vec4 DisplacementMap_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 dColor = texture(uTextureSampler_1_Stage2, vTransformedCoords_1_Stage0);
+ dColor.xyz = dColor.w < 9.9999999747524271e-07 ? vec3(0.0) : clamp(dColor.xyz / dColor.w, 0.0, 1.0);
+ vec2 cCoords = vTransformedCoords_2_Stage0 + uScale_Stage2_c1_c0 * (dColor.zy - vec2(0.5));
+ {
+ vec2 origCoord = cCoords;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c1_c0.xy, uTexDom_Stage2_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_2_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c1_c0.y);
+ if (err > uDecalParams_Stage2_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ _output = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ return _output;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 blend_darken(vec4 src, vec4 dst) {
+ vec4 result = blend_src_over(src, dst);
+ result.xyz = min(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
+ return result;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ vec4 inputColor = vec4(output_Stage1.xyz, 1.0);
+ output_Stage2 = blend_darken(ColorTableEffect_Stage2_c0_c0(inputColor), DisplacementMap_Stage2_c1_c0(inputColor));
+ output_Stage2 *= output_Stage1.w;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/301-5.shader_test b/shaders/skia/301-5.shader_test
new file mode 100644
index 0000000..bd6aaf2
--- /dev/null
+++ b/shaders/skia/301-5.shader_test
@@ -0,0 +1,82 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform mat4 um_Stage2_c0_c0;
+uniform vec4 uv_Stage2_c0_c0;
+uniform mat4 um_Stage2_c1_c0;
+uniform vec4 uv_Stage2_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 ColorMatrixFragmentProcessor_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = _input;
+ _output = um_Stage2_c0_c0 * inputColor + uv_Stage2_c0_c0;
+ {
+ _output = clamp(_output, 0.0, 1.0);
+ }
+ return _output;
+}
+vec4 ColorMatrixFragmentProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = _input;
+ _output = um_Stage2_c1_c0 * inputColor + uv_Stage2_c1_c0;
+ {
+ _output = clamp(_output, 0.0, 1.0);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+float _guarded_divide(float n, float d) {
+ return n / d;
+}
+float _color_dodge_component(float sc, float sa, float dc, float da) {
+ if (dc == 0.0) {
+ return sc * (1.0 - da);
+ } else {
+ float d = sa - sc;
+ if (d == 0.0) {
+ return (sa * da + sc * (1.0 - da)) + dc * (1.0 - sa);
+ }
+ d = min(da, _guarded_divide(dc * sa, d));
+ return (d * sa + sc * (1.0 - da)) + dc * (1.0 - sa);
+ }
+}
+vec4 blend_color_dodge(vec4 src, vec4 dst) {
+ return vec4(_color_dodge_component(src.x, src.w, dst.x, dst.w), _color_dodge_component(src.y, src.w, dst.y, dst.w), _color_dodge_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ vec4 inputColor = vec4(output_Stage1.xyz, 1.0);
+ output_Stage2 = blend_color_dodge(ColorMatrixFragmentProcessor_Stage2_c0_c0(inputColor), ColorMatrixFragmentProcessor_Stage2_c1_c0(inputColor));
+ output_Stage2 *= output_Stage1.w;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/301.shader_test b/shaders/skia/301.shader_test
new file mode 100644
index 0000000..9e6bb2f
--- /dev/null
+++ b/shaders/skia/301.shader_test
@@ -0,0 +1,81 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 ucolor_Stage1_c0_c0_c0_c0;
+uniform vec4 ucolor_Stage2_c1_c0;
+noperspective in vec4 vcolor_Stage0;
+vec4 ConstColorProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = _input.w * ucolor_Stage1_c0_c0_c0_c0;
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = ConstColorProcessor_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c1_c0;
+ }
+ return _output;
+}
+vec4 blend_plus(vec4 src, vec4 dst) {
+ return min(src + dst, 1.0);
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 blend_darken(vec4 src, vec4 dst) {
+ vec4 result = blend_src_over(src, dst);
+ result.xyz = min(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
+ return result;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_plus(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_darken(ConstColorProcessor_Stage2_c1_c0(vec4(1.0)), output_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 position;
+in vec4 inColor;
+noperspective out vec4 vcolor_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/304-2.shader_test b/shaders/skia/304-2.shader_test
new file mode 100644
index 0000000..10e854d
--- /dev/null
+++ b/shaders/skia/304-2.shader_test
@@ -0,0 +1,194 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform float uSurfaceScale_Stage1;
+uniform vec3 uLightColor_Stage1;
+uniform float uKS_Stage1;
+uniform float uShininess_Stage1;
+uniform vec4 uTexDom_Stage1;
+uniform vec3 uDecalParams_Stage1;
+uniform vec3 uLightDirection_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 light_Stage1(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ vec3 halfDir = normalize(surfaceToLight + vec3(0.0, 0.0, 1.0));
+ float colorScale = uKS_Stage1 * pow(dot(normal, halfDir), uShininess_Stage1);
+ vec3 color = lightColor * clamp(colorScale, 0.0, 1.0);
+ return vec4(color, max(max(color.x, color.y), color.z));
+}
+float sobel_Stage1(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage1(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage1(float m[9], float surfaceScale) {
+ return pointToNormal_Stage1(sobel_Stage1(m[0], m[1], m[3], m[4], 0.0, 0.0, 0.66666698455810547), sobel_Stage1(m[0], m[3], m[1], m[4], 0.0, 0.0, 0.66666698455810547), surfaceScale);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ vec2 coord = vTransformedCoords_0_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp0 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp5 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp6 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp7 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp8 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = uLightDirection_Stage1;
+ output_Stage1 = light_Stage1(normal_Stage1(m, uSurfaceScale_Stage1), surfaceToLight, uLightColor_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/304-3.shader_test b/shaders/skia/304-3.shader_test
new file mode 100644
index 0000000..fcdb4c0
--- /dev/null
+++ b/shaders/skia/304-3.shader_test
@@ -0,0 +1,259 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+uniform vec2 uImageIncrement_Stage1;
+uniform float uSurfaceScale_Stage1;
+uniform vec3 uLightColor_Stage1;
+uniform float uKS_Stage1;
+uniform float uShininess_Stage1;
+uniform vec4 uTexDom_Stage1;
+uniform vec3 uDecalParams_Stage1;
+uniform vec3 uLightLocation_Stage1;
+uniform float uExponent_Stage1;
+uniform float uCosInnerConeAngle_Stage1;
+uniform float uCosOuterConeAngle_Stage1;
+uniform float uConeScale_Stage1;
+uniform vec3 uS_Stage1;
+uniform vec4 uboundsUniform_Stage2;
+uniform float uxInvZoom_Stage2;
+uniform float uyInvZoom_Stage2;
+uniform float uxInvInset_Stage2;
+uniform float uyInvInset_Stage2;
+uniform vec2 uoffset_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vEllipseOffsets_Stage0;
+noperspective in vec4 vEllipseRadii_Stage0;
+noperspective in vec4 vinColor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 light_Stage1(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ vec3 halfDir = normalize(surfaceToLight + vec3(0.0, 0.0, 1.0));
+ float colorScale = uKS_Stage1 * pow(dot(normal, halfDir), uShininess_Stage1);
+ vec3 color = lightColor * clamp(colorScale, 0.0, 1.0);
+ return vec4(color, max(max(color.x, color.y), color.z));
+}
+float sobel_Stage1(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage1(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage1(float m[9], float surfaceScale) {
+ return pointToNormal_Stage1(sobel_Stage1(m[0], m[2], m[3], m[5], 0.0, 0.0, 0.33333298563957214), sobel_Stage1(m[0], m[3], m[1], m[4], m[2], m[5], 0.5), surfaceScale);
+}
+vec3 lightColor_Stage1(vec3 surfaceToLight) {
+ float cosAngle = -dot(surfaceToLight, uS_Stage1);
+ if (cosAngle < uCosOuterConeAngle_Stage1) {
+ return vec3(0.0);
+ }
+ float scale = pow(cosAngle, uExponent_Stage1);
+ if (cosAngle < uCosInnerConeAngle_Stage1) {
+ return ((uLightColor_Stage1 * scale) * (cosAngle - uCosOuterConeAngle_Stage1)) * uConeScale_Stage1;
+ }
+ return uLightColor_Stage1;
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ vec2 offset = vEllipseOffsets_Stage0;
+ offset *= vEllipseRadii_Stage0.xy;
+ float test = dot(offset, offset) - 1.0;
+ vec2 grad = (2.0 * offset) * vEllipseRadii_Stage0.xy;
+ float grad_dot = dot(grad, grad);
+ grad_dot = max(grad_dot, 1.1754999560161448e-38);
+ float invlen = inversesqrt(grad_dot);
+ float edgeAlpha = clamp(0.5 - test * invlen, 0.0, 1.0);
+ offset = vEllipseOffsets_Stage0 * vEllipseRadii_Stage0.zw;
+ test = dot(offset, offset) - 1.0;
+ grad = (2.0 * offset) * vEllipseRadii_Stage0.zw;
+ grad_dot = dot(grad, grad);
+ invlen = inversesqrt(grad_dot);
+ edgeAlpha *= clamp(0.5 + test * invlen, 0.0, 1.0);
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ vec4 output_Stage1;
+ {
+ vec2 coord = vTransformedCoords_0_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp0 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp5 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp6 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp7 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp8 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = normalize(uLightLocation_Stage1 - vec3(gl_FragCoord.xy, uSurfaceScale_Stage1 * m[4]));
+ output_Stage1 = light_Stage1(normal_Stage1(m, uSurfaceScale_Stage1), surfaceToLight, lightColor_Stage1(surfaceToLight));
+ output_Stage1 *= outputCoverage_Stage0;
+ }
+ {
+ vec2 coord = vTransformedCoords_1_Stage0;
+ vec2 delta = (coord - uboundsUniform_Stage2.xy) * uboundsUniform_Stage2.zw;
+ delta = min(delta, vec2(1.0, 1.0) - delta);
+ delta *= vec2(uxInvInset_Stage2, uyInvInset_Stage2);
+ if (delta.x < 2.0 && delta.y < 2.0) {
+ delta = vec2(2.0, 2.0) - delta;
+ float dist = length(delta);
+ dist = max(2.0 - dist, 0.0);
+ }
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec2 inEllipseOffset;
+in vec4 inEllipseRadii;
+noperspective out vec2 vEllipseOffsets_Stage0;
+noperspective out vec4 vEllipseRadii_Stage0;
+noperspective out vec4 vinColor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vEllipseOffsets_Stage0 = inEllipseOffset;
+ vEllipseRadii_Stage0 = inEllipseRadii;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/304-4.shader_test b/shaders/skia/304-4.shader_test
new file mode 100644
index 0000000..e2393ac
--- /dev/null
+++ b/shaders/skia/304-4.shader_test
@@ -0,0 +1,91 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec2 uScale_Stage2_c0_c0;
+uniform vec4 uTexDom_Stage2_c0_c0;
+uniform vec3 uDecalParams_Stage2_c0_c0;
+uniform vec3 uedges_Stage2_c1_c0[1];
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+uniform sampler2D uTextureSampler_1_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+vec4 DisplacementMap_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 dColor = texture(uTextureSampler_0_Stage2, vTransformedCoords_1_Stage0);
+ dColor.xyz = dColor.w < 9.9999999747524271e-07 ? vec3(0.0) : clamp(dColor.xyz / dColor.w, 0.0, 1.0);
+ vec2 cCoords = vTransformedCoords_2_Stage0 + uScale_Stage2_c0_c0 * (dColor.wy - vec2(0.5));
+ {
+ vec2 origCoord = cCoords;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c0_c0.y);
+ if (err > uDecalParams_Stage2_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ _output = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ return _output;
+}
+vec4 ConvexPoly_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ float alpha = 1.0;
+ float edge;
+ edge = dot(uedges_Stage2_c1_c0[0], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ _output = _input * alpha;
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ vec4 inputColor = vec4(output_Stage1.xyz, 1.0);
+ output_Stage2 = blend_dst_in(DisplacementMap_Stage2_c0_c0(inputColor), ConvexPoly_Stage2_c1_c0(inputColor));
+ output_Stage2 *= output_Stage1.w;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/304-5.shader_test b/shaders/skia/304-5.shader_test
new file mode 100644
index 0000000..896b7c0
--- /dev/null
+++ b/shaders/skia/304-5.shader_test
@@ -0,0 +1,89 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec3 uedges_Stage2_c1_c0[6];
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 ClampFragmentProcessor_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ float alpha = clamp(_input.w, 0.0, 1.0);
+ _output = vec4(clamp(_input.xyz, 0.0, alpha), alpha);
+ }
+ return _output;
+}
+vec4 ConvexPoly_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ float alpha = 1.0;
+ float edge;
+ edge = dot(uedges_Stage2_c1_c0[0], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage2_c1_c0[1], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage2_c1_c0[2], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage2_c1_c0[3], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage2_c1_c0[4], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage2_c1_c0[5], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ _output = _input * alpha;
+ return _output;
+}
+float _blend_overlay_component(float sc, float sa, float dc, float da) {
+ if (2.0 * dc <= da) {
+ return (2.0 * sc) * dc;
+ }
+ return sa * da - (2.0 * (da - dc)) * (sa - sc);
+}
+vec4 blend_overlay(vec4 src, vec4 dst) {
+ vec4 result = vec4(_blend_overlay_component(src.x, src.w, dst.x, dst.w), _blend_overlay_component(src.y, src.w, dst.y, dst.w), _blend_overlay_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+ result.xyz += dst.xyz * (1.0 - src.w) + src.xyz * (1.0 - dst.w);
+ return result;
+}
+vec4 blend_hard_light(vec4 src, vec4 dst) {
+ return blend_overlay(dst, src);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ vec4 inputColor = vec4(output_Stage1.xyz, 1.0);
+ output_Stage2 = blend_hard_light(ClampFragmentProcessor_Stage2_c0_c0(inputColor), ConvexPoly_Stage2_c1_c0(inputColor));
+ output_Stage2 *= output_Stage1.w;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/304.shader_test b/shaders/skia/304.shader_test
new file mode 100644
index 0000000..d64dbc3
--- /dev/null
+++ b/shaders/skia/304.shader_test
@@ -0,0 +1,145 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage2;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.w) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ } else {
+ {
+ if (t < uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+vec4 ComposeOne_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_dst_in(_input, TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0)));
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = ComposeOne_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 blend_plus(vec4 src, vec4 dst) {
+ return min(src + dst, 1.0);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_plus(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ {
+ output_Stage2 = output_Stage1 * ucolor_Stage2;
+ }
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 inColor;
+in vec2 inLocalCoord;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/307-2.shader_test b/shaders/skia/307-2.shader_test
new file mode 100644
index 0000000..8bb25bd
--- /dev/null
+++ b/shaders/skia/307-2.shader_test
@@ -0,0 +1,212 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform float uSurfaceScale_Stage1;
+uniform vec3 uLightColor_Stage1;
+uniform float uKS_Stage1;
+uniform float uShininess_Stage1;
+uniform vec4 uTexDom_Stage1;
+uniform vec3 uDecalParams_Stage1;
+uniform vec3 uLightLocation_Stage1;
+uniform float uExponent_Stage1;
+uniform float uCosInnerConeAngle_Stage1;
+uniform float uCosOuterConeAngle_Stage1;
+uniform float uConeScale_Stage1;
+uniform vec3 uS_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 light_Stage1(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ vec3 halfDir = normalize(surfaceToLight + vec3(0.0, 0.0, 1.0));
+ float colorScale = uKS_Stage1 * pow(dot(normal, halfDir), uShininess_Stage1);
+ vec3 color = lightColor * clamp(colorScale, 0.0, 1.0);
+ return vec4(color, max(max(color.x, color.y), color.z));
+}
+float sobel_Stage1(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage1(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage1(float m[9], float surfaceScale) {
+ return pointToNormal_Stage1(sobel_Stage1(0.0, 0.0, m[4], m[5], m[7], m[8], 0.66666698455810547), sobel_Stage1(0.0, 0.0, m[4], m[7], m[5], m[8], 0.66666698455810547), surfaceScale);
+}
+vec3 lightColor_Stage1(vec3 surfaceToLight) {
+ float cosAngle = -dot(surfaceToLight, uS_Stage1);
+ if (cosAngle < uCosOuterConeAngle_Stage1) {
+ return vec3(0.0);
+ }
+ float scale = pow(cosAngle, uExponent_Stage1);
+ if (cosAngle < uCosInnerConeAngle_Stage1) {
+ return ((uLightColor_Stage1 * scale) * (cosAngle - uCosOuterConeAngle_Stage1)) * uConeScale_Stage1;
+ }
+ return uLightColor_Stage1;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ vec2 coord = vTransformedCoords_0_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp0 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp5 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp6 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp7 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp8 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = normalize(uLightLocation_Stage1 - vec3(gl_FragCoord.xy, uSurfaceScale_Stage1 * m[4]));
+ output_Stage1 = light_Stage1(normal_Stage1(m, uSurfaceScale_Stage1), surfaceToLight, lightColor_Stage1(surfaceToLight));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/307-3.shader_test b/shaders/skia/307-3.shader_test
new file mode 100644
index 0000000..2ffb1b5
--- /dev/null
+++ b/shaders/skia/307-3.shader_test
@@ -0,0 +1,179 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uellipse_Stage1_c0_c0_c0_c0;
+uniform mat4 um_Stage1_c0_c0_c1_c0;
+uniform vec4 uv_Stage1_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage1_c1_c0_c0_c0;
+uniform vec2 uDstTextureUpperLeft_Stage2;
+uniform vec2 uDstTextureCoordScale_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uDstTextureSampler_Stage2;
+noperspective in vec4 vinCircleEdge_Stage0;
+noperspective in vec3 vinClipPlane_Stage0;
+noperspective in vec3 vinUnionPlane_Stage0;
+noperspective in vec4 vinColor_Stage0;
+vec4 EllipseEffect_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 d = gl_FragCoord.xy - uellipse_Stage1_c0_c0_c0_c0.xy;
+ vec2 Z = d * uellipse_Stage1_c0_c0_c0_c0.zw;
+ float implicit = dot(Z, d) - 1.0;
+ float grad_dot = 4.0 * dot(Z, Z);
+ {
+ grad_dot = max(grad_dot, 1.1754999560161448e-38);
+ }
+ float approx_dist = implicit * inversesqrt(grad_dot);
+ float alpha;
+ {
+ alpha = clamp(0.5 + approx_dist, 0.0, 1.0);
+ }
+ _output = _input * alpha;
+ return _output;
+}
+vec4 ColorMatrixFragmentProcessor_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = _input;
+ {
+ float nonZeroAlpha = max(inputColor.w, 9.9999997473787516e-05);
+ inputColor = vec4(inputColor.xyz / nonZeroAlpha, inputColor.w);
+ }
+ _output = um_Stage1_c0_c0_c1_c0 * inputColor + uv_Stage1_c0_c0_c1_c0;
+ {
+ _output = clamp(_output, 0.0, 1.0);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+float _blend_overlay_component(float sc, float sa, float dc, float da) {
+ if (2.0 * dc <= da) {
+ return (2.0 * sc) * dc;
+ }
+ return sa * da - (2.0 * (da - dc)) * (sa - sc);
+}
+vec4 blend_overlay(vec4 src, vec4 dst) {
+ vec4 result = vec4(_blend_overlay_component(src.x, src.w, dst.x, dst.w), _blend_overlay_component(src.y, src.w, dst.y, dst.w), _blend_overlay_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+ result.xyz += dst.xyz * (1.0 - src.w) + src.xyz * (1.0 - dst.w);
+ return result;
+}
+vec4 blend_hard_light(vec4 src, vec4 dst) {
+ return blend_overlay(dst, src);
+}
+vec4 ComposeTwo_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_hard_light(EllipseEffect_Stage1_c0_c0_c0_c0(inputColor), ColorMatrixFragmentProcessor_Stage1_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 ConstColorProcessor_Stage1_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage1_c1_c0_c0_c0;
+ }
+ return _output;
+}
+vec4 ColorTableEffect_Stage1_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float nonZeroAlpha = max(_input.w, 9.9999997473787516e-05);
+ vec4 coord = vec4(_input.xyz / nonZeroAlpha, nonZeroAlpha);
+ coord = coord * 0.9960939884185791 + vec4(0.0019529999699443579, 0.0019529999699443579, 0.0019529999699443579, 0.0019529999699443579);
+ _output.w = texture(uTextureSampler_0_Stage1, vec2(coord.w, 0.125)).w;
+ _output.x = texture(uTextureSampler_0_Stage1, vec2(coord.x, 0.375)).w;
+ _output.y = texture(uTextureSampler_0_Stage1, vec2(coord.y, 0.625)).w;
+ _output.z = texture(uTextureSampler_0_Stage1, vec2(coord.z, 0.875)).w;
+ _output.xyz *= _output.w;
+ return _output;
+}
+float _guarded_divide(float n, float d) {
+ return n / d;
+}
+float _color_burn_component(float sc, float sa, float dc, float da) {
+ if (da == dc) {
+ return (sa * da + sc * (1.0 - da)) + dc * (1.0 - sa);
+ } else if (sc == 0.0) {
+ return dc * (1.0 - sa);
+ }
+ float d = max(0.0, da - _guarded_divide((da - dc) * sa, sc));
+ return (d * sa + sc * (1.0 - da)) + dc * (1.0 - sa);
+}
+vec4 blend_color_burn(vec4 src, vec4 dst) {
+ return vec4(_color_burn_component(src.x, src.w, dst.x, dst.w), _color_burn_component(src.y, src.w, dst.y, dst.w), _color_burn_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+}
+vec4 ComposeTwo_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_color_burn(ConstColorProcessor_Stage1_c1_c0_c0_c0(inputColor), ColorTableEffect_Stage1_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ vec4 circleEdge;
+ circleEdge = vinCircleEdge_Stage0;
+ vec3 clipPlane;
+ clipPlane = vinClipPlane_Stage0;
+ vec3 unionPlane;
+ unionPlane = vinUnionPlane_Stage0;
+ outputColor_Stage0 = vinColor_Stage0;
+ float d = length(circleEdge.xy);
+ float distanceToOuterEdge = circleEdge.z * (1.0 - d);
+ float edgeAlpha = clamp(distanceToOuterEdge, 0.0, 1.0);
+ float clip = clamp(circleEdge.z * dot(circleEdge.xy, clipPlane.xy) + clipPlane.z, 0.0, 1.0);
+ clip = clamp(clip + clamp(circleEdge.z * dot(circleEdge.xy, unionPlane.xy) + unionPlane.z, 0.0, 1.0), 0.0, 1.0);
+ edgeAlpha *= clip;
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_dst_in(ComposeTwo_Stage1_c0_c0(inputColor), ComposeTwo_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ if (all(lessThanEqual(outputCoverage_Stage0.xyz, vec3(0.0)))) {
+ discard;
+ }
+ vec2 _dstTexCoord = (gl_FragCoord.xy - uDstTextureUpperLeft_Stage2) * uDstTextureCoordScale_Stage2;
+ vec4 _dstColor = texture(uDstTextureSampler_Stage2, _dstTexCoord);
+ sk_FragColor = blend_src_in(output_Stage1, _dstColor);
+ sk_FragColor = outputCoverage_Stage0 * sk_FragColor + (vec4(1.0) - outputCoverage_Stage0) * _dstColor;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 inPosition;
+in vec4 inColor;
+in vec4 inCircleEdge;
+in vec3 inClipPlane;
+in vec3 inUnionPlane;
+noperspective out vec4 vinCircleEdge_Stage0;
+noperspective out vec3 vinClipPlane_Stage0;
+noperspective out vec3 vinUnionPlane_Stage0;
+noperspective out vec4 vinColor_Stage0;
+void main() {
+ vinCircleEdge_Stage0 = inCircleEdge;
+ vinClipPlane_Stage0 = inClipPlane;
+ vinUnionPlane_Stage0 = inUnionPlane;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = inPosition;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/307-4.shader_test b/shaders/skia/307-4.shader_test
new file mode 100644
index 0000000..53ee54d
--- /dev/null
+++ b/shaders/skia/307-4.shader_test
@@ -0,0 +1,122 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 ubaseFrequency_Stage2_c0_c0;
+uniform float uz_Stage2_c0_c0;
+uniform float uinnerThreshold_Stage2_c1_c0;
+uniform float uouterThreshold_Stage2_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+uniform sampler2D uTextureSampler_1_Stage2;
+uniform sampler2D uTextureSampler_2_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+vec3 fade_Stage2_c0_c0(vec3 t) {
+ return ((t * t) * t) * (t * (t * 6.0 - 15.0) + 10.0);
+}
+float perm_Stage2_c0_c0(float x) {
+ return texture(uTextureSampler_0_Stage2, vec2(fract(x / 256.0), 0.0)).x * 255.0;
+}
+float grad_Stage2_c0_c0(float x, vec3 p) {
+ return dot(texture(uTextureSampler_1_Stage2, vec2(fract(x / 16.0), 0.0)).xyz * 255.0 - vec3(1.0), p);
+}
+float lerp_Stage2_c0_c0(float a, float b, float w) {
+ return a + w * (b - a);
+}
+float noise_Stage2_c0_c0(vec3 p) {
+ vec3 P = mod(floor(p), 256.0);
+ p -= floor(p);
+ vec3 f = fade_Stage2_c0_c0(p);
+ float A = perm_Stage2_c0_c0(P.x) + P.y;
+ float AA = perm_Stage2_c0_c0(A) + P.z;
+ float AB = perm_Stage2_c0_c0(A + 1.0) + P.z;
+ float B = perm_Stage2_c0_c0(P.x + 1.0) + P.y;
+ float BA = perm_Stage2_c0_c0(B) + P.z;
+ float BB = perm_Stage2_c0_c0(B + 1.0) + P.z;
+ float result = lerp_Stage2_c0_c0(lerp_Stage2_c0_c0(lerp_Stage2_c0_c0(grad_Stage2_c0_c0(perm_Stage2_c0_c0(AA), p), grad_Stage2_c0_c0(perm_Stage2_c0_c0(BA), p + vec3(-1.0, 0.0, 0.0)), f.x), lerp_Stage2_c0_c0(grad_Stage2_c0_c0(perm_Stage2_c0_c0(AB), p + vec3(0.0, -1.0, 0.0)), grad_Stage2_c0_c0(perm_Stage2_c0_c0(BB), p + vec3(-1.0, -1.0, 0.0)), f.x), f.y), lerp_Stage2_c0_c0(lerp_Stage2_c0_c0(grad_Stage2_c0_c0(perm_Stage2_c0_c0(AA + 1.0), p + vec3(0.0, 0.0, -1.0)), grad_Stage2_c0_c0(perm_Stage2_c0_c0(BA + 1.0), p + vec3(-1.0, 0.0, -1.0)), f.x), lerp_Stage2_c0_c0(grad_Stage2_c0_c0(perm_Stage2_c0_c0(AB + 1.0), p + vec3(0.0, -1.0, -1.0)), grad_Stage2_c0_c0(perm_Stage2_c0_c0(BB + 1.0), p + vec3(-1.0, -1.0, -1.0)), f.x), f.y), f.z);
+ return result;
+}
+float noiseOctaves_Stage2_c0_c0(vec3 p) {
+ float result = 0.0;
+ float ratio = 1.0;
+ for (float i = 0.0;i < 8.0; i++) {
+ result += noise_Stage2_c0_c0(p) / ratio;
+ p *= 2.0;
+ ratio *= 2.0;
+ }
+ return (result + 1.0) / 2.0;
+}
+vec4 ImprovedPerlinNoise_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coords = vTransformedCoords_1_Stage0 * ubaseFrequency_Stage2_c0_c0;
+ float r = noiseOctaves_Stage2_c0_c0(vec3(coords, uz_Stage2_c0_c0));
+ float g = noiseOctaves_Stage2_c0_c0(vec3(coords, uz_Stage2_c0_c0));
+ float b = noiseOctaves_Stage2_c0_c0(vec3(coords, uz_Stage2_c0_c0));
+ float a = noiseOctaves_Stage2_c0_c0(vec3(coords, uz_Stage2_c0_c0));
+ _output = vec4(r, g, b, a);
+ _output = clamp(_output, 0.0, 1.0);
+ _output = vec4(_output.xyz * _output.www, _output.w);
+ return _output;
+}
+vec4 AlphaThresholdFragmentProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 color = _input;
+ vec4 mask_color = texture(uTextureSampler_2_Stage2, vTransformedCoords_2_Stage0);
+ if (mask_color.w < 0.5) {
+ if (color.w > uouterThreshold_Stage2_c1_c0) {
+ float scale = uouterThreshold_Stage2_c1_c0 / color.w;
+ color.xyz *= scale;
+ color.w = uouterThreshold_Stage2_c1_c0;
+ }
+ } else if (color.w < uinnerThreshold_Stage2_c1_c0) {
+ float scale = uinnerThreshold_Stage2_c1_c0 / max(0.0010000000474974513, color.w);
+ color.xyz *= scale;
+ color.w = uinnerThreshold_Stage2_c1_c0;
+ }
+ _output = color;
+ return _output;
+}
+vec4 blend_multiply(vec4 src, vec4 dst) {
+ return vec4(((1.0 - src.w) * dst.xyz + (1.0 - dst.w) * src.xyz) + src.xyz * dst.xyz, src.w + (1.0 - src.w) * dst.w);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ vec4 inputColor = vec4(output_Stage1.xyz, 1.0);
+ output_Stage2 = blend_multiply(ImprovedPerlinNoise_Stage2_c0_c0(inputColor), AlphaThresholdFragmentProcessor_Stage2_c1_c0(inputColor));
+ output_Stage2 *= output_Stage1.w;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/307-5.shader_test b/shaders/skia/307-5.shader_test
new file mode 100644
index 0000000..6847e7a
--- /dev/null
+++ b/shaders/skia/307-5.shader_test
@@ -0,0 +1,104 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 ucolor_Stage2_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 ClampFragmentProcessor_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = clamp(_input, 0.0, 1.0);
+ }
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = _input * ucolor_Stage2_c1_c0;
+ }
+ return _output;
+}
+float _blend_color_saturation(vec3 color) {
+ return max(max(color.x, color.y), color.z) - min(min(color.x, color.y), color.z);
+}
+vec3 _blend_set_color_saturation_helper(vec3 minMidMax, float sat) {
+ if (minMidMax.x < minMidMax.z) {
+ return vec3(0.0, (sat * (minMidMax.y - minMidMax.x)) / (minMidMax.z - minMidMax.x), sat);
+ }
+ return vec3(0.0);
+}
+vec3 _blend_set_color_saturation(vec3 hueLumColor, vec3 satColor) {
+ float sat = _blend_color_saturation(satColor);
+ if (hueLumColor.x <= hueLumColor.y) {
+ if (hueLumColor.y <= hueLumColor.z) {
+ hueLumColor.xyz = _blend_set_color_saturation_helper(hueLumColor, sat);
+ } else if (hueLumColor.x <= hueLumColor.z) {
+ hueLumColor.xzy = _blend_set_color_saturation_helper(hueLumColor.xzy, sat);
+ } else {
+ hueLumColor.zxy = _blend_set_color_saturation_helper(hueLumColor.zxy, sat);
+ }
+ } else if (hueLumColor.x <= hueLumColor.z) {
+ hueLumColor.yxz = _blend_set_color_saturation_helper(hueLumColor.yxz, sat);
+ } else if (hueLumColor.y <= hueLumColor.z) {
+ hueLumColor.yzx = _blend_set_color_saturation_helper(hueLumColor.yzx, sat);
+ } else {
+ hueLumColor.zyx = _blend_set_color_saturation_helper(hueLumColor.zyx, sat);
+ }
+ return hueLumColor;
+}
+float _blend_color_luminance(vec3 color) {
+ return dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), color);
+}
+vec3 _blend_set_color_luminance(vec3 hueSatColor, float alpha, vec3 lumColor) {
+ float lum = _blend_color_luminance(lumColor);
+ vec3 result = (lum - _blend_color_luminance(hueSatColor)) + hueSatColor;
+ float minComp = min(min(result.x, result.y), result.z);
+ float maxComp = max(max(result.x, result.y), result.z);
+ if (minComp < 0.0 && lum != minComp) {
+ result = lum + ((result - lum) * lum) / (lum - minComp);
+ }
+ if (maxComp > alpha && maxComp != lum) {
+ return lum + ((result - lum) * (alpha - lum)) / (maxComp - lum);
+ }
+ return result;
+}
+vec4 blend_saturation(vec4 src, vec4 dst) {
+ float alpha = dst.w * src.w;
+ vec3 sda = src.xyz * dst.w;
+ vec3 dsa = dst.xyz * src.w;
+ return vec4((((_blend_set_color_luminance(_blend_set_color_saturation(dsa, sda), alpha, dsa) + dst.xyz) - dsa) + src.xyz) - sda, (src.w + dst.w) - alpha);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ vec4 inputColor = vec4(output_Stage1.xyz, 1.0);
+ output_Stage2 = blend_saturation(ClampFragmentProcessor_Stage2_c0_c0(inputColor), ConstColorProcessor_Stage2_c1_c0(inputColor));
+ output_Stage2 *= output_Stage1.w;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/307.shader_test b/shaders/skia/307.shader_test
new file mode 100644
index 0000000..c354909
--- /dev/null
+++ b/shaders/skia/307.shader_test
@@ -0,0 +1,68 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 ucolor_Stage1_c0_c0_c0_c0;
+uniform vec4 ucolor_Stage2;
+noperspective in vec4 vcolor_Stage0;
+vec4 ConstColorProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = _input.w * ucolor_Stage1_c0_c0_c0_c0;
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = ConstColorProcessor_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 blend_plus(vec4 src, vec4 dst) {
+ return min(src + dst, 1.0);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_plus(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ {
+ output_Stage2 = output_Stage1 * ucolor_Stage2;
+ }
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 position;
+in vec4 inColor;
+noperspective out vec4 vcolor_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/31-1.shader_test b/shaders/skia/31-1.shader_test
new file mode 100644
index 0000000..63e0250
--- /dev/null
+++ b/shaders/skia/31-1.shader_test
@@ -0,0 +1,63 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+uniform sampler2D uTextureSampler_2_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+vec4 TextureEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_1_Stage1, vTransformedCoords_1_Stage0) * _input;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c2_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_2_Stage1, vTransformedCoords_2_Stage0) * _input;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ vec4 planes[3];
+ planes[0] = TextureEffect_Stage1_c0_c0(vec4(1.0));
+ planes[1] = TextureEffect_Stage1_c1_c0(vec4(1.0));
+ planes[2] = TextureEffect_Stage1_c2_c0(vec4(1.0));
+ vec4 color = vec4(planes[2].x, planes[0].x, planes[1].x, 1.0);
+ output_Stage1 = color;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/31-101.shader_test b/shaders/skia/31-101.shader_test
new file mode 100644
index 0000000..4d5fca4
--- /dev/null
+++ b/shaders/skia/31-101.shader_test
@@ -0,0 +1,92 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uCoordTransformMatrix_1_Stage0;
+uniform vec4 uclamp_Stage1_c0_c0_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0_c0_c0(vec4 _input, vec2 _coords) {
+ _coords = _coords * uCoordTransformMatrix_1_Stage0.xz + uCoordTransformMatrix_1_Stage0.yw;
+ vec4 _output;
+ vec2 inCoord = _coords;
+ vec2 subsetCoord;
+ subsetCoord.x = inCoord.x;
+ subsetCoord.y = inCoord.y;
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage1_c0_c0_c0_c0.x, uclamp_Stage1_c0_c0_c0_c0.z);
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage1_c0_c0_c0_c0.y, uclamp_Stage1_c0_c0_c0_c0.w);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ _output = _input * textureColor;
+ return _output;
+}
+vec4 Bicubic_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coord = vTransformedCoords_0_Stage0 - vec2(0.5);
+ vec2 f = fract(coord);
+ coord += 0.5 - f;
+ vec4 wx = mat4(0.055555555555555552, 0.88888888888888884, 0.055555555555555552, 0.0, -0.5, 0.0, 0.5, 0.0, 0.83333333333333337, -2.0, 1.5, -0.33333333333333331, -0.3888888888888889, 1.1666666666666667, -1.1666666666666667, 0.3888888888888889) * vec4(1.0, f.x, f.x * f.x, (f.x * f.x) * f.x);
+ vec4 wy = mat4(0.055555555555555552, 0.88888888888888884, 0.055555555555555552, 0.0, -0.5, 0.0, 0.5, 0.0, 0.83333333333333337, -2.0, 1.5, -0.33333333333333331, -0.3888888888888889, 1.1666666666666667, -1.1666666666666667, 0.3888888888888889) * vec4(1.0, f.y, f.y * f.y, (f.y * f.y) * f.y);
+ vec4 rowColors[4];
+ rowColors[0] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(-1.0, -1.0));
+ rowColors[1] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(0.0, -1.0));
+ rowColors[2] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(1.0, -1.0));
+ rowColors[3] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(2.0, -1.0));
+ vec4 s0 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ rowColors[0] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(-1.0, 0.0));
+ rowColors[1] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord);
+ rowColors[2] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(1.0, 0.0));
+ rowColors[3] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(2.0, 0.0));
+ vec4 s1 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ rowColors[0] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(-1.0, 1.0));
+ rowColors[1] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(0.0, 1.0));
+ rowColors[2] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(1.0, 1.0));
+ rowColors[3] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(2.0, 1.0));
+ vec4 s2 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ rowColors[0] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(-1.0, 2.0));
+ rowColors[1] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(0.0, 2.0));
+ rowColors[2] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(1.0, 2.0));
+ rowColors[3] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(2.0, 2.0));
+ vec4 s3 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ vec4 bicubicColor = ((wy.x * s0 + wy.y * s1) + wy.z * s2) + wy.w * s3;
+ bicubicColor.xyz = max(vec3(0.0), min(bicubicColor.xyz, bicubicColor.www));
+ _output = bicubicColor * _input;
+ return _output;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = Bicubic_Stage1_c0_c0(vec4(1.0));
+ output_Stage1.xyz *= outputColor_Stage0.xyz;
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/31-105.shader_test b/shaders/skia/31-105.shader_test
new file mode 100644
index 0000000..8d3b5b4
--- /dev/null
+++ b/shaders/skia/31-105.shader_test
@@ -0,0 +1,51 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uclamp_Stage1_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 inCoord = vTransformedCoords_0_Stage0;
+ vec2 subsetCoord;
+ subsetCoord.x = inCoord.x;
+ subsetCoord.y = inCoord.y;
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage1_c0_c0.x, uclamp_Stage1_c0_c0.z);
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage1_c0_c0.y, uclamp_Stage1_c0_c0.w);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ _output = _input * textureColor;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TextureEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec3 position;
+in vec4 color;
+in vec2 localCoord;
+out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, position.z);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/31-108.shader_test b/shaders/skia/31-108.shader_test
new file mode 100644
index 0000000..9d93fca
--- /dev/null
+++ b/shaders/skia/31-108.shader_test
@@ -0,0 +1,72 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+uniform sampler2D uTextureSampler_2_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_1_Stage1, vTransformedCoords_1_Stage0) * _input;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c0_c0_c2_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_2_Stage1, vTransformedCoords_2_Stage0) * _input;
+ return _output;
+}
+vec4 YUVtoRGBEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 planes[3];
+ planes[0] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0));
+ planes[1] = TextureEffect_Stage1_c0_c0_c1_c0(vec4(1.0));
+ planes[2] = TextureEffect_Stage1_c0_c0_c2_c0(vec4(1.0));
+ vec4 color = vec4(planes[0].x, planes[1].x, planes[2].x, 1.0);
+ _output = color;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = YUVtoRGBEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/31-11.shader_test b/shaders/skia/31-11.shader_test
new file mode 100644
index 0000000..37ac646
--- /dev/null
+++ b/shaders/skia/31-11.shader_test
@@ -0,0 +1,57 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 usubset_Stage1;
+uniform vec4 uclamp_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+flat in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec2 inCoord = vTransformedCoords_0_Stage0;
+ vec2 subsetCoord;
+ subsetCoord.x = inCoord.x;
+ {
+ float w = usubset_Stage1.w - usubset_Stage1.y;
+ float w2 = 2.0 * w;
+ float m = mod(inCoord.y - usubset_Stage1.y, w2);
+ subsetCoord.y = mix(m, w2 - m, step(w, m)) + usubset_Stage1.y;
+ }
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage1.x, uclamp_Stage1.z);
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage1.y, uclamp_Stage1.w);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ output_Stage1 = outputColor_Stage0 * textureColor;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec2 inLocalCoords;
+in vec4 color;
+flat out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vcolor_Stage0 = color;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoords, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/31-112.shader_test b/shaders/skia/31-112.shader_test
new file mode 100644
index 0000000..759f757
--- /dev/null
+++ b/shaders/skia/31-112.shader_test
@@ -0,0 +1,92 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 ubaseFrequency_Stage2_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+uniform sampler2D uTextureSampler_1_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+float perlinnoise_Stage2_c0_c0(float chanCoord, vec2 noiseVec) {
+ vec4 floorVal;
+ floorVal.xy = floor(noiseVec);
+ floorVal.zw = floorVal.xy + vec2(1.0);
+ vec2 fractVal = fract(noiseVec);
+ vec2 noiseSmooth = (fractVal * fractVal) * (vec2(3.0) - vec2(2.0) * fractVal);
+ floorVal = fract(floor(mod(floorVal, 256.0)) / vec4(256.0));
+ vec2 latticeIdx;
+ latticeIdx.x = texture(uTextureSampler_0_Stage2, vec2(floorVal.x, 0.5)).x;
+ latticeIdx.y = texture(uTextureSampler_0_Stage2, vec2(floorVal.z, 0.5)).x;
+ vec4 bcoords = fract(latticeIdx.xyxy + floorVal.yyww);
+ vec2 uv;
+ vec4 lattice = texture(uTextureSampler_1_Stage2, vec2(bcoords.x, chanCoord)).zyxw;
+ uv.x = dot((lattice.yw + lattice.xz * vec2(0.00390625)) * vec2(2.0) - vec2(1.0), fractVal);
+ fractVal.x -= 1.0;
+ lattice = texture(uTextureSampler_1_Stage2, vec2(bcoords.y, chanCoord)).zyxw;
+ uv.y = dot((lattice.yw + lattice.xz * vec2(0.00390625)) * vec2(2.0) - vec2(1.0), fractVal);
+ vec2 ab;
+ ab.x = mix(uv.x, uv.y, noiseSmooth.x);
+ fractVal.y -= 1.0;
+ lattice = texture(uTextureSampler_1_Stage2, vec2(bcoords.w, chanCoord)).zyxw;
+ uv.y = dot((lattice.yw + lattice.xz * vec2(0.00390625)) * vec2(2.0) - vec2(1.0), fractVal);
+ fractVal.x += 1.0;
+ lattice = texture(uTextureSampler_1_Stage2, vec2(bcoords.z, chanCoord)).zyxw;
+ uv.x = dot((lattice.yw + lattice.xz * vec2(0.00390625)) * vec2(2.0) - vec2(1.0), fractVal);
+ ab.y = mix(uv.x, uv.y, noiseSmooth.x);
+ return mix(ab.x, ab.y, noiseSmooth.y);
+}
+vec4 PerlinNoise_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 noiseVec = floor(vTransformedCoords_1_Stage0) * ubaseFrequency_Stage2_c0_c0;
+ _output = vec4(0.0);
+ float ratio = 1.0;
+ for (int octave = 0;octave < 5; ++octave) {
+ _output += abs(vec4(perlinnoise_Stage2_c0_c0(0.125, noiseVec), perlinnoise_Stage2_c0_c0(0.375, noiseVec), perlinnoise_Stage2_c0_c0(0.625, noiseVec), perlinnoise_Stage2_c0_c0(0.875, noiseVec))) * ratio;
+ noiseVec *= vec2(2.0);
+ ratio *= 0.5;
+ }
+ _output = clamp(_output, 0.0, 1.0);
+ _output = vec4(_output.xyz * _output.www, _output.w);
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_dst_in(output_Stage1, PerlinNoise_Stage2_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/31-113.shader_test b/shaders/skia/31-113.shader_test
new file mode 100644
index 0000000..01149b1
--- /dev/null
+++ b/shaders/skia/31-113.shader_test
@@ -0,0 +1,81 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uCoordTransformMatrix_2_Stage0;
+uniform vec4 usubset_Stage2_c0_c0;
+uniform vec4 uclamp_Stage2_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 TextureEffect_Stage2_c0_c0(vec4 _input, vec2 _coords) {
+ _coords = _coords * uCoordTransformMatrix_2_Stage0.xz + uCoordTransformMatrix_2_Stage0.yw;
+ vec4 _output;
+ vec2 inCoord = _coords;
+ vec2 subsetCoord;
+ {
+ float w = usubset_Stage2_c0_c0.z - usubset_Stage2_c0_c0.x;
+ float w2 = 2.0 * w;
+ float m = mod(inCoord.x - usubset_Stage2_c0_c0.x, w2);
+ subsetCoord.x = mix(m, w2 - m, step(w, m)) + usubset_Stage2_c0_c0.x;
+ }
+ {
+ float w = usubset_Stage2_c0_c0.w - usubset_Stage2_c0_c0.y;
+ float w2 = 2.0 * w;
+ float m = mod(inCoord.y - usubset_Stage2_c0_c0.y, w2);
+ subsetCoord.y = mix(m, w2 - m, step(w, m)) + usubset_Stage2_c0_c0.y;
+ }
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage2_c0_c0.x, uclamp_Stage2_c0_c0.z);
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage2_c0_c0.y, uclamp_Stage2_c0_c0.w);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ _output = _input * textureColor;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ float coord = vTransformedCoords_1_Stage0.x - 0.5;
+ float f = fract(coord);
+ coord += 0.5 - f;
+ float f2 = f * f;
+ vec4 w = mat4(0.055555555555555552, 0.88888888888888884, 0.055555555555555552, 0.0, -0.5, 0.0, 0.5, 0.0, 0.83333333333333337, -2.0, 1.5, -0.33333333333333331, -0.3888888888888889, 1.1666666666666667, -1.1666666666666667, 0.3888888888888889) * vec4(1.0, f, f2, f2 * f);
+ vec4 c[4];
+ c[0] = TextureEffect_Stage2_c0_c0(vec4(1.0), vec2(coord + -1.0, vTransformedCoords_1_Stage0.y));
+ c[1] = TextureEffect_Stage2_c0_c0(vec4(1.0), vec2(coord, vTransformedCoords_1_Stage0.y));
+ c[2] = TextureEffect_Stage2_c0_c0(vec4(1.0), vec2(coord + 1.0, vTransformedCoords_1_Stage0.y));
+ c[3] = TextureEffect_Stage2_c0_c0(vec4(1.0), vec2(coord + 2.0, vTransformedCoords_1_Stage0.y));
+ vec4 bicubicColor = ((c[0] * w.x + c[1] * w.y) + c[2] * w.z) + c[3] * w.w;
+ bicubicColor.xyz = max(vec3(0.0), min(bicubicColor.xyz, bicubicColor.www));
+ output_Stage2 = bicubicColor * output_Stage1;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/31-16.shader_test b/shaders/skia/31-16.shader_test
new file mode 100644
index 0000000..ad60c12
--- /dev/null
+++ b/shaders/skia/31-16.shader_test
@@ -0,0 +1,108 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 uscale01_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias01_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale23_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias23_Stage1_c0_c0_c1_c0;
+uniform float uthreshold_Stage1_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage2_c1_c0_c0_c0;
+uniform vec4 ucolor_Stage2_c2_c0_c0_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 RadialGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = length(vTransformedCoords_0_Stage0);
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 DualIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthreshold_Stage1_c0_c0_c1_c0) {
+ scale = uscale01_Stage1_c0_c0_c1_c0;
+ bias = ubias01_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale23_Stage1_c0_c0_c1_c0;
+ bias = ubias23_Stage1_c0_c0_c1_c0;
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = RadialGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = DualIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c1_c0_c0_c0;
+ }
+ return _output;
+}
+vec4 blend_xor(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src + (1.0 - src.w) * dst;
+}
+vec4 ComposeOne_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_xor(ConstColorProcessor_Stage2_c1_c0_c0_c0(vec4(1.0)), _input);
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c2_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c2_c0_c0_c0;
+ }
+ return _output;
+}
+vec4 ComposeOne_Stage2_c2_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_xor(ConstColorProcessor_Stage2_c2_c0_c0_c0(vec4(1.0)), _input);
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = ComposeOne_Stage2_c2_c0(ComposeOne_Stage2_c1_c0(output_Stage1));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/31-17.shader_test b/shaders/skia/31-17.shader_test
new file mode 100644
index 0000000..1405f27
--- /dev/null
+++ b/shaders/skia/31-17.shader_test
@@ -0,0 +1,113 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 uscale01_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias01_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale23_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias23_Stage1_c0_c0_c1_c0;
+uniform float uthreshold_Stage1_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage2_c1_c0_c0_c0;
+uniform vec4 ucolor_Stage2_c2_c0_c0_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 RadialGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = length(vTransformedCoords_0_Stage0);
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 DualIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthreshold_Stage1_c0_c0_c1_c0) {
+ scale = uscale01_Stage1_c0_c0_c1_c0;
+ bias = ubias01_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale23_Stage1_c0_c0_c1_c0;
+ bias = ubias23_Stage1_c0_c0_c1_c0;
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = RadialGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = DualIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c1_c0_c0_c0;
+ }
+ return _output;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 blend_darken(vec4 src, vec4 dst) {
+ vec4 result = blend_src_over(src, dst);
+ result.xyz = min(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
+ return result;
+}
+vec4 ComposeOne_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_darken(ConstColorProcessor_Stage2_c1_c0_c0_c0(vec4(1.0)), _input);
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c2_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c2_c0_c0_c0;
+ }
+ return _output;
+}
+vec4 ComposeOne_Stage2_c2_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_darken(ConstColorProcessor_Stage2_c2_c0_c0_c0(vec4(1.0)), _input);
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = ComposeOne_Stage2_c2_c0(ComposeOne_Stage2_c1_c0(output_Stage1));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/31-18.shader_test b/shaders/skia/31-18.shader_test
new file mode 100644
index 0000000..6ec543b
--- /dev/null
+++ b/shaders/skia/31-18.shader_test
@@ -0,0 +1,71 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uColor_Stage0;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in float vinCoverage_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ float alpha = 1.0;
+ alpha = vinCoverage_Stage0;
+ outputCoverage_Stage0 = vec4(alpha);
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1 * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in float inCoverage;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out float vinCoverage_Stage0;
+void main() {
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ vinCoverage_Stage0 = inCoverage;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/31-19.shader_test b/shaders/skia/31-19.shader_test
new file mode 100644
index 0000000..ad25c8a
--- /dev/null
+++ b/shaders/skia/31-19.shader_test
@@ -0,0 +1,72 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uColor_Stage0;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = uColor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_dst_in(outputColor_Stage0, ClampedGradientEffect_Stage1_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(position, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/31-2.shader_test b/shaders/skia/31-2.shader_test
new file mode 100644
index 0000000..f68c4a7
--- /dev/null
+++ b/shaders/skia/31-2.shader_test
@@ -0,0 +1,25 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uColor_Stage0;
+void main() {
+ {
+ sk_FragColor = vec4(0.0);
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 inPosition;
+void main() {
+ vec2 pos2 = inPosition;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/31-20.shader_test b/shaders/skia/31-20.shader_test
new file mode 100644
index 0000000..351df9f
--- /dev/null
+++ b/shaders/skia/31-20.shader_test
@@ -0,0 +1,138 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform vec2 uBounds_Stage1;
+uniform vec4 uKernel_Stage1[7];
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0 - 12.0 * uImageIncrement_Stage1;
+ vec2 coordSampled = vec2(0.0, 0.0);
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[4].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[4].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[4].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[4].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[5].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[5].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[5].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[5].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[6].x;
+ coord += uImageIncrement_Stage1;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/31-24.shader_test b/shaders/skia/31-24.shader_test
new file mode 100644
index 0000000..0c22f0f
--- /dev/null
+++ b/shaders/skia/31-24.shader_test
@@ -0,0 +1,76 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec2 uDstTextureUpperLeft_Stage3;
+uniform vec2 uDstTextureCoordScale_Stage3;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+uniform sampler2D uDstTextureSampler_Stage3;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+vec4 TextureEffect_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage2, vTransformedCoords_1_Stage0) * _input;
+ return _output;
+}
+vec4 Swizzle_Stage2_c2_c0(vec4 _input) {
+ vec4 _output;
+ _output = _input.wwww;
+ return _output;
+}
+vec4 blend_src_out(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TextureEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = Swizzle_Stage2_c2_c0(TextureEffect_Stage2_c1_c0(vec4(1.0)));
+ }
+ {
+ if (all(lessThanEqual(output_Stage2.xyz, vec3(0.0)))) {
+ discard;
+ }
+ vec2 _dstTexCoord = (gl_FragCoord.xy - uDstTextureUpperLeft_Stage3) * uDstTextureCoordScale_Stage3;
+ _dstTexCoord.y = 1.0 - _dstTexCoord.y;
+ vec4 _dstColor = texture(uDstTextureSampler_Stage3, _dstTexCoord);
+ sk_FragColor = blend_src_out(output_Stage1, _dstColor);
+ sk_FragColor = output_Stage2 * sk_FragColor + (vec4(1.0) - output_Stage2) * _dstColor;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/31-25.shader_test b/shaders/skia/31-25.shader_test
new file mode 100644
index 0000000..1da7cac
--- /dev/null
+++ b/shaders/skia/31-25.shader_test
@@ -0,0 +1,43 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uinnerRect_Stage1;
+uniform vec2 uradiusPlusHalf_Stage1;
+flat in vec4 vcolor_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec2 dxy = max(gl_FragCoord.xy - uinnerRect_Stage1.zw, 0.0);
+ float leftAlpha = clamp(gl_FragCoord.x - uinnerRect_Stage1.x, 0.0, 1.0);
+ float topAlpha = clamp(gl_FragCoord.y - uinnerRect_Stage1.y, 0.0, 1.0);
+ float alpha = (topAlpha * leftAlpha) * clamp(uradiusPlusHalf_Stage1.x - length(dxy), 0.0, 1.0);
+ output_Stage1 = vec4(alpha);
+ }
+ {
+ sk_FragColor = outputColor_Stage0 * output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 position;
+in vec4 color;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/31-26.shader_test b/shaders/skia/31-26.shader_test
new file mode 100644
index 0000000..61c0034
--- /dev/null
+++ b/shaders/skia/31-26.shader_test
@@ -0,0 +1,49 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+noperspective in vec2 vEllipseOffsets_Stage0;
+noperspective in vec4 vEllipseRadii_Stage0;
+noperspective in vec4 vinColor_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vinColor_Stage0;
+ vec2 offset = vEllipseOffsets_Stage0;
+ float test = dot(offset, offset) - 1.0;
+ vec2 grad = (2.0 * offset) * vEllipseRadii_Stage0.xy;
+ float grad_dot = dot(grad, grad);
+ grad_dot = max(grad_dot, 1.1754999560161448e-38);
+ float invlen = inversesqrt(grad_dot);
+ float edgeAlpha = clamp(0.5 - test * invlen, 0.0, 1.0);
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ {
+ sk_FragColor = outputColor_Stage0 * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 inPosition;
+in vec4 inColor;
+in vec2 inEllipseOffset;
+in vec4 inEllipseRadii;
+noperspective out vec2 vEllipseOffsets_Stage0;
+noperspective out vec4 vEllipseRadii_Stage0;
+noperspective out vec4 vinColor_Stage0;
+void main() {
+ vEllipseOffsets_Stage0 = inEllipseOffset;
+ vEllipseRadii_Stage0 = inEllipseRadii;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = inPosition;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/31-29.shader_test b/shaders/skia/31-29.shader_test
new file mode 100644
index 0000000..97454c2
--- /dev/null
+++ b/shaders/skia/31-29.shader_test
@@ -0,0 +1,44 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform float uPixelSize_Stage1;
+uniform vec2 uRange_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = vec4(1.0, 1.0, 1.0, 1.0);
+ vec2 coord = vTransformedCoords_0_Stage0;
+ coord.y -= 2.0 * uPixelSize_Stage1;
+ float highBound = min(uRange_Stage1.y, coord.y + 4.0 * uPixelSize_Stage1);
+ coord.y = max(uRange_Stage1.x, coord.y);
+ for (int i = 0;i < 5; i++) {
+ output_Stage1 = min(output_Stage1, texture(uTextureSampler_0_Stage1, coord));
+ coord.y += uPixelSize_Stage1;
+ coord.y = min(highBound, coord.y);
+ }
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/31-33.shader_test b/shaders/skia/31-33.shader_test
new file mode 100644
index 0000000..6697d64
--- /dev/null
+++ b/shaders/skia/31-33.shader_test
@@ -0,0 +1,67 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec2 uDstTextureUpperLeft_Stage1;
+uniform vec2 uDstTextureCoordScale_Stage1;
+uniform sampler2D uTextureSampler_0_Stage0;
+uniform sampler2D uDstTextureSampler_Stage1;
+noperspective in vec2 vTextureCoords_Stage0;
+flat in int vTexIndex_Stage0;
+noperspective in vec4 vinColor_Stage0;
+vec4 blend_dst_out(vec4 src, vec4 dst) {
+ return (1.0 - src.w) * dst;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vinColor_Stage0;
+ vec4 texColor;
+ {
+ texColor = texture(uTextureSampler_0_Stage0, vTextureCoords_Stage0);
+ }
+ outputCoverage_Stage0 = texColor;
+ }
+ {
+ if (all(lessThanEqual(outputCoverage_Stage0.xyz, vec3(0.0)))) {
+ discard;
+ }
+ vec2 _dstTexCoord = (gl_FragCoord.xy - uDstTextureUpperLeft_Stage1) * uDstTextureCoordScale_Stage1;
+ _dstTexCoord.y = 1.0 - _dstTexCoord.y;
+ vec4 _dstColor = texture(uDstTextureSampler_Stage1, _dstTexCoord);
+ sk_FragColor = blend_dst_out(outputColor_Stage0, _dstColor);
+ float lerpRed = mix(_dstColor.w, sk_FragColor.w, outputCoverage_Stage0.x);
+ float lerpBlue = mix(_dstColor.w, sk_FragColor.w, outputCoverage_Stage0.y);
+ float lerpGreen = mix(_dstColor.w, sk_FragColor.w, outputCoverage_Stage0.z);
+ sk_FragColor = outputCoverage_Stage0 * sk_FragColor + (vec4(1.0) - outputCoverage_Stage0) * _dstColor;
+ sk_FragColor.w = max(max(lerpRed, lerpBlue), lerpGreen);
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform vec2 uAtlasSizeInv_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in uvec2 inTextureCoords;
+noperspective out vec2 vTextureCoords_Stage0;
+flat out int vTexIndex_Stage0;
+noperspective out vec4 vinColor_Stage0;
+void main() {
+ ivec2 signedCoords = ivec2(int(inTextureCoords.x), int(inTextureCoords.y));
+ vec2 unormTexCoords = vec2(float(signedCoords.x / 2), float(signedCoords.y / 2));
+ vTextureCoords_Stage0 = unormTexCoords * uAtlasSizeInv_Stage0;
+ vTexIndex_Stage0 = 0;
+ vinColor_Stage0 = inColor;
+ gl_Position = vec4(inPosition.x, inPosition.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/31-34.shader_test b/shaders/skia/31-34.shader_test
new file mode 100644
index 0000000..1789801
--- /dev/null
+++ b/shaders/skia/31-34.shader_test
@@ -0,0 +1,133 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform vec2 uBounds_Stage1;
+uniform vec4 uKernel_Stage1[5];
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0 - 9.0 * uImageIncrement_Stage1;
+ vec2 coordSampled = vec2(0.0, 0.0);
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1.x && coord.x <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].x;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1.x && coord.x <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].y;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1.x && coord.x <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].z;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1.x && coord.x <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].w;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1.x && coord.x <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].x;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1.x && coord.x <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].y;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1.x && coord.x <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].z;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1.x && coord.x <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].w;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1.x && coord.x <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].x;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1.x && coord.x <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].y;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1.x && coord.x <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].z;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1.x && coord.x <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].w;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1.x && coord.x <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].x;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1.x && coord.x <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].y;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1.x && coord.x <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].z;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1.x && coord.x <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].w;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1.x && coord.x <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[4].x;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1.x && coord.x <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[4].y;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1.x && coord.x <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[4].z;
+ }
+ coord += uImageIncrement_Stage1;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/31-38.shader_test b/shaders/skia/31-38.shader_test
new file mode 100644
index 0000000..f960df5
--- /dev/null
+++ b/shaders/skia/31-38.shader_test
@@ -0,0 +1,86 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uCoordTransformMatrix_1_Stage0;
+uniform vec4 uclamp_Stage1_c0_c0_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0_c0_c0(vec4 _input, vec2 _coords) {
+ _coords = _coords * uCoordTransformMatrix_1_Stage0.xz + uCoordTransformMatrix_1_Stage0.yw;
+ vec4 _output;
+ vec2 inCoord = _coords;
+ vec2 subsetCoord;
+ subsetCoord.x = inCoord.x;
+ subsetCoord.y = inCoord.y;
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage1_c0_c0_c0_c0.x, uclamp_Stage1_c0_c0_c0_c0.z);
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage1_c0_c0_c0_c0.y, uclamp_Stage1_c0_c0_c0_c0.w);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ _output = _input * textureColor;
+ return _output;
+}
+vec4 Bicubic_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coord = vTransformedCoords_0_Stage0 - vec2(0.5);
+ vec2 f = fract(coord);
+ coord += 0.5 - f;
+ vec4 wx = mat4(0.055555555555555552, 0.88888888888888884, 0.055555555555555552, 0.0, -0.5, 0.0, 0.5, 0.0, 0.83333333333333337, -2.0, 1.5, -0.33333333333333331, -0.3888888888888889, 1.1666666666666667, -1.1666666666666667, 0.3888888888888889) * vec4(1.0, f.x, f.x * f.x, (f.x * f.x) * f.x);
+ vec4 wy = mat4(0.055555555555555552, 0.88888888888888884, 0.055555555555555552, 0.0, -0.5, 0.0, 0.5, 0.0, 0.83333333333333337, -2.0, 1.5, -0.33333333333333331, -0.3888888888888889, 1.1666666666666667, -1.1666666666666667, 0.3888888888888889) * vec4(1.0, f.y, f.y * f.y, (f.y * f.y) * f.y);
+ vec4 rowColors[4];
+ rowColors[0] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(-1.0, -1.0));
+ rowColors[1] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(0.0, -1.0));
+ rowColors[2] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(1.0, -1.0));
+ rowColors[3] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(2.0, -1.0));
+ vec4 s0 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ rowColors[0] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(-1.0, 0.0));
+ rowColors[1] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord);
+ rowColors[2] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(1.0, 0.0));
+ rowColors[3] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(2.0, 0.0));
+ vec4 s1 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ rowColors[0] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(-1.0, 1.0));
+ rowColors[1] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(0.0, 1.0));
+ rowColors[2] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(1.0, 1.0));
+ rowColors[3] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(2.0, 1.0));
+ vec4 s2 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ rowColors[0] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(-1.0, 2.0));
+ rowColors[1] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(0.0, 2.0));
+ rowColors[2] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(1.0, 2.0));
+ rowColors[3] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(2.0, 2.0));
+ vec4 s3 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ vec4 bicubicColor = ((wy.x * s0 + wy.y * s1) + wy.z * s2) + wy.w * s3;
+ bicubicColor = clamp(bicubicColor, 0.0, 1.0);
+ _output = bicubicColor * _input;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = Bicubic_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/31-39.shader_test b/shaders/skia/31-39.shader_test
new file mode 100644
index 0000000..c049d24
--- /dev/null
+++ b/shaders/skia/31-39.shader_test
@@ -0,0 +1,56 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uScale_Stage1;
+uniform vec4 uTexDom_Stage1;
+uniform vec3 uDecalParams_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ vec4 dColor = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ dColor.xyz = dColor.w < 9.9999999747524271e-07 ? vec3(0.0) : clamp(dColor.xyz / dColor.w, 0.0, 1.0);
+ vec2 cCoords = vTransformedCoords_1_Stage0 + uScale_Stage1 * (dColor.xx - vec2(0.5));
+ {
+ vec2 origCoord = cCoords;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ output_Stage1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/31-4.shader_test b/shaders/skia/31-4.shader_test
new file mode 100644
index 0000000..18130d3
--- /dev/null
+++ b/shaders/skia/31-4.shader_test
@@ -0,0 +1,50 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 TextureEffect_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage2, vTransformedCoords_1_Stage0) * _input;
+ return _output;
+}
+vec4 blend_src_atop(vec4 src, vec4 dst) {
+ return dst.w * src + (1.0 - src.w) * dst;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_src_atop(output_Stage1, TextureEffect_Stage2_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/31-41.shader_test b/shaders/skia/31-41.shader_test
new file mode 100644
index 0000000..aa7103e
--- /dev/null
+++ b/shaders/skia/31-41.shader_test
@@ -0,0 +1,82 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform vec2 uBounds_Stage1;
+uniform vec4 uKernel_Stage1[3];
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0 - 5.0 * uImageIncrement_Stage1;
+ vec2 coordSampled = vec2(0.0, 0.0);
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].z;
+ coord += uImageIncrement_Stage1;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/31-47.shader_test b/shaders/skia/31-47.shader_test
new file mode 100644
index 0000000..74c9294
--- /dev/null
+++ b/shaders/skia/31-47.shader_test
@@ -0,0 +1,54 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uinnerRect_Stage2;
+uniform vec2 uradiusPlusHalf_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TextureEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ vec2 dxy0 = uinnerRect_Stage2.xy - gl_FragCoord.xy;
+ vec2 dxy1 = gl_FragCoord.xy - uinnerRect_Stage2.zw;
+ vec2 dxy = max(max(dxy0, dxy1), 0.0);
+ float alpha = clamp(uradiusPlusHalf_Stage2.x - length(dxy), 0.0, 1.0);
+ output_Stage2 = vec4(alpha);
+ }
+ {
+ sk_FragColor = output_Stage1 * output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/31-5.shader_test b/shaders/skia/31-5.shader_test
new file mode 100644
index 0000000..7c42866
--- /dev/null
+++ b/shaders/skia/31-5.shader_test
@@ -0,0 +1,82 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uclamp_Stage1_c0_c0_c0_c0;
+uniform vec4 uclamp_Stage1_c0_c0_c1_c0;
+uniform mat3 ucolorSpaceMatrix_Stage1_c0_c0;
+uniform vec3 ucolorSpaceTranslate_Stage1_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 inCoord = vTransformedCoords_0_Stage0;
+ vec2 subsetCoord;
+ subsetCoord.x = inCoord.x;
+ subsetCoord.y = inCoord.y;
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage1_c0_c0_c0_c0.x, uclamp_Stage1_c0_c0_c0_c0.z);
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage1_c0_c0_c0_c0.y, uclamp_Stage1_c0_c0_c0_c0.w);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ _output = _input * textureColor;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 inCoord = vTransformedCoords_1_Stage0;
+ vec2 subsetCoord;
+ subsetCoord.x = inCoord.x;
+ subsetCoord.y = inCoord.y;
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage1_c0_c0_c1_c0.x, uclamp_Stage1_c0_c0_c1_c0.z);
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage1_c0_c0_c1_c0.y, uclamp_Stage1_c0_c0_c1_c0.w);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ _output = _input * textureColor;
+ return _output;
+}
+vec4 YUVtoRGBEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 planes[2];
+ planes[0] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0));
+ planes[1] = TextureEffect_Stage1_c0_c0_c1_c0(vec4(1.0));
+ vec4 color = vec4(planes[0].w, planes[1].x, planes[1].y, 1.0);
+ color.xyz = clamp(color.xyz * ucolorSpaceMatrix_Stage1_c0_c0 + ucolorSpaceTranslate_Stage1_c0_c0, 0.0, 1.0);
+ _output = color;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = YUVtoRGBEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/31-51.shader_test b/shaders/skia/31-51.shader_test
new file mode 100644
index 0000000..a78bc45
--- /dev/null
+++ b/shaders/skia/31-51.shader_test
@@ -0,0 +1,52 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uColor_Stage0;
+uniform vec2 uDstTextureUpperLeft_Stage1;
+uniform vec2 uDstTextureCoordScale_Stage1;
+uniform sampler2D uDstTextureSampler_Stage1;
+noperspective in float vinCoverage_Stage0;
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = uColor_Stage0;
+ float alpha = 1.0;
+ alpha = vinCoverage_Stage0;
+ outputCoverage_Stage0 = vec4(alpha);
+ }
+ {
+ if (all(lessThanEqual(outputCoverage_Stage0.xyz, vec3(0.0)))) {
+ discard;
+ }
+ vec2 _dstTexCoord = (gl_FragCoord.xy - uDstTextureUpperLeft_Stage1) * uDstTextureCoordScale_Stage1;
+ _dstTexCoord.y = 1.0 - _dstTexCoord.y;
+ vec4 _dstColor = texture(uDstTextureSampler_Stage1, _dstTexCoord);
+ sk_FragColor = blend_src_in(outputColor_Stage0, _dstColor);
+ sk_FragColor = outputCoverage_Stage0 * sk_FragColor + (vec4(1.0) - outputCoverage_Stage0) * _dstColor;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 inPosition;
+in float inCoverage;
+noperspective out float vinCoverage_Stage0;
+void main() {
+ vec2 pos2 = inPosition;
+ vinCoverage_Stage0 = inCoverage;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/31-53.shader_test b/shaders/skia/31-53.shader_test
new file mode 100644
index 0000000..d42eb5b
--- /dev/null
+++ b/shaders/skia/31-53.shader_test
@@ -0,0 +1,105 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 uscale01_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias01_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale23_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias23_Stage1_c0_c0_c1_c0;
+uniform float uthreshold_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_0_Stage0;
+ float t = -1.0;
+ float v = 1.0;
+ {
+ {
+ float invR1 = ufocalParams_Stage1_c0_c0_c0_c0.x;
+ float fx = ufocalParams_Stage1_c0_c0_c0_c0.y;
+ float x_t = -1.0;
+ {
+ float temp = p.x * p.x - p.y * p.y;
+ if (temp >= 0.0) {
+ {
+ x_t = -sqrt(temp) - p.x * invR1;
+ }
+ }
+ }
+ {
+ if (x_t <= 0.0) {
+ v = -1.0;
+ }
+ }
+ {
+ {
+ t = -x_t + fx;
+ }
+ }
+ }
+ }
+ _output = vec4(t, v, 0.0, 0.0);
+ return _output;
+}
+vec4 DualIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthreshold_Stage1_c0_c0_c1_c0) {
+ scale = uscale01_Stage1_c0_c0_c1_c0;
+ bias = ubias01_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale23_Stage1_c0_c0_c1_c0;
+ bias = ubias23_Stage1_c0_c0_c1_c0;
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = DualIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/31-54.shader_test b/shaders/skia/31-54.shader_test
new file mode 100644
index 0000000..e0ef5be
--- /dev/null
+++ b/shaders/skia/31-54.shader_test
@@ -0,0 +1,121 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 uscale01_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias01_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale23_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias23_Stage1_c0_c0_c1_c0;
+uniform float uthreshold_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_0_Stage0;
+ float t = -1.0;
+ float v = 1.0;
+ {
+ {
+ float invR1 = ufocalParams_Stage1_c0_c0_c0_c0.x;
+ float fx = ufocalParams_Stage1_c0_c0_c0_c0.y;
+ float x_t = -1.0;
+ {
+ float temp = p.x * p.x - p.y * p.y;
+ if (temp >= 0.0) {
+ {
+ x_t = -sqrt(temp) - p.x * invR1;
+ }
+ }
+ }
+ {
+ if (x_t <= 0.0) {
+ v = -1.0;
+ }
+ }
+ {
+ {
+ t = -x_t + fx;
+ }
+ }
+ }
+ }
+ _output = vec4(t, v, 0.0, 0.0);
+ return _output;
+}
+vec4 DualIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthreshold_Stage1_c0_c0_c1_c0) {
+ scale = uscale01_Stage1_c0_c0_c1_c0;
+ bias = ubias01_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale23_Stage1_c0_c0_c1_c0;
+ bias = ubias23_Stage1_c0_c0_c1_c0;
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = DualIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_1_Stage0.x);
+ uint y = uint(vTransformedCoords_1_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ output_Stage2 = vec4(clamp(output_Stage2.xyz + value * 0.0039215688593685627, 0.0, output_Stage2.w), output_Stage2.w);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/31-55.shader_test b/shaders/skia/31-55.shader_test
new file mode 100644
index 0000000..0941d42
--- /dev/null
+++ b/shaders/skia/31-55.shader_test
@@ -0,0 +1,116 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_0_Stage0;
+ float t = -1.0;
+ float v = 1.0;
+ {
+ {
+ float fx = ufocalParams_Stage1_c0_c0_c0_c0.y;
+ float x_t = -1.0;
+ {
+ x_t = dot(p, p) / p.x;
+ }
+ {
+ if (x_t <= 0.0) {
+ v = -1.0;
+ }
+ }
+ {
+ {
+ t = x_t + fx;
+ }
+ }
+ }
+ }
+ _output = vec4(t, v, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/31-57.shader_test b/shaders/skia/31-57.shader_test
new file mode 100644
index 0000000..194c65b
--- /dev/null
+++ b/shaders/skia/31-57.shader_test
@@ -0,0 +1,105 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_0_Stage0;
+ float t = -1.0;
+ {
+ {
+ float invR1 = ufocalParams_Stage1_c0_c0_c0_c0.x;
+ float x_t = -1.0;
+ {
+ x_t = length(p) - p.x * invR1;
+ }
+ {
+ {
+ t = x_t;
+ }
+ }
+ }
+ }
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/31-58.shader_test b/shaders/skia/31-58.shader_test
new file mode 100644
index 0000000..7f8629c
--- /dev/null
+++ b/shaders/skia/31-58.shader_test
@@ -0,0 +1,131 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_0_Stage0;
+ float t = -1.0;
+ float v = 1.0;
+ {
+ {
+ float fx = ufocalParams_Stage1_c0_c0_c0_c0.y;
+ float x_t = -1.0;
+ {
+ x_t = dot(p, p) / p.x;
+ }
+ {
+ if (x_t <= 0.0) {
+ v = -1.0;
+ }
+ }
+ {
+ {
+ t = x_t + fx;
+ }
+ }
+ }
+ }
+ _output = vec4(t, v, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TiledGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_1_Stage0.x);
+ uint y = uint(vTransformedCoords_1_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ output_Stage2 = vec4(clamp(output_Stage2.xyz + value * 0.0039215688593685627, 0.0, output_Stage2.w), output_Stage2.w);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/31-6.shader_test b/shaders/skia/31-6.shader_test
new file mode 100644
index 0000000..1bc98eb
--- /dev/null
+++ b/shaders/skia/31-6.shader_test
@@ -0,0 +1,75 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+uniform sampler2D uTextureSampler_2_Stage1;
+uniform sampler2D uTextureSampler_3_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+noperspective in vec2 vTransformedCoords_3_Stage0;
+vec4 TextureEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_1_Stage1, vTransformedCoords_1_Stage0) * _input;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c2_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_2_Stage1, vTransformedCoords_2_Stage0) * _input;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c3_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_3_Stage1, vTransformedCoords_3_Stage0) * _input;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ vec4 planes[4];
+ planes[0] = TextureEffect_Stage1_c0_c0(vec4(1.0));
+ planes[1] = TextureEffect_Stage1_c1_c0(vec4(1.0));
+ planes[2] = TextureEffect_Stage1_c2_c0(vec4(1.0));
+ planes[3] = TextureEffect_Stage1_c3_c0(vec4(1.0));
+ vec4 color = vec4(planes[0].x, planes[1].x, planes[2].x, planes[3].w);
+ color.xyz *= color.w;
+ output_Stage1 = color;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+uniform mat3 uCoordTransformMatrix_3_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+noperspective out vec2 vTransformedCoords_3_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_3_Stage0 = (uCoordTransformMatrix_3_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/31-60.shader_test b/shaders/skia/31-60.shader_test
new file mode 100644
index 0000000..5283cf6
--- /dev/null
+++ b/shaders/skia/31-60.shader_test
@@ -0,0 +1,120 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_0_Stage0;
+ float t = -1.0;
+ {
+ {
+ float invR1 = ufocalParams_Stage1_c0_c0_c0_c0.x;
+ float x_t = -1.0;
+ {
+ x_t = length(p) - p.x * invR1;
+ }
+ {
+ {
+ t = x_t;
+ }
+ }
+ }
+ }
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TiledGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_1_Stage0.x);
+ uint y = uint(vTransformedCoords_1_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ output_Stage2 = vec4(clamp(output_Stage2.xyz + value * 0.0039215688593685627, 0.0, output_Stage2.w), output_Stage2.w);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/31-61.shader_test b/shaders/skia/31-61.shader_test
new file mode 100644
index 0000000..5d1da8b
--- /dev/null
+++ b/shaders/skia/31-61.shader_test
@@ -0,0 +1,129 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_0_Stage0;
+ float t = -1.0;
+ float v = 1.0;
+ {
+ {
+ float fx = ufocalParams_Stage1_c0_c0_c0_c0.y;
+ float x_t = -1.0;
+ {
+ x_t = dot(p, p) / p.x;
+ }
+ {
+ if (x_t <= 0.0) {
+ v = -1.0;
+ }
+ }
+ {
+ {
+ t = x_t + fx;
+ }
+ }
+ }
+ }
+ _output = vec4(t, v, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else {
+ {
+ t.x = fract(t.x);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TiledGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_1_Stage0.x);
+ uint y = uint(vTransformedCoords_1_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ output_Stage2 = vec4(clamp(output_Stage2.xyz + value * 0.0039215688593685627, 0.0, output_Stage2.w), output_Stage2.w);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/31-63.shader_test b/shaders/skia/31-63.shader_test
new file mode 100644
index 0000000..b085821
--- /dev/null
+++ b/shaders/skia/31-63.shader_test
@@ -0,0 +1,118 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_0_Stage0;
+ float t = -1.0;
+ {
+ {
+ float invR1 = ufocalParams_Stage1_c0_c0_c0_c0.x;
+ float x_t = -1.0;
+ {
+ x_t = length(p) - p.x * invR1;
+ }
+ {
+ {
+ t = x_t;
+ }
+ }
+ }
+ }
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else {
+ {
+ t.x = fract(t.x);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TiledGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_1_Stage0.x);
+ uint y = uint(vTransformedCoords_1_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ output_Stage2 = vec4(clamp(output_Stage2.xyz + value * 0.0039215688593685627, 0.0, output_Stage2.w), output_Stage2.w);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/31-64.shader_test b/shaders/skia/31-64.shader_test
new file mode 100644
index 0000000..d33e002
--- /dev/null
+++ b/shaders/skia/31-64.shader_test
@@ -0,0 +1,132 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_0_Stage0;
+ float t = -1.0;
+ float v = 1.0;
+ {
+ {
+ float fx = ufocalParams_Stage1_c0_c0_c0_c0.y;
+ float x_t = -1.0;
+ {
+ x_t = dot(p, p) / p.x;
+ }
+ {
+ if (x_t <= 0.0) {
+ v = -1.0;
+ }
+ }
+ {
+ {
+ t = x_t + fx;
+ }
+ }
+ }
+ }
+ _output = vec4(t, v, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_1_Stage0.x);
+ uint y = uint(vTransformedCoords_1_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ output_Stage2 = vec4(clamp(output_Stage2.xyz + value * 0.0039215688593685627, 0.0, output_Stage2.w), output_Stage2.w);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/31-66.shader_test b/shaders/skia/31-66.shader_test
new file mode 100644
index 0000000..560d2de
--- /dev/null
+++ b/shaders/skia/31-66.shader_test
@@ -0,0 +1,121 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_0_Stage0;
+ float t = -1.0;
+ {
+ {
+ float invR1 = ufocalParams_Stage1_c0_c0_c0_c0.x;
+ float x_t = -1.0;
+ {
+ x_t = length(p) - p.x * invR1;
+ }
+ {
+ {
+ t = x_t;
+ }
+ }
+ }
+ }
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_1_Stage0.x);
+ uint y = uint(vTransformedCoords_1_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ output_Stage2 = vec4(clamp(output_Stage2.xyz + value * 0.0039215688593685627, 0.0, output_Stage2.w), output_Stage2.w);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/31-68.shader_test b/shaders/skia/31-68.shader_test
new file mode 100644
index 0000000..fd36583
--- /dev/null
+++ b/shaders/skia/31-68.shader_test
@@ -0,0 +1,130 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+in vec2 vTransformedCoords_0_Stage0;
+in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+in float vcoverage_Stage0;
+flat in vec4 vgeomDomain_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ float coverage = vcoverage_Stage0 * gl_FragCoord.w;
+ vec4 geoDomain;
+ geoDomain = vgeomDomain_Stage0;
+ if (coverage < 0.5) {
+ vec4 dists4 = clamp(vec4(1.0, 1.0, -1.0, -1.0) * (gl_FragCoord.xyxy - geoDomain), 0.0, 1.0);
+ vec2 dists2 = dists4.xy * dists4.zw;
+ coverage = min(coverage, dists2.x * dists2.y);
+ }
+ outputCoverage_Stage0 = vec4(coverage);
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_1_Stage0.x);
+ uint y = uint(vTransformedCoords_1_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ output_Stage2 = vec4(clamp(output_Stage2.xyz + value * 0.0039215688593685627, 0.0, output_Stage2.w), output_Stage2.w);
+ }
+ {
+ sk_FragColor = output_Stage2 * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec4 positionWithCoverage;
+in vec4 color;
+in vec2 localCoord;
+in vec4 geomDomain;
+out vec2 vTransformedCoords_0_Stage0;
+out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+out float vcoverage_Stage0;
+flat out vec4 vgeomDomain_Stage0;
+void main() {
+ vec3 position = positionWithCoverage.xyz;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ vcoverage_Stage0 = positionWithCoverage.w * positionWithCoverage.z;
+ vgeomDomain_Stage0 = geomDomain;
+ gl_Position = vec4(position.x, position.y, 0.0, position.z);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/31-69.shader_test b/shaders/skia/31-69.shader_test
new file mode 100644
index 0000000..2760d2c
--- /dev/null
+++ b/shaders/skia/31-69.shader_test
@@ -0,0 +1,93 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+noperspective in vec3 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 vTransformedCoords_0_Stage0_ensure2D = vTransformedCoords_0_Stage0.xy / vTransformedCoords_0_Stage0.z;
+ float t = vTransformedCoords_0_Stage0_ensure2D.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec3 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0);
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/31-70.shader_test b/shaders/skia/31-70.shader_test
new file mode 100644
index 0000000..7ad5a14
--- /dev/null
+++ b/shaders/skia/31-70.shader_test
@@ -0,0 +1,109 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+noperspective in vec3 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 vTransformedCoords_0_Stage0_ensure2D = vTransformedCoords_0_Stage0.xy / vTransformedCoords_0_Stage0.z;
+ float t = vTransformedCoords_0_Stage0_ensure2D.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_1_Stage0.x);
+ uint y = uint(vTransformedCoords_1_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ output_Stage2 = vec4(clamp(output_Stage2.xyz + value * 0.0039215688593685627, 0.0, output_Stage2.w), output_Stage2.w);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec3 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0);
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/31-77.shader_test b/shaders/skia/31-77.shader_test
new file mode 100644
index 0000000..3812e17
--- /dev/null
+++ b/shaders/skia/31-77.shader_test
@@ -0,0 +1,58 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uinnerRect_Stage1;
+uniform vec2 uradiusPlusHalf_Stage1;
+uniform vec4 urectUniform_Stage2;
+flat in vec4 vcolor_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec2 dxy0 = uinnerRect_Stage1.xy - gl_FragCoord.xy;
+ vec2 dxy1 = gl_FragCoord.xy - uinnerRect_Stage1.zw;
+ vec2 dxy = max(max(dxy0, dxy1), 0.0);
+ float alpha = clamp(uradiusPlusHalf_Stage1.x - length(dxy), 0.0, 1.0);
+ alpha = 1.0 - alpha;
+ output_Stage1 = vec4(alpha);
+ }
+ vec4 output_Stage2;
+ {
+ float alpha;
+ {
+ float xSub, ySub;
+ xSub = min(gl_FragCoord.x - urectUniform_Stage2.x, 0.0);
+ xSub += min(urectUniform_Stage2.z - gl_FragCoord.x, 0.0);
+ ySub = min(gl_FragCoord.y - urectUniform_Stage2.y, 0.0);
+ ySub += min(urectUniform_Stage2.w - gl_FragCoord.y, 0.0);
+ alpha = (1.0 + max(xSub, -1.0)) * (1.0 + max(ySub, -1.0));
+ }
+ output_Stage2 = output_Stage1 * alpha;
+ }
+ {
+ sk_FragColor = outputColor_Stage0 * output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 position;
+in vec4 color;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/31-80.shader_test b/shaders/skia/31-80.shader_test
new file mode 100644
index 0000000..0fdb2f1
--- /dev/null
+++ b/shaders/skia/31-80.shader_test
@@ -0,0 +1,67 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 TextureEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = TextureEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = OverrideInputFragmentProcessor_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 blend_dst_out(vec4 src, vec4 dst) {
+ return (1.0 - src.w) * dst;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_dst_out(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec2 inLocalCoord;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 color = inColor;
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/31-81.shader_test b/shaders/skia/31-81.shader_test
new file mode 100644
index 0000000..956506d
--- /dev/null
+++ b/shaders/skia/31-81.shader_test
@@ -0,0 +1,82 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 ucolor_Stage2_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 TextureEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = TextureEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = OverrideInputFragmentProcessor_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c1_c0;
+ }
+ return _output;
+}
+vec4 blend_plus(vec4 src, vec4 dst) {
+ return min(src + dst, 1.0);
+}
+vec4 blend_modulate(vec4 src, vec4 dst) {
+ return src * dst;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_plus(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_modulate(ConstColorProcessor_Stage2_c1_c0(vec4(1.0)), output_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec2 inLocalCoord;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 color = inColor;
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/31-83.shader_test b/shaders/skia/31-83.shader_test
new file mode 100644
index 0000000..3a42574
--- /dev/null
+++ b/shaders/skia/31-83.shader_test
@@ -0,0 +1,40 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 ucolor_Stage1;
+flat in vec4 vcolor_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ {
+ output_Stage1 = ucolor_Stage1;
+ }
+ }
+ {
+ sk_FragColor = outputColor_Stage0 * output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 inPosition;
+in vec2 inLocalCoords;
+in vec4 color;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vcolor_Stage0 = color;
+ vec2 pos2 = inPosition;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/31-86.shader_test b/shaders/skia/31-86.shader_test
new file mode 100644
index 0000000..f59c523
--- /dev/null
+++ b/shaders/skia/31-86.shader_test
@@ -0,0 +1,121 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 uleftBorderColor_Stage1_c1_c0_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c1_c0_c0_c0;
+uniform vec4 ustart_Stage1_c1_c0_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c1_c0_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = ClampedGradientEffect_Stage1_c0_c0_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ return _output;
+}
+vec4 LinearGradientLayout_Stage1_c1_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_1_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c1_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c1_c0_c0_c0_c1_c0 + t * uend_Stage1_c1_c0_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c1_c0_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c1_c0_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c1_c0_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c1_c0_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = ClampedGradientEffect_Stage1_c1_c0_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_src_in(OverrideInputFragmentProcessor_Stage1_c0_c0(inputColor), OverrideInputFragmentProcessor_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/31-88.shader_test b/shaders/skia/31-88.shader_test
new file mode 100644
index 0000000..2ef4ded
--- /dev/null
+++ b/shaders/skia/31-88.shader_test
@@ -0,0 +1,45 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uCoordTransformMatrix_0_Stage0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0(vec4 _input, vec2 _coords) {
+ _coords = _coords * uCoordTransformMatrix_0_Stage0.xz + uCoordTransformMatrix_0_Stage0.yw;
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, _coords) * _input;
+ return _output;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TextureEffect_Stage1_c0_c0(vec4(1.0), gl_FragCoord.xy);
+ }
+ {
+ sk_FragColor = outputColor_Stage0 * output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 position;
+in vec4 color;
+noperspective out vec4 vcolor_Stage0;
+void main() {
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/31-9.shader_test b/shaders/skia/31-9.shader_test
new file mode 100644
index 0000000..eb4b2f7
--- /dev/null
+++ b/shaders/skia/31-9.shader_test
@@ -0,0 +1,62 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 ucolor_Stage1;
+uniform vec4 ucolor_Stage2_c0_c0;
+noperspective in vec4 vcolor_Stage0;
+vec4 ConstColorProcessor_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c0_c0;
+ }
+ return _output;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 blend_darken(vec4 src, vec4 dst) {
+ vec4 result = blend_src_over(src, dst);
+ result.xyz = min(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
+ return result;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ {
+ output_Stage1 = outputColor_Stage0 * ucolor_Stage1;
+ }
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_darken(ConstColorProcessor_Stage2_c0_c0(vec4(1.0)), output_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 position;
+in vec4 inColor;
+noperspective out vec4 vcolor_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = position;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/31-91.shader_test b/shaders/skia/31-91.shader_test
new file mode 100644
index 0000000..eba78b1
--- /dev/null
+++ b/shaders/skia/31-91.shader_test
@@ -0,0 +1,93 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c0_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 RadialGradientLayout_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = length(vTransformedCoords_0_Stage0);
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = RadialGradientLayout_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = ClampedGradientEffect_Stage1_c0_c0_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ return _output;
+}
+vec4 TextureEffect_Stage1_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_1_Stage0) * _input;
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = TextureEffect_Stage1_c1_c0_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ return _output;
+}
+vec4 blend_dst_atop(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src + src.w * dst;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_dst_atop(OverrideInputFragmentProcessor_Stage1_c0_c0(inputColor), OverrideInputFragmentProcessor_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/31-92.shader_test b/shaders/skia/31-92.shader_test
new file mode 100644
index 0000000..9edf77f
--- /dev/null
+++ b/shaders/skia/31-92.shader_test
@@ -0,0 +1,103 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0_c0_c0;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c0_c0_c1_c0;
+uniform mat4 um_Stage1_c1_c0;
+uniform vec4 uv_Stage1_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_0_Stage0;
+ float t = -1.0;
+ {
+ {
+ float r0 = ufocalParams_Stage1_c0_c0_c0_c0_c0_c0.x;
+ {
+ t = length(p) - r0;
+ }
+ }
+ }
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = ClampedGradientEffect_Stage1_c0_c0_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ return _output;
+}
+vec4 ColorMatrixFragmentProcessor_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = _input;
+ {
+ float nonZeroAlpha = max(inputColor.w, 9.9999997473787516e-05);
+ inputColor = vec4(inputColor.xyz / nonZeroAlpha, inputColor.w);
+ }
+ _output = um_Stage1_c1_c0 * inputColor + uv_Stage1_c1_c0;
+ {
+ _output = clamp(_output, 0.0, 1.0);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ColorMatrixFragmentProcessor_Stage1_c1_c0(OverrideInputFragmentProcessor_Stage1_c0_c0(outputColor_Stage0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/31-94.shader_test b/shaders/skia/31-94.shader_test
new file mode 100644
index 0000000..b48ce59
--- /dev/null
+++ b/shaders/skia/31-94.shader_test
@@ -0,0 +1,107 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform vec2 uBounds_Stage1;
+uniform vec4 uKernel_Stage1[5];
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0 - 8.0 * uImageIncrement_Stage1;
+ vec2 coordSampled = vec2(0.0, 0.0);
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[4].x;
+ coord += uImageIncrement_Stage1;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ sk_FragColor = sk_FragColor.wwww;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/31-96.shader_test b/shaders/skia/31-96.shader_test
new file mode 100644
index 0000000..68b73c1
--- /dev/null
+++ b/shaders/skia/31-96.shader_test
@@ -0,0 +1,74 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform vec2 uBounds_Stage1;
+uniform vec4 uKernel_Stage1[3];
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0 - 4.0 * uImageIncrement_Stage1;
+ vec2 coordSampled = vec2(0.0, 0.0);
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].x;
+ coord += uImageIncrement_Stage1;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/31-99.shader_test b/shaders/skia/31-99.shader_test
new file mode 100644
index 0000000..cc1b1f9
--- /dev/null
+++ b/shaders/skia/31-99.shader_test
@@ -0,0 +1,132 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uCoordTransformMatrix_2_Stage0;
+uniform vec4 ustart_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 uclamp_Stage1_c1_c0_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c0_c0_c1_c0;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+vec4 ComposeOne_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_dst_in(_input, TiledGradientEffect_Stage1_c0_c0_c0_c0(vec4(1.0)));
+ return _output;
+}
+vec4 TextureEffect_Stage1_c1_c0_c0_c0(vec4 _input, vec2 _coords) {
+ _coords = _coords * uCoordTransformMatrix_2_Stage0.xz + uCoordTransformMatrix_2_Stage0.yw;
+ vec4 _output;
+ vec2 inCoord = _coords;
+ vec2 subsetCoord;
+ subsetCoord.x = inCoord.x;
+ subsetCoord.y = inCoord.y;
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage1_c1_c0_c0_c0.x, uclamp_Stage1_c1_c0_c0_c0.z);
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage1_c1_c0_c0_c0.y, uclamp_Stage1_c1_c0_c0_c0.w);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ _output = _input * textureColor;
+ return _output;
+}
+vec4 Bicubic_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coord = vTransformedCoords_1_Stage0 - vec2(0.5);
+ vec2 f = fract(coord);
+ coord += 0.5 - f;
+ vec4 wx = mat4(0.055555555555555552, 0.88888888888888884, 0.055555555555555552, 0.0, -0.5, 0.0, 0.5, 0.0, 0.83333333333333337, -2.0, 1.5, -0.33333333333333331, -0.3888888888888889, 1.1666666666666667, -1.1666666666666667, 0.3888888888888889) * vec4(1.0, f.x, f.x * f.x, (f.x * f.x) * f.x);
+ vec4 wy = mat4(0.055555555555555552, 0.88888888888888884, 0.055555555555555552, 0.0, -0.5, 0.0, 0.5, 0.0, 0.83333333333333337, -2.0, 1.5, -0.33333333333333331, -0.3888888888888889, 1.1666666666666667, -1.1666666666666667, 0.3888888888888889) * vec4(1.0, f.y, f.y * f.y, (f.y * f.y) * f.y);
+ vec4 rowColors[4];
+ rowColors[0] = TextureEffect_Stage1_c1_c0_c0_c0(vec4(1.0), coord + vec2(-1.0, -1.0));
+ rowColors[1] = TextureEffect_Stage1_c1_c0_c0_c0(vec4(1.0), coord + vec2(0.0, -1.0));
+ rowColors[2] = TextureEffect_Stage1_c1_c0_c0_c0(vec4(1.0), coord + vec2(1.0, -1.0));
+ rowColors[3] = TextureEffect_Stage1_c1_c0_c0_c0(vec4(1.0), coord + vec2(2.0, -1.0));
+ vec4 s0 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ rowColors[0] = TextureEffect_Stage1_c1_c0_c0_c0(vec4(1.0), coord + vec2(-1.0, 0.0));
+ rowColors[1] = TextureEffect_Stage1_c1_c0_c0_c0(vec4(1.0), coord);
+ rowColors[2] = TextureEffect_Stage1_c1_c0_c0_c0(vec4(1.0), coord + vec2(1.0, 0.0));
+ rowColors[3] = TextureEffect_Stage1_c1_c0_c0_c0(vec4(1.0), coord + vec2(2.0, 0.0));
+ vec4 s1 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ rowColors[0] = TextureEffect_Stage1_c1_c0_c0_c0(vec4(1.0), coord + vec2(-1.0, 1.0));
+ rowColors[1] = TextureEffect_Stage1_c1_c0_c0_c0(vec4(1.0), coord + vec2(0.0, 1.0));
+ rowColors[2] = TextureEffect_Stage1_c1_c0_c0_c0(vec4(1.0), coord + vec2(1.0, 1.0));
+ rowColors[3] = TextureEffect_Stage1_c1_c0_c0_c0(vec4(1.0), coord + vec2(2.0, 1.0));
+ vec4 s2 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ rowColors[0] = TextureEffect_Stage1_c1_c0_c0_c0(vec4(1.0), coord + vec2(-1.0, 2.0));
+ rowColors[1] = TextureEffect_Stage1_c1_c0_c0_c0(vec4(1.0), coord + vec2(0.0, 2.0));
+ rowColors[2] = TextureEffect_Stage1_c1_c0_c0_c0(vec4(1.0), coord + vec2(1.0, 2.0));
+ rowColors[3] = TextureEffect_Stage1_c1_c0_c0_c0(vec4(1.0), coord + vec2(2.0, 2.0));
+ vec4 s3 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ vec4 bicubicColor = ((wy.x * s0 + wy.y * s1) + wy.z * s2) + wy.w * s3;
+ bicubicColor.xyz = max(vec3(0.0), min(bicubicColor.xyz, bicubicColor.www));
+ _output = bicubicColor * _input;
+ return _output;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = Bicubic_Stage1_c1_c0(ComposeOne_Stage1_c0_c0(outputColor_Stage0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/31.shader_test b/shaders/skia/31.shader_test
new file mode 100644
index 0000000..0927177
--- /dev/null
+++ b/shaders/skia/31.shader_test
@@ -0,0 +1,51 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uclamp_Stage1_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 inCoord = vTransformedCoords_0_Stage0;
+ vec2 subsetCoord;
+ subsetCoord.x = inCoord.x;
+ subsetCoord.y = inCoord.y;
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage1_c0_c0.x, uclamp_Stage1_c0_c0.z);
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage1_c0_c0.y, uclamp_Stage1_c0_c0.w);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ _output = _input * textureColor;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TextureEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/310-2.shader_test b/shaders/skia/310-2.shader_test
new file mode 100644
index 0000000..fcc2b5c
--- /dev/null
+++ b/shaders/skia/310-2.shader_test
@@ -0,0 +1,212 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform float uSurfaceScale_Stage1;
+uniform vec3 uLightColor_Stage1;
+uniform float uKS_Stage1;
+uniform float uShininess_Stage1;
+uniform vec4 uTexDom_Stage1;
+uniform vec3 uDecalParams_Stage1;
+uniform vec3 uLightLocation_Stage1;
+uniform float uExponent_Stage1;
+uniform float uCosInnerConeAngle_Stage1;
+uniform float uCosOuterConeAngle_Stage1;
+uniform float uConeScale_Stage1;
+uniform vec3 uS_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 light_Stage1(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ vec3 halfDir = normalize(surfaceToLight + vec3(0.0, 0.0, 1.0));
+ float colorScale = uKS_Stage1 * pow(dot(normal, halfDir), uShininess_Stage1);
+ vec3 color = lightColor * clamp(colorScale, 0.0, 1.0);
+ return vec4(color, max(max(color.x, color.y), color.z));
+}
+float sobel_Stage1(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage1(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage1(float m[9], float surfaceScale) {
+ return pointToNormal_Stage1(sobel_Stage1(0.0, 0.0, m[3], m[5], m[6], m[8], 0.33333298563957214), sobel_Stage1(0.0, 0.0, m[4], m[7], m[5], m[8], 0.5), surfaceScale);
+}
+vec3 lightColor_Stage1(vec3 surfaceToLight) {
+ float cosAngle = -dot(surfaceToLight, uS_Stage1);
+ if (cosAngle < uCosOuterConeAngle_Stage1) {
+ return vec3(0.0);
+ }
+ float scale = pow(cosAngle, uExponent_Stage1);
+ if (cosAngle < uCosInnerConeAngle_Stage1) {
+ return ((uLightColor_Stage1 * scale) * (cosAngle - uCosOuterConeAngle_Stage1)) * uConeScale_Stage1;
+ }
+ return uLightColor_Stage1;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ vec2 coord = vTransformedCoords_0_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp0 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp5 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp6 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp7 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp8 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = normalize(uLightLocation_Stage1 - vec3(gl_FragCoord.xy, uSurfaceScale_Stage1 * m[4]));
+ output_Stage1 = light_Stage1(normal_Stage1(m, uSurfaceScale_Stage1), surfaceToLight, lightColor_Stage1(surfaceToLight));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/310-4.shader_test b/shaders/skia/310-4.shader_test
new file mode 100644
index 0000000..85f486e
--- /dev/null
+++ b/shaders/skia/310-4.shader_test
@@ -0,0 +1,110 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 ucircleData_Stage2_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+uniform sampler2D uTextureSampler_1_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 CircleBlurFragmentProcessor_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 vec = vec2((gl_FragCoord.x - ucircleData_Stage2_c0_c0.x) * ucircleData_Stage2_c0_c0.w, (gl_FragCoord.y - ucircleData_Stage2_c0_c0.y) * ucircleData_Stage2_c0_c0.w);
+ float dist = length(vec) + (0.5 - ucircleData_Stage2_c0_c0.z) * ucircleData_Stage2_c0_c0.w;
+ _output = _input * texture(uTextureSampler_0_Stage2, vec2(dist, 0.5)).w;
+ return _output;
+}
+vec4 TextureEffect_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_1_Stage2, vTransformedCoords_1_Stage0) * _input;
+ return _output;
+}
+float _blend_color_saturation(vec3 color) {
+ return max(max(color.x, color.y), color.z) - min(min(color.x, color.y), color.z);
+}
+vec3 _blend_set_color_saturation_helper(vec3 minMidMax, float sat) {
+ if (minMidMax.x < minMidMax.z) {
+ return vec3(0.0, (sat * (minMidMax.y - minMidMax.x)) / (minMidMax.z - minMidMax.x), sat);
+ }
+ return vec3(0.0);
+}
+vec3 _blend_set_color_saturation(vec3 hueLumColor, vec3 satColor) {
+ float sat = _blend_color_saturation(satColor);
+ if (hueLumColor.x <= hueLumColor.y) {
+ if (hueLumColor.y <= hueLumColor.z) {
+ hueLumColor.xyz = _blend_set_color_saturation_helper(hueLumColor, sat);
+ } else if (hueLumColor.x <= hueLumColor.z) {
+ hueLumColor.xzy = _blend_set_color_saturation_helper(hueLumColor.xzy, sat);
+ } else {
+ hueLumColor.zxy = _blend_set_color_saturation_helper(hueLumColor.zxy, sat);
+ }
+ } else if (hueLumColor.x <= hueLumColor.z) {
+ hueLumColor.yxz = _blend_set_color_saturation_helper(hueLumColor.yxz, sat);
+ } else if (hueLumColor.y <= hueLumColor.z) {
+ hueLumColor.yzx = _blend_set_color_saturation_helper(hueLumColor.yzx, sat);
+ } else {
+ hueLumColor.zyx = _blend_set_color_saturation_helper(hueLumColor.zyx, sat);
+ }
+ return hueLumColor;
+}
+float _blend_color_luminance(vec3 color) {
+ return dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), color);
+}
+vec3 _blend_set_color_luminance(vec3 hueSatColor, float alpha, vec3 lumColor) {
+ float lum = _blend_color_luminance(lumColor);
+ vec3 result = (lum - _blend_color_luminance(hueSatColor)) + hueSatColor;
+ float minComp = min(min(result.x, result.y), result.z);
+ float maxComp = max(max(result.x, result.y), result.z);
+ if (minComp < 0.0 && lum != minComp) {
+ result = lum + ((result - lum) * lum) / (lum - minComp);
+ }
+ if (maxComp > alpha && maxComp != lum) {
+ return lum + ((result - lum) * (alpha - lum)) / (maxComp - lum);
+ }
+ return result;
+}
+vec4 blend_hue(vec4 src, vec4 dst) {
+ float alpha = dst.w * src.w;
+ vec3 sda = src.xyz * dst.w;
+ vec3 dsa = dst.xyz * src.w;
+ return vec4((((_blend_set_color_luminance(_blend_set_color_saturation(sda, dsa), alpha, dsa) + dst.xyz) - dsa) + src.xyz) - sda, (src.w + dst.w) - alpha);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ vec4 inputColor = vec4(output_Stage1.xyz, 1.0);
+ output_Stage2 = blend_hue(CircleBlurFragmentProcessor_Stage2_c0_c0(inputColor), TextureEffect_Stage2_c1_c0(inputColor));
+ output_Stage2 *= output_Stage1.w;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/310-5.shader_test b/shaders/skia/310-5.shader_test
new file mode 100644
index 0000000..93e0944
--- /dev/null
+++ b/shaders/skia/310-5.shader_test
@@ -0,0 +1,62 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 ClampFragmentProcessor_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ float alpha = clamp(_input.w, 0.0, 1.0);
+ _output = vec4(clamp(_input.xyz, 0.0, alpha), alpha);
+ }
+ return _output;
+}
+vec4 ClampFragmentProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = clamp(_input, 0.0, 1.0);
+ }
+ return _output;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 blend_darken(vec4 src, vec4 dst) {
+ vec4 result = blend_src_over(src, dst);
+ result.xyz = min(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
+ return result;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ vec4 inputColor = vec4(output_Stage1.xyz, 1.0);
+ output_Stage2 = blend_darken(ClampFragmentProcessor_Stage2_c0_c0(inputColor), ClampFragmentProcessor_Stage2_c1_c0(inputColor));
+ output_Stage2 *= output_Stage1.w;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/310.shader_test b/shaders/skia/310.shader_test
new file mode 100644
index 0000000..893b585
--- /dev/null
+++ b/shaders/skia/310.shader_test
@@ -0,0 +1,165 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage2;
+uniform vec4 ucolor_Stage3_c1_c0;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.w) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ } else {
+ {
+ if (t < uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+vec4 ComposeOne_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_dst_in(_input, TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0)));
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = ComposeOne_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 ConstColorProcessor_Stage3_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage3_c1_c0;
+ }
+ return _output;
+}
+vec4 blend_plus(vec4 src, vec4 dst) {
+ return min(src + dst, 1.0);
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 blend_darken(vec4 src, vec4 dst) {
+ vec4 result = blend_src_over(src, dst);
+ result.xyz = min(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
+ return result;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_plus(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ {
+ output_Stage2 = output_Stage1 * ucolor_Stage2;
+ }
+ }
+ vec4 output_Stage3;
+ {
+ output_Stage3 = blend_darken(ConstColorProcessor_Stage3_c1_c0(vec4(1.0)), output_Stage2);
+ }
+ {
+ sk_FragColor = output_Stage3;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 inColor;
+in vec2 inLocalCoord;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/313-2.shader_test b/shaders/skia/313-2.shader_test
new file mode 100644
index 0000000..352bdee
--- /dev/null
+++ b/shaders/skia/313-2.shader_test
@@ -0,0 +1,212 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform float uSurfaceScale_Stage1;
+uniform vec3 uLightColor_Stage1;
+uniform float uKS_Stage1;
+uniform float uShininess_Stage1;
+uniform vec4 uTexDom_Stage1;
+uniform vec3 uDecalParams_Stage1;
+uniform vec3 uLightLocation_Stage1;
+uniform float uExponent_Stage1;
+uniform float uCosInnerConeAngle_Stage1;
+uniform float uCosOuterConeAngle_Stage1;
+uniform float uConeScale_Stage1;
+uniform vec3 uS_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 light_Stage1(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ vec3 halfDir = normalize(surfaceToLight + vec3(0.0, 0.0, 1.0));
+ float colorScale = uKS_Stage1 * pow(dot(normal, halfDir), uShininess_Stage1);
+ vec3 color = lightColor * clamp(colorScale, 0.0, 1.0);
+ return vec4(color, max(max(color.x, color.y), color.z));
+}
+float sobel_Stage1(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage1(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage1(float m[9], float surfaceScale) {
+ return pointToNormal_Stage1(sobel_Stage1(0.0, 0.0, m[3], m[4], m[6], m[7], 0.66666698455810547), sobel_Stage1(m[3], m[6], m[4], m[7], 0.0, 0.0, 0.66666698455810547), surfaceScale);
+}
+vec3 lightColor_Stage1(vec3 surfaceToLight) {
+ float cosAngle = -dot(surfaceToLight, uS_Stage1);
+ if (cosAngle < uCosOuterConeAngle_Stage1) {
+ return vec3(0.0);
+ }
+ float scale = pow(cosAngle, uExponent_Stage1);
+ if (cosAngle < uCosInnerConeAngle_Stage1) {
+ return ((uLightColor_Stage1 * scale) * (cosAngle - uCosOuterConeAngle_Stage1)) * uConeScale_Stage1;
+ }
+ return uLightColor_Stage1;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ vec2 coord = vTransformedCoords_0_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp0 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp5 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp6 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp7 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp8 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = normalize(uLightLocation_Stage1 - vec3(gl_FragCoord.xy, uSurfaceScale_Stage1 * m[4]));
+ output_Stage1 = light_Stage1(normal_Stage1(m, uSurfaceScale_Stage1), surfaceToLight, lightColor_Stage1(surfaceToLight));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/313-3.shader_test b/shaders/skia/313-3.shader_test
new file mode 100644
index 0000000..c707fa6
--- /dev/null
+++ b/shaders/skia/313-3.shader_test
@@ -0,0 +1,256 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_KHR_blend_equation_advanced : require
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+layout (blend_support_all_equations) out ;
+uniform vec4 uColor_Stage0;
+uniform vec2 uImageIncrement_Stage1_c0_c0_c0_c0_c0_c0;
+uniform vec2 uBounds_Stage1_c0_c0_c0_c0_c0_c0;
+uniform vec4 uKernel_Stage1_c0_c0_c0_c0_c0_c0[4];
+uniform float uinnerThreshold_Stage1_c0_c0_c0_c0_c1_c0;
+uniform float uouterThreshold_Stage1_c0_c0_c0_c0_c1_c0;
+uniform float ucornerRadius_Stage1_c0_c0_c1_c0_c0_c0;
+uniform vec4 uproxyRect_Stage1_c0_c0_c1_c0_c0_c0;
+uniform float ublurRadius_Stage1_c0_c0_c1_c0_c0_c0;
+uniform vec4 ucircle_Stage1_c0_c0_c1_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+uniform sampler2D uTextureSampler_2_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 GaussianConvolution_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0 - 6.0 * uImageIncrement_Stage1_c0_c0_c0_c0_c0_c0;
+ vec2 coordSampled = vec2(0.0, 0.0);
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1_c0_c0_c0_c0_c0_c0.x, uBounds_Stage1_c0_c0_c0_c0_c0_c0.y - uBounds_Stage1_c0_c0_c0_c0_c0_c0.x) + uBounds_Stage1_c0_c0_c0_c0_c0_c0.x;
+ _output += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c0_c0_c0_c0[0].x;
+ coord += uImageIncrement_Stage1_c0_c0_c0_c0_c0_c0;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1_c0_c0_c0_c0_c0_c0.x, uBounds_Stage1_c0_c0_c0_c0_c0_c0.y - uBounds_Stage1_c0_c0_c0_c0_c0_c0.x) + uBounds_Stage1_c0_c0_c0_c0_c0_c0.x;
+ _output += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c0_c0_c0_c0[0].y;
+ coord += uImageIncrement_Stage1_c0_c0_c0_c0_c0_c0;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1_c0_c0_c0_c0_c0_c0.x, uBounds_Stage1_c0_c0_c0_c0_c0_c0.y - uBounds_Stage1_c0_c0_c0_c0_c0_c0.x) + uBounds_Stage1_c0_c0_c0_c0_c0_c0.x;
+ _output += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c0_c0_c0_c0[0].z;
+ coord += uImageIncrement_Stage1_c0_c0_c0_c0_c0_c0;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1_c0_c0_c0_c0_c0_c0.x, uBounds_Stage1_c0_c0_c0_c0_c0_c0.y - uBounds_Stage1_c0_c0_c0_c0_c0_c0.x) + uBounds_Stage1_c0_c0_c0_c0_c0_c0.x;
+ _output += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c0_c0_c0_c0[0].w;
+ coord += uImageIncrement_Stage1_c0_c0_c0_c0_c0_c0;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1_c0_c0_c0_c0_c0_c0.x, uBounds_Stage1_c0_c0_c0_c0_c0_c0.y - uBounds_Stage1_c0_c0_c0_c0_c0_c0.x) + uBounds_Stage1_c0_c0_c0_c0_c0_c0.x;
+ _output += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c0_c0_c0_c0[1].x;
+ coord += uImageIncrement_Stage1_c0_c0_c0_c0_c0_c0;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1_c0_c0_c0_c0_c0_c0.x, uBounds_Stage1_c0_c0_c0_c0_c0_c0.y - uBounds_Stage1_c0_c0_c0_c0_c0_c0.x) + uBounds_Stage1_c0_c0_c0_c0_c0_c0.x;
+ _output += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c0_c0_c0_c0[1].y;
+ coord += uImageIncrement_Stage1_c0_c0_c0_c0_c0_c0;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1_c0_c0_c0_c0_c0_c0.x, uBounds_Stage1_c0_c0_c0_c0_c0_c0.y - uBounds_Stage1_c0_c0_c0_c0_c0_c0.x) + uBounds_Stage1_c0_c0_c0_c0_c0_c0.x;
+ _output += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c0_c0_c0_c0[1].z;
+ coord += uImageIncrement_Stage1_c0_c0_c0_c0_c0_c0;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1_c0_c0_c0_c0_c0_c0.x, uBounds_Stage1_c0_c0_c0_c0_c0_c0.y - uBounds_Stage1_c0_c0_c0_c0_c0_c0.x) + uBounds_Stage1_c0_c0_c0_c0_c0_c0.x;
+ _output += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c0_c0_c0_c0[1].w;
+ coord += uImageIncrement_Stage1_c0_c0_c0_c0_c0_c0;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1_c0_c0_c0_c0_c0_c0.x, uBounds_Stage1_c0_c0_c0_c0_c0_c0.y - uBounds_Stage1_c0_c0_c0_c0_c0_c0.x) + uBounds_Stage1_c0_c0_c0_c0_c0_c0.x;
+ _output += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c0_c0_c0_c0[2].x;
+ coord += uImageIncrement_Stage1_c0_c0_c0_c0_c0_c0;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1_c0_c0_c0_c0_c0_c0.x, uBounds_Stage1_c0_c0_c0_c0_c0_c0.y - uBounds_Stage1_c0_c0_c0_c0_c0_c0.x) + uBounds_Stage1_c0_c0_c0_c0_c0_c0.x;
+ _output += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c0_c0_c0_c0[2].y;
+ coord += uImageIncrement_Stage1_c0_c0_c0_c0_c0_c0;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1_c0_c0_c0_c0_c0_c0.x, uBounds_Stage1_c0_c0_c0_c0_c0_c0.y - uBounds_Stage1_c0_c0_c0_c0_c0_c0.x) + uBounds_Stage1_c0_c0_c0_c0_c0_c0.x;
+ _output += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c0_c0_c0_c0[2].z;
+ coord += uImageIncrement_Stage1_c0_c0_c0_c0_c0_c0;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1_c0_c0_c0_c0_c0_c0.x, uBounds_Stage1_c0_c0_c0_c0_c0_c0.y - uBounds_Stage1_c0_c0_c0_c0_c0_c0.x) + uBounds_Stage1_c0_c0_c0_c0_c0_c0.x;
+ _output += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c0_c0_c0_c0[2].w;
+ coord += uImageIncrement_Stage1_c0_c0_c0_c0_c0_c0;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1_c0_c0_c0_c0_c0_c0.x, uBounds_Stage1_c0_c0_c0_c0_c0_c0.y - uBounds_Stage1_c0_c0_c0_c0_c0_c0.x) + uBounds_Stage1_c0_c0_c0_c0_c0_c0.x;
+ _output += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c0_c0_c0_c0[3].x;
+ coord += uImageIncrement_Stage1_c0_c0_c0_c0_c0_c0;
+ _output *= _input;
+ return _output;
+}
+vec4 AlphaThresholdFragmentProcessor_Stage1_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 color = _input;
+ vec4 mask_color = texture(uTextureSampler_1_Stage1, vTransformedCoords_1_Stage0);
+ if (mask_color.w < 0.5) {
+ if (color.w > uouterThreshold_Stage1_c0_c0_c0_c0_c1_c0) {
+ float scale = uouterThreshold_Stage1_c0_c0_c0_c0_c1_c0 / color.w;
+ color.xyz *= scale;
+ color.w = uouterThreshold_Stage1_c0_c0_c0_c0_c1_c0;
+ }
+ } else if (color.w < uinnerThreshold_Stage1_c0_c0_c0_c0_c1_c0) {
+ float scale = uinnerThreshold_Stage1_c0_c0_c0_c0_c1_c0 / max(0.0010000000474974513, color.w);
+ color.xyz *= scale;
+ color.w = uinnerThreshold_Stage1_c0_c0_c0_c0_c1_c0;
+ }
+ _output = color;
+ return _output;
+}
+vec4 blend_screen(vec4 src, vec4 dst) {
+ return src + (1.0 - src) * dst;
+}
+vec4 ComposeTwo_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_screen(GaussianConvolution_Stage1_c0_c0_c0_c0_c0_c0(inputColor), AlphaThresholdFragmentProcessor_Stage1_c0_c0_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 RRectBlurEffect_Stage1_c0_c0_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 translatedFragPos = gl_FragCoord.xy - uproxyRect_Stage1_c0_c0_c1_c0_c0_c0.xy;
+ float threshold = ucornerRadius_Stage1_c0_c0_c1_c0_c0_c0 + 2.0 * ublurRadius_Stage1_c0_c0_c1_c0_c0_c0;
+ vec2 middle = (uproxyRect_Stage1_c0_c0_c1_c0_c0_c0.zw - uproxyRect_Stage1_c0_c0_c1_c0_c0_c0.xy) - 2.0 * threshold;
+ if (translatedFragPos.x >= threshold && translatedFragPos.x < middle.x + threshold) {
+ translatedFragPos.x = threshold;
+ } else if (translatedFragPos.x >= middle.x + threshold) {
+ translatedFragPos.x -= middle.x - 1.0;
+ }
+ if (translatedFragPos.y > threshold && translatedFragPos.y < middle.y + threshold) {
+ translatedFragPos.y = threshold;
+ } else if (translatedFragPos.y >= middle.y + threshold) {
+ translatedFragPos.y -= middle.y - 1.0;
+ }
+ vec2 proxyDims = vec2(2.0 * threshold + 1.0);
+ vec2 texCoord = translatedFragPos / proxyDims;
+ _output = _input * texture(uTextureSampler_2_Stage1, texCoord);
+ return _output;
+}
+vec4 CircleEffect_Stage1_c0_c0_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float d;
+ {
+ d = (1.0 - length((ucircle_Stage1_c0_c0_c1_c0_c1_c0.xy - gl_FragCoord.xy) * ucircle_Stage1_c0_c0_c1_c0_c1_c0.w)) * ucircle_Stage1_c0_c0_c1_c0_c1_c0.z;
+ }
+ {
+ _output = d > 0.5 ? _input : vec4(0.0);
+ }
+ return _output;
+}
+float _blend_color_saturation(vec3 color) {
+ return max(max(color.x, color.y), color.z) - min(min(color.x, color.y), color.z);
+}
+vec3 _blend_set_color_saturation_helper(vec3 minMidMax, float sat) {
+ if (minMidMax.x < minMidMax.z) {
+ return vec3(0.0, (sat * (minMidMax.y - minMidMax.x)) / (minMidMax.z - minMidMax.x), sat);
+ }
+ return vec3(0.0);
+}
+vec3 _blend_set_color_saturation(vec3 hueLumColor, vec3 satColor) {
+ float sat = _blend_color_saturation(satColor);
+ if (hueLumColor.x <= hueLumColor.y) {
+ if (hueLumColor.y <= hueLumColor.z) {
+ hueLumColor.xyz = _blend_set_color_saturation_helper(hueLumColor, sat);
+ } else if (hueLumColor.x <= hueLumColor.z) {
+ hueLumColor.xzy = _blend_set_color_saturation_helper(hueLumColor.xzy, sat);
+ } else {
+ hueLumColor.zxy = _blend_set_color_saturation_helper(hueLumColor.zxy, sat);
+ }
+ } else if (hueLumColor.x <= hueLumColor.z) {
+ hueLumColor.yxz = _blend_set_color_saturation_helper(hueLumColor.yxz, sat);
+ } else if (hueLumColor.y <= hueLumColor.z) {
+ hueLumColor.yzx = _blend_set_color_saturation_helper(hueLumColor.yzx, sat);
+ } else {
+ hueLumColor.zyx = _blend_set_color_saturation_helper(hueLumColor.zyx, sat);
+ }
+ return hueLumColor;
+}
+float _blend_color_luminance(vec3 color) {
+ return dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), color);
+}
+vec3 _blend_set_color_luminance(vec3 hueSatColor, float alpha, vec3 lumColor) {
+ float lum = _blend_color_luminance(lumColor);
+ vec3 result = (lum - _blend_color_luminance(hueSatColor)) + hueSatColor;
+ float minComp = min(min(result.x, result.y), result.z);
+ float maxComp = max(max(result.x, result.y), result.z);
+ if (minComp < 0.0 && lum != minComp) {
+ result = lum + ((result - lum) * lum) / (lum - minComp);
+ }
+ if (maxComp > alpha && maxComp != lum) {
+ return lum + ((result - lum) * (alpha - lum)) / (maxComp - lum);
+ }
+ return result;
+}
+vec4 blend_saturation(vec4 src, vec4 dst) {
+ float alpha = dst.w * src.w;
+ vec3 sda = src.xyz * dst.w;
+ vec3 dsa = dst.xyz * src.w;
+ return vec4((((_blend_set_color_luminance(_blend_set_color_saturation(dsa, sda), alpha, dsa) + dst.xyz) - dsa) + src.xyz) - sda, (src.w + dst.w) - alpha);
+}
+vec4 ComposeTwo_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_saturation(RRectBlurEffect_Stage1_c0_c0_c1_c0_c0_c0(inputColor), CircleEffect_Stage1_c0_c0_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 blend_plus(vec4 src, vec4 dst) {
+ return min(src + dst, 1.0);
+}
+vec4 ComposeTwo_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_plus(ComposeTwo_Stage1_c0_c0_c0_c0(inputColor), ComposeTwo_Stage1_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 ClampFragmentProcessor_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = clamp(_input, 0.0, 1.0);
+ }
+ return _output;
+}
+vec4 blend_dst_atop(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src + src.w * dst;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = uColor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_dst_atop(ComposeTwo_Stage1_c0_c0(inputColor), ClampFragmentProcessor_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 inPosition;
+in vec2 inLocalCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/313-4.shader_test b/shaders/skia/313-4.shader_test
new file mode 100644
index 0000000..7fde2ef
--- /dev/null
+++ b/shaders/skia/313-4.shader_test
@@ -0,0 +1,67 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 ConfigConversionEffect_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = floor(_input * 255.0 + 0.5) / 255.0;
+ {
+ _output.xyz = floor((_output.xyz * _output.w) * 255.0 + 0.5) / 255.0;
+ }
+ return _output;
+}
+float _blend_color_luminance(vec3 color) {
+ return dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), color);
+}
+vec3 _blend_set_color_luminance(vec3 hueSatColor, float alpha, vec3 lumColor) {
+ float lum = _blend_color_luminance(lumColor);
+ vec3 result = (lum - _blend_color_luminance(hueSatColor)) + hueSatColor;
+ float minComp = min(min(result.x, result.y), result.z);
+ float maxComp = max(max(result.x, result.y), result.z);
+ if (minComp < 0.0 && lum != minComp) {
+ result = lum + ((result - lum) * lum) / (lum - minComp);
+ }
+ if (maxComp > alpha && maxComp != lum) {
+ return lum + ((result - lum) * (alpha - lum)) / (maxComp - lum);
+ }
+ return result;
+}
+vec4 blend_luminosity(vec4 src, vec4 dst) {
+ float alpha = dst.w * src.w;
+ vec3 sda = src.xyz * dst.w;
+ vec3 dsa = dst.xyz * src.w;
+ return vec4((((_blend_set_color_luminance(dsa, alpha, sda) + dst.xyz) - dsa) + src.xyz) - sda, (src.w + dst.w) - alpha);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_luminosity(ConfigConversionEffect_Stage2_c0_c0(vec4(1.0)), output_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/313-5.shader_test b/shaders/skia/313-5.shader_test
new file mode 100644
index 0000000..dfab215
--- /dev/null
+++ b/shaders/skia/313-5.shader_test
@@ -0,0 +1,102 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 ClampFragmentProcessor_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ float alpha = clamp(_input.w, 0.0, 1.0);
+ _output = vec4(clamp(_input.xyz, 0.0, alpha), alpha);
+ }
+ return _output;
+}
+vec4 Big_Ole_Key_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = _input;
+ return _output;
+}
+float _blend_color_saturation(vec3 color) {
+ return max(max(color.x, color.y), color.z) - min(min(color.x, color.y), color.z);
+}
+vec3 _blend_set_color_saturation_helper(vec3 minMidMax, float sat) {
+ if (minMidMax.x < minMidMax.z) {
+ return vec3(0.0, (sat * (minMidMax.y - minMidMax.x)) / (minMidMax.z - minMidMax.x), sat);
+ }
+ return vec3(0.0);
+}
+vec3 _blend_set_color_saturation(vec3 hueLumColor, vec3 satColor) {
+ float sat = _blend_color_saturation(satColor);
+ if (hueLumColor.x <= hueLumColor.y) {
+ if (hueLumColor.y <= hueLumColor.z) {
+ hueLumColor.xyz = _blend_set_color_saturation_helper(hueLumColor, sat);
+ } else if (hueLumColor.x <= hueLumColor.z) {
+ hueLumColor.xzy = _blend_set_color_saturation_helper(hueLumColor.xzy, sat);
+ } else {
+ hueLumColor.zxy = _blend_set_color_saturation_helper(hueLumColor.zxy, sat);
+ }
+ } else if (hueLumColor.x <= hueLumColor.z) {
+ hueLumColor.yxz = _blend_set_color_saturation_helper(hueLumColor.yxz, sat);
+ } else if (hueLumColor.y <= hueLumColor.z) {
+ hueLumColor.yzx = _blend_set_color_saturation_helper(hueLumColor.yzx, sat);
+ } else {
+ hueLumColor.zyx = _blend_set_color_saturation_helper(hueLumColor.zyx, sat);
+ }
+ return hueLumColor;
+}
+float _blend_color_luminance(vec3 color) {
+ return dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), color);
+}
+vec3 _blend_set_color_luminance(vec3 hueSatColor, float alpha, vec3 lumColor) {
+ float lum = _blend_color_luminance(lumColor);
+ vec3 result = (lum - _blend_color_luminance(hueSatColor)) + hueSatColor;
+ float minComp = min(min(result.x, result.y), result.z);
+ float maxComp = max(max(result.x, result.y), result.z);
+ if (minComp < 0.0 && lum != minComp) {
+ result = lum + ((result - lum) * lum) / (lum - minComp);
+ }
+ if (maxComp > alpha && maxComp != lum) {
+ return lum + ((result - lum) * (alpha - lum)) / (maxComp - lum);
+ }
+ return result;
+}
+vec4 blend_hue(vec4 src, vec4 dst) {
+ float alpha = dst.w * src.w;
+ vec3 sda = src.xyz * dst.w;
+ vec3 dsa = dst.xyz * src.w;
+ return vec4((((_blend_set_color_luminance(_blend_set_color_saturation(sda, dsa), alpha, dsa) + dst.xyz) - dsa) + src.xyz) - sda, (src.w + dst.w) - alpha);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ vec4 inputColor = vec4(output_Stage1.xyz, 1.0);
+ output_Stage2 = blend_hue(ClampFragmentProcessor_Stage2_c0_c0(inputColor), Big_Ole_Key_Stage2_c1_c0(inputColor));
+ output_Stage2 *= output_Stage1.w;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/313.shader_test b/shaders/skia/313.shader_test
new file mode 100644
index 0000000..3e45e3d
--- /dev/null
+++ b/shaders/skia/313.shader_test
@@ -0,0 +1,88 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 ucolor_Stage1_c0_c0_c0_c0;
+uniform vec4 ucolor_Stage2;
+uniform vec4 ucolor_Stage3_c1_c0;
+noperspective in vec4 vcolor_Stage0;
+vec4 ConstColorProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = _input.w * ucolor_Stage1_c0_c0_c0_c0;
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = ConstColorProcessor_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 ConstColorProcessor_Stage3_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage3_c1_c0;
+ }
+ return _output;
+}
+vec4 blend_plus(vec4 src, vec4 dst) {
+ return min(src + dst, 1.0);
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 blend_darken(vec4 src, vec4 dst) {
+ vec4 result = blend_src_over(src, dst);
+ result.xyz = min(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
+ return result;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_plus(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ {
+ output_Stage2 = output_Stage1 * ucolor_Stage2;
+ }
+ }
+ vec4 output_Stage3;
+ {
+ output_Stage3 = blend_darken(ConstColorProcessor_Stage3_c1_c0(vec4(1.0)), output_Stage2);
+ }
+ {
+ sk_FragColor = output_Stage3;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 position;
+in vec4 inColor;
+noperspective out vec4 vcolor_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/316-2.shader_test b/shaders/skia/316-2.shader_test
new file mode 100644
index 0000000..0e46914
--- /dev/null
+++ b/shaders/skia/316-2.shader_test
@@ -0,0 +1,212 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform float uSurfaceScale_Stage1;
+uniform vec3 uLightColor_Stage1;
+uniform float uKS_Stage1;
+uniform float uShininess_Stage1;
+uniform vec4 uTexDom_Stage1;
+uniform vec3 uDecalParams_Stage1;
+uniform vec3 uLightLocation_Stage1;
+uniform float uExponent_Stage1;
+uniform float uCosInnerConeAngle_Stage1;
+uniform float uCosOuterConeAngle_Stage1;
+uniform float uConeScale_Stage1;
+uniform vec3 uS_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 light_Stage1(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ vec3 halfDir = normalize(surfaceToLight + vec3(0.0, 0.0, 1.0));
+ float colorScale = uKS_Stage1 * pow(dot(normal, halfDir), uShininess_Stage1);
+ vec3 color = lightColor * clamp(colorScale, 0.0, 1.0);
+ return vec4(color, max(max(color.x, color.y), color.z));
+}
+float sobel_Stage1(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage1(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage1(float m[9], float surfaceScale) {
+ return pointToNormal_Stage1(sobel_Stage1(m[1], m[2], m[4], m[5], m[7], m[8], 0.5), sobel_Stage1(0.0, 0.0, m[1], m[7], m[2], m[8], 0.33333298563957214), surfaceScale);
+}
+vec3 lightColor_Stage1(vec3 surfaceToLight) {
+ float cosAngle = -dot(surfaceToLight, uS_Stage1);
+ if (cosAngle < uCosOuterConeAngle_Stage1) {
+ return vec3(0.0);
+ }
+ float scale = pow(cosAngle, uExponent_Stage1);
+ if (cosAngle < uCosInnerConeAngle_Stage1) {
+ return ((uLightColor_Stage1 * scale) * (cosAngle - uCosOuterConeAngle_Stage1)) * uConeScale_Stage1;
+ }
+ return uLightColor_Stage1;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ vec2 coord = vTransformedCoords_0_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp0 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp5 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp6 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp7 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp8 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = normalize(uLightLocation_Stage1 - vec3(gl_FragCoord.xy, uSurfaceScale_Stage1 * m[4]));
+ output_Stage1 = light_Stage1(normal_Stage1(m, uSurfaceScale_Stage1), surfaceToLight, lightColor_Stage1(surfaceToLight));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/316-3.shader_test b/shaders/skia/316-3.shader_test
new file mode 100644
index 0000000..1151b28
--- /dev/null
+++ b/shaders/skia/316-3.shader_test
@@ -0,0 +1,553 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uColor_Stage0;
+uniform vec2 uImageIncrement_Stage1_c0_c0_c0_c0_c0_c0;
+uniform float uSurfaceScale_Stage1_c0_c0_c0_c0_c0_c0;
+uniform vec3 uLightColor_Stage1_c0_c0_c0_c0_c0_c0;
+uniform float uKD_Stage1_c0_c0_c0_c0_c0_c0;
+uniform vec4 uTexDom_Stage1_c0_c0_c0_c0_c0_c0;
+uniform vec3 uDecalParams_Stage1_c0_c0_c0_c0_c0_c0;
+uniform vec3 uLightDirection_Stage1_c0_c0_c0_c0_c0_c0;
+uniform vec4 uboundsUniform_Stage1_c0_c0_c0_c0_c1_c0;
+uniform float uxInvZoom_Stage1_c0_c0_c0_c0_c1_c0;
+uniform float uyInvZoom_Stage1_c0_c0_c0_c0_c1_c0;
+uniform float uxInvInset_Stage1_c0_c0_c0_c0_c1_c0;
+uniform float uyInvInset_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec2 uoffset_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage1_c0_c0_c1_c0_c0_c0;
+uniform mat4 um_Stage1_c0_c0_c1_c0_c1_c0;
+uniform vec4 uv_Stage1_c0_c0_c1_c0_c1_c0;
+uniform vec2 uImageIncrement_Stage1_c1_c0_c0_c0;
+uniform float uSurfaceScale_Stage1_c1_c0_c0_c0;
+uniform vec3 uLightColor_Stage1_c1_c0_c0_c0;
+uniform float uKD_Stage1_c1_c0_c0_c0;
+uniform vec4 uTexDom_Stage1_c1_c0_c0_c0;
+uniform vec3 uDecalParams_Stage1_c1_c0_c0_c0;
+uniform vec3 uLightLocation_Stage1_c1_c0_c0_c0;
+uniform vec2 ubaseFrequency_Stage1_c1_c0_c1_c0_c0_c0;
+uniform float uz_Stage1_c1_c0_c1_c0_c0_c0;
+uniform vec4 ucircle_Stage1_c1_c0_c1_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+uniform sampler2D uTextureSampler_2_Stage1;
+uniform sampler2D uTextureSampler_3_Stage1;
+uniform sampler2D uTextureSampler_4_Stage1;
+in vec2 vTransformedCoords_0_Stage0;
+in vec2 vTransformedCoords_1_Stage0;
+in vec2 vTransformedCoords_2_Stage0;
+in vec3 vTransformedCoords_3_Stage0;
+vec4 light_Stage1_c0_c0_c0_c0_c0_c0(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ float colorScale = uKD_Stage1_c0_c0_c0_c0_c0_c0 * dot(normal, surfaceToLight);
+ return vec4(lightColor * clamp(colorScale, 0.0, 1.0), 1.0);
+}
+float sobel_Stage1_c0_c0_c0_c0_c0_c0(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage1_c0_c0_c0_c0_c0_c0(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage1_c0_c0_c0_c0_c0_c0(float m[9], float surfaceScale) {
+ return pointToNormal_Stage1_c0_c0_c0_c0_c0_c0(sobel_Stage1_c0_c0_c0_c0_c0_c0(0.0, 0.0, m[4], m[5], m[7], m[8], 0.66666698455810547), sobel_Stage1_c0_c0_c0_c0_c0_c0(0.0, 0.0, m[4], m[7], m[5], m[8], 0.66666698455810547), surfaceScale);
+}
+vec4 DiffuseLighting_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coord = vTransformedCoords_0_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage1_c0_c0_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp0 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1_c0_c0_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1_c0_c0_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage1_c0_c0_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1_c0_c0_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp5 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage1_c0_c0_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp6 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage1_c0_c0_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp7 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage1_c0_c0_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp8 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = uLightDirection_Stage1_c0_c0_c0_c0_c0_c0;
+ _output = light_Stage1_c0_c0_c0_c0_c0_c0(normal_Stage1_c0_c0_c0_c0_c0_c0(m, uSurfaceScale_Stage1_c0_c0_c0_c0_c0_c0), surfaceToLight, uLightColor_Stage1_c0_c0_c0_c0_c0_c0);
+ _output *= _input;
+ return _output;
+}
+vec4 MagnifierEffect_Stage1_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coord = vTransformedCoords_1_Stage0;
+ vec2 zoom_coord = uoffset_Stage1_c0_c0_c0_c0_c1_c0 + coord * vec2(uxInvZoom_Stage1_c0_c0_c0_c0_c1_c0, uyInvZoom_Stage1_c0_c0_c0_c0_c1_c0);
+ vec2 delta = (coord - uboundsUniform_Stage1_c0_c0_c0_c0_c1_c0.xy) * uboundsUniform_Stage1_c0_c0_c0_c0_c1_c0.zw;
+ delta = min(delta, vec2(1.0, 1.0) - delta);
+ delta *= vec2(uxInvInset_Stage1_c0_c0_c0_c0_c1_c0, uyInvInset_Stage1_c0_c0_c0_c0_c1_c0);
+ float weight = 0.0;
+ if (delta.x < 2.0 && delta.y < 2.0) {
+ delta = vec2(2.0, 2.0) - delta;
+ float dist = length(delta);
+ dist = max(2.0 - dist, 0.0);
+ weight = min(dist * dist, 1.0);
+ } else {
+ vec2 delta_squared = delta * delta;
+ weight = min(min(delta_squared.x, delta_squared.y), 1.0);
+ }
+ _output = texture(uTextureSampler_1_Stage1, mix(coord, zoom_coord, weight));
+ return _output;
+}
+vec4 blend_dst_atop(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src + src.w * dst;
+}
+vec4 ComposeTwo_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_dst_atop(DiffuseLighting_Stage1_c0_c0_c0_c0_c0_c0(inputColor), MagnifierEffect_Stage1_c0_c0_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 ConstColorProcessor_Stage1_c0_c0_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage1_c0_c0_c1_c0_c0_c0;
+ }
+ return _output;
+}
+vec4 ColorMatrixFragmentProcessor_Stage1_c0_c0_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = _input;
+ _output = um_Stage1_c0_c0_c1_c0_c1_c0 * inputColor + uv_Stage1_c0_c0_c1_c0_c1_c0;
+ {
+ _output.w = clamp(_output.w, 0.0, 1.0);
+ }
+ return _output;
+}
+float _blend_overlay_component(float sc, float sa, float dc, float da) {
+ if (2.0 * dc <= da) {
+ return (2.0 * sc) * dc;
+ }
+ return sa * da - (2.0 * (da - dc)) * (sa - sc);
+}
+vec4 blend_overlay(vec4 src, vec4 dst) {
+ vec4 result = vec4(_blend_overlay_component(src.x, src.w, dst.x, dst.w), _blend_overlay_component(src.y, src.w, dst.y, dst.w), _blend_overlay_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+ result.xyz += dst.xyz * (1.0 - src.w) + src.xyz * (1.0 - dst.w);
+ return result;
+}
+vec4 ComposeTwo_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_overlay(ConstColorProcessor_Stage1_c0_c0_c1_c0_c0_c0(inputColor), ColorMatrixFragmentProcessor_Stage1_c0_c0_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 blend_dst_over(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src + dst;
+}
+vec4 ComposeTwo_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_dst_over(ComposeTwo_Stage1_c0_c0_c0_c0(inputColor), ComposeTwo_Stage1_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 light_Stage1_c1_c0_c0_c0(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ float colorScale = uKD_Stage1_c1_c0_c0_c0 * dot(normal, surfaceToLight);
+ return vec4(lightColor * clamp(colorScale, 0.0, 1.0), 1.0);
+}
+float sobel_Stage1_c1_c0_c0_c0(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage1_c1_c0_c0_c0(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage1_c1_c0_c0_c0(float m[9], float surfaceScale) {
+ return pointToNormal_Stage1_c1_c0_c0_c0(sobel_Stage1_c1_c0_c0_c0(0.0, 0.0, m[4], m[5], m[7], m[8], 0.66666698455810547), sobel_Stage1_c1_c0_c0_c0(0.0, 0.0, m[4], m[7], m[5], m[8], 0.66666698455810547), surfaceScale);
+}
+vec4 DiffuseLighting_Stage1_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coord = vTransformedCoords_2_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage1_c1_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0.xy, uTexDom_Stage1_c1_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp0 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1_c1_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0.xy, uTexDom_Stage1_c1_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1_c1_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0.xy, uTexDom_Stage1_c1_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage1_c1_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0.xy, uTexDom_Stage1_c1_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0.xy, uTexDom_Stage1_c1_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1_c1_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0.xy, uTexDom_Stage1_c1_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp5 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage1_c1_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0.xy, uTexDom_Stage1_c1_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp6 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage1_c1_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0.xy, uTexDom_Stage1_c1_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp7 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage1_c1_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0.xy, uTexDom_Stage1_c1_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp8 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = normalize(uLightLocation_Stage1_c1_c0_c0_c0 - vec3(gl_FragCoord.xy, uSurfaceScale_Stage1_c1_c0_c0_c0 * m[4]));
+ _output = light_Stage1_c1_c0_c0_c0(normal_Stage1_c1_c0_c0_c0(m, uSurfaceScale_Stage1_c1_c0_c0_c0), surfaceToLight, uLightColor_Stage1_c1_c0_c0_c0);
+ _output *= _input;
+ return _output;
+}
+vec3 fade_Stage1_c1_c0_c1_c0_c0_c0(vec3 t) {
+ return ((t * t) * t) * (t * (t * 6.0 - 15.0) + 10.0);
+}
+float perm_Stage1_c1_c0_c1_c0_c0_c0(float x) {
+ return texture(uTextureSampler_3_Stage1, vec2(fract(x / 256.0), 0.0)).x * 255.0;
+}
+float grad_Stage1_c1_c0_c1_c0_c0_c0(float x, vec3 p) {
+ return dot(texture(uTextureSampler_4_Stage1, vec2(fract(x / 16.0), 0.0)).xyz * 255.0 - vec3(1.0), p);
+}
+float lerp_Stage1_c1_c0_c1_c0_c0_c0(float a, float b, float w) {
+ return a + w * (b - a);
+}
+float noise_Stage1_c1_c0_c1_c0_c0_c0(vec3 p) {
+ vec3 P = mod(floor(p), 256.0);
+ p -= floor(p);
+ vec3 f = fade_Stage1_c1_c0_c1_c0_c0_c0(p);
+ float A = perm_Stage1_c1_c0_c1_c0_c0_c0(P.x) + P.y;
+ float AA = perm_Stage1_c1_c0_c1_c0_c0_c0(A) + P.z;
+ float AB = perm_Stage1_c1_c0_c1_c0_c0_c0(A + 1.0) + P.z;
+ float B = perm_Stage1_c1_c0_c1_c0_c0_c0(P.x + 1.0) + P.y;
+ float BA = perm_Stage1_c1_c0_c1_c0_c0_c0(B) + P.z;
+ float BB = perm_Stage1_c1_c0_c1_c0_c0_c0(B + 1.0) + P.z;
+ float result = lerp_Stage1_c1_c0_c1_c0_c0_c0(lerp_Stage1_c1_c0_c1_c0_c0_c0(lerp_Stage1_c1_c0_c1_c0_c0_c0(grad_Stage1_c1_c0_c1_c0_c0_c0(perm_Stage1_c1_c0_c1_c0_c0_c0(AA), p), grad_Stage1_c1_c0_c1_c0_c0_c0(perm_Stage1_c1_c0_c1_c0_c0_c0(BA), p + vec3(-1.0, 0.0, 0.0)), f.x), lerp_Stage1_c1_c0_c1_c0_c0_c0(grad_Stage1_c1_c0_c1_c0_c0_c0(perm_Stage1_c1_c0_c1_c0_c0_c0(AB), p + vec3(0.0, -1.0, 0.0)), grad_Stage1_c1_c0_c1_c0_c0_c0(perm_Stage1_c1_c0_c1_c0_c0_c0(BB), p + vec3(-1.0, -1.0, 0.0)), f.x), f.y), lerp_Stage1_c1_c0_c1_c0_c0_c0(lerp_Stage1_c1_c0_c1_c0_c0_c0(grad_Stage1_c1_c0_c1_c0_c0_c0(perm_Stage1_c1_c0_c1_c0_c0_c0(AA + 1.0), p + vec3(0.0, 0.0, -1.0)), grad_Stage1_c1_c0_c1_c0_c0_c0(perm_Stage1_c1_c0_c1_c0_c0_c0(BA + 1.0), p + vec3(-1.0, 0.0, -1.0)), f.x), lerp_Stage1_c1_c0_c1_c0_c0_c0(grad_Stage1_c1_c0_c1_c0_c0_c0(perm_Stage1_c1_c0_c1_c0_c0_c0(AB + 1.0), p + vec3(0.0, -1.0, -1.0)), grad_Stage1_c1_c0_c1_c0_c0_c0(perm_Stage1_c1_c0_c1_c0_c0_c0(BB + 1.0), p + vec3(-1.0, -1.0, -1.0)), f.x), f.y), f.z);
+ return result;
+}
+float noiseOctaves_Stage1_c1_c0_c1_c0_c0_c0(vec3 p) {
+ float result = 0.0;
+ float ratio = 1.0;
+ for (float i = 0.0;i < 8.0; i++) {
+ result += noise_Stage1_c1_c0_c1_c0_c0_c0(p) / ratio;
+ p *= 2.0;
+ ratio *= 2.0;
+ }
+ return (result + 1.0) / 2.0;
+}
+vec4 ImprovedPerlinNoise_Stage1_c1_c0_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 vTransformedCoords_3_Stage0_ensure2D = vTransformedCoords_3_Stage0.xy / vTransformedCoords_3_Stage0.z;
+ vec2 coords = vTransformedCoords_3_Stage0_ensure2D * ubaseFrequency_Stage1_c1_c0_c1_c0_c0_c0;
+ float r = noiseOctaves_Stage1_c1_c0_c1_c0_c0_c0(vec3(coords, uz_Stage1_c1_c0_c1_c0_c0_c0));
+ float g = noiseOctaves_Stage1_c1_c0_c1_c0_c0_c0(vec3(coords, uz_Stage1_c1_c0_c1_c0_c0_c0));
+ float b = noiseOctaves_Stage1_c1_c0_c1_c0_c0_c0(vec3(coords, uz_Stage1_c1_c0_c1_c0_c0_c0));
+ float a = noiseOctaves_Stage1_c1_c0_c1_c0_c0_c0(vec3(coords, uz_Stage1_c1_c0_c1_c0_c0_c0));
+ _output = vec4(r, g, b, a);
+ _output = clamp(_output, 0.0, 1.0);
+ _output = vec4(_output.xyz * _output.www, _output.w);
+ return _output;
+}
+vec4 CircleEffect_Stage1_c1_c0_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float d;
+ {
+ d = (1.0 - length((ucircle_Stage1_c1_c0_c1_c0_c1_c0.xy - gl_FragCoord.xy) * ucircle_Stage1_c1_c0_c1_c0_c1_c0.w)) * ucircle_Stage1_c1_c0_c1_c0_c1_c0.z;
+ }
+ {
+ _output = d > 0.5 ? _input : vec4(0.0);
+ }
+ return _output;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 ComposeTwo_Stage1_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_src_over(ImprovedPerlinNoise_Stage1_c1_c0_c1_c0_c0_c0(inputColor), CircleEffect_Stage1_c1_c0_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 blend_plus(vec4 src, vec4 dst) {
+ return min(src + dst, 1.0);
+}
+vec4 ComposeTwo_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_plus(DiffuseLighting_Stage1_c1_c0_c0_c0(inputColor), ComposeTwo_Stage1_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 blend_src_atop(vec4 src, vec4 dst) {
+ return dst.w * src + (1.0 - src.w) * dst;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = uColor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_src_atop(ComposeTwo_Stage1_c0_c0(inputColor), ComposeTwo_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+uniform mat3 uCoordTransformMatrix_3_Stage0;
+in vec2 inPosition;
+out vec2 vTransformedCoords_0_Stage0;
+out vec2 vTransformedCoords_1_Stage0;
+out vec2 vTransformedCoords_2_Stage0;
+out vec3 vTransformedCoords_3_Stage0;
+void main() {
+ vec3 pos3 = uViewM_Stage0 * vec3(inPosition, 1.0);
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_3_Stage0 = uCoordTransformMatrix_3_Stage0 * vec3(inPosition, 1.0);
+ gl_Position = vec4(pos3.x, pos3.y, 0.0, pos3.z);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/316-4.shader_test b/shaders/skia/316-4.shader_test
new file mode 100644
index 0000000..dc7a82e
--- /dev/null
+++ b/shaders/skia/316-4.shader_test
@@ -0,0 +1,48 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 ucolor_Stage2_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 ConstColorProcessor_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = _input.w * ucolor_Stage2_c0_c0;
+ }
+ return _output;
+}
+vec4 blend_src_atop(vec4 src, vec4 dst) {
+ return dst.w * src + (1.0 - src.w) * dst;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_src_atop(ConstColorProcessor_Stage2_c0_c0(vec4(1.0)), output_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/316-5.shader_test b/shaders/skia/316-5.shader_test
new file mode 100644
index 0000000..f7b0d75
--- /dev/null
+++ b/shaders/skia/316-5.shader_test
@@ -0,0 +1,122 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 ubaseFrequency_Stage2_c1_c0;
+uniform float uz_Stage2_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+uniform sampler2D uTextureSampler_1_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 ClampFragmentProcessor_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = clamp(_input, 0.0, 1.0);
+ }
+ return _output;
+}
+vec3 fade_Stage2_c1_c0(vec3 t) {
+ return ((t * t) * t) * (t * (t * 6.0 - 15.0) + 10.0);
+}
+float perm_Stage2_c1_c0(float x) {
+ return texture(uTextureSampler_0_Stage2, vec2(fract(x / 256.0), 0.0)).x * 255.0;
+}
+float grad_Stage2_c1_c0(float x, vec3 p) {
+ return dot(texture(uTextureSampler_1_Stage2, vec2(fract(x / 16.0), 0.0)).xyz * 255.0 - vec3(1.0), p);
+}
+float lerp_Stage2_c1_c0(float a, float b, float w) {
+ return a + w * (b - a);
+}
+float noise_Stage2_c1_c0(vec3 p) {
+ vec3 P = mod(floor(p), 256.0);
+ p -= floor(p);
+ vec3 f = fade_Stage2_c1_c0(p);
+ float A = perm_Stage2_c1_c0(P.x) + P.y;
+ float AA = perm_Stage2_c1_c0(A) + P.z;
+ float AB = perm_Stage2_c1_c0(A + 1.0) + P.z;
+ float B = perm_Stage2_c1_c0(P.x + 1.0) + P.y;
+ float BA = perm_Stage2_c1_c0(B) + P.z;
+ float BB = perm_Stage2_c1_c0(B + 1.0) + P.z;
+ float result = lerp_Stage2_c1_c0(lerp_Stage2_c1_c0(lerp_Stage2_c1_c0(grad_Stage2_c1_c0(perm_Stage2_c1_c0(AA), p), grad_Stage2_c1_c0(perm_Stage2_c1_c0(BA), p + vec3(-1.0, 0.0, 0.0)), f.x), lerp_Stage2_c1_c0(grad_Stage2_c1_c0(perm_Stage2_c1_c0(AB), p + vec3(0.0, -1.0, 0.0)), grad_Stage2_c1_c0(perm_Stage2_c1_c0(BB), p + vec3(-1.0, -1.0, 0.0)), f.x), f.y), lerp_Stage2_c1_c0(lerp_Stage2_c1_c0(grad_Stage2_c1_c0(perm_Stage2_c1_c0(AA + 1.0), p + vec3(0.0, 0.0, -1.0)), grad_Stage2_c1_c0(perm_Stage2_c1_c0(BA + 1.0), p + vec3(-1.0, 0.0, -1.0)), f.x), lerp_Stage2_c1_c0(grad_Stage2_c1_c0(perm_Stage2_c1_c0(AB + 1.0), p + vec3(0.0, -1.0, -1.0)), grad_Stage2_c1_c0(perm_Stage2_c1_c0(BB + 1.0), p + vec3(-1.0, -1.0, -1.0)), f.x), f.y), f.z);
+ return result;
+}
+float noiseOctaves_Stage2_c1_c0(vec3 p) {
+ float result = 0.0;
+ float ratio = 1.0;
+ for (float i = 0.0;i < 10.0; i++) {
+ result += noise_Stage2_c1_c0(p) / ratio;
+ p *= 2.0;
+ ratio *= 2.0;
+ }
+ return (result + 1.0) / 2.0;
+}
+vec4 ImprovedPerlinNoise_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coords = vTransformedCoords_1_Stage0 * ubaseFrequency_Stage2_c1_c0;
+ float r = noiseOctaves_Stage2_c1_c0(vec3(coords, uz_Stage2_c1_c0));
+ float g = noiseOctaves_Stage2_c1_c0(vec3(coords, uz_Stage2_c1_c0));
+ float b = noiseOctaves_Stage2_c1_c0(vec3(coords, uz_Stage2_c1_c0));
+ float a = noiseOctaves_Stage2_c1_c0(vec3(coords, uz_Stage2_c1_c0));
+ _output = vec4(r, g, b, a);
+ _output = clamp(_output, 0.0, 1.0);
+ _output = vec4(_output.xyz * _output.www, _output.w);
+ return _output;
+}
+float _guarded_divide(float n, float d) {
+ return n / d;
+}
+float _soft_light_component(float sc, float sa, float dc, float da) {
+ if (2.0 * sc <= sa) {
+ return (_guarded_divide((dc * dc) * (sa - 2.0 * sc), da) + (1.0 - da) * sc) + dc * ((-sa + 2.0 * sc) + 1.0);
+ } else if (4.0 * dc <= da) {
+ float DSqd = dc * dc;
+ float DCub = DSqd * dc;
+ float DaSqd = da * da;
+ float DaCub = DaSqd * da;
+ return _guarded_divide(((DaSqd * (sc - dc * ((3.0 * sa - 6.0 * sc) - 1.0)) + ((12.0 * da) * DSqd) * (sa - 2.0 * sc)) - (16.0 * DCub) * (sa - 2.0 * sc)) - DaCub * sc, DaSqd);
+ }
+ return ((dc * ((sa - 2.0 * sc) + 1.0) + sc) - sqrt(da * dc) * (sa - 2.0 * sc)) - da * sc;
+}
+vec4 blend_soft_light(vec4 src, vec4 dst) {
+ if (dst.w == 0.0) {
+ return src;
+ }
+ return vec4(_soft_light_component(src.x, src.w, dst.x, dst.w), _soft_light_component(src.y, src.w, dst.y, dst.w), _soft_light_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ vec4 inputColor = vec4(output_Stage1.xyz, 1.0);
+ output_Stage2 = blend_soft_light(ClampFragmentProcessor_Stage2_c0_c0(inputColor), ImprovedPerlinNoise_Stage2_c1_c0(inputColor));
+ output_Stage2 *= output_Stage1.w;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/316.shader_test b/shaders/skia/316.shader_test
new file mode 100644
index 0000000..b75b371
--- /dev/null
+++ b/shaders/skia/316.shader_test
@@ -0,0 +1,132 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.w) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ } else {
+ {
+ if (t < uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = OverrideInputFragmentProcessor_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 blend_modulate(vec4 src, vec4 dst) {
+ return src * dst;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_modulate(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 inColor;
+in vec2 inLocalCoord;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/319-2.shader_test b/shaders/skia/319-2.shader_test
new file mode 100644
index 0000000..29ce303
--- /dev/null
+++ b/shaders/skia/319-2.shader_test
@@ -0,0 +1,212 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform float uSurfaceScale_Stage1;
+uniform vec3 uLightColor_Stage1;
+uniform float uKS_Stage1;
+uniform float uShininess_Stage1;
+uniform vec4 uTexDom_Stage1;
+uniform vec3 uDecalParams_Stage1;
+uniform vec3 uLightLocation_Stage1;
+uniform float uExponent_Stage1;
+uniform float uCosInnerConeAngle_Stage1;
+uniform float uCosOuterConeAngle_Stage1;
+uniform float uConeScale_Stage1;
+uniform vec3 uS_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 light_Stage1(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ vec3 halfDir = normalize(surfaceToLight + vec3(0.0, 0.0, 1.0));
+ float colorScale = uKS_Stage1 * pow(dot(normal, halfDir), uShininess_Stage1);
+ vec3 color = lightColor * clamp(colorScale, 0.0, 1.0);
+ return vec4(color, max(max(color.x, color.y), color.z));
+}
+float sobel_Stage1(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage1(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage1(float m[9], float surfaceScale) {
+ return pointToNormal_Stage1(sobel_Stage1(m[0], m[2], m[3], m[5], m[6], m[8], 0.25), sobel_Stage1(m[0], m[6], m[1], m[7], m[2], m[8], 0.25), surfaceScale);
+}
+vec3 lightColor_Stage1(vec3 surfaceToLight) {
+ float cosAngle = -dot(surfaceToLight, uS_Stage1);
+ if (cosAngle < uCosOuterConeAngle_Stage1) {
+ return vec3(0.0);
+ }
+ float scale = pow(cosAngle, uExponent_Stage1);
+ if (cosAngle < uCosInnerConeAngle_Stage1) {
+ return ((uLightColor_Stage1 * scale) * (cosAngle - uCosOuterConeAngle_Stage1)) * uConeScale_Stage1;
+ }
+ return uLightColor_Stage1;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ vec2 coord = vTransformedCoords_0_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp0 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp5 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp6 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp7 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp8 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = normalize(uLightLocation_Stage1 - vec3(gl_FragCoord.xy, uSurfaceScale_Stage1 * m[4]));
+ output_Stage1 = light_Stage1(normal_Stage1(m, uSurfaceScale_Stage1), surfaceToLight, lightColor_Stage1(surfaceToLight));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/319-3.shader_test b/shaders/skia/319-3.shader_test
new file mode 100644
index 0000000..a123356
--- /dev/null
+++ b/shaders/skia/319-3.shader_test
@@ -0,0 +1,51 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+noperspective in vec2 vEllipseOffsets0_Stage0;
+noperspective in vec2 vEllipseOffsets1_Stage0;
+noperspective in vec4 vinColor_Stage0;
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ vec2 scaledOffset = vEllipseOffsets0_Stage0;
+ float test = dot(scaledOffset, scaledOffset) - 1.0;
+ vec2 duvdx = dFdx(vEllipseOffsets0_Stage0);
+ vec2 duvdy = dFdy(vEllipseOffsets0_Stage0);
+ vec2 grad = vec2(vEllipseOffsets0_Stage0.x * duvdx.x + vEllipseOffsets0_Stage0.y * duvdx.y, vEllipseOffsets0_Stage0.x * duvdy.x + vEllipseOffsets0_Stage0.y * duvdy.y);
+ float grad_dot = 4.0 * dot(grad, grad);
+ grad_dot = max(grad_dot, 1.1754999560161448e-38);
+ float invlen = inversesqrt(grad_dot);
+ float edgeAlpha = clamp(1.0 - test * invlen, 0.0, 1.0);
+ edgeAlpha *= clamp(1.0 + test * invlen, 0.0, 1.0);
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ {
+ sk_FragColor = outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec2 inEllipseOffsets0;
+in vec2 inEllipseOffsets1;
+noperspective out vec2 vEllipseOffsets0_Stage0;
+noperspective out vec2 vEllipseOffsets1_Stage0;
+noperspective out vec4 vinColor_Stage0;
+void main() {
+ vEllipseOffsets0_Stage0 = inEllipseOffsets0;
+ vEllipseOffsets1_Stage0 = inEllipseOffsets1;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = (uViewM_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/319-4.shader_test b/shaders/skia/319-4.shader_test
new file mode 100644
index 0000000..467b1ab
--- /dev/null
+++ b/shaders/skia/319-4.shader_test
@@ -0,0 +1,73 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uScale_Stage2_c0_c0;
+uniform vec4 uTexDom_Stage2_c0_c0;
+uniform vec3 uDecalParams_Stage2_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+uniform sampler2D uTextureSampler_1_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+vec4 DisplacementMap_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 dColor = texture(uTextureSampler_0_Stage2, vTransformedCoords_1_Stage0);
+ dColor.xyz = dColor.w < 9.9999999747524271e-07 ? vec3(0.0) : clamp(dColor.xyz / dColor.w, 0.0, 1.0);
+ vec2 cCoords = vTransformedCoords_2_Stage0 + uScale_Stage2_c0_c0 * (dColor.yz - vec2(0.5));
+ {
+ vec2 origCoord = cCoords;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c0_c0.y);
+ if (err > uDecalParams_Stage2_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ _output = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ return _output;
+}
+vec4 blend_plus(vec4 src, vec4 dst) {
+ return min(src + dst, 1.0);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_plus(DisplacementMap_Stage2_c0_c0(vec4(1.0)), output_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/319-5.shader_test b/shaders/skia/319-5.shader_test
new file mode 100644
index 0000000..feac352
--- /dev/null
+++ b/shaders/skia/319-5.shader_test
@@ -0,0 +1,74 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform float uinnerThreshold_Stage2_c0_c0;
+uniform float uouterThreshold_Stage2_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 AlphaThresholdFragmentProcessor_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 color = _input;
+ vec4 mask_color = texture(uTextureSampler_0_Stage2, vTransformedCoords_1_Stage0);
+ if (mask_color.w < 0.5) {
+ if (color.w > uouterThreshold_Stage2_c0_c0) {
+ float scale = uouterThreshold_Stage2_c0_c0 / color.w;
+ color.xyz *= scale;
+ color.w = uouterThreshold_Stage2_c0_c0;
+ }
+ } else if (color.w < uinnerThreshold_Stage2_c0_c0) {
+ float scale = uinnerThreshold_Stage2_c0_c0 / max(0.0010000000474974513, color.w);
+ color.xyz *= scale;
+ color.w = uinnerThreshold_Stage2_c0_c0;
+ }
+ _output = color;
+ return _output;
+}
+vec4 ClampFragmentProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = clamp(_input, 0.0, 1.0);
+ }
+ return _output;
+}
+vec4 blend_multiply(vec4 src, vec4 dst) {
+ return vec4(((1.0 - src.w) * dst.xyz + (1.0 - dst.w) * src.xyz) + src.xyz * dst.xyz, src.w + (1.0 - src.w) * dst.w);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ vec4 inputColor = vec4(output_Stage1.xyz, 1.0);
+ output_Stage2 = blend_multiply(AlphaThresholdFragmentProcessor_Stage2_c0_c0(inputColor), ClampFragmentProcessor_Stage2_c1_c0(inputColor));
+ output_Stage2 *= output_Stage1.w;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/319.shader_test b/shaders/skia/319.shader_test
new file mode 100644
index 0000000..8b219d2
--- /dev/null
+++ b/shaders/skia/319.shader_test
@@ -0,0 +1,61 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 ucolor_Stage1_c0_c0_c0_c0;
+noperspective in vec4 vcolor_Stage0;
+vec4 ConstColorProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = _input.w * ucolor_Stage1_c0_c0_c0_c0;
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = ConstColorProcessor_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 blend_modulate(vec4 src, vec4 dst) {
+ return src * dst;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_modulate(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 position;
+in vec4 inColor;
+noperspective out vec4 vcolor_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/322-2.shader_test b/shaders/skia/322-2.shader_test
new file mode 100644
index 0000000..2ca745a
--- /dev/null
+++ b/shaders/skia/322-2.shader_test
@@ -0,0 +1,212 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform float uSurfaceScale_Stage1;
+uniform vec3 uLightColor_Stage1;
+uniform float uKS_Stage1;
+uniform float uShininess_Stage1;
+uniform vec4 uTexDom_Stage1;
+uniform vec3 uDecalParams_Stage1;
+uniform vec3 uLightLocation_Stage1;
+uniform float uExponent_Stage1;
+uniform float uCosInnerConeAngle_Stage1;
+uniform float uCosOuterConeAngle_Stage1;
+uniform float uConeScale_Stage1;
+uniform vec3 uS_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 light_Stage1(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ vec3 halfDir = normalize(surfaceToLight + vec3(0.0, 0.0, 1.0));
+ float colorScale = uKS_Stage1 * pow(dot(normal, halfDir), uShininess_Stage1);
+ vec3 color = lightColor * clamp(colorScale, 0.0, 1.0);
+ return vec4(color, max(max(color.x, color.y), color.z));
+}
+float sobel_Stage1(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage1(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage1(float m[9], float surfaceScale) {
+ return pointToNormal_Stage1(sobel_Stage1(m[0], m[1], m[3], m[4], m[6], m[7], 0.5), sobel_Stage1(m[0], m[6], m[1], m[7], 0.0, 0.0, 0.33333298563957214), surfaceScale);
+}
+vec3 lightColor_Stage1(vec3 surfaceToLight) {
+ float cosAngle = -dot(surfaceToLight, uS_Stage1);
+ if (cosAngle < uCosOuterConeAngle_Stage1) {
+ return vec3(0.0);
+ }
+ float scale = pow(cosAngle, uExponent_Stage1);
+ if (cosAngle < uCosInnerConeAngle_Stage1) {
+ return ((uLightColor_Stage1 * scale) * (cosAngle - uCosOuterConeAngle_Stage1)) * uConeScale_Stage1;
+ }
+ return uLightColor_Stage1;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ vec2 coord = vTransformedCoords_0_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp0 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp5 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp6 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp7 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp8 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = normalize(uLightLocation_Stage1 - vec3(gl_FragCoord.xy, uSurfaceScale_Stage1 * m[4]));
+ output_Stage1 = light_Stage1(normal_Stage1(m, uSurfaceScale_Stage1), surfaceToLight, lightColor_Stage1(surfaceToLight));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/322-3.shader_test b/shaders/skia/322-3.shader_test
new file mode 100644
index 0000000..b9aa48d
--- /dev/null
+++ b/shaders/skia/322-3.shader_test
@@ -0,0 +1,535 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uColor_Stage0;
+uniform vec2 uImageIncrement_Stage1_c0_c0_c0_c0_c0_c0;
+uniform float uSurfaceScale_Stage1_c0_c0_c0_c0_c0_c0;
+uniform vec3 uLightColor_Stage1_c0_c0_c0_c0_c0_c0;
+uniform float uKS_Stage1_c0_c0_c0_c0_c0_c0;
+uniform float uShininess_Stage1_c0_c0_c0_c0_c0_c0;
+uniform vec4 uTexDom_Stage1_c0_c0_c0_c0_c0_c0;
+uniform vec3 uDecalParams_Stage1_c0_c0_c0_c0_c0_c0;
+uniform vec3 uLightLocation_Stage1_c0_c0_c0_c0_c0_c0;
+uniform float uExponent_Stage1_c0_c0_c0_c0_c0_c0;
+uniform float uCosInnerConeAngle_Stage1_c0_c0_c0_c0_c0_c0;
+uniform float uCosOuterConeAngle_Stage1_c0_c0_c0_c0_c0_c0;
+uniform float uConeScale_Stage1_c0_c0_c0_c0_c0_c0;
+uniform vec3 uS_Stage1_c0_c0_c0_c0_c0_c0;
+uniform vec3 uedges_Stage1_c0_c0_c0_c0_c1_c0[4];
+uniform float uPixelSize_Stage1_c0_c0_c1_c0_c0_c0;
+uniform vec2 uRange_Stage1_c0_c0_c1_c0_c0_c0;
+uniform vec2 uImageIncrement_Stage1_c0_c0_c1_c0_c1_c0;
+uniform vec2 uBounds_Stage1_c0_c0_c1_c0_c1_c0;
+uniform vec4 uKernel_Stage1_c0_c0_c1_c0_c1_c0[6];
+uniform float uinnerThreshold_Stage1_c1_c0_c0_c0_c0_c0;
+uniform float uouterThreshold_Stage1_c1_c0_c0_c0_c0_c0;
+uniform float uinnerThreshold_Stage1_c1_c0_c0_c0_c1_c0;
+uniform float uouterThreshold_Stage1_c1_c0_c0_c0_c1_c0;
+uniform vec4 urectH_Stage1_c1_c0_c1_c0_c0_c0;
+uniform float uinvSixSigma_Stage1_c1_c0_c1_c0_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+uniform sampler2D uTextureSampler_2_Stage1;
+uniform sampler2D uTextureSampler_3_Stage1;
+uniform sampler2D uTextureSampler_4_Stage1;
+uniform sampler2D uTextureSampler_5_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+noperspective in vec2 vTransformedCoords_3_Stage0;
+noperspective in vec2 vTransformedCoords_4_Stage0;
+vec4 light_Stage1_c0_c0_c0_c0_c0_c0(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ vec3 halfDir = normalize(surfaceToLight + vec3(0.0, 0.0, 1.0));
+ float colorScale = uKS_Stage1_c0_c0_c0_c0_c0_c0 * pow(dot(normal, halfDir), uShininess_Stage1_c0_c0_c0_c0_c0_c0);
+ vec3 color = lightColor * clamp(colorScale, 0.0, 1.0);
+ return vec4(color, max(max(color.x, color.y), color.z));
+}
+float sobel_Stage1_c0_c0_c0_c0_c0_c0(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage1_c0_c0_c0_c0_c0_c0(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage1_c0_c0_c0_c0_c0_c0(float m[9], float surfaceScale) {
+ return pointToNormal_Stage1_c0_c0_c0_c0_c0_c0(sobel_Stage1_c0_c0_c0_c0_c0_c0(0.0, 0.0, m[3], m[4], m[6], m[7], 0.66666698455810547), sobel_Stage1_c0_c0_c0_c0_c0_c0(m[3], m[6], m[4], m[7], 0.0, 0.0, 0.66666698455810547), surfaceScale);
+}
+vec3 lightColor_Stage1_c0_c0_c0_c0_c0_c0(vec3 surfaceToLight) {
+ float cosAngle = -dot(surfaceToLight, uS_Stage1_c0_c0_c0_c0_c0_c0);
+ if (cosAngle < uCosOuterConeAngle_Stage1_c0_c0_c0_c0_c0_c0) {
+ return vec3(0.0);
+ }
+ float scale = pow(cosAngle, uExponent_Stage1_c0_c0_c0_c0_c0_c0);
+ if (cosAngle < uCosInnerConeAngle_Stage1_c0_c0_c0_c0_c0_c0) {
+ return ((uLightColor_Stage1_c0_c0_c0_c0_c0_c0 * scale) * (cosAngle - uCosOuterConeAngle_Stage1_c0_c0_c0_c0_c0_c0)) * uConeScale_Stage1_c0_c0_c0_c0_c0_c0;
+ }
+ return uLightColor_Stage1_c0_c0_c0_c0_c0_c0;
+}
+vec4 SpecularLighting_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coord = vTransformedCoords_0_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage1_c0_c0_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp0 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1_c0_c0_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1_c0_c0_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage1_c0_c0_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1_c0_c0_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp5 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage1_c0_c0_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp6 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage1_c0_c0_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp7 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage1_c0_c0_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp8 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = normalize(uLightLocation_Stage1_c0_c0_c0_c0_c0_c0 - vec3(gl_FragCoord.xy, uSurfaceScale_Stage1_c0_c0_c0_c0_c0_c0 * m[4]));
+ _output = light_Stage1_c0_c0_c0_c0_c0_c0(normal_Stage1_c0_c0_c0_c0_c0_c0(m, uSurfaceScale_Stage1_c0_c0_c0_c0_c0_c0), surfaceToLight, lightColor_Stage1_c0_c0_c0_c0_c0_c0(surfaceToLight));
+ _output *= _input;
+ return _output;
+}
+vec4 ConvexPoly_Stage1_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float alpha = 1.0;
+ float edge;
+ edge = dot(uedges_Stage1_c0_c0_c0_c0_c1_c0[0], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage1_c0_c0_c0_c0_c1_c0[1], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage1_c0_c0_c0_c0_c1_c0[2], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage1_c0_c0_c0_c0_c1_c0[3], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ _output = _input * alpha;
+ return _output;
+}
+vec4 blend_src_out(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src;
+}
+vec4 ComposeTwo_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_src_out(SpecularLighting_Stage1_c0_c0_c0_c0_c0_c0(inputColor), ConvexPoly_Stage1_c0_c0_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 Morphology_Stage1_c0_c0_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_1_Stage0;
+ coord.y -= 5.0 * uPixelSize_Stage1_c0_c0_c1_c0_c0_c0;
+ for (int i = 0;i < 11; i++) {
+ _output = max(_output, texture(uTextureSampler_1_Stage1, coord));
+ coord.y += uPixelSize_Stage1_c0_c0_c1_c0_c0_c0;
+ }
+ _output *= _input;
+ return _output;
+}
+vec4 GaussianConvolution_Stage1_c0_c0_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_2_Stage0 - 10.0 * uImageIncrement_Stage1_c0_c0_c1_c0_c1_c0;
+ vec2 coordSampled = vec2(0.0, 0.0);
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1_c0_c0_c1_c0_c1_c0.x, uBounds_Stage1_c0_c0_c1_c0_c1_c0.y);
+ _output += texture(uTextureSampler_2_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c1_c0_c1_c0[0].x;
+ coord += uImageIncrement_Stage1_c0_c0_c1_c0_c1_c0;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1_c0_c0_c1_c0_c1_c0.x, uBounds_Stage1_c0_c0_c1_c0_c1_c0.y);
+ _output += texture(uTextureSampler_2_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c1_c0_c1_c0[0].y;
+ coord += uImageIncrement_Stage1_c0_c0_c1_c0_c1_c0;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1_c0_c0_c1_c0_c1_c0.x, uBounds_Stage1_c0_c0_c1_c0_c1_c0.y);
+ _output += texture(uTextureSampler_2_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c1_c0_c1_c0[0].z;
+ coord += uImageIncrement_Stage1_c0_c0_c1_c0_c1_c0;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1_c0_c0_c1_c0_c1_c0.x, uBounds_Stage1_c0_c0_c1_c0_c1_c0.y);
+ _output += texture(uTextureSampler_2_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c1_c0_c1_c0[0].w;
+ coord += uImageIncrement_Stage1_c0_c0_c1_c0_c1_c0;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1_c0_c0_c1_c0_c1_c0.x, uBounds_Stage1_c0_c0_c1_c0_c1_c0.y);
+ _output += texture(uTextureSampler_2_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c1_c0_c1_c0[1].x;
+ coord += uImageIncrement_Stage1_c0_c0_c1_c0_c1_c0;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1_c0_c0_c1_c0_c1_c0.x, uBounds_Stage1_c0_c0_c1_c0_c1_c0.y);
+ _output += texture(uTextureSampler_2_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c1_c0_c1_c0[1].y;
+ coord += uImageIncrement_Stage1_c0_c0_c1_c0_c1_c0;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1_c0_c0_c1_c0_c1_c0.x, uBounds_Stage1_c0_c0_c1_c0_c1_c0.y);
+ _output += texture(uTextureSampler_2_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c1_c0_c1_c0[1].z;
+ coord += uImageIncrement_Stage1_c0_c0_c1_c0_c1_c0;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1_c0_c0_c1_c0_c1_c0.x, uBounds_Stage1_c0_c0_c1_c0_c1_c0.y);
+ _output += texture(uTextureSampler_2_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c1_c0_c1_c0[1].w;
+ coord += uImageIncrement_Stage1_c0_c0_c1_c0_c1_c0;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1_c0_c0_c1_c0_c1_c0.x, uBounds_Stage1_c0_c0_c1_c0_c1_c0.y);
+ _output += texture(uTextureSampler_2_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c1_c0_c1_c0[2].x;
+ coord += uImageIncrement_Stage1_c0_c0_c1_c0_c1_c0;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1_c0_c0_c1_c0_c1_c0.x, uBounds_Stage1_c0_c0_c1_c0_c1_c0.y);
+ _output += texture(uTextureSampler_2_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c1_c0_c1_c0[2].y;
+ coord += uImageIncrement_Stage1_c0_c0_c1_c0_c1_c0;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1_c0_c0_c1_c0_c1_c0.x, uBounds_Stage1_c0_c0_c1_c0_c1_c0.y);
+ _output += texture(uTextureSampler_2_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c1_c0_c1_c0[2].z;
+ coord += uImageIncrement_Stage1_c0_c0_c1_c0_c1_c0;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1_c0_c0_c1_c0_c1_c0.x, uBounds_Stage1_c0_c0_c1_c0_c1_c0.y);
+ _output += texture(uTextureSampler_2_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c1_c0_c1_c0[2].w;
+ coord += uImageIncrement_Stage1_c0_c0_c1_c0_c1_c0;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1_c0_c0_c1_c0_c1_c0.x, uBounds_Stage1_c0_c0_c1_c0_c1_c0.y);
+ _output += texture(uTextureSampler_2_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c1_c0_c1_c0[3].x;
+ coord += uImageIncrement_Stage1_c0_c0_c1_c0_c1_c0;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1_c0_c0_c1_c0_c1_c0.x, uBounds_Stage1_c0_c0_c1_c0_c1_c0.y);
+ _output += texture(uTextureSampler_2_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c1_c0_c1_c0[3].y;
+ coord += uImageIncrement_Stage1_c0_c0_c1_c0_c1_c0;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1_c0_c0_c1_c0_c1_c0.x, uBounds_Stage1_c0_c0_c1_c0_c1_c0.y);
+ _output += texture(uTextureSampler_2_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c1_c0_c1_c0[3].z;
+ coord += uImageIncrement_Stage1_c0_c0_c1_c0_c1_c0;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1_c0_c0_c1_c0_c1_c0.x, uBounds_Stage1_c0_c0_c1_c0_c1_c0.y);
+ _output += texture(uTextureSampler_2_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c1_c0_c1_c0[3].w;
+ coord += uImageIncrement_Stage1_c0_c0_c1_c0_c1_c0;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1_c0_c0_c1_c0_c1_c0.x, uBounds_Stage1_c0_c0_c1_c0_c1_c0.y);
+ _output += texture(uTextureSampler_2_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c1_c0_c1_c0[4].x;
+ coord += uImageIncrement_Stage1_c0_c0_c1_c0_c1_c0;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1_c0_c0_c1_c0_c1_c0.x, uBounds_Stage1_c0_c0_c1_c0_c1_c0.y);
+ _output += texture(uTextureSampler_2_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c1_c0_c1_c0[4].y;
+ coord += uImageIncrement_Stage1_c0_c0_c1_c0_c1_c0;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1_c0_c0_c1_c0_c1_c0.x, uBounds_Stage1_c0_c0_c1_c0_c1_c0.y);
+ _output += texture(uTextureSampler_2_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c1_c0_c1_c0[4].z;
+ coord += uImageIncrement_Stage1_c0_c0_c1_c0_c1_c0;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1_c0_c0_c1_c0_c1_c0.x, uBounds_Stage1_c0_c0_c1_c0_c1_c0.y);
+ _output += texture(uTextureSampler_2_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c1_c0_c1_c0[4].w;
+ coord += uImageIncrement_Stage1_c0_c0_c1_c0_c1_c0;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1_c0_c0_c1_c0_c1_c0.x, uBounds_Stage1_c0_c0_c1_c0_c1_c0.y);
+ _output += texture(uTextureSampler_2_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c1_c0_c1_c0[5].x;
+ coord += uImageIncrement_Stage1_c0_c0_c1_c0_c1_c0;
+ _output *= _input;
+ return _output;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 blend_lighten(vec4 src, vec4 dst) {
+ vec4 result = blend_src_over(src, dst);
+ result.xyz = max(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
+ return result;
+}
+vec4 ComposeTwo_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_lighten(Morphology_Stage1_c0_c0_c1_c0_c0_c0(inputColor), GaussianConvolution_Stage1_c0_c0_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+float _guarded_divide(float n, float d) {
+ return n / d;
+}
+float _color_burn_component(float sc, float sa, float dc, float da) {
+ if (da == dc) {
+ return (sa * da + sc * (1.0 - da)) + dc * (1.0 - sa);
+ } else if (sc == 0.0) {
+ return dc * (1.0 - sa);
+ }
+ float d = max(0.0, da - _guarded_divide((da - dc) * sa, sc));
+ return (d * sa + sc * (1.0 - da)) + dc * (1.0 - sa);
+}
+vec4 blend_color_burn(vec4 src, vec4 dst) {
+ return vec4(_color_burn_component(src.x, src.w, dst.x, dst.w), _color_burn_component(src.y, src.w, dst.y, dst.w), _color_burn_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+}
+vec4 ComposeTwo_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_color_burn(ComposeTwo_Stage1_c0_c0_c0_c0(inputColor), ComposeTwo_Stage1_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 AlphaThresholdFragmentProcessor_Stage1_c1_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 color = _input;
+ vec4 mask_color = texture(uTextureSampler_3_Stage1, vTransformedCoords_3_Stage0);
+ if (mask_color.w < 0.5) {
+ if (color.w > uouterThreshold_Stage1_c1_c0_c0_c0_c0_c0) {
+ float scale = uouterThreshold_Stage1_c1_c0_c0_c0_c0_c0 / color.w;
+ color.xyz *= scale;
+ color.w = uouterThreshold_Stage1_c1_c0_c0_c0_c0_c0;
+ }
+ } else if (color.w < uinnerThreshold_Stage1_c1_c0_c0_c0_c0_c0) {
+ float scale = uinnerThreshold_Stage1_c1_c0_c0_c0_c0_c0 / max(0.0010000000474974513, color.w);
+ color.xyz *= scale;
+ color.w = uinnerThreshold_Stage1_c1_c0_c0_c0_c0_c0;
+ }
+ _output = color;
+ return _output;
+}
+vec4 AlphaThresholdFragmentProcessor_Stage1_c1_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 color = _input;
+ vec4 mask_color = texture(uTextureSampler_4_Stage1, vTransformedCoords_4_Stage0);
+ if (mask_color.w < 0.5) {
+ if (color.w > uouterThreshold_Stage1_c1_c0_c0_c0_c1_c0) {
+ float scale = uouterThreshold_Stage1_c1_c0_c0_c0_c1_c0 / color.w;
+ color.xyz *= scale;
+ color.w = uouterThreshold_Stage1_c1_c0_c0_c0_c1_c0;
+ }
+ } else if (color.w < uinnerThreshold_Stage1_c1_c0_c0_c0_c1_c0) {
+ float scale = uinnerThreshold_Stage1_c1_c0_c0_c0_c1_c0 / max(0.0010000000474974513, color.w);
+ color.xyz *= scale;
+ color.w = uinnerThreshold_Stage1_c1_c0_c0_c0_c1_c0;
+ }
+ _output = color;
+ return _output;
+}
+vec4 blend_darken(vec4 src, vec4 dst) {
+ vec4 result = blend_src_over(src, dst);
+ result.xyz = min(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
+ return result;
+}
+vec4 ComposeTwo_Stage1_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_darken(AlphaThresholdFragmentProcessor_Stage1_c1_c0_c0_c0_c0_c0(inputColor), AlphaThresholdFragmentProcessor_Stage1_c1_c0_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 RectBlurEffect_Stage1_c1_c0_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float xCoverage, yCoverage;
+ {
+ float x, y;
+ {
+ x = max(urectH_Stage1_c1_c0_c1_c0_c0_c0.x - gl_FragCoord.x, gl_FragCoord.x - urectH_Stage1_c1_c0_c1_c0_c0_c0.z);
+ y = max(urectH_Stage1_c1_c0_c1_c0_c0_c0.y - gl_FragCoord.y, gl_FragCoord.y - urectH_Stage1_c1_c0_c1_c0_c0_c0.w);
+ }
+ xCoverage = texture(uTextureSampler_5_Stage1, vec2(x * uinvSixSigma_Stage1_c1_c0_c1_c0_c0_c0, 0.5)).w;
+ yCoverage = texture(uTextureSampler_5_Stage1, vec2(y * uinvSixSigma_Stage1_c1_c0_c1_c0_c0_c0, 0.5)).w;
+ _output = (_input * xCoverage) * yCoverage;
+ }
+ _output = (_input * xCoverage) * yCoverage;
+ return _output;
+}
+vec4 ClampFragmentProcessor_Stage1_c1_c0_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = clamp(_input, 0.0, 1.0);
+ }
+ return _output;
+}
+vec4 blend_screen(vec4 src, vec4 dst) {
+ return src + (1.0 - src) * dst;
+}
+vec4 ComposeTwo_Stage1_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_screen(RectBlurEffect_Stage1_c1_c0_c1_c0_c0_c0(inputColor), ClampFragmentProcessor_Stage1_c1_c0_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 ComposeTwo_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_lighten(ComposeTwo_Stage1_c1_c0_c0_c0(inputColor), ComposeTwo_Stage1_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+float _soft_light_component(float sc, float sa, float dc, float da) {
+ if (2.0 * sc <= sa) {
+ return (_guarded_divide((dc * dc) * (sa - 2.0 * sc), da) + (1.0 - da) * sc) + dc * ((-sa + 2.0 * sc) + 1.0);
+ } else if (4.0 * dc <= da) {
+ float DSqd = dc * dc;
+ float DCub = DSqd * dc;
+ float DaSqd = da * da;
+ float DaCub = DaSqd * da;
+ return _guarded_divide(((DaSqd * (sc - dc * ((3.0 * sa - 6.0 * sc) - 1.0)) + ((12.0 * da) * DSqd) * (sa - 2.0 * sc)) - (16.0 * DCub) * (sa - 2.0 * sc)) - DaCub * sc, DaSqd);
+ }
+ return ((dc * ((sa - 2.0 * sc) + 1.0) + sc) - sqrt(da * dc) * (sa - 2.0 * sc)) - da * sc;
+}
+vec4 blend_soft_light(vec4 src, vec4 dst) {
+ if (dst.w == 0.0) {
+ return src;
+ }
+ return vec4(_soft_light_component(src.x, src.w, dst.x, dst.w), _soft_light_component(src.y, src.w, dst.y, dst.w), _soft_light_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = uColor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_soft_light(ComposeTwo_Stage1_c0_c0(inputColor), ComposeTwo_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+uniform mat3 uCoordTransformMatrix_3_Stage0;
+uniform mat3 uCoordTransformMatrix_4_Stage0;
+in vec2 inPosition;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+noperspective out vec2 vTransformedCoords_3_Stage0;
+noperspective out vec2 vTransformedCoords_4_Stage0;
+void main() {
+ vec2 pos2 = (uViewM_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_3_Stage0 = (uCoordTransformMatrix_3_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_4_Stage0 = (uCoordTransformMatrix_4_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/322-4.shader_test b/shaders/skia/322-4.shader_test
new file mode 100644
index 0000000..ff76305
--- /dev/null
+++ b/shaders/skia/322-4.shader_test
@@ -0,0 +1,69 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uinnerRect_Stage2_c0_c0;
+uniform vec2 uinvRadiiXY_Stage2_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 EllipticalRRect_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 dxy0 = uinnerRect_Stage2_c0_c0.xy - gl_FragCoord.xy;
+ vec2 dxy1 = gl_FragCoord.xy - uinnerRect_Stage2_c0_c0.zw;
+ vec2 dxy = max(max(dxy0, dxy1), 0.0);
+ vec2 Z = dxy * uinvRadiiXY_Stage2_c0_c0;
+ float implicit = dot(Z, dxy) - 1.0;
+ float grad_dot = 4.0 * dot(Z, Z);
+ grad_dot = max(grad_dot, 9.9999997473787516e-05);
+ float approx_dist = implicit * inversesqrt(grad_dot);
+ float alpha = clamp(0.5 - approx_dist, 0.0, 1.0);
+ _output = _input * alpha;
+ return _output;
+}
+float _blend_overlay_component(float sc, float sa, float dc, float da) {
+ if (2.0 * dc <= da) {
+ return (2.0 * sc) * dc;
+ }
+ return sa * da - (2.0 * (da - dc)) * (sa - sc);
+}
+vec4 blend_overlay(vec4 src, vec4 dst) {
+ vec4 result = vec4(_blend_overlay_component(src.x, src.w, dst.x, dst.w), _blend_overlay_component(src.y, src.w, dst.y, dst.w), _blend_overlay_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+ result.xyz += dst.xyz * (1.0 - src.w) + src.xyz * (1.0 - dst.w);
+ return result;
+}
+vec4 blend_hard_light(vec4 src, vec4 dst) {
+ return blend_overlay(dst, src);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_hard_light(EllipticalRRect_Stage2_c0_c0(vec4(1.0)), output_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/322.shader_test b/shaders/skia/322.shader_test
new file mode 100644
index 0000000..e17ff91
--- /dev/null
+++ b/shaders/skia/322.shader_test
@@ -0,0 +1,152 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage2_c1_c0;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.w) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ } else {
+ {
+ if (t < uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = OverrideInputFragmentProcessor_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c1_c0;
+ }
+ return _output;
+}
+vec4 blend_modulate(vec4 src, vec4 dst) {
+ return src * dst;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 blend_darken(vec4 src, vec4 dst) {
+ vec4 result = blend_src_over(src, dst);
+ result.xyz = min(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
+ return result;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_modulate(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_darken(ConstColorProcessor_Stage2_c1_c0(vec4(1.0)), output_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 inColor;
+in vec2 inLocalCoord;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/325-2.shader_test b/shaders/skia/325-2.shader_test
new file mode 100644
index 0000000..939cc1b
--- /dev/null
+++ b/shaders/skia/325-2.shader_test
@@ -0,0 +1,212 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform float uSurfaceScale_Stage1;
+uniform vec3 uLightColor_Stage1;
+uniform float uKS_Stage1;
+uniform float uShininess_Stage1;
+uniform vec4 uTexDom_Stage1;
+uniform vec3 uDecalParams_Stage1;
+uniform vec3 uLightLocation_Stage1;
+uniform float uExponent_Stage1;
+uniform float uCosInnerConeAngle_Stage1;
+uniform float uCosOuterConeAngle_Stage1;
+uniform float uConeScale_Stage1;
+uniform vec3 uS_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 light_Stage1(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ vec3 halfDir = normalize(surfaceToLight + vec3(0.0, 0.0, 1.0));
+ float colorScale = uKS_Stage1 * pow(dot(normal, halfDir), uShininess_Stage1);
+ vec3 color = lightColor * clamp(colorScale, 0.0, 1.0);
+ return vec4(color, max(max(color.x, color.y), color.z));
+}
+float sobel_Stage1(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage1(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage1(float m[9], float surfaceScale) {
+ return pointToNormal_Stage1(sobel_Stage1(m[1], m[2], m[4], m[5], 0.0, 0.0, 0.66666698455810547), sobel_Stage1(0.0, 0.0, m[1], m[4], m[2], m[5], 0.66666698455810547), surfaceScale);
+}
+vec3 lightColor_Stage1(vec3 surfaceToLight) {
+ float cosAngle = -dot(surfaceToLight, uS_Stage1);
+ if (cosAngle < uCosOuterConeAngle_Stage1) {
+ return vec3(0.0);
+ }
+ float scale = pow(cosAngle, uExponent_Stage1);
+ if (cosAngle < uCosInnerConeAngle_Stage1) {
+ return ((uLightColor_Stage1 * scale) * (cosAngle - uCosOuterConeAngle_Stage1)) * uConeScale_Stage1;
+ }
+ return uLightColor_Stage1;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ vec2 coord = vTransformedCoords_0_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp0 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp5 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp6 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp7 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp8 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = normalize(uLightLocation_Stage1 - vec3(gl_FragCoord.xy, uSurfaceScale_Stage1 * m[4]));
+ output_Stage1 = light_Stage1(normal_Stage1(m, uSurfaceScale_Stage1), surfaceToLight, lightColor_Stage1(surfaceToLight));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/325-3.shader_test b/shaders/skia/325-3.shader_test
new file mode 100644
index 0000000..d1d452a
--- /dev/null
+++ b/shaders/skia/325-3.shader_test
@@ -0,0 +1,219 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uboundsUniform_Stage1;
+uniform float uxInvZoom_Stage1;
+uniform float uyInvZoom_Stage1;
+uniform float uxInvInset_Stage1;
+uniform float uyInvInset_Stage1;
+uniform vec2 uoffset_Stage1;
+uniform vec4 uscale0_1_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage2_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage2_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage2_c0_c0_c1_c0;
+uniform vec4 uleftBorderColor_Stage3_c1_c0;
+uniform vec4 urightBorderColor_Stage3_c1_c0;
+uniform vec4 uscale0_1_Stage3_c1_c0_c1_c0;
+uniform vec4 uscale2_3_Stage3_c1_c0_c1_c0;
+uniform vec4 uscale4_5_Stage3_c1_c0_c1_c0;
+uniform vec4 uscale6_7_Stage3_c1_c0_c1_c0;
+uniform vec4 ubias0_1_Stage3_c1_c0_c1_c0;
+uniform vec4 ubias2_3_Stage3_c1_c0_c1_c0;
+uniform vec4 ubias4_5_Stage3_c1_c0_c1_c0;
+uniform vec4 ubias6_7_Stage3_c1_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage3_c1_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage3_c1_c0_c1_c0;
+uniform vec2 uDstTextureUpperLeft_Stage6;
+uniform vec2 uDstTextureCoordScale_Stage6;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uDstTextureSampler_Stage6;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+vec4 LinearGradientLayout_Stage2_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_1_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage2_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage2_c0_c0_c1_c0;
+ bias = ubias0_1_Stage2_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage2_c0_c0_c1_c0;
+ bias = ubias2_3_Stage2_c0_c0_c1_c0;
+ }
+ } else {
+ {
+ scale = uscale4_5_Stage2_c0_c0_c1_c0;
+ bias = ubias4_5_Stage2_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage2_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ t.x = fract(t.x);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage2_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 LinearGradientLayout_Stage3_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_2_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage3_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage3_c1_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage3_c1_c0_c1_c0.x) {
+ scale = uscale0_1_Stage3_c1_c0_c1_c0;
+ bias = ubias0_1_Stage3_c1_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage3_c1_c0_c1_c0;
+ bias = ubias2_3_Stage3_c1_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage3_c1_c0_c1_c0.z) {
+ scale = uscale4_5_Stage3_c1_c0_c1_c0;
+ bias = ubias4_5_Stage3_c1_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage3_c1_c0_c1_c0;
+ bias = ubias6_7_Stage3_c1_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage3_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage3_c1_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage3_c1_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage3_c1_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage3_c1_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+vec4 blend_src_out(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ vec2 coord = vTransformedCoords_0_Stage0;
+ vec2 zoom_coord = uoffset_Stage1 + coord * vec2(uxInvZoom_Stage1, uyInvZoom_Stage1);
+ vec2 delta = (coord - uboundsUniform_Stage1.xy) * uboundsUniform_Stage1.zw;
+ delta = min(delta, vec2(1.0, 1.0) - delta);
+ delta *= vec2(uxInvInset_Stage1, uyInvInset_Stage1);
+ float weight = 0.0;
+ if (delta.x < 2.0 && delta.y < 2.0) {
+ delta = vec2(2.0, 2.0) - delta;
+ float dist = length(delta);
+ dist = max(2.0 - dist, 0.0);
+ weight = min(dist * dist, 1.0);
+ } else {
+ vec2 delta_squared = delta * delta;
+ weight = min(min(delta_squared.x, delta_squared.y), 1.0);
+ }
+ output_Stage1 = texture(uTextureSampler_0_Stage1, mix(coord, zoom_coord, weight));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_dst_in(output_Stage1, TiledGradientEffect_Stage2_c0_c0(vec4(1.0)));
+ }
+ vec4 output_Stage3;
+ {
+ output_Stage3 = blend_dst_in(output_Stage2, ClampedGradientEffect_Stage3_c1_c0(vec4(1.0)));
+ }
+ vec4 output_Stage4;
+ {
+ output_Stage4 = floor(vec4(255.0) + 0.5) / 255.0;
+ {
+ output_Stage4.xyz = floor((output_Stage4.xyz * output_Stage4.w) * 255.0 + 0.5) / 255.0;
+ }
+ }
+ vec4 output_Stage5;
+ {
+ {
+ float alpha = clamp(output_Stage4.w, 0.0, 1.0);
+ output_Stage5 = vec4(clamp(output_Stage4.xyz, 0.0, alpha), alpha);
+ }
+ }
+ {
+ if (all(lessThanEqual(output_Stage5.xyz, vec3(0.0)))) {
+ discard;
+ }
+ vec2 _dstTexCoord = (gl_FragCoord.xy - uDstTextureUpperLeft_Stage6) * uDstTextureCoordScale_Stage6;
+ vec4 _dstColor = texture(uDstTextureSampler_Stage6, _dstTexCoord);
+ sk_FragColor = blend_src_out(output_Stage3, _dstColor);
+ sk_FragColor = output_Stage5 * sk_FragColor + (vec4(1.0) - output_Stage5) * _dstColor;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec2 inLocalCoord;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+void main() {
+ vec4 color = inColor;
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/325-4.shader_test b/shaders/skia/325-4.shader_test
new file mode 100644
index 0000000..64c1fc8
--- /dev/null
+++ b/shaders/skia/325-4.shader_test
@@ -0,0 +1,106 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform float uPixelSize_Stage2_c0_c0;
+uniform vec2 uRange_Stage2_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 Morphology_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_1_Stage0;
+ coord.y -= 2.0 * uPixelSize_Stage2_c0_c0;
+ for (int i = 0;i < 5; i++) {
+ _output = max(_output, texture(uTextureSampler_0_Stage2, coord));
+ coord.y += uPixelSize_Stage2_c0_c0;
+ }
+ _output *= _input;
+ return _output;
+}
+float _blend_color_saturation(vec3 color) {
+ return max(max(color.x, color.y), color.z) - min(min(color.x, color.y), color.z);
+}
+vec3 _blend_set_color_saturation_helper(vec3 minMidMax, float sat) {
+ if (minMidMax.x < minMidMax.z) {
+ return vec3(0.0, (sat * (minMidMax.y - minMidMax.x)) / (minMidMax.z - minMidMax.x), sat);
+ }
+ return vec3(0.0);
+}
+vec3 _blend_set_color_saturation(vec3 hueLumColor, vec3 satColor) {
+ float sat = _blend_color_saturation(satColor);
+ if (hueLumColor.x <= hueLumColor.y) {
+ if (hueLumColor.y <= hueLumColor.z) {
+ hueLumColor.xyz = _blend_set_color_saturation_helper(hueLumColor, sat);
+ } else if (hueLumColor.x <= hueLumColor.z) {
+ hueLumColor.xzy = _blend_set_color_saturation_helper(hueLumColor.xzy, sat);
+ } else {
+ hueLumColor.zxy = _blend_set_color_saturation_helper(hueLumColor.zxy, sat);
+ }
+ } else if (hueLumColor.x <= hueLumColor.z) {
+ hueLumColor.yxz = _blend_set_color_saturation_helper(hueLumColor.yxz, sat);
+ } else if (hueLumColor.y <= hueLumColor.z) {
+ hueLumColor.yzx = _blend_set_color_saturation_helper(hueLumColor.yzx, sat);
+ } else {
+ hueLumColor.zyx = _blend_set_color_saturation_helper(hueLumColor.zyx, sat);
+ }
+ return hueLumColor;
+}
+float _blend_color_luminance(vec3 color) {
+ return dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), color);
+}
+vec3 _blend_set_color_luminance(vec3 hueSatColor, float alpha, vec3 lumColor) {
+ float lum = _blend_color_luminance(lumColor);
+ vec3 result = (lum - _blend_color_luminance(hueSatColor)) + hueSatColor;
+ float minComp = min(min(result.x, result.y), result.z);
+ float maxComp = max(max(result.x, result.y), result.z);
+ if (minComp < 0.0 && lum != minComp) {
+ result = lum + ((result - lum) * lum) / (lum - minComp);
+ }
+ if (maxComp > alpha && maxComp != lum) {
+ return lum + ((result - lum) * (alpha - lum)) / (maxComp - lum);
+ }
+ return result;
+}
+vec4 blend_saturation(vec4 src, vec4 dst) {
+ float alpha = dst.w * src.w;
+ vec3 sda = src.xyz * dst.w;
+ vec3 dsa = dst.xyz * src.w;
+ return vec4((((_blend_set_color_luminance(_blend_set_color_saturation(dsa, sda), alpha, dsa) + dst.xyz) - dsa) + src.xyz) - sda, (src.w + dst.w) - alpha);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_saturation(output_Stage1, Morphology_Stage2_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/325-5.shader_test b/shaders/skia/325-5.shader_test
new file mode 100644
index 0000000..b215c51
--- /dev/null
+++ b/shaders/skia/325-5.shader_test
@@ -0,0 +1,73 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform float uPixelSize_Stage2_c0_c0;
+uniform vec2 uRange_Stage2_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 Morphology_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_1_Stage0;
+ coord.x -= uPixelSize_Stage2_c0_c0;
+ for (int i = 0;i < 3; i++) {
+ _output = max(_output, texture(uTextureSampler_0_Stage2, coord));
+ coord.x += uPixelSize_Stage2_c0_c0;
+ }
+ _output *= _input;
+ return _output;
+}
+vec4 ClampFragmentProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = clamp(_input, 0.0, 1.0);
+ }
+ return _output;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 blend_darken(vec4 src, vec4 dst) {
+ vec4 result = blend_src_over(src, dst);
+ result.xyz = min(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
+ return result;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ vec4 inputColor = vec4(output_Stage1.xyz, 1.0);
+ output_Stage2 = blend_darken(Morphology_Stage2_c0_c0(inputColor), ClampFragmentProcessor_Stage2_c1_c0(inputColor));
+ output_Stage2 *= output_Stage1.w;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/325.shader_test b/shaders/skia/325.shader_test
new file mode 100644
index 0000000..e331c6f
--- /dev/null
+++ b/shaders/skia/325.shader_test
@@ -0,0 +1,81 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 ucolor_Stage1_c0_c0_c0_c0;
+uniform vec4 ucolor_Stage2_c1_c0;
+noperspective in vec4 vcolor_Stage0;
+vec4 ConstColorProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = _input.w * ucolor_Stage1_c0_c0_c0_c0;
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = ConstColorProcessor_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c1_c0;
+ }
+ return _output;
+}
+vec4 blend_modulate(vec4 src, vec4 dst) {
+ return src * dst;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 blend_darken(vec4 src, vec4 dst) {
+ vec4 result = blend_src_over(src, dst);
+ result.xyz = min(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
+ return result;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_modulate(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_darken(ConstColorProcessor_Stage2_c1_c0(vec4(1.0)), output_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 position;
+in vec4 inColor;
+noperspective out vec4 vcolor_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/328-2.shader_test b/shaders/skia/328-2.shader_test
new file mode 100644
index 0000000..6b6a542
--- /dev/null
+++ b/shaders/skia/328-2.shader_test
@@ -0,0 +1,212 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform float uSurfaceScale_Stage1;
+uniform vec3 uLightColor_Stage1;
+uniform float uKS_Stage1;
+uniform float uShininess_Stage1;
+uniform vec4 uTexDom_Stage1;
+uniform vec3 uDecalParams_Stage1;
+uniform vec3 uLightLocation_Stage1;
+uniform float uExponent_Stage1;
+uniform float uCosInnerConeAngle_Stage1;
+uniform float uCosOuterConeAngle_Stage1;
+uniform float uConeScale_Stage1;
+uniform vec3 uS_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 light_Stage1(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ vec3 halfDir = normalize(surfaceToLight + vec3(0.0, 0.0, 1.0));
+ float colorScale = uKS_Stage1 * pow(dot(normal, halfDir), uShininess_Stage1);
+ vec3 color = lightColor * clamp(colorScale, 0.0, 1.0);
+ return vec4(color, max(max(color.x, color.y), color.z));
+}
+float sobel_Stage1(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage1(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage1(float m[9], float surfaceScale) {
+ return pointToNormal_Stage1(sobel_Stage1(m[0], m[2], m[3], m[5], 0.0, 0.0, 0.33333298563957214), sobel_Stage1(m[0], m[3], m[1], m[4], m[2], m[5], 0.5), surfaceScale);
+}
+vec3 lightColor_Stage1(vec3 surfaceToLight) {
+ float cosAngle = -dot(surfaceToLight, uS_Stage1);
+ if (cosAngle < uCosOuterConeAngle_Stage1) {
+ return vec3(0.0);
+ }
+ float scale = pow(cosAngle, uExponent_Stage1);
+ if (cosAngle < uCosInnerConeAngle_Stage1) {
+ return ((uLightColor_Stage1 * scale) * (cosAngle - uCosOuterConeAngle_Stage1)) * uConeScale_Stage1;
+ }
+ return uLightColor_Stage1;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ vec2 coord = vTransformedCoords_0_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp0 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp5 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp6 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp7 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp8 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = normalize(uLightLocation_Stage1 - vec3(gl_FragCoord.xy, uSurfaceScale_Stage1 * m[4]));
+ output_Stage1 = light_Stage1(normal_Stage1(m, uSurfaceScale_Stage1), surfaceToLight, lightColor_Stage1(surfaceToLight));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/328-3.shader_test b/shaders/skia/328-3.shader_test
new file mode 100644
index 0000000..9e8e998
--- /dev/null
+++ b/shaders/skia/328-3.shader_test
@@ -0,0 +1,477 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_KHR_blend_equation_advanced : require
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+layout (blend_support_all_equations) out ;
+uniform vec4 uColor_Stage0;
+uniform vec2 uImageIncrement_Stage1_c0_c0;
+uniform float uSurfaceScale_Stage1_c0_c0;
+uniform vec3 uLightColor_Stage1_c0_c0;
+uniform float uKS_Stage1_c0_c0;
+uniform float uShininess_Stage1_c0_c0;
+uniform vec4 uTexDom_Stage1_c0_c0;
+uniform vec3 uDecalParams_Stage1_c0_c0;
+uniform vec3 uLightDirection_Stage1_c0_c0;
+uniform vec4 ucolor_Stage1_c1_c0_c0_c0_c0_c0;
+uniform vec4 ucolor_Stage1_c1_c0_c0_c0_c1_c0;
+uniform vec3 uedges_Stage1_c1_c0_c1_c0_c0_c0[6];
+uniform vec2 uImageIncrement_Stage1_c1_c0_c1_c0_c1_c0;
+uniform float uSurfaceScale_Stage1_c1_c0_c1_c0_c1_c0;
+uniform vec3 uLightColor_Stage1_c1_c0_c1_c0_c1_c0;
+uniform float uKD_Stage1_c1_c0_c1_c0_c1_c0;
+uniform vec4 uTexDom_Stage1_c1_c0_c1_c0_c1_c0;
+uniform vec3 uDecalParams_Stage1_c1_c0_c1_c0_c1_c0;
+uniform vec3 uLightDirection_Stage1_c1_c0_c1_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+in vec2 vTransformedCoords_0_Stage0;
+in vec2 vTransformedCoords_1_Stage0;
+vec4 light_Stage1_c0_c0(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ vec3 halfDir = normalize(surfaceToLight + vec3(0.0, 0.0, 1.0));
+ float colorScale = uKS_Stage1_c0_c0 * pow(dot(normal, halfDir), uShininess_Stage1_c0_c0);
+ vec3 color = lightColor * clamp(colorScale, 0.0, 1.0);
+ return vec4(color, max(max(color.x, color.y), color.z));
+}
+float sobel_Stage1_c0_c0(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage1_c0_c0(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage1_c0_c0(float m[9], float surfaceScale) {
+ return pointToNormal_Stage1_c0_c0(sobel_Stage1_c0_c0(m[0], m[1], m[3], m[4], m[6], m[7], 0.5), sobel_Stage1_c0_c0(m[0], m[6], m[1], m[7], 0.0, 0.0, 0.33333298563957214), surfaceScale);
+}
+vec4 SpecularLighting_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coord = vTransformedCoords_0_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage1_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0.xy, uTexDom_Stage1_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp0 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0.xy, uTexDom_Stage1_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0.xy, uTexDom_Stage1_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage1_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0.xy, uTexDom_Stage1_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0.xy, uTexDom_Stage1_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0.xy, uTexDom_Stage1_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp5 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage1_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0.xy, uTexDom_Stage1_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp6 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage1_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0.xy, uTexDom_Stage1_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp7 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage1_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0.xy, uTexDom_Stage1_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp8 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = uLightDirection_Stage1_c0_c0;
+ _output = light_Stage1_c0_c0(normal_Stage1_c0_c0(m, uSurfaceScale_Stage1_c0_c0), surfaceToLight, uLightColor_Stage1_c0_c0);
+ _output *= _input;
+ return _output;
+}
+vec4 ConstColorProcessor_Stage1_c1_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = _input * ucolor_Stage1_c1_c0_c0_c0_c0_c0;
+ }
+ return _output;
+}
+vec4 ConstColorProcessor_Stage1_c1_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage1_c1_c0_c0_c0_c1_c0;
+ }
+ return _output;
+}
+float _blend_color_luminance(vec3 color) {
+ return dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), color);
+}
+vec3 _blend_set_color_luminance(vec3 hueSatColor, float alpha, vec3 lumColor) {
+ float lum = _blend_color_luminance(lumColor);
+ vec3 result = (lum - _blend_color_luminance(hueSatColor)) + hueSatColor;
+ float minComp = min(min(result.x, result.y), result.z);
+ float maxComp = max(max(result.x, result.y), result.z);
+ if (minComp < 0.0 && lum != minComp) {
+ result = lum + ((result - lum) * lum) / (lum - minComp);
+ }
+ if (maxComp > alpha && maxComp != lum) {
+ return lum + ((result - lum) * (alpha - lum)) / (maxComp - lum);
+ }
+ return result;
+}
+vec4 blend_luminosity(vec4 src, vec4 dst) {
+ float alpha = dst.w * src.w;
+ vec3 sda = src.xyz * dst.w;
+ vec3 dsa = dst.xyz * src.w;
+ return vec4((((_blend_set_color_luminance(dsa, alpha, sda) + dst.xyz) - dsa) + src.xyz) - sda, (src.w + dst.w) - alpha);
+}
+vec4 ComposeTwo_Stage1_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_luminosity(ConstColorProcessor_Stage1_c1_c0_c0_c0_c0_c0(inputColor), ConstColorProcessor_Stage1_c1_c0_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 ConvexPoly_Stage1_c1_c0_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float alpha = 1.0;
+ float edge;
+ edge = dot(uedges_Stage1_c1_c0_c1_c0_c0_c0[0], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage1_c1_c0_c1_c0_c0_c0[1], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage1_c1_c0_c1_c0_c0_c0[2], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage1_c1_c0_c1_c0_c0_c0[3], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage1_c1_c0_c1_c0_c0_c0[4], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage1_c1_c0_c1_c0_c0_c0[5], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ alpha = 1.0 - alpha;
+ _output = _input * alpha;
+ return _output;
+}
+vec4 light_Stage1_c1_c0_c1_c0_c1_c0(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ float colorScale = uKD_Stage1_c1_c0_c1_c0_c1_c0 * dot(normal, surfaceToLight);
+ return vec4(lightColor * clamp(colorScale, 0.0, 1.0), 1.0);
+}
+float sobel_Stage1_c1_c0_c1_c0_c1_c0(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage1_c1_c0_c1_c0_c1_c0(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage1_c1_c0_c1_c0_c1_c0(float m[9], float surfaceScale) {
+ return pointToNormal_Stage1_c1_c0_c1_c0_c1_c0(sobel_Stage1_c1_c0_c1_c0_c1_c0(m[0], m[2], m[3], m[5], 0.0, 0.0, 0.33333298563957214), sobel_Stage1_c1_c0_c1_c0_c1_c0(m[0], m[3], m[1], m[4], m[2], m[5], 0.5), surfaceScale);
+}
+vec4 DiffuseLighting_Stage1_c1_c0_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coord = vTransformedCoords_1_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage1_c1_c0_c1_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c1_c0_c1_c0.xy, uTexDom_Stage1_c1_c0_c1_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c1_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c1_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c1_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c1_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp0 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1_c1_c0_c1_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c1_c0_c1_c0.xy, uTexDom_Stage1_c1_c0_c1_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c1_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c1_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c1_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c1_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1_c1_c0_c1_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c1_c0_c1_c0.xy, uTexDom_Stage1_c1_c0_c1_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c1_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c1_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c1_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c1_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage1_c1_c0_c1_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c1_c0_c1_c0.xy, uTexDom_Stage1_c1_c0_c1_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c1_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c1_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c1_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c1_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c1_c0_c1_c0.xy, uTexDom_Stage1_c1_c0_c1_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c1_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c1_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c1_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c1_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1_c1_c0_c1_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c1_c0_c1_c0.xy, uTexDom_Stage1_c1_c0_c1_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c1_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c1_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c1_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c1_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp5 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage1_c1_c0_c1_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c1_c0_c1_c0.xy, uTexDom_Stage1_c1_c0_c1_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c1_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c1_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c1_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c1_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp6 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage1_c1_c0_c1_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c1_c0_c1_c0.xy, uTexDom_Stage1_c1_c0_c1_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c1_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c1_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c1_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c1_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp7 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage1_c1_c0_c1_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c1_c0_c1_c0.xy, uTexDom_Stage1_c1_c0_c1_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c1_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c1_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c1_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c1_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp8 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = uLightDirection_Stage1_c1_c0_c1_c0_c1_c0;
+ _output = light_Stage1_c1_c0_c1_c0_c1_c0(normal_Stage1_c1_c0_c1_c0_c1_c0(m, uSurfaceScale_Stage1_c1_c0_c1_c0_c1_c0), surfaceToLight, uLightColor_Stage1_c1_c0_c1_c0_c1_c0);
+ _output *= _input;
+ return _output;
+}
+vec4 blend_color(vec4 src, vec4 dst) {
+ float alpha = dst.w * src.w;
+ vec3 sda = src.xyz * dst.w;
+ vec3 dsa = dst.xyz * src.w;
+ return vec4((((_blend_set_color_luminance(sda, alpha, dsa) + dst.xyz) - dsa) + src.xyz) - sda, (src.w + dst.w) - alpha);
+}
+vec4 ComposeTwo_Stage1_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_color(ConvexPoly_Stage1_c1_c0_c1_c0_c0_c0(inputColor), DiffuseLighting_Stage1_c1_c0_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 ComposeTwo_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_src_over(ComposeTwo_Stage1_c1_c0_c0_c0(inputColor), ComposeTwo_Stage1_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = uColor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_src_over(SpecularLighting_Stage1_c0_c0(inputColor), ComposeTwo_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 inPosition;
+in vec2 inLocalCoord;
+out vec2 vTransformedCoords_0_Stage0;
+out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vec3 pos3 = uViewM_Stage0 * vec3(inPosition, 1.0);
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos3.x, pos3.y, 0.0, pos3.z);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/328-4.shader_test b/shaders/skia/328-4.shader_test
new file mode 100644
index 0000000..06fbffd
--- /dev/null
+++ b/shaders/skia/328-4.shader_test
@@ -0,0 +1,54 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uinnerRect_Stage2_c0_c0;
+uniform vec2 uradiusPlusHalf_Stage2_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 CircularRRect_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 dxy0 = uinnerRect_Stage2_c0_c0.xy - gl_FragCoord.xy;
+ vec2 dxy1 = gl_FragCoord.xy - uinnerRect_Stage2_c0_c0.zw;
+ vec2 dxy = max(max(dxy0, dxy1), 0.0);
+ float alpha = clamp(uradiusPlusHalf_Stage2_c0_c0.x - length(dxy), 0.0, 1.0);
+ alpha = 1.0 - alpha;
+ _output = _input * alpha;
+ return _output;
+}
+vec4 blend_multiply(vec4 src, vec4 dst) {
+ return vec4(((1.0 - src.w) * dst.xyz + (1.0 - dst.w) * src.xyz) + src.xyz * dst.xyz, src.w + (1.0 - src.w) * dst.w);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_multiply(output_Stage1, CircularRRect_Stage2_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/328-5.shader_test b/shaders/skia/328-5.shader_test
new file mode 100644
index 0000000..8ec4aa2
--- /dev/null
+++ b/shaders/skia/328-5.shader_test
@@ -0,0 +1,105 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 ubaseFrequency_Stage2_c0_c0;
+uniform float uz_Stage2_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+uniform sampler2D uTextureSampler_1_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec3 fade_Stage2_c0_c0(vec3 t) {
+ return ((t * t) * t) * (t * (t * 6.0 - 15.0) + 10.0);
+}
+float perm_Stage2_c0_c0(float x) {
+ return texture(uTextureSampler_0_Stage2, vec2(fract(x / 256.0), 0.0)).x * 255.0;
+}
+float grad_Stage2_c0_c0(float x, vec3 p) {
+ return dot(texture(uTextureSampler_1_Stage2, vec2(fract(x / 16.0), 0.0)).xyz * 255.0 - vec3(1.0), p);
+}
+float lerp_Stage2_c0_c0(float a, float b, float w) {
+ return a + w * (b - a);
+}
+float noise_Stage2_c0_c0(vec3 p) {
+ vec3 P = mod(floor(p), 256.0);
+ p -= floor(p);
+ vec3 f = fade_Stage2_c0_c0(p);
+ float A = perm_Stage2_c0_c0(P.x) + P.y;
+ float AA = perm_Stage2_c0_c0(A) + P.z;
+ float AB = perm_Stage2_c0_c0(A + 1.0) + P.z;
+ float B = perm_Stage2_c0_c0(P.x + 1.0) + P.y;
+ float BA = perm_Stage2_c0_c0(B) + P.z;
+ float BB = perm_Stage2_c0_c0(B + 1.0) + P.z;
+ float result = lerp_Stage2_c0_c0(lerp_Stage2_c0_c0(lerp_Stage2_c0_c0(grad_Stage2_c0_c0(perm_Stage2_c0_c0(AA), p), grad_Stage2_c0_c0(perm_Stage2_c0_c0(BA), p + vec3(-1.0, 0.0, 0.0)), f.x), lerp_Stage2_c0_c0(grad_Stage2_c0_c0(perm_Stage2_c0_c0(AB), p + vec3(0.0, -1.0, 0.0)), grad_Stage2_c0_c0(perm_Stage2_c0_c0(BB), p + vec3(-1.0, -1.0, 0.0)), f.x), f.y), lerp_Stage2_c0_c0(lerp_Stage2_c0_c0(grad_Stage2_c0_c0(perm_Stage2_c0_c0(AA + 1.0), p + vec3(0.0, 0.0, -1.0)), grad_Stage2_c0_c0(perm_Stage2_c0_c0(BA + 1.0), p + vec3(-1.0, 0.0, -1.0)), f.x), lerp_Stage2_c0_c0(grad_Stage2_c0_c0(perm_Stage2_c0_c0(AB + 1.0), p + vec3(0.0, -1.0, -1.0)), grad_Stage2_c0_c0(perm_Stage2_c0_c0(BB + 1.0), p + vec3(-1.0, -1.0, -1.0)), f.x), f.y), f.z);
+ return result;
+}
+float noiseOctaves_Stage2_c0_c0(vec3 p) {
+ float result = 0.0;
+ float ratio = 1.0;
+ for (float i = 0.0;i < 7.0; i++) {
+ result += noise_Stage2_c0_c0(p) / ratio;
+ p *= 2.0;
+ ratio *= 2.0;
+ }
+ return (result + 1.0) / 2.0;
+}
+vec4 ImprovedPerlinNoise_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coords = vTransformedCoords_1_Stage0 * ubaseFrequency_Stage2_c0_c0;
+ float r = noiseOctaves_Stage2_c0_c0(vec3(coords, uz_Stage2_c0_c0));
+ float g = noiseOctaves_Stage2_c0_c0(vec3(coords, uz_Stage2_c0_c0));
+ float b = noiseOctaves_Stage2_c0_c0(vec3(coords, uz_Stage2_c0_c0));
+ float a = noiseOctaves_Stage2_c0_c0(vec3(coords, uz_Stage2_c0_c0));
+ _output = vec4(r, g, b, a);
+ _output = clamp(_output, 0.0, 1.0);
+ _output = vec4(_output.xyz * _output.www, _output.w);
+ return _output;
+}
+vec4 ClampFragmentProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ float alpha = clamp(_input.w, 0.0, 1.0);
+ _output = vec4(clamp(_input.xyz, 0.0, alpha), alpha);
+ }
+ return _output;
+}
+vec4 blend_multiply(vec4 src, vec4 dst) {
+ return vec4(((1.0 - src.w) * dst.xyz + (1.0 - dst.w) * src.xyz) + src.xyz * dst.xyz, src.w + (1.0 - src.w) * dst.w);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ vec4 inputColor = vec4(output_Stage1.xyz, 1.0);
+ output_Stage2 = blend_multiply(ImprovedPerlinNoise_Stage2_c0_c0(inputColor), ClampFragmentProcessor_Stage2_c1_c0(inputColor));
+ output_Stage2 *= output_Stage1.w;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/328.shader_test b/shaders/skia/328.shader_test
new file mode 100644
index 0000000..d14583f
--- /dev/null
+++ b/shaders/skia/328.shader_test
@@ -0,0 +1,145 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage2;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.w) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ } else {
+ {
+ if (t < uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+vec4 ComposeOne_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_dst_in(_input, TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0)));
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = ComposeOne_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 blend_modulate(vec4 src, vec4 dst) {
+ return src * dst;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_modulate(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ {
+ output_Stage2 = output_Stage1 * ucolor_Stage2;
+ }
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 inColor;
+in vec2 inLocalCoord;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/331-2.shader_test b/shaders/skia/331-2.shader_test
new file mode 100644
index 0000000..7ee58af
--- /dev/null
+++ b/shaders/skia/331-2.shader_test
@@ -0,0 +1,212 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform float uSurfaceScale_Stage1;
+uniform vec3 uLightColor_Stage1;
+uniform float uKS_Stage1;
+uniform float uShininess_Stage1;
+uniform vec4 uTexDom_Stage1;
+uniform vec3 uDecalParams_Stage1;
+uniform vec3 uLightLocation_Stage1;
+uniform float uExponent_Stage1;
+uniform float uCosInnerConeAngle_Stage1;
+uniform float uCosOuterConeAngle_Stage1;
+uniform float uConeScale_Stage1;
+uniform vec3 uS_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 light_Stage1(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ vec3 halfDir = normalize(surfaceToLight + vec3(0.0, 0.0, 1.0));
+ float colorScale = uKS_Stage1 * pow(dot(normal, halfDir), uShininess_Stage1);
+ vec3 color = lightColor * clamp(colorScale, 0.0, 1.0);
+ return vec4(color, max(max(color.x, color.y), color.z));
+}
+float sobel_Stage1(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage1(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage1(float m[9], float surfaceScale) {
+ return pointToNormal_Stage1(sobel_Stage1(m[0], m[1], m[3], m[4], 0.0, 0.0, 0.66666698455810547), sobel_Stage1(m[0], m[3], m[1], m[4], 0.0, 0.0, 0.66666698455810547), surfaceScale);
+}
+vec3 lightColor_Stage1(vec3 surfaceToLight) {
+ float cosAngle = -dot(surfaceToLight, uS_Stage1);
+ if (cosAngle < uCosOuterConeAngle_Stage1) {
+ return vec3(0.0);
+ }
+ float scale = pow(cosAngle, uExponent_Stage1);
+ if (cosAngle < uCosInnerConeAngle_Stage1) {
+ return ((uLightColor_Stage1 * scale) * (cosAngle - uCosOuterConeAngle_Stage1)) * uConeScale_Stage1;
+ }
+ return uLightColor_Stage1;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ vec2 coord = vTransformedCoords_0_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp0 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp5 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp6 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp7 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp8 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = normalize(uLightLocation_Stage1 - vec3(gl_FragCoord.xy, uSurfaceScale_Stage1 * m[4]));
+ output_Stage1 = light_Stage1(normal_Stage1(m, uSurfaceScale_Stage1), surfaceToLight, lightColor_Stage1(surfaceToLight));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/331-3.shader_test b/shaders/skia/331-3.shader_test
new file mode 100644
index 0000000..060a393
--- /dev/null
+++ b/shaders/skia/331-3.shader_test
@@ -0,0 +1,83 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+in vec4 vcolor_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ {
+ sk_FragColor = outputColor_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform float uSrcTF_Stage0[7];
+uniform mat3 uColorXform_Stage0;
+uniform float uDstTF_Stage0[7];
+uniform mat3 uViewM_Stage0;
+in vec2 position;
+in vec4 inColor;
+out vec4 vcolor_Stage0;
+float src_tf_Stage0(float x) {
+ float G = uSrcTF_Stage0[0];
+ float A = uSrcTF_Stage0[1];
+ float B = uSrcTF_Stage0[2];
+ float C = uSrcTF_Stage0[3];
+ float D = uSrcTF_Stage0[4];
+ float E = uSrcTF_Stage0[5];
+ float F = uSrcTF_Stage0[6];
+ float s = sign(x);
+ x = abs(x);
+ x = x < D ? C * x + F : pow(A * x + B, G) + E;
+ return s * x;
+}
+float dst_tf_Stage0(float x) {
+ float G = uDstTF_Stage0[0];
+ float A = uDstTF_Stage0[1];
+ float B = uDstTF_Stage0[2];
+ float C = uDstTF_Stage0[3];
+ float D = uDstTF_Stage0[4];
+ float E = uDstTF_Stage0[5];
+ float F = uDstTF_Stage0[6];
+ float s = sign(x);
+ x = abs(x);
+ x = x < D ? C * x + F : pow(A * x + B, G) + E;
+ return s * x;
+}
+vec4 gamut_xform_Stage0(vec4 color) {
+ color.xyz = uColorXform_Stage0 * color.xyz;
+ return color;
+}
+vec4 color_xform_Stage0(vec4 color) {
+ float nonZeroAlpha = max(color.w, 9.9999997473787516e-05);
+ color = vec4(color.xyz / nonZeroAlpha, nonZeroAlpha);
+ color.x = src_tf_Stage0(color.x);
+ color.y = src_tf_Stage0(color.y);
+ color.z = src_tf_Stage0(color.z);
+ color = gamut_xform_Stage0(color);
+ color.x = dst_tf_Stage0(color.x);
+ color.y = dst_tf_Stage0(color.y);
+ color.z = dst_tf_Stage0(color.z);
+ color.xyz *= color.w;
+ return color;
+}
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = color_xform_Stage0(color);
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec3 pos3 = uViewM_Stage0 * vec3(position, 1.0);
+ gl_Position = vec4(pos3.x, pos3.y, 0.0, pos3.z);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/331-4.shader_test b/shaders/skia/331-4.shader_test
new file mode 100644
index 0000000..bb4d744
--- /dev/null
+++ b/shaders/skia/331-4.shader_test
@@ -0,0 +1,60 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 urectUniform_Stage2_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 AARectEffect_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ float alpha;
+ {
+ float xSub, ySub;
+ xSub = min(gl_FragCoord.x - urectUniform_Stage2_c0_c0.x, 0.0);
+ xSub += min(urectUniform_Stage2_c0_c0.z - gl_FragCoord.x, 0.0);
+ ySub = min(gl_FragCoord.y - urectUniform_Stage2_c0_c0.y, 0.0);
+ ySub += min(urectUniform_Stage2_c0_c0.w - gl_FragCoord.y, 0.0);
+ alpha = (1.0 + max(xSub, -1.0)) * (1.0 + max(ySub, -1.0));
+ }
+ {
+ alpha = 1.0 - alpha;
+ }
+ _output = _input * alpha;
+ return _output;
+}
+vec4 blend_src_out(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_src_out(output_Stage1, AARectEffect_Stage2_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/331-5.shader_test b/shaders/skia/331-5.shader_test
new file mode 100644
index 0000000..058d1ad
--- /dev/null
+++ b/shaders/skia/331-5.shader_test
@@ -0,0 +1,61 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 ucolor_Stage2_c0_c0;
+uniform mat4 um_Stage2_c1_c0;
+uniform vec4 uv_Stage2_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 ConstColorProcessor_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c0_c0;
+ }
+ return _output;
+}
+vec4 ColorMatrixFragmentProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = _input;
+ _output = um_Stage2_c1_c0 * inputColor + uv_Stage2_c1_c0;
+ {
+ _output = clamp(_output, 0.0, 1.0);
+ }
+ return _output;
+}
+vec4 blend_src_out(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ vec4 inputColor = vec4(output_Stage1.xyz, 1.0);
+ output_Stage2 = blend_src_out(ConstColorProcessor_Stage2_c0_c0(inputColor), ColorMatrixFragmentProcessor_Stage2_c1_c0(inputColor));
+ output_Stage2 *= output_Stage1.w;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/331.shader_test b/shaders/skia/331.shader_test
new file mode 100644
index 0000000..408c3ae
--- /dev/null
+++ b/shaders/skia/331.shader_test
@@ -0,0 +1,68 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 ucolor_Stage1_c0_c0_c0_c0;
+uniform vec4 ucolor_Stage2;
+noperspective in vec4 vcolor_Stage0;
+vec4 ConstColorProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = _input.w * ucolor_Stage1_c0_c0_c0_c0;
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = ConstColorProcessor_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 blend_modulate(vec4 src, vec4 dst) {
+ return src * dst;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_modulate(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ {
+ output_Stage2 = output_Stage1 * ucolor_Stage2;
+ }
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 position;
+in vec4 inColor;
+noperspective out vec4 vcolor_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/334-2.shader_test b/shaders/skia/334-2.shader_test
new file mode 100644
index 0000000..dc9cca7
--- /dev/null
+++ b/shaders/skia/334-2.shader_test
@@ -0,0 +1,455 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uColor_Stage0;
+uniform vec3 uedges_Stage1_c0_c0_c0_c0_c0_c0[2];
+uniform vec4 uinnerRect_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 uinvRadiiLTRB_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage1_c0_c0_c1_c0_c0_c0;
+uniform float uinnerThreshold_Stage1_c0_c0_c1_c0_c1_c0;
+uniform float uouterThreshold_Stage1_c0_c0_c1_c0_c1_c0;
+uniform vec2 uImageIncrement_Stage1_c1_c0_c0_c0;
+uniform vec4 uKernel_Stage1_c1_c0_c0_c0[4];
+uniform vec2 uKernelOffset_Stage1_c1_c0_c0_c0;
+uniform float uGain_Stage1_c1_c0_c0_c0;
+uniform float uBias_Stage1_c1_c0_c0_c0;
+uniform vec2 ubaseFrequency_Stage1_c1_c0_c1_c0;
+uniform float uz_Stage1_c1_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+uniform sampler2D uTextureSampler_2_Stage1;
+uniform sampler2D uTextureSampler_3_Stage1;
+in vec2 vTransformedCoords_0_Stage0;
+in vec2 vTransformedCoords_1_Stage0;
+in vec2 vTransformedCoords_2_Stage0;
+vec4 ConvexPoly_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float alpha = 1.0;
+ float edge;
+ edge = dot(uedges_Stage1_c0_c0_c0_c0_c0_c0[0], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage1_c0_c0_c0_c0_c0_c0[1], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ alpha = 1.0 - alpha;
+ _output = _input * alpha;
+ return _output;
+}
+vec4 EllipticalRRect_Stage1_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 dxy0 = uinnerRect_Stage1_c0_c0_c0_c0_c1_c0.xy - gl_FragCoord.xy;
+ vec2 dxy1 = gl_FragCoord.xy - uinnerRect_Stage1_c0_c0_c0_c0_c1_c0.zw;
+ vec2 dxy = max(max(dxy0, dxy1), 0.0);
+ vec2 Z = max(max(dxy0 * uinvRadiiLTRB_Stage1_c0_c0_c0_c0_c1_c0.xy, dxy1 * uinvRadiiLTRB_Stage1_c0_c0_c0_c0_c1_c0.zw), 0.0);
+ float implicit = dot(Z, dxy) - 1.0;
+ float grad_dot = 4.0 * dot(Z, Z);
+ grad_dot = max(grad_dot, 9.9999997473787516e-05);
+ float approx_dist = implicit * inversesqrt(grad_dot);
+ float alpha = clamp(0.5 - approx_dist, 0.0, 1.0);
+ _output = _input * alpha;
+ return _output;
+}
+float _blend_color_saturation(vec3 color) {
+ return max(max(color.x, color.y), color.z) - min(min(color.x, color.y), color.z);
+}
+vec3 _blend_set_color_saturation_helper(vec3 minMidMax, float sat) {
+ if (minMidMax.x < minMidMax.z) {
+ return vec3(0.0, (sat * (minMidMax.y - minMidMax.x)) / (minMidMax.z - minMidMax.x), sat);
+ }
+ return vec3(0.0);
+}
+vec3 _blend_set_color_saturation(vec3 hueLumColor, vec3 satColor) {
+ float sat = _blend_color_saturation(satColor);
+ if (hueLumColor.x <= hueLumColor.y) {
+ if (hueLumColor.y <= hueLumColor.z) {
+ hueLumColor.xyz = _blend_set_color_saturation_helper(hueLumColor, sat);
+ } else if (hueLumColor.x <= hueLumColor.z) {
+ hueLumColor.xzy = _blend_set_color_saturation_helper(hueLumColor.xzy, sat);
+ } else {
+ hueLumColor.zxy = _blend_set_color_saturation_helper(hueLumColor.zxy, sat);
+ }
+ } else if (hueLumColor.x <= hueLumColor.z) {
+ hueLumColor.yxz = _blend_set_color_saturation_helper(hueLumColor.yxz, sat);
+ } else if (hueLumColor.y <= hueLumColor.z) {
+ hueLumColor.yzx = _blend_set_color_saturation_helper(hueLumColor.yzx, sat);
+ } else {
+ hueLumColor.zyx = _blend_set_color_saturation_helper(hueLumColor.zyx, sat);
+ }
+ return hueLumColor;
+}
+float _blend_color_luminance(vec3 color) {
+ return dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), color);
+}
+vec3 _blend_set_color_luminance(vec3 hueSatColor, float alpha, vec3 lumColor) {
+ float lum = _blend_color_luminance(lumColor);
+ vec3 result = (lum - _blend_color_luminance(hueSatColor)) + hueSatColor;
+ float minComp = min(min(result.x, result.y), result.z);
+ float maxComp = max(max(result.x, result.y), result.z);
+ if (minComp < 0.0 && lum != minComp) {
+ result = lum + ((result - lum) * lum) / (lum - minComp);
+ }
+ if (maxComp > alpha && maxComp != lum) {
+ return lum + ((result - lum) * (alpha - lum)) / (maxComp - lum);
+ }
+ return result;
+}
+vec4 blend_saturation(vec4 src, vec4 dst) {
+ float alpha = dst.w * src.w;
+ vec3 sda = src.xyz * dst.w;
+ vec3 dsa = dst.xyz * src.w;
+ return vec4((((_blend_set_color_luminance(_blend_set_color_saturation(dsa, sda), alpha, dsa) + dst.xyz) - dsa) + src.xyz) - sda, (src.w + dst.w) - alpha);
+}
+vec4 ComposeTwo_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_saturation(ConvexPoly_Stage1_c0_c0_c0_c0_c0_c0(inputColor), EllipticalRRect_Stage1_c0_c0_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 ConstColorProcessor_Stage1_c0_c0_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = _input.w * ucolor_Stage1_c0_c0_c1_c0_c0_c0;
+ }
+ return _output;
+}
+vec4 AlphaThresholdFragmentProcessor_Stage1_c0_c0_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 color = _input;
+ vec4 mask_color = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ if (mask_color.w < 0.5) {
+ if (color.w > uouterThreshold_Stage1_c0_c0_c1_c0_c1_c0) {
+ float scale = uouterThreshold_Stage1_c0_c0_c1_c0_c1_c0 / color.w;
+ color.xyz *= scale;
+ color.w = uouterThreshold_Stage1_c0_c0_c1_c0_c1_c0;
+ }
+ } else if (color.w < uinnerThreshold_Stage1_c0_c0_c1_c0_c1_c0) {
+ float scale = uinnerThreshold_Stage1_c0_c0_c1_c0_c1_c0 / max(0.0010000000474974513, color.w);
+ color.xyz *= scale;
+ color.w = uinnerThreshold_Stage1_c0_c0_c1_c0_c1_c0;
+ }
+ _output = color;
+ return _output;
+}
+vec4 blend_hue(vec4 src, vec4 dst) {
+ float alpha = dst.w * src.w;
+ vec3 sda = src.xyz * dst.w;
+ vec3 dsa = dst.xyz * src.w;
+ return vec4((((_blend_set_color_luminance(_blend_set_color_saturation(sda, dsa), alpha, dsa) + dst.xyz) - dsa) + src.xyz) - sda, (src.w + dst.w) - alpha);
+}
+vec4 ComposeTwo_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_hue(ConstColorProcessor_Stage1_c0_c0_c1_c0_c0_c0(inputColor), AlphaThresholdFragmentProcessor_Stage1_c0_c0_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 blend_dst_atop(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src + src.w * dst;
+}
+vec4 ComposeTwo_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_dst_atop(ComposeTwo_Stage1_c0_c0_c0_c0(inputColor), ComposeTwo_Stage1_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 MatrixConvolution_Stage1_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 sum = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_1_Stage0 - uKernelOffset_Stage1_c1_c0_c0_c0 * uImageIncrement_Stage1_c1_c0_c0_c0;
+ vec4 c;
+ {
+ float k = uKernel_Stage1_c1_c0_c0_c0[0].x;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0_c0_c0[0].y;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1_c1_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0_c0_c0[0].z;
+ {
+ vec2 origCoord = coord + vec2(2.0, 0.0) * uImageIncrement_Stage1_c1_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0_c0_c0[0].w;
+ {
+ vec2 origCoord = coord + vec2(3.0, 0.0) * uImageIncrement_Stage1_c1_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0_c0_c0[1].x;
+ {
+ vec2 origCoord = coord + vec2(4.0, 0.0) * uImageIncrement_Stage1_c1_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0_c0_c0[1].y;
+ {
+ vec2 origCoord = coord + vec2(5.0, 0.0) * uImageIncrement_Stage1_c1_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0_c0_c0[1].z;
+ {
+ vec2 origCoord = coord + vec2(6.0, 0.0) * uImageIncrement_Stage1_c1_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0_c0_c0[1].w;
+ {
+ vec2 origCoord = coord + vec2(7.0, 0.0) * uImageIncrement_Stage1_c1_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0_c0_c0[2].x;
+ {
+ vec2 origCoord = coord + vec2(8.0, 0.0) * uImageIncrement_Stage1_c1_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0_c0_c0[2].y;
+ {
+ vec2 origCoord = coord + vec2(9.0, 0.0) * uImageIncrement_Stage1_c1_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0_c0_c0[2].z;
+ {
+ vec2 origCoord = coord + vec2(10.0, 0.0) * uImageIncrement_Stage1_c1_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0_c0_c0[2].w;
+ {
+ vec2 origCoord = coord + vec2(11.0, 0.0) * uImageIncrement_Stage1_c1_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0_c0_c0[3].x;
+ {
+ vec2 origCoord = coord + vec2(12.0, 0.0) * uImageIncrement_Stage1_c1_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0_c0_c0[3].y;
+ {
+ vec2 origCoord = coord + vec2(13.0, 0.0) * uImageIncrement_Stage1_c1_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0_c0_c0[3].z;
+ {
+ vec2 origCoord = coord + vec2(14.0, 0.0) * uImageIncrement_Stage1_c1_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ _output = sum * uGain_Stage1_c1_c0_c0_c0 + uBias_Stage1_c1_c0_c0_c0;
+ _output.w = clamp(_output.w, 0.0, 1.0);
+ _output.xyz = clamp(_output.xyz, 0.0, _output.w);
+ _output *= _input;
+ return _output;
+}
+vec3 fade_Stage1_c1_c0_c1_c0(vec3 t) {
+ return ((t * t) * t) * (t * (t * 6.0 - 15.0) + 10.0);
+}
+float perm_Stage1_c1_c0_c1_c0(float x) {
+ return texture(uTextureSampler_2_Stage1, vec2(fract(x / 256.0), 0.0)).x * 255.0;
+}
+float grad_Stage1_c1_c0_c1_c0(float x, vec3 p) {
+ return dot(texture(uTextureSampler_3_Stage1, vec2(fract(x / 16.0), 0.0)).xyz * 255.0 - vec3(1.0), p);
+}
+float lerp_Stage1_c1_c0_c1_c0(float a, float b, float w) {
+ return a + w * (b - a);
+}
+float noise_Stage1_c1_c0_c1_c0(vec3 p) {
+ vec3 P = mod(floor(p), 256.0);
+ p -= floor(p);
+ vec3 f = fade_Stage1_c1_c0_c1_c0(p);
+ float A = perm_Stage1_c1_c0_c1_c0(P.x) + P.y;
+ float AA = perm_Stage1_c1_c0_c1_c0(A) + P.z;
+ float AB = perm_Stage1_c1_c0_c1_c0(A + 1.0) + P.z;
+ float B = perm_Stage1_c1_c0_c1_c0(P.x + 1.0) + P.y;
+ float BA = perm_Stage1_c1_c0_c1_c0(B) + P.z;
+ float BB = perm_Stage1_c1_c0_c1_c0(B + 1.0) + P.z;
+ float result = lerp_Stage1_c1_c0_c1_c0(lerp_Stage1_c1_c0_c1_c0(lerp_Stage1_c1_c0_c1_c0(grad_Stage1_c1_c0_c1_c0(perm_Stage1_c1_c0_c1_c0(AA), p), grad_Stage1_c1_c0_c1_c0(perm_Stage1_c1_c0_c1_c0(BA), p + vec3(-1.0, 0.0, 0.0)), f.x), lerp_Stage1_c1_c0_c1_c0(grad_Stage1_c1_c0_c1_c0(perm_Stage1_c1_c0_c1_c0(AB), p + vec3(0.0, -1.0, 0.0)), grad_Stage1_c1_c0_c1_c0(perm_Stage1_c1_c0_c1_c0(BB), p + vec3(-1.0, -1.0, 0.0)), f.x), f.y), lerp_Stage1_c1_c0_c1_c0(lerp_Stage1_c1_c0_c1_c0(grad_Stage1_c1_c0_c1_c0(perm_Stage1_c1_c0_c1_c0(AA + 1.0), p + vec3(0.0, 0.0, -1.0)), grad_Stage1_c1_c0_c1_c0(perm_Stage1_c1_c0_c1_c0(BA + 1.0), p + vec3(-1.0, 0.0, -1.0)), f.x), lerp_Stage1_c1_c0_c1_c0(grad_Stage1_c1_c0_c1_c0(perm_Stage1_c1_c0_c1_c0(AB + 1.0), p + vec3(0.0, -1.0, -1.0)), grad_Stage1_c1_c0_c1_c0(perm_Stage1_c1_c0_c1_c0(BB + 1.0), p + vec3(-1.0, -1.0, -1.0)), f.x), f.y), f.z);
+ return result;
+}
+float noiseOctaves_Stage1_c1_c0_c1_c0(vec3 p) {
+ float result = 0.0;
+ float ratio = 1.0;
+ for (float i = 0.0;i < 8.0; i++) {
+ result += noise_Stage1_c1_c0_c1_c0(p) / ratio;
+ p *= 2.0;
+ ratio *= 2.0;
+ }
+ return (result + 1.0) / 2.0;
+}
+vec4 ImprovedPerlinNoise_Stage1_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coords = vTransformedCoords_2_Stage0 * ubaseFrequency_Stage1_c1_c0_c1_c0;
+ float r = noiseOctaves_Stage1_c1_c0_c1_c0(vec3(coords, uz_Stage1_c1_c0_c1_c0));
+ float g = noiseOctaves_Stage1_c1_c0_c1_c0(vec3(coords, uz_Stage1_c1_c0_c1_c0));
+ float b = noiseOctaves_Stage1_c1_c0_c1_c0(vec3(coords, uz_Stage1_c1_c0_c1_c0));
+ float a = noiseOctaves_Stage1_c1_c0_c1_c0(vec3(coords, uz_Stage1_c1_c0_c1_c0));
+ _output = vec4(r, g, b, a);
+ _output = clamp(_output, 0.0, 1.0);
+ _output = vec4(_output.xyz * _output.www, _output.w);
+ return _output;
+}
+vec4 blend_src_out(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src;
+}
+vec4 ComposeTwo_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_src_out(MatrixConvolution_Stage1_c1_c0_c0_c0(inputColor), ImprovedPerlinNoise_Stage1_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+float _guarded_divide(float n, float d) {
+ return n / d;
+}
+float _color_dodge_component(float sc, float sa, float dc, float da) {
+ if (dc == 0.0) {
+ return sc * (1.0 - da);
+ } else {
+ float d = sa - sc;
+ if (d == 0.0) {
+ return (sa * da + sc * (1.0 - da)) + dc * (1.0 - sa);
+ }
+ d = min(da, _guarded_divide(dc * sa, d));
+ return (d * sa + sc * (1.0 - da)) + dc * (1.0 - sa);
+ }
+}
+vec4 blend_color_dodge(vec4 src, vec4 dst) {
+ return vec4(_color_dodge_component(src.x, src.w, dst.x, dst.w), _color_dodge_component(src.y, src.w, dst.y, dst.w), _color_dodge_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = uColor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_color_dodge(ComposeTwo_Stage1_c0_c0(inputColor), ComposeTwo_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+in vec2 inPosition;
+out vec2 vTransformedCoords_0_Stage0;
+out vec2 vTransformedCoords_1_Stage0;
+out vec2 vTransformedCoords_2_Stage0;
+void main() {
+ vec3 pos3 = uViewM_Stage0 * vec3(inPosition, 1.0);
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(inPosition, 1.0)).xy;
+ {
+ vec2 _posTmp = vec2(pos3.x / pos3.z, pos3.y / pos3.z);
+ _posTmp = floor(_posTmp) + vec2(0.5, 0.5);
+ gl_Position = vec4(_posTmp, 0.0, 1.0);
+ }
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/334-3.shader_test b/shaders/skia/334-3.shader_test
new file mode 100644
index 0000000..e7a67eb
--- /dev/null
+++ b/shaders/skia/334-3.shader_test
@@ -0,0 +1,51 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform mat4 um_Stage2_c0_c0;
+uniform vec4 uv_Stage2_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 ColorMatrixFragmentProcessor_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = _input;
+ _output = um_Stage2_c0_c0 * inputColor + uv_Stage2_c0_c0;
+ {
+ _output.w = clamp(_output.w, 0.0, 1.0);
+ }
+ return _output;
+}
+vec4 blend_dst_out(vec4 src, vec4 dst) {
+ return (1.0 - src.w) * dst;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_dst_out(output_Stage1, ColorMatrixFragmentProcessor_Stage2_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/334-4.shader_test b/shaders/skia/334-4.shader_test
new file mode 100644
index 0000000..539688f
--- /dev/null
+++ b/shaders/skia/334-4.shader_test
@@ -0,0 +1,65 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 ClampFragmentProcessor_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ float alpha = clamp(_input.w, 0.0, 1.0);
+ _output = vec4(clamp(_input.xyz, 0.0, alpha), alpha);
+ }
+ return _output;
+}
+vec4 TextureEffect_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage2, vTransformedCoords_1_Stage0) * _input;
+ return _output;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 blend_darken(vec4 src, vec4 dst) {
+ vec4 result = blend_src_over(src, dst);
+ result.xyz = min(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
+ return result;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ vec4 inputColor = vec4(output_Stage1.xyz, 1.0);
+ output_Stage2 = blend_darken(ClampFragmentProcessor_Stage2_c0_c0(inputColor), TextureEffect_Stage2_c1_c0(inputColor));
+ output_Stage2 *= output_Stage1.w;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/334.shader_test b/shaders/skia/334.shader_test
new file mode 100644
index 0000000..c3559a8
--- /dev/null
+++ b/shaders/skia/334.shader_test
@@ -0,0 +1,165 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage2;
+uniform vec4 ucolor_Stage3_c1_c0;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.w) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ } else {
+ {
+ if (t < uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+vec4 ComposeOne_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_dst_in(_input, TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0)));
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = ComposeOne_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 ConstColorProcessor_Stage3_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage3_c1_c0;
+ }
+ return _output;
+}
+vec4 blend_modulate(vec4 src, vec4 dst) {
+ return src * dst;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 blend_darken(vec4 src, vec4 dst) {
+ vec4 result = blend_src_over(src, dst);
+ result.xyz = min(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
+ return result;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_modulate(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ {
+ output_Stage2 = output_Stage1 * ucolor_Stage2;
+ }
+ }
+ vec4 output_Stage3;
+ {
+ output_Stage3 = blend_darken(ConstColorProcessor_Stage3_c1_c0(vec4(1.0)), output_Stage2);
+ }
+ {
+ sk_FragColor = output_Stage3;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 inColor;
+in vec2 inLocalCoord;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/337-3.shader_test b/shaders/skia/337-3.shader_test
new file mode 100644
index 0000000..0404173
--- /dev/null
+++ b/shaders/skia/337-3.shader_test
@@ -0,0 +1,74 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec3 uedges_Stage2_c0_c0[2];
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 ConvexPoly_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ float alpha = 1.0;
+ float edge;
+ edge = dot(uedges_Stage2_c0_c0[0], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage2_c0_c0[1], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ _output = _input * alpha;
+ return _output;
+}
+float _guarded_divide(float n, float d) {
+ return n / d;
+}
+float _soft_light_component(float sc, float sa, float dc, float da) {
+ if (2.0 * sc <= sa) {
+ return (_guarded_divide((dc * dc) * (sa - 2.0 * sc), da) + (1.0 - da) * sc) + dc * ((-sa + 2.0 * sc) + 1.0);
+ } else if (4.0 * dc <= da) {
+ float DSqd = dc * dc;
+ float DCub = DSqd * dc;
+ float DaSqd = da * da;
+ float DaCub = DaSqd * da;
+ return _guarded_divide(((DaSqd * (sc - dc * ((3.0 * sa - 6.0 * sc) - 1.0)) + ((12.0 * da) * DSqd) * (sa - 2.0 * sc)) - (16.0 * DCub) * (sa - 2.0 * sc)) - DaCub * sc, DaSqd);
+ }
+ return ((dc * ((sa - 2.0 * sc) + 1.0) + sc) - sqrt(da * dc) * (sa - 2.0 * sc)) - da * sc;
+}
+vec4 blend_soft_light(vec4 src, vec4 dst) {
+ if (dst.w == 0.0) {
+ return src;
+ }
+ return vec4(_soft_light_component(src.x, src.w, dst.x, dst.w), _soft_light_component(src.y, src.w, dst.y, dst.w), _soft_light_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_soft_light(output_Stage1, ConvexPoly_Stage2_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/337-4.shader_test b/shaders/skia/337-4.shader_test
new file mode 100644
index 0000000..0e30487
--- /dev/null
+++ b/shaders/skia/337-4.shader_test
@@ -0,0 +1,104 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 ubaseFrequency_Stage2_c1_c0;
+uniform float uz_Stage2_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+uniform sampler2D uTextureSampler_1_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 ClampFragmentProcessor_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = clamp(_input, 0.0, 1.0);
+ }
+ return _output;
+}
+vec3 fade_Stage2_c1_c0(vec3 t) {
+ return ((t * t) * t) * (t * (t * 6.0 - 15.0) + 10.0);
+}
+float perm_Stage2_c1_c0(float x) {
+ return texture(uTextureSampler_0_Stage2, vec2(fract(x / 256.0), 0.0)).x * 255.0;
+}
+float grad_Stage2_c1_c0(float x, vec3 p) {
+ return dot(texture(uTextureSampler_1_Stage2, vec2(fract(x / 16.0), 0.0)).xyz * 255.0 - vec3(1.0), p);
+}
+float lerp_Stage2_c1_c0(float a, float b, float w) {
+ return a + w * (b - a);
+}
+float noise_Stage2_c1_c0(vec3 p) {
+ vec3 P = mod(floor(p), 256.0);
+ p -= floor(p);
+ vec3 f = fade_Stage2_c1_c0(p);
+ float A = perm_Stage2_c1_c0(P.x) + P.y;
+ float AA = perm_Stage2_c1_c0(A) + P.z;
+ float AB = perm_Stage2_c1_c0(A + 1.0) + P.z;
+ float B = perm_Stage2_c1_c0(P.x + 1.0) + P.y;
+ float BA = perm_Stage2_c1_c0(B) + P.z;
+ float BB = perm_Stage2_c1_c0(B + 1.0) + P.z;
+ float result = lerp_Stage2_c1_c0(lerp_Stage2_c1_c0(lerp_Stage2_c1_c0(grad_Stage2_c1_c0(perm_Stage2_c1_c0(AA), p), grad_Stage2_c1_c0(perm_Stage2_c1_c0(BA), p + vec3(-1.0, 0.0, 0.0)), f.x), lerp_Stage2_c1_c0(grad_Stage2_c1_c0(perm_Stage2_c1_c0(AB), p + vec3(0.0, -1.0, 0.0)), grad_Stage2_c1_c0(perm_Stage2_c1_c0(BB), p + vec3(-1.0, -1.0, 0.0)), f.x), f.y), lerp_Stage2_c1_c0(lerp_Stage2_c1_c0(grad_Stage2_c1_c0(perm_Stage2_c1_c0(AA + 1.0), p + vec3(0.0, 0.0, -1.0)), grad_Stage2_c1_c0(perm_Stage2_c1_c0(BA + 1.0), p + vec3(-1.0, 0.0, -1.0)), f.x), lerp_Stage2_c1_c0(grad_Stage2_c1_c0(perm_Stage2_c1_c0(AB + 1.0), p + vec3(0.0, -1.0, -1.0)), grad_Stage2_c1_c0(perm_Stage2_c1_c0(BB + 1.0), p + vec3(-1.0, -1.0, -1.0)), f.x), f.y), f.z);
+ return result;
+}
+float noiseOctaves_Stage2_c1_c0(vec3 p) {
+ float result = 0.0;
+ float ratio = 1.0;
+ for (float i = 0.0;i < 2.0; i++) {
+ result += noise_Stage2_c1_c0(p) / ratio;
+ p *= 2.0;
+ ratio *= 2.0;
+ }
+ return (result + 1.0) / 2.0;
+}
+vec4 ImprovedPerlinNoise_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coords = vTransformedCoords_1_Stage0 * ubaseFrequency_Stage2_c1_c0;
+ float r = noiseOctaves_Stage2_c1_c0(vec3(coords, uz_Stage2_c1_c0));
+ float g = noiseOctaves_Stage2_c1_c0(vec3(coords, uz_Stage2_c1_c0));
+ float b = noiseOctaves_Stage2_c1_c0(vec3(coords, uz_Stage2_c1_c0));
+ float a = noiseOctaves_Stage2_c1_c0(vec3(coords, uz_Stage2_c1_c0));
+ _output = vec4(r, g, b, a);
+ _output = clamp(_output, 0.0, 1.0);
+ _output = vec4(_output.xyz * _output.www, _output.w);
+ return _output;
+}
+vec4 blend_dst_atop(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src + src.w * dst;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ vec4 inputColor = vec4(output_Stage1.xyz, 1.0);
+ output_Stage2 = blend_dst_atop(ClampFragmentProcessor_Stage2_c0_c0(inputColor), ImprovedPerlinNoise_Stage2_c1_c0(inputColor));
+ output_Stage2 *= output_Stage1.w;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/337.shader_test b/shaders/skia/337.shader_test
new file mode 100644
index 0000000..4cbf891
--- /dev/null
+++ b/shaders/skia/337.shader_test
@@ -0,0 +1,88 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 ucolor_Stage1_c0_c0_c0_c0;
+uniform vec4 ucolor_Stage2;
+uniform vec4 ucolor_Stage3_c1_c0;
+noperspective in vec4 vcolor_Stage0;
+vec4 ConstColorProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = _input.w * ucolor_Stage1_c0_c0_c0_c0;
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = ConstColorProcessor_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 ConstColorProcessor_Stage3_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage3_c1_c0;
+ }
+ return _output;
+}
+vec4 blend_modulate(vec4 src, vec4 dst) {
+ return src * dst;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 blend_darken(vec4 src, vec4 dst) {
+ vec4 result = blend_src_over(src, dst);
+ result.xyz = min(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
+ return result;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_modulate(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ {
+ output_Stage2 = output_Stage1 * ucolor_Stage2;
+ }
+ }
+ vec4 output_Stage3;
+ {
+ output_Stage3 = blend_darken(ConstColorProcessor_Stage3_c1_c0(vec4(1.0)), output_Stage2);
+ }
+ {
+ sk_FragColor = output_Stage3;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 position;
+in vec4 inColor;
+noperspective out vec4 vcolor_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/34-1.shader_test b/shaders/skia/34-1.shader_test
new file mode 100644
index 0000000..1065b55
--- /dev/null
+++ b/shaders/skia/34-1.shader_test
@@ -0,0 +1,63 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+uniform sampler2D uTextureSampler_2_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+vec4 TextureEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_1_Stage1, vTransformedCoords_1_Stage0) * _input;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c2_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_2_Stage1, vTransformedCoords_2_Stage0) * _input;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ vec4 planes[3];
+ planes[0] = TextureEffect_Stage1_c0_c0(vec4(1.0));
+ planes[1] = TextureEffect_Stage1_c1_c0(vec4(1.0));
+ planes[2] = TextureEffect_Stage1_c2_c0(vec4(1.0));
+ vec4 color = vec4(planes[2].x, planes[1].x, planes[0].x, 1.0);
+ output_Stage1 = color;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/34-102.shader_test b/shaders/skia/34-102.shader_test
new file mode 100644
index 0000000..e882a54
--- /dev/null
+++ b/shaders/skia/34-102.shader_test
@@ -0,0 +1,96 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uCoordTransformMatrix_1_Stage0;
+uniform float uDstTF_Stage1[7];
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 TextureEffect_Stage1_c0_c0_c0_c0(vec4 _input, vec2 _coords) {
+ _coords = _coords * uCoordTransformMatrix_1_Stage0.xz + uCoordTransformMatrix_1_Stage0.yw;
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, _coords) * _input;
+ return _output;
+}
+vec4 Bicubic_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coord = vTransformedCoords_0_Stage0 - vec2(0.5);
+ vec2 f = fract(coord);
+ coord += 0.5 - f;
+ vec4 wx = mat4(0.055555555555555552, 0.88888888888888884, 0.055555555555555552, 0.0, -0.5, 0.0, 0.5, 0.0, 0.83333333333333337, -2.0, 1.5, -0.33333333333333331, -0.3888888888888889, 1.1666666666666667, -1.1666666666666667, 0.3888888888888889) * vec4(1.0, f.x, f.x * f.x, (f.x * f.x) * f.x);
+ vec4 wy = mat4(0.055555555555555552, 0.88888888888888884, 0.055555555555555552, 0.0, -0.5, 0.0, 0.5, 0.0, 0.83333333333333337, -2.0, 1.5, -0.33333333333333331, -0.3888888888888889, 1.1666666666666667, -1.1666666666666667, 0.3888888888888889) * vec4(1.0, f.y, f.y * f.y, (f.y * f.y) * f.y);
+ vec4 rowColors[4];
+ rowColors[0] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(-1.0, -1.0));
+ rowColors[1] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(0.0, -1.0));
+ rowColors[2] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(1.0, -1.0));
+ rowColors[3] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(2.0, -1.0));
+ vec4 s0 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ rowColors[0] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(-1.0, 0.0));
+ rowColors[1] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord);
+ rowColors[2] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(1.0, 0.0));
+ rowColors[3] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(2.0, 0.0));
+ vec4 s1 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ rowColors[0] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(-1.0, 1.0));
+ rowColors[1] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(0.0, 1.0));
+ rowColors[2] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(1.0, 1.0));
+ rowColors[3] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(2.0, 1.0));
+ vec4 s2 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ rowColors[0] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(-1.0, 2.0));
+ rowColors[1] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(0.0, 2.0));
+ rowColors[2] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(1.0, 2.0));
+ rowColors[3] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(2.0, 2.0));
+ vec4 s3 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ vec4 bicubicColor = ((wy.x * s0 + wy.y * s1) + wy.z * s2) + wy.w * s3;
+ bicubicColor.xyz = max(vec3(0.0), min(bicubicColor.xyz, bicubicColor.www));
+ _output = bicubicColor * _input;
+ return _output;
+}
+float dst_tf_Stage1(float x) {
+ float G = uDstTF_Stage1[0];
+ float A = uDstTF_Stage1[1];
+ float B = uDstTF_Stage1[2];
+ float C = uDstTF_Stage1[3];
+ float D = uDstTF_Stage1[4];
+ float E = uDstTF_Stage1[5];
+ float F = uDstTF_Stage1[6];
+ float s = sign(x);
+ x = abs(x);
+ x = x < D ? C * x + F : pow(A * x + B, G) + E;
+ return s * x;
+}
+vec4 color_xform_Stage1(vec4 color) {
+ float nonZeroAlpha = max(color.w, 9.9999997473787516e-05);
+ color = vec4(color.xyz / nonZeroAlpha, nonZeroAlpha);
+ color.x = dst_tf_Stage1(color.x);
+ color.y = dst_tf_Stage1(color.y);
+ color.z = dst_tf_Stage1(color.z);
+ color.xyz *= color.w;
+ return color;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = color_xform_Stage1(Bicubic_Stage1_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/34-106.shader_test b/shaders/skia/34-106.shader_test
new file mode 100644
index 0000000..0100c1c
--- /dev/null
+++ b/shaders/skia/34-106.shader_test
@@ -0,0 +1,83 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 ubaseFrequency_Stage2;
+uniform float uz_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+uniform sampler2D uTextureSampler_1_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec3 fade_Stage2(vec3 t) {
+ return ((t * t) * t) * (t * (t * 6.0 - 15.0) + 10.0);
+}
+float perm_Stage2(float x) {
+ return texture(uTextureSampler_0_Stage2, vec2(fract(x / 256.0), 0.0)).x * 255.0;
+}
+float grad_Stage2(float x, vec3 p) {
+ return dot(texture(uTextureSampler_1_Stage2, vec2(fract(x / 16.0), 0.0)).xyz * 255.0 - vec3(1.0), p);
+}
+float lerp_Stage2(float a, float b, float w) {
+ return a + w * (b - a);
+}
+float noise_Stage2(vec3 p) {
+ vec3 P = mod(floor(p), 256.0);
+ p -= floor(p);
+ vec3 f = fade_Stage2(p);
+ float A = perm_Stage2(P.x) + P.y;
+ float AA = perm_Stage2(A) + P.z;
+ float AB = perm_Stage2(A + 1.0) + P.z;
+ float B = perm_Stage2(P.x + 1.0) + P.y;
+ float BA = perm_Stage2(B) + P.z;
+ float BB = perm_Stage2(B + 1.0) + P.z;
+ float result = lerp_Stage2(lerp_Stage2(lerp_Stage2(grad_Stage2(perm_Stage2(AA), p), grad_Stage2(perm_Stage2(BA), p + vec3(-1.0, 0.0, 0.0)), f.x), lerp_Stage2(grad_Stage2(perm_Stage2(AB), p + vec3(0.0, -1.0, 0.0)), grad_Stage2(perm_Stage2(BB), p + vec3(-1.0, -1.0, 0.0)), f.x), f.y), lerp_Stage2(lerp_Stage2(grad_Stage2(perm_Stage2(AA + 1.0), p + vec3(0.0, 0.0, -1.0)), grad_Stage2(perm_Stage2(BA + 1.0), p + vec3(-1.0, 0.0, -1.0)), f.x), lerp_Stage2(grad_Stage2(perm_Stage2(AB + 1.0), p + vec3(0.0, -1.0, -1.0)), grad_Stage2(perm_Stage2(BB + 1.0), p + vec3(-1.0, -1.0, -1.0)), f.x), f.y), f.z);
+ return result;
+}
+float noiseOctaves_Stage2(vec3 p) {
+ float result = 0.0;
+ float ratio = 1.0;
+ for (float i = 0.0;i < 6.0; i++) {
+ result += noise_Stage2(p) / ratio;
+ p *= 2.0;
+ ratio *= 2.0;
+ }
+ return (result + 1.0) / 2.0;
+}
+void main() {
+ vec4 output_Stage2;
+ {
+ vec2 coords = vTransformedCoords_1_Stage0 * ubaseFrequency_Stage2;
+ float r = noiseOctaves_Stage2(vec3(coords, uz_Stage2));
+ float g = noiseOctaves_Stage2(vec3(coords, uz_Stage2));
+ float b = noiseOctaves_Stage2(vec3(coords, uz_Stage2));
+ float a = noiseOctaves_Stage2(vec3(coords, uz_Stage2));
+ output_Stage2 = vec4(r, g, b, a);
+ output_Stage2 = clamp(output_Stage2, 0.0, 1.0);
+ output_Stage2 = vec4(output_Stage2.xyz * output_Stage2.www, output_Stage2.w);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/34-107.shader_test b/shaders/skia/34-107.shader_test
new file mode 100644
index 0000000..30e7bd8
--- /dev/null
+++ b/shaders/skia/34-107.shader_test
@@ -0,0 +1,61 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uCoordTransformMatrix_2_Stage0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 TextureEffect_Stage2_c0_c0(vec4 _input, vec2 _coords) {
+ _coords = _coords * uCoordTransformMatrix_2_Stage0.xz + uCoordTransformMatrix_2_Stage0.yw;
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage2, _coords) * _input;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ float coord = vTransformedCoords_1_Stage0.y - 0.5;
+ float f = fract(coord);
+ coord += 0.5 - f;
+ float f2 = f * f;
+ vec4 w = mat4(0.055555555555555552, 0.88888888888888884, 0.055555555555555552, 0.0, -0.5, 0.0, 0.5, 0.0, 0.83333333333333337, -2.0, 1.5, -0.33333333333333331, -0.3888888888888889, 1.1666666666666667, -1.1666666666666667, 0.3888888888888889) * vec4(1.0, f, f2, f2 * f);
+ vec4 c[4];
+ c[0] = TextureEffect_Stage2_c0_c0(vec4(1.0), vec2(vTransformedCoords_1_Stage0.x, coord + -1.0));
+ c[1] = TextureEffect_Stage2_c0_c0(vec4(1.0), vec2(vTransformedCoords_1_Stage0.x, coord));
+ c[2] = TextureEffect_Stage2_c0_c0(vec4(1.0), vec2(vTransformedCoords_1_Stage0.x, coord + 1.0));
+ c[3] = TextureEffect_Stage2_c0_c0(vec4(1.0), vec2(vTransformedCoords_1_Stage0.x, coord + 2.0));
+ vec4 bicubicColor = ((c[0] * w.x + c[1] * w.y) + c[2] * w.z) + c[3] * w.w;
+ bicubicColor.xyz = max(vec3(0.0), min(bicubicColor.xyz, bicubicColor.www));
+ output_Stage2 = bicubicColor * output_Stage1;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/34-11.shader_test b/shaders/skia/34-11.shader_test
new file mode 100644
index 0000000..b0a62ff
--- /dev/null
+++ b/shaders/skia/34-11.shader_test
@@ -0,0 +1,73 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 usubset_Stage1;
+uniform vec4 uclamp_Stage1;
+uniform vec4 unorm_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+flat in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec2 inCoord = vTransformedCoords_0_Stage0;
+ inCoord *= unorm_Stage1.xy;
+ float extraRepeatCoordX;
+ float repeatCoordWeightX;
+ vec2 subsetCoord;
+ {
+ float w = usubset_Stage1.z - usubset_Stage1.x;
+ float w2 = 2.0 * w;
+ float d = inCoord.x - usubset_Stage1.x;
+ float m = mod(d, w2);
+ float o = mix(m, w2 - m, step(w, m));
+ subsetCoord.x = o + usubset_Stage1.x;
+ extraRepeatCoordX = (w - o) + usubset_Stage1.x;
+ float hw = w / 2.0;
+ float n = mod(d - hw, w2);
+ repeatCoordWeightX = clamp((mix(n, w2 - n, step(w, n)) - hw) + 0.5, 0.0, 1.0);
+ }
+ {
+ float w = usubset_Stage1.w - usubset_Stage1.y;
+ float w2 = 2.0 * w;
+ float m = mod(inCoord.y - usubset_Stage1.y, w2);
+ subsetCoord.y = mix(m, w2 - m, step(w, m)) + usubset_Stage1.y;
+ }
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage1.x, uclamp_Stage1.z);
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage1.y, uclamp_Stage1.w);
+ extraRepeatCoordX = clamp(extraRepeatCoordX, uclamp_Stage1.x, uclamp_Stage1.z);
+ vec4 textureColor = mix(texture(uTextureSampler_0_Stage1, clampedCoord * unorm_Stage1.zw), texture(uTextureSampler_0_Stage1, vec2(extraRepeatCoordX, clampedCoord.y) * unorm_Stage1.zw), repeatCoordWeightX);
+ output_Stage1 = outputColor_Stage0 * textureColor;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec2 inLocalCoords;
+in vec4 color;
+flat out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vcolor_Stage0 = color;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoords, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/34-12.shader_test b/shaders/skia/34-12.shader_test
new file mode 100644
index 0000000..d837e13
--- /dev/null
+++ b/shaders/skia/34-12.shader_test
@@ -0,0 +1,64 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 usubset_Stage1;
+uniform vec4 uclamp_Stage1;
+uniform vec4 unorm_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+flat in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec2 inCoord = vTransformedCoords_0_Stage0;
+ inCoord *= unorm_Stage1.xy;
+ vec2 subsetCoord;
+ subsetCoord.x = mod(inCoord.x - usubset_Stage1.x, usubset_Stage1.z - usubset_Stage1.x) + usubset_Stage1.x;
+ {
+ float w = usubset_Stage1.w - usubset_Stage1.y;
+ float w2 = 2.0 * w;
+ float m = mod(inCoord.y - usubset_Stage1.y, w2);
+ subsetCoord.y = mix(m, w2 - m, step(w, m)) + usubset_Stage1.y;
+ }
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage1.x, uclamp_Stage1.z);
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage1.y, uclamp_Stage1.w);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord * unorm_Stage1.zw);
+ float errX = subsetCoord.x - clampedCoord.x;
+ float repeatCoordX = errX > 0.0 ? uclamp_Stage1.x : uclamp_Stage1.z;
+ if (errX != 0.0) {
+ textureColor = mix(textureColor, texture(uTextureSampler_0_Stage1, vec2(repeatCoordX, clampedCoord.y) * unorm_Stage1.zw), abs(errX));
+ }
+ output_Stage1 = outputColor_Stage0 * textureColor;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec2 inLocalCoords;
+in vec4 color;
+flat out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vcolor_Stage0 = color;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoords, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/34-14.shader_test b/shaders/skia/34-14.shader_test
new file mode 100644
index 0000000..15459fd
--- /dev/null
+++ b/shaders/skia/34-14.shader_test
@@ -0,0 +1,57 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 usubset_Stage1;
+uniform vec4 uclamp_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+flat in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec2 inCoord = vTransformedCoords_0_Stage0;
+ vec2 subsetCoord;
+ subsetCoord.x = mod(inCoord.x - usubset_Stage1.x, usubset_Stage1.z - usubset_Stage1.x) + usubset_Stage1.x;
+ {
+ float w = usubset_Stage1.w - usubset_Stage1.y;
+ float w2 = 2.0 * w;
+ float m = mod(inCoord.y - usubset_Stage1.y, w2);
+ subsetCoord.y = mix(m, w2 - m, step(w, m)) + usubset_Stage1.y;
+ }
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage1.x, uclamp_Stage1.z);
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage1.y, uclamp_Stage1.w);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ output_Stage1 = outputColor_Stage0 * textureColor;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec2 inLocalCoords;
+in vec4 color;
+flat out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vcolor_Stage0 = color;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoords, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/34-16.shader_test b/shaders/skia/34-16.shader_test
new file mode 100644
index 0000000..e49b43e
--- /dev/null
+++ b/shaders/skia/34-16.shader_test
@@ -0,0 +1,111 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 uscale01_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias01_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale23_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias23_Stage1_c0_c0_c1_c0;
+uniform float uthreshold_Stage1_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage2_c1_c0_c0_c0;
+uniform vec4 ucolor_Stage2_c2_c0_c0_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 RadialGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = length(vTransformedCoords_0_Stage0);
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 DualIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthreshold_Stage1_c0_c0_c1_c0) {
+ scale = uscale01_Stage1_c0_c0_c1_c0;
+ bias = ubias01_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale23_Stage1_c0_c0_c1_c0;
+ bias = ubias23_Stage1_c0_c0_c1_c0;
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = RadialGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = DualIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c1_c0_c0_c0;
+ }
+ return _output;
+}
+vec4 blend_dst_out(vec4 src, vec4 dst) {
+ return (1.0 - src.w) * dst;
+}
+vec4 ComposeOne_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_dst_out(ConstColorProcessor_Stage2_c1_c0_c0_c0(vec4(1.0)), _input);
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c2_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c2_c0_c0_c0;
+ }
+ return _output;
+}
+vec4 blend_xor(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src + (1.0 - src.w) * dst;
+}
+vec4 ComposeOne_Stage2_c2_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_xor(ConstColorProcessor_Stage2_c2_c0_c0_c0(vec4(1.0)), _input);
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = ComposeOne_Stage2_c2_c0(ComposeOne_Stage2_c1_c0(output_Stage1));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/34-17.shader_test b/shaders/skia/34-17.shader_test
new file mode 100644
index 0000000..d4a7ff1
--- /dev/null
+++ b/shaders/skia/34-17.shader_test
@@ -0,0 +1,128 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 uscale01_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias01_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale23_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias23_Stage1_c0_c0_c1_c0;
+uniform float uthreshold_Stage1_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage2_c1_c0_c0_c0;
+uniform vec4 ucolor_Stage2_c2_c0_c0_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 RadialGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = length(vTransformedCoords_0_Stage0);
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 DualIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthreshold_Stage1_c0_c0_c1_c0) {
+ scale = uscale01_Stage1_c0_c0_c1_c0;
+ bias = ubias01_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale23_Stage1_c0_c0_c1_c0;
+ bias = ubias23_Stage1_c0_c0_c1_c0;
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = RadialGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = DualIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c1_c0_c0_c0;
+ }
+ return _output;
+}
+float _guarded_divide(float n, float d) {
+ return n / d;
+}
+float _color_burn_component(float sc, float sa, float dc, float da) {
+ if (da == dc) {
+ return (sa * da + sc * (1.0 - da)) + dc * (1.0 - sa);
+ } else if (sc == 0.0) {
+ return dc * (1.0 - sa);
+ }
+ float d = max(0.0, da - _guarded_divide((da - dc) * sa, sc));
+ return (d * sa + sc * (1.0 - da)) + dc * (1.0 - sa);
+}
+vec4 blend_color_burn(vec4 src, vec4 dst) {
+ return vec4(_color_burn_component(src.x, src.w, dst.x, dst.w), _color_burn_component(src.y, src.w, dst.y, dst.w), _color_burn_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+}
+vec4 ComposeOne_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_color_burn(ConstColorProcessor_Stage2_c1_c0_c0_c0(vec4(1.0)), _input);
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c2_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c2_c0_c0_c0;
+ }
+ return _output;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 blend_darken(vec4 src, vec4 dst) {
+ vec4 result = blend_src_over(src, dst);
+ result.xyz = min(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
+ return result;
+}
+vec4 ComposeOne_Stage2_c2_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_darken(ConstColorProcessor_Stage2_c2_c0_c0_c0(vec4(1.0)), _input);
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = ComposeOne_Stage2_c2_c0(ComposeOne_Stage2_c1_c0(output_Stage1));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/34-18.shader_test b/shaders/skia/34-18.shader_test
new file mode 100644
index 0000000..45d17ea
--- /dev/null
+++ b/shaders/skia/34-18.shader_test
@@ -0,0 +1,82 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage0;
+noperspective in vec2 vTextureCoords_Stage0;
+flat in int vTexIndex_Stage0;
+noperspective in vec4 vinColor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ vec4 texColor;
+ {
+ texColor = texture(uTextureSampler_0_Stage0, vTextureCoords_Stage0);
+ }
+ outputCoverage_Stage0 = texColor;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1 * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform vec2 uAtlasSizeInv_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in uvec2 inTextureCoords;
+noperspective out vec2 vTextureCoords_Stage0;
+flat out int vTexIndex_Stage0;
+noperspective out vec4 vinColor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ ivec2 signedCoords = ivec2(int(inTextureCoords.x), int(inTextureCoords.y));
+ vec2 unormTexCoords = vec2(float(signedCoords.x / 2), float(signedCoords.y / 2));
+ vTextureCoords_Stage0 = unormTexCoords * uAtlasSizeInv_Stage0;
+ vTexIndex_Stage0 = 0;
+ vinColor_Stage0 = inColor;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(inPosition.x, inPosition.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/34-19.shader_test b/shaders/skia/34-19.shader_test
new file mode 100644
index 0000000..49a6df7
--- /dev/null
+++ b/shaders/skia/34-19.shader_test
@@ -0,0 +1,74 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_dst_in(outputColor_Stage0, ClampedGradientEffect_Stage1_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/34-2.shader_test b/shaders/skia/34-2.shader_test
new file mode 100644
index 0000000..5d85077
--- /dev/null
+++ b/shaders/skia/34-2.shader_test
@@ -0,0 +1,29 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uColor_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = uColor_Stage0;
+ }
+ {
+ sk_FragColor = outputColor_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 inPosition;
+void main() {
+ vec2 pos2 = inPosition;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/34-24.shader_test b/shaders/skia/34-24.shader_test
new file mode 100644
index 0000000..f0fc7e7
--- /dev/null
+++ b/shaders/skia/34-24.shader_test
@@ -0,0 +1,43 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uinnerRect_Stage1;
+uniform vec2 uradiusPlusHalf_Stage1;
+flat in vec4 vcolor_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec2 dxy = max(vec2(uinnerRect_Stage1.x - gl_FragCoord.x, gl_FragCoord.y - uinnerRect_Stage1.w), 0.0);
+ float rightAlpha = clamp(uinnerRect_Stage1.z - gl_FragCoord.x, 0.0, 1.0);
+ float topAlpha = clamp(gl_FragCoord.y - uinnerRect_Stage1.y, 0.0, 1.0);
+ float alpha = (topAlpha * rightAlpha) * clamp(uradiusPlusHalf_Stage1.x - length(dxy), 0.0, 1.0);
+ output_Stage1 = vec4(alpha);
+ }
+ {
+ sk_FragColor = outputColor_Stage0 * output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 position;
+in vec4 color;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/34-26.shader_test b/shaders/skia/34-26.shader_test
new file mode 100644
index 0000000..1fae7f6
--- /dev/null
+++ b/shaders/skia/34-26.shader_test
@@ -0,0 +1,52 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+noperspective in vec2 vEllipseOffsets0_Stage0;
+noperspective in vec2 vEllipseOffsets1_Stage0;
+noperspective in vec4 vinColor_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vinColor_Stage0;
+ vec2 scaledOffset = vEllipseOffsets0_Stage0;
+ float test = dot(scaledOffset, scaledOffset) - 1.0;
+ vec2 duvdx = dFdx(vEllipseOffsets0_Stage0);
+ vec2 duvdy = -dFdy(vEllipseOffsets0_Stage0);
+ vec2 grad = vec2(vEllipseOffsets0_Stage0.x * duvdx.x + vEllipseOffsets0_Stage0.y * duvdx.y, vEllipseOffsets0_Stage0.x * duvdy.x + vEllipseOffsets0_Stage0.y * duvdy.y);
+ float grad_dot = 4.0 * dot(grad, grad);
+ grad_dot = max(grad_dot, 1.1754999560161448e-38);
+ float invlen = inversesqrt(grad_dot);
+ float edgeAlpha = clamp(0.5 - test * invlen, 0.0, 1.0);
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ {
+ sk_FragColor = outputColor_Stage0 * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec2 inEllipseOffsets0;
+in vec2 inEllipseOffsets1;
+noperspective out vec2 vEllipseOffsets0_Stage0;
+noperspective out vec2 vEllipseOffsets1_Stage0;
+noperspective out vec4 vinColor_Stage0;
+void main() {
+ vEllipseOffsets0_Stage0 = inEllipseOffsets0;
+ vEllipseOffsets1_Stage0 = inEllipseOffsets1;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = (uViewM_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/34-27.shader_test b/shaders/skia/34-27.shader_test
new file mode 100644
index 0000000..901c4ba
--- /dev/null
+++ b/shaders/skia/34-27.shader_test
@@ -0,0 +1,41 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform float uPixelSize_Stage1;
+uniform vec2 uRange_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = vec4(1.0, 1.0, 1.0, 1.0);
+ vec2 coord = vTransformedCoords_0_Stage0;
+ coord.y -= 2.0 * uPixelSize_Stage1;
+ for (int i = 0;i < 5; i++) {
+ output_Stage1 = min(output_Stage1, texture(uTextureSampler_0_Stage1, coord));
+ coord.y += uPixelSize_Stage1;
+ }
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/34-28.shader_test b/shaders/skia/34-28.shader_test
new file mode 100644
index 0000000..18ea482
--- /dev/null
+++ b/shaders/skia/34-28.shader_test
@@ -0,0 +1,63 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/34-29.shader_test b/shaders/skia/34-29.shader_test
new file mode 100644
index 0000000..0ea6ed2
--- /dev/null
+++ b/shaders/skia/34-29.shader_test
@@ -0,0 +1,44 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform float uPixelSize_Stage1;
+uniform vec2 uRange_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0;
+ coord.x -= 8.0 * uPixelSize_Stage1;
+ float highBound = min(uRange_Stage1.y, coord.x + 16.0 * uPixelSize_Stage1);
+ coord.x = max(uRange_Stage1.x, coord.x);
+ for (int i = 0;i < 17; i++) {
+ output_Stage1 = max(output_Stage1, texture(uTextureSampler_0_Stage1, coord));
+ coord.x += uPixelSize_Stage1;
+ coord.x = min(highBound, coord.x);
+ }
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/34-30.shader_test b/shaders/skia/34-30.shader_test
new file mode 100644
index 0000000..005872a
--- /dev/null
+++ b/shaders/skia/34-30.shader_test
@@ -0,0 +1,135 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform float uSurfaceScale_Stage1;
+uniform vec3 uLightColor_Stage1;
+uniform float uKD_Stage1;
+uniform vec3 uLightDirection_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 light_Stage1(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ float colorScale = uKD_Stage1 * dot(normal, surfaceToLight);
+ return vec4(lightColor * clamp(colorScale, 0.0, 1.0), 1.0);
+}
+float sobel_Stage1(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage1(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage1(float m[9], float surfaceScale) {
+ return pointToNormal_Stage1(sobel_Stage1(0.0, 0.0, m[4], m[5], m[7], m[8], 0.66666698455810547), sobel_Stage1(0.0, 0.0, m[4], m[7], m[5], m[8], 0.66666698455810547), surfaceScale);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ vec2 coord = vTransformedCoords_0_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp0 = textureColor;
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp1 = textureColor;
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp2 = textureColor;
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp3 = textureColor;
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp4 = textureColor;
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp5 = textureColor;
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp6 = textureColor;
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp7 = textureColor;
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp8 = textureColor;
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = uLightDirection_Stage1;
+ output_Stage1 = light_Stage1(normal_Stage1(m, uSurfaceScale_Stage1), surfaceToLight, uLightColor_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/34-31.shader_test b/shaders/skia/34-31.shader_test
new file mode 100644
index 0000000..c3adc3e
--- /dev/null
+++ b/shaders/skia/34-31.shader_test
@@ -0,0 +1,67 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec2 uDstTextureUpperLeft_Stage1;
+uniform vec2 uDstTextureCoordScale_Stage1;
+uniform sampler2D uTextureSampler_0_Stage0;
+uniform sampler2D uDstTextureSampler_Stage1;
+noperspective in vec2 vTextureCoords_Stage0;
+flat in int vTexIndex_Stage0;
+noperspective in vec4 vinColor_Stage0;
+vec4 blend_src_atop(vec4 src, vec4 dst) {
+ return dst.w * src + (1.0 - src.w) * dst;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vinColor_Stage0;
+ vec4 texColor;
+ {
+ texColor = texture(uTextureSampler_0_Stage0, vTextureCoords_Stage0);
+ }
+ outputCoverage_Stage0 = texColor;
+ }
+ {
+ if (all(lessThanEqual(outputCoverage_Stage0.xyz, vec3(0.0)))) {
+ discard;
+ }
+ vec2 _dstTexCoord = (gl_FragCoord.xy - uDstTextureUpperLeft_Stage1) * uDstTextureCoordScale_Stage1;
+ _dstTexCoord.y = 1.0 - _dstTexCoord.y;
+ vec4 _dstColor = texture(uDstTextureSampler_Stage1, _dstTexCoord);
+ sk_FragColor = blend_src_atop(outputColor_Stage0, _dstColor);
+ float lerpRed = mix(_dstColor.w, sk_FragColor.w, outputCoverage_Stage0.x);
+ float lerpBlue = mix(_dstColor.w, sk_FragColor.w, outputCoverage_Stage0.y);
+ float lerpGreen = mix(_dstColor.w, sk_FragColor.w, outputCoverage_Stage0.z);
+ sk_FragColor = outputCoverage_Stage0 * sk_FragColor + (vec4(1.0) - outputCoverage_Stage0) * _dstColor;
+ sk_FragColor.w = max(max(lerpRed, lerpBlue), lerpGreen);
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform vec2 uAtlasSizeInv_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in uvec2 inTextureCoords;
+noperspective out vec2 vTextureCoords_Stage0;
+flat out int vTexIndex_Stage0;
+noperspective out vec4 vinColor_Stage0;
+void main() {
+ ivec2 signedCoords = ivec2(int(inTextureCoords.x), int(inTextureCoords.y));
+ vec2 unormTexCoords = vec2(float(signedCoords.x / 2), float(signedCoords.y / 2));
+ vTextureCoords_Stage0 = unormTexCoords * uAtlasSizeInv_Stage0;
+ vTexIndex_Stage0 = 0;
+ vinColor_Stage0 = inColor;
+ gl_Position = vec4(inPosition.x, inPosition.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/34-32.shader_test b/shaders/skia/34-32.shader_test
new file mode 100644
index 0000000..9d46c3e
--- /dev/null
+++ b/shaders/skia/34-32.shader_test
@@ -0,0 +1,114 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform vec2 uBounds_Stage1;
+uniform vec4 uKernel_Stage1[5];
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0 - 9.0 * uImageIncrement_Stage1;
+ vec2 coordSampled = vec2(0.0, 0.0);
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[4].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[4].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[4].z;
+ coord += uImageIncrement_Stage1;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/34-36.shader_test b/shaders/skia/34-36.shader_test
new file mode 100644
index 0000000..345f7e7
--- /dev/null
+++ b/shaders/skia/34-36.shader_test
@@ -0,0 +1,78 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform mat3 ucolorSpaceMatrix_Stage1;
+uniform vec3 ucolorSpaceTranslate_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+uniform sampler2D uTextureSampler_2_Stage1;
+uniform sampler2D uTextureSampler_3_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+noperspective in vec2 vTransformedCoords_3_Stage0;
+vec4 TextureEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_1_Stage1, vTransformedCoords_1_Stage0) * _input;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c2_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_2_Stage1, vTransformedCoords_2_Stage0) * _input;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c3_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_3_Stage1, vTransformedCoords_3_Stage0) * _input;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ vec4 planes[4];
+ planes[0] = TextureEffect_Stage1_c0_c0(vec4(1.0));
+ planes[1] = TextureEffect_Stage1_c1_c0(vec4(1.0));
+ planes[2] = TextureEffect_Stage1_c2_c0(vec4(1.0));
+ planes[3] = TextureEffect_Stage1_c3_c0(vec4(1.0));
+ vec4 color = vec4(planes[0].x, planes[1].x, planes[2].x, planes[3].x);
+ color.xyz = clamp(color.xyz * ucolorSpaceMatrix_Stage1 + ucolorSpaceTranslate_Stage1, 0.0, 1.0);
+ color.xyz *= color.w;
+ output_Stage1 = color;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+uniform mat3 uCoordTransformMatrix_3_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+noperspective out vec2 vTransformedCoords_3_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_3_Stage0 = (uCoordTransformMatrix_3_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/34-4.shader_test b/shaders/skia/34-4.shader_test
new file mode 100644
index 0000000..010ecb0
--- /dev/null
+++ b/shaders/skia/34-4.shader_test
@@ -0,0 +1,50 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 TextureEffect_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage2, vTransformedCoords_1_Stage0) * _input;
+ return _output;
+}
+vec4 blend_dst_atop(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src + src.w * dst;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_dst_atop(output_Stage1, TextureEffect_Stage2_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/34-40.shader_test b/shaders/skia/34-40.shader_test
new file mode 100644
index 0000000..f006b7c
--- /dev/null
+++ b/shaders/skia/34-40.shader_test
@@ -0,0 +1,44 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform float uPixelSize_Stage1;
+uniform vec2 uRange_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0;
+ coord.x -= 5.0 * uPixelSize_Stage1;
+ float highBound = min(uRange_Stage1.y, coord.x + 10.0 * uPixelSize_Stage1);
+ coord.x = max(uRange_Stage1.x, coord.x);
+ for (int i = 0;i < 11; i++) {
+ output_Stage1 = max(output_Stage1, texture(uTextureSampler_0_Stage1, coord));
+ coord.x += uPixelSize_Stage1;
+ coord.x = min(highBound, coord.x);
+ }
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/34-46.shader_test b/shaders/skia/34-46.shader_test
new file mode 100644
index 0000000..9b99f9b
--- /dev/null
+++ b/shaders/skia/34-46.shader_test
@@ -0,0 +1,138 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform vec2 uBounds_Stage1;
+uniform vec4 uKernel_Stage1[7];
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0 - 12.0 * uImageIncrement_Stage1;
+ vec2 coordSampled = vec2(0.0, 0.0);
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1.x, uBounds_Stage1.y - uBounds_Stage1.x) + uBounds_Stage1.x;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1.x, uBounds_Stage1.y - uBounds_Stage1.x) + uBounds_Stage1.x;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1.x, uBounds_Stage1.y - uBounds_Stage1.x) + uBounds_Stage1.x;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1.x, uBounds_Stage1.y - uBounds_Stage1.x) + uBounds_Stage1.x;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1.x, uBounds_Stage1.y - uBounds_Stage1.x) + uBounds_Stage1.x;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1.x, uBounds_Stage1.y - uBounds_Stage1.x) + uBounds_Stage1.x;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1.x, uBounds_Stage1.y - uBounds_Stage1.x) + uBounds_Stage1.x;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1.x, uBounds_Stage1.y - uBounds_Stage1.x) + uBounds_Stage1.x;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1.x, uBounds_Stage1.y - uBounds_Stage1.x) + uBounds_Stage1.x;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1.x, uBounds_Stage1.y - uBounds_Stage1.x) + uBounds_Stage1.x;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1.x, uBounds_Stage1.y - uBounds_Stage1.x) + uBounds_Stage1.x;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1.x, uBounds_Stage1.y - uBounds_Stage1.x) + uBounds_Stage1.x;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1.x, uBounds_Stage1.y - uBounds_Stage1.x) + uBounds_Stage1.x;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1.x, uBounds_Stage1.y - uBounds_Stage1.x) + uBounds_Stage1.x;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1.x, uBounds_Stage1.y - uBounds_Stage1.x) + uBounds_Stage1.x;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1.x, uBounds_Stage1.y - uBounds_Stage1.x) + uBounds_Stage1.x;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1.x, uBounds_Stage1.y - uBounds_Stage1.x) + uBounds_Stage1.x;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[4].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1.x, uBounds_Stage1.y - uBounds_Stage1.x) + uBounds_Stage1.x;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[4].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1.x, uBounds_Stage1.y - uBounds_Stage1.x) + uBounds_Stage1.x;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[4].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1.x, uBounds_Stage1.y - uBounds_Stage1.x) + uBounds_Stage1.x;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[4].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1.x, uBounds_Stage1.y - uBounds_Stage1.x) + uBounds_Stage1.x;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[5].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1.x, uBounds_Stage1.y - uBounds_Stage1.x) + uBounds_Stage1.x;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[5].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1.x, uBounds_Stage1.y - uBounds_Stage1.x) + uBounds_Stage1.x;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[5].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1.x, uBounds_Stage1.y - uBounds_Stage1.x) + uBounds_Stage1.x;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[5].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1.x, uBounds_Stage1.y - uBounds_Stage1.x) + uBounds_Stage1.x;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[6].x;
+ coord += uImageIncrement_Stage1;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/34-49.shader_test b/shaders/skia/34-49.shader_test
new file mode 100644
index 0000000..f825296
--- /dev/null
+++ b/shaders/skia/34-49.shader_test
@@ -0,0 +1,54 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec2 uDstTextureUpperLeft_Stage1;
+uniform vec2 uDstTextureCoordScale_Stage1;
+uniform sampler2D uDstTextureSampler_Stage1;
+flat in vec4 vcolor_Stage0;
+noperspective in float vcoverage_Stage0;
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ float coverage = vcoverage_Stage0;
+ outputCoverage_Stage0 = vec4(coverage);
+ }
+ {
+ if (all(lessThanEqual(outputCoverage_Stage0.xyz, vec3(0.0)))) {
+ discard;
+ }
+ vec2 _dstTexCoord = (gl_FragCoord.xy - uDstTextureUpperLeft_Stage1) * uDstTextureCoordScale_Stage1;
+ _dstTexCoord.y = 1.0 - _dstTexCoord.y;
+ vec4 _dstColor = texture(uDstTextureSampler_Stage1, _dstTexCoord);
+ sk_FragColor = blend_src_in(outputColor_Stage0, _dstColor);
+ sk_FragColor = outputCoverage_Stage0 * sk_FragColor + (vec4(1.0) - outputCoverage_Stage0) * _dstColor;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 position;
+in float coverage;
+in vec4 color;
+flat out vec4 vcolor_Stage0;
+noperspective out float vcoverage_Stage0;
+void main() {
+ vec2 position = position;
+ vcolor_Stage0 = color;
+ vcoverage_Stage0 = coverage;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/34-5.shader_test b/shaders/skia/34-5.shader_test
new file mode 100644
index 0000000..a20b21e
--- /dev/null
+++ b/shaders/skia/34-5.shader_test
@@ -0,0 +1,82 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uclamp_Stage1_c0_c0_c0_c0;
+uniform vec4 uclamp_Stage1_c0_c0_c1_c0;
+uniform mat3 ucolorSpaceMatrix_Stage1_c0_c0;
+uniform vec3 ucolorSpaceTranslate_Stage1_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 inCoord = vTransformedCoords_0_Stage0;
+ vec2 subsetCoord;
+ subsetCoord.x = inCoord.x;
+ subsetCoord.y = inCoord.y;
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage1_c0_c0_c0_c0.x, uclamp_Stage1_c0_c0_c0_c0.z);
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage1_c0_c0_c0_c0.y, uclamp_Stage1_c0_c0_c0_c0.w);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ _output = _input * textureColor;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 inCoord = vTransformedCoords_1_Stage0;
+ vec2 subsetCoord;
+ subsetCoord.x = inCoord.x;
+ subsetCoord.y = inCoord.y;
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage1_c0_c0_c1_c0.x, uclamp_Stage1_c0_c0_c1_c0.z);
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage1_c0_c0_c1_c0.y, uclamp_Stage1_c0_c0_c1_c0.w);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ _output = _input * textureColor;
+ return _output;
+}
+vec4 YUVtoRGBEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 planes[2];
+ planes[0] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0));
+ planes[1] = TextureEffect_Stage1_c0_c0_c1_c0(vec4(1.0));
+ vec4 color = vec4(planes[0].x, planes[1].x, planes[1].y, 1.0);
+ color.xyz = clamp(color.xyz * ucolorSpaceMatrix_Stage1_c0_c0 + ucolorSpaceTranslate_Stage1_c0_c0, 0.0, 1.0);
+ _output = color;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = YUVtoRGBEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/34-52.shader_test b/shaders/skia/34-52.shader_test
new file mode 100644
index 0000000..28a98e1
--- /dev/null
+++ b/shaders/skia/34-52.shader_test
@@ -0,0 +1,103 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_1_Stage0.x);
+ uint y = uint(vTransformedCoords_1_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ output_Stage2 = vec4(clamp(output_Stage2.xyz + value * 0.0039215688593685627, 0.0, output_Stage2.w), output_Stage2.w);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/34-53.shader_test b/shaders/skia/34-53.shader_test
new file mode 100644
index 0000000..e7cae2c
--- /dev/null
+++ b/shaders/skia/34-53.shader_test
@@ -0,0 +1,92 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 RadialGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = length(vTransformedCoords_0_Stage0);
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = RadialGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/34-54.shader_test b/shaders/skia/34-54.shader_test
new file mode 100644
index 0000000..351accc
--- /dev/null
+++ b/shaders/skia/34-54.shader_test
@@ -0,0 +1,122 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_0_Stage0;
+ float t = -1.0;
+ float v = 1.0;
+ {
+ {
+ float invR1 = ufocalParams_Stage1_c0_c0_c0_c0.x;
+ float fx = ufocalParams_Stage1_c0_c0_c0_c0.y;
+ float x_t = -1.0;
+ {
+ float temp = p.x * p.x - p.y * p.y;
+ if (temp >= 0.0) {
+ {
+ x_t = -sqrt(temp) - p.x * invR1;
+ }
+ }
+ }
+ {
+ if (x_t <= 0.0) {
+ v = -1.0;
+ }
+ }
+ {
+ {
+ t = -x_t + fx;
+ }
+ }
+ }
+ }
+ _output = vec4(t, v, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/34-55.shader_test b/shaders/skia/34-55.shader_test
new file mode 100644
index 0000000..bcee8c6
--- /dev/null
+++ b/shaders/skia/34-55.shader_test
@@ -0,0 +1,108 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_0_Stage0;
+ float t = -1.0;
+ {
+ {
+ float invR1 = ufocalParams_Stage1_c0_c0_c0_c0.x;
+ float x_t = -1.0;
+ {
+ x_t = length(p) - p.x * invR1;
+ }
+ {
+ {
+ t = x_t;
+ }
+ }
+ {
+ t = 1.0 - t;
+ }
+ }
+ }
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/34-56.shader_test b/shaders/skia/34-56.shader_test
new file mode 100644
index 0000000..3e1df70
--- /dev/null
+++ b/shaders/skia/34-56.shader_test
@@ -0,0 +1,107 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 RadialGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = length(vTransformedCoords_0_Stage0);
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = RadialGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TiledGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_1_Stage0.x);
+ uint y = uint(vTransformedCoords_1_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ output_Stage2 = vec4(clamp(output_Stage2.xyz + value * 0.0039215688593685627, 0.0, output_Stage2.w), output_Stage2.w);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/34-57.shader_test b/shaders/skia/34-57.shader_test
new file mode 100644
index 0000000..a46c00c
--- /dev/null
+++ b/shaders/skia/34-57.shader_test
@@ -0,0 +1,137 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_0_Stage0;
+ float t = -1.0;
+ float v = 1.0;
+ {
+ {
+ float invR1 = ufocalParams_Stage1_c0_c0_c0_c0.x;
+ float fx = ufocalParams_Stage1_c0_c0_c0_c0.y;
+ float x_t = -1.0;
+ {
+ float temp = p.x * p.x - p.y * p.y;
+ if (temp >= 0.0) {
+ {
+ x_t = -sqrt(temp) - p.x * invR1;
+ }
+ }
+ }
+ {
+ if (x_t <= 0.0) {
+ v = -1.0;
+ }
+ }
+ {
+ {
+ t = -x_t + fx;
+ }
+ }
+ }
+ }
+ _output = vec4(t, v, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TiledGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_1_Stage0.x);
+ uint y = uint(vTransformedCoords_1_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ output_Stage2 = vec4(clamp(output_Stage2.xyz + value * 0.0039215688593685627, 0.0, output_Stage2.w), output_Stage2.w);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/34-58.shader_test b/shaders/skia/34-58.shader_test
new file mode 100644
index 0000000..aee0b23
--- /dev/null
+++ b/shaders/skia/34-58.shader_test
@@ -0,0 +1,123 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_0_Stage0;
+ float t = -1.0;
+ {
+ {
+ float invR1 = ufocalParams_Stage1_c0_c0_c0_c0.x;
+ float x_t = -1.0;
+ {
+ x_t = length(p) - p.x * invR1;
+ }
+ {
+ {
+ t = x_t;
+ }
+ }
+ {
+ t = 1.0 - t;
+ }
+ }
+ }
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TiledGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_1_Stage0.x);
+ uint y = uint(vTransformedCoords_1_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ output_Stage2 = vec4(clamp(output_Stage2.xyz + value * 0.0039215688593685627, 0.0, output_Stage2.w), output_Stage2.w);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/34-59.shader_test b/shaders/skia/34-59.shader_test
new file mode 100644
index 0000000..dfd3037
--- /dev/null
+++ b/shaders/skia/34-59.shader_test
@@ -0,0 +1,105 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 RadialGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = length(vTransformedCoords_0_Stage0);
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = RadialGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ t.x = fract(t.x);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TiledGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_1_Stage0.x);
+ uint y = uint(vTransformedCoords_1_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ output_Stage2 = vec4(clamp(output_Stage2.xyz + value * 0.0039215688593685627, 0.0, output_Stage2.w), output_Stage2.w);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/34-6.shader_test b/shaders/skia/34-6.shader_test
new file mode 100644
index 0000000..cbea48f
--- /dev/null
+++ b/shaders/skia/34-6.shader_test
@@ -0,0 +1,55 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform mat3 ucolorSpaceMatrix_Stage1;
+uniform vec3 ucolorSpaceTranslate_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 TextureEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_1_Stage1, vTransformedCoords_1_Stage0) * _input;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ vec4 planes[2];
+ planes[0] = TextureEffect_Stage1_c0_c0(vec4(1.0));
+ planes[1] = TextureEffect_Stage1_c1_c0(vec4(1.0));
+ vec4 color = vec4(planes[0].w, planes[1].x, planes[1].y, 1.0);
+ color.xyz = clamp(color.xyz * ucolorSpaceMatrix_Stage1 + ucolorSpaceTranslate_Stage1, 0.0, 1.0);
+ output_Stage1 = color;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/34-60.shader_test b/shaders/skia/34-60.shader_test
new file mode 100644
index 0000000..f123576
--- /dev/null
+++ b/shaders/skia/34-60.shader_test
@@ -0,0 +1,135 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_0_Stage0;
+ float t = -1.0;
+ float v = 1.0;
+ {
+ {
+ float invR1 = ufocalParams_Stage1_c0_c0_c0_c0.x;
+ float fx = ufocalParams_Stage1_c0_c0_c0_c0.y;
+ float x_t = -1.0;
+ {
+ float temp = p.x * p.x - p.y * p.y;
+ if (temp >= 0.0) {
+ {
+ x_t = -sqrt(temp) - p.x * invR1;
+ }
+ }
+ }
+ {
+ if (x_t <= 0.0) {
+ v = -1.0;
+ }
+ }
+ {
+ {
+ t = -x_t + fx;
+ }
+ }
+ }
+ }
+ _output = vec4(t, v, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else {
+ {
+ t.x = fract(t.x);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TiledGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_1_Stage0.x);
+ uint y = uint(vTransformedCoords_1_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ output_Stage2 = vec4(clamp(output_Stage2.xyz + value * 0.0039215688593685627, 0.0, output_Stage2.w), output_Stage2.w);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/34-61.shader_test b/shaders/skia/34-61.shader_test
new file mode 100644
index 0000000..f1d1750
--- /dev/null
+++ b/shaders/skia/34-61.shader_test
@@ -0,0 +1,121 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_0_Stage0;
+ float t = -1.0;
+ {
+ {
+ float invR1 = ufocalParams_Stage1_c0_c0_c0_c0.x;
+ float x_t = -1.0;
+ {
+ x_t = length(p) - p.x * invR1;
+ }
+ {
+ {
+ t = x_t;
+ }
+ }
+ {
+ t = 1.0 - t;
+ }
+ }
+ }
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else {
+ {
+ t.x = fract(t.x);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TiledGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_1_Stage0.x);
+ uint y = uint(vTransformedCoords_1_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ output_Stage2 = vec4(clamp(output_Stage2.xyz + value * 0.0039215688593685627, 0.0, output_Stage2.w), output_Stage2.w);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/34-62.shader_test b/shaders/skia/34-62.shader_test
new file mode 100644
index 0000000..ffd99e0
--- /dev/null
+++ b/shaders/skia/34-62.shader_test
@@ -0,0 +1,108 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 RadialGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = length(vTransformedCoords_0_Stage0);
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = RadialGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_1_Stage0.x);
+ uint y = uint(vTransformedCoords_1_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ output_Stage2 = vec4(clamp(output_Stage2.xyz + value * 0.0039215688593685627, 0.0, output_Stage2.w), output_Stage2.w);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/34-63.shader_test b/shaders/skia/34-63.shader_test
new file mode 100644
index 0000000..5de8900
--- /dev/null
+++ b/shaders/skia/34-63.shader_test
@@ -0,0 +1,138 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_0_Stage0;
+ float t = -1.0;
+ float v = 1.0;
+ {
+ {
+ float invR1 = ufocalParams_Stage1_c0_c0_c0_c0.x;
+ float fx = ufocalParams_Stage1_c0_c0_c0_c0.y;
+ float x_t = -1.0;
+ {
+ float temp = p.x * p.x - p.y * p.y;
+ if (temp >= 0.0) {
+ {
+ x_t = -sqrt(temp) - p.x * invR1;
+ }
+ }
+ }
+ {
+ if (x_t <= 0.0) {
+ v = -1.0;
+ }
+ }
+ {
+ {
+ t = -x_t + fx;
+ }
+ }
+ }
+ }
+ _output = vec4(t, v, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_1_Stage0.x);
+ uint y = uint(vTransformedCoords_1_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ output_Stage2 = vec4(clamp(output_Stage2.xyz + value * 0.0039215688593685627, 0.0, output_Stage2.w), output_Stage2.w);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/34-64.shader_test b/shaders/skia/34-64.shader_test
new file mode 100644
index 0000000..4601676
--- /dev/null
+++ b/shaders/skia/34-64.shader_test
@@ -0,0 +1,124 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_0_Stage0;
+ float t = -1.0;
+ {
+ {
+ float invR1 = ufocalParams_Stage1_c0_c0_c0_c0.x;
+ float x_t = -1.0;
+ {
+ x_t = length(p) - p.x * invR1;
+ }
+ {
+ {
+ t = x_t;
+ }
+ }
+ {
+ t = 1.0 - t;
+ }
+ }
+ }
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_1_Stage0.x);
+ uint y = uint(vTransformedCoords_1_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ output_Stage2 = vec4(clamp(output_Stage2.xyz + value * 0.0039215688593685627, 0.0, output_Stage2.w), output_Stage2.w);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/34-65.shader_test b/shaders/skia/34-65.shader_test
new file mode 100644
index 0000000..9a166c5
--- /dev/null
+++ b/shaders/skia/34-65.shader_test
@@ -0,0 +1,114 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+in float vcoverage_Stage0;
+flat in vec4 vgeomDomain_Stage0;
+vec4 RadialGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = length(vTransformedCoords_0_Stage0);
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = RadialGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ float coverage = vcoverage_Stage0 * gl_FragCoord.w;
+ vec4 geoDomain;
+ geoDomain = vgeomDomain_Stage0;
+ if (coverage < 0.5) {
+ vec4 dists4 = clamp(vec4(1.0, 1.0, -1.0, -1.0) * (gl_FragCoord.xyxy - geoDomain), 0.0, 1.0);
+ vec2 dists2 = dists4.xy * dists4.zw;
+ coverage = min(coverage, dists2.x * dists2.y);
+ }
+ outputCoverage_Stage0 = vec4(coverage);
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1 * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec4 positionWithCoverage;
+in vec4 color;
+in vec2 localCoord;
+in vec4 geomDomain;
+out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+out float vcoverage_Stage0;
+flat out vec4 vgeomDomain_Stage0;
+void main() {
+ vec3 position = positionWithCoverage.xyz;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ vcoverage_Stage0 = positionWithCoverage.w * positionWithCoverage.z;
+ vgeomDomain_Stage0 = geomDomain;
+ gl_Position = vec4(position.x, position.y, 0.0, position.z);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/34-66.shader_test b/shaders/skia/34-66.shader_test
new file mode 100644
index 0000000..59c2087
--- /dev/null
+++ b/shaders/skia/34-66.shader_test
@@ -0,0 +1,130 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+in vec2 vTransformedCoords_0_Stage0;
+in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+in float vcoverage_Stage0;
+flat in vec4 vgeomDomain_Stage0;
+vec4 RadialGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = length(vTransformedCoords_0_Stage0);
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = RadialGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ float coverage = vcoverage_Stage0 * gl_FragCoord.w;
+ vec4 geoDomain;
+ geoDomain = vgeomDomain_Stage0;
+ if (coverage < 0.5) {
+ vec4 dists4 = clamp(vec4(1.0, 1.0, -1.0, -1.0) * (gl_FragCoord.xyxy - geoDomain), 0.0, 1.0);
+ vec2 dists2 = dists4.xy * dists4.zw;
+ coverage = min(coverage, dists2.x * dists2.y);
+ }
+ outputCoverage_Stage0 = vec4(coverage);
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_1_Stage0.x);
+ uint y = uint(vTransformedCoords_1_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ output_Stage2 = vec4(clamp(output_Stage2.xyz + value * 0.0039215688593685627, 0.0, output_Stage2.w), output_Stage2.w);
+ }
+ {
+ sk_FragColor = output_Stage2 * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec4 positionWithCoverage;
+in vec4 color;
+in vec2 localCoord;
+in vec4 geomDomain;
+out vec2 vTransformedCoords_0_Stage0;
+out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+out float vcoverage_Stage0;
+flat out vec4 vgeomDomain_Stage0;
+void main() {
+ vec3 position = positionWithCoverage.xyz;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ vcoverage_Stage0 = positionWithCoverage.w * positionWithCoverage.z;
+ vgeomDomain_Stage0 = geomDomain;
+ gl_Position = vec4(position.x, position.y, 0.0, position.z);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/34-67.shader_test b/shaders/skia/34-67.shader_test
new file mode 100644
index 0000000..dcb3ee5
--- /dev/null
+++ b/shaders/skia/34-67.shader_test
@@ -0,0 +1,93 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+noperspective in vec3 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 RadialGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 vTransformedCoords_0_Stage0_ensure2D = vTransformedCoords_0_Stage0.xy / vTransformedCoords_0_Stage0.z;
+ float t = length(vTransformedCoords_0_Stage0_ensure2D);
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = RadialGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec3 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0);
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/34-68.shader_test b/shaders/skia/34-68.shader_test
new file mode 100644
index 0000000..dfe3156
--- /dev/null
+++ b/shaders/skia/34-68.shader_test
@@ -0,0 +1,109 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+noperspective in vec3 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 RadialGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 vTransformedCoords_0_Stage0_ensure2D = vTransformedCoords_0_Stage0.xy / vTransformedCoords_0_Stage0.z;
+ float t = length(vTransformedCoords_0_Stage0_ensure2D);
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = RadialGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_1_Stage0.x);
+ uint y = uint(vTransformedCoords_1_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ output_Stage2 = vec4(clamp(output_Stage2.xyz + value * 0.0039215688593685627, 0.0, output_Stage2.w), output_Stage2.w);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec3 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0);
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/34-7.shader_test b/shaders/skia/34-7.shader_test
new file mode 100644
index 0000000..8c47dfa
--- /dev/null
+++ b/shaders/skia/34-7.shader_test
@@ -0,0 +1,75 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform mat3 ucolorSpaceMatrix_Stage1_c0_c0;
+uniform vec3 ucolorSpaceTranslate_Stage1_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+uniform sampler2D uTextureSampler_2_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_1_Stage1, vTransformedCoords_1_Stage0) * _input;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c0_c0_c2_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_2_Stage1, vTransformedCoords_2_Stage0) * _input;
+ return _output;
+}
+vec4 YUVtoRGBEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 planes[3];
+ planes[0] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0));
+ planes[1] = TextureEffect_Stage1_c0_c0_c1_c0(vec4(1.0));
+ planes[2] = TextureEffect_Stage1_c0_c0_c2_c0(vec4(1.0));
+ vec4 color = vec4(planes[0].x, planes[2].x, planes[1].x, 1.0);
+ color.xyz = clamp(color.xyz * ucolorSpaceMatrix_Stage1_c0_c0 + ucolorSpaceTranslate_Stage1_c0_c0, 0.0, 1.0);
+ _output = color;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = YUVtoRGBEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/34-75.shader_test b/shaders/skia/34-75.shader_test
new file mode 100644
index 0000000..da5ccac
--- /dev/null
+++ b/shaders/skia/34-75.shader_test
@@ -0,0 +1,55 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uinnerRect_Stage1;
+uniform vec2 uradiusPlusHalf_Stage1;
+uniform vec4 ucircle_Stage2;
+flat in vec4 vcolor_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec2 dxy0 = uinnerRect_Stage1.xy - gl_FragCoord.xy;
+ vec2 dxy1 = gl_FragCoord.xy - uinnerRect_Stage1.zw;
+ vec2 dxy = max(max(dxy0, dxy1), 0.0);
+ float alpha = clamp(uradiusPlusHalf_Stage1.x - length(dxy), 0.0, 1.0);
+ alpha = 1.0 - alpha;
+ output_Stage1 = vec4(alpha);
+ }
+ vec4 output_Stage2;
+ {
+ float d;
+ {
+ d = (1.0 - length((ucircle_Stage2.xy - gl_FragCoord.xy) * ucircle_Stage2.w)) * ucircle_Stage2.z;
+ }
+ {
+ output_Stage2 = output_Stage1 * clamp(d, 0.0, 1.0);
+ }
+ }
+ {
+ sk_FragColor = outputColor_Stage0 * output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 position;
+in vec4 color;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/34-78.shader_test b/shaders/skia/34-78.shader_test
new file mode 100644
index 0000000..fca3bcc
--- /dev/null
+++ b/shaders/skia/34-78.shader_test
@@ -0,0 +1,67 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 TextureEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = TextureEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = OverrideInputFragmentProcessor_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 blend_src_atop(vec4 src, vec4 dst) {
+ return dst.w * src + (1.0 - src.w) * dst;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_src_atop(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec2 inLocalCoord;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 color = inColor;
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/34-79.shader_test b/shaders/skia/34-79.shader_test
new file mode 100644
index 0000000..065e06c
--- /dev/null
+++ b/shaders/skia/34-79.shader_test
@@ -0,0 +1,84 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 ucolor_Stage2_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 TextureEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = TextureEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = OverrideInputFragmentProcessor_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c1_c0;
+ }
+ return _output;
+}
+vec4 blend_plus(vec4 src, vec4 dst) {
+ return min(src + dst, 1.0);
+}
+vec4 blend_modulate(vec4 src, vec4 dst) {
+ return src * dst;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_plus(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_modulate(ConstColorProcessor_Stage2_c1_c0(vec4(1.0)), output_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 inColor;
+in vec2 inLocalCoord;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/34-81.shader_test b/shaders/skia/34-81.shader_test
new file mode 100644
index 0000000..2dd70df
--- /dev/null
+++ b/shaders/skia/34-81.shader_test
@@ -0,0 +1,44 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 urectUniform_Stage1;
+flat in vec4 vcolor_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ float alpha;
+ {
+ alpha = float(all(greaterThan(vec4(gl_FragCoord.xy, urectUniform_Stage1.zw), vec4(urectUniform_Stage1.xy, gl_FragCoord.xy))) ? 1 : 0);
+ }
+ output_Stage1 = vec4(alpha);
+ }
+ {
+ sk_FragColor = outputColor_Stage0 * output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 inPosition;
+in vec2 inLocalCoords;
+in vec4 color;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vcolor_Stage0 = color;
+ vec2 pos2 = inPosition;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/34-83.shader_test b/shaders/skia/34-83.shader_test
new file mode 100644
index 0000000..7abf901
--- /dev/null
+++ b/shaders/skia/34-83.shader_test
@@ -0,0 +1,115 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage2_c1_c0_c0_c0;
+uniform vec4 urightBorderColor_Stage2_c1_c0_c0_c0;
+uniform vec4 ustart_Stage2_c1_c0_c0_c0_c1_c0;
+uniform vec4 uend_Stage2_c1_c0_c0_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+noperspective in float vcoverage_Stage0;
+flat in vec4 vgeomDomain_Stage0;
+vec4 TextureEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+vec4 RadialGradientLayout_Stage2_c1_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = length(vTransformedCoords_1_Stage0);
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage2_c1_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage2_c1_c0_c0_c0_c1_c0 + t * uend_Stage2_c1_c0_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage2_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = RadialGradientLayout_Stage2_c1_c0_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage2_c1_c0_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage2_c1_c0_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage2_c1_c0_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+vec4 ComposeOne_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_dst_in(_input, ClampedGradientEffect_Stage2_c1_c0_c0_c0(vec4(1.0)));
+ return _output;
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ float coverage = vcoverage_Stage0;
+ vec4 geoDomain;
+ geoDomain = vgeomDomain_Stage0;
+ if (coverage < 0.5) {
+ vec4 dists4 = clamp(vec4(1.0, 1.0, -1.0, -1.0) * (gl_FragCoord.xyxy - geoDomain), 0.0, 1.0);
+ vec2 dists2 = dists4.xy * dists4.zw;
+ coverage = min(coverage, dists2.x * dists2.y);
+ }
+ outputCoverage_Stage0 = vec4(coverage);
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TextureEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_src_in(outputCoverage_Stage0, ComposeOne_Stage2_c1_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage1 * output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in float coverage;
+in vec4 color;
+in vec2 localCoord;
+in vec4 geomDomain;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+noperspective out float vcoverage_Stage0;
+flat out vec4 vgeomDomain_Stage0;
+void main() {
+ vec2 position = position;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ vcoverage_Stage0 = coverage;
+ vgeomDomain_Stage0 = geomDomain;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/34-84.shader_test b/shaders/skia/34-84.shader_test
new file mode 100644
index 0000000..05089ce
--- /dev/null
+++ b/shaders/skia/34-84.shader_test
@@ -0,0 +1,124 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 uleftBorderColor_Stage1_c1_c0_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c1_c0_c0_c0;
+uniform vec4 ustart_Stage1_c1_c0_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c1_c0_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+vec4 ComposeOne_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_dst_in(_input, ClampedGradientEffect_Stage1_c0_c0_c0_c0(vec4(1.0)));
+ return _output;
+}
+vec4 LinearGradientLayout_Stage1_c1_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_1_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c1_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c1_c0_c0_c0_c1_c0 + t * uend_Stage1_c1_c0_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c1_c0_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c1_c0_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c1_c0_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c1_c0_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 ComposeOne_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_dst_in(_input, ClampedGradientEffect_Stage1_c1_c0_c0_c0(vec4(1.0)));
+ return _output;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_src_in(ComposeOne_Stage1_c0_c0(inputColor), ComposeOne_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/34-87.shader_test b/shaders/skia/34-87.shader_test
new file mode 100644
index 0000000..0a14f61
--- /dev/null
+++ b/shaders/skia/34-87.shader_test
@@ -0,0 +1,101 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0_c0_c0;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage1_c1_c0_c0_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_0_Stage0;
+ float t = -1.0;
+ {
+ {
+ float r0 = ufocalParams_Stage1_c0_c0_c0_c0_c0_c0.x;
+ {
+ t = length(p) - r0;
+ }
+ }
+ }
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = ClampedGradientEffect_Stage1_c0_c0_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ return _output;
+}
+vec4 ConstColorProcessor_Stage1_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage1_c1_c0_c0_c0;
+ }
+ return _output;
+}
+vec4 blend_src(vec4 src, vec4 dst) {
+ return src;
+}
+vec4 ComposeOne_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_src(ConstColorProcessor_Stage1_c1_c0_c0_c0(vec4(1.0)), _input);
+ return _output;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ComposeOne_Stage1_c1_c0(OverrideInputFragmentProcessor_Stage1_c0_c0(outputColor_Stage0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/34-9.shader_test b/shaders/skia/34-9.shader_test
new file mode 100644
index 0000000..5adfa83
--- /dev/null
+++ b/shaders/skia/34-9.shader_test
@@ -0,0 +1,134 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uColor_Stage0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale8_9_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale10_11_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias8_9_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias10_11_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage2_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.w) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c1_c0;
+ }
+ }
+ } else {
+ {
+ if (t < uthresholds9_13_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale8_9_Stage1_c0_c0_c1_c0;
+ bias = ubias8_9_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale10_11_Stage1_c0_c0_c1_c0;
+ bias = ubias10_11_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c1_c0;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 blend_darken(vec4 src, vec4 dst) {
+ vec4 result = blend_src_over(src, dst);
+ result.xyz = min(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
+ return result;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = uColor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_dst_in(outputColor_Stage0, TiledGradientEffect_Stage1_c0_c0(vec4(1.0)));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_darken(ConstColorProcessor_Stage2_c1_c0(vec4(1.0)), output_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 inLocalCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/34-94.shader_test b/shaders/skia/34-94.shader_test
new file mode 100644
index 0000000..d5db090
--- /dev/null
+++ b/shaders/skia/34-94.shader_test
@@ -0,0 +1,152 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uCoordTransformMatrix_2_Stage0;
+uniform vec4 ustart_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 uclamp_Stage1_c1_c0_c0_c0;
+uniform vec4 urectH_Stage2;
+uniform float uinvSixSigma_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c0_c0_c1_c0;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+vec4 ComposeOne_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_dst_in(_input, TiledGradientEffect_Stage1_c0_c0_c0_c0(vec4(1.0)));
+ return _output;
+}
+vec4 TextureEffect_Stage1_c1_c0_c0_c0(vec4 _input, vec2 _coords) {
+ _coords = _coords * uCoordTransformMatrix_2_Stage0.xz + uCoordTransformMatrix_2_Stage0.yw;
+ vec4 _output;
+ vec2 inCoord = _coords;
+ vec2 subsetCoord;
+ subsetCoord.x = inCoord.x;
+ subsetCoord.y = inCoord.y;
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage1_c1_c0_c0_c0.x, uclamp_Stage1_c1_c0_c0_c0.z);
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage1_c1_c0_c0_c0.y, uclamp_Stage1_c1_c0_c0_c0.w);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ _output = _input * textureColor;
+ return _output;
+}
+vec4 Bicubic_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coord = vTransformedCoords_1_Stage0 - vec2(0.5);
+ vec2 f = fract(coord);
+ coord += 0.5 - f;
+ vec4 wx = mat4(0.055555555555555552, 0.88888888888888884, 0.055555555555555552, 0.0, -0.5, 0.0, 0.5, 0.0, 0.83333333333333337, -2.0, 1.5, -0.33333333333333331, -0.3888888888888889, 1.1666666666666667, -1.1666666666666667, 0.3888888888888889) * vec4(1.0, f.x, f.x * f.x, (f.x * f.x) * f.x);
+ vec4 wy = mat4(0.055555555555555552, 0.88888888888888884, 0.055555555555555552, 0.0, -0.5, 0.0, 0.5, 0.0, 0.83333333333333337, -2.0, 1.5, -0.33333333333333331, -0.3888888888888889, 1.1666666666666667, -1.1666666666666667, 0.3888888888888889) * vec4(1.0, f.y, f.y * f.y, (f.y * f.y) * f.y);
+ vec4 rowColors[4];
+ rowColors[0] = TextureEffect_Stage1_c1_c0_c0_c0(vec4(1.0), coord + vec2(-1.0, -1.0));
+ rowColors[1] = TextureEffect_Stage1_c1_c0_c0_c0(vec4(1.0), coord + vec2(0.0, -1.0));
+ rowColors[2] = TextureEffect_Stage1_c1_c0_c0_c0(vec4(1.0), coord + vec2(1.0, -1.0));
+ rowColors[3] = TextureEffect_Stage1_c1_c0_c0_c0(vec4(1.0), coord + vec2(2.0, -1.0));
+ vec4 s0 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ rowColors[0] = TextureEffect_Stage1_c1_c0_c0_c0(vec4(1.0), coord + vec2(-1.0, 0.0));
+ rowColors[1] = TextureEffect_Stage1_c1_c0_c0_c0(vec4(1.0), coord);
+ rowColors[2] = TextureEffect_Stage1_c1_c0_c0_c0(vec4(1.0), coord + vec2(1.0, 0.0));
+ rowColors[3] = TextureEffect_Stage1_c1_c0_c0_c0(vec4(1.0), coord + vec2(2.0, 0.0));
+ vec4 s1 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ rowColors[0] = TextureEffect_Stage1_c1_c0_c0_c0(vec4(1.0), coord + vec2(-1.0, 1.0));
+ rowColors[1] = TextureEffect_Stage1_c1_c0_c0_c0(vec4(1.0), coord + vec2(0.0, 1.0));
+ rowColors[2] = TextureEffect_Stage1_c1_c0_c0_c0(vec4(1.0), coord + vec2(1.0, 1.0));
+ rowColors[3] = TextureEffect_Stage1_c1_c0_c0_c0(vec4(1.0), coord + vec2(2.0, 1.0));
+ vec4 s2 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ rowColors[0] = TextureEffect_Stage1_c1_c0_c0_c0(vec4(1.0), coord + vec2(-1.0, 2.0));
+ rowColors[1] = TextureEffect_Stage1_c1_c0_c0_c0(vec4(1.0), coord + vec2(0.0, 2.0));
+ rowColors[2] = TextureEffect_Stage1_c1_c0_c0_c0(vec4(1.0), coord + vec2(1.0, 2.0));
+ rowColors[3] = TextureEffect_Stage1_c1_c0_c0_c0(vec4(1.0), coord + vec2(2.0, 2.0));
+ vec4 s3 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ vec4 bicubicColor = ((wy.x * s0 + wy.y * s1) + wy.z * s2) + wy.w * s3;
+ bicubicColor.xyz = max(vec3(0.0), min(bicubicColor.xyz, bicubicColor.www));
+ _output = bicubicColor * _input;
+ return _output;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = Bicubic_Stage1_c1_c0(ComposeOne_Stage1_c0_c0(outputColor_Stage0));
+ }
+ vec4 output_Stage2;
+ {
+ float xCoverage, yCoverage;
+ {
+ float x, y;
+ {
+ x = max(urectH_Stage2.x - gl_FragCoord.x, gl_FragCoord.x - urectH_Stage2.z);
+ y = max(urectH_Stage2.y - gl_FragCoord.y, gl_FragCoord.y - urectH_Stage2.w);
+ }
+ xCoverage = texture(uTextureSampler_0_Stage2, vec2(x * uinvSixSigma_Stage2, 0.5)).w;
+ yCoverage = texture(uTextureSampler_0_Stage2, vec2(y * uinvSixSigma_Stage2, 0.5)).w;
+ output_Stage2 = vec4(xCoverage) * yCoverage;
+ }
+ output_Stage2 = vec4(xCoverage) * yCoverage;
+ }
+ {
+ sk_FragColor = output_Stage1 * output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/34-96.shader_test b/shaders/skia/34-96.shader_test
new file mode 100644
index 0000000..632d250
--- /dev/null
+++ b/shaders/skia/34-96.shader_test
@@ -0,0 +1,112 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uCoordTransformMatrix_1_Stage0;
+uniform vec4 uclamp_Stage1_c0_c0_c0_c0;
+uniform vec4 urectH_Stage2;
+uniform float uinvSixSigma_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0_c0_c0(vec4 _input, vec2 _coords) {
+ _coords = _coords * uCoordTransformMatrix_1_Stage0.xz + uCoordTransformMatrix_1_Stage0.yw;
+ vec4 _output;
+ vec2 inCoord = _coords;
+ vec2 subsetCoord;
+ subsetCoord.x = inCoord.x;
+ subsetCoord.y = inCoord.y;
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage1_c0_c0_c0_c0.x, uclamp_Stage1_c0_c0_c0_c0.z);
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage1_c0_c0_c0_c0.y, uclamp_Stage1_c0_c0_c0_c0.w);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ _output = _input * textureColor;
+ return _output;
+}
+vec4 Bicubic_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coord = vTransformedCoords_0_Stage0 - vec2(0.5);
+ vec2 f = fract(coord);
+ coord += 0.5 - f;
+ vec4 wx = mat4(0.055555555555555552, 0.88888888888888884, 0.055555555555555552, 0.0, -0.5, 0.0, 0.5, 0.0, 0.83333333333333337, -2.0, 1.5, -0.33333333333333331, -0.3888888888888889, 1.1666666666666667, -1.1666666666666667, 0.3888888888888889) * vec4(1.0, f.x, f.x * f.x, (f.x * f.x) * f.x);
+ vec4 wy = mat4(0.055555555555555552, 0.88888888888888884, 0.055555555555555552, 0.0, -0.5, 0.0, 0.5, 0.0, 0.83333333333333337, -2.0, 1.5, -0.33333333333333331, -0.3888888888888889, 1.1666666666666667, -1.1666666666666667, 0.3888888888888889) * vec4(1.0, f.y, f.y * f.y, (f.y * f.y) * f.y);
+ vec4 rowColors[4];
+ rowColors[0] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(-1.0, -1.0));
+ rowColors[1] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(0.0, -1.0));
+ rowColors[2] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(1.0, -1.0));
+ rowColors[3] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(2.0, -1.0));
+ vec4 s0 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ rowColors[0] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(-1.0, 0.0));
+ rowColors[1] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord);
+ rowColors[2] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(1.0, 0.0));
+ rowColors[3] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(2.0, 0.0));
+ vec4 s1 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ rowColors[0] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(-1.0, 1.0));
+ rowColors[1] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(0.0, 1.0));
+ rowColors[2] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(1.0, 1.0));
+ rowColors[3] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(2.0, 1.0));
+ vec4 s2 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ rowColors[0] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(-1.0, 2.0));
+ rowColors[1] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(0.0, 2.0));
+ rowColors[2] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(1.0, 2.0));
+ rowColors[3] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(2.0, 2.0));
+ vec4 s3 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ vec4 bicubicColor = ((wy.x * s0 + wy.y * s1) + wy.z * s2) + wy.w * s3;
+ bicubicColor.xyz = max(vec3(0.0), min(bicubicColor.xyz, bicubicColor.www));
+ _output = bicubicColor * _input;
+ return _output;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = Bicubic_Stage1_c0_c0(vec4(1.0));
+ output_Stage1.xyz *= outputColor_Stage0.xyz;
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ vec4 output_Stage2;
+ {
+ float xCoverage, yCoverage;
+ {
+ float x, y;
+ {
+ x = max(urectH_Stage2.x - gl_FragCoord.x, gl_FragCoord.x - urectH_Stage2.z);
+ y = max(urectH_Stage2.y - gl_FragCoord.y, gl_FragCoord.y - urectH_Stage2.w);
+ }
+ xCoverage = texture(uTextureSampler_0_Stage2, vec2(x * uinvSixSigma_Stage2, 0.5)).w;
+ yCoverage = texture(uTextureSampler_0_Stage2, vec2(y * uinvSixSigma_Stage2, 0.5)).w;
+ output_Stage2 = vec4(xCoverage) * yCoverage;
+ }
+ output_Stage2 = vec4(xCoverage) * yCoverage;
+ }
+ {
+ sk_FragColor = output_Stage1 * output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/34-98.shader_test b/shaders/skia/34-98.shader_test
new file mode 100644
index 0000000..3adbb91
--- /dev/null
+++ b/shaders/skia/34-98.shader_test
@@ -0,0 +1,106 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uCoordTransformMatrix_1_Stage0;
+uniform vec4 uclamp_Stage1_c0_c0_c0_c0;
+uniform vec4 urectH_Stage2;
+uniform float uinvSixSigma_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0_c0_c0(vec4 _input, vec2 _coords) {
+ _coords = _coords * uCoordTransformMatrix_1_Stage0.xz + uCoordTransformMatrix_1_Stage0.yw;
+ vec4 _output;
+ vec2 inCoord = _coords;
+ vec2 subsetCoord;
+ subsetCoord.x = inCoord.x;
+ subsetCoord.y = inCoord.y;
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage1_c0_c0_c0_c0.x, uclamp_Stage1_c0_c0_c0_c0.z);
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage1_c0_c0_c0_c0.y, uclamp_Stage1_c0_c0_c0_c0.w);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ _output = _input * textureColor;
+ return _output;
+}
+vec4 Bicubic_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coord = vTransformedCoords_0_Stage0 - vec2(0.5);
+ vec2 f = fract(coord);
+ coord += 0.5 - f;
+ vec4 wx = mat4(0.055555555555555552, 0.88888888888888884, 0.055555555555555552, 0.0, -0.5, 0.0, 0.5, 0.0, 0.83333333333333337, -2.0, 1.5, -0.33333333333333331, -0.3888888888888889, 1.1666666666666667, -1.1666666666666667, 0.3888888888888889) * vec4(1.0, f.x, f.x * f.x, (f.x * f.x) * f.x);
+ vec4 wy = mat4(0.055555555555555552, 0.88888888888888884, 0.055555555555555552, 0.0, -0.5, 0.0, 0.5, 0.0, 0.83333333333333337, -2.0, 1.5, -0.33333333333333331, -0.3888888888888889, 1.1666666666666667, -1.1666666666666667, 0.3888888888888889) * vec4(1.0, f.y, f.y * f.y, (f.y * f.y) * f.y);
+ vec4 rowColors[4];
+ rowColors[0] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(-1.0, -1.0));
+ rowColors[1] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(0.0, -1.0));
+ rowColors[2] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(1.0, -1.0));
+ rowColors[3] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(2.0, -1.0));
+ vec4 s0 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ rowColors[0] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(-1.0, 0.0));
+ rowColors[1] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord);
+ rowColors[2] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(1.0, 0.0));
+ rowColors[3] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(2.0, 0.0));
+ vec4 s1 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ rowColors[0] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(-1.0, 1.0));
+ rowColors[1] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(0.0, 1.0));
+ rowColors[2] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(1.0, 1.0));
+ rowColors[3] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(2.0, 1.0));
+ vec4 s2 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ rowColors[0] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(-1.0, 2.0));
+ rowColors[1] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(0.0, 2.0));
+ rowColors[2] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(1.0, 2.0));
+ rowColors[3] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(2.0, 2.0));
+ vec4 s3 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ vec4 bicubicColor = ((wy.x * s0 + wy.y * s1) + wy.z * s2) + wy.w * s3;
+ bicubicColor.xyz = max(vec3(0.0), min(bicubicColor.xyz, bicubicColor.www));
+ _output = bicubicColor * _input;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = Bicubic_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ float xCoverage, yCoverage;
+ {
+ float x, y;
+ {
+ x = max(urectH_Stage2.x - gl_FragCoord.x, gl_FragCoord.x - urectH_Stage2.z);
+ y = max(urectH_Stage2.y - gl_FragCoord.y, gl_FragCoord.y - urectH_Stage2.w);
+ }
+ xCoverage = texture(uTextureSampler_0_Stage2, vec2(x * uinvSixSigma_Stage2, 0.5)).w;
+ yCoverage = texture(uTextureSampler_0_Stage2, vec2(y * uinvSixSigma_Stage2, 0.5)).w;
+ output_Stage2 = vec4(xCoverage) * yCoverage;
+ }
+ output_Stage2 = vec4(xCoverage) * yCoverage;
+ }
+ {
+ sk_FragColor = output_Stage1 * output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/34.shader_test b/shaders/skia/34.shader_test
new file mode 100644
index 0000000..9048e50
--- /dev/null
+++ b/shaders/skia/34.shader_test
@@ -0,0 +1,77 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uCoordTransformMatrix_1_Stage0;
+uniform sampler2DRect uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0_c0_c0(vec4 _input, vec2 _coords) {
+ _coords = _coords * uCoordTransformMatrix_1_Stage0.xz + uCoordTransformMatrix_1_Stage0.yw;
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, _coords) * _input;
+ return _output;
+}
+vec4 Bicubic_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coord = vTransformedCoords_0_Stage0 - vec2(0.5);
+ vec2 f = fract(coord);
+ coord += 0.5 - f;
+ vec4 wx = mat4(0.055555555555555552, 0.88888888888888884, 0.055555555555555552, 0.0, -0.5, 0.0, 0.5, 0.0, 0.83333333333333337, -2.0, 1.5, -0.33333333333333331, -0.3888888888888889, 1.1666666666666667, -1.1666666666666667, 0.3888888888888889) * vec4(1.0, f.x, f.x * f.x, (f.x * f.x) * f.x);
+ vec4 wy = mat4(0.055555555555555552, 0.88888888888888884, 0.055555555555555552, 0.0, -0.5, 0.0, 0.5, 0.0, 0.83333333333333337, -2.0, 1.5, -0.33333333333333331, -0.3888888888888889, 1.1666666666666667, -1.1666666666666667, 0.3888888888888889) * vec4(1.0, f.y, f.y * f.y, (f.y * f.y) * f.y);
+ vec4 rowColors[4];
+ rowColors[0] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(-1.0, -1.0));
+ rowColors[1] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(0.0, -1.0));
+ rowColors[2] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(1.0, -1.0));
+ rowColors[3] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(2.0, -1.0));
+ vec4 s0 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ rowColors[0] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(-1.0, 0.0));
+ rowColors[1] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord);
+ rowColors[2] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(1.0, 0.0));
+ rowColors[3] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(2.0, 0.0));
+ vec4 s1 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ rowColors[0] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(-1.0, 1.0));
+ rowColors[1] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(0.0, 1.0));
+ rowColors[2] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(1.0, 1.0));
+ rowColors[3] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(2.0, 1.0));
+ vec4 s2 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ rowColors[0] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(-1.0, 2.0));
+ rowColors[1] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(0.0, 2.0));
+ rowColors[2] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(1.0, 2.0));
+ rowColors[3] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(2.0, 2.0));
+ vec4 s3 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ vec4 bicubicColor = ((wy.x * s0 + wy.y * s1) + wy.z * s2) + wy.w * s3;
+ bicubicColor = clamp(bicubicColor, 0.0, 1.0);
+ _output = bicubicColor * _input;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = Bicubic_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/340-3.shader_test b/shaders/skia/340-3.shader_test
new file mode 100644
index 0000000..004e96e
--- /dev/null
+++ b/shaders/skia/340-3.shader_test
@@ -0,0 +1,112 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform float uinnerThreshold_Stage2_c0_c0;
+uniform float uouterThreshold_Stage2_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 AlphaThresholdFragmentProcessor_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 color = _input;
+ vec4 mask_color = texture(uTextureSampler_0_Stage2, vTransformedCoords_1_Stage0);
+ if (mask_color.w < 0.5) {
+ if (color.w > uouterThreshold_Stage2_c0_c0) {
+ float scale = uouterThreshold_Stage2_c0_c0 / color.w;
+ color.xyz *= scale;
+ color.w = uouterThreshold_Stage2_c0_c0;
+ }
+ } else if (color.w < uinnerThreshold_Stage2_c0_c0) {
+ float scale = uinnerThreshold_Stage2_c0_c0 / max(0.0010000000474974513, color.w);
+ color.xyz *= scale;
+ color.w = uinnerThreshold_Stage2_c0_c0;
+ }
+ _output = color;
+ return _output;
+}
+float _blend_color_saturation(vec3 color) {
+ return max(max(color.x, color.y), color.z) - min(min(color.x, color.y), color.z);
+}
+vec3 _blend_set_color_saturation_helper(vec3 minMidMax, float sat) {
+ if (minMidMax.x < minMidMax.z) {
+ return vec3(0.0, (sat * (minMidMax.y - minMidMax.x)) / (minMidMax.z - minMidMax.x), sat);
+ }
+ return vec3(0.0);
+}
+vec3 _blend_set_color_saturation(vec3 hueLumColor, vec3 satColor) {
+ float sat = _blend_color_saturation(satColor);
+ if (hueLumColor.x <= hueLumColor.y) {
+ if (hueLumColor.y <= hueLumColor.z) {
+ hueLumColor.xyz = _blend_set_color_saturation_helper(hueLumColor, sat);
+ } else if (hueLumColor.x <= hueLumColor.z) {
+ hueLumColor.xzy = _blend_set_color_saturation_helper(hueLumColor.xzy, sat);
+ } else {
+ hueLumColor.zxy = _blend_set_color_saturation_helper(hueLumColor.zxy, sat);
+ }
+ } else if (hueLumColor.x <= hueLumColor.z) {
+ hueLumColor.yxz = _blend_set_color_saturation_helper(hueLumColor.yxz, sat);
+ } else if (hueLumColor.y <= hueLumColor.z) {
+ hueLumColor.yzx = _blend_set_color_saturation_helper(hueLumColor.yzx, sat);
+ } else {
+ hueLumColor.zyx = _blend_set_color_saturation_helper(hueLumColor.zyx, sat);
+ }
+ return hueLumColor;
+}
+float _blend_color_luminance(vec3 color) {
+ return dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), color);
+}
+vec3 _blend_set_color_luminance(vec3 hueSatColor, float alpha, vec3 lumColor) {
+ float lum = _blend_color_luminance(lumColor);
+ vec3 result = (lum - _blend_color_luminance(hueSatColor)) + hueSatColor;
+ float minComp = min(min(result.x, result.y), result.z);
+ float maxComp = max(max(result.x, result.y), result.z);
+ if (minComp < 0.0 && lum != minComp) {
+ result = lum + ((result - lum) * lum) / (lum - minComp);
+ }
+ if (maxComp > alpha && maxComp != lum) {
+ return lum + ((result - lum) * (alpha - lum)) / (maxComp - lum);
+ }
+ return result;
+}
+vec4 blend_hue(vec4 src, vec4 dst) {
+ float alpha = dst.w * src.w;
+ vec3 sda = src.xyz * dst.w;
+ vec3 dsa = dst.xyz * src.w;
+ return vec4((((_blend_set_color_luminance(_blend_set_color_saturation(sda, dsa), alpha, dsa) + dst.xyz) - dsa) + src.xyz) - sda, (src.w + dst.w) - alpha);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_hue(AlphaThresholdFragmentProcessor_Stage2_c0_c0(vec4(1.0)), output_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/340-4.shader_test b/shaders/skia/340-4.shader_test
new file mode 100644
index 0000000..d658b20
--- /dev/null
+++ b/shaders/skia/340-4.shader_test
@@ -0,0 +1,82 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uScale_Stage2_c1_c0;
+uniform vec4 uTexDom_Stage2_c1_c0;
+uniform vec3 uDecalParams_Stage2_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+uniform sampler2D uTextureSampler_1_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+vec4 ClampFragmentProcessor_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = clamp(_input, 0.0, 1.0);
+ }
+ return _output;
+}
+vec4 DisplacementMap_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 dColor = texture(uTextureSampler_0_Stage2, vTransformedCoords_1_Stage0);
+ dColor.xyz = dColor.w < 9.9999999747524271e-07 ? vec3(0.0) : clamp(dColor.xyz / dColor.w, 0.0, 1.0);
+ vec2 cCoords = vTransformedCoords_2_Stage0 + uScale_Stage2_c1_c0 * (dColor.zz - vec2(0.5));
+ {
+ vec2 origCoord = cCoords;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c1_c0.xy, uTexDom_Stage2_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c1_c0.y);
+ if (err > uDecalParams_Stage2_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ _output = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ return _output;
+}
+vec4 blend_screen(vec4 src, vec4 dst) {
+ return src + (1.0 - src) * dst;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ vec4 inputColor = vec4(output_Stage1.xyz, 1.0);
+ output_Stage2 = blend_screen(ClampFragmentProcessor_Stage2_c0_c0(inputColor), DisplacementMap_Stage2_c1_c0(inputColor));
+ output_Stage2 *= output_Stage1.w;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/340.shader_test b/shaders/skia/340.shader_test
new file mode 100644
index 0000000..3a8854e
--- /dev/null
+++ b/shaders/skia/340.shader_test
@@ -0,0 +1,132 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.w) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ } else {
+ {
+ if (t < uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = OverrideInputFragmentProcessor_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 blend_screen(vec4 src, vec4 dst) {
+ return src + (1.0 - src) * dst;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_screen(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 inColor;
+in vec2 inLocalCoord;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/343-2.shader_test b/shaders/skia/343-2.shader_test
new file mode 100644
index 0000000..2282eb0
--- /dev/null
+++ b/shaders/skia/343-2.shader_test
@@ -0,0 +1,34 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+uniform sampler2D uTextureSampler_0_Stage0;
+noperspective in vec2 vTextureCoords_Stage0;
+flat in int vTexIndex_Stage0;
+noperspective in vec4 vinColor_Stage0;
+void main() {
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform vec2 uAtlasSizeInv_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in uvec2 inTextureCoords;
+noperspective out vec2 vTextureCoords_Stage0;
+flat out int vTexIndex_Stage0;
+noperspective out vec4 vinColor_Stage0;
+void main() {
+ ivec2 signedCoords = ivec2(int(inTextureCoords.x), int(inTextureCoords.y));
+ vec2 unormTexCoords = vec2(float(signedCoords.x / 2), float(signedCoords.y / 2));
+ vTextureCoords_Stage0 = unormTexCoords * uAtlasSizeInv_Stage0;
+ vTexIndex_Stage0 = 0;
+ vinColor_Stage0 = inColor;
+ gl_Position = vec4(inPosition.x, inPosition.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/343-3.shader_test b/shaders/skia/343-3.shader_test
new file mode 100644
index 0000000..dddb32e
--- /dev/null
+++ b/shaders/skia/343-3.shader_test
@@ -0,0 +1,49 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 urectUniform_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ float alpha;
+ {
+ float xSub, ySub;
+ xSub = min(gl_FragCoord.x - urectUniform_Stage2.x, 0.0);
+ xSub += min(urectUniform_Stage2.z - gl_FragCoord.x, 0.0);
+ ySub = min(gl_FragCoord.y - urectUniform_Stage2.y, 0.0);
+ ySub += min(urectUniform_Stage2.w - gl_FragCoord.y, 0.0);
+ alpha = (1.0 + max(xSub, -1.0)) * (1.0 + max(ySub, -1.0));
+ }
+ output_Stage2 = output_Stage1 * alpha;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/343.shader_test b/shaders/skia/343.shader_test
new file mode 100644
index 0000000..739c356
--- /dev/null
+++ b/shaders/skia/343.shader_test
@@ -0,0 +1,61 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 ucolor_Stage1_c0_c0_c0_c0;
+noperspective in vec4 vcolor_Stage0;
+vec4 ConstColorProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = _input.w * ucolor_Stage1_c0_c0_c0_c0;
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = ConstColorProcessor_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 blend_screen(vec4 src, vec4 dst) {
+ return src + (1.0 - src) * dst;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_screen(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 position;
+in vec4 inColor;
+noperspective out vec4 vcolor_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/346-2.shader_test b/shaders/skia/346-2.shader_test
new file mode 100644
index 0000000..6ec9379
--- /dev/null
+++ b/shaders/skia/346-2.shader_test
@@ -0,0 +1,177 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_KHR_blend_equation_advanced : require
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+layout (blend_support_all_equations) out ;
+uniform vec2 uScale_Stage1_c1_c0_c0_c0_c0_c0;
+uniform vec4 uTexDom_Stage1_c1_c0_c0_c0_c0_c0;
+uniform vec3 uDecalParams_Stage1_c1_c0_c0_c0_c0_c0;
+uniform vec3 uedges_Stage1_c1_c0_c0_c0_c1_c0[1];
+uniform vec4 ucolor_Stage1_c1_c0_c1_c0_c0_c0;
+uniform vec2 uImageIncrement_Stage1_c1_c0_c1_c0_c1_c0;
+uniform vec2 uBounds_Stage1_c1_c0_c1_c0_c1_c0;
+uniform vec4 uKernel_Stage1_c1_c0_c1_c0_c1_c0[2];
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+uniform sampler2D uTextureSampler_2_Stage1;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+vec4 Big_Ole_Key_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = _input;
+ return _output;
+}
+vec4 DisplacementMap_Stage1_c1_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 dColor = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ dColor.xyz = dColor.w < 9.9999999747524271e-07 ? vec3(0.0) : clamp(dColor.xyz / dColor.w, 0.0, 1.0);
+ vec2 cCoords = vTransformedCoords_1_Stage0 + uScale_Stage1_c1_c0_c0_c0_c0_c0 * (dColor.wz - vec2(0.5));
+ {
+ vec2 origCoord = cCoords;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0_c0_c0.xy, uTexDom_Stage1_c1_c0_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ _output = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ return _output;
+}
+vec4 ConvexPoly_Stage1_c1_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float alpha = 1.0;
+ float edge;
+ edge = dot(uedges_Stage1_c1_c0_c0_c0_c1_c0[0], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ alpha = 1.0 - alpha;
+ _output = _input * alpha;
+ return _output;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 blend_darken(vec4 src, vec4 dst) {
+ vec4 result = blend_src_over(src, dst);
+ result.xyz = min(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
+ return result;
+}
+vec4 ComposeTwo_Stage1_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_darken(DisplacementMap_Stage1_c1_c0_c0_c0_c0_c0(inputColor), ConvexPoly_Stage1_c1_c0_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 ConstColorProcessor_Stage1_c1_c0_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage1_c1_c0_c1_c0_c0_c0;
+ }
+ return _output;
+}
+vec4 GaussianConvolution_Stage1_c1_c0_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_2_Stage0 - 2.0 * uImageIncrement_Stage1_c1_c0_c1_c0_c1_c0;
+ vec2 coordSampled = vec2(0.0, 0.0);
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage1_c1_c0_c1_c0_c1_c0.x, uBounds_Stage1_c1_c0_c1_c0_c1_c0.y - uBounds_Stage1_c1_c0_c1_c0_c1_c0.x) + uBounds_Stage1_c1_c0_c1_c0_c1_c0.x;
+ _output += texture(uTextureSampler_2_Stage1, coordSampled) * uKernel_Stage1_c1_c0_c1_c0_c1_c0[0].x;
+ coord += uImageIncrement_Stage1_c1_c0_c1_c0_c1_c0;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage1_c1_c0_c1_c0_c1_c0.x, uBounds_Stage1_c1_c0_c1_c0_c1_c0.y - uBounds_Stage1_c1_c0_c1_c0_c1_c0.x) + uBounds_Stage1_c1_c0_c1_c0_c1_c0.x;
+ _output += texture(uTextureSampler_2_Stage1, coordSampled) * uKernel_Stage1_c1_c0_c1_c0_c1_c0[0].y;
+ coord += uImageIncrement_Stage1_c1_c0_c1_c0_c1_c0;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage1_c1_c0_c1_c0_c1_c0.x, uBounds_Stage1_c1_c0_c1_c0_c1_c0.y - uBounds_Stage1_c1_c0_c1_c0_c1_c0.x) + uBounds_Stage1_c1_c0_c1_c0_c1_c0.x;
+ _output += texture(uTextureSampler_2_Stage1, coordSampled) * uKernel_Stage1_c1_c0_c1_c0_c1_c0[0].z;
+ coord += uImageIncrement_Stage1_c1_c0_c1_c0_c1_c0;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage1_c1_c0_c1_c0_c1_c0.x, uBounds_Stage1_c1_c0_c1_c0_c1_c0.y - uBounds_Stage1_c1_c0_c1_c0_c1_c0.x) + uBounds_Stage1_c1_c0_c1_c0_c1_c0.x;
+ _output += texture(uTextureSampler_2_Stage1, coordSampled) * uKernel_Stage1_c1_c0_c1_c0_c1_c0[0].w;
+ coord += uImageIncrement_Stage1_c1_c0_c1_c0_c1_c0;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage1_c1_c0_c1_c0_c1_c0.x, uBounds_Stage1_c1_c0_c1_c0_c1_c0.y - uBounds_Stage1_c1_c0_c1_c0_c1_c0.x) + uBounds_Stage1_c1_c0_c1_c0_c1_c0.x;
+ _output += texture(uTextureSampler_2_Stage1, coordSampled) * uKernel_Stage1_c1_c0_c1_c0_c1_c0[1].x;
+ coord += uImageIncrement_Stage1_c1_c0_c1_c0_c1_c0;
+ _output *= _input;
+ return _output;
+}
+vec4 blend_src_out(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src;
+}
+vec4 ComposeTwo_Stage1_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_src_out(ConstColorProcessor_Stage1_c1_c0_c1_c0_c0_c0(inputColor), GaussianConvolution_Stage1_c1_c0_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 blend_difference(vec4 src, vec4 dst) {
+ return vec4((src.xyz + dst.xyz) - 2.0 * min(src.xyz * dst.w, dst.xyz * src.w), src.w + (1.0 - src.w) * dst.w);
+}
+vec4 ComposeTwo_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_difference(ComposeTwo_Stage1_c1_c0_c0_c0(inputColor), ComposeTwo_Stage1_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 blend_lighten(vec4 src, vec4 dst) {
+ vec4 result = blend_src_over(src, dst);
+ result.xyz = max(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
+ return result;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_lighten(Big_Ole_Key_Stage1_c0_c0(inputColor), ComposeTwo_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+void main() {
+ vec4 color = inColor;
+ vcolor_Stage0 = color;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/346-3.shader_test b/shaders/skia/346-3.shader_test
new file mode 100644
index 0000000..3da0a2b
--- /dev/null
+++ b/shaders/skia/346-3.shader_test
@@ -0,0 +1,52 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 urectUniform_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ float alpha;
+ {
+ float xSub, ySub;
+ xSub = min(gl_FragCoord.x - urectUniform_Stage2.x, 0.0);
+ xSub += min(urectUniform_Stage2.z - gl_FragCoord.x, 0.0);
+ ySub = min(gl_FragCoord.y - urectUniform_Stage2.y, 0.0);
+ ySub += min(urectUniform_Stage2.w - gl_FragCoord.y, 0.0);
+ alpha = (1.0 + max(xSub, -1.0)) * (1.0 + max(ySub, -1.0));
+ }
+ {
+ alpha = 1.0 - alpha;
+ }
+ output_Stage2 = output_Stage1 * alpha;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/346-4.shader_test b/shaders/skia/346-4.shader_test
new file mode 100644
index 0000000..1b91df6
--- /dev/null
+++ b/shaders/skia/346-4.shader_test
@@ -0,0 +1,94 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform float ucornerRadius_Stage2_c1_c0;
+uniform vec4 uproxyRect_Stage2_c1_c0;
+uniform float ublurRadius_Stage2_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 ClampFragmentProcessor_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = clamp(_input, 0.0, 1.0);
+ }
+ return _output;
+}
+vec4 RRectBlurEffect_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 translatedFragPos = gl_FragCoord.xy - uproxyRect_Stage2_c1_c0.xy;
+ float threshold = ucornerRadius_Stage2_c1_c0 + 2.0 * ublurRadius_Stage2_c1_c0;
+ vec2 middle = (uproxyRect_Stage2_c1_c0.zw - uproxyRect_Stage2_c1_c0.xy) - 2.0 * threshold;
+ if (translatedFragPos.x >= threshold && translatedFragPos.x < middle.x + threshold) {
+ translatedFragPos.x = threshold;
+ } else if (translatedFragPos.x >= middle.x + threshold) {
+ translatedFragPos.x -= middle.x - 1.0;
+ }
+ if (translatedFragPos.y > threshold && translatedFragPos.y < middle.y + threshold) {
+ translatedFragPos.y = threshold;
+ } else if (translatedFragPos.y >= middle.y + threshold) {
+ translatedFragPos.y -= middle.y - 1.0;
+ }
+ vec2 proxyDims = vec2(2.0 * threshold + 1.0);
+ vec2 texCoord = translatedFragPos / proxyDims;
+ _output = _input * texture(uTextureSampler_0_Stage2, texCoord);
+ return _output;
+}
+float _blend_color_luminance(vec3 color) {
+ return dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), color);
+}
+vec3 _blend_set_color_luminance(vec3 hueSatColor, float alpha, vec3 lumColor) {
+ float lum = _blend_color_luminance(lumColor);
+ vec3 result = (lum - _blend_color_luminance(hueSatColor)) + hueSatColor;
+ float minComp = min(min(result.x, result.y), result.z);
+ float maxComp = max(max(result.x, result.y), result.z);
+ if (minComp < 0.0 && lum != minComp) {
+ result = lum + ((result - lum) * lum) / (lum - minComp);
+ }
+ if (maxComp > alpha && maxComp != lum) {
+ return lum + ((result - lum) * (alpha - lum)) / (maxComp - lum);
+ }
+ return result;
+}
+vec4 blend_luminosity(vec4 src, vec4 dst) {
+ float alpha = dst.w * src.w;
+ vec3 sda = src.xyz * dst.w;
+ vec3 dsa = dst.xyz * src.w;
+ return vec4((((_blend_set_color_luminance(dsa, alpha, sda) + dst.xyz) - dsa) + src.xyz) - sda, (src.w + dst.w) - alpha);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ vec4 inputColor = vec4(output_Stage1.xyz, 1.0);
+ output_Stage2 = blend_luminosity(ClampFragmentProcessor_Stage2_c0_c0(inputColor), RRectBlurEffect_Stage2_c1_c0(inputColor));
+ output_Stage2 *= output_Stage1.w;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/346.shader_test b/shaders/skia/346.shader_test
new file mode 100644
index 0000000..f1a8d2b
--- /dev/null
+++ b/shaders/skia/346.shader_test
@@ -0,0 +1,152 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage2_c1_c0;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.w) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ } else {
+ {
+ if (t < uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = OverrideInputFragmentProcessor_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c1_c0;
+ }
+ return _output;
+}
+vec4 blend_screen(vec4 src, vec4 dst) {
+ return src + (1.0 - src) * dst;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 blend_darken(vec4 src, vec4 dst) {
+ vec4 result = blend_src_over(src, dst);
+ result.xyz = min(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
+ return result;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_screen(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_darken(ConstColorProcessor_Stage2_c1_c0(vec4(1.0)), output_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 inColor;
+in vec2 inLocalCoord;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/349-2.shader_test b/shaders/skia/349-2.shader_test
new file mode 100644
index 0000000..1db64e8
--- /dev/null
+++ b/shaders/skia/349-2.shader_test
@@ -0,0 +1,22 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+uniform vec4 uColor_Stage0;
+void main() {
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 inPosition;
+void main() {
+ vec3 pos3 = uViewM_Stage0 * vec3(inPosition, 1.0);
+ gl_Position = vec4(pos3.x, pos3.y, 0.0, pos3.z);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/349-3.shader_test b/shaders/skia/349-3.shader_test
new file mode 100644
index 0000000..07b8871
--- /dev/null
+++ b/shaders/skia/349-3.shader_test
@@ -0,0 +1,44 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 urectUniform_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ float alpha;
+ {
+ alpha = float(all(greaterThan(vec4(gl_FragCoord.xy, urectUniform_Stage2.zw), vec4(urectUniform_Stage2.xy, gl_FragCoord.xy))) ? 1 : 0);
+ }
+ output_Stage2 = output_Stage1 * alpha;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/349-4.shader_test b/shaders/skia/349-4.shader_test
new file mode 100644
index 0000000..f2f8137
--- /dev/null
+++ b/shaders/skia/349-4.shader_test
@@ -0,0 +1,197 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage2_c0_c0;
+uniform vec2 uBounds_Stage2_c0_c0;
+uniform vec4 uKernel_Stage2_c0_c0[6];
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 GaussianConvolution_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_1_Stage0 - 10.0 * uImageIncrement_Stage2_c0_c0;
+ vec2 coordSampled = vec2(0.0, 0.0);
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage2_c0_c0.x, uBounds_Stage2_c0_c0.y - uBounds_Stage2_c0_c0.x) + uBounds_Stage2_c0_c0.x;
+ _output += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2_c0_c0[0].x;
+ coord += uImageIncrement_Stage2_c0_c0;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage2_c0_c0.x, uBounds_Stage2_c0_c0.y - uBounds_Stage2_c0_c0.x) + uBounds_Stage2_c0_c0.x;
+ _output += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2_c0_c0[0].y;
+ coord += uImageIncrement_Stage2_c0_c0;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage2_c0_c0.x, uBounds_Stage2_c0_c0.y - uBounds_Stage2_c0_c0.x) + uBounds_Stage2_c0_c0.x;
+ _output += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2_c0_c0[0].z;
+ coord += uImageIncrement_Stage2_c0_c0;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage2_c0_c0.x, uBounds_Stage2_c0_c0.y - uBounds_Stage2_c0_c0.x) + uBounds_Stage2_c0_c0.x;
+ _output += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2_c0_c0[0].w;
+ coord += uImageIncrement_Stage2_c0_c0;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage2_c0_c0.x, uBounds_Stage2_c0_c0.y - uBounds_Stage2_c0_c0.x) + uBounds_Stage2_c0_c0.x;
+ _output += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2_c0_c0[1].x;
+ coord += uImageIncrement_Stage2_c0_c0;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage2_c0_c0.x, uBounds_Stage2_c0_c0.y - uBounds_Stage2_c0_c0.x) + uBounds_Stage2_c0_c0.x;
+ _output += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2_c0_c0[1].y;
+ coord += uImageIncrement_Stage2_c0_c0;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage2_c0_c0.x, uBounds_Stage2_c0_c0.y - uBounds_Stage2_c0_c0.x) + uBounds_Stage2_c0_c0.x;
+ _output += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2_c0_c0[1].z;
+ coord += uImageIncrement_Stage2_c0_c0;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage2_c0_c0.x, uBounds_Stage2_c0_c0.y - uBounds_Stage2_c0_c0.x) + uBounds_Stage2_c0_c0.x;
+ _output += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2_c0_c0[1].w;
+ coord += uImageIncrement_Stage2_c0_c0;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage2_c0_c0.x, uBounds_Stage2_c0_c0.y - uBounds_Stage2_c0_c0.x) + uBounds_Stage2_c0_c0.x;
+ _output += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2_c0_c0[2].x;
+ coord += uImageIncrement_Stage2_c0_c0;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage2_c0_c0.x, uBounds_Stage2_c0_c0.y - uBounds_Stage2_c0_c0.x) + uBounds_Stage2_c0_c0.x;
+ _output += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2_c0_c0[2].y;
+ coord += uImageIncrement_Stage2_c0_c0;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage2_c0_c0.x, uBounds_Stage2_c0_c0.y - uBounds_Stage2_c0_c0.x) + uBounds_Stage2_c0_c0.x;
+ _output += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2_c0_c0[2].z;
+ coord += uImageIncrement_Stage2_c0_c0;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage2_c0_c0.x, uBounds_Stage2_c0_c0.y - uBounds_Stage2_c0_c0.x) + uBounds_Stage2_c0_c0.x;
+ _output += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2_c0_c0[2].w;
+ coord += uImageIncrement_Stage2_c0_c0;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage2_c0_c0.x, uBounds_Stage2_c0_c0.y - uBounds_Stage2_c0_c0.x) + uBounds_Stage2_c0_c0.x;
+ _output += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2_c0_c0[3].x;
+ coord += uImageIncrement_Stage2_c0_c0;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage2_c0_c0.x, uBounds_Stage2_c0_c0.y - uBounds_Stage2_c0_c0.x) + uBounds_Stage2_c0_c0.x;
+ _output += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2_c0_c0[3].y;
+ coord += uImageIncrement_Stage2_c0_c0;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage2_c0_c0.x, uBounds_Stage2_c0_c0.y - uBounds_Stage2_c0_c0.x) + uBounds_Stage2_c0_c0.x;
+ _output += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2_c0_c0[3].z;
+ coord += uImageIncrement_Stage2_c0_c0;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage2_c0_c0.x, uBounds_Stage2_c0_c0.y - uBounds_Stage2_c0_c0.x) + uBounds_Stage2_c0_c0.x;
+ _output += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2_c0_c0[3].w;
+ coord += uImageIncrement_Stage2_c0_c0;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage2_c0_c0.x, uBounds_Stage2_c0_c0.y - uBounds_Stage2_c0_c0.x) + uBounds_Stage2_c0_c0.x;
+ _output += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2_c0_c0[4].x;
+ coord += uImageIncrement_Stage2_c0_c0;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage2_c0_c0.x, uBounds_Stage2_c0_c0.y - uBounds_Stage2_c0_c0.x) + uBounds_Stage2_c0_c0.x;
+ _output += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2_c0_c0[4].y;
+ coord += uImageIncrement_Stage2_c0_c0;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage2_c0_c0.x, uBounds_Stage2_c0_c0.y - uBounds_Stage2_c0_c0.x) + uBounds_Stage2_c0_c0.x;
+ _output += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2_c0_c0[4].z;
+ coord += uImageIncrement_Stage2_c0_c0;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage2_c0_c0.x, uBounds_Stage2_c0_c0.y - uBounds_Stage2_c0_c0.x) + uBounds_Stage2_c0_c0.x;
+ _output += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2_c0_c0[4].w;
+ coord += uImageIncrement_Stage2_c0_c0;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage2_c0_c0.x, uBounds_Stage2_c0_c0.y - uBounds_Stage2_c0_c0.x) + uBounds_Stage2_c0_c0.x;
+ _output += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2_c0_c0[5].x;
+ coord += uImageIncrement_Stage2_c0_c0;
+ _output *= _input;
+ return _output;
+}
+vec4 ClampFragmentProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ float alpha = clamp(_input.w, 0.0, 1.0);
+ _output = vec4(clamp(_input.xyz, 0.0, alpha), alpha);
+ }
+ return _output;
+}
+float _blend_color_saturation(vec3 color) {
+ return max(max(color.x, color.y), color.z) - min(min(color.x, color.y), color.z);
+}
+vec3 _blend_set_color_saturation_helper(vec3 minMidMax, float sat) {
+ if (minMidMax.x < minMidMax.z) {
+ return vec3(0.0, (sat * (minMidMax.y - minMidMax.x)) / (minMidMax.z - minMidMax.x), sat);
+ }
+ return vec3(0.0);
+}
+vec3 _blend_set_color_saturation(vec3 hueLumColor, vec3 satColor) {
+ float sat = _blend_color_saturation(satColor);
+ if (hueLumColor.x <= hueLumColor.y) {
+ if (hueLumColor.y <= hueLumColor.z) {
+ hueLumColor.xyz = _blend_set_color_saturation_helper(hueLumColor, sat);
+ } else if (hueLumColor.x <= hueLumColor.z) {
+ hueLumColor.xzy = _blend_set_color_saturation_helper(hueLumColor.xzy, sat);
+ } else {
+ hueLumColor.zxy = _blend_set_color_saturation_helper(hueLumColor.zxy, sat);
+ }
+ } else if (hueLumColor.x <= hueLumColor.z) {
+ hueLumColor.yxz = _blend_set_color_saturation_helper(hueLumColor.yxz, sat);
+ } else if (hueLumColor.y <= hueLumColor.z) {
+ hueLumColor.yzx = _blend_set_color_saturation_helper(hueLumColor.yzx, sat);
+ } else {
+ hueLumColor.zyx = _blend_set_color_saturation_helper(hueLumColor.zyx, sat);
+ }
+ return hueLumColor;
+}
+float _blend_color_luminance(vec3 color) {
+ return dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), color);
+}
+vec3 _blend_set_color_luminance(vec3 hueSatColor, float alpha, vec3 lumColor) {
+ float lum = _blend_color_luminance(lumColor);
+ vec3 result = (lum - _blend_color_luminance(hueSatColor)) + hueSatColor;
+ float minComp = min(min(result.x, result.y), result.z);
+ float maxComp = max(max(result.x, result.y), result.z);
+ if (minComp < 0.0 && lum != minComp) {
+ result = lum + ((result - lum) * lum) / (lum - minComp);
+ }
+ if (maxComp > alpha && maxComp != lum) {
+ return lum + ((result - lum) * (alpha - lum)) / (maxComp - lum);
+ }
+ return result;
+}
+vec4 blend_hue(vec4 src, vec4 dst) {
+ float alpha = dst.w * src.w;
+ vec3 sda = src.xyz * dst.w;
+ vec3 dsa = dst.xyz * src.w;
+ return vec4((((_blend_set_color_luminance(_blend_set_color_saturation(sda, dsa), alpha, dsa) + dst.xyz) - dsa) + src.xyz) - sda, (src.w + dst.w) - alpha);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ vec4 inputColor = vec4(output_Stage1.xyz, 1.0);
+ output_Stage2 = blend_hue(GaussianConvolution_Stage2_c0_c0(inputColor), ClampFragmentProcessor_Stage2_c1_c0(inputColor));
+ output_Stage2 *= output_Stage1.w;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/349.shader_test b/shaders/skia/349.shader_test
new file mode 100644
index 0000000..3a86067
--- /dev/null
+++ b/shaders/skia/349.shader_test
@@ -0,0 +1,81 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 ucolor_Stage1_c0_c0_c0_c0;
+uniform vec4 ucolor_Stage2_c1_c0;
+noperspective in vec4 vcolor_Stage0;
+vec4 ConstColorProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = _input.w * ucolor_Stage1_c0_c0_c0_c0;
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = ConstColorProcessor_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c1_c0;
+ }
+ return _output;
+}
+vec4 blend_screen(vec4 src, vec4 dst) {
+ return src + (1.0 - src) * dst;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 blend_darken(vec4 src, vec4 dst) {
+ vec4 result = blend_src_over(src, dst);
+ result.xyz = min(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
+ return result;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_screen(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_darken(ConstColorProcessor_Stage2_c1_c0(vec4(1.0)), output_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 position;
+in vec4 inColor;
+noperspective out vec4 vcolor_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/352-2.shader_test b/shaders/skia/352-2.shader_test
new file mode 100644
index 0000000..8ec08ee
--- /dev/null
+++ b/shaders/skia/352-2.shader_test
@@ -0,0 +1,342 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uellipse_Stage1;
+uniform vec2 uImageIncrement_Stage2;
+uniform float uSurfaceScale_Stage2;
+uniform vec3 uLightColor_Stage2;
+uniform float uKS_Stage2;
+uniform float uShininess_Stage2;
+uniform vec4 uTexDom_Stage2;
+uniform vec3 uDecalParams_Stage2;
+uniform vec3 uLightLocation_Stage2;
+uniform vec2 uScale_Stage3;
+uniform vec4 uTexDom_Stage3;
+uniform vec3 uDecalParams_Stage3;
+uniform vec2 ufocalParams_Stage4_c0_c0_c0_c0;
+uniform vec4 uscale01_Stage4_c0_c0_c1_c0;
+uniform vec4 ubias01_Stage4_c0_c0_c1_c0;
+uniform vec4 uscale23_Stage4_c0_c0_c1_c0;
+uniform vec4 ubias23_Stage4_c0_c0_c1_c0;
+uniform float uthreshold_Stage4_c0_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage2;
+uniform sampler2D uTextureSampler_0_Stage3;
+uniform sampler2D uTextureSampler_1_Stage3;
+noperspective in vec2 vEllipseOffsets_Stage0;
+noperspective in vec4 vEllipseRadii_Stage0;
+noperspective in vec4 vinColor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+noperspective in vec2 vTransformedCoords_3_Stage0;
+vec4 light_Stage2(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ vec3 halfDir = normalize(surfaceToLight + vec3(0.0, 0.0, 1.0));
+ float colorScale = uKS_Stage2 * pow(dot(normal, halfDir), uShininess_Stage2);
+ vec3 color = lightColor * clamp(colorScale, 0.0, 1.0);
+ return vec4(color, max(max(color.x, color.y), color.z));
+}
+float sobel_Stage2(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage2(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage2(float m[9], float surfaceScale) {
+ return pointToNormal_Stage2(sobel_Stage2(m[0], m[1], m[3], m[4], m[6], m[7], 0.5), sobel_Stage2(m[0], m[6], m[1], m[7], 0.0, 0.0, 0.33333298563957214), surfaceScale);
+}
+vec4 TwoPointConicalGradientLayout_Stage4_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_3_Stage0;
+ float t = -1.0;
+ float v = 1.0;
+ {
+ {
+ float r0_2 = ufocalParams_Stage4_c0_c0_c0_c0.y;
+ t = r0_2 - p.y * p.y;
+ if (t >= 0.0) {
+ t = p.x + sqrt(t);
+ } else {
+ v = -1.0;
+ }
+ }
+ }
+ _output = vec4(t, v, 0.0, 0.0);
+ return _output;
+}
+vec4 DualIntervalGradientColorizer_Stage4_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthreshold_Stage4_c0_c0_c1_c0) {
+ scale = uscale01_Stage4_c0_c0_c1_c0;
+ bias = ubias01_Stage4_c0_c0_c1_c0;
+ } else {
+ scale = uscale23_Stage4_c0_c0_c1_c0;
+ bias = ubias23_Stage4_c0_c0_c1_c0;
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage4_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage4_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = DualIntervalGradientColorizer_Stage4_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vinColor_Stage0;
+ vec2 offset = vEllipseOffsets_Stage0;
+ float test = dot(offset, offset) - 1.0;
+ vec2 grad = (2.0 * offset) * vEllipseRadii_Stage0.xy;
+ float grad_dot = dot(grad, grad);
+ grad_dot = max(grad_dot, 1.1754999560161448e-38);
+ float invlen = inversesqrt(grad_dot);
+ float edgeAlpha = clamp(0.5 - test * invlen, 0.0, 1.0);
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ vec4 output_Stage1;
+ {
+ vec2 d = gl_FragCoord.xy - uellipse_Stage1.xy;
+ vec2 Z = d * uellipse_Stage1.zw;
+ float implicit = dot(Z, d) - 1.0;
+ float grad_dot = 4.0 * dot(Z, Z);
+ {
+ grad_dot = max(grad_dot, 1.1754999560161448e-38);
+ }
+ float approx_dist = implicit * inversesqrt(grad_dot);
+ float alpha;
+ {
+ alpha = clamp(0.5 + approx_dist, 0.0, 1.0);
+ }
+ output_Stage1 = outputColor_Stage0 * alpha;
+ }
+ vec4 output_Stage2;
+ {
+ vec2 coord = vTransformedCoords_0_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp0 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp5 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp6 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp7 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp8 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = normalize(uLightLocation_Stage2 - vec3(gl_FragCoord.xy, uSurfaceScale_Stage2 * m[4]));
+ output_Stage2 = light_Stage2(normal_Stage2(m, uSurfaceScale_Stage2), surfaceToLight, uLightColor_Stage2);
+ output_Stage2 *= outputCoverage_Stage0;
+ }
+ vec4 output_Stage3;
+ {
+ vec4 dColor = texture(uTextureSampler_0_Stage3, vTransformedCoords_1_Stage0);
+ dColor.xyz = dColor.w < 9.9999999747524271e-07 ? vec3(0.0) : clamp(dColor.xyz / dColor.w, 0.0, 1.0);
+ vec2 cCoords = vTransformedCoords_2_Stage0 + uScale_Stage3 * (dColor.wy - vec2(0.5));
+ {
+ vec2 origCoord = cCoords;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage3.xy, uTexDom_Stage3.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage3, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage3.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage3.y);
+ if (err > uDecalParams_Stage3.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage3.z < 1.0) {
+ err = 0.0;
+ }
+ output_Stage3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ }
+ vec4 output_Stage4;
+ {
+ output_Stage4 = blend_dst_in(output_Stage3, TiledGradientEffect_Stage4_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage1 * output_Stage4;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+uniform mat3 uCoordTransformMatrix_3_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec2 inEllipseOffset;
+in vec4 inEllipseRadii;
+noperspective out vec2 vEllipseOffsets_Stage0;
+noperspective out vec4 vEllipseRadii_Stage0;
+noperspective out vec4 vinColor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+noperspective out vec2 vTransformedCoords_3_Stage0;
+void main() {
+ vEllipseOffsets_Stage0 = inEllipseOffset;
+ vEllipseRadii_Stage0 = inEllipseRadii;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_3_Stage0 = (uCoordTransformMatrix_3_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/352-4.shader_test b/shaders/skia/352-4.shader_test
new file mode 100644
index 0000000..0247bad
--- /dev/null
+++ b/shaders/skia/352-4.shader_test
@@ -0,0 +1,93 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec3 uedges_Stage2_c1_c0[7];
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 ClampFragmentProcessor_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ float alpha = clamp(_input.w, 0.0, 1.0);
+ _output = vec4(clamp(_input.xyz, 0.0, alpha), alpha);
+ }
+ return _output;
+}
+vec4 ConvexPoly_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ float alpha = 1.0;
+ float edge;
+ edge = dot(uedges_Stage2_c1_c0[0], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage2_c1_c0[1], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage2_c1_c0[2], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage2_c1_c0[3], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage2_c1_c0[4], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage2_c1_c0[5], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage2_c1_c0[6], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ alpha = 1.0 - alpha;
+ _output = _input * alpha;
+ return _output;
+}
+float _blend_overlay_component(float sc, float sa, float dc, float da) {
+ if (2.0 * dc <= da) {
+ return (2.0 * sc) * dc;
+ }
+ return sa * da - (2.0 * (da - dc)) * (sa - sc);
+}
+vec4 blend_overlay(vec4 src, vec4 dst) {
+ vec4 result = vec4(_blend_overlay_component(src.x, src.w, dst.x, dst.w), _blend_overlay_component(src.y, src.w, dst.y, dst.w), _blend_overlay_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+ result.xyz += dst.xyz * (1.0 - src.w) + src.xyz * (1.0 - dst.w);
+ return result;
+}
+vec4 blend_hard_light(vec4 src, vec4 dst) {
+ return blend_overlay(dst, src);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ vec4 inputColor = vec4(output_Stage1.xyz, 1.0);
+ output_Stage2 = blend_hard_light(ClampFragmentProcessor_Stage2_c0_c0(inputColor), ConvexPoly_Stage2_c1_c0(inputColor));
+ output_Stage2 *= output_Stage1.w;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/352.shader_test b/shaders/skia/352.shader_test
new file mode 100644
index 0000000..d8470aa
--- /dev/null
+++ b/shaders/skia/352.shader_test
@@ -0,0 +1,145 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage2;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.w) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ } else {
+ {
+ if (t < uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+vec4 ComposeOne_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_dst_in(_input, TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0)));
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = ComposeOne_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 blend_screen(vec4 src, vec4 dst) {
+ return src + (1.0 - src) * dst;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_screen(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ {
+ output_Stage2 = output_Stage1 * ucolor_Stage2;
+ }
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 inColor;
+in vec2 inLocalCoord;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/355-2.shader_test b/shaders/skia/355-2.shader_test
new file mode 100644
index 0000000..c82d727
--- /dev/null
+++ b/shaders/skia/355-2.shader_test
@@ -0,0 +1,352 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_KHR_blend_equation_advanced : require
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+layout (blend_support_all_equations) out ;
+uniform vec4 uColor_Stage0;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+uniform vec2 ufocalParams_Stage2_c1_c0_c0_c0;
+uniform vec4 uscale0_1_Stage2_c1_c0_c1_c0;
+uniform vec4 uscale2_3_Stage2_c1_c0_c1_c0;
+uniform vec4 uscale4_5_Stage2_c1_c0_c1_c0;
+uniform vec4 uscale6_7_Stage2_c1_c0_c1_c0;
+uniform vec4 uscale8_9_Stage2_c1_c0_c1_c0;
+uniform vec4 ubias0_1_Stage2_c1_c0_c1_c0;
+uniform vec4 ubias2_3_Stage2_c1_c0_c1_c0;
+uniform vec4 ubias4_5_Stage2_c1_c0_c1_c0;
+uniform vec4 ubias6_7_Stage2_c1_c0_c1_c0;
+uniform vec4 ubias8_9_Stage2_c1_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage2_c1_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage2_c1_c0_c1_c0;
+uniform vec2 uImageIncrement_Stage3;
+uniform float uSurfaceScale_Stage3;
+uniform vec3 uLightColor_Stage3;
+uniform float uKD_Stage3;
+uniform vec4 uTexDom_Stage3;
+uniform vec3 uDecalParams_Stage3;
+uniform vec3 uLightLocation_Stage3;
+uniform sampler2D uTextureSampler_0_Stage3;
+noperspective in vec3 vDashParam_Stage0;
+noperspective in vec2 vCircleParams_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 TwoPointConicalGradientLayout_Stage2_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_1_Stage0;
+ float t = -1.0;
+ float v = 1.0;
+ {
+ {
+ float r0_2 = ufocalParams_Stage2_c1_c0_c0_c0.y;
+ t = r0_2 - p.y * p.y;
+ if (t >= 0.0) {
+ t = p.x + sqrt(t);
+ } else {
+ v = -1.0;
+ }
+ }
+ }
+ _output = vec4(t, v, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage2_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthresholds1_7_Stage2_c1_c0_c1_c0.w) {
+ if (t < uthresholds1_7_Stage2_c1_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage2_c1_c0_c1_c0.x) {
+ scale = uscale0_1_Stage2_c1_c0_c1_c0;
+ bias = ubias0_1_Stage2_c1_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage2_c1_c0_c1_c0;
+ bias = ubias2_3_Stage2_c1_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage2_c1_c0_c1_c0.z) {
+ scale = uscale4_5_Stage2_c1_c0_c1_c0;
+ bias = ubias4_5_Stage2_c1_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage2_c1_c0_c1_c0;
+ bias = ubias6_7_Stage2_c1_c0_c1_c0;
+ }
+ }
+ } else {
+ {
+ {
+ scale = uscale8_9_Stage2_c1_c0_c1_c0;
+ bias = ubias8_9_Stage2_c1_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage2_c1_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else {
+ {
+ t.x = fract(t.x);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage2_c1_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 light_Stage3(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ float colorScale = uKD_Stage3 * dot(normal, surfaceToLight);
+ return vec4(lightColor * clamp(colorScale, 0.0, 1.0), 1.0);
+}
+float sobel_Stage3(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage3(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage3(float m[9], float surfaceScale) {
+ return pointToNormal_Stage3(sobel_Stage3(m[0], m[2], m[3], m[5], 0.0, 0.0, 0.33333298563957214), sobel_Stage3(m[0], m[3], m[1], m[4], m[2], m[5], 0.5), surfaceScale);
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = uColor_Stage0;
+ float xShifted = vDashParam_Stage0.x - floor(vDashParam_Stage0.x / vDashParam_Stage0.z) * vDashParam_Stage0.z;
+ vec2 fragPosShifted = vec2(xShifted, vDashParam_Stage0.y);
+ vec2 center = vec2(vCircleParams_Stage0.y, 0.0);
+ float dist = length(center - fragPosShifted);
+ float diff = dist - vCircleParams_Stage0.x;
+ diff = 1.0 - diff;
+ float alpha = clamp(diff, 0.0, 1.0);
+ outputCoverage_Stage0 = vec4(alpha);
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_dst_in(outputColor_Stage0, ClampedGradientEffect_Stage1_c0_c0(vec4(1.0)));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_dst_in(outputCoverage_Stage0, TiledGradientEffect_Stage2_c1_c0(vec4(1.0)));
+ }
+ vec4 output_Stage3;
+ {
+ vec2 coord = vTransformedCoords_2_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage3;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage3.xy, uTexDom_Stage3.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage3, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage3.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage3.y);
+ if (err > uDecalParams_Stage3.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage3.z < 1.0) {
+ err = 0.0;
+ }
+ temp0 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage3;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage3.xy, uTexDom_Stage3.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage3, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage3.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage3.y);
+ if (err > uDecalParams_Stage3.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage3.z < 1.0) {
+ err = 0.0;
+ }
+ temp1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage3;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage3.xy, uTexDom_Stage3.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage3, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage3.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage3.y);
+ if (err > uDecalParams_Stage3.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage3.z < 1.0) {
+ err = 0.0;
+ }
+ temp2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage3;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage3.xy, uTexDom_Stage3.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage3, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage3.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage3.y);
+ if (err > uDecalParams_Stage3.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage3.z < 1.0) {
+ err = 0.0;
+ }
+ temp3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage3.xy, uTexDom_Stage3.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage3, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage3.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage3.y);
+ if (err > uDecalParams_Stage3.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage3.z < 1.0) {
+ err = 0.0;
+ }
+ temp4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage3;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage3.xy, uTexDom_Stage3.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage3, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage3.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage3.y);
+ if (err > uDecalParams_Stage3.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage3.z < 1.0) {
+ err = 0.0;
+ }
+ temp5 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage3;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage3.xy, uTexDom_Stage3.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage3, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage3.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage3.y);
+ if (err > uDecalParams_Stage3.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage3.z < 1.0) {
+ err = 0.0;
+ }
+ temp6 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage3;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage3.xy, uTexDom_Stage3.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage3, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage3.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage3.y);
+ if (err > uDecalParams_Stage3.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage3.z < 1.0) {
+ err = 0.0;
+ }
+ temp7 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage3;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage3.xy, uTexDom_Stage3.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage3, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage3.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage3.y);
+ if (err > uDecalParams_Stage3.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage3.z < 1.0) {
+ err = 0.0;
+ }
+ temp8 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = normalize(uLightLocation_Stage3 - vec3(gl_FragCoord.xy, uSurfaceScale_Stage3 * m[4]));
+ output_Stage3 = light_Stage3(normal_Stage3(m, uSurfaceScale_Stage3), surfaceToLight, uLightColor_Stage3);
+ output_Stage3 *= output_Stage2;
+ }
+ {
+ sk_FragColor = output_Stage3 * output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+in vec2 inPosition;
+in vec3 inDashParams;
+in vec2 inCircleParams;
+noperspective out vec3 vDashParam_Stage0;
+noperspective out vec2 vCircleParams_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+void main() {
+ vDashParam_Stage0 = inDashParams;
+ vCircleParams_Stage0 = inCircleParams;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/355-3.shader_test b/shaders/skia/355-3.shader_test
new file mode 100644
index 0000000..1514f00
--- /dev/null
+++ b/shaders/skia/355-3.shader_test
@@ -0,0 +1,47 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 urectUniform_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ float alpha;
+ {
+ alpha = float(all(greaterThan(vec4(gl_FragCoord.xy, urectUniform_Stage2.zw), vec4(urectUniform_Stage2.xy, gl_FragCoord.xy))) ? 1 : 0);
+ }
+ {
+ alpha = 1.0 - alpha;
+ }
+ output_Stage2 = output_Stage1 * alpha;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/355-4.shader_test b/shaders/skia/355-4.shader_test
new file mode 100644
index 0000000..42350ea
--- /dev/null
+++ b/shaders/skia/355-4.shader_test
@@ -0,0 +1,222 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage2_c0_c0;
+uniform float uSurfaceScale_Stage2_c0_c0;
+uniform vec3 uLightColor_Stage2_c0_c0;
+uniform float uKS_Stage2_c0_c0;
+uniform float uShininess_Stage2_c0_c0;
+uniform vec4 uTexDom_Stage2_c0_c0;
+uniform vec3 uDecalParams_Stage2_c0_c0;
+uniform vec3 uLightDirection_Stage2_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 light_Stage2_c0_c0(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ vec3 halfDir = normalize(surfaceToLight + vec3(0.0, 0.0, 1.0));
+ float colorScale = uKS_Stage2_c0_c0 * pow(dot(normal, halfDir), uShininess_Stage2_c0_c0);
+ vec3 color = lightColor * clamp(colorScale, 0.0, 1.0);
+ return vec4(color, max(max(color.x, color.y), color.z));
+}
+float sobel_Stage2_c0_c0(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage2_c0_c0(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage2_c0_c0(float m[9], float surfaceScale) {
+ return pointToNormal_Stage2_c0_c0(sobel_Stage2_c0_c0(m[0], m[1], m[3], m[4], m[6], m[7], 0.5), sobel_Stage2_c0_c0(m[0], m[6], m[1], m[7], 0.0, 0.0, 0.33333298563957214), surfaceScale);
+}
+vec4 SpecularLighting_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coord = vTransformedCoords_1_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c0_c0.y);
+ if (err > uDecalParams_Stage2_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp0 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c0_c0.y);
+ if (err > uDecalParams_Stage2_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c0_c0.y);
+ if (err > uDecalParams_Stage2_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c0_c0.y);
+ if (err > uDecalParams_Stage2_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c0_c0.y);
+ if (err > uDecalParams_Stage2_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c0_c0.y);
+ if (err > uDecalParams_Stage2_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp5 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c0_c0.y);
+ if (err > uDecalParams_Stage2_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp6 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c0_c0.y);
+ if (err > uDecalParams_Stage2_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp7 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c0_c0.y);
+ if (err > uDecalParams_Stage2_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp8 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = uLightDirection_Stage2_c0_c0;
+ _output = light_Stage2_c0_c0(normal_Stage2_c0_c0(m, uSurfaceScale_Stage2_c0_c0), surfaceToLight, uLightColor_Stage2_c0_c0);
+ _output *= _input;
+ return _output;
+}
+vec4 ClampFragmentProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ float alpha = clamp(_input.w, 0.0, 1.0);
+ _output = vec4(clamp(_input.xyz, 0.0, alpha), alpha);
+ }
+ return _output;
+}
+vec4 blend_dst_over(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src + dst;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ vec4 inputColor = vec4(output_Stage1.xyz, 1.0);
+ output_Stage2 = blend_dst_over(SpecularLighting_Stage2_c0_c0(inputColor), ClampFragmentProcessor_Stage2_c1_c0(inputColor));
+ output_Stage2 *= output_Stage1.w;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/355.shader_test b/shaders/skia/355.shader_test
new file mode 100644
index 0000000..bef72d6
--- /dev/null
+++ b/shaders/skia/355.shader_test
@@ -0,0 +1,68 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 ucolor_Stage1_c0_c0_c0_c0;
+uniform vec4 ucolor_Stage2;
+noperspective in vec4 vcolor_Stage0;
+vec4 ConstColorProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = _input.w * ucolor_Stage1_c0_c0_c0_c0;
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = ConstColorProcessor_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 blend_screen(vec4 src, vec4 dst) {
+ return src + (1.0 - src) * dst;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_screen(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ {
+ output_Stage2 = output_Stage1 * ucolor_Stage2;
+ }
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 position;
+in vec4 inColor;
+noperspective out vec4 vcolor_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/358-2.shader_test b/shaders/skia/358-2.shader_test
new file mode 100644
index 0000000..5933546
--- /dev/null
+++ b/shaders/skia/358-2.shader_test
@@ -0,0 +1,149 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale8_9_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias8_9_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vEllipseOffsets_Stage0;
+noperspective in vec4 vEllipseRadii_Stage0;
+noperspective in vec4 vinColor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_0_Stage0;
+ float t = -1.0;
+ float v = 1.0;
+ {
+ {
+ float r0_2 = ufocalParams_Stage1_c0_c0_c0_c0.y;
+ t = r0_2 - p.y * p.y;
+ if (t >= 0.0) {
+ t = p.x + sqrt(t);
+ } else {
+ v = -1.0;
+ }
+ }
+ }
+ _output = vec4(t, v, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.w) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c1_c0;
+ }
+ }
+ } else {
+ {
+ {
+ scale = uscale8_9_Stage1_c0_c0_c1_c0;
+ bias = ubias8_9_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else {
+ {
+ t.x = fract(t.x);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ vec2 offset = vEllipseOffsets_Stage0;
+ offset *= vEllipseRadii_Stage0.xy;
+ float test = dot(offset, offset) - 1.0;
+ vec2 grad = (2.0 * offset) * vEllipseRadii_Stage0.xy;
+ float grad_dot = dot(grad, grad);
+ grad_dot = max(grad_dot, 1.1754999560161448e-38);
+ float invlen = inversesqrt(grad_dot);
+ float edgeAlpha = clamp(0.5 - test * invlen, 0.0, 1.0);
+ offset = vEllipseOffsets_Stage0 * vEllipseRadii_Stage0.zw;
+ test = dot(offset, offset) - 1.0;
+ grad = (2.0 * offset) * vEllipseRadii_Stage0.zw;
+ grad_dot = dot(grad, grad);
+ invlen = inversesqrt(grad_dot);
+ edgeAlpha *= clamp(0.5 + test * invlen, 0.0, 1.0);
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_dst_in(outputCoverage_Stage0, TiledGradientEffect_Stage1_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec2 inEllipseOffset;
+in vec4 inEllipseRadii;
+noperspective out vec2 vEllipseOffsets_Stage0;
+noperspective out vec4 vEllipseRadii_Stage0;
+noperspective out vec4 vinColor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vEllipseOffsets_Stage0 = inEllipseOffset;
+ vEllipseRadii_Stage0 = inEllipseRadii;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/358-3.shader_test b/shaders/skia/358-3.shader_test
new file mode 100644
index 0000000..8beefde
--- /dev/null
+++ b/shaders/skia/358-3.shader_test
@@ -0,0 +1,43 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 ucircleData_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ vec2 vec = vec2((gl_FragCoord.x - ucircleData_Stage2.x) * ucircleData_Stage2.w, (gl_FragCoord.y - ucircleData_Stage2.y) * ucircleData_Stage2.w);
+ float dist = length(vec) + (0.5 - ucircleData_Stage2.z) * ucircleData_Stage2.w;
+ output_Stage2 = output_Stage1 * texture(uTextureSampler_0_Stage2, vec2(dist, 0.5)).w;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/358-4.shader_test b/shaders/skia/358-4.shader_test
new file mode 100644
index 0000000..bbf1bc8
--- /dev/null
+++ b/shaders/skia/358-4.shader_test
@@ -0,0 +1,57 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 ucolor_Stage2_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 ConstColorProcessor_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c0_c0;
+ }
+ return _output;
+}
+vec4 ClampFragmentProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = clamp(_input, 0.0, 1.0);
+ }
+ return _output;
+}
+vec4 blend_xor(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src + (1.0 - src.w) * dst;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ vec4 inputColor = vec4(output_Stage1.xyz, 1.0);
+ output_Stage2 = blend_xor(ConstColorProcessor_Stage2_c0_c0(inputColor), ClampFragmentProcessor_Stage2_c1_c0(inputColor));
+ output_Stage2 *= output_Stage1.w;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/358.shader_test b/shaders/skia/358.shader_test
new file mode 100644
index 0000000..b353128
--- /dev/null
+++ b/shaders/skia/358.shader_test
@@ -0,0 +1,165 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage2;
+uniform vec4 ucolor_Stage3_c1_c0;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.w) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ } else {
+ {
+ if (t < uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+vec4 ComposeOne_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_dst_in(_input, TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0)));
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = ComposeOne_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 ConstColorProcessor_Stage3_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage3_c1_c0;
+ }
+ return _output;
+}
+vec4 blend_screen(vec4 src, vec4 dst) {
+ return src + (1.0 - src) * dst;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 blend_darken(vec4 src, vec4 dst) {
+ vec4 result = blend_src_over(src, dst);
+ result.xyz = min(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
+ return result;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_screen(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ {
+ output_Stage2 = output_Stage1 * ucolor_Stage2;
+ }
+ }
+ vec4 output_Stage3;
+ {
+ output_Stage3 = blend_darken(ConstColorProcessor_Stage3_c1_c0(vec4(1.0)), output_Stage2);
+ }
+ {
+ sk_FragColor = output_Stage3;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 inColor;
+in vec2 inLocalCoord;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/361-2.shader_test b/shaders/skia/361-2.shader_test
new file mode 100644
index 0000000..18419b2
--- /dev/null
+++ b/shaders/skia/361-2.shader_test
@@ -0,0 +1,376 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_KHR_blend_equation_advanced : require
+out vec4 sk_FragColor;
+layout (blend_support_all_equations) out ;
+uniform vec4 uleftBorderColor_Stage2_c0_c0;
+uniform vec4 urightBorderColor_Stage2_c0_c0;
+uniform float ubias_Stage2_c0_c0_c0_c0;
+uniform float uscale_Stage2_c0_c0_c0_c0;
+uniform vec4 uscale01_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias01_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale23_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias23_Stage2_c0_c0_c1_c0;
+uniform float uthreshold_Stage2_c0_c0_c1_c0;
+uniform vec4 uleftBorderColor_Stage3_c1_c0;
+uniform vec4 urightBorderColor_Stage3_c1_c0;
+uniform vec4 uscale0_1_Stage3_c1_c0_c1_c0;
+uniform vec4 uscale2_3_Stage3_c1_c0_c1_c0;
+uniform vec4 uscale4_5_Stage3_c1_c0_c1_c0;
+uniform vec4 ubias0_1_Stage3_c1_c0_c1_c0;
+uniform vec4 ubias2_3_Stage3_c1_c0_c1_c0;
+uniform vec4 ubias4_5_Stage3_c1_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage3_c1_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage3_c1_c0_c1_c0;
+uniform vec2 uImageIncrement_Stage4;
+uniform vec2 uBounds_Stage4;
+uniform vec4 uKernel_Stage4[5];
+uniform vec2 ubaseFrequency_Stage5;
+uniform float uz_Stage5;
+uniform vec4 uleftBorderColor_Stage6_c2_c0;
+uniform vec4 urightBorderColor_Stage6_c2_c0;
+uniform float ubias_Stage6_c2_c0_c0_c0;
+uniform float uscale_Stage6_c2_c0_c0_c0;
+uniform vec4 uscale0_1_Stage6_c2_c0_c1_c0;
+uniform vec4 uscale2_3_Stage6_c2_c0_c1_c0;
+uniform vec4 uscale4_5_Stage6_c2_c0_c1_c0;
+uniform vec4 uscale6_7_Stage6_c2_c0_c1_c0;
+uniform vec4 ubias0_1_Stage6_c2_c0_c1_c0;
+uniform vec4 ubias2_3_Stage6_c2_c0_c1_c0;
+uniform vec4 ubias4_5_Stage6_c2_c0_c1_c0;
+uniform vec4 ubias6_7_Stage6_c2_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage6_c2_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage6_c2_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage4;
+uniform sampler2D uTextureSampler_0_Stage5;
+uniform sampler2D uTextureSampler_1_Stage5;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+noperspective in vec2 vTransformedCoords_3_Stage0;
+noperspective in vec2 vTransformedCoords_4_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 SweepGradientLayout_Stage2_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float angle;
+ {
+ angle = atan(-vTransformedCoords_0_Stage0.y, -vTransformedCoords_0_Stage0.x);
+ }
+ float t = ((angle * 0.15915493667125702 + 0.5) + ubias_Stage2_c0_c0_c0_c0) * uscale_Stage2_c0_c0_c0_c0;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 DualIntervalGradientColorizer_Stage2_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthreshold_Stage2_c0_c0_c1_c0) {
+ scale = uscale01_Stage2_c0_c0_c1_c0;
+ bias = ubias01_Stage2_c0_c0_c1_c0;
+ } else {
+ scale = uscale23_Stage2_c0_c0_c1_c0;
+ bias = ubias23_Stage2_c0_c0_c1_c0;
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = SweepGradientLayout_Stage2_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage2_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage2_c0_c0;
+ } else {
+ _output = DualIntervalGradientColorizer_Stage2_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 LinearGradientLayout_Stage3_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_1_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage3_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage3_c1_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage3_c1_c0_c1_c0.x) {
+ scale = uscale0_1_Stage3_c1_c0_c1_c0;
+ bias = ubias0_1_Stage3_c1_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage3_c1_c0_c1_c0;
+ bias = ubias2_3_Stage3_c1_c0_c1_c0;
+ }
+ } else {
+ {
+ scale = uscale4_5_Stage3_c1_c0_c1_c0;
+ bias = ubias4_5_Stage3_c1_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage3_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage3_c1_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage3_c1_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage3_c1_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage3_c1_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec3 fade_Stage5(vec3 t) {
+ return ((t * t) * t) * (t * (t * 6.0 - 15.0) + 10.0);
+}
+float perm_Stage5(float x) {
+ return texture(uTextureSampler_0_Stage5, vec2(fract(x / 256.0), 0.0)).x * 255.0;
+}
+float grad_Stage5(float x, vec3 p) {
+ return dot(texture(uTextureSampler_1_Stage5, vec2(fract(x / 16.0), 0.0)).xyz * 255.0 - vec3(1.0), p);
+}
+float lerp_Stage5(float a, float b, float w) {
+ return a + w * (b - a);
+}
+float noise_Stage5(vec3 p) {
+ vec3 P = mod(floor(p), 256.0);
+ p -= floor(p);
+ vec3 f = fade_Stage5(p);
+ float A = perm_Stage5(P.x) + P.y;
+ float AA = perm_Stage5(A) + P.z;
+ float AB = perm_Stage5(A + 1.0) + P.z;
+ float B = perm_Stage5(P.x + 1.0) + P.y;
+ float BA = perm_Stage5(B) + P.z;
+ float BB = perm_Stage5(B + 1.0) + P.z;
+ float result = lerp_Stage5(lerp_Stage5(lerp_Stage5(grad_Stage5(perm_Stage5(AA), p), grad_Stage5(perm_Stage5(BA), p + vec3(-1.0, 0.0, 0.0)), f.x), lerp_Stage5(grad_Stage5(perm_Stage5(AB), p + vec3(0.0, -1.0, 0.0)), grad_Stage5(perm_Stage5(BB), p + vec3(-1.0, -1.0, 0.0)), f.x), f.y), lerp_Stage5(lerp_Stage5(grad_Stage5(perm_Stage5(AA + 1.0), p + vec3(0.0, 0.0, -1.0)), grad_Stage5(perm_Stage5(BA + 1.0), p + vec3(-1.0, 0.0, -1.0)), f.x), lerp_Stage5(grad_Stage5(perm_Stage5(AB + 1.0), p + vec3(0.0, -1.0, -1.0)), grad_Stage5(perm_Stage5(BB + 1.0), p + vec3(-1.0, -1.0, -1.0)), f.x), f.y), f.z);
+ return result;
+}
+float noiseOctaves_Stage5(vec3 p) {
+ float result = 0.0;
+ float ratio = 1.0;
+ for (float i = 0.0;i < 2.0; i++) {
+ result += noise_Stage5(p) / ratio;
+ p *= 2.0;
+ ratio *= 2.0;
+ }
+ return (result + 1.0) / 2.0;
+}
+vec4 SweepGradientLayout_Stage6_c2_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float angle;
+ {
+ angle = atan(-vTransformedCoords_4_Stage0.y, -vTransformedCoords_4_Stage0.x);
+ }
+ float t = ((angle * 0.15915493667125702 + 0.5) + ubias_Stage6_c2_c0_c0_c0) * uscale_Stage6_c2_c0_c0_c0;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage6_c2_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage6_c2_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage6_c2_c0_c1_c0.x) {
+ scale = uscale0_1_Stage6_c2_c0_c1_c0;
+ bias = ubias0_1_Stage6_c2_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage6_c2_c0_c1_c0;
+ bias = ubias2_3_Stage6_c2_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage6_c2_c0_c1_c0.z) {
+ scale = uscale4_5_Stage6_c2_c0_c1_c0;
+ bias = ubias4_5_Stage6_c2_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage6_c2_c0_c1_c0;
+ bias = ubias6_7_Stage6_c2_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage6_c2_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = SweepGradientLayout_Stage6_c2_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage6_c2_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage6_c2_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage6_c2_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_dst_in(vec4(1.0), ClampedGradientEffect_Stage2_c0_c0(vec4(1.0)));
+ }
+ vec4 output_Stage3;
+ {
+ output_Stage3 = blend_dst_in(output_Stage2, ClampedGradientEffect_Stage3_c1_c0(vec4(1.0)));
+ }
+ vec4 output_Stage4;
+ {
+ output_Stage4 = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_2_Stage0 - 9.0 * uImageIncrement_Stage4;
+ vec2 coordSampled = vec2(0.0, 0.0);
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage4.x, uBounds_Stage4.y - uBounds_Stage4.x) + uBounds_Stage4.x;
+ output_Stage4 += texture(uTextureSampler_0_Stage4, coordSampled) * uKernel_Stage4[0].x;
+ coord += uImageIncrement_Stage4;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage4.x, uBounds_Stage4.y - uBounds_Stage4.x) + uBounds_Stage4.x;
+ output_Stage4 += texture(uTextureSampler_0_Stage4, coordSampled) * uKernel_Stage4[0].y;
+ coord += uImageIncrement_Stage4;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage4.x, uBounds_Stage4.y - uBounds_Stage4.x) + uBounds_Stage4.x;
+ output_Stage4 += texture(uTextureSampler_0_Stage4, coordSampled) * uKernel_Stage4[0].z;
+ coord += uImageIncrement_Stage4;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage4.x, uBounds_Stage4.y - uBounds_Stage4.x) + uBounds_Stage4.x;
+ output_Stage4 += texture(uTextureSampler_0_Stage4, coordSampled) * uKernel_Stage4[0].w;
+ coord += uImageIncrement_Stage4;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage4.x, uBounds_Stage4.y - uBounds_Stage4.x) + uBounds_Stage4.x;
+ output_Stage4 += texture(uTextureSampler_0_Stage4, coordSampled) * uKernel_Stage4[1].x;
+ coord += uImageIncrement_Stage4;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage4.x, uBounds_Stage4.y - uBounds_Stage4.x) + uBounds_Stage4.x;
+ output_Stage4 += texture(uTextureSampler_0_Stage4, coordSampled) * uKernel_Stage4[1].y;
+ coord += uImageIncrement_Stage4;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage4.x, uBounds_Stage4.y - uBounds_Stage4.x) + uBounds_Stage4.x;
+ output_Stage4 += texture(uTextureSampler_0_Stage4, coordSampled) * uKernel_Stage4[1].z;
+ coord += uImageIncrement_Stage4;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage4.x, uBounds_Stage4.y - uBounds_Stage4.x) + uBounds_Stage4.x;
+ output_Stage4 += texture(uTextureSampler_0_Stage4, coordSampled) * uKernel_Stage4[1].w;
+ coord += uImageIncrement_Stage4;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage4.x, uBounds_Stage4.y - uBounds_Stage4.x) + uBounds_Stage4.x;
+ output_Stage4 += texture(uTextureSampler_0_Stage4, coordSampled) * uKernel_Stage4[2].x;
+ coord += uImageIncrement_Stage4;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage4.x, uBounds_Stage4.y - uBounds_Stage4.x) + uBounds_Stage4.x;
+ output_Stage4 += texture(uTextureSampler_0_Stage4, coordSampled) * uKernel_Stage4[2].y;
+ coord += uImageIncrement_Stage4;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage4.x, uBounds_Stage4.y - uBounds_Stage4.x) + uBounds_Stage4.x;
+ output_Stage4 += texture(uTextureSampler_0_Stage4, coordSampled) * uKernel_Stage4[2].z;
+ coord += uImageIncrement_Stage4;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage4.x, uBounds_Stage4.y - uBounds_Stage4.x) + uBounds_Stage4.x;
+ output_Stage4 += texture(uTextureSampler_0_Stage4, coordSampled) * uKernel_Stage4[2].w;
+ coord += uImageIncrement_Stage4;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage4.x, uBounds_Stage4.y - uBounds_Stage4.x) + uBounds_Stage4.x;
+ output_Stage4 += texture(uTextureSampler_0_Stage4, coordSampled) * uKernel_Stage4[3].x;
+ coord += uImageIncrement_Stage4;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage4.x, uBounds_Stage4.y - uBounds_Stage4.x) + uBounds_Stage4.x;
+ output_Stage4 += texture(uTextureSampler_0_Stage4, coordSampled) * uKernel_Stage4[3].y;
+ coord += uImageIncrement_Stage4;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage4.x, uBounds_Stage4.y - uBounds_Stage4.x) + uBounds_Stage4.x;
+ output_Stage4 += texture(uTextureSampler_0_Stage4, coordSampled) * uKernel_Stage4[3].z;
+ coord += uImageIncrement_Stage4;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage4.x, uBounds_Stage4.y - uBounds_Stage4.x) + uBounds_Stage4.x;
+ output_Stage4 += texture(uTextureSampler_0_Stage4, coordSampled) * uKernel_Stage4[3].w;
+ coord += uImageIncrement_Stage4;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage4.x, uBounds_Stage4.y - uBounds_Stage4.x) + uBounds_Stage4.x;
+ output_Stage4 += texture(uTextureSampler_0_Stage4, coordSampled) * uKernel_Stage4[4].x;
+ coord += uImageIncrement_Stage4;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage4.x, uBounds_Stage4.y - uBounds_Stage4.x) + uBounds_Stage4.x;
+ output_Stage4 += texture(uTextureSampler_0_Stage4, coordSampled) * uKernel_Stage4[4].y;
+ coord += uImageIncrement_Stage4;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage4.x, uBounds_Stage4.y - uBounds_Stage4.x) + uBounds_Stage4.x;
+ output_Stage4 += texture(uTextureSampler_0_Stage4, coordSampled) * uKernel_Stage4[4].z;
+ coord += uImageIncrement_Stage4;
+ output_Stage4 *= output_Stage3;
+ }
+ vec4 output_Stage5;
+ {
+ vec2 coords = vTransformedCoords_3_Stage0 * ubaseFrequency_Stage5;
+ float r = noiseOctaves_Stage5(vec3(coords, uz_Stage5));
+ float g = noiseOctaves_Stage5(vec3(coords, uz_Stage5));
+ float b = noiseOctaves_Stage5(vec3(coords, uz_Stage5));
+ float a = noiseOctaves_Stage5(vec3(coords, uz_Stage5));
+ output_Stage5 = vec4(r, g, b, a);
+ output_Stage5 = clamp(output_Stage5, 0.0, 1.0);
+ output_Stage5 = vec4(output_Stage5.xyz * output_Stage5.www, output_Stage5.w);
+ }
+ vec4 output_Stage6;
+ {
+ output_Stage6 = blend_dst_in(output_Stage5, ClampedGradientEffect_Stage6_c2_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage6 * outputColor_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+uniform mat3 uCoordTransformMatrix_3_Stage0;
+uniform mat3 uCoordTransformMatrix_4_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+noperspective out vec2 vTransformedCoords_3_Stage0;
+noperspective out vec2 vTransformedCoords_4_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_3_Stage0 = (uCoordTransformMatrix_3_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_4_Stage0 = (uCoordTransformMatrix_4_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/361-3.shader_test b/shaders/skia/361-3.shader_test
new file mode 100644
index 0000000..b0a69a2
--- /dev/null
+++ b/shaders/skia/361-3.shader_test
@@ -0,0 +1,40 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ {
+ float alpha = clamp(output_Stage1.w, 0.0, 1.0);
+ output_Stage2 = vec4(clamp(output_Stage1.xyz, 0.0, alpha), alpha);
+ }
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/361-4.shader_test b/shaders/skia/361-4.shader_test
new file mode 100644
index 0000000..5883310
--- /dev/null
+++ b/shaders/skia/361-4.shader_test
@@ -0,0 +1,58 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 ucolor_Stage2_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 ClampFragmentProcessor_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ float alpha = clamp(_input.w, 0.0, 1.0);
+ _output = vec4(clamp(_input.xyz, 0.0, alpha), alpha);
+ }
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = _input.w * ucolor_Stage2_c1_c0;
+ }
+ return _output;
+}
+vec4 blend_difference(vec4 src, vec4 dst) {
+ return vec4((src.xyz + dst.xyz) - 2.0 * min(src.xyz * dst.w, dst.xyz * src.w), src.w + (1.0 - src.w) * dst.w);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ vec4 inputColor = vec4(output_Stage1.xyz, 1.0);
+ output_Stage2 = blend_difference(ClampFragmentProcessor_Stage2_c0_c0(inputColor), ConstColorProcessor_Stage2_c1_c0(inputColor));
+ output_Stage2 *= output_Stage1.w;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/361.shader_test b/shaders/skia/361.shader_test
new file mode 100644
index 0000000..4767da4
--- /dev/null
+++ b/shaders/skia/361.shader_test
@@ -0,0 +1,88 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 ucolor_Stage1_c0_c0_c0_c0;
+uniform vec4 ucolor_Stage2;
+uniform vec4 ucolor_Stage3_c1_c0;
+noperspective in vec4 vcolor_Stage0;
+vec4 ConstColorProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = _input.w * ucolor_Stage1_c0_c0_c0_c0;
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = ConstColorProcessor_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 ConstColorProcessor_Stage3_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage3_c1_c0;
+ }
+ return _output;
+}
+vec4 blend_screen(vec4 src, vec4 dst) {
+ return src + (1.0 - src) * dst;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 blend_darken(vec4 src, vec4 dst) {
+ vec4 result = blend_src_over(src, dst);
+ result.xyz = min(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
+ return result;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_screen(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ {
+ output_Stage2 = output_Stage1 * ucolor_Stage2;
+ }
+ }
+ vec4 output_Stage3;
+ {
+ output_Stage3 = blend_darken(ConstColorProcessor_Stage3_c1_c0(vec4(1.0)), output_Stage2);
+ }
+ {
+ sk_FragColor = output_Stage3;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 position;
+in vec4 inColor;
+noperspective out vec4 vcolor_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/364-2.shader_test b/shaders/skia/364-2.shader_test
new file mode 100644
index 0000000..610719c
--- /dev/null
+++ b/shaders/skia/364-2.shader_test
@@ -0,0 +1,56 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+noperspective in vec4 vinCircleEdge_Stage0;
+noperspective in vec3 vinClipPlane_Stage0;
+noperspective in vec3 vinIsectPlane_Stage0;
+noperspective in vec4 vinColor_Stage0;
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ vec4 circleEdge;
+ circleEdge = vinCircleEdge_Stage0;
+ vec3 clipPlane;
+ clipPlane = vinClipPlane_Stage0;
+ vec3 isectPlane;
+ isectPlane = vinIsectPlane_Stage0;
+ float d = length(circleEdge.xy);
+ float distanceToOuterEdge = circleEdge.z * (1.0 - d);
+ float edgeAlpha = clamp(distanceToOuterEdge, 0.0, 1.0);
+ float clip = clamp(circleEdge.z * dot(circleEdge.xy, clipPlane.xy) + clipPlane.z, 0.0, 1.0);
+ clip *= clamp(circleEdge.z * dot(circleEdge.xy, isectPlane.xy) + isectPlane.z, 0.0, 1.0);
+ edgeAlpha *= clip;
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ {
+ sk_FragColor = outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 inPosition;
+in vec4 inColor;
+in vec4 inCircleEdge;
+in vec3 inClipPlane;
+in vec3 inIsectPlane;
+noperspective out vec4 vinCircleEdge_Stage0;
+noperspective out vec3 vinClipPlane_Stage0;
+noperspective out vec3 vinIsectPlane_Stage0;
+noperspective out vec4 vinColor_Stage0;
+void main() {
+ vinCircleEdge_Stage0 = inCircleEdge;
+ vinClipPlane_Stage0 = inClipPlane;
+ vinIsectPlane_Stage0 = inIsectPlane;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = inPosition;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/364-4.shader_test b/shaders/skia/364-4.shader_test
new file mode 100644
index 0000000..9623b37
--- /dev/null
+++ b/shaders/skia/364-4.shader_test
@@ -0,0 +1,86 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage2_c0_c0;
+uniform vec2 uBounds_Stage2_c0_c0;
+uniform vec4 uKernel_Stage2_c0_c0[2];
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 GaussianConvolution_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_1_Stage0 - 2.0 * uImageIncrement_Stage2_c0_c0;
+ vec2 coordSampled = vec2(0.0, 0.0);
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage2_c0_c0.x, uBounds_Stage2_c0_c0.y - uBounds_Stage2_c0_c0.x) + uBounds_Stage2_c0_c0.x;
+ _output += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2_c0_c0[0].x;
+ coord += uImageIncrement_Stage2_c0_c0;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage2_c0_c0.x, uBounds_Stage2_c0_c0.y - uBounds_Stage2_c0_c0.x) + uBounds_Stage2_c0_c0.x;
+ _output += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2_c0_c0[0].y;
+ coord += uImageIncrement_Stage2_c0_c0;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage2_c0_c0.x, uBounds_Stage2_c0_c0.y - uBounds_Stage2_c0_c0.x) + uBounds_Stage2_c0_c0.x;
+ _output += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2_c0_c0[0].z;
+ coord += uImageIncrement_Stage2_c0_c0;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage2_c0_c0.x, uBounds_Stage2_c0_c0.y - uBounds_Stage2_c0_c0.x) + uBounds_Stage2_c0_c0.x;
+ _output += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2_c0_c0[0].w;
+ coord += uImageIncrement_Stage2_c0_c0;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage2_c0_c0.x, uBounds_Stage2_c0_c0.y - uBounds_Stage2_c0_c0.x) + uBounds_Stage2_c0_c0.x;
+ _output += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2_c0_c0[1].x;
+ coord += uImageIncrement_Stage2_c0_c0;
+ _output *= _input;
+ return _output;
+}
+vec4 ClampFragmentProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ float alpha = clamp(_input.w, 0.0, 1.0);
+ _output = vec4(clamp(_input.xyz, 0.0, alpha), alpha);
+ }
+ return _output;
+}
+vec4 blend_exclusion(vec4 src, vec4 dst) {
+ return vec4((dst.xyz + src.xyz) - (2.0 * dst.xyz) * src.xyz, src.w + (1.0 - src.w) * dst.w);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ vec4 inputColor = vec4(output_Stage1.xyz, 1.0);
+ output_Stage2 = blend_exclusion(GaussianConvolution_Stage2_c0_c0(inputColor), ClampFragmentProcessor_Stage2_c1_c0(inputColor));
+ output_Stage2 *= output_Stage1.w;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/364.shader_test b/shaders/skia/364.shader_test
new file mode 100644
index 0000000..c7e04db
--- /dev/null
+++ b/shaders/skia/364.shader_test
@@ -0,0 +1,140 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.w) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ } else {
+ {
+ if (t < uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = OverrideInputFragmentProcessor_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+float _blend_overlay_component(float sc, float sa, float dc, float da) {
+ if (2.0 * dc <= da) {
+ return (2.0 * sc) * dc;
+ }
+ return sa * da - (2.0 * (da - dc)) * (sa - sc);
+}
+vec4 blend_overlay(vec4 src, vec4 dst) {
+ vec4 result = vec4(_blend_overlay_component(src.x, src.w, dst.x, dst.w), _blend_overlay_component(src.y, src.w, dst.y, dst.w), _blend_overlay_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+ result.xyz += dst.xyz * (1.0 - src.w) + src.xyz * (1.0 - dst.w);
+ return result;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_overlay(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 inColor;
+in vec2 inLocalCoord;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/367-2.shader_test b/shaders/skia/367-2.shader_test
new file mode 100644
index 0000000..33d25f0
--- /dev/null
+++ b/shaders/skia/367-2.shader_test
@@ -0,0 +1,63 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vEllipseOffsets0_Stage0;
+noperspective in vec2 vEllipseOffsets1_Stage0;
+noperspective in vec4 vinColor_Stage0;
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ vec2 scaledOffset = vEllipseOffsets0_Stage0;
+ float test = dot(scaledOffset, scaledOffset) - 1.0;
+ vec2 duvdx = dFdx(vEllipseOffsets0_Stage0);
+ vec2 duvdy = dFdy(vEllipseOffsets0_Stage0);
+ vec2 grad = vec2(vEllipseOffsets0_Stage0.x * duvdx.x + vEllipseOffsets0_Stage0.y * duvdx.y, vEllipseOffsets0_Stage0.x * duvdy.x + vEllipseOffsets0_Stage0.y * duvdy.y);
+ float grad_dot = 4.0 * dot(grad, grad);
+ grad_dot = max(grad_dot, 1.1754999560161448e-38);
+ float invlen = inversesqrt(grad_dot);
+ float edgeAlpha = clamp(1.0 - test * invlen, 0.0, 1.0);
+ edgeAlpha *= clamp(1.0 + test * invlen, 0.0, 1.0);
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ vec4 output_Stage1;
+ {
+ float nonZeroAlpha = max(outputCoverage_Stage0.w, 9.9999997473787516e-05);
+ vec4 coord = vec4(outputCoverage_Stage0.xyz / nonZeroAlpha, nonZeroAlpha);
+ coord = coord * 0.9960939884185791 + vec4(0.0019529999699443579, 0.0019529999699443579, 0.0019529999699443579, 0.0019529999699443579);
+ output_Stage1.w = texture(uTextureSampler_0_Stage1, vec2(coord.w, 0.125)).w;
+ output_Stage1.x = texture(uTextureSampler_0_Stage1, vec2(coord.x, 0.375)).w;
+ output_Stage1.y = texture(uTextureSampler_0_Stage1, vec2(coord.y, 0.625)).w;
+ output_Stage1.z = texture(uTextureSampler_0_Stage1, vec2(coord.z, 0.875)).w;
+ output_Stage1.xyz *= output_Stage1.w;
+ }
+ {
+ sk_FragColor = 1.0 - output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec2 inEllipseOffsets0;
+in vec2 inEllipseOffsets1;
+noperspective out vec2 vEllipseOffsets0_Stage0;
+noperspective out vec2 vEllipseOffsets1_Stage0;
+noperspective out vec4 vinColor_Stage0;
+void main() {
+ vEllipseOffsets0_Stage0 = inEllipseOffsets0;
+ vEllipseOffsets1_Stage0 = inEllipseOffsets1;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = (uViewM_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/367-3.shader_test b/shaders/skia/367-3.shader_test
new file mode 100644
index 0000000..e23cde0
--- /dev/null
+++ b/shaders/skia/367-3.shader_test
@@ -0,0 +1,46 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform mat4 um_Stage2;
+uniform vec4 uv_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ vec4 inputColor = output_Stage1;
+ output_Stage2 = um_Stage2 * inputColor + uv_Stage2;
+ {
+ output_Stage2.w = clamp(output_Stage2.w, 0.0, 1.0);
+ }
+ {
+ output_Stage2.xyz *= output_Stage2.w;
+ }
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/367-4.shader_test b/shaders/skia/367-4.shader_test
new file mode 100644
index 0000000..d7ed45d
--- /dev/null
+++ b/shaders/skia/367-4.shader_test
@@ -0,0 +1,223 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage2_c0_c0;
+uniform float uSurfaceScale_Stage2_c0_c0;
+uniform vec3 uLightColor_Stage2_c0_c0;
+uniform float uKS_Stage2_c0_c0;
+uniform float uShininess_Stage2_c0_c0;
+uniform vec4 uTexDom_Stage2_c0_c0;
+uniform vec3 uDecalParams_Stage2_c0_c0;
+uniform vec3 uLightLocation_Stage2_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 light_Stage2_c0_c0(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ vec3 halfDir = normalize(surfaceToLight + vec3(0.0, 0.0, 1.0));
+ float colorScale = uKS_Stage2_c0_c0 * pow(dot(normal, halfDir), uShininess_Stage2_c0_c0);
+ vec3 color = lightColor * clamp(colorScale, 0.0, 1.0);
+ return vec4(color, max(max(color.x, color.y), color.z));
+}
+float sobel_Stage2_c0_c0(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage2_c0_c0(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage2_c0_c0(float m[9], float surfaceScale) {
+ return pointToNormal_Stage2_c0_c0(sobel_Stage2_c0_c0(m[0], m[2], m[3], m[5], m[6], m[8], 0.25), sobel_Stage2_c0_c0(m[0], m[6], m[1], m[7], m[2], m[8], 0.25), surfaceScale);
+}
+vec4 SpecularLighting_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coord = vTransformedCoords_1_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c0_c0.y);
+ if (err > uDecalParams_Stage2_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp0 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c0_c0.y);
+ if (err > uDecalParams_Stage2_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c0_c0.y);
+ if (err > uDecalParams_Stage2_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c0_c0.y);
+ if (err > uDecalParams_Stage2_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c0_c0.y);
+ if (err > uDecalParams_Stage2_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c0_c0.y);
+ if (err > uDecalParams_Stage2_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp5 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c0_c0.y);
+ if (err > uDecalParams_Stage2_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp6 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c0_c0.y);
+ if (err > uDecalParams_Stage2_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp7 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c0_c0.y);
+ if (err > uDecalParams_Stage2_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp8 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = normalize(uLightLocation_Stage2_c0_c0 - vec3(gl_FragCoord.xy, uSurfaceScale_Stage2_c0_c0 * m[4]));
+ _output = light_Stage2_c0_c0(normal_Stage2_c0_c0(m, uSurfaceScale_Stage2_c0_c0), surfaceToLight, uLightColor_Stage2_c0_c0);
+ _output *= _input;
+ return _output;
+}
+vec4 ClampFragmentProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = clamp(_input, 0.0, 1.0);
+ }
+ return _output;
+}
+vec4 blend_difference(vec4 src, vec4 dst) {
+ return vec4((src.xyz + dst.xyz) - 2.0 * min(src.xyz * dst.w, dst.xyz * src.w), src.w + (1.0 - src.w) * dst.w);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ vec4 inputColor = vec4(output_Stage1.xyz, 1.0);
+ output_Stage2 = blend_difference(SpecularLighting_Stage2_c0_c0(inputColor), ClampFragmentProcessor_Stage2_c1_c0(inputColor));
+ output_Stage2 *= output_Stage1.w;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/367.shader_test b/shaders/skia/367.shader_test
new file mode 100644
index 0000000..285cc65
--- /dev/null
+++ b/shaders/skia/367.shader_test
@@ -0,0 +1,69 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 ucolor_Stage1_c0_c0_c0_c0;
+noperspective in vec4 vcolor_Stage0;
+vec4 ConstColorProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = _input.w * ucolor_Stage1_c0_c0_c0_c0;
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = ConstColorProcessor_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+float _blend_overlay_component(float sc, float sa, float dc, float da) {
+ if (2.0 * dc <= da) {
+ return (2.0 * sc) * dc;
+ }
+ return sa * da - (2.0 * (da - dc)) * (sa - sc);
+}
+vec4 blend_overlay(vec4 src, vec4 dst) {
+ vec4 result = vec4(_blend_overlay_component(src.x, src.w, dst.x, dst.w), _blend_overlay_component(src.y, src.w, dst.y, dst.w), _blend_overlay_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+ result.xyz += dst.xyz * (1.0 - src.w) + src.xyz * (1.0 - dst.w);
+ return result;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_overlay(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 position;
+in vec4 inColor;
+noperspective out vec4 vcolor_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/37-1.shader_test b/shaders/skia/37-1.shader_test
new file mode 100644
index 0000000..22d19ab
--- /dev/null
+++ b/shaders/skia/37-1.shader_test
@@ -0,0 +1,39 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uColor_Stage0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 TextureEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TextureEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/37-10.shader_test b/shaders/skia/37-10.shader_test
new file mode 100644
index 0000000..48eeea0
--- /dev/null
+++ b/shaders/skia/37-10.shader_test
@@ -0,0 +1,62 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 usubset_Stage1;
+uniform vec4 uclamp_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+flat in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec2 inCoord = vTransformedCoords_0_Stage0;
+ vec2 subsetCoord;
+ {
+ float w = usubset_Stage1.z - usubset_Stage1.x;
+ float w2 = 2.0 * w;
+ float m = mod(inCoord.x - usubset_Stage1.x, w2);
+ subsetCoord.x = mix(m, w2 - m, step(w, m)) + usubset_Stage1.x;
+ }
+ {
+ float w = usubset_Stage1.w - usubset_Stage1.y;
+ float w2 = 2.0 * w;
+ float m = mod(inCoord.y - usubset_Stage1.y, w2);
+ subsetCoord.y = mix(m, w2 - m, step(w, m)) + usubset_Stage1.y;
+ }
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage1.x, uclamp_Stage1.z);
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage1.y, uclamp_Stage1.w);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ output_Stage1 = outputColor_Stage0 * textureColor;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec2 inLocalCoords;
+in vec4 color;
+flat out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vcolor_Stage0 = color;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoords, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/37-15.shader_test b/shaders/skia/37-15.shader_test
new file mode 100644
index 0000000..4a07f46
--- /dev/null
+++ b/shaders/skia/37-15.shader_test
@@ -0,0 +1,111 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 uscale01_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias01_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale23_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias23_Stage1_c0_c0_c1_c0;
+uniform float uthreshold_Stage1_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage2_c1_c0_c0_c0;
+uniform vec4 ucolor_Stage2_c2_c0_c0_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 RadialGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = length(vTransformedCoords_0_Stage0);
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 DualIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthreshold_Stage1_c0_c0_c1_c0) {
+ scale = uscale01_Stage1_c0_c0_c1_c0;
+ bias = ubias01_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale23_Stage1_c0_c0_c1_c0;
+ bias = ubias23_Stage1_c0_c0_c1_c0;
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = RadialGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = DualIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c1_c0_c0_c0;
+ }
+ return _output;
+}
+vec4 blend_src_atop(vec4 src, vec4 dst) {
+ return dst.w * src + (1.0 - src.w) * dst;
+}
+vec4 ComposeOne_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_src_atop(ConstColorProcessor_Stage2_c1_c0_c0_c0(vec4(1.0)), _input);
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c2_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c2_c0_c0_c0;
+ }
+ return _output;
+}
+vec4 blend_xor(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src + (1.0 - src.w) * dst;
+}
+vec4 ComposeOne_Stage2_c2_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_xor(ConstColorProcessor_Stage2_c2_c0_c0_c0(vec4(1.0)), _input);
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = ComposeOne_Stage2_c2_c0(ComposeOne_Stage2_c1_c0(output_Stage1));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/37-16.shader_test b/shaders/skia/37-16.shader_test
new file mode 100644
index 0000000..0911e3d
--- /dev/null
+++ b/shaders/skia/37-16.shader_test
@@ -0,0 +1,116 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 uscale01_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias01_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale23_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias23_Stage1_c0_c0_c1_c0;
+uniform float uthreshold_Stage1_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage2_c1_c0_c0_c0;
+uniform vec4 ucolor_Stage2_c2_c0_c0_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 RadialGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = length(vTransformedCoords_0_Stage0);
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 DualIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthreshold_Stage1_c0_c0_c1_c0) {
+ scale = uscale01_Stage1_c0_c0_c1_c0;
+ bias = ubias01_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale23_Stage1_c0_c0_c1_c0;
+ bias = ubias23_Stage1_c0_c0_c1_c0;
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = RadialGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = DualIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c1_c0_c0_c0;
+ }
+ return _output;
+}
+vec4 blend_exclusion(vec4 src, vec4 dst) {
+ return vec4((dst.xyz + src.xyz) - (2.0 * dst.xyz) * src.xyz, src.w + (1.0 - src.w) * dst.w);
+}
+vec4 ComposeOne_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_exclusion(ConstColorProcessor_Stage2_c1_c0_c0_c0(vec4(1.0)), _input);
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c2_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c2_c0_c0_c0;
+ }
+ return _output;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 blend_darken(vec4 src, vec4 dst) {
+ vec4 result = blend_src_over(src, dst);
+ result.xyz = min(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
+ return result;
+}
+vec4 ComposeOne_Stage2_c2_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_darken(ConstColorProcessor_Stage2_c2_c0_c0_c0(vec4(1.0)), _input);
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = ComposeOne_Stage2_c2_c0(ComposeOne_Stage2_c1_c0(output_Stage1));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/37-17.shader_test b/shaders/skia/37-17.shader_test
new file mode 100644
index 0000000..aa0e150
--- /dev/null
+++ b/shaders/skia/37-17.shader_test
@@ -0,0 +1,99 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+flat in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec4 varccoord_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ outputCoverage_Stage0 = vec4(1.0);
+ if (vec2(0.0) != varccoord_Stage0.xy) {
+ float fn = dot(varccoord_Stage0.xy, varccoord_Stage0.xy) - 1.0;
+ if (fn > 0.0) {
+ outputCoverage_Stage0 = vec4(0.0);
+ }
+ }
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1 * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec4 radii_selector;
+in vec4 corner_and_radius_outsets;
+in vec4 skew;
+in vec2 translate;
+in vec4 radii_x;
+in vec4 radii_y;
+in vec4 color;
+in vec4 local_rect;
+flat out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec4 varccoord_Stage0;
+void main() {
+ vcolor_Stage0 = color;
+ vec2 corner = corner_and_radius_outsets.xy;
+ vec2 radius_outset = corner_and_radius_outsets.zw;
+ vec2 radii;
+ radii.x = dot(radii_selector, radii_x);
+ radii.y = dot(radii_selector, radii_y);
+ bool is_arc_section = radii.x > 0.0;
+ radii = abs(radii);
+ vec2 vertexpos = corner + radius_outset * radii;
+ vec2 localcoord = (local_rect.xy * (1.0 - vertexpos) + local_rect.zw * (1.0 + vertexpos)) * 0.5;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localcoord, 1.0)).xy;
+ mat2 skewmatrix = mat2(skew.xy, skew.zw);
+ vec2 devcoord = vertexpos * skewmatrix + translate;
+ if (is_arc_section) {
+ varccoord_Stage0.xy = 1.0 - abs(radius_outset);
+ mat2 derivatives = inverse(skewmatrix);
+ varccoord_Stage0.zw = derivatives * (((varccoord_Stage0.xy / radii) * corner) * 2.0);
+ } else {
+ varccoord_Stage0 = vec4(0.0);
+ }
+ gl_Position = vec4(devcoord.x, devcoord.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/37-18.shader_test b/shaders/skia/37-18.shader_test
new file mode 100644
index 0000000..46c8299
--- /dev/null
+++ b/shaders/skia/37-18.shader_test
@@ -0,0 +1,107 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+flat in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec4 varccoord_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ outputCoverage_Stage0 = vec4(1.0);
+ if (vec2(0.0) != varccoord_Stage0.xy) {
+ float fn = dot(varccoord_Stage0.xy, varccoord_Stage0.xy) - 1.0;
+ if (fn > 0.0) {
+ outputCoverage_Stage0 = vec4(0.0);
+ }
+ }
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_dst_in(outputColor_Stage0, ClampedGradientEffect_Stage1_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage1 * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec4 radii_selector;
+in vec4 corner_and_radius_outsets;
+in vec4 skew;
+in vec2 translate;
+in vec4 radii_x;
+in vec4 radii_y;
+in vec4 color;
+in vec4 local_rect;
+flat out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec4 varccoord_Stage0;
+void main() {
+ vcolor_Stage0 = color;
+ vec2 corner = corner_and_radius_outsets.xy;
+ vec2 radius_outset = corner_and_radius_outsets.zw;
+ vec2 radii;
+ radii.x = dot(radii_selector, radii_x);
+ radii.y = dot(radii_selector, radii_y);
+ bool is_arc_section = radii.x > 0.0;
+ radii = abs(radii);
+ vec2 vertexpos = corner + radius_outset * radii;
+ vec2 localcoord = (local_rect.xy * (1.0 - vertexpos) + local_rect.zw * (1.0 + vertexpos)) * 0.5;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localcoord, 1.0)).xy;
+ mat2 skewmatrix = mat2(skew.xy, skew.zw);
+ vec2 devcoord = vertexpos * skewmatrix + translate;
+ if (is_arc_section) {
+ varccoord_Stage0.xy = 1.0 - abs(radius_outset);
+ mat2 derivatives = inverse(skewmatrix);
+ varccoord_Stage0.zw = derivatives * (((varccoord_Stage0.xy / radii) * corner) * 2.0);
+ } else {
+ varccoord_Stage0 = vec4(0.0);
+ }
+ gl_Position = vec4(devcoord.x, devcoord.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/37-23.shader_test b/shaders/skia/37-23.shader_test
new file mode 100644
index 0000000..b05cb57
--- /dev/null
+++ b/shaders/skia/37-23.shader_test
@@ -0,0 +1,44 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uinnerRect_Stage1;
+uniform vec2 uradiusPlusHalf_Stage1;
+flat in vec4 vcolor_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ float dy0 = uinnerRect_Stage1.y - gl_FragCoord.y;
+ vec2 dxy1 = gl_FragCoord.xy - uinnerRect_Stage1.zw;
+ vec2 dxy = max(vec2(dxy1.x, max(dy0, dxy1.y)), 0.0);
+ float leftAlpha = clamp(gl_FragCoord.x - uinnerRect_Stage1.x, 0.0, 1.0);
+ float alpha = leftAlpha * clamp(uradiusPlusHalf_Stage1.x - length(dxy), 0.0, 1.0);
+ output_Stage1 = vec4(alpha);
+ }
+ {
+ sk_FragColor = outputColor_Stage0 * output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 position;
+in vec4 color;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/37-24.shader_test b/shaders/skia/37-24.shader_test
new file mode 100644
index 0000000..6e2cf80
--- /dev/null
+++ b/shaders/skia/37-24.shader_test
@@ -0,0 +1,110 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 uscale01_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias01_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale23_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias23_Stage1_c0_c0_c1_c0;
+uniform float uthreshold_Stage1_c0_c0_c1_c0;
+flat in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec4 varccoord_Stage0;
+vec4 RadialGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = length(vTransformedCoords_0_Stage0);
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 DualIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthreshold_Stage1_c0_c0_c1_c0) {
+ scale = uscale01_Stage1_c0_c0_c1_c0;
+ bias = ubias01_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale23_Stage1_c0_c0_c1_c0;
+ bias = ubias23_Stage1_c0_c0_c1_c0;
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = RadialGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = DualIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ outputCoverage_Stage0 = vec4(1.0);
+ if (vec2(0.0) != varccoord_Stage0.xy) {
+ float fn = dot(varccoord_Stage0.xy, varccoord_Stage0.xy) - 1.0;
+ if (fn > 0.0) {
+ outputCoverage_Stage0 = vec4(0.0);
+ }
+ }
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1 * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec4 radii_selector;
+in vec4 corner_and_radius_outsets;
+in vec4 skew;
+in vec2 translate;
+in vec4 radii_x;
+in vec4 radii_y;
+in vec4 color;
+in vec4 local_rect;
+flat out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec4 varccoord_Stage0;
+void main() {
+ vcolor_Stage0 = color;
+ vec2 corner = corner_and_radius_outsets.xy;
+ vec2 radius_outset = corner_and_radius_outsets.zw;
+ vec2 radii;
+ radii.x = dot(radii_selector, radii_x);
+ radii.y = dot(radii_selector, radii_y);
+ bool is_arc_section = radii.x > 0.0;
+ radii = abs(radii);
+ vec2 vertexpos = corner + radius_outset * radii;
+ vec2 localcoord = (local_rect.xy * (1.0 - vertexpos) + local_rect.zw * (1.0 + vertexpos)) * 0.5;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localcoord, 1.0)).xy;
+ mat2 skewmatrix = mat2(skew.xy, skew.zw);
+ vec2 devcoord = vertexpos * skewmatrix + translate;
+ if (is_arc_section) {
+ varccoord_Stage0.xy = 1.0 - abs(radius_outset);
+ mat2 derivatives = inverse(skewmatrix);
+ varccoord_Stage0.zw = derivatives * (((varccoord_Stage0.xy / radii) * corner) * 2.0);
+ } else {
+ varccoord_Stage0 = vec4(0.0);
+ }
+ gl_Position = vec4(devcoord.x, devcoord.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/37-26.shader_test b/shaders/skia/37-26.shader_test
new file mode 100644
index 0000000..dbf726a
--- /dev/null
+++ b/shaders/skia/37-26.shader_test
@@ -0,0 +1,44 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform float uPixelSize_Stage1;
+uniform vec2 uRange_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = vec4(1.0, 1.0, 1.0, 1.0);
+ vec2 coord = vTransformedCoords_0_Stage0;
+ coord.x -= 2.0 * uPixelSize_Stage1;
+ float highBound = min(uRange_Stage1.y, coord.x + 4.0 * uPixelSize_Stage1);
+ coord.x = max(uRange_Stage1.x, coord.x);
+ for (int i = 0;i < 5; i++) {
+ output_Stage1 = min(output_Stage1, texture(uTextureSampler_0_Stage1, coord));
+ coord.x += uPixelSize_Stage1;
+ coord.x = min(highBound, coord.x);
+ }
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/37-28.shader_test b/shaders/skia/37-28.shader_test
new file mode 100644
index 0000000..19f407d
--- /dev/null
+++ b/shaders/skia/37-28.shader_test
@@ -0,0 +1,41 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform float uPixelSize_Stage1;
+uniform vec2 uRange_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0;
+ coord.x -= 8.0 * uPixelSize_Stage1;
+ for (int i = 0;i < 17; i++) {
+ output_Stage1 = max(output_Stage1, texture(uTextureSampler_0_Stage1, coord));
+ coord.x += uPixelSize_Stage1;
+ }
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/37-29.shader_test b/shaders/skia/37-29.shader_test
new file mode 100644
index 0000000..27fe7c7
--- /dev/null
+++ b/shaders/skia/37-29.shader_test
@@ -0,0 +1,135 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform float uSurfaceScale_Stage1;
+uniform vec3 uLightColor_Stage1;
+uniform float uKD_Stage1;
+uniform vec3 uLightDirection_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 light_Stage1(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ float colorScale = uKD_Stage1 * dot(normal, surfaceToLight);
+ return vec4(lightColor * clamp(colorScale, 0.0, 1.0), 1.0);
+}
+float sobel_Stage1(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage1(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage1(float m[9], float surfaceScale) {
+ return pointToNormal_Stage1(sobel_Stage1(0.0, 0.0, m[3], m[5], m[6], m[8], 0.33333298563957214), sobel_Stage1(0.0, 0.0, m[4], m[7], m[5], m[8], 0.5), surfaceScale);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ vec2 coord = vTransformedCoords_0_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp0 = textureColor;
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp1 = textureColor;
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp2 = textureColor;
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp3 = textureColor;
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp4 = textureColor;
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp5 = textureColor;
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp6 = textureColor;
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp7 = textureColor;
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp8 = textureColor;
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = uLightDirection_Stage1;
+ output_Stage1 = light_Stage1(normal_Stage1(m, uSurfaceScale_Stage1), surfaceToLight, uLightColor_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/37-3.shader_test b/shaders/skia/37-3.shader_test
new file mode 100644
index 0000000..26f4c68
--- /dev/null
+++ b/shaders/skia/37-3.shader_test
@@ -0,0 +1,50 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 TextureEffect_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage2, vTransformedCoords_1_Stage0) * _input;
+ return _output;
+}
+vec4 blend_xor(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src + (1.0 - src.w) * dst;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_xor(output_Stage1, TextureEffect_Stage2_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/37-30.shader_test b/shaders/skia/37-30.shader_test
new file mode 100644
index 0000000..c265ee2
--- /dev/null
+++ b/shaders/skia/37-30.shader_test
@@ -0,0 +1,67 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec2 uDstTextureUpperLeft_Stage1;
+uniform vec2 uDstTextureCoordScale_Stage1;
+uniform sampler2D uTextureSampler_0_Stage0;
+uniform sampler2D uDstTextureSampler_Stage1;
+noperspective in vec2 vTextureCoords_Stage0;
+flat in int vTexIndex_Stage0;
+noperspective in vec4 vinColor_Stage0;
+vec4 blend_dst_atop(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src + src.w * dst;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vinColor_Stage0;
+ vec4 texColor;
+ {
+ texColor = texture(uTextureSampler_0_Stage0, vTextureCoords_Stage0);
+ }
+ outputCoverage_Stage0 = texColor;
+ }
+ {
+ if (all(lessThanEqual(outputCoverage_Stage0.xyz, vec3(0.0)))) {
+ discard;
+ }
+ vec2 _dstTexCoord = (gl_FragCoord.xy - uDstTextureUpperLeft_Stage1) * uDstTextureCoordScale_Stage1;
+ _dstTexCoord.y = 1.0 - _dstTexCoord.y;
+ vec4 _dstColor = texture(uDstTextureSampler_Stage1, _dstTexCoord);
+ sk_FragColor = blend_dst_atop(outputColor_Stage0, _dstColor);
+ float lerpRed = mix(_dstColor.w, sk_FragColor.w, outputCoverage_Stage0.x);
+ float lerpBlue = mix(_dstColor.w, sk_FragColor.w, outputCoverage_Stage0.y);
+ float lerpGreen = mix(_dstColor.w, sk_FragColor.w, outputCoverage_Stage0.z);
+ sk_FragColor = outputCoverage_Stage0 * sk_FragColor + (vec4(1.0) - outputCoverage_Stage0) * _dstColor;
+ sk_FragColor.w = max(max(lerpRed, lerpBlue), lerpGreen);
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform vec2 uAtlasSizeInv_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in uvec2 inTextureCoords;
+noperspective out vec2 vTextureCoords_Stage0;
+flat out int vTexIndex_Stage0;
+noperspective out vec4 vinColor_Stage0;
+void main() {
+ ivec2 signedCoords = ivec2(int(inTextureCoords.x), int(inTextureCoords.y));
+ vec2 unormTexCoords = vec2(float(signedCoords.x / 2), float(signedCoords.y / 2));
+ vTextureCoords_Stage0 = unormTexCoords * uAtlasSizeInv_Stage0;
+ vTexIndex_Stage0 = 0;
+ vinColor_Stage0 = inColor;
+ gl_Position = vec4(inPosition.x, inPosition.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/37-31.shader_test b/shaders/skia/37-31.shader_test
new file mode 100644
index 0000000..2b65dd3
--- /dev/null
+++ b/shaders/skia/37-31.shader_test
@@ -0,0 +1,133 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform vec2 uBounds_Stage1;
+uniform vec4 uKernel_Stage1[5];
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0 - 9.0 * uImageIncrement_Stage1;
+ vec2 coordSampled = vec2(0.0, 0.0);
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage1.x && coord.y <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].x;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage1.x && coord.y <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].y;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage1.x && coord.y <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].z;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage1.x && coord.y <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].w;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage1.x && coord.y <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].x;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage1.x && coord.y <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].y;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage1.x && coord.y <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].z;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage1.x && coord.y <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].w;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage1.x && coord.y <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].x;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage1.x && coord.y <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].y;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage1.x && coord.y <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].z;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage1.x && coord.y <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].w;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage1.x && coord.y <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].x;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage1.x && coord.y <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].y;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage1.x && coord.y <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].z;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage1.x && coord.y <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].w;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage1.x && coord.y <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[4].x;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage1.x && coord.y <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[4].y;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage1.x && coord.y <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[4].z;
+ }
+ coord += uImageIncrement_Stage1;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/37-39.shader_test b/shaders/skia/37-39.shader_test
new file mode 100644
index 0000000..8033a5a
--- /dev/null
+++ b/shaders/skia/37-39.shader_test
@@ -0,0 +1,41 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform float uPixelSize_Stage1;
+uniform vec2 uRange_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0;
+ coord.x -= 5.0 * uPixelSize_Stage1;
+ for (int i = 0;i < 11; i++) {
+ output_Stage1 = max(output_Stage1, texture(uTextureSampler_0_Stage1, coord));
+ coord.x += uPixelSize_Stage1;
+ }
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/37-4.shader_test b/shaders/skia/37-4.shader_test
new file mode 100644
index 0000000..0afe70d
--- /dev/null
+++ b/shaders/skia/37-4.shader_test
@@ -0,0 +1,82 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uclamp_Stage1_c0_c0_c0_c0;
+uniform vec4 uclamp_Stage1_c0_c0_c1_c0;
+uniform mat3 ucolorSpaceMatrix_Stage1_c0_c0;
+uniform vec3 ucolorSpaceTranslate_Stage1_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 inCoord = vTransformedCoords_0_Stage0;
+ vec2 subsetCoord;
+ subsetCoord.x = inCoord.x;
+ subsetCoord.y = inCoord.y;
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage1_c0_c0_c0_c0.x, uclamp_Stage1_c0_c0_c0_c0.z);
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage1_c0_c0_c0_c0.y, uclamp_Stage1_c0_c0_c0_c0.w);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ _output = _input * textureColor;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 inCoord = vTransformedCoords_1_Stage0;
+ vec2 subsetCoord;
+ subsetCoord.x = inCoord.x;
+ subsetCoord.y = inCoord.y;
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage1_c0_c0_c1_c0.x, uclamp_Stage1_c0_c0_c1_c0.z);
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage1_c0_c0_c1_c0.y, uclamp_Stage1_c0_c0_c1_c0.w);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ _output = _input * textureColor;
+ return _output;
+}
+vec4 YUVtoRGBEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 planes[2];
+ planes[0] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0));
+ planes[1] = TextureEffect_Stage1_c0_c0_c1_c0(vec4(1.0));
+ vec4 color = vec4(planes[0].x, planes[1].y, planes[1].x, 1.0);
+ color.xyz = clamp(color.xyz * ucolorSpaceMatrix_Stage1_c0_c0 + ucolorSpaceTranslate_Stage1_c0_c0, 0.0, 1.0);
+ _output = color;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = YUVtoRGBEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/37-48.shader_test b/shaders/skia/37-48.shader_test
new file mode 100644
index 0000000..27f6218
--- /dev/null
+++ b/shaders/skia/37-48.shader_test
@@ -0,0 +1,37 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uColor_Stage0;
+noperspective in float vinCoverage_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = uColor_Stage0;
+ float alpha = 1.0;
+ alpha = vinCoverage_Stage0;
+ outputCoverage_Stage0 = vec4(alpha);
+ }
+ {
+ sk_FragColor = (1.0 - outputColor_Stage0.w) * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 inPosition;
+in float inCoverage;
+noperspective out float vinCoverage_Stage0;
+void main() {
+ vec2 pos2 = inPosition;
+ vinCoverage_Stage0 = inCoverage;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/37-5.shader_test b/shaders/skia/37-5.shader_test
new file mode 100644
index 0000000..0e35d23
--- /dev/null
+++ b/shaders/skia/37-5.shader_test
@@ -0,0 +1,55 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform mat3 ucolorSpaceMatrix_Stage1;
+uniform vec3 ucolorSpaceTranslate_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 TextureEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_1_Stage1, vTransformedCoords_1_Stage0) * _input;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ vec4 planes[2];
+ planes[0] = TextureEffect_Stage1_c0_c0(vec4(1.0));
+ planes[1] = TextureEffect_Stage1_c1_c0(vec4(1.0));
+ vec4 color = vec4(planes[0].x, planes[1].y, planes[1].x, 1.0);
+ color.xyz = clamp(color.xyz * ucolorSpaceMatrix_Stage1 + ucolorSpaceTranslate_Stage1, 0.0, 1.0);
+ output_Stage1 = color;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/37-50.shader_test b/shaders/skia/37-50.shader_test
new file mode 100644
index 0000000..d5ab45d
--- /dev/null
+++ b/shaders/skia/37-50.shader_test
@@ -0,0 +1,87 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 RadialGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = length(vTransformedCoords_0_Stage0);
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = RadialGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/37-51.shader_test b/shaders/skia/37-51.shader_test
new file mode 100644
index 0000000..5a505cc
--- /dev/null
+++ b/shaders/skia/37-51.shader_test
@@ -0,0 +1,103 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 RadialGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = length(vTransformedCoords_0_Stage0);
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = RadialGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_1_Stage0.x);
+ uint y = uint(vTransformedCoords_1_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ output_Stage2 = vec4(clamp(output_Stage2.xyz + value * 0.0039215688593685627, 0.0, output_Stage2.w), output_Stage2.w);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/37-52.shader_test b/shaders/skia/37-52.shader_test
new file mode 100644
index 0000000..780feb4
--- /dev/null
+++ b/shaders/skia/37-52.shader_test
@@ -0,0 +1,121 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_0_Stage0;
+ float t = -1.0;
+ float v = 1.0;
+ {
+ {
+ float invR1 = ufocalParams_Stage1_c0_c0_c0_c0.x;
+ float x_t = -1.0;
+ {
+ float temp = p.x * p.x - p.y * p.y;
+ if (temp >= 0.0) {
+ {
+ x_t = sqrt(temp) - p.x * invR1;
+ }
+ }
+ }
+ {
+ if (x_t <= 0.0) {
+ v = -1.0;
+ }
+ }
+ {
+ {
+ t = x_t;
+ }
+ }
+ }
+ }
+ _output = vec4(t, v, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/37-54.shader_test b/shaders/skia/37-54.shader_test
new file mode 100644
index 0000000..46d8908
--- /dev/null
+++ b/shaders/skia/37-54.shader_test
@@ -0,0 +1,136 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_0_Stage0;
+ float t = -1.0;
+ float v = 1.0;
+ {
+ {
+ float invR1 = ufocalParams_Stage1_c0_c0_c0_c0.x;
+ float x_t = -1.0;
+ {
+ float temp = p.x * p.x - p.y * p.y;
+ if (temp >= 0.0) {
+ {
+ x_t = sqrt(temp) - p.x * invR1;
+ }
+ }
+ }
+ {
+ if (x_t <= 0.0) {
+ v = -1.0;
+ }
+ }
+ {
+ {
+ t = x_t;
+ }
+ }
+ }
+ }
+ _output = vec4(t, v, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TiledGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_1_Stage0.x);
+ uint y = uint(vTransformedCoords_1_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ output_Stage2 = vec4(clamp(output_Stage2.xyz + value * 0.0039215688593685627, 0.0, output_Stage2.w), output_Stage2.w);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/37-56.shader_test b/shaders/skia/37-56.shader_test
new file mode 100644
index 0000000..294ffba
--- /dev/null
+++ b/shaders/skia/37-56.shader_test
@@ -0,0 +1,134 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_0_Stage0;
+ float t = -1.0;
+ float v = 1.0;
+ {
+ {
+ float invR1 = ufocalParams_Stage1_c0_c0_c0_c0.x;
+ float x_t = -1.0;
+ {
+ float temp = p.x * p.x - p.y * p.y;
+ if (temp >= 0.0) {
+ {
+ x_t = sqrt(temp) - p.x * invR1;
+ }
+ }
+ }
+ {
+ if (x_t <= 0.0) {
+ v = -1.0;
+ }
+ }
+ {
+ {
+ t = x_t;
+ }
+ }
+ }
+ }
+ _output = vec4(t, v, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else {
+ {
+ t.x = fract(t.x);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TiledGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_1_Stage0.x);
+ uint y = uint(vTransformedCoords_1_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ output_Stage2 = vec4(clamp(output_Stage2.xyz + value * 0.0039215688593685627, 0.0, output_Stage2.w), output_Stage2.w);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/37-58.shader_test b/shaders/skia/37-58.shader_test
new file mode 100644
index 0000000..d380b62
--- /dev/null
+++ b/shaders/skia/37-58.shader_test
@@ -0,0 +1,137 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_0_Stage0;
+ float t = -1.0;
+ float v = 1.0;
+ {
+ {
+ float invR1 = ufocalParams_Stage1_c0_c0_c0_c0.x;
+ float x_t = -1.0;
+ {
+ float temp = p.x * p.x - p.y * p.y;
+ if (temp >= 0.0) {
+ {
+ x_t = sqrt(temp) - p.x * invR1;
+ }
+ }
+ }
+ {
+ if (x_t <= 0.0) {
+ v = -1.0;
+ }
+ }
+ {
+ {
+ t = x_t;
+ }
+ }
+ }
+ }
+ _output = vec4(t, v, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_1_Stage0.x);
+ uint y = uint(vTransformedCoords_1_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ output_Stage2 = vec4(clamp(output_Stage2.xyz + value * 0.0039215688593685627, 0.0, output_Stage2.w), output_Stage2.w);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/37-6.shader_test b/shaders/skia/37-6.shader_test
new file mode 100644
index 0000000..3fc91d7
--- /dev/null
+++ b/shaders/skia/37-6.shader_test
@@ -0,0 +1,90 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform mat4 um_Stage2;
+uniform vec4 uv_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+uniform sampler2D uTextureSampler_2_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_1_Stage1, vTransformedCoords_1_Stage0) * _input;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c0_c0_c2_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_2_Stage1, vTransformedCoords_2_Stage0) * _input;
+ return _output;
+}
+vec4 YUVtoRGBEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 planes[3];
+ planes[0] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0));
+ planes[1] = TextureEffect_Stage1_c0_c0_c1_c0(vec4(1.0));
+ planes[2] = TextureEffect_Stage1_c0_c0_c2_c0(vec4(1.0));
+ vec4 color = vec4(planes[0].x, planes[1].x, planes[1].y, planes[2].w);
+ color.xyz *= color.w;
+ _output = color;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = YUVtoRGBEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ vec4 inputColor = output_Stage1;
+ {
+ float nonZeroAlpha = max(inputColor.w, 9.9999997473787516e-05);
+ inputColor = vec4(inputColor.xyz / nonZeroAlpha, inputColor.w);
+ }
+ output_Stage2 = um_Stage2 * inputColor + uv_Stage2;
+ {
+ output_Stage2 = clamp(output_Stage2, 0.0, 1.0);
+ }
+ {
+ output_Stage2.xyz *= output_Stage2.w;
+ }
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/37-60.shader_test b/shaders/skia/37-60.shader_test
new file mode 100644
index 0000000..54baf13
--- /dev/null
+++ b/shaders/skia/37-60.shader_test
@@ -0,0 +1,120 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform float ubias_Stage1_c0_c0_c0_c0;
+uniform float uscale_Stage1_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+in float vcoverage_Stage0;
+flat in vec4 vgeomDomain_Stage0;
+vec4 SweepGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float angle;
+ {
+ angle = atan(-vTransformedCoords_0_Stage0.y, -vTransformedCoords_0_Stage0.x);
+ }
+ float t = ((angle * 0.15915493667125702 + 0.5) + ubias_Stage1_c0_c0_c0_c0) * uscale_Stage1_c0_c0_c0_c0;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = SweepGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ float coverage = vcoverage_Stage0 * gl_FragCoord.w;
+ vec4 geoDomain;
+ geoDomain = vgeomDomain_Stage0;
+ if (coverage < 0.5) {
+ vec4 dists4 = clamp(vec4(1.0, 1.0, -1.0, -1.0) * (gl_FragCoord.xyxy - geoDomain), 0.0, 1.0);
+ vec2 dists2 = dists4.xy * dists4.zw;
+ coverage = min(coverage, dists2.x * dists2.y);
+ }
+ outputCoverage_Stage0 = vec4(coverage);
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1 * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec4 positionWithCoverage;
+in vec4 color;
+in vec2 localCoord;
+in vec4 geomDomain;
+out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+out float vcoverage_Stage0;
+flat out vec4 vgeomDomain_Stage0;
+void main() {
+ vec3 position = positionWithCoverage.xyz;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ vcoverage_Stage0 = positionWithCoverage.w * positionWithCoverage.z;
+ vgeomDomain_Stage0 = geomDomain;
+ gl_Position = vec4(position.x, position.y, 0.0, position.z);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/37-61.shader_test b/shaders/skia/37-61.shader_test
new file mode 100644
index 0000000..b83c31d
--- /dev/null
+++ b/shaders/skia/37-61.shader_test
@@ -0,0 +1,136 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform float ubias_Stage1_c0_c0_c0_c0;
+uniform float uscale_Stage1_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+in vec2 vTransformedCoords_0_Stage0;
+in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+in float vcoverage_Stage0;
+flat in vec4 vgeomDomain_Stage0;
+vec4 SweepGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float angle;
+ {
+ angle = atan(-vTransformedCoords_0_Stage0.y, -vTransformedCoords_0_Stage0.x);
+ }
+ float t = ((angle * 0.15915493667125702 + 0.5) + ubias_Stage1_c0_c0_c0_c0) * uscale_Stage1_c0_c0_c0_c0;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = SweepGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ float coverage = vcoverage_Stage0 * gl_FragCoord.w;
+ vec4 geoDomain;
+ geoDomain = vgeomDomain_Stage0;
+ if (coverage < 0.5) {
+ vec4 dists4 = clamp(vec4(1.0, 1.0, -1.0, -1.0) * (gl_FragCoord.xyxy - geoDomain), 0.0, 1.0);
+ vec2 dists2 = dists4.xy * dists4.zw;
+ coverage = min(coverage, dists2.x * dists2.y);
+ }
+ outputCoverage_Stage0 = vec4(coverage);
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_1_Stage0.x);
+ uint y = uint(vTransformedCoords_1_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ output_Stage2 = vec4(clamp(output_Stage2.xyz + value * 0.0039215688593685627, 0.0, output_Stage2.w), output_Stage2.w);
+ }
+ {
+ sk_FragColor = output_Stage2 * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec4 positionWithCoverage;
+in vec4 color;
+in vec2 localCoord;
+in vec4 geomDomain;
+out vec2 vTransformedCoords_0_Stage0;
+out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+out float vcoverage_Stage0;
+flat out vec4 vgeomDomain_Stage0;
+void main() {
+ vec3 position = positionWithCoverage.xyz;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ vcoverage_Stage0 = positionWithCoverage.w * positionWithCoverage.z;
+ vgeomDomain_Stage0 = geomDomain;
+ gl_Position = vec4(position.x, position.y, 0.0, position.z);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/37-62.shader_test b/shaders/skia/37-62.shader_test
new file mode 100644
index 0000000..e635c04
--- /dev/null
+++ b/shaders/skia/37-62.shader_test
@@ -0,0 +1,99 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform float ubias_Stage1_c0_c0_c0_c0;
+uniform float uscale_Stage1_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+noperspective in vec3 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 SweepGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 vTransformedCoords_0_Stage0_ensure2D = vTransformedCoords_0_Stage0.xy / vTransformedCoords_0_Stage0.z;
+ float angle;
+ {
+ angle = atan(-vTransformedCoords_0_Stage0_ensure2D.y, -vTransformedCoords_0_Stage0_ensure2D.x);
+ }
+ float t = ((angle * 0.15915493667125702 + 0.5) + ubias_Stage1_c0_c0_c0_c0) * uscale_Stage1_c0_c0_c0_c0;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = SweepGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec3 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0);
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/37-63.shader_test b/shaders/skia/37-63.shader_test
new file mode 100644
index 0000000..1a67cf8
--- /dev/null
+++ b/shaders/skia/37-63.shader_test
@@ -0,0 +1,115 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform float ubias_Stage1_c0_c0_c0_c0;
+uniform float uscale_Stage1_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+noperspective in vec3 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 SweepGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 vTransformedCoords_0_Stage0_ensure2D = vTransformedCoords_0_Stage0.xy / vTransformedCoords_0_Stage0.z;
+ float angle;
+ {
+ angle = atan(-vTransformedCoords_0_Stage0_ensure2D.y, -vTransformedCoords_0_Stage0_ensure2D.x);
+ }
+ float t = ((angle * 0.15915493667125702 + 0.5) + ubias_Stage1_c0_c0_c0_c0) * uscale_Stage1_c0_c0_c0_c0;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = SweepGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_1_Stage0.x);
+ uint y = uint(vTransformedCoords_1_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ output_Stage2 = vec4(clamp(output_Stage2.xyz + value * 0.0039215688593685627, 0.0, output_Stage2.w), output_Stage2.w);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec3 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0);
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/37-65.shader_test b/shaders/skia/37-65.shader_test
new file mode 100644
index 0000000..ac9dd43
--- /dev/null
+++ b/shaders/skia/37-65.shader_test
@@ -0,0 +1,114 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform float ubias_Stage1_c0_c0_c0_c0;
+uniform float uscale_Stage1_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 SweepGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float angle;
+ {
+ angle = atan(-vTransformedCoords_0_Stage0.y, -vTransformedCoords_0_Stage0.x);
+ }
+ float t = ((angle * 0.15915493667125702 + 0.5) + ubias_Stage1_c0_c0_c0_c0) * uscale_Stage1_c0_c0_c0_c0;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = SweepGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_1_Stage0.x);
+ uint y = uint(vTransformedCoords_1_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ output_Stage2 = vec4(clamp(output_Stage2.xyz + value * 0.0039215688593685627, 0.0, output_Stage2.w), output_Stage2.w);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/37-69.shader_test b/shaders/skia/37-69.shader_test
new file mode 100644
index 0000000..a377e4e
--- /dev/null
+++ b/shaders/skia/37-69.shader_test
@@ -0,0 +1,54 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uinnerRect_Stage1;
+uniform vec2 uradiusPlusHalf_Stage1;
+uniform vec4 uinnerRect_Stage2;
+uniform vec2 uradiusPlusHalf_Stage2;
+flat in vec4 vcolor_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec2 dxy0 = uinnerRect_Stage1.xy - gl_FragCoord.xy;
+ vec2 dxy1 = gl_FragCoord.xy - uinnerRect_Stage1.zw;
+ vec2 dxy = max(max(dxy0, dxy1), 0.0);
+ float alpha = clamp(uradiusPlusHalf_Stage1.x - length(dxy), 0.0, 1.0);
+ alpha = 1.0 - alpha;
+ output_Stage1 = vec4(alpha);
+ }
+ vec4 output_Stage2;
+ {
+ vec2 dxy0 = uinnerRect_Stage2.xy - gl_FragCoord.xy;
+ vec2 dxy1 = gl_FragCoord.xy - uinnerRect_Stage2.zw;
+ vec2 dxy = max(max(dxy0, dxy1), 0.0);
+ float alpha = clamp(uradiusPlusHalf_Stage2.x - length(dxy), 0.0, 1.0);
+ output_Stage2 = output_Stage1 * alpha;
+ }
+ {
+ sk_FragColor = outputColor_Stage0 * output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 position;
+in vec4 color;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/37-71.shader_test b/shaders/skia/37-71.shader_test
new file mode 100644
index 0000000..de8d3b7
--- /dev/null
+++ b/shaders/skia/37-71.shader_test
@@ -0,0 +1,67 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 TextureEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = TextureEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = OverrideInputFragmentProcessor_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 blend_dst_atop(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src + src.w * dst;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_dst_atop(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec2 inLocalCoord;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 color = inColor;
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/37-72.shader_test b/shaders/skia/37-72.shader_test
new file mode 100644
index 0000000..83a9eda
--- /dev/null
+++ b/shaders/skia/37-72.shader_test
@@ -0,0 +1,80 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 ucolor_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 TextureEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+vec4 ComposeOne_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_dst_in(_input, TextureEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0)));
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = ComposeOne_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 blend_plus(vec4 src, vec4 dst) {
+ return min(src + dst, 1.0);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_plus(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ {
+ output_Stage2 = output_Stage1 * ucolor_Stage2;
+ }
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec2 inLocalCoord;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 color = inColor;
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/37-73.shader_test b/shaders/skia/37-73.shader_test
new file mode 100644
index 0000000..769e179
--- /dev/null
+++ b/shaders/skia/37-73.shader_test
@@ -0,0 +1,49 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 urectUniform_Stage1;
+flat in vec4 vcolor_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ float alpha;
+ {
+ float xSub, ySub;
+ xSub = min(gl_FragCoord.x - urectUniform_Stage1.x, 0.0);
+ xSub += min(urectUniform_Stage1.z - gl_FragCoord.x, 0.0);
+ ySub = min(gl_FragCoord.y - urectUniform_Stage1.y, 0.0);
+ ySub += min(urectUniform_Stage1.w - gl_FragCoord.y, 0.0);
+ alpha = (1.0 + max(xSub, -1.0)) * (1.0 + max(ySub, -1.0));
+ }
+ output_Stage1 = vec4(alpha);
+ }
+ {
+ sk_FragColor = outputColor_Stage0 * output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 inPosition;
+in vec2 inLocalCoords;
+in vec4 color;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vcolor_Stage0 = color;
+ vec2 pos2 = inPosition;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/37-75.shader_test b/shaders/skia/37-75.shader_test
new file mode 100644
index 0000000..61758c9
--- /dev/null
+++ b/shaders/skia/37-75.shader_test
@@ -0,0 +1,92 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage2_c1_c0_c0_c0;
+uniform vec4 urightBorderColor_Stage2_c1_c0_c0_c0;
+uniform vec4 ustart_Stage2_c1_c0_c0_c0_c1_c0;
+uniform vec4 uend_Stage2_c1_c0_c0_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+vec4 RadialGradientLayout_Stage2_c1_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = length(vTransformedCoords_1_Stage0);
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage2_c1_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage2_c1_c0_c0_c0_c1_c0 + t * uend_Stage2_c1_c0_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage2_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = RadialGradientLayout_Stage2_c1_c0_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage2_c1_c0_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage2_c1_c0_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage2_c1_c0_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+vec4 ComposeOne_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_dst_in(_input, ClampedGradientEffect_Stage2_c1_c0_c0_c0(vec4(1.0)));
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TextureEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_src_in(vec4(1.0), ComposeOne_Stage2_c1_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage1 * output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/37-76.shader_test b/shaders/skia/37-76.shader_test
new file mode 100644
index 0000000..f21b462
--- /dev/null
+++ b/shaders/skia/37-76.shader_test
@@ -0,0 +1,124 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 uleftBorderColor_Stage1_c1_c0_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c1_c0_c0_c0;
+uniform vec4 ustart_Stage1_c1_c0_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c1_c0_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = ClampedGradientEffect_Stage1_c0_c0_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ return _output;
+}
+vec4 LinearGradientLayout_Stage1_c1_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_1_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c1_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c1_c0_c0_c0_c1_c0 + t * uend_Stage1_c1_c0_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c1_c0_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c1_c0_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c1_c0_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c1_c0_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = ClampedGradientEffect_Stage1_c1_c0_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_dst_in(OverrideInputFragmentProcessor_Stage1_c0_c0(inputColor), OverrideInputFragmentProcessor_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/37-78.shader_test b/shaders/skia/37-78.shader_test
new file mode 100644
index 0000000..54d1e28
--- /dev/null
+++ b/shaders/skia/37-78.shader_test
@@ -0,0 +1,44 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 ucircle_Stage1;
+noperspective in vec4 vcolor_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ float d;
+ {
+ d = (length((ucircle_Stage1.xy - gl_FragCoord.xy) * ucircle_Stage1.w) - 1.0) * ucircle_Stage1.z;
+ }
+ {
+ output_Stage1 = vec4(clamp(d, 0.0, 1.0));
+ }
+ }
+ {
+ sk_FragColor = outputColor_Stage0 * output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 position;
+in vec4 color;
+noperspective out vec4 vcolor_Stage0;
+void main() {
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/37-8.shader_test b/shaders/skia/37-8.shader_test
new file mode 100644
index 0000000..c379146
--- /dev/null
+++ b/shaders/skia/37-8.shader_test
@@ -0,0 +1,65 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 ucolor_Stage1;
+uniform vec4 ucolor_Stage2;
+uniform vec4 ucolor_Stage3_c0_c0;
+noperspective in vec4 vcolor_Stage0;
+vec4 ConstColorProcessor_Stage3_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage3_c0_c0;
+ }
+ return _output;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 blend_darken(vec4 src, vec4 dst) {
+ vec4 result = blend_src_over(src, dst);
+ result.xyz = min(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
+ return result;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ {
+ output_Stage1 = ucolor_Stage1;
+ }
+ }
+ vec4 output_Stage2;
+ {
+ {
+ output_Stage2 = output_Stage1 * ucolor_Stage2;
+ }
+ }
+ vec4 output_Stage3;
+ {
+ output_Stage3 = blend_darken(ConstColorProcessor_Stage3_c0_c0(vec4(1.0)), output_Stage2);
+ }
+ {
+ sk_FragColor = output_Stage3;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 position;
+in vec4 inColor;
+noperspective out vec4 vcolor_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = position;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/37-84.shader_test b/shaders/skia/37-84.shader_test
new file mode 100644
index 0000000..a52a333
--- /dev/null
+++ b/shaders/skia/37-84.shader_test
@@ -0,0 +1,141 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uCoordTransformMatrix_2_Stage0;
+uniform vec4 ustart_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 uclamp_Stage1_c1_c0_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_3_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c0_c0_c1_c0;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+vec4 ComposeOne_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_dst_in(_input, TiledGradientEffect_Stage1_c0_c0_c0_c0(vec4(1.0)));
+ return _output;
+}
+vec4 TextureEffect_Stage1_c1_c0_c0_c0(vec4 _input, vec2 _coords) {
+ _coords = _coords * uCoordTransformMatrix_2_Stage0.xz + uCoordTransformMatrix_2_Stage0.yw;
+ vec4 _output;
+ vec2 inCoord = _coords;
+ vec2 subsetCoord;
+ subsetCoord.x = inCoord.x;
+ subsetCoord.y = inCoord.y;
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage1_c1_c0_c0_c0.x, uclamp_Stage1_c1_c0_c0_c0.z);
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage1_c1_c0_c0_c0.y, uclamp_Stage1_c1_c0_c0_c0.w);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ _output = _input * textureColor;
+ return _output;
+}
+vec4 Bicubic_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coord = vTransformedCoords_1_Stage0 - vec2(0.5);
+ vec2 f = fract(coord);
+ coord += 0.5 - f;
+ vec4 wx = mat4(0.055555555555555552, 0.88888888888888884, 0.055555555555555552, 0.0, -0.5, 0.0, 0.5, 0.0, 0.83333333333333337, -2.0, 1.5, -0.33333333333333331, -0.3888888888888889, 1.1666666666666667, -1.1666666666666667, 0.3888888888888889) * vec4(1.0, f.x, f.x * f.x, (f.x * f.x) * f.x);
+ vec4 wy = mat4(0.055555555555555552, 0.88888888888888884, 0.055555555555555552, 0.0, -0.5, 0.0, 0.5, 0.0, 0.83333333333333337, -2.0, 1.5, -0.33333333333333331, -0.3888888888888889, 1.1666666666666667, -1.1666666666666667, 0.3888888888888889) * vec4(1.0, f.y, f.y * f.y, (f.y * f.y) * f.y);
+ vec4 rowColors[4];
+ rowColors[0] = TextureEffect_Stage1_c1_c0_c0_c0(vec4(1.0), coord + vec2(-1.0, -1.0));
+ rowColors[1] = TextureEffect_Stage1_c1_c0_c0_c0(vec4(1.0), coord + vec2(0.0, -1.0));
+ rowColors[2] = TextureEffect_Stage1_c1_c0_c0_c0(vec4(1.0), coord + vec2(1.0, -1.0));
+ rowColors[3] = TextureEffect_Stage1_c1_c0_c0_c0(vec4(1.0), coord + vec2(2.0, -1.0));
+ vec4 s0 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ rowColors[0] = TextureEffect_Stage1_c1_c0_c0_c0(vec4(1.0), coord + vec2(-1.0, 0.0));
+ rowColors[1] = TextureEffect_Stage1_c1_c0_c0_c0(vec4(1.0), coord);
+ rowColors[2] = TextureEffect_Stage1_c1_c0_c0_c0(vec4(1.0), coord + vec2(1.0, 0.0));
+ rowColors[3] = TextureEffect_Stage1_c1_c0_c0_c0(vec4(1.0), coord + vec2(2.0, 0.0));
+ vec4 s1 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ rowColors[0] = TextureEffect_Stage1_c1_c0_c0_c0(vec4(1.0), coord + vec2(-1.0, 1.0));
+ rowColors[1] = TextureEffect_Stage1_c1_c0_c0_c0(vec4(1.0), coord + vec2(0.0, 1.0));
+ rowColors[2] = TextureEffect_Stage1_c1_c0_c0_c0(vec4(1.0), coord + vec2(1.0, 1.0));
+ rowColors[3] = TextureEffect_Stage1_c1_c0_c0_c0(vec4(1.0), coord + vec2(2.0, 1.0));
+ vec4 s2 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ rowColors[0] = TextureEffect_Stage1_c1_c0_c0_c0(vec4(1.0), coord + vec2(-1.0, 2.0));
+ rowColors[1] = TextureEffect_Stage1_c1_c0_c0_c0(vec4(1.0), coord + vec2(0.0, 2.0));
+ rowColors[2] = TextureEffect_Stage1_c1_c0_c0_c0(vec4(1.0), coord + vec2(1.0, 2.0));
+ rowColors[3] = TextureEffect_Stage1_c1_c0_c0_c0(vec4(1.0), coord + vec2(2.0, 2.0));
+ vec4 s3 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ vec4 bicubicColor = ((wy.x * s0 + wy.y * s1) + wy.z * s2) + wy.w * s3;
+ bicubicColor.xyz = max(vec3(0.0), min(bicubicColor.xyz, bicubicColor.www));
+ _output = bicubicColor * _input;
+ return _output;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = Bicubic_Stage1_c1_c0(ComposeOne_Stage1_c0_c0(outputColor_Stage0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = texture(uTextureSampler_0_Stage2, vTransformedCoords_3_Stage0);
+ }
+ {
+ sk_FragColor = output_Stage1 * output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_3_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_3_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_3_Stage0 = (uCoordTransformMatrix_3_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/37-86.shader_test b/shaders/skia/37-86.shader_test
new file mode 100644
index 0000000..1d7cce8
--- /dev/null
+++ b/shaders/skia/37-86.shader_test
@@ -0,0 +1,101 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uCoordTransformMatrix_1_Stage0;
+uniform vec4 uclamp_Stage1_c0_c0_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0_c0_c0(vec4 _input, vec2 _coords) {
+ _coords = _coords * uCoordTransformMatrix_1_Stage0.xz + uCoordTransformMatrix_1_Stage0.yw;
+ vec4 _output;
+ vec2 inCoord = _coords;
+ vec2 subsetCoord;
+ subsetCoord.x = inCoord.x;
+ subsetCoord.y = inCoord.y;
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage1_c0_c0_c0_c0.x, uclamp_Stage1_c0_c0_c0_c0.z);
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage1_c0_c0_c0_c0.y, uclamp_Stage1_c0_c0_c0_c0.w);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ _output = _input * textureColor;
+ return _output;
+}
+vec4 Bicubic_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coord = vTransformedCoords_0_Stage0 - vec2(0.5);
+ vec2 f = fract(coord);
+ coord += 0.5 - f;
+ vec4 wx = mat4(0.055555555555555552, 0.88888888888888884, 0.055555555555555552, 0.0, -0.5, 0.0, 0.5, 0.0, 0.83333333333333337, -2.0, 1.5, -0.33333333333333331, -0.3888888888888889, 1.1666666666666667, -1.1666666666666667, 0.3888888888888889) * vec4(1.0, f.x, f.x * f.x, (f.x * f.x) * f.x);
+ vec4 wy = mat4(0.055555555555555552, 0.88888888888888884, 0.055555555555555552, 0.0, -0.5, 0.0, 0.5, 0.0, 0.83333333333333337, -2.0, 1.5, -0.33333333333333331, -0.3888888888888889, 1.1666666666666667, -1.1666666666666667, 0.3888888888888889) * vec4(1.0, f.y, f.y * f.y, (f.y * f.y) * f.y);
+ vec4 rowColors[4];
+ rowColors[0] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(-1.0, -1.0));
+ rowColors[1] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(0.0, -1.0));
+ rowColors[2] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(1.0, -1.0));
+ rowColors[3] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(2.0, -1.0));
+ vec4 s0 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ rowColors[0] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(-1.0, 0.0));
+ rowColors[1] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord);
+ rowColors[2] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(1.0, 0.0));
+ rowColors[3] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(2.0, 0.0));
+ vec4 s1 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ rowColors[0] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(-1.0, 1.0));
+ rowColors[1] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(0.0, 1.0));
+ rowColors[2] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(1.0, 1.0));
+ rowColors[3] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(2.0, 1.0));
+ vec4 s2 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ rowColors[0] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(-1.0, 2.0));
+ rowColors[1] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(0.0, 2.0));
+ rowColors[2] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(1.0, 2.0));
+ rowColors[3] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(2.0, 2.0));
+ vec4 s3 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ vec4 bicubicColor = ((wy.x * s0 + wy.y * s1) + wy.z * s2) + wy.w * s3;
+ bicubicColor.xyz = max(vec3(0.0), min(bicubicColor.xyz, bicubicColor.www));
+ _output = bicubicColor * _input;
+ return _output;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = Bicubic_Stage1_c0_c0(vec4(1.0));
+ output_Stage1.xyz *= outputColor_Stage0.xyz;
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = texture(uTextureSampler_0_Stage2, vTransformedCoords_2_Stage0);
+ }
+ {
+ sk_FragColor = output_Stage1 * output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/37-88.shader_test b/shaders/skia/37-88.shader_test
new file mode 100644
index 0000000..867adb6
--- /dev/null
+++ b/shaders/skia/37-88.shader_test
@@ -0,0 +1,95 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uCoordTransformMatrix_1_Stage0;
+uniform vec4 uclamp_Stage1_c0_c0_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0_c0_c0(vec4 _input, vec2 _coords) {
+ _coords = _coords * uCoordTransformMatrix_1_Stage0.xz + uCoordTransformMatrix_1_Stage0.yw;
+ vec4 _output;
+ vec2 inCoord = _coords;
+ vec2 subsetCoord;
+ subsetCoord.x = inCoord.x;
+ subsetCoord.y = inCoord.y;
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage1_c0_c0_c0_c0.x, uclamp_Stage1_c0_c0_c0_c0.z);
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage1_c0_c0_c0_c0.y, uclamp_Stage1_c0_c0_c0_c0.w);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ _output = _input * textureColor;
+ return _output;
+}
+vec4 Bicubic_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coord = vTransformedCoords_0_Stage0 - vec2(0.5);
+ vec2 f = fract(coord);
+ coord += 0.5 - f;
+ vec4 wx = mat4(0.055555555555555552, 0.88888888888888884, 0.055555555555555552, 0.0, -0.5, 0.0, 0.5, 0.0, 0.83333333333333337, -2.0, 1.5, -0.33333333333333331, -0.3888888888888889, 1.1666666666666667, -1.1666666666666667, 0.3888888888888889) * vec4(1.0, f.x, f.x * f.x, (f.x * f.x) * f.x);
+ vec4 wy = mat4(0.055555555555555552, 0.88888888888888884, 0.055555555555555552, 0.0, -0.5, 0.0, 0.5, 0.0, 0.83333333333333337, -2.0, 1.5, -0.33333333333333331, -0.3888888888888889, 1.1666666666666667, -1.1666666666666667, 0.3888888888888889) * vec4(1.0, f.y, f.y * f.y, (f.y * f.y) * f.y);
+ vec4 rowColors[4];
+ rowColors[0] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(-1.0, -1.0));
+ rowColors[1] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(0.0, -1.0));
+ rowColors[2] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(1.0, -1.0));
+ rowColors[3] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(2.0, -1.0));
+ vec4 s0 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ rowColors[0] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(-1.0, 0.0));
+ rowColors[1] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord);
+ rowColors[2] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(1.0, 0.0));
+ rowColors[3] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(2.0, 0.0));
+ vec4 s1 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ rowColors[0] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(-1.0, 1.0));
+ rowColors[1] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(0.0, 1.0));
+ rowColors[2] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(1.0, 1.0));
+ rowColors[3] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(2.0, 1.0));
+ vec4 s2 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ rowColors[0] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(-1.0, 2.0));
+ rowColors[1] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(0.0, 2.0));
+ rowColors[2] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(1.0, 2.0));
+ rowColors[3] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(2.0, 2.0));
+ vec4 s3 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ vec4 bicubicColor = ((wy.x * s0 + wy.y * s1) + wy.z * s2) + wy.w * s3;
+ bicubicColor.xyz = max(vec3(0.0), min(bicubicColor.xyz, bicubicColor.www));
+ _output = bicubicColor * _input;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = Bicubic_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = texture(uTextureSampler_0_Stage2, vTransformedCoords_2_Stage0);
+ }
+ {
+ sk_FragColor = output_Stage1 * output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/37-93.shader_test b/shaders/skia/37-93.shader_test
new file mode 100644
index 0000000..3b29ff3
--- /dev/null
+++ b/shaders/skia/37-93.shader_test
@@ -0,0 +1,44 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+noperspective in vec4 vQuadEdge_Stage0;
+noperspective in vec4 vinColor_Stage0;
+void main() {
+ {
+ float edgeAlpha;
+ vec2 duvdx = dFdx(vQuadEdge_Stage0.xy);
+ vec2 duvdy = -dFdy(vQuadEdge_Stage0.xy);
+ if (vQuadEdge_Stage0.z > 0.0 && vQuadEdge_Stage0.w > 0.0) {
+ edgeAlpha = min(min(vQuadEdge_Stage0.z, vQuadEdge_Stage0.w) + 0.5, 1.0);
+ } else {
+ vec2 gF = vec2((2.0 * vQuadEdge_Stage0.x) * duvdx.x - duvdx.y, (2.0 * vQuadEdge_Stage0.x) * duvdy.x - duvdy.y);
+ edgeAlpha = vQuadEdge_Stage0.x * vQuadEdge_Stage0.x - vQuadEdge_Stage0.y;
+ edgeAlpha = clamp(0.5 - edgeAlpha / length(gF), 0.0, 1.0);
+ }
+ }
+ {
+ sk_FragColor = vec4(0.0);
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 inPosition;
+in vec4 inColor;
+in vec4 inQuadEdge;
+noperspective out vec4 vQuadEdge_Stage0;
+noperspective out vec4 vinColor_Stage0;
+void main() {
+ vQuadEdge_Stage0 = inQuadEdge;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = inPosition;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/37-95.shader_test b/shaders/skia/37-95.shader_test
new file mode 100644
index 0000000..5f3161c
--- /dev/null
+++ b/shaders/skia/37-95.shader_test
@@ -0,0 +1,83 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 ubaseFrequency_Stage2;
+uniform float uz_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+uniform sampler2D uTextureSampler_1_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec3 fade_Stage2(vec3 t) {
+ return ((t * t) * t) * (t * (t * 6.0 - 15.0) + 10.0);
+}
+float perm_Stage2(float x) {
+ return texture(uTextureSampler_0_Stage2, vec2(fract(x / 256.0), 0.0)).x * 255.0;
+}
+float grad_Stage2(float x, vec3 p) {
+ return dot(texture(uTextureSampler_1_Stage2, vec2(fract(x / 16.0), 0.0)).xyz * 255.0 - vec3(1.0), p);
+}
+float lerp_Stage2(float a, float b, float w) {
+ return a + w * (b - a);
+}
+float noise_Stage2(vec3 p) {
+ vec3 P = mod(floor(p), 256.0);
+ p -= floor(p);
+ vec3 f = fade_Stage2(p);
+ float A = perm_Stage2(P.x) + P.y;
+ float AA = perm_Stage2(A) + P.z;
+ float AB = perm_Stage2(A + 1.0) + P.z;
+ float B = perm_Stage2(P.x + 1.0) + P.y;
+ float BA = perm_Stage2(B) + P.z;
+ float BB = perm_Stage2(B + 1.0) + P.z;
+ float result = lerp_Stage2(lerp_Stage2(lerp_Stage2(grad_Stage2(perm_Stage2(AA), p), grad_Stage2(perm_Stage2(BA), p + vec3(-1.0, 0.0, 0.0)), f.x), lerp_Stage2(grad_Stage2(perm_Stage2(AB), p + vec3(0.0, -1.0, 0.0)), grad_Stage2(perm_Stage2(BB), p + vec3(-1.0, -1.0, 0.0)), f.x), f.y), lerp_Stage2(lerp_Stage2(grad_Stage2(perm_Stage2(AA + 1.0), p + vec3(0.0, 0.0, -1.0)), grad_Stage2(perm_Stage2(BA + 1.0), p + vec3(-1.0, 0.0, -1.0)), f.x), lerp_Stage2(grad_Stage2(perm_Stage2(AB + 1.0), p + vec3(0.0, -1.0, -1.0)), grad_Stage2(perm_Stage2(BB + 1.0), p + vec3(-1.0, -1.0, -1.0)), f.x), f.y), f.z);
+ return result;
+}
+float noiseOctaves_Stage2(vec3 p) {
+ float result = 0.0;
+ float ratio = 1.0;
+ for (float i = 0.0;i < 2.0; i++) {
+ result += noise_Stage2(p) / ratio;
+ p *= 2.0;
+ ratio *= 2.0;
+ }
+ return (result + 1.0) / 2.0;
+}
+void main() {
+ vec4 output_Stage2;
+ {
+ vec2 coords = vTransformedCoords_1_Stage0 * ubaseFrequency_Stage2;
+ float r = noiseOctaves_Stage2(vec3(coords, uz_Stage2));
+ float g = noiseOctaves_Stage2(vec3(coords, uz_Stage2));
+ float b = noiseOctaves_Stage2(vec3(coords, uz_Stage2));
+ float a = noiseOctaves_Stage2(vec3(coords, uz_Stage2));
+ output_Stage2 = vec4(r, g, b, a);
+ output_Stage2 = clamp(output_Stage2, 0.0, 1.0);
+ output_Stage2 = vec4(output_Stage2.xyz * output_Stage2.www, output_Stage2.w);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/37-96.shader_test b/shaders/skia/37-96.shader_test
new file mode 100644
index 0000000..fbef72b
--- /dev/null
+++ b/shaders/skia/37-96.shader_test
@@ -0,0 +1,71 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uCoordTransformMatrix_2_Stage0;
+uniform vec4 usubset_Stage2_c0_c0;
+uniform vec4 uclamp_Stage2_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 TextureEffect_Stage2_c0_c0(vec4 _input, vec2 _coords) {
+ _coords = _coords * uCoordTransformMatrix_2_Stage0.xz + uCoordTransformMatrix_2_Stage0.yw;
+ vec4 _output;
+ vec2 inCoord = _coords;
+ vec2 subsetCoord;
+ subsetCoord.x = inCoord.x;
+ subsetCoord.y = mod(inCoord.y - usubset_Stage2_c0_c0.y, usubset_Stage2_c0_c0.w - usubset_Stage2_c0_c0.y) + usubset_Stage2_c0_c0.y;
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage2_c0_c0.x, uclamp_Stage2_c0_c0.z);
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage2_c0_c0.y, uclamp_Stage2_c0_c0.w);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ _output = _input * textureColor;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ float coord = vTransformedCoords_1_Stage0.x - 0.5;
+ float f = fract(coord);
+ coord += 0.5 - f;
+ float f2 = f * f;
+ vec4 w = mat4(0.055555555555555552, 0.88888888888888884, 0.055555555555555552, 0.0, -0.5, 0.0, 0.5, 0.0, 0.83333333333333337, -2.0, 1.5, -0.33333333333333331, -0.3888888888888889, 1.1666666666666667, -1.1666666666666667, 0.3888888888888889) * vec4(1.0, f, f2, f2 * f);
+ vec4 c[4];
+ c[0] = TextureEffect_Stage2_c0_c0(vec4(1.0), vec2(coord + -1.0, vTransformedCoords_1_Stage0.y));
+ c[1] = TextureEffect_Stage2_c0_c0(vec4(1.0), vec2(coord, vTransformedCoords_1_Stage0.y));
+ c[2] = TextureEffect_Stage2_c0_c0(vec4(1.0), vec2(coord + 1.0, vTransformedCoords_1_Stage0.y));
+ c[3] = TextureEffect_Stage2_c0_c0(vec4(1.0), vec2(coord + 2.0, vTransformedCoords_1_Stage0.y));
+ vec4 bicubicColor = ((c[0] * w.x + c[1] * w.y) + c[2] * w.z) + c[3] * w.w;
+ bicubicColor.xyz = max(vec3(0.0), min(bicubicColor.xyz, bicubicColor.www));
+ output_Stage2 = bicubicColor * output_Stage1;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/37.shader_test b/shaders/skia/37.shader_test
new file mode 100644
index 0000000..6786d28
--- /dev/null
+++ b/shaders/skia/37.shader_test
@@ -0,0 +1,92 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uCoordTransformMatrix_1_Stage0;
+uniform vec4 usubset_Stage1_c0_c0_c0_c0;
+uniform vec4 uclamp_Stage1_c0_c0_c0_c0;
+uniform sampler2DRect uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0_c0_c0(vec4 _input, vec2 _coords) {
+ _coords = _coords * uCoordTransformMatrix_1_Stage0.xz + uCoordTransformMatrix_1_Stage0.yw;
+ vec4 _output;
+ vec2 inCoord = _coords;
+ vec2 subsetCoord;
+ subsetCoord.x = mod(inCoord.x - usubset_Stage1_c0_c0_c0_c0.x, usubset_Stage1_c0_c0_c0_c0.z - usubset_Stage1_c0_c0_c0_c0.x) + usubset_Stage1_c0_c0_c0_c0.x;
+ {
+ float w = usubset_Stage1_c0_c0_c0_c0.w - usubset_Stage1_c0_c0_c0_c0.y;
+ float w2 = 2.0 * w;
+ float m = mod(inCoord.y - usubset_Stage1_c0_c0_c0_c0.y, w2);
+ subsetCoord.y = mix(m, w2 - m, step(w, m)) + usubset_Stage1_c0_c0_c0_c0.y;
+ }
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage1_c0_c0_c0_c0.x, uclamp_Stage1_c0_c0_c0_c0.z);
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage1_c0_c0_c0_c0.y, uclamp_Stage1_c0_c0_c0_c0.w);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ _output = _input * textureColor;
+ return _output;
+}
+vec4 Bicubic_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coord = vTransformedCoords_0_Stage0 - vec2(0.5);
+ vec2 f = fract(coord);
+ coord += 0.5 - f;
+ vec4 wx = mat4(0.055555555555555552, 0.88888888888888884, 0.055555555555555552, 0.0, -0.5, 0.0, 0.5, 0.0, 0.83333333333333337, -2.0, 1.5, -0.33333333333333331, -0.3888888888888889, 1.1666666666666667, -1.1666666666666667, 0.3888888888888889) * vec4(1.0, f.x, f.x * f.x, (f.x * f.x) * f.x);
+ vec4 wy = mat4(0.055555555555555552, 0.88888888888888884, 0.055555555555555552, 0.0, -0.5, 0.0, 0.5, 0.0, 0.83333333333333337, -2.0, 1.5, -0.33333333333333331, -0.3888888888888889, 1.1666666666666667, -1.1666666666666667, 0.3888888888888889) * vec4(1.0, f.y, f.y * f.y, (f.y * f.y) * f.y);
+ vec4 rowColors[4];
+ rowColors[0] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(-1.0, -1.0));
+ rowColors[1] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(0.0, -1.0));
+ rowColors[2] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(1.0, -1.0));
+ rowColors[3] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(2.0, -1.0));
+ vec4 s0 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ rowColors[0] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(-1.0, 0.0));
+ rowColors[1] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord);
+ rowColors[2] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(1.0, 0.0));
+ rowColors[3] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(2.0, 0.0));
+ vec4 s1 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ rowColors[0] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(-1.0, 1.0));
+ rowColors[1] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(0.0, 1.0));
+ rowColors[2] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(1.0, 1.0));
+ rowColors[3] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(2.0, 1.0));
+ vec4 s2 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ rowColors[0] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(-1.0, 2.0));
+ rowColors[1] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(0.0, 2.0));
+ rowColors[2] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(1.0, 2.0));
+ rowColors[3] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(2.0, 2.0));
+ vec4 s3 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ vec4 bicubicColor = ((wy.x * s0 + wy.y * s1) + wy.z * s2) + wy.w * s3;
+ bicubicColor = clamp(bicubicColor, 0.0, 1.0);
+ _output = bicubicColor * _input;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = Bicubic_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/370-2.shader_test b/shaders/skia/370-2.shader_test
new file mode 100644
index 0000000..b778a59
--- /dev/null
+++ b/shaders/skia/370-2.shader_test
@@ -0,0 +1,307 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_KHR_blend_equation_advanced : require
+out vec4 sk_FragColor;
+layout (blend_support_all_equations) out ;
+uniform vec4 uColor_Stage0;
+uniform vec4 ucircleData_Stage1_c1_c0_c0_c0_c0_c0;
+uniform vec2 uImageIncrement_Stage1_c1_c0_c0_c0_c1_c0;
+uniform vec2 uBounds_Stage1_c1_c0_c0_c0_c1_c0;
+uniform vec4 uKernel_Stage1_c1_c0_c0_c0_c1_c0[5];
+uniform vec2 uImageIncrement_Stage1_c1_c0_c1_c0_c1_c0;
+uniform vec4 uKernel_Stage1_c1_c0_c1_c0_c1_c0[3];
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+uniform sampler2D uTextureSampler_2_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+vec4 Dither_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = _input;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_0_Stage0.x);
+ uint y = uint(vTransformedCoords_0_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ _output = vec4(clamp(_output.xyz + value * 0.01587301678955555, 0.0, _output.w), _output.w);
+ return _output;
+}
+vec4 Big_Ole_Key_Stage1_c0_c0_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = _input;
+ return _output;
+}
+vec4 ConfigConversionEffect_Stage1_c0_c0_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = floor(_input * 255.0 + 0.5) / 255.0;
+ {
+ _output.xyz = floor((_output.xyz * _output.w) * 255.0 + 0.5) / 255.0;
+ }
+ return _output;
+}
+float _blend_overlay_component(float sc, float sa, float dc, float da) {
+ if (2.0 * dc <= da) {
+ return (2.0 * sc) * dc;
+ }
+ return sa * da - (2.0 * (da - dc)) * (sa - sc);
+}
+vec4 blend_overlay(vec4 src, vec4 dst) {
+ vec4 result = vec4(_blend_overlay_component(src.x, src.w, dst.x, dst.w), _blend_overlay_component(src.y, src.w, dst.y, dst.w), _blend_overlay_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+ result.xyz += dst.xyz * (1.0 - src.w) + src.xyz * (1.0 - dst.w);
+ return result;
+}
+vec4 ComposeTwo_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_overlay(Big_Ole_Key_Stage1_c0_c0_c1_c0_c0_c0(inputColor), ConfigConversionEffect_Stage1_c0_c0_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 blend_xor(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src + (1.0 - src.w) * dst;
+}
+vec4 ComposeTwo_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_xor(Dither_Stage1_c0_c0_c0_c0(inputColor), ComposeTwo_Stage1_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 CircleBlurFragmentProcessor_Stage1_c1_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 vec = vec2((gl_FragCoord.x - ucircleData_Stage1_c1_c0_c0_c0_c0_c0.x) * ucircleData_Stage1_c1_c0_c0_c0_c0_c0.w, (gl_FragCoord.y - ucircleData_Stage1_c1_c0_c0_c0_c0_c0.y) * ucircleData_Stage1_c1_c0_c0_c0_c0_c0.w);
+ float dist = length(vec) + (0.5 - ucircleData_Stage1_c1_c0_c0_c0_c0_c0.z) * ucircleData_Stage1_c1_c0_c0_c0_c0_c0.w;
+ _output = _input * texture(uTextureSampler_0_Stage1, vec2(dist, 0.5)).w;
+ return _output;
+}
+vec4 GaussianConvolution_Stage1_c1_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_1_Stage0 - 9.0 * uImageIncrement_Stage1_c1_c0_c0_c0_c1_c0;
+ vec2 coordSampled = vec2(0.0, 0.0);
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage1_c1_c0_c0_c0_c1_c0.x, uBounds_Stage1_c1_c0_c0_c0_c1_c0.y - uBounds_Stage1_c1_c0_c0_c0_c1_c0.x) + uBounds_Stage1_c1_c0_c0_c0_c1_c0.x;
+ _output += texture(uTextureSampler_1_Stage1, coordSampled) * uKernel_Stage1_c1_c0_c0_c0_c1_c0[0].x;
+ coord += uImageIncrement_Stage1_c1_c0_c0_c0_c1_c0;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage1_c1_c0_c0_c0_c1_c0.x, uBounds_Stage1_c1_c0_c0_c0_c1_c0.y - uBounds_Stage1_c1_c0_c0_c0_c1_c0.x) + uBounds_Stage1_c1_c0_c0_c0_c1_c0.x;
+ _output += texture(uTextureSampler_1_Stage1, coordSampled) * uKernel_Stage1_c1_c0_c0_c0_c1_c0[0].y;
+ coord += uImageIncrement_Stage1_c1_c0_c0_c0_c1_c0;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage1_c1_c0_c0_c0_c1_c0.x, uBounds_Stage1_c1_c0_c0_c0_c1_c0.y - uBounds_Stage1_c1_c0_c0_c0_c1_c0.x) + uBounds_Stage1_c1_c0_c0_c0_c1_c0.x;
+ _output += texture(uTextureSampler_1_Stage1, coordSampled) * uKernel_Stage1_c1_c0_c0_c0_c1_c0[0].z;
+ coord += uImageIncrement_Stage1_c1_c0_c0_c0_c1_c0;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage1_c1_c0_c0_c0_c1_c0.x, uBounds_Stage1_c1_c0_c0_c0_c1_c0.y - uBounds_Stage1_c1_c0_c0_c0_c1_c0.x) + uBounds_Stage1_c1_c0_c0_c0_c1_c0.x;
+ _output += texture(uTextureSampler_1_Stage1, coordSampled) * uKernel_Stage1_c1_c0_c0_c0_c1_c0[0].w;
+ coord += uImageIncrement_Stage1_c1_c0_c0_c0_c1_c0;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage1_c1_c0_c0_c0_c1_c0.x, uBounds_Stage1_c1_c0_c0_c0_c1_c0.y - uBounds_Stage1_c1_c0_c0_c0_c1_c0.x) + uBounds_Stage1_c1_c0_c0_c0_c1_c0.x;
+ _output += texture(uTextureSampler_1_Stage1, coordSampled) * uKernel_Stage1_c1_c0_c0_c0_c1_c0[1].x;
+ coord += uImageIncrement_Stage1_c1_c0_c0_c0_c1_c0;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage1_c1_c0_c0_c0_c1_c0.x, uBounds_Stage1_c1_c0_c0_c0_c1_c0.y - uBounds_Stage1_c1_c0_c0_c0_c1_c0.x) + uBounds_Stage1_c1_c0_c0_c0_c1_c0.x;
+ _output += texture(uTextureSampler_1_Stage1, coordSampled) * uKernel_Stage1_c1_c0_c0_c0_c1_c0[1].y;
+ coord += uImageIncrement_Stage1_c1_c0_c0_c0_c1_c0;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage1_c1_c0_c0_c0_c1_c0.x, uBounds_Stage1_c1_c0_c0_c0_c1_c0.y - uBounds_Stage1_c1_c0_c0_c0_c1_c0.x) + uBounds_Stage1_c1_c0_c0_c0_c1_c0.x;
+ _output += texture(uTextureSampler_1_Stage1, coordSampled) * uKernel_Stage1_c1_c0_c0_c0_c1_c0[1].z;
+ coord += uImageIncrement_Stage1_c1_c0_c0_c0_c1_c0;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage1_c1_c0_c0_c0_c1_c0.x, uBounds_Stage1_c1_c0_c0_c0_c1_c0.y - uBounds_Stage1_c1_c0_c0_c0_c1_c0.x) + uBounds_Stage1_c1_c0_c0_c0_c1_c0.x;
+ _output += texture(uTextureSampler_1_Stage1, coordSampled) * uKernel_Stage1_c1_c0_c0_c0_c1_c0[1].w;
+ coord += uImageIncrement_Stage1_c1_c0_c0_c0_c1_c0;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage1_c1_c0_c0_c0_c1_c0.x, uBounds_Stage1_c1_c0_c0_c0_c1_c0.y - uBounds_Stage1_c1_c0_c0_c0_c1_c0.x) + uBounds_Stage1_c1_c0_c0_c0_c1_c0.x;
+ _output += texture(uTextureSampler_1_Stage1, coordSampled) * uKernel_Stage1_c1_c0_c0_c0_c1_c0[2].x;
+ coord += uImageIncrement_Stage1_c1_c0_c0_c0_c1_c0;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage1_c1_c0_c0_c0_c1_c0.x, uBounds_Stage1_c1_c0_c0_c0_c1_c0.y - uBounds_Stage1_c1_c0_c0_c0_c1_c0.x) + uBounds_Stage1_c1_c0_c0_c0_c1_c0.x;
+ _output += texture(uTextureSampler_1_Stage1, coordSampled) * uKernel_Stage1_c1_c0_c0_c0_c1_c0[2].y;
+ coord += uImageIncrement_Stage1_c1_c0_c0_c0_c1_c0;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage1_c1_c0_c0_c0_c1_c0.x, uBounds_Stage1_c1_c0_c0_c0_c1_c0.y - uBounds_Stage1_c1_c0_c0_c0_c1_c0.x) + uBounds_Stage1_c1_c0_c0_c0_c1_c0.x;
+ _output += texture(uTextureSampler_1_Stage1, coordSampled) * uKernel_Stage1_c1_c0_c0_c0_c1_c0[2].z;
+ coord += uImageIncrement_Stage1_c1_c0_c0_c0_c1_c0;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage1_c1_c0_c0_c0_c1_c0.x, uBounds_Stage1_c1_c0_c0_c0_c1_c0.y - uBounds_Stage1_c1_c0_c0_c0_c1_c0.x) + uBounds_Stage1_c1_c0_c0_c0_c1_c0.x;
+ _output += texture(uTextureSampler_1_Stage1, coordSampled) * uKernel_Stage1_c1_c0_c0_c0_c1_c0[2].w;
+ coord += uImageIncrement_Stage1_c1_c0_c0_c0_c1_c0;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage1_c1_c0_c0_c0_c1_c0.x, uBounds_Stage1_c1_c0_c0_c0_c1_c0.y - uBounds_Stage1_c1_c0_c0_c0_c1_c0.x) + uBounds_Stage1_c1_c0_c0_c0_c1_c0.x;
+ _output += texture(uTextureSampler_1_Stage1, coordSampled) * uKernel_Stage1_c1_c0_c0_c0_c1_c0[3].x;
+ coord += uImageIncrement_Stage1_c1_c0_c0_c0_c1_c0;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage1_c1_c0_c0_c0_c1_c0.x, uBounds_Stage1_c1_c0_c0_c0_c1_c0.y - uBounds_Stage1_c1_c0_c0_c0_c1_c0.x) + uBounds_Stage1_c1_c0_c0_c0_c1_c0.x;
+ _output += texture(uTextureSampler_1_Stage1, coordSampled) * uKernel_Stage1_c1_c0_c0_c0_c1_c0[3].y;
+ coord += uImageIncrement_Stage1_c1_c0_c0_c0_c1_c0;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage1_c1_c0_c0_c0_c1_c0.x, uBounds_Stage1_c1_c0_c0_c0_c1_c0.y - uBounds_Stage1_c1_c0_c0_c0_c1_c0.x) + uBounds_Stage1_c1_c0_c0_c0_c1_c0.x;
+ _output += texture(uTextureSampler_1_Stage1, coordSampled) * uKernel_Stage1_c1_c0_c0_c0_c1_c0[3].z;
+ coord += uImageIncrement_Stage1_c1_c0_c0_c0_c1_c0;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage1_c1_c0_c0_c0_c1_c0.x, uBounds_Stage1_c1_c0_c0_c0_c1_c0.y - uBounds_Stage1_c1_c0_c0_c0_c1_c0.x) + uBounds_Stage1_c1_c0_c0_c0_c1_c0.x;
+ _output += texture(uTextureSampler_1_Stage1, coordSampled) * uKernel_Stage1_c1_c0_c0_c0_c1_c0[3].w;
+ coord += uImageIncrement_Stage1_c1_c0_c0_c0_c1_c0;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage1_c1_c0_c0_c0_c1_c0.x, uBounds_Stage1_c1_c0_c0_c0_c1_c0.y - uBounds_Stage1_c1_c0_c0_c0_c1_c0.x) + uBounds_Stage1_c1_c0_c0_c0_c1_c0.x;
+ _output += texture(uTextureSampler_1_Stage1, coordSampled) * uKernel_Stage1_c1_c0_c0_c0_c1_c0[4].x;
+ coord += uImageIncrement_Stage1_c1_c0_c0_c0_c1_c0;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage1_c1_c0_c0_c0_c1_c0.x, uBounds_Stage1_c1_c0_c0_c0_c1_c0.y - uBounds_Stage1_c1_c0_c0_c0_c1_c0.x) + uBounds_Stage1_c1_c0_c0_c0_c1_c0.x;
+ _output += texture(uTextureSampler_1_Stage1, coordSampled) * uKernel_Stage1_c1_c0_c0_c0_c1_c0[4].y;
+ coord += uImageIncrement_Stage1_c1_c0_c0_c0_c1_c0;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage1_c1_c0_c0_c0_c1_c0.x, uBounds_Stage1_c1_c0_c0_c0_c1_c0.y - uBounds_Stage1_c1_c0_c0_c0_c1_c0.x) + uBounds_Stage1_c1_c0_c0_c0_c1_c0.x;
+ _output += texture(uTextureSampler_1_Stage1, coordSampled) * uKernel_Stage1_c1_c0_c0_c0_c1_c0[4].z;
+ coord += uImageIncrement_Stage1_c1_c0_c0_c0_c1_c0;
+ _output *= _input;
+ return _output;
+}
+vec4 blend_multiply(vec4 src, vec4 dst) {
+ return vec4(((1.0 - src.w) * dst.xyz + (1.0 - dst.w) * src.xyz) + src.xyz * dst.xyz, src.w + (1.0 - src.w) * dst.w);
+}
+vec4 ComposeTwo_Stage1_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_multiply(CircleBlurFragmentProcessor_Stage1_c1_c0_c0_c0_c0_c0(inputColor), GaussianConvolution_Stage1_c1_c0_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 ClampFragmentProcessor_Stage1_c1_c0_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ float alpha = clamp(_input.w, 0.0, 1.0);
+ _output = vec4(clamp(_input.xyz, 0.0, alpha), alpha);
+ }
+ return _output;
+}
+vec4 GaussianConvolution_Stage1_c1_c0_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_2_Stage0 - 5.0 * uImageIncrement_Stage1_c1_c0_c1_c0_c1_c0;
+ vec2 coordSampled = vec2(0.0, 0.0);
+ coordSampled = coord;
+ _output += texture(uTextureSampler_2_Stage1, coordSampled) * uKernel_Stage1_c1_c0_c1_c0_c1_c0[0].x;
+ coord += uImageIncrement_Stage1_c1_c0_c1_c0_c1_c0;
+ coordSampled = coord;
+ _output += texture(uTextureSampler_2_Stage1, coordSampled) * uKernel_Stage1_c1_c0_c1_c0_c1_c0[0].y;
+ coord += uImageIncrement_Stage1_c1_c0_c1_c0_c1_c0;
+ coordSampled = coord;
+ _output += texture(uTextureSampler_2_Stage1, coordSampled) * uKernel_Stage1_c1_c0_c1_c0_c1_c0[0].z;
+ coord += uImageIncrement_Stage1_c1_c0_c1_c0_c1_c0;
+ coordSampled = coord;
+ _output += texture(uTextureSampler_2_Stage1, coordSampled) * uKernel_Stage1_c1_c0_c1_c0_c1_c0[0].w;
+ coord += uImageIncrement_Stage1_c1_c0_c1_c0_c1_c0;
+ coordSampled = coord;
+ _output += texture(uTextureSampler_2_Stage1, coordSampled) * uKernel_Stage1_c1_c0_c1_c0_c1_c0[1].x;
+ coord += uImageIncrement_Stage1_c1_c0_c1_c0_c1_c0;
+ coordSampled = coord;
+ _output += texture(uTextureSampler_2_Stage1, coordSampled) * uKernel_Stage1_c1_c0_c1_c0_c1_c0[1].y;
+ coord += uImageIncrement_Stage1_c1_c0_c1_c0_c1_c0;
+ coordSampled = coord;
+ _output += texture(uTextureSampler_2_Stage1, coordSampled) * uKernel_Stage1_c1_c0_c1_c0_c1_c0[1].z;
+ coord += uImageIncrement_Stage1_c1_c0_c1_c0_c1_c0;
+ coordSampled = coord;
+ _output += texture(uTextureSampler_2_Stage1, coordSampled) * uKernel_Stage1_c1_c0_c1_c0_c1_c0[1].w;
+ coord += uImageIncrement_Stage1_c1_c0_c1_c0_c1_c0;
+ coordSampled = coord;
+ _output += texture(uTextureSampler_2_Stage1, coordSampled) * uKernel_Stage1_c1_c0_c1_c0_c1_c0[2].x;
+ coord += uImageIncrement_Stage1_c1_c0_c1_c0_c1_c0;
+ coordSampled = coord;
+ _output += texture(uTextureSampler_2_Stage1, coordSampled) * uKernel_Stage1_c1_c0_c1_c0_c1_c0[2].y;
+ coord += uImageIncrement_Stage1_c1_c0_c1_c0_c1_c0;
+ coordSampled = coord;
+ _output += texture(uTextureSampler_2_Stage1, coordSampled) * uKernel_Stage1_c1_c0_c1_c0_c1_c0[2].z;
+ coord += uImageIncrement_Stage1_c1_c0_c1_c0_c1_c0;
+ _output *= _input;
+ return _output;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 blend_darken(vec4 src, vec4 dst) {
+ vec4 result = blend_src_over(src, dst);
+ result.xyz = min(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
+ return result;
+}
+vec4 ComposeTwo_Stage1_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_darken(ClampFragmentProcessor_Stage1_c1_c0_c1_c0_c0_c0(inputColor), GaussianConvolution_Stage1_c1_c0_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+float _guarded_divide(float n, float d) {
+ return n / d;
+}
+float _color_burn_component(float sc, float sa, float dc, float da) {
+ if (da == dc) {
+ return (sa * da + sc * (1.0 - da)) + dc * (1.0 - sa);
+ } else if (sc == 0.0) {
+ return dc * (1.0 - sa);
+ }
+ float d = max(0.0, da - _guarded_divide((da - dc) * sa, sc));
+ return (d * sa + sc * (1.0 - da)) + dc * (1.0 - sa);
+}
+vec4 blend_color_burn(vec4 src, vec4 dst) {
+ return vec4(_color_burn_component(src.x, src.w, dst.x, dst.w), _color_burn_component(src.y, src.w, dst.y, dst.w), _color_burn_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+}
+vec4 ComposeTwo_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_color_burn(ComposeTwo_Stage1_c1_c0_c0_c0(inputColor), ComposeTwo_Stage1_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 blend_hard_light(vec4 src, vec4 dst) {
+ return blend_overlay(dst, src);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = uColor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_hard_light(ComposeTwo_Stage1_c0_c0(inputColor), ComposeTwo_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+in vec2 inPosition;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+void main() {
+ vec2 pos2 = (uViewM_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(inPosition, 1.0)).xy;
+ {
+ vec2 _posTmp = pos2;
+ _posTmp = floor(_posTmp) + vec2(0.5, 0.5);
+ gl_Position = vec4(_posTmp, 0.0, 1.0);
+ }
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/370-3.shader_test b/shaders/skia/370-3.shader_test
new file mode 100644
index 0000000..e708c48
--- /dev/null
+++ b/shaders/skia/370-3.shader_test
@@ -0,0 +1,46 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform mat4 um_Stage2;
+uniform vec4 uv_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ vec4 inputColor = output_Stage1;
+ output_Stage2 = um_Stage2 * inputColor + uv_Stage2;
+ {
+ output_Stage2 = clamp(output_Stage2, 0.0, 1.0);
+ }
+ {
+ output_Stage2.xyz *= output_Stage2.w;
+ }
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/370-4.shader_test b/shaders/skia/370-4.shader_test
new file mode 100644
index 0000000..1fd4091
--- /dev/null
+++ b/shaders/skia/370-4.shader_test
@@ -0,0 +1,83 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 ucircle_Stage2_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 ClampFragmentProcessor_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ float alpha = clamp(_input.w, 0.0, 1.0);
+ _output = vec4(clamp(_input.xyz, 0.0, alpha), alpha);
+ }
+ return _output;
+}
+vec4 CircleEffect_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ float d;
+ {
+ d = (length((ucircle_Stage2_c1_c0.xy - gl_FragCoord.xy) * ucircle_Stage2_c1_c0.w) - 1.0) * ucircle_Stage2_c1_c0.z;
+ }
+ {
+ _output = _input * clamp(d, 0.0, 1.0);
+ }
+ return _output;
+}
+float _blend_color_luminance(vec3 color) {
+ return dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), color);
+}
+vec3 _blend_set_color_luminance(vec3 hueSatColor, float alpha, vec3 lumColor) {
+ float lum = _blend_color_luminance(lumColor);
+ vec3 result = (lum - _blend_color_luminance(hueSatColor)) + hueSatColor;
+ float minComp = min(min(result.x, result.y), result.z);
+ float maxComp = max(max(result.x, result.y), result.z);
+ if (minComp < 0.0 && lum != minComp) {
+ result = lum + ((result - lum) * lum) / (lum - minComp);
+ }
+ if (maxComp > alpha && maxComp != lum) {
+ return lum + ((result - lum) * (alpha - lum)) / (maxComp - lum);
+ }
+ return result;
+}
+vec4 blend_color(vec4 src, vec4 dst) {
+ float alpha = dst.w * src.w;
+ vec3 sda = src.xyz * dst.w;
+ vec3 dsa = dst.xyz * src.w;
+ return vec4((((_blend_set_color_luminance(sda, alpha, dsa) + dst.xyz) - dsa) + src.xyz) - sda, (src.w + dst.w) - alpha);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ vec4 inputColor = vec4(output_Stage1.xyz, 1.0);
+ output_Stage2 = blend_color(ClampFragmentProcessor_Stage2_c0_c0(inputColor), CircleEffect_Stage2_c1_c0(inputColor));
+ output_Stage2 *= output_Stage1.w;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/370.shader_test b/shaders/skia/370.shader_test
new file mode 100644
index 0000000..7cf509c
--- /dev/null
+++ b/shaders/skia/370.shader_test
@@ -0,0 +1,160 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage2_c1_c0;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.w) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ } else {
+ {
+ if (t < uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = OverrideInputFragmentProcessor_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c1_c0;
+ }
+ return _output;
+}
+float _blend_overlay_component(float sc, float sa, float dc, float da) {
+ if (2.0 * dc <= da) {
+ return (2.0 * sc) * dc;
+ }
+ return sa * da - (2.0 * (da - dc)) * (sa - sc);
+}
+vec4 blend_overlay(vec4 src, vec4 dst) {
+ vec4 result = vec4(_blend_overlay_component(src.x, src.w, dst.x, dst.w), _blend_overlay_component(src.y, src.w, dst.y, dst.w), _blend_overlay_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+ result.xyz += dst.xyz * (1.0 - src.w) + src.xyz * (1.0 - dst.w);
+ return result;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 blend_darken(vec4 src, vec4 dst) {
+ vec4 result = blend_src_over(src, dst);
+ result.xyz = min(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
+ return result;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_overlay(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_darken(ConstColorProcessor_Stage2_c1_c0(vec4(1.0)), output_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 inColor;
+in vec2 inLocalCoord;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/373-2.shader_test b/shaders/skia/373-2.shader_test
new file mode 100644
index 0000000..9f5ee56
--- /dev/null
+++ b/shaders/skia/373-2.shader_test
@@ -0,0 +1,46 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+noperspective in vec4 vQuadEdge_Stage0;
+noperspective in vec4 vinColor_Stage0;
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ float edgeAlpha;
+ vec2 duvdx = dFdx(vQuadEdge_Stage0.xy);
+ vec2 duvdy = -dFdy(vQuadEdge_Stage0.xy);
+ if (vQuadEdge_Stage0.z > 0.0 && vQuadEdge_Stage0.w > 0.0) {
+ edgeAlpha = min(min(vQuadEdge_Stage0.z, vQuadEdge_Stage0.w) + 0.5, 1.0);
+ } else {
+ vec2 gF = vec2((2.0 * vQuadEdge_Stage0.x) * duvdx.x - duvdx.y, (2.0 * vQuadEdge_Stage0.x) * duvdy.x - duvdy.y);
+ edgeAlpha = vQuadEdge_Stage0.x * vQuadEdge_Stage0.x - vQuadEdge_Stage0.y;
+ edgeAlpha = clamp(0.5 - edgeAlpha / length(gF), 0.0, 1.0);
+ }
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ {
+ sk_FragColor = 1.0 - outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 inPosition;
+in vec4 inColor;
+in vec4 inQuadEdge;
+noperspective out vec4 vQuadEdge_Stage0;
+noperspective out vec4 vinColor_Stage0;
+void main() {
+ vQuadEdge_Stage0 = inQuadEdge;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = inPosition;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/373-3.shader_test b/shaders/skia/373-3.shader_test
new file mode 100644
index 0000000..c24f382
--- /dev/null
+++ b/shaders/skia/373-3.shader_test
@@ -0,0 +1,47 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform mat4 um_Stage2;
+uniform vec4 uv_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ vec4 inputColor = output_Stage1;
+ {
+ float nonZeroAlpha = max(inputColor.w, 9.9999997473787516e-05);
+ inputColor = vec4(inputColor.xyz / nonZeroAlpha, inputColor.w);
+ }
+ output_Stage2 = um_Stage2 * inputColor + uv_Stage2;
+ {
+ output_Stage2 = clamp(output_Stage2, 0.0, 1.0);
+ }
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/373-4.shader_test b/shaders/skia/373-4.shader_test
new file mode 100644
index 0000000..311c068
--- /dev/null
+++ b/shaders/skia/373-4.shader_test
@@ -0,0 +1,80 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 ucircleData_Stage2_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 ClampFragmentProcessor_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ float alpha = clamp(_input.w, 0.0, 1.0);
+ _output = vec4(clamp(_input.xyz, 0.0, alpha), alpha);
+ }
+ return _output;
+}
+vec4 CircleBlurFragmentProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 vec = vec2((gl_FragCoord.x - ucircleData_Stage2_c1_c0.x) * ucircleData_Stage2_c1_c0.w, (gl_FragCoord.y - ucircleData_Stage2_c1_c0.y) * ucircleData_Stage2_c1_c0.w);
+ float dist = length(vec) + (0.5 - ucircleData_Stage2_c1_c0.z) * ucircleData_Stage2_c1_c0.w;
+ _output = _input * texture(uTextureSampler_0_Stage2, vec2(dist, 0.5)).w;
+ return _output;
+}
+float _blend_color_luminance(vec3 color) {
+ return dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), color);
+}
+vec3 _blend_set_color_luminance(vec3 hueSatColor, float alpha, vec3 lumColor) {
+ float lum = _blend_color_luminance(lumColor);
+ vec3 result = (lum - _blend_color_luminance(hueSatColor)) + hueSatColor;
+ float minComp = min(min(result.x, result.y), result.z);
+ float maxComp = max(max(result.x, result.y), result.z);
+ if (minComp < 0.0 && lum != minComp) {
+ result = lum + ((result - lum) * lum) / (lum - minComp);
+ }
+ if (maxComp > alpha && maxComp != lum) {
+ return lum + ((result - lum) * (alpha - lum)) / (maxComp - lum);
+ }
+ return result;
+}
+vec4 blend_luminosity(vec4 src, vec4 dst) {
+ float alpha = dst.w * src.w;
+ vec3 sda = src.xyz * dst.w;
+ vec3 dsa = dst.xyz * src.w;
+ return vec4((((_blend_set_color_luminance(dsa, alpha, sda) + dst.xyz) - dsa) + src.xyz) - sda, (src.w + dst.w) - alpha);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ vec4 inputColor = vec4(output_Stage1.xyz, 1.0);
+ output_Stage2 = blend_luminosity(ClampFragmentProcessor_Stage2_c0_c0(inputColor), CircleBlurFragmentProcessor_Stage2_c1_c0(inputColor));
+ output_Stage2 *= output_Stage1.w;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/373.shader_test b/shaders/skia/373.shader_test
new file mode 100644
index 0000000..e3d63c7
--- /dev/null
+++ b/shaders/skia/373.shader_test
@@ -0,0 +1,89 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 ucolor_Stage1_c0_c0_c0_c0;
+uniform vec4 ucolor_Stage2_c1_c0;
+noperspective in vec4 vcolor_Stage0;
+vec4 ConstColorProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = _input.w * ucolor_Stage1_c0_c0_c0_c0;
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = ConstColorProcessor_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c1_c0;
+ }
+ return _output;
+}
+float _blend_overlay_component(float sc, float sa, float dc, float da) {
+ if (2.0 * dc <= da) {
+ return (2.0 * sc) * dc;
+ }
+ return sa * da - (2.0 * (da - dc)) * (sa - sc);
+}
+vec4 blend_overlay(vec4 src, vec4 dst) {
+ vec4 result = vec4(_blend_overlay_component(src.x, src.w, dst.x, dst.w), _blend_overlay_component(src.y, src.w, dst.y, dst.w), _blend_overlay_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+ result.xyz += dst.xyz * (1.0 - src.w) + src.xyz * (1.0 - dst.w);
+ return result;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 blend_darken(vec4 src, vec4 dst) {
+ vec4 result = blend_src_over(src, dst);
+ result.xyz = min(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
+ return result;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_overlay(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_darken(ConstColorProcessor_Stage2_c1_c0(vec4(1.0)), output_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 position;
+in vec4 inColor;
+noperspective out vec4 vcolor_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/376-2.shader_test b/shaders/skia/376-2.shader_test
new file mode 100644
index 0000000..ba74e10
--- /dev/null
+++ b/shaders/skia/376-2.shader_test
@@ -0,0 +1,115 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+uniform vec2 ubaseFrequency_Stage3_c0_c0;
+uniform vec2 ustitchData_Stage3_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage3;
+uniform sampler2D uTextureSampler_1_Stage3;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+float perlinnoise_Stage3_c0_c0(float chanCoord, vec2 noiseVec, vec2 stitchData) {
+ vec4 floorVal;
+ floorVal.xy = floor(noiseVec);
+ floorVal.zw = floorVal.xy + vec2(1.0);
+ vec2 fractVal = fract(noiseVec);
+ vec2 noiseSmooth = (fractVal * fractVal) * (vec2(3.0) - vec2(2.0) * fractVal);
+ if (floorVal.x >= stitchData.x) {
+ floorVal.x -= stitchData.x;
+ }
+ if (floorVal.y >= stitchData.y) {
+ floorVal.y -= stitchData.y;
+ }
+ if (floorVal.z >= stitchData.x) {
+ floorVal.z -= stitchData.x;
+ }
+ if (floorVal.w >= stitchData.y) {
+ floorVal.w -= stitchData.y;
+ }
+ floorVal = fract(floor(mod(floorVal, 256.0)) / vec4(256.0));
+ vec2 latticeIdx;
+ latticeIdx.x = texture(uTextureSampler_0_Stage3, vec2(floorVal.x, 0.5)).x;
+ latticeIdx.y = texture(uTextureSampler_0_Stage3, vec2(floorVal.z, 0.5)).x;
+ vec4 bcoords = fract(latticeIdx.xyxy + floorVal.yyww);
+ vec2 uv;
+ vec4 lattice = texture(uTextureSampler_1_Stage3, vec2(bcoords.x, chanCoord)).zyxw;
+ uv.x = dot((lattice.yw + lattice.xz * vec2(0.00390625)) * vec2(2.0) - vec2(1.0), fractVal);
+ fractVal.x -= 1.0;
+ lattice = texture(uTextureSampler_1_Stage3, vec2(bcoords.y, chanCoord)).zyxw;
+ uv.y = dot((lattice.yw + lattice.xz * vec2(0.00390625)) * vec2(2.0) - vec2(1.0), fractVal);
+ vec2 ab;
+ ab.x = mix(uv.x, uv.y, noiseSmooth.x);
+ fractVal.y -= 1.0;
+ lattice = texture(uTextureSampler_1_Stage3, vec2(bcoords.w, chanCoord)).zyxw;
+ uv.y = dot((lattice.yw + lattice.xz * vec2(0.00390625)) * vec2(2.0) - vec2(1.0), fractVal);
+ fractVal.x += 1.0;
+ lattice = texture(uTextureSampler_1_Stage3, vec2(bcoords.z, chanCoord)).zyxw;
+ uv.x = dot((lattice.yw + lattice.xz * vec2(0.00390625)) * vec2(2.0) - vec2(1.0), fractVal);
+ ab.y = mix(uv.x, uv.y, noiseSmooth.x);
+ return mix(ab.x, ab.y, noiseSmooth.y);
+}
+vec4 PerlinNoise_Stage3_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 noiseVec = floor(vTransformedCoords_0_Stage0) * ubaseFrequency_Stage3_c0_c0;
+ _output = vec4(0.0);
+ vec2 stitchData = ustitchData_Stage3_c0_c0;
+ float ratio = 1.0;
+ for (int octave = 0;octave < 9; ++octave) {
+ _output += abs(vec4(perlinnoise_Stage3_c0_c0(0.125, noiseVec, stitchData), perlinnoise_Stage3_c0_c0(0.375, noiseVec, stitchData), perlinnoise_Stage3_c0_c0(0.625, noiseVec, stitchData), perlinnoise_Stage3_c0_c0(0.875, noiseVec, stitchData))) * ratio;
+ noiseVec *= vec2(2.0);
+ ratio *= 0.5;
+ stitchData *= vec2(2.0);
+ }
+ _output = clamp(_output, 0.0, 1.0);
+ _output = vec4(_output.xyz * _output.www, _output.w);
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ float nonZeroAlpha = max(1.0, 9.9999997473787516e-05);
+ vec4 coord = vec4(vec4(1.0).xyz / nonZeroAlpha, nonZeroAlpha);
+ coord = coord * 0.9960939884185791 + vec4(0.0019529999699443579, 0.0019529999699443579, 0.0019529999699443579, 0.0019529999699443579);
+ output_Stage1.w = texture(uTextureSampler_0_Stage1, vec2(coord.w, 0.125)).w;
+ output_Stage1.x = texture(uTextureSampler_0_Stage1, vec2(coord.x, 0.375)).w;
+ output_Stage1.y = texture(uTextureSampler_0_Stage1, vec2(coord.y, 0.625)).w;
+ output_Stage1.z = texture(uTextureSampler_0_Stage1, vec2(coord.z, 0.875)).w;
+ output_Stage1.xyz *= output_Stage1.w;
+ }
+ vec4 output_Stage2;
+ {
+ {
+ output_Stage2 = clamp(output_Stage1, 0.0, 1.0);
+ }
+ }
+ {
+ blend_dst_in(output_Stage2, PerlinNoise_Stage3_c0_c0(vec4(1.0)));
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/376-3.shader_test b/shaders/skia/376-3.shader_test
new file mode 100644
index 0000000..6598acf
--- /dev/null
+++ b/shaders/skia/376-3.shader_test
@@ -0,0 +1,43 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform mat4 um_Stage2;
+uniform vec4 uv_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ vec4 inputColor = output_Stage1;
+ output_Stage2 = um_Stage2 * inputColor + uv_Stage2;
+ {
+ output_Stage2 = clamp(output_Stage2, 0.0, 1.0);
+ }
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/376-4.shader_test b/shaders/skia/376-4.shader_test
new file mode 100644
index 0000000..f09a0b6
--- /dev/null
+++ b/shaders/skia/376-4.shader_test
@@ -0,0 +1,77 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform float uPixelSize_Stage2_c1_c0;
+uniform vec2 uRange_Stage2_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 ClampFragmentProcessor_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ float alpha = clamp(_input.w, 0.0, 1.0);
+ _output = vec4(clamp(_input.xyz, 0.0, alpha), alpha);
+ }
+ return _output;
+}
+vec4 Morphology_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = vec4(1.0, 1.0, 1.0, 1.0);
+ vec2 coord = vTransformedCoords_1_Stage0;
+ coord.x -= 8.0 * uPixelSize_Stage2_c1_c0;
+ for (int i = 0;i < 17; i++) {
+ _output = min(_output, texture(uTextureSampler_0_Stage2, coord));
+ coord.x += uPixelSize_Stage2_c1_c0;
+ }
+ _output *= _input;
+ return _output;
+}
+float _blend_overlay_component(float sc, float sa, float dc, float da) {
+ if (2.0 * dc <= da) {
+ return (2.0 * sc) * dc;
+ }
+ return sa * da - (2.0 * (da - dc)) * (sa - sc);
+}
+vec4 blend_overlay(vec4 src, vec4 dst) {
+ vec4 result = vec4(_blend_overlay_component(src.x, src.w, dst.x, dst.w), _blend_overlay_component(src.y, src.w, dst.y, dst.w), _blend_overlay_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+ result.xyz += dst.xyz * (1.0 - src.w) + src.xyz * (1.0 - dst.w);
+ return result;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ vec4 inputColor = vec4(output_Stage1.xyz, 1.0);
+ output_Stage2 = blend_overlay(ClampFragmentProcessor_Stage2_c0_c0(inputColor), Morphology_Stage2_c1_c0(inputColor));
+ output_Stage2 *= output_Stage1.w;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/376.shader_test b/shaders/skia/376.shader_test
new file mode 100644
index 0000000..3431b3f
--- /dev/null
+++ b/shaders/skia/376.shader_test
@@ -0,0 +1,153 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage2;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.w) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ } else {
+ {
+ if (t < uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+vec4 ComposeOne_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_dst_in(_input, TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0)));
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = ComposeOne_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+float _blend_overlay_component(float sc, float sa, float dc, float da) {
+ if (2.0 * dc <= da) {
+ return (2.0 * sc) * dc;
+ }
+ return sa * da - (2.0 * (da - dc)) * (sa - sc);
+}
+vec4 blend_overlay(vec4 src, vec4 dst) {
+ vec4 result = vec4(_blend_overlay_component(src.x, src.w, dst.x, dst.w), _blend_overlay_component(src.y, src.w, dst.y, dst.w), _blend_overlay_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+ result.xyz += dst.xyz * (1.0 - src.w) + src.xyz * (1.0 - dst.w);
+ return result;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_overlay(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ {
+ output_Stage2 = output_Stage1 * ucolor_Stage2;
+ }
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 inColor;
+in vec2 inLocalCoord;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/379-2.shader_test b/shaders/skia/379-2.shader_test
new file mode 100644
index 0000000..cff6577
--- /dev/null
+++ b/shaders/skia/379-2.shader_test
@@ -0,0 +1,152 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_KHR_blend_equation_advanced : require
+out vec4 sk_FragColor;
+layout (blend_support_all_equations) out ;
+uniform vec2 ubaseFrequency_Stage1;
+uniform float uz_Stage1;
+uniform vec4 uboundsUniform_Stage2;
+uniform float uxInvZoom_Stage2;
+uniform float uyInvZoom_Stage2;
+uniform float uxInvInset_Stage2;
+uniform float uyInvInset_Stage2;
+uniform vec2 uoffset_Stage2;
+uniform vec2 uScale_Stage3;
+uniform vec4 uTexDom_Stage3;
+uniform vec3 uDecalParams_Stage3;
+uniform vec4 ucircleData_Stage4;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+uniform sampler2D uTextureSampler_0_Stage3;
+uniform sampler2D uTextureSampler_1_Stage3;
+uniform sampler2D uTextureSampler_0_Stage4;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+noperspective in vec2 vTransformedCoords_3_Stage0;
+vec3 fade_Stage1(vec3 t) {
+ return ((t * t) * t) * (t * (t * 6.0 - 15.0) + 10.0);
+}
+float perm_Stage1(float x) {
+ return texture(uTextureSampler_0_Stage1, vec2(fract(x / 256.0), 0.0)).x * 255.0;
+}
+float grad_Stage1(float x, vec3 p) {
+ return dot(texture(uTextureSampler_1_Stage1, vec2(fract(x / 16.0), 0.0)).xyz * 255.0 - vec3(1.0), p);
+}
+float lerp_Stage1(float a, float b, float w) {
+ return a + w * (b - a);
+}
+float noise_Stage1(vec3 p) {
+ vec3 P = mod(floor(p), 256.0);
+ p -= floor(p);
+ vec3 f = fade_Stage1(p);
+ float A = perm_Stage1(P.x) + P.y;
+ float AA = perm_Stage1(A) + P.z;
+ float AB = perm_Stage1(A + 1.0) + P.z;
+ float B = perm_Stage1(P.x + 1.0) + P.y;
+ float BA = perm_Stage1(B) + P.z;
+ float BB = perm_Stage1(B + 1.0) + P.z;
+ float result = lerp_Stage1(lerp_Stage1(lerp_Stage1(grad_Stage1(perm_Stage1(AA), p), grad_Stage1(perm_Stage1(BA), p + vec3(-1.0, 0.0, 0.0)), f.x), lerp_Stage1(grad_Stage1(perm_Stage1(AB), p + vec3(0.0, -1.0, 0.0)), grad_Stage1(perm_Stage1(BB), p + vec3(-1.0, -1.0, 0.0)), f.x), f.y), lerp_Stage1(lerp_Stage1(grad_Stage1(perm_Stage1(AA + 1.0), p + vec3(0.0, 0.0, -1.0)), grad_Stage1(perm_Stage1(BA + 1.0), p + vec3(-1.0, 0.0, -1.0)), f.x), lerp_Stage1(grad_Stage1(perm_Stage1(AB + 1.0), p + vec3(0.0, -1.0, -1.0)), grad_Stage1(perm_Stage1(BB + 1.0), p + vec3(-1.0, -1.0, -1.0)), f.x), f.y), f.z);
+ return result;
+}
+float noiseOctaves_Stage1(vec3 p) {
+ float result = 0.0;
+ float ratio = 1.0;
+ for (float i = 0.0;i < 6.0; i++) {
+ result += noise_Stage1(p) / ratio;
+ p *= 2.0;
+ ratio *= 2.0;
+ }
+ return (result + 1.0) / 2.0;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec2 coords = vTransformedCoords_0_Stage0 * ubaseFrequency_Stage1;
+ float r = noiseOctaves_Stage1(vec3(coords, uz_Stage1));
+ float g = noiseOctaves_Stage1(vec3(coords, uz_Stage1));
+ float b = noiseOctaves_Stage1(vec3(coords, uz_Stage1));
+ float a = noiseOctaves_Stage1(vec3(coords, uz_Stage1));
+ output_Stage1 = vec4(r, g, b, a);
+ output_Stage1 = clamp(output_Stage1, 0.0, 1.0);
+ output_Stage1 = vec4(output_Stage1.xyz * output_Stage1.www, output_Stage1.w);
+ }
+ {
+ vec2 coord = vTransformedCoords_1_Stage0;
+ vec2 delta = (coord - uboundsUniform_Stage2.xy) * uboundsUniform_Stage2.zw;
+ delta = min(delta, vec2(1.0, 1.0) - delta);
+ delta *= vec2(uxInvInset_Stage2, uyInvInset_Stage2);
+ if (delta.x < 2.0 && delta.y < 2.0) {
+ delta = vec2(2.0, 2.0) - delta;
+ float dist = length(delta);
+ dist = max(2.0 - dist, 0.0);
+ }
+ }
+ vec4 output_Stage3;
+ {
+ vec4 dColor = texture(uTextureSampler_0_Stage3, vTransformedCoords_2_Stage0);
+ dColor.xyz = dColor.w < 9.9999999747524271e-07 ? vec3(0.0) : clamp(dColor.xyz / dColor.w, 0.0, 1.0);
+ vec2 cCoords = vTransformedCoords_3_Stage0 + uScale_Stage3 * (dColor.yz - vec2(0.5));
+ {
+ vec2 origCoord = cCoords;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage3.xy, uTexDom_Stage3.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage3, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage3.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage3.y);
+ if (err > uDecalParams_Stage3.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage3.z < 1.0) {
+ err = 0.0;
+ }
+ output_Stage3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ }
+ vec4 output_Stage4;
+ {
+ vec2 vec = vec2((gl_FragCoord.x - ucircleData_Stage4.x) * ucircleData_Stage4.w, (gl_FragCoord.y - ucircleData_Stage4.y) * ucircleData_Stage4.w);
+ float dist = length(vec) + (0.5 - ucircleData_Stage4.z) * ucircleData_Stage4.w;
+ output_Stage4 = output_Stage3 * texture(uTextureSampler_0_Stage4, vec2(dist, 0.5)).w;
+ }
+ {
+ sk_FragColor = output_Stage4 * outputColor_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+uniform mat3 uCoordTransformMatrix_3_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+noperspective out vec2 vTransformedCoords_3_Stage0;
+void main() {
+ vec4 color = inColor;
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_3_Stage0 = (uCoordTransformMatrix_3_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/379-3.shader_test b/shaders/skia/379-3.shader_test
new file mode 100644
index 0000000..53e1f97
--- /dev/null
+++ b/shaders/skia/379-3.shader_test
@@ -0,0 +1,47 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform mat4 um_Stage2;
+uniform vec4 uv_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ vec4 inputColor = output_Stage1;
+ {
+ float nonZeroAlpha = max(inputColor.w, 9.9999997473787516e-05);
+ inputColor = vec4(inputColor.xyz / nonZeroAlpha, inputColor.w);
+ }
+ output_Stage2 = um_Stage2 * inputColor + uv_Stage2;
+ {
+ output_Stage2.w = clamp(output_Stage2.w, 0.0, 1.0);
+ }
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/379-4.shader_test b/shaders/skia/379-4.shader_test
new file mode 100644
index 0000000..a260de0
--- /dev/null
+++ b/shaders/skia/379-4.shader_test
@@ -0,0 +1,83 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform float uPixelSize_Stage2_c1_c0;
+uniform vec2 uRange_Stage2_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 ClampFragmentProcessor_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = clamp(_input, 0.0, 1.0);
+ }
+ return _output;
+}
+vec4 Morphology_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_1_Stage0;
+ coord.x -= 4.0 * uPixelSize_Stage2_c1_c0;
+ for (int i = 0;i < 9; i++) {
+ _output = max(_output, texture(uTextureSampler_0_Stage2, coord));
+ coord.x += uPixelSize_Stage2_c1_c0;
+ }
+ _output *= _input;
+ return _output;
+}
+float _guarded_divide(float n, float d) {
+ return n / d;
+}
+float _color_dodge_component(float sc, float sa, float dc, float da) {
+ if (dc == 0.0) {
+ return sc * (1.0 - da);
+ } else {
+ float d = sa - sc;
+ if (d == 0.0) {
+ return (sa * da + sc * (1.0 - da)) + dc * (1.0 - sa);
+ }
+ d = min(da, _guarded_divide(dc * sa, d));
+ return (d * sa + sc * (1.0 - da)) + dc * (1.0 - sa);
+ }
+}
+vec4 blend_color_dodge(vec4 src, vec4 dst) {
+ return vec4(_color_dodge_component(src.x, src.w, dst.x, dst.w), _color_dodge_component(src.y, src.w, dst.y, dst.w), _color_dodge_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ vec4 inputColor = vec4(output_Stage1.xyz, 1.0);
+ output_Stage2 = blend_color_dodge(ClampFragmentProcessor_Stage2_c0_c0(inputColor), Morphology_Stage2_c1_c0(inputColor));
+ output_Stage2 *= output_Stage1.w;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/379.shader_test b/shaders/skia/379.shader_test
new file mode 100644
index 0000000..20f3a80
--- /dev/null
+++ b/shaders/skia/379.shader_test
@@ -0,0 +1,76 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 ucolor_Stage1_c0_c0_c0_c0;
+uniform vec4 ucolor_Stage2;
+noperspective in vec4 vcolor_Stage0;
+vec4 ConstColorProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = _input.w * ucolor_Stage1_c0_c0_c0_c0;
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = ConstColorProcessor_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+float _blend_overlay_component(float sc, float sa, float dc, float da) {
+ if (2.0 * dc <= da) {
+ return (2.0 * sc) * dc;
+ }
+ return sa * da - (2.0 * (da - dc)) * (sa - sc);
+}
+vec4 blend_overlay(vec4 src, vec4 dst) {
+ vec4 result = vec4(_blend_overlay_component(src.x, src.w, dst.x, dst.w), _blend_overlay_component(src.y, src.w, dst.y, dst.w), _blend_overlay_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+ result.xyz += dst.xyz * (1.0 - src.w) + src.xyz * (1.0 - dst.w);
+ return result;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_overlay(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ {
+ output_Stage2 = output_Stage1 * ucolor_Stage2;
+ }
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 position;
+in vec4 inColor;
+noperspective out vec4 vcolor_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/382-2.shader_test b/shaders/skia/382-2.shader_test
new file mode 100644
index 0000000..6e0e3a7
--- /dev/null
+++ b/shaders/skia/382-2.shader_test
@@ -0,0 +1,46 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+uniform float uinnerThreshold_Stage1;
+uniform float uouterThreshold_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+void main() {
+ {
+ vec4 color = vec4(1.0);
+ vec4 mask_color = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ if (mask_color.w < 0.5) {
+ if (1.0 > uouterThreshold_Stage1) {
+ float scale = uouterThreshold_Stage1;
+ color.xyz *= scale;
+ color.w = uouterThreshold_Stage1;
+ }
+ } else if (1.0 < uinnerThreshold_Stage1) {
+ float scale = uinnerThreshold_Stage1 / max(0.0010000000474974513, 1.0);
+ color.xyz *= scale;
+ color.w = uinnerThreshold_Stage1;
+ }
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/382-3.shader_test b/shaders/skia/382-3.shader_test
new file mode 100644
index 0000000..91a141b
--- /dev/null
+++ b/shaders/skia/382-3.shader_test
@@ -0,0 +1,50 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform mat4 um_Stage2;
+uniform vec4 uv_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ vec4 inputColor = output_Stage1;
+ {
+ float nonZeroAlpha = max(inputColor.w, 9.9999997473787516e-05);
+ inputColor = vec4(inputColor.xyz / nonZeroAlpha, inputColor.w);
+ }
+ output_Stage2 = um_Stage2 * inputColor + uv_Stage2;
+ {
+ output_Stage2 = clamp(output_Stage2, 0.0, 1.0);
+ }
+ {
+ output_Stage2.xyz *= output_Stage2.w;
+ }
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/382-4.shader_test b/shaders/skia/382-4.shader_test
new file mode 100644
index 0000000..eea372d
--- /dev/null
+++ b/shaders/skia/382-4.shader_test
@@ -0,0 +1,72 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec3 vTransformedCoords_1_Stage0;
+vec4 TextureEffect_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = textureProj(uTextureSampler_0_Stage2, vTransformedCoords_1_Stage0) * _input;
+ return _output;
+}
+vec4 ClampFragmentProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ float alpha = clamp(_input.w, 0.0, 1.0);
+ _output = vec4(clamp(_input.xyz, 0.0, alpha), alpha);
+ }
+ return _output;
+}
+float _guarded_divide(float n, float d) {
+ return n / d;
+}
+float _color_burn_component(float sc, float sa, float dc, float da) {
+ if (da == dc) {
+ return (sa * da + sc * (1.0 - da)) + dc * (1.0 - sa);
+ } else if (sc == 0.0) {
+ return dc * (1.0 - sa);
+ }
+ float d = max(0.0, da - _guarded_divide((da - dc) * sa, sc));
+ return (d * sa + sc * (1.0 - da)) + dc * (1.0 - sa);
+}
+vec4 blend_color_burn(vec4 src, vec4 dst) {
+ return vec4(_color_burn_component(src.x, src.w, dst.x, dst.w), _color_burn_component(src.y, src.w, dst.y, dst.w), _color_burn_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ vec4 inputColor = vec4(output_Stage1.xyz, 1.0);
+ output_Stage2 = blend_color_burn(TextureEffect_Stage2_c0_c0(inputColor), ClampFragmentProcessor_Stage2_c1_c0(inputColor));
+ output_Stage2 *= output_Stage1.w;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec3 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0);
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/382.shader_test b/shaders/skia/382.shader_test
new file mode 100644
index 0000000..72b7ae4
--- /dev/null
+++ b/shaders/skia/382.shader_test
@@ -0,0 +1,173 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage2;
+uniform vec4 ucolor_Stage3_c1_c0;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.w) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ } else {
+ {
+ if (t < uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+vec4 ComposeOne_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_dst_in(_input, TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0)));
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = ComposeOne_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 ConstColorProcessor_Stage3_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage3_c1_c0;
+ }
+ return _output;
+}
+float _blend_overlay_component(float sc, float sa, float dc, float da) {
+ if (2.0 * dc <= da) {
+ return (2.0 * sc) * dc;
+ }
+ return sa * da - (2.0 * (da - dc)) * (sa - sc);
+}
+vec4 blend_overlay(vec4 src, vec4 dst) {
+ vec4 result = vec4(_blend_overlay_component(src.x, src.w, dst.x, dst.w), _blend_overlay_component(src.y, src.w, dst.y, dst.w), _blend_overlay_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+ result.xyz += dst.xyz * (1.0 - src.w) + src.xyz * (1.0 - dst.w);
+ return result;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 blend_darken(vec4 src, vec4 dst) {
+ vec4 result = blend_src_over(src, dst);
+ result.xyz = min(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
+ return result;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_overlay(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ {
+ output_Stage2 = output_Stage1 * ucolor_Stage2;
+ }
+ }
+ vec4 output_Stage3;
+ {
+ output_Stage3 = blend_darken(ConstColorProcessor_Stage3_c1_c0(vec4(1.0)), output_Stage2);
+ }
+ {
+ sk_FragColor = output_Stage3;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 inColor;
+in vec2 inLocalCoord;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/385-2.shader_test b/shaders/skia/385-2.shader_test
new file mode 100644
index 0000000..b3ef530
--- /dev/null
+++ b/shaders/skia/385-2.shader_test
@@ -0,0 +1,79 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+in vec4 vcolor_Stage0;
+void main() {
+ {
+ sk_FragColor = vec4(1.0);
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform float uSrcTF_Stage0[7];
+uniform mat3 uColorXform_Stage0;
+uniform float uDstTF_Stage0[7];
+uniform mat3 uViewM_Stage0;
+in vec2 position;
+in vec4 inColor;
+out vec4 vcolor_Stage0;
+float src_tf_Stage0(float x) {
+ float G = uSrcTF_Stage0[0];
+ float A = uSrcTF_Stage0[1];
+ float B = uSrcTF_Stage0[2];
+ float C = uSrcTF_Stage0[3];
+ float D = uSrcTF_Stage0[4];
+ float E = uSrcTF_Stage0[5];
+ float F = uSrcTF_Stage0[6];
+ float s = sign(x);
+ x = abs(x);
+ x = x < D ? C * x + F : pow(A * x + B, G) + E;
+ return s * x;
+}
+float dst_tf_Stage0(float x) {
+ float G = uDstTF_Stage0[0];
+ float A = uDstTF_Stage0[1];
+ float B = uDstTF_Stage0[2];
+ float C = uDstTF_Stage0[3];
+ float D = uDstTF_Stage0[4];
+ float E = uDstTF_Stage0[5];
+ float F = uDstTF_Stage0[6];
+ float s = sign(x);
+ x = abs(x);
+ x = x < D ? C * x + F : pow(A * x + B, G) + E;
+ return s * x;
+}
+vec4 gamut_xform_Stage0(vec4 color) {
+ color.xyz = uColorXform_Stage0 * color.xyz;
+ return color;
+}
+vec4 color_xform_Stage0(vec4 color) {
+ float nonZeroAlpha = max(color.w, 9.9999997473787516e-05);
+ color = vec4(color.xyz / nonZeroAlpha, nonZeroAlpha);
+ color.x = src_tf_Stage0(color.x);
+ color.y = src_tf_Stage0(color.y);
+ color.z = src_tf_Stage0(color.z);
+ color = gamut_xform_Stage0(color);
+ color.x = dst_tf_Stage0(color.x);
+ color.y = dst_tf_Stage0(color.y);
+ color.z = dst_tf_Stage0(color.z);
+ color.xyz *= color.w;
+ return color;
+}
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = color_xform_Stage0(color);
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec3 pos3 = uViewM_Stage0 * vec3(position, 1.0);
+ gl_Position = vec4(pos3.x, pos3.y, 0.0, pos3.z);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/385-4.shader_test b/shaders/skia/385-4.shader_test
new file mode 100644
index 0000000..51c1c1e
--- /dev/null
+++ b/shaders/skia/385-4.shader_test
@@ -0,0 +1,73 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec3 uedges_Stage2_c1_c0[3];
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 ClampFragmentProcessor_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = clamp(_input, 0.0, 1.0);
+ }
+ return _output;
+}
+vec4 ConvexPoly_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ float alpha = 1.0;
+ float edge;
+ edge = dot(uedges_Stage2_c1_c0[0], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage2_c1_c0[1], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage2_c1_c0[2], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ _output = _input * alpha;
+ return _output;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 blend_darken(vec4 src, vec4 dst) {
+ vec4 result = blend_src_over(src, dst);
+ result.xyz = min(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
+ return result;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ vec4 inputColor = vec4(output_Stage1.xyz, 1.0);
+ output_Stage2 = blend_darken(ClampFragmentProcessor_Stage2_c0_c0(inputColor), ConvexPoly_Stage2_c1_c0(inputColor));
+ output_Stage2 *= output_Stage1.w;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/385.shader_test b/shaders/skia/385.shader_test
new file mode 100644
index 0000000..57b19e1
--- /dev/null
+++ b/shaders/skia/385.shader_test
@@ -0,0 +1,96 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 ucolor_Stage1_c0_c0_c0_c0;
+uniform vec4 ucolor_Stage2;
+uniform vec4 ucolor_Stage3_c1_c0;
+noperspective in vec4 vcolor_Stage0;
+vec4 ConstColorProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = _input.w * ucolor_Stage1_c0_c0_c0_c0;
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = ConstColorProcessor_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 ConstColorProcessor_Stage3_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage3_c1_c0;
+ }
+ return _output;
+}
+float _blend_overlay_component(float sc, float sa, float dc, float da) {
+ if (2.0 * dc <= da) {
+ return (2.0 * sc) * dc;
+ }
+ return sa * da - (2.0 * (da - dc)) * (sa - sc);
+}
+vec4 blend_overlay(vec4 src, vec4 dst) {
+ vec4 result = vec4(_blend_overlay_component(src.x, src.w, dst.x, dst.w), _blend_overlay_component(src.y, src.w, dst.y, dst.w), _blend_overlay_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+ result.xyz += dst.xyz * (1.0 - src.w) + src.xyz * (1.0 - dst.w);
+ return result;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 blend_darken(vec4 src, vec4 dst) {
+ vec4 result = blend_src_over(src, dst);
+ result.xyz = min(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
+ return result;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_overlay(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ {
+ output_Stage2 = output_Stage1 * ucolor_Stage2;
+ }
+ }
+ vec4 output_Stage3;
+ {
+ output_Stage3 = blend_darken(ConstColorProcessor_Stage3_c1_c0(vec4(1.0)), output_Stage2);
+ }
+ {
+ sk_FragColor = output_Stage3;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 position;
+in vec4 inColor;
+noperspective out vec4 vcolor_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/388-2.shader_test b/shaders/skia/388-2.shader_test
new file mode 100644
index 0000000..734ab02
--- /dev/null
+++ b/shaders/skia/388-2.shader_test
@@ -0,0 +1,191 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_KHR_blend_equation_advanced : require
+out vec4 sk_FragColor;
+layout (blend_support_all_equations) out ;
+uniform vec4 uColor_Stage0;
+uniform vec4 urectUniform_Stage1_c0_c0_c1_c0_c0_c0;
+uniform vec2 uScale_Stage1_c0_c0_c1_c0_c1_c0;
+uniform vec4 uTexDom_Stage1_c0_c0_c1_c0_c1_c0;
+uniform vec3 uDecalParams_Stage1_c0_c0_c1_c0_c1_c0;
+uniform vec4 uinnerRect_Stage1_c1_c0;
+uniform vec2 uradiusPlusHalf_Stage1_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+uniform sampler2D uTextureSampler_2_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 ColorTableEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float nonZeroAlpha = max(_input.w, 9.9999997473787516e-05);
+ vec4 coord = vec4(_input.xyz / nonZeroAlpha, nonZeroAlpha);
+ coord = coord * 0.9960939884185791 + vec4(0.0019529999699443579, 0.0019529999699443579, 0.0019529999699443579, 0.0019529999699443579);
+ _output.w = texture(uTextureSampler_0_Stage1, vec2(coord.w, 0.125)).w;
+ _output.x = texture(uTextureSampler_0_Stage1, vec2(coord.x, 0.375)).w;
+ _output.y = texture(uTextureSampler_0_Stage1, vec2(coord.y, 0.625)).w;
+ _output.z = texture(uTextureSampler_0_Stage1, vec2(coord.z, 0.875)).w;
+ _output.xyz *= _output.w;
+ return _output;
+}
+vec4 ConfigConversionEffect_Stage1_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = floor(_input * 255.0 + 0.5) / 255.0;
+ {
+ _output.xyz = _output.w <= 0.0 ? vec3(0.0) : floor((_output.xyz / _output.w) * 255.0 + 0.5) / 255.0;
+ }
+ return _output;
+}
+float _guarded_divide(float n, float d) {
+ return n / d;
+}
+float _color_burn_component(float sc, float sa, float dc, float da) {
+ if (da == dc) {
+ return (sa * da + sc * (1.0 - da)) + dc * (1.0 - sa);
+ } else if (sc == 0.0) {
+ return dc * (1.0 - sa);
+ }
+ float d = max(0.0, da - _guarded_divide((da - dc) * sa, sc));
+ return (d * sa + sc * (1.0 - da)) + dc * (1.0 - sa);
+}
+vec4 blend_color_burn(vec4 src, vec4 dst) {
+ return vec4(_color_burn_component(src.x, src.w, dst.x, dst.w), _color_burn_component(src.y, src.w, dst.y, dst.w), _color_burn_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+}
+vec4 ComposeTwo_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_color_burn(ColorTableEffect_Stage1_c0_c0_c0_c0_c0_c0(inputColor), ConfigConversionEffect_Stage1_c0_c0_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 AARectEffect_Stage1_c0_c0_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float alpha;
+ {
+ alpha = float(all(greaterThan(vec4(gl_FragCoord.xy, urectUniform_Stage1_c0_c0_c1_c0_c0_c0.zw), vec4(urectUniform_Stage1_c0_c0_c1_c0_c0_c0.xy, gl_FragCoord.xy))) ? 1 : 0);
+ }
+ _output = _input * alpha;
+ return _output;
+}
+vec4 DisplacementMap_Stage1_c0_c0_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 dColor = texture(uTextureSampler_1_Stage1, vTransformedCoords_0_Stage0);
+ dColor.xyz = dColor.w < 9.9999999747524271e-07 ? vec3(0.0) : clamp(dColor.xyz / dColor.w, 0.0, 1.0);
+ vec2 cCoords = vTransformedCoords_1_Stage0 + uScale_Stage1_c0_c0_c1_c0_c1_c0 * (dColor.wy - vec2(0.5));
+ {
+ vec2 origCoord = cCoords;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c1_c0_c1_c0.xy, uTexDom_Stage1_c0_c0_c1_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c1_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c1_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c1_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c1_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ _output = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ return _output;
+}
+vec4 blend_exclusion(vec4 src, vec4 dst) {
+ return vec4((dst.xyz + src.xyz) - (2.0 * dst.xyz) * src.xyz, src.w + (1.0 - src.w) * dst.w);
+}
+vec4 ComposeTwo_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_exclusion(AARectEffect_Stage1_c0_c0_c1_c0_c0_c0(inputColor), DisplacementMap_Stage1_c0_c0_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+float _blend_color_luminance(vec3 color) {
+ return dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), color);
+}
+vec3 _blend_set_color_luminance(vec3 hueSatColor, float alpha, vec3 lumColor) {
+ float lum = _blend_color_luminance(lumColor);
+ vec3 result = (lum - _blend_color_luminance(hueSatColor)) + hueSatColor;
+ float minComp = min(min(result.x, result.y), result.z);
+ float maxComp = max(max(result.x, result.y), result.z);
+ if (minComp < 0.0 && lum != minComp) {
+ result = lum + ((result - lum) * lum) / (lum - minComp);
+ }
+ if (maxComp > alpha && maxComp != lum) {
+ return lum + ((result - lum) * (alpha - lum)) / (maxComp - lum);
+ }
+ return result;
+}
+vec4 blend_color(vec4 src, vec4 dst) {
+ float alpha = dst.w * src.w;
+ vec3 sda = src.xyz * dst.w;
+ vec3 dsa = dst.xyz * src.w;
+ return vec4((((_blend_set_color_luminance(sda, alpha, dsa) + dst.xyz) - dsa) + src.xyz) - sda, (src.w + dst.w) - alpha);
+}
+vec4 ComposeTwo_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_color(ComposeTwo_Stage1_c0_c0_c0_c0(inputColor), ComposeTwo_Stage1_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 CircularRRect_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 dxy0 = uinnerRect_Stage1_c1_c0.xy - gl_FragCoord.xy;
+ vec2 dxy1 = gl_FragCoord.xy - uinnerRect_Stage1_c1_c0.zw;
+ vec2 dxy = max(max(dxy0, dxy1), 0.0);
+ float alpha = clamp(uradiusPlusHalf_Stage1_c1_c0.x - length(dxy), 0.0, 1.0);
+ alpha = 1.0 - alpha;
+ _output = _input * alpha;
+ return _output;
+}
+float _color_dodge_component(float sc, float sa, float dc, float da) {
+ if (dc == 0.0) {
+ return sc * (1.0 - da);
+ } else {
+ float d = sa - sc;
+ if (d == 0.0) {
+ return (sa * da + sc * (1.0 - da)) + dc * (1.0 - sa);
+ }
+ d = min(da, _guarded_divide(dc * sa, d));
+ return (d * sa + sc * (1.0 - da)) + dc * (1.0 - sa);
+ }
+}
+vec4 blend_color_dodge(vec4 src, vec4 dst) {
+ return vec4(_color_dodge_component(src.x, src.w, dst.x, dst.w), _color_dodge_component(src.y, src.w, dst.y, dst.w), _color_dodge_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = uColor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_color_dodge(ComposeTwo_Stage1_c0_c0(inputColor), CircularRRect_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 inLocalCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/388-4.shader_test b/shaders/skia/388-4.shader_test
new file mode 100644
index 0000000..c6685cd
--- /dev/null
+++ b/shaders/skia/388-4.shader_test
@@ -0,0 +1,79 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec3 uedges_Stage2_c0_c0[6];
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 ConvexPoly_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ float alpha = 1.0;
+ float edge;
+ edge = dot(uedges_Stage2_c0_c0[0], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage2_c0_c0[1], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage2_c0_c0[2], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage2_c0_c0[3], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage2_c0_c0[4], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage2_c0_c0[5], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ alpha = 1.0 - alpha;
+ _output = _input * alpha;
+ return _output;
+}
+vec4 ClampFragmentProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ float alpha = clamp(_input.w, 0.0, 1.0);
+ _output = vec4(clamp(_input.xyz, 0.0, alpha), alpha);
+ }
+ return _output;
+}
+vec4 blend_dst_over(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src + dst;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ vec4 inputColor = vec4(output_Stage1.xyz, 1.0);
+ output_Stage2 = blend_dst_over(ConvexPoly_Stage2_c0_c0(inputColor), ClampFragmentProcessor_Stage2_c1_c0(inputColor));
+ output_Stage2 *= output_Stage1.w;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/388.shader_test b/shaders/skia/388.shader_test
new file mode 100644
index 0000000..bdb05da
--- /dev/null
+++ b/shaders/skia/388.shader_test
@@ -0,0 +1,137 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.w) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ } else {
+ {
+ if (t < uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = OverrideInputFragmentProcessor_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 blend_darken(vec4 src, vec4 dst) {
+ vec4 result = blend_src_over(src, dst);
+ result.xyz = min(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
+ return result;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_darken(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 inColor;
+in vec2 inLocalCoord;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/391-2.shader_test b/shaders/skia/391-2.shader_test
new file mode 100644
index 0000000..402c022
--- /dev/null
+++ b/shaders/skia/391-2.shader_test
@@ -0,0 +1,169 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_KHR_blend_equation_advanced : require
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+layout (blend_support_all_equations) out ;
+uniform vec4 uColor_Stage0;
+uniform vec4 uinnerRect_Stage1_c0_c0_c0_c0_c0_c0;
+uniform vec2 uinvRadiiXY_Stage1_c0_c0_c0_c0_c0_c0;
+uniform vec2 uImageIncrement_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec2 uBounds_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 uKernel_Stage1_c0_c0_c0_c0_c1_c0[1];
+uniform float ucornerRadius_Stage1_c0_c0_c1_c0;
+uniform vec4 uproxyRect_Stage1_c0_c0_c1_c0;
+uniform float ublurRadius_Stage1_c0_c0_c1_c0;
+uniform vec4 uellipse_Stage1_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 EllipticalRRect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 dxy0 = uinnerRect_Stage1_c0_c0_c0_c0_c0_c0.xy - gl_FragCoord.xy;
+ vec2 dxy1 = gl_FragCoord.xy - uinnerRect_Stage1_c0_c0_c0_c0_c0_c0.zw;
+ vec2 dxy = max(max(dxy0, dxy1), 0.0);
+ vec2 Z = dxy * uinvRadiiXY_Stage1_c0_c0_c0_c0_c0_c0;
+ float implicit = dot(Z, dxy) - 1.0;
+ float grad_dot = 4.0 * dot(Z, Z);
+ grad_dot = max(grad_dot, 9.9999997473787516e-05);
+ float approx_dist = implicit * inversesqrt(grad_dot);
+ float alpha = clamp(0.5 + approx_dist, 0.0, 1.0);
+ _output = _input * alpha;
+ return _output;
+}
+vec4 GaussianConvolution_Stage1_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0 - uImageIncrement_Stage1_c0_c0_c0_c0_c1_c0;
+ vec2 coordSampled = vec2(0.0, 0.0);
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1_c0_c0_c0_c0_c1_c0.x, uBounds_Stage1_c0_c0_c0_c0_c1_c0.y - uBounds_Stage1_c0_c0_c0_c0_c1_c0.x) + uBounds_Stage1_c0_c0_c0_c0_c1_c0.x;
+ _output += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c0_c0_c1_c0[0].x;
+ coord += uImageIncrement_Stage1_c0_c0_c0_c0_c1_c0;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1_c0_c0_c0_c0_c1_c0.x, uBounds_Stage1_c0_c0_c0_c0_c1_c0.y - uBounds_Stage1_c0_c0_c0_c0_c1_c0.x) + uBounds_Stage1_c0_c0_c0_c0_c1_c0.x;
+ _output += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c0_c0_c1_c0[0].y;
+ coord += uImageIncrement_Stage1_c0_c0_c0_c0_c1_c0;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1_c0_c0_c0_c0_c1_c0.x, uBounds_Stage1_c0_c0_c0_c0_c1_c0.y - uBounds_Stage1_c0_c0_c0_c0_c1_c0.x) + uBounds_Stage1_c0_c0_c0_c0_c1_c0.x;
+ _output += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c0_c0_c1_c0[0].z;
+ coord += uImageIncrement_Stage1_c0_c0_c0_c0_c1_c0;
+ _output *= _input;
+ return _output;
+}
+vec4 blend_difference(vec4 src, vec4 dst) {
+ return vec4((src.xyz + dst.xyz) - 2.0 * min(src.xyz * dst.w, dst.xyz * src.w), src.w + (1.0 - src.w) * dst.w);
+}
+vec4 ComposeTwo_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_difference(EllipticalRRect_Stage1_c0_c0_c0_c0_c0_c0(inputColor), GaussianConvolution_Stage1_c0_c0_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 RRectBlurEffect_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 translatedFragPos = gl_FragCoord.xy - uproxyRect_Stage1_c0_c0_c1_c0.xy;
+ float threshold = ucornerRadius_Stage1_c0_c0_c1_c0 + 2.0 * ublurRadius_Stage1_c0_c0_c1_c0;
+ vec2 middle = (uproxyRect_Stage1_c0_c0_c1_c0.zw - uproxyRect_Stage1_c0_c0_c1_c0.xy) - 2.0 * threshold;
+ if (translatedFragPos.x >= threshold && translatedFragPos.x < middle.x + threshold) {
+ translatedFragPos.x = threshold;
+ } else if (translatedFragPos.x >= middle.x + threshold) {
+ translatedFragPos.x -= middle.x - 1.0;
+ }
+ if (translatedFragPos.y > threshold && translatedFragPos.y < middle.y + threshold) {
+ translatedFragPos.y = threshold;
+ } else if (translatedFragPos.y >= middle.y + threshold) {
+ translatedFragPos.y -= middle.y - 1.0;
+ }
+ vec2 proxyDims = vec2(2.0 * threshold + 1.0);
+ vec2 texCoord = translatedFragPos / proxyDims;
+ _output = _input * texture(uTextureSampler_1_Stage1, texCoord);
+ return _output;
+}
+float _guarded_divide(float n, float d) {
+ return n / d;
+}
+float _color_dodge_component(float sc, float sa, float dc, float da) {
+ if (dc == 0.0) {
+ return sc * (1.0 - da);
+ } else {
+ float d = sa - sc;
+ if (d == 0.0) {
+ return (sa * da + sc * (1.0 - da)) + dc * (1.0 - sa);
+ }
+ d = min(da, _guarded_divide(dc * sa, d));
+ return (d * sa + sc * (1.0 - da)) + dc * (1.0 - sa);
+ }
+}
+vec4 blend_color_dodge(vec4 src, vec4 dst) {
+ return vec4(_color_dodge_component(src.x, src.w, dst.x, dst.w), _color_dodge_component(src.y, src.w, dst.y, dst.w), _color_dodge_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+}
+vec4 ComposeTwo_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_color_dodge(ComposeTwo_Stage1_c0_c0_c0_c0(inputColor), RRectBlurEffect_Stage1_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 EllipseEffect_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 d = gl_FragCoord.xy - uellipse_Stage1_c1_c0.xy;
+ vec2 Z = d * uellipse_Stage1_c1_c0.zw;
+ float implicit = dot(Z, d) - 1.0;
+ float grad_dot = 4.0 * dot(Z, Z);
+ {
+ grad_dot = max(grad_dot, 1.1754999560161448e-38);
+ }
+ float approx_dist = implicit * inversesqrt(grad_dot);
+ float alpha;
+ {
+ alpha = approx_dist > 0.0 ? 1.0 : 0.0;
+ }
+ _output = _input * alpha;
+ return _output;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 blend_darken(vec4 src, vec4 dst) {
+ vec4 result = blend_src_over(src, dst);
+ result.xyz = min(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
+ return result;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = uColor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_darken(ComposeTwo_Stage1_c0_c0(inputColor), EllipseEffect_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec2 pos2 = (uViewM_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/391-3.shader_test b/shaders/skia/391-3.shader_test
new file mode 100644
index 0000000..c571252
--- /dev/null
+++ b/shaders/skia/391-3.shader_test
@@ -0,0 +1,40 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 ucolor_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ {
+ output_Stage2 = output_Stage1.w * ucolor_Stage2;
+ }
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/391-4.shader_test b/shaders/skia/391-4.shader_test
new file mode 100644
index 0000000..700097c
--- /dev/null
+++ b/shaders/skia/391-4.shader_test
@@ -0,0 +1,65 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform mat4 um_Stage2_c0_c0;
+uniform vec4 uv_Stage2_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 ColorMatrixFragmentProcessor_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = _input;
+ {
+ float nonZeroAlpha = max(inputColor.w, 9.9999997473787516e-05);
+ inputColor = vec4(inputColor.xyz / nonZeroAlpha, inputColor.w);
+ }
+ _output = um_Stage2_c0_c0 * inputColor + uv_Stage2_c0_c0;
+ {
+ _output = clamp(_output, 0.0, 1.0);
+ }
+ return _output;
+}
+vec4 ClampFragmentProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ float alpha = clamp(_input.w, 0.0, 1.0);
+ _output = vec4(clamp(_input.xyz, 0.0, alpha), alpha);
+ }
+ return _output;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ vec4 inputColor = vec4(output_Stage1.xyz, 1.0);
+ output_Stage2 = blend_src_over(ColorMatrixFragmentProcessor_Stage2_c0_c0(inputColor), ClampFragmentProcessor_Stage2_c1_c0(inputColor));
+ output_Stage2 *= output_Stage1.w;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/391.shader_test b/shaders/skia/391.shader_test
new file mode 100644
index 0000000..d39dcf1
--- /dev/null
+++ b/shaders/skia/391.shader_test
@@ -0,0 +1,66 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 ucolor_Stage1_c0_c0_c0_c0;
+noperspective in vec4 vcolor_Stage0;
+vec4 ConstColorProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = _input.w * ucolor_Stage1_c0_c0_c0_c0;
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = ConstColorProcessor_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 blend_darken(vec4 src, vec4 dst) {
+ vec4 result = blend_src_over(src, dst);
+ result.xyz = min(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
+ return result;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_darken(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 position;
+in vec4 inColor;
+noperspective out vec4 vcolor_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/394-4.shader_test b/shaders/skia/394-4.shader_test
new file mode 100644
index 0000000..cf90ea8
--- /dev/null
+++ b/shaders/skia/394-4.shader_test
@@ -0,0 +1,100 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uScale_Stage2_c0_c0;
+uniform vec4 uTexDom_Stage2_c0_c0;
+uniform vec3 uDecalParams_Stage2_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+uniform sampler2D uTextureSampler_1_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+vec4 DisplacementMap_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 dColor = texture(uTextureSampler_0_Stage2, vTransformedCoords_1_Stage0);
+ dColor.xyz = dColor.w < 9.9999999747524271e-07 ? vec3(0.0) : clamp(dColor.xyz / dColor.w, 0.0, 1.0);
+ vec2 cCoords = vTransformedCoords_2_Stage0 + uScale_Stage2_c0_c0 * (dColor.yy - vec2(0.5));
+ {
+ vec2 origCoord = cCoords;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c0_c0.y);
+ if (err > uDecalParams_Stage2_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ _output = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ return _output;
+}
+vec4 ClampFragmentProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = clamp(_input, 0.0, 1.0);
+ }
+ return _output;
+}
+float _guarded_divide(float n, float d) {
+ return n / d;
+}
+float _soft_light_component(float sc, float sa, float dc, float da) {
+ if (2.0 * sc <= sa) {
+ return (_guarded_divide((dc * dc) * (sa - 2.0 * sc), da) + (1.0 - da) * sc) + dc * ((-sa + 2.0 * sc) + 1.0);
+ } else if (4.0 * dc <= da) {
+ float DSqd = dc * dc;
+ float DCub = DSqd * dc;
+ float DaSqd = da * da;
+ float DaCub = DaSqd * da;
+ return _guarded_divide(((DaSqd * (sc - dc * ((3.0 * sa - 6.0 * sc) - 1.0)) + ((12.0 * da) * DSqd) * (sa - 2.0 * sc)) - (16.0 * DCub) * (sa - 2.0 * sc)) - DaCub * sc, DaSqd);
+ }
+ return ((dc * ((sa - 2.0 * sc) + 1.0) + sc) - sqrt(da * dc) * (sa - 2.0 * sc)) - da * sc;
+}
+vec4 blend_soft_light(vec4 src, vec4 dst) {
+ if (dst.w == 0.0) {
+ return src;
+ }
+ return vec4(_soft_light_component(src.x, src.w, dst.x, dst.w), _soft_light_component(src.y, src.w, dst.y, dst.w), _soft_light_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ vec4 inputColor = vec4(output_Stage1.xyz, 1.0);
+ output_Stage2 = blend_soft_light(DisplacementMap_Stage2_c0_c0(inputColor), ClampFragmentProcessor_Stage2_c1_c0(inputColor));
+ output_Stage2 *= output_Stage1.w;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/394.shader_test b/shaders/skia/394.shader_test
new file mode 100644
index 0000000..ebad879
--- /dev/null
+++ b/shaders/skia/394.shader_test
@@ -0,0 +1,149 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage2_c1_c0;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.w) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ } else {
+ {
+ if (t < uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = OverrideInputFragmentProcessor_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c1_c0;
+ }
+ return _output;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 blend_darken(vec4 src, vec4 dst) {
+ vec4 result = blend_src_over(src, dst);
+ result.xyz = min(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
+ return result;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_darken(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_darken(ConstColorProcessor_Stage2_c1_c0(vec4(1.0)), output_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 inColor;
+in vec2 inLocalCoord;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/397-2.shader_test b/shaders/skia/397-2.shader_test
new file mode 100644
index 0000000..32aa52d
--- /dev/null
+++ b/shaders/skia/397-2.shader_test
@@ -0,0 +1,206 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uboundsUniform_Stage1_c0_c0;
+uniform float uxInvZoom_Stage1_c0_c0;
+uniform float uyInvZoom_Stage1_c0_c0;
+uniform float uxInvInset_Stage1_c0_c0;
+uniform float uyInvInset_Stage1_c0_c0;
+uniform vec2 uoffset_Stage1_c0_c0;
+uniform vec2 uScale_Stage1_c1_c0_c0_c0_c0_c0;
+uniform vec4 uTexDom_Stage1_c1_c0_c0_c0_c0_c0;
+uniform vec3 uDecalParams_Stage1_c1_c0_c0_c0_c0_c0;
+uniform vec4 uboundsUniform_Stage1_c1_c0_c0_c0_c1_c0;
+uniform float uxInvZoom_Stage1_c1_c0_c0_c0_c1_c0;
+uniform float uyInvZoom_Stage1_c1_c0_c0_c0_c1_c0;
+uniform float uxInvInset_Stage1_c1_c0_c0_c0_c1_c0;
+uniform float uyInvInset_Stage1_c1_c0_c0_c0_c1_c0;
+uniform vec2 uoffset_Stage1_c1_c0_c0_c0_c1_c0;
+uniform mat4 um_Stage1_c1_c0_c1_c0_c0_c0;
+uniform vec4 uv_Stage1_c1_c0_c1_c0_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+uniform sampler2D uTextureSampler_2_Stage1;
+uniform sampler2D uTextureSampler_3_Stage1;
+noperspective in vec2 vEllipseOffsets_Stage0;
+noperspective in vec4 vEllipseRadii_Stage0;
+noperspective in vec4 vinColor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+noperspective in vec2 vTransformedCoords_3_Stage0;
+vec4 MagnifierEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coord = vTransformedCoords_0_Stage0;
+ vec2 zoom_coord = uoffset_Stage1_c0_c0 + coord * vec2(uxInvZoom_Stage1_c0_c0, uyInvZoom_Stage1_c0_c0);
+ vec2 delta = (coord - uboundsUniform_Stage1_c0_c0.xy) * uboundsUniform_Stage1_c0_c0.zw;
+ delta = min(delta, vec2(1.0, 1.0) - delta);
+ delta *= vec2(uxInvInset_Stage1_c0_c0, uyInvInset_Stage1_c0_c0);
+ float weight = 0.0;
+ if (delta.x < 2.0 && delta.y < 2.0) {
+ delta = vec2(2.0, 2.0) - delta;
+ float dist = length(delta);
+ dist = max(2.0 - dist, 0.0);
+ weight = min(dist * dist, 1.0);
+ } else {
+ vec2 delta_squared = delta * delta;
+ weight = min(min(delta_squared.x, delta_squared.y), 1.0);
+ }
+ _output = texture(uTextureSampler_0_Stage1, mix(coord, zoom_coord, weight));
+ return _output;
+}
+vec4 DisplacementMap_Stage1_c1_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 dColor = texture(uTextureSampler_1_Stage1, vTransformedCoords_1_Stage0);
+ dColor.xyz = dColor.w < 9.9999999747524271e-07 ? vec3(0.0) : clamp(dColor.xyz / dColor.w, 0.0, 1.0);
+ vec2 cCoords = vTransformedCoords_2_Stage0 + uScale_Stage1_c1_c0_c0_c0_c0_c0 * (dColor.yy - vec2(0.5));
+ {
+ vec2 origCoord = cCoords;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0_c0_c0.xy, uTexDom_Stage1_c1_c0_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ _output = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ return _output;
+}
+vec4 MagnifierEffect_Stage1_c1_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coord = vTransformedCoords_3_Stage0;
+ vec2 zoom_coord = uoffset_Stage1_c1_c0_c0_c0_c1_c0 + coord * vec2(uxInvZoom_Stage1_c1_c0_c0_c0_c1_c0, uyInvZoom_Stage1_c1_c0_c0_c0_c1_c0);
+ vec2 delta = (coord - uboundsUniform_Stage1_c1_c0_c0_c0_c1_c0.xy) * uboundsUniform_Stage1_c1_c0_c0_c0_c1_c0.zw;
+ delta = min(delta, vec2(1.0, 1.0) - delta);
+ delta *= vec2(uxInvInset_Stage1_c1_c0_c0_c0_c1_c0, uyInvInset_Stage1_c1_c0_c0_c0_c1_c0);
+ float weight = 0.0;
+ if (delta.x < 2.0 && delta.y < 2.0) {
+ delta = vec2(2.0, 2.0) - delta;
+ float dist = length(delta);
+ dist = max(2.0 - dist, 0.0);
+ weight = min(dist * dist, 1.0);
+ } else {
+ vec2 delta_squared = delta * delta;
+ weight = min(min(delta_squared.x, delta_squared.y), 1.0);
+ }
+ _output = texture(uTextureSampler_3_Stage1, mix(coord, zoom_coord, weight));
+ return _output;
+}
+vec4 blend_modulate(vec4 src, vec4 dst) {
+ return src * dst;
+}
+vec4 ComposeTwo_Stage1_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_modulate(DisplacementMap_Stage1_c1_c0_c0_c0_c0_c0(inputColor), MagnifierEffect_Stage1_c1_c0_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 ColorMatrixFragmentProcessor_Stage1_c1_c0_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = _input;
+ {
+ float nonZeroAlpha = max(inputColor.w, 9.9999997473787516e-05);
+ inputColor = vec4(inputColor.xyz / nonZeroAlpha, inputColor.w);
+ }
+ _output = um_Stage1_c1_c0_c1_c0_c0_c0 * inputColor + uv_Stage1_c1_c0_c1_c0_c0_c0;
+ {
+ _output = clamp(_output, 0.0, 1.0);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 Big_Ole_Key_Stage1_c1_c0_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = _input;
+ return _output;
+}
+vec4 blend_screen(vec4 src, vec4 dst) {
+ return src + (1.0 - src) * dst;
+}
+vec4 ComposeTwo_Stage1_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_screen(ColorMatrixFragmentProcessor_Stage1_c1_c0_c1_c0_c0_c0(inputColor), Big_Ole_Key_Stage1_c1_c0_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 ComposeTwo_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_src_in(ComposeTwo_Stage1_c1_c0_c0_c0(inputColor), ComposeTwo_Stage1_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vinColor_Stage0;
+ vec2 offset = vEllipseOffsets_Stage0;
+ float test = dot(offset, offset) - 1.0;
+ vec2 grad = (2.0 * offset) * vEllipseRadii_Stage0.xy;
+ float grad_dot = dot(grad, grad);
+ grad_dot = max(grad_dot, 1.1754999560161448e-38);
+ float invlen = inversesqrt(grad_dot);
+ float edgeAlpha = clamp(0.5 - test * invlen, 0.0, 1.0);
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_src_over(MagnifierEffect_Stage1_c0_c0(inputColor), ComposeTwo_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ sk_FragColor = output_Stage1 * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+uniform mat3 uCoordTransformMatrix_3_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec2 inEllipseOffset;
+in vec4 inEllipseRadii;
+noperspective out vec2 vEllipseOffsets_Stage0;
+noperspective out vec4 vEllipseRadii_Stage0;
+noperspective out vec4 vinColor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+noperspective out vec2 vTransformedCoords_3_Stage0;
+void main() {
+ vEllipseOffsets_Stage0 = inEllipseOffset;
+ vEllipseRadii_Stage0 = inEllipseRadii;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_3_Stage0 = (uCoordTransformMatrix_3_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/397-3.shader_test b/shaders/skia/397-3.shader_test
new file mode 100644
index 0000000..40073de
--- /dev/null
+++ b/shaders/skia/397-3.shader_test
@@ -0,0 +1,40 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 ucolor_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ {
+ output_Stage2 = output_Stage1 * ucolor_Stage2;
+ }
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/397-4.shader_test b/shaders/skia/397-4.shader_test
new file mode 100644
index 0000000..38b095b
--- /dev/null
+++ b/shaders/skia/397-4.shader_test
@@ -0,0 +1,106 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 TextureEffect_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage2, vTransformedCoords_1_Stage0) * _input;
+ return _output;
+}
+vec4 ClampFragmentProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = clamp(_input, 0.0, 1.0);
+ }
+ return _output;
+}
+float _blend_color_saturation(vec3 color) {
+ return max(max(color.x, color.y), color.z) - min(min(color.x, color.y), color.z);
+}
+vec3 _blend_set_color_saturation_helper(vec3 minMidMax, float sat) {
+ if (minMidMax.x < minMidMax.z) {
+ return vec3(0.0, (sat * (minMidMax.y - minMidMax.x)) / (minMidMax.z - minMidMax.x), sat);
+ }
+ return vec3(0.0);
+}
+vec3 _blend_set_color_saturation(vec3 hueLumColor, vec3 satColor) {
+ float sat = _blend_color_saturation(satColor);
+ if (hueLumColor.x <= hueLumColor.y) {
+ if (hueLumColor.y <= hueLumColor.z) {
+ hueLumColor.xyz = _blend_set_color_saturation_helper(hueLumColor, sat);
+ } else if (hueLumColor.x <= hueLumColor.z) {
+ hueLumColor.xzy = _blend_set_color_saturation_helper(hueLumColor.xzy, sat);
+ } else {
+ hueLumColor.zxy = _blend_set_color_saturation_helper(hueLumColor.zxy, sat);
+ }
+ } else if (hueLumColor.x <= hueLumColor.z) {
+ hueLumColor.yxz = _blend_set_color_saturation_helper(hueLumColor.yxz, sat);
+ } else if (hueLumColor.y <= hueLumColor.z) {
+ hueLumColor.yzx = _blend_set_color_saturation_helper(hueLumColor.yzx, sat);
+ } else {
+ hueLumColor.zyx = _blend_set_color_saturation_helper(hueLumColor.zyx, sat);
+ }
+ return hueLumColor;
+}
+float _blend_color_luminance(vec3 color) {
+ return dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), color);
+}
+vec3 _blend_set_color_luminance(vec3 hueSatColor, float alpha, vec3 lumColor) {
+ float lum = _blend_color_luminance(lumColor);
+ vec3 result = (lum - _blend_color_luminance(hueSatColor)) + hueSatColor;
+ float minComp = min(min(result.x, result.y), result.z);
+ float maxComp = max(max(result.x, result.y), result.z);
+ if (minComp < 0.0 && lum != minComp) {
+ result = lum + ((result - lum) * lum) / (lum - minComp);
+ }
+ if (maxComp > alpha && maxComp != lum) {
+ return lum + ((result - lum) * (alpha - lum)) / (maxComp - lum);
+ }
+ return result;
+}
+vec4 blend_saturation(vec4 src, vec4 dst) {
+ float alpha = dst.w * src.w;
+ vec3 sda = src.xyz * dst.w;
+ vec3 dsa = dst.xyz * src.w;
+ return vec4((((_blend_set_color_luminance(_blend_set_color_saturation(dsa, sda), alpha, dsa) + dst.xyz) - dsa) + src.xyz) - sda, (src.w + dst.w) - alpha);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ vec4 inputColor = vec4(output_Stage1.xyz, 1.0);
+ output_Stage2 = blend_saturation(TextureEffect_Stage2_c0_c0(inputColor), ClampFragmentProcessor_Stage2_c1_c0(inputColor));
+ output_Stage2 *= output_Stage1.w;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/397.shader_test b/shaders/skia/397.shader_test
new file mode 100644
index 0000000..f15be95
--- /dev/null
+++ b/shaders/skia/397.shader_test
@@ -0,0 +1,78 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 ucolor_Stage1_c0_c0_c0_c0;
+uniform vec4 ucolor_Stage2_c1_c0;
+noperspective in vec4 vcolor_Stage0;
+vec4 ConstColorProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = _input.w * ucolor_Stage1_c0_c0_c0_c0;
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = ConstColorProcessor_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c1_c0;
+ }
+ return _output;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 blend_darken(vec4 src, vec4 dst) {
+ vec4 result = blend_src_over(src, dst);
+ result.xyz = min(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
+ return result;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_darken(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_darken(ConstColorProcessor_Stage2_c1_c0(vec4(1.0)), output_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 position;
+in vec4 inColor;
+noperspective out vec4 vcolor_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/4-1.shader_test b/shaders/skia/4-1.shader_test
new file mode 100644
index 0000000..7085413
--- /dev/null
+++ b/shaders/skia/4-1.shader_test
@@ -0,0 +1,48 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform sampler2D uTextureSampler_0_Stage0;
+noperspective in vec2 vTextureCoords_Stage0;
+flat in int vTexIndex_Stage0;
+noperspective in vec4 vinColor_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vinColor_Stage0;
+ vec4 texColor;
+ {
+ texColor = texture(uTextureSampler_0_Stage0, vTextureCoords_Stage0);
+ }
+ outputCoverage_Stage0 = texColor;
+ }
+ {
+ sk_FragColor = outputColor_Stage0 * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform vec2 uAtlasSizeInv_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in uvec2 inTextureCoords;
+noperspective out vec2 vTextureCoords_Stage0;
+flat out int vTexIndex_Stage0;
+noperspective out vec4 vinColor_Stage0;
+void main() {
+ ivec2 signedCoords = ivec2(int(inTextureCoords.x), int(inTextureCoords.y));
+ vec2 unormTexCoords = vec2(float(signedCoords.x / 2), float(signedCoords.y / 2));
+ vTextureCoords_Stage0 = unormTexCoords * uAtlasSizeInv_Stage0;
+ vTexIndex_Stage0 = 0;
+ vinColor_Stage0 = inColor;
+ gl_Position = vec4(inPosition.x, inPosition.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/4-110.shader_test b/shaders/skia/4-110.shader_test
new file mode 100644
index 0000000..e4b7baf
--- /dev/null
+++ b/shaders/skia/4-110.shader_test
@@ -0,0 +1,63 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uinnerRect_Stage1;
+uniform vec2 uinvRadiiXY_Stage1;
+uniform vec4 uinnerRect_Stage2;
+uniform vec4 uinvRadiiLTRB_Stage2;
+flat in vec4 vcolor_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec2 dxy0 = uinnerRect_Stage1.xy - gl_FragCoord.xy;
+ vec2 dxy1 = gl_FragCoord.xy - uinnerRect_Stage1.zw;
+ vec2 dxy = max(max(dxy0, dxy1), 0.0);
+ vec2 Z = dxy * uinvRadiiXY_Stage1;
+ float implicit = dot(Z, dxy) - 1.0;
+ float grad_dot = 4.0 * dot(Z, Z);
+ grad_dot = max(grad_dot, 9.9999997473787516e-05);
+ float approx_dist = implicit * inversesqrt(grad_dot);
+ float alpha = clamp(0.5 + approx_dist, 0.0, 1.0);
+ output_Stage1 = vec4(alpha);
+ }
+ vec4 output_Stage2;
+ {
+ vec2 dxy0 = uinnerRect_Stage2.xy - gl_FragCoord.xy;
+ vec2 dxy1 = gl_FragCoord.xy - uinnerRect_Stage2.zw;
+ vec2 dxy = max(max(dxy0, dxy1), 0.0);
+ vec2 Z = max(max(dxy0 * uinvRadiiLTRB_Stage2.xy, dxy1 * uinvRadiiLTRB_Stage2.zw), 0.0);
+ float implicit = dot(Z, dxy) - 1.0;
+ float grad_dot = 4.0 * dot(Z, Z);
+ grad_dot = max(grad_dot, 9.9999997473787516e-05);
+ float approx_dist = implicit * inversesqrt(grad_dot);
+ float alpha = clamp(0.5 - approx_dist, 0.0, 1.0);
+ output_Stage2 = output_Stage1 * alpha;
+ }
+ {
+ sk_FragColor = outputColor_Stage0 * output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 position;
+in vec4 color;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/4-113.shader_test b/shaders/skia/4-113.shader_test
new file mode 100644
index 0000000..83bb9c6
--- /dev/null
+++ b/shaders/skia/4-113.shader_test
@@ -0,0 +1,67 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 RadialGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = length(vTransformedCoords_0_Stage0);
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = RadialGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/4-117.shader_test b/shaders/skia/4-117.shader_test
new file mode 100644
index 0000000..473205d
--- /dev/null
+++ b/shaders/skia/4-117.shader_test
@@ -0,0 +1,51 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TextureEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = texture(uTextureSampler_0_Stage2, vTransformedCoords_1_Stage0);
+ }
+ {
+ sk_FragColor = output_Stage1 * output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/4-12.shader_test b/shaders/skia/4-12.shader_test
new file mode 100644
index 0000000..2353af7
--- /dev/null
+++ b/shaders/skia/4-12.shader_test
@@ -0,0 +1,21 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+uniform vec4 uColor_Stage0;
+void main() {
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 inPosition;
+void main() {
+ vec2 pos2 = inPosition;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/4-121.shader_test b/shaders/skia/4-121.shader_test
new file mode 100644
index 0000000..9c86bf6
--- /dev/null
+++ b/shaders/skia/4-121.shader_test
@@ -0,0 +1,136 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform float ubias_Stage1_c0_c0_c0_c0;
+uniform float uscale_Stage1_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+flat in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec4 varccoord_Stage0;
+vec4 SweepGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float angle;
+ {
+ angle = atan(-vTransformedCoords_0_Stage0.y, -vTransformedCoords_0_Stage0.x);
+ }
+ float t = ((angle * 0.15915493667125702 + 0.5) + ubias_Stage1_c0_c0_c0_c0) * uscale_Stage1_c0_c0_c0_c0;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = SweepGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ outputCoverage_Stage0 = vec4(1.0);
+ if (vec2(0.0) != varccoord_Stage0.xy) {
+ float fn = dot(varccoord_Stage0.xy, varccoord_Stage0.xy) - 1.0;
+ if (fn > 0.0) {
+ outputCoverage_Stage0 = vec4(0.0);
+ }
+ }
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_dst_in(outputColor_Stage0, ClampedGradientEffect_Stage1_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage1 * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec4 radii_selector;
+in vec4 corner_and_radius_outsets;
+in vec4 skew;
+in vec2 translate;
+in vec4 radii_x;
+in vec4 radii_y;
+in vec4 color;
+in vec4 local_rect;
+flat out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec4 varccoord_Stage0;
+void main() {
+ vcolor_Stage0 = color;
+ vec2 corner = corner_and_radius_outsets.xy;
+ vec2 radius_outset = corner_and_radius_outsets.zw;
+ vec2 radii;
+ radii.x = dot(radii_selector, radii_x);
+ radii.y = dot(radii_selector, radii_y);
+ bool is_arc_section = radii.x > 0.0;
+ radii = abs(radii);
+ vec2 vertexpos = corner + radius_outset * radii;
+ vec2 localcoord = (local_rect.xy * (1.0 - vertexpos) + local_rect.zw * (1.0 + vertexpos)) * 0.5;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localcoord, 1.0)).xy;
+ mat2 skewmatrix = mat2(skew.xy, skew.zw);
+ vec2 devcoord = vertexpos * skewmatrix + translate;
+ if (is_arc_section) {
+ varccoord_Stage0.xy = 1.0 - abs(radius_outset);
+ mat2 derivatives = inverse(skewmatrix);
+ varccoord_Stage0.zw = derivatives * (((varccoord_Stage0.xy / radii) * corner) * 2.0);
+ } else {
+ varccoord_Stage0 = vec4(0.0);
+ }
+ gl_Position = vec4(devcoord.x, devcoord.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/4-123.shader_test b/shaders/skia/4-123.shader_test
new file mode 100644
index 0000000..c8b7546
--- /dev/null
+++ b/shaders/skia/4-123.shader_test
@@ -0,0 +1,38 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 TextureEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TextureEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/4-128.shader_test b/shaders/skia/4-128.shader_test
new file mode 100644
index 0000000..c8bf2ec
--- /dev/null
+++ b/shaders/skia/4-128.shader_test
@@ -0,0 +1,45 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 urectUniform_Stage1;
+flat in vec4 vcolor_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ float alpha;
+ {
+ alpha = float(all(greaterThan(vec4(gl_FragCoord.xy, urectUniform_Stage1.zw), vec4(urectUniform_Stage1.xy, gl_FragCoord.xy))) ? 1 : 0);
+ }
+ {
+ alpha = 1.0 - alpha;
+ }
+ output_Stage1 = vec4(alpha);
+ }
+ {
+ sk_FragColor = outputColor_Stage0 * output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 position;
+in vec4 color;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/4-130.shader_test b/shaders/skia/4-130.shader_test
new file mode 100644
index 0000000..6090533
--- /dev/null
+++ b/shaders/skia/4-130.shader_test
@@ -0,0 +1,97 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uCoordTransformMatrix_1_Stage0;
+uniform vec4 uCoordTransformMatrix_2_Stage0;
+uniform vec4 uCoordTransformMatrix_3_Stage0;
+uniform float ucutoff_Stage1_c0_c0;
+uniform float uslope_Stage1_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+uniform sampler2D uTextureSampler_2_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input, vec2 _coords) {
+ _coords = _coords * uCoordTransformMatrix_1_Stage0.xz + uCoordTransformMatrix_1_Stage0.yw;
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, _coords) * _input;
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0_c0_c0(vec4 _input, vec2 _coords) {
+ vec4 _output;
+ _output = TextureEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0, 1.0, 1.0, 1.0), _coords);
+ return _output;
+}
+vec4 TextureEffect_Stage1_c0_c0_c1_c0_c0_c0(vec4 _input, vec2 _coords) {
+ _coords = _coords * uCoordTransformMatrix_2_Stage0.xz + uCoordTransformMatrix_2_Stage0.yw;
+ vec4 _output;
+ _output = texture(uTextureSampler_1_Stage1, _coords) * _input;
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0_c1_c0(vec4 _input, vec2 _coords) {
+ vec4 _output;
+ _output = TextureEffect_Stage1_c0_c0_c1_c0_c0_c0(vec4(1.0, 1.0, 1.0, 1.0), _coords);
+ return _output;
+}
+vec4 TextureEffect_Stage1_c0_c0_c2_c0(vec4 _input, vec2 _coords) {
+ _coords = _coords * uCoordTransformMatrix_3_Stage0.xz + uCoordTransformMatrix_3_Stage0.yw;
+ vec4 _output;
+ _output = texture(uTextureSampler_2_Stage1, _coords) * _input;
+ return _output;
+}
+float smooth_cutoff_Stage1_c0_c0(float x) {
+ x = x * uslope_Stage1_c0_c0 + (0.5 - uslope_Stage1_c0_c0 * ucutoff_Stage1_c0_c0);
+ return clamp(x, 0.0, 1.0);
+}
+vec4 runtime_shader_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = _input;
+ vec4 before = OverrideInputFragmentProcessor_Stage1_c0_c0_c0_c0(vec4(1.0), vTransformedCoords_0_Stage0);
+ vec4 after = OverrideInputFragmentProcessor_Stage1_c0_c0_c1_c0(vec4(1.0), vTransformedCoords_0_Stage0);
+ float m = smooth_cutoff_Stage1_c0_c0(TextureEffect_Stage1_c0_c0_c2_c0(vec4(1.0), vTransformedCoords_0_Stage0).x);
+ _output = mix(before, after, m);
+ return _output;
+}
+vec4 ClampFragmentProcessor_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ float alpha = clamp(_input.w, 0.0, 1.0);
+ _output = vec4(clamp(_input.xyz, 0.0, alpha), alpha);
+ }
+ return _output;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampFragmentProcessor_Stage1_c1_c0(runtime_shader_Stage1_c0_c0(outputColor_Stage0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/4-131.shader_test b/shaders/skia/4-131.shader_test
new file mode 100644
index 0000000..8f8ad16
--- /dev/null
+++ b/shaders/skia/4-131.shader_test
@@ -0,0 +1,54 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TextureEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ output_Stage2.w = (output_Stage2.x * 0.30000001192092896 + output_Stage2.y * 0.60000002384185791) + output_Stage2.z * 0.10000000149011612;
+ output_Stage2.x = 0.0;
+ output_Stage2.y = 0.0;
+ output_Stage2.z = 0.0;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/4-132.shader_test b/shaders/skia/4-132.shader_test
new file mode 100644
index 0000000..5d6e397
--- /dev/null
+++ b/shaders/skia/4-132.shader_test
@@ -0,0 +1,50 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uellipse_Stage1;
+flat in vec4 vcolor_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec2 d = gl_FragCoord.xy - uellipse_Stage1.xy;
+ vec2 Z = d * uellipse_Stage1.zw;
+ float implicit = dot(Z, d) - 1.0;
+ float grad_dot = 4.0 * dot(Z, Z);
+ {
+ grad_dot = max(grad_dot, 1.1754999560161448e-38);
+ }
+ float approx_dist = implicit * inversesqrt(grad_dot);
+ float alpha;
+ {
+ alpha = approx_dist > 0.0 ? 0.0 : 1.0;
+ }
+ output_Stage1 = vec4(alpha);
+ }
+ {
+ sk_FragColor = outputColor_Stage0 * output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 position;
+in vec4 color;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/4-14.shader_test b/shaders/skia/4-14.shader_test
new file mode 100644
index 0000000..8859dd7
--- /dev/null
+++ b/shaders/skia/4-14.shader_test
@@ -0,0 +1,105 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform float uSrcTF_Stage1_c0_c0[7];
+uniform mat3 uColorXform_Stage1_c0_c0;
+uniform float uDstTF_Stage1_c0_c0[7];
+uniform mat3 ucolorSpaceMatrix_Stage1_c0_c0_c0_c0;
+uniform vec3 ucolorSpaceTranslate_Stage1_c0_c0_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+vec4 YUVtoRGBEffect_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 planes[1];
+ planes[0] = TextureEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ vec4 color = vec4(planes[0].x, planes[0].y, planes[0].z, planes[0].w);
+ color.xyz = clamp(color.xyz * ucolorSpaceMatrix_Stage1_c0_c0_c0_c0 + ucolorSpaceTranslate_Stage1_c0_c0_c0_c0, 0.0, 1.0);
+ color.xyz *= color.w;
+ _output = color;
+ return _output;
+}
+float src_tf_Stage1_c0_c0(float x) {
+ float G = uSrcTF_Stage1_c0_c0[0];
+ float A = uSrcTF_Stage1_c0_c0[1];
+ float B = uSrcTF_Stage1_c0_c0[2];
+ float C = uSrcTF_Stage1_c0_c0[3];
+ float D = uSrcTF_Stage1_c0_c0[4];
+ float E = uSrcTF_Stage1_c0_c0[5];
+ float F = uSrcTF_Stage1_c0_c0[6];
+ float s = sign(x);
+ x = abs(x);
+ x = x < D ? C * x + F : pow(A * x + B, G) + E;
+ return s * x;
+}
+float dst_tf_Stage1_c0_c0(float x) {
+ float G = uDstTF_Stage1_c0_c0[0];
+ float A = uDstTF_Stage1_c0_c0[1];
+ float B = uDstTF_Stage1_c0_c0[2];
+ float C = uDstTF_Stage1_c0_c0[3];
+ float D = uDstTF_Stage1_c0_c0[4];
+ float E = uDstTF_Stage1_c0_c0[5];
+ float F = uDstTF_Stage1_c0_c0[6];
+ float s = sign(x);
+ x = abs(x);
+ x = x < D ? C * x + F : pow(A * x + B, G) + E;
+ return s * x;
+}
+vec4 gamut_xform_Stage1_c0_c0(vec4 color) {
+ color.xyz = uColorXform_Stage1_c0_c0 * color.xyz;
+ return color;
+}
+vec4 color_xform_Stage1_c0_c0(vec4 color) {
+ float nonZeroAlpha = max(color.w, 9.9999997473787516e-05);
+ color = vec4(color.xyz / nonZeroAlpha, nonZeroAlpha);
+ color.x = src_tf_Stage1_c0_c0(color.x);
+ color.y = src_tf_Stage1_c0_c0(color.y);
+ color.z = src_tf_Stage1_c0_c0(color.z);
+ color = gamut_xform_Stage1_c0_c0(color);
+ color.x = dst_tf_Stage1_c0_c0(color.x);
+ color.y = dst_tf_Stage1_c0_c0(color.y);
+ color.z = dst_tf_Stage1_c0_c0(color.z);
+ color.xyz *= color.w;
+ return color;
+}
+vec4 ColorSpaceXform_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = color_xform_Stage1_c0_c0(YUVtoRGBEffect_Stage1_c0_c0_c0_c0(vec4(1.0))) * _input;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ColorSpaceXform_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/4-143.shader_test b/shaders/skia/4-143.shader_test
new file mode 100644
index 0000000..bb2ca12
--- /dev/null
+++ b/shaders/skia/4-143.shader_test
@@ -0,0 +1,51 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 urectH_Stage1;
+uniform float uinvSixSigma_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+flat in vec4 vcolor_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ float xCoverage, yCoverage;
+ {
+ float x, y;
+ {
+ x = max(urectH_Stage1.x - gl_FragCoord.x, gl_FragCoord.x - urectH_Stage1.z);
+ y = max(urectH_Stage1.y - gl_FragCoord.y, gl_FragCoord.y - urectH_Stage1.w);
+ }
+ xCoverage = texture(uTextureSampler_0_Stage1, vec2(x * uinvSixSigma_Stage1, 0.5)).w;
+ yCoverage = texture(uTextureSampler_0_Stage1, vec2(y * uinvSixSigma_Stage1, 0.5)).w;
+ output_Stage1 = vec4(xCoverage) * yCoverage;
+ }
+ output_Stage1 = vec4(xCoverage) * yCoverage;
+ }
+ {
+ sk_FragColor = outputColor_Stage0 * output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 position;
+in vec4 color;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/4-16.shader_test b/shaders/skia/4-16.shader_test
new file mode 100644
index 0000000..22fe969
--- /dev/null
+++ b/shaders/skia/4-16.shader_test
@@ -0,0 +1,45 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform mat3 ucolorSpaceMatrix_Stage1;
+uniform vec3 ucolorSpaceTranslate_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 TextureEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ vec4 planes[1];
+ planes[0] = TextureEffect_Stage1_c0_c0(vec4(1.0));
+ vec4 color = vec4(planes[0].y, planes[0].x, planes[0].z, planes[0].w);
+ color.xyz = clamp(color.xyz * ucolorSpaceMatrix_Stage1 + ucolorSpaceTranslate_Stage1, 0.0, 1.0);
+ color.xyz *= color.w;
+ output_Stage1 = color;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/4-168.shader_test b/shaders/skia/4-168.shader_test
new file mode 100644
index 0000000..48c5929
--- /dev/null
+++ b/shaders/skia/4-168.shader_test
@@ -0,0 +1,35 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform sampler2D uTextureSampler_0_Stage0;
+in vec2 vlocalCoord_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vec4(1.0);
+ vec2 texCoord;
+ texCoord = vlocalCoord_Stage0;
+ outputColor_Stage0 = texture(uTextureSampler_0_Stage0, texCoord);
+ }
+ {
+ sk_FragColor = outputColor_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec3 position;
+in vec2 localCoord;
+out vec2 vlocalCoord_Stage0;
+void main() {
+ vlocalCoord_Stage0 = localCoord;
+ gl_Position = vec4(position.x, position.y, 0.0, position.z);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/4-169.shader_test b/shaders/skia/4-169.shader_test
new file mode 100644
index 0000000..fa89e21
--- /dev/null
+++ b/shaders/skia/4-169.shader_test
@@ -0,0 +1,55 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform sampler2D uTextureSampler_0_Stage0;
+in vec2 vlocalCoord_Stage0;
+in float vcoverage_Stage0;
+flat in vec4 vgeomDomain_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vec4(1.0);
+ vec2 texCoord;
+ texCoord = vlocalCoord_Stage0;
+ outputColor_Stage0 = texture(uTextureSampler_0_Stage0, texCoord);
+ float coverage = vcoverage_Stage0 * gl_FragCoord.w;
+ vec4 geoDomain;
+ geoDomain = vgeomDomain_Stage0;
+ if (coverage < 0.5) {
+ vec4 dists4 = clamp(vec4(1.0, 1.0, -1.0, -1.0) * (gl_FragCoord.xyxy - geoDomain), 0.0, 1.0);
+ vec2 dists2 = dists4.xy * dists4.zw;
+ coverage = min(coverage, dists2.x * dists2.y);
+ }
+ outputCoverage_Stage0 = vec4(coverage);
+ }
+ {
+ sk_FragColor = outputColor_Stage0 * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec4 positionWithCoverage;
+in vec2 localCoord;
+in vec4 geomDomain;
+out vec2 vlocalCoord_Stage0;
+out float vcoverage_Stage0;
+flat out vec4 vgeomDomain_Stage0;
+void main() {
+ vec3 position = positionWithCoverage.xyz;
+ vlocalCoord_Stage0 = localCoord;
+ vcoverage_Stage0 = positionWithCoverage.w * positionWithCoverage.z;
+ vgeomDomain_Stage0 = geomDomain;
+ gl_Position = vec4(position.x, position.y, 0.0, position.z);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/4-172.shader_test b/shaders/skia/4-172.shader_test
new file mode 100644
index 0000000..1884f6b
--- /dev/null
+++ b/shaders/skia/4-172.shader_test
@@ -0,0 +1,68 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform float uDistanceAdjust_Stage0;
+uniform sampler2D uTextureSampler_0_Stage0;
+noperspective in vec4 vinColor_Stage0;
+noperspective in vec2 vTextureCoords_Stage0;
+flat in int vTexIndex_Stage0;
+noperspective in vec2 vIntTextureCoords_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vinColor_Stage0;
+ vec2 uv = vTextureCoords_Stage0;
+ vec4 texColor;
+ {
+ texColor = texture(uTextureSampler_0_Stage0, uv);
+ }
+ float distance = 7.96875 * (texColor.x - 0.50196081399917603);
+ distance -= uDistanceAdjust_Stage0;
+ float afwidth;
+ vec2 dist_grad = vec2(dFdx(distance), -dFdy(distance));
+ float dg_len2 = dot(dist_grad, dist_grad);
+ if (dg_len2 < 9.9999997473787516e-05) {
+ dist_grad = vec2(0.70709997415542603, 0.70709997415542603);
+ } else {
+ dist_grad = dist_grad * inversesqrt(dg_len2);
+ }
+ vec2 Jdx = dFdx(vIntTextureCoords_Stage0);
+ vec2 Jdy = -dFdy(vIntTextureCoords_Stage0);
+ vec2 grad = vec2(dist_grad.x * Jdx.x + dist_grad.y * Jdy.x, dist_grad.x * Jdx.y + dist_grad.y * Jdy.y);
+ afwidth = 0.64999997615814209 * length(grad);
+ float val = smoothstep(-afwidth, afwidth, distance);
+ outputCoverage_Stage0 = vec4(val);
+ }
+ {
+ sk_FragColor = outputColor_Stage0 * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform vec2 uAtlasDimensionsInv_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in uvec2 inTextureCoords;
+noperspective out vec4 vinColor_Stage0;
+noperspective out vec2 vTextureCoords_Stage0;
+flat out int vTexIndex_Stage0;
+noperspective out vec2 vIntTextureCoords_Stage0;
+void main() {
+ vinColor_Stage0 = inColor;
+ ivec2 signedCoords = ivec2(int(inTextureCoords.x), int(inTextureCoords.y));
+ vec2 unormTexCoords = vec2(float(signedCoords.x / 2), float(signedCoords.y / 2));
+ vTextureCoords_Stage0 = unormTexCoords * uAtlasDimensionsInv_Stage0;
+ vTexIndex_Stage0 = 0;
+ vIntTextureCoords_Stage0 = unormTexCoords;
+ gl_Position = vec4(inPosition.x, inPosition.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/4-193.shader_test b/shaders/skia/4-193.shader_test
new file mode 100644
index 0000000..090b8d6
--- /dev/null
+++ b/shaders/skia/4-193.shader_test
@@ -0,0 +1,43 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uColor_Stage0;
+uniform float uCoverage_Stage0;
+noperspective in vec4 vHairQuadEdge_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = uColor_Stage0;
+ float edgeAlpha;
+ vec2 duvdx = dFdx(vHairQuadEdge_Stage0.xy);
+ vec2 duvdy = -dFdy(vHairQuadEdge_Stage0.xy);
+ vec2 gF = vec2((2.0 * vHairQuadEdge_Stage0.x) * duvdx.x - duvdx.y, (2.0 * vHairQuadEdge_Stage0.x) * duvdy.x - duvdy.y);
+ edgeAlpha = vHairQuadEdge_Stage0.x * vHairQuadEdge_Stage0.x - vHairQuadEdge_Stage0.y;
+ edgeAlpha = sqrt((edgeAlpha * edgeAlpha) / dot(gF, gF));
+ edgeAlpha = max(1.0 - edgeAlpha, 0.0);
+ outputCoverage_Stage0 = vec4(uCoverage_Stage0 * edgeAlpha);
+ }
+ {
+ sk_FragColor = outputColor_Stage0 * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 inPosition;
+in vec4 inHairQuadEdge;
+noperspective out vec4 vHairQuadEdge_Stage0;
+void main() {
+ vHairQuadEdge_Stage0 = inHairQuadEdge;
+ vec2 pos2 = inPosition;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/4-207.shader_test b/shaders/skia/4-207.shader_test
new file mode 100644
index 0000000..f0cc19b
--- /dev/null
+++ b/shaders/skia/4-207.shader_test
@@ -0,0 +1,129 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform float ubias_Stage1_c0_c0_c0_c0;
+uniform float uscale_Stage1_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+uniform float uweight_Stage2;
+uniform mat4 um_Stage2_c1_c0_c1_c0;
+uniform vec4 uv_Stage2_c1_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 SweepGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float angle;
+ {
+ angle = atan(-vTransformedCoords_0_Stage0.y, -vTransformedCoords_0_Stage0.x);
+ }
+ float t = ((angle * 0.15915493667125702 + 0.5) + ubias_Stage1_c0_c0_c0_c0) * uscale_Stage1_c0_c0_c0_c0;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = SweepGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 LumaColorFilterEffect_Stage2_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float luma = clamp(dot(vec3(0.2125999927520752, 0.71520000696182251, 0.072200000286102295), _input.xyz), 0.0, 1.0);
+ _output = vec4(0.0, 0.0, 0.0, luma);
+ return _output;
+}
+vec4 ColorMatrixFragmentProcessor_Stage2_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = _input;
+ {
+ float nonZeroAlpha = max(inputColor.w, 9.9999997473787516e-05);
+ inputColor = vec4(inputColor.xyz / nonZeroAlpha, inputColor.w);
+ }
+ _output = um_Stage2_c1_c0_c1_c0 * inputColor + uv_Stage2_c1_c0_c1_c0;
+ {
+ _output = clamp(_output, 0.0, 1.0);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 Series_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = ColorMatrixFragmentProcessor_Stage2_c1_c0_c1_c0(LumaColorFilterEffect_Stage2_c1_c0_c0_c0(_input));
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ vec4 in0 = Series_Stage2_c1_c0(output_Stage1);
+ vec4 in1 = output_Stage1;
+ output_Stage2 = mix(in0, in1, uweight_Stage2);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/4-21.shader_test b/shaders/skia/4-21.shader_test
new file mode 100644
index 0000000..c7dfffb
--- /dev/null
+++ b/shaders/skia/4-21.shader_test
@@ -0,0 +1,41 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uColor_Stage0;
+uniform sampler2D uTextureSampler_0_Stage1;
+in vec2 vTransformedCoords_0_Stage0;
+vec4 TextureEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TextureEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 inLocalCoord;
+out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec3 pos3 = uViewM_Stage0 * vec3(position, 1.0);
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos3.x, pos3.y, 0.0, pos3.z);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/4-210.shader_test b/shaders/skia/4-210.shader_test
new file mode 100644
index 0000000..fbd9554
--- /dev/null
+++ b/shaders/skia/4-210.shader_test
@@ -0,0 +1,78 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uclamp_Stage1;
+uniform vec2 uDstTextureUpperLeft_Stage2;
+uniform vec2 uDstTextureCoordScale_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uDstTextureSampler_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in float vcoverage_Stage0;
+flat in vec4 vgeomDomain_Stage0;
+vec4 blend_src(vec4 src, vec4 dst) {
+ return src;
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ float coverage = vcoverage_Stage0;
+ vec4 geoDomain;
+ geoDomain = vgeomDomain_Stage0;
+ if (coverage < 0.5) {
+ vec4 dists4 = clamp(vec4(1.0, 1.0, -1.0, -1.0) * (gl_FragCoord.xyxy - geoDomain), 0.0, 1.0);
+ vec2 dists2 = dists4.xy * dists4.zw;
+ coverage = min(coverage, dists2.x * dists2.y);
+ }
+ outputCoverage_Stage0 = vec4(coverage);
+ }
+ vec4 output_Stage1;
+ {
+ vec2 inCoord = vTransformedCoords_0_Stage0;
+ vec2 subsetCoord;
+ subsetCoord.x = inCoord.x;
+ subsetCoord.y = inCoord.y;
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage1.x, uclamp_Stage1.z);
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage1.y, uclamp_Stage1.w);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ output_Stage1 = textureColor;
+ }
+ {
+ if (all(lessThanEqual(outputCoverage_Stage0.xyz, vec3(0.0)))) {
+ discard;
+ }
+ vec2 _dstTexCoord = (gl_FragCoord.xy - uDstTextureUpperLeft_Stage2) * uDstTextureCoordScale_Stage2;
+ _dstTexCoord.y = 1.0 - _dstTexCoord.y;
+ vec4 _dstColor = texture(uDstTextureSampler_Stage2, _dstTexCoord);
+ sk_FragColor = blend_src(output_Stage1, _dstColor);
+ sk_FragColor = outputCoverage_Stage0 * sk_FragColor + (vec4(1.0) - outputCoverage_Stage0) * _dstColor;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in float coverage;
+in vec2 localCoord;
+in vec4 geomDomain;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out float vcoverage_Stage0;
+flat out vec4 vgeomDomain_Stage0;
+void main() {
+ vec2 position = position;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcoverage_Stage0 = coverage;
+ vgeomDomain_Stage0 = geomDomain;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/4-213.shader_test b/shaders/skia/4-213.shader_test
new file mode 100644
index 0000000..5fdd398
--- /dev/null
+++ b/shaders/skia/4-213.shader_test
@@ -0,0 +1,143 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform vec4 uKernel_Stage1[3];
+uniform vec2 uKernelOffset_Stage1;
+uniform float uGain_Stage1;
+uniform float uBias_Stage1;
+uniform vec4 uTexDom_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ vec4 sum = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0 - uKernelOffset_Stage1 * uImageIncrement_Stage1;
+ vec4 c;
+ {
+ float k = uKernel_Stage1[0].x;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[0].y;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[0].z;
+ {
+ vec2 origCoord = coord + vec2(2.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[0].w;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[1].x;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[1].y;
+ {
+ vec2 origCoord = coord + vec2(2.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[1].z;
+ {
+ vec2 origCoord = coord + vec2(0.0, 2.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[1].w;
+ {
+ vec2 origCoord = coord + vec2(1.0, 2.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[2].x;
+ {
+ vec2 origCoord = coord + vec2(2.0, 2.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ output_Stage1 = sum * uGain_Stage1 + uBias_Stage1;
+ output_Stage1.w = clamp(output_Stage1.w, 0.0, 1.0);
+ output_Stage1.xyz = clamp(output_Stage1.xyz, 0.0, output_Stage1.w);
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/4-22.shader_test b/shaders/skia/4-22.shader_test
new file mode 100644
index 0000000..1fc2f61
--- /dev/null
+++ b/shaders/skia/4-22.shader_test
@@ -0,0 +1,58 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+vec4 _vtx_attr_0;
+uniform vec4 uColor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec4 v_vtx_attr0_Stage0;
+vec4 runtime_shader_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = _input;
+ _output = _vtx_attr_0;
+ return _output;
+}
+vec4 ClampFragmentProcessor_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ float alpha = clamp(_input.w, 0.0, 1.0);
+ _output = vec4(clamp(_input.xyz, 0.0, alpha), alpha);
+ }
+ return _output;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = uColor_Stage0;
+ _vtx_attr_0 = v_vtx_attr0_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampFragmentProcessor_Stage1_c1_c0(runtime_shader_Stage1_c0_c0(outputColor_Stage0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 _vtx_attr0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec4 v_vtx_attr0_Stage0;
+void main() {
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(position, 1.0)).xy;
+ v_vtx_attr0_Stage0 = _vtx_attr0;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/4-226.shader_test b/shaders/skia/4-226.shader_test
new file mode 100644
index 0000000..b9fafeb
--- /dev/null
+++ b/shaders/skia/4-226.shader_test
@@ -0,0 +1,137 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform float uSurfaceScale_Stage1;
+uniform vec3 uLightColor_Stage1;
+uniform float uKD_Stage1;
+uniform vec3 uLightLocation_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 light_Stage1(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ float colorScale = uKD_Stage1 * dot(normal, surfaceToLight);
+ return vec4(lightColor * clamp(colorScale, 0.0, 1.0), 1.0);
+}
+float sobel_Stage1(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage1(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage1(float m[9], float surfaceScale) {
+ return pointToNormal_Stage1(sobel_Stage1(0.0, 0.0, m[4], m[5], m[7], m[8], 0.66666698455810547), sobel_Stage1(0.0, 0.0, m[4], m[7], m[5], m[8], 0.66666698455810547), surfaceScale);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ vec2 coord = vTransformedCoords_0_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp0 = textureColor;
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp1 = textureColor;
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp2 = textureColor;
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp3 = textureColor;
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp4 = textureColor;
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp5 = textureColor;
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp6 = textureColor;
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp7 = textureColor;
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp8 = textureColor;
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = normalize(uLightLocation_Stage1 - vec3(gl_FragCoord.xy, uSurfaceScale_Stage1 * m[4]));
+ output_Stage1 = light_Stage1(normal_Stage1(m, uSurfaceScale_Stage1), surfaceToLight, uLightColor_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/4-23.shader_test b/shaders/skia/4-23.shader_test
new file mode 100644
index 0000000..88b4d8c
--- /dev/null
+++ b/shaders/skia/4-23.shader_test
@@ -0,0 +1,131 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.w) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ } else {
+ {
+ if (t < uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = OverrideInputFragmentProcessor_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 blend_modulate(vec4 src, vec4 dst) {
+ return src * dst;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_modulate(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 inColor;
+in vec2 inLocalCoord;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = position;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/4-24.shader_test b/shaders/skia/4-24.shader_test
new file mode 100644
index 0000000..1a6b562
--- /dev/null
+++ b/shaders/skia/4-24.shader_test
@@ -0,0 +1,104 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uColor_Stage0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale8_9_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale10_11_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias8_9_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias10_11_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.w) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c1_c0;
+ }
+ }
+ } else {
+ {
+ if (t < uthresholds9_13_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale8_9_Stage1_c0_c0_c1_c0;
+ bias = ubias8_9_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale10_11_Stage1_c0_c0_c1_c0;
+ bias = ubias10_11_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TiledGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 inLocalCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/4-243.shader_test b/shaders/skia/4-243.shader_test
new file mode 100644
index 0000000..b7dd113
--- /dev/null
+++ b/shaders/skia/4-243.shader_test
@@ -0,0 +1,43 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TextureEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ sk_FragColor = sk_FragColor.wwww;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/4-244.shader_test b/shaders/skia/4-244.shader_test
new file mode 100644
index 0000000..a85661c
--- /dev/null
+++ b/shaders/skia/4-244.shader_test
@@ -0,0 +1,43 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform sampler2D uTextureSampler_0_Stage0;
+flat in vec4 vcolor_Stage0;
+noperspective in vec2 vlocalCoord_Stage0;
+vec4 color_xform_Stage0(vec4 color) {
+ color.xyz *= color.w;
+ return color;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ vec2 texCoord;
+ texCoord = vlocalCoord_Stage0;
+ outputColor_Stage0 = color_xform_Stage0(texture(uTextureSampler_0_Stage0, texCoord)) * outputColor_Stage0;
+ }
+ {
+ sk_FragColor = outputColor_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+flat out vec4 vcolor_Stage0;
+noperspective out vec2 vlocalCoord_Stage0;
+void main() {
+ vcolor_Stage0 = color;
+ vlocalCoord_Stage0 = localCoord;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/4-250.shader_test b/shaders/skia/4-250.shader_test
new file mode 100644
index 0000000..275ffdd
--- /dev/null
+++ b/shaders/skia/4-250.shader_test
@@ -0,0 +1,87 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform mat3 ucolorSpaceMatrix_Stage1_c0_c0;
+uniform vec3 ucolorSpaceTranslate_Stage1_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+uniform sampler2D uTextureSampler_2_Stage1;
+uniform sampler2D uTextureSampler_3_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+noperspective in vec2 vTransformedCoords_3_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_1_Stage1, vTransformedCoords_1_Stage0) * _input;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c0_c0_c2_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_2_Stage1, vTransformedCoords_2_Stage0) * _input;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c0_c0_c3_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_3_Stage1, vTransformedCoords_3_Stage0) * _input;
+ return _output;
+}
+vec4 YUVtoRGBEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 planes[4];
+ planes[0] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0));
+ planes[1] = TextureEffect_Stage1_c0_c0_c1_c0(vec4(1.0));
+ planes[2] = TextureEffect_Stage1_c0_c0_c2_c0(vec4(1.0));
+ planes[3] = TextureEffect_Stage1_c0_c0_c3_c0(vec4(1.0));
+ vec4 color = vec4(planes[0].x, planes[1].x, planes[2].x, planes[3].x);
+ color.xyz = clamp(color.xyz * ucolorSpaceMatrix_Stage1_c0_c0 + ucolorSpaceTranslate_Stage1_c0_c0, 0.0, 1.0);
+ color.xyz *= color.w;
+ _output = color;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = YUVtoRGBEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+uniform mat3 uCoordTransformMatrix_3_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+noperspective out vec2 vTransformedCoords_3_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_3_Stage0 = (uCoordTransformMatrix_3_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/4-26.shader_test b/shaders/skia/4-26.shader_test
new file mode 100644
index 0000000..a1dff05
--- /dev/null
+++ b/shaders/skia/4-26.shader_test
@@ -0,0 +1,33 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+noperspective in vec4 vcolor_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ {
+ sk_FragColor = outputColor_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 inPosition;
+in vec4 inColor;
+noperspective out vec4 vcolor_Stage0;
+void main() {
+ vec4 color = inColor;
+ vcolor_Stage0 = color;
+ vec2 pos2 = inPosition;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/4-267.shader_test b/shaders/skia/4-267.shader_test
new file mode 100644
index 0000000..520d48e
--- /dev/null
+++ b/shaders/skia/4-267.shader_test
@@ -0,0 +1,52 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform vec4 uKernel_Stage1[2];
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0 - 2.0 * uImageIncrement_Stage1;
+ vec2 coordSampled = vec2(0.0, 0.0);
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].x;
+ coord += uImageIncrement_Stage1;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/4-286.shader_test b/shaders/skia/4-286.shader_test
new file mode 100644
index 0000000..efc2bea
--- /dev/null
+++ b/shaders/skia/4-286.shader_test
@@ -0,0 +1,101 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale8_9_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias8_9_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.w) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c1_c0;
+ }
+ }
+ } else {
+ {
+ {
+ scale = uscale8_9_Stage1_c0_c0_c1_c0;
+ bias = ubias8_9_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/4-294.shader_test b/shaders/skia/4-294.shader_test
new file mode 100644
index 0000000..e51c070
--- /dev/null
+++ b/shaders/skia/4-294.shader_test
@@ -0,0 +1,95 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uscale01_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias01_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale23_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias23_Stage1_c0_c0_c1_c0;
+uniform float uthreshold_Stage1_c0_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage0;
+noperspective in vec2 vTextureCoords_Stage0;
+flat in int vTexIndex_Stage0;
+noperspective in vec4 vinColor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 DualIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthreshold_Stage1_c0_c0_c1_c0) {
+ scale = uscale01_Stage1_c0_c0_c1_c0;
+ bias = ubias01_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale23_Stage1_c0_c0_c1_c0;
+ bias = ubias23_Stage1_c0_c0_c1_c0;
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = DualIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ vec4 texColor;
+ {
+ texColor = texture(uTextureSampler_0_Stage0, vTextureCoords_Stage0);
+ }
+ outputCoverage_Stage0 = texColor;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TiledGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1 * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform vec2 uAtlasSizeInv_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in uvec2 inTextureCoords;
+noperspective out vec2 vTextureCoords_Stage0;
+flat out int vTexIndex_Stage0;
+noperspective out vec4 vinColor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ ivec2 signedCoords = ivec2(int(inTextureCoords.x), int(inTextureCoords.y));
+ vec2 unormTexCoords = vec2(float(signedCoords.x / 2), float(signedCoords.y / 2));
+ vTextureCoords_Stage0 = unormTexCoords * uAtlasSizeInv_Stage0;
+ vTexIndex_Stage0 = 0;
+ vinColor_Stage0 = inColor;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(inPosition.x, inPosition.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/4-297.shader_test b/shaders/skia/4-297.shader_test
new file mode 100644
index 0000000..c17a238
--- /dev/null
+++ b/shaders/skia/4-297.shader_test
@@ -0,0 +1,63 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 TextureGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coord = vec2(_input.x, 0.5);
+ _output = texture(uTextureSampler_0_Stage1, coord);
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = TextureGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/4-298.shader_test b/shaders/skia/4-298.shader_test
new file mode 100644
index 0000000..14a9b22
--- /dev/null
+++ b/shaders/skia/4-298.shader_test
@@ -0,0 +1,79 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 TextureGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coord = vec2(_input.x, 0.5);
+ _output = texture(uTextureSampler_0_Stage1, coord);
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = TextureGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_1_Stage0.x);
+ uint y = uint(vTransformedCoords_1_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ output_Stage2 = vec4(clamp(output_Stage2.xyz + value * 0.0039215688593685627, 0.0, output_Stage2.w), output_Stage2.w);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/4-299.shader_test b/shaders/skia/4-299.shader_test
new file mode 100644
index 0000000..889da00
--- /dev/null
+++ b/shaders/skia/4-299.shader_test
@@ -0,0 +1,83 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_0_Stage0;
+ float t = -1.0;
+ {
+ {
+ float invR1 = ufocalParams_Stage1_c0_c0_c0_c0.x;
+ float fx = ufocalParams_Stage1_c0_c0_c0_c0.y;
+ float x_t = -1.0;
+ {
+ x_t = length(p) - p.x * invR1;
+ }
+ {
+ {
+ t = x_t + fx;
+ }
+ }
+ }
+ }
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/4-3.shader_test b/shaders/skia/4-3.shader_test
new file mode 100644
index 0000000..45876ca
--- /dev/null
+++ b/shaders/skia/4-3.shader_test
@@ -0,0 +1,42 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform sampler2DRect uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TextureEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/4-30.shader_test b/shaders/skia/4-30.shader_test
new file mode 100644
index 0000000..19997e1
--- /dev/null
+++ b/shaders/skia/4-30.shader_test
@@ -0,0 +1,40 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = floor(output_Stage1 * 255.0 + 0.5) / 255.0;
+ {
+ output_Stage2.xyz = output_Stage2.w <= 0.0 ? vec3(0.0) : floor((output_Stage2.xyz / output_Stage2.w) * 255.0 + 0.5) / 255.0;
+ }
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/4-300.shader_test b/shaders/skia/4-300.shader_test
new file mode 100644
index 0000000..91a98cd
--- /dev/null
+++ b/shaders/skia/4-300.shader_test
@@ -0,0 +1,99 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_0_Stage0;
+ float t = -1.0;
+ {
+ {
+ float invR1 = ufocalParams_Stage1_c0_c0_c0_c0.x;
+ float fx = ufocalParams_Stage1_c0_c0_c0_c0.y;
+ float x_t = -1.0;
+ {
+ x_t = length(p) - p.x * invR1;
+ }
+ {
+ {
+ t = x_t + fx;
+ }
+ }
+ }
+ }
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_1_Stage0.x);
+ uint y = uint(vTransformedCoords_1_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ output_Stage2 = vec4(clamp(output_Stage2.xyz + value * 0.0039215688593685627, 0.0, output_Stage2.w), output_Stage2.w);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/4-302.shader_test b/shaders/skia/4-302.shader_test
new file mode 100644
index 0000000..28a06e5
--- /dev/null
+++ b/shaders/skia/4-302.shader_test
@@ -0,0 +1,87 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_0_Stage0;
+ float t = -1.0;
+ float v = 1.0;
+ {
+ {
+ float x_t = -1.0;
+ {
+ x_t = dot(p, p) / p.x;
+ }
+ {
+ if (x_t <= 0.0) {
+ v = -1.0;
+ }
+ }
+ {
+ {
+ t = x_t;
+ }
+ }
+ }
+ }
+ _output = vec4(t, v, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/4-304.shader_test b/shaders/skia/4-304.shader_test
new file mode 100644
index 0000000..a352d2d
--- /dev/null
+++ b/shaders/skia/4-304.shader_test
@@ -0,0 +1,83 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_0_Stage0;
+ float t = -1.0;
+ {
+ {
+ float invR1 = ufocalParams_Stage1_c0_c0_c0_c0.x;
+ float fx = ufocalParams_Stage1_c0_c0_c0_c0.y;
+ float x_t = -1.0;
+ {
+ x_t = length(p) - p.x * invR1;
+ }
+ {
+ {
+ t = -x_t + fx;
+ }
+ }
+ }
+ }
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/4-305.shader_test b/shaders/skia/4-305.shader_test
new file mode 100644
index 0000000..06d0f76
--- /dev/null
+++ b/shaders/skia/4-305.shader_test
@@ -0,0 +1,102 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_0_Stage0;
+ float t = -1.0;
+ float v = 1.0;
+ {
+ {
+ float x_t = -1.0;
+ {
+ x_t = dot(p, p) / p.x;
+ }
+ {
+ if (x_t <= 0.0) {
+ v = -1.0;
+ }
+ }
+ {
+ {
+ t = x_t;
+ }
+ }
+ }
+ }
+ _output = vec4(t, v, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TiledGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_1_Stage0.x);
+ uint y = uint(vTransformedCoords_1_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ output_Stage2 = vec4(clamp(output_Stage2.xyz + value * 0.0039215688593685627, 0.0, output_Stage2.w), output_Stage2.w);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/4-306.shader_test b/shaders/skia/4-306.shader_test
new file mode 100644
index 0000000..5ee111a
--- /dev/null
+++ b/shaders/skia/4-306.shader_test
@@ -0,0 +1,109 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_0_Stage0;
+ float t = -1.0;
+ float v = 1.0;
+ {
+ {
+ float invR1 = ufocalParams_Stage1_c0_c0_c0_c0.x;
+ float fx = ufocalParams_Stage1_c0_c0_c0_c0.y;
+ float x_t = -1.0;
+ {
+ float temp = p.x * p.x - p.y * p.y;
+ if (temp >= 0.0) {
+ {
+ x_t = -sqrt(temp) - p.x * invR1;
+ }
+ }
+ }
+ {
+ if (x_t <= 0.0) {
+ v = -1.0;
+ }
+ }
+ {
+ {
+ t = -x_t + fx;
+ }
+ }
+ }
+ }
+ _output = vec4(t, v, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TiledGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_1_Stage0.x);
+ uint y = uint(vTransformedCoords_1_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ output_Stage2 = vec4(clamp(output_Stage2.xyz + value * 0.0039215688593685627, 0.0, output_Stage2.w), output_Stage2.w);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/4-307.shader_test b/shaders/skia/4-307.shader_test
new file mode 100644
index 0000000..f0e5d28
--- /dev/null
+++ b/shaders/skia/4-307.shader_test
@@ -0,0 +1,98 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_0_Stage0;
+ float t = -1.0;
+ {
+ {
+ float invR1 = ufocalParams_Stage1_c0_c0_c0_c0.x;
+ float fx = ufocalParams_Stage1_c0_c0_c0_c0.y;
+ float x_t = -1.0;
+ {
+ x_t = length(p) - p.x * invR1;
+ }
+ {
+ {
+ t = -x_t + fx;
+ }
+ }
+ }
+ }
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TiledGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_1_Stage0.x);
+ uint y = uint(vTransformedCoords_1_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ output_Stage2 = vec4(clamp(output_Stage2.xyz + value * 0.0039215688593685627, 0.0, output_Stage2.w), output_Stage2.w);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/4-308.shader_test b/shaders/skia/4-308.shader_test
new file mode 100644
index 0000000..3dbe775
--- /dev/null
+++ b/shaders/skia/4-308.shader_test
@@ -0,0 +1,100 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_0_Stage0;
+ float t = -1.0;
+ float v = 1.0;
+ {
+ {
+ float x_t = -1.0;
+ {
+ x_t = dot(p, p) / p.x;
+ }
+ {
+ if (x_t <= 0.0) {
+ v = -1.0;
+ }
+ }
+ {
+ {
+ t = x_t;
+ }
+ }
+ }
+ }
+ _output = vec4(t, v, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else {
+ {
+ t.x = fract(t.x);
+ }
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TiledGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_1_Stage0.x);
+ uint y = uint(vTransformedCoords_1_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ output_Stage2 = vec4(clamp(output_Stage2.xyz + value * 0.0039215688593685627, 0.0, output_Stage2.w), output_Stage2.w);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/4-309.shader_test b/shaders/skia/4-309.shader_test
new file mode 100644
index 0000000..e723875
--- /dev/null
+++ b/shaders/skia/4-309.shader_test
@@ -0,0 +1,107 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_0_Stage0;
+ float t = -1.0;
+ float v = 1.0;
+ {
+ {
+ float invR1 = ufocalParams_Stage1_c0_c0_c0_c0.x;
+ float fx = ufocalParams_Stage1_c0_c0_c0_c0.y;
+ float x_t = -1.0;
+ {
+ float temp = p.x * p.x - p.y * p.y;
+ if (temp >= 0.0) {
+ {
+ x_t = -sqrt(temp) - p.x * invR1;
+ }
+ }
+ }
+ {
+ if (x_t <= 0.0) {
+ v = -1.0;
+ }
+ }
+ {
+ {
+ t = -x_t + fx;
+ }
+ }
+ }
+ }
+ _output = vec4(t, v, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else {
+ {
+ t.x = fract(t.x);
+ }
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TiledGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_1_Stage0.x);
+ uint y = uint(vTransformedCoords_1_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ output_Stage2 = vec4(clamp(output_Stage2.xyz + value * 0.0039215688593685627, 0.0, output_Stage2.w), output_Stage2.w);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/4-310.shader_test b/shaders/skia/4-310.shader_test
new file mode 100644
index 0000000..c96ebb7
--- /dev/null
+++ b/shaders/skia/4-310.shader_test
@@ -0,0 +1,96 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_0_Stage0;
+ float t = -1.0;
+ {
+ {
+ float invR1 = ufocalParams_Stage1_c0_c0_c0_c0.x;
+ float fx = ufocalParams_Stage1_c0_c0_c0_c0.y;
+ float x_t = -1.0;
+ {
+ x_t = length(p) - p.x * invR1;
+ }
+ {
+ {
+ t = -x_t + fx;
+ }
+ }
+ }
+ }
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else {
+ {
+ t.x = fract(t.x);
+ }
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TiledGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_1_Stage0.x);
+ uint y = uint(vTransformedCoords_1_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ output_Stage2 = vec4(clamp(output_Stage2.xyz + value * 0.0039215688593685627, 0.0, output_Stage2.w), output_Stage2.w);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/4-311.shader_test b/shaders/skia/4-311.shader_test
new file mode 100644
index 0000000..5062ffb
--- /dev/null
+++ b/shaders/skia/4-311.shader_test
@@ -0,0 +1,103 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_0_Stage0;
+ float t = -1.0;
+ float v = 1.0;
+ {
+ {
+ float x_t = -1.0;
+ {
+ x_t = dot(p, p) / p.x;
+ }
+ {
+ if (x_t <= 0.0) {
+ v = -1.0;
+ }
+ }
+ {
+ {
+ t = x_t;
+ }
+ }
+ }
+ }
+ _output = vec4(t, v, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_1_Stage0.x);
+ uint y = uint(vTransformedCoords_1_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ output_Stage2 = vec4(clamp(output_Stage2.xyz + value * 0.0039215688593685627, 0.0, output_Stage2.w), output_Stage2.w);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/4-313.shader_test b/shaders/skia/4-313.shader_test
new file mode 100644
index 0000000..3900b0c
--- /dev/null
+++ b/shaders/skia/4-313.shader_test
@@ -0,0 +1,99 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_0_Stage0;
+ float t = -1.0;
+ {
+ {
+ float invR1 = ufocalParams_Stage1_c0_c0_c0_c0.x;
+ float fx = ufocalParams_Stage1_c0_c0_c0_c0.y;
+ float x_t = -1.0;
+ {
+ x_t = length(p) - p.x * invR1;
+ }
+ {
+ {
+ t = -x_t + fx;
+ }
+ }
+ }
+ }
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_1_Stage0.x);
+ uint y = uint(vTransformedCoords_1_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ output_Stage2 = vec4(clamp(output_Stage2.xyz + value * 0.0039215688593685627, 0.0, output_Stage2.w), output_Stage2.w);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/4-315.shader_test b/shaders/skia/4-315.shader_test
new file mode 100644
index 0000000..18b6ac4
--- /dev/null
+++ b/shaders/skia/4-315.shader_test
@@ -0,0 +1,90 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform float ubias_Stage1_c0_c0_c0_c0;
+uniform float uscale_Stage1_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 SweepGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float angle;
+ {
+ angle = atan(-vTransformedCoords_0_Stage0.y, -vTransformedCoords_0_Stage0.x);
+ }
+ float t = ((angle * 0.15915493667125702 + 0.5) + ubias_Stage1_c0_c0_c0_c0) * uscale_Stage1_c0_c0_c0_c0;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = SweepGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ t.x = fract(t.x);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TiledGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/4-316.shader_test b/shaders/skia/4-316.shader_test
new file mode 100644
index 0000000..dd596f2
--- /dev/null
+++ b/shaders/skia/4-316.shader_test
@@ -0,0 +1,90 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/4-320.shader_test b/shaders/skia/4-320.shader_test
new file mode 100644
index 0000000..ec0ed3e
--- /dev/null
+++ b/shaders/skia/4-320.shader_test
@@ -0,0 +1,117 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale8_9_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias8_9_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.w) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c1_c0;
+ }
+ }
+ } else {
+ {
+ {
+ scale = uscale8_9_Stage1_c0_c0_c1_c0;
+ bias = ubias8_9_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_1_Stage0.x);
+ uint y = uint(vTransformedCoords_1_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ output_Stage2 = vec4(clamp(output_Stage2.xyz + value * 0.0039215688593685627, 0.0, output_Stage2.w), output_Stage2.w);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/4-321.shader_test b/shaders/skia/4-321.shader_test
new file mode 100644
index 0000000..a184b47
--- /dev/null
+++ b/shaders/skia/4-321.shader_test
@@ -0,0 +1,102 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+flat in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec4 varccoord_Stage0;
+vec4 RadialGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = length(vTransformedCoords_0_Stage0);
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = RadialGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ outputCoverage_Stage0 = vec4(1.0);
+ if (vec2(0.0) != varccoord_Stage0.xy) {
+ float fn = dot(varccoord_Stage0.xy, varccoord_Stage0.xy) - 1.0;
+ if (fn > 0.0) {
+ outputCoverage_Stage0 = vec4(0.0);
+ }
+ }
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1 * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec4 radii_selector;
+in vec4 corner_and_radius_outsets;
+in vec4 skew;
+in vec2 translate;
+in vec4 radii_x;
+in vec4 radii_y;
+in vec4 color;
+in vec4 local_rect;
+flat out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec4 varccoord_Stage0;
+void main() {
+ vcolor_Stage0 = color;
+ vec2 corner = corner_and_radius_outsets.xy;
+ vec2 radius_outset = corner_and_radius_outsets.zw;
+ vec2 radii;
+ radii.x = dot(radii_selector, radii_x);
+ radii.y = dot(radii_selector, radii_y);
+ bool is_arc_section = radii.x > 0.0;
+ radii = abs(radii);
+ vec2 vertexpos = corner + radius_outset * radii;
+ vec2 localcoord = (local_rect.xy * (1.0 - vertexpos) + local_rect.zw * (1.0 + vertexpos)) * 0.5;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localcoord, 1.0)).xy;
+ mat2 skewmatrix = mat2(skew.xy, skew.zw);
+ vec2 devcoord = vertexpos * skewmatrix + translate;
+ if (is_arc_section) {
+ varccoord_Stage0.xy = 1.0 - abs(radius_outset);
+ mat2 derivatives = inverse(skewmatrix);
+ varccoord_Stage0.zw = derivatives * (((varccoord_Stage0.xy / radii) * corner) * 2.0);
+ } else {
+ varccoord_Stage0 = vec4(0.0);
+ }
+ gl_Position = vec4(devcoord.x, devcoord.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/4-322.shader_test b/shaders/skia/4-322.shader_test
new file mode 100644
index 0000000..1ea1df9
--- /dev/null
+++ b/shaders/skia/4-322.shader_test
@@ -0,0 +1,118 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+flat in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec4 varccoord_Stage0;
+vec4 RadialGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = length(vTransformedCoords_0_Stage0);
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = RadialGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ outputCoverage_Stage0 = vec4(1.0);
+ if (vec2(0.0) != varccoord_Stage0.xy) {
+ float fn = dot(varccoord_Stage0.xy, varccoord_Stage0.xy) - 1.0;
+ if (fn > 0.0) {
+ outputCoverage_Stage0 = vec4(0.0);
+ }
+ }
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_1_Stage0.x);
+ uint y = uint(vTransformedCoords_1_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ output_Stage2 = vec4(clamp(output_Stage2.xyz + value * 0.0039215688593685627, 0.0, output_Stage2.w), output_Stage2.w);
+ }
+ {
+ sk_FragColor = output_Stage2 * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec4 radii_selector;
+in vec4 corner_and_radius_outsets;
+in vec4 skew;
+in vec2 translate;
+in vec4 radii_x;
+in vec4 radii_y;
+in vec4 color;
+in vec4 local_rect;
+flat out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec4 varccoord_Stage0;
+void main() {
+ vcolor_Stage0 = color;
+ vec2 corner = corner_and_radius_outsets.xy;
+ vec2 radius_outset = corner_and_radius_outsets.zw;
+ vec2 radii;
+ radii.x = dot(radii_selector, radii_x);
+ radii.y = dot(radii_selector, radii_y);
+ bool is_arc_section = radii.x > 0.0;
+ radii = abs(radii);
+ vec2 vertexpos = corner + radius_outset * radii;
+ vec2 localcoord = (local_rect.xy * (1.0 - vertexpos) + local_rect.zw * (1.0 + vertexpos)) * 0.5;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localcoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localcoord, 1.0)).xy;
+ mat2 skewmatrix = mat2(skew.xy, skew.zw);
+ vec2 devcoord = vertexpos * skewmatrix + translate;
+ if (is_arc_section) {
+ varccoord_Stage0.xy = 1.0 - abs(radius_outset);
+ mat2 derivatives = inverse(skewmatrix);
+ varccoord_Stage0.zw = derivatives * (((varccoord_Stage0.xy / radii) * corner) * 2.0);
+ } else {
+ varccoord_Stage0 = vec4(0.0);
+ }
+ gl_Position = vec4(devcoord.x, devcoord.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/4-323.shader_test b/shaders/skia/4-323.shader_test
new file mode 100644
index 0000000..ae0cad1
--- /dev/null
+++ b/shaders/skia/4-323.shader_test
@@ -0,0 +1,86 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+in float vcoverage_Stage0;
+flat in vec4 vgeomDomain_Stage0;
+vec4 RadialGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = length(vTransformedCoords_0_Stage0);
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = RadialGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ float coverage = vcoverage_Stage0 * gl_FragCoord.w;
+ vec4 geoDomain;
+ geoDomain = vgeomDomain_Stage0;
+ if (coverage < 0.5) {
+ vec4 dists4 = clamp(vec4(1.0, 1.0, -1.0, -1.0) * (gl_FragCoord.xyxy - geoDomain), 0.0, 1.0);
+ vec2 dists2 = dists4.xy * dists4.zw;
+ coverage = min(coverage, dists2.x * dists2.y);
+ }
+ outputCoverage_Stage0 = vec4(coverage);
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1 * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec4 positionWithCoverage;
+in vec4 color;
+in vec2 localCoord;
+in vec4 geomDomain;
+out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+out float vcoverage_Stage0;
+flat out vec4 vgeomDomain_Stage0;
+void main() {
+ vec3 position = positionWithCoverage.xyz;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ vcoverage_Stage0 = positionWithCoverage.w * positionWithCoverage.z;
+ vgeomDomain_Stage0 = geomDomain;
+ gl_Position = vec4(position.x, position.y, 0.0, position.z);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/4-324.shader_test b/shaders/skia/4-324.shader_test
new file mode 100644
index 0000000..e5d8b37
--- /dev/null
+++ b/shaders/skia/4-324.shader_test
@@ -0,0 +1,102 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+in vec2 vTransformedCoords_0_Stage0;
+in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+in float vcoverage_Stage0;
+flat in vec4 vgeomDomain_Stage0;
+vec4 RadialGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = length(vTransformedCoords_0_Stage0);
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = RadialGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ float coverage = vcoverage_Stage0 * gl_FragCoord.w;
+ vec4 geoDomain;
+ geoDomain = vgeomDomain_Stage0;
+ if (coverage < 0.5) {
+ vec4 dists4 = clamp(vec4(1.0, 1.0, -1.0, -1.0) * (gl_FragCoord.xyxy - geoDomain), 0.0, 1.0);
+ vec2 dists2 = dists4.xy * dists4.zw;
+ coverage = min(coverage, dists2.x * dists2.y);
+ }
+ outputCoverage_Stage0 = vec4(coverage);
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_1_Stage0.x);
+ uint y = uint(vTransformedCoords_1_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ output_Stage2 = vec4(clamp(output_Stage2.xyz + value * 0.0039215688593685627, 0.0, output_Stage2.w), output_Stage2.w);
+ }
+ {
+ sk_FragColor = output_Stage2 * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec4 positionWithCoverage;
+in vec4 color;
+in vec2 localCoord;
+in vec4 geomDomain;
+out vec2 vTransformedCoords_0_Stage0;
+out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+out float vcoverage_Stage0;
+flat out vec4 vgeomDomain_Stage0;
+void main() {
+ vec3 position = positionWithCoverage.xyz;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ vcoverage_Stage0 = positionWithCoverage.w * positionWithCoverage.z;
+ vgeomDomain_Stage0 = geomDomain;
+ gl_Position = vec4(position.x, position.y, 0.0, position.z);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/4-325.shader_test b/shaders/skia/4-325.shader_test
new file mode 100644
index 0000000..e92eb72
--- /dev/null
+++ b/shaders/skia/4-325.shader_test
@@ -0,0 +1,65 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+noperspective in vec3 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 RadialGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 vTransformedCoords_0_Stage0_ensure2D = vTransformedCoords_0_Stage0.xy / vTransformedCoords_0_Stage0.z;
+ float t = length(vTransformedCoords_0_Stage0_ensure2D);
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = RadialGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec3 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0);
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/4-326.shader_test b/shaders/skia/4-326.shader_test
new file mode 100644
index 0000000..5e07aa7
--- /dev/null
+++ b/shaders/skia/4-326.shader_test
@@ -0,0 +1,81 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+noperspective in vec3 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 RadialGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 vTransformedCoords_0_Stage0_ensure2D = vTransformedCoords_0_Stage0.xy / vTransformedCoords_0_Stage0.z;
+ float t = length(vTransformedCoords_0_Stage0_ensure2D);
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = RadialGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_1_Stage0.x);
+ uint y = uint(vTransformedCoords_1_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ output_Stage2 = vec4(clamp(output_Stage2.xyz + value * 0.0039215688593685627, 0.0, output_Stage2.w), output_Stage2.w);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec3 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0);
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/4-332.shader_test b/shaders/skia/4-332.shader_test
new file mode 100644
index 0000000..2f70a1d
--- /dev/null
+++ b/shaders/skia/4-332.shader_test
@@ -0,0 +1,63 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 RadialGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = length(vTransformedCoords_0_Stage0);
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 TextureGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coord = vec2(_input.x, 0.5);
+ _output = texture(uTextureSampler_0_Stage1, coord);
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = RadialGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = TextureGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/4-340.shader_test b/shaders/skia/4-340.shader_test
new file mode 100644
index 0000000..6cda00d
--- /dev/null
+++ b/shaders/skia/4-340.shader_test
@@ -0,0 +1,104 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+uniform vec2 uDstTextureUpperLeft_Stage2;
+uniform vec2 uDstTextureCoordScale_Stage2;
+uniform sampler2D uTextureSampler_0_Stage0;
+uniform sampler2D uDstTextureSampler_Stage2;
+noperspective in vec2 vTextureCoords_Stage0;
+flat in int vTexIndex_Stage0;
+noperspective in vec4 vinColor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ vec4 texColor;
+ {
+ texColor = texture(uTextureSampler_0_Stage0, vTextureCoords_Stage0);
+ }
+ outputCoverage_Stage0 = texColor;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ if (all(lessThanEqual(outputCoverage_Stage0.xyz, vec3(0.0)))) {
+ discard;
+ }
+ vec2 _dstTexCoord = (gl_FragCoord.xy - uDstTextureUpperLeft_Stage2) * uDstTextureCoordScale_Stage2;
+ _dstTexCoord.y = 1.0 - _dstTexCoord.y;
+ vec4 _dstColor = texture(uDstTextureSampler_Stage2, _dstTexCoord);
+ sk_FragColor = blend_src_over(output_Stage1, _dstColor);
+ float lerpRed = mix(_dstColor.w, sk_FragColor.w, outputCoverage_Stage0.x);
+ float lerpBlue = mix(_dstColor.w, sk_FragColor.w, outputCoverage_Stage0.y);
+ float lerpGreen = mix(_dstColor.w, sk_FragColor.w, outputCoverage_Stage0.z);
+ sk_FragColor = outputCoverage_Stage0 * sk_FragColor + (vec4(1.0) - outputCoverage_Stage0) * _dstColor;
+ sk_FragColor.w = max(max(lerpRed, lerpBlue), lerpGreen);
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform vec2 uAtlasSizeInv_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in uvec2 inTextureCoords;
+noperspective out vec2 vTextureCoords_Stage0;
+flat out int vTexIndex_Stage0;
+noperspective out vec4 vinColor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ ivec2 signedCoords = ivec2(int(inTextureCoords.x), int(inTextureCoords.y));
+ vec2 unormTexCoords = vec2(float(signedCoords.x / 2), float(signedCoords.y / 2));
+ vTextureCoords_Stage0 = unormTexCoords * uAtlasSizeInv_Stage0;
+ vTexIndex_Stage0 = 0;
+ vinColor_Stage0 = inColor;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(inPosition.x, inPosition.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/4-348.shader_test b/shaders/skia/4-348.shader_test
new file mode 100644
index 0000000..592b435
--- /dev/null
+++ b/shaders/skia/4-348.shader_test
@@ -0,0 +1,68 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform float uDistanceAdjust_Stage0;
+uniform sampler2D uTextureSampler_0_Stage0;
+uniform sampler2D uTextureSampler_1_Stage0;
+uniform sampler2D uTextureSampler_2_Stage0;
+uniform sampler2D uTextureSampler_3_Stage0;
+noperspective in vec4 vinColor_Stage0;
+noperspective in vec2 vTextureCoords_Stage0;
+flat in int vTexIndex_Stage0;
+noperspective in vec2 vIntTextureCoords_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vinColor_Stage0;
+ vec2 uv = vTextureCoords_Stage0;
+ vec4 texColor;
+ if (vTexIndex_Stage0 == 0) {
+ texColor = texture(uTextureSampler_0_Stage0, uv);
+ } else if (vTexIndex_Stage0 == 1) {
+ texColor = texture(uTextureSampler_1_Stage0, uv);
+ } else if (vTexIndex_Stage0 == 2) {
+ texColor = texture(uTextureSampler_2_Stage0, uv);
+ } else {
+ texColor = texture(uTextureSampler_3_Stage0, uv);
+ }
+ float distance = 7.96875 * (texColor.x - 0.50196081399917603);
+ distance -= uDistanceAdjust_Stage0;
+ float afwidth;
+ afwidth = abs(0.64999997615814209 * -dFdy(vIntTextureCoords_Stage0.y));
+ float val = smoothstep(-afwidth, afwidth, distance);
+ outputCoverage_Stage0 = vec4(val);
+ }
+ {
+ sk_FragColor = outputColor_Stage0 * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform vec2 uAtlasDimensionsInv_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in uvec2 inTextureCoords;
+noperspective out vec4 vinColor_Stage0;
+noperspective out vec2 vTextureCoords_Stage0;
+flat out int vTexIndex_Stage0;
+noperspective out vec2 vIntTextureCoords_Stage0;
+void main() {
+ vinColor_Stage0 = inColor;
+ ivec2 signedCoords = ivec2(int(inTextureCoords.x), int(inTextureCoords.y));
+ vec2 unormTexCoords = vec2(float(signedCoords.x / 2), float(signedCoords.y / 2));
+ int texIdx = 2 * (signedCoords.x & 1) + (signedCoords.y & 1);
+ vTextureCoords_Stage0 = unormTexCoords * uAtlasDimensionsInv_Stage0;
+ vTexIndex_Stage0 = texIdx;
+ vIntTextureCoords_Stage0 = unormTexCoords;
+ gl_Position = vec4(inPosition.x, inPosition.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/4-35.shader_test b/shaders/skia/4-35.shader_test
new file mode 100644
index 0000000..7f139f2
--- /dev/null
+++ b/shaders/skia/4-35.shader_test
@@ -0,0 +1,64 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/4-37.shader_test b/shaders/skia/4-37.shader_test
new file mode 100644
index 0000000..88aaf03
--- /dev/null
+++ b/shaders/skia/4-37.shader_test
@@ -0,0 +1,58 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TextureEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_1_Stage0.x);
+ uint y = uint(vTransformedCoords_1_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ output_Stage2 = vec4(clamp(output_Stage2.xyz + value * 0.0039215688593685627, 0.0, output_Stage2.w), output_Stage2.w);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/4-382.shader_test b/shaders/skia/4-382.shader_test
new file mode 100644
index 0000000..6bf53bb
--- /dev/null
+++ b/shaders/skia/4-382.shader_test
@@ -0,0 +1,61 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uellipse_Stage1;
+uniform vec4 ucircle_Stage2;
+flat in vec4 vcolor_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec2 d = gl_FragCoord.xy - uellipse_Stage1.xy;
+ vec2 Z = d * uellipse_Stage1.zw;
+ float implicit = dot(Z, d) - 1.0;
+ float grad_dot = 4.0 * dot(Z, Z);
+ {
+ grad_dot = max(grad_dot, 1.1754999560161448e-38);
+ }
+ float approx_dist = implicit * inversesqrt(grad_dot);
+ float alpha;
+ {
+ alpha = clamp(0.5 + approx_dist, 0.0, 1.0);
+ }
+ output_Stage1 = vec4(alpha);
+ }
+ vec4 output_Stage2;
+ {
+ float d;
+ {
+ d = (1.0 - length((ucircle_Stage2.xy - gl_FragCoord.xy) * ucircle_Stage2.w)) * ucircle_Stage2.z;
+ }
+ {
+ output_Stage2 = output_Stage1 * clamp(d, 0.0, 1.0);
+ }
+ }
+ {
+ sk_FragColor = outputColor_Stage0 * output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 position;
+in vec4 color;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/4-386.shader_test b/shaders/skia/4-386.shader_test
new file mode 100644
index 0000000..42abf1b
--- /dev/null
+++ b/shaders/skia/4-386.shader_test
@@ -0,0 +1,34 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+noperspective in vec4 vcolor_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ {
+ sk_FragColor = outputColor_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+noperspective out vec4 vcolor_Stage0;
+void main() {
+ vec4 color = inColor;
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/4-395.shader_test b/shaders/skia/4-395.shader_test
new file mode 100644
index 0000000..eebbc67
--- /dev/null
+++ b/shaders/skia/4-395.shader_test
@@ -0,0 +1,69 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 TextureEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = TextureEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = OverrideInputFragmentProcessor_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_src_over(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 inColor;
+in vec2 inLocalCoord;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/4-4.shader_test b/shaders/skia/4-4.shader_test
new file mode 100644
index 0000000..f0fecee
--- /dev/null
+++ b/shaders/skia/4-4.shader_test
@@ -0,0 +1,93 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uclamp_Stage1_c0_c0;
+uniform vec4 uclamp_Stage1_c1_c0;
+uniform vec4 uclamp_Stage1_c2_c0;
+uniform mat3 ucolorSpaceMatrix_Stage1;
+uniform vec3 ucolorSpaceTranslate_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+uniform sampler2D uTextureSampler_2_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+vec4 TextureEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 inCoord = vTransformedCoords_0_Stage0;
+ vec2 subsetCoord;
+ subsetCoord.x = inCoord.x;
+ subsetCoord.y = inCoord.y;
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage1_c0_c0.x, uclamp_Stage1_c0_c0.z);
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage1_c0_c0.y, uclamp_Stage1_c0_c0.w);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ _output = _input * textureColor;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 inCoord = vTransformedCoords_1_Stage0;
+ vec2 subsetCoord;
+ subsetCoord.x = inCoord.x;
+ subsetCoord.y = inCoord.y;
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage1_c1_c0.x, uclamp_Stage1_c1_c0.z);
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage1_c1_c0.y, uclamp_Stage1_c1_c0.w);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ _output = _input * textureColor;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c2_c0(vec4 _input) {
+ vec4 _output;
+ vec2 inCoord = vTransformedCoords_2_Stage0;
+ vec2 subsetCoord;
+ subsetCoord.x = inCoord.x;
+ subsetCoord.y = inCoord.y;
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage1_c2_c0.x, uclamp_Stage1_c2_c0.z);
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage1_c2_c0.y, uclamp_Stage1_c2_c0.w);
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ _output = _input * textureColor;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ vec4 planes[3];
+ planes[0] = TextureEffect_Stage1_c0_c0(vec4(1.0));
+ planes[1] = TextureEffect_Stage1_c1_c0(vec4(1.0));
+ planes[2] = TextureEffect_Stage1_c2_c0(vec4(1.0));
+ vec4 color = vec4(planes[0].x, planes[1].x, planes[2].x, 1.0);
+ color.xyz = clamp(color.xyz * ucolorSpaceMatrix_Stage1 + ucolorSpaceTranslate_Stage1, 0.0, 1.0);
+ output_Stage1 = color;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/4-422.shader_test b/shaders/skia/4-422.shader_test
new file mode 100644
index 0000000..c0f3918
--- /dev/null
+++ b/shaders/skia/4-422.shader_test
@@ -0,0 +1,47 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TextureEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ float luma = clamp(dot(vec3(0.2125999927520752, 0.71520000696182251, 0.072200000286102295), output_Stage1.xyz), 0.0, 1.0);
+ output_Stage2 = vec4(0.0, 0.0, 0.0, luma);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/4-426.shader_test b/shaders/skia/4-426.shader_test
new file mode 100644
index 0000000..8402639
--- /dev/null
+++ b/shaders/skia/4-426.shader_test
@@ -0,0 +1,51 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec3 uedges_Stage1[3];
+flat in vec4 vcolor_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ float alpha = 1.0;
+ float edge;
+ edge = dot(uedges_Stage1[0], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage1[1], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage1[2], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ output_Stage1 = vec4(alpha);
+ }
+ {
+ sk_FragColor = outputColor_Stage0 * output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 inPosition;
+in vec2 inLocalCoords;
+in vec4 color;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vcolor_Stage0 = color;
+ vec2 pos2 = inPosition;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/4-427.shader_test b/shaders/skia/4-427.shader_test
new file mode 100644
index 0000000..883ff9d
--- /dev/null
+++ b/shaders/skia/4-427.shader_test
@@ -0,0 +1,53 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec3 uedges_Stage1[3];
+uniform sampler2D uTextureSampler_0_Stage0;
+noperspective in vec2 vlocalCoord_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vec4(1.0);
+ vec2 texCoord;
+ texCoord = vlocalCoord_Stage0;
+ outputColor_Stage0 = texture(uTextureSampler_0_Stage0, texCoord);
+ }
+ vec4 output_Stage1;
+ {
+ float alpha = 1.0;
+ float edge;
+ edge = dot(uedges_Stage1[0], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage1[1], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage1[2], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ output_Stage1 = vec4(alpha);
+ }
+ {
+ sk_FragColor = outputColor_Stage0 * output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vlocalCoord_Stage0;
+void main() {
+ vlocalCoord_Stage0 = localCoord;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/4-442.shader_test b/shaders/skia/4-442.shader_test
new file mode 100644
index 0000000..b070be6
--- /dev/null
+++ b/shaders/skia/4-442.shader_test
@@ -0,0 +1,102 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c1_c0_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c1_c0_c0_c0;
+uniform vec4 ustart_Stage1_c1_c0_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c1_c0_c0_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+vec4 ComposeOne_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_dst_in(_input, TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0)));
+ return _output;
+}
+vec4 LinearGradientLayout_Stage1_c1_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_1_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c1_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c1_c0_c0_c0_c1_c0 + t * uend_Stage1_c1_c0_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c1_c0_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c1_c0_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c1_c0_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c1_c0_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 ComposeOne_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_dst_in(_input, ClampedGradientEffect_Stage1_c1_c0_c0_c0(vec4(1.0)));
+ return _output;
+}
+vec4 blend_dst_over(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src + dst;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_dst_over(ComposeOne_Stage1_c0_c0(inputColor), ComposeOne_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/4-444.shader_test b/shaders/skia/4-444.shader_test
new file mode 100644
index 0000000..b41a863
--- /dev/null
+++ b/shaders/skia/4-444.shader_test
@@ -0,0 +1,121 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 uleftBorderColor_Stage1_c1_c0_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c1_c0_c0_c0;
+uniform vec4 ustart_Stage1_c1_c0_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c1_c0_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = ClampedGradientEffect_Stage1_c0_c0_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ return _output;
+}
+vec4 LinearGradientLayout_Stage1_c1_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_1_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c1_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c1_c0_c0_c0_c1_c0 + t * uend_Stage1_c1_c0_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c1_c0_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c1_c0_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c1_c0_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c1_c0_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = ClampedGradientEffect_Stage1_c1_c0_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_dst_in(OverrideInputFragmentProcessor_Stage1_c0_c0(inputColor), OverrideInputFragmentProcessor_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/4-447.shader_test b/shaders/skia/4-447.shader_test
new file mode 100644
index 0000000..68e84c7
--- /dev/null
+++ b/shaders/skia/4-447.shader_test
@@ -0,0 +1,52 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec3 uedges_Stage1[4];
+flat in vec4 vcolor_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ float alpha = 1.0;
+ float edge;
+ edge = dot(uedges_Stage1[0], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage1[1], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage1[2], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage1[3], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ output_Stage1 = vec4(alpha);
+ }
+ {
+ sk_FragColor = outputColor_Stage0 * output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 position;
+in vec4 color;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/4-449.shader_test b/shaders/skia/4-449.shader_test
new file mode 100644
index 0000000..66f73b6
--- /dev/null
+++ b/shaders/skia/4-449.shader_test
@@ -0,0 +1,23 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+flat in vec4 vcolor_Stage0;
+void main() {
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 position;
+in vec4 color;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/4-452.shader_test b/shaders/skia/4-452.shader_test
new file mode 100644
index 0000000..721bc3f
--- /dev/null
+++ b/shaders/skia/4-452.shader_test
@@ -0,0 +1,96 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uCoordTransformMatrix_0_Stage0;
+uniform vec4 uinnerRect_Stage2_c1_c0;
+uniform vec2 uradiusPlusHalf_Stage2_c1_c0;
+uniform vec4 uinnerRect_Stage2_c2_c0;
+uniform vec2 uradiusPlusHalf_Stage2_c2_c0;
+uniform vec4 uinnerRect_Stage2_c3_c0;
+uniform vec2 uradiusPlusHalf_Stage2_c3_c0;
+uniform vec4 uinnerRect_Stage2_c4_c0;
+uniform vec2 uradiusPlusHalf_Stage2_c4_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0(vec4 _input, vec2 _coords) {
+ _coords = _coords * uCoordTransformMatrix_0_Stage0.xz + uCoordTransformMatrix_0_Stage0.yw;
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, _coords) * _input;
+ return _output;
+}
+vec4 CircularRRect_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 dxy0 = uinnerRect_Stage2_c1_c0.xy - gl_FragCoord.xy;
+ vec2 dxy1 = gl_FragCoord.xy - uinnerRect_Stage2_c1_c0.zw;
+ vec2 dxy = max(max(dxy0, dxy1), 0.0);
+ float alpha = clamp(uradiusPlusHalf_Stage2_c1_c0.x - length(dxy), 0.0, 1.0);
+ _output = _input * alpha;
+ return _output;
+}
+vec4 CircularRRect_Stage2_c2_c0(vec4 _input) {
+ vec4 _output;
+ vec2 dxy0 = uinnerRect_Stage2_c2_c0.xy - gl_FragCoord.xy;
+ vec2 dxy1 = gl_FragCoord.xy - uinnerRect_Stage2_c2_c0.zw;
+ vec2 dxy = max(max(dxy0, dxy1), 0.0);
+ float alpha = clamp(uradiusPlusHalf_Stage2_c2_c0.x - length(dxy), 0.0, 1.0);
+ alpha = 1.0 - alpha;
+ _output = _input * alpha;
+ return _output;
+}
+vec4 CircularRRect_Stage2_c3_c0(vec4 _input) {
+ vec4 _output;
+ vec2 dxy0 = uinnerRect_Stage2_c3_c0.xy - gl_FragCoord.xy;
+ vec2 dxy1 = gl_FragCoord.xy - uinnerRect_Stage2_c3_c0.zw;
+ vec2 dxy = max(max(dxy0, dxy1), 0.0);
+ float alpha = clamp(uradiusPlusHalf_Stage2_c3_c0.x - length(dxy), 0.0, 1.0);
+ alpha = 1.0 - alpha;
+ _output = _input * alpha;
+ return _output;
+}
+vec4 CircularRRect_Stage2_c4_c0(vec4 _input) {
+ vec4 _output;
+ vec2 dxy0 = uinnerRect_Stage2_c4_c0.xy - gl_FragCoord.xy;
+ vec2 dxy1 = gl_FragCoord.xy - uinnerRect_Stage2_c4_c0.zw;
+ vec2 dxy = max(max(dxy0, dxy1), 0.0);
+ float alpha = clamp(uradiusPlusHalf_Stage2_c4_c0.x - length(dxy), 0.0, 1.0);
+ alpha = 1.0 - alpha;
+ _output = _input * alpha;
+ return _output;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TextureEffect_Stage1_c0_c0(vec4(1.0), gl_FragCoord.xy);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = CircularRRect_Stage2_c4_c0(CircularRRect_Stage2_c3_c0(CircularRRect_Stage2_c2_c0(CircularRRect_Stage2_c1_c0(output_Stage1))));
+ }
+ {
+ sk_FragColor = outputColor_Stage0 * output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 position;
+in vec4 color;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/4-453.shader_test b/shaders/skia/4-453.shader_test
new file mode 100644
index 0000000..22191fc
--- /dev/null
+++ b/shaders/skia/4-453.shader_test
@@ -0,0 +1,121 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uCoordTransformMatrix_0_Stage0;
+uniform vec4 urectUniform_Stage2_c1_c0;
+uniform vec4 urectUniform_Stage2_c2_c0;
+uniform vec4 urectUniform_Stage2_c3_c0;
+uniform vec4 urectUniform_Stage2_c4_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0(vec4 _input, vec2 _coords) {
+ _coords = _coords * uCoordTransformMatrix_0_Stage0.xz + uCoordTransformMatrix_0_Stage0.yw;
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, _coords) * _input;
+ return _output;
+}
+vec4 AARectEffect_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ float alpha;
+ {
+ float xSub, ySub;
+ xSub = min(gl_FragCoord.x - urectUniform_Stage2_c1_c0.x, 0.0);
+ xSub += min(urectUniform_Stage2_c1_c0.z - gl_FragCoord.x, 0.0);
+ ySub = min(gl_FragCoord.y - urectUniform_Stage2_c1_c0.y, 0.0);
+ ySub += min(urectUniform_Stage2_c1_c0.w - gl_FragCoord.y, 0.0);
+ alpha = (1.0 + max(xSub, -1.0)) * (1.0 + max(ySub, -1.0));
+ }
+ {
+ alpha = 1.0 - alpha;
+ }
+ _output = _input * alpha;
+ return _output;
+}
+vec4 AARectEffect_Stage2_c2_c0(vec4 _input) {
+ vec4 _output;
+ float alpha;
+ {
+ float xSub, ySub;
+ xSub = min(gl_FragCoord.x - urectUniform_Stage2_c2_c0.x, 0.0);
+ xSub += min(urectUniform_Stage2_c2_c0.z - gl_FragCoord.x, 0.0);
+ ySub = min(gl_FragCoord.y - urectUniform_Stage2_c2_c0.y, 0.0);
+ ySub += min(urectUniform_Stage2_c2_c0.w - gl_FragCoord.y, 0.0);
+ alpha = (1.0 + max(xSub, -1.0)) * (1.0 + max(ySub, -1.0));
+ }
+ {
+ alpha = 1.0 - alpha;
+ }
+ _output = _input * alpha;
+ return _output;
+}
+vec4 AARectEffect_Stage2_c3_c0(vec4 _input) {
+ vec4 _output;
+ float alpha;
+ {
+ float xSub, ySub;
+ xSub = min(gl_FragCoord.x - urectUniform_Stage2_c3_c0.x, 0.0);
+ xSub += min(urectUniform_Stage2_c3_c0.z - gl_FragCoord.x, 0.0);
+ ySub = min(gl_FragCoord.y - urectUniform_Stage2_c3_c0.y, 0.0);
+ ySub += min(urectUniform_Stage2_c3_c0.w - gl_FragCoord.y, 0.0);
+ alpha = (1.0 + max(xSub, -1.0)) * (1.0 + max(ySub, -1.0));
+ }
+ {
+ alpha = 1.0 - alpha;
+ }
+ _output = _input * alpha;
+ return _output;
+}
+vec4 AARectEffect_Stage2_c4_c0(vec4 _input) {
+ vec4 _output;
+ float alpha;
+ {
+ float xSub, ySub;
+ xSub = min(gl_FragCoord.x - urectUniform_Stage2_c4_c0.x, 0.0);
+ xSub += min(urectUniform_Stage2_c4_c0.z - gl_FragCoord.x, 0.0);
+ ySub = min(gl_FragCoord.y - urectUniform_Stage2_c4_c0.y, 0.0);
+ ySub += min(urectUniform_Stage2_c4_c0.w - gl_FragCoord.y, 0.0);
+ alpha = (1.0 + max(xSub, -1.0)) * (1.0 + max(ySub, -1.0));
+ }
+ {
+ alpha = 1.0 - alpha;
+ }
+ _output = _input * alpha;
+ return _output;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TextureEffect_Stage1_c0_c0(vec4(1.0), gl_FragCoord.xy);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = AARectEffect_Stage2_c4_c0(AARectEffect_Stage2_c3_c0(AARectEffect_Stage2_c2_c0(AARectEffect_Stage2_c1_c0(output_Stage1))));
+ }
+ {
+ sk_FragColor = outputColor_Stage0 * output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 position;
+in vec4 color;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/4-456.shader_test b/shaders/skia/4-456.shader_test
new file mode 100644
index 0000000..7836c38
--- /dev/null
+++ b/shaders/skia/4-456.shader_test
@@ -0,0 +1,89 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 urectUniform_Stage1_c0_c0;
+uniform vec4 urectUniform_Stage1_c1_c0;
+uniform vec4 urectUniform_Stage1_c2_c0;
+uniform vec4 urectUniform_Stage1_c3_c0;
+flat in vec4 vcolor_Stage0;
+vec4 AARectEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ float alpha;
+ {
+ alpha = float(all(greaterThan(vec4(gl_FragCoord.xy, urectUniform_Stage1_c0_c0.zw), vec4(urectUniform_Stage1_c0_c0.xy, gl_FragCoord.xy))) ? 1 : 0);
+ }
+ {
+ alpha = 1.0 - alpha;
+ }
+ _output = _input * alpha;
+ return _output;
+}
+vec4 AARectEffect_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ float alpha;
+ {
+ alpha = float(all(greaterThan(vec4(gl_FragCoord.xy, urectUniform_Stage1_c1_c0.zw), vec4(urectUniform_Stage1_c1_c0.xy, gl_FragCoord.xy))) ? 1 : 0);
+ }
+ {
+ alpha = 1.0 - alpha;
+ }
+ _output = _input * alpha;
+ return _output;
+}
+vec4 AARectEffect_Stage1_c2_c0(vec4 _input) {
+ vec4 _output;
+ float alpha;
+ {
+ alpha = float(all(greaterThan(vec4(gl_FragCoord.xy, urectUniform_Stage1_c2_c0.zw), vec4(urectUniform_Stage1_c2_c0.xy, gl_FragCoord.xy))) ? 1 : 0);
+ }
+ {
+ alpha = 1.0 - alpha;
+ }
+ _output = _input * alpha;
+ return _output;
+}
+vec4 AARectEffect_Stage1_c3_c0(vec4 _input) {
+ vec4 _output;
+ float alpha;
+ {
+ alpha = float(all(greaterThan(vec4(gl_FragCoord.xy, urectUniform_Stage1_c3_c0.zw), vec4(urectUniform_Stage1_c3_c0.xy, gl_FragCoord.xy))) ? 1 : 0);
+ }
+ {
+ alpha = 1.0 - alpha;
+ }
+ _output = _input * alpha;
+ return _output;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = AARectEffect_Stage1_c3_c0(AARectEffect_Stage1_c2_c0(AARectEffect_Stage1_c1_c0(AARectEffect_Stage1_c0_c0(vec4(1.0)))));
+ }
+ {
+ sk_FragColor = outputColor_Stage0 * output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 position;
+in vec4 color;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/4-466.shader_test b/shaders/skia/4-466.shader_test
new file mode 100644
index 0000000..c10777e
--- /dev/null
+++ b/shaders/skia/4-466.shader_test
@@ -0,0 +1,130 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform float ubias_Stage1_c0_c0_c0_c0;
+uniform float uscale_Stage1_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+uniform mat4 um_Stage2_c2_c0;
+uniform vec4 uv_Stage2_c2_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 SweepGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float angle;
+ {
+ angle = atan(-vTransformedCoords_0_Stage0.y, -vTransformedCoords_0_Stage0.x);
+ }
+ float t = ((angle * 0.15915493667125702 + 0.5) + ubias_Stage1_c0_c0_c0_c0) * uscale_Stage1_c0_c0_c0_c0;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = SweepGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ t.x = fract(t.x);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 RGBToHSLFilterEffect_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 c = _input;
+ vec4 p = c.y < c.z ? vec4(c.zy, -1.0, 0.66666668653488159) : vec4(c.yz, 0.0, -0.3333333432674408);
+ vec4 q = c.x < p.x ? vec4(p.x, c.x, p.yw) : vec4(c.x, p.x, p.yz);
+ float pmV = q.x;
+ float pmC = pmV - min(q.y, q.z);
+ float pmL = pmV - pmC * 0.5;
+ float H = abs(q.w + (q.y - q.z) / (pmC * 6.0 + 9.9999997473787516e-05));
+ float S = pmC / ((c.w + 9.9999997473787516e-05) - abs(pmL * 2.0 - c.w));
+ float L = pmL / (c.w + 9.9999997473787516e-05);
+ _output = vec4(H, S, L, c.w);
+ return _output;
+}
+vec4 ColorMatrixFragmentProcessor_Stage2_c2_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = _input;
+ _output = um_Stage2_c2_c0 * inputColor + uv_Stage2_c2_c0;
+ {
+ _output.w = clamp(_output.w, 0.0, 1.0);
+ }
+ return _output;
+}
+vec4 HSLToRGBFilterEffect_Stage2_c3_c0(vec4 _input) {
+ vec4 _output;
+ vec3 hsl = _input.xyz;
+ float C = (1.0 - abs(2.0 * hsl.z - 1.0)) * hsl.y;
+ vec3 p = hsl.xxx + vec3(0.0, 0.66666668653488159, 0.3333333432674408);
+ vec3 q = clamp(abs(fract(p) * 6.0 - 3.0) - 1.0, 0.0, 1.0);
+ vec3 rgb = (q - 0.5) * C + hsl.z;
+ _output = clamp(vec4(rgb, _input.w), 0.0, 1.0);
+ _output.xyz *= _output.w;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TiledGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = HSLToRGBFilterEffect_Stage2_c3_c0(ColorMatrixFragmentProcessor_Stage2_c2_c0(RGBToHSLFilterEffect_Stage2_c1_c0(output_Stage1)));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/4-467.shader_test b/shaders/skia/4-467.shader_test
new file mode 100644
index 0000000..fb9d8c3
--- /dev/null
+++ b/shaders/skia/4-467.shader_test
@@ -0,0 +1,121 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale8_9_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale10_11_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias8_9_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias10_11_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage2_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.w) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c1_c0;
+ }
+ }
+ } else {
+ {
+ if (t < uthresholds9_13_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale8_9_Stage1_c0_c0_c1_c0;
+ bias = ubias8_9_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale10_11_Stage1_c0_c0_c1_c0;
+ bias = ubias10_11_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c1_c0;
+ }
+ return _output;
+}
+vec4 blend_modulate(vec4 src, vec4 dst) {
+ return src * dst;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_modulate(ConstColorProcessor_Stage2_c1_c0(vec4(1.0)), output_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/4-468.shader_test b/shaders/skia/4-468.shader_test
new file mode 100644
index 0000000..cdd6518
--- /dev/null
+++ b/shaders/skia/4-468.shader_test
@@ -0,0 +1,85 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform float uweight_Stage1;
+uniform vec4 uleftBorderColor_Stage1_c1_c0_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c1_c0_c0_c0;
+uniform vec4 ustart_Stage1_c1_c0_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c1_c0_c0_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ return _output;
+}
+vec4 RadialGradientLayout_Stage1_c1_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = length(vTransformedCoords_1_Stage0);
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c1_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c1_c0_c0_c0_c1_c0 + t * uend_Stage1_c1_c0_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = RadialGradientLayout_Stage1_c1_c0_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c1_c0_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c1_c0_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c1_c0_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = ClampedGradientEffect_Stage1_c1_c0_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = mix(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), OverrideInputFragmentProcessor_Stage1_c1_c0(vec4(1.0)), uweight_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/4-470.shader_test b/shaders/skia/4-470.shader_test
new file mode 100644
index 0000000..2e1a73b
--- /dev/null
+++ b/shaders/skia/4-470.shader_test
@@ -0,0 +1,99 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uscale01_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias01_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale23_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias23_Stage1_c0_c0_c0_c0_c1_c0;
+uniform float uthreshold_Stage1_c0_c0_c0_c0_c1_c0;
+uniform mat4 um_Stage1_c1_c0;
+uniform vec4 uv_Stage1_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 DualIntervalGradientColorizer_Stage1_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthreshold_Stage1_c0_c0_c0_c0_c1_c0) {
+ scale = uscale01_Stage1_c0_c0_c0_c0_c1_c0;
+ bias = ubias01_Stage1_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale23_Stage1_c0_c0_c0_c0_c1_c0;
+ bias = ubias23_Stage1_c0_c0_c0_c0_c1_c0;
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ t.x = fract(t.x);
+ }
+ _output = DualIntervalGradientColorizer_Stage1_c0_c0_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = TiledGradientEffect_Stage1_c0_c0_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ return _output;
+}
+vec4 ColorMatrixFragmentProcessor_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = _input;
+ {
+ float nonZeroAlpha = max(inputColor.w, 9.9999997473787516e-05);
+ inputColor = vec4(inputColor.xyz / nonZeroAlpha, inputColor.w);
+ }
+ _output = um_Stage1_c1_c0 * inputColor + uv_Stage1_c1_c0;
+ {
+ _output = clamp(_output, 0.0, 1.0);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ColorMatrixFragmentProcessor_Stage1_c1_c0(OverrideInputFragmentProcessor_Stage1_c0_c0(outputColor_Stage0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/4-471.shader_test b/shaders/skia/4-471.shader_test
new file mode 100644
index 0000000..7f89486
--- /dev/null
+++ b/shaders/skia/4-471.shader_test
@@ -0,0 +1,89 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uclamp_Stage1_c0_c0;
+uniform vec4 ucolor_Stage2_c1_c0_c0_c0;
+uniform mat4 um_Stage2_c2_c0;
+uniform vec4 uv_Stage2_c2_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 inCoord = vTransformedCoords_0_Stage0;
+ vec2 subsetCoord;
+ subsetCoord.x = inCoord.x;
+ subsetCoord.y = inCoord.y;
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage1_c0_c0.x, uclamp_Stage1_c0_c0.z);
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage1_c0_c0.y, uclamp_Stage1_c0_c0.w);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ _output = _input * textureColor;
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c1_c0_c0_c0;
+ }
+ return _output;
+}
+vec4 blend_src(vec4 src, vec4 dst) {
+ return src;
+}
+vec4 ComposeOne_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_src(ConstColorProcessor_Stage2_c1_c0_c0_c0(vec4(1.0)), _input);
+ return _output;
+}
+vec4 ColorMatrixFragmentProcessor_Stage2_c2_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = _input;
+ {
+ float nonZeroAlpha = max(inputColor.w, 9.9999997473787516e-05);
+ inputColor = vec4(inputColor.xyz / nonZeroAlpha, inputColor.w);
+ }
+ _output = um_Stage2_c2_c0 * inputColor + uv_Stage2_c2_c0;
+ {
+ _output = clamp(_output, 0.0, 1.0);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TextureEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = ColorMatrixFragmentProcessor_Stage2_c2_c0(ComposeOne_Stage2_c1_c0(output_Stage1));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/4-475.shader_test b/shaders/skia/4-475.shader_test
new file mode 100644
index 0000000..1e36512
--- /dev/null
+++ b/shaders/skia/4-475.shader_test
@@ -0,0 +1,31 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = (!gl_FrontFacing) ? vec4(0.0, 1.0, 0.0, 1.0) : vec4(1.0, 0.0, 0.0, 1.0);
+ outputCoverage_Stage0 = vec4(min(gl_FragCoord.y, 1.0));
+ }
+ {
+ sk_FragColor = outputColor_Stage0 * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 position;
+void main() {
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/4-482.shader_test b/shaders/skia/4-482.shader_test
new file mode 100644
index 0000000..35174f3
--- /dev/null
+++ b/shaders/skia/4-482.shader_test
@@ -0,0 +1,61 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+noperspective in vec4 vinCircleEdge_Stage0;
+noperspective in vec3 vinClipPlane_Stage0;
+noperspective in vec3 vinIsectPlane_Stage0;
+noperspective in vec4 vinColor_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ vec4 circleEdge;
+ circleEdge = vinCircleEdge_Stage0;
+ vec3 clipPlane;
+ clipPlane = vinClipPlane_Stage0;
+ vec3 isectPlane;
+ isectPlane = vinIsectPlane_Stage0;
+ outputColor_Stage0 = vinColor_Stage0;
+ float d = length(circleEdge.xy);
+ float distanceToOuterEdge = circleEdge.z * (1.0 - d);
+ float edgeAlpha = clamp(distanceToOuterEdge, 0.0, 1.0);
+ float distanceToInnerEdge = circleEdge.z * (d - circleEdge.w);
+ float innerAlpha = clamp(distanceToInnerEdge, 0.0, 1.0);
+ edgeAlpha *= innerAlpha;
+ float clip = clamp(circleEdge.z * dot(circleEdge.xy, clipPlane.xy) + clipPlane.z, 0.0, 1.0);
+ clip *= clamp(circleEdge.z * dot(circleEdge.xy, isectPlane.xy) + isectPlane.z, 0.0, 1.0);
+ edgeAlpha *= clip;
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ {
+ sk_FragColor = outputColor_Stage0 * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 inPosition;
+in vec4 inColor;
+in vec4 inCircleEdge;
+in vec3 inClipPlane;
+in vec3 inIsectPlane;
+noperspective out vec4 vinCircleEdge_Stage0;
+noperspective out vec3 vinClipPlane_Stage0;
+noperspective out vec3 vinIsectPlane_Stage0;
+noperspective out vec4 vinColor_Stage0;
+void main() {
+ vinCircleEdge_Stage0 = inCircleEdge;
+ vinClipPlane_Stage0 = inClipPlane;
+ vinIsectPlane_Stage0 = inIsectPlane;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = inPosition;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/4-488.shader_test b/shaders/skia/4-488.shader_test
new file mode 100644
index 0000000..8ed2fd6
--- /dev/null
+++ b/shaders/skia/4-488.shader_test
@@ -0,0 +1,68 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+noperspective in vec4 vinCircleEdge_Stage0;
+noperspective in vec3 vinClipPlane_Stage0;
+noperspective in vec3 vinIsectPlane_Stage0;
+noperspective in vec3 vinUnionPlane_Stage0;
+noperspective in vec4 vinColor_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ vec4 circleEdge;
+ circleEdge = vinCircleEdge_Stage0;
+ vec3 clipPlane;
+ clipPlane = vinClipPlane_Stage0;
+ vec3 isectPlane;
+ isectPlane = vinIsectPlane_Stage0;
+ vec3 unionPlane;
+ unionPlane = vinUnionPlane_Stage0;
+ outputColor_Stage0 = vinColor_Stage0;
+ float d = length(circleEdge.xy);
+ float distanceToOuterEdge = circleEdge.z * (1.0 - d);
+ float edgeAlpha = clamp(distanceToOuterEdge, 0.0, 1.0);
+ float distanceToInnerEdge = circleEdge.z * (d - circleEdge.w);
+ float innerAlpha = clamp(distanceToInnerEdge, 0.0, 1.0);
+ edgeAlpha *= innerAlpha;
+ float clip = clamp(circleEdge.z * dot(circleEdge.xy, clipPlane.xy) + clipPlane.z, 0.0, 1.0);
+ clip *= clamp(circleEdge.z * dot(circleEdge.xy, isectPlane.xy) + isectPlane.z, 0.0, 1.0);
+ clip = clamp(clip + clamp(circleEdge.z * dot(circleEdge.xy, unionPlane.xy) + unionPlane.z, 0.0, 1.0), 0.0, 1.0);
+ edgeAlpha *= clip;
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ {
+ sk_FragColor = outputColor_Stage0 * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 inPosition;
+in vec4 inColor;
+in vec4 inCircleEdge;
+in vec3 inClipPlane;
+in vec3 inIsectPlane;
+in vec3 inUnionPlane;
+noperspective out vec4 vinCircleEdge_Stage0;
+noperspective out vec3 vinClipPlane_Stage0;
+noperspective out vec3 vinIsectPlane_Stage0;
+noperspective out vec3 vinUnionPlane_Stage0;
+noperspective out vec4 vinColor_Stage0;
+void main() {
+ vinCircleEdge_Stage0 = inCircleEdge;
+ vinClipPlane_Stage0 = inClipPlane;
+ vinIsectPlane_Stage0 = inIsectPlane;
+ vinUnionPlane_Stage0 = inUnionPlane;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = inPosition;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/4-490.shader_test b/shaders/skia/4-490.shader_test
new file mode 100644
index 0000000..80ab59b
--- /dev/null
+++ b/shaders/skia/4-490.shader_test
@@ -0,0 +1,65 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+noperspective in vec4 vinCircleEdge_Stage0;
+noperspective in vec3 vinClipPlane_Stage0;
+noperspective in vec3 vinIsectPlane_Stage0;
+noperspective in vec3 vinUnionPlane_Stage0;
+noperspective in vec4 vinColor_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ vec4 circleEdge;
+ circleEdge = vinCircleEdge_Stage0;
+ vec3 clipPlane;
+ clipPlane = vinClipPlane_Stage0;
+ vec3 isectPlane;
+ isectPlane = vinIsectPlane_Stage0;
+ vec3 unionPlane;
+ unionPlane = vinUnionPlane_Stage0;
+ outputColor_Stage0 = vinColor_Stage0;
+ float d = length(circleEdge.xy);
+ float distanceToOuterEdge = circleEdge.z * (1.0 - d);
+ float edgeAlpha = clamp(distanceToOuterEdge, 0.0, 1.0);
+ float clip = clamp(circleEdge.z * dot(circleEdge.xy, clipPlane.xy) + clipPlane.z, 0.0, 1.0);
+ clip *= clamp(circleEdge.z * dot(circleEdge.xy, isectPlane.xy) + isectPlane.z, 0.0, 1.0);
+ clip = clamp(clip + clamp(circleEdge.z * dot(circleEdge.xy, unionPlane.xy) + unionPlane.z, 0.0, 1.0), 0.0, 1.0);
+ edgeAlpha *= clip;
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ {
+ sk_FragColor = outputColor_Stage0 * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 inPosition;
+in vec4 inColor;
+in vec4 inCircleEdge;
+in vec3 inClipPlane;
+in vec3 inIsectPlane;
+in vec3 inUnionPlane;
+noperspective out vec4 vinCircleEdge_Stage0;
+noperspective out vec3 vinClipPlane_Stage0;
+noperspective out vec3 vinIsectPlane_Stage0;
+noperspective out vec3 vinUnionPlane_Stage0;
+noperspective out vec4 vinColor_Stage0;
+void main() {
+ vinCircleEdge_Stage0 = inCircleEdge;
+ vinClipPlane_Stage0 = inClipPlane;
+ vinIsectPlane_Stage0 = inIsectPlane;
+ vinUnionPlane_Stage0 = inUnionPlane;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = inPosition;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/4-496.shader_test b/shaders/skia/4-496.shader_test
new file mode 100644
index 0000000..b05a7b3
--- /dev/null
+++ b/shaders/skia/4-496.shader_test
@@ -0,0 +1,61 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uColor_Stage0;
+uniform vec4 uellipse_Stage1;
+noperspective in vec4 vHairQuadEdge_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = uColor_Stage0;
+ float edgeAlpha;
+ vec2 duvdx = dFdx(vHairQuadEdge_Stage0.xy);
+ vec2 duvdy = -dFdy(vHairQuadEdge_Stage0.xy);
+ vec2 gF = vec2((2.0 * vHairQuadEdge_Stage0.x) * duvdx.x - duvdx.y, (2.0 * vHairQuadEdge_Stage0.x) * duvdy.x - duvdy.y);
+ edgeAlpha = vHairQuadEdge_Stage0.x * vHairQuadEdge_Stage0.x - vHairQuadEdge_Stage0.y;
+ edgeAlpha = sqrt((edgeAlpha * edgeAlpha) / dot(gF, gF));
+ edgeAlpha = max(1.0 - edgeAlpha, 0.0);
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ vec4 output_Stage1;
+ {
+ vec2 d = gl_FragCoord.xy - uellipse_Stage1.xy;
+ vec2 Z = d * uellipse_Stage1.zw;
+ float implicit = dot(Z, d) - 1.0;
+ float grad_dot = 4.0 * dot(Z, Z);
+ {
+ grad_dot = max(grad_dot, 1.1754999560161448e-38);
+ }
+ float approx_dist = implicit * inversesqrt(grad_dot);
+ float alpha;
+ {
+ alpha = approx_dist > 0.0 ? 0.0 : 1.0;
+ }
+ output_Stage1 = outputCoverage_Stage0 * alpha;
+ }
+ {
+ sk_FragColor = outputColor_Stage0 * output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 inPosition;
+in vec4 inHairQuadEdge;
+noperspective out vec4 vHairQuadEdge_Stage0;
+void main() {
+ vHairQuadEdge_Stage0 = inHairQuadEdge;
+ vec2 pos2 = inPosition;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/4-5.shader_test b/shaders/skia/4-5.shader_test
new file mode 100644
index 0000000..3cb18d2
--- /dev/null
+++ b/shaders/skia/4-5.shader_test
@@ -0,0 +1,52 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 TextureEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_1_Stage1, vTransformedCoords_1_Stage0) * _input;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ vec4 planes[2];
+ planes[0] = TextureEffect_Stage1_c0_c0(vec4(1.0));
+ planes[1] = TextureEffect_Stage1_c1_c0(vec4(1.0));
+ vec4 color = vec4(planes[0].x, planes[1].x, planes[1].y, 1.0);
+ output_Stage1 = color;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/4-50.shader_test b/shaders/skia/4-50.shader_test
new file mode 100644
index 0000000..4bfa3b5
--- /dev/null
+++ b/shaders/skia/4-50.shader_test
@@ -0,0 +1,44 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uColor_Stage0;
+uniform sampler2D uTextureSampler_0_Stage0;
+noperspective in vec2 vTextureCoords_Stage0;
+flat in int vTexIndex_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = uColor_Stage0;
+ vec4 texColor;
+ {
+ texColor = texture(uTextureSampler_0_Stage0, vTextureCoords_Stage0);
+ }
+ outputColor_Stage0 = outputColor_Stage0 * texColor;
+ }
+ {
+ sk_FragColor = outputColor_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform vec2 uAtlasSizeInv_Stage0;
+in vec2 inPosition;
+in uvec2 inTextureCoords;
+noperspective out vec2 vTextureCoords_Stage0;
+flat out int vTexIndex_Stage0;
+void main() {
+ ivec2 signedCoords = ivec2(int(inTextureCoords.x), int(inTextureCoords.y));
+ vec2 unormTexCoords = vec2(float(signedCoords.x / 2), float(signedCoords.y / 2));
+ vTextureCoords_Stage0 = unormTexCoords * uAtlasSizeInv_Stage0;
+ vTexIndex_Stage0 = 0;
+ gl_Position = vec4(inPosition.x, inPosition.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/4-503.shader_test b/shaders/skia/4-503.shader_test
new file mode 100644
index 0000000..f64fe1f
--- /dev/null
+++ b/shaders/skia/4-503.shader_test
@@ -0,0 +1,71 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform vec4 uKernel_Stage1[3];
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0 - 5.0 * uImageIncrement_Stage1;
+ vec2 coordSampled = vec2(0.0, 0.0);
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].z;
+ coord += uImageIncrement_Stage1;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ sk_FragColor = sk_FragColor.wwww;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/4-504.shader_test b/shaders/skia/4-504.shader_test
new file mode 100644
index 0000000..b45b91e
--- /dev/null
+++ b/shaders/skia/4-504.shader_test
@@ -0,0 +1,52 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 urectH_Stage1;
+uniform float uinvSixSigma_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+flat in vec4 vcolor_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ float xCoverage, yCoverage;
+ {
+ float x, y;
+ {
+ x = max(urectH_Stage1.x - gl_FragCoord.x, gl_FragCoord.x - urectH_Stage1.z);
+ y = max(urectH_Stage1.y - gl_FragCoord.y, gl_FragCoord.y - urectH_Stage1.w);
+ }
+ xCoverage = texture(uTextureSampler_0_Stage1, vec2(x * uinvSixSigma_Stage1, 0.5)).w;
+ yCoverage = texture(uTextureSampler_0_Stage1, vec2(y * uinvSixSigma_Stage1, 0.5)).w;
+ output_Stage1 = vec4(xCoverage) * yCoverage;
+ }
+ output_Stage1 = vec4(xCoverage) * yCoverage;
+ }
+ {
+ sk_FragColor = outputColor_Stage0 * output_Stage1;
+ sk_FragColor = sk_FragColor.wwww;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 position;
+in vec4 color;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/4-515.shader_test b/shaders/skia/4-515.shader_test
new file mode 100644
index 0000000..8b29bf3
--- /dev/null
+++ b/shaders/skia/4-515.shader_test
@@ -0,0 +1,117 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 ustart_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 uclamp_Stage1_c1_c0;
+uniform vec4 urectH_Stage2;
+uniform float uinvSixSigma_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c0_c0_c1_c0;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+vec4 ComposeOne_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_dst_in(_input, TiledGradientEffect_Stage1_c0_c0_c0_c0(vec4(1.0)));
+ return _output;
+}
+vec4 TextureEffect_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 inCoord = vTransformedCoords_1_Stage0;
+ vec2 subsetCoord;
+ subsetCoord.x = inCoord.x;
+ subsetCoord.y = inCoord.y;
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage1_c1_c0.x, uclamp_Stage1_c1_c0.z);
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage1_c1_c0.y, uclamp_Stage1_c1_c0.w);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ _output = _input * textureColor;
+ return _output;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TextureEffect_Stage1_c1_c0(ComposeOne_Stage1_c0_c0(outputColor_Stage0));
+ }
+ vec4 output_Stage2;
+ {
+ float xCoverage, yCoverage;
+ {
+ float x, y;
+ {
+ x = max(urectH_Stage2.x - gl_FragCoord.x, gl_FragCoord.x - urectH_Stage2.z);
+ y = max(urectH_Stage2.y - gl_FragCoord.y, gl_FragCoord.y - urectH_Stage2.w);
+ }
+ xCoverage = texture(uTextureSampler_0_Stage2, vec2(x * uinvSixSigma_Stage2, 0.5)).w;
+ yCoverage = texture(uTextureSampler_0_Stage2, vec2(y * uinvSixSigma_Stage2, 0.5)).w;
+ output_Stage2 = vec4(xCoverage) * yCoverage;
+ }
+ output_Stage2 = vec4(xCoverage) * yCoverage;
+ }
+ {
+ sk_FragColor = output_Stage1 * output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/4-517.shader_test b/shaders/skia/4-517.shader_test
new file mode 100644
index 0000000..62eb819
--- /dev/null
+++ b/shaders/skia/4-517.shader_test
@@ -0,0 +1,77 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uclamp_Stage1_c0_c0;
+uniform vec4 urectH_Stage2;
+uniform float uinvSixSigma_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 inCoord = vTransformedCoords_0_Stage0;
+ vec2 subsetCoord;
+ subsetCoord.x = inCoord.x;
+ subsetCoord.y = inCoord.y;
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage1_c0_c0.x, uclamp_Stage1_c0_c0.z);
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage1_c0_c0.y, uclamp_Stage1_c0_c0.w);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ _output = _input * textureColor;
+ return _output;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TextureEffect_Stage1_c0_c0(vec4(1.0));
+ output_Stage1.xyz *= outputColor_Stage0.xyz;
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ vec4 output_Stage2;
+ {
+ float xCoverage, yCoverage;
+ {
+ float x, y;
+ {
+ x = max(urectH_Stage2.x - gl_FragCoord.x, gl_FragCoord.x - urectH_Stage2.z);
+ y = max(urectH_Stage2.y - gl_FragCoord.y, gl_FragCoord.y - urectH_Stage2.w);
+ }
+ xCoverage = texture(uTextureSampler_0_Stage2, vec2(x * uinvSixSigma_Stage2, 0.5)).w;
+ yCoverage = texture(uTextureSampler_0_Stage2, vec2(y * uinvSixSigma_Stage2, 0.5)).w;
+ output_Stage2 = vec4(xCoverage) * yCoverage;
+ }
+ output_Stage2 = vec4(xCoverage) * yCoverage;
+ }
+ {
+ sk_FragColor = output_Stage1 * output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/4-52.shader_test b/shaders/skia/4-52.shader_test
new file mode 100644
index 0000000..cacac68
--- /dev/null
+++ b/shaders/skia/4-52.shader_test
@@ -0,0 +1,34 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ {
+ sk_FragColor = output_Stage1;
+ sk_FragColor = sk_FragColor.wwww;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/4-53.shader_test b/shaders/skia/4-53.shader_test
new file mode 100644
index 0000000..ee4dbf8
--- /dev/null
+++ b/shaders/skia/4-53.shader_test
@@ -0,0 +1,67 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec2 uDstTextureUpperLeft_Stage1;
+uniform vec2 uDstTextureCoordScale_Stage1;
+uniform sampler2D uTextureSampler_0_Stage0;
+uniform sampler2D uDstTextureSampler_Stage1;
+noperspective in vec2 vTextureCoords_Stage0;
+flat in int vTexIndex_Stage0;
+noperspective in vec4 vinColor_Stage0;
+vec4 blend_src(vec4 src, vec4 dst) {
+ return src;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vinColor_Stage0;
+ vec4 texColor;
+ {
+ texColor = texture(uTextureSampler_0_Stage0, vTextureCoords_Stage0);
+ }
+ outputCoverage_Stage0 = texColor;
+ }
+ {
+ if (all(lessThanEqual(outputCoverage_Stage0.xyz, vec3(0.0)))) {
+ discard;
+ }
+ vec2 _dstTexCoord = (gl_FragCoord.xy - uDstTextureUpperLeft_Stage1) * uDstTextureCoordScale_Stage1;
+ _dstTexCoord.y = 1.0 - _dstTexCoord.y;
+ vec4 _dstColor = texture(uDstTextureSampler_Stage1, _dstTexCoord);
+ sk_FragColor = blend_src(outputColor_Stage0, _dstColor);
+ float lerpRed = mix(_dstColor.w, sk_FragColor.w, outputCoverage_Stage0.x);
+ float lerpBlue = mix(_dstColor.w, sk_FragColor.w, outputCoverage_Stage0.y);
+ float lerpGreen = mix(_dstColor.w, sk_FragColor.w, outputCoverage_Stage0.z);
+ sk_FragColor = outputCoverage_Stage0 * sk_FragColor + (vec4(1.0) - outputCoverage_Stage0) * _dstColor;
+ sk_FragColor.w = max(max(lerpRed, lerpBlue), lerpGreen);
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform vec2 uAtlasSizeInv_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in uvec2 inTextureCoords;
+noperspective out vec2 vTextureCoords_Stage0;
+flat out int vTexIndex_Stage0;
+noperspective out vec4 vinColor_Stage0;
+void main() {
+ ivec2 signedCoords = ivec2(int(inTextureCoords.x), int(inTextureCoords.y));
+ vec2 unormTexCoords = vec2(float(signedCoords.x / 2), float(signedCoords.y / 2));
+ vTextureCoords_Stage0 = unormTexCoords * uAtlasSizeInv_Stage0;
+ vTexIndex_Stage0 = 0;
+ vinColor_Stage0 = inColor;
+ gl_Position = vec4(inPosition.x, inPosition.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/4-547.shader_test b/shaders/skia/4-547.shader_test
new file mode 100644
index 0000000..ff2948d
--- /dev/null
+++ b/shaders/skia/4-547.shader_test
@@ -0,0 +1,44 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform mat4 um_Stage2;
+uniform vec4 uv_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ vec4 inputColor = output_Stage1;
+ output_Stage2 = um_Stage2 * inputColor + uv_Stage2;
+ {
+ output_Stage2 = clamp(output_Stage2, 0.0, 1.0);
+ }
+ }
+ {
+ sk_FragColor = output_Stage2;
+ sk_FragColor = sk_FragColor.wwww;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/4-564.shader_test b/shaders/skia/4-564.shader_test
new file mode 100644
index 0000000..5715eae
--- /dev/null
+++ b/shaders/skia/4-564.shader_test
@@ -0,0 +1,74 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 ucolor_Stage1_c0_c0;
+uniform vec4 urectH_Stage2;
+uniform float uinvSixSigma_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 ConstColorProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = _input.w * ucolor_Stage1_c0_c0;
+ }
+ return _output;
+}
+vec4 TextureEffect_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TextureEffect_Stage1_c1_c0(ConstColorProcessor_Stage1_c0_c0(outputColor_Stage0));
+ }
+ vec4 output_Stage2;
+ {
+ float xCoverage, yCoverage;
+ {
+ float x, y;
+ {
+ x = max(urectH_Stage2.x - gl_FragCoord.x, gl_FragCoord.x - urectH_Stage2.z);
+ y = max(urectH_Stage2.y - gl_FragCoord.y, gl_FragCoord.y - urectH_Stage2.w);
+ }
+ xCoverage = texture(uTextureSampler_0_Stage2, vec2(x * uinvSixSigma_Stage2, 0.5)).w;
+ yCoverage = texture(uTextureSampler_0_Stage2, vec2(y * uinvSixSigma_Stage2, 0.5)).w;
+ output_Stage2 = vec4(xCoverage) * yCoverage;
+ }
+ output_Stage2 = vec4(xCoverage) * yCoverage;
+ }
+ {
+ sk_FragColor = output_Stage1 * output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/4-574.shader_test b/shaders/skia/4-574.shader_test
new file mode 100644
index 0000000..d6eafcd
--- /dev/null
+++ b/shaders/skia/4-574.shader_test
@@ -0,0 +1,76 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 urectUniform_Stage1_c0_c0;
+uniform vec4 urectUniform_Stage1_c1_c0;
+uniform vec2 uDstTextureUpperLeft_Stage2;
+uniform vec2 uDstTextureCoordScale_Stage2;
+uniform sampler2D uDstTextureSampler_Stage2;
+flat in vec4 vcolor_Stage0;
+vec4 AARectEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ float alpha;
+ {
+ alpha = float(all(greaterThan(vec4(gl_FragCoord.xy, urectUniform_Stage1_c0_c0.zw), vec4(urectUniform_Stage1_c0_c0.xy, gl_FragCoord.xy))) ? 1 : 0);
+ }
+ {
+ alpha = 1.0 - alpha;
+ }
+ _output = _input * alpha;
+ return _output;
+}
+vec4 AARectEffect_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ float alpha;
+ {
+ alpha = float(all(greaterThan(vec4(gl_FragCoord.xy, urectUniform_Stage1_c1_c0.zw), vec4(urectUniform_Stage1_c1_c0.xy, gl_FragCoord.xy))) ? 1 : 0);
+ }
+ {
+ alpha = 1.0 - alpha;
+ }
+ _output = _input * alpha;
+ return _output;
+}
+vec4 blend_src(vec4 src, vec4 dst) {
+ return src;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = AARectEffect_Stage1_c1_c0(AARectEffect_Stage1_c0_c0(vec4(1.0)));
+ }
+ {
+ if (all(lessThanEqual(output_Stage1.xyz, vec3(0.0)))) {
+ discard;
+ }
+ vec2 _dstTexCoord = (gl_FragCoord.xy - uDstTextureUpperLeft_Stage2) * uDstTextureCoordScale_Stage2;
+ _dstTexCoord.y = 1.0 - _dstTexCoord.y;
+ vec4 _dstColor = texture(uDstTextureSampler_Stage2, _dstTexCoord);
+ sk_FragColor = blend_src(outputColor_Stage0, _dstColor);
+ sk_FragColor = output_Stage1 * sk_FragColor + (vec4(1.0) - output_Stage1) * _dstColor;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 position;
+in vec4 color;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/4-58.shader_test b/shaders/skia/4-58.shader_test
new file mode 100644
index 0000000..6424117
--- /dev/null
+++ b/shaders/skia/4-58.shader_test
@@ -0,0 +1,42 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform sampler2D uTextureSampler_0_Stage1;
+flat in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * outputColor_Stage0;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec2 inLocalCoords;
+in vec4 color;
+flat out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vcolor_Stage0 = color;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoords, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/4-590.shader_test b/shaders/skia/4-590.shader_test
new file mode 100644
index 0000000..6661aaf
--- /dev/null
+++ b/shaders/skia/4-590.shader_test
@@ -0,0 +1,55 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 ugColor_Stage1_c0_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 runtime_shader_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = _input;
+ _output = ugColor_Stage1_c0_c0;
+ return _output;
+}
+vec4 ClampFragmentProcessor_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ float alpha = clamp(_input.w, 0.0, 1.0);
+ _output = vec4(clamp(_input.xyz, 0.0, alpha), alpha);
+ }
+ return _output;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampFragmentProcessor_Stage1_c1_c0(runtime_shader_Stage1_c0_c0(outputColor_Stage0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/4-596.shader_test b/shaders/skia/4-596.shader_test
new file mode 100644
index 0000000..4301383
--- /dev/null
+++ b/shaders/skia/4-596.shader_test
@@ -0,0 +1,45 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ float nonZeroAlpha = max(output_Stage1.w, 9.9999997473787516e-05);
+ vec4 coord = vec4(output_Stage1.xyz / nonZeroAlpha, nonZeroAlpha);
+ coord = coord * 0.9960939884185791 + vec4(0.0019529999699443579, 0.0019529999699443579, 0.0019529999699443579, 0.0019529999699443579);
+ output_Stage2.w = texture(uTextureSampler_0_Stage2, vec2(coord.w, 0.125)).w;
+ output_Stage2.x = texture(uTextureSampler_0_Stage2, vec2(coord.x, 0.375)).w;
+ output_Stage2.y = texture(uTextureSampler_0_Stage2, vec2(coord.y, 0.625)).w;
+ output_Stage2.z = texture(uTextureSampler_0_Stage2, vec2(coord.z, 0.875)).w;
+ output_Stage2.xyz *= output_Stage2.w;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/4-597.shader_test b/shaders/skia/4-597.shader_test
new file mode 100644
index 0000000..5d71e26
--- /dev/null
+++ b/shaders/skia/4-597.shader_test
@@ -0,0 +1,51 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform float uPixelSize_Stage2;
+uniform vec2 uRange_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_1_Stage0;
+ coord.x -= 6.0 * uPixelSize_Stage2;
+ for (int i = 0;i < 13; i++) {
+ output_Stage2 = max(output_Stage2, texture(uTextureSampler_0_Stage2, coord));
+ coord.x += uPixelSize_Stage2;
+ }
+ output_Stage2 *= output_Stage1;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/4-6.shader_test b/shaders/skia/4-6.shader_test
new file mode 100644
index 0000000..7e884e4
--- /dev/null
+++ b/shaders/skia/4-6.shader_test
@@ -0,0 +1,66 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform mat3 ucolorSpaceMatrix_Stage1;
+uniform vec3 ucolorSpaceTranslate_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+uniform sampler2D uTextureSampler_2_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+vec4 TextureEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_1_Stage1, vTransformedCoords_1_Stage0) * _input;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c2_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_2_Stage1, vTransformedCoords_2_Stage0) * _input;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ vec4 planes[3];
+ planes[0] = TextureEffect_Stage1_c0_c0(vec4(1.0));
+ planes[1] = TextureEffect_Stage1_c1_c0(vec4(1.0));
+ planes[2] = TextureEffect_Stage1_c2_c0(vec4(1.0));
+ vec4 color = vec4(planes[0].x, planes[2].x, planes[1].x, 1.0);
+ color.xyz = clamp(color.xyz * ucolorSpaceMatrix_Stage1 + ucolorSpaceTranslate_Stage1, 0.0, 1.0);
+ output_Stage1 = color;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/4-601.shader_test b/shaders/skia/4-601.shader_test
new file mode 100644
index 0000000..321ab8d
--- /dev/null
+++ b/shaders/skia/4-601.shader_test
@@ -0,0 +1,87 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform mat3 ucolorSpaceMatrix_Stage1_c0_c0;
+uniform vec3 ucolorSpaceTranslate_Stage1_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+uniform sampler2D uTextureSampler_2_Stage1;
+uniform sampler2D uTextureSampler_3_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+noperspective in vec2 vTransformedCoords_3_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_1_Stage1, vTransformedCoords_1_Stage0) * _input;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c0_c0_c2_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_2_Stage1, vTransformedCoords_2_Stage0) * _input;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c0_c0_c3_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_3_Stage1, vTransformedCoords_3_Stage0) * _input;
+ return _output;
+}
+vec4 YUVtoRGBEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 planes[4];
+ planes[0] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0));
+ planes[1] = TextureEffect_Stage1_c0_c0_c1_c0(vec4(1.0));
+ planes[2] = TextureEffect_Stage1_c0_c0_c2_c0(vec4(1.0));
+ planes[3] = TextureEffect_Stage1_c0_c0_c3_c0(vec4(1.0));
+ vec4 color = vec4(planes[0].w, planes[1].w, planes[2].w, planes[3].w);
+ color.xyz = clamp(color.xyz * ucolorSpaceMatrix_Stage1_c0_c0 + ucolorSpaceTranslate_Stage1_c0_c0, 0.0, 1.0);
+ color.xyz *= color.w;
+ _output = color;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = YUVtoRGBEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+uniform mat3 uCoordTransformMatrix_3_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+noperspective out vec2 vTransformedCoords_3_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_3_Stage0 = (uCoordTransformMatrix_3_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/4-603.shader_test b/shaders/skia/4-603.shader_test
new file mode 100644
index 0000000..2298da9
--- /dev/null
+++ b/shaders/skia/4-603.shader_test
@@ -0,0 +1,39 @@
+[require]
+GLSL ES >= 3.10
+
+[fragment shader]
+#version 310 es
+
+precision mediump float;
+precision mediump sampler2D;
+out mediump vec4 sk_FragColor;
+uniform sampler2D uTextureSampler_0_Stage0;
+in highp vec2 vlocalCoord_Stage0;
+void main() {
+ mediump vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vec4(1.0);
+ highp vec2 texCoord;
+ texCoord = vlocalCoord_Stage0;
+ outputColor_Stage0 = texture(uTextureSampler_0_Stage0, texCoord);
+ }
+ {
+ sk_FragColor = outputColor_Stage0;
+ }
+}
+
+[vertex shader]
+#version 310 es
+
+precision mediump float;
+precision mediump sampler2D;
+uniform highp vec4 sk_RTAdjust;
+in highp vec2 position;
+in highp vec2 localCoord;
+out highp vec2 vlocalCoord_Stage0;
+void main() {
+ vlocalCoord_Stage0 = localCoord;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/4-605.shader_test b/shaders/skia/4-605.shader_test
new file mode 100644
index 0000000..7e44853
--- /dev/null
+++ b/shaders/skia/4-605.shader_test
@@ -0,0 +1,51 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uborder_Stage1;
+uniform vec4 usubset_Stage1;
+uniform vec4 unorm_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ vec2 inCoord = vTransformedCoords_0_Stage0;
+ inCoord *= unorm_Stage1.xy;
+ vec2 subsetCoord;
+ subsetCoord.x = inCoord.x;
+ subsetCoord.y = inCoord.y;
+ vec2 clampedCoord;
+ clampedCoord.x = subsetCoord.x;
+ clampedCoord.y = subsetCoord.y;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord * unorm_Stage1.zw);
+ if (inCoord.x < usubset_Stage1.x || inCoord.x > usubset_Stage1.z) {
+ textureColor = uborder_Stage1;
+ }
+ if (inCoord.y < usubset_Stage1.y || inCoord.y > usubset_Stage1.w) {
+ textureColor = uborder_Stage1;
+ }
+ output_Stage1 = textureColor;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/4-616.shader_test b/shaders/skia/4-616.shader_test
new file mode 100644
index 0000000..95e7e73
--- /dev/null
+++ b/shaders/skia/4-616.shader_test
@@ -0,0 +1,33 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+noperspective in vec4 vcolor_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ {
+ sk_FragColor = outputColor_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 location;
+in vec4 color;
+noperspective out vec4 vcolor_Stage0;
+void main() {
+ vcolor_Stage0 = color;
+ vec2 offset = vec2(float(gl_VertexID / 2), float(gl_VertexID % 2));
+ vec2 vertex = location + offset * 2.0;
+ gl_Position = vec4(vertex.x, vertex.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/4-623.shader_test b/shaders/skia/4-623.shader_test
new file mode 100644
index 0000000..6105284
--- /dev/null
+++ b/shaders/skia/4-623.shader_test
@@ -0,0 +1,51 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform sampler2D uTextureSampler_0_Stage0;
+noperspective in vec2 vlocalCoord_Stage0;
+flat in vec4 vtexDomain_Stage0;
+noperspective in float vcoverage_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vec4(1.0);
+ vec2 texCoord;
+ texCoord = vlocalCoord_Stage0;
+ vec4 domain;
+ domain = vtexDomain_Stage0;
+ texCoord = clamp(texCoord, domain.xy, domain.zw);
+ outputColor_Stage0 = texture(uTextureSampler_0_Stage0, texCoord);
+ outputColor_Stage0 = clamp(outputColor_Stage0, 0.0, 1.0);
+ float coverage = vcoverage_Stage0;
+ outputCoverage_Stage0 = vec4(coverage);
+ }
+ {
+ sk_FragColor = outputColor_Stage0 * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 position;
+in float coverage;
+in vec2 localCoord;
+in vec4 texDomain;
+noperspective out vec2 vlocalCoord_Stage0;
+flat out vec4 vtexDomain_Stage0;
+noperspective out float vcoverage_Stage0;
+void main() {
+ vec2 position = position;
+ vlocalCoord_Stage0 = localCoord;
+ vtexDomain_Stage0 = texDomain;
+ vcoverage_Stage0 = coverage;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/4-625.shader_test b/shaders/skia/4-625.shader_test
new file mode 100644
index 0000000..5aaccd7
--- /dev/null
+++ b/shaders/skia/4-625.shader_test
@@ -0,0 +1,143 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform vec4 uKernel_Stage1[3];
+uniform vec2 uKernelOffset_Stage1;
+uniform float uGain_Stage1;
+uniform float uBias_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ vec4 sum = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0 - uKernelOffset_Stage1 * uImageIncrement_Stage1;
+ vec4 c;
+ {
+ float k = uKernel_Stage1[0].x;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[0].y;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[0].z;
+ {
+ vec2 origCoord = coord + vec2(2.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[0].w;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[1].x;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[1].y;
+ {
+ vec2 origCoord = coord + vec2(2.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[1].z;
+ {
+ vec2 origCoord = coord + vec2(0.0, 2.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[1].w;
+ {
+ vec2 origCoord = coord + vec2(1.0, 2.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[2].x;
+ {
+ vec2 origCoord = coord + vec2(2.0, 2.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ output_Stage1 = sum * uGain_Stage1 + uBias_Stage1;
+ output_Stage1.w = clamp(output_Stage1.w, 0.0, 1.0);
+ output_Stage1.xyz = clamp(output_Stage1.xyz, 0.0, output_Stage1.w);
+ }
+ {
+ sk_FragColor = output_Stage1;
+ sk_FragColor = sk_FragColor.wwww;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/4-63.shader_test b/shaders/skia/4-63.shader_test
new file mode 100644
index 0000000..0452801
--- /dev/null
+++ b/shaders/skia/4-63.shader_test
@@ -0,0 +1,90 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+flat in vec4 vcolor_Stage0;
+noperspective in vec2 varccoord_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ float x_plus_1 = varccoord_Stage0.x, y = varccoord_Stage0.y;
+ float coverage;
+ if (0.0 == x_plus_1) {
+ coverage = y;
+ } else {
+ float fn = x_plus_1 * (x_plus_1 - 2.0);
+ fn = ((y) * (y) + (fn));
+ float fnwidth = fwidth(fn);
+ float d = fn / fnwidth;
+ coverage = clamp(0.5 - d, 0.0, 1.0);
+ }
+ outputCoverage_Stage0 = vec4(coverage);
+ }
+ {
+ sk_FragColor = outputColor_Stage0 * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec4 radii_selector;
+in vec4 corner_and_radius_outsets;
+in vec4 aa_bloat_and_coverage;
+in vec4 skew;
+in vec2 translate;
+in vec4 radii_x;
+in vec4 radii_y;
+in vec4 color;
+flat out vec4 vcolor_Stage0;
+noperspective out vec2 varccoord_Stage0;
+void main() {
+ vcolor_Stage0 = color;
+ vec2 corner = corner_and_radius_outsets.xy;
+ vec2 radius_outset = corner_and_radius_outsets.zw;
+ vec2 aa_bloat_direction = aa_bloat_and_coverage.xy;
+ float coverage = aa_bloat_and_coverage.z;
+ float is_linear_coverage = aa_bloat_and_coverage.w;
+ vec2 pixellength = inversesqrt(vec2(dot(skew.xz, skew.xz), dot(skew.yw, skew.yw)));
+ vec4 normalized_axis_dirs = skew * pixellength.xyxy;
+ vec2 axiswidths = abs(normalized_axis_dirs.xy) + abs(normalized_axis_dirs.zw);
+ vec2 aa_bloatradius = (axiswidths * pixellength) * 0.5;
+ vec4 radii_and_neighbors = radii_selector * mat4(radii_x, radii_y, radii_x.yxwz, radii_y.wzyx);
+ vec2 radii = radii_and_neighbors.xy;
+ vec2 neighbor_radii = radii_and_neighbors.zw;
+ if (any(greaterThan(aa_bloatradius, vec2(1.0)))) {
+ corner = max(abs(corner), aa_bloatradius) * sign(corner);
+ coverage /= max(aa_bloatradius.x, 1.0) * max(aa_bloatradius.y, 1.0);
+ radii = vec2(0.0);
+ }
+ if (any(lessThan(radii, aa_bloatradius * 1.25))) {
+ radii = aa_bloatradius;
+ radius_outset = floor(abs(radius_outset)) * radius_outset;
+ is_linear_coverage = 1.0;
+ } else {
+ radii = clamp(radii, pixellength, 2.0 - pixellength);
+ neighbor_radii = clamp(neighbor_radii, pixellength, 2.0 - pixellength);
+ vec2 spacing = (2.0 - radii) - neighbor_radii;
+ vec2 extra_pad = max(pixellength * 0.0625 - spacing, vec2(0.0));
+ radii -= extra_pad * 0.5;
+ }
+ vec2 aa_outset = aa_bloat_direction * aa_bloatradius;
+ vec2 vertexpos = (corner + radius_outset * radii) + aa_outset;
+ mat2 skewmatrix = mat2(skew.xy, skew.zw);
+ vec2 devcoord = vertexpos * skewmatrix + translate;
+ if (0.0 != is_linear_coverage) {
+ varccoord_Stage0.xy = vec2(0.0, coverage);
+ } else {
+ vec2 arccoord = (1.0 - abs(radius_outset)) + (aa_outset / radii) * corner;
+ varccoord_Stage0.xy = vec2(arccoord.x + 1.0, arccoord.y);
+ }
+ gl_Position = vec4(devcoord.x, devcoord.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/4-65.shader_test b/shaders/skia/4-65.shader_test
new file mode 100644
index 0000000..32e90f8
--- /dev/null
+++ b/shaders/skia/4-65.shader_test
@@ -0,0 +1,90 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 uscale01_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias01_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale23_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias23_Stage1_c0_c0_c1_c0;
+uniform float uthreshold_Stage1_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage2_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 RadialGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = length(vTransformedCoords_0_Stage0);
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 DualIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthreshold_Stage1_c0_c0_c1_c0) {
+ scale = uscale01_Stage1_c0_c0_c1_c0;
+ bias = ubias01_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale23_Stage1_c0_c0_c1_c0;
+ bias = ubias23_Stage1_c0_c0_c1_c0;
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = RadialGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = DualIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c1_c0;
+ }
+ return _output;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_src_over(ConstColorProcessor_Stage2_c1_c0(vec4(1.0)), output_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/4-66.shader_test b/shaders/skia/4-66.shader_test
new file mode 100644
index 0000000..3ded20a
--- /dev/null
+++ b/shaders/skia/4-66.shader_test
@@ -0,0 +1,98 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 uscale01_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias01_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale23_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias23_Stage1_c0_c0_c1_c0;
+uniform float uthreshold_Stage1_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage2_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 RadialGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = length(vTransformedCoords_0_Stage0);
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 DualIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthreshold_Stage1_c0_c0_c1_c0) {
+ scale = uscale01_Stage1_c0_c0_c1_c0;
+ bias = ubias01_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale23_Stage1_c0_c0_c1_c0;
+ bias = ubias23_Stage1_c0_c0_c1_c0;
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = RadialGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = DualIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c1_c0;
+ }
+ return _output;
+}
+float _blend_overlay_component(float sc, float sa, float dc, float da) {
+ if (2.0 * dc <= da) {
+ return (2.0 * sc) * dc;
+ }
+ return sa * da - (2.0 * (da - dc)) * (sa - sc);
+}
+vec4 blend_overlay(vec4 src, vec4 dst) {
+ vec4 result = vec4(_blend_overlay_component(src.x, src.w, dst.x, dst.w), _blend_overlay_component(src.y, src.w, dst.y, dst.w), _blend_overlay_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+ result.xyz += dst.xyz * (1.0 - src.w) + src.xyz * (1.0 - dst.w);
+ return result;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_overlay(ConstColorProcessor_Stage2_c1_c0(vec4(1.0)), output_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/4-67.shader_test b/shaders/skia/4-67.shader_test
new file mode 100644
index 0000000..6464014
--- /dev/null
+++ b/shaders/skia/4-67.shader_test
@@ -0,0 +1,54 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TextureEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ float nonZeroAlpha = max(output_Stage1.w, 9.9999997473787516e-05);
+ vec4 coord = vec4(output_Stage1.xyz / nonZeroAlpha, nonZeroAlpha);
+ coord = coord * 0.9960939884185791 + vec4(0.0019529999699443579, 0.0019529999699443579, 0.0019529999699443579, 0.0019529999699443579);
+ output_Stage2.w = texture(uTextureSampler_0_Stage2, vec2(coord.w, 0.125)).w;
+ output_Stage2.x = texture(uTextureSampler_0_Stage2, vec2(coord.x, 0.375)).w;
+ output_Stage2.y = texture(uTextureSampler_0_Stage2, vec2(coord.y, 0.625)).w;
+ output_Stage2.z = texture(uTextureSampler_0_Stage2, vec2(coord.z, 0.875)).w;
+ output_Stage2.xyz *= output_Stage2.w;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/4-7.shader_test b/shaders/skia/4-7.shader_test
new file mode 100644
index 0000000..be4a00f
--- /dev/null
+++ b/shaders/skia/4-7.shader_test
@@ -0,0 +1,35 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform sampler2D uTextureSampler_0_Stage0;
+noperspective in vec2 vlocalCoord_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vec4(1.0);
+ vec2 texCoord;
+ texCoord = vlocalCoord_Stage0;
+ outputColor_Stage0 = texture(uTextureSampler_0_Stage0, texCoord);
+ }
+ {
+ sk_FragColor = outputColor_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vlocalCoord_Stage0;
+void main() {
+ vlocalCoord_Stage0 = localCoord;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/4-73.shader_test b/shaders/skia/4-73.shader_test
new file mode 100644
index 0000000..3de5b55
--- /dev/null
+++ b/shaders/skia/4-73.shader_test
@@ -0,0 +1,46 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uColor_Stage0;
+noperspective in vec3 vDashParam_Stage0;
+noperspective in vec2 vCircleParams_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = uColor_Stage0;
+ float xShifted = vDashParam_Stage0.x - floor(vDashParam_Stage0.x / vDashParam_Stage0.z) * vDashParam_Stage0.z;
+ vec2 fragPosShifted = vec2(xShifted, vDashParam_Stage0.y);
+ vec2 center = vec2(vCircleParams_Stage0.y, 0.0);
+ float dist = length(center - fragPosShifted);
+ float diff = dist - vCircleParams_Stage0.x;
+ diff = 1.0 - diff;
+ float alpha = clamp(diff, 0.0, 1.0);
+ outputCoverage_Stage0 = vec4(alpha);
+ }
+ {
+ sk_FragColor = outputColor_Stage0 * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 inPosition;
+in vec3 inDashParams;
+in vec2 inCircleParams;
+noperspective out vec3 vDashParam_Stage0;
+noperspective out vec2 vCircleParams_Stage0;
+void main() {
+ vDashParam_Stage0 = inDashParams;
+ vCircleParams_Stage0 = inCircleParams;
+ vec2 pos2 = inPosition;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/4-77.shader_test b/shaders/skia/4-77.shader_test
new file mode 100644
index 0000000..4025205
--- /dev/null
+++ b/shaders/skia/4-77.shader_test
@@ -0,0 +1,56 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+noperspective in vec2 vEllipseOffsets_Stage0;
+noperspective in vec4 vEllipseRadii_Stage0;
+noperspective in vec4 vinColor_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vinColor_Stage0;
+ vec2 offset = vEllipseOffsets_Stage0;
+ offset *= vEllipseRadii_Stage0.xy;
+ float test = dot(offset, offset) - 1.0;
+ vec2 grad = (2.0 * offset) * vEllipseRadii_Stage0.xy;
+ float grad_dot = dot(grad, grad);
+ grad_dot = max(grad_dot, 1.1754999560161448e-38);
+ float invlen = inversesqrt(grad_dot);
+ float edgeAlpha = clamp(0.5 - test * invlen, 0.0, 1.0);
+ offset = vEllipseOffsets_Stage0 * vEllipseRadii_Stage0.zw;
+ test = dot(offset, offset) - 1.0;
+ grad = (2.0 * offset) * vEllipseRadii_Stage0.zw;
+ grad_dot = dot(grad, grad);
+ invlen = inversesqrt(grad_dot);
+ edgeAlpha *= clamp(0.5 + test * invlen, 0.0, 1.0);
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ {
+ sk_FragColor = outputColor_Stage0 * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 inPosition;
+in vec4 inColor;
+in vec2 inEllipseOffset;
+in vec4 inEllipseRadii;
+noperspective out vec2 vEllipseOffsets_Stage0;
+noperspective out vec4 vEllipseRadii_Stage0;
+noperspective out vec4 vinColor_Stage0;
+void main() {
+ vEllipseOffsets_Stage0 = inEllipseOffset;
+ vEllipseRadii_Stage0 = inEllipseRadii;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = inPosition;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/4-86.shader_test b/shaders/skia/4-86.shader_test
new file mode 100644
index 0000000..6fc7af8
--- /dev/null
+++ b/shaders/skia/4-86.shader_test
@@ -0,0 +1,66 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uColor_Stage0;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec2 pos2 = (uViewM_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ {
+ vec2 _posTmp = pos2;
+ _posTmp = floor(_posTmp) + vec2(0.5, 0.5);
+ gl_Position = vec4(_posTmp, 0.0, 1.0);
+ }
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/4-90.shader_test b/shaders/skia/4-90.shader_test
new file mode 100644
index 0000000..003a51c
--- /dev/null
+++ b/shaders/skia/4-90.shader_test
@@ -0,0 +1,50 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uborder_Stage1;
+uniform vec4 usubset_Stage1;
+uniform vec4 uclamp_Stage1;
+uniform vec4 unorm_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ vec2 inCoord = vTransformedCoords_0_Stage0;
+ inCoord *= unorm_Stage1.xy;
+ vec2 subsetCoord;
+ subsetCoord.x = inCoord.x;
+ subsetCoord.y = inCoord.y;
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage1.x, uclamp_Stage1.z);
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage1.y, uclamp_Stage1.w);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord * unorm_Stage1.zw);
+ float errX = subsetCoord.x - clampedCoord.x;
+ float errY = subsetCoord.y - clampedCoord.y;
+ textureColor = mix(textureColor, uborder_Stage1, min(abs(errX), 1.0));
+ textureColor = mix(textureColor, uborder_Stage1, min(abs(errY), 1.0));
+ output_Stage1 = textureColor;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/4-93.shader_test b/shaders/skia/4-93.shader_test
new file mode 100644
index 0000000..08beab8
--- /dev/null
+++ b/shaders/skia/4-93.shader_test
@@ -0,0 +1,44 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+noperspective in vec4 vinCircleEdge_Stage0;
+noperspective in vec4 vinColor_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ vec4 circleEdge;
+ circleEdge = vinCircleEdge_Stage0;
+ outputColor_Stage0 = vinColor_Stage0;
+ float d = length(circleEdge.xy);
+ float distanceToOuterEdge = circleEdge.z * (1.0 - d);
+ float edgeAlpha = clamp(distanceToOuterEdge, 0.0, 1.0);
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ {
+ sk_FragColor = outputColor_Stage0 * outputCoverage_Stage0;
+ sk_FragColor = sk_FragColor.wwww;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 inPosition;
+in vec4 inColor;
+in vec4 inCircleEdge;
+noperspective out vec4 vinCircleEdge_Stage0;
+noperspective out vec4 vinColor_Stage0;
+void main() {
+ vinCircleEdge_Stage0 = inCircleEdge;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = inPosition;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/4-97.shader_test b/shaders/skia/4-97.shader_test
new file mode 100644
index 0000000..96bb82b
--- /dev/null
+++ b/shaders/skia/4-97.shader_test
@@ -0,0 +1,59 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform vec4 uKernel_Stage1[2];
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0 - 3.0 * uImageIncrement_Stage1;
+ vec2 coordSampled = vec2(0.0, 0.0);
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].z;
+ coord += uImageIncrement_Stage1;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ sk_FragColor = sk_FragColor.wwww;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/4.shader_test b/shaders/skia/4.shader_test
new file mode 100644
index 0000000..73b48b7
--- /dev/null
+++ b/shaders/skia/4.shader_test
@@ -0,0 +1,48 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+noperspective in vec4 vQuadEdge_Stage0;
+noperspective in vec4 vinColor_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vinColor_Stage0;
+ float edgeAlpha;
+ vec2 duvdx = dFdx(vQuadEdge_Stage0.xy);
+ vec2 duvdy = -dFdy(vQuadEdge_Stage0.xy);
+ if (vQuadEdge_Stage0.z > 0.0 && vQuadEdge_Stage0.w > 0.0) {
+ edgeAlpha = min(min(vQuadEdge_Stage0.z, vQuadEdge_Stage0.w) + 0.5, 1.0);
+ } else {
+ vec2 gF = vec2((2.0 * vQuadEdge_Stage0.x) * duvdx.x - duvdx.y, (2.0 * vQuadEdge_Stage0.x) * duvdy.x - duvdy.y);
+ edgeAlpha = vQuadEdge_Stage0.x * vQuadEdge_Stage0.x - vQuadEdge_Stage0.y;
+ edgeAlpha = clamp(0.5 - edgeAlpha / length(gF), 0.0, 1.0);
+ }
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ {
+ sk_FragColor = outputColor_Stage0 * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 inPosition;
+in vec4 inColor;
+in vec4 inQuadEdge;
+noperspective out vec4 vQuadEdge_Stage0;
+noperspective out vec4 vinColor_Stage0;
+void main() {
+ vQuadEdge_Stage0 = inQuadEdge;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = inPosition;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/40-1.shader_test b/shaders/skia/40-1.shader_test
new file mode 100644
index 0000000..0ad6f27
--- /dev/null
+++ b/shaders/skia/40-1.shader_test
@@ -0,0 +1,49 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uColor_Stage0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 TextureEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = uColor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_dst_in(outputColor_Stage0, TextureEffect_Stage1_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/40-12.shader_test b/shaders/skia/40-12.shader_test
new file mode 100644
index 0000000..1e37a49
--- /dev/null
+++ b/shaders/skia/40-12.shader_test
@@ -0,0 +1,63 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uborder_Stage1;
+uniform vec4 usubset_Stage1;
+uniform vec4 uclamp_Stage1;
+uniform vec4 unorm_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+flat in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec2 inCoord = vTransformedCoords_0_Stage0;
+ inCoord *= unorm_Stage1.xy;
+ vec2 subsetCoord;
+ subsetCoord.x = inCoord.x;
+ {
+ float w = usubset_Stage1.w - usubset_Stage1.y;
+ float w2 = 2.0 * w;
+ float m = mod(inCoord.y - usubset_Stage1.y, w2);
+ subsetCoord.y = mix(m, w2 - m, step(w, m)) + usubset_Stage1.y;
+ }
+ vec2 clampedCoord;
+ clampedCoord.x = subsetCoord.x;
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage1.y, uclamp_Stage1.w);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord * unorm_Stage1.zw);
+ if (inCoord.x < usubset_Stage1.x || inCoord.x > usubset_Stage1.z) {
+ textureColor = uborder_Stage1;
+ }
+ output_Stage1 = outputColor_Stage0 * textureColor;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec2 inLocalCoords;
+in vec4 color;
+flat out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vcolor_Stage0 = color;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoords, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/40-14.shader_test b/shaders/skia/40-14.shader_test
new file mode 100644
index 0000000..f3a107f
--- /dev/null
+++ b/shaders/skia/40-14.shader_test
@@ -0,0 +1,111 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 uscale01_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias01_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale23_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias23_Stage1_c0_c0_c1_c0;
+uniform float uthreshold_Stage1_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage2_c1_c0_c0_c0;
+uniform vec4 ucolor_Stage2_c2_c0_c0_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 RadialGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = length(vTransformedCoords_0_Stage0);
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 DualIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthreshold_Stage1_c0_c0_c1_c0) {
+ scale = uscale01_Stage1_c0_c0_c1_c0;
+ bias = ubias01_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale23_Stage1_c0_c0_c1_c0;
+ bias = ubias23_Stage1_c0_c0_c1_c0;
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = RadialGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = DualIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c1_c0_c0_c0;
+ }
+ return _output;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 ComposeOne_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_src_over(ConstColorProcessor_Stage2_c1_c0_c0_c0(vec4(1.0)), _input);
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c2_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c2_c0_c0_c0;
+ }
+ return _output;
+}
+vec4 blend_dst_out(vec4 src, vec4 dst) {
+ return (1.0 - src.w) * dst;
+}
+vec4 ComposeOne_Stage2_c2_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_dst_out(ConstColorProcessor_Stage2_c2_c0_c0_c0(vec4(1.0)), _input);
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = ComposeOne_Stage2_c2_c0(ComposeOne_Stage2_c1_c0(output_Stage1));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/40-15.shader_test b/shaders/skia/40-15.shader_test
new file mode 100644
index 0000000..3b5853f
--- /dev/null
+++ b/shaders/skia/40-15.shader_test
@@ -0,0 +1,131 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 uscale01_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias01_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale23_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias23_Stage1_c0_c0_c1_c0;
+uniform float uthreshold_Stage1_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage2_c1_c0_c0_c0;
+uniform vec4 ucolor_Stage2_c2_c0_c0_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 RadialGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = length(vTransformedCoords_0_Stage0);
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 DualIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthreshold_Stage1_c0_c0_c1_c0) {
+ scale = uscale01_Stage1_c0_c0_c1_c0;
+ bias = ubias01_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale23_Stage1_c0_c0_c1_c0;
+ bias = ubias23_Stage1_c0_c0_c1_c0;
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = RadialGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = DualIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c1_c0_c0_c0;
+ }
+ return _output;
+}
+float _blend_overlay_component(float sc, float sa, float dc, float da) {
+ if (2.0 * dc <= da) {
+ return (2.0 * sc) * dc;
+ }
+ return sa * da - (2.0 * (da - dc)) * (sa - sc);
+}
+vec4 blend_overlay(vec4 src, vec4 dst) {
+ vec4 result = vec4(_blend_overlay_component(src.x, src.w, dst.x, dst.w), _blend_overlay_component(src.y, src.w, dst.y, dst.w), _blend_overlay_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+ result.xyz += dst.xyz * (1.0 - src.w) + src.xyz * (1.0 - dst.w);
+ return result;
+}
+vec4 ComposeOne_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_overlay(ConstColorProcessor_Stage2_c1_c0_c0_c0(vec4(1.0)), _input);
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c2_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c2_c0_c0_c0;
+ }
+ return _output;
+}
+float _guarded_divide(float n, float d) {
+ return n / d;
+}
+float _color_burn_component(float sc, float sa, float dc, float da) {
+ if (da == dc) {
+ return (sa * da + sc * (1.0 - da)) + dc * (1.0 - sa);
+ } else if (sc == 0.0) {
+ return dc * (1.0 - sa);
+ }
+ float d = max(0.0, da - _guarded_divide((da - dc) * sa, sc));
+ return (d * sa + sc * (1.0 - da)) + dc * (1.0 - sa);
+}
+vec4 blend_color_burn(vec4 src, vec4 dst) {
+ return vec4(_color_burn_component(src.x, src.w, dst.x, dst.w), _color_burn_component(src.y, src.w, dst.y, dst.w), _color_burn_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+}
+vec4 ComposeOne_Stage2_c2_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_color_burn(ConstColorProcessor_Stage2_c2_c0_c0_c0(vec4(1.0)), _input);
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = ComposeOne_Stage2_c2_c0(ComposeOne_Stage2_c1_c0(output_Stage1));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/40-16.shader_test b/shaders/skia/40-16.shader_test
new file mode 100644
index 0000000..6bb6231
--- /dev/null
+++ b/shaders/skia/40-16.shader_test
@@ -0,0 +1,62 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uColor_Stage0;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec2 pos2 = (uViewM_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/40-17.shader_test b/shaders/skia/40-17.shader_test
new file mode 100644
index 0000000..de1a2c1
--- /dev/null
+++ b/shaders/skia/40-17.shader_test
@@ -0,0 +1,90 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage0;
+noperspective in vec2 vTextureCoords_Stage0;
+flat in int vTexIndex_Stage0;
+noperspective in vec4 vinColor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vinColor_Stage0;
+ vec4 texColor;
+ {
+ texColor = texture(uTextureSampler_0_Stage0, vTextureCoords_Stage0);
+ }
+ outputCoverage_Stage0 = texColor;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_dst_in(outputColor_Stage0, ClampedGradientEffect_Stage1_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage1 * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform vec2 uAtlasSizeInv_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in uvec2 inTextureCoords;
+noperspective out vec2 vTextureCoords_Stage0;
+flat out int vTexIndex_Stage0;
+noperspective out vec4 vinColor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ ivec2 signedCoords = ivec2(int(inTextureCoords.x), int(inTextureCoords.y));
+ vec2 unormTexCoords = vec2(float(signedCoords.x / 2), float(signedCoords.y / 2));
+ vTextureCoords_Stage0 = unormTexCoords * uAtlasSizeInv_Stage0;
+ vTexIndex_Stage0 = 0;
+ vinColor_Stage0 = inColor;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(inPosition.x, inPosition.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/40-2.shader_test b/shaders/skia/40-2.shader_test
new file mode 100644
index 0000000..4b713aa
--- /dev/null
+++ b/shaders/skia/40-2.shader_test
@@ -0,0 +1,50 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 TextureEffect_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage2, vTransformedCoords_1_Stage0) * _input;
+ return _output;
+}
+vec4 blend_plus(vec4 src, vec4 dst) {
+ return min(src + dst, 1.0);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_plus(output_Stage1, TextureEffect_Stage2_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/40-22.shader_test b/shaders/skia/40-22.shader_test
new file mode 100644
index 0000000..d684466
--- /dev/null
+++ b/shaders/skia/40-22.shader_test
@@ -0,0 +1,44 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uinnerRect_Stage1;
+uniform vec2 uradiusPlusHalf_Stage1;
+flat in vec4 vcolor_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec2 dxy0 = uinnerRect_Stage1.xy - gl_FragCoord.xy;
+ float dx1 = gl_FragCoord.x - uinnerRect_Stage1.z;
+ vec2 dxy = max(vec2(max(dxy0.x, dx1), dxy0.y), 0.0);
+ float bottomAlpha = clamp(uinnerRect_Stage1.w - gl_FragCoord.y, 0.0, 1.0);
+ float alpha = bottomAlpha * clamp(uradiusPlusHalf_Stage1.x - length(dxy), 0.0, 1.0);
+ output_Stage1 = vec4(alpha);
+ }
+ {
+ sk_FragColor = outputColor_Stage0 * output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 position;
+in vec4 color;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/40-23.shader_test b/shaders/skia/40-23.shader_test
new file mode 100644
index 0000000..39befa3
--- /dev/null
+++ b/shaders/skia/40-23.shader_test
@@ -0,0 +1,88 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 uscale01_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias01_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale23_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias23_Stage1_c0_c0_c1_c0;
+uniform float uthreshold_Stage1_c0_c0_c1_c0;
+noperspective in vec4 vinCircleEdge_Stage0;
+noperspective in vec4 vinColor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 RadialGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = length(vTransformedCoords_0_Stage0);
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 DualIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthreshold_Stage1_c0_c0_c1_c0) {
+ scale = uscale01_Stage1_c0_c0_c1_c0;
+ bias = ubias01_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale23_Stage1_c0_c0_c1_c0;
+ bias = ubias23_Stage1_c0_c0_c1_c0;
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = RadialGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = DualIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ vec4 circleEdge;
+ circleEdge = vinCircleEdge_Stage0;
+ float d = length(circleEdge.xy);
+ float distanceToOuterEdge = circleEdge.z * (1.0 - d);
+ float edgeAlpha = clamp(distanceToOuterEdge, 0.0, 1.0);
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1 * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec4 inCircleEdge;
+noperspective out vec4 vinCircleEdge_Stage0;
+noperspective out vec4 vinColor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vinCircleEdge_Stage0 = inCircleEdge;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/40-25.shader_test b/shaders/skia/40-25.shader_test
new file mode 100644
index 0000000..eff357d
--- /dev/null
+++ b/shaders/skia/40-25.shader_test
@@ -0,0 +1,41 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform float uPixelSize_Stage1;
+uniform vec2 uRange_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = vec4(1.0, 1.0, 1.0, 1.0);
+ vec2 coord = vTransformedCoords_0_Stage0;
+ coord.x -= 2.0 * uPixelSize_Stage1;
+ for (int i = 0;i < 5; i++) {
+ output_Stage1 = min(output_Stage1, texture(uTextureSampler_0_Stage1, coord));
+ coord.x += uPixelSize_Stage1;
+ }
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/40-26.shader_test b/shaders/skia/40-26.shader_test
new file mode 100644
index 0000000..0c5b354
--- /dev/null
+++ b/shaders/skia/40-26.shader_test
@@ -0,0 +1,77 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_dst_in(outputColor_Stage0, ClampedGradientEffect_Stage1_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/40-27.shader_test b/shaders/skia/40-27.shader_test
new file mode 100644
index 0000000..1ee4098
--- /dev/null
+++ b/shaders/skia/40-27.shader_test
@@ -0,0 +1,44 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform float uPixelSize_Stage1;
+uniform vec2 uRange_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0;
+ coord.y -= 8.0 * uPixelSize_Stage1;
+ float highBound = min(uRange_Stage1.y, coord.y + 16.0 * uPixelSize_Stage1);
+ coord.y = max(uRange_Stage1.x, coord.y);
+ for (int i = 0;i < 17; i++) {
+ output_Stage1 = max(output_Stage1, texture(uTextureSampler_0_Stage1, coord));
+ coord.y += uPixelSize_Stage1;
+ coord.y = min(highBound, coord.y);
+ }
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/40-28.shader_test b/shaders/skia/40-28.shader_test
new file mode 100644
index 0000000..f47be9f
--- /dev/null
+++ b/shaders/skia/40-28.shader_test
@@ -0,0 +1,135 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform float uSurfaceScale_Stage1;
+uniform vec3 uLightColor_Stage1;
+uniform float uKD_Stage1;
+uniform vec3 uLightDirection_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 light_Stage1(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ float colorScale = uKD_Stage1 * dot(normal, surfaceToLight);
+ return vec4(lightColor * clamp(colorScale, 0.0, 1.0), 1.0);
+}
+float sobel_Stage1(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage1(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage1(float m[9], float surfaceScale) {
+ return pointToNormal_Stage1(sobel_Stage1(0.0, 0.0, m[3], m[4], m[6], m[7], 0.66666698455810547), sobel_Stage1(m[3], m[6], m[4], m[7], 0.0, 0.0, 0.66666698455810547), surfaceScale);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ vec2 coord = vTransformedCoords_0_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp0 = textureColor;
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp1 = textureColor;
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp2 = textureColor;
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp3 = textureColor;
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp4 = textureColor;
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp5 = textureColor;
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp6 = textureColor;
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp7 = textureColor;
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp8 = textureColor;
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = uLightDirection_Stage1;
+ output_Stage1 = light_Stage1(normal_Stage1(m, uSurfaceScale_Stage1), surfaceToLight, uLightColor_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/40-29.shader_test b/shaders/skia/40-29.shader_test
new file mode 100644
index 0000000..e9261dd
--- /dev/null
+++ b/shaders/skia/40-29.shader_test
@@ -0,0 +1,67 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec2 uDstTextureUpperLeft_Stage1;
+uniform vec2 uDstTextureCoordScale_Stage1;
+uniform sampler2D uTextureSampler_0_Stage0;
+uniform sampler2D uDstTextureSampler_Stage1;
+noperspective in vec2 vTextureCoords_Stage0;
+flat in int vTexIndex_Stage0;
+noperspective in vec4 vinColor_Stage0;
+vec4 blend_xor(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src + (1.0 - src.w) * dst;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vinColor_Stage0;
+ vec4 texColor;
+ {
+ texColor = texture(uTextureSampler_0_Stage0, vTextureCoords_Stage0);
+ }
+ outputCoverage_Stage0 = texColor;
+ }
+ {
+ if (all(lessThanEqual(outputCoverage_Stage0.xyz, vec3(0.0)))) {
+ discard;
+ }
+ vec2 _dstTexCoord = (gl_FragCoord.xy - uDstTextureUpperLeft_Stage1) * uDstTextureCoordScale_Stage1;
+ _dstTexCoord.y = 1.0 - _dstTexCoord.y;
+ vec4 _dstColor = texture(uDstTextureSampler_Stage1, _dstTexCoord);
+ sk_FragColor = blend_xor(outputColor_Stage0, _dstColor);
+ float lerpRed = mix(_dstColor.w, sk_FragColor.w, outputCoverage_Stage0.x);
+ float lerpBlue = mix(_dstColor.w, sk_FragColor.w, outputCoverage_Stage0.y);
+ float lerpGreen = mix(_dstColor.w, sk_FragColor.w, outputCoverage_Stage0.z);
+ sk_FragColor = outputCoverage_Stage0 * sk_FragColor + (vec4(1.0) - outputCoverage_Stage0) * _dstColor;
+ sk_FragColor.w = max(max(lerpRed, lerpBlue), lerpGreen);
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform vec2 uAtlasSizeInv_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in uvec2 inTextureCoords;
+noperspective out vec2 vTextureCoords_Stage0;
+flat out int vTexIndex_Stage0;
+noperspective out vec4 vinColor_Stage0;
+void main() {
+ ivec2 signedCoords = ivec2(int(inTextureCoords.x), int(inTextureCoords.y));
+ vec2 unormTexCoords = vec2(float(signedCoords.x / 2), float(signedCoords.y / 2));
+ vTextureCoords_Stage0 = unormTexCoords * uAtlasSizeInv_Stage0;
+ vTexIndex_Stage0 = 0;
+ vinColor_Stage0 = inColor;
+ gl_Position = vec4(inPosition.x, inPosition.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/40-3.shader_test b/shaders/skia/40-3.shader_test
new file mode 100644
index 0000000..0b1563d
--- /dev/null
+++ b/shaders/skia/40-3.shader_test
@@ -0,0 +1,102 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uclamp_Stage1_c0_c0_c0_c0;
+uniform vec4 uclamp_Stage1_c0_c0_c1_c0;
+uniform vec4 uclamp_Stage1_c0_c0_c2_c0;
+uniform mat3 ucolorSpaceMatrix_Stage1_c0_c0;
+uniform vec3 ucolorSpaceTranslate_Stage1_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+uniform sampler2D uTextureSampler_2_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 inCoord = vTransformedCoords_0_Stage0;
+ vec2 subsetCoord;
+ subsetCoord.x = inCoord.x;
+ subsetCoord.y = inCoord.y;
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage1_c0_c0_c0_c0.x, uclamp_Stage1_c0_c0_c0_c0.z);
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage1_c0_c0_c0_c0.y, uclamp_Stage1_c0_c0_c0_c0.w);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ _output = _input * textureColor;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 inCoord = vTransformedCoords_1_Stage0;
+ vec2 subsetCoord;
+ subsetCoord.x = inCoord.x;
+ subsetCoord.y = inCoord.y;
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage1_c0_c0_c1_c0.x, uclamp_Stage1_c0_c0_c1_c0.z);
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage1_c0_c0_c1_c0.y, uclamp_Stage1_c0_c0_c1_c0.w);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ _output = _input * textureColor;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c0_c0_c2_c0(vec4 _input) {
+ vec4 _output;
+ vec2 inCoord = vTransformedCoords_2_Stage0;
+ vec2 subsetCoord;
+ subsetCoord.x = inCoord.x;
+ subsetCoord.y = inCoord.y;
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage1_c0_c0_c2_c0.x, uclamp_Stage1_c0_c0_c2_c0.z);
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage1_c0_c0_c2_c0.y, uclamp_Stage1_c0_c0_c2_c0.w);
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ _output = _input * textureColor;
+ return _output;
+}
+vec4 YUVtoRGBEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 planes[3];
+ planes[0] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0));
+ planes[1] = TextureEffect_Stage1_c0_c0_c1_c0(vec4(1.0));
+ planes[2] = TextureEffect_Stage1_c0_c0_c2_c0(vec4(1.0));
+ vec4 color = vec4(planes[0].x, planes[1].x, planes[2].x, 1.0);
+ color.xyz = clamp(color.xyz * ucolorSpaceMatrix_Stage1_c0_c0 + ucolorSpaceTranslate_Stage1_c0_c0, 0.0, 1.0);
+ _output = color;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = YUVtoRGBEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/40-30.shader_test b/shaders/skia/40-30.shader_test
new file mode 100644
index 0000000..f76b991
--- /dev/null
+++ b/shaders/skia/40-30.shader_test
@@ -0,0 +1,114 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform vec2 uBounds_Stage1;
+uniform vec4 uKernel_Stage1[5];
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0 - 9.0 * uImageIncrement_Stage1;
+ vec2 coordSampled = vec2(0.0, 0.0);
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[4].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[4].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[4].z;
+ coord += uImageIncrement_Stage1;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/40-36.shader_test b/shaders/skia/40-36.shader_test
new file mode 100644
index 0000000..2db121f
--- /dev/null
+++ b/shaders/skia/40-36.shader_test
@@ -0,0 +1,44 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform float uPixelSize_Stage1;
+uniform vec2 uRange_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0;
+ coord.x -= uPixelSize_Stage1;
+ float highBound = min(uRange_Stage1.y, coord.x + 2.0 * uPixelSize_Stage1);
+ coord.x = max(uRange_Stage1.x, coord.x);
+ for (int i = 0;i < 3; i++) {
+ output_Stage1 = max(output_Stage1, texture(uTextureSampler_0_Stage1, coord));
+ coord.x += uPixelSize_Stage1;
+ coord.x = min(highBound, coord.x);
+ }
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/40-43.shader_test b/shaders/skia/40-43.shader_test
new file mode 100644
index 0000000..c6d4386
--- /dev/null
+++ b/shaders/skia/40-43.shader_test
@@ -0,0 +1,106 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform vec2 uBounds_Stage1;
+uniform vec4 uKernel_Stage1[5];
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0 - 8.0 * uImageIncrement_Stage1;
+ vec2 coordSampled = vec2(0.0, 0.0);
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage1.x, uBounds_Stage1.y - uBounds_Stage1.x) + uBounds_Stage1.x;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage1.x, uBounds_Stage1.y - uBounds_Stage1.x) + uBounds_Stage1.x;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage1.x, uBounds_Stage1.y - uBounds_Stage1.x) + uBounds_Stage1.x;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage1.x, uBounds_Stage1.y - uBounds_Stage1.x) + uBounds_Stage1.x;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage1.x, uBounds_Stage1.y - uBounds_Stage1.x) + uBounds_Stage1.x;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage1.x, uBounds_Stage1.y - uBounds_Stage1.x) + uBounds_Stage1.x;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage1.x, uBounds_Stage1.y - uBounds_Stage1.x) + uBounds_Stage1.x;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage1.x, uBounds_Stage1.y - uBounds_Stage1.x) + uBounds_Stage1.x;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage1.x, uBounds_Stage1.y - uBounds_Stage1.x) + uBounds_Stage1.x;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage1.x, uBounds_Stage1.y - uBounds_Stage1.x) + uBounds_Stage1.x;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage1.x, uBounds_Stage1.y - uBounds_Stage1.x) + uBounds_Stage1.x;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage1.x, uBounds_Stage1.y - uBounds_Stage1.x) + uBounds_Stage1.x;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage1.x, uBounds_Stage1.y - uBounds_Stage1.x) + uBounds_Stage1.x;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage1.x, uBounds_Stage1.y - uBounds_Stage1.x) + uBounds_Stage1.x;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage1.x, uBounds_Stage1.y - uBounds_Stage1.x) + uBounds_Stage1.x;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage1.x, uBounds_Stage1.y - uBounds_Stage1.x) + uBounds_Stage1.x;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage1.x, uBounds_Stage1.y - uBounds_Stage1.x) + uBounds_Stage1.x;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[4].x;
+ coord += uImageIncrement_Stage1;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/40-45.shader_test b/shaders/skia/40-45.shader_test
new file mode 100644
index 0000000..e9b1199
--- /dev/null
+++ b/shaders/skia/40-45.shader_test
@@ -0,0 +1,39 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+flat in vec4 vcolor_Stage0;
+noperspective in float vcoverage_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ float coverage = vcoverage_Stage0;
+ outputCoverage_Stage0 = vec4(coverage);
+ }
+ {
+ sk_FragColor = (1.0 - outputColor_Stage0.w) * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 position;
+in float coverage;
+in vec4 color;
+flat out vec4 vcolor_Stage0;
+noperspective out float vcoverage_Stage0;
+void main() {
+ vec2 position = position;
+ vcolor_Stage0 = color;
+ vcoverage_Stage0 = coverage;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/40-48.shader_test b/shaders/skia/40-48.shader_test
new file mode 100644
index 0000000..559afe6
--- /dev/null
+++ b/shaders/skia/40-48.shader_test
@@ -0,0 +1,109 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform float ubias_Stage1_c0_c0_c0_c0;
+uniform float uscale_Stage1_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 SweepGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float angle;
+ {
+ angle = atan(-vTransformedCoords_0_Stage0.y, -vTransformedCoords_0_Stage0.x);
+ }
+ float t = ((angle * 0.15915493667125702 + 0.5) + ubias_Stage1_c0_c0_c0_c0) * uscale_Stage1_c0_c0_c0_c0;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = SweepGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_1_Stage0.x);
+ uint y = uint(vTransformedCoords_1_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ output_Stage2 = vec4(clamp(output_Stage2.xyz + value * 0.0039215688593685627, 0.0, output_Stage2.w), output_Stage2.w);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/40-49.shader_test b/shaders/skia/40-49.shader_test
new file mode 100644
index 0000000..aa349e0
--- /dev/null
+++ b/shaders/skia/40-49.shader_test
@@ -0,0 +1,124 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_0_Stage0;
+ float t = -1.0;
+ float v = 1.0;
+ {
+ {
+ float invR1 = ufocalParams_Stage1_c0_c0_c0_c0.x;
+ float x_t = -1.0;
+ {
+ float temp = p.x * p.x - p.y * p.y;
+ if (temp >= 0.0) {
+ {
+ x_t = -sqrt(temp) - p.x * invR1;
+ }
+ }
+ }
+ {
+ if (x_t <= 0.0) {
+ v = -1.0;
+ }
+ }
+ {
+ {
+ t = x_t;
+ }
+ }
+ {
+ t = 1.0 - t;
+ }
+ }
+ }
+ _output = vec4(t, v, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/40-5.shader_test b/shaders/skia/40-5.shader_test
new file mode 100644
index 0000000..440a57b
--- /dev/null
+++ b/shaders/skia/40-5.shader_test
@@ -0,0 +1,90 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform mat4 um_Stage2;
+uniform vec4 uv_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+uniform sampler2D uTextureSampler_2_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_1_Stage1, vTransformedCoords_1_Stage0) * _input;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c0_c0_c2_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_2_Stage1, vTransformedCoords_2_Stage0) * _input;
+ return _output;
+}
+vec4 YUVtoRGBEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 planes[3];
+ planes[0] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0));
+ planes[1] = TextureEffect_Stage1_c0_c0_c1_c0(vec4(1.0));
+ planes[2] = TextureEffect_Stage1_c0_c0_c2_c0(vec4(1.0));
+ vec4 color = vec4(planes[0].x, planes[1].y, planes[1].x, planes[2].w);
+ color.xyz *= color.w;
+ _output = color;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = YUVtoRGBEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ vec4 inputColor = output_Stage1;
+ {
+ float nonZeroAlpha = max(inputColor.w, 9.9999997473787516e-05);
+ inputColor = vec4(inputColor.xyz / nonZeroAlpha, inputColor.w);
+ }
+ output_Stage2 = um_Stage2 * inputColor + uv_Stage2;
+ {
+ output_Stage2 = clamp(output_Stage2, 0.0, 1.0);
+ }
+ {
+ output_Stage2.xyz *= output_Stage2.w;
+ }
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/40-50.shader_test b/shaders/skia/40-50.shader_test
new file mode 100644
index 0000000..809768e
--- /dev/null
+++ b/shaders/skia/40-50.shader_test
@@ -0,0 +1,99 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_0_Stage0;
+ float t = -1.0;
+ {
+ {
+ float r0 = ufocalParams_Stage1_c0_c0_c0_c0.x;
+ {
+ t = -length(p) - r0;
+ }
+ }
+ }
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/40-51.shader_test b/shaders/skia/40-51.shader_test
new file mode 100644
index 0000000..3302bcd
--- /dev/null
+++ b/shaders/skia/40-51.shader_test
@@ -0,0 +1,139 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_0_Stage0;
+ float t = -1.0;
+ float v = 1.0;
+ {
+ {
+ float invR1 = ufocalParams_Stage1_c0_c0_c0_c0.x;
+ float x_t = -1.0;
+ {
+ float temp = p.x * p.x - p.y * p.y;
+ if (temp >= 0.0) {
+ {
+ x_t = -sqrt(temp) - p.x * invR1;
+ }
+ }
+ }
+ {
+ if (x_t <= 0.0) {
+ v = -1.0;
+ }
+ }
+ {
+ {
+ t = x_t;
+ }
+ }
+ {
+ t = 1.0 - t;
+ }
+ }
+ }
+ _output = vec4(t, v, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TiledGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_1_Stage0.x);
+ uint y = uint(vTransformedCoords_1_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ output_Stage2 = vec4(clamp(output_Stage2.xyz + value * 0.0039215688593685627, 0.0, output_Stage2.w), output_Stage2.w);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/40-52.shader_test b/shaders/skia/40-52.shader_test
new file mode 100644
index 0000000..ad6acec
--- /dev/null
+++ b/shaders/skia/40-52.shader_test
@@ -0,0 +1,114 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_0_Stage0;
+ float t = -1.0;
+ {
+ {
+ float r0 = ufocalParams_Stage1_c0_c0_c0_c0.x;
+ {
+ t = -length(p) - r0;
+ }
+ }
+ }
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TiledGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_1_Stage0.x);
+ uint y = uint(vTransformedCoords_1_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ output_Stage2 = vec4(clamp(output_Stage2.xyz + value * 0.0039215688593685627, 0.0, output_Stage2.w), output_Stage2.w);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/40-53.shader_test b/shaders/skia/40-53.shader_test
new file mode 100644
index 0000000..a29cd1f
--- /dev/null
+++ b/shaders/skia/40-53.shader_test
@@ -0,0 +1,137 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_0_Stage0;
+ float t = -1.0;
+ float v = 1.0;
+ {
+ {
+ float invR1 = ufocalParams_Stage1_c0_c0_c0_c0.x;
+ float x_t = -1.0;
+ {
+ float temp = p.x * p.x - p.y * p.y;
+ if (temp >= 0.0) {
+ {
+ x_t = -sqrt(temp) - p.x * invR1;
+ }
+ }
+ }
+ {
+ if (x_t <= 0.0) {
+ v = -1.0;
+ }
+ }
+ {
+ {
+ t = x_t;
+ }
+ }
+ {
+ t = 1.0 - t;
+ }
+ }
+ }
+ _output = vec4(t, v, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else {
+ {
+ t.x = fract(t.x);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TiledGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_1_Stage0.x);
+ uint y = uint(vTransformedCoords_1_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ output_Stage2 = vec4(clamp(output_Stage2.xyz + value * 0.0039215688593685627, 0.0, output_Stage2.w), output_Stage2.w);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/40-54.shader_test b/shaders/skia/40-54.shader_test
new file mode 100644
index 0000000..da1853f
--- /dev/null
+++ b/shaders/skia/40-54.shader_test
@@ -0,0 +1,112 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_0_Stage0;
+ float t = -1.0;
+ {
+ {
+ float r0 = ufocalParams_Stage1_c0_c0_c0_c0.x;
+ {
+ t = -length(p) - r0;
+ }
+ }
+ }
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else {
+ {
+ t.x = fract(t.x);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TiledGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_1_Stage0.x);
+ uint y = uint(vTransformedCoords_1_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ output_Stage2 = vec4(clamp(output_Stage2.xyz + value * 0.0039215688593685627, 0.0, output_Stage2.w), output_Stage2.w);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/40-55.shader_test b/shaders/skia/40-55.shader_test
new file mode 100644
index 0000000..eafd07b
--- /dev/null
+++ b/shaders/skia/40-55.shader_test
@@ -0,0 +1,140 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_0_Stage0;
+ float t = -1.0;
+ float v = 1.0;
+ {
+ {
+ float invR1 = ufocalParams_Stage1_c0_c0_c0_c0.x;
+ float x_t = -1.0;
+ {
+ float temp = p.x * p.x - p.y * p.y;
+ if (temp >= 0.0) {
+ {
+ x_t = -sqrt(temp) - p.x * invR1;
+ }
+ }
+ }
+ {
+ if (x_t <= 0.0) {
+ v = -1.0;
+ }
+ }
+ {
+ {
+ t = x_t;
+ }
+ }
+ {
+ t = 1.0 - t;
+ }
+ }
+ }
+ _output = vec4(t, v, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_1_Stage0.x);
+ uint y = uint(vTransformedCoords_1_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ output_Stage2 = vec4(clamp(output_Stage2.xyz + value * 0.0039215688593685627, 0.0, output_Stage2.w), output_Stage2.w);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/40-56.shader_test b/shaders/skia/40-56.shader_test
new file mode 100644
index 0000000..c4d4f76
--- /dev/null
+++ b/shaders/skia/40-56.shader_test
@@ -0,0 +1,115 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_0_Stage0;
+ float t = -1.0;
+ {
+ {
+ float r0 = ufocalParams_Stage1_c0_c0_c0_c0.x;
+ {
+ t = -length(p) - r0;
+ }
+ }
+ }
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_1_Stage0.x);
+ uint y = uint(vTransformedCoords_1_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ output_Stage2 = vec4(clamp(output_Stage2.xyz + value * 0.0039215688593685627, 0.0, output_Stage2.w), output_Stage2.w);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/40-57.shader_test b/shaders/skia/40-57.shader_test
new file mode 100644
index 0000000..96c7092
--- /dev/null
+++ b/shaders/skia/40-57.shader_test
@@ -0,0 +1,133 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+in float vcoverage_Stage0;
+flat in vec4 vgeomDomain_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_0_Stage0;
+ float t = -1.0;
+ {
+ {
+ float invR1 = ufocalParams_Stage1_c0_c0_c0_c0.x;
+ float fx = ufocalParams_Stage1_c0_c0_c0_c0.y;
+ float x_t = -1.0;
+ {
+ x_t = length(p) - p.x * invR1;
+ }
+ {
+ {
+ t = x_t + fx;
+ }
+ }
+ }
+ }
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ float coverage = vcoverage_Stage0 * gl_FragCoord.w;
+ vec4 geoDomain;
+ geoDomain = vgeomDomain_Stage0;
+ if (coverage < 0.5) {
+ vec4 dists4 = clamp(vec4(1.0, 1.0, -1.0, -1.0) * (gl_FragCoord.xyxy - geoDomain), 0.0, 1.0);
+ vec2 dists2 = dists4.xy * dists4.zw;
+ coverage = min(coverage, dists2.x * dists2.y);
+ }
+ outputCoverage_Stage0 = vec4(coverage);
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1 * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec4 positionWithCoverage;
+in vec4 color;
+in vec2 localCoord;
+in vec4 geomDomain;
+out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+out float vcoverage_Stage0;
+flat out vec4 vgeomDomain_Stage0;
+void main() {
+ vec3 position = positionWithCoverage.xyz;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ vcoverage_Stage0 = positionWithCoverage.w * positionWithCoverage.z;
+ vgeomDomain_Stage0 = geomDomain;
+ gl_Position = vec4(position.x, position.y, 0.0, position.z);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/40-58.shader_test b/shaders/skia/40-58.shader_test
new file mode 100644
index 0000000..7f41fa9
--- /dev/null
+++ b/shaders/skia/40-58.shader_test
@@ -0,0 +1,149 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+in vec2 vTransformedCoords_0_Stage0;
+in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+in float vcoverage_Stage0;
+flat in vec4 vgeomDomain_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_0_Stage0;
+ float t = -1.0;
+ {
+ {
+ float invR1 = ufocalParams_Stage1_c0_c0_c0_c0.x;
+ float fx = ufocalParams_Stage1_c0_c0_c0_c0.y;
+ float x_t = -1.0;
+ {
+ x_t = length(p) - p.x * invR1;
+ }
+ {
+ {
+ t = x_t + fx;
+ }
+ }
+ }
+ }
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ float coverage = vcoverage_Stage0 * gl_FragCoord.w;
+ vec4 geoDomain;
+ geoDomain = vgeomDomain_Stage0;
+ if (coverage < 0.5) {
+ vec4 dists4 = clamp(vec4(1.0, 1.0, -1.0, -1.0) * (gl_FragCoord.xyxy - geoDomain), 0.0, 1.0);
+ vec2 dists2 = dists4.xy * dists4.zw;
+ coverage = min(coverage, dists2.x * dists2.y);
+ }
+ outputCoverage_Stage0 = vec4(coverage);
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_1_Stage0.x);
+ uint y = uint(vTransformedCoords_1_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ output_Stage2 = vec4(clamp(output_Stage2.xyz + value * 0.0039215688593685627, 0.0, output_Stage2.w), output_Stage2.w);
+ }
+ {
+ sk_FragColor = output_Stage2 * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec4 positionWithCoverage;
+in vec4 color;
+in vec2 localCoord;
+in vec4 geomDomain;
+out vec2 vTransformedCoords_0_Stage0;
+out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+out float vcoverage_Stage0;
+flat out vec4 vgeomDomain_Stage0;
+void main() {
+ vec3 position = positionWithCoverage.xyz;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ vcoverage_Stage0 = positionWithCoverage.w * positionWithCoverage.z;
+ vgeomDomain_Stage0 = geomDomain;
+ gl_Position = vec4(position.x, position.y, 0.0, position.z);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/40-59.shader_test b/shaders/skia/40-59.shader_test
new file mode 100644
index 0000000..d878dcf
--- /dev/null
+++ b/shaders/skia/40-59.shader_test
@@ -0,0 +1,112 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+noperspective in vec3 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 vTransformedCoords_0_Stage0_ensure2D = vTransformedCoords_0_Stage0.xy / vTransformedCoords_0_Stage0.z;
+ vec2 p = vTransformedCoords_0_Stage0_ensure2D;
+ float t = -1.0;
+ {
+ {
+ float invR1 = ufocalParams_Stage1_c0_c0_c0_c0.x;
+ float fx = ufocalParams_Stage1_c0_c0_c0_c0.y;
+ float x_t = -1.0;
+ {
+ x_t = length(p) - p.x * invR1;
+ }
+ {
+ {
+ t = x_t + fx;
+ }
+ }
+ }
+ }
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec3 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0);
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/40-60.shader_test b/shaders/skia/40-60.shader_test
new file mode 100644
index 0000000..dc3f581
--- /dev/null
+++ b/shaders/skia/40-60.shader_test
@@ -0,0 +1,128 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+noperspective in vec3 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 vTransformedCoords_0_Stage0_ensure2D = vTransformedCoords_0_Stage0.xy / vTransformedCoords_0_Stage0.z;
+ vec2 p = vTransformedCoords_0_Stage0_ensure2D;
+ float t = -1.0;
+ {
+ {
+ float invR1 = ufocalParams_Stage1_c0_c0_c0_c0.x;
+ float fx = ufocalParams_Stage1_c0_c0_c0_c0.y;
+ float x_t = -1.0;
+ {
+ x_t = length(p) - p.x * invR1;
+ }
+ {
+ {
+ t = x_t + fx;
+ }
+ }
+ }
+ }
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_1_Stage0.x);
+ uint y = uint(vTransformedCoords_1_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ output_Stage2 = vec4(clamp(output_Stage2.xyz + value * 0.0039215688593685627, 0.0, output_Stage2.w), output_Stage2.w);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec3 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0);
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/40-67.shader_test b/shaders/skia/40-67.shader_test
new file mode 100644
index 0000000..3cd50de
--- /dev/null
+++ b/shaders/skia/40-67.shader_test
@@ -0,0 +1,67 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 TextureEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = TextureEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = OverrideInputFragmentProcessor_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 blend_xor(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src + (1.0 - src.w) * dst;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_xor(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec2 inLocalCoord;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 color = inColor;
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/40-68.shader_test b/shaders/skia/40-68.shader_test
new file mode 100644
index 0000000..b3ea38d
--- /dev/null
+++ b/shaders/skia/40-68.shader_test
@@ -0,0 +1,82 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 ucolor_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 TextureEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+vec4 ComposeOne_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_dst_in(_input, TextureEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0)));
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = ComposeOne_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 blend_plus(vec4 src, vec4 dst) {
+ return min(src + dst, 1.0);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_plus(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ {
+ output_Stage2 = output_Stage1 * ucolor_Stage2;
+ }
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 inColor;
+in vec2 inLocalCoord;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/40-69.shader_test b/shaders/skia/40-69.shader_test
new file mode 100644
index 0000000..01ce0fd
--- /dev/null
+++ b/shaders/skia/40-69.shader_test
@@ -0,0 +1,47 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 urectUniform_Stage1;
+flat in vec4 vcolor_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ float alpha;
+ {
+ alpha = float(all(greaterThan(vec4(gl_FragCoord.xy, urectUniform_Stage1.zw), vec4(urectUniform_Stage1.xy, gl_FragCoord.xy))) ? 1 : 0);
+ }
+ {
+ alpha = 1.0 - alpha;
+ }
+ output_Stage1 = vec4(alpha);
+ }
+ {
+ sk_FragColor = outputColor_Stage0 * output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 inPosition;
+in vec2 inLocalCoords;
+in vec4 color;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vcolor_Stage0 = color;
+ vec2 pos2 = inPosition;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/40-7.shader_test b/shaders/skia/40-7.shader_test
new file mode 100644
index 0000000..1e39b93
--- /dev/null
+++ b/shaders/skia/40-7.shader_test
@@ -0,0 +1,132 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.w) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ } else {
+ {
+ if (t < uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = OverrideInputFragmentProcessor_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 blend_src(vec4 src, vec4 dst) {
+ return src;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_src(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 inColor;
+in vec2 inLocalCoord;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/40-70.shader_test b/shaders/skia/40-70.shader_test
new file mode 100644
index 0000000..e3f51f4
--- /dev/null
+++ b/shaders/skia/40-70.shader_test
@@ -0,0 +1,64 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 urectUniform_Stage1;
+uniform sampler2D uTextureSampler_0_Stage0;
+noperspective in vec2 vTextureCoords_Stage0;
+flat in int vTexIndex_Stage0;
+noperspective in vec4 vinColor_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vinColor_Stage0;
+ vec4 texColor;
+ {
+ texColor = texture(uTextureSampler_0_Stage0, vTextureCoords_Stage0);
+ }
+ outputCoverage_Stage0 = texColor;
+ }
+ vec4 output_Stage1;
+ {
+ float alpha;
+ {
+ float xSub, ySub;
+ xSub = min(gl_FragCoord.x - urectUniform_Stage1.x, 0.0);
+ xSub += min(urectUniform_Stage1.z - gl_FragCoord.x, 0.0);
+ ySub = min(gl_FragCoord.y - urectUniform_Stage1.y, 0.0);
+ ySub += min(urectUniform_Stage1.w - gl_FragCoord.y, 0.0);
+ alpha = (1.0 + max(xSub, -1.0)) * (1.0 + max(ySub, -1.0));
+ }
+ output_Stage1 = outputCoverage_Stage0 * alpha;
+ }
+ {
+ sk_FragColor = outputColor_Stage0 * output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform vec2 uAtlasSizeInv_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in uvec2 inTextureCoords;
+noperspective out vec2 vTextureCoords_Stage0;
+flat out int vTexIndex_Stage0;
+noperspective out vec4 vinColor_Stage0;
+void main() {
+ ivec2 signedCoords = ivec2(int(inTextureCoords.x), int(inTextureCoords.y));
+ vec2 unormTexCoords = vec2(float(signedCoords.x / 2), float(signedCoords.y / 2));
+ vTextureCoords_Stage0 = unormTexCoords * uAtlasSizeInv_Stage0;
+ vTexIndex_Stage0 = 0;
+ vinColor_Stage0 = inColor;
+ gl_Position = vec4(inPosition.x, inPosition.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/40-71.shader_test b/shaders/skia/40-71.shader_test
new file mode 100644
index 0000000..8deec84
--- /dev/null
+++ b/shaders/skia/40-71.shader_test
@@ -0,0 +1,44 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform float uPixelSize_Stage1;
+uniform vec2 uRange_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0;
+ coord.x -= 7.0 * uPixelSize_Stage1;
+ float highBound = min(uRange_Stage1.y, coord.x + 14.0 * uPixelSize_Stage1);
+ coord.x = max(uRange_Stage1.x, coord.x);
+ for (int i = 0;i < 15; i++) {
+ output_Stage1 = max(output_Stage1, texture(uTextureSampler_0_Stage1, coord));
+ coord.x += uPixelSize_Stage1;
+ coord.x = min(highBound, coord.x);
+ }
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/40-72.shader_test b/shaders/skia/40-72.shader_test
new file mode 100644
index 0000000..d42a39f
--- /dev/null
+++ b/shaders/skia/40-72.shader_test
@@ -0,0 +1,124 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 uleftBorderColor_Stage1_c1_c0_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c1_c0_c0_c0;
+uniform vec4 ustart_Stage1_c1_c0_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c1_c0_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+vec4 ComposeOne_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_dst_in(_input, ClampedGradientEffect_Stage1_c0_c0_c0_c0(vec4(1.0)));
+ return _output;
+}
+vec4 LinearGradientLayout_Stage1_c1_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_1_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c1_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c1_c0_c0_c0_c1_c0 + t * uend_Stage1_c1_c0_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c1_c0_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c1_c0_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c1_c0_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c1_c0_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 ComposeOne_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_dst_in(_input, ClampedGradientEffect_Stage1_c1_c0_c0_c0(vec4(1.0)));
+ return _output;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_dst_in(ComposeOne_Stage1_c0_c0(inputColor), ComposeOne_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/40-74.shader_test b/shaders/skia/40-74.shader_test
new file mode 100644
index 0000000..0cdca2c
--- /dev/null
+++ b/shaders/skia/40-74.shader_test
@@ -0,0 +1,56 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uCoordTransformMatrix_0_Stage0;
+uniform vec4 ucircle_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0(vec4 _input, vec2 _coords) {
+ _coords = _coords * uCoordTransformMatrix_0_Stage0.xz + uCoordTransformMatrix_0_Stage0.yw;
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, _coords) * _input;
+ return _output;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TextureEffect_Stage1_c0_c0(vec4(1.0), gl_FragCoord.xy);
+ }
+ vec4 output_Stage2;
+ {
+ float d;
+ {
+ d = (1.0 - length((ucircle_Stage2.xy - gl_FragCoord.xy) * ucircle_Stage2.w)) * ucircle_Stage2.z;
+ }
+ {
+ output_Stage2 = output_Stage1 * clamp(d, 0.0, 1.0);
+ }
+ }
+ {
+ sk_FragColor = outputColor_Stage0 * output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 position;
+in vec4 color;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/40-77.shader_test b/shaders/skia/40-77.shader_test
new file mode 100644
index 0000000..e05194d
--- /dev/null
+++ b/shaders/skia/40-77.shader_test
@@ -0,0 +1,108 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 ustart_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 urectH_Stage2;
+uniform float uinvSixSigma_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c0_c0_c1_c0;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+vec4 ComposeOne_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_dst_in(_input, TiledGradientEffect_Stage1_c0_c0_c0_c0(vec4(1.0)));
+ return _output;
+}
+vec4 TextureEffect_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_1_Stage0) * _input;
+ return _output;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TextureEffect_Stage1_c1_c0(ComposeOne_Stage1_c0_c0(outputColor_Stage0));
+ }
+ vec4 output_Stage2;
+ {
+ float xCoverage, yCoverage;
+ {
+ float x, y;
+ {
+ x = max(urectH_Stage2.x - gl_FragCoord.x, gl_FragCoord.x - urectH_Stage2.z);
+ y = max(urectH_Stage2.y - gl_FragCoord.y, gl_FragCoord.y - urectH_Stage2.w);
+ }
+ xCoverage = texture(uTextureSampler_0_Stage2, vec2(x * uinvSixSigma_Stage2, 0.5)).w;
+ yCoverage = texture(uTextureSampler_0_Stage2, vec2(y * uinvSixSigma_Stage2, 0.5)).w;
+ output_Stage2 = vec4(xCoverage) * yCoverage;
+ }
+ output_Stage2 = vec4(xCoverage) * yCoverage;
+ }
+ {
+ sk_FragColor = output_Stage1 * output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/40-79.shader_test b/shaders/skia/40-79.shader_test
new file mode 100644
index 0000000..5dbe88e
--- /dev/null
+++ b/shaders/skia/40-79.shader_test
@@ -0,0 +1,68 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 urectH_Stage2;
+uniform float uinvSixSigma_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TextureEffect_Stage1_c0_c0(vec4(1.0));
+ output_Stage1.xyz *= outputColor_Stage0.xyz;
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ vec4 output_Stage2;
+ {
+ float xCoverage, yCoverage;
+ {
+ float x, y;
+ {
+ x = max(urectH_Stage2.x - gl_FragCoord.x, gl_FragCoord.x - urectH_Stage2.z);
+ y = max(urectH_Stage2.y - gl_FragCoord.y, gl_FragCoord.y - urectH_Stage2.w);
+ }
+ xCoverage = texture(uTextureSampler_0_Stage2, vec2(x * uinvSixSigma_Stage2, 0.5)).w;
+ yCoverage = texture(uTextureSampler_0_Stage2, vec2(y * uinvSixSigma_Stage2, 0.5)).w;
+ output_Stage2 = vec4(xCoverage) * yCoverage;
+ }
+ output_Stage2 = vec4(xCoverage) * yCoverage;
+ }
+ {
+ sk_FragColor = output_Stage1 * output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/40-85.shader_test b/shaders/skia/40-85.shader_test
new file mode 100644
index 0000000..9e2d62a
--- /dev/null
+++ b/shaders/skia/40-85.shader_test
@@ -0,0 +1,38 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform sampler2D uTextureSampler_0_Stage0;
+noperspective in vec2 vTextureCoords_Stage0;
+flat in int vTexIndex_Stage0;
+noperspective in vec4 vinColor_Stage0;
+void main() {
+ {
+ sk_FragColor = vec4(0.0);
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform vec2 uAtlasSizeInv_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in uvec2 inTextureCoords;
+noperspective out vec2 vTextureCoords_Stage0;
+flat out int vTexIndex_Stage0;
+noperspective out vec4 vinColor_Stage0;
+void main() {
+ ivec2 signedCoords = ivec2(int(inTextureCoords.x), int(inTextureCoords.y));
+ vec2 unormTexCoords = vec2(float(signedCoords.x / 2), float(signedCoords.y / 2));
+ vTextureCoords_Stage0 = unormTexCoords * uAtlasSizeInv_Stage0;
+ vTexIndex_Stage0 = 0;
+ vinColor_Stage0 = inColor;
+ gl_Position = vec4(inPosition.x, inPosition.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/40-86.shader_test b/shaders/skia/40-86.shader_test
new file mode 100644
index 0000000..98bed3d
--- /dev/null
+++ b/shaders/skia/40-86.shader_test
@@ -0,0 +1,54 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+noperspective in vec2 vEllipseOffsets_Stage0;
+noperspective in vec4 vEllipseRadii_Stage0;
+noperspective in vec4 vinColor_Stage0;
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ vec2 offset = vEllipseOffsets_Stage0;
+ offset *= vEllipseRadii_Stage0.xy;
+ float test = dot(offset, offset) - 1.0;
+ vec2 grad = (2.0 * offset) * vEllipseRadii_Stage0.xy;
+ float grad_dot = dot(grad, grad);
+ grad_dot = max(grad_dot, 1.1754999560161448e-38);
+ float invlen = inversesqrt(grad_dot);
+ float edgeAlpha = clamp(0.5 - test * invlen, 0.0, 1.0);
+ offset = vEllipseOffsets_Stage0 * vEllipseRadii_Stage0.zw;
+ test = dot(offset, offset) - 1.0;
+ grad = (2.0 * offset) * vEllipseRadii_Stage0.zw;
+ grad_dot = dot(grad, grad);
+ invlen = inversesqrt(grad_dot);
+ edgeAlpha *= clamp(0.5 + test * invlen, 0.0, 1.0);
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ {
+ sk_FragColor = outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 inPosition;
+in vec4 inColor;
+in vec2 inEllipseOffset;
+in vec4 inEllipseRadii;
+noperspective out vec2 vEllipseOffsets_Stage0;
+noperspective out vec4 vEllipseRadii_Stage0;
+noperspective out vec4 vinColor_Stage0;
+void main() {
+ vEllipseOffsets_Stage0 = inEllipseOffset;
+ vEllipseRadii_Stage0 = inEllipseRadii;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = inPosition;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/40-87.shader_test b/shaders/skia/40-87.shader_test
new file mode 100644
index 0000000..f8cc70e
--- /dev/null
+++ b/shaders/skia/40-87.shader_test
@@ -0,0 +1,84 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 ubaseFrequency_Stage2;
+uniform float uz_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+uniform sampler2D uTextureSampler_1_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec3 vTransformedCoords_1_Stage0;
+vec3 fade_Stage2(vec3 t) {
+ return ((t * t) * t) * (t * (t * 6.0 - 15.0) + 10.0);
+}
+float perm_Stage2(float x) {
+ return texture(uTextureSampler_0_Stage2, vec2(fract(x / 256.0), 0.0)).x * 255.0;
+}
+float grad_Stage2(float x, vec3 p) {
+ return dot(texture(uTextureSampler_1_Stage2, vec2(fract(x / 16.0), 0.0)).xyz * 255.0 - vec3(1.0), p);
+}
+float lerp_Stage2(float a, float b, float w) {
+ return a + w * (b - a);
+}
+float noise_Stage2(vec3 p) {
+ vec3 P = mod(floor(p), 256.0);
+ p -= floor(p);
+ vec3 f = fade_Stage2(p);
+ float A = perm_Stage2(P.x) + P.y;
+ float AA = perm_Stage2(A) + P.z;
+ float AB = perm_Stage2(A + 1.0) + P.z;
+ float B = perm_Stage2(P.x + 1.0) + P.y;
+ float BA = perm_Stage2(B) + P.z;
+ float BB = perm_Stage2(B + 1.0) + P.z;
+ float result = lerp_Stage2(lerp_Stage2(lerp_Stage2(grad_Stage2(perm_Stage2(AA), p), grad_Stage2(perm_Stage2(BA), p + vec3(-1.0, 0.0, 0.0)), f.x), lerp_Stage2(grad_Stage2(perm_Stage2(AB), p + vec3(0.0, -1.0, 0.0)), grad_Stage2(perm_Stage2(BB), p + vec3(-1.0, -1.0, 0.0)), f.x), f.y), lerp_Stage2(lerp_Stage2(grad_Stage2(perm_Stage2(AA + 1.0), p + vec3(0.0, 0.0, -1.0)), grad_Stage2(perm_Stage2(BA + 1.0), p + vec3(-1.0, 0.0, -1.0)), f.x), lerp_Stage2(grad_Stage2(perm_Stage2(AB + 1.0), p + vec3(0.0, -1.0, -1.0)), grad_Stage2(perm_Stage2(BB + 1.0), p + vec3(-1.0, -1.0, -1.0)), f.x), f.y), f.z);
+ return result;
+}
+float noiseOctaves_Stage2(vec3 p) {
+ float result = 0.0;
+ float ratio = 1.0;
+ for (float i = 0.0;i < 2.0; i++) {
+ result += noise_Stage2(p) / ratio;
+ p *= 2.0;
+ ratio *= 2.0;
+ }
+ return (result + 1.0) / 2.0;
+}
+void main() {
+ vec4 output_Stage2;
+ {
+ vec2 vTransformedCoords_1_Stage0_ensure2D = vTransformedCoords_1_Stage0.xy / vTransformedCoords_1_Stage0.z;
+ vec2 coords = vTransformedCoords_1_Stage0_ensure2D * ubaseFrequency_Stage2;
+ float r = noiseOctaves_Stage2(vec3(coords, uz_Stage2));
+ float g = noiseOctaves_Stage2(vec3(coords, uz_Stage2));
+ float b = noiseOctaves_Stage2(vec3(coords, uz_Stage2));
+ float a = noiseOctaves_Stage2(vec3(coords, uz_Stage2));
+ output_Stage2 = vec4(r, g, b, a);
+ output_Stage2 = clamp(output_Stage2, 0.0, 1.0);
+ output_Stage2 = vec4(output_Stage2.xyz * output_Stage2.www, output_Stage2.w);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec3 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0);
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/40-88.shader_test b/shaders/skia/40-88.shader_test
new file mode 100644
index 0000000..b0bf984
--- /dev/null
+++ b/shaders/skia/40-88.shader_test
@@ -0,0 +1,87 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uCoordTransformMatrix_2_Stage0;
+uniform vec4 usubset_Stage2_c0_c0;
+uniform vec4 uclamp_Stage2_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 TextureEffect_Stage2_c0_c0(vec4 _input, vec2 _coords) {
+ _coords = _coords * uCoordTransformMatrix_2_Stage0.xz + uCoordTransformMatrix_2_Stage0.yw;
+ vec4 _output;
+ vec2 inCoord = _coords;
+ vec2 subsetCoord;
+ subsetCoord.x = mod(inCoord.x - usubset_Stage2_c0_c0.x, usubset_Stage2_c0_c0.z - usubset_Stage2_c0_c0.x) + usubset_Stage2_c0_c0.x;
+ subsetCoord.y = mod(inCoord.y - usubset_Stage2_c0_c0.y, usubset_Stage2_c0_c0.w - usubset_Stage2_c0_c0.y) + usubset_Stage2_c0_c0.y;
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage2_c0_c0.x, uclamp_Stage2_c0_c0.z);
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage2_c0_c0.y, uclamp_Stage2_c0_c0.w);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ _output = _input * textureColor;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ vec2 coord = vTransformedCoords_1_Stage0 - vec2(0.5);
+ vec2 f = fract(coord);
+ coord += 0.5 - f;
+ vec4 wx = mat4(0.055555555555555552, 0.88888888888888884, 0.055555555555555552, 0.0, -0.5, 0.0, 0.5, 0.0, 0.83333333333333337, -2.0, 1.5, -0.33333333333333331, -0.3888888888888889, 1.1666666666666667, -1.1666666666666667, 0.3888888888888889) * vec4(1.0, f.x, f.x * f.x, (f.x * f.x) * f.x);
+ vec4 wy = mat4(0.055555555555555552, 0.88888888888888884, 0.055555555555555552, 0.0, -0.5, 0.0, 0.5, 0.0, 0.83333333333333337, -2.0, 1.5, -0.33333333333333331, -0.3888888888888889, 1.1666666666666667, -1.1666666666666667, 0.3888888888888889) * vec4(1.0, f.y, f.y * f.y, (f.y * f.y) * f.y);
+ vec4 rowColors[4];
+ rowColors[0] = TextureEffect_Stage2_c0_c0(vec4(1.0), coord + vec2(-1.0, -1.0));
+ rowColors[1] = TextureEffect_Stage2_c0_c0(vec4(1.0), coord + vec2(0.0, -1.0));
+ rowColors[2] = TextureEffect_Stage2_c0_c0(vec4(1.0), coord + vec2(1.0, -1.0));
+ rowColors[3] = TextureEffect_Stage2_c0_c0(vec4(1.0), coord + vec2(2.0, -1.0));
+ vec4 s0 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ rowColors[0] = TextureEffect_Stage2_c0_c0(vec4(1.0), coord + vec2(-1.0, 0.0));
+ rowColors[1] = TextureEffect_Stage2_c0_c0(vec4(1.0), coord);
+ rowColors[2] = TextureEffect_Stage2_c0_c0(vec4(1.0), coord + vec2(1.0, 0.0));
+ rowColors[3] = TextureEffect_Stage2_c0_c0(vec4(1.0), coord + vec2(2.0, 0.0));
+ vec4 s1 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ rowColors[0] = TextureEffect_Stage2_c0_c0(vec4(1.0), coord + vec2(-1.0, 1.0));
+ rowColors[1] = TextureEffect_Stage2_c0_c0(vec4(1.0), coord + vec2(0.0, 1.0));
+ rowColors[2] = TextureEffect_Stage2_c0_c0(vec4(1.0), coord + vec2(1.0, 1.0));
+ rowColors[3] = TextureEffect_Stage2_c0_c0(vec4(1.0), coord + vec2(2.0, 1.0));
+ vec4 s2 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ rowColors[0] = TextureEffect_Stage2_c0_c0(vec4(1.0), coord + vec2(-1.0, 2.0));
+ rowColors[1] = TextureEffect_Stage2_c0_c0(vec4(1.0), coord + vec2(0.0, 2.0));
+ rowColors[2] = TextureEffect_Stage2_c0_c0(vec4(1.0), coord + vec2(1.0, 2.0));
+ rowColors[3] = TextureEffect_Stage2_c0_c0(vec4(1.0), coord + vec2(2.0, 2.0));
+ vec4 s3 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ vec4 bicubicColor = ((wy.x * s0 + wy.y * s1) + wy.z * s2) + wy.w * s3;
+ bicubicColor.xyz = max(vec3(0.0), min(bicubicColor.xyz, bicubicColor.www));
+ output_Stage2 = bicubicColor * output_Stage1;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/40-9.shader_test b/shaders/skia/40-9.shader_test
new file mode 100644
index 0000000..9484a8a
--- /dev/null
+++ b/shaders/skia/40-9.shader_test
@@ -0,0 +1,62 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uborder_Stage1;
+uniform vec4 usubset_Stage1;
+uniform vec4 uclamp_Stage1;
+uniform vec4 unorm_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+flat in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec2 inCoord = vTransformedCoords_0_Stage0;
+ inCoord *= unorm_Stage1.xy;
+ vec2 subsetCoord;
+ subsetCoord.x = inCoord.x;
+ {
+ float w = usubset_Stage1.w - usubset_Stage1.y;
+ float w2 = 2.0 * w;
+ float m = mod(inCoord.y - usubset_Stage1.y, w2);
+ subsetCoord.y = mix(m, w2 - m, step(w, m)) + usubset_Stage1.y;
+ }
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage1.x, uclamp_Stage1.z);
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage1.y, uclamp_Stage1.w);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord * unorm_Stage1.zw);
+ float errX = subsetCoord.x - clampedCoord.x;
+ textureColor = mix(textureColor, uborder_Stage1, min(abs(errX), 1.0));
+ output_Stage1 = outputColor_Stage0 * textureColor;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec2 inLocalCoords;
+in vec4 color;
+flat out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vcolor_Stage0 = color;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoords, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/40.shader_test b/shaders/skia/40.shader_test
new file mode 100644
index 0000000..6a351e9
--- /dev/null
+++ b/shaders/skia/40.shader_test
@@ -0,0 +1,86 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uCoordTransformMatrix_1_Stage0;
+uniform vec4 uclamp_Stage1_c0_c0_c0_c0;
+uniform sampler2DRect uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0_c0_c0(vec4 _input, vec2 _coords) {
+ _coords = _coords * uCoordTransformMatrix_1_Stage0.xz + uCoordTransformMatrix_1_Stage0.yw;
+ vec4 _output;
+ vec2 inCoord = _coords;
+ vec2 subsetCoord;
+ subsetCoord.x = inCoord.x;
+ subsetCoord.y = inCoord.y;
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage1_c0_c0_c0_c0.x, uclamp_Stage1_c0_c0_c0_c0.z);
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage1_c0_c0_c0_c0.y, uclamp_Stage1_c0_c0_c0_c0.w);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ _output = _input * textureColor;
+ return _output;
+}
+vec4 Bicubic_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coord = vTransformedCoords_0_Stage0 - vec2(0.5);
+ vec2 f = fract(coord);
+ coord += 0.5 - f;
+ vec4 wx = mat4(0.055555555555555552, 0.88888888888888884, 0.055555555555555552, 0.0, -0.5, 0.0, 0.5, 0.0, 0.83333333333333337, -2.0, 1.5, -0.33333333333333331, -0.3888888888888889, 1.1666666666666667, -1.1666666666666667, 0.3888888888888889) * vec4(1.0, f.x, f.x * f.x, (f.x * f.x) * f.x);
+ vec4 wy = mat4(0.055555555555555552, 0.88888888888888884, 0.055555555555555552, 0.0, -0.5, 0.0, 0.5, 0.0, 0.83333333333333337, -2.0, 1.5, -0.33333333333333331, -0.3888888888888889, 1.1666666666666667, -1.1666666666666667, 0.3888888888888889) * vec4(1.0, f.y, f.y * f.y, (f.y * f.y) * f.y);
+ vec4 rowColors[4];
+ rowColors[0] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(-1.0, -1.0));
+ rowColors[1] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(0.0, -1.0));
+ rowColors[2] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(1.0, -1.0));
+ rowColors[3] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(2.0, -1.0));
+ vec4 s0 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ rowColors[0] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(-1.0, 0.0));
+ rowColors[1] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord);
+ rowColors[2] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(1.0, 0.0));
+ rowColors[3] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(2.0, 0.0));
+ vec4 s1 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ rowColors[0] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(-1.0, 1.0));
+ rowColors[1] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(0.0, 1.0));
+ rowColors[2] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(1.0, 1.0));
+ rowColors[3] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(2.0, 1.0));
+ vec4 s2 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ rowColors[0] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(-1.0, 2.0));
+ rowColors[1] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(0.0, 2.0));
+ rowColors[2] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(1.0, 2.0));
+ rowColors[3] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(2.0, 2.0));
+ vec4 s3 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ vec4 bicubicColor = ((wy.x * s0 + wy.y * s1) + wy.z * s2) + wy.w * s3;
+ bicubicColor = clamp(bicubicColor, 0.0, 1.0);
+ _output = bicubicColor * _input;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = Bicubic_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/400-2.shader_test b/shaders/skia/400-2.shader_test
new file mode 100644
index 0000000..b9f254c
--- /dev/null
+++ b/shaders/skia/400-2.shader_test
@@ -0,0 +1,49 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_KHR_blend_equation_advanced : require
+out vec4 sk_FragColor;
+layout (blend_support_all_equations) out ;
+uniform vec4 uColor_Stage0;
+noperspective in vec3 vDashParams_Stage0;
+noperspective in vec4 vRectParams_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = uColor_Stage0;
+ float xShifted = vDashParams_Stage0.x - floor(vDashParams_Stage0.x / vDashParams_Stage0.z) * vDashParams_Stage0.z;
+ vec2 fragPosShifted = vec2(xShifted, vDashParams_Stage0.y);
+ float xSub, ySub;
+ xSub = min(fragPosShifted.x - vRectParams_Stage0.x, 0.0);
+ xSub += min(vRectParams_Stage0.z - fragPosShifted.x, 0.0);
+ ySub = min(fragPosShifted.y - vRectParams_Stage0.y, 0.0);
+ ySub += min(vRectParams_Stage0.w - fragPosShifted.y, 0.0);
+ float alpha = (1.0 + max(xSub, -1.0)) * (1.0 + max(ySub, -1.0));
+ outputCoverage_Stage0 = vec4(alpha);
+ }
+ {
+ sk_FragColor = outputCoverage_Stage0 * outputColor_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 inPosition;
+in vec3 inDashParams;
+in vec4 inRect;
+noperspective out vec3 vDashParams_Stage0;
+noperspective out vec4 vRectParams_Stage0;
+void main() {
+ vDashParams_Stage0 = inDashParams;
+ vRectParams_Stage0 = inRect;
+ vec2 pos2 = inPosition;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/400-3.shader_test b/shaders/skia/400-3.shader_test
new file mode 100644
index 0000000..6e8dd57
--- /dev/null
+++ b/shaders/skia/400-3.shader_test
@@ -0,0 +1,47 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 TextureEffect_Stage2_c0_c0(vec4 _input, vec2 _coords) {
+ _coords = (uCoordTransformMatrix_1_Stage0 * vec3(_coords, 1.0)).xy;
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage2, _coords) * _input;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = TextureEffect_Stage2_c0_c0(output_Stage1, gl_FragCoord.xy);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/400-4.shader_test b/shaders/skia/400-4.shader_test
new file mode 100644
index 0000000..f9c4228
--- /dev/null
+++ b/shaders/skia/400-4.shader_test
@@ -0,0 +1,72 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 ClampFragmentProcessor_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ float alpha = clamp(_input.w, 0.0, 1.0);
+ _output = vec4(clamp(_input.xyz, 0.0, alpha), alpha);
+ }
+ return _output;
+}
+vec4 TextureEffect_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage2, vTransformedCoords_1_Stage0) * _input;
+ return _output;
+}
+float _guarded_divide(float n, float d) {
+ return n / d;
+}
+float _color_burn_component(float sc, float sa, float dc, float da) {
+ if (da == dc) {
+ return (sa * da + sc * (1.0 - da)) + dc * (1.0 - sa);
+ } else if (sc == 0.0) {
+ return dc * (1.0 - sa);
+ }
+ float d = max(0.0, da - _guarded_divide((da - dc) * sa, sc));
+ return (d * sa + sc * (1.0 - da)) + dc * (1.0 - sa);
+}
+vec4 blend_color_burn(vec4 src, vec4 dst) {
+ return vec4(_color_burn_component(src.x, src.w, dst.x, dst.w), _color_burn_component(src.y, src.w, dst.y, dst.w), _color_burn_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ vec4 inputColor = vec4(output_Stage1.xyz, 1.0);
+ output_Stage2 = blend_color_burn(ClampFragmentProcessor_Stage2_c0_c0(inputColor), TextureEffect_Stage2_c1_c0(inputColor));
+ output_Stage2 *= output_Stage1.w;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/400.shader_test b/shaders/skia/400.shader_test
new file mode 100644
index 0000000..48dc097
--- /dev/null
+++ b/shaders/skia/400.shader_test
@@ -0,0 +1,150 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage2;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.w) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ } else {
+ {
+ if (t < uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+vec4 ComposeOne_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_dst_in(_input, TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0)));
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = ComposeOne_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 blend_darken(vec4 src, vec4 dst) {
+ vec4 result = blend_src_over(src, dst);
+ result.xyz = min(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
+ return result;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_darken(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ {
+ output_Stage2 = output_Stage1 * ucolor_Stage2;
+ }
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 inColor;
+in vec2 inLocalCoord;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/403-2.shader_test b/shaders/skia/403-2.shader_test
new file mode 100644
index 0000000..8ca7be5
--- /dev/null
+++ b/shaders/skia/403-2.shader_test
@@ -0,0 +1,88 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_KHR_blend_equation_advanced : require
+out vec4 sk_FragColor;
+layout (blend_support_all_equations) out ;
+uniform vec2 ubaseFrequency_Stage1;
+uniform float uz_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec3 fade_Stage1(vec3 t) {
+ return ((t * t) * t) * (t * (t * 6.0 - 15.0) + 10.0);
+}
+float perm_Stage1(float x) {
+ return texture(uTextureSampler_0_Stage1, vec2(fract(x / 256.0), 0.0)).x * 255.0;
+}
+float grad_Stage1(float x, vec3 p) {
+ return dot(texture(uTextureSampler_1_Stage1, vec2(fract(x / 16.0), 0.0)).xyz * 255.0 - vec3(1.0), p);
+}
+float lerp_Stage1(float a, float b, float w) {
+ return a + w * (b - a);
+}
+float noise_Stage1(vec3 p) {
+ vec3 P = mod(floor(p), 256.0);
+ p -= floor(p);
+ vec3 f = fade_Stage1(p);
+ float A = perm_Stage1(P.x) + P.y;
+ float AA = perm_Stage1(A) + P.z;
+ float AB = perm_Stage1(A + 1.0) + P.z;
+ float B = perm_Stage1(P.x + 1.0) + P.y;
+ float BA = perm_Stage1(B) + P.z;
+ float BB = perm_Stage1(B + 1.0) + P.z;
+ float result = lerp_Stage1(lerp_Stage1(lerp_Stage1(grad_Stage1(perm_Stage1(AA), p), grad_Stage1(perm_Stage1(BA), p + vec3(-1.0, 0.0, 0.0)), f.x), lerp_Stage1(grad_Stage1(perm_Stage1(AB), p + vec3(0.0, -1.0, 0.0)), grad_Stage1(perm_Stage1(BB), p + vec3(-1.0, -1.0, 0.0)), f.x), f.y), lerp_Stage1(lerp_Stage1(grad_Stage1(perm_Stage1(AA + 1.0), p + vec3(0.0, 0.0, -1.0)), grad_Stage1(perm_Stage1(BA + 1.0), p + vec3(-1.0, 0.0, -1.0)), f.x), lerp_Stage1(grad_Stage1(perm_Stage1(AB + 1.0), p + vec3(0.0, -1.0, -1.0)), grad_Stage1(perm_Stage1(BB + 1.0), p + vec3(-1.0, -1.0, -1.0)), f.x), f.y), f.z);
+ return result;
+}
+float noiseOctaves_Stage1(vec3 p) {
+ float result = 0.0;
+ float ratio = 1.0;
+ for (float i = 0.0;i < 8.0; i++) {
+ result += noise_Stage1(p) / ratio;
+ p *= 2.0;
+ ratio *= 2.0;
+ }
+ return (result + 1.0) / 2.0;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec2 coords = vTransformedCoords_0_Stage0 * ubaseFrequency_Stage1;
+ float r = noiseOctaves_Stage1(vec3(coords, uz_Stage1));
+ float g = noiseOctaves_Stage1(vec3(coords, uz_Stage1));
+ float b = noiseOctaves_Stage1(vec3(coords, uz_Stage1));
+ float a = noiseOctaves_Stage1(vec3(coords, uz_Stage1));
+ output_Stage1 = vec4(r, g, b, a);
+ output_Stage1 = clamp(output_Stage1, 0.0, 1.0);
+ output_Stage1 = vec4(output_Stage1.xyz * output_Stage1.www, output_Stage1.w);
+ }
+ {
+ sk_FragColor = output_Stage1 * outputColor_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/403-3.shader_test b/shaders/skia/403-3.shader_test
new file mode 100644
index 0000000..24c0efd
--- /dev/null
+++ b/shaders/skia/403-3.shader_test
@@ -0,0 +1,44 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 Big_Ole_Key_Stage2_c0_c0(vec4 _input, vec2 _coords) {
+ vec4 _output;
+ _output = _input;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = Big_Ole_Key_Stage2_c0_c0(output_Stage1, gl_FragCoord.xy);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/403-4.shader_test b/shaders/skia/403-4.shader_test
new file mode 100644
index 0000000..02fc3cb
--- /dev/null
+++ b/shaders/skia/403-4.shader_test
@@ -0,0 +1,73 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 ucolor_Stage2_c0_c0;
+uniform mat4 um_Stage2_c1_c0;
+uniform vec4 uv_Stage2_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 ConstColorProcessor_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c0_c0;
+ }
+ return _output;
+}
+vec4 ColorMatrixFragmentProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = _input;
+ {
+ float nonZeroAlpha = max(inputColor.w, 9.9999997473787516e-05);
+ inputColor = vec4(inputColor.xyz / nonZeroAlpha, inputColor.w);
+ }
+ _output = um_Stage2_c1_c0 * inputColor + uv_Stage2_c1_c0;
+ {
+ _output = clamp(_output, 0.0, 1.0);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 blend_lighten(vec4 src, vec4 dst) {
+ vec4 result = blend_src_over(src, dst);
+ result.xyz = max(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
+ return result;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ vec4 inputColor = vec4(output_Stage1.xyz, 1.0);
+ output_Stage2 = blend_lighten(ConstColorProcessor_Stage2_c0_c0(inputColor), ColorMatrixFragmentProcessor_Stage2_c1_c0(inputColor));
+ output_Stage2 *= output_Stage1.w;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/403.shader_test b/shaders/skia/403.shader_test
new file mode 100644
index 0000000..9698707
--- /dev/null
+++ b/shaders/skia/403.shader_test
@@ -0,0 +1,73 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 ucolor_Stage1_c0_c0_c0_c0;
+uniform vec4 ucolor_Stage2;
+noperspective in vec4 vcolor_Stage0;
+vec4 ConstColorProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = _input.w * ucolor_Stage1_c0_c0_c0_c0;
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = ConstColorProcessor_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 blend_darken(vec4 src, vec4 dst) {
+ vec4 result = blend_src_over(src, dst);
+ result.xyz = min(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
+ return result;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_darken(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ {
+ output_Stage2 = output_Stage1 * ucolor_Stage2;
+ }
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 position;
+in vec4 inColor;
+noperspective out vec4 vcolor_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/406-2.shader_test b/shaders/skia/406-2.shader_test
new file mode 100644
index 0000000..18d1e1a
--- /dev/null
+++ b/shaders/skia/406-2.shader_test
@@ -0,0 +1,683 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_KHR_blend_equation_advanced : require
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+layout (blend_support_all_equations) out ;
+uniform vec2 uImageIncrement_Stage1_c0_c0_c0_c0;
+uniform vec4 uKernel_Stage1_c0_c0_c0_c0[6];
+uniform vec2 uKernelOffset_Stage1_c0_c0_c0_c0;
+uniform float uGain_Stage1_c0_c0_c0_c0;
+uniform float uBias_Stage1_c0_c0_c0_c0;
+uniform vec4 uTexDom_Stage1_c0_c0_c0_c0;
+uniform vec3 uDecalParams_Stage1_c0_c0_c0_c0;
+uniform mat4 um_Stage1_c0_c0_c1_c0_c0_c0;
+uniform vec4 uv_Stage1_c0_c0_c1_c0_c0_c0;
+uniform vec4 uinnerRect_Stage1_c0_c0_c1_c0_c1_c0;
+uniform vec4 uinvRadiiLTRB_Stage1_c0_c0_c1_c0_c1_c0;
+uniform vec3 uedges_Stage1_c1_c0_c0_c0_c0_c0[7];
+uniform vec4 ucircleData_Stage1_c1_c0_c0_c0_c1_c0;
+uniform vec4 uboundsUniform_Stage1_c1_c0_c1_c0;
+uniform float uxInvZoom_Stage1_c1_c0_c1_c0;
+uniform float uyInvZoom_Stage1_c1_c0_c1_c0;
+uniform float uxInvInset_Stage1_c1_c0_c1_c0;
+uniform float uyInvInset_Stage1_c1_c0_c1_c0;
+uniform vec2 uoffset_Stage1_c1_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+uniform sampler2D uTextureSampler_2_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 MatrixConvolution_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 sum = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0 - uKernelOffset_Stage1_c0_c0_c0_c0 * uImageIncrement_Stage1_c0_c0_c0_c0;
+ vec4 c;
+ {
+ float k = uKernel_Stage1_c0_c0_c0_c0[0].x;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c0_c0[0].y;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c0_c0[0].z;
+ {
+ vec2 origCoord = coord + vec2(2.0, 0.0) * uImageIncrement_Stage1_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c0_c0[0].w;
+ {
+ vec2 origCoord = coord + vec2(3.0, 0.0) * uImageIncrement_Stage1_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c0_c0[1].x;
+ {
+ vec2 origCoord = coord + vec2(4.0, 0.0) * uImageIncrement_Stage1_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c0_c0[1].y;
+ {
+ vec2 origCoord = coord + vec2(5.0, 0.0) * uImageIncrement_Stage1_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c0_c0[1].z;
+ {
+ vec2 origCoord = coord + vec2(6.0, 0.0) * uImageIncrement_Stage1_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c0_c0[1].w;
+ {
+ vec2 origCoord = coord + vec2(7.0, 0.0) * uImageIncrement_Stage1_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c0_c0[2].x;
+ {
+ vec2 origCoord = coord + vec2(8.0, 0.0) * uImageIncrement_Stage1_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c0_c0[2].y;
+ {
+ vec2 origCoord = coord + vec2(9.0, 0.0) * uImageIncrement_Stage1_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c0_c0[2].z;
+ {
+ vec2 origCoord = coord + vec2(10.0, 0.0) * uImageIncrement_Stage1_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c0_c0[2].w;
+ {
+ vec2 origCoord = coord + vec2(11.0, 0.0) * uImageIncrement_Stage1_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c0_c0[3].x;
+ {
+ vec2 origCoord = coord + vec2(12.0, 0.0) * uImageIncrement_Stage1_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c0_c0[3].y;
+ {
+ vec2 origCoord = coord + vec2(13.0, 0.0) * uImageIncrement_Stage1_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c0_c0[3].z;
+ {
+ vec2 origCoord = coord + vec2(14.0, 0.0) * uImageIncrement_Stage1_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c0_c0[3].w;
+ {
+ vec2 origCoord = coord + vec2(15.0, 0.0) * uImageIncrement_Stage1_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c0_c0[4].x;
+ {
+ vec2 origCoord = coord + vec2(16.0, 0.0) * uImageIncrement_Stage1_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c0_c0[4].y;
+ {
+ vec2 origCoord = coord + vec2(17.0, 0.0) * uImageIncrement_Stage1_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c0_c0[4].z;
+ {
+ vec2 origCoord = coord + vec2(18.0, 0.0) * uImageIncrement_Stage1_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c0_c0[4].w;
+ {
+ vec2 origCoord = coord + vec2(19.0, 0.0) * uImageIncrement_Stage1_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c0_c0[5].x;
+ {
+ vec2 origCoord = coord + vec2(20.0, 0.0) * uImageIncrement_Stage1_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c0_c0[5].y;
+ {
+ vec2 origCoord = coord + vec2(21.0, 0.0) * uImageIncrement_Stage1_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c0_c0[5].z;
+ {
+ vec2 origCoord = coord + vec2(22.0, 0.0) * uImageIncrement_Stage1_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c0_c0[5].w;
+ {
+ vec2 origCoord = coord + vec2(23.0, 0.0) * uImageIncrement_Stage1_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ vec2 origCoord = vTransformedCoords_0_Stage0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ _output.w = c.w;
+ _output.xyz = clamp(sum.xyz * uGain_Stage1_c0_c0_c0_c0 + uBias_Stage1_c0_c0_c0_c0, 0.0, 1.0);
+ _output.xyz *= _output.w;
+ _output *= _input;
+ return _output;
+}
+vec4 ColorMatrixFragmentProcessor_Stage1_c0_c0_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = _input;
+ _output = um_Stage1_c0_c0_c1_c0_c0_c0 * inputColor + uv_Stage1_c0_c0_c1_c0_c0_c0;
+ {
+ _output = clamp(_output, 0.0, 1.0);
+ }
+ return _output;
+}
+vec4 EllipticalRRect_Stage1_c0_c0_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 dxy0 = uinnerRect_Stage1_c0_c0_c1_c0_c1_c0.xy - gl_FragCoord.xy;
+ vec2 dxy1 = gl_FragCoord.xy - uinnerRect_Stage1_c0_c0_c1_c0_c1_c0.zw;
+ vec2 dxy = max(max(dxy0, dxy1), 0.0);
+ vec2 Z = max(max(dxy0 * uinvRadiiLTRB_Stage1_c0_c0_c1_c0_c1_c0.xy, dxy1 * uinvRadiiLTRB_Stage1_c0_c0_c1_c0_c1_c0.zw), 0.0);
+ float implicit = dot(Z, dxy) - 1.0;
+ float grad_dot = 4.0 * dot(Z, Z);
+ grad_dot = max(grad_dot, 9.9999997473787516e-05);
+ float approx_dist = implicit * inversesqrt(grad_dot);
+ float alpha = clamp(0.5 + approx_dist, 0.0, 1.0);
+ _output = _input * alpha;
+ return _output;
+}
+vec4 blend_src_out(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src;
+}
+vec4 ComposeTwo_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_src_out(ColorMatrixFragmentProcessor_Stage1_c0_c0_c1_c0_c0_c0(inputColor), EllipticalRRect_Stage1_c0_c0_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 blend_modulate(vec4 src, vec4 dst) {
+ return src * dst;
+}
+vec4 ComposeTwo_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_modulate(MatrixConvolution_Stage1_c0_c0_c0_c0(inputColor), ComposeTwo_Stage1_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 ConvexPoly_Stage1_c1_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float alpha = 1.0;
+ float edge;
+ edge = dot(uedges_Stage1_c1_c0_c0_c0_c0_c0[0], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage1_c1_c0_c0_c0_c0_c0[1], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage1_c1_c0_c0_c0_c0_c0[2], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage1_c1_c0_c0_c0_c0_c0[3], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage1_c1_c0_c0_c0_c0_c0[4], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage1_c1_c0_c0_c0_c0_c0[5], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage1_c1_c0_c0_c0_c0_c0[6], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ alpha = 1.0 - alpha;
+ _output = _input * alpha;
+ return _output;
+}
+vec4 CircleBlurFragmentProcessor_Stage1_c1_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 vec = vec2((gl_FragCoord.x - ucircleData_Stage1_c1_c0_c0_c0_c1_c0.x) * ucircleData_Stage1_c1_c0_c0_c0_c1_c0.w, (gl_FragCoord.y - ucircleData_Stage1_c1_c0_c0_c0_c1_c0.y) * ucircleData_Stage1_c1_c0_c0_c0_c1_c0.w);
+ float dist = length(vec) + (0.5 - ucircleData_Stage1_c1_c0_c0_c0_c1_c0.z) * ucircleData_Stage1_c1_c0_c0_c0_c1_c0.w;
+ _output = _input * texture(uTextureSampler_1_Stage1, vec2(dist, 0.5)).w;
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 ComposeTwo_Stage1_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_src_in(ConvexPoly_Stage1_c1_c0_c0_c0_c0_c0(inputColor), CircleBlurFragmentProcessor_Stage1_c1_c0_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 MagnifierEffect_Stage1_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coord = vTransformedCoords_1_Stage0;
+ vec2 zoom_coord = uoffset_Stage1_c1_c0_c1_c0 + coord * vec2(uxInvZoom_Stage1_c1_c0_c1_c0, uyInvZoom_Stage1_c1_c0_c1_c0);
+ vec2 delta = (coord - uboundsUniform_Stage1_c1_c0_c1_c0.xy) * uboundsUniform_Stage1_c1_c0_c1_c0.zw;
+ delta = min(delta, vec2(1.0, 1.0) - delta);
+ delta *= vec2(uxInvInset_Stage1_c1_c0_c1_c0, uyInvInset_Stage1_c1_c0_c1_c0);
+ float weight = 0.0;
+ if (delta.x < 2.0 && delta.y < 2.0) {
+ delta = vec2(2.0, 2.0) - delta;
+ float dist = length(delta);
+ dist = max(2.0 - dist, 0.0);
+ weight = min(dist * dist, 1.0);
+ } else {
+ vec2 delta_squared = delta * delta;
+ weight = min(min(delta_squared.x, delta_squared.y), 1.0);
+ }
+ _output = texture(uTextureSampler_2_Stage1, mix(coord, zoom_coord, weight));
+ return _output;
+}
+float _guarded_divide(float n, float d) {
+ return n / d;
+}
+float _soft_light_component(float sc, float sa, float dc, float da) {
+ if (2.0 * sc <= sa) {
+ return (_guarded_divide((dc * dc) * (sa - 2.0 * sc), da) + (1.0 - da) * sc) + dc * ((-sa + 2.0 * sc) + 1.0);
+ } else if (4.0 * dc <= da) {
+ float DSqd = dc * dc;
+ float DCub = DSqd * dc;
+ float DaSqd = da * da;
+ float DaCub = DaSqd * da;
+ return _guarded_divide(((DaSqd * (sc - dc * ((3.0 * sa - 6.0 * sc) - 1.0)) + ((12.0 * da) * DSqd) * (sa - 2.0 * sc)) - (16.0 * DCub) * (sa - 2.0 * sc)) - DaCub * sc, DaSqd);
+ }
+ return ((dc * ((sa - 2.0 * sc) + 1.0) + sc) - sqrt(da * dc) * (sa - 2.0 * sc)) - da * sc;
+}
+vec4 blend_soft_light(vec4 src, vec4 dst) {
+ if (dst.w == 0.0) {
+ return src;
+ }
+ return vec4(_soft_light_component(src.x, src.w, dst.x, dst.w), _soft_light_component(src.y, src.w, dst.y, dst.w), _soft_light_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+}
+vec4 ComposeTwo_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_soft_light(ComposeTwo_Stage1_c1_c0_c0_c0(inputColor), MagnifierEffect_Stage1_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 blend_xor(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src + (1.0 - src.w) * dst;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(vec4(1.0).xyz, 1.0);
+ output_Stage1 = blend_xor(ComposeTwo_Stage1_c0_c0(inputColor), ComposeTwo_Stage1_c1_c0(inputColor));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/406-3.shader_test b/shaders/skia/406-3.shader_test
new file mode 100644
index 0000000..bfc4285
--- /dev/null
+++ b/shaders/skia/406-3.shader_test
@@ -0,0 +1,51 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uinnerRect_Stage2_c0_c0;
+uniform vec2 uradiusPlusHalf_Stage2_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 CircularRRect_Stage2_c0_c0(vec4 _input, vec2 _coords) {
+ vec4 _output;
+ vec2 dxy0 = uinnerRect_Stage2_c0_c0.xy - gl_FragCoord.xy;
+ vec2 dxy1 = gl_FragCoord.xy - uinnerRect_Stage2_c0_c0.zw;
+ vec2 dxy = max(max(dxy0, dxy1), 0.0);
+ float alpha = clamp(uradiusPlusHalf_Stage2_c0_c0.x - length(dxy), 0.0, 1.0);
+ alpha = 1.0 - alpha;
+ _output = _input * alpha;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = CircularRRect_Stage2_c0_c0(output_Stage1, gl_FragCoord.xy);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/406-4.shader_test b/shaders/skia/406-4.shader_test
new file mode 100644
index 0000000..41f87a1
--- /dev/null
+++ b/shaders/skia/406-4.shader_test
@@ -0,0 +1,110 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uinnerRect_Stage2_c1_c0;
+uniform vec2 uradiusPlusHalf_Stage2_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 ClampFragmentProcessor_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ float alpha = clamp(_input.w, 0.0, 1.0);
+ _output = vec4(clamp(_input.xyz, 0.0, alpha), alpha);
+ }
+ return _output;
+}
+vec4 CircularRRect_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 dxy0 = uinnerRect_Stage2_c1_c0.xy - gl_FragCoord.xy;
+ vec2 dxy1 = gl_FragCoord.xy - uinnerRect_Stage2_c1_c0.zw;
+ vec2 dxy = max(max(dxy0, dxy1), 0.0);
+ float alpha = clamp(uradiusPlusHalf_Stage2_c1_c0.x - length(dxy), 0.0, 1.0);
+ _output = _input * alpha;
+ return _output;
+}
+float _blend_color_saturation(vec3 color) {
+ return max(max(color.x, color.y), color.z) - min(min(color.x, color.y), color.z);
+}
+vec3 _blend_set_color_saturation_helper(vec3 minMidMax, float sat) {
+ if (minMidMax.x < minMidMax.z) {
+ return vec3(0.0, (sat * (minMidMax.y - minMidMax.x)) / (minMidMax.z - minMidMax.x), sat);
+ }
+ return vec3(0.0);
+}
+vec3 _blend_set_color_saturation(vec3 hueLumColor, vec3 satColor) {
+ float sat = _blend_color_saturation(satColor);
+ if (hueLumColor.x <= hueLumColor.y) {
+ if (hueLumColor.y <= hueLumColor.z) {
+ hueLumColor.xyz = _blend_set_color_saturation_helper(hueLumColor, sat);
+ } else if (hueLumColor.x <= hueLumColor.z) {
+ hueLumColor.xzy = _blend_set_color_saturation_helper(hueLumColor.xzy, sat);
+ } else {
+ hueLumColor.zxy = _blend_set_color_saturation_helper(hueLumColor.zxy, sat);
+ }
+ } else if (hueLumColor.x <= hueLumColor.z) {
+ hueLumColor.yxz = _blend_set_color_saturation_helper(hueLumColor.yxz, sat);
+ } else if (hueLumColor.y <= hueLumColor.z) {
+ hueLumColor.yzx = _blend_set_color_saturation_helper(hueLumColor.yzx, sat);
+ } else {
+ hueLumColor.zyx = _blend_set_color_saturation_helper(hueLumColor.zyx, sat);
+ }
+ return hueLumColor;
+}
+float _blend_color_luminance(vec3 color) {
+ return dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), color);
+}
+vec3 _blend_set_color_luminance(vec3 hueSatColor, float alpha, vec3 lumColor) {
+ float lum = _blend_color_luminance(lumColor);
+ vec3 result = (lum - _blend_color_luminance(hueSatColor)) + hueSatColor;
+ float minComp = min(min(result.x, result.y), result.z);
+ float maxComp = max(max(result.x, result.y), result.z);
+ if (minComp < 0.0 && lum != minComp) {
+ result = lum + ((result - lum) * lum) / (lum - minComp);
+ }
+ if (maxComp > alpha && maxComp != lum) {
+ return lum + ((result - lum) * (alpha - lum)) / (maxComp - lum);
+ }
+ return result;
+}
+vec4 blend_saturation(vec4 src, vec4 dst) {
+ float alpha = dst.w * src.w;
+ vec3 sda = src.xyz * dst.w;
+ vec3 dsa = dst.xyz * src.w;
+ return vec4((((_blend_set_color_luminance(_blend_set_color_saturation(dsa, sda), alpha, dsa) + dst.xyz) - dsa) + src.xyz) - sda, (src.w + dst.w) - alpha);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ vec4 inputColor = vec4(output_Stage1.xyz, 1.0);
+ output_Stage2 = blend_saturation(ClampFragmentProcessor_Stage2_c0_c0(inputColor), CircularRRect_Stage2_c1_c0(inputColor));
+ output_Stage2 *= output_Stage1.w;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/406.shader_test b/shaders/skia/406.shader_test
new file mode 100644
index 0000000..534ab3b
--- /dev/null
+++ b/shaders/skia/406.shader_test
@@ -0,0 +1,162 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage2;
+uniform vec4 ucolor_Stage3_c1_c0;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.w) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ } else {
+ {
+ if (t < uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+vec4 ComposeOne_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_dst_in(_input, TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0)));
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = ComposeOne_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 ConstColorProcessor_Stage3_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage3_c1_c0;
+ }
+ return _output;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 blend_darken(vec4 src, vec4 dst) {
+ vec4 result = blend_src_over(src, dst);
+ result.xyz = min(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
+ return result;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_darken(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ {
+ output_Stage2 = output_Stage1 * ucolor_Stage2;
+ }
+ }
+ vec4 output_Stage3;
+ {
+ output_Stage3 = blend_darken(ConstColorProcessor_Stage3_c1_c0(vec4(1.0)), output_Stage2);
+ }
+ {
+ sk_FragColor = output_Stage3;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 inColor;
+in vec2 inLocalCoord;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/409-2.shader_test b/shaders/skia/409-2.shader_test
new file mode 100644
index 0000000..6017bb5
--- /dev/null
+++ b/shaders/skia/409-2.shader_test
@@ -0,0 +1,153 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_KHR_blend_equation_advanced : require
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+layout (blend_support_all_equations) out ;
+uniform vec4 uColor_Stage0;
+uniform float uCoverage_Stage0;
+uniform vec4 uinnerRect_Stage1_c0_c0_c1_c0;
+uniform vec2 uradiusPlusHalf_Stage1_c0_c0_c1_c0;
+uniform vec2 uScale_Stage1_c1_c0_c0_c0_c0_c0;
+uniform vec4 uTexDom_Stage1_c1_c0_c0_c0_c0_c0;
+uniform vec3 uDecalParams_Stage1_c1_c0_c0_c0_c0_c0;
+uniform vec4 uinnerRect_Stage1_c1_c0_c0_c0_c1_c0;
+uniform vec4 uinvRadiiLTRB_Stage1_c1_c0_c0_c0_c1_c0;
+uniform vec4 uinnerRect_Stage1_c1_c0_c1_c0;
+uniform vec2 uradiusPlusHalf_Stage1_c1_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 ConfigConversionEffect_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = floor(_input * 255.0 + 0.5) / 255.0;
+ {
+ _output.xyz = floor((_output.xyz * _output.w) * 255.0 + 0.5) / 255.0;
+ }
+ return _output;
+}
+vec4 CircularRRect_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 dxy0 = uinnerRect_Stage1_c0_c0_c1_c0.xy - gl_FragCoord.xy;
+ vec2 dxy1 = gl_FragCoord.xy - uinnerRect_Stage1_c0_c0_c1_c0.zw;
+ vec2 dxy = max(max(dxy0, dxy1), 0.0);
+ float alpha = clamp(uradiusPlusHalf_Stage1_c0_c0_c1_c0.x - length(dxy), 0.0, 1.0);
+ alpha = 1.0 - alpha;
+ _output = _input * alpha;
+ return _output;
+}
+vec4 blend_modulate(vec4 src, vec4 dst) {
+ return src * dst;
+}
+vec4 ComposeTwo_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_modulate(ConfigConversionEffect_Stage1_c0_c0_c0_c0(inputColor), CircularRRect_Stage1_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 DisplacementMap_Stage1_c1_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 dColor = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ dColor.xyz = dColor.w < 9.9999999747524271e-07 ? vec3(0.0) : clamp(dColor.xyz / dColor.w, 0.0, 1.0);
+ vec2 cCoords = vTransformedCoords_1_Stage0 + uScale_Stage1_c1_c0_c0_c0_c0_c0 * (dColor.zz - vec2(0.5));
+ {
+ vec2 origCoord = cCoords;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0_c0_c0.xy, uTexDom_Stage1_c1_c0_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ _output = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ return _output;
+}
+vec4 EllipticalRRect_Stage1_c1_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 dxy0 = uinnerRect_Stage1_c1_c0_c0_c0_c1_c0.xy - gl_FragCoord.xy;
+ vec2 dxy1 = gl_FragCoord.xy - uinnerRect_Stage1_c1_c0_c0_c0_c1_c0.zw;
+ vec2 dxy = max(max(dxy0, dxy1), 0.0);
+ vec2 Z = max(max(dxy0 * uinvRadiiLTRB_Stage1_c1_c0_c0_c0_c1_c0.xy, dxy1 * uinvRadiiLTRB_Stage1_c1_c0_c0_c0_c1_c0.zw), 0.0);
+ float implicit = dot(Z, dxy) - 1.0;
+ float grad_dot = 4.0 * dot(Z, Z);
+ grad_dot = max(grad_dot, 9.9999997473787516e-05);
+ float approx_dist = implicit * inversesqrt(grad_dot);
+ float alpha = clamp(0.5 + approx_dist, 0.0, 1.0);
+ _output = _input * alpha;
+ return _output;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 ComposeTwo_Stage1_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_src_over(DisplacementMap_Stage1_c1_c0_c0_c0_c0_c0(inputColor), EllipticalRRect_Stage1_c1_c0_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 CircularRRect_Stage1_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 dxy0 = uinnerRect_Stage1_c1_c0_c1_c0.xy - gl_FragCoord.xy;
+ vec2 dxy1 = gl_FragCoord.xy - uinnerRect_Stage1_c1_c0_c1_c0.zw;
+ vec2 dxy = max(max(dxy0, dxy1), 0.0);
+ float alpha = clamp(uradiusPlusHalf_Stage1_c1_c0_c1_c0.x - length(dxy), 0.0, 1.0);
+ alpha = 1.0 - alpha;
+ _output = _input * alpha;
+ return _output;
+}
+vec4 blend_src_atop(vec4 src, vec4 dst) {
+ return dst.w * src + (1.0 - src.w) * dst;
+}
+vec4 ComposeTwo_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_src_atop(ComposeTwo_Stage1_c1_c0_c0_c0(inputColor), CircularRRect_Stage1_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = uColor_Stage0;
+ outputCoverage_Stage0 = vec4(uCoverage_Stage0);
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_modulate(ComposeTwo_Stage1_c0_c0(inputColor), ComposeTwo_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ sk_FragColor = outputCoverage_Stage0 * output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 inPosition;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/409-3.shader_test b/shaders/skia/409-3.shader_test
new file mode 100644
index 0000000..cc2098d
--- /dev/null
+++ b/shaders/skia/409-3.shader_test
@@ -0,0 +1,50 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform mat4 um_Stage2_c0_c0;
+uniform vec4 uv_Stage2_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 ColorMatrixFragmentProcessor_Stage2_c0_c0(vec4 _input, vec2 _coords) {
+ vec4 _output;
+ vec4 inputColor = _input;
+ _output = um_Stage2_c0_c0 * inputColor + uv_Stage2_c0_c0;
+ {
+ _output.w = clamp(_output.w, 0.0, 1.0);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = ColorMatrixFragmentProcessor_Stage2_c0_c0(output_Stage1, gl_FragCoord.xy);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/409-4.shader_test b/shaders/skia/409-4.shader_test
new file mode 100644
index 0000000..d7f5bc9
--- /dev/null
+++ b/shaders/skia/409-4.shader_test
@@ -0,0 +1,110 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 ubaseFrequency_Stage2_c1_c0;
+uniform float uz_Stage2_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+uniform sampler2D uTextureSampler_1_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 ClampFragmentProcessor_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ float alpha = clamp(_input.w, 0.0, 1.0);
+ _output = vec4(clamp(_input.xyz, 0.0, alpha), alpha);
+ }
+ return _output;
+}
+vec3 fade_Stage2_c1_c0(vec3 t) {
+ return ((t * t) * t) * (t * (t * 6.0 - 15.0) + 10.0);
+}
+float perm_Stage2_c1_c0(float x) {
+ return texture(uTextureSampler_0_Stage2, vec2(fract(x / 256.0), 0.0)).x * 255.0;
+}
+float grad_Stage2_c1_c0(float x, vec3 p) {
+ return dot(texture(uTextureSampler_1_Stage2, vec2(fract(x / 16.0), 0.0)).xyz * 255.0 - vec3(1.0), p);
+}
+float lerp_Stage2_c1_c0(float a, float b, float w) {
+ return a + w * (b - a);
+}
+float noise_Stage2_c1_c0(vec3 p) {
+ vec3 P = mod(floor(p), 256.0);
+ p -= floor(p);
+ vec3 f = fade_Stage2_c1_c0(p);
+ float A = perm_Stage2_c1_c0(P.x) + P.y;
+ float AA = perm_Stage2_c1_c0(A) + P.z;
+ float AB = perm_Stage2_c1_c0(A + 1.0) + P.z;
+ float B = perm_Stage2_c1_c0(P.x + 1.0) + P.y;
+ float BA = perm_Stage2_c1_c0(B) + P.z;
+ float BB = perm_Stage2_c1_c0(B + 1.0) + P.z;
+ float result = lerp_Stage2_c1_c0(lerp_Stage2_c1_c0(lerp_Stage2_c1_c0(grad_Stage2_c1_c0(perm_Stage2_c1_c0(AA), p), grad_Stage2_c1_c0(perm_Stage2_c1_c0(BA), p + vec3(-1.0, 0.0, 0.0)), f.x), lerp_Stage2_c1_c0(grad_Stage2_c1_c0(perm_Stage2_c1_c0(AB), p + vec3(0.0, -1.0, 0.0)), grad_Stage2_c1_c0(perm_Stage2_c1_c0(BB), p + vec3(-1.0, -1.0, 0.0)), f.x), f.y), lerp_Stage2_c1_c0(lerp_Stage2_c1_c0(grad_Stage2_c1_c0(perm_Stage2_c1_c0(AA + 1.0), p + vec3(0.0, 0.0, -1.0)), grad_Stage2_c1_c0(perm_Stage2_c1_c0(BA + 1.0), p + vec3(-1.0, 0.0, -1.0)), f.x), lerp_Stage2_c1_c0(grad_Stage2_c1_c0(perm_Stage2_c1_c0(AB + 1.0), p + vec3(0.0, -1.0, -1.0)), grad_Stage2_c1_c0(perm_Stage2_c1_c0(BB + 1.0), p + vec3(-1.0, -1.0, -1.0)), f.x), f.y), f.z);
+ return result;
+}
+float noiseOctaves_Stage2_c1_c0(vec3 p) {
+ float result = 0.0;
+ float ratio = 1.0;
+ for (float i = 0.0;i < 8.0; i++) {
+ result += noise_Stage2_c1_c0(p) / ratio;
+ p *= 2.0;
+ ratio *= 2.0;
+ }
+ return (result + 1.0) / 2.0;
+}
+vec4 ImprovedPerlinNoise_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coords = vTransformedCoords_1_Stage0 * ubaseFrequency_Stage2_c1_c0;
+ float r = noiseOctaves_Stage2_c1_c0(vec3(coords, uz_Stage2_c1_c0));
+ float g = noiseOctaves_Stage2_c1_c0(vec3(coords, uz_Stage2_c1_c0));
+ float b = noiseOctaves_Stage2_c1_c0(vec3(coords, uz_Stage2_c1_c0));
+ float a = noiseOctaves_Stage2_c1_c0(vec3(coords, uz_Stage2_c1_c0));
+ _output = vec4(r, g, b, a);
+ _output = clamp(_output, 0.0, 1.0);
+ _output = vec4(_output.xyz * _output.www, _output.w);
+ return _output;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 blend_lighten(vec4 src, vec4 dst) {
+ vec4 result = blend_src_over(src, dst);
+ result.xyz = max(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
+ return result;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ vec4 inputColor = vec4(output_Stage1.xyz, 1.0);
+ output_Stage2 = blend_lighten(ClampFragmentProcessor_Stage2_c0_c0(inputColor), ImprovedPerlinNoise_Stage2_c1_c0(inputColor));
+ output_Stage2 *= output_Stage1.w;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/409.shader_test b/shaders/skia/409.shader_test
new file mode 100644
index 0000000..1f364a7
--- /dev/null
+++ b/shaders/skia/409.shader_test
@@ -0,0 +1,85 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 ucolor_Stage1_c0_c0_c0_c0;
+uniform vec4 ucolor_Stage2;
+uniform vec4 ucolor_Stage3_c1_c0;
+noperspective in vec4 vcolor_Stage0;
+vec4 ConstColorProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = _input.w * ucolor_Stage1_c0_c0_c0_c0;
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = ConstColorProcessor_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 ConstColorProcessor_Stage3_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage3_c1_c0;
+ }
+ return _output;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 blend_darken(vec4 src, vec4 dst) {
+ vec4 result = blend_src_over(src, dst);
+ result.xyz = min(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
+ return result;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_darken(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ {
+ output_Stage2 = output_Stage1 * ucolor_Stage2;
+ }
+ }
+ vec4 output_Stage3;
+ {
+ output_Stage3 = blend_darken(ConstColorProcessor_Stage3_c1_c0(vec4(1.0)), output_Stage2);
+ }
+ {
+ sk_FragColor = output_Stage3;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 position;
+in vec4 inColor;
+noperspective out vec4 vcolor_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/412-2.shader_test b/shaders/skia/412-2.shader_test
new file mode 100644
index 0000000..ac7a96b
--- /dev/null
+++ b/shaders/skia/412-2.shader_test
@@ -0,0 +1,92 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform float uSrcTF_Stage0[7];
+uniform mat3 uColorXform_Stage0;
+uniform float uDstTF_Stage0[7];
+uniform sampler2D uTextureSampler_0_Stage0;
+flat in vec4 vcolor_Stage0;
+noperspective in vec2 vlocalCoord_Stage0;
+flat in vec4 vtexDomain_Stage0;
+float src_tf_Stage0(float x) {
+ float G = uSrcTF_Stage0[0];
+ float A = uSrcTF_Stage0[1];
+ float B = uSrcTF_Stage0[2];
+ float C = uSrcTF_Stage0[3];
+ float D = uSrcTF_Stage0[4];
+ float E = uSrcTF_Stage0[5];
+ float F = uSrcTF_Stage0[6];
+ float s = sign(x);
+ x = abs(x);
+ x = x < D ? C * x + F : pow(A * x + B, G) + E;
+ return s * x;
+}
+float dst_tf_Stage0(float x) {
+ float G = uDstTF_Stage0[0];
+ float A = uDstTF_Stage0[1];
+ float B = uDstTF_Stage0[2];
+ float C = uDstTF_Stage0[3];
+ float D = uDstTF_Stage0[4];
+ float E = uDstTF_Stage0[5];
+ float F = uDstTF_Stage0[6];
+ float s = sign(x);
+ x = abs(x);
+ x = x < D ? C * x + F : pow(A * x + B, G) + E;
+ return s * x;
+}
+vec4 gamut_xform_Stage0(vec4 color) {
+ color.xyz = uColorXform_Stage0 * color.xyz;
+ return color;
+}
+vec4 color_xform_Stage0(vec4 color) {
+ float nonZeroAlpha = max(color.w, 9.9999997473787516e-05);
+ color = vec4(color.xyz / nonZeroAlpha, nonZeroAlpha);
+ color.x = src_tf_Stage0(color.x);
+ color.y = src_tf_Stage0(color.y);
+ color.z = src_tf_Stage0(color.z);
+ color = gamut_xform_Stage0(color);
+ color.x = dst_tf_Stage0(color.x);
+ color.y = dst_tf_Stage0(color.y);
+ color.z = dst_tf_Stage0(color.z);
+ color.xyz *= color.w;
+ return color;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ vec2 texCoord;
+ texCoord = vlocalCoord_Stage0;
+ vec4 domain;
+ domain = vtexDomain_Stage0;
+ texCoord = clamp(texCoord, domain.xy, domain.zw);
+ outputColor_Stage0 = color_xform_Stage0(texture(uTextureSampler_0_Stage0, texCoord)) * outputColor_Stage0;
+ }
+ {
+ sk_FragColor = outputColor_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+in vec4 texDomain;
+flat out vec4 vcolor_Stage0;
+noperspective out vec2 vlocalCoord_Stage0;
+flat out vec4 vtexDomain_Stage0;
+void main() {
+ vcolor_Stage0 = color;
+ vlocalCoord_Stage0 = localCoord;
+ vtexDomain_Stage0 = texDomain;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/412-3.shader_test b/shaders/skia/412-3.shader_test
new file mode 100644
index 0000000..cd87774
--- /dev/null
+++ b/shaders/skia/412-3.shader_test
@@ -0,0 +1,65 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec3 uedges_Stage2_c0_c0[6];
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 ConvexPoly_Stage2_c0_c0(vec4 _input, vec2 _coords) {
+ vec4 _output;
+ float alpha = 1.0;
+ float edge;
+ edge = dot(uedges_Stage2_c0_c0[0], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage2_c0_c0[1], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage2_c0_c0[2], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage2_c0_c0[3], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage2_c0_c0[4], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage2_c0_c0[5], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ _output = _input * alpha;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = ConvexPoly_Stage2_c0_c0(output_Stage1, gl_FragCoord.xy);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/412-4.shader_test b/shaders/skia/412-4.shader_test
new file mode 100644
index 0000000..4e361e7
--- /dev/null
+++ b/shaders/skia/412-4.shader_test
@@ -0,0 +1,75 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform mat4 um_Stage2_c0_c0;
+uniform vec4 uv_Stage2_c0_c0;
+uniform mat4 um_Stage2_c1_c0;
+uniform vec4 uv_Stage2_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 ColorMatrixFragmentProcessor_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = _input;
+ {
+ float nonZeroAlpha = max(inputColor.w, 9.9999997473787516e-05);
+ inputColor = vec4(inputColor.xyz / nonZeroAlpha, inputColor.w);
+ }
+ _output = um_Stage2_c0_c0 * inputColor + uv_Stage2_c0_c0;
+ {
+ _output = clamp(_output, 0.0, 1.0);
+ }
+ return _output;
+}
+vec4 ColorMatrixFragmentProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = _input;
+ {
+ float nonZeroAlpha = max(inputColor.w, 9.9999997473787516e-05);
+ inputColor = vec4(inputColor.xyz / nonZeroAlpha, inputColor.w);
+ }
+ _output = um_Stage2_c1_c0 * inputColor + uv_Stage2_c1_c0;
+ {
+ _output = clamp(_output, 0.0, 1.0);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_dst_out(vec4 src, vec4 dst) {
+ return (1.0 - src.w) * dst;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ vec4 inputColor = vec4(output_Stage1.xyz, 1.0);
+ output_Stage2 = blend_dst_out(ColorMatrixFragmentProcessor_Stage2_c0_c0(inputColor), ColorMatrixFragmentProcessor_Stage2_c1_c0(inputColor));
+ output_Stage2 *= output_Stage1.w;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/412.shader_test b/shaders/skia/412.shader_test
new file mode 100644
index 0000000..9ad893a
--- /dev/null
+++ b/shaders/skia/412.shader_test
@@ -0,0 +1,137 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.w) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ } else {
+ {
+ if (t < uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = OverrideInputFragmentProcessor_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 blend_lighten(vec4 src, vec4 dst) {
+ vec4 result = blend_src_over(src, dst);
+ result.xyz = max(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
+ return result;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_lighten(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 inColor;
+in vec2 inLocalCoord;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/415-3.shader_test b/shaders/skia/415-3.shader_test
new file mode 100644
index 0000000..2e55d16
--- /dev/null
+++ b/shaders/skia/415-3.shader_test
@@ -0,0 +1,60 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec3 uedges_Stage2_c0_c0[4];
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 ConvexPoly_Stage2_c0_c0(vec4 _input, vec2 _coords) {
+ vec4 _output;
+ float alpha = 1.0;
+ float edge;
+ edge = dot(uedges_Stage2_c0_c0[0], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage2_c0_c0[1], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage2_c0_c0[2], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage2_c0_c0[3], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ alpha = 1.0 - alpha;
+ _output = _input * alpha;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = ConvexPoly_Stage2_c0_c0(output_Stage1, gl_FragCoord.xy);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/415-4.shader_test b/shaders/skia/415-4.shader_test
new file mode 100644
index 0000000..dc45333
--- /dev/null
+++ b/shaders/skia/415-4.shader_test
@@ -0,0 +1,81 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uinnerRect_Stage2_c0_c0;
+uniform vec2 uradiusPlusHalf_Stage2_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 CircularRRect_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 dxy0 = uinnerRect_Stage2_c0_c0.xy - gl_FragCoord.xy;
+ vec2 dxy1 = gl_FragCoord.xy - uinnerRect_Stage2_c0_c0.zw;
+ vec2 dxy = max(max(dxy0, dxy1), 0.0);
+ float alpha = clamp(uradiusPlusHalf_Stage2_c0_c0.x - length(dxy), 0.0, 1.0);
+ _output = _input * alpha;
+ return _output;
+}
+vec4 ClampFragmentProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = clamp(_input, 0.0, 1.0);
+ }
+ return _output;
+}
+float _blend_color_luminance(vec3 color) {
+ return dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), color);
+}
+vec3 _blend_set_color_luminance(vec3 hueSatColor, float alpha, vec3 lumColor) {
+ float lum = _blend_color_luminance(lumColor);
+ vec3 result = (lum - _blend_color_luminance(hueSatColor)) + hueSatColor;
+ float minComp = min(min(result.x, result.y), result.z);
+ float maxComp = max(max(result.x, result.y), result.z);
+ if (minComp < 0.0 && lum != minComp) {
+ result = lum + ((result - lum) * lum) / (lum - minComp);
+ }
+ if (maxComp > alpha && maxComp != lum) {
+ return lum + ((result - lum) * (alpha - lum)) / (maxComp - lum);
+ }
+ return result;
+}
+vec4 blend_color(vec4 src, vec4 dst) {
+ float alpha = dst.w * src.w;
+ vec3 sda = src.xyz * dst.w;
+ vec3 dsa = dst.xyz * src.w;
+ return vec4((((_blend_set_color_luminance(sda, alpha, dsa) + dst.xyz) - dsa) + src.xyz) - sda, (src.w + dst.w) - alpha);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ vec4 inputColor = vec4(output_Stage1.xyz, 1.0);
+ output_Stage2 = blend_color(CircularRRect_Stage2_c0_c0(inputColor), ClampFragmentProcessor_Stage2_c1_c0(inputColor));
+ output_Stage2 *= output_Stage1.w;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/415.shader_test b/shaders/skia/415.shader_test
new file mode 100644
index 0000000..092496e
--- /dev/null
+++ b/shaders/skia/415.shader_test
@@ -0,0 +1,66 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 ucolor_Stage1_c0_c0_c0_c0;
+noperspective in vec4 vcolor_Stage0;
+vec4 ConstColorProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = _input.w * ucolor_Stage1_c0_c0_c0_c0;
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = ConstColorProcessor_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 blend_lighten(vec4 src, vec4 dst) {
+ vec4 result = blend_src_over(src, dst);
+ result.xyz = max(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
+ return result;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_lighten(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 position;
+in vec4 inColor;
+noperspective out vec4 vcolor_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/418-2.shader_test b/shaders/skia/418-2.shader_test
new file mode 100644
index 0000000..292f124
--- /dev/null
+++ b/shaders/skia/418-2.shader_test
@@ -0,0 +1,50 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+in vec2 vEllipseOffsets0_Stage0;
+in vec2 vEllipseOffsets1_Stage0;
+in vec4 vinColor_Stage0;
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ vec2 scaledOffset = vEllipseOffsets0_Stage0;
+ float test = dot(scaledOffset, scaledOffset) - 1.0;
+ vec2 duvdx = dFdx(vEllipseOffsets0_Stage0);
+ vec2 duvdy = dFdy(vEllipseOffsets0_Stage0);
+ vec2 grad = vec2(vEllipseOffsets0_Stage0.x * duvdx.x + vEllipseOffsets0_Stage0.y * duvdx.y, vEllipseOffsets0_Stage0.x * duvdy.x + vEllipseOffsets0_Stage0.y * duvdy.y);
+ float grad_dot = 4.0 * dot(grad, grad);
+ grad_dot = max(grad_dot, 1.1754999560161448e-38);
+ float invlen = inversesqrt(grad_dot);
+ float edgeAlpha = clamp(0.5 - test * invlen, 0.0, 1.0);
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ {
+ sk_FragColor = 1.0 - outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec2 inEllipseOffsets0;
+in vec2 inEllipseOffsets1;
+out vec2 vEllipseOffsets0_Stage0;
+out vec2 vEllipseOffsets1_Stage0;
+out vec4 vinColor_Stage0;
+void main() {
+ vEllipseOffsets0_Stage0 = inEllipseOffsets0;
+ vEllipseOffsets1_Stage0 = inEllipseOffsets1;
+ vinColor_Stage0 = inColor;
+ vec3 pos3 = uViewM_Stage0 * vec3(inPosition, 1.0);
+ gl_Position = vec4(pos3.x, pos3.y, 0.0, pos3.z);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/418-3.shader_test b/shaders/skia/418-3.shader_test
new file mode 100644
index 0000000..93512a8
--- /dev/null
+++ b/shaders/skia/418-3.shader_test
@@ -0,0 +1,48 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 ucircleData_Stage2_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 CircleBlurFragmentProcessor_Stage2_c0_c0(vec4 _input, vec2 _coords) {
+ vec4 _output;
+ vec2 vec = vec2((gl_FragCoord.x - ucircleData_Stage2_c0_c0.x) * ucircleData_Stage2_c0_c0.w, (gl_FragCoord.y - ucircleData_Stage2_c0_c0.y) * ucircleData_Stage2_c0_c0.w);
+ float dist = length(vec) + (0.5 - ucircleData_Stage2_c0_c0.z) * ucircleData_Stage2_c0_c0.w;
+ _output = _input * texture(uTextureSampler_0_Stage2, vec2(dist, 0.5)).w;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = CircleBlurFragmentProcessor_Stage2_c0_c0(output_Stage1, gl_FragCoord.xy);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/418-4.shader_test b/shaders/skia/418-4.shader_test
new file mode 100644
index 0000000..bdea51a
--- /dev/null
+++ b/shaders/skia/418-4.shader_test
@@ -0,0 +1,104 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 ubaseFrequency_Stage2_c1_c0;
+uniform float uz_Stage2_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+uniform sampler2D uTextureSampler_1_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 ClampFragmentProcessor_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = clamp(_input, 0.0, 1.0);
+ }
+ return _output;
+}
+vec3 fade_Stage2_c1_c0(vec3 t) {
+ return ((t * t) * t) * (t * (t * 6.0 - 15.0) + 10.0);
+}
+float perm_Stage2_c1_c0(float x) {
+ return texture(uTextureSampler_0_Stage2, vec2(fract(x / 256.0), 0.0)).x * 255.0;
+}
+float grad_Stage2_c1_c0(float x, vec3 p) {
+ return dot(texture(uTextureSampler_1_Stage2, vec2(fract(x / 16.0), 0.0)).xyz * 255.0 - vec3(1.0), p);
+}
+float lerp_Stage2_c1_c0(float a, float b, float w) {
+ return a + w * (b - a);
+}
+float noise_Stage2_c1_c0(vec3 p) {
+ vec3 P = mod(floor(p), 256.0);
+ p -= floor(p);
+ vec3 f = fade_Stage2_c1_c0(p);
+ float A = perm_Stage2_c1_c0(P.x) + P.y;
+ float AA = perm_Stage2_c1_c0(A) + P.z;
+ float AB = perm_Stage2_c1_c0(A + 1.0) + P.z;
+ float B = perm_Stage2_c1_c0(P.x + 1.0) + P.y;
+ float BA = perm_Stage2_c1_c0(B) + P.z;
+ float BB = perm_Stage2_c1_c0(B + 1.0) + P.z;
+ float result = lerp_Stage2_c1_c0(lerp_Stage2_c1_c0(lerp_Stage2_c1_c0(grad_Stage2_c1_c0(perm_Stage2_c1_c0(AA), p), grad_Stage2_c1_c0(perm_Stage2_c1_c0(BA), p + vec3(-1.0, 0.0, 0.0)), f.x), lerp_Stage2_c1_c0(grad_Stage2_c1_c0(perm_Stage2_c1_c0(AB), p + vec3(0.0, -1.0, 0.0)), grad_Stage2_c1_c0(perm_Stage2_c1_c0(BB), p + vec3(-1.0, -1.0, 0.0)), f.x), f.y), lerp_Stage2_c1_c0(lerp_Stage2_c1_c0(grad_Stage2_c1_c0(perm_Stage2_c1_c0(AA + 1.0), p + vec3(0.0, 0.0, -1.0)), grad_Stage2_c1_c0(perm_Stage2_c1_c0(BA + 1.0), p + vec3(-1.0, 0.0, -1.0)), f.x), lerp_Stage2_c1_c0(grad_Stage2_c1_c0(perm_Stage2_c1_c0(AB + 1.0), p + vec3(0.0, -1.0, -1.0)), grad_Stage2_c1_c0(perm_Stage2_c1_c0(BB + 1.0), p + vec3(-1.0, -1.0, -1.0)), f.x), f.y), f.z);
+ return result;
+}
+float noiseOctaves_Stage2_c1_c0(vec3 p) {
+ float result = 0.0;
+ float ratio = 1.0;
+ for (float i = 0.0;i < 6.0; i++) {
+ result += noise_Stage2_c1_c0(p) / ratio;
+ p *= 2.0;
+ ratio *= 2.0;
+ }
+ return (result + 1.0) / 2.0;
+}
+vec4 ImprovedPerlinNoise_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coords = vTransformedCoords_1_Stage0 * ubaseFrequency_Stage2_c1_c0;
+ float r = noiseOctaves_Stage2_c1_c0(vec3(coords, uz_Stage2_c1_c0));
+ float g = noiseOctaves_Stage2_c1_c0(vec3(coords, uz_Stage2_c1_c0));
+ float b = noiseOctaves_Stage2_c1_c0(vec3(coords, uz_Stage2_c1_c0));
+ float a = noiseOctaves_Stage2_c1_c0(vec3(coords, uz_Stage2_c1_c0));
+ _output = vec4(r, g, b, a);
+ _output = clamp(_output, 0.0, 1.0);
+ _output = vec4(_output.xyz * _output.www, _output.w);
+ return _output;
+}
+vec4 blend_screen(vec4 src, vec4 dst) {
+ return src + (1.0 - src) * dst;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ vec4 inputColor = vec4(output_Stage1.xyz, 1.0);
+ output_Stage2 = blend_screen(ClampFragmentProcessor_Stage2_c0_c0(inputColor), ImprovedPerlinNoise_Stage2_c1_c0(inputColor));
+ output_Stage2 *= output_Stage1.w;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/418.shader_test b/shaders/skia/418.shader_test
new file mode 100644
index 0000000..11dfe98
--- /dev/null
+++ b/shaders/skia/418.shader_test
@@ -0,0 +1,154 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage2_c1_c0;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.w) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ } else {
+ {
+ if (t < uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = OverrideInputFragmentProcessor_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c1_c0;
+ }
+ return _output;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 blend_lighten(vec4 src, vec4 dst) {
+ vec4 result = blend_src_over(src, dst);
+ result.xyz = max(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
+ return result;
+}
+vec4 blend_darken(vec4 src, vec4 dst) {
+ vec4 result = blend_src_over(src, dst);
+ result.xyz = min(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
+ return result;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_lighten(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_darken(ConstColorProcessor_Stage2_c1_c0(vec4(1.0)), output_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 inColor;
+in vec2 inLocalCoord;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/421-2.shader_test b/shaders/skia/421-2.shader_test
new file mode 100644
index 0000000..e82a8e2
--- /dev/null
+++ b/shaders/skia/421-2.shader_test
@@ -0,0 +1,23 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+uniform vec4 uColor_Stage0;
+uniform float uCoverage_Stage0;
+void main() {
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 inPosition;
+void main() {
+ vec3 pos3 = uViewM_Stage0 * vec3(inPosition, 1.0);
+ gl_Position = vec4(pos3.x, pos3.y, 0.0, pos3.z);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/421-3.shader_test b/shaders/skia/421-3.shader_test
new file mode 100644
index 0000000..b6ca0f8
--- /dev/null
+++ b/shaders/skia/421-3.shader_test
@@ -0,0 +1,51 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 ucircle_Stage2_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 CircleEffect_Stage2_c0_c0(vec4 _input, vec2 _coords) {
+ vec4 _output;
+ float d;
+ {
+ d = (length((ucircle_Stage2_c0_c0.xy - gl_FragCoord.xy) * ucircle_Stage2_c0_c0.w) - 1.0) * ucircle_Stage2_c0_c0.z;
+ }
+ {
+ _output = _input * clamp(d, 0.0, 1.0);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = CircleEffect_Stage2_c0_c0(output_Stage1, gl_FragCoord.xy);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/421-4.shader_test b/shaders/skia/421-4.shader_test
new file mode 100644
index 0000000..cc1e9cc
--- /dev/null
+++ b/shaders/skia/421-4.shader_test
@@ -0,0 +1,117 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uellipse_Stage2_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 ClampFragmentProcessor_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ float alpha = clamp(_input.w, 0.0, 1.0);
+ _output = vec4(clamp(_input.xyz, 0.0, alpha), alpha);
+ }
+ return _output;
+}
+vec4 EllipseEffect_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 d = gl_FragCoord.xy - uellipse_Stage2_c1_c0.xy;
+ vec2 Z = d * uellipse_Stage2_c1_c0.zw;
+ float implicit = dot(Z, d) - 1.0;
+ float grad_dot = 4.0 * dot(Z, Z);
+ {
+ grad_dot = max(grad_dot, 1.1754999560161448e-38);
+ }
+ float approx_dist = implicit * inversesqrt(grad_dot);
+ float alpha;
+ {
+ alpha = approx_dist > 0.0 ? 0.0 : 1.0;
+ }
+ _output = _input * alpha;
+ return _output;
+}
+float _blend_color_saturation(vec3 color) {
+ return max(max(color.x, color.y), color.z) - min(min(color.x, color.y), color.z);
+}
+vec3 _blend_set_color_saturation_helper(vec3 minMidMax, float sat) {
+ if (minMidMax.x < minMidMax.z) {
+ return vec3(0.0, (sat * (minMidMax.y - minMidMax.x)) / (minMidMax.z - minMidMax.x), sat);
+ }
+ return vec3(0.0);
+}
+vec3 _blend_set_color_saturation(vec3 hueLumColor, vec3 satColor) {
+ float sat = _blend_color_saturation(satColor);
+ if (hueLumColor.x <= hueLumColor.y) {
+ if (hueLumColor.y <= hueLumColor.z) {
+ hueLumColor.xyz = _blend_set_color_saturation_helper(hueLumColor, sat);
+ } else if (hueLumColor.x <= hueLumColor.z) {
+ hueLumColor.xzy = _blend_set_color_saturation_helper(hueLumColor.xzy, sat);
+ } else {
+ hueLumColor.zxy = _blend_set_color_saturation_helper(hueLumColor.zxy, sat);
+ }
+ } else if (hueLumColor.x <= hueLumColor.z) {
+ hueLumColor.yxz = _blend_set_color_saturation_helper(hueLumColor.yxz, sat);
+ } else if (hueLumColor.y <= hueLumColor.z) {
+ hueLumColor.yzx = _blend_set_color_saturation_helper(hueLumColor.yzx, sat);
+ } else {
+ hueLumColor.zyx = _blend_set_color_saturation_helper(hueLumColor.zyx, sat);
+ }
+ return hueLumColor;
+}
+float _blend_color_luminance(vec3 color) {
+ return dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), color);
+}
+vec3 _blend_set_color_luminance(vec3 hueSatColor, float alpha, vec3 lumColor) {
+ float lum = _blend_color_luminance(lumColor);
+ vec3 result = (lum - _blend_color_luminance(hueSatColor)) + hueSatColor;
+ float minComp = min(min(result.x, result.y), result.z);
+ float maxComp = max(max(result.x, result.y), result.z);
+ if (minComp < 0.0 && lum != minComp) {
+ result = lum + ((result - lum) * lum) / (lum - minComp);
+ }
+ if (maxComp > alpha && maxComp != lum) {
+ return lum + ((result - lum) * (alpha - lum)) / (maxComp - lum);
+ }
+ return result;
+}
+vec4 blend_hue(vec4 src, vec4 dst) {
+ float alpha = dst.w * src.w;
+ vec3 sda = src.xyz * dst.w;
+ vec3 dsa = dst.xyz * src.w;
+ return vec4((((_blend_set_color_luminance(_blend_set_color_saturation(sda, dsa), alpha, dsa) + dst.xyz) - dsa) + src.xyz) - sda, (src.w + dst.w) - alpha);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ vec4 inputColor = vec4(output_Stage1.xyz, 1.0);
+ output_Stage2 = blend_hue(ClampFragmentProcessor_Stage2_c0_c0(inputColor), EllipseEffect_Stage2_c1_c0(inputColor));
+ output_Stage2 *= output_Stage1.w;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/421.shader_test b/shaders/skia/421.shader_test
new file mode 100644
index 0000000..4bb5ff7
--- /dev/null
+++ b/shaders/skia/421.shader_test
@@ -0,0 +1,83 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 ucolor_Stage1_c0_c0_c0_c0;
+uniform vec4 ucolor_Stage2_c1_c0;
+noperspective in vec4 vcolor_Stage0;
+vec4 ConstColorProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = _input.w * ucolor_Stage1_c0_c0_c0_c0;
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = ConstColorProcessor_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c1_c0;
+ }
+ return _output;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 blend_lighten(vec4 src, vec4 dst) {
+ vec4 result = blend_src_over(src, dst);
+ result.xyz = max(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
+ return result;
+}
+vec4 blend_darken(vec4 src, vec4 dst) {
+ vec4 result = blend_src_over(src, dst);
+ result.xyz = min(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
+ return result;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_lighten(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_darken(ConstColorProcessor_Stage2_c1_c0(vec4(1.0)), output_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 position;
+in vec4 inColor;
+noperspective out vec4 vcolor_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/424-2.shader_test b/shaders/skia/424-2.shader_test
new file mode 100644
index 0000000..88592ed
--- /dev/null
+++ b/shaders/skia/424-2.shader_test
@@ -0,0 +1,340 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform vec2 uBounds_Stage1;
+uniform vec4 uKernel_Stage1[6];
+uniform vec2 uImageIncrement_Stage2;
+uniform float uSurfaceScale_Stage2;
+uniform vec3 uLightColor_Stage2;
+uniform float uKS_Stage2;
+uniform float uShininess_Stage2;
+uniform vec4 uTexDom_Stage2;
+uniform vec3 uDecalParams_Stage2;
+uniform vec3 uLightDirection_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+noperspective in float vcoverage_Stage0;
+flat in vec4 vgeomDomain_Stage0;
+vec4 light_Stage2(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ vec3 halfDir = normalize(surfaceToLight + vec3(0.0, 0.0, 1.0));
+ float colorScale = uKS_Stage2 * pow(dot(normal, halfDir), uShininess_Stage2);
+ vec3 color = lightColor * clamp(colorScale, 0.0, 1.0);
+ return vec4(color, max(max(color.x, color.y), color.z));
+}
+float sobel_Stage2(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage2(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage2(float m[9], float surfaceScale) {
+ return pointToNormal_Stage2(sobel_Stage2(0.0, 0.0, m[3], m[5], m[6], m[8], 0.33333298563957214), sobel_Stage2(0.0, 0.0, m[4], m[7], m[5], m[8], 0.5), surfaceScale);
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ float coverage = vcoverage_Stage0;
+ vec4 geoDomain;
+ geoDomain = vgeomDomain_Stage0;
+ if (coverage < 0.5) {
+ vec4 dists4 = clamp(vec4(1.0, 1.0, -1.0, -1.0) * (gl_FragCoord.xyxy - geoDomain), 0.0, 1.0);
+ vec2 dists2 = dists4.xy * dists4.zw;
+ coverage = min(coverage, dists2.x * dists2.y);
+ }
+ outputCoverage_Stage0 = vec4(coverage);
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0 - 10.0 * uImageIncrement_Stage1;
+ vec2 coordSampled = vec2(0.0, 0.0);
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1.x && coord.x <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].x;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1.x && coord.x <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].y;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1.x && coord.x <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].z;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1.x && coord.x <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].w;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1.x && coord.x <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].x;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1.x && coord.x <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].y;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1.x && coord.x <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].z;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1.x && coord.x <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].w;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1.x && coord.x <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].x;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1.x && coord.x <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].y;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1.x && coord.x <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].z;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1.x && coord.x <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].w;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1.x && coord.x <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].x;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1.x && coord.x <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].y;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1.x && coord.x <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].z;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1.x && coord.x <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].w;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1.x && coord.x <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[4].x;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1.x && coord.x <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[4].y;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1.x && coord.x <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[4].z;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1.x && coord.x <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[4].w;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1.x && coord.x <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[5].x;
+ }
+ coord += uImageIncrement_Stage1;
+ output_Stage1 *= outputCoverage_Stage0;
+ }
+ vec4 output_Stage2;
+ {
+ vec2 coord = vTransformedCoords_1_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp0 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp5 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp6 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp7 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp8 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = uLightDirection_Stage2;
+ output_Stage2 = light_Stage2(normal_Stage2(m, uSurfaceScale_Stage2), surfaceToLight, uLightColor_Stage2);
+ output_Stage2 *= output_Stage1;
+ }
+ {
+ sk_FragColor = 1.0 - output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in float coverage;
+in vec4 color;
+in vec2 localCoord;
+in vec4 geomDomain;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+noperspective out float vcoverage_Stage0;
+flat out vec4 vgeomDomain_Stage0;
+void main() {
+ vec2 position = position;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ vcoverage_Stage0 = coverage;
+ vgeomDomain_Stage0 = geomDomain;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/424-3.shader_test b/shaders/skia/424-3.shader_test
new file mode 100644
index 0000000..8d5f746
--- /dev/null
+++ b/shaders/skia/424-3.shader_test
@@ -0,0 +1,222 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uCoordTransformMatrix_1_Stage0;
+uniform vec2 uImageIncrement_Stage2_c0_c0;
+uniform float uSurfaceScale_Stage2_c0_c0;
+uniform vec3 uLightColor_Stage2_c0_c0;
+uniform float uKD_Stage2_c0_c0;
+uniform vec4 uTexDom_Stage2_c0_c0;
+uniform vec3 uDecalParams_Stage2_c0_c0;
+uniform vec3 uLightLocation_Stage2_c0_c0;
+uniform float uExponent_Stage2_c0_c0;
+uniform float uCosInnerConeAngle_Stage2_c0_c0;
+uniform float uCosOuterConeAngle_Stage2_c0_c0;
+uniform float uConeScale_Stage2_c0_c0;
+uniform vec3 uS_Stage2_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 light_Stage2_c0_c0(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ float colorScale = uKD_Stage2_c0_c0 * dot(normal, surfaceToLight);
+ return vec4(lightColor * clamp(colorScale, 0.0, 1.0), 1.0);
+}
+float sobel_Stage2_c0_c0(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage2_c0_c0(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage2_c0_c0(float m[9], float surfaceScale) {
+ return pointToNormal_Stage2_c0_c0(sobel_Stage2_c0_c0(m[0], m[1], m[3], m[4], m[6], m[7], 0.5), sobel_Stage2_c0_c0(m[0], m[6], m[1], m[7], 0.0, 0.0, 0.33333298563957214), surfaceScale);
+}
+vec3 lightColor_Stage2_c0_c0(vec3 surfaceToLight) {
+ float cosAngle = -dot(surfaceToLight, uS_Stage2_c0_c0);
+ if (cosAngle < uCosOuterConeAngle_Stage2_c0_c0) {
+ return vec3(0.0);
+ }
+ float scale = pow(cosAngle, uExponent_Stage2_c0_c0);
+ if (cosAngle < uCosInnerConeAngle_Stage2_c0_c0) {
+ return ((uLightColor_Stage2_c0_c0 * scale) * (cosAngle - uCosOuterConeAngle_Stage2_c0_c0)) * uConeScale_Stage2_c0_c0;
+ }
+ return uLightColor_Stage2_c0_c0;
+}
+vec4 DiffuseLighting_Stage2_c0_c0(vec4 _input, vec2 _coords) {
+ _coords = _coords * uCoordTransformMatrix_1_Stage0.xz + uCoordTransformMatrix_1_Stage0.yw;
+ vec4 _output;
+ vec2 coord = _coords;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c0_c0.y);
+ if (err > uDecalParams_Stage2_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp0 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c0_c0.y);
+ if (err > uDecalParams_Stage2_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c0_c0.y);
+ if (err > uDecalParams_Stage2_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c0_c0.y);
+ if (err > uDecalParams_Stage2_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c0_c0.y);
+ if (err > uDecalParams_Stage2_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c0_c0.y);
+ if (err > uDecalParams_Stage2_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp5 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c0_c0.y);
+ if (err > uDecalParams_Stage2_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp6 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c0_c0.y);
+ if (err > uDecalParams_Stage2_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp7 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c0_c0.y);
+ if (err > uDecalParams_Stage2_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp8 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = normalize(uLightLocation_Stage2_c0_c0 - vec3(gl_FragCoord.xy, uSurfaceScale_Stage2_c0_c0 * m[4]));
+ _output = light_Stage2_c0_c0(normal_Stage2_c0_c0(m, uSurfaceScale_Stage2_c0_c0), surfaceToLight, lightColor_Stage2_c0_c0(surfaceToLight));
+ _output *= _input;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = DiffuseLighting_Stage2_c0_c0(output_Stage1, gl_FragCoord.xy);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/424-4.shader_test b/shaders/skia/424-4.shader_test
new file mode 100644
index 0000000..6614bc2
--- /dev/null
+++ b/shaders/skia/424-4.shader_test
@@ -0,0 +1,111 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform mat4 um_Stage2_c1_c0;
+uniform vec4 uv_Stage2_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 ClampFragmentProcessor_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = clamp(_input, 0.0, 1.0);
+ }
+ return _output;
+}
+vec4 ColorMatrixFragmentProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = _input;
+ {
+ float nonZeroAlpha = max(inputColor.w, 9.9999997473787516e-05);
+ inputColor = vec4(inputColor.xyz / nonZeroAlpha, inputColor.w);
+ }
+ _output = um_Stage2_c1_c0 * inputColor + uv_Stage2_c1_c0;
+ {
+ _output.w = clamp(_output.w, 0.0, 1.0);
+ }
+ return _output;
+}
+float _blend_color_saturation(vec3 color) {
+ return max(max(color.x, color.y), color.z) - min(min(color.x, color.y), color.z);
+}
+vec3 _blend_set_color_saturation_helper(vec3 minMidMax, float sat) {
+ if (minMidMax.x < minMidMax.z) {
+ return vec3(0.0, (sat * (minMidMax.y - minMidMax.x)) / (minMidMax.z - minMidMax.x), sat);
+ }
+ return vec3(0.0);
+}
+vec3 _blend_set_color_saturation(vec3 hueLumColor, vec3 satColor) {
+ float sat = _blend_color_saturation(satColor);
+ if (hueLumColor.x <= hueLumColor.y) {
+ if (hueLumColor.y <= hueLumColor.z) {
+ hueLumColor.xyz = _blend_set_color_saturation_helper(hueLumColor, sat);
+ } else if (hueLumColor.x <= hueLumColor.z) {
+ hueLumColor.xzy = _blend_set_color_saturation_helper(hueLumColor.xzy, sat);
+ } else {
+ hueLumColor.zxy = _blend_set_color_saturation_helper(hueLumColor.zxy, sat);
+ }
+ } else if (hueLumColor.x <= hueLumColor.z) {
+ hueLumColor.yxz = _blend_set_color_saturation_helper(hueLumColor.yxz, sat);
+ } else if (hueLumColor.y <= hueLumColor.z) {
+ hueLumColor.yzx = _blend_set_color_saturation_helper(hueLumColor.yzx, sat);
+ } else {
+ hueLumColor.zyx = _blend_set_color_saturation_helper(hueLumColor.zyx, sat);
+ }
+ return hueLumColor;
+}
+float _blend_color_luminance(vec3 color) {
+ return dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), color);
+}
+vec3 _blend_set_color_luminance(vec3 hueSatColor, float alpha, vec3 lumColor) {
+ float lum = _blend_color_luminance(lumColor);
+ vec3 result = (lum - _blend_color_luminance(hueSatColor)) + hueSatColor;
+ float minComp = min(min(result.x, result.y), result.z);
+ float maxComp = max(max(result.x, result.y), result.z);
+ if (minComp < 0.0 && lum != minComp) {
+ result = lum + ((result - lum) * lum) / (lum - minComp);
+ }
+ if (maxComp > alpha && maxComp != lum) {
+ return lum + ((result - lum) * (alpha - lum)) / (maxComp - lum);
+ }
+ return result;
+}
+vec4 blend_hue(vec4 src, vec4 dst) {
+ float alpha = dst.w * src.w;
+ vec3 sda = src.xyz * dst.w;
+ vec3 dsa = dst.xyz * src.w;
+ return vec4((((_blend_set_color_luminance(_blend_set_color_saturation(sda, dsa), alpha, dsa) + dst.xyz) - dsa) + src.xyz) - sda, (src.w + dst.w) - alpha);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ vec4 inputColor = vec4(output_Stage1.xyz, 1.0);
+ output_Stage2 = blend_hue(ClampFragmentProcessor_Stage2_c0_c0(inputColor), ColorMatrixFragmentProcessor_Stage2_c1_c0(inputColor));
+ output_Stage2 *= output_Stage1.w;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/424.shader_test b/shaders/skia/424.shader_test
new file mode 100644
index 0000000..e0b8b65
--- /dev/null
+++ b/shaders/skia/424.shader_test
@@ -0,0 +1,150 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage2;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.w) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ } else {
+ {
+ if (t < uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+vec4 ComposeOne_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_dst_in(_input, TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0)));
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = ComposeOne_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 blend_lighten(vec4 src, vec4 dst) {
+ vec4 result = blend_src_over(src, dst);
+ result.xyz = max(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
+ return result;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_lighten(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ {
+ output_Stage2 = output_Stage1 * ucolor_Stage2;
+ }
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 inColor;
+in vec2 inLocalCoord;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/427-2.shader_test b/shaders/skia/427-2.shader_test
new file mode 100644
index 0000000..4adee9c
--- /dev/null
+++ b/shaders/skia/427-2.shader_test
@@ -0,0 +1,93 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform float uSrcTF_Stage0[7];
+uniform mat3 uColorXform_Stage0;
+uniform float uDstTF_Stage0[7];
+uniform sampler2D uTextureSampler_0_Stage0;
+flat in vec4 vcolor_Stage0;
+noperspective in vec2 vlocalCoord_Stage0;
+flat in vec4 vtexDomain_Stage0;
+float src_tf_Stage0(float x) {
+ float G = uSrcTF_Stage0[0];
+ float A = uSrcTF_Stage0[1];
+ float B = uSrcTF_Stage0[2];
+ float C = uSrcTF_Stage0[3];
+ float D = uSrcTF_Stage0[4];
+ float E = uSrcTF_Stage0[5];
+ float F = uSrcTF_Stage0[6];
+ float s = sign(x);
+ x = abs(x);
+ x = x < D ? C * x + F : pow(A * x + B, G) + E;
+ return s * x;
+}
+float dst_tf_Stage0(float x) {
+ float G = uDstTF_Stage0[0];
+ float A = uDstTF_Stage0[1];
+ float B = uDstTF_Stage0[2];
+ float C = uDstTF_Stage0[3];
+ float D = uDstTF_Stage0[4];
+ float E = uDstTF_Stage0[5];
+ float F = uDstTF_Stage0[6];
+ float s = sign(x);
+ x = abs(x);
+ x = x < D ? C * x + F : pow(A * x + B, G) + E;
+ return s * x;
+}
+vec4 gamut_xform_Stage0(vec4 color) {
+ color.xyz = uColorXform_Stage0 * color.xyz;
+ return color;
+}
+vec4 color_xform_Stage0(vec4 color) {
+ float nonZeroAlpha = max(color.w, 9.9999997473787516e-05);
+ color = vec4(color.xyz / nonZeroAlpha, nonZeroAlpha);
+ color.x = src_tf_Stage0(color.x);
+ color.y = src_tf_Stage0(color.y);
+ color.z = src_tf_Stage0(color.z);
+ color = gamut_xform_Stage0(color);
+ color.x = dst_tf_Stage0(color.x);
+ color.y = dst_tf_Stage0(color.y);
+ color.z = dst_tf_Stage0(color.z);
+ color.xyz *= color.w;
+ return color;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ vec2 texCoord;
+ texCoord = vlocalCoord_Stage0;
+ vec4 domain;
+ domain = vtexDomain_Stage0;
+ texCoord = clamp(texCoord, domain.xy, domain.zw);
+ outputColor_Stage0 = color_xform_Stage0(texture(uTextureSampler_0_Stage0, texCoord)) * outputColor_Stage0;
+ outputColor_Stage0 = clamp(outputColor_Stage0, 0.0, 1.0);
+ }
+ {
+ sk_FragColor = outputColor_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+in vec4 texDomain;
+flat out vec4 vcolor_Stage0;
+noperspective out vec2 vlocalCoord_Stage0;
+flat out vec4 vtexDomain_Stage0;
+void main() {
+ vcolor_Stage0 = color;
+ vlocalCoord_Stage0 = localCoord;
+ vtexDomain_Stage0 = texDomain;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/427-3.shader_test b/shaders/skia/427-3.shader_test
new file mode 100644
index 0000000..2a6d17f
--- /dev/null
+++ b/shaders/skia/427-3.shader_test
@@ -0,0 +1,59 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uboundsUniform_Stage2;
+uniform float uxInvZoom_Stage2;
+uniform float uyInvZoom_Stage2;
+uniform float uxInvInset_Stage2;
+uniform float uyInvInset_Stage2;
+uniform vec2 uoffset_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vec4 output_Stage2;
+ {
+ vec2 coord = vTransformedCoords_1_Stage0;
+ vec2 zoom_coord = uoffset_Stage2 + coord * vec2(uxInvZoom_Stage2, uyInvZoom_Stage2);
+ vec2 delta = (coord - uboundsUniform_Stage2.xy) * uboundsUniform_Stage2.zw;
+ delta = min(delta, vec2(1.0, 1.0) - delta);
+ delta *= vec2(uxInvInset_Stage2, uyInvInset_Stage2);
+ float weight = 0.0;
+ if (delta.x < 2.0 && delta.y < 2.0) {
+ delta = vec2(2.0, 2.0) - delta;
+ float dist = length(delta);
+ dist = max(2.0 - dist, 0.0);
+ weight = min(dist * dist, 1.0);
+ } else {
+ vec2 delta_squared = delta * delta;
+ weight = min(min(delta_squared.x, delta_squared.y), 1.0);
+ }
+ output_Stage2 = texture(uTextureSampler_0_Stage2, mix(coord, zoom_coord, weight));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/427-4.shader_test b/shaders/skia/427-4.shader_test
new file mode 100644
index 0000000..13ac6af
--- /dev/null
+++ b/shaders/skia/427-4.shader_test
@@ -0,0 +1,265 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage2_c0_c0;
+uniform float uSurfaceScale_Stage2_c0_c0;
+uniform vec3 uLightColor_Stage2_c0_c0;
+uniform float uKD_Stage2_c0_c0;
+uniform vec4 uTexDom_Stage2_c0_c0;
+uniform vec3 uDecalParams_Stage2_c0_c0;
+uniform vec3 uLightDirection_Stage2_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 light_Stage2_c0_c0(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ float colorScale = uKD_Stage2_c0_c0 * dot(normal, surfaceToLight);
+ return vec4(lightColor * clamp(colorScale, 0.0, 1.0), 1.0);
+}
+float sobel_Stage2_c0_c0(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage2_c0_c0(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage2_c0_c0(float m[9], float surfaceScale) {
+ return pointToNormal_Stage2_c0_c0(sobel_Stage2_c0_c0(m[0], m[1], m[3], m[4], m[6], m[7], 0.5), sobel_Stage2_c0_c0(m[0], m[6], m[1], m[7], 0.0, 0.0, 0.33333298563957214), surfaceScale);
+}
+vec4 DiffuseLighting_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coord = vTransformedCoords_1_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c0_c0.y);
+ if (err > uDecalParams_Stage2_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp0 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c0_c0.y);
+ if (err > uDecalParams_Stage2_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c0_c0.y);
+ if (err > uDecalParams_Stage2_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c0_c0.y);
+ if (err > uDecalParams_Stage2_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c0_c0.y);
+ if (err > uDecalParams_Stage2_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c0_c0.y);
+ if (err > uDecalParams_Stage2_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp5 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c0_c0.y);
+ if (err > uDecalParams_Stage2_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp6 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c0_c0.y);
+ if (err > uDecalParams_Stage2_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp7 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c0_c0.y);
+ if (err > uDecalParams_Stage2_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp8 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = uLightDirection_Stage2_c0_c0;
+ _output = light_Stage2_c0_c0(normal_Stage2_c0_c0(m, uSurfaceScale_Stage2_c0_c0), surfaceToLight, uLightColor_Stage2_c0_c0);
+ _output *= _input;
+ return _output;
+}
+vec4 ClampFragmentProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = clamp(_input, 0.0, 1.0);
+ }
+ return _output;
+}
+float _blend_color_saturation(vec3 color) {
+ return max(max(color.x, color.y), color.z) - min(min(color.x, color.y), color.z);
+}
+vec3 _blend_set_color_saturation_helper(vec3 minMidMax, float sat) {
+ if (minMidMax.x < minMidMax.z) {
+ return vec3(0.0, (sat * (minMidMax.y - minMidMax.x)) / (minMidMax.z - minMidMax.x), sat);
+ }
+ return vec3(0.0);
+}
+vec3 _blend_set_color_saturation(vec3 hueLumColor, vec3 satColor) {
+ float sat = _blend_color_saturation(satColor);
+ if (hueLumColor.x <= hueLumColor.y) {
+ if (hueLumColor.y <= hueLumColor.z) {
+ hueLumColor.xyz = _blend_set_color_saturation_helper(hueLumColor, sat);
+ } else if (hueLumColor.x <= hueLumColor.z) {
+ hueLumColor.xzy = _blend_set_color_saturation_helper(hueLumColor.xzy, sat);
+ } else {
+ hueLumColor.zxy = _blend_set_color_saturation_helper(hueLumColor.zxy, sat);
+ }
+ } else if (hueLumColor.x <= hueLumColor.z) {
+ hueLumColor.yxz = _blend_set_color_saturation_helper(hueLumColor.yxz, sat);
+ } else if (hueLumColor.y <= hueLumColor.z) {
+ hueLumColor.yzx = _blend_set_color_saturation_helper(hueLumColor.yzx, sat);
+ } else {
+ hueLumColor.zyx = _blend_set_color_saturation_helper(hueLumColor.zyx, sat);
+ }
+ return hueLumColor;
+}
+float _blend_color_luminance(vec3 color) {
+ return dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), color);
+}
+vec3 _blend_set_color_luminance(vec3 hueSatColor, float alpha, vec3 lumColor) {
+ float lum = _blend_color_luminance(lumColor);
+ vec3 result = (lum - _blend_color_luminance(hueSatColor)) + hueSatColor;
+ float minComp = min(min(result.x, result.y), result.z);
+ float maxComp = max(max(result.x, result.y), result.z);
+ if (minComp < 0.0 && lum != minComp) {
+ result = lum + ((result - lum) * lum) / (lum - minComp);
+ }
+ if (maxComp > alpha && maxComp != lum) {
+ return lum + ((result - lum) * (alpha - lum)) / (maxComp - lum);
+ }
+ return result;
+}
+vec4 blend_hue(vec4 src, vec4 dst) {
+ float alpha = dst.w * src.w;
+ vec3 sda = src.xyz * dst.w;
+ vec3 dsa = dst.xyz * src.w;
+ return vec4((((_blend_set_color_luminance(_blend_set_color_saturation(sda, dsa), alpha, dsa) + dst.xyz) - dsa) + src.xyz) - sda, (src.w + dst.w) - alpha);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ vec4 inputColor = vec4(output_Stage1.xyz, 1.0);
+ output_Stage2 = blend_hue(DiffuseLighting_Stage2_c0_c0(inputColor), ClampFragmentProcessor_Stage2_c1_c0(inputColor));
+ output_Stage2 *= output_Stage1.w;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/427.shader_test b/shaders/skia/427.shader_test
new file mode 100644
index 0000000..99a65b2
--- /dev/null
+++ b/shaders/skia/427.shader_test
@@ -0,0 +1,73 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 ucolor_Stage1_c0_c0_c0_c0;
+uniform vec4 ucolor_Stage2;
+noperspective in vec4 vcolor_Stage0;
+vec4 ConstColorProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = _input.w * ucolor_Stage1_c0_c0_c0_c0;
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = ConstColorProcessor_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 blend_lighten(vec4 src, vec4 dst) {
+ vec4 result = blend_src_over(src, dst);
+ result.xyz = max(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
+ return result;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_lighten(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ {
+ output_Stage2 = output_Stage1 * ucolor_Stage2;
+ }
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 position;
+in vec4 inColor;
+noperspective out vec4 vcolor_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/43-1.shader_test b/shaders/skia/43-1.shader_test
new file mode 100644
index 0000000..ce107b0
--- /dev/null
+++ b/shaders/skia/43-1.shader_test
@@ -0,0 +1,31 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_KHR_blend_equation_advanced : require
+out vec4 sk_FragColor;
+layout (blend_support_all_equations) out ;
+uniform vec4 uColor_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = uColor_Stage0;
+ }
+ {
+ sk_FragColor = outputColor_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 inPosition;
+void main() {
+ vec2 pos2 = inPosition;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/43-12.shader_test b/shaders/skia/43-12.shader_test
new file mode 100644
index 0000000..40d9053
--- /dev/null
+++ b/shaders/skia/43-12.shader_test
@@ -0,0 +1,58 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uborder_Stage1;
+uniform vec4 usubset_Stage1;
+uniform vec4 uclamp_Stage1;
+uniform vec4 unorm_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+flat in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec2 inCoord = vTransformedCoords_0_Stage0;
+ inCoord *= unorm_Stage1.xy;
+ vec2 subsetCoord;
+ subsetCoord.x = inCoord.x;
+ subsetCoord.y = inCoord.y;
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage1.x, uclamp_Stage1.z);
+ clampedCoord.y = subsetCoord.y;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord * unorm_Stage1.zw);
+ if (inCoord.y < usubset_Stage1.y || inCoord.y > usubset_Stage1.w) {
+ textureColor = uborder_Stage1;
+ }
+ output_Stage1 = outputColor_Stage0 * textureColor;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec2 inLocalCoords;
+in vec4 color;
+flat out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vcolor_Stage0 = color;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoords, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/43-14.shader_test b/shaders/skia/43-14.shader_test
new file mode 100644
index 0000000..32ad9c5
--- /dev/null
+++ b/shaders/skia/43-14.shader_test
@@ -0,0 +1,111 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 uscale01_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias01_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale23_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias23_Stage1_c0_c0_c1_c0;
+uniform float uthreshold_Stage1_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage2_c1_c0_c0_c0;
+uniform vec4 ucolor_Stage2_c2_c0_c0_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 RadialGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = length(vTransformedCoords_0_Stage0);
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 DualIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthreshold_Stage1_c0_c0_c1_c0) {
+ scale = uscale01_Stage1_c0_c0_c1_c0;
+ bias = ubias01_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale23_Stage1_c0_c0_c1_c0;
+ bias = ubias23_Stage1_c0_c0_c1_c0;
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = RadialGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = DualIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c1_c0_c0_c0;
+ }
+ return _output;
+}
+vec4 blend_xor(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src + (1.0 - src.w) * dst;
+}
+vec4 ComposeOne_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_xor(ConstColorProcessor_Stage2_c1_c0_c0_c0(vec4(1.0)), _input);
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c2_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c2_c0_c0_c0;
+ }
+ return _output;
+}
+vec4 blend_dst_out(vec4 src, vec4 dst) {
+ return (1.0 - src.w) * dst;
+}
+vec4 ComposeOne_Stage2_c2_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_dst_out(ConstColorProcessor_Stage2_c2_c0_c0_c0(vec4(1.0)), _input);
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = ComposeOne_Stage2_c2_c0(ComposeOne_Stage2_c1_c0(output_Stage1));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/43-15.shader_test b/shaders/skia/43-15.shader_test
new file mode 100644
index 0000000..761e199
--- /dev/null
+++ b/shaders/skia/43-15.shader_test
@@ -0,0 +1,128 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 uscale01_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias01_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale23_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias23_Stage1_c0_c0_c1_c0;
+uniform float uthreshold_Stage1_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage2_c1_c0_c0_c0;
+uniform vec4 ucolor_Stage2_c2_c0_c0_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 RadialGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = length(vTransformedCoords_0_Stage0);
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 DualIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthreshold_Stage1_c0_c0_c1_c0) {
+ scale = uscale01_Stage1_c0_c0_c1_c0;
+ bias = ubias01_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale23_Stage1_c0_c0_c1_c0;
+ bias = ubias23_Stage1_c0_c0_c1_c0;
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = RadialGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = DualIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c1_c0_c0_c0;
+ }
+ return _output;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 blend_darken(vec4 src, vec4 dst) {
+ vec4 result = blend_src_over(src, dst);
+ result.xyz = min(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
+ return result;
+}
+vec4 ComposeOne_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_darken(ConstColorProcessor_Stage2_c1_c0_c0_c0(vec4(1.0)), _input);
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c2_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c2_c0_c0_c0;
+ }
+ return _output;
+}
+float _guarded_divide(float n, float d) {
+ return n / d;
+}
+float _color_burn_component(float sc, float sa, float dc, float da) {
+ if (da == dc) {
+ return (sa * da + sc * (1.0 - da)) + dc * (1.0 - sa);
+ } else if (sc == 0.0) {
+ return dc * (1.0 - sa);
+ }
+ float d = max(0.0, da - _guarded_divide((da - dc) * sa, sc));
+ return (d * sa + sc * (1.0 - da)) + dc * (1.0 - sa);
+}
+vec4 blend_color_burn(vec4 src, vec4 dst) {
+ return vec4(_color_burn_component(src.x, src.w, dst.x, dst.w), _color_burn_component(src.y, src.w, dst.y, dst.w), _color_burn_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+}
+vec4 ComposeOne_Stage2_c2_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_color_burn(ConstColorProcessor_Stage2_c2_c0_c0_c0(vec4(1.0)), _input);
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = ComposeOne_Stage2_c2_c0(ComposeOne_Stage2_c1_c0(output_Stage1));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/43-17.shader_test b/shaders/skia/43-17.shader_test
new file mode 100644
index 0000000..ec1f1d3
--- /dev/null
+++ b/shaders/skia/43-17.shader_test
@@ -0,0 +1,122 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+uniform vec2 uDstTextureUpperLeft_Stage2;
+uniform vec2 uDstTextureCoordScale_Stage2;
+uniform sampler2D uDstTextureSampler_Stage2;
+flat in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec4 varccoord_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+vec4 blend_src(vec4 src, vec4 dst) {
+ return src;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ outputCoverage_Stage0 = vec4(1.0);
+ if (vec2(0.0) != varccoord_Stage0.xy) {
+ float fn = dot(varccoord_Stage0.xy, varccoord_Stage0.xy) - 1.0;
+ if (fn > 0.0) {
+ outputCoverage_Stage0 = vec4(0.0);
+ }
+ }
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_dst_in(outputColor_Stage0, ClampedGradientEffect_Stage1_c0_c0(vec4(1.0)));
+ }
+ {
+ if (all(lessThanEqual(outputCoverage_Stage0.xyz, vec3(0.0)))) {
+ discard;
+ }
+ vec2 _dstTexCoord = (gl_FragCoord.xy - uDstTextureUpperLeft_Stage2) * uDstTextureCoordScale_Stage2;
+ _dstTexCoord.y = 1.0 - _dstTexCoord.y;
+ vec4 _dstColor = texture(uDstTextureSampler_Stage2, _dstTexCoord);
+ sk_FragColor = blend_src(output_Stage1, _dstColor);
+ sk_FragColor = outputCoverage_Stage0 * sk_FragColor + (vec4(1.0) - outputCoverage_Stage0) * _dstColor;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec4 radii_selector;
+in vec4 corner_and_radius_outsets;
+in vec4 skew;
+in vec2 translate;
+in vec4 radii_x;
+in vec4 radii_y;
+in vec4 color;
+in vec4 local_rect;
+flat out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec4 varccoord_Stage0;
+void main() {
+ vcolor_Stage0 = color;
+ vec2 corner = corner_and_radius_outsets.xy;
+ vec2 radius_outset = corner_and_radius_outsets.zw;
+ vec2 radii;
+ radii.x = dot(radii_selector, radii_x);
+ radii.y = dot(radii_selector, radii_y);
+ bool is_arc_section = radii.x > 0.0;
+ radii = abs(radii);
+ vec2 vertexpos = corner + radius_outset * radii;
+ vec2 localcoord = (local_rect.xy * (1.0 - vertexpos) + local_rect.zw * (1.0 + vertexpos)) * 0.5;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localcoord, 1.0)).xy;
+ mat2 skewmatrix = mat2(skew.xy, skew.zw);
+ vec2 devcoord = vertexpos * skewmatrix + translate;
+ if (is_arc_section) {
+ varccoord_Stage0.xy = 1.0 - abs(radius_outset);
+ mat2 derivatives = inverse(skewmatrix);
+ varccoord_Stage0.zw = derivatives * (((varccoord_Stage0.xy / radii) * corner) * 2.0);
+ } else {
+ varccoord_Stage0 = vec4(0.0);
+ }
+ gl_Position = vec4(devcoord.x, devcoord.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/43-2.shader_test b/shaders/skia/43-2.shader_test
new file mode 100644
index 0000000..f320102
--- /dev/null
+++ b/shaders/skia/43-2.shader_test
@@ -0,0 +1,50 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 TextureEffect_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage2, vTransformedCoords_1_Stage0) * _input;
+ return _output;
+}
+vec4 blend_modulate(vec4 src, vec4 dst) {
+ return src * dst;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_modulate(output_Stage1, TextureEffect_Stage2_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/43-21.shader_test b/shaders/skia/43-21.shader_test
new file mode 100644
index 0000000..1047582
--- /dev/null
+++ b/shaders/skia/43-21.shader_test
@@ -0,0 +1,44 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uinnerRect_Stage1;
+uniform vec2 uradiusPlusHalf_Stage1;
+flat in vec4 vcolor_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ float dx0 = uinnerRect_Stage1.x - gl_FragCoord.x;
+ vec2 dxy1 = gl_FragCoord.xy - uinnerRect_Stage1.zw;
+ vec2 dxy = max(vec2(max(dx0, dxy1.x), dxy1.y), 0.0);
+ float topAlpha = clamp(gl_FragCoord.y - uinnerRect_Stage1.y, 0.0, 1.0);
+ float alpha = topAlpha * clamp(uradiusPlusHalf_Stage1.x - length(dxy), 0.0, 1.0);
+ output_Stage1 = vec4(alpha);
+ }
+ {
+ sk_FragColor = outputColor_Stage0 * output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 position;
+in vec4 color;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/43-22.shader_test b/shaders/skia/43-22.shader_test
new file mode 100644
index 0000000..f716531
--- /dev/null
+++ b/shaders/skia/43-22.shader_test
@@ -0,0 +1,91 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 uscale01_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias01_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale23_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias23_Stage1_c0_c0_c1_c0;
+uniform float uthreshold_Stage1_c0_c0_c1_c0;
+noperspective in vec4 vinCircleEdge_Stage0;
+noperspective in vec4 vinColor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 RadialGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = length(vTransformedCoords_0_Stage0);
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 DualIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthreshold_Stage1_c0_c0_c1_c0) {
+ scale = uscale01_Stage1_c0_c0_c1_c0;
+ bias = ubias01_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale23_Stage1_c0_c0_c1_c0;
+ bias = ubias23_Stage1_c0_c0_c1_c0;
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = RadialGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = DualIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ vec4 circleEdge;
+ circleEdge = vinCircleEdge_Stage0;
+ float d = length(circleEdge.xy);
+ float distanceToOuterEdge = circleEdge.z * (1.0 - d);
+ float edgeAlpha = clamp(distanceToOuterEdge, 0.0, 1.0);
+ float distanceToInnerEdge = circleEdge.z * (d - circleEdge.w);
+ float innerAlpha = clamp(distanceToInnerEdge, 0.0, 1.0);
+ edgeAlpha *= innerAlpha;
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1 * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec4 inCircleEdge;
+noperspective out vec4 vinCircleEdge_Stage0;
+noperspective out vec4 vinColor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vinCircleEdge_Stage0 = inCircleEdge;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/43-24.shader_test b/shaders/skia/43-24.shader_test
new file mode 100644
index 0000000..d8f8e15
--- /dev/null
+++ b/shaders/skia/43-24.shader_test
@@ -0,0 +1,44 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform float uPixelSize_Stage1;
+uniform vec2 uRange_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = vec4(1.0, 1.0, 1.0, 1.0);
+ vec2 coord = vTransformedCoords_0_Stage0;
+ coord.x -= 25.0 * uPixelSize_Stage1;
+ float highBound = min(uRange_Stage1.y, coord.x + 50.0 * uPixelSize_Stage1);
+ coord.x = max(uRange_Stage1.x, coord.x);
+ for (int i = 0;i < 51; i++) {
+ output_Stage1 = min(output_Stage1, texture(uTextureSampler_0_Stage1, coord));
+ coord.x += uPixelSize_Stage1;
+ coord.x = min(highBound, coord.x);
+ }
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/43-25.shader_test b/shaders/skia/43-25.shader_test
new file mode 100644
index 0000000..c9a2985
--- /dev/null
+++ b/shaders/skia/43-25.shader_test
@@ -0,0 +1,75 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage2_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c1_c0;
+ }
+ return _output;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_src_over(ConstColorProcessor_Stage2_c1_c0(vec4(1.0)), output_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/43-26.shader_test b/shaders/skia/43-26.shader_test
new file mode 100644
index 0000000..496cd53
--- /dev/null
+++ b/shaders/skia/43-26.shader_test
@@ -0,0 +1,41 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform float uPixelSize_Stage1;
+uniform vec2 uRange_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0;
+ coord.y -= 8.0 * uPixelSize_Stage1;
+ for (int i = 0;i < 17; i++) {
+ output_Stage1 = max(output_Stage1, texture(uTextureSampler_0_Stage1, coord));
+ coord.y += uPixelSize_Stage1;
+ }
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/43-27.shader_test b/shaders/skia/43-27.shader_test
new file mode 100644
index 0000000..b81a077
--- /dev/null
+++ b/shaders/skia/43-27.shader_test
@@ -0,0 +1,135 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform float uSurfaceScale_Stage1;
+uniform vec3 uLightColor_Stage1;
+uniform float uKD_Stage1;
+uniform vec3 uLightDirection_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 light_Stage1(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ float colorScale = uKD_Stage1 * dot(normal, surfaceToLight);
+ return vec4(lightColor * clamp(colorScale, 0.0, 1.0), 1.0);
+}
+float sobel_Stage1(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage1(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage1(float m[9], float surfaceScale) {
+ return pointToNormal_Stage1(sobel_Stage1(m[1], m[2], m[4], m[5], m[7], m[8], 0.5), sobel_Stage1(0.0, 0.0, m[1], m[7], m[2], m[8], 0.33333298563957214), surfaceScale);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ vec2 coord = vTransformedCoords_0_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp0 = textureColor;
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp1 = textureColor;
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp2 = textureColor;
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp3 = textureColor;
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp4 = textureColor;
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp5 = textureColor;
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp6 = textureColor;
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp7 = textureColor;
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp8 = textureColor;
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = uLightDirection_Stage1;
+ output_Stage1 = light_Stage1(normal_Stage1(m, uSurfaceScale_Stage1), surfaceToLight, uLightColor_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/43-28.shader_test b/shaders/skia/43-28.shader_test
new file mode 100644
index 0000000..1d94488
--- /dev/null
+++ b/shaders/skia/43-28.shader_test
@@ -0,0 +1,67 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec2 uDstTextureUpperLeft_Stage1;
+uniform vec2 uDstTextureCoordScale_Stage1;
+uniform sampler2D uTextureSampler_0_Stage0;
+uniform sampler2D uDstTextureSampler_Stage1;
+noperspective in vec2 vTextureCoords_Stage0;
+flat in int vTexIndex_Stage0;
+noperspective in vec4 vinColor_Stage0;
+vec4 blend_plus(vec4 src, vec4 dst) {
+ return min(src + dst, 1.0);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vinColor_Stage0;
+ vec4 texColor;
+ {
+ texColor = texture(uTextureSampler_0_Stage0, vTextureCoords_Stage0);
+ }
+ outputCoverage_Stage0 = texColor;
+ }
+ {
+ if (all(lessThanEqual(outputCoverage_Stage0.xyz, vec3(0.0)))) {
+ discard;
+ }
+ vec2 _dstTexCoord = (gl_FragCoord.xy - uDstTextureUpperLeft_Stage1) * uDstTextureCoordScale_Stage1;
+ _dstTexCoord.y = 1.0 - _dstTexCoord.y;
+ vec4 _dstColor = texture(uDstTextureSampler_Stage1, _dstTexCoord);
+ sk_FragColor = blend_plus(outputColor_Stage0, _dstColor);
+ float lerpRed = mix(_dstColor.w, sk_FragColor.w, outputCoverage_Stage0.x);
+ float lerpBlue = mix(_dstColor.w, sk_FragColor.w, outputCoverage_Stage0.y);
+ float lerpGreen = mix(_dstColor.w, sk_FragColor.w, outputCoverage_Stage0.z);
+ sk_FragColor = outputCoverage_Stage0 * sk_FragColor + (vec4(1.0) - outputCoverage_Stage0) * _dstColor;
+ sk_FragColor.w = max(max(lerpRed, lerpBlue), lerpGreen);
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform vec2 uAtlasSizeInv_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in uvec2 inTextureCoords;
+noperspective out vec2 vTextureCoords_Stage0;
+flat out int vTexIndex_Stage0;
+noperspective out vec4 vinColor_Stage0;
+void main() {
+ ivec2 signedCoords = ivec2(int(inTextureCoords.x), int(inTextureCoords.y));
+ vec2 unormTexCoords = vec2(float(signedCoords.x / 2), float(signedCoords.y / 2));
+ vTextureCoords_Stage0 = unormTexCoords * uAtlasSizeInv_Stage0;
+ vTexIndex_Stage0 = 0;
+ vinColor_Stage0 = inColor;
+ gl_Position = vec4(inPosition.x, inPosition.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/43-3.shader_test b/shaders/skia/43-3.shader_test
new file mode 100644
index 0000000..6f537f6
--- /dev/null
+++ b/shaders/skia/43-3.shader_test
@@ -0,0 +1,102 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uclamp_Stage1_c0_c0_c0_c0;
+uniform vec4 uclamp_Stage1_c0_c0_c1_c0;
+uniform vec4 uclamp_Stage1_c0_c0_c2_c0;
+uniform mat3 ucolorSpaceMatrix_Stage1_c0_c0;
+uniform vec3 ucolorSpaceTranslate_Stage1_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+uniform sampler2D uTextureSampler_2_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 inCoord = vTransformedCoords_0_Stage0;
+ vec2 subsetCoord;
+ subsetCoord.x = inCoord.x;
+ subsetCoord.y = inCoord.y;
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage1_c0_c0_c0_c0.x, uclamp_Stage1_c0_c0_c0_c0.z);
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage1_c0_c0_c0_c0.y, uclamp_Stage1_c0_c0_c0_c0.w);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ _output = _input * textureColor;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 inCoord = vTransformedCoords_1_Stage0;
+ vec2 subsetCoord;
+ subsetCoord.x = inCoord.x;
+ subsetCoord.y = inCoord.y;
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage1_c0_c0_c1_c0.x, uclamp_Stage1_c0_c0_c1_c0.z);
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage1_c0_c0_c1_c0.y, uclamp_Stage1_c0_c0_c1_c0.w);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ _output = _input * textureColor;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c0_c0_c2_c0(vec4 _input) {
+ vec4 _output;
+ vec2 inCoord = vTransformedCoords_2_Stage0;
+ vec2 subsetCoord;
+ subsetCoord.x = inCoord.x;
+ subsetCoord.y = inCoord.y;
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage1_c0_c0_c2_c0.x, uclamp_Stage1_c0_c0_c2_c0.z);
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage1_c0_c0_c2_c0.y, uclamp_Stage1_c0_c0_c2_c0.w);
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ _output = _input * textureColor;
+ return _output;
+}
+vec4 YUVtoRGBEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 planes[3];
+ planes[0] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0));
+ planes[1] = TextureEffect_Stage1_c0_c0_c1_c0(vec4(1.0));
+ planes[2] = TextureEffect_Stage1_c0_c0_c2_c0(vec4(1.0));
+ vec4 color = vec4(planes[0].x, planes[2].x, planes[1].x, 1.0);
+ color.xyz = clamp(color.xyz * ucolorSpaceMatrix_Stage1_c0_c0 + ucolorSpaceTranslate_Stage1_c0_c0, 0.0, 1.0);
+ _output = color;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = YUVtoRGBEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/43-35.shader_test b/shaders/skia/43-35.shader_test
new file mode 100644
index 0000000..30c81fc
--- /dev/null
+++ b/shaders/skia/43-35.shader_test
@@ -0,0 +1,41 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform float uPixelSize_Stage1;
+uniform vec2 uRange_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0;
+ coord.x -= uPixelSize_Stage1;
+ for (int i = 0;i < 3; i++) {
+ output_Stage1 = max(output_Stage1, texture(uTextureSampler_0_Stage1, coord));
+ coord.x += uPixelSize_Stage1;
+ }
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/43-44.shader_test b/shaders/skia/43-44.shader_test
new file mode 100644
index 0000000..007ae5a
--- /dev/null
+++ b/shaders/skia/43-44.shader_test
@@ -0,0 +1,52 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uColor_Stage0;
+uniform vec2 uDstTextureUpperLeft_Stage1;
+uniform vec2 uDstTextureCoordScale_Stage1;
+uniform sampler2D uDstTextureSampler_Stage1;
+noperspective in float vinCoverage_Stage0;
+vec4 blend_src_out(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = uColor_Stage0;
+ float alpha = 1.0;
+ alpha = vinCoverage_Stage0;
+ outputCoverage_Stage0 = vec4(alpha);
+ }
+ {
+ if (all(lessThanEqual(outputCoverage_Stage0.xyz, vec3(0.0)))) {
+ discard;
+ }
+ vec2 _dstTexCoord = (gl_FragCoord.xy - uDstTextureUpperLeft_Stage1) * uDstTextureCoordScale_Stage1;
+ _dstTexCoord.y = 1.0 - _dstTexCoord.y;
+ vec4 _dstColor = texture(uDstTextureSampler_Stage1, _dstTexCoord);
+ sk_FragColor = blend_src_out(outputColor_Stage0, _dstColor);
+ sk_FragColor = outputCoverage_Stage0 * sk_FragColor + (vec4(1.0) - outputCoverage_Stage0) * _dstColor;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 inPosition;
+in float inCoverage;
+noperspective out float vinCoverage_Stage0;
+void main() {
+ vec2 pos2 = inPosition;
+ vinCoverage_Stage0 = inCoverage;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/43-45.shader_test b/shaders/skia/43-45.shader_test
new file mode 100644
index 0000000..841ea34
--- /dev/null
+++ b/shaders/skia/43-45.shader_test
@@ -0,0 +1,106 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_0_Stage0;
+ float t = -1.0;
+ {
+ {
+ float invR1 = ufocalParams_Stage1_c0_c0_c0_c0.x;
+ float fx = ufocalParams_Stage1_c0_c0_c0_c0.y;
+ float x_t = -1.0;
+ {
+ x_t = length(p) - p.x * invR1;
+ }
+ {
+ {
+ t = x_t + fx;
+ }
+ }
+ }
+ }
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/43-46.shader_test b/shaders/skia/43-46.shader_test
new file mode 100644
index 0000000..3a8c824
--- /dev/null
+++ b/shaders/skia/43-46.shader_test
@@ -0,0 +1,122 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_0_Stage0;
+ float t = -1.0;
+ {
+ {
+ float invR1 = ufocalParams_Stage1_c0_c0_c0_c0.x;
+ float fx = ufocalParams_Stage1_c0_c0_c0_c0.y;
+ float x_t = -1.0;
+ {
+ x_t = length(p) - p.x * invR1;
+ }
+ {
+ {
+ t = x_t + fx;
+ }
+ }
+ }
+ }
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_1_Stage0.x);
+ uint y = uint(vTransformedCoords_1_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ output_Stage2 = vec4(clamp(output_Stage2.xyz + value * 0.0039215688593685627, 0.0, output_Stage2.w), output_Stage2.w);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/43-47.shader_test b/shaders/skia/43-47.shader_test
new file mode 100644
index 0000000..5d18e6f
--- /dev/null
+++ b/shaders/skia/43-47.shader_test
@@ -0,0 +1,108 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_0_Stage0;
+ float t = -1.0;
+ float v = 1.0;
+ {
+ {
+ float r0_2 = ufocalParams_Stage1_c0_c0_c0_c0.y;
+ t = r0_2 - p.y * p.y;
+ if (t >= 0.0) {
+ t = p.x + sqrt(t);
+ } else {
+ v = -1.0;
+ }
+ }
+ }
+ _output = vec4(t, v, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/43-48.shader_test b/shaders/skia/43-48.shader_test
new file mode 100644
index 0000000..0ccf44c
--- /dev/null
+++ b/shaders/skia/43-48.shader_test
@@ -0,0 +1,111 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_0_Stage0;
+ float t = -1.0;
+ {
+ {
+ float invR1 = ufocalParams_Stage1_c0_c0_c0_c0.x;
+ float fx = ufocalParams_Stage1_c0_c0_c0_c0.y;
+ float x_t = -1.0;
+ {
+ x_t = length(p) - p.x * invR1;
+ }
+ {
+ {
+ t = x_t + fx;
+ }
+ }
+ }
+ }
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/43-49.shader_test b/shaders/skia/43-49.shader_test
new file mode 100644
index 0000000..fb9bab9
--- /dev/null
+++ b/shaders/skia/43-49.shader_test
@@ -0,0 +1,123 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_0_Stage0;
+ float t = -1.0;
+ float v = 1.0;
+ {
+ {
+ float r0_2 = ufocalParams_Stage1_c0_c0_c0_c0.y;
+ t = r0_2 - p.y * p.y;
+ if (t >= 0.0) {
+ t = p.x + sqrt(t);
+ } else {
+ v = -1.0;
+ }
+ }
+ }
+ _output = vec4(t, v, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TiledGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_1_Stage0.x);
+ uint y = uint(vTransformedCoords_1_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ output_Stage2 = vec4(clamp(output_Stage2.xyz + value * 0.0039215688593685627, 0.0, output_Stage2.w), output_Stage2.w);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/43-5.shader_test b/shaders/skia/43-5.shader_test
new file mode 100644
index 0000000..0941c30
--- /dev/null
+++ b/shaders/skia/43-5.shader_test
@@ -0,0 +1,101 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform mat4 um_Stage2;
+uniform vec4 uv_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+uniform sampler2D uTextureSampler_2_Stage1;
+uniform sampler2D uTextureSampler_3_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+noperspective in vec2 vTransformedCoords_3_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_1_Stage1, vTransformedCoords_1_Stage0) * _input;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c0_c0_c2_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_2_Stage1, vTransformedCoords_2_Stage0) * _input;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c0_c0_c3_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_3_Stage1, vTransformedCoords_3_Stage0) * _input;
+ return _output;
+}
+vec4 YUVtoRGBEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 planes[4];
+ planes[0] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0));
+ planes[1] = TextureEffect_Stage1_c0_c0_c1_c0(vec4(1.0));
+ planes[2] = TextureEffect_Stage1_c0_c0_c2_c0(vec4(1.0));
+ planes[3] = TextureEffect_Stage1_c0_c0_c3_c0(vec4(1.0));
+ vec4 color = vec4(planes[0].x, planes[1].x, planes[2].x, planes[3].w);
+ color.xyz *= color.w;
+ _output = color;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = YUVtoRGBEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ vec4 inputColor = output_Stage1;
+ {
+ float nonZeroAlpha = max(inputColor.w, 9.9999997473787516e-05);
+ inputColor = vec4(inputColor.xyz / nonZeroAlpha, inputColor.w);
+ }
+ output_Stage2 = um_Stage2 * inputColor + uv_Stage2;
+ {
+ output_Stage2 = clamp(output_Stage2, 0.0, 1.0);
+ }
+ {
+ output_Stage2.xyz *= output_Stage2.w;
+ }
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+uniform mat3 uCoordTransformMatrix_3_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+noperspective out vec2 vTransformedCoords_3_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_3_Stage0 = (uCoordTransformMatrix_3_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/43-50.shader_test b/shaders/skia/43-50.shader_test
new file mode 100644
index 0000000..c20d77e
--- /dev/null
+++ b/shaders/skia/43-50.shader_test
@@ -0,0 +1,126 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_0_Stage0;
+ float t = -1.0;
+ {
+ {
+ float invR1 = ufocalParams_Stage1_c0_c0_c0_c0.x;
+ float fx = ufocalParams_Stage1_c0_c0_c0_c0.y;
+ float x_t = -1.0;
+ {
+ x_t = length(p) - p.x * invR1;
+ }
+ {
+ {
+ t = x_t + fx;
+ }
+ }
+ }
+ }
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TiledGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_1_Stage0.x);
+ uint y = uint(vTransformedCoords_1_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ output_Stage2 = vec4(clamp(output_Stage2.xyz + value * 0.0039215688593685627, 0.0, output_Stage2.w), output_Stage2.w);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/43-51.shader_test b/shaders/skia/43-51.shader_test
new file mode 100644
index 0000000..63eff3d
--- /dev/null
+++ b/shaders/skia/43-51.shader_test
@@ -0,0 +1,121 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_0_Stage0;
+ float t = -1.0;
+ float v = 1.0;
+ {
+ {
+ float r0_2 = ufocalParams_Stage1_c0_c0_c0_c0.y;
+ t = r0_2 - p.y * p.y;
+ if (t >= 0.0) {
+ t = p.x + sqrt(t);
+ } else {
+ v = -1.0;
+ }
+ }
+ }
+ _output = vec4(t, v, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else {
+ {
+ t.x = fract(t.x);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TiledGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_1_Stage0.x);
+ uint y = uint(vTransformedCoords_1_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ output_Stage2 = vec4(clamp(output_Stage2.xyz + value * 0.0039215688593685627, 0.0, output_Stage2.w), output_Stage2.w);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/43-52.shader_test b/shaders/skia/43-52.shader_test
new file mode 100644
index 0000000..4a66ab5
--- /dev/null
+++ b/shaders/skia/43-52.shader_test
@@ -0,0 +1,124 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_0_Stage0;
+ float t = -1.0;
+ {
+ {
+ float invR1 = ufocalParams_Stage1_c0_c0_c0_c0.x;
+ float fx = ufocalParams_Stage1_c0_c0_c0_c0.y;
+ float x_t = -1.0;
+ {
+ x_t = length(p) - p.x * invR1;
+ }
+ {
+ {
+ t = x_t + fx;
+ }
+ }
+ }
+ }
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else {
+ {
+ t.x = fract(t.x);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TiledGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_1_Stage0.x);
+ uint y = uint(vTransformedCoords_1_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ output_Stage2 = vec4(clamp(output_Stage2.xyz + value * 0.0039215688593685627, 0.0, output_Stage2.w), output_Stage2.w);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/43-53.shader_test b/shaders/skia/43-53.shader_test
new file mode 100644
index 0000000..4e40300
--- /dev/null
+++ b/shaders/skia/43-53.shader_test
@@ -0,0 +1,124 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_0_Stage0;
+ float t = -1.0;
+ float v = 1.0;
+ {
+ {
+ float r0_2 = ufocalParams_Stage1_c0_c0_c0_c0.y;
+ t = r0_2 - p.y * p.y;
+ if (t >= 0.0) {
+ t = p.x + sqrt(t);
+ } else {
+ v = -1.0;
+ }
+ }
+ }
+ _output = vec4(t, v, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_1_Stage0.x);
+ uint y = uint(vTransformedCoords_1_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ output_Stage2 = vec4(clamp(output_Stage2.xyz + value * 0.0039215688593685627, 0.0, output_Stage2.w), output_Stage2.w);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/43-54.shader_test b/shaders/skia/43-54.shader_test
new file mode 100644
index 0000000..626f0f1
--- /dev/null
+++ b/shaders/skia/43-54.shader_test
@@ -0,0 +1,127 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_0_Stage0;
+ float t = -1.0;
+ {
+ {
+ float invR1 = ufocalParams_Stage1_c0_c0_c0_c0.x;
+ float fx = ufocalParams_Stage1_c0_c0_c0_c0.y;
+ float x_t = -1.0;
+ {
+ x_t = length(p) - p.x * invR1;
+ }
+ {
+ {
+ t = x_t + fx;
+ }
+ }
+ }
+ }
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_1_Stage0.x);
+ uint y = uint(vTransformedCoords_1_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ output_Stage2 = vec4(clamp(output_Stage2.xyz + value * 0.0039215688593685627, 0.0, output_Stage2.w), output_Stage2.w);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/43-55.shader_test b/shaders/skia/43-55.shader_test
new file mode 100644
index 0000000..86efde1
--- /dev/null
+++ b/shaders/skia/43-55.shader_test
@@ -0,0 +1,144 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+in float vcoverage_Stage0;
+flat in vec4 vgeomDomain_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_0_Stage0;
+ float t = -1.0;
+ float v = 1.0;
+ {
+ {
+ float invR1 = ufocalParams_Stage1_c0_c0_c0_c0.x;
+ float fx = ufocalParams_Stage1_c0_c0_c0_c0.y;
+ float x_t = -1.0;
+ {
+ float temp = p.x * p.x - p.y * p.y;
+ if (temp >= 0.0) {
+ {
+ x_t = -sqrt(temp) - p.x * invR1;
+ }
+ }
+ }
+ {
+ if (x_t <= 0.0) {
+ v = -1.0;
+ }
+ }
+ {
+ {
+ t = -x_t + fx;
+ }
+ }
+ }
+ }
+ _output = vec4(t, v, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ float coverage = vcoverage_Stage0 * gl_FragCoord.w;
+ vec4 geoDomain;
+ geoDomain = vgeomDomain_Stage0;
+ if (coverage < 0.5) {
+ vec4 dists4 = clamp(vec4(1.0, 1.0, -1.0, -1.0) * (gl_FragCoord.xyxy - geoDomain), 0.0, 1.0);
+ vec2 dists2 = dists4.xy * dists4.zw;
+ coverage = min(coverage, dists2.x * dists2.y);
+ }
+ outputCoverage_Stage0 = vec4(coverage);
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1 * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec4 positionWithCoverage;
+in vec4 color;
+in vec2 localCoord;
+in vec4 geomDomain;
+out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+out float vcoverage_Stage0;
+flat out vec4 vgeomDomain_Stage0;
+void main() {
+ vec3 position = positionWithCoverage.xyz;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ vcoverage_Stage0 = positionWithCoverage.w * positionWithCoverage.z;
+ vgeomDomain_Stage0 = geomDomain;
+ gl_Position = vec4(position.x, position.y, 0.0, position.z);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/43-56.shader_test b/shaders/skia/43-56.shader_test
new file mode 100644
index 0000000..f93b570
--- /dev/null
+++ b/shaders/skia/43-56.shader_test
@@ -0,0 +1,160 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+in vec2 vTransformedCoords_0_Stage0;
+in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+in float vcoverage_Stage0;
+flat in vec4 vgeomDomain_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_0_Stage0;
+ float t = -1.0;
+ float v = 1.0;
+ {
+ {
+ float invR1 = ufocalParams_Stage1_c0_c0_c0_c0.x;
+ float fx = ufocalParams_Stage1_c0_c0_c0_c0.y;
+ float x_t = -1.0;
+ {
+ float temp = p.x * p.x - p.y * p.y;
+ if (temp >= 0.0) {
+ {
+ x_t = -sqrt(temp) - p.x * invR1;
+ }
+ }
+ }
+ {
+ if (x_t <= 0.0) {
+ v = -1.0;
+ }
+ }
+ {
+ {
+ t = -x_t + fx;
+ }
+ }
+ }
+ }
+ _output = vec4(t, v, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ float coverage = vcoverage_Stage0 * gl_FragCoord.w;
+ vec4 geoDomain;
+ geoDomain = vgeomDomain_Stage0;
+ if (coverage < 0.5) {
+ vec4 dists4 = clamp(vec4(1.0, 1.0, -1.0, -1.0) * (gl_FragCoord.xyxy - geoDomain), 0.0, 1.0);
+ vec2 dists2 = dists4.xy * dists4.zw;
+ coverage = min(coverage, dists2.x * dists2.y);
+ }
+ outputCoverage_Stage0 = vec4(coverage);
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_1_Stage0.x);
+ uint y = uint(vTransformedCoords_1_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ output_Stage2 = vec4(clamp(output_Stage2.xyz + value * 0.0039215688593685627, 0.0, output_Stage2.w), output_Stage2.w);
+ }
+ {
+ sk_FragColor = output_Stage2 * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec4 positionWithCoverage;
+in vec4 color;
+in vec2 localCoord;
+in vec4 geomDomain;
+out vec2 vTransformedCoords_0_Stage0;
+out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+out float vcoverage_Stage0;
+flat out vec4 vgeomDomain_Stage0;
+void main() {
+ vec3 position = positionWithCoverage.xyz;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ vcoverage_Stage0 = positionWithCoverage.w * positionWithCoverage.z;
+ vgeomDomain_Stage0 = geomDomain;
+ gl_Position = vec4(position.x, position.y, 0.0, position.z);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/43-57.shader_test b/shaders/skia/43-57.shader_test
new file mode 100644
index 0000000..fa7555f
--- /dev/null
+++ b/shaders/skia/43-57.shader_test
@@ -0,0 +1,123 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+noperspective in vec3 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 vTransformedCoords_0_Stage0_ensure2D = vTransformedCoords_0_Stage0.xy / vTransformedCoords_0_Stage0.z;
+ vec2 p = vTransformedCoords_0_Stage0_ensure2D;
+ float t = -1.0;
+ float v = 1.0;
+ {
+ {
+ float invR1 = ufocalParams_Stage1_c0_c0_c0_c0.x;
+ float fx = ufocalParams_Stage1_c0_c0_c0_c0.y;
+ float x_t = -1.0;
+ {
+ float temp = p.x * p.x - p.y * p.y;
+ if (temp >= 0.0) {
+ {
+ x_t = -sqrt(temp) - p.x * invR1;
+ }
+ }
+ }
+ {
+ if (x_t <= 0.0) {
+ v = -1.0;
+ }
+ }
+ {
+ {
+ t = -x_t + fx;
+ }
+ }
+ }
+ }
+ _output = vec4(t, v, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec3 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0);
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/43-58.shader_test b/shaders/skia/43-58.shader_test
new file mode 100644
index 0000000..b9a02d5
--- /dev/null
+++ b/shaders/skia/43-58.shader_test
@@ -0,0 +1,139 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+noperspective in vec3 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 vTransformedCoords_0_Stage0_ensure2D = vTransformedCoords_0_Stage0.xy / vTransformedCoords_0_Stage0.z;
+ vec2 p = vTransformedCoords_0_Stage0_ensure2D;
+ float t = -1.0;
+ float v = 1.0;
+ {
+ {
+ float invR1 = ufocalParams_Stage1_c0_c0_c0_c0.x;
+ float fx = ufocalParams_Stage1_c0_c0_c0_c0.y;
+ float x_t = -1.0;
+ {
+ float temp = p.x * p.x - p.y * p.y;
+ if (temp >= 0.0) {
+ {
+ x_t = -sqrt(temp) - p.x * invR1;
+ }
+ }
+ }
+ {
+ if (x_t <= 0.0) {
+ v = -1.0;
+ }
+ }
+ {
+ {
+ t = -x_t + fx;
+ }
+ }
+ }
+ }
+ _output = vec4(t, v, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_1_Stage0.x);
+ uint y = uint(vTransformedCoords_1_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ output_Stage2 = vec4(clamp(output_Stage2.xyz + value * 0.0039215688593685627, 0.0, output_Stage2.w), output_Stage2.w);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec3 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0);
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/43-65.shader_test b/shaders/skia/43-65.shader_test
new file mode 100644
index 0000000..e711902
--- /dev/null
+++ b/shaders/skia/43-65.shader_test
@@ -0,0 +1,67 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 TextureEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = TextureEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = OverrideInputFragmentProcessor_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 blend_plus(vec4 src, vec4 dst) {
+ return min(src + dst, 1.0);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_plus(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec2 inLocalCoord;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 color = inColor;
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/43-66.shader_test b/shaders/skia/43-66.shader_test
new file mode 100644
index 0000000..adbc0ae
--- /dev/null
+++ b/shaders/skia/43-66.shader_test
@@ -0,0 +1,95 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 ucolor_Stage2;
+uniform vec4 ucolor_Stage3_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 TextureEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+vec4 ComposeOne_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_dst_in(_input, TextureEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0)));
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = ComposeOne_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 ConstColorProcessor_Stage3_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage3_c1_c0;
+ }
+ return _output;
+}
+vec4 blend_plus(vec4 src, vec4 dst) {
+ return min(src + dst, 1.0);
+}
+vec4 blend_modulate(vec4 src, vec4 dst) {
+ return src * dst;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_plus(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ {
+ output_Stage2 = output_Stage1 * ucolor_Stage2;
+ }
+ }
+ vec4 output_Stage3;
+ {
+ output_Stage3 = blend_modulate(ConstColorProcessor_Stage3_c1_c0(vec4(1.0)), output_Stage2);
+ }
+ {
+ sk_FragColor = output_Stage3;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec2 inLocalCoord;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 color = inColor;
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/43-67.shader_test b/shaders/skia/43-67.shader_test
new file mode 100644
index 0000000..09bb6a8
--- /dev/null
+++ b/shaders/skia/43-67.shader_test
@@ -0,0 +1,52 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 urectUniform_Stage1;
+flat in vec4 vcolor_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ float alpha;
+ {
+ float xSub, ySub;
+ xSub = min(gl_FragCoord.x - urectUniform_Stage1.x, 0.0);
+ xSub += min(urectUniform_Stage1.z - gl_FragCoord.x, 0.0);
+ ySub = min(gl_FragCoord.y - urectUniform_Stage1.y, 0.0);
+ ySub += min(urectUniform_Stage1.w - gl_FragCoord.y, 0.0);
+ alpha = (1.0 + max(xSub, -1.0)) * (1.0 + max(ySub, -1.0));
+ }
+ {
+ alpha = 1.0 - alpha;
+ }
+ output_Stage1 = vec4(alpha);
+ }
+ {
+ sk_FragColor = outputColor_Stage0 * output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 inPosition;
+in vec2 inLocalCoords;
+in vec4 color;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vcolor_Stage0 = color;
+ vec2 pos2 = inPosition;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/43-68.shader_test b/shaders/skia/43-68.shader_test
new file mode 100644
index 0000000..478fc40
--- /dev/null
+++ b/shaders/skia/43-68.shader_test
@@ -0,0 +1,56 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec3 uedges_Stage1[4];
+uniform sampler2D uTextureSampler_0_Stage0;
+noperspective in vec2 vlocalCoord_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vec4(1.0);
+ vec2 texCoord;
+ texCoord = vlocalCoord_Stage0;
+ outputColor_Stage0 = texture(uTextureSampler_0_Stage0, texCoord);
+ }
+ vec4 output_Stage1;
+ {
+ float alpha = 1.0;
+ float edge;
+ edge = dot(uedges_Stage1[0], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage1[1], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage1[2], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage1[3], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ output_Stage1 = vec4(alpha);
+ }
+ {
+ sk_FragColor = outputColor_Stage0 * output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vlocalCoord_Stage0;
+void main() {
+ vlocalCoord_Stage0 = localCoord;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/43-69.shader_test b/shaders/skia/43-69.shader_test
new file mode 100644
index 0000000..7a33239
--- /dev/null
+++ b/shaders/skia/43-69.shader_test
@@ -0,0 +1,41 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform float uPixelSize_Stage1;
+uniform vec2 uRange_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0;
+ coord.x -= 7.0 * uPixelSize_Stage1;
+ for (int i = 0;i < 15; i++) {
+ output_Stage1 = max(output_Stage1, texture(uTextureSampler_0_Stage1, coord));
+ coord.x += uPixelSize_Stage1;
+ }
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/43-7.shader_test b/shaders/skia/43-7.shader_test
new file mode 100644
index 0000000..c5bca9d
--- /dev/null
+++ b/shaders/skia/43-7.shader_test
@@ -0,0 +1,61 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 ucolor_Stage1_c0_c0_c0_c0;
+noperspective in vec4 vcolor_Stage0;
+vec4 ConstColorProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = _input.w * ucolor_Stage1_c0_c0_c0_c0;
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = ConstColorProcessor_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 blend_src(vec4 src, vec4 dst) {
+ return src;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_src(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 position;
+in vec4 inColor;
+noperspective out vec4 vcolor_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/43-70.shader_test b/shaders/skia/43-70.shader_test
new file mode 100644
index 0000000..999fca3
--- /dev/null
+++ b/shaders/skia/43-70.shader_test
@@ -0,0 +1,121 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 uleftBorderColor_Stage1_c1_c0_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c1_c0_c0_c0;
+uniform vec4 ustart_Stage1_c1_c0_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c1_c0_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = ClampedGradientEffect_Stage1_c0_c0_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ return _output;
+}
+vec4 LinearGradientLayout_Stage1_c1_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_1_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c1_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c1_c0_c0_c0_c1_c0 + t * uend_Stage1_c1_c0_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c1_c0_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c1_c0_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c1_c0_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c1_c0_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = ClampedGradientEffect_Stage1_c1_c0_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ return _output;
+}
+vec4 blend_src_out(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_src_out(OverrideInputFragmentProcessor_Stage1_c0_c0(inputColor), OverrideInputFragmentProcessor_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/43-72.shader_test b/shaders/skia/43-72.shader_test
new file mode 100644
index 0000000..a18f835
--- /dev/null
+++ b/shaders/skia/43-72.shader_test
@@ -0,0 +1,56 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uCoordTransformMatrix_0_Stage0;
+uniform vec4 ucircle_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0(vec4 _input, vec2 _coords) {
+ _coords = _coords * uCoordTransformMatrix_0_Stage0.xz + uCoordTransformMatrix_0_Stage0.yw;
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, _coords) * _input;
+ return _output;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TextureEffect_Stage1_c0_c0(vec4(1.0), gl_FragCoord.xy);
+ }
+ vec4 output_Stage2;
+ {
+ float d;
+ {
+ d = (length((ucircle_Stage2.xy - gl_FragCoord.xy) * ucircle_Stage2.w) - 1.0) * ucircle_Stage2.z;
+ }
+ {
+ output_Stage2 = output_Stage1 * clamp(d, 0.0, 1.0);
+ }
+ }
+ {
+ sk_FragColor = outputColor_Stage0 * output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 position;
+in vec4 color;
+noperspective out vec4 vcolor_Stage0;
+void main() {
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/43-74.shader_test b/shaders/skia/43-74.shader_test
new file mode 100644
index 0000000..c77bf0a
--- /dev/null
+++ b/shaders/skia/43-74.shader_test
@@ -0,0 +1,97 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 ustart_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c0_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c0_c0_c1_c0;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+vec4 ComposeOne_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_dst_in(_input, TiledGradientEffect_Stage1_c0_c0_c0_c0(vec4(1.0)));
+ return _output;
+}
+vec4 TextureEffect_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_1_Stage0) * _input;
+ return _output;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TextureEffect_Stage1_c1_c0(ComposeOne_Stage1_c0_c0(outputColor_Stage0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = texture(uTextureSampler_0_Stage2, vTransformedCoords_2_Stage0);
+ }
+ {
+ sk_FragColor = output_Stage1 * output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/43-76.shader_test b/shaders/skia/43-76.shader_test
new file mode 100644
index 0000000..e15aaa5
--- /dev/null
+++ b/shaders/skia/43-76.shader_test
@@ -0,0 +1,57 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TextureEffect_Stage1_c0_c0(vec4(1.0));
+ output_Stage1.xyz *= outputColor_Stage0.xyz;
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = texture(uTextureSampler_0_Stage2, vTransformedCoords_1_Stage0);
+ }
+ {
+ sk_FragColor = output_Stage1 * output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/43-83.shader_test b/shaders/skia/43-83.shader_test
new file mode 100644
index 0000000..37a7714
--- /dev/null
+++ b/shaders/skia/43-83.shader_test
@@ -0,0 +1,45 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 urectUniform_Stage1;
+noperspective in vec4 vcolor_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ float alpha;
+ {
+ alpha = float(all(greaterThan(vec4(gl_FragCoord.xy, urectUniform_Stage1.zw), vec4(urectUniform_Stage1.xy, gl_FragCoord.xy))) ? 1 : 0);
+ }
+ {
+ alpha = 1.0 - alpha;
+ }
+ output_Stage1 = outputColor_Stage0 * alpha;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 inPosition;
+in vec4 inColor;
+noperspective out vec4 vcolor_Stage0;
+void main() {
+ vec4 color = inColor;
+ vcolor_Stage0 = color;
+ vec2 pos2 = inPosition;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/43-84.shader_test b/shaders/skia/43-84.shader_test
new file mode 100644
index 0000000..8403f05
--- /dev/null
+++ b/shaders/skia/43-84.shader_test
@@ -0,0 +1,84 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 ubaseFrequency_Stage2;
+uniform float uz_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+uniform sampler2D uTextureSampler_1_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec3 vTransformedCoords_1_Stage0;
+vec3 fade_Stage2(vec3 t) {
+ return ((t * t) * t) * (t * (t * 6.0 - 15.0) + 10.0);
+}
+float perm_Stage2(float x) {
+ return texture(uTextureSampler_0_Stage2, vec2(fract(x / 256.0), 0.0)).x * 255.0;
+}
+float grad_Stage2(float x, vec3 p) {
+ return dot(texture(uTextureSampler_1_Stage2, vec2(fract(x / 16.0), 0.0)).xyz * 255.0 - vec3(1.0), p);
+}
+float lerp_Stage2(float a, float b, float w) {
+ return a + w * (b - a);
+}
+float noise_Stage2(vec3 p) {
+ vec3 P = mod(floor(p), 256.0);
+ p -= floor(p);
+ vec3 f = fade_Stage2(p);
+ float A = perm_Stage2(P.x) + P.y;
+ float AA = perm_Stage2(A) + P.z;
+ float AB = perm_Stage2(A + 1.0) + P.z;
+ float B = perm_Stage2(P.x + 1.0) + P.y;
+ float BA = perm_Stage2(B) + P.z;
+ float BB = perm_Stage2(B + 1.0) + P.z;
+ float result = lerp_Stage2(lerp_Stage2(lerp_Stage2(grad_Stage2(perm_Stage2(AA), p), grad_Stage2(perm_Stage2(BA), p + vec3(-1.0, 0.0, 0.0)), f.x), lerp_Stage2(grad_Stage2(perm_Stage2(AB), p + vec3(0.0, -1.0, 0.0)), grad_Stage2(perm_Stage2(BB), p + vec3(-1.0, -1.0, 0.0)), f.x), f.y), lerp_Stage2(lerp_Stage2(grad_Stage2(perm_Stage2(AA + 1.0), p + vec3(0.0, 0.0, -1.0)), grad_Stage2(perm_Stage2(BA + 1.0), p + vec3(-1.0, 0.0, -1.0)), f.x), lerp_Stage2(grad_Stage2(perm_Stage2(AB + 1.0), p + vec3(0.0, -1.0, -1.0)), grad_Stage2(perm_Stage2(BB + 1.0), p + vec3(-1.0, -1.0, -1.0)), f.x), f.y), f.z);
+ return result;
+}
+float noiseOctaves_Stage2(vec3 p) {
+ float result = 0.0;
+ float ratio = 1.0;
+ for (float i = 0.0;i < 8.0; i++) {
+ result += noise_Stage2(p) / ratio;
+ p *= 2.0;
+ ratio *= 2.0;
+ }
+ return (result + 1.0) / 2.0;
+}
+void main() {
+ vec4 output_Stage2;
+ {
+ vec2 vTransformedCoords_1_Stage0_ensure2D = vTransformedCoords_1_Stage0.xy / vTransformedCoords_1_Stage0.z;
+ vec2 coords = vTransformedCoords_1_Stage0_ensure2D * ubaseFrequency_Stage2;
+ float r = noiseOctaves_Stage2(vec3(coords, uz_Stage2));
+ float g = noiseOctaves_Stage2(vec3(coords, uz_Stage2));
+ float b = noiseOctaves_Stage2(vec3(coords, uz_Stage2));
+ float a = noiseOctaves_Stage2(vec3(coords, uz_Stage2));
+ output_Stage2 = vec4(r, g, b, a);
+ output_Stage2 = clamp(output_Stage2, 0.0, 1.0);
+ output_Stage2 = vec4(output_Stage2.xyz * output_Stage2.www, output_Stage2.w);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec3 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0);
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/43-85.shader_test b/shaders/skia/43-85.shader_test
new file mode 100644
index 0000000..f861c1c
--- /dev/null
+++ b/shaders/skia/43-85.shader_test
@@ -0,0 +1,82 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uCoordTransformMatrix_2_Stage0;
+uniform vec4 usubset_Stage2_c0_c0;
+uniform vec4 uclamp_Stage2_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec3 vTransformedCoords_1_Stage0;
+vec4 TextureEffect_Stage2_c0_c0(vec4 _input, vec2 _coords) {
+ _coords = _coords * uCoordTransformMatrix_2_Stage0.xz + uCoordTransformMatrix_2_Stage0.yw;
+ vec4 _output;
+ vec2 inCoord = _coords;
+ vec2 subsetCoord;
+ {
+ float w = usubset_Stage2_c0_c0.z - usubset_Stage2_c0_c0.x;
+ float w2 = 2.0 * w;
+ float m = mod(inCoord.x - usubset_Stage2_c0_c0.x, w2);
+ subsetCoord.x = mix(m, w2 - m, step(w, m)) + usubset_Stage2_c0_c0.x;
+ }
+ {
+ float w = usubset_Stage2_c0_c0.w - usubset_Stage2_c0_c0.y;
+ float w2 = 2.0 * w;
+ float m = mod(inCoord.y - usubset_Stage2_c0_c0.y, w2);
+ subsetCoord.y = mix(m, w2 - m, step(w, m)) + usubset_Stage2_c0_c0.y;
+ }
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage2_c0_c0.x, uclamp_Stage2_c0_c0.z);
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage2_c0_c0.y, uclamp_Stage2_c0_c0.w);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ _output = _input * textureColor;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ vec2 vTransformedCoords_1_Stage0_ensure2D = vTransformedCoords_1_Stage0.xy / vTransformedCoords_1_Stage0.z;
+ float coord = vTransformedCoords_1_Stage0_ensure2D.x - 0.5;
+ float f = fract(coord);
+ coord += 0.5 - f;
+ float f2 = f * f;
+ vec4 w = mat4(0.055555555555555552, 0.88888888888888884, 0.055555555555555552, 0.0, -0.5, 0.0, 0.5, 0.0, 0.83333333333333337, -2.0, 1.5, -0.33333333333333331, -0.3888888888888889, 1.1666666666666667, -1.1666666666666667, 0.3888888888888889) * vec4(1.0, f, f2, f2 * f);
+ vec4 c[4];
+ c[0] = TextureEffect_Stage2_c0_c0(vec4(1.0), vec2(coord + -1.0, vTransformedCoords_1_Stage0_ensure2D.y));
+ c[1] = TextureEffect_Stage2_c0_c0(vec4(1.0), vec2(coord, vTransformedCoords_1_Stage0_ensure2D.y));
+ c[2] = TextureEffect_Stage2_c0_c0(vec4(1.0), vec2(coord + 1.0, vTransformedCoords_1_Stage0_ensure2D.y));
+ c[3] = TextureEffect_Stage2_c0_c0(vec4(1.0), vec2(coord + 2.0, vTransformedCoords_1_Stage0_ensure2D.y));
+ vec4 bicubicColor = ((c[0] * w.x + c[1] * w.y) + c[2] * w.z) + c[3] * w.w;
+ bicubicColor.xyz = max(vec3(0.0), min(bicubicColor.xyz, bicubicColor.www));
+ output_Stage2 = bicubicColor * output_Stage1;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec3 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0);
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/43-9.shader_test b/shaders/skia/43-9.shader_test
new file mode 100644
index 0000000..acd65c0
--- /dev/null
+++ b/shaders/skia/43-9.shader_test
@@ -0,0 +1,57 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uborder_Stage1;
+uniform vec4 usubset_Stage1;
+uniform vec4 uclamp_Stage1;
+uniform vec4 unorm_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+flat in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec2 inCoord = vTransformedCoords_0_Stage0;
+ inCoord *= unorm_Stage1.xy;
+ vec2 subsetCoord;
+ subsetCoord.x = inCoord.x;
+ subsetCoord.y = inCoord.y;
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage1.x, uclamp_Stage1.z);
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage1.y, uclamp_Stage1.w);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord * unorm_Stage1.zw);
+ float errY = subsetCoord.y - clampedCoord.y;
+ textureColor = mix(textureColor, uborder_Stage1, min(abs(errY), 1.0));
+ output_Stage1 = outputColor_Stage0 * textureColor;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec2 inLocalCoords;
+in vec4 color;
+flat out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vcolor_Stage0 = color;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoords, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/43.shader_test b/shaders/skia/43.shader_test
new file mode 100644
index 0000000..90c5114
--- /dev/null
+++ b/shaders/skia/43.shader_test
@@ -0,0 +1,52 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 usubset_Stage1_c0_c0;
+uniform vec4 uclamp_Stage1_c0_c0;
+uniform sampler2DRect uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 inCoord = vTransformedCoords_0_Stage0;
+ vec2 subsetCoord;
+ subsetCoord.x = mod(inCoord.x - usubset_Stage1_c0_c0.x, usubset_Stage1_c0_c0.z - usubset_Stage1_c0_c0.x) + usubset_Stage1_c0_c0.x;
+ subsetCoord.y = inCoord.y;
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage1_c0_c0.x, uclamp_Stage1_c0_c0.z);
+ clampedCoord.y = subsetCoord.y;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ _output = _input * textureColor;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TextureEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/430-2.shader_test b/shaders/skia/430-2.shader_test
new file mode 100644
index 0000000..f4639fb
--- /dev/null
+++ b/shaders/skia/430-2.shader_test
@@ -0,0 +1,38 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+uniform vec4 uColor_Stage0;
+uniform vec4 ucircleData_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec3 vDashParams_Stage0;
+noperspective in vec4 vRectParams_Stage0;
+void main() {
+ {
+ float xShifted = vDashParams_Stage0.x - floor(vDashParams_Stage0.x / vDashParams_Stage0.z) * vDashParams_Stage0.z;
+ vec2 fragPosShifted = vec2(xShifted, vDashParams_Stage0.y);
+ float alpha = 1.0;
+ alpha *= fragPosShifted.x - vRectParams_Stage0.x > -0.5 ? 1.0 : 0.0;
+ alpha *= vRectParams_Stage0.z - fragPosShifted.x >= -0.5 ? 1.0 : 0.0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 inPosition;
+in vec3 inDashParams;
+in vec4 inRect;
+noperspective out vec3 vDashParams_Stage0;
+noperspective out vec4 vRectParams_Stage0;
+void main() {
+ vDashParams_Stage0 = inDashParams;
+ vRectParams_Stage0 = inRect;
+ vec2 pos2 = inPosition;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/430.shader_test b/shaders/skia/430.shader_test
new file mode 100644
index 0000000..90697df
--- /dev/null
+++ b/shaders/skia/430.shader_test
@@ -0,0 +1,167 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage2;
+uniform vec4 ucolor_Stage3_c1_c0;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.w) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ } else {
+ {
+ if (t < uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+vec4 ComposeOne_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_dst_in(_input, TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0)));
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = ComposeOne_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 ConstColorProcessor_Stage3_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage3_c1_c0;
+ }
+ return _output;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 blend_lighten(vec4 src, vec4 dst) {
+ vec4 result = blend_src_over(src, dst);
+ result.xyz = max(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
+ return result;
+}
+vec4 blend_darken(vec4 src, vec4 dst) {
+ vec4 result = blend_src_over(src, dst);
+ result.xyz = min(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
+ return result;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_lighten(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ {
+ output_Stage2 = output_Stage1 * ucolor_Stage2;
+ }
+ }
+ vec4 output_Stage3;
+ {
+ output_Stage3 = blend_darken(ConstColorProcessor_Stage3_c1_c0(vec4(1.0)), output_Stage2);
+ }
+ {
+ sk_FragColor = output_Stage3;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 inColor;
+in vec2 inLocalCoord;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/433-2.shader_test b/shaders/skia/433-2.shader_test
new file mode 100644
index 0000000..396f9a5
--- /dev/null
+++ b/shaders/skia/433-2.shader_test
@@ -0,0 +1,149 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform float ubias_Stage1_c0_c0_c0_c0;
+uniform float uscale_Stage1_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+uniform float uPixelSize_Stage2;
+uniform vec2 uRange_Stage2;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vEllipseOffsets0_Stage0;
+noperspective in vec2 vEllipseOffsets1_Stage0;
+noperspective in vec4 vinColor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 SweepGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float angle;
+ {
+ angle = atan(-vTransformedCoords_0_Stage0.y, -vTransformedCoords_0_Stage0.x);
+ }
+ float t = ((angle * 0.15915493667125702 + 0.5) + ubias_Stage1_c0_c0_c0_c0) * uscale_Stage1_c0_c0_c0_c0;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = SweepGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vinColor_Stage0;
+ vec2 scaledOffset = vEllipseOffsets0_Stage0;
+ float test = dot(scaledOffset, scaledOffset) - 1.0;
+ vec2 duvdx = dFdx(vEllipseOffsets0_Stage0);
+ vec2 duvdy = -dFdy(vEllipseOffsets0_Stage0);
+ vec2 grad = vec2(vEllipseOffsets0_Stage0.x * duvdx.x + vEllipseOffsets0_Stage0.y * duvdx.y, vEllipseOffsets0_Stage0.x * duvdy.x + vEllipseOffsets0_Stage0.y * duvdy.y);
+ float grad_dot = 4.0 * dot(grad, grad);
+ grad_dot = max(grad_dot, 1.1754999560161448e-38);
+ float invlen = inversesqrt(grad_dot);
+ float edgeAlpha = clamp(0.5 - test * invlen, 0.0, 1.0);
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_dst_in(outputColor_Stage0, ClampedGradientEffect_Stage1_c0_c0(vec4(1.0)));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_1_Stage0;
+ coord.x -= 7.0 * uPixelSize_Stage2;
+ for (int i = 0;i < 15; i++) {
+ output_Stage2 = max(output_Stage2, texture(uTextureSampler_0_Stage2, coord));
+ coord.x += uPixelSize_Stage2;
+ }
+ output_Stage2 *= output_Stage1;
+ }
+ {
+ sk_FragColor = output_Stage2 * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec2 inEllipseOffsets0;
+in vec2 inEllipseOffsets1;
+noperspective out vec2 vEllipseOffsets0_Stage0;
+noperspective out vec2 vEllipseOffsets1_Stage0;
+noperspective out vec4 vinColor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vEllipseOffsets0_Stage0 = inEllipseOffsets0;
+ vEllipseOffsets1_Stage0 = inEllipseOffsets1;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = (uViewM_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/433.shader_test b/shaders/skia/433.shader_test
new file mode 100644
index 0000000..68bcd99
--- /dev/null
+++ b/shaders/skia/433.shader_test
@@ -0,0 +1,90 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 ucolor_Stage1_c0_c0_c0_c0;
+uniform vec4 ucolor_Stage2;
+uniform vec4 ucolor_Stage3_c1_c0;
+noperspective in vec4 vcolor_Stage0;
+vec4 ConstColorProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = _input.w * ucolor_Stage1_c0_c0_c0_c0;
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = ConstColorProcessor_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 ConstColorProcessor_Stage3_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage3_c1_c0;
+ }
+ return _output;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 blend_lighten(vec4 src, vec4 dst) {
+ vec4 result = blend_src_over(src, dst);
+ result.xyz = max(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
+ return result;
+}
+vec4 blend_darken(vec4 src, vec4 dst) {
+ vec4 result = blend_src_over(src, dst);
+ result.xyz = min(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
+ return result;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_lighten(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ {
+ output_Stage2 = output_Stage1 * ucolor_Stage2;
+ }
+ }
+ vec4 output_Stage3;
+ {
+ output_Stage3 = blend_darken(ConstColorProcessor_Stage3_c1_c0(vec4(1.0)), output_Stage2);
+ }
+ {
+ sk_FragColor = output_Stage3;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 position;
+in vec4 inColor;
+noperspective out vec4 vcolor_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/436-2.shader_test b/shaders/skia/436-2.shader_test
new file mode 100644
index 0000000..7bcc3d7
--- /dev/null
+++ b/shaders/skia/436-2.shader_test
@@ -0,0 +1,268 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_KHR_blend_equation_advanced : require
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+layout (blend_support_all_equations) out ;
+uniform vec2 uImageIncrement_Stage1;
+uniform float uSurfaceScale_Stage1;
+uniform vec3 uLightColor_Stage1;
+uniform float uKD_Stage1;
+uniform vec4 uTexDom_Stage1;
+uniform vec3 uDecalParams_Stage1;
+uniform vec3 uLightLocation_Stage1;
+uniform float uExponent_Stage1;
+uniform float uCosInnerConeAngle_Stage1;
+uniform float uCosOuterConeAngle_Stage1;
+uniform float uConeScale_Stage1;
+uniform vec3 uS_Stage1;
+uniform vec2 uScale_Stage2;
+uniform vec4 uTexDom_Stage2;
+uniform vec3 uDecalParams_Stage2;
+uniform sampler2D uTextureSampler_0_Stage0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+uniform sampler2D uTextureSampler_1_Stage2;
+noperspective in vec2 vTextureCoords_Stage0;
+flat in int vTexIndex_Stage0;
+noperspective in vec4 vinColor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+vec4 light_Stage1(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ float colorScale = uKD_Stage1 * dot(normal, surfaceToLight);
+ return vec4(lightColor * clamp(colorScale, 0.0, 1.0), 1.0);
+}
+float sobel_Stage1(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage1(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage1(float m[9], float surfaceScale) {
+ return pointToNormal_Stage1(sobel_Stage1(0.0, 0.0, m[3], m[4], m[6], m[7], 0.66666698455810547), sobel_Stage1(m[3], m[6], m[4], m[7], 0.0, 0.0, 0.66666698455810547), surfaceScale);
+}
+vec3 lightColor_Stage1(vec3 surfaceToLight) {
+ float cosAngle = -dot(surfaceToLight, uS_Stage1);
+ if (cosAngle < uCosOuterConeAngle_Stage1) {
+ return vec3(0.0);
+ }
+ float scale = pow(cosAngle, uExponent_Stage1);
+ if (cosAngle < uCosInnerConeAngle_Stage1) {
+ return ((uLightColor_Stage1 * scale) * (cosAngle - uCosOuterConeAngle_Stage1)) * uConeScale_Stage1;
+ }
+ return uLightColor_Stage1;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vinColor_Stage0;
+ vec4 texColor;
+ {
+ texColor = texture(uTextureSampler_0_Stage0, vTextureCoords_Stage0);
+ }
+ outputCoverage_Stage0 = texColor;
+ }
+ vec4 output_Stage1;
+ {
+ vec2 coord = vTransformedCoords_0_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp0 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp5 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp6 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp7 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp8 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = normalize(uLightLocation_Stage1 - vec3(gl_FragCoord.xy, uSurfaceScale_Stage1 * m[4]));
+ output_Stage1 = light_Stage1(normal_Stage1(m, uSurfaceScale_Stage1), surfaceToLight, lightColor_Stage1(surfaceToLight));
+ output_Stage1 *= outputColor_Stage0;
+ }
+ vec4 output_Stage2;
+ {
+ vec4 dColor = texture(uTextureSampler_0_Stage2, vTransformedCoords_1_Stage0);
+ dColor.xyz = dColor.w < 9.9999999747524271e-07 ? vec3(0.0) : clamp(dColor.xyz / dColor.w, 0.0, 1.0);
+ vec2 cCoords = vTransformedCoords_2_Stage0 + uScale_Stage2 * (dColor.zz - vec2(0.5));
+ {
+ vec2 origCoord = cCoords;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ output_Stage2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ }
+ {
+ sk_FragColor = outputCoverage_Stage0 * output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform vec2 uAtlasSizeInv_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in uvec2 inTextureCoords;
+noperspective out vec2 vTextureCoords_Stage0;
+flat out int vTexIndex_Stage0;
+noperspective out vec4 vinColor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+void main() {
+ ivec2 signedCoords = ivec2(int(inTextureCoords.x), int(inTextureCoords.y));
+ vec2 unormTexCoords = vec2(float(signedCoords.x / 2), float(signedCoords.y / 2));
+ vTextureCoords_Stage0 = unormTexCoords * uAtlasSizeInv_Stage0;
+ vTexIndex_Stage0 = 0;
+ vinColor_Stage0 = inColor;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(inPosition.x, inPosition.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/436-4.shader_test b/shaders/skia/436-4.shader_test
new file mode 100644
index 0000000..10e01b0
--- /dev/null
+++ b/shaders/skia/436-4.shader_test
@@ -0,0 +1,75 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform float ucornerRadius_Stage2_c1_c0;
+uniform vec4 uproxyRect_Stage2_c1_c0;
+uniform float ublurRadius_Stage2_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 ClampFragmentProcessor_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = clamp(_input, 0.0, 1.0);
+ }
+ return _output;
+}
+vec4 RRectBlurEffect_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 translatedFragPos = gl_FragCoord.xy - uproxyRect_Stage2_c1_c0.xy;
+ float threshold = ucornerRadius_Stage2_c1_c0 + 2.0 * ublurRadius_Stage2_c1_c0;
+ vec2 middle = (uproxyRect_Stage2_c1_c0.zw - uproxyRect_Stage2_c1_c0.xy) - 2.0 * threshold;
+ if (translatedFragPos.x >= threshold && translatedFragPos.x < middle.x + threshold) {
+ translatedFragPos.x = threshold;
+ } else if (translatedFragPos.x >= middle.x + threshold) {
+ translatedFragPos.x -= middle.x - 1.0;
+ }
+ if (translatedFragPos.y > threshold && translatedFragPos.y < middle.y + threshold) {
+ translatedFragPos.y = threshold;
+ } else if (translatedFragPos.y >= middle.y + threshold) {
+ translatedFragPos.y -= middle.y - 1.0;
+ }
+ vec2 proxyDims = vec2(2.0 * threshold + 1.0);
+ vec2 texCoord = translatedFragPos / proxyDims;
+ _output = _input * texture(uTextureSampler_0_Stage2, texCoord);
+ return _output;
+}
+vec4 blend_multiply(vec4 src, vec4 dst) {
+ return vec4(((1.0 - src.w) * dst.xyz + (1.0 - dst.w) * src.xyz) + src.xyz * dst.xyz, src.w + (1.0 - src.w) * dst.w);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ vec4 inputColor = vec4(output_Stage1.xyz, 1.0);
+ output_Stage2 = blend_multiply(ClampFragmentProcessor_Stage2_c0_c0(inputColor), RRectBlurEffect_Stage2_c1_c0(inputColor));
+ output_Stage2 *= output_Stage1.w;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/436.shader_test b/shaders/skia/436.shader_test
new file mode 100644
index 0000000..cbea5a0
--- /dev/null
+++ b/shaders/skia/436.shader_test
@@ -0,0 +1,147 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.w) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ } else {
+ {
+ if (t < uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = OverrideInputFragmentProcessor_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+float _guarded_divide(float n, float d) {
+ return n / d;
+}
+float _color_dodge_component(float sc, float sa, float dc, float da) {
+ if (dc == 0.0) {
+ return sc * (1.0 - da);
+ } else {
+ float d = sa - sc;
+ if (d == 0.0) {
+ return (sa * da + sc * (1.0 - da)) + dc * (1.0 - sa);
+ }
+ d = min(da, _guarded_divide(dc * sa, d));
+ return (d * sa + sc * (1.0 - da)) + dc * (1.0 - sa);
+ }
+}
+vec4 blend_color_dodge(vec4 src, vec4 dst) {
+ return vec4(_color_dodge_component(src.x, src.w, dst.x, dst.w), _color_dodge_component(src.y, src.w, dst.y, dst.w), _color_dodge_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_color_dodge(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 inColor;
+in vec2 inLocalCoord;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/439-2.shader_test b/shaders/skia/439-2.shader_test
new file mode 100644
index 0000000..0e7742f
--- /dev/null
+++ b/shaders/skia/439-2.shader_test
@@ -0,0 +1,125 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 urectUniform_Stage2;
+uniform float uPixelSize_Stage3;
+uniform vec2 uRange_Stage3;
+uniform vec2 uScale_Stage4;
+uniform vec4 uTexDom_Stage4;
+uniform vec3 uDecalParams_Stage4;
+uniform float uinnerThreshold_Stage5;
+uniform float uouterThreshold_Stage5;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage3;
+uniform sampler2D uTextureSampler_0_Stage4;
+uniform sampler2D uTextureSampler_1_Stage4;
+uniform sampler2D uTextureSampler_0_Stage5;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+noperspective in vec2 vTransformedCoords_3_Stage0;
+noperspective in vec2 vTransformedCoords_4_Stage0;
+flat in vec4 vcolor_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ float alpha;
+ {
+ float xSub, ySub;
+ xSub = min(gl_FragCoord.x - urectUniform_Stage2.x, 0.0);
+ xSub += min(urectUniform_Stage2.z - gl_FragCoord.x, 0.0);
+ ySub = min(gl_FragCoord.y - urectUniform_Stage2.y, 0.0);
+ ySub += min(urectUniform_Stage2.w - gl_FragCoord.y, 0.0);
+ alpha = (1.0 + max(xSub, -1.0)) * (1.0 + max(ySub, -1.0));
+ }
+ output_Stage2 = output_Stage1 * alpha;
+ }
+ vec4 output_Stage3;
+ {
+ output_Stage3 = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_1_Stage0;
+ coord.y -= 7.0 * uPixelSize_Stage3;
+ for (int i = 0;i < 15; i++) {
+ output_Stage3 = max(output_Stage3, texture(uTextureSampler_0_Stage3, coord));
+ coord.y += uPixelSize_Stage3;
+ }
+ output_Stage3 *= output_Stage2;
+ }
+ vec4 output_Stage4;
+ {
+ vec4 dColor = texture(uTextureSampler_0_Stage4, vTransformedCoords_2_Stage0);
+ dColor.xyz = dColor.w < 9.9999999747524271e-07 ? vec3(0.0) : clamp(dColor.xyz / dColor.w, 0.0, 1.0);
+ vec2 cCoords = vTransformedCoords_3_Stage0 + uScale_Stage4 * (dColor.wz - vec2(0.5));
+ {
+ vec2 origCoord = cCoords;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage4.xy, uTexDom_Stage4.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage4, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage4.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage4.y);
+ if (err > uDecalParams_Stage4.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage4.z < 1.0) {
+ err = 0.0;
+ }
+ output_Stage4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ }
+ vec4 output_Stage5;
+ {
+ vec4 color = output_Stage4;
+ vec4 mask_color = texture(uTextureSampler_0_Stage5, vTransformedCoords_4_Stage0);
+ if (mask_color.w < 0.5) {
+ if (color.w > uouterThreshold_Stage5) {
+ float scale = uouterThreshold_Stage5 / color.w;
+ color.xyz *= scale;
+ color.w = uouterThreshold_Stage5;
+ }
+ } else if (color.w < uinnerThreshold_Stage5) {
+ float scale = uinnerThreshold_Stage5 / max(0.0010000000474974513, color.w);
+ color.xyz *= scale;
+ color.w = uinnerThreshold_Stage5;
+ }
+ output_Stage5 = color;
+ }
+ {
+ sk_FragColor = 1.0 - output_Stage5;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+uniform mat3 uCoordTransformMatrix_3_Stage0;
+uniform mat3 uCoordTransformMatrix_4_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+noperspective out vec2 vTransformedCoords_3_Stage0;
+noperspective out vec2 vTransformedCoords_4_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_3_Stage0 = (uCoordTransformMatrix_3_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_4_Stage0 = (uCoordTransformMatrix_4_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/439-4.shader_test b/shaders/skia/439-4.shader_test
new file mode 100644
index 0000000..75c6a11
--- /dev/null
+++ b/shaders/skia/439-4.shader_test
@@ -0,0 +1,227 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage2_c0_c0;
+uniform float uSurfaceScale_Stage2_c0_c0;
+uniform vec3 uLightColor_Stage2_c0_c0;
+uniform float uKD_Stage2_c0_c0;
+uniform vec4 uTexDom_Stage2_c0_c0;
+uniform vec3 uDecalParams_Stage2_c0_c0;
+uniform vec3 uLightDirection_Stage2_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 light_Stage2_c0_c0(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ float colorScale = uKD_Stage2_c0_c0 * dot(normal, surfaceToLight);
+ return vec4(lightColor * clamp(colorScale, 0.0, 1.0), 1.0);
+}
+float sobel_Stage2_c0_c0(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage2_c0_c0(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage2_c0_c0(float m[9], float surfaceScale) {
+ return pointToNormal_Stage2_c0_c0(sobel_Stage2_c0_c0(0.0, 0.0, m[4], m[5], m[7], m[8], 0.66666698455810547), sobel_Stage2_c0_c0(0.0, 0.0, m[4], m[7], m[5], m[8], 0.66666698455810547), surfaceScale);
+}
+vec4 DiffuseLighting_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coord = vTransformedCoords_1_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c0_c0.y);
+ if (err > uDecalParams_Stage2_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp0 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c0_c0.y);
+ if (err > uDecalParams_Stage2_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c0_c0.y);
+ if (err > uDecalParams_Stage2_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c0_c0.y);
+ if (err > uDecalParams_Stage2_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c0_c0.y);
+ if (err > uDecalParams_Stage2_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c0_c0.y);
+ if (err > uDecalParams_Stage2_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp5 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c0_c0.y);
+ if (err > uDecalParams_Stage2_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp6 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c0_c0.y);
+ if (err > uDecalParams_Stage2_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp7 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c0_c0.y);
+ if (err > uDecalParams_Stage2_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp8 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = uLightDirection_Stage2_c0_c0;
+ _output = light_Stage2_c0_c0(normal_Stage2_c0_c0(m, uSurfaceScale_Stage2_c0_c0), surfaceToLight, uLightColor_Stage2_c0_c0);
+ _output *= _input;
+ return _output;
+}
+vec4 ClampFragmentProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ float alpha = clamp(_input.w, 0.0, 1.0);
+ _output = vec4(clamp(_input.xyz, 0.0, alpha), alpha);
+ }
+ return _output;
+}
+float _blend_overlay_component(float sc, float sa, float dc, float da) {
+ if (2.0 * dc <= da) {
+ return (2.0 * sc) * dc;
+ }
+ return sa * da - (2.0 * (da - dc)) * (sa - sc);
+}
+vec4 blend_overlay(vec4 src, vec4 dst) {
+ vec4 result = vec4(_blend_overlay_component(src.x, src.w, dst.x, dst.w), _blend_overlay_component(src.y, src.w, dst.y, dst.w), _blend_overlay_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+ result.xyz += dst.xyz * (1.0 - src.w) + src.xyz * (1.0 - dst.w);
+ return result;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ vec4 inputColor = vec4(output_Stage1.xyz, 1.0);
+ output_Stage2 = blend_overlay(DiffuseLighting_Stage2_c0_c0(inputColor), ClampFragmentProcessor_Stage2_c1_c0(inputColor));
+ output_Stage2 *= output_Stage1.w;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/439.shader_test b/shaders/skia/439.shader_test
new file mode 100644
index 0000000..12ad2c7
--- /dev/null
+++ b/shaders/skia/439.shader_test
@@ -0,0 +1,76 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 ucolor_Stage1_c0_c0_c0_c0;
+noperspective in vec4 vcolor_Stage0;
+vec4 ConstColorProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = _input.w * ucolor_Stage1_c0_c0_c0_c0;
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = ConstColorProcessor_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+float _guarded_divide(float n, float d) {
+ return n / d;
+}
+float _color_dodge_component(float sc, float sa, float dc, float da) {
+ if (dc == 0.0) {
+ return sc * (1.0 - da);
+ } else {
+ float d = sa - sc;
+ if (d == 0.0) {
+ return (sa * da + sc * (1.0 - da)) + dc * (1.0 - sa);
+ }
+ d = min(da, _guarded_divide(dc * sa, d));
+ return (d * sa + sc * (1.0 - da)) + dc * (1.0 - sa);
+ }
+}
+vec4 blend_color_dodge(vec4 src, vec4 dst) {
+ return vec4(_color_dodge_component(src.x, src.w, dst.x, dst.w), _color_dodge_component(src.y, src.w, dst.y, dst.w), _color_dodge_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_color_dodge(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 position;
+in vec4 inColor;
+noperspective out vec4 vcolor_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/442-2.shader_test b/shaders/skia/442-2.shader_test
new file mode 100644
index 0000000..751aef2
--- /dev/null
+++ b/shaders/skia/442-2.shader_test
@@ -0,0 +1,264 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_KHR_blend_equation_advanced : require
+out vec4 sk_FragColor;
+layout (blend_support_all_equations) out ;
+uniform vec2 uImageIncrement_Stage1;
+uniform float uSurfaceScale_Stage1;
+uniform vec3 uLightColor_Stage1;
+uniform float uKD_Stage1;
+uniform vec4 uTexDom_Stage1;
+uniform vec3 uDecalParams_Stage1;
+uniform vec3 uLightLocation_Stage1;
+uniform vec4 ucolor_Stage3;
+uniform vec4 uboundsUniform_Stage4;
+uniform float uxInvZoom_Stage4;
+uniform float uyInvZoom_Stage4;
+uniform float uxInvInset_Stage4;
+uniform float uyInvInset_Stage4;
+uniform vec2 uoffset_Stage4;
+uniform vec4 ucircle_Stage5;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+uniform sampler2D uTextureSampler_0_Stage4;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+noperspective in float vinCoverage_Stage0;
+vec4 light_Stage1(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ float colorScale = uKD_Stage1 * dot(normal, surfaceToLight);
+ return vec4(lightColor * clamp(colorScale, 0.0, 1.0), 1.0);
+}
+float sobel_Stage1(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage1(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage1(float m[9], float surfaceScale) {
+ return pointToNormal_Stage1(sobel_Stage1(0.0, 0.0, m[3], m[5], m[6], m[8], 0.33333298563957214), sobel_Stage1(0.0, 0.0, m[4], m[7], m[5], m[8], 0.5), surfaceScale);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec2 coord = vTransformedCoords_0_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp0 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp5 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp6 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp7 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp8 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = normalize(uLightLocation_Stage1 - vec3(gl_FragCoord.xy, uSurfaceScale_Stage1 * m[4]));
+ output_Stage1 = light_Stage1(normal_Stage1(m, uSurfaceScale_Stage1), surfaceToLight, uLightColor_Stage1);
+ output_Stage1 *= outputColor_Stage0;
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = texture(uTextureSampler_0_Stage2, vTransformedCoords_1_Stage0) * output_Stage1;
+ }
+ vec4 output_Stage3;
+ {
+ {
+ output_Stage3 = output_Stage2 * ucolor_Stage3;
+ }
+ }
+ vec4 output_Stage4;
+ {
+ vec2 coord = vTransformedCoords_2_Stage0;
+ vec2 zoom_coord = uoffset_Stage4 + coord * vec2(uxInvZoom_Stage4, uyInvZoom_Stage4);
+ vec2 delta = (coord - uboundsUniform_Stage4.xy) * uboundsUniform_Stage4.zw;
+ delta = min(delta, vec2(1.0, 1.0) - delta);
+ delta *= vec2(uxInvInset_Stage4, uyInvInset_Stage4);
+ float weight = 0.0;
+ if (delta.x < 2.0 && delta.y < 2.0) {
+ delta = vec2(2.0, 2.0) - delta;
+ float dist = length(delta);
+ dist = max(2.0 - dist, 0.0);
+ weight = min(dist * dist, 1.0);
+ } else {
+ vec2 delta_squared = delta * delta;
+ weight = min(min(delta_squared.x, delta_squared.y), 1.0);
+ }
+ output_Stage4 = texture(uTextureSampler_0_Stage4, mix(coord, zoom_coord, weight));
+ }
+ vec4 output_Stage5;
+ {
+ float d;
+ {
+ d = (length((ucircle_Stage5.xy - gl_FragCoord.xy) * ucircle_Stage5.w) - 1.0) * ucircle_Stage5.z;
+ }
+ {
+ output_Stage5 = output_Stage4 * clamp(d, 0.0, 1.0);
+ }
+ }
+ {
+ sk_FragColor = output_Stage5 * output_Stage3;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in float inCoverage;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+noperspective out float vinCoverage_Stage0;
+void main() {
+ vec4 color = inColor;
+ vcolor_Stage0 = color;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(inPosition, 1.0)).xy;
+ vinCoverage_Stage0 = inCoverage;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/442-4.shader_test b/shaders/skia/442-4.shader_test
new file mode 100644
index 0000000..d3e15a3
--- /dev/null
+++ b/shaders/skia/442-4.shader_test
@@ -0,0 +1,82 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec3 uedges_Stage2_c1_c0[7];
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 ClampFragmentProcessor_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ float alpha = clamp(_input.w, 0.0, 1.0);
+ _output = vec4(clamp(_input.xyz, 0.0, alpha), alpha);
+ }
+ return _output;
+}
+vec4 ConvexPoly_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ float alpha = 1.0;
+ float edge;
+ edge = dot(uedges_Stage2_c1_c0[0], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage2_c1_c0[1], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage2_c1_c0[2], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage2_c1_c0[3], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage2_c1_c0[4], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage2_c1_c0[5], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage2_c1_c0[6], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ alpha = 1.0 - alpha;
+ _output = _input * alpha;
+ return _output;
+}
+vec4 blend_dst_atop(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src + src.w * dst;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ vec4 inputColor = vec4(output_Stage1.xyz, 1.0);
+ output_Stage2 = blend_dst_atop(ClampFragmentProcessor_Stage2_c0_c0(inputColor), ConvexPoly_Stage2_c1_c0(inputColor));
+ output_Stage2 *= output_Stage1.w;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/442.shader_test b/shaders/skia/442.shader_test
new file mode 100644
index 0000000..9361825
--- /dev/null
+++ b/shaders/skia/442.shader_test
@@ -0,0 +1,167 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage2_c1_c0;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.w) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ } else {
+ {
+ if (t < uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = OverrideInputFragmentProcessor_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c1_c0;
+ }
+ return _output;
+}
+float _guarded_divide(float n, float d) {
+ return n / d;
+}
+float _color_dodge_component(float sc, float sa, float dc, float da) {
+ if (dc == 0.0) {
+ return sc * (1.0 - da);
+ } else {
+ float d = sa - sc;
+ if (d == 0.0) {
+ return (sa * da + sc * (1.0 - da)) + dc * (1.0 - sa);
+ }
+ d = min(da, _guarded_divide(dc * sa, d));
+ return (d * sa + sc * (1.0 - da)) + dc * (1.0 - sa);
+ }
+}
+vec4 blend_color_dodge(vec4 src, vec4 dst) {
+ return vec4(_color_dodge_component(src.x, src.w, dst.x, dst.w), _color_dodge_component(src.y, src.w, dst.y, dst.w), _color_dodge_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 blend_darken(vec4 src, vec4 dst) {
+ vec4 result = blend_src_over(src, dst);
+ result.xyz = min(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
+ return result;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_color_dodge(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_darken(ConstColorProcessor_Stage2_c1_c0(vec4(1.0)), output_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 inColor;
+in vec2 inLocalCoord;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/445-2.shader_test b/shaders/skia/445-2.shader_test
new file mode 100644
index 0000000..cf093c8
--- /dev/null
+++ b/shaders/skia/445-2.shader_test
@@ -0,0 +1,26 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+in vec4 vcolor_Stage0;
+void main() {
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+out vec4 vcolor_Stage0;
+void main() {
+ vec4 color = inColor;
+ vcolor_Stage0 = color;
+ vec3 pos3 = uViewM_Stage0 * vec3(inPosition, 1.0);
+ gl_Position = vec4(pos3.x, pos3.y, 0.0, pos3.z);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/445-3.shader_test b/shaders/skia/445-3.shader_test
new file mode 100644
index 0000000..95b685f
--- /dev/null
+++ b/shaders/skia/445-3.shader_test
@@ -0,0 +1,58 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform float ucornerRadius_Stage2;
+uniform vec4 uproxyRect_Stage2;
+uniform float ublurRadius_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ vec2 translatedFragPos = gl_FragCoord.xy - uproxyRect_Stage2.xy;
+ float threshold = ucornerRadius_Stage2 + 2.0 * ublurRadius_Stage2;
+ vec2 middle = (uproxyRect_Stage2.zw - uproxyRect_Stage2.xy) - 2.0 * threshold;
+ if (translatedFragPos.x >= threshold && translatedFragPos.x < middle.x + threshold) {
+ translatedFragPos.x = threshold;
+ } else if (translatedFragPos.x >= middle.x + threshold) {
+ translatedFragPos.x -= middle.x - 1.0;
+ }
+ if (translatedFragPos.y > threshold && translatedFragPos.y < middle.y + threshold) {
+ translatedFragPos.y = threshold;
+ } else if (translatedFragPos.y >= middle.y + threshold) {
+ translatedFragPos.y -= middle.y - 1.0;
+ }
+ vec2 proxyDims = vec2(2.0 * threshold + 1.0);
+ vec2 texCoord = translatedFragPos / proxyDims;
+ output_Stage2 = output_Stage1 * texture(uTextureSampler_0_Stage2, texCoord);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/445-4.shader_test b/shaders/skia/445-4.shader_test
new file mode 100644
index 0000000..346400d
--- /dev/null
+++ b/shaders/skia/445-4.shader_test
@@ -0,0 +1,69 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform float uPixelSize_Stage2_c0_c0;
+uniform vec2 uRange_Stage2_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 Morphology_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_1_Stage0;
+ coord.x -= 3.0 * uPixelSize_Stage2_c0_c0;
+ for (int i = 0;i < 7; i++) {
+ _output = max(_output, texture(uTextureSampler_0_Stage2, coord));
+ coord.x += uPixelSize_Stage2_c0_c0;
+ }
+ _output *= _input;
+ return _output;
+}
+vec4 ClampFragmentProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ float alpha = clamp(_input.w, 0.0, 1.0);
+ _output = vec4(clamp(_input.xyz, 0.0, alpha), alpha);
+ }
+ return _output;
+}
+vec4 blend_plus(vec4 src, vec4 dst) {
+ return min(src + dst, 1.0);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ vec4 inputColor = vec4(output_Stage1.xyz, 1.0);
+ output_Stage2 = blend_plus(Morphology_Stage2_c0_c0(inputColor), ClampFragmentProcessor_Stage2_c1_c0(inputColor));
+ output_Stage2 *= output_Stage1.w;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/445.shader_test b/shaders/skia/445.shader_test
new file mode 100644
index 0000000..d4a87b6
--- /dev/null
+++ b/shaders/skia/445.shader_test
@@ -0,0 +1,96 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 ucolor_Stage1_c0_c0_c0_c0;
+uniform vec4 ucolor_Stage2_c1_c0;
+noperspective in vec4 vcolor_Stage0;
+vec4 ConstColorProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = _input.w * ucolor_Stage1_c0_c0_c0_c0;
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = ConstColorProcessor_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c1_c0;
+ }
+ return _output;
+}
+float _guarded_divide(float n, float d) {
+ return n / d;
+}
+float _color_dodge_component(float sc, float sa, float dc, float da) {
+ if (dc == 0.0) {
+ return sc * (1.0 - da);
+ } else {
+ float d = sa - sc;
+ if (d == 0.0) {
+ return (sa * da + sc * (1.0 - da)) + dc * (1.0 - sa);
+ }
+ d = min(da, _guarded_divide(dc * sa, d));
+ return (d * sa + sc * (1.0 - da)) + dc * (1.0 - sa);
+ }
+}
+vec4 blend_color_dodge(vec4 src, vec4 dst) {
+ return vec4(_color_dodge_component(src.x, src.w, dst.x, dst.w), _color_dodge_component(src.y, src.w, dst.y, dst.w), _color_dodge_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 blend_darken(vec4 src, vec4 dst) {
+ vec4 result = blend_src_over(src, dst);
+ result.xyz = min(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
+ return result;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_color_dodge(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_darken(ConstColorProcessor_Stage2_c1_c0(vec4(1.0)), output_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 position;
+in vec4 inColor;
+noperspective out vec4 vcolor_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/448-2.shader_test b/shaders/skia/448-2.shader_test
new file mode 100644
index 0000000..58a736f
--- /dev/null
+++ b/shaders/skia/448-2.shader_test
@@ -0,0 +1,317 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform float uSurfaceScale_Stage1;
+uniform vec3 uLightColor_Stage1;
+uniform float uKD_Stage1;
+uniform vec4 uTexDom_Stage1;
+uniform vec3 uDecalParams_Stage1;
+uniform vec3 uLightLocation_Stage1;
+uniform float uExponent_Stage1;
+uniform float uCosInnerConeAngle_Stage1;
+uniform float uCosOuterConeAngle_Stage1;
+uniform float uConeScale_Stage1;
+uniform vec3 uS_Stage1;
+uniform vec4 uinnerRect_Stage2;
+uniform vec2 uinvRadiiXY_Stage2;
+uniform vec2 ubaseFrequency_Stage4_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage4;
+uniform sampler2D uTextureSampler_1_Stage4;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec3 vTransformedCoords_2_Stage0;
+noperspective in float vinCoverage_Stage0;
+vec4 light_Stage1(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ float colorScale = uKD_Stage1 * dot(normal, surfaceToLight);
+ return vec4(lightColor * clamp(colorScale, 0.0, 1.0), 1.0);
+}
+float sobel_Stage1(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage1(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage1(float m[9], float surfaceScale) {
+ return pointToNormal_Stage1(sobel_Stage1(m[0], m[2], m[3], m[5], m[6], m[8], 0.25), sobel_Stage1(m[0], m[6], m[1], m[7], m[2], m[8], 0.25), surfaceScale);
+}
+vec3 lightColor_Stage1(vec3 surfaceToLight) {
+ float cosAngle = -dot(surfaceToLight, uS_Stage1);
+ if (cosAngle < uCosOuterConeAngle_Stage1) {
+ return vec3(0.0);
+ }
+ float scale = pow(cosAngle, uExponent_Stage1);
+ if (cosAngle < uCosInnerConeAngle_Stage1) {
+ return ((uLightColor_Stage1 * scale) * (cosAngle - uCosOuterConeAngle_Stage1)) * uConeScale_Stage1;
+ }
+ return uLightColor_Stage1;
+}
+float perlinnoise_Stage4_c0_c0(float chanCoord, vec2 noiseVec) {
+ vec4 floorVal;
+ floorVal.xy = floor(noiseVec);
+ floorVal.zw = floorVal.xy + vec2(1.0);
+ vec2 fractVal = fract(noiseVec);
+ vec2 noiseSmooth = (fractVal * fractVal) * (vec2(3.0) - vec2(2.0) * fractVal);
+ floorVal = fract(floor(mod(floorVal, 256.0)) / vec4(256.0));
+ vec2 latticeIdx;
+ latticeIdx.x = texture(uTextureSampler_0_Stage4, vec2(floorVal.x, 0.5)).x;
+ latticeIdx.y = texture(uTextureSampler_0_Stage4, vec2(floorVal.z, 0.5)).x;
+ vec4 bcoords = fract(latticeIdx.xyxy + floorVal.yyww);
+ vec2 uv;
+ vec4 lattice = texture(uTextureSampler_1_Stage4, vec2(bcoords.x, chanCoord)).zyxw;
+ uv.x = dot((lattice.yw + lattice.xz * vec2(0.00390625)) * vec2(2.0) - vec2(1.0), fractVal);
+ fractVal.x -= 1.0;
+ lattice = texture(uTextureSampler_1_Stage4, vec2(bcoords.y, chanCoord)).zyxw;
+ uv.y = dot((lattice.yw + lattice.xz * vec2(0.00390625)) * vec2(2.0) - vec2(1.0), fractVal);
+ vec2 ab;
+ ab.x = mix(uv.x, uv.y, noiseSmooth.x);
+ fractVal.y -= 1.0;
+ lattice = texture(uTextureSampler_1_Stage4, vec2(bcoords.w, chanCoord)).zyxw;
+ uv.y = dot((lattice.yw + lattice.xz * vec2(0.00390625)) * vec2(2.0) - vec2(1.0), fractVal);
+ fractVal.x += 1.0;
+ lattice = texture(uTextureSampler_1_Stage4, vec2(bcoords.z, chanCoord)).zyxw;
+ uv.x = dot((lattice.yw + lattice.xz * vec2(0.00390625)) * vec2(2.0) - vec2(1.0), fractVal);
+ ab.y = mix(uv.x, uv.y, noiseSmooth.x);
+ return mix(ab.x, ab.y, noiseSmooth.y);
+}
+vec4 PerlinNoise_Stage4_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 vTransformedCoords_2_Stage0_ensure2D = vTransformedCoords_2_Stage0.xy / vTransformedCoords_2_Stage0.z;
+ vec2 noiseVec = floor(vTransformedCoords_2_Stage0_ensure2D) * ubaseFrequency_Stage4_c0_c0;
+ _output = vec4(0.0);
+ float ratio = 1.0;
+ for (int octave = 0;octave < 6; ++octave) {
+ _output += vec4(perlinnoise_Stage4_c0_c0(0.125, noiseVec), perlinnoise_Stage4_c0_c0(0.375, noiseVec), perlinnoise_Stage4_c0_c0(0.625, noiseVec), perlinnoise_Stage4_c0_c0(0.875, noiseVec)) * ratio;
+ noiseVec *= vec2(2.0);
+ ratio *= 0.5;
+ }
+ _output = _output * vec4(0.5) + vec4(0.5);
+ _output = clamp(_output, 0.0, 1.0);
+ _output = vec4(_output.xyz * _output.www, _output.w);
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ float alpha = 1.0;
+ alpha = vinCoverage_Stage0;
+ outputCoverage_Stage0 = vec4(alpha);
+ }
+ vec4 output_Stage1;
+ {
+ vec2 coord = vTransformedCoords_0_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp0 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp5 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp6 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp7 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp8 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = normalize(uLightLocation_Stage1 - vec3(gl_FragCoord.xy, uSurfaceScale_Stage1 * m[4]));
+ output_Stage1 = light_Stage1(normal_Stage1(m, uSurfaceScale_Stage1), surfaceToLight, lightColor_Stage1(surfaceToLight));
+ output_Stage1 *= outputColor_Stage0;
+ }
+ vec4 output_Stage2;
+ {
+ vec2 dxy0 = uinnerRect_Stage2.xy - gl_FragCoord.xy;
+ vec2 dxy1 = gl_FragCoord.xy - uinnerRect_Stage2.zw;
+ vec2 dxy = max(max(dxy0, dxy1), 0.0);
+ vec2 Z = dxy * uinvRadiiXY_Stage2;
+ float implicit = dot(Z, dxy) - 1.0;
+ float grad_dot = 4.0 * dot(Z, Z);
+ grad_dot = max(grad_dot, 9.9999997473787516e-05);
+ float approx_dist = implicit * inversesqrt(grad_dot);
+ float alpha = clamp(0.5 + approx_dist, 0.0, 1.0);
+ output_Stage2 = output_Stage1 * alpha;
+ }
+ vec4 output_Stage3;
+ {
+ output_Stage3 = output_Stage2;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_1_Stage0.x);
+ uint y = uint(vTransformedCoords_1_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ output_Stage3 = vec4(clamp(output_Stage3.xyz + value * 0.0039215688593685627, 0.0, output_Stage3.w), output_Stage3.w);
+ }
+ vec4 output_Stage4;
+ {
+ output_Stage4 = blend_dst_in(outputCoverage_Stage0, PerlinNoise_Stage4_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage3 * output_Stage4;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in float inCoverage;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec3 vTransformedCoords_2_Stage0;
+noperspective out float vinCoverage_Stage0;
+void main() {
+ vec4 color = inColor;
+ vcolor_Stage0 = color;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = uCoordTransformMatrix_2_Stage0 * vec3(inPosition, 1.0);
+ vinCoverage_Stage0 = inCoverage;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/448-4.shader_test b/shaders/skia/448-4.shader_test
new file mode 100644
index 0000000..0cc4e06
--- /dev/null
+++ b/shaders/skia/448-4.shader_test
@@ -0,0 +1,79 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 ucircleData_Stage2_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 CircleBlurFragmentProcessor_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 vec = vec2((gl_FragCoord.x - ucircleData_Stage2_c0_c0.x) * ucircleData_Stage2_c0_c0.w, (gl_FragCoord.y - ucircleData_Stage2_c0_c0.y) * ucircleData_Stage2_c0_c0.w);
+ float dist = length(vec) + (0.5 - ucircleData_Stage2_c0_c0.z) * ucircleData_Stage2_c0_c0.w;
+ _output = _input * texture(uTextureSampler_0_Stage2, vec2(dist, 0.5)).w;
+ return _output;
+}
+vec4 ClampFragmentProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = clamp(_input, 0.0, 1.0);
+ }
+ return _output;
+}
+float _blend_color_luminance(vec3 color) {
+ return dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), color);
+}
+vec3 _blend_set_color_luminance(vec3 hueSatColor, float alpha, vec3 lumColor) {
+ float lum = _blend_color_luminance(lumColor);
+ vec3 result = (lum - _blend_color_luminance(hueSatColor)) + hueSatColor;
+ float minComp = min(min(result.x, result.y), result.z);
+ float maxComp = max(max(result.x, result.y), result.z);
+ if (minComp < 0.0 && lum != minComp) {
+ result = lum + ((result - lum) * lum) / (lum - minComp);
+ }
+ if (maxComp > alpha && maxComp != lum) {
+ return lum + ((result - lum) * (alpha - lum)) / (maxComp - lum);
+ }
+ return result;
+}
+vec4 blend_luminosity(vec4 src, vec4 dst) {
+ float alpha = dst.w * src.w;
+ vec3 sda = src.xyz * dst.w;
+ vec3 dsa = dst.xyz * src.w;
+ return vec4((((_blend_set_color_luminance(dsa, alpha, sda) + dst.xyz) - dsa) + src.xyz) - sda, (src.w + dst.w) - alpha);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ vec4 inputColor = vec4(output_Stage1.xyz, 1.0);
+ output_Stage2 = blend_luminosity(CircleBlurFragmentProcessor_Stage2_c0_c0(inputColor), ClampFragmentProcessor_Stage2_c1_c0(inputColor));
+ output_Stage2 *= output_Stage1.w;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/448.shader_test b/shaders/skia/448.shader_test
new file mode 100644
index 0000000..34679cc
--- /dev/null
+++ b/shaders/skia/448.shader_test
@@ -0,0 +1,160 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage2;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.w) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ } else {
+ {
+ if (t < uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+vec4 ComposeOne_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_dst_in(_input, TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0)));
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = ComposeOne_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+float _guarded_divide(float n, float d) {
+ return n / d;
+}
+float _color_dodge_component(float sc, float sa, float dc, float da) {
+ if (dc == 0.0) {
+ return sc * (1.0 - da);
+ } else {
+ float d = sa - sc;
+ if (d == 0.0) {
+ return (sa * da + sc * (1.0 - da)) + dc * (1.0 - sa);
+ }
+ d = min(da, _guarded_divide(dc * sa, d));
+ return (d * sa + sc * (1.0 - da)) + dc * (1.0 - sa);
+ }
+}
+vec4 blend_color_dodge(vec4 src, vec4 dst) {
+ return vec4(_color_dodge_component(src.x, src.w, dst.x, dst.w), _color_dodge_component(src.y, src.w, dst.y, dst.w), _color_dodge_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_color_dodge(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ {
+ output_Stage2 = output_Stage1 * ucolor_Stage2;
+ }
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 inColor;
+in vec2 inLocalCoord;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/451-2.shader_test b/shaders/skia/451-2.shader_test
new file mode 100644
index 0000000..eb251c7
--- /dev/null
+++ b/shaders/skia/451-2.shader_test
@@ -0,0 +1,201 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_KHR_blend_equation_advanced : require
+out vec4 sk_FragColor;
+layout (blend_support_all_equations) out ;
+uniform vec4 uColor_Stage0;
+uniform vec2 ubaseFrequency_Stage1_c0_c0;
+uniform float uz_Stage1_c0_c0;
+uniform vec4 uscale0_1_Stage2_c1_c0_c1_c0;
+uniform vec4 uscale2_3_Stage2_c1_c0_c1_c0;
+uniform vec4 uscale4_5_Stage2_c1_c0_c1_c0;
+uniform vec4 uscale6_7_Stage2_c1_c0_c1_c0;
+uniform vec4 ubias0_1_Stage2_c1_c0_c1_c0;
+uniform vec4 ubias2_3_Stage2_c1_c0_c1_c0;
+uniform vec4 ubias4_5_Stage2_c1_c0_c1_c0;
+uniform vec4 ubias6_7_Stage2_c1_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage2_c1_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage2_c1_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+noperspective in vec3 vDashParam_Stage0;
+noperspective in vec2 vCircleParams_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec3 fade_Stage1_c0_c0(vec3 t) {
+ return ((t * t) * t) * (t * (t * 6.0 - 15.0) + 10.0);
+}
+float perm_Stage1_c0_c0(float x) {
+ return texture(uTextureSampler_0_Stage1, vec2(fract(x / 256.0), 0.0)).x * 255.0;
+}
+float grad_Stage1_c0_c0(float x, vec3 p) {
+ return dot(texture(uTextureSampler_1_Stage1, vec2(fract(x / 16.0), 0.0)).xyz * 255.0 - vec3(1.0), p);
+}
+float lerp_Stage1_c0_c0(float a, float b, float w) {
+ return a + w * (b - a);
+}
+float noise_Stage1_c0_c0(vec3 p) {
+ vec3 P = mod(floor(p), 256.0);
+ p -= floor(p);
+ vec3 f = fade_Stage1_c0_c0(p);
+ float A = perm_Stage1_c0_c0(P.x) + P.y;
+ float AA = perm_Stage1_c0_c0(A) + P.z;
+ float AB = perm_Stage1_c0_c0(A + 1.0) + P.z;
+ float B = perm_Stage1_c0_c0(P.x + 1.0) + P.y;
+ float BA = perm_Stage1_c0_c0(B) + P.z;
+ float BB = perm_Stage1_c0_c0(B + 1.0) + P.z;
+ float result = lerp_Stage1_c0_c0(lerp_Stage1_c0_c0(lerp_Stage1_c0_c0(grad_Stage1_c0_c0(perm_Stage1_c0_c0(AA), p), grad_Stage1_c0_c0(perm_Stage1_c0_c0(BA), p + vec3(-1.0, 0.0, 0.0)), f.x), lerp_Stage1_c0_c0(grad_Stage1_c0_c0(perm_Stage1_c0_c0(AB), p + vec3(0.0, -1.0, 0.0)), grad_Stage1_c0_c0(perm_Stage1_c0_c0(BB), p + vec3(-1.0, -1.0, 0.0)), f.x), f.y), lerp_Stage1_c0_c0(lerp_Stage1_c0_c0(grad_Stage1_c0_c0(perm_Stage1_c0_c0(AA + 1.0), p + vec3(0.0, 0.0, -1.0)), grad_Stage1_c0_c0(perm_Stage1_c0_c0(BA + 1.0), p + vec3(-1.0, 0.0, -1.0)), f.x), lerp_Stage1_c0_c0(grad_Stage1_c0_c0(perm_Stage1_c0_c0(AB + 1.0), p + vec3(0.0, -1.0, -1.0)), grad_Stage1_c0_c0(perm_Stage1_c0_c0(BB + 1.0), p + vec3(-1.0, -1.0, -1.0)), f.x), f.y), f.z);
+ return result;
+}
+float noiseOctaves_Stage1_c0_c0(vec3 p) {
+ float result = 0.0;
+ float ratio = 1.0;
+ for (float i = 0.0;i < 10.0; i++) {
+ result += noise_Stage1_c0_c0(p) / ratio;
+ p *= 2.0;
+ ratio *= 2.0;
+ }
+ return (result + 1.0) / 2.0;
+}
+vec4 ImprovedPerlinNoise_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coords = vTransformedCoords_0_Stage0 * ubaseFrequency_Stage1_c0_c0;
+ float r = noiseOctaves_Stage1_c0_c0(vec3(coords, uz_Stage1_c0_c0));
+ float g = noiseOctaves_Stage1_c0_c0(vec3(coords, uz_Stage1_c0_c0));
+ float b = noiseOctaves_Stage1_c0_c0(vec3(coords, uz_Stage1_c0_c0));
+ float a = noiseOctaves_Stage1_c0_c0(vec3(coords, uz_Stage1_c0_c0));
+ _output = vec4(r, g, b, a);
+ _output = clamp(_output, 0.0, 1.0);
+ _output = vec4(_output.xyz * _output.www, _output.w);
+ return _output;
+}
+vec4 RadialGradientLayout_Stage2_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = length(vTransformedCoords_1_Stage0);
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage2_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage2_c1_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage2_c1_c0_c1_c0.x) {
+ scale = uscale0_1_Stage2_c1_c0_c1_c0;
+ bias = ubias0_1_Stage2_c1_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage2_c1_c0_c1_c0;
+ bias = ubias2_3_Stage2_c1_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage2_c1_c0_c1_c0.z) {
+ scale = uscale4_5_Stage2_c1_c0_c1_c0;
+ bias = ubias4_5_Stage2_c1_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage2_c1_c0_c1_c0;
+ bias = ubias6_7_Stage2_c1_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = RadialGradientLayout_Stage2_c1_c0_c0_c0(vec4(1.0));
+ {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage2_c1_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+float _blend_color_luminance(vec3 color) {
+ return dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), color);
+}
+vec3 _blend_set_color_luminance(vec3 hueSatColor, float alpha, vec3 lumColor) {
+ float lum = _blend_color_luminance(lumColor);
+ vec3 result = (lum - _blend_color_luminance(hueSatColor)) + hueSatColor;
+ float minComp = min(min(result.x, result.y), result.z);
+ float maxComp = max(max(result.x, result.y), result.z);
+ if (minComp < 0.0 && lum != minComp) {
+ result = lum + ((result - lum) * lum) / (lum - minComp);
+ }
+ if (maxComp > alpha && maxComp != lum) {
+ return lum + ((result - lum) * (alpha - lum)) / (maxComp - lum);
+ }
+ return result;
+}
+vec4 blend_color(vec4 src, vec4 dst) {
+ float alpha = dst.w * src.w;
+ vec3 sda = src.xyz * dst.w;
+ vec3 dsa = dst.xyz * src.w;
+ return vec4((((_blend_set_color_luminance(sda, alpha, dsa) + dst.xyz) - dsa) + src.xyz) - sda, (src.w + dst.w) - alpha);
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = uColor_Stage0;
+ float xShifted = vDashParam_Stage0.x - floor(vDashParam_Stage0.x / vDashParam_Stage0.z) * vDashParam_Stage0.z;
+ vec2 fragPosShifted = vec2(xShifted, vDashParam_Stage0.y);
+ vec2 center = vec2(vCircleParams_Stage0.y, 0.0);
+ float dist = length(center - fragPosShifted);
+ float diff = dist - vCircleParams_Stage0.x;
+ diff = 1.0 - diff;
+ float alpha = clamp(diff, 0.0, 1.0);
+ outputCoverage_Stage0 = vec4(alpha);
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_color(outputCoverage_Stage0, ImprovedPerlinNoise_Stage1_c0_c0(vec4(1.0)));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_dst_in(output_Stage1, TiledGradientEffect_Stage2_c1_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage2 * outputColor_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 inPosition;
+in vec3 inDashParams;
+in vec2 inCircleParams;
+noperspective out vec3 vDashParam_Stage0;
+noperspective out vec2 vCircleParams_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vDashParam_Stage0 = inDashParams;
+ vCircleParams_Stage0 = inCircleParams;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/451-4.shader_test b/shaders/skia/451-4.shader_test
new file mode 100644
index 0000000..6b74e96
--- /dev/null
+++ b/shaders/skia/451-4.shader_test
@@ -0,0 +1,224 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage2_c1_c0;
+uniform float uSurfaceScale_Stage2_c1_c0;
+uniform vec3 uLightColor_Stage2_c1_c0;
+uniform float uKS_Stage2_c1_c0;
+uniform float uShininess_Stage2_c1_c0;
+uniform vec4 uTexDom_Stage2_c1_c0;
+uniform vec3 uDecalParams_Stage2_c1_c0;
+uniform vec3 uLightLocation_Stage2_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 ClampFragmentProcessor_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ float alpha = clamp(_input.w, 0.0, 1.0);
+ _output = vec4(clamp(_input.xyz, 0.0, alpha), alpha);
+ }
+ return _output;
+}
+vec4 light_Stage2_c1_c0(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ vec3 halfDir = normalize(surfaceToLight + vec3(0.0, 0.0, 1.0));
+ float colorScale = uKS_Stage2_c1_c0 * pow(dot(normal, halfDir), uShininess_Stage2_c1_c0);
+ vec3 color = lightColor * clamp(colorScale, 0.0, 1.0);
+ return vec4(color, max(max(color.x, color.y), color.z));
+}
+float sobel_Stage2_c1_c0(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage2_c1_c0(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage2_c1_c0(float m[9], float surfaceScale) {
+ return pointToNormal_Stage2_c1_c0(sobel_Stage2_c1_c0(m[0], m[1], m[3], m[4], m[6], m[7], 0.5), sobel_Stage2_c1_c0(m[0], m[6], m[1], m[7], 0.0, 0.0, 0.33333298563957214), surfaceScale);
+}
+vec4 SpecularLighting_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coord = vTransformedCoords_1_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage2_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c1_c0.xy, uTexDom_Stage2_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c1_c0.y);
+ if (err > uDecalParams_Stage2_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp0 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage2_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c1_c0.xy, uTexDom_Stage2_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c1_c0.y);
+ if (err > uDecalParams_Stage2_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage2_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c1_c0.xy, uTexDom_Stage2_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c1_c0.y);
+ if (err > uDecalParams_Stage2_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage2_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c1_c0.xy, uTexDom_Stage2_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c1_c0.y);
+ if (err > uDecalParams_Stage2_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c1_c0.xy, uTexDom_Stage2_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c1_c0.y);
+ if (err > uDecalParams_Stage2_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage2_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c1_c0.xy, uTexDom_Stage2_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c1_c0.y);
+ if (err > uDecalParams_Stage2_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp5 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage2_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c1_c0.xy, uTexDom_Stage2_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c1_c0.y);
+ if (err > uDecalParams_Stage2_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp6 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage2_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c1_c0.xy, uTexDom_Stage2_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c1_c0.y);
+ if (err > uDecalParams_Stage2_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp7 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage2_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c1_c0.xy, uTexDom_Stage2_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c1_c0.y);
+ if (err > uDecalParams_Stage2_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp8 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = normalize(uLightLocation_Stage2_c1_c0 - vec3(gl_FragCoord.xy, uSurfaceScale_Stage2_c1_c0 * m[4]));
+ _output = light_Stage2_c1_c0(normal_Stage2_c1_c0(m, uSurfaceScale_Stage2_c1_c0), surfaceToLight, uLightColor_Stage2_c1_c0);
+ _output *= _input;
+ return _output;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ vec4 inputColor = vec4(output_Stage1.xyz, 1.0);
+ output_Stage2 = blend_src_over(ClampFragmentProcessor_Stage2_c0_c0(inputColor), SpecularLighting_Stage2_c1_c0(inputColor));
+ output_Stage2 *= output_Stage1.w;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/451.shader_test b/shaders/skia/451.shader_test
new file mode 100644
index 0000000..7f63692
--- /dev/null
+++ b/shaders/skia/451.shader_test
@@ -0,0 +1,83 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 ucolor_Stage1_c0_c0_c0_c0;
+uniform vec4 ucolor_Stage2;
+noperspective in vec4 vcolor_Stage0;
+vec4 ConstColorProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = _input.w * ucolor_Stage1_c0_c0_c0_c0;
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = ConstColorProcessor_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+float _guarded_divide(float n, float d) {
+ return n / d;
+}
+float _color_dodge_component(float sc, float sa, float dc, float da) {
+ if (dc == 0.0) {
+ return sc * (1.0 - da);
+ } else {
+ float d = sa - sc;
+ if (d == 0.0) {
+ return (sa * da + sc * (1.0 - da)) + dc * (1.0 - sa);
+ }
+ d = min(da, _guarded_divide(dc * sa, d));
+ return (d * sa + sc * (1.0 - da)) + dc * (1.0 - sa);
+ }
+}
+vec4 blend_color_dodge(vec4 src, vec4 dst) {
+ return vec4(_color_dodge_component(src.x, src.w, dst.x, dst.w), _color_dodge_component(src.y, src.w, dst.y, dst.w), _color_dodge_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_color_dodge(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ {
+ output_Stage2 = output_Stage1 * ucolor_Stage2;
+ }
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 position;
+in vec4 inColor;
+noperspective out vec4 vcolor_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/454-2.shader_test b/shaders/skia/454-2.shader_test
new file mode 100644
index 0000000..871438e
--- /dev/null
+++ b/shaders/skia/454-2.shader_test
@@ -0,0 +1,30 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+noperspective in vec4 vcolor_Stage0;
+void main() {
+ {
+ sk_FragColor = 1.0 - vec4(1.0);
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+noperspective out vec4 vcolor_Stage0;
+void main() {
+ vec4 color = inColor;
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/454-4.shader_test b/shaders/skia/454-4.shader_test
new file mode 100644
index 0000000..2182b99
--- /dev/null
+++ b/shaders/skia/454-4.shader_test
@@ -0,0 +1,68 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 ucolor_Stage2_c0_c0;
+uniform mat4 um_Stage2_c1_c0;
+uniform vec4 uv_Stage2_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 ConstColorProcessor_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c0_c0;
+ }
+ return _output;
+}
+vec4 ColorMatrixFragmentProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = _input;
+ {
+ float nonZeroAlpha = max(inputColor.w, 9.9999997473787516e-05);
+ inputColor = vec4(inputColor.xyz / nonZeroAlpha, inputColor.w);
+ }
+ _output = um_Stage2_c1_c0 * inputColor + uv_Stage2_c1_c0;
+ {
+ _output = clamp(_output, 0.0, 1.0);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_src_atop(vec4 src, vec4 dst) {
+ return dst.w * src + (1.0 - src.w) * dst;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ vec4 inputColor = vec4(output_Stage1.xyz, 1.0);
+ output_Stage2 = blend_src_atop(ConstColorProcessor_Stage2_c0_c0(inputColor), ColorMatrixFragmentProcessor_Stage2_c1_c0(inputColor));
+ output_Stage2 *= output_Stage1.w;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/454.shader_test b/shaders/skia/454.shader_test
new file mode 100644
index 0000000..22d55f6
--- /dev/null
+++ b/shaders/skia/454.shader_test
@@ -0,0 +1,180 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage2;
+uniform vec4 ucolor_Stage3_c1_c0;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.w) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ } else {
+ {
+ if (t < uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+vec4 ComposeOne_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_dst_in(_input, TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0)));
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = ComposeOne_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 ConstColorProcessor_Stage3_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage3_c1_c0;
+ }
+ return _output;
+}
+float _guarded_divide(float n, float d) {
+ return n / d;
+}
+float _color_dodge_component(float sc, float sa, float dc, float da) {
+ if (dc == 0.0) {
+ return sc * (1.0 - da);
+ } else {
+ float d = sa - sc;
+ if (d == 0.0) {
+ return (sa * da + sc * (1.0 - da)) + dc * (1.0 - sa);
+ }
+ d = min(da, _guarded_divide(dc * sa, d));
+ return (d * sa + sc * (1.0 - da)) + dc * (1.0 - sa);
+ }
+}
+vec4 blend_color_dodge(vec4 src, vec4 dst) {
+ return vec4(_color_dodge_component(src.x, src.w, dst.x, dst.w), _color_dodge_component(src.y, src.w, dst.y, dst.w), _color_dodge_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 blend_darken(vec4 src, vec4 dst) {
+ vec4 result = blend_src_over(src, dst);
+ result.xyz = min(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
+ return result;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_color_dodge(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ {
+ output_Stage2 = output_Stage1 * ucolor_Stage2;
+ }
+ }
+ vec4 output_Stage3;
+ {
+ output_Stage3 = blend_darken(ConstColorProcessor_Stage3_c1_c0(vec4(1.0)), output_Stage2);
+ }
+ {
+ sk_FragColor = output_Stage3;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 inColor;
+in vec2 inLocalCoord;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/457-2.shader_test b/shaders/skia/457-2.shader_test
new file mode 100644
index 0000000..feafc6a
--- /dev/null
+++ b/shaders/skia/457-2.shader_test
@@ -0,0 +1,57 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+noperspective in vec2 vEllipseOffsets0_Stage0;
+noperspective in vec2 vEllipseOffsets1_Stage0;
+noperspective in vec4 vinColor_Stage0;
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ vec2 scaledOffset = vEllipseOffsets0_Stage0;
+ float test = dot(scaledOffset, scaledOffset) - 1.0;
+ vec2 duvdx = dFdx(vEllipseOffsets0_Stage0);
+ vec2 duvdy = -dFdy(vEllipseOffsets0_Stage0);
+ vec2 grad = vec2(vEllipseOffsets0_Stage0.x * duvdx.x + vEllipseOffsets0_Stage0.y * duvdx.y, vEllipseOffsets0_Stage0.x * duvdy.x + vEllipseOffsets0_Stage0.y * duvdy.y);
+ float grad_dot = 4.0 * dot(grad, grad);
+ grad_dot = max(grad_dot, 1.1754999560161448e-38);
+ float invlen = inversesqrt(grad_dot);
+ float edgeAlpha = clamp(0.5 - test * invlen, 0.0, 1.0);
+ scaledOffset = vEllipseOffsets1_Stage0;
+ test = dot(scaledOffset, scaledOffset) - 1.0;
+ duvdx = dFdx(vEllipseOffsets1_Stage0);
+ duvdy = -dFdy(vEllipseOffsets1_Stage0);
+ grad = vec2(vEllipseOffsets1_Stage0.x * duvdx.x + vEllipseOffsets1_Stage0.y * duvdx.y, vEllipseOffsets1_Stage0.x * duvdy.x + vEllipseOffsets1_Stage0.y * duvdy.y);
+ grad_dot = 4.0 * dot(grad, grad);
+ invlen = inversesqrt(grad_dot);
+ edgeAlpha *= clamp(0.5 + test * invlen, 0.0, 1.0);
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ {
+ sk_FragColor = 1.0 - outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 inPosition;
+in vec4 inColor;
+in vec2 inEllipseOffsets0;
+in vec2 inEllipseOffsets1;
+noperspective out vec2 vEllipseOffsets0_Stage0;
+noperspective out vec2 vEllipseOffsets1_Stage0;
+noperspective out vec4 vinColor_Stage0;
+void main() {
+ vEllipseOffsets0_Stage0 = inEllipseOffsets0;
+ vEllipseOffsets1_Stage0 = inEllipseOffsets1;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = inPosition;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/457-4.shader_test b/shaders/skia/457-4.shader_test
new file mode 100644
index 0000000..0c7233b
--- /dev/null
+++ b/shaders/skia/457-4.shader_test
@@ -0,0 +1,85 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uboundsUniform_Stage2_c1_c0;
+uniform float uxInvZoom_Stage2_c1_c0;
+uniform float uyInvZoom_Stage2_c1_c0;
+uniform float uxInvInset_Stage2_c1_c0;
+uniform float uyInvInset_Stage2_c1_c0;
+uniform vec2 uoffset_Stage2_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 ClampFragmentProcessor_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = clamp(_input, 0.0, 1.0);
+ }
+ return _output;
+}
+vec4 MagnifierEffect_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coord = vTransformedCoords_1_Stage0;
+ vec2 zoom_coord = uoffset_Stage2_c1_c0 + coord * vec2(uxInvZoom_Stage2_c1_c0, uyInvZoom_Stage2_c1_c0);
+ vec2 delta = (coord - uboundsUniform_Stage2_c1_c0.xy) * uboundsUniform_Stage2_c1_c0.zw;
+ delta = min(delta, vec2(1.0, 1.0) - delta);
+ delta *= vec2(uxInvInset_Stage2_c1_c0, uyInvInset_Stage2_c1_c0);
+ float weight = 0.0;
+ if (delta.x < 2.0 && delta.y < 2.0) {
+ delta = vec2(2.0, 2.0) - delta;
+ float dist = length(delta);
+ dist = max(2.0 - dist, 0.0);
+ weight = min(dist * dist, 1.0);
+ } else {
+ vec2 delta_squared = delta * delta;
+ weight = min(min(delta_squared.x, delta_squared.y), 1.0);
+ }
+ _output = texture(uTextureSampler_0_Stage2, mix(coord, zoom_coord, weight));
+ return _output;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 blend_lighten(vec4 src, vec4 dst) {
+ vec4 result = blend_src_over(src, dst);
+ result.xyz = max(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
+ return result;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ vec4 inputColor = vec4(output_Stage1.xyz, 1.0);
+ output_Stage2 = blend_lighten(ClampFragmentProcessor_Stage2_c0_c0(inputColor), MagnifierEffect_Stage2_c1_c0(inputColor));
+ output_Stage2 *= output_Stage1.w;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/457.shader_test b/shaders/skia/457.shader_test
new file mode 100644
index 0000000..9e69432
--- /dev/null
+++ b/shaders/skia/457.shader_test
@@ -0,0 +1,103 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 ucolor_Stage1_c0_c0_c0_c0;
+uniform vec4 ucolor_Stage2;
+uniform vec4 ucolor_Stage3_c1_c0;
+noperspective in vec4 vcolor_Stage0;
+vec4 ConstColorProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = _input.w * ucolor_Stage1_c0_c0_c0_c0;
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = ConstColorProcessor_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 ConstColorProcessor_Stage3_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage3_c1_c0;
+ }
+ return _output;
+}
+float _guarded_divide(float n, float d) {
+ return n / d;
+}
+float _color_dodge_component(float sc, float sa, float dc, float da) {
+ if (dc == 0.0) {
+ return sc * (1.0 - da);
+ } else {
+ float d = sa - sc;
+ if (d == 0.0) {
+ return (sa * da + sc * (1.0 - da)) + dc * (1.0 - sa);
+ }
+ d = min(da, _guarded_divide(dc * sa, d));
+ return (d * sa + sc * (1.0 - da)) + dc * (1.0 - sa);
+ }
+}
+vec4 blend_color_dodge(vec4 src, vec4 dst) {
+ return vec4(_color_dodge_component(src.x, src.w, dst.x, dst.w), _color_dodge_component(src.y, src.w, dst.y, dst.w), _color_dodge_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 blend_darken(vec4 src, vec4 dst) {
+ vec4 result = blend_src_over(src, dst);
+ result.xyz = min(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
+ return result;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_color_dodge(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ {
+ output_Stage2 = output_Stage1 * ucolor_Stage2;
+ }
+ }
+ vec4 output_Stage3;
+ {
+ output_Stage3 = blend_darken(ConstColorProcessor_Stage3_c1_c0(vec4(1.0)), output_Stage2);
+ }
+ {
+ sk_FragColor = output_Stage3;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 position;
+in vec4 inColor;
+noperspective out vec4 vcolor_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/46-1.shader_test b/shaders/skia/46-1.shader_test
new file mode 100644
index 0000000..44832a5
--- /dev/null
+++ b/shaders/skia/46-1.shader_test
@@ -0,0 +1,41 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_KHR_blend_equation_advanced : require
+out vec4 sk_FragColor;
+layout (blend_support_all_equations) out ;
+uniform vec4 uColor_Stage0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 TextureEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TextureEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/46-10.shader_test b/shaders/skia/46-10.shader_test
new file mode 100644
index 0000000..38c06c2
--- /dev/null
+++ b/shaders/skia/46-10.shader_test
@@ -0,0 +1,62 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uborder_Stage1;
+uniform vec4 usubset_Stage1;
+uniform vec4 uclamp_Stage1;
+uniform vec4 unorm_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+flat in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec2 inCoord = vTransformedCoords_0_Stage0;
+ inCoord *= unorm_Stage1.xy;
+ vec2 subsetCoord;
+ subsetCoord.x = mod(inCoord.x - usubset_Stage1.x, usubset_Stage1.z - usubset_Stage1.x) + usubset_Stage1.x;
+ subsetCoord.y = inCoord.y;
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage1.x, uclamp_Stage1.z);
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage1.y, uclamp_Stage1.w);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord * unorm_Stage1.zw);
+ float errX = subsetCoord.x - clampedCoord.x;
+ float repeatCoordX = errX > 0.0 ? uclamp_Stage1.x : uclamp_Stage1.z;
+ float errY = subsetCoord.y - clampedCoord.y;
+ if (errX != 0.0) {
+ textureColor = mix(textureColor, texture(uTextureSampler_0_Stage1, vec2(repeatCoordX, clampedCoord.y) * unorm_Stage1.zw), abs(errX));
+ }
+ textureColor = mix(textureColor, uborder_Stage1, min(abs(errY), 1.0));
+ output_Stage1 = outputColor_Stage0 * textureColor;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec2 inLocalCoords;
+in vec4 color;
+flat out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vcolor_Stage0 = color;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoords, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/46-12.shader_test b/shaders/skia/46-12.shader_test
new file mode 100644
index 0000000..3883466
--- /dev/null
+++ b/shaders/skia/46-12.shader_test
@@ -0,0 +1,58 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uborder_Stage1;
+uniform vec4 usubset_Stage1;
+uniform vec4 uclamp_Stage1;
+uniform vec4 unorm_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+flat in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec2 inCoord = vTransformedCoords_0_Stage0;
+ inCoord *= unorm_Stage1.xy;
+ vec2 subsetCoord;
+ subsetCoord.x = mod(inCoord.x - usubset_Stage1.x, usubset_Stage1.z - usubset_Stage1.x) + usubset_Stage1.x;
+ subsetCoord.y = inCoord.y;
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage1.x, uclamp_Stage1.z);
+ clampedCoord.y = subsetCoord.y;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord * unorm_Stage1.zw);
+ if (inCoord.y < usubset_Stage1.y || inCoord.y > usubset_Stage1.w) {
+ textureColor = uborder_Stage1;
+ }
+ output_Stage1 = outputColor_Stage0 * textureColor;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec2 inLocalCoords;
+in vec4 color;
+flat out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vcolor_Stage0 = color;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoords, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/46-14.shader_test b/shaders/skia/46-14.shader_test
new file mode 100644
index 0000000..2909b8a
--- /dev/null
+++ b/shaders/skia/46-14.shader_test
@@ -0,0 +1,108 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 uscale01_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias01_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale23_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias23_Stage1_c0_c0_c1_c0;
+uniform float uthreshold_Stage1_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage2_c1_c0_c0_c0;
+uniform vec4 ucolor_Stage2_c2_c0_c0_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 RadialGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = length(vTransformedCoords_0_Stage0);
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 DualIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthreshold_Stage1_c0_c0_c1_c0) {
+ scale = uscale01_Stage1_c0_c0_c1_c0;
+ bias = ubias01_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale23_Stage1_c0_c0_c1_c0;
+ bias = ubias23_Stage1_c0_c0_c1_c0;
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = RadialGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = DualIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c1_c0_c0_c0;
+ }
+ return _output;
+}
+vec4 blend_dst_out(vec4 src, vec4 dst) {
+ return (1.0 - src.w) * dst;
+}
+vec4 ComposeOne_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_dst_out(ConstColorProcessor_Stage2_c1_c0_c0_c0(vec4(1.0)), _input);
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c2_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c2_c0_c0_c0;
+ }
+ return _output;
+}
+vec4 ComposeOne_Stage2_c2_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_dst_out(ConstColorProcessor_Stage2_c2_c0_c0_c0(vec4(1.0)), _input);
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = ComposeOne_Stage2_c2_c0(ComposeOne_Stage2_c1_c0(output_Stage1));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/46-15.shader_test b/shaders/skia/46-15.shader_test
new file mode 100644
index 0000000..2902006
--- /dev/null
+++ b/shaders/skia/46-15.shader_test
@@ -0,0 +1,120 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 uscale01_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias01_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale23_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias23_Stage1_c0_c0_c1_c0;
+uniform float uthreshold_Stage1_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage2_c1_c0_c0_c0;
+uniform vec4 ucolor_Stage2_c2_c0_c0_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 RadialGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = length(vTransformedCoords_0_Stage0);
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 DualIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthreshold_Stage1_c0_c0_c1_c0) {
+ scale = uscale01_Stage1_c0_c0_c1_c0;
+ bias = ubias01_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale23_Stage1_c0_c0_c1_c0;
+ bias = ubias23_Stage1_c0_c0_c1_c0;
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = RadialGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = DualIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c1_c0_c0_c0;
+ }
+ return _output;
+}
+float _guarded_divide(float n, float d) {
+ return n / d;
+}
+float _color_burn_component(float sc, float sa, float dc, float da) {
+ if (da == dc) {
+ return (sa * da + sc * (1.0 - da)) + dc * (1.0 - sa);
+ } else if (sc == 0.0) {
+ return dc * (1.0 - sa);
+ }
+ float d = max(0.0, da - _guarded_divide((da - dc) * sa, sc));
+ return (d * sa + sc * (1.0 - da)) + dc * (1.0 - sa);
+}
+vec4 blend_color_burn(vec4 src, vec4 dst) {
+ return vec4(_color_burn_component(src.x, src.w, dst.x, dst.w), _color_burn_component(src.y, src.w, dst.y, dst.w), _color_burn_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+}
+vec4 ComposeOne_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_color_burn(ConstColorProcessor_Stage2_c1_c0_c0_c0(vec4(1.0)), _input);
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c2_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c2_c0_c0_c0;
+ }
+ return _output;
+}
+vec4 ComposeOne_Stage2_c2_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_color_burn(ConstColorProcessor_Stage2_c2_c0_c0_c0(vec4(1.0)), _input);
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = ComposeOne_Stage2_c2_c0(ComposeOne_Stage2_c1_c0(output_Stage1));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/46-16.shader_test b/shaders/skia/46-16.shader_test
new file mode 100644
index 0000000..eb311fa
--- /dev/null
+++ b/shaders/skia/46-16.shader_test
@@ -0,0 +1,44 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uColor_Stage0;
+noperspective in vec3 vDashParams_Stage0;
+noperspective in vec4 vRectParams_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = uColor_Stage0;
+ float xShifted = vDashParams_Stage0.x - floor(vDashParams_Stage0.x / vDashParams_Stage0.z) * vDashParams_Stage0.z;
+ vec2 fragPosShifted = vec2(xShifted, vDashParams_Stage0.y);
+ float alpha = 1.0;
+ alpha *= fragPosShifted.x - vRectParams_Stage0.x > -0.5 ? 1.0 : 0.0;
+ alpha *= vRectParams_Stage0.z - fragPosShifted.x >= -0.5 ? 1.0 : 0.0;
+ outputCoverage_Stage0 = vec4(alpha);
+ }
+ {
+ sk_FragColor = outputColor_Stage0 * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 inPosition;
+in vec3 inDashParams;
+in vec4 inRect;
+noperspective out vec3 vDashParams_Stage0;
+noperspective out vec4 vRectParams_Stage0;
+void main() {
+ vDashParams_Stage0 = inDashParams;
+ vRectParams_Stage0 = inRect;
+ vec2 pos2 = inPosition;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/46-17.shader_test b/shaders/skia/46-17.shader_test
new file mode 100644
index 0000000..a303477
--- /dev/null
+++ b/shaders/skia/46-17.shader_test
@@ -0,0 +1,105 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+uniform vec2 uDstTextureUpperLeft_Stage2;
+uniform vec2 uDstTextureCoordScale_Stage2;
+uniform sampler2D uTextureSampler_0_Stage0;
+uniform sampler2D uDstTextureSampler_Stage2;
+noperspective in vec2 vTextureCoords_Stage0;
+flat in int vTexIndex_Stage0;
+noperspective in vec4 vinColor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+vec4 blend_src(vec4 src, vec4 dst) {
+ return src;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vinColor_Stage0;
+ vec4 texColor;
+ {
+ texColor = texture(uTextureSampler_0_Stage0, vTextureCoords_Stage0);
+ }
+ outputCoverage_Stage0 = texColor;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_dst_in(outputColor_Stage0, ClampedGradientEffect_Stage1_c0_c0(vec4(1.0)));
+ }
+ {
+ if (all(lessThanEqual(outputCoverage_Stage0.xyz, vec3(0.0)))) {
+ discard;
+ }
+ vec2 _dstTexCoord = (gl_FragCoord.xy - uDstTextureUpperLeft_Stage2) * uDstTextureCoordScale_Stage2;
+ _dstTexCoord.y = 1.0 - _dstTexCoord.y;
+ vec4 _dstColor = texture(uDstTextureSampler_Stage2, _dstTexCoord);
+ sk_FragColor = blend_src(output_Stage1, _dstColor);
+ sk_FragColor = outputCoverage_Stage0 * sk_FragColor + (vec4(1.0) - outputCoverage_Stage0) * _dstColor;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform vec2 uAtlasSizeInv_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in uvec2 inTextureCoords;
+noperspective out vec2 vTextureCoords_Stage0;
+flat out int vTexIndex_Stage0;
+noperspective out vec4 vinColor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ ivec2 signedCoords = ivec2(int(inTextureCoords.x), int(inTextureCoords.y));
+ vec2 unormTexCoords = vec2(float(signedCoords.x / 2), float(signedCoords.y / 2));
+ vTextureCoords_Stage0 = unormTexCoords * uAtlasSizeInv_Stage0;
+ vTexIndex_Stage0 = 0;
+ vinColor_Stage0 = inColor;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(inPosition.x, inPosition.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/46-18.shader_test b/shaders/skia/46-18.shader_test
new file mode 100644
index 0000000..decf761
--- /dev/null
+++ b/shaders/skia/46-18.shader_test
@@ -0,0 +1,107 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform vec4 uKernel_Stage1[6];
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0 - 11.0 * uImageIncrement_Stage1;
+ vec2 coordSampled = vec2(0.0, 0.0);
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[4].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[4].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[4].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[4].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[5].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[5].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[5].z;
+ coord += uImageIncrement_Stage1;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ sk_FragColor = sk_FragColor.wwww;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/46-2.shader_test b/shaders/skia/46-2.shader_test
new file mode 100644
index 0000000..41b90b2
--- /dev/null
+++ b/shaders/skia/46-2.shader_test
@@ -0,0 +1,50 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 TextureEffect_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage2, vTransformedCoords_1_Stage0) * _input;
+ return _output;
+}
+vec4 blend_screen(vec4 src, vec4 dst) {
+ return src + (1.0 - src) * dst;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_screen(output_Stage1, TextureEffect_Stage2_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/46-21.shader_test b/shaders/skia/46-21.shader_test
new file mode 100644
index 0000000..7eeddae
--- /dev/null
+++ b/shaders/skia/46-21.shader_test
@@ -0,0 +1,44 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uinnerRect_Stage1;
+uniform vec2 uradiusPlusHalf_Stage1;
+flat in vec4 vcolor_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec2 dxy0 = uinnerRect_Stage1.xy - gl_FragCoord.xy;
+ float dy1 = gl_FragCoord.y - uinnerRect_Stage1.w;
+ vec2 dxy = max(vec2(dxy0.x, max(dxy0.y, dy1)), 0.0);
+ float rightAlpha = clamp(uinnerRect_Stage1.z - gl_FragCoord.x, 0.0, 1.0);
+ float alpha = rightAlpha * clamp(uradiusPlusHalf_Stage1.x - length(dxy), 0.0, 1.0);
+ output_Stage1 = vec4(alpha);
+ }
+ {
+ sk_FragColor = outputColor_Stage0 * output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 position;
+in vec4 color;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/46-23.shader_test b/shaders/skia/46-23.shader_test
new file mode 100644
index 0000000..def1143
--- /dev/null
+++ b/shaders/skia/46-23.shader_test
@@ -0,0 +1,137 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 uscale01_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias01_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale23_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias23_Stage1_c0_c0_c1_c0;
+uniform float uthreshold_Stage1_c0_c0_c1_c0;
+flat in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 varccoord_Stage0;
+vec4 RadialGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = length(vTransformedCoords_0_Stage0);
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 DualIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthreshold_Stage1_c0_c0_c1_c0) {
+ scale = uscale01_Stage1_c0_c0_c1_c0;
+ bias = ubias01_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale23_Stage1_c0_c0_c1_c0;
+ bias = ubias23_Stage1_c0_c0_c1_c0;
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = RadialGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = DualIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ float x_plus_1 = varccoord_Stage0.x, y = varccoord_Stage0.y;
+ float coverage;
+ if (0.0 == x_plus_1) {
+ coverage = y;
+ } else {
+ float fn = x_plus_1 * (x_plus_1 - 2.0);
+ fn = ((y) * (y) + (fn));
+ float fnwidth = fwidth(fn);
+ float d = fn / fnwidth;
+ coverage = clamp(0.5 - d, 0.0, 1.0);
+ }
+ outputCoverage_Stage0 = vec4(coverage);
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1 * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec4 radii_selector;
+in vec4 corner_and_radius_outsets;
+in vec4 aa_bloat_and_coverage;
+in vec4 skew;
+in vec2 translate;
+in vec4 radii_x;
+in vec4 radii_y;
+in vec4 color;
+in vec4 local_rect;
+flat out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 varccoord_Stage0;
+void main() {
+ vcolor_Stage0 = color;
+ vec2 corner = corner_and_radius_outsets.xy;
+ vec2 radius_outset = corner_and_radius_outsets.zw;
+ vec2 aa_bloat_direction = aa_bloat_and_coverage.xy;
+ float coverage = aa_bloat_and_coverage.z;
+ float is_linear_coverage = aa_bloat_and_coverage.w;
+ vec2 pixellength = inversesqrt(vec2(dot(skew.xz, skew.xz), dot(skew.yw, skew.yw)));
+ vec4 normalized_axis_dirs = skew * pixellength.xyxy;
+ vec2 axiswidths = abs(normalized_axis_dirs.xy) + abs(normalized_axis_dirs.zw);
+ vec2 aa_bloatradius = (axiswidths * pixellength) * 0.5;
+ vec4 radii_and_neighbors = radii_selector * mat4(radii_x, radii_y, radii_x.yxwz, radii_y.wzyx);
+ vec2 radii = radii_and_neighbors.xy;
+ vec2 neighbor_radii = radii_and_neighbors.zw;
+ if (any(greaterThan(aa_bloatradius, vec2(1.0)))) {
+ corner = max(abs(corner), aa_bloatradius) * sign(corner);
+ coverage /= max(aa_bloatradius.x, 1.0) * max(aa_bloatradius.y, 1.0);
+ radii = vec2(0.0);
+ }
+ if (any(lessThan(radii, aa_bloatradius * 1.25))) {
+ radii = aa_bloatradius;
+ radius_outset = floor(abs(radius_outset)) * radius_outset;
+ is_linear_coverage = 1.0;
+ } else {
+ radii = clamp(radii, pixellength, 2.0 - pixellength);
+ neighbor_radii = clamp(neighbor_radii, pixellength, 2.0 - pixellength);
+ vec2 spacing = (2.0 - radii) - neighbor_radii;
+ vec2 extra_pad = max(pixellength * 0.0625 - spacing, vec2(0.0));
+ radii -= extra_pad * 0.5;
+ }
+ vec2 aa_outset = aa_bloat_direction * aa_bloatradius;
+ vec2 vertexpos = (corner + radius_outset * radii) + aa_outset;
+ vec2 localcoord = (local_rect.xy * (1.0 - vertexpos) + local_rect.zw * (1.0 + vertexpos)) * 0.5;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localcoord, 1.0)).xy;
+ mat2 skewmatrix = mat2(skew.xy, skew.zw);
+ vec2 devcoord = vertexpos * skewmatrix + translate;
+ if (0.0 != is_linear_coverage) {
+ varccoord_Stage0.xy = vec2(0.0, coverage);
+ } else {
+ vec2 arccoord = (1.0 - abs(radius_outset)) + (aa_outset / radii) * corner;
+ varccoord_Stage0.xy = vec2(arccoord.x + 1.0, arccoord.y);
+ }
+ gl_Position = vec4(devcoord.x, devcoord.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/46-24.shader_test b/shaders/skia/46-24.shader_test
new file mode 100644
index 0000000..97aaaef
--- /dev/null
+++ b/shaders/skia/46-24.shader_test
@@ -0,0 +1,41 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform float uPixelSize_Stage1;
+uniform vec2 uRange_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = vec4(1.0, 1.0, 1.0, 1.0);
+ vec2 coord = vTransformedCoords_0_Stage0;
+ coord.x -= 25.0 * uPixelSize_Stage1;
+ for (int i = 0;i < 51; i++) {
+ output_Stage1 = min(output_Stage1, texture(uTextureSampler_0_Stage1, coord));
+ coord.x += uPixelSize_Stage1;
+ }
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/46-25.shader_test b/shaders/skia/46-25.shader_test
new file mode 100644
index 0000000..57c25b8
--- /dev/null
+++ b/shaders/skia/46-25.shader_test
@@ -0,0 +1,79 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage2_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c1_c0;
+ }
+ return _output;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_src_over(ConstColorProcessor_Stage2_c1_c0(vec4(1.0)), output_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/46-26.shader_test b/shaders/skia/46-26.shader_test
new file mode 100644
index 0000000..3bc2ac0
--- /dev/null
+++ b/shaders/skia/46-26.shader_test
@@ -0,0 +1,44 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform float uPixelSize_Stage1;
+uniform vec2 uRange_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0;
+ coord.x -= 4.0 * uPixelSize_Stage1;
+ float highBound = min(uRange_Stage1.y, coord.x + 8.0 * uPixelSize_Stage1);
+ coord.x = max(uRange_Stage1.x, coord.x);
+ for (int i = 0;i < 9; i++) {
+ output_Stage1 = max(output_Stage1, texture(uTextureSampler_0_Stage1, coord));
+ coord.x += uPixelSize_Stage1;
+ coord.x = min(highBound, coord.x);
+ }
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/46-27.shader_test b/shaders/skia/46-27.shader_test
new file mode 100644
index 0000000..922642a
--- /dev/null
+++ b/shaders/skia/46-27.shader_test
@@ -0,0 +1,135 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform float uSurfaceScale_Stage1;
+uniform vec3 uLightColor_Stage1;
+uniform float uKD_Stage1;
+uniform vec3 uLightDirection_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 light_Stage1(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ float colorScale = uKD_Stage1 * dot(normal, surfaceToLight);
+ return vec4(lightColor * clamp(colorScale, 0.0, 1.0), 1.0);
+}
+float sobel_Stage1(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage1(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage1(float m[9], float surfaceScale) {
+ return pointToNormal_Stage1(sobel_Stage1(m[0], m[2], m[3], m[5], m[6], m[8], 0.25), sobel_Stage1(m[0], m[6], m[1], m[7], m[2], m[8], 0.25), surfaceScale);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ vec2 coord = vTransformedCoords_0_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp0 = textureColor;
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp1 = textureColor;
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp2 = textureColor;
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp3 = textureColor;
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp4 = textureColor;
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp5 = textureColor;
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp6 = textureColor;
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp7 = textureColor;
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp8 = textureColor;
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = uLightDirection_Stage1;
+ output_Stage1 = light_Stage1(normal_Stage1(m, uSurfaceScale_Stage1), surfaceToLight, uLightColor_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/46-28.shader_test b/shaders/skia/46-28.shader_test
new file mode 100644
index 0000000..3fafde7
--- /dev/null
+++ b/shaders/skia/46-28.shader_test
@@ -0,0 +1,67 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec2 uDstTextureUpperLeft_Stage1;
+uniform vec2 uDstTextureCoordScale_Stage1;
+uniform sampler2D uTextureSampler_0_Stage0;
+uniform sampler2D uDstTextureSampler_Stage1;
+noperspective in vec2 vTextureCoords_Stage0;
+flat in int vTexIndex_Stage0;
+noperspective in vec4 vinColor_Stage0;
+vec4 blend_modulate(vec4 src, vec4 dst) {
+ return src * dst;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vinColor_Stage0;
+ vec4 texColor;
+ {
+ texColor = texture(uTextureSampler_0_Stage0, vTextureCoords_Stage0);
+ }
+ outputCoverage_Stage0 = texColor;
+ }
+ {
+ if (all(lessThanEqual(outputCoverage_Stage0.xyz, vec3(0.0)))) {
+ discard;
+ }
+ vec2 _dstTexCoord = (gl_FragCoord.xy - uDstTextureUpperLeft_Stage1) * uDstTextureCoordScale_Stage1;
+ _dstTexCoord.y = 1.0 - _dstTexCoord.y;
+ vec4 _dstColor = texture(uDstTextureSampler_Stage1, _dstTexCoord);
+ sk_FragColor = blend_modulate(outputColor_Stage0, _dstColor);
+ float lerpRed = mix(_dstColor.w, sk_FragColor.w, outputCoverage_Stage0.x);
+ float lerpBlue = mix(_dstColor.w, sk_FragColor.w, outputCoverage_Stage0.y);
+ float lerpGreen = mix(_dstColor.w, sk_FragColor.w, outputCoverage_Stage0.z);
+ sk_FragColor = outputCoverage_Stage0 * sk_FragColor + (vec4(1.0) - outputCoverage_Stage0) * _dstColor;
+ sk_FragColor.w = max(max(lerpRed, lerpBlue), lerpGreen);
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform vec2 uAtlasSizeInv_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in uvec2 inTextureCoords;
+noperspective out vec2 vTextureCoords_Stage0;
+flat out int vTexIndex_Stage0;
+noperspective out vec4 vinColor_Stage0;
+void main() {
+ ivec2 signedCoords = ivec2(int(inTextureCoords.x), int(inTextureCoords.y));
+ vec2 unormTexCoords = vec2(float(signedCoords.x / 2), float(signedCoords.y / 2));
+ vTextureCoords_Stage0 = unormTexCoords * uAtlasSizeInv_Stage0;
+ vTexIndex_Stage0 = 0;
+ vinColor_Stage0 = inColor;
+ gl_Position = vec4(inPosition.x, inPosition.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/46-3.shader_test b/shaders/skia/46-3.shader_test
new file mode 100644
index 0000000..2b8fc90
--- /dev/null
+++ b/shaders/skia/46-3.shader_test
@@ -0,0 +1,117 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uclamp_Stage1_c0_c0_c0_c0;
+uniform vec4 uclamp_Stage1_c0_c0_c1_c0;
+uniform vec4 uclamp_Stage1_c0_c0_c2_c0;
+uniform mat4 um_Stage2;
+uniform vec4 uv_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+uniform sampler2D uTextureSampler_2_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 inCoord = vTransformedCoords_0_Stage0;
+ vec2 subsetCoord;
+ subsetCoord.x = inCoord.x;
+ subsetCoord.y = inCoord.y;
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage1_c0_c0_c0_c0.x, uclamp_Stage1_c0_c0_c0_c0.z);
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage1_c0_c0_c0_c0.y, uclamp_Stage1_c0_c0_c0_c0.w);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ _output = _input * textureColor;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 inCoord = vTransformedCoords_1_Stage0;
+ vec2 subsetCoord;
+ subsetCoord.x = inCoord.x;
+ subsetCoord.y = inCoord.y;
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage1_c0_c0_c1_c0.x, uclamp_Stage1_c0_c0_c1_c0.z);
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage1_c0_c0_c1_c0.y, uclamp_Stage1_c0_c0_c1_c0.w);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ _output = _input * textureColor;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c0_c0_c2_c0(vec4 _input) {
+ vec4 _output;
+ vec2 inCoord = vTransformedCoords_2_Stage0;
+ vec2 subsetCoord;
+ subsetCoord.x = inCoord.x;
+ subsetCoord.y = inCoord.y;
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage1_c0_c0_c2_c0.x, uclamp_Stage1_c0_c0_c2_c0.z);
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage1_c0_c0_c2_c0.y, uclamp_Stage1_c0_c0_c2_c0.w);
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ _output = _input * textureColor;
+ return _output;
+}
+vec4 YUVtoRGBEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 planes[3];
+ planes[0] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0));
+ planes[1] = TextureEffect_Stage1_c0_c0_c1_c0(vec4(1.0));
+ planes[2] = TextureEffect_Stage1_c0_c0_c2_c0(vec4(1.0));
+ vec4 color = vec4(planes[0].w, planes[1].x, planes[1].y, planes[2].w);
+ color.xyz *= color.w;
+ _output = color;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = YUVtoRGBEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ vec4 inputColor = output_Stage1;
+ {
+ float nonZeroAlpha = max(inputColor.w, 9.9999997473787516e-05);
+ inputColor = vec4(inputColor.xyz / nonZeroAlpha, inputColor.w);
+ }
+ output_Stage2 = um_Stage2 * inputColor + uv_Stage2;
+ {
+ output_Stage2 = clamp(output_Stage2, 0.0, 1.0);
+ }
+ {
+ output_Stage2.xyz *= output_Stage2.w;
+ }
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/46-35.shader_test b/shaders/skia/46-35.shader_test
new file mode 100644
index 0000000..0395a9e
--- /dev/null
+++ b/shaders/skia/46-35.shader_test
@@ -0,0 +1,44 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform float uPixelSize_Stage1;
+uniform vec2 uRange_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0;
+ coord.y -= uPixelSize_Stage1;
+ float highBound = min(uRange_Stage1.y, coord.y + 2.0 * uPixelSize_Stage1);
+ coord.y = max(uRange_Stage1.x, coord.y);
+ for (int i = 0;i < 3; i++) {
+ output_Stage1 = max(output_Stage1, texture(uTextureSampler_0_Stage1, coord));
+ coord.y += uPixelSize_Stage1;
+ coord.y = min(highBound, coord.y);
+ }
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/46-42.shader_test b/shaders/skia/46-42.shader_test
new file mode 100644
index 0000000..eff3d62
--- /dev/null
+++ b/shaders/skia/46-42.shader_test
@@ -0,0 +1,106 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform vec2 uBounds_Stage1;
+uniform vec4 uKernel_Stage1[5];
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0 - 8.0 * uImageIncrement_Stage1;
+ vec2 coordSampled = vec2(0.0, 0.0);
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1.x, uBounds_Stage1.y - uBounds_Stage1.x) + uBounds_Stage1.x;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1.x, uBounds_Stage1.y - uBounds_Stage1.x) + uBounds_Stage1.x;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1.x, uBounds_Stage1.y - uBounds_Stage1.x) + uBounds_Stage1.x;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1.x, uBounds_Stage1.y - uBounds_Stage1.x) + uBounds_Stage1.x;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1.x, uBounds_Stage1.y - uBounds_Stage1.x) + uBounds_Stage1.x;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1.x, uBounds_Stage1.y - uBounds_Stage1.x) + uBounds_Stage1.x;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1.x, uBounds_Stage1.y - uBounds_Stage1.x) + uBounds_Stage1.x;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1.x, uBounds_Stage1.y - uBounds_Stage1.x) + uBounds_Stage1.x;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1.x, uBounds_Stage1.y - uBounds_Stage1.x) + uBounds_Stage1.x;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1.x, uBounds_Stage1.y - uBounds_Stage1.x) + uBounds_Stage1.x;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1.x, uBounds_Stage1.y - uBounds_Stage1.x) + uBounds_Stage1.x;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1.x, uBounds_Stage1.y - uBounds_Stage1.x) + uBounds_Stage1.x;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1.x, uBounds_Stage1.y - uBounds_Stage1.x) + uBounds_Stage1.x;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1.x, uBounds_Stage1.y - uBounds_Stage1.x) + uBounds_Stage1.x;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1.x, uBounds_Stage1.y - uBounds_Stage1.x) + uBounds_Stage1.x;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1.x, uBounds_Stage1.y - uBounds_Stage1.x) + uBounds_Stage1.x;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1.x, uBounds_Stage1.y - uBounds_Stage1.x) + uBounds_Stage1.x;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[4].x;
+ coord += uImageIncrement_Stage1;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/46-43.shader_test b/shaders/skia/46-43.shader_test
new file mode 100644
index 0000000..fa756a4
--- /dev/null
+++ b/shaders/skia/46-43.shader_test
@@ -0,0 +1,53 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform vec2 uBounds_Stage1;
+uniform vec4 uKernel_Stage1[1];
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0 - uImageIncrement_Stage1;
+ vec2 coordSampled = vec2(0.0, 0.0);
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1.x && coord.x <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].x;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1.x && coord.x <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].y;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1.x && coord.x <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].z;
+ }
+ coord += uImageIncrement_Stage1;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/46-44.shader_test b/shaders/skia/46-44.shader_test
new file mode 100644
index 0000000..8ab228a
--- /dev/null
+++ b/shaders/skia/46-44.shader_test
@@ -0,0 +1,54 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec2 uDstTextureUpperLeft_Stage1;
+uniform vec2 uDstTextureCoordScale_Stage1;
+uniform sampler2D uDstTextureSampler_Stage1;
+flat in vec4 vcolor_Stage0;
+noperspective in float vcoverage_Stage0;
+vec4 blend_src_out(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ float coverage = vcoverage_Stage0;
+ outputCoverage_Stage0 = vec4(coverage);
+ }
+ {
+ if (all(lessThanEqual(outputCoverage_Stage0.xyz, vec3(0.0)))) {
+ discard;
+ }
+ vec2 _dstTexCoord = (gl_FragCoord.xy - uDstTextureUpperLeft_Stage1) * uDstTextureCoordScale_Stage1;
+ _dstTexCoord.y = 1.0 - _dstTexCoord.y;
+ vec4 _dstColor = texture(uDstTextureSampler_Stage1, _dstTexCoord);
+ sk_FragColor = blend_src_out(outputColor_Stage0, _dstColor);
+ sk_FragColor = outputCoverage_Stage0 * sk_FragColor + (vec4(1.0) - outputCoverage_Stage0) * _dstColor;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 position;
+in float coverage;
+in vec4 color;
+flat out vec4 vcolor_Stage0;
+noperspective out float vcoverage_Stage0;
+void main() {
+ vec2 position = position;
+ vcolor_Stage0 = color;
+ vcoverage_Stage0 = coverage;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/46-45.shader_test b/shaders/skia/46-45.shader_test
new file mode 100644
index 0000000..08acc4c
--- /dev/null
+++ b/shaders/skia/46-45.shader_test
@@ -0,0 +1,117 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_0_Stage0;
+ float t = -1.0;
+ float v = 1.0;
+ {
+ {
+ float invR1 = ufocalParams_Stage1_c0_c0_c0_c0.x;
+ float fx = ufocalParams_Stage1_c0_c0_c0_c0.y;
+ float x_t = -1.0;
+ {
+ float temp = p.x * p.x - p.y * p.y;
+ if (temp >= 0.0) {
+ {
+ x_t = -sqrt(temp) - p.x * invR1;
+ }
+ }
+ }
+ {
+ if (x_t <= 0.0) {
+ v = -1.0;
+ }
+ }
+ {
+ {
+ t = -x_t + fx;
+ }
+ }
+ }
+ }
+ _output = vec4(t, v, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/46-46.shader_test b/shaders/skia/46-46.shader_test
new file mode 100644
index 0000000..57e4927
--- /dev/null
+++ b/shaders/skia/46-46.shader_test
@@ -0,0 +1,133 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_0_Stage0;
+ float t = -1.0;
+ float v = 1.0;
+ {
+ {
+ float invR1 = ufocalParams_Stage1_c0_c0_c0_c0.x;
+ float fx = ufocalParams_Stage1_c0_c0_c0_c0.y;
+ float x_t = -1.0;
+ {
+ float temp = p.x * p.x - p.y * p.y;
+ if (temp >= 0.0) {
+ {
+ x_t = -sqrt(temp) - p.x * invR1;
+ }
+ }
+ }
+ {
+ if (x_t <= 0.0) {
+ v = -1.0;
+ }
+ }
+ {
+ {
+ t = -x_t + fx;
+ }
+ }
+ }
+ }
+ _output = vec4(t, v, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_1_Stage0.x);
+ uint y = uint(vTransformedCoords_1_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ output_Stage2 = vec4(clamp(output_Stage2.xyz + value * 0.0039215688593685627, 0.0, output_Stage2.w), output_Stage2.w);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/46-47.shader_test b/shaders/skia/46-47.shader_test
new file mode 100644
index 0000000..175af8d
--- /dev/null
+++ b/shaders/skia/46-47.shader_test
@@ -0,0 +1,111 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_0_Stage0;
+ float t = -1.0;
+ {
+ {
+ float invR1 = ufocalParams_Stage1_c0_c0_c0_c0.x;
+ float fx = ufocalParams_Stage1_c0_c0_c0_c0.y;
+ float x_t = -1.0;
+ {
+ x_t = length(p) - p.x * invR1;
+ }
+ {
+ {
+ t = -x_t + fx;
+ }
+ }
+ }
+ }
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/46-48.shader_test b/shaders/skia/46-48.shader_test
new file mode 100644
index 0000000..5535f24
--- /dev/null
+++ b/shaders/skia/46-48.shader_test
@@ -0,0 +1,126 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_0_Stage0;
+ float t = -1.0;
+ {
+ {
+ float invR1 = ufocalParams_Stage1_c0_c0_c0_c0.x;
+ float fx = ufocalParams_Stage1_c0_c0_c0_c0.y;
+ float x_t = -1.0;
+ {
+ x_t = length(p) - p.x * invR1;
+ }
+ {
+ {
+ t = -x_t + fx;
+ }
+ }
+ }
+ }
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TiledGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_1_Stage0.x);
+ uint y = uint(vTransformedCoords_1_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ output_Stage2 = vec4(clamp(output_Stage2.xyz + value * 0.0039215688593685627, 0.0, output_Stage2.w), output_Stage2.w);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/46-49.shader_test b/shaders/skia/46-49.shader_test
new file mode 100644
index 0000000..ff31fd2
--- /dev/null
+++ b/shaders/skia/46-49.shader_test
@@ -0,0 +1,124 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_0_Stage0;
+ float t = -1.0;
+ {
+ {
+ float invR1 = ufocalParams_Stage1_c0_c0_c0_c0.x;
+ float fx = ufocalParams_Stage1_c0_c0_c0_c0.y;
+ float x_t = -1.0;
+ {
+ x_t = length(p) - p.x * invR1;
+ }
+ {
+ {
+ t = -x_t + fx;
+ }
+ }
+ }
+ }
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else {
+ {
+ t.x = fract(t.x);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TiledGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_1_Stage0.x);
+ uint y = uint(vTransformedCoords_1_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ output_Stage2 = vec4(clamp(output_Stage2.xyz + value * 0.0039215688593685627, 0.0, output_Stage2.w), output_Stage2.w);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/46-5.shader_test b/shaders/skia/46-5.shader_test
new file mode 100644
index 0000000..7c391ea
--- /dev/null
+++ b/shaders/skia/46-5.shader_test
@@ -0,0 +1,101 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform mat4 um_Stage2;
+uniform vec4 uv_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+uniform sampler2D uTextureSampler_2_Stage1;
+uniform sampler2D uTextureSampler_3_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+noperspective in vec2 vTransformedCoords_3_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_1_Stage1, vTransformedCoords_1_Stage0) * _input;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c0_c0_c2_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_2_Stage1, vTransformedCoords_2_Stage0) * _input;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c0_c0_c3_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_3_Stage1, vTransformedCoords_3_Stage0) * _input;
+ return _output;
+}
+vec4 YUVtoRGBEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 planes[4];
+ planes[0] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0));
+ planes[1] = TextureEffect_Stage1_c0_c0_c1_c0(vec4(1.0));
+ planes[2] = TextureEffect_Stage1_c0_c0_c2_c0(vec4(1.0));
+ planes[3] = TextureEffect_Stage1_c0_c0_c3_c0(vec4(1.0));
+ vec4 color = vec4(planes[0].x, planes[2].x, planes[1].x, planes[3].w);
+ color.xyz *= color.w;
+ _output = color;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = YUVtoRGBEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ vec4 inputColor = output_Stage1;
+ {
+ float nonZeroAlpha = max(inputColor.w, 9.9999997473787516e-05);
+ inputColor = vec4(inputColor.xyz / nonZeroAlpha, inputColor.w);
+ }
+ output_Stage2 = um_Stage2 * inputColor + uv_Stage2;
+ {
+ output_Stage2 = clamp(output_Stage2, 0.0, 1.0);
+ }
+ {
+ output_Stage2.xyz *= output_Stage2.w;
+ }
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+uniform mat3 uCoordTransformMatrix_3_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+noperspective out vec2 vTransformedCoords_3_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_3_Stage0 = (uCoordTransformMatrix_3_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/46-50.shader_test b/shaders/skia/46-50.shader_test
new file mode 100644
index 0000000..379a067
--- /dev/null
+++ b/shaders/skia/46-50.shader_test
@@ -0,0 +1,127 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_0_Stage0;
+ float t = -1.0;
+ {
+ {
+ float invR1 = ufocalParams_Stage1_c0_c0_c0_c0.x;
+ float fx = ufocalParams_Stage1_c0_c0_c0_c0.y;
+ float x_t = -1.0;
+ {
+ x_t = length(p) - p.x * invR1;
+ }
+ {
+ {
+ t = -x_t + fx;
+ }
+ }
+ }
+ }
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_1_Stage0.x);
+ uint y = uint(vTransformedCoords_1_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ output_Stage2 = vec4(clamp(output_Stage2.xyz + value * 0.0039215688593685627, 0.0, output_Stage2.w), output_Stage2.w);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/46-53.shader_test b/shaders/skia/46-53.shader_test
new file mode 100644
index 0000000..cbea3af
--- /dev/null
+++ b/shaders/skia/46-53.shader_test
@@ -0,0 +1,67 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 TextureEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = TextureEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = OverrideInputFragmentProcessor_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 blend_modulate(vec4 src, vec4 dst) {
+ return src * dst;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_modulate(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec2 inLocalCoord;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 color = inColor;
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/46-54.shader_test b/shaders/skia/46-54.shader_test
new file mode 100644
index 0000000..b5777c3
--- /dev/null
+++ b/shaders/skia/46-54.shader_test
@@ -0,0 +1,97 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 ucolor_Stage2;
+uniform vec4 ucolor_Stage3_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 TextureEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+vec4 ComposeOne_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_dst_in(_input, TextureEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0)));
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = ComposeOne_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 ConstColorProcessor_Stage3_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage3_c1_c0;
+ }
+ return _output;
+}
+vec4 blend_plus(vec4 src, vec4 dst) {
+ return min(src + dst, 1.0);
+}
+vec4 blend_modulate(vec4 src, vec4 dst) {
+ return src * dst;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_plus(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ {
+ output_Stage2 = output_Stage1 * ucolor_Stage2;
+ }
+ }
+ vec4 output_Stage3;
+ {
+ output_Stage3 = blend_modulate(ConstColorProcessor_Stage3_c1_c0(vec4(1.0)), output_Stage2);
+ }
+ {
+ sk_FragColor = output_Stage3;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 inColor;
+in vec2 inLocalCoord;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/46-56.shader_test b/shaders/skia/46-56.shader_test
new file mode 100644
index 0000000..f823b37
--- /dev/null
+++ b/shaders/skia/46-56.shader_test
@@ -0,0 +1,56 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec3 uedges_Stage1[4];
+uniform sampler2D uTextureSampler_0_Stage0;
+noperspective in vec2 vlocalCoord_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vec4(1.0);
+ vec2 texCoord;
+ texCoord = vlocalCoord_Stage0;
+ outputColor_Stage0 = texture(uTextureSampler_0_Stage0, texCoord);
+ }
+ vec4 output_Stage1;
+ {
+ float alpha = 1.0;
+ float edge;
+ edge = dot(uedges_Stage1[0], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage1[1], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage1[2], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage1[3], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ output_Stage1 = vec4(alpha);
+ }
+ {
+ sk_FragColor = outputColor_Stage0 * output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vlocalCoord_Stage0;
+void main() {
+ vlocalCoord_Stage0 = localCoord;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/46-57.shader_test b/shaders/skia/46-57.shader_test
new file mode 100644
index 0000000..071a64d
--- /dev/null
+++ b/shaders/skia/46-57.shader_test
@@ -0,0 +1,44 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform float uPixelSize_Stage1;
+uniform vec2 uRange_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0;
+ coord.y -= 6.0 * uPixelSize_Stage1;
+ float highBound = min(uRange_Stage1.y, coord.y + 12.0 * uPixelSize_Stage1);
+ coord.y = max(uRange_Stage1.x, coord.y);
+ for (int i = 0;i < 13; i++) {
+ output_Stage1 = max(output_Stage1, texture(uTextureSampler_0_Stage1, coord));
+ coord.y += uPixelSize_Stage1;
+ coord.y = min(highBound, coord.y);
+ }
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/46-58.shader_test b/shaders/skia/46-58.shader_test
new file mode 100644
index 0000000..226882e
--- /dev/null
+++ b/shaders/skia/46-58.shader_test
@@ -0,0 +1,127 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 uleftBorderColor_Stage1_c1_c0_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c1_c0_c0_c0;
+uniform vec4 ustart_Stage1_c1_c0_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c1_c0_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+vec4 ComposeOne_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_dst_in(_input, ClampedGradientEffect_Stage1_c0_c0_c0_c0(vec4(1.0)));
+ return _output;
+}
+vec4 LinearGradientLayout_Stage1_c1_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_1_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c1_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c1_c0_c0_c0_c1_c0 + t * uend_Stage1_c1_c0_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c1_c0_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c1_c0_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c1_c0_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c1_c0_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 ComposeOne_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_dst_in(_input, ClampedGradientEffect_Stage1_c1_c0_c0_c0(vec4(1.0)));
+ return _output;
+}
+vec4 blend_src_out(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_src_out(ComposeOne_Stage1_c0_c0(inputColor), ComposeOne_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/46-60.shader_test b/shaders/skia/46-60.shader_test
new file mode 100644
index 0000000..e9cf526
--- /dev/null
+++ b/shaders/skia/46-60.shader_test
@@ -0,0 +1,123 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uCoordTransformMatrix_2_Stage0;
+uniform vec4 ustart_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c0_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c0_c0_c1_c0;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+vec4 ComposeOne_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_dst_in(_input, TiledGradientEffect_Stage1_c0_c0_c0_c0(vec4(1.0)));
+ return _output;
+}
+vec4 TextureEffect_Stage1_c1_c0_c0_c0(vec4 _input, vec2 _coords) {
+ _coords = _coords * uCoordTransformMatrix_2_Stage0.xz + uCoordTransformMatrix_2_Stage0.yw;
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, _coords) * _input;
+ return _output;
+}
+vec4 Bicubic_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coord = vTransformedCoords_1_Stage0 - vec2(0.5);
+ vec2 f = fract(coord);
+ coord += 0.5 - f;
+ vec4 wx = mat4(0.055555555555555552, 0.88888888888888884, 0.055555555555555552, 0.0, -0.5, 0.0, 0.5, 0.0, 0.83333333333333337, -2.0, 1.5, -0.33333333333333331, -0.3888888888888889, 1.1666666666666667, -1.1666666666666667, 0.3888888888888889) * vec4(1.0, f.x, f.x * f.x, (f.x * f.x) * f.x);
+ vec4 wy = mat4(0.055555555555555552, 0.88888888888888884, 0.055555555555555552, 0.0, -0.5, 0.0, 0.5, 0.0, 0.83333333333333337, -2.0, 1.5, -0.33333333333333331, -0.3888888888888889, 1.1666666666666667, -1.1666666666666667, 0.3888888888888889) * vec4(1.0, f.y, f.y * f.y, (f.y * f.y) * f.y);
+ vec4 rowColors[4];
+ rowColors[0] = TextureEffect_Stage1_c1_c0_c0_c0(vec4(1.0), coord + vec2(-1.0, -1.0));
+ rowColors[1] = TextureEffect_Stage1_c1_c0_c0_c0(vec4(1.0), coord + vec2(0.0, -1.0));
+ rowColors[2] = TextureEffect_Stage1_c1_c0_c0_c0(vec4(1.0), coord + vec2(1.0, -1.0));
+ rowColors[3] = TextureEffect_Stage1_c1_c0_c0_c0(vec4(1.0), coord + vec2(2.0, -1.0));
+ vec4 s0 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ rowColors[0] = TextureEffect_Stage1_c1_c0_c0_c0(vec4(1.0), coord + vec2(-1.0, 0.0));
+ rowColors[1] = TextureEffect_Stage1_c1_c0_c0_c0(vec4(1.0), coord);
+ rowColors[2] = TextureEffect_Stage1_c1_c0_c0_c0(vec4(1.0), coord + vec2(1.0, 0.0));
+ rowColors[3] = TextureEffect_Stage1_c1_c0_c0_c0(vec4(1.0), coord + vec2(2.0, 0.0));
+ vec4 s1 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ rowColors[0] = TextureEffect_Stage1_c1_c0_c0_c0(vec4(1.0), coord + vec2(-1.0, 1.0));
+ rowColors[1] = TextureEffect_Stage1_c1_c0_c0_c0(vec4(1.0), coord + vec2(0.0, 1.0));
+ rowColors[2] = TextureEffect_Stage1_c1_c0_c0_c0(vec4(1.0), coord + vec2(1.0, 1.0));
+ rowColors[3] = TextureEffect_Stage1_c1_c0_c0_c0(vec4(1.0), coord + vec2(2.0, 1.0));
+ vec4 s2 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ rowColors[0] = TextureEffect_Stage1_c1_c0_c0_c0(vec4(1.0), coord + vec2(-1.0, 2.0));
+ rowColors[1] = TextureEffect_Stage1_c1_c0_c0_c0(vec4(1.0), coord + vec2(0.0, 2.0));
+ rowColors[2] = TextureEffect_Stage1_c1_c0_c0_c0(vec4(1.0), coord + vec2(1.0, 2.0));
+ rowColors[3] = TextureEffect_Stage1_c1_c0_c0_c0(vec4(1.0), coord + vec2(2.0, 2.0));
+ vec4 s3 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ vec4 bicubicColor = ((wy.x * s0 + wy.y * s1) + wy.z * s2) + wy.w * s3;
+ bicubicColor.xyz = max(vec3(0.0), min(bicubicColor.xyz, bicubicColor.www));
+ _output = bicubicColor * _input;
+ return _output;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = Bicubic_Stage1_c1_c0(ComposeOne_Stage1_c0_c0(outputColor_Stage0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/46-62.shader_test b/shaders/skia/46-62.shader_test
new file mode 100644
index 0000000..c2cc4ce
--- /dev/null
+++ b/shaders/skia/46-62.shader_test
@@ -0,0 +1,83 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uCoordTransformMatrix_1_Stage0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0_c0_c0(vec4 _input, vec2 _coords) {
+ _coords = _coords * uCoordTransformMatrix_1_Stage0.xz + uCoordTransformMatrix_1_Stage0.yw;
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, _coords) * _input;
+ return _output;
+}
+vec4 Bicubic_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coord = vTransformedCoords_0_Stage0 - vec2(0.5);
+ vec2 f = fract(coord);
+ coord += 0.5 - f;
+ vec4 wx = mat4(0.055555555555555552, 0.88888888888888884, 0.055555555555555552, 0.0, -0.5, 0.0, 0.5, 0.0, 0.83333333333333337, -2.0, 1.5, -0.33333333333333331, -0.3888888888888889, 1.1666666666666667, -1.1666666666666667, 0.3888888888888889) * vec4(1.0, f.x, f.x * f.x, (f.x * f.x) * f.x);
+ vec4 wy = mat4(0.055555555555555552, 0.88888888888888884, 0.055555555555555552, 0.0, -0.5, 0.0, 0.5, 0.0, 0.83333333333333337, -2.0, 1.5, -0.33333333333333331, -0.3888888888888889, 1.1666666666666667, -1.1666666666666667, 0.3888888888888889) * vec4(1.0, f.y, f.y * f.y, (f.y * f.y) * f.y);
+ vec4 rowColors[4];
+ rowColors[0] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(-1.0, -1.0));
+ rowColors[1] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(0.0, -1.0));
+ rowColors[2] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(1.0, -1.0));
+ rowColors[3] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(2.0, -1.0));
+ vec4 s0 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ rowColors[0] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(-1.0, 0.0));
+ rowColors[1] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord);
+ rowColors[2] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(1.0, 0.0));
+ rowColors[3] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(2.0, 0.0));
+ vec4 s1 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ rowColors[0] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(-1.0, 1.0));
+ rowColors[1] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(0.0, 1.0));
+ rowColors[2] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(1.0, 1.0));
+ rowColors[3] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(2.0, 1.0));
+ vec4 s2 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ rowColors[0] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(-1.0, 2.0));
+ rowColors[1] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(0.0, 2.0));
+ rowColors[2] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(1.0, 2.0));
+ rowColors[3] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(2.0, 2.0));
+ vec4 s3 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ vec4 bicubicColor = ((wy.x * s0 + wy.y * s1) + wy.z * s2) + wy.w * s3;
+ bicubicColor.xyz = max(vec3(0.0), min(bicubicColor.xyz, bicubicColor.www));
+ _output = bicubicColor * _input;
+ return _output;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = Bicubic_Stage1_c0_c0(vec4(1.0));
+ output_Stage1.xyz *= outputColor_Stage0.xyz;
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/46-68.shader_test b/shaders/skia/46-68.shader_test
new file mode 100644
index 0000000..1c11186
--- /dev/null
+++ b/shaders/skia/46-68.shader_test
@@ -0,0 +1,63 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec2 uDstTextureUpperLeft_Stage1;
+uniform vec2 uDstTextureCoordScale_Stage1;
+uniform sampler2D uDstTextureSampler_Stage1;
+noperspective in vec4 vQuadEdge_Stage0;
+noperspective in vec4 vinColor_Stage0;
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vinColor_Stage0;
+ float edgeAlpha;
+ vec2 duvdx = dFdx(vQuadEdge_Stage0.xy);
+ vec2 duvdy = -dFdy(vQuadEdge_Stage0.xy);
+ if (vQuadEdge_Stage0.z > 0.0 && vQuadEdge_Stage0.w > 0.0) {
+ edgeAlpha = min(min(vQuadEdge_Stage0.z, vQuadEdge_Stage0.w) + 0.5, 1.0);
+ } else {
+ vec2 gF = vec2((2.0 * vQuadEdge_Stage0.x) * duvdx.x - duvdx.y, (2.0 * vQuadEdge_Stage0.x) * duvdy.x - duvdy.y);
+ edgeAlpha = vQuadEdge_Stage0.x * vQuadEdge_Stage0.x - vQuadEdge_Stage0.y;
+ edgeAlpha = clamp(0.5 - edgeAlpha / length(gF), 0.0, 1.0);
+ }
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ {
+ if (all(lessThanEqual(outputCoverage_Stage0.xyz, vec3(0.0)))) {
+ discard;
+ }
+ vec2 _dstTexCoord = (gl_FragCoord.xy - uDstTextureUpperLeft_Stage1) * uDstTextureCoordScale_Stage1;
+ _dstTexCoord.y = 1.0 - _dstTexCoord.y;
+ vec4 _dstColor = texture(uDstTextureSampler_Stage1, _dstTexCoord);
+ sk_FragColor = blend_src_in(outputColor_Stage0, _dstColor);
+ sk_FragColor = outputCoverage_Stage0 * sk_FragColor + (vec4(1.0) - outputCoverage_Stage0) * _dstColor;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 inPosition;
+in vec4 inColor;
+in vec4 inQuadEdge;
+noperspective out vec4 vQuadEdge_Stage0;
+noperspective out vec4 vinColor_Stage0;
+void main() {
+ vQuadEdge_Stage0 = inQuadEdge;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = inPosition;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/46-69.shader_test b/shaders/skia/46-69.shader_test
new file mode 100644
index 0000000..b2ffb98
--- /dev/null
+++ b/shaders/skia/46-69.shader_test
@@ -0,0 +1,726 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uinnerRect_Stage1_c0_c0_c0_c0_c0_c0;
+uniform vec2 uradiusPlusHalf_Stage1_c0_c0_c0_c0_c0_c0;
+uniform vec4 urectH_Stage1_c0_c0_c1_c0;
+uniform float uinvSixSigma_Stage1_c0_c0_c1_c0;
+uniform vec2 uImageIncrement_Stage1_c1_c0_c0_c0_c0_c0;
+uniform vec4 uKernel_Stage1_c1_c0_c0_c0_c0_c0[7];
+uniform vec2 uKernelOffset_Stage1_c1_c0_c0_c0_c0_c0;
+uniform float uGain_Stage1_c1_c0_c0_c0_c0_c0;
+uniform float uBias_Stage1_c1_c0_c0_c0_c0_c0;
+uniform vec2 uScale_Stage1_c1_c0_c0_c0_c1_c0;
+uniform vec4 uTexDom_Stage1_c1_c0_c0_c0_c1_c0;
+uniform vec3 uDecalParams_Stage1_c1_c0_c0_c0_c1_c0;
+uniform vec2 uImageIncrement_Stage1_c1_c0_c1_c0;
+uniform float uSurfaceScale_Stage1_c1_c0_c1_c0;
+uniform vec3 uLightColor_Stage1_c1_c0_c1_c0;
+uniform float uKS_Stage1_c1_c0_c1_c0;
+uniform float uShininess_Stage1_c1_c0_c1_c0;
+uniform vec4 uTexDom_Stage1_c1_c0_c1_c0;
+uniform vec3 uDecalParams_Stage1_c1_c0_c1_c0;
+uniform vec3 uLightDirection_Stage1_c1_c0_c1_c0;
+uniform vec2 uDstTextureUpperLeft_Stage2;
+uniform vec2 uDstTextureCoordScale_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+uniform sampler2D uTextureSampler_2_Stage1;
+uniform sampler2D uTextureSampler_3_Stage1;
+uniform sampler2D uTextureSampler_4_Stage1;
+uniform sampler2D uTextureSampler_5_Stage1;
+uniform sampler2D uDstTextureSampler_Stage2;
+noperspective in vec2 vEllipseOffsets_Stage0;
+noperspective in vec4 vEllipseRadii_Stage0;
+noperspective in vec4 vinColor_Stage0;
+noperspective in vec3 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+noperspective in vec2 vTransformedCoords_3_Stage0;
+noperspective in vec2 vTransformedCoords_4_Stage0;
+vec4 CircularRRect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 dxy0 = uinnerRect_Stage1_c0_c0_c0_c0_c0_c0.xy - gl_FragCoord.xy;
+ vec2 dxy1 = gl_FragCoord.xy - uinnerRect_Stage1_c0_c0_c0_c0_c0_c0.zw;
+ vec2 dxy = max(max(dxy0, dxy1), 0.0);
+ float alpha = clamp(uradiusPlusHalf_Stage1_c0_c0_c0_c0_c0_c0.x - length(dxy), 0.0, 1.0);
+ alpha = 1.0 - alpha;
+ _output = _input * alpha;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = textureProj(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 ComposeTwo_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_src_over(CircularRRect_Stage1_c0_c0_c0_c0_c0_c0(inputColor), TextureEffect_Stage1_c0_c0_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 RectBlurEffect_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float xCoverage, yCoverage;
+ {
+ float x, y;
+ {
+ x = max(urectH_Stage1_c0_c0_c1_c0.x - gl_FragCoord.x, gl_FragCoord.x - urectH_Stage1_c0_c0_c1_c0.z);
+ y = max(urectH_Stage1_c0_c0_c1_c0.y - gl_FragCoord.y, gl_FragCoord.y - urectH_Stage1_c0_c0_c1_c0.w);
+ }
+ xCoverage = texture(uTextureSampler_1_Stage1, vec2(x * uinvSixSigma_Stage1_c0_c0_c1_c0, 0.5)).w;
+ yCoverage = texture(uTextureSampler_1_Stage1, vec2(y * uinvSixSigma_Stage1_c0_c0_c1_c0, 0.5)).w;
+ _output = (_input * xCoverage) * yCoverage;
+ }
+ _output = (_input * xCoverage) * yCoverage;
+ return _output;
+}
+float _blend_overlay_component(float sc, float sa, float dc, float da) {
+ if (2.0 * dc <= da) {
+ return (2.0 * sc) * dc;
+ }
+ return sa * da - (2.0 * (da - dc)) * (sa - sc);
+}
+vec4 blend_overlay(vec4 src, vec4 dst) {
+ vec4 result = vec4(_blend_overlay_component(src.x, src.w, dst.x, dst.w), _blend_overlay_component(src.y, src.w, dst.y, dst.w), _blend_overlay_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+ result.xyz += dst.xyz * (1.0 - src.w) + src.xyz * (1.0 - dst.w);
+ return result;
+}
+vec4 ComposeTwo_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_overlay(ComposeTwo_Stage1_c0_c0_c0_c0(inputColor), RectBlurEffect_Stage1_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 MatrixConvolution_Stage1_c1_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 sum = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_1_Stage0 - uKernelOffset_Stage1_c1_c0_c0_c0_c0_c0 * uImageIncrement_Stage1_c1_c0_c0_c0_c0_c0;
+ vec4 c;
+ {
+ float k = uKernel_Stage1_c1_c0_c0_c0_c0_c0[0].x;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0_c0_c0_c0_c0[0].y;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1_c1_c0_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0_c0_c0_c0_c0[0].z;
+ {
+ vec2 origCoord = coord + vec2(2.0, 0.0) * uImageIncrement_Stage1_c1_c0_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0_c0_c0_c0_c0[0].w;
+ {
+ vec2 origCoord = coord + vec2(3.0, 0.0) * uImageIncrement_Stage1_c1_c0_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0_c0_c0_c0_c0[1].x;
+ {
+ vec2 origCoord = coord + vec2(4.0, 0.0) * uImageIncrement_Stage1_c1_c0_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0_c0_c0_c0_c0[1].y;
+ {
+ vec2 origCoord = coord + vec2(5.0, 0.0) * uImageIncrement_Stage1_c1_c0_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0_c0_c0_c0_c0[1].z;
+ {
+ vec2 origCoord = coord + vec2(6.0, 0.0) * uImageIncrement_Stage1_c1_c0_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0_c0_c0_c0_c0[1].w;
+ {
+ vec2 origCoord = coord + vec2(7.0, 0.0) * uImageIncrement_Stage1_c1_c0_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0_c0_c0_c0_c0[2].x;
+ {
+ vec2 origCoord = coord + vec2(8.0, 0.0) * uImageIncrement_Stage1_c1_c0_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0_c0_c0_c0_c0[2].y;
+ {
+ vec2 origCoord = coord + vec2(9.0, 0.0) * uImageIncrement_Stage1_c1_c0_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0_c0_c0_c0_c0[2].z;
+ {
+ vec2 origCoord = coord + vec2(10.0, 0.0) * uImageIncrement_Stage1_c1_c0_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0_c0_c0_c0_c0[2].w;
+ {
+ vec2 origCoord = coord + vec2(11.0, 0.0) * uImageIncrement_Stage1_c1_c0_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0_c0_c0_c0_c0[3].x;
+ {
+ vec2 origCoord = coord + vec2(12.0, 0.0) * uImageIncrement_Stage1_c1_c0_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0_c0_c0_c0_c0[3].y;
+ {
+ vec2 origCoord = coord + vec2(13.0, 0.0) * uImageIncrement_Stage1_c1_c0_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0_c0_c0_c0_c0[3].z;
+ {
+ vec2 origCoord = coord + vec2(14.0, 0.0) * uImageIncrement_Stage1_c1_c0_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0_c0_c0_c0_c0[3].w;
+ {
+ vec2 origCoord = coord + vec2(15.0, 0.0) * uImageIncrement_Stage1_c1_c0_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0_c0_c0_c0_c0[4].x;
+ {
+ vec2 origCoord = coord + vec2(16.0, 0.0) * uImageIncrement_Stage1_c1_c0_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0_c0_c0_c0_c0[4].y;
+ {
+ vec2 origCoord = coord + vec2(17.0, 0.0) * uImageIncrement_Stage1_c1_c0_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0_c0_c0_c0_c0[4].z;
+ {
+ vec2 origCoord = coord + vec2(18.0, 0.0) * uImageIncrement_Stage1_c1_c0_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0_c0_c0_c0_c0[4].w;
+ {
+ vec2 origCoord = coord + vec2(19.0, 0.0) * uImageIncrement_Stage1_c1_c0_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0_c0_c0_c0_c0[5].x;
+ {
+ vec2 origCoord = coord + vec2(20.0, 0.0) * uImageIncrement_Stage1_c1_c0_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0_c0_c0_c0_c0[5].y;
+ {
+ vec2 origCoord = coord + vec2(21.0, 0.0) * uImageIncrement_Stage1_c1_c0_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0_c0_c0_c0_c0[5].z;
+ {
+ vec2 origCoord = coord + vec2(22.0, 0.0) * uImageIncrement_Stage1_c1_c0_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0_c0_c0_c0_c0[5].w;
+ {
+ vec2 origCoord = coord + vec2(23.0, 0.0) * uImageIncrement_Stage1_c1_c0_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0_c0_c0_c0_c0[6].x;
+ {
+ vec2 origCoord = coord + vec2(24.0, 0.0) * uImageIncrement_Stage1_c1_c0_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ vec2 origCoord = vTransformedCoords_1_Stage0;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ _output.w = c.w;
+ _output.xyz = clamp(sum.xyz * uGain_Stage1_c1_c0_c0_c0_c0_c0 + uBias_Stage1_c1_c0_c0_c0_c0_c0, 0.0, 1.0);
+ _output.xyz *= _output.w;
+ _output *= _input;
+ return _output;
+}
+vec4 DisplacementMap_Stage1_c1_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 dColor = texture(uTextureSampler_3_Stage1, vTransformedCoords_2_Stage0);
+ dColor.xyz = dColor.w < 9.9999999747524271e-07 ? vec3(0.0) : clamp(dColor.xyz / dColor.w, 0.0, 1.0);
+ vec2 cCoords = vTransformedCoords_3_Stage0 + uScale_Stage1_c1_c0_c0_c0_c1_c0 * (dColor.yz - vec2(0.5));
+ {
+ vec2 origCoord = cCoords;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0_c1_c0.xy, uTexDom_Stage1_c1_c0_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_4_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ _output = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ return _output;
+}
+vec4 blend_hard_light(vec4 src, vec4 dst) {
+ return blend_overlay(dst, src);
+}
+vec4 ComposeTwo_Stage1_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_hard_light(MatrixConvolution_Stage1_c1_c0_c0_c0_c0_c0(inputColor), DisplacementMap_Stage1_c1_c0_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 light_Stage1_c1_c0_c1_c0(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ vec3 halfDir = normalize(surfaceToLight + vec3(0.0, 0.0, 1.0));
+ float colorScale = uKS_Stage1_c1_c0_c1_c0 * pow(dot(normal, halfDir), uShininess_Stage1_c1_c0_c1_c0);
+ vec3 color = lightColor * clamp(colorScale, 0.0, 1.0);
+ return vec4(color, max(max(color.x, color.y), color.z));
+}
+float sobel_Stage1_c1_c0_c1_c0(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage1_c1_c0_c1_c0(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage1_c1_c0_c1_c0(float m[9], float surfaceScale) {
+ return pointToNormal_Stage1_c1_c0_c1_c0(sobel_Stage1_c1_c0_c1_c0(m[0], m[1], m[3], m[4], m[6], m[7], 0.5), sobel_Stage1_c1_c0_c1_c0(m[0], m[6], m[1], m[7], 0.0, 0.0, 0.33333298563957214), surfaceScale);
+}
+vec4 SpecularLighting_Stage1_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coord = vTransformedCoords_4_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage1_c1_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c1_c0.xy, uTexDom_Stage1_c1_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_5_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp0 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1_c1_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c1_c0.xy, uTexDom_Stage1_c1_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_5_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1_c1_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c1_c0.xy, uTexDom_Stage1_c1_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_5_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage1_c1_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c1_c0.xy, uTexDom_Stage1_c1_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_5_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c1_c0.xy, uTexDom_Stage1_c1_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_5_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1_c1_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c1_c0.xy, uTexDom_Stage1_c1_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_5_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp5 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage1_c1_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c1_c0.xy, uTexDom_Stage1_c1_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_5_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp6 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage1_c1_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c1_c0.xy, uTexDom_Stage1_c1_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_5_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp7 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage1_c1_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c1_c0.xy, uTexDom_Stage1_c1_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_5_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp8 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = uLightDirection_Stage1_c1_c0_c1_c0;
+ _output = light_Stage1_c1_c0_c1_c0(normal_Stage1_c1_c0_c1_c0(m, uSurfaceScale_Stage1_c1_c0_c1_c0), surfaceToLight, uLightColor_Stage1_c1_c0_c1_c0);
+ _output *= _input;
+ return _output;
+}
+vec4 blend_darken(vec4 src, vec4 dst) {
+ vec4 result = blend_src_over(src, dst);
+ result.xyz = min(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
+ return result;
+}
+vec4 ComposeTwo_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_darken(ComposeTwo_Stage1_c1_c0_c0_c0(inputColor), SpecularLighting_Stage1_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 blend_src_atop(vec4 src, vec4 dst) {
+ return dst.w * src + (1.0 - src.w) * dst;
+}
+vec4 blend_src_out(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vinColor_Stage0;
+ vec2 offset = vEllipseOffsets_Stage0;
+ offset *= vEllipseRadii_Stage0.xy;
+ float test = dot(offset, offset) - 1.0;
+ vec2 grad = (2.0 * offset) * vEllipseRadii_Stage0.xy;
+ float grad_dot = dot(grad, grad);
+ grad_dot = max(grad_dot, 1.1754999560161448e-38);
+ float invlen = inversesqrt(grad_dot);
+ float edgeAlpha = clamp(0.5 - test * invlen, 0.0, 1.0);
+ offset = vEllipseOffsets_Stage0 * vEllipseRadii_Stage0.zw;
+ test = dot(offset, offset) - 1.0;
+ grad = (2.0 * offset) * vEllipseRadii_Stage0.zw;
+ grad_dot = dot(grad, grad);
+ invlen = inversesqrt(grad_dot);
+ edgeAlpha *= clamp(0.5 + test * invlen, 0.0, 1.0);
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_src_atop(ComposeTwo_Stage1_c0_c0(inputColor), ComposeTwo_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ if (all(lessThanEqual(outputCoverage_Stage0.xyz, vec3(0.0)))) {
+ discard;
+ }
+ vec2 _dstTexCoord = (gl_FragCoord.xy - uDstTextureUpperLeft_Stage2) * uDstTextureCoordScale_Stage2;
+ vec4 _dstColor = texture(uDstTextureSampler_Stage2, _dstTexCoord);
+ sk_FragColor = blend_src_out(output_Stage1, _dstColor);
+ sk_FragColor = outputCoverage_Stage0 * sk_FragColor + (vec4(1.0) - outputCoverage_Stage0) * _dstColor;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+uniform mat3 uCoordTransformMatrix_3_Stage0;
+uniform mat3 uCoordTransformMatrix_4_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec2 inEllipseOffset;
+in vec4 inEllipseRadii;
+noperspective out vec2 vEllipseOffsets_Stage0;
+noperspective out vec4 vEllipseRadii_Stage0;
+noperspective out vec4 vinColor_Stage0;
+noperspective out vec3 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+noperspective out vec2 vTransformedCoords_3_Stage0;
+noperspective out vec2 vTransformedCoords_4_Stage0;
+void main() {
+ vEllipseOffsets_Stage0 = inEllipseOffset;
+ vEllipseRadii_Stage0 = inEllipseRadii;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0);
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_3_Stage0 = (uCoordTransformMatrix_3_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_4_Stage0 = (uCoordTransformMatrix_4_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/46-7.shader_test b/shaders/skia/46-7.shader_test
new file mode 100644
index 0000000..aa28e18
--- /dev/null
+++ b/shaders/skia/46-7.shader_test
@@ -0,0 +1,152 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage2_c1_c0;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.w) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ } else {
+ {
+ if (t < uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = OverrideInputFragmentProcessor_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c1_c0;
+ }
+ return _output;
+}
+vec4 blend_src(vec4 src, vec4 dst) {
+ return src;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 blend_darken(vec4 src, vec4 dst) {
+ vec4 result = blend_src_over(src, dst);
+ result.xyz = min(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
+ return result;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_src(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_darken(ConstColorProcessor_Stage2_c1_c0(vec4(1.0)), output_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 inColor;
+in vec2 inLocalCoord;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/46-70.shader_test b/shaders/skia/46-70.shader_test
new file mode 100644
index 0000000..5fdc908
--- /dev/null
+++ b/shaders/skia/46-70.shader_test
@@ -0,0 +1,84 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 ubaseFrequency_Stage2;
+uniform float uz_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+uniform sampler2D uTextureSampler_1_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec3 vTransformedCoords_1_Stage0;
+vec3 fade_Stage2(vec3 t) {
+ return ((t * t) * t) * (t * (t * 6.0 - 15.0) + 10.0);
+}
+float perm_Stage2(float x) {
+ return texture(uTextureSampler_0_Stage2, vec2(fract(x / 256.0), 0.0)).x * 255.0;
+}
+float grad_Stage2(float x, vec3 p) {
+ return dot(texture(uTextureSampler_1_Stage2, vec2(fract(x / 16.0), 0.0)).xyz * 255.0 - vec3(1.0), p);
+}
+float lerp_Stage2(float a, float b, float w) {
+ return a + w * (b - a);
+}
+float noise_Stage2(vec3 p) {
+ vec3 P = mod(floor(p), 256.0);
+ p -= floor(p);
+ vec3 f = fade_Stage2(p);
+ float A = perm_Stage2(P.x) + P.y;
+ float AA = perm_Stage2(A) + P.z;
+ float AB = perm_Stage2(A + 1.0) + P.z;
+ float B = perm_Stage2(P.x + 1.0) + P.y;
+ float BA = perm_Stage2(B) + P.z;
+ float BB = perm_Stage2(B + 1.0) + P.z;
+ float result = lerp_Stage2(lerp_Stage2(lerp_Stage2(grad_Stage2(perm_Stage2(AA), p), grad_Stage2(perm_Stage2(BA), p + vec3(-1.0, 0.0, 0.0)), f.x), lerp_Stage2(grad_Stage2(perm_Stage2(AB), p + vec3(0.0, -1.0, 0.0)), grad_Stage2(perm_Stage2(BB), p + vec3(-1.0, -1.0, 0.0)), f.x), f.y), lerp_Stage2(lerp_Stage2(grad_Stage2(perm_Stage2(AA + 1.0), p + vec3(0.0, 0.0, -1.0)), grad_Stage2(perm_Stage2(BA + 1.0), p + vec3(-1.0, 0.0, -1.0)), f.x), lerp_Stage2(grad_Stage2(perm_Stage2(AB + 1.0), p + vec3(0.0, -1.0, -1.0)), grad_Stage2(perm_Stage2(BB + 1.0), p + vec3(-1.0, -1.0, -1.0)), f.x), f.y), f.z);
+ return result;
+}
+float noiseOctaves_Stage2(vec3 p) {
+ float result = 0.0;
+ float ratio = 1.0;
+ for (float i = 0.0;i < 9.0; i++) {
+ result += noise_Stage2(p) / ratio;
+ p *= 2.0;
+ ratio *= 2.0;
+ }
+ return (result + 1.0) / 2.0;
+}
+void main() {
+ vec4 output_Stage2;
+ {
+ vec2 vTransformedCoords_1_Stage0_ensure2D = vTransformedCoords_1_Stage0.xy / vTransformedCoords_1_Stage0.z;
+ vec2 coords = vTransformedCoords_1_Stage0_ensure2D * ubaseFrequency_Stage2;
+ float r = noiseOctaves_Stage2(vec3(coords, uz_Stage2));
+ float g = noiseOctaves_Stage2(vec3(coords, uz_Stage2));
+ float b = noiseOctaves_Stage2(vec3(coords, uz_Stage2));
+ float a = noiseOctaves_Stage2(vec3(coords, uz_Stage2));
+ output_Stage2 = vec4(r, g, b, a);
+ output_Stage2 = clamp(output_Stage2, 0.0, 1.0);
+ output_Stage2 = vec4(output_Stage2.xyz * output_Stage2.www, output_Stage2.w);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec3 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0);
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/46-71.shader_test b/shaders/skia/46-71.shader_test
new file mode 100644
index 0000000..b3f41cb
--- /dev/null
+++ b/shaders/skia/46-71.shader_test
@@ -0,0 +1,68 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 ucircle_Stage2_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec3 vTransformedCoords_1_Stage0;
+vec4 CircleEffect_Stage2_c0_c0(vec4 _input, vec2 _coords) {
+ vec4 _output;
+ float d;
+ {
+ d = (1.0 - length((ucircle_Stage2_c0_c0.xy - gl_FragCoord.xy) * ucircle_Stage2_c0_c0.w)) * ucircle_Stage2_c0_c0.z;
+ }
+ {
+ _output = _input * clamp(d, 0.0, 1.0);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ vec2 vTransformedCoords_1_Stage0_ensure2D = vTransformedCoords_1_Stage0.xy / vTransformedCoords_1_Stage0.z;
+ float coord = vTransformedCoords_1_Stage0_ensure2D.y - 0.5;
+ float f = fract(coord);
+ coord += 0.5 - f;
+ float f2 = f * f;
+ vec4 w = mat4(0.055555555555555552, 0.88888888888888884, 0.055555555555555552, 0.0, -0.5, 0.0, 0.5, 0.0, 0.83333333333333337, -2.0, 1.5, -0.33333333333333331, -0.3888888888888889, 1.1666666666666667, -1.1666666666666667, 0.3888888888888889) * vec4(1.0, f, f2, f2 * f);
+ vec4 c[4];
+ c[0] = CircleEffect_Stage2_c0_c0(vec4(1.0), vec2(vTransformedCoords_1_Stage0_ensure2D.x, coord + -1.0));
+ c[1] = CircleEffect_Stage2_c0_c0(vec4(1.0), vec2(vTransformedCoords_1_Stage0_ensure2D.x, coord));
+ c[2] = CircleEffect_Stage2_c0_c0(vec4(1.0), vec2(vTransformedCoords_1_Stage0_ensure2D.x, coord + 1.0));
+ c[3] = CircleEffect_Stage2_c0_c0(vec4(1.0), vec2(vTransformedCoords_1_Stage0_ensure2D.x, coord + 2.0));
+ vec4 bicubicColor = ((c[0] * w.x + c[1] * w.y) + c[2] * w.z) + c[3] * w.w;
+ bicubicColor = clamp(bicubicColor, 0.0, 1.0);
+ output_Stage2 = bicubicColor * output_Stage1;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec3 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0);
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/46-9.shader_test b/shaders/skia/46-9.shader_test
new file mode 100644
index 0000000..cb9d043
--- /dev/null
+++ b/shaders/skia/46-9.shader_test
@@ -0,0 +1,71 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uborder_Stage1;
+uniform vec4 usubset_Stage1;
+uniform vec4 uclamp_Stage1;
+uniform vec4 unorm_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+flat in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec2 inCoord = vTransformedCoords_0_Stage0;
+ inCoord *= unorm_Stage1.xy;
+ float extraRepeatCoordX;
+ float repeatCoordWeightX;
+ vec2 subsetCoord;
+ {
+ float w = usubset_Stage1.z - usubset_Stage1.x;
+ float w2 = 2.0 * w;
+ float d = inCoord.x - usubset_Stage1.x;
+ float m = mod(d, w2);
+ float o = mix(m, w2 - m, step(w, m));
+ subsetCoord.x = o + usubset_Stage1.x;
+ extraRepeatCoordX = (w - o) + usubset_Stage1.x;
+ float hw = w / 2.0;
+ float n = mod(d - hw, w2);
+ repeatCoordWeightX = clamp((mix(n, w2 - n, step(w, n)) - hw) + 0.5, 0.0, 1.0);
+ }
+ subsetCoord.y = inCoord.y;
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage1.x, uclamp_Stage1.z);
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage1.y, uclamp_Stage1.w);
+ extraRepeatCoordX = clamp(extraRepeatCoordX, uclamp_Stage1.x, uclamp_Stage1.z);
+ vec4 textureColor = mix(texture(uTextureSampler_0_Stage1, clampedCoord * unorm_Stage1.zw), texture(uTextureSampler_0_Stage1, vec2(extraRepeatCoordX, clampedCoord.y) * unorm_Stage1.zw), repeatCoordWeightX);
+ float errY = subsetCoord.y - clampedCoord.y;
+ textureColor = mix(textureColor, uborder_Stage1, min(abs(errY), 1.0));
+ output_Stage1 = outputColor_Stage0 * textureColor;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec2 inLocalCoords;
+in vec4 color;
+flat out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vcolor_Stage0 = color;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoords, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/46.shader_test b/shaders/skia/46.shader_test
new file mode 100644
index 0000000..9f6951d
--- /dev/null
+++ b/shaders/skia/46.shader_test
@@ -0,0 +1,57 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 usubset_Stage1_c0_c0;
+uniform vec4 uclamp_Stage1_c0_c0;
+uniform sampler2DRect uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 inCoord = vTransformedCoords_0_Stage0;
+ vec2 subsetCoord;
+ {
+ float w = usubset_Stage1_c0_c0.z - usubset_Stage1_c0_c0.x;
+ float w2 = 2.0 * w;
+ float m = mod(inCoord.x - usubset_Stage1_c0_c0.x, w2);
+ subsetCoord.x = mix(m, w2 - m, step(w, m)) + usubset_Stage1_c0_c0.x;
+ }
+ subsetCoord.y = inCoord.y;
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage1_c0_c0.x, uclamp_Stage1_c0_c0.z);
+ clampedCoord.y = subsetCoord.y;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ _output = _input * textureColor;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TextureEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/460-4.shader_test b/shaders/skia/460-4.shader_test
new file mode 100644
index 0000000..dbc078c
--- /dev/null
+++ b/shaders/skia/460-4.shader_test
@@ -0,0 +1,69 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uellipse_Stage2_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 ClampFragmentProcessor_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = clamp(_input, 0.0, 1.0);
+ }
+ return _output;
+}
+vec4 EllipseEffect_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 d = gl_FragCoord.xy - uellipse_Stage2_c1_c0.xy;
+ vec2 Z = d * uellipse_Stage2_c1_c0.zw;
+ float implicit = dot(Z, d) - 1.0;
+ float grad_dot = 4.0 * dot(Z, Z);
+ {
+ grad_dot = max(grad_dot, 1.1754999560161448e-38);
+ }
+ float approx_dist = implicit * inversesqrt(grad_dot);
+ float alpha;
+ {
+ alpha = clamp(0.5 + approx_dist, 0.0, 1.0);
+ }
+ _output = _input * alpha;
+ return _output;
+}
+vec4 blend_exclusion(vec4 src, vec4 dst) {
+ return vec4((dst.xyz + src.xyz) - (2.0 * dst.xyz) * src.xyz, src.w + (1.0 - src.w) * dst.w);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ vec4 inputColor = vec4(output_Stage1.xyz, 1.0);
+ output_Stage2 = blend_exclusion(ClampFragmentProcessor_Stage2_c0_c0(inputColor), EllipseEffect_Stage2_c1_c0(inputColor));
+ output_Stage2 *= output_Stage1.w;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/460.shader_test b/shaders/skia/460.shader_test
new file mode 100644
index 0000000..511e62b
--- /dev/null
+++ b/shaders/skia/460.shader_test
@@ -0,0 +1,144 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.w) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ } else {
+ {
+ if (t < uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = OverrideInputFragmentProcessor_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+float _guarded_divide(float n, float d) {
+ return n / d;
+}
+float _color_burn_component(float sc, float sa, float dc, float da) {
+ if (da == dc) {
+ return (sa * da + sc * (1.0 - da)) + dc * (1.0 - sa);
+ } else if (sc == 0.0) {
+ return dc * (1.0 - sa);
+ }
+ float d = max(0.0, da - _guarded_divide((da - dc) * sa, sc));
+ return (d * sa + sc * (1.0 - da)) + dc * (1.0 - sa);
+}
+vec4 blend_color_burn(vec4 src, vec4 dst) {
+ return vec4(_color_burn_component(src.x, src.w, dst.x, dst.w), _color_burn_component(src.y, src.w, dst.y, dst.w), _color_burn_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_color_burn(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 inColor;
+in vec2 inLocalCoord;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/463-4.shader_test b/shaders/skia/463-4.shader_test
new file mode 100644
index 0000000..7a5a361
--- /dev/null
+++ b/shaders/skia/463-4.shader_test
@@ -0,0 +1,75 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform mat4 um_Stage2_c0_c0;
+uniform vec4 uv_Stage2_c0_c0;
+uniform mat4 um_Stage2_c1_c0;
+uniform vec4 uv_Stage2_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 ColorMatrixFragmentProcessor_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = _input;
+ {
+ float nonZeroAlpha = max(inputColor.w, 9.9999997473787516e-05);
+ inputColor = vec4(inputColor.xyz / nonZeroAlpha, inputColor.w);
+ }
+ _output = um_Stage2_c0_c0 * inputColor + uv_Stage2_c0_c0;
+ {
+ _output = clamp(_output, 0.0, 1.0);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 ColorMatrixFragmentProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = _input;
+ {
+ float nonZeroAlpha = max(inputColor.w, 9.9999997473787516e-05);
+ inputColor = vec4(inputColor.xyz / nonZeroAlpha, inputColor.w);
+ }
+ _output = um_Stage2_c1_c0 * inputColor + uv_Stage2_c1_c0;
+ {
+ _output = clamp(_output, 0.0, 1.0);
+ }
+ return _output;
+}
+vec4 blend_screen(vec4 src, vec4 dst) {
+ return src + (1.0 - src) * dst;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ vec4 inputColor = vec4(output_Stage1.xyz, 1.0);
+ output_Stage2 = blend_screen(ColorMatrixFragmentProcessor_Stage2_c0_c0(inputColor), ColorMatrixFragmentProcessor_Stage2_c1_c0(inputColor));
+ output_Stage2 *= output_Stage1.w;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/463.shader_test b/shaders/skia/463.shader_test
new file mode 100644
index 0000000..e4d5e41
--- /dev/null
+++ b/shaders/skia/463.shader_test
@@ -0,0 +1,73 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 ucolor_Stage1_c0_c0_c0_c0;
+noperspective in vec4 vcolor_Stage0;
+vec4 ConstColorProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = _input.w * ucolor_Stage1_c0_c0_c0_c0;
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = ConstColorProcessor_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+float _guarded_divide(float n, float d) {
+ return n / d;
+}
+float _color_burn_component(float sc, float sa, float dc, float da) {
+ if (da == dc) {
+ return (sa * da + sc * (1.0 - da)) + dc * (1.0 - sa);
+ } else if (sc == 0.0) {
+ return dc * (1.0 - sa);
+ }
+ float d = max(0.0, da - _guarded_divide((da - dc) * sa, sc));
+ return (d * sa + sc * (1.0 - da)) + dc * (1.0 - sa);
+}
+vec4 blend_color_burn(vec4 src, vec4 dst) {
+ return vec4(_color_burn_component(src.x, src.w, dst.x, dst.w), _color_burn_component(src.y, src.w, dst.y, dst.w), _color_burn_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_color_burn(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 position;
+in vec4 inColor;
+noperspective out vec4 vcolor_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/466-2.shader_test b/shaders/skia/466-2.shader_test
new file mode 100644
index 0000000..4d50049
--- /dev/null
+++ b/shaders/skia/466-2.shader_test
@@ -0,0 +1,30 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uColor_Stage0;
+uniform float uCoverage_Stage0;
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ outputCoverage_Stage0 = vec4(uCoverage_Stage0);
+ }
+ {
+ sk_FragColor = outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 inPosition;
+void main() {
+ vec2 pos2 = inPosition;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/466-4.shader_test b/shaders/skia/466-4.shader_test
new file mode 100644
index 0000000..5724335
--- /dev/null
+++ b/shaders/skia/466-4.shader_test
@@ -0,0 +1,66 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec3 uedges_Stage2_c0_c0[2];
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 ConvexPoly_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ float alpha = 1.0;
+ float edge;
+ edge = dot(uedges_Stage2_c0_c0[0], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage2_c0_c0[1], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ alpha = 1.0 - alpha;
+ _output = _input * alpha;
+ return _output;
+}
+vec4 ClampFragmentProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = clamp(_input, 0.0, 1.0);
+ }
+ return _output;
+}
+vec4 blend_dst_over(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src + dst;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ vec4 inputColor = vec4(output_Stage1.xyz, 1.0);
+ output_Stage2 = blend_dst_over(ConvexPoly_Stage2_c0_c0(inputColor), ClampFragmentProcessor_Stage2_c1_c0(inputColor));
+ output_Stage2 *= output_Stage1.w;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/466.shader_test b/shaders/skia/466.shader_test
new file mode 100644
index 0000000..4f0751a
--- /dev/null
+++ b/shaders/skia/466.shader_test
@@ -0,0 +1,164 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage2_c1_c0;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.w) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ } else {
+ {
+ if (t < uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = OverrideInputFragmentProcessor_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c1_c0;
+ }
+ return _output;
+}
+float _guarded_divide(float n, float d) {
+ return n / d;
+}
+float _color_burn_component(float sc, float sa, float dc, float da) {
+ if (da == dc) {
+ return (sa * da + sc * (1.0 - da)) + dc * (1.0 - sa);
+ } else if (sc == 0.0) {
+ return dc * (1.0 - sa);
+ }
+ float d = max(0.0, da - _guarded_divide((da - dc) * sa, sc));
+ return (d * sa + sc * (1.0 - da)) + dc * (1.0 - sa);
+}
+vec4 blend_color_burn(vec4 src, vec4 dst) {
+ return vec4(_color_burn_component(src.x, src.w, dst.x, dst.w), _color_burn_component(src.y, src.w, dst.y, dst.w), _color_burn_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 blend_darken(vec4 src, vec4 dst) {
+ vec4 result = blend_src_over(src, dst);
+ result.xyz = min(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
+ return result;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_color_burn(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_darken(ConstColorProcessor_Stage2_c1_c0(vec4(1.0)), output_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 inColor;
+in vec2 inLocalCoord;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/469-2.shader_test b/shaders/skia/469-2.shader_test
new file mode 100644
index 0000000..0684ced
--- /dev/null
+++ b/shaders/skia/469-2.shader_test
@@ -0,0 +1,26 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+noperspective in vec4 vcolor_Stage0;
+void main() {
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+noperspective out vec4 vcolor_Stage0;
+void main() {
+ vec4 color = inColor;
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/469-4.shader_test b/shaders/skia/469-4.shader_test
new file mode 100644
index 0000000..9d804a9
--- /dev/null
+++ b/shaders/skia/469-4.shader_test
@@ -0,0 +1,69 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uellipse_Stage2_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 ClampFragmentProcessor_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = clamp(_input, 0.0, 1.0);
+ }
+ return _output;
+}
+vec4 EllipseEffect_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 d = gl_FragCoord.xy - uellipse_Stage2_c1_c0.xy;
+ vec2 Z = d * uellipse_Stage2_c1_c0.zw;
+ float implicit = dot(Z, d) - 1.0;
+ float grad_dot = 4.0 * dot(Z, Z);
+ {
+ grad_dot = max(grad_dot, 1.1754999560161448e-38);
+ }
+ float approx_dist = implicit * inversesqrt(grad_dot);
+ float alpha;
+ {
+ alpha = clamp(0.5 - approx_dist, 0.0, 1.0);
+ }
+ _output = _input * alpha;
+ return _output;
+}
+vec4 blend_plus(vec4 src, vec4 dst) {
+ return min(src + dst, 1.0);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ vec4 inputColor = vec4(output_Stage1.xyz, 1.0);
+ output_Stage2 = blend_plus(ClampFragmentProcessor_Stage2_c0_c0(inputColor), EllipseEffect_Stage2_c1_c0(inputColor));
+ output_Stage2 *= output_Stage1.w;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/469.shader_test b/shaders/skia/469.shader_test
new file mode 100644
index 0000000..7ec2257
--- /dev/null
+++ b/shaders/skia/469.shader_test
@@ -0,0 +1,93 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 ucolor_Stage1_c0_c0_c0_c0;
+uniform vec4 ucolor_Stage2_c1_c0;
+noperspective in vec4 vcolor_Stage0;
+vec4 ConstColorProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = _input.w * ucolor_Stage1_c0_c0_c0_c0;
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = ConstColorProcessor_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c1_c0;
+ }
+ return _output;
+}
+float _guarded_divide(float n, float d) {
+ return n / d;
+}
+float _color_burn_component(float sc, float sa, float dc, float da) {
+ if (da == dc) {
+ return (sa * da + sc * (1.0 - da)) + dc * (1.0 - sa);
+ } else if (sc == 0.0) {
+ return dc * (1.0 - sa);
+ }
+ float d = max(0.0, da - _guarded_divide((da - dc) * sa, sc));
+ return (d * sa + sc * (1.0 - da)) + dc * (1.0 - sa);
+}
+vec4 blend_color_burn(vec4 src, vec4 dst) {
+ return vec4(_color_burn_component(src.x, src.w, dst.x, dst.w), _color_burn_component(src.y, src.w, dst.y, dst.w), _color_burn_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 blend_darken(vec4 src, vec4 dst) {
+ vec4 result = blend_src_over(src, dst);
+ result.xyz = min(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
+ return result;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_color_burn(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_darken(ConstColorProcessor_Stage2_c1_c0(vec4(1.0)), output_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 position;
+in vec4 inColor;
+noperspective out vec4 vcolor_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/472-2.shader_test b/shaders/skia/472-2.shader_test
new file mode 100644
index 0000000..094d40b
--- /dev/null
+++ b/shaders/skia/472-2.shader_test
@@ -0,0 +1,186 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform float ubias_Stage1_c0_c0_c0_c0;
+uniform float uscale_Stage1_c0_c0_c0_c0;
+uniform vec4 uscale01_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias01_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale23_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias23_Stage1_c0_c0_c1_c0;
+uniform float uthreshold_Stage1_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage2;
+uniform vec4 uleftBorderColor_Stage3_c1_c0;
+uniform vec4 urightBorderColor_Stage3_c1_c0;
+uniform float ubias_Stage3_c1_c0_c0_c0;
+uniform float uscale_Stage3_c1_c0_c0_c0;
+uniform vec4 uscale01_Stage3_c1_c0_c1_c0;
+uniform vec4 ubias01_Stage3_c1_c0_c1_c0;
+uniform vec4 uscale23_Stage3_c1_c0_c1_c0;
+uniform vec4 ubias23_Stage3_c1_c0_c1_c0;
+uniform float uthreshold_Stage3_c1_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage0;
+in vec2 vTextureCoords_Stage0;
+flat in int vTexIndex_Stage0;
+in vec2 vIntTextureCoords_Stage0;
+in vec4 vinColor_Stage0;
+in vec2 vTransformedCoords_0_Stage0;
+in vec2 vTransformedCoords_1_Stage0;
+vec4 SweepGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float angle;
+ {
+ angle = atan(-vTransformedCoords_0_Stage0.y, -vTransformedCoords_0_Stage0.x);
+ }
+ float t = ((angle * 0.15915493667125702 + 0.5) + ubias_Stage1_c0_c0_c0_c0) * uscale_Stage1_c0_c0_c0_c0;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 DualIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthreshold_Stage1_c0_c0_c1_c0) {
+ scale = uscale01_Stage1_c0_c0_c1_c0;
+ bias = ubias01_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale23_Stage1_c0_c0_c1_c0;
+ bias = ubias23_Stage1_c0_c0_c1_c0;
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = SweepGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = DualIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 SweepGradientLayout_Stage3_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float angle;
+ {
+ angle = atan(-vTransformedCoords_1_Stage0.y, -vTransformedCoords_1_Stage0.x);
+ }
+ float t = ((angle * 0.15915493667125702 + 0.5) + ubias_Stage3_c1_c0_c0_c0) * uscale_Stage3_c1_c0_c0_c0;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 DualIntervalGradientColorizer_Stage3_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthreshold_Stage3_c1_c0_c1_c0) {
+ scale = uscale01_Stage3_c1_c0_c1_c0;
+ bias = ubias01_Stage3_c1_c0_c1_c0;
+ } else {
+ scale = uscale23_Stage3_c1_c0_c1_c0;
+ bias = ubias23_Stage3_c1_c0_c1_c0;
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage3_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = SweepGradientLayout_Stage3_c1_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage3_c1_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage3_c1_c0;
+ } else {
+ _output = DualIntervalGradientColorizer_Stage3_c1_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ vec2 uv = vTextureCoords_Stage0;
+ vec4 texColor;
+ {
+ texColor = texture(uTextureSampler_0_Stage0, uv);
+ }
+ float distance = 7.96875 * (texColor.x - 0.50196081399917603);
+ float afwidth;
+ vec2 dist_grad = vec2(dFdx(distance), -dFdy(distance));
+ float dg_len2 = dot(dist_grad, dist_grad);
+ if (dg_len2 < 9.9999997473787516e-05) {
+ dist_grad = vec2(0.70709997415542603, 0.70709997415542603);
+ } else {
+ dist_grad = dist_grad * inversesqrt(dg_len2);
+ }
+ vec2 Jdx = dFdx(vIntTextureCoords_Stage0);
+ vec2 Jdy = -dFdy(vIntTextureCoords_Stage0);
+ vec2 grad = vec2(dist_grad.x * Jdx.x + dist_grad.y * Jdy.x, dist_grad.x * Jdx.y + dist_grad.y * Jdy.y);
+ afwidth = 0.64999997615814209 * length(grad);
+ float val = smoothstep(-afwidth, afwidth, distance);
+ outputCoverage_Stage0 = vec4(val);
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_dst_in(outputCoverage_Stage0, ClampedGradientEffect_Stage1_c0_c0(vec4(1.0)));
+ }
+ vec4 output_Stage2;
+ {
+ {
+ output_Stage2 = output_Stage1 * ucolor_Stage2;
+ }
+ }
+ {
+ blend_dst_in(output_Stage2, ClampedGradientEffect_Stage3_c1_c0(vec4(1.0)));
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform vec2 uAtlasDimensionsInv_Stage0;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in uvec2 inTextureCoords;
+out vec2 vTextureCoords_Stage0;
+flat out int vTexIndex_Stage0;
+out vec2 vIntTextureCoords_Stage0;
+out vec4 vinColor_Stage0;
+out vec2 vTransformedCoords_0_Stage0;
+out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ ivec2 signedCoords = ivec2(int(inTextureCoords.x), int(inTextureCoords.y));
+ vec2 unormTexCoords = vec2(float(signedCoords.x / 2), float(signedCoords.y / 2));
+ vTextureCoords_Stage0 = unormTexCoords * uAtlasDimensionsInv_Stage0;
+ vTexIndex_Stage0 = 0;
+ vIntTextureCoords_Stage0 = unormTexCoords;
+ vinColor_Stage0 = inColor;
+ vec3 pos3 = uViewM_Stage0 * vec3(inPosition, 1.0);
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos3.x, pos3.y, 0.0, pos3.z);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/472-4.shader_test b/shaders/skia/472-4.shader_test
new file mode 100644
index 0000000..df95b76
--- /dev/null
+++ b/shaders/skia/472-4.shader_test
@@ -0,0 +1,218 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage2_c0_c0;
+uniform float uSurfaceScale_Stage2_c0_c0;
+uniform vec3 uLightColor_Stage2_c0_c0;
+uniform float uKD_Stage2_c0_c0;
+uniform vec4 uTexDom_Stage2_c0_c0;
+uniform vec3 uDecalParams_Stage2_c0_c0;
+uniform vec3 uLightDirection_Stage2_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 light_Stage2_c0_c0(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ float colorScale = uKD_Stage2_c0_c0 * dot(normal, surfaceToLight);
+ return vec4(lightColor * clamp(colorScale, 0.0, 1.0), 1.0);
+}
+float sobel_Stage2_c0_c0(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage2_c0_c0(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage2_c0_c0(float m[9], float surfaceScale) {
+ return pointToNormal_Stage2_c0_c0(sobel_Stage2_c0_c0(m[0], m[2], m[3], m[5], m[6], m[8], 0.25), sobel_Stage2_c0_c0(m[0], m[6], m[1], m[7], m[2], m[8], 0.25), surfaceScale);
+}
+vec4 DiffuseLighting_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coord = vTransformedCoords_1_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c0_c0.y);
+ if (err > uDecalParams_Stage2_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp0 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c0_c0.y);
+ if (err > uDecalParams_Stage2_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c0_c0.y);
+ if (err > uDecalParams_Stage2_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c0_c0.y);
+ if (err > uDecalParams_Stage2_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c0_c0.y);
+ if (err > uDecalParams_Stage2_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c0_c0.y);
+ if (err > uDecalParams_Stage2_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp5 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c0_c0.y);
+ if (err > uDecalParams_Stage2_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp6 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c0_c0.y);
+ if (err > uDecalParams_Stage2_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp7 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c0_c0.y);
+ if (err > uDecalParams_Stage2_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp8 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = uLightDirection_Stage2_c0_c0;
+ _output = light_Stage2_c0_c0(normal_Stage2_c0_c0(m, uSurfaceScale_Stage2_c0_c0), surfaceToLight, uLightColor_Stage2_c0_c0);
+ _output *= _input;
+ return _output;
+}
+vec4 ClampFragmentProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = clamp(_input, 0.0, 1.0);
+ }
+ return _output;
+}
+vec4 blend_multiply(vec4 src, vec4 dst) {
+ return vec4(((1.0 - src.w) * dst.xyz + (1.0 - dst.w) * src.xyz) + src.xyz * dst.xyz, src.w + (1.0 - src.w) * dst.w);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ vec4 inputColor = vec4(output_Stage1.xyz, 1.0);
+ output_Stage2 = blend_multiply(DiffuseLighting_Stage2_c0_c0(inputColor), ClampFragmentProcessor_Stage2_c1_c0(inputColor));
+ output_Stage2 *= output_Stage1.w;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/472.shader_test b/shaders/skia/472.shader_test
new file mode 100644
index 0000000..0076020
--- /dev/null
+++ b/shaders/skia/472.shader_test
@@ -0,0 +1,157 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage2;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.w) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ } else {
+ {
+ if (t < uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+vec4 ComposeOne_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_dst_in(_input, TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0)));
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = ComposeOne_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+float _guarded_divide(float n, float d) {
+ return n / d;
+}
+float _color_burn_component(float sc, float sa, float dc, float da) {
+ if (da == dc) {
+ return (sa * da + sc * (1.0 - da)) + dc * (1.0 - sa);
+ } else if (sc == 0.0) {
+ return dc * (1.0 - sa);
+ }
+ float d = max(0.0, da - _guarded_divide((da - dc) * sa, sc));
+ return (d * sa + sc * (1.0 - da)) + dc * (1.0 - sa);
+}
+vec4 blend_color_burn(vec4 src, vec4 dst) {
+ return vec4(_color_burn_component(src.x, src.w, dst.x, dst.w), _color_burn_component(src.y, src.w, dst.y, dst.w), _color_burn_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_color_burn(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ {
+ output_Stage2 = output_Stage1 * ucolor_Stage2;
+ }
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 inColor;
+in vec2 inLocalCoord;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/475-2.shader_test b/shaders/skia/475-2.shader_test
new file mode 100644
index 0000000..ae8a27c
--- /dev/null
+++ b/shaders/skia/475-2.shader_test
@@ -0,0 +1,56 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uColor_Stage0;
+uniform float ucornerRadius_Stage1_c0_c0;
+uniform vec4 uproxyRect_Stage1_c0_c0;
+uniform float ublurRadius_Stage1_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+vec4 RRectBlurEffect_Stage1_c0_c0(vec4 _input, vec2 _coords) {
+ vec4 _output;
+ vec2 translatedFragPos = gl_FragCoord.xy - uproxyRect_Stage1_c0_c0.xy;
+ float threshold = ucornerRadius_Stage1_c0_c0 + 2.0 * ublurRadius_Stage1_c0_c0;
+ vec2 middle = (uproxyRect_Stage1_c0_c0.zw - uproxyRect_Stage1_c0_c0.xy) - 2.0 * threshold;
+ if (translatedFragPos.x >= threshold && translatedFragPos.x < middle.x + threshold) {
+ translatedFragPos.x = threshold;
+ } else if (translatedFragPos.x >= middle.x + threshold) {
+ translatedFragPos.x -= middle.x - 1.0;
+ }
+ if (translatedFragPos.y > threshold && translatedFragPos.y < middle.y + threshold) {
+ translatedFragPos.y = threshold;
+ } else if (translatedFragPos.y >= middle.y + threshold) {
+ translatedFragPos.y -= middle.y - 1.0;
+ }
+ vec2 proxyDims = vec2(2.0 * threshold + 1.0);
+ vec2 texCoord = translatedFragPos / proxyDims;
+ _output = _input * texture(uTextureSampler_0_Stage1, texCoord);
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = RRectBlurEffect_Stage1_c0_c0(vec4(1.0), gl_FragCoord.xy);
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 position;
+void main() {
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/475-4.shader_test b/shaders/skia/475-4.shader_test
new file mode 100644
index 0000000..553d6dc
--- /dev/null
+++ b/shaders/skia/475-4.shader_test
@@ -0,0 +1,82 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform mat4 um_Stage2_c0_c0;
+uniform vec4 uv_Stage2_c0_c0;
+uniform mat4 um_Stage2_c1_c0;
+uniform vec4 uv_Stage2_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 ColorMatrixFragmentProcessor_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = _input;
+ {
+ float nonZeroAlpha = max(inputColor.w, 9.9999997473787516e-05);
+ inputColor = vec4(inputColor.xyz / nonZeroAlpha, inputColor.w);
+ }
+ _output = um_Stage2_c0_c0 * inputColor + uv_Stage2_c0_c0;
+ {
+ _output.w = clamp(_output.w, 0.0, 1.0);
+ }
+ return _output;
+}
+vec4 ColorMatrixFragmentProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = _input;
+ _output = um_Stage2_c1_c0 * inputColor + uv_Stage2_c1_c0;
+ {
+ _output = clamp(_output, 0.0, 1.0);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+float _blend_overlay_component(float sc, float sa, float dc, float da) {
+ if (2.0 * dc <= da) {
+ return (2.0 * sc) * dc;
+ }
+ return sa * da - (2.0 * (da - dc)) * (sa - sc);
+}
+vec4 blend_overlay(vec4 src, vec4 dst) {
+ vec4 result = vec4(_blend_overlay_component(src.x, src.w, dst.x, dst.w), _blend_overlay_component(src.y, src.w, dst.y, dst.w), _blend_overlay_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+ result.xyz += dst.xyz * (1.0 - src.w) + src.xyz * (1.0 - dst.w);
+ return result;
+}
+vec4 blend_hard_light(vec4 src, vec4 dst) {
+ return blend_overlay(dst, src);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ vec4 inputColor = vec4(output_Stage1.xyz, 1.0);
+ output_Stage2 = blend_hard_light(ColorMatrixFragmentProcessor_Stage2_c0_c0(inputColor), ColorMatrixFragmentProcessor_Stage2_c1_c0(inputColor));
+ output_Stage2 *= output_Stage1.w;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/475.shader_test b/shaders/skia/475.shader_test
new file mode 100644
index 0000000..2f639ab
--- /dev/null
+++ b/shaders/skia/475.shader_test
@@ -0,0 +1,80 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 ucolor_Stage1_c0_c0_c0_c0;
+uniform vec4 ucolor_Stage2;
+noperspective in vec4 vcolor_Stage0;
+vec4 ConstColorProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = _input.w * ucolor_Stage1_c0_c0_c0_c0;
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = ConstColorProcessor_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+float _guarded_divide(float n, float d) {
+ return n / d;
+}
+float _color_burn_component(float sc, float sa, float dc, float da) {
+ if (da == dc) {
+ return (sa * da + sc * (1.0 - da)) + dc * (1.0 - sa);
+ } else if (sc == 0.0) {
+ return dc * (1.0 - sa);
+ }
+ float d = max(0.0, da - _guarded_divide((da - dc) * sa, sc));
+ return (d * sa + sc * (1.0 - da)) + dc * (1.0 - sa);
+}
+vec4 blend_color_burn(vec4 src, vec4 dst) {
+ return vec4(_color_burn_component(src.x, src.w, dst.x, dst.w), _color_burn_component(src.y, src.w, dst.y, dst.w), _color_burn_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_color_burn(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ {
+ output_Stage2 = output_Stage1 * ucolor_Stage2;
+ }
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 position;
+in vec4 inColor;
+noperspective out vec4 vcolor_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/478-2.shader_test b/shaders/skia/478-2.shader_test
new file mode 100644
index 0000000..1601305
--- /dev/null
+++ b/shaders/skia/478-2.shader_test
@@ -0,0 +1,161 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uColor_Stage0;
+uniform vec4 uCoordTransformMatrix_1_Stage0;
+uniform vec4 urectUniform_Stage3;
+uniform vec4 uleftBorderColor_Stage4_c1_c0;
+uniform vec4 urightBorderColor_Stage4_c1_c0;
+uniform float ubias_Stage4_c1_c0_c0_c0;
+uniform float uscale_Stage4_c1_c0_c0_c0;
+uniform vec4 uscale0_1_Stage4_c1_c0_c1_c0;
+uniform vec4 uscale2_3_Stage4_c1_c0_c1_c0;
+uniform vec4 uscale4_5_Stage4_c1_c0_c1_c0;
+uniform vec4 ubias0_1_Stage4_c1_c0_c1_c0;
+uniform vec4 ubias2_3_Stage4_c1_c0_c1_c0;
+uniform vec4 ubias4_5_Stage4_c1_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage4_c1_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage4_c1_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+vec4 TextureEffect_Stage1_c0_c0(vec4 _input, vec2 _coords) {
+ _coords = _coords * uCoordTransformMatrix_1_Stage0.xz + uCoordTransformMatrix_1_Stage0.yw;
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, _coords) * _input;
+ return _output;
+}
+vec4 SweepGradientLayout_Stage4_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float angle;
+ {
+ angle = atan(-vTransformedCoords_2_Stage0.y, -vTransformedCoords_2_Stage0.x);
+ }
+ float t = ((angle * 0.15915493667125702 + 0.5) + ubias_Stage4_c1_c0_c0_c0) * uscale_Stage4_c1_c0_c0_c0;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage4_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage4_c1_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage4_c1_c0_c1_c0.x) {
+ scale = uscale0_1_Stage4_c1_c0_c1_c0;
+ bias = ubias0_1_Stage4_c1_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage4_c1_c0_c1_c0;
+ bias = ubias2_3_Stage4_c1_c0_c1_c0;
+ }
+ } else {
+ {
+ scale = uscale4_5_Stage4_c1_c0_c1_c0;
+ bias = ubias4_5_Stage4_c1_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage4_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = SweepGradientLayout_Stage4_c1_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage4_c1_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage4_c1_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage4_c1_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = uColor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ float coord = vTransformedCoords_0_Stage0.x - 0.5;
+ float f = fract(coord);
+ coord += 0.5 - f;
+ float f2 = f * f;
+ vec4 w = mat4(0.055555555555555552, 0.88888888888888884, 0.055555555555555552, 0.0, -0.5, 0.0, 0.5, 0.0, 0.83333333333333337, -2.0, 1.5, -0.33333333333333331, -0.3888888888888889, 1.1666666666666667, -1.1666666666666667, 0.3888888888888889) * vec4(1.0, f, f2, f2 * f);
+ vec4 c[4];
+ c[0] = TextureEffect_Stage1_c0_c0(vec4(1.0), vec2(coord + -1.0, vTransformedCoords_0_Stage0.y));
+ c[1] = TextureEffect_Stage1_c0_c0(vec4(1.0), vec2(coord, vTransformedCoords_0_Stage0.y));
+ c[2] = TextureEffect_Stage1_c0_c0(vec4(1.0), vec2(coord + 1.0, vTransformedCoords_0_Stage0.y));
+ c[3] = TextureEffect_Stage1_c0_c0(vec4(1.0), vec2(coord + 2.0, vTransformedCoords_0_Stage0.y));
+ vec4 bicubicColor = ((c[0] * w.x + c[1] * w.y) + c[2] * w.z) + c[3] * w.w;
+ bicubicColor.xyz = max(vec3(0.0), min(bicubicColor.xyz, bicubicColor.www));
+ output_Stage1 = bicubicColor * outputColor_Stage0;
+ }
+ vec4 output_Stage2;
+ {
+ {
+ float alpha = clamp(1.0, 0.0, 1.0);
+ output_Stage2 = vec4(clamp(vec4(1.0).xyz, 0.0, alpha), alpha);
+ }
+ }
+ vec4 output_Stage3;
+ {
+ float alpha;
+ {
+ float xSub, ySub;
+ xSub = min(gl_FragCoord.x - urectUniform_Stage3.x, 0.0);
+ xSub += min(urectUniform_Stage3.z - gl_FragCoord.x, 0.0);
+ ySub = min(gl_FragCoord.y - urectUniform_Stage3.y, 0.0);
+ ySub += min(urectUniform_Stage3.w - gl_FragCoord.y, 0.0);
+ alpha = (1.0 + max(xSub, -1.0)) * (1.0 + max(ySub, -1.0));
+ }
+ output_Stage3 = output_Stage2 * alpha;
+ }
+ vec4 output_Stage4;
+ {
+ output_Stage4 = blend_dst_in(output_Stage3, ClampedGradientEffect_Stage4_c1_c0(vec4(1.0)));
+ }
+ vec4 output_Stage5;
+ {
+ output_Stage5 = floor(output_Stage4 * 255.0 + 0.5) / 255.0;
+ {
+ output_Stage5.xyz = floor((output_Stage5.xyz * output_Stage5.w) * 255.0 + 0.5) / 255.0;
+ }
+ }
+ {
+ sk_FragColor = output_Stage1 * output_Stage5;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+in vec2 inPosition;
+in vec2 inLocalCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+void main() {
+ vec2 pos2 = (uViewM_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/478-4.shader_test b/shaders/skia/478-4.shader_test
new file mode 100644
index 0000000..8ef9884
--- /dev/null
+++ b/shaders/skia/478-4.shader_test
@@ -0,0 +1,64 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform mat4 um_Stage2_c0_c0;
+uniform vec4 uv_Stage2_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 ColorMatrixFragmentProcessor_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = _input;
+ _output = um_Stage2_c0_c0 * inputColor + uv_Stage2_c0_c0;
+ {
+ _output = clamp(_output, 0.0, 1.0);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 ClampFragmentProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ float alpha = clamp(_input.w, 0.0, 1.0);
+ _output = vec4(clamp(_input.xyz, 0.0, alpha), alpha);
+ }
+ return _output;
+}
+vec4 blend_modulate(vec4 src, vec4 dst) {
+ return src * dst;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ vec4 inputColor = vec4(output_Stage1.xyz, 1.0);
+ output_Stage2 = blend_modulate(ColorMatrixFragmentProcessor_Stage2_c0_c0(inputColor), ClampFragmentProcessor_Stage2_c1_c0(inputColor));
+ output_Stage2 *= output_Stage1.w;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/478.shader_test b/shaders/skia/478.shader_test
new file mode 100644
index 0000000..40875e9
--- /dev/null
+++ b/shaders/skia/478.shader_test
@@ -0,0 +1,177 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage2;
+uniform vec4 ucolor_Stage3_c1_c0;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.w) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ } else {
+ {
+ if (t < uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+vec4 ComposeOne_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_dst_in(_input, TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0)));
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = ComposeOne_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 ConstColorProcessor_Stage3_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage3_c1_c0;
+ }
+ return _output;
+}
+float _guarded_divide(float n, float d) {
+ return n / d;
+}
+float _color_burn_component(float sc, float sa, float dc, float da) {
+ if (da == dc) {
+ return (sa * da + sc * (1.0 - da)) + dc * (1.0 - sa);
+ } else if (sc == 0.0) {
+ return dc * (1.0 - sa);
+ }
+ float d = max(0.0, da - _guarded_divide((da - dc) * sa, sc));
+ return (d * sa + sc * (1.0 - da)) + dc * (1.0 - sa);
+}
+vec4 blend_color_burn(vec4 src, vec4 dst) {
+ return vec4(_color_burn_component(src.x, src.w, dst.x, dst.w), _color_burn_component(src.y, src.w, dst.y, dst.w), _color_burn_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 blend_darken(vec4 src, vec4 dst) {
+ vec4 result = blend_src_over(src, dst);
+ result.xyz = min(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
+ return result;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_color_burn(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ {
+ output_Stage2 = output_Stage1 * ucolor_Stage2;
+ }
+ }
+ vec4 output_Stage3;
+ {
+ output_Stage3 = blend_darken(ConstColorProcessor_Stage3_c1_c0(vec4(1.0)), output_Stage2);
+ }
+ {
+ sk_FragColor = output_Stage3;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 inColor;
+in vec2 inLocalCoord;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/481-2.shader_test b/shaders/skia/481-2.shader_test
new file mode 100644
index 0000000..62a1205
--- /dev/null
+++ b/shaders/skia/481-2.shader_test
@@ -0,0 +1,112 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 ucolor0_Stage1;
+uniform vec4 ucolor1_Stage1;
+uniform vec4 ucolor2_Stage1;
+uniform vec4 ucolor3_Stage1;
+uniform vec4 ucolor4_Stage1;
+uniform vec4 ucolor5_Stage1;
+uniform vec4 urectUniform_Stage3;
+uniform vec2 ubaseFrequency_Stage4;
+uniform float uz_Stage4;
+uniform sampler2D uTextureSampler_0_Stage4;
+uniform sampler2D uTextureSampler_1_Stage4;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec3 fade_Stage4(vec3 t) {
+ return ((t * t) * t) * (t * (t * 6.0 - 15.0) + 10.0);
+}
+float perm_Stage4(float x) {
+ return texture(uTextureSampler_0_Stage4, vec2(fract(x / 256.0), 0.0)).x * 255.0;
+}
+float grad_Stage4(float x, vec3 p) {
+ return dot(texture(uTextureSampler_1_Stage4, vec2(fract(x / 16.0), 0.0)).xyz * 255.0 - vec3(1.0), p);
+}
+float lerp_Stage4(float a, float b, float w) {
+ return a + w * (b - a);
+}
+float noise_Stage4(vec3 p) {
+ vec3 P = mod(floor(p), 256.0);
+ p -= floor(p);
+ vec3 f = fade_Stage4(p);
+ float A = perm_Stage4(P.x) + P.y;
+ float AA = perm_Stage4(A) + P.z;
+ float AB = perm_Stage4(A + 1.0) + P.z;
+ float B = perm_Stage4(P.x + 1.0) + P.y;
+ float BA = perm_Stage4(B) + P.z;
+ float BB = perm_Stage4(B + 1.0) + P.z;
+ float result = lerp_Stage4(lerp_Stage4(lerp_Stage4(grad_Stage4(perm_Stage4(AA), p), grad_Stage4(perm_Stage4(BA), p + vec3(-1.0, 0.0, 0.0)), f.x), lerp_Stage4(grad_Stage4(perm_Stage4(AB), p + vec3(0.0, -1.0, 0.0)), grad_Stage4(perm_Stage4(BB), p + vec3(-1.0, -1.0, 0.0)), f.x), f.y), lerp_Stage4(lerp_Stage4(grad_Stage4(perm_Stage4(AA + 1.0), p + vec3(0.0, 0.0, -1.0)), grad_Stage4(perm_Stage4(BA + 1.0), p + vec3(-1.0, 0.0, -1.0)), f.x), lerp_Stage4(grad_Stage4(perm_Stage4(AB + 1.0), p + vec3(0.0, -1.0, -1.0)), grad_Stage4(perm_Stage4(BB + 1.0), p + vec3(-1.0, -1.0, -1.0)), f.x), f.y), f.z);
+ return result;
+}
+float noiseOctaves_Stage4(vec3 p) {
+ float result = 0.0;
+ float ratio = 1.0;
+ for (float i = 0.0;i < 3.0; i++) {
+ result += noise_Stage4(p) / ratio;
+ p *= 2.0;
+ ratio *= 2.0;
+ }
+ return (result + 1.0) / 2.0;
+}
+void main() {
+ {
+ float alpha;
+ {
+ float xSub, ySub;
+ xSub = min(gl_FragCoord.x - urectUniform_Stage3.x, 0.0);
+ xSub += min(urectUniform_Stage3.z - gl_FragCoord.x, 0.0);
+ ySub = min(gl_FragCoord.y - urectUniform_Stage3.y, 0.0);
+ ySub += min(urectUniform_Stage3.w - gl_FragCoord.y, 0.0);
+ alpha = (1.0 + max(xSub, -1.0)) * (1.0 + max(ySub, -1.0));
+ }
+ {
+ alpha = 1.0 - alpha;
+ }
+ }
+ vec4 output_Stage4;
+ {
+ vec2 coords = vTransformedCoords_1_Stage0 * ubaseFrequency_Stage4;
+ float r = noiseOctaves_Stage4(vec3(coords, uz_Stage4));
+ float g = noiseOctaves_Stage4(vec3(coords, uz_Stage4));
+ float b = noiseOctaves_Stage4(vec3(coords, uz_Stage4));
+ float a = noiseOctaves_Stage4(vec3(coords, uz_Stage4));
+ output_Stage4 = vec4(r, g, b, a);
+ output_Stage4 = clamp(output_Stage4, 0.0, 1.0);
+ output_Stage4 = vec4(output_Stage4.xyz * output_Stage4.www, output_Stage4.w);
+ }
+ {
+ sk_FragColor = 1.0 - output_Stage4;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec2 inLocalCoord;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vec4 color = inColor;
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/481-4.shader_test b/shaders/skia/481-4.shader_test
new file mode 100644
index 0000000..ffc274d
--- /dev/null
+++ b/shaders/skia/481-4.shader_test
@@ -0,0 +1,65 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform mat4 um_Stage2_c0_c0;
+uniform vec4 uv_Stage2_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 ColorMatrixFragmentProcessor_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = _input;
+ {
+ float nonZeroAlpha = max(inputColor.w, 9.9999997473787516e-05);
+ inputColor = vec4(inputColor.xyz / nonZeroAlpha, inputColor.w);
+ }
+ _output = um_Stage2_c0_c0 * inputColor + uv_Stage2_c0_c0;
+ {
+ _output.w = clamp(_output.w, 0.0, 1.0);
+ }
+ return _output;
+}
+vec4 ClampFragmentProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ float alpha = clamp(_input.w, 0.0, 1.0);
+ _output = vec4(clamp(_input.xyz, 0.0, alpha), alpha);
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ vec4 inputColor = vec4(output_Stage1.xyz, 1.0);
+ output_Stage2 = blend_src_in(ColorMatrixFragmentProcessor_Stage2_c0_c0(inputColor), ClampFragmentProcessor_Stage2_c1_c0(inputColor));
+ output_Stage2 *= output_Stage1.w;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/481.shader_test b/shaders/skia/481.shader_test
new file mode 100644
index 0000000..d53e646
--- /dev/null
+++ b/shaders/skia/481.shader_test
@@ -0,0 +1,100 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 ucolor_Stage1_c0_c0_c0_c0;
+uniform vec4 ucolor_Stage2;
+uniform vec4 ucolor_Stage3_c1_c0;
+noperspective in vec4 vcolor_Stage0;
+vec4 ConstColorProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = _input.w * ucolor_Stage1_c0_c0_c0_c0;
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = ConstColorProcessor_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 ConstColorProcessor_Stage3_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage3_c1_c0;
+ }
+ return _output;
+}
+float _guarded_divide(float n, float d) {
+ return n / d;
+}
+float _color_burn_component(float sc, float sa, float dc, float da) {
+ if (da == dc) {
+ return (sa * da + sc * (1.0 - da)) + dc * (1.0 - sa);
+ } else if (sc == 0.0) {
+ return dc * (1.0 - sa);
+ }
+ float d = max(0.0, da - _guarded_divide((da - dc) * sa, sc));
+ return (d * sa + sc * (1.0 - da)) + dc * (1.0 - sa);
+}
+vec4 blend_color_burn(vec4 src, vec4 dst) {
+ return vec4(_color_burn_component(src.x, src.w, dst.x, dst.w), _color_burn_component(src.y, src.w, dst.y, dst.w), _color_burn_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 blend_darken(vec4 src, vec4 dst) {
+ vec4 result = blend_src_over(src, dst);
+ result.xyz = min(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
+ return result;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_color_burn(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ {
+ output_Stage2 = output_Stage1 * ucolor_Stage2;
+ }
+ }
+ vec4 output_Stage3;
+ {
+ output_Stage3 = blend_darken(ConstColorProcessor_Stage3_c1_c0(vec4(1.0)), output_Stage2);
+ }
+ {
+ sk_FragColor = output_Stage3;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 position;
+in vec4 inColor;
+noperspective out vec4 vcolor_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/484-2.shader_test b/shaders/skia/484-2.shader_test
new file mode 100644
index 0000000..1762c15
--- /dev/null
+++ b/shaders/skia/484-2.shader_test
@@ -0,0 +1,459 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_KHR_blend_equation_advanced : require
+out vec4 sk_FragColor;
+layout (blend_support_all_equations) out ;
+uniform vec2 uImageIncrement_Stage1_c0_c0_c0_c0;
+uniform vec2 uBounds_Stage1_c0_c0_c0_c0;
+uniform vec4 uKernel_Stage1_c0_c0_c0_c0[6];
+uniform vec4 uellipse_Stage1_c0_c0_c1_c0_c1_c0;
+uniform vec4 uinnerRect_Stage1_c1_c0_c0_c0;
+uniform vec2 uradiusPlusHalf_Stage1_c1_c0_c0_c0;
+uniform vec2 uImageIncrement_Stage1_c1_c0_c1_c0;
+uniform float uSurfaceScale_Stage1_c1_c0_c1_c0;
+uniform vec3 uLightColor_Stage1_c1_c0_c1_c0;
+uniform float uKD_Stage1_c1_c0_c1_c0;
+uniform vec4 uTexDom_Stage1_c1_c0_c1_c0;
+uniform vec3 uDecalParams_Stage1_c1_c0_c1_c0;
+uniform vec3 uLightLocation_Stage1_c1_c0_c1_c0;
+uniform float uExponent_Stage1_c1_c0_c1_c0;
+uniform float uCosInnerConeAngle_Stage1_c1_c0_c1_c0;
+uniform float uCosOuterConeAngle_Stage1_c1_c0_c1_c0;
+uniform float uConeScale_Stage1_c1_c0_c1_c0;
+uniform vec3 uS_Stage1_c1_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+noperspective in vec4 vinCircleEdge_Stage0;
+noperspective in vec4 vinColor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 GaussianConvolution_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0 - 10.0 * uImageIncrement_Stage1_c0_c0_c0_c0;
+ vec2 coordSampled = vec2(0.0, 0.0);
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1_c0_c0_c0_c0.x, uBounds_Stage1_c0_c0_c0_c0.y - uBounds_Stage1_c0_c0_c0_c0.x) + uBounds_Stage1_c0_c0_c0_c0.x;
+ _output += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c0_c0[0].x;
+ coord += uImageIncrement_Stage1_c0_c0_c0_c0;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1_c0_c0_c0_c0.x, uBounds_Stage1_c0_c0_c0_c0.y - uBounds_Stage1_c0_c0_c0_c0.x) + uBounds_Stage1_c0_c0_c0_c0.x;
+ _output += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c0_c0[0].y;
+ coord += uImageIncrement_Stage1_c0_c0_c0_c0;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1_c0_c0_c0_c0.x, uBounds_Stage1_c0_c0_c0_c0.y - uBounds_Stage1_c0_c0_c0_c0.x) + uBounds_Stage1_c0_c0_c0_c0.x;
+ _output += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c0_c0[0].z;
+ coord += uImageIncrement_Stage1_c0_c0_c0_c0;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1_c0_c0_c0_c0.x, uBounds_Stage1_c0_c0_c0_c0.y - uBounds_Stage1_c0_c0_c0_c0.x) + uBounds_Stage1_c0_c0_c0_c0.x;
+ _output += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c0_c0[0].w;
+ coord += uImageIncrement_Stage1_c0_c0_c0_c0;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1_c0_c0_c0_c0.x, uBounds_Stage1_c0_c0_c0_c0.y - uBounds_Stage1_c0_c0_c0_c0.x) + uBounds_Stage1_c0_c0_c0_c0.x;
+ _output += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c0_c0[1].x;
+ coord += uImageIncrement_Stage1_c0_c0_c0_c0;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1_c0_c0_c0_c0.x, uBounds_Stage1_c0_c0_c0_c0.y - uBounds_Stage1_c0_c0_c0_c0.x) + uBounds_Stage1_c0_c0_c0_c0.x;
+ _output += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c0_c0[1].y;
+ coord += uImageIncrement_Stage1_c0_c0_c0_c0;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1_c0_c0_c0_c0.x, uBounds_Stage1_c0_c0_c0_c0.y - uBounds_Stage1_c0_c0_c0_c0.x) + uBounds_Stage1_c0_c0_c0_c0.x;
+ _output += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c0_c0[1].z;
+ coord += uImageIncrement_Stage1_c0_c0_c0_c0;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1_c0_c0_c0_c0.x, uBounds_Stage1_c0_c0_c0_c0.y - uBounds_Stage1_c0_c0_c0_c0.x) + uBounds_Stage1_c0_c0_c0_c0.x;
+ _output += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c0_c0[1].w;
+ coord += uImageIncrement_Stage1_c0_c0_c0_c0;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1_c0_c0_c0_c0.x, uBounds_Stage1_c0_c0_c0_c0.y - uBounds_Stage1_c0_c0_c0_c0.x) + uBounds_Stage1_c0_c0_c0_c0.x;
+ _output += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c0_c0[2].x;
+ coord += uImageIncrement_Stage1_c0_c0_c0_c0;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1_c0_c0_c0_c0.x, uBounds_Stage1_c0_c0_c0_c0.y - uBounds_Stage1_c0_c0_c0_c0.x) + uBounds_Stage1_c0_c0_c0_c0.x;
+ _output += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c0_c0[2].y;
+ coord += uImageIncrement_Stage1_c0_c0_c0_c0;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1_c0_c0_c0_c0.x, uBounds_Stage1_c0_c0_c0_c0.y - uBounds_Stage1_c0_c0_c0_c0.x) + uBounds_Stage1_c0_c0_c0_c0.x;
+ _output += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c0_c0[2].z;
+ coord += uImageIncrement_Stage1_c0_c0_c0_c0;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1_c0_c0_c0_c0.x, uBounds_Stage1_c0_c0_c0_c0.y - uBounds_Stage1_c0_c0_c0_c0.x) + uBounds_Stage1_c0_c0_c0_c0.x;
+ _output += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c0_c0[2].w;
+ coord += uImageIncrement_Stage1_c0_c0_c0_c0;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1_c0_c0_c0_c0.x, uBounds_Stage1_c0_c0_c0_c0.y - uBounds_Stage1_c0_c0_c0_c0.x) + uBounds_Stage1_c0_c0_c0_c0.x;
+ _output += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c0_c0[3].x;
+ coord += uImageIncrement_Stage1_c0_c0_c0_c0;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1_c0_c0_c0_c0.x, uBounds_Stage1_c0_c0_c0_c0.y - uBounds_Stage1_c0_c0_c0_c0.x) + uBounds_Stage1_c0_c0_c0_c0.x;
+ _output += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c0_c0[3].y;
+ coord += uImageIncrement_Stage1_c0_c0_c0_c0;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1_c0_c0_c0_c0.x, uBounds_Stage1_c0_c0_c0_c0.y - uBounds_Stage1_c0_c0_c0_c0.x) + uBounds_Stage1_c0_c0_c0_c0.x;
+ _output += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c0_c0[3].z;
+ coord += uImageIncrement_Stage1_c0_c0_c0_c0;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1_c0_c0_c0_c0.x, uBounds_Stage1_c0_c0_c0_c0.y - uBounds_Stage1_c0_c0_c0_c0.x) + uBounds_Stage1_c0_c0_c0_c0.x;
+ _output += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c0_c0[3].w;
+ coord += uImageIncrement_Stage1_c0_c0_c0_c0;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1_c0_c0_c0_c0.x, uBounds_Stage1_c0_c0_c0_c0.y - uBounds_Stage1_c0_c0_c0_c0.x) + uBounds_Stage1_c0_c0_c0_c0.x;
+ _output += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c0_c0[4].x;
+ coord += uImageIncrement_Stage1_c0_c0_c0_c0;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1_c0_c0_c0_c0.x, uBounds_Stage1_c0_c0_c0_c0.y - uBounds_Stage1_c0_c0_c0_c0.x) + uBounds_Stage1_c0_c0_c0_c0.x;
+ _output += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c0_c0[4].y;
+ coord += uImageIncrement_Stage1_c0_c0_c0_c0;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1_c0_c0_c0_c0.x, uBounds_Stage1_c0_c0_c0_c0.y - uBounds_Stage1_c0_c0_c0_c0.x) + uBounds_Stage1_c0_c0_c0_c0.x;
+ _output += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c0_c0[4].z;
+ coord += uImageIncrement_Stage1_c0_c0_c0_c0;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1_c0_c0_c0_c0.x, uBounds_Stage1_c0_c0_c0_c0.y - uBounds_Stage1_c0_c0_c0_c0.x) + uBounds_Stage1_c0_c0_c0_c0.x;
+ _output += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c0_c0[4].w;
+ coord += uImageIncrement_Stage1_c0_c0_c0_c0;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage1_c0_c0_c0_c0.x, uBounds_Stage1_c0_c0_c0_c0.y - uBounds_Stage1_c0_c0_c0_c0.x) + uBounds_Stage1_c0_c0_c0_c0.x;
+ _output += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c0_c0[5].x;
+ coord += uImageIncrement_Stage1_c0_c0_c0_c0;
+ _output *= _input;
+ return _output;
+}
+vec4 Big_Ole_Key_Stage1_c0_c0_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = _input;
+ return _output;
+}
+vec4 EllipseEffect_Stage1_c0_c0_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 d = gl_FragCoord.xy - uellipse_Stage1_c0_c0_c1_c0_c1_c0.xy;
+ vec2 Z = d * uellipse_Stage1_c0_c0_c1_c0_c1_c0.zw;
+ float implicit = dot(Z, d) - 1.0;
+ float grad_dot = 4.0 * dot(Z, Z);
+ {
+ grad_dot = max(grad_dot, 1.1754999560161448e-38);
+ }
+ float approx_dist = implicit * inversesqrt(grad_dot);
+ float alpha;
+ {
+ alpha = approx_dist > 0.0 ? 1.0 : 0.0;
+ }
+ _output = _input * alpha;
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+vec4 ComposeTwo_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_dst_in(Big_Ole_Key_Stage1_c0_c0_c1_c0_c0_c0(inputColor), EllipseEffect_Stage1_c0_c0_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+float _blend_color_saturation(vec3 color) {
+ return max(max(color.x, color.y), color.z) - min(min(color.x, color.y), color.z);
+}
+vec3 _blend_set_color_saturation_helper(vec3 minMidMax, float sat) {
+ if (minMidMax.x < minMidMax.z) {
+ return vec3(0.0, (sat * (minMidMax.y - minMidMax.x)) / (minMidMax.z - minMidMax.x), sat);
+ }
+ return vec3(0.0);
+}
+vec3 _blend_set_color_saturation(vec3 hueLumColor, vec3 satColor) {
+ float sat = _blend_color_saturation(satColor);
+ if (hueLumColor.x <= hueLumColor.y) {
+ if (hueLumColor.y <= hueLumColor.z) {
+ hueLumColor.xyz = _blend_set_color_saturation_helper(hueLumColor, sat);
+ } else if (hueLumColor.x <= hueLumColor.z) {
+ hueLumColor.xzy = _blend_set_color_saturation_helper(hueLumColor.xzy, sat);
+ } else {
+ hueLumColor.zxy = _blend_set_color_saturation_helper(hueLumColor.zxy, sat);
+ }
+ } else if (hueLumColor.x <= hueLumColor.z) {
+ hueLumColor.yxz = _blend_set_color_saturation_helper(hueLumColor.yxz, sat);
+ } else if (hueLumColor.y <= hueLumColor.z) {
+ hueLumColor.yzx = _blend_set_color_saturation_helper(hueLumColor.yzx, sat);
+ } else {
+ hueLumColor.zyx = _blend_set_color_saturation_helper(hueLumColor.zyx, sat);
+ }
+ return hueLumColor;
+}
+float _blend_color_luminance(vec3 color) {
+ return dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), color);
+}
+vec3 _blend_set_color_luminance(vec3 hueSatColor, float alpha, vec3 lumColor) {
+ float lum = _blend_color_luminance(lumColor);
+ vec3 result = (lum - _blend_color_luminance(hueSatColor)) + hueSatColor;
+ float minComp = min(min(result.x, result.y), result.z);
+ float maxComp = max(max(result.x, result.y), result.z);
+ if (minComp < 0.0 && lum != minComp) {
+ result = lum + ((result - lum) * lum) / (lum - minComp);
+ }
+ if (maxComp > alpha && maxComp != lum) {
+ return lum + ((result - lum) * (alpha - lum)) / (maxComp - lum);
+ }
+ return result;
+}
+vec4 blend_saturation(vec4 src, vec4 dst) {
+ float alpha = dst.w * src.w;
+ vec3 sda = src.xyz * dst.w;
+ vec3 dsa = dst.xyz * src.w;
+ return vec4((((_blend_set_color_luminance(_blend_set_color_saturation(dsa, sda), alpha, dsa) + dst.xyz) - dsa) + src.xyz) - sda, (src.w + dst.w) - alpha);
+}
+vec4 ComposeTwo_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_saturation(GaussianConvolution_Stage1_c0_c0_c0_c0(inputColor), ComposeTwo_Stage1_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 CircularRRect_Stage1_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 dxy0 = uinnerRect_Stage1_c1_c0_c0_c0.xy - gl_FragCoord.xy;
+ vec2 dxy1 = gl_FragCoord.xy - uinnerRect_Stage1_c1_c0_c0_c0.zw;
+ vec2 dxy = max(max(dxy0, dxy1), 0.0);
+ float alpha = clamp(uradiusPlusHalf_Stage1_c1_c0_c0_c0.x - length(dxy), 0.0, 1.0);
+ _output = _input * alpha;
+ return _output;
+}
+vec4 light_Stage1_c1_c0_c1_c0(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ float colorScale = uKD_Stage1_c1_c0_c1_c0 * dot(normal, surfaceToLight);
+ return vec4(lightColor * clamp(colorScale, 0.0, 1.0), 1.0);
+}
+float sobel_Stage1_c1_c0_c1_c0(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage1_c1_c0_c1_c0(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage1_c1_c0_c1_c0(float m[9], float surfaceScale) {
+ return pointToNormal_Stage1_c1_c0_c1_c0(sobel_Stage1_c1_c0_c1_c0(0.0, 0.0, m[3], m[4], m[6], m[7], 0.66666698455810547), sobel_Stage1_c1_c0_c1_c0(m[3], m[6], m[4], m[7], 0.0, 0.0, 0.66666698455810547), surfaceScale);
+}
+vec3 lightColor_Stage1_c1_c0_c1_c0(vec3 surfaceToLight) {
+ float cosAngle = -dot(surfaceToLight, uS_Stage1_c1_c0_c1_c0);
+ if (cosAngle < uCosOuterConeAngle_Stage1_c1_c0_c1_c0) {
+ return vec3(0.0);
+ }
+ float scale = pow(cosAngle, uExponent_Stage1_c1_c0_c1_c0);
+ if (cosAngle < uCosInnerConeAngle_Stage1_c1_c0_c1_c0) {
+ return ((uLightColor_Stage1_c1_c0_c1_c0 * scale) * (cosAngle - uCosOuterConeAngle_Stage1_c1_c0_c1_c0)) * uConeScale_Stage1_c1_c0_c1_c0;
+ }
+ return uLightColor_Stage1_c1_c0_c1_c0;
+}
+vec4 DiffuseLighting_Stage1_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coord = vTransformedCoords_1_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage1_c1_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c1_c0.xy, uTexDom_Stage1_c1_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp0 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1_c1_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c1_c0.xy, uTexDom_Stage1_c1_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1_c1_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c1_c0.xy, uTexDom_Stage1_c1_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage1_c1_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c1_c0.xy, uTexDom_Stage1_c1_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c1_c0.xy, uTexDom_Stage1_c1_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1_c1_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c1_c0.xy, uTexDom_Stage1_c1_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp5 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage1_c1_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c1_c0.xy, uTexDom_Stage1_c1_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp6 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage1_c1_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c1_c0.xy, uTexDom_Stage1_c1_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp7 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage1_c1_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c1_c0.xy, uTexDom_Stage1_c1_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp8 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = normalize(uLightLocation_Stage1_c1_c0_c1_c0 - vec3(gl_FragCoord.xy, uSurfaceScale_Stage1_c1_c0_c1_c0 * m[4]));
+ _output = light_Stage1_c1_c0_c1_c0(normal_Stage1_c1_c0_c1_c0(m, uSurfaceScale_Stage1_c1_c0_c1_c0), surfaceToLight, lightColor_Stage1_c1_c0_c1_c0(surfaceToLight));
+ _output *= _input;
+ return _output;
+}
+vec4 blend_multiply(vec4 src, vec4 dst) {
+ return vec4(((1.0 - src.w) * dst.xyz + (1.0 - dst.w) * src.xyz) + src.xyz * dst.xyz, src.w + (1.0 - src.w) * dst.w);
+}
+vec4 ComposeTwo_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_multiply(CircularRRect_Stage1_c1_c0_c0_c0(inputColor), DiffuseLighting_Stage1_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 blend_luminosity(vec4 src, vec4 dst) {
+ float alpha = dst.w * src.w;
+ vec3 sda = src.xyz * dst.w;
+ vec3 dsa = dst.xyz * src.w;
+ return vec4((((_blend_set_color_luminance(dsa, alpha, sda) + dst.xyz) - dsa) + src.xyz) - sda, (src.w + dst.w) - alpha);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ vec4 circleEdge;
+ circleEdge = vinCircleEdge_Stage0;
+ outputColor_Stage0 = vinColor_Stage0;
+ float d = length(circleEdge.xy);
+ float distanceToOuterEdge = circleEdge.z * (1.0 - d);
+ float edgeAlpha = clamp(distanceToOuterEdge, 0.0, 1.0);
+ float distanceToInnerEdge = circleEdge.z * (d - circleEdge.w);
+ float innerAlpha = clamp(distanceToInnerEdge, 0.0, 1.0);
+ edgeAlpha *= innerAlpha;
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_luminosity(ComposeTwo_Stage1_c0_c0(inputColor), ComposeTwo_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ sk_FragColor = outputCoverage_Stage0 * output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec4 inCircleEdge;
+noperspective out vec4 vinCircleEdge_Stage0;
+noperspective out vec4 vinColor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vinCircleEdge_Stage0 = inCircleEdge;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/484-4.shader_test b/shaders/skia/484-4.shader_test
new file mode 100644
index 0000000..5e15962
--- /dev/null
+++ b/shaders/skia/484-4.shader_test
@@ -0,0 +1,63 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 ucircle_Stage2_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 CircleEffect_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ float d;
+ {
+ d = (length((ucircle_Stage2_c0_c0.xy - gl_FragCoord.xy) * ucircle_Stage2_c0_c0.w) - 1.0) * ucircle_Stage2_c0_c0.z;
+ }
+ {
+ _output = _input * clamp(d, 0.0, 1.0);
+ }
+ return _output;
+}
+vec4 ClampFragmentProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = clamp(_input, 0.0, 1.0);
+ }
+ return _output;
+}
+vec4 blend_dst_over(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src + dst;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ vec4 inputColor = vec4(output_Stage1.xyz, 1.0);
+ output_Stage2 = blend_dst_over(CircleEffect_Stage2_c0_c0(inputColor), ClampFragmentProcessor_Stage2_c1_c0(inputColor));
+ output_Stage2 *= output_Stage1.w;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/484.shader_test b/shaders/skia/484.shader_test
new file mode 100644
index 0000000..e2d7123
--- /dev/null
+++ b/shaders/skia/484.shader_test
@@ -0,0 +1,143 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.w) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ } else {
+ {
+ if (t < uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = OverrideInputFragmentProcessor_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+float _blend_overlay_component(float sc, float sa, float dc, float da) {
+ if (2.0 * dc <= da) {
+ return (2.0 * sc) * dc;
+ }
+ return sa * da - (2.0 * (da - dc)) * (sa - sc);
+}
+vec4 blend_overlay(vec4 src, vec4 dst) {
+ vec4 result = vec4(_blend_overlay_component(src.x, src.w, dst.x, dst.w), _blend_overlay_component(src.y, src.w, dst.y, dst.w), _blend_overlay_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+ result.xyz += dst.xyz * (1.0 - src.w) + src.xyz * (1.0 - dst.w);
+ return result;
+}
+vec4 blend_hard_light(vec4 src, vec4 dst) {
+ return blend_overlay(dst, src);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_hard_light(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 inColor;
+in vec2 inLocalCoord;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/487-2.shader_test b/shaders/skia/487-2.shader_test
new file mode 100644
index 0000000..6b0b34a
--- /dev/null
+++ b/shaders/skia/487-2.shader_test
@@ -0,0 +1,300 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_KHR_blend_equation_advanced : require
+out vec4 sk_FragColor;
+layout (blend_support_all_equations) out ;
+uniform vec4 uColor_Stage0;
+uniform vec4 ucircle_Stage1;
+uniform vec2 uImageIncrement_Stage2;
+uniform vec4 uKernel_Stage2[2];
+uniform vec2 uKernelOffset_Stage2;
+uniform float uGain_Stage2;
+uniform float uBias_Stage2;
+uniform vec4 uTexDom_Stage2;
+uniform vec3 uDecalParams_Stage2;
+uniform vec4 uscale0_1_Stage3_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage3_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage3_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage3_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage3_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage3_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage3_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage3_c0_c0_c1_c0;
+uniform vec4 urectH_Stage6;
+uniform float uinvSixSigma_Stage6;
+uniform sampler2D uTextureSampler_0_Stage2;
+uniform sampler2D uTextureSampler_0_Stage5;
+uniform sampler2D uTextureSampler_0_Stage6;
+in vec2 vTransformedCoords_0_Stage0;
+in vec2 vTransformedCoords_1_Stage0;
+in vec2 vTransformedCoords_2_Stage0;
+vec4 RadialGradientLayout_Stage3_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = length(vTransformedCoords_1_Stage0);
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage3_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage3_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage3_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage3_c0_c0_c1_c0;
+ bias = ubias0_1_Stage3_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage3_c0_c0_c1_c0;
+ bias = ubias2_3_Stage3_c0_c0_c1_c0;
+ }
+ } else {
+ {
+ scale = uscale4_5_Stage3_c0_c0_c1_c0;
+ bias = ubias4_5_Stage3_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage3_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = RadialGradientLayout_Stage3_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ t.x = fract(t.x);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage3_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 TextureEffect_Stage5_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage5, vTransformedCoords_2_Stage0) * _input;
+ return _output;
+}
+vec4 ClampFragmentProcessor_Stage5_c2_c0(vec4 _input) {
+ vec4 _output;
+ {
+ float alpha = clamp(_input.w, 0.0, 1.0);
+ _output = vec4(clamp(_input.xyz, 0.0, alpha), alpha);
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+vec4 blend_xor(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src + (1.0 - src.w) * dst;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = uColor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ float d;
+ {
+ d = (length((ucircle_Stage1.xy - gl_FragCoord.xy) * ucircle_Stage1.w) - 1.0) * ucircle_Stage1.z;
+ }
+ {
+ output_Stage1 = d > 0.5 ? vec4(1.0) : vec4(0.0);
+ }
+ }
+ vec4 output_Stage2;
+ {
+ vec4 sum = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0 - uKernelOffset_Stage2 * uImageIncrement_Stage2;
+ vec4 c;
+ {
+ float k = uKernel_Stage2[0].x;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[0].y;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[0].z;
+ {
+ vec2 origCoord = coord + vec2(2.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[0].w;
+ {
+ vec2 origCoord = coord + vec2(3.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[1].x;
+ {
+ vec2 origCoord = coord + vec2(4.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[1].y;
+ {
+ vec2 origCoord = coord + vec2(5.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[1].z;
+ {
+ vec2 origCoord = coord + vec2(6.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ output_Stage2 = sum * uGain_Stage2 + uBias_Stage2;
+ output_Stage2.w = clamp(output_Stage2.w, 0.0, 1.0);
+ output_Stage2.xyz = clamp(output_Stage2.xyz, 0.0, output_Stage2.w);
+ output_Stage2 *= output_Stage1;
+ }
+ vec4 output_Stage3;
+ {
+ output_Stage3 = blend_dst_in(output_Stage2, TiledGradientEffect_Stage3_c0_c0(vec4(1.0)));
+ }
+ vec4 output_Stage4;
+ {
+ {
+ output_Stage4 = clamp(output_Stage3, 0.0, 1.0);
+ }
+ }
+ vec4 output_Stage5;
+ {
+ vec4 inputColor = vec4(output_Stage4.xyz, 1.0);
+ output_Stage5 = blend_xor(TextureEffect_Stage5_c1_c0(inputColor), ClampFragmentProcessor_Stage5_c2_c0(inputColor));
+ output_Stage5 *= output_Stage4.w;
+ }
+ vec4 output_Stage6;
+ {
+ float xCoverage, yCoverage;
+ {
+ float x, y;
+ {
+ x = max(urectH_Stage6.x - gl_FragCoord.x, gl_FragCoord.x - urectH_Stage6.z);
+ y = max(urectH_Stage6.y - gl_FragCoord.y, gl_FragCoord.y - urectH_Stage6.w);
+ }
+ xCoverage = texture(uTextureSampler_0_Stage6, vec2(x * uinvSixSigma_Stage6, 0.5)).w;
+ yCoverage = texture(uTextureSampler_0_Stage6, vec2(y * uinvSixSigma_Stage6, 0.5)).w;
+ output_Stage6 = (output_Stage5 * xCoverage) * yCoverage;
+ }
+ output_Stage6 = (output_Stage5 * xCoverage) * yCoverage;
+ }
+ {
+ sk_FragColor = output_Stage6 * outputColor_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+in vec2 inPosition;
+out vec2 vTransformedCoords_0_Stage0;
+out vec2 vTransformedCoords_1_Stage0;
+out vec2 vTransformedCoords_2_Stage0;
+void main() {
+ vec3 pos3 = uViewM_Stage0 * vec3(inPosition, 1.0);
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos3.x, pos3.y, 0.0, pos3.z);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/487-4.shader_test b/shaders/skia/487-4.shader_test
new file mode 100644
index 0000000..6b61af8
--- /dev/null
+++ b/shaders/skia/487-4.shader_test
@@ -0,0 +1,105 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 ubaseFrequency_Stage2_c1_c0;
+uniform float uz_Stage2_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+uniform sampler2D uTextureSampler_1_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 ClampFragmentProcessor_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ float alpha = clamp(_input.w, 0.0, 1.0);
+ _output = vec4(clamp(_input.xyz, 0.0, alpha), alpha);
+ }
+ return _output;
+}
+vec3 fade_Stage2_c1_c0(vec3 t) {
+ return ((t * t) * t) * (t * (t * 6.0 - 15.0) + 10.0);
+}
+float perm_Stage2_c1_c0(float x) {
+ return texture(uTextureSampler_0_Stage2, vec2(fract(x / 256.0), 0.0)).x * 255.0;
+}
+float grad_Stage2_c1_c0(float x, vec3 p) {
+ return dot(texture(uTextureSampler_1_Stage2, vec2(fract(x / 16.0), 0.0)).xyz * 255.0 - vec3(1.0), p);
+}
+float lerp_Stage2_c1_c0(float a, float b, float w) {
+ return a + w * (b - a);
+}
+float noise_Stage2_c1_c0(vec3 p) {
+ vec3 P = mod(floor(p), 256.0);
+ p -= floor(p);
+ vec3 f = fade_Stage2_c1_c0(p);
+ float A = perm_Stage2_c1_c0(P.x) + P.y;
+ float AA = perm_Stage2_c1_c0(A) + P.z;
+ float AB = perm_Stage2_c1_c0(A + 1.0) + P.z;
+ float B = perm_Stage2_c1_c0(P.x + 1.0) + P.y;
+ float BA = perm_Stage2_c1_c0(B) + P.z;
+ float BB = perm_Stage2_c1_c0(B + 1.0) + P.z;
+ float result = lerp_Stage2_c1_c0(lerp_Stage2_c1_c0(lerp_Stage2_c1_c0(grad_Stage2_c1_c0(perm_Stage2_c1_c0(AA), p), grad_Stage2_c1_c0(perm_Stage2_c1_c0(BA), p + vec3(-1.0, 0.0, 0.0)), f.x), lerp_Stage2_c1_c0(grad_Stage2_c1_c0(perm_Stage2_c1_c0(AB), p + vec3(0.0, -1.0, 0.0)), grad_Stage2_c1_c0(perm_Stage2_c1_c0(BB), p + vec3(-1.0, -1.0, 0.0)), f.x), f.y), lerp_Stage2_c1_c0(lerp_Stage2_c1_c0(grad_Stage2_c1_c0(perm_Stage2_c1_c0(AA + 1.0), p + vec3(0.0, 0.0, -1.0)), grad_Stage2_c1_c0(perm_Stage2_c1_c0(BA + 1.0), p + vec3(-1.0, 0.0, -1.0)), f.x), lerp_Stage2_c1_c0(grad_Stage2_c1_c0(perm_Stage2_c1_c0(AB + 1.0), p + vec3(0.0, -1.0, -1.0)), grad_Stage2_c1_c0(perm_Stage2_c1_c0(BB + 1.0), p + vec3(-1.0, -1.0, -1.0)), f.x), f.y), f.z);
+ return result;
+}
+float noiseOctaves_Stage2_c1_c0(vec3 p) {
+ float result = 0.0;
+ float ratio = 1.0;
+ for (float i = 0.0;i < 2.0; i++) {
+ result += noise_Stage2_c1_c0(p) / ratio;
+ p *= 2.0;
+ ratio *= 2.0;
+ }
+ return (result + 1.0) / 2.0;
+}
+vec4 ImprovedPerlinNoise_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coords = vTransformedCoords_1_Stage0 * ubaseFrequency_Stage2_c1_c0;
+ float r = noiseOctaves_Stage2_c1_c0(vec3(coords, uz_Stage2_c1_c0));
+ float g = noiseOctaves_Stage2_c1_c0(vec3(coords, uz_Stage2_c1_c0));
+ float b = noiseOctaves_Stage2_c1_c0(vec3(coords, uz_Stage2_c1_c0));
+ float a = noiseOctaves_Stage2_c1_c0(vec3(coords, uz_Stage2_c1_c0));
+ _output = vec4(r, g, b, a);
+ _output = clamp(_output, 0.0, 1.0);
+ _output = vec4(_output.xyz * _output.www, _output.w);
+ return _output;
+}
+vec4 blend_exclusion(vec4 src, vec4 dst) {
+ return vec4((dst.xyz + src.xyz) - (2.0 * dst.xyz) * src.xyz, src.w + (1.0 - src.w) * dst.w);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ vec4 inputColor = vec4(output_Stage1.xyz, 1.0);
+ output_Stage2 = blend_exclusion(ClampFragmentProcessor_Stage2_c0_c0(inputColor), ImprovedPerlinNoise_Stage2_c1_c0(inputColor));
+ output_Stage2 *= output_Stage1.w;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/487.shader_test b/shaders/skia/487.shader_test
new file mode 100644
index 0000000..0ce33d0
--- /dev/null
+++ b/shaders/skia/487.shader_test
@@ -0,0 +1,72 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 ucolor_Stage1_c0_c0_c0_c0;
+noperspective in vec4 vcolor_Stage0;
+vec4 ConstColorProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = _input.w * ucolor_Stage1_c0_c0_c0_c0;
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = ConstColorProcessor_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+float _blend_overlay_component(float sc, float sa, float dc, float da) {
+ if (2.0 * dc <= da) {
+ return (2.0 * sc) * dc;
+ }
+ return sa * da - (2.0 * (da - dc)) * (sa - sc);
+}
+vec4 blend_overlay(vec4 src, vec4 dst) {
+ vec4 result = vec4(_blend_overlay_component(src.x, src.w, dst.x, dst.w), _blend_overlay_component(src.y, src.w, dst.y, dst.w), _blend_overlay_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+ result.xyz += dst.xyz * (1.0 - src.w) + src.xyz * (1.0 - dst.w);
+ return result;
+}
+vec4 blend_hard_light(vec4 src, vec4 dst) {
+ return blend_overlay(dst, src);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_hard_light(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 position;
+in vec4 inColor;
+noperspective out vec4 vcolor_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/49-1.shader_test b/shaders/skia/49-1.shader_test
new file mode 100644
index 0000000..57541cd
--- /dev/null
+++ b/shaders/skia/49-1.shader_test
@@ -0,0 +1,51 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_KHR_blend_equation_advanced : require
+out vec4 sk_FragColor;
+layout (blend_support_all_equations) out ;
+uniform vec4 uColor_Stage0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 TextureEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = uColor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_dst_in(outputColor_Stage0, TextureEffect_Stage1_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/49-12.shader_test b/shaders/skia/49-12.shader_test
new file mode 100644
index 0000000..f161606
--- /dev/null
+++ b/shaders/skia/49-12.shader_test
@@ -0,0 +1,63 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uborder_Stage1;
+uniform vec4 usubset_Stage1;
+uniform vec4 uclamp_Stage1;
+uniform vec4 unorm_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+flat in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec2 inCoord = vTransformedCoords_0_Stage0;
+ inCoord *= unorm_Stage1.xy;
+ vec2 subsetCoord;
+ {
+ float w = usubset_Stage1.z - usubset_Stage1.x;
+ float w2 = 2.0 * w;
+ float m = mod(inCoord.x - usubset_Stage1.x, w2);
+ subsetCoord.x = mix(m, w2 - m, step(w, m)) + usubset_Stage1.x;
+ }
+ subsetCoord.y = inCoord.y;
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage1.x, uclamp_Stage1.z);
+ clampedCoord.y = subsetCoord.y;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord * unorm_Stage1.zw);
+ if (inCoord.y < usubset_Stage1.y || inCoord.y > usubset_Stage1.w) {
+ textureColor = uborder_Stage1;
+ }
+ output_Stage1 = outputColor_Stage0 * textureColor;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec2 inLocalCoords;
+in vec4 color;
+flat out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vcolor_Stage0 = color;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoords, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/49-14.shader_test b/shaders/skia/49-14.shader_test
new file mode 100644
index 0000000..3c96a1f
--- /dev/null
+++ b/shaders/skia/49-14.shader_test
@@ -0,0 +1,111 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 uscale01_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias01_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale23_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias23_Stage1_c0_c0_c1_c0;
+uniform float uthreshold_Stage1_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage2_c1_c0_c0_c0;
+uniform vec4 ucolor_Stage2_c2_c0_c0_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 RadialGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = length(vTransformedCoords_0_Stage0);
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 DualIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthreshold_Stage1_c0_c0_c1_c0) {
+ scale = uscale01_Stage1_c0_c0_c1_c0;
+ bias = ubias01_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale23_Stage1_c0_c0_c1_c0;
+ bias = ubias23_Stage1_c0_c0_c1_c0;
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = RadialGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = DualIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c1_c0_c0_c0;
+ }
+ return _output;
+}
+vec4 blend_src_atop(vec4 src, vec4 dst) {
+ return dst.w * src + (1.0 - src.w) * dst;
+}
+vec4 ComposeOne_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_src_atop(ConstColorProcessor_Stage2_c1_c0_c0_c0(vec4(1.0)), _input);
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c2_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c2_c0_c0_c0;
+ }
+ return _output;
+}
+vec4 blend_dst_out(vec4 src, vec4 dst) {
+ return (1.0 - src.w) * dst;
+}
+vec4 ComposeOne_Stage2_c2_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_dst_out(ConstColorProcessor_Stage2_c2_c0_c0_c0(vec4(1.0)), _input);
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = ComposeOne_Stage2_c2_c0(ComposeOne_Stage2_c1_c0(output_Stage1));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/49-15.shader_test b/shaders/skia/49-15.shader_test
new file mode 100644
index 0000000..d1ea576
--- /dev/null
+++ b/shaders/skia/49-15.shader_test
@@ -0,0 +1,123 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 uscale01_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias01_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale23_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias23_Stage1_c0_c0_c1_c0;
+uniform float uthreshold_Stage1_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage2_c1_c0_c0_c0;
+uniform vec4 ucolor_Stage2_c2_c0_c0_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 RadialGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = length(vTransformedCoords_0_Stage0);
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 DualIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthreshold_Stage1_c0_c0_c1_c0) {
+ scale = uscale01_Stage1_c0_c0_c1_c0;
+ bias = ubias01_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale23_Stage1_c0_c0_c1_c0;
+ bias = ubias23_Stage1_c0_c0_c1_c0;
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = RadialGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = DualIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c1_c0_c0_c0;
+ }
+ return _output;
+}
+vec4 blend_exclusion(vec4 src, vec4 dst) {
+ return vec4((dst.xyz + src.xyz) - (2.0 * dst.xyz) * src.xyz, src.w + (1.0 - src.w) * dst.w);
+}
+vec4 ComposeOne_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_exclusion(ConstColorProcessor_Stage2_c1_c0_c0_c0(vec4(1.0)), _input);
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c2_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c2_c0_c0_c0;
+ }
+ return _output;
+}
+float _guarded_divide(float n, float d) {
+ return n / d;
+}
+float _color_burn_component(float sc, float sa, float dc, float da) {
+ if (da == dc) {
+ return (sa * da + sc * (1.0 - da)) + dc * (1.0 - sa);
+ } else if (sc == 0.0) {
+ return dc * (1.0 - sa);
+ }
+ float d = max(0.0, da - _guarded_divide((da - dc) * sa, sc));
+ return (d * sa + sc * (1.0 - da)) + dc * (1.0 - sa);
+}
+vec4 blend_color_burn(vec4 src, vec4 dst) {
+ return vec4(_color_burn_component(src.x, src.w, dst.x, dst.w), _color_burn_component(src.y, src.w, dst.y, dst.w), _color_burn_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+}
+vec4 ComposeOne_Stage2_c2_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_color_burn(ConstColorProcessor_Stage2_c2_c0_c0_c0(vec4(1.0)), _input);
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = ComposeOne_Stage2_c2_c0(ComposeOne_Stage2_c1_c0(output_Stage1));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/49-18.shader_test b/shaders/skia/49-18.shader_test
new file mode 100644
index 0000000..6adac40
--- /dev/null
+++ b/shaders/skia/49-18.shader_test
@@ -0,0 +1,131 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform vec2 uBounds_Stage1;
+uniform vec4 uKernel_Stage1[6];
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0 - 11.0 * uImageIncrement_Stage1;
+ vec2 coordSampled = vec2(0.0, 0.0);
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[4].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[4].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[4].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[4].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[5].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[5].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[5].z;
+ coord += uImageIncrement_Stage1;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ sk_FragColor = sk_FragColor.wwww;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/49-2.shader_test b/shaders/skia/49-2.shader_test
new file mode 100644
index 0000000..8ac9dd8
--- /dev/null
+++ b/shaders/skia/49-2.shader_test
@@ -0,0 +1,58 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 TextureEffect_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage2, vTransformedCoords_1_Stage0) * _input;
+ return _output;
+}
+float _blend_overlay_component(float sc, float sa, float dc, float da) {
+ if (2.0 * dc <= da) {
+ return (2.0 * sc) * dc;
+ }
+ return sa * da - (2.0 * (da - dc)) * (sa - sc);
+}
+vec4 blend_overlay(vec4 src, vec4 dst) {
+ vec4 result = vec4(_blend_overlay_component(src.x, src.w, dst.x, dst.w), _blend_overlay_component(src.y, src.w, dst.y, dst.w), _blend_overlay_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+ result.xyz += dst.xyz * (1.0 - src.w) + src.xyz * (1.0 - dst.w);
+ return result;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_overlay(output_Stage1, TextureEffect_Stage2_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/49-21.shader_test b/shaders/skia/49-21.shader_test
new file mode 100644
index 0000000..bb5e406
--- /dev/null
+++ b/shaders/skia/49-21.shader_test
@@ -0,0 +1,48 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uinnerRect_Stage1;
+uniform vec4 uinvRadiiLTRB_Stage1;
+flat in vec4 vcolor_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec2 dxy0 = uinnerRect_Stage1.xy - gl_FragCoord.xy;
+ vec2 dxy1 = gl_FragCoord.xy - uinnerRect_Stage1.zw;
+ vec2 dxy = max(max(dxy0, dxy1), 0.0);
+ vec2 Z = max(max(dxy0 * uinvRadiiLTRB_Stage1.xy, dxy1 * uinvRadiiLTRB_Stage1.zw), 0.0);
+ float implicit = dot(Z, dxy) - 1.0;
+ float grad_dot = 4.0 * dot(Z, Z);
+ grad_dot = max(grad_dot, 9.9999997473787516e-05);
+ float approx_dist = implicit * inversesqrt(grad_dot);
+ float alpha = clamp(0.5 - approx_dist, 0.0, 1.0);
+ output_Stage1 = vec4(alpha);
+ }
+ {
+ sk_FragColor = outputColor_Stage0 * output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 position;
+in vec4 color;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/49-22.shader_test b/shaders/skia/49-22.shader_test
new file mode 100644
index 0000000..caec704
--- /dev/null
+++ b/shaders/skia/49-22.shader_test
@@ -0,0 +1,101 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 uscale01_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias01_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale23_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias23_Stage1_c0_c0_c1_c0;
+uniform float uthreshold_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vEllipseOffsets_Stage0;
+noperspective in vec4 vEllipseRadii_Stage0;
+noperspective in vec4 vinColor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 RadialGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = length(vTransformedCoords_0_Stage0);
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 DualIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthreshold_Stage1_c0_c0_c1_c0) {
+ scale = uscale01_Stage1_c0_c0_c1_c0;
+ bias = ubias01_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale23_Stage1_c0_c0_c1_c0;
+ bias = ubias23_Stage1_c0_c0_c1_c0;
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = RadialGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = DualIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ vec2 offset = vEllipseOffsets_Stage0;
+ offset *= vEllipseRadii_Stage0.xy;
+ float test = dot(offset, offset) - 1.0;
+ vec2 grad = (2.0 * offset) * vEllipseRadii_Stage0.xy;
+ float grad_dot = dot(grad, grad);
+ grad_dot = max(grad_dot, 1.1754999560161448e-38);
+ float invlen = inversesqrt(grad_dot);
+ float edgeAlpha = clamp(0.5 - test * invlen, 0.0, 1.0);
+ offset = vEllipseOffsets_Stage0 * vEllipseRadii_Stage0.zw;
+ test = dot(offset, offset) - 1.0;
+ grad = (2.0 * offset) * vEllipseRadii_Stage0.zw;
+ grad_dot = dot(grad, grad);
+ invlen = inversesqrt(grad_dot);
+ edgeAlpha *= clamp(0.5 + test * invlen, 0.0, 1.0);
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1 * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec2 inEllipseOffset;
+in vec4 inEllipseRadii;
+noperspective out vec2 vEllipseOffsets_Stage0;
+noperspective out vec4 vEllipseRadii_Stage0;
+noperspective out vec4 vinColor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vEllipseOffsets_Stage0 = inEllipseOffset;
+ vEllipseRadii_Stage0 = inEllipseRadii;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/49-23.shader_test b/shaders/skia/49-23.shader_test
new file mode 100644
index 0000000..df40fd2
--- /dev/null
+++ b/shaders/skia/49-23.shader_test
@@ -0,0 +1,44 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform float uPixelSize_Stage1;
+uniform vec2 uRange_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = vec4(1.0, 1.0, 1.0, 1.0);
+ vec2 coord = vTransformedCoords_0_Stage0;
+ coord.y -= 25.0 * uPixelSize_Stage1;
+ float highBound = min(uRange_Stage1.y, coord.y + 50.0 * uPixelSize_Stage1);
+ coord.y = max(uRange_Stage1.x, coord.y);
+ for (int i = 0;i < 51; i++) {
+ output_Stage1 = min(output_Stage1, texture(uTextureSampler_0_Stage1, coord));
+ coord.y += uPixelSize_Stage1;
+ coord.y = min(highBound, coord.y);
+ }
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/49-24.shader_test b/shaders/skia/49-24.shader_test
new file mode 100644
index 0000000..76bb8b4
--- /dev/null
+++ b/shaders/skia/49-24.shader_test
@@ -0,0 +1,89 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage2_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c1_c0;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_dst_in(outputColor_Stage0, ClampedGradientEffect_Stage1_c0_c0(vec4(1.0)));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_src_over(ConstColorProcessor_Stage2_c1_c0(vec4(1.0)), output_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/49-25.shader_test b/shaders/skia/49-25.shader_test
new file mode 100644
index 0000000..821d548
--- /dev/null
+++ b/shaders/skia/49-25.shader_test
@@ -0,0 +1,41 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform float uPixelSize_Stage1;
+uniform vec2 uRange_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0;
+ coord.x -= 4.0 * uPixelSize_Stage1;
+ for (int i = 0;i < 9; i++) {
+ output_Stage1 = max(output_Stage1, texture(uTextureSampler_0_Stage1, coord));
+ coord.x += uPixelSize_Stage1;
+ }
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/49-26.shader_test b/shaders/skia/49-26.shader_test
new file mode 100644
index 0000000..98757ff
--- /dev/null
+++ b/shaders/skia/49-26.shader_test
@@ -0,0 +1,135 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform float uSurfaceScale_Stage1;
+uniform vec3 uLightColor_Stage1;
+uniform float uKD_Stage1;
+uniform vec3 uLightDirection_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 light_Stage1(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ float colorScale = uKD_Stage1 * dot(normal, surfaceToLight);
+ return vec4(lightColor * clamp(colorScale, 0.0, 1.0), 1.0);
+}
+float sobel_Stage1(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage1(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage1(float m[9], float surfaceScale) {
+ return pointToNormal_Stage1(sobel_Stage1(m[0], m[1], m[3], m[4], m[6], m[7], 0.5), sobel_Stage1(m[0], m[6], m[1], m[7], 0.0, 0.0, 0.33333298563957214), surfaceScale);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ vec2 coord = vTransformedCoords_0_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp0 = textureColor;
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp1 = textureColor;
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp2 = textureColor;
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp3 = textureColor;
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp4 = textureColor;
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp5 = textureColor;
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp6 = textureColor;
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp7 = textureColor;
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp8 = textureColor;
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = uLightDirection_Stage1;
+ output_Stage1 = light_Stage1(normal_Stage1(m, uSurfaceScale_Stage1), surfaceToLight, uLightColor_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/49-27.shader_test b/shaders/skia/49-27.shader_test
new file mode 100644
index 0000000..71408bc
--- /dev/null
+++ b/shaders/skia/49-27.shader_test
@@ -0,0 +1,67 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec2 uDstTextureUpperLeft_Stage1;
+uniform vec2 uDstTextureCoordScale_Stage1;
+uniform sampler2D uTextureSampler_0_Stage0;
+uniform sampler2D uDstTextureSampler_Stage1;
+noperspective in vec2 vTextureCoords_Stage0;
+flat in int vTexIndex_Stage0;
+noperspective in vec4 vinColor_Stage0;
+vec4 blend_screen(vec4 src, vec4 dst) {
+ return src + (1.0 - src) * dst;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vinColor_Stage0;
+ vec4 texColor;
+ {
+ texColor = texture(uTextureSampler_0_Stage0, vTextureCoords_Stage0);
+ }
+ outputCoverage_Stage0 = texColor;
+ }
+ {
+ if (all(lessThanEqual(outputCoverage_Stage0.xyz, vec3(0.0)))) {
+ discard;
+ }
+ vec2 _dstTexCoord = (gl_FragCoord.xy - uDstTextureUpperLeft_Stage1) * uDstTextureCoordScale_Stage1;
+ _dstTexCoord.y = 1.0 - _dstTexCoord.y;
+ vec4 _dstColor = texture(uDstTextureSampler_Stage1, _dstTexCoord);
+ sk_FragColor = blend_screen(outputColor_Stage0, _dstColor);
+ float lerpRed = mix(_dstColor.w, sk_FragColor.w, outputCoverage_Stage0.x);
+ float lerpBlue = mix(_dstColor.w, sk_FragColor.w, outputCoverage_Stage0.y);
+ float lerpGreen = mix(_dstColor.w, sk_FragColor.w, outputCoverage_Stage0.z);
+ sk_FragColor = outputCoverage_Stage0 * sk_FragColor + (vec4(1.0) - outputCoverage_Stage0) * _dstColor;
+ sk_FragColor.w = max(max(lerpRed, lerpBlue), lerpGreen);
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform vec2 uAtlasSizeInv_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in uvec2 inTextureCoords;
+noperspective out vec2 vTextureCoords_Stage0;
+flat out int vTexIndex_Stage0;
+noperspective out vec4 vinColor_Stage0;
+void main() {
+ ivec2 signedCoords = ivec2(int(inTextureCoords.x), int(inTextureCoords.y));
+ vec2 unormTexCoords = vec2(float(signedCoords.x / 2), float(signedCoords.y / 2));
+ vTextureCoords_Stage0 = unormTexCoords * uAtlasSizeInv_Stage0;
+ vTexIndex_Stage0 = 0;
+ vinColor_Stage0 = inColor;
+ gl_Position = vec4(inPosition.x, inPosition.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/49-28.shader_test b/shaders/skia/49-28.shader_test
new file mode 100644
index 0000000..73bbca2
--- /dev/null
+++ b/shaders/skia/49-28.shader_test
@@ -0,0 +1,44 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform float uPixelSize_Stage1;
+uniform vec2 uRange_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0;
+ coord.x -= 10.0 * uPixelSize_Stage1;
+ float highBound = min(uRange_Stage1.y, coord.x + 20.0 * uPixelSize_Stage1);
+ coord.x = max(uRange_Stage1.x, coord.x);
+ for (int i = 0;i < 21; i++) {
+ output_Stage1 = max(output_Stage1, texture(uTextureSampler_0_Stage1, coord));
+ coord.x += uPixelSize_Stage1;
+ coord.x = min(highBound, coord.x);
+ }
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/49-3.shader_test b/shaders/skia/49-3.shader_test
new file mode 100644
index 0000000..1080e5a
--- /dev/null
+++ b/shaders/skia/49-3.shader_test
@@ -0,0 +1,77 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uclamp_Stage1_c0_c0_c0_c0;
+uniform mat4 um_Stage2;
+uniform vec4 uv_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 inCoord = vTransformedCoords_0_Stage0;
+ vec2 subsetCoord;
+ subsetCoord.x = inCoord.x;
+ subsetCoord.y = inCoord.y;
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage1_c0_c0_c0_c0.x, uclamp_Stage1_c0_c0_c0_c0.z);
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage1_c0_c0_c0_c0.y, uclamp_Stage1_c0_c0_c0_c0.w);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ _output = _input * textureColor;
+ return _output;
+}
+vec4 YUVtoRGBEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 planes[1];
+ planes[0] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0));
+ vec4 color = vec4(planes[0].y, planes[0].x, planes[0].z, planes[0].w);
+ color.xyz *= color.w;
+ _output = color;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = YUVtoRGBEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ vec4 inputColor = output_Stage1;
+ {
+ float nonZeroAlpha = max(inputColor.w, 9.9999997473787516e-05);
+ inputColor = vec4(inputColor.xyz / nonZeroAlpha, inputColor.w);
+ }
+ output_Stage2 = um_Stage2 * inputColor + uv_Stage2;
+ {
+ output_Stage2 = clamp(output_Stage2, 0.0, 1.0);
+ }
+ {
+ output_Stage2.xyz *= output_Stage2.w;
+ }
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/49-34.shader_test b/shaders/skia/49-34.shader_test
new file mode 100644
index 0000000..5379ed9
--- /dev/null
+++ b/shaders/skia/49-34.shader_test
@@ -0,0 +1,41 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform float uPixelSize_Stage1;
+uniform vec2 uRange_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0;
+ coord.y -= uPixelSize_Stage1;
+ for (int i = 0;i < 3; i++) {
+ output_Stage1 = max(output_Stage1, texture(uTextureSampler_0_Stage1, coord));
+ coord.y += uPixelSize_Stage1;
+ }
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/49-35.shader_test b/shaders/skia/49-35.shader_test
new file mode 100644
index 0000000..cf769c4
--- /dev/null
+++ b/shaders/skia/49-35.shader_test
@@ -0,0 +1,68 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uborder_Stage2_c0_c0;
+uniform vec4 usubset_Stage2_c0_c0;
+uniform vec4 unorm_Stage2_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 TextureEffect_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 inCoord = vTransformedCoords_1_Stage0;
+ inCoord *= unorm_Stage2_c0_c0.xy;
+ vec2 subsetCoord;
+ subsetCoord.x = inCoord.x;
+ subsetCoord.y = inCoord.y;
+ vec2 clampedCoord;
+ clampedCoord.x = subsetCoord.x;
+ clampedCoord.y = subsetCoord.y;
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord * unorm_Stage2_c0_c0.zw);
+ if (inCoord.x < usubset_Stage2_c0_c0.x || inCoord.x > usubset_Stage2_c0_c0.z) {
+ textureColor = uborder_Stage2_c0_c0;
+ }
+ if (inCoord.y < usubset_Stage2_c0_c0.y || inCoord.y > usubset_Stage2_c0_c0.w) {
+ textureColor = uborder_Stage2_c0_c0;
+ }
+ _output = _input * textureColor;
+ return _output;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_src_over(output_Stage1, TextureEffect_Stage2_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/49-4.shader_test b/shaders/skia/49-4.shader_test
new file mode 100644
index 0000000..3a66385
--- /dev/null
+++ b/shaders/skia/49-4.shader_test
@@ -0,0 +1,52 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 TextureEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_1_Stage1, vTransformedCoords_1_Stage0) * _input;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ vec4 planes[2];
+ planes[0] = TextureEffect_Stage1_c0_c0(vec4(1.0));
+ planes[1] = TextureEffect_Stage1_c1_c0(vec4(1.0));
+ vec4 color = vec4(planes[0].w, planes[1].x, planes[1].y, 1.0);
+ output_Stage1 = color;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/49-42.shader_test b/shaders/skia/49-42.shader_test
new file mode 100644
index 0000000..0fe81c6
--- /dev/null
+++ b/shaders/skia/49-42.shader_test
@@ -0,0 +1,50 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform vec2 uBounds_Stage1;
+uniform vec4 uKernel_Stage1[1];
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0 - uImageIncrement_Stage1;
+ vec2 coordSampled = vec2(0.0, 0.0);
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].z;
+ coord += uImageIncrement_Stage1;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/49-43.shader_test b/shaders/skia/49-43.shader_test
new file mode 100644
index 0000000..7d23947
--- /dev/null
+++ b/shaders/skia/49-43.shader_test
@@ -0,0 +1,52 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uColor_Stage0;
+uniform vec2 uDstTextureUpperLeft_Stage1;
+uniform vec2 uDstTextureCoordScale_Stage1;
+uniform sampler2D uDstTextureSampler_Stage1;
+noperspective in float vinCoverage_Stage0;
+vec4 blend_dst_atop(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src + src.w * dst;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = uColor_Stage0;
+ float alpha = 1.0;
+ alpha = vinCoverage_Stage0;
+ outputCoverage_Stage0 = vec4(alpha);
+ }
+ {
+ if (all(lessThanEqual(outputCoverage_Stage0.xyz, vec3(0.0)))) {
+ discard;
+ }
+ vec2 _dstTexCoord = (gl_FragCoord.xy - uDstTextureUpperLeft_Stage1) * uDstTextureCoordScale_Stage1;
+ _dstTexCoord.y = 1.0 - _dstTexCoord.y;
+ vec4 _dstColor = texture(uDstTextureSampler_Stage1, _dstTexCoord);
+ sk_FragColor = blend_dst_atop(outputColor_Stage0, _dstColor);
+ sk_FragColor = outputCoverage_Stage0 * sk_FragColor + (vec4(1.0) - outputCoverage_Stage0) * _dstColor;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 inPosition;
+in float inCoverage;
+noperspective out float vinCoverage_Stage0;
+void main() {
+ vec2 pos2 = inPosition;
+ vinCoverage_Stage0 = inCoverage;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/49-44.shader_test b/shaders/skia/49-44.shader_test
new file mode 100644
index 0000000..ac891d6
--- /dev/null
+++ b/shaders/skia/49-44.shader_test
@@ -0,0 +1,93 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_0_Stage0;
+ float t = -1.0;
+ {
+ {
+ float invR1 = ufocalParams_Stage1_c0_c0_c0_c0.x;
+ float fx = ufocalParams_Stage1_c0_c0_c0_c0.y;
+ float x_t = -1.0;
+ {
+ x_t = length(p) - p.x * invR1;
+ }
+ {
+ {
+ t = x_t + fx;
+ }
+ }
+ }
+ }
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_dst_in(outputColor_Stage0, ClampedGradientEffect_Stage1_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/49-45.shader_test b/shaders/skia/49-45.shader_test
new file mode 100644
index 0000000..3f92fe0
--- /dev/null
+++ b/shaders/skia/49-45.shader_test
@@ -0,0 +1,109 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_0_Stage0;
+ float t = -1.0;
+ {
+ {
+ float invR1 = ufocalParams_Stage1_c0_c0_c0_c0.x;
+ float fx = ufocalParams_Stage1_c0_c0_c0_c0.y;
+ float x_t = -1.0;
+ {
+ x_t = length(p) - p.x * invR1;
+ }
+ {
+ {
+ t = x_t + fx;
+ }
+ }
+ }
+ }
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_dst_in(outputColor_Stage0, ClampedGradientEffect_Stage1_c0_c0(vec4(1.0)));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_1_Stage0.x);
+ uint y = uint(vTransformedCoords_1_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ output_Stage2 = vec4(clamp(output_Stage2.xyz + value * 0.0039215688593685627, 0.0, output_Stage2.w), output_Stage2.w);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/49-46.shader_test b/shaders/skia/49-46.shader_test
new file mode 100644
index 0000000..e5bff45
--- /dev/null
+++ b/shaders/skia/49-46.shader_test
@@ -0,0 +1,104 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_0_Stage0;
+ float t = -1.0;
+ {
+ {
+ float r0 = ufocalParams_Stage1_c0_c0_c0_c0.x;
+ {
+ t = length(p) - r0;
+ }
+ }
+ }
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/49-47.shader_test b/shaders/skia/49-47.shader_test
new file mode 100644
index 0000000..853f55d
--- /dev/null
+++ b/shaders/skia/49-47.shader_test
@@ -0,0 +1,119 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_0_Stage0;
+ float t = -1.0;
+ {
+ {
+ float r0 = ufocalParams_Stage1_c0_c0_c0_c0.x;
+ {
+ t = length(p) - r0;
+ }
+ }
+ }
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TiledGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_1_Stage0.x);
+ uint y = uint(vTransformedCoords_1_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ output_Stage2 = vec4(clamp(output_Stage2.xyz + value * 0.0039215688593685627, 0.0, output_Stage2.w), output_Stage2.w);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/49-48.shader_test b/shaders/skia/49-48.shader_test
new file mode 100644
index 0000000..d8fc8e9
--- /dev/null
+++ b/shaders/skia/49-48.shader_test
@@ -0,0 +1,117 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_0_Stage0;
+ float t = -1.0;
+ {
+ {
+ float r0 = ufocalParams_Stage1_c0_c0_c0_c0.x;
+ {
+ t = length(p) - r0;
+ }
+ }
+ }
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else {
+ {
+ t.x = fract(t.x);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TiledGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_1_Stage0.x);
+ uint y = uint(vTransformedCoords_1_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ output_Stage2 = vec4(clamp(output_Stage2.xyz + value * 0.0039215688593685627, 0.0, output_Stage2.w), output_Stage2.w);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/49-49.shader_test b/shaders/skia/49-49.shader_test
new file mode 100644
index 0000000..a3f5ddc
--- /dev/null
+++ b/shaders/skia/49-49.shader_test
@@ -0,0 +1,120 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_0_Stage0;
+ float t = -1.0;
+ {
+ {
+ float r0 = ufocalParams_Stage1_c0_c0_c0_c0.x;
+ {
+ t = length(p) - r0;
+ }
+ }
+ }
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_1_Stage0.x);
+ uint y = uint(vTransformedCoords_1_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ output_Stage2 = vec4(clamp(output_Stage2.xyz + value * 0.0039215688593685627, 0.0, output_Stage2.w), output_Stage2.w);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/49-5.shader_test b/shaders/skia/49-5.shader_test
new file mode 100644
index 0000000..b3f6a7d
--- /dev/null
+++ b/shaders/skia/49-5.shader_test
@@ -0,0 +1,78 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform mat4 um_Stage2;
+uniform vec4 uv_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_1_Stage1, vTransformedCoords_1_Stage0) * _input;
+ return _output;
+}
+vec4 YUVtoRGBEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 planes[2];
+ planes[0] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0));
+ planes[1] = TextureEffect_Stage1_c0_c0_c1_c0(vec4(1.0));
+ vec4 color = vec4(planes[0].x, planes[1].x, planes[1].y, 1.0);
+ _output = color;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = YUVtoRGBEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ vec4 inputColor = output_Stage1;
+ {
+ float nonZeroAlpha = max(inputColor.w, 9.9999997473787516e-05);
+ inputColor = vec4(inputColor.xyz / nonZeroAlpha, inputColor.w);
+ }
+ output_Stage2 = um_Stage2 * inputColor + uv_Stage2;
+ {
+ output_Stage2 = clamp(output_Stage2, 0.0, 1.0);
+ }
+ {
+ output_Stage2.xyz *= output_Stage2.w;
+ }
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/49-51.shader_test b/shaders/skia/49-51.shader_test
new file mode 100644
index 0000000..1e308ab
--- /dev/null
+++ b/shaders/skia/49-51.shader_test
@@ -0,0 +1,66 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 color = inColor;
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/49-52.shader_test b/shaders/skia/49-52.shader_test
new file mode 100644
index 0000000..7877b2e
--- /dev/null
+++ b/shaders/skia/49-52.shader_test
@@ -0,0 +1,67 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 TextureEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = TextureEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = OverrideInputFragmentProcessor_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 blend_screen(vec4 src, vec4 dst) {
+ return src + (1.0 - src) * dst;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_screen(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec2 inLocalCoord;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 color = inColor;
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/49-53.shader_test b/shaders/skia/49-53.shader_test
new file mode 100644
index 0000000..9cd0790
--- /dev/null
+++ b/shaders/skia/49-53.shader_test
@@ -0,0 +1,69 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec3 uedges_Stage1[4];
+uniform sampler2D uTextureSampler_0_Stage0;
+noperspective in vec2 vTextureCoords_Stage0;
+flat in int vTexIndex_Stage0;
+noperspective in vec4 vinColor_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vinColor_Stage0;
+ vec4 texColor;
+ {
+ texColor = texture(uTextureSampler_0_Stage0, vTextureCoords_Stage0);
+ }
+ outputCoverage_Stage0 = texColor;
+ }
+ vec4 output_Stage1;
+ {
+ float alpha = 1.0;
+ float edge;
+ edge = dot(uedges_Stage1[0], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage1[1], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage1[2], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage1[3], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ output_Stage1 = outputCoverage_Stage0 * alpha;
+ }
+ {
+ sk_FragColor = outputColor_Stage0 * output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform vec2 uAtlasSizeInv_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in uvec2 inTextureCoords;
+noperspective out vec2 vTextureCoords_Stage0;
+flat out int vTexIndex_Stage0;
+noperspective out vec4 vinColor_Stage0;
+void main() {
+ ivec2 signedCoords = ivec2(int(inTextureCoords.x), int(inTextureCoords.y));
+ vec2 unormTexCoords = vec2(float(signedCoords.x / 2), float(signedCoords.y / 2));
+ vTextureCoords_Stage0 = unormTexCoords * uAtlasSizeInv_Stage0;
+ vTexIndex_Stage0 = 0;
+ vinColor_Stage0 = inColor;
+ gl_Position = vec4(inPosition.x, inPosition.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/49-54.shader_test b/shaders/skia/49-54.shader_test
new file mode 100644
index 0000000..aca90a7
--- /dev/null
+++ b/shaders/skia/49-54.shader_test
@@ -0,0 +1,41 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform float uPixelSize_Stage1;
+uniform vec2 uRange_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0;
+ coord.y -= 6.0 * uPixelSize_Stage1;
+ for (int i = 0;i < 13; i++) {
+ output_Stage1 = max(output_Stage1, texture(uTextureSampler_0_Stage1, coord));
+ coord.y += uPixelSize_Stage1;
+ }
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/49-55.shader_test b/shaders/skia/49-55.shader_test
new file mode 100644
index 0000000..66f2e0e
--- /dev/null
+++ b/shaders/skia/49-55.shader_test
@@ -0,0 +1,121 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 uleftBorderColor_Stage1_c1_c0_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c1_c0_c0_c0;
+uniform vec4 ustart_Stage1_c1_c0_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c1_c0_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = ClampedGradientEffect_Stage1_c0_c0_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ return _output;
+}
+vec4 LinearGradientLayout_Stage1_c1_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_1_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c1_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c1_c0_c0_c0_c1_c0 + t * uend_Stage1_c1_c0_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c1_c0_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c1_c0_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c1_c0_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c1_c0_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = ClampedGradientEffect_Stage1_c1_c0_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ return _output;
+}
+vec4 blend_dst_out(vec4 src, vec4 dst) {
+ return (1.0 - src.w) * dst;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_dst_out(OverrideInputFragmentProcessor_Stage1_c0_c0(inputColor), OverrideInputFragmentProcessor_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/49-56.shader_test b/shaders/skia/49-56.shader_test
new file mode 100644
index 0000000..9576b2c
--- /dev/null
+++ b/shaders/skia/49-56.shader_test
@@ -0,0 +1,143 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uCoordTransformMatrix_2_Stage0;
+uniform vec4 ustart_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 urectH_Stage2;
+uniform float uinvSixSigma_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c0_c0_c1_c0;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+vec4 ComposeOne_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_dst_in(_input, TiledGradientEffect_Stage1_c0_c0_c0_c0(vec4(1.0)));
+ return _output;
+}
+vec4 TextureEffect_Stage1_c1_c0_c0_c0(vec4 _input, vec2 _coords) {
+ _coords = _coords * uCoordTransformMatrix_2_Stage0.xz + uCoordTransformMatrix_2_Stage0.yw;
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, _coords) * _input;
+ return _output;
+}
+vec4 Bicubic_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coord = vTransformedCoords_1_Stage0 - vec2(0.5);
+ vec2 f = fract(coord);
+ coord += 0.5 - f;
+ vec4 wx = mat4(0.055555555555555552, 0.88888888888888884, 0.055555555555555552, 0.0, -0.5, 0.0, 0.5, 0.0, 0.83333333333333337, -2.0, 1.5, -0.33333333333333331, -0.3888888888888889, 1.1666666666666667, -1.1666666666666667, 0.3888888888888889) * vec4(1.0, f.x, f.x * f.x, (f.x * f.x) * f.x);
+ vec4 wy = mat4(0.055555555555555552, 0.88888888888888884, 0.055555555555555552, 0.0, -0.5, 0.0, 0.5, 0.0, 0.83333333333333337, -2.0, 1.5, -0.33333333333333331, -0.3888888888888889, 1.1666666666666667, -1.1666666666666667, 0.3888888888888889) * vec4(1.0, f.y, f.y * f.y, (f.y * f.y) * f.y);
+ vec4 rowColors[4];
+ rowColors[0] = TextureEffect_Stage1_c1_c0_c0_c0(vec4(1.0), coord + vec2(-1.0, -1.0));
+ rowColors[1] = TextureEffect_Stage1_c1_c0_c0_c0(vec4(1.0), coord + vec2(0.0, -1.0));
+ rowColors[2] = TextureEffect_Stage1_c1_c0_c0_c0(vec4(1.0), coord + vec2(1.0, -1.0));
+ rowColors[3] = TextureEffect_Stage1_c1_c0_c0_c0(vec4(1.0), coord + vec2(2.0, -1.0));
+ vec4 s0 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ rowColors[0] = TextureEffect_Stage1_c1_c0_c0_c0(vec4(1.0), coord + vec2(-1.0, 0.0));
+ rowColors[1] = TextureEffect_Stage1_c1_c0_c0_c0(vec4(1.0), coord);
+ rowColors[2] = TextureEffect_Stage1_c1_c0_c0_c0(vec4(1.0), coord + vec2(1.0, 0.0));
+ rowColors[3] = TextureEffect_Stage1_c1_c0_c0_c0(vec4(1.0), coord + vec2(2.0, 0.0));
+ vec4 s1 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ rowColors[0] = TextureEffect_Stage1_c1_c0_c0_c0(vec4(1.0), coord + vec2(-1.0, 1.0));
+ rowColors[1] = TextureEffect_Stage1_c1_c0_c0_c0(vec4(1.0), coord + vec2(0.0, 1.0));
+ rowColors[2] = TextureEffect_Stage1_c1_c0_c0_c0(vec4(1.0), coord + vec2(1.0, 1.0));
+ rowColors[3] = TextureEffect_Stage1_c1_c0_c0_c0(vec4(1.0), coord + vec2(2.0, 1.0));
+ vec4 s2 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ rowColors[0] = TextureEffect_Stage1_c1_c0_c0_c0(vec4(1.0), coord + vec2(-1.0, 2.0));
+ rowColors[1] = TextureEffect_Stage1_c1_c0_c0_c0(vec4(1.0), coord + vec2(0.0, 2.0));
+ rowColors[2] = TextureEffect_Stage1_c1_c0_c0_c0(vec4(1.0), coord + vec2(1.0, 2.0));
+ rowColors[3] = TextureEffect_Stage1_c1_c0_c0_c0(vec4(1.0), coord + vec2(2.0, 2.0));
+ vec4 s3 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ vec4 bicubicColor = ((wy.x * s0 + wy.y * s1) + wy.z * s2) + wy.w * s3;
+ bicubicColor.xyz = max(vec3(0.0), min(bicubicColor.xyz, bicubicColor.www));
+ _output = bicubicColor * _input;
+ return _output;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = Bicubic_Stage1_c1_c0(ComposeOne_Stage1_c0_c0(outputColor_Stage0));
+ }
+ vec4 output_Stage2;
+ {
+ float xCoverage, yCoverage;
+ {
+ float x, y;
+ {
+ x = max(urectH_Stage2.x - gl_FragCoord.x, gl_FragCoord.x - urectH_Stage2.z);
+ y = max(urectH_Stage2.y - gl_FragCoord.y, gl_FragCoord.y - urectH_Stage2.w);
+ }
+ xCoverage = texture(uTextureSampler_0_Stage2, vec2(x * uinvSixSigma_Stage2, 0.5)).w;
+ yCoverage = texture(uTextureSampler_0_Stage2, vec2(y * uinvSixSigma_Stage2, 0.5)).w;
+ output_Stage2 = vec4(xCoverage) * yCoverage;
+ }
+ output_Stage2 = vec4(xCoverage) * yCoverage;
+ }
+ {
+ sk_FragColor = output_Stage1 * output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/49-58.shader_test b/shaders/skia/49-58.shader_test
new file mode 100644
index 0000000..648915a
--- /dev/null
+++ b/shaders/skia/49-58.shader_test
@@ -0,0 +1,103 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uCoordTransformMatrix_1_Stage0;
+uniform vec4 urectH_Stage2;
+uniform float uinvSixSigma_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0_c0_c0(vec4 _input, vec2 _coords) {
+ _coords = _coords * uCoordTransformMatrix_1_Stage0.xz + uCoordTransformMatrix_1_Stage0.yw;
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, _coords) * _input;
+ return _output;
+}
+vec4 Bicubic_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coord = vTransformedCoords_0_Stage0 - vec2(0.5);
+ vec2 f = fract(coord);
+ coord += 0.5 - f;
+ vec4 wx = mat4(0.055555555555555552, 0.88888888888888884, 0.055555555555555552, 0.0, -0.5, 0.0, 0.5, 0.0, 0.83333333333333337, -2.0, 1.5, -0.33333333333333331, -0.3888888888888889, 1.1666666666666667, -1.1666666666666667, 0.3888888888888889) * vec4(1.0, f.x, f.x * f.x, (f.x * f.x) * f.x);
+ vec4 wy = mat4(0.055555555555555552, 0.88888888888888884, 0.055555555555555552, 0.0, -0.5, 0.0, 0.5, 0.0, 0.83333333333333337, -2.0, 1.5, -0.33333333333333331, -0.3888888888888889, 1.1666666666666667, -1.1666666666666667, 0.3888888888888889) * vec4(1.0, f.y, f.y * f.y, (f.y * f.y) * f.y);
+ vec4 rowColors[4];
+ rowColors[0] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(-1.0, -1.0));
+ rowColors[1] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(0.0, -1.0));
+ rowColors[2] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(1.0, -1.0));
+ rowColors[3] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(2.0, -1.0));
+ vec4 s0 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ rowColors[0] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(-1.0, 0.0));
+ rowColors[1] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord);
+ rowColors[2] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(1.0, 0.0));
+ rowColors[3] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(2.0, 0.0));
+ vec4 s1 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ rowColors[0] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(-1.0, 1.0));
+ rowColors[1] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(0.0, 1.0));
+ rowColors[2] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(1.0, 1.0));
+ rowColors[3] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(2.0, 1.0));
+ vec4 s2 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ rowColors[0] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(-1.0, 2.0));
+ rowColors[1] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(0.0, 2.0));
+ rowColors[2] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(1.0, 2.0));
+ rowColors[3] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(2.0, 2.0));
+ vec4 s3 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ vec4 bicubicColor = ((wy.x * s0 + wy.y * s1) + wy.z * s2) + wy.w * s3;
+ bicubicColor.xyz = max(vec3(0.0), min(bicubicColor.xyz, bicubicColor.www));
+ _output = bicubicColor * _input;
+ return _output;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = Bicubic_Stage1_c0_c0(vec4(1.0));
+ output_Stage1.xyz *= outputColor_Stage0.xyz;
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ vec4 output_Stage2;
+ {
+ float xCoverage, yCoverage;
+ {
+ float x, y;
+ {
+ x = max(urectH_Stage2.x - gl_FragCoord.x, gl_FragCoord.x - urectH_Stage2.z);
+ y = max(urectH_Stage2.y - gl_FragCoord.y, gl_FragCoord.y - urectH_Stage2.w);
+ }
+ xCoverage = texture(uTextureSampler_0_Stage2, vec2(x * uinvSixSigma_Stage2, 0.5)).w;
+ yCoverage = texture(uTextureSampler_0_Stage2, vec2(y * uinvSixSigma_Stage2, 0.5)).w;
+ output_Stage2 = vec4(xCoverage) * yCoverage;
+ }
+ output_Stage2 = vec4(xCoverage) * yCoverage;
+ }
+ {
+ sk_FragColor = output_Stage1 * output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/49-60.shader_test b/shaders/skia/49-60.shader_test
new file mode 100644
index 0000000..5972047
--- /dev/null
+++ b/shaders/skia/49-60.shader_test
@@ -0,0 +1,97 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uCoordTransformMatrix_1_Stage0;
+uniform vec4 urectH_Stage2;
+uniform float uinvSixSigma_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0_c0_c0(vec4 _input, vec2 _coords) {
+ _coords = _coords * uCoordTransformMatrix_1_Stage0.xz + uCoordTransformMatrix_1_Stage0.yw;
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, _coords) * _input;
+ return _output;
+}
+vec4 Bicubic_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coord = vTransformedCoords_0_Stage0 - vec2(0.5);
+ vec2 f = fract(coord);
+ coord += 0.5 - f;
+ vec4 wx = mat4(0.055555555555555552, 0.88888888888888884, 0.055555555555555552, 0.0, -0.5, 0.0, 0.5, 0.0, 0.83333333333333337, -2.0, 1.5, -0.33333333333333331, -0.3888888888888889, 1.1666666666666667, -1.1666666666666667, 0.3888888888888889) * vec4(1.0, f.x, f.x * f.x, (f.x * f.x) * f.x);
+ vec4 wy = mat4(0.055555555555555552, 0.88888888888888884, 0.055555555555555552, 0.0, -0.5, 0.0, 0.5, 0.0, 0.83333333333333337, -2.0, 1.5, -0.33333333333333331, -0.3888888888888889, 1.1666666666666667, -1.1666666666666667, 0.3888888888888889) * vec4(1.0, f.y, f.y * f.y, (f.y * f.y) * f.y);
+ vec4 rowColors[4];
+ rowColors[0] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(-1.0, -1.0));
+ rowColors[1] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(0.0, -1.0));
+ rowColors[2] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(1.0, -1.0));
+ rowColors[3] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(2.0, -1.0));
+ vec4 s0 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ rowColors[0] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(-1.0, 0.0));
+ rowColors[1] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord);
+ rowColors[2] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(1.0, 0.0));
+ rowColors[3] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(2.0, 0.0));
+ vec4 s1 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ rowColors[0] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(-1.0, 1.0));
+ rowColors[1] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(0.0, 1.0));
+ rowColors[2] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(1.0, 1.0));
+ rowColors[3] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(2.0, 1.0));
+ vec4 s2 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ rowColors[0] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(-1.0, 2.0));
+ rowColors[1] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(0.0, 2.0));
+ rowColors[2] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(1.0, 2.0));
+ rowColors[3] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(2.0, 2.0));
+ vec4 s3 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ vec4 bicubicColor = ((wy.x * s0 + wy.y * s1) + wy.z * s2) + wy.w * s3;
+ bicubicColor.xyz = max(vec3(0.0), min(bicubicColor.xyz, bicubicColor.www));
+ _output = bicubicColor * _input;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = Bicubic_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ float xCoverage, yCoverage;
+ {
+ float x, y;
+ {
+ x = max(urectH_Stage2.x - gl_FragCoord.x, gl_FragCoord.x - urectH_Stage2.z);
+ y = max(urectH_Stage2.y - gl_FragCoord.y, gl_FragCoord.y - urectH_Stage2.w);
+ }
+ xCoverage = texture(uTextureSampler_0_Stage2, vec2(x * uinvSixSigma_Stage2, 0.5)).w;
+ yCoverage = texture(uTextureSampler_0_Stage2, vec2(y * uinvSixSigma_Stage2, 0.5)).w;
+ output_Stage2 = vec4(xCoverage) * yCoverage;
+ }
+ output_Stage2 = vec4(xCoverage) * yCoverage;
+ }
+ {
+ sk_FragColor = output_Stage1 * output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/49-64.shader_test b/shaders/skia/49-64.shader_test
new file mode 100644
index 0000000..4e99026
--- /dev/null
+++ b/shaders/skia/49-64.shader_test
@@ -0,0 +1,63 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec2 uDstTextureUpperLeft_Stage1;
+uniform vec2 uDstTextureCoordScale_Stage1;
+uniform sampler2D uTextureSampler_0_Stage0;
+uniform sampler2D uDstTextureSampler_Stage1;
+noperspective in vec2 vTextureCoords_Stage0;
+flat in int vTexIndex_Stage0;
+noperspective in vec4 vinColor_Stage0;
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vinColor_Stage0;
+ vec4 texColor;
+ {
+ texColor = texture(uTextureSampler_0_Stage0, vTextureCoords_Stage0);
+ }
+ outputCoverage_Stage0 = texColor;
+ }
+ {
+ if (all(lessThanEqual(outputCoverage_Stage0.xyz, vec3(0.0)))) {
+ discard;
+ }
+ vec2 _dstTexCoord = (gl_FragCoord.xy - uDstTextureUpperLeft_Stage1) * uDstTextureCoordScale_Stage1;
+ _dstTexCoord.y = 1.0 - _dstTexCoord.y;
+ vec4 _dstColor = texture(uDstTextureSampler_Stage1, _dstTexCoord);
+ sk_FragColor = blend_src_in(outputColor_Stage0, _dstColor);
+ sk_FragColor = outputCoverage_Stage0 * sk_FragColor + (vec4(1.0) - outputCoverage_Stage0) * _dstColor;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform vec2 uAtlasSizeInv_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in uvec2 inTextureCoords;
+noperspective out vec2 vTextureCoords_Stage0;
+flat out int vTexIndex_Stage0;
+noperspective out vec4 vinColor_Stage0;
+void main() {
+ ivec2 signedCoords = ivec2(int(inTextureCoords.x), int(inTextureCoords.y));
+ vec2 unormTexCoords = vec2(float(signedCoords.x / 2), float(signedCoords.y / 2));
+ vTextureCoords_Stage0 = unormTexCoords * uAtlasSizeInv_Stage0;
+ vTexIndex_Stage0 = 0;
+ vinColor_Stage0 = inColor;
+ gl_Position = vec4(inPosition.x, inPosition.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/49-65.shader_test b/shaders/skia/49-65.shader_test
new file mode 100644
index 0000000..4a83450
--- /dev/null
+++ b/shaders/skia/49-65.shader_test
@@ -0,0 +1,30 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uColor_Stage0;
+void main() {
+ {
+ sk_FragColor = vec4(1.0);
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 inPosition;
+void main() {
+ vec2 pos2 = (uViewM_Stage0 * vec3(inPosition, 1.0)).xy;
+ {
+ vec2 _posTmp = pos2;
+ _posTmp = floor(_posTmp) + vec2(0.5, 0.5);
+ gl_Position = vec4(_posTmp, 0.0, 1.0);
+ }
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/49-66.shader_test b/shaders/skia/49-66.shader_test
new file mode 100644
index 0000000..9ac5fbc
--- /dev/null
+++ b/shaders/skia/49-66.shader_test
@@ -0,0 +1,84 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 ubaseFrequency_Stage2;
+uniform float uz_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+uniform sampler2D uTextureSampler_1_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec3 vTransformedCoords_1_Stage0;
+vec3 fade_Stage2(vec3 t) {
+ return ((t * t) * t) * (t * (t * 6.0 - 15.0) + 10.0);
+}
+float perm_Stage2(float x) {
+ return texture(uTextureSampler_0_Stage2, vec2(fract(x / 256.0), 0.0)).x * 255.0;
+}
+float grad_Stage2(float x, vec3 p) {
+ return dot(texture(uTextureSampler_1_Stage2, vec2(fract(x / 16.0), 0.0)).xyz * 255.0 - vec3(1.0), p);
+}
+float lerp_Stage2(float a, float b, float w) {
+ return a + w * (b - a);
+}
+float noise_Stage2(vec3 p) {
+ vec3 P = mod(floor(p), 256.0);
+ p -= floor(p);
+ vec3 f = fade_Stage2(p);
+ float A = perm_Stage2(P.x) + P.y;
+ float AA = perm_Stage2(A) + P.z;
+ float AB = perm_Stage2(A + 1.0) + P.z;
+ float B = perm_Stage2(P.x + 1.0) + P.y;
+ float BA = perm_Stage2(B) + P.z;
+ float BB = perm_Stage2(B + 1.0) + P.z;
+ float result = lerp_Stage2(lerp_Stage2(lerp_Stage2(grad_Stage2(perm_Stage2(AA), p), grad_Stage2(perm_Stage2(BA), p + vec3(-1.0, 0.0, 0.0)), f.x), lerp_Stage2(grad_Stage2(perm_Stage2(AB), p + vec3(0.0, -1.0, 0.0)), grad_Stage2(perm_Stage2(BB), p + vec3(-1.0, -1.0, 0.0)), f.x), f.y), lerp_Stage2(lerp_Stage2(grad_Stage2(perm_Stage2(AA + 1.0), p + vec3(0.0, 0.0, -1.0)), grad_Stage2(perm_Stage2(BA + 1.0), p + vec3(-1.0, 0.0, -1.0)), f.x), lerp_Stage2(grad_Stage2(perm_Stage2(AB + 1.0), p + vec3(0.0, -1.0, -1.0)), grad_Stage2(perm_Stage2(BB + 1.0), p + vec3(-1.0, -1.0, -1.0)), f.x), f.y), f.z);
+ return result;
+}
+float noiseOctaves_Stage2(vec3 p) {
+ float result = 0.0;
+ float ratio = 1.0;
+ for (float i = 0.0;i < 7.0; i++) {
+ result += noise_Stage2(p) / ratio;
+ p *= 2.0;
+ ratio *= 2.0;
+ }
+ return (result + 1.0) / 2.0;
+}
+void main() {
+ vec4 output_Stage2;
+ {
+ vec2 vTransformedCoords_1_Stage0_ensure2D = vTransformedCoords_1_Stage0.xy / vTransformedCoords_1_Stage0.z;
+ vec2 coords = vTransformedCoords_1_Stage0_ensure2D * ubaseFrequency_Stage2;
+ float r = noiseOctaves_Stage2(vec3(coords, uz_Stage2));
+ float g = noiseOctaves_Stage2(vec3(coords, uz_Stage2));
+ float b = noiseOctaves_Stage2(vec3(coords, uz_Stage2));
+ float a = noiseOctaves_Stage2(vec3(coords, uz_Stage2));
+ output_Stage2 = vec4(r, g, b, a);
+ output_Stage2 = clamp(output_Stage2, 0.0, 1.0);
+ output_Stage2 = vec4(output_Stage2.xyz * output_Stage2.www, output_Stage2.w);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec3 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0);
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/49-67.shader_test b/shaders/skia/49-67.shader_test
new file mode 100644
index 0000000..c4846af
--- /dev/null
+++ b/shaders/skia/49-67.shader_test
@@ -0,0 +1,92 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uCoordTransformMatrix_2_Stage0;
+uniform vec4 usubset_Stage2_c0_c0;
+uniform vec4 uclamp_Stage2_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 TextureEffect_Stage2_c0_c0(vec4 _input, vec2 _coords) {
+ _coords = _coords * uCoordTransformMatrix_2_Stage0.xz + uCoordTransformMatrix_2_Stage0.yw;
+ vec4 _output;
+ vec2 inCoord = _coords;
+ vec2 subsetCoord;
+ {
+ float w = usubset_Stage2_c0_c0.z - usubset_Stage2_c0_c0.x;
+ float w2 = 2.0 * w;
+ float m = mod(inCoord.x - usubset_Stage2_c0_c0.x, w2);
+ subsetCoord.x = mix(m, w2 - m, step(w, m)) + usubset_Stage2_c0_c0.x;
+ }
+ subsetCoord.y = mod(inCoord.y - usubset_Stage2_c0_c0.y, usubset_Stage2_c0_c0.w - usubset_Stage2_c0_c0.y) + usubset_Stage2_c0_c0.y;
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage2_c0_c0.x, uclamp_Stage2_c0_c0.z);
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage2_c0_c0.y, uclamp_Stage2_c0_c0.w);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ _output = _input * textureColor;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ vec2 coord = vTransformedCoords_1_Stage0 - vec2(0.5);
+ vec2 f = fract(coord);
+ coord += 0.5 - f;
+ vec4 wx = mat4(0.055555555555555552, 0.88888888888888884, 0.055555555555555552, 0.0, -0.5, 0.0, 0.5, 0.0, 0.83333333333333337, -2.0, 1.5, -0.33333333333333331, -0.3888888888888889, 1.1666666666666667, -1.1666666666666667, 0.3888888888888889) * vec4(1.0, f.x, f.x * f.x, (f.x * f.x) * f.x);
+ vec4 wy = mat4(0.055555555555555552, 0.88888888888888884, 0.055555555555555552, 0.0, -0.5, 0.0, 0.5, 0.0, 0.83333333333333337, -2.0, 1.5, -0.33333333333333331, -0.3888888888888889, 1.1666666666666667, -1.1666666666666667, 0.3888888888888889) * vec4(1.0, f.y, f.y * f.y, (f.y * f.y) * f.y);
+ vec4 rowColors[4];
+ rowColors[0] = TextureEffect_Stage2_c0_c0(vec4(1.0), coord + vec2(-1.0, -1.0));
+ rowColors[1] = TextureEffect_Stage2_c0_c0(vec4(1.0), coord + vec2(0.0, -1.0));
+ rowColors[2] = TextureEffect_Stage2_c0_c0(vec4(1.0), coord + vec2(1.0, -1.0));
+ rowColors[3] = TextureEffect_Stage2_c0_c0(vec4(1.0), coord + vec2(2.0, -1.0));
+ vec4 s0 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ rowColors[0] = TextureEffect_Stage2_c0_c0(vec4(1.0), coord + vec2(-1.0, 0.0));
+ rowColors[1] = TextureEffect_Stage2_c0_c0(vec4(1.0), coord);
+ rowColors[2] = TextureEffect_Stage2_c0_c0(vec4(1.0), coord + vec2(1.0, 0.0));
+ rowColors[3] = TextureEffect_Stage2_c0_c0(vec4(1.0), coord + vec2(2.0, 0.0));
+ vec4 s1 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ rowColors[0] = TextureEffect_Stage2_c0_c0(vec4(1.0), coord + vec2(-1.0, 1.0));
+ rowColors[1] = TextureEffect_Stage2_c0_c0(vec4(1.0), coord + vec2(0.0, 1.0));
+ rowColors[2] = TextureEffect_Stage2_c0_c0(vec4(1.0), coord + vec2(1.0, 1.0));
+ rowColors[3] = TextureEffect_Stage2_c0_c0(vec4(1.0), coord + vec2(2.0, 1.0));
+ vec4 s2 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ rowColors[0] = TextureEffect_Stage2_c0_c0(vec4(1.0), coord + vec2(-1.0, 2.0));
+ rowColors[1] = TextureEffect_Stage2_c0_c0(vec4(1.0), coord + vec2(0.0, 2.0));
+ rowColors[2] = TextureEffect_Stage2_c0_c0(vec4(1.0), coord + vec2(1.0, 2.0));
+ rowColors[3] = TextureEffect_Stage2_c0_c0(vec4(1.0), coord + vec2(2.0, 2.0));
+ vec4 s3 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ vec4 bicubicColor = ((wy.x * s0 + wy.y * s1) + wy.z * s2) + wy.w * s3;
+ bicubicColor.xyz = max(vec3(0.0), min(bicubicColor.xyz, bicubicColor.www));
+ output_Stage2 = bicubicColor * output_Stage1;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/49-7.shader_test b/shaders/skia/49-7.shader_test
new file mode 100644
index 0000000..516130b
--- /dev/null
+++ b/shaders/skia/49-7.shader_test
@@ -0,0 +1,81 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 ucolor_Stage1_c0_c0_c0_c0;
+uniform vec4 ucolor_Stage2_c1_c0;
+noperspective in vec4 vcolor_Stage0;
+vec4 ConstColorProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = _input.w * ucolor_Stage1_c0_c0_c0_c0;
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = ConstColorProcessor_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c1_c0;
+ }
+ return _output;
+}
+vec4 blend_src(vec4 src, vec4 dst) {
+ return src;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 blend_darken(vec4 src, vec4 dst) {
+ vec4 result = blend_src_over(src, dst);
+ result.xyz = min(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
+ return result;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_src(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_darken(ConstColorProcessor_Stage2_c1_c0(vec4(1.0)), output_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 position;
+in vec4 inColor;
+noperspective out vec4 vcolor_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/49-9.shader_test b/shaders/skia/49-9.shader_test
new file mode 100644
index 0000000..55b520b
--- /dev/null
+++ b/shaders/skia/49-9.shader_test
@@ -0,0 +1,62 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uborder_Stage1;
+uniform vec4 usubset_Stage1;
+uniform vec4 uclamp_Stage1;
+uniform vec4 unorm_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+flat in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec2 inCoord = vTransformedCoords_0_Stage0;
+ inCoord *= unorm_Stage1.xy;
+ vec2 subsetCoord;
+ {
+ float w = usubset_Stage1.z - usubset_Stage1.x;
+ float w2 = 2.0 * w;
+ float m = mod(inCoord.x - usubset_Stage1.x, w2);
+ subsetCoord.x = mix(m, w2 - m, step(w, m)) + usubset_Stage1.x;
+ }
+ subsetCoord.y = inCoord.y;
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage1.x, uclamp_Stage1.z);
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage1.y, uclamp_Stage1.w);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord * unorm_Stage1.zw);
+ float errY = subsetCoord.y - clampedCoord.y;
+ textureColor = mix(textureColor, uborder_Stage1, min(abs(errY), 1.0));
+ output_Stage1 = outputColor_Stage0 * textureColor;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec2 inLocalCoords;
+in vec4 color;
+flat out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vcolor_Stage0 = color;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoords, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/49.shader_test b/shaders/skia/49.shader_test
new file mode 100644
index 0000000..f0cf7c7
--- /dev/null
+++ b/shaders/skia/49.shader_test
@@ -0,0 +1,52 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 usubset_Stage1_c0_c0;
+uniform vec4 uclamp_Stage1_c0_c0;
+uniform sampler2DRect uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 inCoord = vTransformedCoords_0_Stage0;
+ vec2 subsetCoord;
+ subsetCoord.x = inCoord.x;
+ subsetCoord.y = mod(inCoord.y - usubset_Stage1_c0_c0.y, usubset_Stage1_c0_c0.w - usubset_Stage1_c0_c0.y) + usubset_Stage1_c0_c0.y;
+ vec2 clampedCoord;
+ clampedCoord.x = subsetCoord.x;
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage1_c0_c0.y, uclamp_Stage1_c0_c0.w);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ _output = _input * textureColor;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TextureEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/490-2.shader_test b/shaders/skia/490-2.shader_test
new file mode 100644
index 0000000..1311b55
--- /dev/null
+++ b/shaders/skia/490-2.shader_test
@@ -0,0 +1,436 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+uniform vec2 uImageIncrement_Stage1;
+uniform vec4 uKernel_Stage1[6];
+uniform vec2 uKernelOffset_Stage1;
+uniform float uGain_Stage1;
+uniform float uBias_Stage1;
+uniform vec4 uTexDom_Stage1;
+uniform vec3 uDecalParams_Stage1;
+uniform vec4 uinnerRect_Stage2_c0_c0;
+uniform vec2 uradiusPlusHalf_Stage2_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+in vec4 vcolor_Stage0;
+in vec2 vTransformedCoords_0_Stage0;
+vec4 CircularRRect_Stage2_c0_c0(vec4 _input, vec2 _coords) {
+ vec4 _output;
+ vec2 dxy0 = uinnerRect_Stage2_c0_c0.xy - gl_FragCoord.xy;
+ vec2 dxy1 = gl_FragCoord.xy - uinnerRect_Stage2_c0_c0.zw;
+ vec2 dxy = max(max(dxy0, dxy1), 0.0);
+ float alpha = clamp(uradiusPlusHalf_Stage2_c0_c0.x - length(dxy), 0.0, 1.0);
+ alpha = 1.0 - alpha;
+ _output = _input * alpha;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ vec4 sum = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0 - uKernelOffset_Stage1 * uImageIncrement_Stage1;
+ vec4 c;
+ {
+ float k = uKernel_Stage1[0].x;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[0].y;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[0].z;
+ {
+ vec2 origCoord = coord + vec2(2.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[0].w;
+ {
+ vec2 origCoord = coord + vec2(3.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[1].x;
+ {
+ vec2 origCoord = coord + vec2(4.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[1].y;
+ {
+ vec2 origCoord = coord + vec2(5.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[1].z;
+ {
+ vec2 origCoord = coord + vec2(6.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[1].w;
+ {
+ vec2 origCoord = coord + vec2(7.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[2].x;
+ {
+ vec2 origCoord = coord + vec2(8.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[2].y;
+ {
+ vec2 origCoord = coord + vec2(9.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[2].z;
+ {
+ vec2 origCoord = coord + vec2(10.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[2].w;
+ {
+ vec2 origCoord = coord + vec2(11.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[3].x;
+ {
+ vec2 origCoord = coord + vec2(12.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[3].y;
+ {
+ vec2 origCoord = coord + vec2(13.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[3].z;
+ {
+ vec2 origCoord = coord + vec2(14.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[3].w;
+ {
+ vec2 origCoord = coord + vec2(15.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[4].x;
+ {
+ vec2 origCoord = coord + vec2(16.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[4].y;
+ {
+ vec2 origCoord = coord + vec2(17.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[4].z;
+ {
+ vec2 origCoord = coord + vec2(18.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[4].w;
+ {
+ vec2 origCoord = coord + vec2(19.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[5].x;
+ {
+ vec2 origCoord = coord + vec2(20.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[5].y;
+ {
+ vec2 origCoord = coord + vec2(21.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ output_Stage1 = sum * uGain_Stage1 + uBias_Stage1;
+ output_Stage1.w = clamp(output_Stage1.w, 0.0, 1.0);
+ output_Stage1.xyz = clamp(output_Stage1.xyz, 0.0, output_Stage1.w);
+ }
+ {
+ CircularRRect_Stage2_c0_c0(output_Stage1, gl_FragCoord.xy);
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+out vec4 vcolor_Stage0;
+out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 color = inColor;
+ vcolor_Stage0 = color;
+ vec3 pos3 = uViewM_Stage0 * vec3(inPosition, 1.0);
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos3.x, pos3.y, 0.0, pos3.z);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/490-3.shader_test b/shaders/skia/490-3.shader_test
new file mode 100644
index 0000000..6601b48
--- /dev/null
+++ b/shaders/skia/490-3.shader_test
@@ -0,0 +1,53 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 urectH_Stage2;
+uniform float uinvSixSigma_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ float xCoverage, yCoverage;
+ {
+ float x, y;
+ {
+ x = max(urectH_Stage2.x - gl_FragCoord.x, gl_FragCoord.x - urectH_Stage2.z);
+ y = max(urectH_Stage2.y - gl_FragCoord.y, gl_FragCoord.y - urectH_Stage2.w);
+ }
+ xCoverage = texture(uTextureSampler_0_Stage2, vec2(x * uinvSixSigma_Stage2, 0.5)).w;
+ yCoverage = texture(uTextureSampler_0_Stage2, vec2(y * uinvSixSigma_Stage2, 0.5)).w;
+ output_Stage2 = (output_Stage1 * xCoverage) * yCoverage;
+ }
+ output_Stage2 = (output_Stage1 * xCoverage) * yCoverage;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/490-4.shader_test b/shaders/skia/490-4.shader_test
new file mode 100644
index 0000000..45e8d51
--- /dev/null
+++ b/shaders/skia/490-4.shader_test
@@ -0,0 +1,74 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform float uPixelSize_Stage2_c1_c0;
+uniform vec2 uRange_Stage2_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 ClampFragmentProcessor_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ float alpha = clamp(_input.w, 0.0, 1.0);
+ _output = vec4(clamp(_input.xyz, 0.0, alpha), alpha);
+ }
+ return _output;
+}
+vec4 Morphology_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_1_Stage0;
+ coord.y -= 4.0 * uPixelSize_Stage2_c1_c0;
+ for (int i = 0;i < 9; i++) {
+ _output = max(_output, texture(uTextureSampler_0_Stage2, coord));
+ coord.y += uPixelSize_Stage2_c1_c0;
+ }
+ _output *= _input;
+ return _output;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 blend_darken(vec4 src, vec4 dst) {
+ vec4 result = blend_src_over(src, dst);
+ result.xyz = min(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
+ return result;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ vec4 inputColor = vec4(output_Stage1.xyz, 1.0);
+ output_Stage2 = blend_darken(ClampFragmentProcessor_Stage2_c0_c0(inputColor), Morphology_Stage2_c1_c0(inputColor));
+ output_Stage2 *= output_Stage1.w;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/490.shader_test b/shaders/skia/490.shader_test
new file mode 100644
index 0000000..3685353
--- /dev/null
+++ b/shaders/skia/490.shader_test
@@ -0,0 +1,163 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage2_c1_c0;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.w) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ } else {
+ {
+ if (t < uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = OverrideInputFragmentProcessor_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c1_c0;
+ }
+ return _output;
+}
+float _blend_overlay_component(float sc, float sa, float dc, float da) {
+ if (2.0 * dc <= da) {
+ return (2.0 * sc) * dc;
+ }
+ return sa * da - (2.0 * (da - dc)) * (sa - sc);
+}
+vec4 blend_overlay(vec4 src, vec4 dst) {
+ vec4 result = vec4(_blend_overlay_component(src.x, src.w, dst.x, dst.w), _blend_overlay_component(src.y, src.w, dst.y, dst.w), _blend_overlay_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+ result.xyz += dst.xyz * (1.0 - src.w) + src.xyz * (1.0 - dst.w);
+ return result;
+}
+vec4 blend_hard_light(vec4 src, vec4 dst) {
+ return blend_overlay(dst, src);
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 blend_darken(vec4 src, vec4 dst) {
+ vec4 result = blend_src_over(src, dst);
+ result.xyz = min(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
+ return result;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_hard_light(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_darken(ConstColorProcessor_Stage2_c1_c0(vec4(1.0)), output_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 inColor;
+in vec2 inLocalCoord;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/493-2.shader_test b/shaders/skia/493-2.shader_test
new file mode 100644
index 0000000..0fa0359
--- /dev/null
+++ b/shaders/skia/493-2.shader_test
@@ -0,0 +1,35 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_KHR_blend_equation_advanced : require
+out vec4 sk_FragColor;
+layout (blend_support_all_equations) out ;
+uniform vec4 uColor_Stage0;
+uniform float uCoverage_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = uColor_Stage0;
+ outputCoverage_Stage0 = vec4(uCoverage_Stage0);
+ }
+ {
+ sk_FragColor = outputCoverage_Stage0 * outputColor_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 inPosition;
+void main() {
+ vec2 pos2 = (uViewM_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/493-3.shader_test b/shaders/skia/493-3.shader_test
new file mode 100644
index 0000000..8f9f9d7
--- /dev/null
+++ b/shaders/skia/493-3.shader_test
@@ -0,0 +1,100 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uscale0_1_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage2_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage2_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage2_c0_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 LinearGradientLayout_Stage2_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_1_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage2_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage2_c0_c0_c1_c0;
+ bias = ubias0_1_Stage2_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage2_c0_c0_c1_c0;
+ bias = ubias2_3_Stage2_c0_c0_c1_c0;
+ }
+ } else {
+ {
+ scale = uscale4_5_Stage2_c0_c0_c1_c0;
+ bias = ubias4_5_Stage2_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage2_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage2_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_dst_in(output_Stage1, TiledGradientEffect_Stage2_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/493-4.shader_test b/shaders/skia/493-4.shader_test
new file mode 100644
index 0000000..d1e48cb
--- /dev/null
+++ b/shaders/skia/493-4.shader_test
@@ -0,0 +1,302 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage2_c0_c0;
+uniform vec4 uKernel_Stage2_c0_c0[5];
+uniform vec2 uKernelOffset_Stage2_c0_c0;
+uniform float uGain_Stage2_c0_c0;
+uniform float uBias_Stage2_c0_c0;
+uniform vec4 uTexDom_Stage2_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 MatrixConvolution_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 sum = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_1_Stage0 - uKernelOffset_Stage2_c0_c0 * uImageIncrement_Stage2_c0_c0;
+ vec4 c;
+ {
+ float k = uKernel_Stage2_c0_c0[0].x;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2_c0_c0[0].y;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2_c0_c0[0].z;
+ {
+ vec2 origCoord = coord + vec2(2.0, 0.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2_c0_c0[0].w;
+ {
+ vec2 origCoord = coord + vec2(3.0, 0.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2_c0_c0[1].x;
+ {
+ vec2 origCoord = coord + vec2(4.0, 0.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2_c0_c0[1].y;
+ {
+ vec2 origCoord = coord + vec2(5.0, 0.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2_c0_c0[1].z;
+ {
+ vec2 origCoord = coord + vec2(6.0, 0.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2_c0_c0[1].w;
+ {
+ vec2 origCoord = coord + vec2(7.0, 0.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2_c0_c0[2].x;
+ {
+ vec2 origCoord = coord + vec2(8.0, 0.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2_c0_c0[2].y;
+ {
+ vec2 origCoord = coord + vec2(9.0, 0.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2_c0_c0[2].z;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2_c0_c0[2].w;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2_c0_c0[3].x;
+ {
+ vec2 origCoord = coord + vec2(2.0, 1.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2_c0_c0[3].y;
+ {
+ vec2 origCoord = coord + vec2(3.0, 1.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2_c0_c0[3].z;
+ {
+ vec2 origCoord = coord + vec2(4.0, 1.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2_c0_c0[3].w;
+ {
+ vec2 origCoord = coord + vec2(5.0, 1.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2_c0_c0[4].x;
+ {
+ vec2 origCoord = coord + vec2(6.0, 1.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2_c0_c0[4].y;
+ {
+ vec2 origCoord = coord + vec2(7.0, 1.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2_c0_c0[4].z;
+ {
+ vec2 origCoord = coord + vec2(8.0, 1.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2_c0_c0[4].w;
+ {
+ vec2 origCoord = coord + vec2(9.0, 1.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ _output = sum * uGain_Stage2_c0_c0 + uBias_Stage2_c0_c0;
+ _output.w = clamp(_output.w, 0.0, 1.0);
+ _output.xyz = clamp(_output.xyz, 0.0, _output.w);
+ _output *= _input;
+ return _output;
+}
+vec4 ClampFragmentProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = clamp(_input, 0.0, 1.0);
+ }
+ return _output;
+}
+float _blend_overlay_component(float sc, float sa, float dc, float da) {
+ if (2.0 * dc <= da) {
+ return (2.0 * sc) * dc;
+ }
+ return sa * da - (2.0 * (da - dc)) * (sa - sc);
+}
+vec4 blend_overlay(vec4 src, vec4 dst) {
+ vec4 result = vec4(_blend_overlay_component(src.x, src.w, dst.x, dst.w), _blend_overlay_component(src.y, src.w, dst.y, dst.w), _blend_overlay_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+ result.xyz += dst.xyz * (1.0 - src.w) + src.xyz * (1.0 - dst.w);
+ return result;
+}
+vec4 blend_hard_light(vec4 src, vec4 dst) {
+ return blend_overlay(dst, src);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ vec4 inputColor = vec4(output_Stage1.xyz, 1.0);
+ output_Stage2 = blend_hard_light(MatrixConvolution_Stage2_c0_c0(inputColor), ClampFragmentProcessor_Stage2_c1_c0(inputColor));
+ output_Stage2 *= output_Stage1.w;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/493.shader_test b/shaders/skia/493.shader_test
new file mode 100644
index 0000000..c1a90af
--- /dev/null
+++ b/shaders/skia/493.shader_test
@@ -0,0 +1,92 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 ucolor_Stage1_c0_c0_c0_c0;
+uniform vec4 ucolor_Stage2_c1_c0;
+noperspective in vec4 vcolor_Stage0;
+vec4 ConstColorProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = _input.w * ucolor_Stage1_c0_c0_c0_c0;
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = ConstColorProcessor_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c1_c0;
+ }
+ return _output;
+}
+float _blend_overlay_component(float sc, float sa, float dc, float da) {
+ if (2.0 * dc <= da) {
+ return (2.0 * sc) * dc;
+ }
+ return sa * da - (2.0 * (da - dc)) * (sa - sc);
+}
+vec4 blend_overlay(vec4 src, vec4 dst) {
+ vec4 result = vec4(_blend_overlay_component(src.x, src.w, dst.x, dst.w), _blend_overlay_component(src.y, src.w, dst.y, dst.w), _blend_overlay_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+ result.xyz += dst.xyz * (1.0 - src.w) + src.xyz * (1.0 - dst.w);
+ return result;
+}
+vec4 blend_hard_light(vec4 src, vec4 dst) {
+ return blend_overlay(dst, src);
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 blend_darken(vec4 src, vec4 dst) {
+ vec4 result = blend_src_over(src, dst);
+ result.xyz = min(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
+ return result;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_hard_light(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_darken(ConstColorProcessor_Stage2_c1_c0(vec4(1.0)), output_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 position;
+in vec4 inColor;
+noperspective out vec4 vcolor_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/496-2.shader_test b/shaders/skia/496-2.shader_test
new file mode 100644
index 0000000..6f221b8
--- /dev/null
+++ b/shaders/skia/496-2.shader_test
@@ -0,0 +1,76 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_KHR_blend_equation_advanced : require
+out vec4 sk_FragColor;
+layout (blend_support_all_equations) out ;
+uniform vec4 uColor_Stage0;
+uniform vec4 ucircle_Stage1_c0_c0;
+uniform vec4 ucircleData_Stage1_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec3 vDashParams_Stage0;
+noperspective in vec4 vRectParams_Stage0;
+vec4 CircleEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ float d;
+ {
+ d = (length((ucircle_Stage1_c0_c0.xy - gl_FragCoord.xy) * ucircle_Stage1_c0_c0.w) - 1.0) * ucircle_Stage1_c0_c0.z;
+ }
+ {
+ _output = d > 0.5 ? _input : vec4(0.0);
+ }
+ return _output;
+}
+vec4 CircleBlurFragmentProcessor_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 vec = vec2((gl_FragCoord.x - ucircleData_Stage1_c1_c0.x) * ucircleData_Stage1_c1_c0.w, (gl_FragCoord.y - ucircleData_Stage1_c1_c0.y) * ucircleData_Stage1_c1_c0.w);
+ float dist = length(vec) + (0.5 - ucircleData_Stage1_c1_c0.z) * ucircleData_Stage1_c1_c0.w;
+ _output = _input * texture(uTextureSampler_0_Stage1, vec2(dist, 0.5)).w;
+ return _output;
+}
+vec4 blend_dst_atop(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src + src.w * dst;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = uColor_Stage0;
+ float xShifted = vDashParams_Stage0.x - floor(vDashParams_Stage0.x / vDashParams_Stage0.z) * vDashParams_Stage0.z;
+ vec2 fragPosShifted = vec2(xShifted, vDashParams_Stage0.y);
+ float alpha = 1.0;
+ alpha *= fragPosShifted.x - vRectParams_Stage0.x > -0.5 ? 1.0 : 0.0;
+ alpha *= vRectParams_Stage0.z - fragPosShifted.x >= -0.5 ? 1.0 : 0.0;
+ outputCoverage_Stage0 = vec4(alpha);
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_dst_atop(CircleEffect_Stage1_c0_c0(inputColor), CircleBlurFragmentProcessor_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ sk_FragColor = outputCoverage_Stage0 * output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 inPosition;
+in vec3 inDashParams;
+in vec4 inRect;
+noperspective out vec3 vDashParams_Stage0;
+noperspective out vec4 vRectParams_Stage0;
+void main() {
+ vDashParams_Stage0 = inDashParams;
+ vRectParams_Stage0 = inRect;
+ vec2 pos2 = inPosition;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/496-3.shader_test b/shaders/skia/496-3.shader_test
new file mode 100644
index 0000000..a2ffee3
--- /dev/null
+++ b/shaders/skia/496-3.shader_test
@@ -0,0 +1,86 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uscale01_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias01_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale23_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias23_Stage2_c0_c0_c1_c0;
+uniform float uthreshold_Stage2_c0_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 LinearGradientLayout_Stage2_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_1_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 DualIntervalGradientColorizer_Stage2_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthreshold_Stage2_c0_c0_c1_c0) {
+ scale = uscale01_Stage2_c0_c0_c1_c0;
+ bias = ubias01_Stage2_c0_c0_c1_c0;
+ } else {
+ scale = uscale23_Stage2_c0_c0_c1_c0;
+ bias = ubias23_Stage2_c0_c0_c1_c0;
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage2_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ t.x = fract(t.x);
+ }
+ _output = DualIntervalGradientColorizer_Stage2_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_dst_in(output_Stage1, TiledGradientEffect_Stage2_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/496-4.shader_test b/shaders/skia/496-4.shader_test
new file mode 100644
index 0000000..56cb6e7
--- /dev/null
+++ b/shaders/skia/496-4.shader_test
@@ -0,0 +1,68 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uinnerRect_Stage2_c1_c0;
+uniform vec2 uinvRadiiXY_Stage2_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 ClampFragmentProcessor_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ float alpha = clamp(_input.w, 0.0, 1.0);
+ _output = vec4(clamp(_input.xyz, 0.0, alpha), alpha);
+ }
+ return _output;
+}
+vec4 EllipticalRRect_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 dxy0 = uinnerRect_Stage2_c1_c0.xy - gl_FragCoord.xy;
+ vec2 dxy1 = gl_FragCoord.xy - uinnerRect_Stage2_c1_c0.zw;
+ vec2 dxy = max(max(dxy0, dxy1), 0.0);
+ vec2 Z = dxy * uinvRadiiXY_Stage2_c1_c0;
+ float implicit = dot(Z, dxy) - 1.0;
+ float grad_dot = 4.0 * dot(Z, Z);
+ grad_dot = max(grad_dot, 9.9999997473787516e-05);
+ float approx_dist = implicit * inversesqrt(grad_dot);
+ float alpha = clamp(0.5 + approx_dist, 0.0, 1.0);
+ _output = _input * alpha;
+ return _output;
+}
+vec4 blend_screen(vec4 src, vec4 dst) {
+ return src + (1.0 - src) * dst;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ vec4 inputColor = vec4(output_Stage1.xyz, 1.0);
+ output_Stage2 = blend_screen(ClampFragmentProcessor_Stage2_c0_c0(inputColor), EllipticalRRect_Stage2_c1_c0(inputColor));
+ output_Stage2 *= output_Stage1.w;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/496.shader_test b/shaders/skia/496.shader_test
new file mode 100644
index 0000000..5df95af
--- /dev/null
+++ b/shaders/skia/496.shader_test
@@ -0,0 +1,156 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage2;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.w) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ } else {
+ {
+ if (t < uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+vec4 ComposeOne_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_dst_in(_input, TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0)));
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = ComposeOne_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+float _blend_overlay_component(float sc, float sa, float dc, float da) {
+ if (2.0 * dc <= da) {
+ return (2.0 * sc) * dc;
+ }
+ return sa * da - (2.0 * (da - dc)) * (sa - sc);
+}
+vec4 blend_overlay(vec4 src, vec4 dst) {
+ vec4 result = vec4(_blend_overlay_component(src.x, src.w, dst.x, dst.w), _blend_overlay_component(src.y, src.w, dst.y, dst.w), _blend_overlay_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+ result.xyz += dst.xyz * (1.0 - src.w) + src.xyz * (1.0 - dst.w);
+ return result;
+}
+vec4 blend_hard_light(vec4 src, vec4 dst) {
+ return blend_overlay(dst, src);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_hard_light(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ {
+ output_Stage2 = output_Stage1 * ucolor_Stage2;
+ }
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 inColor;
+in vec2 inLocalCoord;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/499-2.shader_test b/shaders/skia/499-2.shader_test
new file mode 100644
index 0000000..5383f60
--- /dev/null
+++ b/shaders/skia/499-2.shader_test
@@ -0,0 +1,137 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+uniform vec4 ucolor_Stage1;
+uniform vec4 uk_Stage2;
+uniform vec4 ucolor_Stage2_c0_c0;
+uniform float uinnerThreshold_Stage3_c1_c0;
+uniform float uouterThreshold_Stage3_c1_c0;
+uniform vec4 urectH_Stage4;
+uniform float uinvSixSigma_Stage4;
+uniform sampler2D uTextureSampler_0_Stage3;
+uniform sampler2D uTextureSampler_0_Stage4;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 ConstColorProcessor_Stage2_c0_c0(vec4 _input, vec2 _coords) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c0_c0;
+ }
+ return _output;
+}
+vec4 AlphaThresholdFragmentProcessor_Stage3_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 color = _input;
+ vec4 mask_color = texture(uTextureSampler_0_Stage3, vTransformedCoords_1_Stage0);
+ if (mask_color.w < 0.5) {
+ if (color.w > uouterThreshold_Stage3_c1_c0) {
+ float scale = uouterThreshold_Stage3_c1_c0 / color.w;
+ color.xyz *= scale;
+ color.w = uouterThreshold_Stage3_c1_c0;
+ }
+ } else if (color.w < uinnerThreshold_Stage3_c1_c0) {
+ float scale = uinnerThreshold_Stage3_c1_c0 / max(0.0010000000474974513, color.w);
+ color.xyz *= scale;
+ color.w = uinnerThreshold_Stage3_c1_c0;
+ }
+ _output = color;
+ return _output;
+}
+float _blend_color_saturation(vec3 color) {
+ return max(max(color.x, color.y), color.z) - min(min(color.x, color.y), color.z);
+}
+vec3 _blend_set_color_saturation_helper(vec3 minMidMax, float sat) {
+ if (minMidMax.x < minMidMax.z) {
+ return vec3(0.0, (sat * (minMidMax.y - minMidMax.x)) / (minMidMax.z - minMidMax.x), sat);
+ }
+ return vec3(0.0);
+}
+vec3 _blend_set_color_saturation(vec3 hueLumColor, vec3 satColor) {
+ float sat = _blend_color_saturation(satColor);
+ if (hueLumColor.x <= hueLumColor.y) {
+ if (hueLumColor.y <= hueLumColor.z) {
+ hueLumColor.xyz = _blend_set_color_saturation_helper(hueLumColor, sat);
+ } else if (hueLumColor.x <= hueLumColor.z) {
+ hueLumColor.xzy = _blend_set_color_saturation_helper(hueLumColor.xzy, sat);
+ } else {
+ hueLumColor.zxy = _blend_set_color_saturation_helper(hueLumColor.zxy, sat);
+ }
+ } else if (hueLumColor.x <= hueLumColor.z) {
+ hueLumColor.yxz = _blend_set_color_saturation_helper(hueLumColor.yxz, sat);
+ } else if (hueLumColor.y <= hueLumColor.z) {
+ hueLumColor.yzx = _blend_set_color_saturation_helper(hueLumColor.yzx, sat);
+ } else {
+ hueLumColor.zyx = _blend_set_color_saturation_helper(hueLumColor.zyx, sat);
+ }
+ return hueLumColor;
+}
+float _blend_color_luminance(vec3 color) {
+ return dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), color);
+}
+vec3 _blend_set_color_luminance(vec3 hueSatColor, float alpha, vec3 lumColor) {
+ float lum = _blend_color_luminance(lumColor);
+ vec3 result = (lum - _blend_color_luminance(hueSatColor)) + hueSatColor;
+ float minComp = min(min(result.x, result.y), result.z);
+ float maxComp = max(max(result.x, result.y), result.z);
+ if (minComp < 0.0 && lum != minComp) {
+ result = lum + ((result - lum) * lum) / (lum - minComp);
+ }
+ if (maxComp > alpha && maxComp != lum) {
+ return lum + ((result - lum) * (alpha - lum)) / (maxComp - lum);
+ }
+ return result;
+}
+vec4 blend_hue(vec4 src, vec4 dst) {
+ float alpha = dst.w * src.w;
+ vec3 sda = src.xyz * dst.w;
+ vec3 dsa = dst.xyz * src.w;
+ return vec4((((_blend_set_color_luminance(_blend_set_color_saturation(sda, dsa), alpha, dsa) + dst.xyz) - dsa) + src.xyz) - sda, (src.w + dst.w) - alpha);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ {
+ output_Stage1 = ucolor_Stage1;
+ }
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ vec4 dst = ConstColorProcessor_Stage2_c0_c0(vec4(1.0), vTransformedCoords_0_Stage0);
+ output_Stage2 = clamp((((uk_Stage2.x * output_Stage2) * dst + uk_Stage2.y * output_Stage2) + uk_Stage2.z * dst) + uk_Stage2.w, 0.0, 1.0);
+ {
+ output_Stage2.xyz = min(output_Stage2.xyz, output_Stage2.w);
+ }
+ }
+ {
+ blend_hue(AlphaThresholdFragmentProcessor_Stage3_c1_c0(vec4(1.0)), output_Stage2);
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec2 inLocalCoord;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vec4 color = inColor;
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/499-3.shader_test b/shaders/skia/499-3.shader_test
new file mode 100644
index 0000000..e6864e6
--- /dev/null
+++ b/shaders/skia/499-3.shader_test
@@ -0,0 +1,115 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage2_c0_c0;
+uniform vec4 urightBorderColor_Stage2_c0_c0;
+uniform vec4 uscale0_1_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale8_9_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias8_9_Stage2_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage2_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage2_c0_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 LinearGradientLayout_Stage2_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_1_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage2_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.w) {
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage2_c0_c0_c1_c0;
+ bias = ubias0_1_Stage2_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage2_c0_c0_c1_c0;
+ bias = ubias2_3_Stage2_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage2_c0_c0_c1_c0;
+ bias = ubias4_5_Stage2_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage2_c0_c0_c1_c0;
+ bias = ubias6_7_Stage2_c0_c0_c1_c0;
+ }
+ }
+ } else {
+ {
+ {
+ scale = uscale8_9_Stage2_c0_c0_c1_c0;
+ bias = ubias8_9_Stage2_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage2_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage2_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage2_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage2_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_dst_in(output_Stage1, ClampedGradientEffect_Stage2_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/499-4.shader_test b/shaders/skia/499-4.shader_test
new file mode 100644
index 0000000..cc2e8f3
--- /dev/null
+++ b/shaders/skia/499-4.shader_test
@@ -0,0 +1,55 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 ucolor_Stage2_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 Big_Ole_Key_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = _input;
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = _input.w * ucolor_Stage2_c1_c0;
+ }
+ return _output;
+}
+vec4 blend_src_atop(vec4 src, vec4 dst) {
+ return dst.w * src + (1.0 - src.w) * dst;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ vec4 inputColor = vec4(output_Stage1.xyz, 1.0);
+ output_Stage2 = blend_src_atop(Big_Ole_Key_Stage2_c0_c0(inputColor), ConstColorProcessor_Stage2_c1_c0(inputColor));
+ output_Stage2 *= output_Stage1.w;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/499.shader_test b/shaders/skia/499.shader_test
new file mode 100644
index 0000000..ba33d0d
--- /dev/null
+++ b/shaders/skia/499.shader_test
@@ -0,0 +1,79 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 ucolor_Stage1_c0_c0_c0_c0;
+uniform vec4 ucolor_Stage2;
+noperspective in vec4 vcolor_Stage0;
+vec4 ConstColorProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = _input.w * ucolor_Stage1_c0_c0_c0_c0;
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = ConstColorProcessor_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+float _blend_overlay_component(float sc, float sa, float dc, float da) {
+ if (2.0 * dc <= da) {
+ return (2.0 * sc) * dc;
+ }
+ return sa * da - (2.0 * (da - dc)) * (sa - sc);
+}
+vec4 blend_overlay(vec4 src, vec4 dst) {
+ vec4 result = vec4(_blend_overlay_component(src.x, src.w, dst.x, dst.w), _blend_overlay_component(src.y, src.w, dst.y, dst.w), _blend_overlay_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+ result.xyz += dst.xyz * (1.0 - src.w) + src.xyz * (1.0 - dst.w);
+ return result;
+}
+vec4 blend_hard_light(vec4 src, vec4 dst) {
+ return blend_overlay(dst, src);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_hard_light(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ {
+ output_Stage2 = output_Stage1 * ucolor_Stage2;
+ }
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 position;
+in vec4 inColor;
+noperspective out vec4 vcolor_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/502-2.shader_test b/shaders/skia/502-2.shader_test
new file mode 100644
index 0000000..6261a0c
--- /dev/null
+++ b/shaders/skia/502-2.shader_test
@@ -0,0 +1,146 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uColor_Stage0;
+uniform vec4 ucircleData_Stage1_c0_c0_c0_c0_c0_c0;
+uniform vec4 uinnerRect_Stage1_c1_c0;
+uniform vec2 uradiusPlusHalf_Stage1_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+vec4 CircleBlurFragmentProcessor_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 vec = vec2((gl_FragCoord.x - ucircleData_Stage1_c0_c0_c0_c0_c0_c0.x) * ucircleData_Stage1_c0_c0_c0_c0_c0_c0.w, (gl_FragCoord.y - ucircleData_Stage1_c0_c0_c0_c0_c0_c0.y) * ucircleData_Stage1_c0_c0_c0_c0_c0_c0.w);
+ float dist = length(vec) + (0.5 - ucircleData_Stage1_c0_c0_c0_c0_c0_c0.z) * ucircleData_Stage1_c0_c0_c0_c0_c0_c0.w;
+ _output = _input * texture(uTextureSampler_0_Stage1, vec2(dist, 0.5)).w;
+ return _output;
+}
+vec4 ColorTableEffect_Stage1_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float nonZeroAlpha = max(_input.w, 9.9999997473787516e-05);
+ vec4 coord = vec4(_input.xyz / nonZeroAlpha, nonZeroAlpha);
+ coord = coord * 0.9960939884185791 + vec4(0.0019529999699443579, 0.0019529999699443579, 0.0019529999699443579, 0.0019529999699443579);
+ _output.w = texture(uTextureSampler_1_Stage1, vec2(coord.w, 0.125)).w;
+ _output.x = texture(uTextureSampler_1_Stage1, vec2(coord.x, 0.375)).w;
+ _output.y = texture(uTextureSampler_1_Stage1, vec2(coord.y, 0.625)).w;
+ _output.z = texture(uTextureSampler_1_Stage1, vec2(coord.z, 0.875)).w;
+ _output.xyz *= _output.w;
+ return _output;
+}
+float _blend_color_saturation(vec3 color) {
+ return max(max(color.x, color.y), color.z) - min(min(color.x, color.y), color.z);
+}
+vec3 _blend_set_color_saturation_helper(vec3 minMidMax, float sat) {
+ if (minMidMax.x < minMidMax.z) {
+ return vec3(0.0, (sat * (minMidMax.y - minMidMax.x)) / (minMidMax.z - minMidMax.x), sat);
+ }
+ return vec3(0.0);
+}
+vec3 _blend_set_color_saturation(vec3 hueLumColor, vec3 satColor) {
+ float sat = _blend_color_saturation(satColor);
+ if (hueLumColor.x <= hueLumColor.y) {
+ if (hueLumColor.y <= hueLumColor.z) {
+ hueLumColor.xyz = _blend_set_color_saturation_helper(hueLumColor, sat);
+ } else if (hueLumColor.x <= hueLumColor.z) {
+ hueLumColor.xzy = _blend_set_color_saturation_helper(hueLumColor.xzy, sat);
+ } else {
+ hueLumColor.zxy = _blend_set_color_saturation_helper(hueLumColor.zxy, sat);
+ }
+ } else if (hueLumColor.x <= hueLumColor.z) {
+ hueLumColor.yxz = _blend_set_color_saturation_helper(hueLumColor.yxz, sat);
+ } else if (hueLumColor.y <= hueLumColor.z) {
+ hueLumColor.yzx = _blend_set_color_saturation_helper(hueLumColor.yzx, sat);
+ } else {
+ hueLumColor.zyx = _blend_set_color_saturation_helper(hueLumColor.zyx, sat);
+ }
+ return hueLumColor;
+}
+float _blend_color_luminance(vec3 color) {
+ return dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), color);
+}
+vec3 _blend_set_color_luminance(vec3 hueSatColor, float alpha, vec3 lumColor) {
+ float lum = _blend_color_luminance(lumColor);
+ vec3 result = (lum - _blend_color_luminance(hueSatColor)) + hueSatColor;
+ float minComp = min(min(result.x, result.y), result.z);
+ float maxComp = max(max(result.x, result.y), result.z);
+ if (minComp < 0.0 && lum != minComp) {
+ result = lum + ((result - lum) * lum) / (lum - minComp);
+ }
+ if (maxComp > alpha && maxComp != lum) {
+ return lum + ((result - lum) * (alpha - lum)) / (maxComp - lum);
+ }
+ return result;
+}
+vec4 blend_hue(vec4 src, vec4 dst) {
+ float alpha = dst.w * src.w;
+ vec3 sda = src.xyz * dst.w;
+ vec3 dsa = dst.xyz * src.w;
+ return vec4((((_blend_set_color_luminance(_blend_set_color_saturation(sda, dsa), alpha, dsa) + dst.xyz) - dsa) + src.xyz) - sda, (src.w + dst.w) - alpha);
+}
+vec4 ComposeTwo_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_hue(CircleBlurFragmentProcessor_Stage1_c0_c0_c0_c0_c0_c0(inputColor), ColorTableEffect_Stage1_c0_c0_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 Big_Ole_Key_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = _input;
+ return _output;
+}
+vec4 blend_modulate(vec4 src, vec4 dst) {
+ return src * dst;
+}
+vec4 ComposeTwo_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_modulate(ComposeTwo_Stage1_c0_c0_c0_c0(inputColor), Big_Ole_Key_Stage1_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 CircularRRect_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 dxy0 = uinnerRect_Stage1_c1_c0.xy - gl_FragCoord.xy;
+ vec2 dxy1 = gl_FragCoord.xy - uinnerRect_Stage1_c1_c0.zw;
+ vec2 dxy = max(max(dxy0, dxy1), 0.0);
+ float alpha = clamp(uradiusPlusHalf_Stage1_c1_c0.x - length(dxy), 0.0, 1.0);
+ _output = _input * alpha;
+ return _output;
+}
+vec4 blend_dst_out(vec4 src, vec4 dst) {
+ return (1.0 - src.w) * dst;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = uColor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_dst_out(ComposeTwo_Stage1_c0_c0(inputColor), CircularRRect_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 position;
+void main() {
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/502-3.shader_test b/shaders/skia/502-3.shader_test
new file mode 100644
index 0000000..82ee9d3
--- /dev/null
+++ b/shaders/skia/502-3.shader_test
@@ -0,0 +1,103 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uscale0_1_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage2_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage2_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage2_c0_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 LinearGradientLayout_Stage2_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_1_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage2_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage2_c0_c0_c1_c0;
+ bias = ubias0_1_Stage2_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage2_c0_c0_c1_c0;
+ bias = ubias2_3_Stage2_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage2_c0_c0_c1_c0;
+ bias = ubias4_5_Stage2_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage2_c0_c0_c1_c0;
+ bias = ubias6_7_Stage2_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage2_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ t.x = fract(t.x);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage2_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_dst_in(output_Stage1, TiledGradientEffect_Stage2_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/502-4.shader_test b/shaders/skia/502-4.shader_test
new file mode 100644
index 0000000..dd81feb
--- /dev/null
+++ b/shaders/skia/502-4.shader_test
@@ -0,0 +1,237 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage2_c0_c0;
+uniform float uSurfaceScale_Stage2_c0_c0;
+uniform vec3 uLightColor_Stage2_c0_c0;
+uniform float uKS_Stage2_c0_c0;
+uniform float uShininess_Stage2_c0_c0;
+uniform vec4 uTexDom_Stage2_c0_c0;
+uniform vec3 uDecalParams_Stage2_c0_c0;
+uniform vec3 uLightDirection_Stage2_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 light_Stage2_c0_c0(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ vec3 halfDir = normalize(surfaceToLight + vec3(0.0, 0.0, 1.0));
+ float colorScale = uKS_Stage2_c0_c0 * pow(dot(normal, halfDir), uShininess_Stage2_c0_c0);
+ vec3 color = lightColor * clamp(colorScale, 0.0, 1.0);
+ return vec4(color, max(max(color.x, color.y), color.z));
+}
+float sobel_Stage2_c0_c0(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage2_c0_c0(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage2_c0_c0(float m[9], float surfaceScale) {
+ return pointToNormal_Stage2_c0_c0(sobel_Stage2_c0_c0(0.0, 0.0, m[4], m[5], m[7], m[8], 0.66666698455810547), sobel_Stage2_c0_c0(0.0, 0.0, m[4], m[7], m[5], m[8], 0.66666698455810547), surfaceScale);
+}
+vec4 SpecularLighting_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coord = vTransformedCoords_1_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c0_c0.y);
+ if (err > uDecalParams_Stage2_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp0 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c0_c0.y);
+ if (err > uDecalParams_Stage2_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c0_c0.y);
+ if (err > uDecalParams_Stage2_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c0_c0.y);
+ if (err > uDecalParams_Stage2_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c0_c0.y);
+ if (err > uDecalParams_Stage2_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c0_c0.y);
+ if (err > uDecalParams_Stage2_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp5 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c0_c0.y);
+ if (err > uDecalParams_Stage2_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp6 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c0_c0.y);
+ if (err > uDecalParams_Stage2_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp7 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c0_c0.y);
+ if (err > uDecalParams_Stage2_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp8 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = uLightDirection_Stage2_c0_c0;
+ _output = light_Stage2_c0_c0(normal_Stage2_c0_c0(m, uSurfaceScale_Stage2_c0_c0), surfaceToLight, uLightColor_Stage2_c0_c0);
+ _output *= _input;
+ return _output;
+}
+vec4 ClampFragmentProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ float alpha = clamp(_input.w, 0.0, 1.0);
+ _output = vec4(clamp(_input.xyz, 0.0, alpha), alpha);
+ }
+ return _output;
+}
+float _guarded_divide(float n, float d) {
+ return n / d;
+}
+float _color_dodge_component(float sc, float sa, float dc, float da) {
+ if (dc == 0.0) {
+ return sc * (1.0 - da);
+ } else {
+ float d = sa - sc;
+ if (d == 0.0) {
+ return (sa * da + sc * (1.0 - da)) + dc * (1.0 - sa);
+ }
+ d = min(da, _guarded_divide(dc * sa, d));
+ return (d * sa + sc * (1.0 - da)) + dc * (1.0 - sa);
+ }
+}
+vec4 blend_color_dodge(vec4 src, vec4 dst) {
+ return vec4(_color_dodge_component(src.x, src.w, dst.x, dst.w), _color_dodge_component(src.y, src.w, dst.y, dst.w), _color_dodge_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ vec4 inputColor = vec4(output_Stage1.xyz, 1.0);
+ output_Stage2 = blend_color_dodge(SpecularLighting_Stage2_c0_c0(inputColor), ClampFragmentProcessor_Stage2_c1_c0(inputColor));
+ output_Stage2 *= output_Stage1.w;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/502.shader_test b/shaders/skia/502.shader_test
new file mode 100644
index 0000000..298f05e
--- /dev/null
+++ b/shaders/skia/502.shader_test
@@ -0,0 +1,176 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage2;
+uniform vec4 ucolor_Stage3_c1_c0;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.w) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ } else {
+ {
+ if (t < uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+vec4 ComposeOne_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_dst_in(_input, TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0)));
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = ComposeOne_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 ConstColorProcessor_Stage3_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage3_c1_c0;
+ }
+ return _output;
+}
+float _blend_overlay_component(float sc, float sa, float dc, float da) {
+ if (2.0 * dc <= da) {
+ return (2.0 * sc) * dc;
+ }
+ return sa * da - (2.0 * (da - dc)) * (sa - sc);
+}
+vec4 blend_overlay(vec4 src, vec4 dst) {
+ vec4 result = vec4(_blend_overlay_component(src.x, src.w, dst.x, dst.w), _blend_overlay_component(src.y, src.w, dst.y, dst.w), _blend_overlay_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+ result.xyz += dst.xyz * (1.0 - src.w) + src.xyz * (1.0 - dst.w);
+ return result;
+}
+vec4 blend_hard_light(vec4 src, vec4 dst) {
+ return blend_overlay(dst, src);
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 blend_darken(vec4 src, vec4 dst) {
+ vec4 result = blend_src_over(src, dst);
+ result.xyz = min(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
+ return result;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_hard_light(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ {
+ output_Stage2 = output_Stage1 * ucolor_Stage2;
+ }
+ }
+ vec4 output_Stage3;
+ {
+ output_Stage3 = blend_darken(ConstColorProcessor_Stage3_c1_c0(vec4(1.0)), output_Stage2);
+ }
+ {
+ sk_FragColor = output_Stage3;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 inColor;
+in vec2 inLocalCoord;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/505-2.shader_test b/shaders/skia/505-2.shader_test
new file mode 100644
index 0000000..d274947
--- /dev/null
+++ b/shaders/skia/505-2.shader_test
@@ -0,0 +1,493 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec3 uedges_Stage1_c0_c0_c0_c0_c0_c0[1];
+uniform vec2 uImageIncrement_Stage1_c0_c0_c0_c0_c1_c0;
+uniform float uSurfaceScale_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec3 uLightColor_Stage1_c0_c0_c0_c0_c1_c0;
+uniform float uKS_Stage1_c0_c0_c0_c0_c1_c0;
+uniform float uShininess_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 uTexDom_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec3 uDecalParams_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec3 uLightLocation_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 uinnerRect_Stage1_c0_c0_c1_c0;
+uniform vec2 uinvRadiiXY_Stage1_c0_c0_c1_c0;
+uniform vec2 uImageIncrement_Stage1_c1_c0_c0_c0_c1_c0;
+uniform float uSurfaceScale_Stage1_c1_c0_c0_c0_c1_c0;
+uniform vec3 uLightColor_Stage1_c1_c0_c0_c0_c1_c0;
+uniform float uKD_Stage1_c1_c0_c0_c0_c1_c0;
+uniform vec4 uTexDom_Stage1_c1_c0_c0_c0_c1_c0;
+uniform vec3 uDecalParams_Stage1_c1_c0_c0_c0_c1_c0;
+uniform vec3 uLightDirection_Stage1_c1_c0_c0_c0_c1_c0;
+uniform float uinnerThreshold_Stage1_c1_c0_c1_c0;
+uniform float uouterThreshold_Stage1_c1_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+uniform sampler2D uTextureSampler_2_Stage1;
+uniform sampler2D uTextureSampler_3_Stage1;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+noperspective in vec2 vTransformedCoords_3_Stage0;
+noperspective in float vinCoverage_Stage0;
+vec4 ConvexPoly_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float alpha = 1.0;
+ float edge;
+ edge = dot(uedges_Stage1_c0_c0_c0_c0_c0_c0[0], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ _output = _input * alpha;
+ return _output;
+}
+vec4 light_Stage1_c0_c0_c0_c0_c1_c0(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ vec3 halfDir = normalize(surfaceToLight + vec3(0.0, 0.0, 1.0));
+ float colorScale = uKS_Stage1_c0_c0_c0_c0_c1_c0 * pow(dot(normal, halfDir), uShininess_Stage1_c0_c0_c0_c0_c1_c0);
+ vec3 color = lightColor * clamp(colorScale, 0.0, 1.0);
+ return vec4(color, max(max(color.x, color.y), color.z));
+}
+float sobel_Stage1_c0_c0_c0_c0_c1_c0(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage1_c0_c0_c0_c0_c1_c0(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage1_c0_c0_c0_c0_c1_c0(float m[9], float surfaceScale) {
+ return pointToNormal_Stage1_c0_c0_c0_c0_c1_c0(sobel_Stage1_c0_c0_c0_c0_c1_c0(m[0], m[1], m[3], m[4], m[6], m[7], 0.5), sobel_Stage1_c0_c0_c0_c0_c1_c0(m[0], m[6], m[1], m[7], 0.0, 0.0, 0.33333298563957214), surfaceScale);
+}
+vec4 SpecularLighting_Stage1_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coord = vTransformedCoords_0_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage1_c0_c0_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0_c1_c0.xy, uTexDom_Stage1_c0_c0_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp0 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1_c0_c0_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0_c1_c0.xy, uTexDom_Stage1_c0_c0_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1_c0_c0_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0_c1_c0.xy, uTexDom_Stage1_c0_c0_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage1_c0_c0_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0_c1_c0.xy, uTexDom_Stage1_c0_c0_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0_c1_c0.xy, uTexDom_Stage1_c0_c0_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1_c0_c0_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0_c1_c0.xy, uTexDom_Stage1_c0_c0_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp5 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage1_c0_c0_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0_c1_c0.xy, uTexDom_Stage1_c0_c0_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp6 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage1_c0_c0_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0_c1_c0.xy, uTexDom_Stage1_c0_c0_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp7 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage1_c0_c0_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0_c1_c0.xy, uTexDom_Stage1_c0_c0_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp8 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = normalize(uLightLocation_Stage1_c0_c0_c0_c0_c1_c0 - vec3(gl_FragCoord.xy, uSurfaceScale_Stage1_c0_c0_c0_c0_c1_c0 * m[4]));
+ _output = light_Stage1_c0_c0_c0_c0_c1_c0(normal_Stage1_c0_c0_c0_c0_c1_c0(m, uSurfaceScale_Stage1_c0_c0_c0_c0_c1_c0), surfaceToLight, uLightColor_Stage1_c0_c0_c0_c0_c1_c0);
+ _output *= _input;
+ return _output;
+}
+vec4 blend_exclusion(vec4 src, vec4 dst) {
+ return vec4((dst.xyz + src.xyz) - (2.0 * dst.xyz) * src.xyz, src.w + (1.0 - src.w) * dst.w);
+}
+vec4 ComposeTwo_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_exclusion(ConvexPoly_Stage1_c0_c0_c0_c0_c0_c0(inputColor), SpecularLighting_Stage1_c0_c0_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 EllipticalRRect_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 dxy0 = uinnerRect_Stage1_c0_c0_c1_c0.xy - gl_FragCoord.xy;
+ vec2 dxy1 = gl_FragCoord.xy - uinnerRect_Stage1_c0_c0_c1_c0.zw;
+ vec2 dxy = max(max(dxy0, dxy1), 0.0);
+ vec2 Z = dxy * uinvRadiiXY_Stage1_c0_c0_c1_c0;
+ float implicit = dot(Z, dxy) - 1.0;
+ float grad_dot = 4.0 * dot(Z, Z);
+ grad_dot = max(grad_dot, 9.9999997473787516e-05);
+ float approx_dist = implicit * inversesqrt(grad_dot);
+ float alpha = clamp(0.5 - approx_dist, 0.0, 1.0);
+ _output = _input * alpha;
+ return _output;
+}
+vec4 blend_xor(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src + (1.0 - src.w) * dst;
+}
+vec4 ComposeTwo_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_xor(ComposeTwo_Stage1_c0_c0_c0_c0(inputColor), EllipticalRRect_Stage1_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c1_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_1_Stage1, vTransformedCoords_1_Stage0) * _input;
+ return _output;
+}
+vec4 light_Stage1_c1_c0_c0_c0_c1_c0(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ float colorScale = uKD_Stage1_c1_c0_c0_c0_c1_c0 * dot(normal, surfaceToLight);
+ return vec4(lightColor * clamp(colorScale, 0.0, 1.0), 1.0);
+}
+float sobel_Stage1_c1_c0_c0_c0_c1_c0(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage1_c1_c0_c0_c0_c1_c0(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage1_c1_c0_c0_c0_c1_c0(float m[9], float surfaceScale) {
+ return pointToNormal_Stage1_c1_c0_c0_c0_c1_c0(sobel_Stage1_c1_c0_c0_c0_c1_c0(0.0, 0.0, m[4], m[5], m[7], m[8], 0.66666698455810547), sobel_Stage1_c1_c0_c0_c0_c1_c0(0.0, 0.0, m[4], m[7], m[5], m[8], 0.66666698455810547), surfaceScale);
+}
+vec4 DiffuseLighting_Stage1_c1_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coord = vTransformedCoords_2_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage1_c1_c0_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0_c1_c0.xy, uTexDom_Stage1_c1_c0_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp0 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1_c1_c0_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0_c1_c0.xy, uTexDom_Stage1_c1_c0_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1_c1_c0_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0_c1_c0.xy, uTexDom_Stage1_c1_c0_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage1_c1_c0_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0_c1_c0.xy, uTexDom_Stage1_c1_c0_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0_c1_c0.xy, uTexDom_Stage1_c1_c0_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1_c1_c0_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0_c1_c0.xy, uTexDom_Stage1_c1_c0_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp5 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage1_c1_c0_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0_c1_c0.xy, uTexDom_Stage1_c1_c0_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp6 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage1_c1_c0_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0_c1_c0.xy, uTexDom_Stage1_c1_c0_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp7 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage1_c1_c0_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0_c1_c0.xy, uTexDom_Stage1_c1_c0_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp8 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = uLightDirection_Stage1_c1_c0_c0_c0_c1_c0;
+ _output = light_Stage1_c1_c0_c0_c0_c1_c0(normal_Stage1_c1_c0_c0_c0_c1_c0(m, uSurfaceScale_Stage1_c1_c0_c0_c0_c1_c0), surfaceToLight, uLightColor_Stage1_c1_c0_c0_c0_c1_c0);
+ _output *= _input;
+ return _output;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 ComposeTwo_Stage1_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_src_over(TextureEffect_Stage1_c1_c0_c0_c0_c0_c0(inputColor), DiffuseLighting_Stage1_c1_c0_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 AlphaThresholdFragmentProcessor_Stage1_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 color = _input;
+ vec4 mask_color = texture(uTextureSampler_3_Stage1, vTransformedCoords_3_Stage0);
+ if (mask_color.w < 0.5) {
+ if (color.w > uouterThreshold_Stage1_c1_c0_c1_c0) {
+ float scale = uouterThreshold_Stage1_c1_c0_c1_c0 / color.w;
+ color.xyz *= scale;
+ color.w = uouterThreshold_Stage1_c1_c0_c1_c0;
+ }
+ } else if (color.w < uinnerThreshold_Stage1_c1_c0_c1_c0) {
+ float scale = uinnerThreshold_Stage1_c1_c0_c1_c0 / max(0.0010000000474974513, color.w);
+ color.xyz *= scale;
+ color.w = uinnerThreshold_Stage1_c1_c0_c1_c0;
+ }
+ _output = color;
+ return _output;
+}
+vec4 blend_src_out(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src;
+}
+vec4 ComposeTwo_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_src_out(ComposeTwo_Stage1_c1_c0_c0_c0(inputColor), AlphaThresholdFragmentProcessor_Stage1_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 blend_multiply(vec4 src, vec4 dst) {
+ return vec4(((1.0 - src.w) * dst.xyz + (1.0 - dst.w) * src.xyz) + src.xyz * dst.xyz, src.w + (1.0 - src.w) * dst.w);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ float alpha = 1.0;
+ alpha = vinCoverage_Stage0;
+ outputCoverage_Stage0 = vec4(alpha);
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_multiply(ComposeTwo_Stage1_c0_c0(inputColor), ComposeTwo_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ sk_FragColor = output_Stage1 * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+uniform mat3 uCoordTransformMatrix_3_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in float inCoverage;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+noperspective out vec2 vTransformedCoords_3_Stage0;
+noperspective out float vinCoverage_Stage0;
+void main() {
+ vec4 color = inColor;
+ vcolor_Stage0 = color;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_3_Stage0 = (uCoordTransformMatrix_3_Stage0 * vec3(inPosition, 1.0)).xy;
+ vinCoverage_Stage0 = inCoverage;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/505-3.shader_test b/shaders/skia/505-3.shader_test
new file mode 100644
index 0000000..e5d8579
--- /dev/null
+++ b/shaders/skia/505-3.shader_test
@@ -0,0 +1,89 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage2_c0_c0;
+uniform vec4 urightBorderColor_Stage2_c0_c0;
+uniform vec4 uscale01_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias01_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale23_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias23_Stage2_c0_c0_c1_c0;
+uniform float uthreshold_Stage2_c0_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 LinearGradientLayout_Stage2_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_1_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 DualIntervalGradientColorizer_Stage2_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthreshold_Stage2_c0_c0_c1_c0) {
+ scale = uscale01_Stage2_c0_c0_c1_c0;
+ bias = ubias01_Stage2_c0_c0_c1_c0;
+ } else {
+ scale = uscale23_Stage2_c0_c0_c1_c0;
+ bias = ubias23_Stage2_c0_c0_c1_c0;
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage2_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage2_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage2_c0_c0;
+ } else {
+ _output = DualIntervalGradientColorizer_Stage2_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_dst_in(output_Stage1, ClampedGradientEffect_Stage2_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/505-4.shader_test b/shaders/skia/505-4.shader_test
new file mode 100644
index 0000000..6693b99
--- /dev/null
+++ b/shaders/skia/505-4.shader_test
@@ -0,0 +1,110 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uinnerRect_Stage2_c1_c0;
+uniform vec2 uradiusPlusHalf_Stage2_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 ClampFragmentProcessor_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = clamp(_input, 0.0, 1.0);
+ }
+ return _output;
+}
+vec4 CircularRRect_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 dxy0 = uinnerRect_Stage2_c1_c0.xy - gl_FragCoord.xy;
+ vec2 dxy1 = gl_FragCoord.xy - uinnerRect_Stage2_c1_c0.zw;
+ vec2 dxy = max(max(dxy0, dxy1), 0.0);
+ float alpha = clamp(uradiusPlusHalf_Stage2_c1_c0.x - length(dxy), 0.0, 1.0);
+ alpha = 1.0 - alpha;
+ _output = _input * alpha;
+ return _output;
+}
+float _blend_color_saturation(vec3 color) {
+ return max(max(color.x, color.y), color.z) - min(min(color.x, color.y), color.z);
+}
+vec3 _blend_set_color_saturation_helper(vec3 minMidMax, float sat) {
+ if (minMidMax.x < minMidMax.z) {
+ return vec3(0.0, (sat * (minMidMax.y - minMidMax.x)) / (minMidMax.z - minMidMax.x), sat);
+ }
+ return vec3(0.0);
+}
+vec3 _blend_set_color_saturation(vec3 hueLumColor, vec3 satColor) {
+ float sat = _blend_color_saturation(satColor);
+ if (hueLumColor.x <= hueLumColor.y) {
+ if (hueLumColor.y <= hueLumColor.z) {
+ hueLumColor.xyz = _blend_set_color_saturation_helper(hueLumColor, sat);
+ } else if (hueLumColor.x <= hueLumColor.z) {
+ hueLumColor.xzy = _blend_set_color_saturation_helper(hueLumColor.xzy, sat);
+ } else {
+ hueLumColor.zxy = _blend_set_color_saturation_helper(hueLumColor.zxy, sat);
+ }
+ } else if (hueLumColor.x <= hueLumColor.z) {
+ hueLumColor.yxz = _blend_set_color_saturation_helper(hueLumColor.yxz, sat);
+ } else if (hueLumColor.y <= hueLumColor.z) {
+ hueLumColor.yzx = _blend_set_color_saturation_helper(hueLumColor.yzx, sat);
+ } else {
+ hueLumColor.zyx = _blend_set_color_saturation_helper(hueLumColor.zyx, sat);
+ }
+ return hueLumColor;
+}
+float _blend_color_luminance(vec3 color) {
+ return dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), color);
+}
+vec3 _blend_set_color_luminance(vec3 hueSatColor, float alpha, vec3 lumColor) {
+ float lum = _blend_color_luminance(lumColor);
+ vec3 result = (lum - _blend_color_luminance(hueSatColor)) + hueSatColor;
+ float minComp = min(min(result.x, result.y), result.z);
+ float maxComp = max(max(result.x, result.y), result.z);
+ if (minComp < 0.0 && lum != minComp) {
+ result = lum + ((result - lum) * lum) / (lum - minComp);
+ }
+ if (maxComp > alpha && maxComp != lum) {
+ return lum + ((result - lum) * (alpha - lum)) / (maxComp - lum);
+ }
+ return result;
+}
+vec4 blend_saturation(vec4 src, vec4 dst) {
+ float alpha = dst.w * src.w;
+ vec3 sda = src.xyz * dst.w;
+ vec3 dsa = dst.xyz * src.w;
+ return vec4((((_blend_set_color_luminance(_blend_set_color_saturation(dsa, sda), alpha, dsa) + dst.xyz) - dsa) + src.xyz) - sda, (src.w + dst.w) - alpha);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ vec4 inputColor = vec4(output_Stage1.xyz, 1.0);
+ output_Stage2 = blend_saturation(ClampFragmentProcessor_Stage2_c0_c0(inputColor), CircularRRect_Stage2_c1_c0(inputColor));
+ output_Stage2 *= output_Stage1.w;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/505.shader_test b/shaders/skia/505.shader_test
new file mode 100644
index 0000000..931df4f
--- /dev/null
+++ b/shaders/skia/505.shader_test
@@ -0,0 +1,99 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 ucolor_Stage1_c0_c0_c0_c0;
+uniform vec4 ucolor_Stage2;
+uniform vec4 ucolor_Stage3_c1_c0;
+noperspective in vec4 vcolor_Stage0;
+vec4 ConstColorProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = _input.w * ucolor_Stage1_c0_c0_c0_c0;
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = ConstColorProcessor_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 ConstColorProcessor_Stage3_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage3_c1_c0;
+ }
+ return _output;
+}
+float _blend_overlay_component(float sc, float sa, float dc, float da) {
+ if (2.0 * dc <= da) {
+ return (2.0 * sc) * dc;
+ }
+ return sa * da - (2.0 * (da - dc)) * (sa - sc);
+}
+vec4 blend_overlay(vec4 src, vec4 dst) {
+ vec4 result = vec4(_blend_overlay_component(src.x, src.w, dst.x, dst.w), _blend_overlay_component(src.y, src.w, dst.y, dst.w), _blend_overlay_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+ result.xyz += dst.xyz * (1.0 - src.w) + src.xyz * (1.0 - dst.w);
+ return result;
+}
+vec4 blend_hard_light(vec4 src, vec4 dst) {
+ return blend_overlay(dst, src);
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 blend_darken(vec4 src, vec4 dst) {
+ vec4 result = blend_src_over(src, dst);
+ result.xyz = min(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
+ return result;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_hard_light(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ {
+ output_Stage2 = output_Stage1 * ucolor_Stage2;
+ }
+ }
+ vec4 output_Stage3;
+ {
+ output_Stage3 = blend_darken(ConstColorProcessor_Stage3_c1_c0(vec4(1.0)), output_Stage2);
+ }
+ {
+ sk_FragColor = output_Stage3;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 position;
+in vec4 inColor;
+noperspective out vec4 vcolor_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/508-2.shader_test b/shaders/skia/508-2.shader_test
new file mode 100644
index 0000000..bd37d1c
--- /dev/null
+++ b/shaders/skia/508-2.shader_test
@@ -0,0 +1,92 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform float uSrcTF_Stage0[7];
+uniform mat3 uColorXform_Stage0;
+uniform float uDstTF_Stage0[7];
+uniform sampler2D uTextureSampler_0_Stage0;
+noperspective in vec2 vtextureCoords_Stage0;
+flat in vec4 vtextureDomain_Stage0;
+flat in vec4 vcolor_Stage0;
+float src_tf_Stage0(float x) {
+ float G = uSrcTF_Stage0[0];
+ float A = uSrcTF_Stage0[1];
+ float B = uSrcTF_Stage0[2];
+ float C = uSrcTF_Stage0[3];
+ float D = uSrcTF_Stage0[4];
+ float E = uSrcTF_Stage0[5];
+ float F = uSrcTF_Stage0[6];
+ float s = sign(x);
+ x = abs(x);
+ x = x < D ? C * x + F : pow(A * x + B, G) + E;
+ return s * x;
+}
+float dst_tf_Stage0(float x) {
+ float G = uDstTF_Stage0[0];
+ float A = uDstTF_Stage0[1];
+ float B = uDstTF_Stage0[2];
+ float C = uDstTF_Stage0[3];
+ float D = uDstTF_Stage0[4];
+ float E = uDstTF_Stage0[5];
+ float F = uDstTF_Stage0[6];
+ float s = sign(x);
+ x = abs(x);
+ x = x < D ? C * x + F : pow(A * x + B, G) + E;
+ return s * x;
+}
+vec4 gamut_xform_Stage0(vec4 color) {
+ color.xyz = uColorXform_Stage0 * color.xyz;
+ return color;
+}
+vec4 color_xform_Stage0(vec4 color) {
+ float nonZeroAlpha = max(color.w, 9.9999997473787516e-05);
+ color = vec4(color.xyz / nonZeroAlpha, nonZeroAlpha);
+ color.x = src_tf_Stage0(color.x);
+ color.y = src_tf_Stage0(color.y);
+ color.z = src_tf_Stage0(color.z);
+ color = gamut_xform_Stage0(color);
+ color.x = dst_tf_Stage0(color.x);
+ color.y = dst_tf_Stage0(color.y);
+ color.z = dst_tf_Stage0(color.z);
+ color.xyz *= color.w;
+ return color;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ vec2 textureCoords;
+ textureCoords = vtextureCoords_Stage0;
+ vec4 textureDomain;
+ textureDomain = vtextureDomain_Stage0;
+ outputColor_Stage0 = vcolor_Stage0;
+ outputColor_Stage0 = color_xform_Stage0(texture(uTextureSampler_0_Stage0, clamp(textureCoords, textureDomain.xy, textureDomain.zw))) * outputColor_Stage0;
+ }
+ {
+ sk_FragColor = 1.0 - vec4(1.0);
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 position;
+in vec2 textureCoords;
+in vec4 textureDomain;
+in vec4 color;
+noperspective out vec2 vtextureCoords_Stage0;
+flat out vec4 vtextureDomain_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vec2 pos2 = position;
+ vtextureCoords_Stage0 = textureCoords;
+ vtextureDomain_Stage0 = textureDomain;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/508-3.shader_test b/shaders/skia/508-3.shader_test
new file mode 100644
index 0000000..249cb5e
--- /dev/null
+++ b/shaders/skia/508-3.shader_test
@@ -0,0 +1,105 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uscale0_1_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage2_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage2_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage2_c0_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 LinearGradientLayout_Stage2_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_1_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage2_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage2_c0_c0_c1_c0;
+ bias = ubias0_1_Stage2_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage2_c0_c0_c1_c0;
+ bias = ubias2_3_Stage2_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage2_c0_c0_c1_c0;
+ bias = ubias4_5_Stage2_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage2_c0_c0_c1_c0;
+ bias = ubias6_7_Stage2_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage2_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage2_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_dst_in(output_Stage1, TiledGradientEffect_Stage2_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/508-4.shader_test b/shaders/skia/508-4.shader_test
new file mode 100644
index 0000000..97b8a15
--- /dev/null
+++ b/shaders/skia/508-4.shader_test
@@ -0,0 +1,81 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 ClampFragmentProcessor_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = clamp(_input, 0.0, 1.0);
+ }
+ return _output;
+}
+vec4 ColorTableEffect_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ float nonZeroAlpha = max(_input.w, 9.9999997473787516e-05);
+ vec4 coord = vec4(_input.xyz / nonZeroAlpha, nonZeroAlpha);
+ coord = coord * 0.9960939884185791 + vec4(0.0019529999699443579, 0.0019529999699443579, 0.0019529999699443579, 0.0019529999699443579);
+ _output.w = texture(uTextureSampler_0_Stage2, vec2(coord.w, 0.125)).w;
+ _output.x = texture(uTextureSampler_0_Stage2, vec2(coord.x, 0.375)).w;
+ _output.y = texture(uTextureSampler_0_Stage2, vec2(coord.y, 0.625)).w;
+ _output.z = texture(uTextureSampler_0_Stage2, vec2(coord.z, 0.875)).w;
+ _output.xyz *= _output.w;
+ return _output;
+}
+float _blend_color_luminance(vec3 color) {
+ return dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), color);
+}
+vec3 _blend_set_color_luminance(vec3 hueSatColor, float alpha, vec3 lumColor) {
+ float lum = _blend_color_luminance(lumColor);
+ vec3 result = (lum - _blend_color_luminance(hueSatColor)) + hueSatColor;
+ float minComp = min(min(result.x, result.y), result.z);
+ float maxComp = max(max(result.x, result.y), result.z);
+ if (minComp < 0.0 && lum != minComp) {
+ result = lum + ((result - lum) * lum) / (lum - minComp);
+ }
+ if (maxComp > alpha && maxComp != lum) {
+ return lum + ((result - lum) * (alpha - lum)) / (maxComp - lum);
+ }
+ return result;
+}
+vec4 blend_luminosity(vec4 src, vec4 dst) {
+ float alpha = dst.w * src.w;
+ vec3 sda = src.xyz * dst.w;
+ vec3 dsa = dst.xyz * src.w;
+ return vec4((((_blend_set_color_luminance(dsa, alpha, sda) + dst.xyz) - dsa) + src.xyz) - sda, (src.w + dst.w) - alpha);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ vec4 inputColor = vec4(output_Stage1.xyz, 1.0);
+ output_Stage2 = blend_luminosity(ClampFragmentProcessor_Stage2_c0_c0(inputColor), ColorTableEffect_Stage2_c1_c0(inputColor));
+ output_Stage2 *= output_Stage1.w;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/508.shader_test b/shaders/skia/508.shader_test
new file mode 100644
index 0000000..4063812
--- /dev/null
+++ b/shaders/skia/508.shader_test
@@ -0,0 +1,150 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.w) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ } else {
+ {
+ if (t < uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = OverrideInputFragmentProcessor_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+float _guarded_divide(float n, float d) {
+ return n / d;
+}
+float _soft_light_component(float sc, float sa, float dc, float da) {
+ if (2.0 * sc <= sa) {
+ return (_guarded_divide((dc * dc) * (sa - 2.0 * sc), da) + (1.0 - da) * sc) + dc * ((-sa + 2.0 * sc) + 1.0);
+ } else if (4.0 * dc <= da) {
+ float DSqd = dc * dc;
+ float DCub = DSqd * dc;
+ float DaSqd = da * da;
+ float DaCub = DaSqd * da;
+ return _guarded_divide(((DaSqd * (sc - dc * ((3.0 * sa - 6.0 * sc) - 1.0)) + ((12.0 * da) * DSqd) * (sa - 2.0 * sc)) - (16.0 * DCub) * (sa - 2.0 * sc)) - DaCub * sc, DaSqd);
+ }
+ return ((dc * ((sa - 2.0 * sc) + 1.0) + sc) - sqrt(da * dc) * (sa - 2.0 * sc)) - da * sc;
+}
+vec4 blend_soft_light(vec4 src, vec4 dst) {
+ if (dst.w == 0.0) {
+ return src;
+ }
+ return vec4(_soft_light_component(src.x, src.w, dst.x, dst.w), _soft_light_component(src.y, src.w, dst.y, dst.w), _soft_light_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_soft_light(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 inColor;
+in vec2 inLocalCoord;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/511-2.shader_test b/shaders/skia/511-2.shader_test
new file mode 100644
index 0000000..fafde84
--- /dev/null
+++ b/shaders/skia/511-2.shader_test
@@ -0,0 +1,335 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_KHR_blend_equation_advanced : require
+out vec4 sk_FragColor;
+layout (blend_support_all_equations) out ;
+uniform vec4 uColor_Stage0;
+uniform vec4 uk_Stage1;
+uniform vec4 ucolor_Stage1_c0_c0;
+uniform vec2 uImageIncrement_Stage2;
+uniform vec4 uKernel_Stage2[5];
+uniform vec2 uKernelOffset_Stage2;
+uniform float uGain_Stage2;
+uniform float uBias_Stage2;
+uniform vec4 uTexDom_Stage2;
+uniform float uPixelSize_Stage3;
+uniform vec2 uRange_Stage3;
+uniform sampler2D uTextureSampler_0_Stage2;
+uniform sampler2D uTextureSampler_0_Stage3;
+noperspective in vec3 vDashParams_Stage0;
+noperspective in vec4 vRectParams_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+vec4 ConstColorProcessor_Stage1_c0_c0(vec4 _input, vec2 _coords) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage1_c0_c0;
+ }
+ return _output;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = uColor_Stage0;
+ float xShifted = vDashParams_Stage0.x - floor(vDashParams_Stage0.x / vDashParams_Stage0.z) * vDashParams_Stage0.z;
+ vec2 fragPosShifted = vec2(xShifted, vDashParams_Stage0.y);
+ float xSub, ySub;
+ xSub = min(fragPosShifted.x - vRectParams_Stage0.x, 0.0);
+ xSub += min(vRectParams_Stage0.z - fragPosShifted.x, 0.0);
+ ySub = min(fragPosShifted.y - vRectParams_Stage0.y, 0.0);
+ ySub += min(vRectParams_Stage0.w - fragPosShifted.y, 0.0);
+ float alpha = (1.0 + max(xSub, -1.0)) * (1.0 + max(ySub, -1.0));
+ outputCoverage_Stage0 = vec4(alpha);
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = outputColor_Stage0;
+ vec4 dst = ConstColorProcessor_Stage1_c0_c0(vec4(1.0), vTransformedCoords_0_Stage0);
+ output_Stage1 = clamp((((uk_Stage1.x * output_Stage1) * dst + uk_Stage1.y * output_Stage1) + uk_Stage1.z * dst) + uk_Stage1.w, 0.0, 1.0);
+ }
+ vec4 output_Stage2;
+ {
+ vec4 sum = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_1_Stage0 - uKernelOffset_Stage2 * uImageIncrement_Stage2;
+ vec4 c;
+ {
+ float k = uKernel_Stage2[0].x;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[0].y;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[0].z;
+ {
+ vec2 origCoord = coord + vec2(2.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[0].w;
+ {
+ vec2 origCoord = coord + vec2(3.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[1].x;
+ {
+ vec2 origCoord = coord + vec2(4.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[1].y;
+ {
+ vec2 origCoord = coord + vec2(5.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[1].z;
+ {
+ vec2 origCoord = coord + vec2(6.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[1].w;
+ {
+ vec2 origCoord = coord + vec2(7.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[2].x;
+ {
+ vec2 origCoord = coord + vec2(8.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[2].y;
+ {
+ vec2 origCoord = coord + vec2(9.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[2].z;
+ {
+ vec2 origCoord = coord + vec2(10.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[2].w;
+ {
+ vec2 origCoord = coord + vec2(11.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[3].x;
+ {
+ vec2 origCoord = coord + vec2(12.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[3].y;
+ {
+ vec2 origCoord = coord + vec2(13.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[3].z;
+ {
+ vec2 origCoord = coord + vec2(14.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[3].w;
+ {
+ vec2 origCoord = coord + vec2(15.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[4].x;
+ {
+ vec2 origCoord = coord + vec2(16.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ vec2 origCoord = vTransformedCoords_1_Stage0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ c = textureColor;
+ }
+ output_Stage2.w = c.w;
+ output_Stage2.xyz = clamp(sum.xyz * uGain_Stage2 + uBias_Stage2, 0.0, 1.0);
+ output_Stage2.xyz *= output_Stage2.w;
+ output_Stage2 *= output_Stage1;
+ }
+ vec4 output_Stage3;
+ {
+ output_Stage3 = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_2_Stage0;
+ coord.y -= 4.0 * uPixelSize_Stage3;
+ for (int i = 0;i < 9; i++) {
+ output_Stage3 = max(output_Stage3, texture(uTextureSampler_0_Stage3, coord));
+ coord.y += uPixelSize_Stage3;
+ }
+ output_Stage3 *= output_Stage2;
+ }
+ {
+ sk_FragColor = outputCoverage_Stage0 * output_Stage3;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+in vec2 inPosition;
+in vec3 inDashParams;
+in vec4 inRect;
+noperspective out vec3 vDashParams_Stage0;
+noperspective out vec4 vRectParams_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+void main() {
+ vDashParams_Stage0 = inDashParams;
+ vRectParams_Stage0 = inRect;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/511-3.shader_test b/shaders/skia/511-3.shader_test
new file mode 100644
index 0000000..2eeee03
--- /dev/null
+++ b/shaders/skia/511-3.shader_test
@@ -0,0 +1,106 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage2_c0_c0;
+uniform vec4 urightBorderColor_Stage2_c0_c0;
+uniform vec4 uscale0_1_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage2_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage2_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage2_c0_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 LinearGradientLayout_Stage2_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_1_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage2_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage2_c0_c0_c1_c0;
+ bias = ubias0_1_Stage2_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage2_c0_c0_c1_c0;
+ bias = ubias2_3_Stage2_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage2_c0_c0_c1_c0;
+ bias = ubias4_5_Stage2_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage2_c0_c0_c1_c0;
+ bias = ubias6_7_Stage2_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage2_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage2_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage2_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage2_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_dst_in(output_Stage1, ClampedGradientEffect_Stage2_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/511-4.shader_test b/shaders/skia/511-4.shader_test
new file mode 100644
index 0000000..068718a
--- /dev/null
+++ b/shaders/skia/511-4.shader_test
@@ -0,0 +1,71 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec3 uedges_Stage2_c0_c0[7];
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 ConvexPoly_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ float alpha = 1.0;
+ float edge;
+ edge = dot(uedges_Stage2_c0_c0[0], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage2_c0_c0[1], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage2_c0_c0[2], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage2_c0_c0[3], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage2_c0_c0[4], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage2_c0_c0[5], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage2_c0_c0[6], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ _output = _input * alpha;
+ return _output;
+}
+vec4 blend_exclusion(vec4 src, vec4 dst) {
+ return vec4((dst.xyz + src.xyz) - (2.0 * dst.xyz) * src.xyz, src.w + (1.0 - src.w) * dst.w);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_exclusion(ConvexPoly_Stage2_c0_c0(vec4(1.0)), output_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/511.shader_test b/shaders/skia/511.shader_test
new file mode 100644
index 0000000..09459f4
--- /dev/null
+++ b/shaders/skia/511.shader_test
@@ -0,0 +1,79 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 ucolor_Stage1_c0_c0_c0_c0;
+noperspective in vec4 vcolor_Stage0;
+vec4 ConstColorProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = _input.w * ucolor_Stage1_c0_c0_c0_c0;
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = ConstColorProcessor_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+float _guarded_divide(float n, float d) {
+ return n / d;
+}
+float _soft_light_component(float sc, float sa, float dc, float da) {
+ if (2.0 * sc <= sa) {
+ return (_guarded_divide((dc * dc) * (sa - 2.0 * sc), da) + (1.0 - da) * sc) + dc * ((-sa + 2.0 * sc) + 1.0);
+ } else if (4.0 * dc <= da) {
+ float DSqd = dc * dc;
+ float DCub = DSqd * dc;
+ float DaSqd = da * da;
+ float DaCub = DaSqd * da;
+ return _guarded_divide(((DaSqd * (sc - dc * ((3.0 * sa - 6.0 * sc) - 1.0)) + ((12.0 * da) * DSqd) * (sa - 2.0 * sc)) - (16.0 * DCub) * (sa - 2.0 * sc)) - DaCub * sc, DaSqd);
+ }
+ return ((dc * ((sa - 2.0 * sc) + 1.0) + sc) - sqrt(da * dc) * (sa - 2.0 * sc)) - da * sc;
+}
+vec4 blend_soft_light(vec4 src, vec4 dst) {
+ if (dst.w == 0.0) {
+ return src;
+ }
+ return vec4(_soft_light_component(src.x, src.w, dst.x, dst.w), _soft_light_component(src.y, src.w, dst.y, dst.w), _soft_light_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_soft_light(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 position;
+in vec4 inColor;
+noperspective out vec4 vcolor_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/514-2.shader_test b/shaders/skia/514-2.shader_test
new file mode 100644
index 0000000..c201b52
--- /dev/null
+++ b/shaders/skia/514-2.shader_test
@@ -0,0 +1,232 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_KHR_blend_equation_advanced : require
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+layout (blend_support_all_equations) out ;
+uniform vec4 uColor_Stage0;
+uniform vec4 uinnerRect_Stage1_c0_c0_c0_c0_c0_c0;
+uniform vec4 uinvRadiiLTRB_Stage1_c0_c0_c0_c0_c0_c0;
+uniform vec4 uinnerRect_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec2 uradiusPlusHalf_Stage1_c0_c0_c0_c0_c1_c0;
+uniform mat4 um_Stage1_c0_c0_c1_c0;
+uniform vec4 uv_Stage1_c0_c0_c1_c0;
+uniform float uPixelSize_Stage1_c1_c0_c0_c0_c1_c0;
+uniform vec2 uRange_Stage1_c1_c0_c0_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 EllipticalRRect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 dxy0 = uinnerRect_Stage1_c0_c0_c0_c0_c0_c0.xy - gl_FragCoord.xy;
+ vec2 dxy1 = gl_FragCoord.xy - uinnerRect_Stage1_c0_c0_c0_c0_c0_c0.zw;
+ vec2 dxy = max(max(dxy0, dxy1), 0.0);
+ vec2 Z = max(max(dxy0 * uinvRadiiLTRB_Stage1_c0_c0_c0_c0_c0_c0.xy, dxy1 * uinvRadiiLTRB_Stage1_c0_c0_c0_c0_c0_c0.zw), 0.0);
+ float implicit = dot(Z, dxy) - 1.0;
+ float grad_dot = 4.0 * dot(Z, Z);
+ grad_dot = max(grad_dot, 9.9999997473787516e-05);
+ float approx_dist = implicit * inversesqrt(grad_dot);
+ float alpha = clamp(0.5 + approx_dist, 0.0, 1.0);
+ _output = _input * alpha;
+ return _output;
+}
+vec4 CircularRRect_Stage1_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 dxy0 = uinnerRect_Stage1_c0_c0_c0_c0_c1_c0.xy - gl_FragCoord.xy;
+ vec2 dxy1 = gl_FragCoord.xy - uinnerRect_Stage1_c0_c0_c0_c0_c1_c0.zw;
+ vec2 dxy = max(max(dxy0, dxy1), 0.0);
+ float alpha = clamp(uradiusPlusHalf_Stage1_c0_c0_c0_c0_c1_c0.x - length(dxy), 0.0, 1.0);
+ _output = _input * alpha;
+ return _output;
+}
+vec4 blend_src_out(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src;
+}
+vec4 ComposeTwo_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_src_out(EllipticalRRect_Stage1_c0_c0_c0_c0_c0_c0(inputColor), CircularRRect_Stage1_c0_c0_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 ColorMatrixFragmentProcessor_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = _input;
+ _output = um_Stage1_c0_c0_c1_c0 * inputColor + uv_Stage1_c0_c0_c1_c0;
+ {
+ _output.w = clamp(_output.w, 0.0, 1.0);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 blend_lighten(vec4 src, vec4 dst) {
+ vec4 result = blend_src_over(src, dst);
+ result.xyz = max(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
+ return result;
+}
+vec4 ComposeTwo_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_lighten(ComposeTwo_Stage1_c0_c0_c0_c0(inputColor), ColorMatrixFragmentProcessor_Stage1_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 ConfigConversionEffect_Stage1_c1_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = floor(_input * 255.0 + 0.5) / 255.0;
+ {
+ _output.xyz = floor((_output.xyz * _output.w) * 255.0 + 0.5) / 255.0;
+ }
+ return _output;
+}
+vec4 Morphology_Stage1_c1_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0;
+ coord.y -= 3.0 * uPixelSize_Stage1_c1_c0_c0_c0_c1_c0;
+ for (int i = 0;i < 7; i++) {
+ _output = max(_output, texture(uTextureSampler_0_Stage1, coord));
+ coord.y += uPixelSize_Stage1_c1_c0_c0_c0_c1_c0;
+ }
+ _output *= _input;
+ return _output;
+}
+float _blend_color_luminance(vec3 color) {
+ return dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), color);
+}
+vec3 _blend_set_color_luminance(vec3 hueSatColor, float alpha, vec3 lumColor) {
+ float lum = _blend_color_luminance(lumColor);
+ vec3 result = (lum - _blend_color_luminance(hueSatColor)) + hueSatColor;
+ float minComp = min(min(result.x, result.y), result.z);
+ float maxComp = max(max(result.x, result.y), result.z);
+ if (minComp < 0.0 && lum != minComp) {
+ result = lum + ((result - lum) * lum) / (lum - minComp);
+ }
+ if (maxComp > alpha && maxComp != lum) {
+ return lum + ((result - lum) * (alpha - lum)) / (maxComp - lum);
+ }
+ return result;
+}
+vec4 blend_luminosity(vec4 src, vec4 dst) {
+ float alpha = dst.w * src.w;
+ vec3 sda = src.xyz * dst.w;
+ vec3 dsa = dst.xyz * src.w;
+ return vec4((((_blend_set_color_luminance(dsa, alpha, sda) + dst.xyz) - dsa) + src.xyz) - sda, (src.w + dst.w) - alpha);
+}
+vec4 ComposeTwo_Stage1_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_luminosity(ConfigConversionEffect_Stage1_c1_c0_c0_c0_c0_c0(inputColor), Morphology_Stage1_c1_c0_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_1_Stage1, vTransformedCoords_1_Stage0) * _input;
+ return _output;
+}
+float _blend_color_saturation(vec3 color) {
+ return max(max(color.x, color.y), color.z) - min(min(color.x, color.y), color.z);
+}
+vec3 _blend_set_color_saturation_helper(vec3 minMidMax, float sat) {
+ if (minMidMax.x < minMidMax.z) {
+ return vec3(0.0, (sat * (minMidMax.y - minMidMax.x)) / (minMidMax.z - minMidMax.x), sat);
+ }
+ return vec3(0.0);
+}
+vec3 _blend_set_color_saturation(vec3 hueLumColor, vec3 satColor) {
+ float sat = _blend_color_saturation(satColor);
+ if (hueLumColor.x <= hueLumColor.y) {
+ if (hueLumColor.y <= hueLumColor.z) {
+ hueLumColor.xyz = _blend_set_color_saturation_helper(hueLumColor, sat);
+ } else if (hueLumColor.x <= hueLumColor.z) {
+ hueLumColor.xzy = _blend_set_color_saturation_helper(hueLumColor.xzy, sat);
+ } else {
+ hueLumColor.zxy = _blend_set_color_saturation_helper(hueLumColor.zxy, sat);
+ }
+ } else if (hueLumColor.x <= hueLumColor.z) {
+ hueLumColor.yxz = _blend_set_color_saturation_helper(hueLumColor.yxz, sat);
+ } else if (hueLumColor.y <= hueLumColor.z) {
+ hueLumColor.yzx = _blend_set_color_saturation_helper(hueLumColor.yzx, sat);
+ } else {
+ hueLumColor.zyx = _blend_set_color_saturation_helper(hueLumColor.zyx, sat);
+ }
+ return hueLumColor;
+}
+vec4 blend_hue(vec4 src, vec4 dst) {
+ float alpha = dst.w * src.w;
+ vec3 sda = src.xyz * dst.w;
+ vec3 dsa = dst.xyz * src.w;
+ return vec4((((_blend_set_color_luminance(_blend_set_color_saturation(sda, dsa), alpha, dsa) + dst.xyz) - dsa) + src.xyz) - sda, (src.w + dst.w) - alpha);
+}
+vec4 ComposeTwo_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_hue(ComposeTwo_Stage1_c1_c0_c0_c0(inputColor), TextureEffect_Stage1_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+float _guarded_divide(float n, float d) {
+ return n / d;
+}
+float _color_burn_component(float sc, float sa, float dc, float da) {
+ if (da == dc) {
+ return (sa * da + sc * (1.0 - da)) + dc * (1.0 - sa);
+ } else if (sc == 0.0) {
+ return dc * (1.0 - sa);
+ }
+ float d = max(0.0, da - _guarded_divide((da - dc) * sa, sc));
+ return (d * sa + sc * (1.0 - da)) + dc * (1.0 - sa);
+}
+vec4 blend_color_burn(vec4 src, vec4 dst) {
+ return vec4(_color_burn_component(src.x, src.w, dst.x, dst.w), _color_burn_component(src.y, src.w, dst.y, dst.w), _color_burn_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = uColor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_color_burn(ComposeTwo_Stage1_c0_c0(inputColor), ComposeTwo_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 inPosition;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vec2 pos2 = (uViewM_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(inPosition, 1.0)).xy;
+ {
+ vec2 _posTmp = pos2;
+ _posTmp = floor(_posTmp) + vec2(0.5, 0.5);
+ gl_Position = vec4(_posTmp, 0.0, 1.0);
+ }
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/514-3.shader_test b/shaders/skia/514-3.shader_test
new file mode 100644
index 0000000..0c1ee25
--- /dev/null
+++ b/shaders/skia/514-3.shader_test
@@ -0,0 +1,101 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage2_c0_c0;
+uniform vec4 urightBorderColor_Stage2_c0_c0;
+uniform vec4 uscale0_1_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage2_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage2_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage2_c0_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 RadialGradientLayout_Stage2_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = length(vTransformedCoords_1_Stage0);
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage2_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage2_c0_c0_c1_c0;
+ bias = ubias0_1_Stage2_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage2_c0_c0_c1_c0;
+ bias = ubias2_3_Stage2_c0_c0_c1_c0;
+ }
+ } else {
+ {
+ scale = uscale4_5_Stage2_c0_c0_c1_c0;
+ bias = ubias4_5_Stage2_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = RadialGradientLayout_Stage2_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage2_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage2_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage2_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_dst_in(output_Stage1, ClampedGradientEffect_Stage2_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/514-4.shader_test b/shaders/skia/514-4.shader_test
new file mode 100644
index 0000000..bb9da5d
--- /dev/null
+++ b/shaders/skia/514-4.shader_test
@@ -0,0 +1,95 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 ubaseFrequency_Stage2_c0_c0;
+uniform float uz_Stage2_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+uniform sampler2D uTextureSampler_1_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec3 fade_Stage2_c0_c0(vec3 t) {
+ return ((t * t) * t) * (t * (t * 6.0 - 15.0) + 10.0);
+}
+float perm_Stage2_c0_c0(float x) {
+ return texture(uTextureSampler_0_Stage2, vec2(fract(x / 256.0), 0.0)).x * 255.0;
+}
+float grad_Stage2_c0_c0(float x, vec3 p) {
+ return dot(texture(uTextureSampler_1_Stage2, vec2(fract(x / 16.0), 0.0)).xyz * 255.0 - vec3(1.0), p);
+}
+float lerp_Stage2_c0_c0(float a, float b, float w) {
+ return a + w * (b - a);
+}
+float noise_Stage2_c0_c0(vec3 p) {
+ vec3 P = mod(floor(p), 256.0);
+ p -= floor(p);
+ vec3 f = fade_Stage2_c0_c0(p);
+ float A = perm_Stage2_c0_c0(P.x) + P.y;
+ float AA = perm_Stage2_c0_c0(A) + P.z;
+ float AB = perm_Stage2_c0_c0(A + 1.0) + P.z;
+ float B = perm_Stage2_c0_c0(P.x + 1.0) + P.y;
+ float BA = perm_Stage2_c0_c0(B) + P.z;
+ float BB = perm_Stage2_c0_c0(B + 1.0) + P.z;
+ float result = lerp_Stage2_c0_c0(lerp_Stage2_c0_c0(lerp_Stage2_c0_c0(grad_Stage2_c0_c0(perm_Stage2_c0_c0(AA), p), grad_Stage2_c0_c0(perm_Stage2_c0_c0(BA), p + vec3(-1.0, 0.0, 0.0)), f.x), lerp_Stage2_c0_c0(grad_Stage2_c0_c0(perm_Stage2_c0_c0(AB), p + vec3(0.0, -1.0, 0.0)), grad_Stage2_c0_c0(perm_Stage2_c0_c0(BB), p + vec3(-1.0, -1.0, 0.0)), f.x), f.y), lerp_Stage2_c0_c0(lerp_Stage2_c0_c0(grad_Stage2_c0_c0(perm_Stage2_c0_c0(AA + 1.0), p + vec3(0.0, 0.0, -1.0)), grad_Stage2_c0_c0(perm_Stage2_c0_c0(BA + 1.0), p + vec3(-1.0, 0.0, -1.0)), f.x), lerp_Stage2_c0_c0(grad_Stage2_c0_c0(perm_Stage2_c0_c0(AB + 1.0), p + vec3(0.0, -1.0, -1.0)), grad_Stage2_c0_c0(perm_Stage2_c0_c0(BB + 1.0), p + vec3(-1.0, -1.0, -1.0)), f.x), f.y), f.z);
+ return result;
+}
+float noiseOctaves_Stage2_c0_c0(vec3 p) {
+ float result = 0.0;
+ float ratio = 1.0;
+ for (float i = 0.0;i < 9.0; i++) {
+ result += noise_Stage2_c0_c0(p) / ratio;
+ p *= 2.0;
+ ratio *= 2.0;
+ }
+ return (result + 1.0) / 2.0;
+}
+vec4 ImprovedPerlinNoise_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coords = vTransformedCoords_1_Stage0 * ubaseFrequency_Stage2_c0_c0;
+ float r = noiseOctaves_Stage2_c0_c0(vec3(coords, uz_Stage2_c0_c0));
+ float g = noiseOctaves_Stage2_c0_c0(vec3(coords, uz_Stage2_c0_c0));
+ float b = noiseOctaves_Stage2_c0_c0(vec3(coords, uz_Stage2_c0_c0));
+ float a = noiseOctaves_Stage2_c0_c0(vec3(coords, uz_Stage2_c0_c0));
+ _output = vec4(r, g, b, a);
+ _output = clamp(_output, 0.0, 1.0);
+ _output = vec4(_output.xyz * _output.www, _output.w);
+ return _output;
+}
+vec4 blend_multiply(vec4 src, vec4 dst) {
+ return vec4(((1.0 - src.w) * dst.xyz + (1.0 - dst.w) * src.xyz) + src.xyz * dst.xyz, src.w + (1.0 - src.w) * dst.w);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_multiply(output_Stage1, ImprovedPerlinNoise_Stage2_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/514.shader_test b/shaders/skia/514.shader_test
new file mode 100644
index 0000000..80e202d
--- /dev/null
+++ b/shaders/skia/514.shader_test
@@ -0,0 +1,170 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage2_c1_c0;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.w) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ } else {
+ {
+ if (t < uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = OverrideInputFragmentProcessor_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c1_c0;
+ }
+ return _output;
+}
+float _guarded_divide(float n, float d) {
+ return n / d;
+}
+float _soft_light_component(float sc, float sa, float dc, float da) {
+ if (2.0 * sc <= sa) {
+ return (_guarded_divide((dc * dc) * (sa - 2.0 * sc), da) + (1.0 - da) * sc) + dc * ((-sa + 2.0 * sc) + 1.0);
+ } else if (4.0 * dc <= da) {
+ float DSqd = dc * dc;
+ float DCub = DSqd * dc;
+ float DaSqd = da * da;
+ float DaCub = DaSqd * da;
+ return _guarded_divide(((DaSqd * (sc - dc * ((3.0 * sa - 6.0 * sc) - 1.0)) + ((12.0 * da) * DSqd) * (sa - 2.0 * sc)) - (16.0 * DCub) * (sa - 2.0 * sc)) - DaCub * sc, DaSqd);
+ }
+ return ((dc * ((sa - 2.0 * sc) + 1.0) + sc) - sqrt(da * dc) * (sa - 2.0 * sc)) - da * sc;
+}
+vec4 blend_soft_light(vec4 src, vec4 dst) {
+ if (dst.w == 0.0) {
+ return src;
+ }
+ return vec4(_soft_light_component(src.x, src.w, dst.x, dst.w), _soft_light_component(src.y, src.w, dst.y, dst.w), _soft_light_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 blend_darken(vec4 src, vec4 dst) {
+ vec4 result = blend_src_over(src, dst);
+ result.xyz = min(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
+ return result;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_soft_light(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_darken(ConstColorProcessor_Stage2_c1_c0(vec4(1.0)), output_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 inColor;
+in vec2 inLocalCoord;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/517-2.shader_test b/shaders/skia/517-2.shader_test
new file mode 100644
index 0000000..5121909
--- /dev/null
+++ b/shaders/skia/517-2.shader_test
@@ -0,0 +1,372 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_KHR_blend_equation_advanced : require
+out vec4 sk_FragColor;
+layout (blend_support_all_equations) out ;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+uniform vec2 ubaseFrequency_Stage2;
+uniform float uz_Stage2;
+uniform float uinnerThreshold_Stage3;
+uniform float uouterThreshold_Stage3;
+uniform vec2 ufocalParams_Stage4_c1_c0_c0_c0;
+uniform vec4 uscale0_1_Stage4_c1_c0_c1_c0;
+uniform vec4 uscale2_3_Stage4_c1_c0_c1_c0;
+uniform vec4 uscale4_5_Stage4_c1_c0_c1_c0;
+uniform vec4 ubias0_1_Stage4_c1_c0_c1_c0;
+uniform vec4 ubias2_3_Stage4_c1_c0_c1_c0;
+uniform vec4 ubias4_5_Stage4_c1_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage4_c1_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage4_c1_c0_c1_c0;
+uniform vec2 ubaseFrequency_Stage5_c2_c0;
+uniform vec2 ustitchData_Stage5_c2_c0;
+uniform sampler2D uTextureSampler_0_Stage0;
+uniform sampler2D uTextureSampler_0_Stage2;
+uniform sampler2D uTextureSampler_1_Stage2;
+uniform sampler2D uTextureSampler_0_Stage3;
+uniform sampler2D uTextureSampler_0_Stage5;
+uniform sampler2D uTextureSampler_1_Stage5;
+in vec2 vTextureCoords_Stage0;
+flat in int vTexIndex_Stage0;
+in vec2 vIntTextureCoords_Stage0;
+in vec4 vinColor_Stage0;
+in vec2 vTransformedCoords_0_Stage0;
+in vec2 vTransformedCoords_1_Stage0;
+in vec2 vTransformedCoords_2_Stage0;
+in vec2 vTransformedCoords_3_Stage0;
+in vec2 vTransformedCoords_4_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec3 fade_Stage2(vec3 t) {
+ return ((t * t) * t) * (t * (t * 6.0 - 15.0) + 10.0);
+}
+float perm_Stage2(float x) {
+ return texture(uTextureSampler_0_Stage2, vec2(fract(x / 256.0), 0.0)).x * 255.0;
+}
+float grad_Stage2(float x, vec3 p) {
+ return dot(texture(uTextureSampler_1_Stage2, vec2(fract(x / 16.0), 0.0)).xyz * 255.0 - vec3(1.0), p);
+}
+float lerp_Stage2(float a, float b, float w) {
+ return a + w * (b - a);
+}
+float noise_Stage2(vec3 p) {
+ vec3 P = mod(floor(p), 256.0);
+ p -= floor(p);
+ vec3 f = fade_Stage2(p);
+ float A = perm_Stage2(P.x) + P.y;
+ float AA = perm_Stage2(A) + P.z;
+ float AB = perm_Stage2(A + 1.0) + P.z;
+ float B = perm_Stage2(P.x + 1.0) + P.y;
+ float BA = perm_Stage2(B) + P.z;
+ float BB = perm_Stage2(B + 1.0) + P.z;
+ float result = lerp_Stage2(lerp_Stage2(lerp_Stage2(grad_Stage2(perm_Stage2(AA), p), grad_Stage2(perm_Stage2(BA), p + vec3(-1.0, 0.0, 0.0)), f.x), lerp_Stage2(grad_Stage2(perm_Stage2(AB), p + vec3(0.0, -1.0, 0.0)), grad_Stage2(perm_Stage2(BB), p + vec3(-1.0, -1.0, 0.0)), f.x), f.y), lerp_Stage2(lerp_Stage2(grad_Stage2(perm_Stage2(AA + 1.0), p + vec3(0.0, 0.0, -1.0)), grad_Stage2(perm_Stage2(BA + 1.0), p + vec3(-1.0, 0.0, -1.0)), f.x), lerp_Stage2(grad_Stage2(perm_Stage2(AB + 1.0), p + vec3(0.0, -1.0, -1.0)), grad_Stage2(perm_Stage2(BB + 1.0), p + vec3(-1.0, -1.0, -1.0)), f.x), f.y), f.z);
+ return result;
+}
+float noiseOctaves_Stage2(vec3 p) {
+ float result = 0.0;
+ float ratio = 1.0;
+ for (float i = 0.0;i < 9.0; i++) {
+ result += noise_Stage2(p) / ratio;
+ p *= 2.0;
+ ratio *= 2.0;
+ }
+ return (result + 1.0) / 2.0;
+}
+vec4 TwoPointConicalGradientLayout_Stage4_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_3_Stage0;
+ float t = -1.0;
+ float v = 1.0;
+ {
+ {
+ float x_t = -1.0;
+ {
+ x_t = dot(p, p) / p.x;
+ }
+ {
+ if (x_t <= 0.0) {
+ v = -1.0;
+ }
+ }
+ {
+ {
+ t = x_t;
+ }
+ }
+ {
+ t = 1.0 - t;
+ }
+ }
+ }
+ _output = vec4(t, v, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage4_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage4_c1_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage4_c1_c0_c1_c0.x) {
+ scale = uscale0_1_Stage4_c1_c0_c1_c0;
+ bias = ubias0_1_Stage4_c1_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage4_c1_c0_c1_c0;
+ bias = ubias2_3_Stage4_c1_c0_c1_c0;
+ }
+ } else {
+ {
+ scale = uscale4_5_Stage4_c1_c0_c1_c0;
+ bias = ubias4_5_Stage4_c1_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage4_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage4_c1_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else {
+ {
+ t.x = fract(t.x);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage4_c1_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+float perlinnoise_Stage5_c2_c0(float chanCoord, vec2 noiseVec, vec2 stitchData) {
+ vec4 floorVal;
+ floorVal.xy = floor(noiseVec);
+ floorVal.zw = floorVal.xy + vec2(1.0);
+ vec2 fractVal = fract(noiseVec);
+ vec2 noiseSmooth = (fractVal * fractVal) * (vec2(3.0) - vec2(2.0) * fractVal);
+ if (floorVal.x >= stitchData.x) {
+ floorVal.x -= stitchData.x;
+ }
+ if (floorVal.y >= stitchData.y) {
+ floorVal.y -= stitchData.y;
+ }
+ if (floorVal.z >= stitchData.x) {
+ floorVal.z -= stitchData.x;
+ }
+ if (floorVal.w >= stitchData.y) {
+ floorVal.w -= stitchData.y;
+ }
+ floorVal = fract(floor(mod(floorVal, 256.0)) / vec4(256.0));
+ vec2 latticeIdx;
+ latticeIdx.x = texture(uTextureSampler_0_Stage5, vec2(floorVal.x, 0.5)).x;
+ latticeIdx.y = texture(uTextureSampler_0_Stage5, vec2(floorVal.z, 0.5)).x;
+ vec4 bcoords = fract(latticeIdx.xyxy + floorVal.yyww);
+ vec2 uv;
+ vec4 lattice = texture(uTextureSampler_1_Stage5, vec2(bcoords.x, chanCoord)).zyxw;
+ uv.x = dot((lattice.yw + lattice.xz * vec2(0.00390625)) * vec2(2.0) - vec2(1.0), fractVal);
+ fractVal.x -= 1.0;
+ lattice = texture(uTextureSampler_1_Stage5, vec2(bcoords.y, chanCoord)).zyxw;
+ uv.y = dot((lattice.yw + lattice.xz * vec2(0.00390625)) * vec2(2.0) - vec2(1.0), fractVal);
+ vec2 ab;
+ ab.x = mix(uv.x, uv.y, noiseSmooth.x);
+ fractVal.y -= 1.0;
+ lattice = texture(uTextureSampler_1_Stage5, vec2(bcoords.w, chanCoord)).zyxw;
+ uv.y = dot((lattice.yw + lattice.xz * vec2(0.00390625)) * vec2(2.0) - vec2(1.0), fractVal);
+ fractVal.x += 1.0;
+ lattice = texture(uTextureSampler_1_Stage5, vec2(bcoords.z, chanCoord)).zyxw;
+ uv.x = dot((lattice.yw + lattice.xz * vec2(0.00390625)) * vec2(2.0) - vec2(1.0), fractVal);
+ ab.y = mix(uv.x, uv.y, noiseSmooth.x);
+ return mix(ab.x, ab.y, noiseSmooth.y);
+}
+vec4 PerlinNoise_Stage5_c2_c0(vec4 _input) {
+ vec4 _output;
+ vec2 noiseVec = floor(vTransformedCoords_4_Stage0) * ubaseFrequency_Stage5_c2_c0;
+ _output = vec4(0.0);
+ vec2 stitchData = ustitchData_Stage5_c2_c0;
+ float ratio = 1.0;
+ for (int octave = 0;octave < 4; ++octave) {
+ _output += abs(vec4(perlinnoise_Stage5_c2_c0(0.125, noiseVec, stitchData), perlinnoise_Stage5_c2_c0(0.375, noiseVec, stitchData), perlinnoise_Stage5_c2_c0(0.625, noiseVec, stitchData), perlinnoise_Stage5_c2_c0(0.875, noiseVec, stitchData))) * ratio;
+ noiseVec *= vec2(2.0);
+ ratio *= 0.5;
+ stitchData *= vec2(2.0);
+ }
+ _output = clamp(_output, 0.0, 1.0);
+ _output = vec4(_output.xyz * _output.www, _output.w);
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vinColor_Stage0;
+ vec2 uv = vTextureCoords_Stage0;
+ vec4 texColor;
+ {
+ texColor = texture(uTextureSampler_0_Stage0, uv);
+ }
+ float distance = 7.96875 * (texColor.x - 0.50196081399917603);
+ float afwidth;
+ vec2 dist_grad = vec2(dFdx(distance), dFdy(distance));
+ float dg_len2 = dot(dist_grad, dist_grad);
+ if (dg_len2 < 9.9999997473787516e-05) {
+ dist_grad = vec2(0.70709997415542603, 0.70709997415542603);
+ } else {
+ dist_grad = dist_grad * inversesqrt(dg_len2);
+ }
+ vec2 Jdx = dFdx(vIntTextureCoords_Stage0);
+ vec2 Jdy = dFdy(vIntTextureCoords_Stage0);
+ vec2 grad = vec2(dist_grad.x * Jdx.x + dist_grad.y * Jdy.x, dist_grad.x * Jdx.y + dist_grad.y * Jdy.y);
+ afwidth = 0.64999997615814209 * length(grad);
+ float val = smoothstep(-afwidth, afwidth, distance);
+ outputCoverage_Stage0 = vec4(val);
+ }
+ {
+ blend_dst_in(outputCoverage_Stage0, TiledGradientEffect_Stage1_c0_c0(vec4(1.0)));
+ }
+ vec4 output_Stage2;
+ {
+ vec2 coords = vTransformedCoords_1_Stage0 * ubaseFrequency_Stage2;
+ float r = noiseOctaves_Stage2(vec3(coords, uz_Stage2));
+ float g = noiseOctaves_Stage2(vec3(coords, uz_Stage2));
+ float b = noiseOctaves_Stage2(vec3(coords, uz_Stage2));
+ float a = noiseOctaves_Stage2(vec3(coords, uz_Stage2));
+ output_Stage2 = vec4(r, g, b, a);
+ output_Stage2 = clamp(output_Stage2, 0.0, 1.0);
+ output_Stage2 = vec4(output_Stage2.xyz * output_Stage2.www, output_Stage2.w);
+ }
+ vec4 output_Stage3;
+ {
+ vec4 color = output_Stage2;
+ vec4 mask_color = texture(uTextureSampler_0_Stage3, vTransformedCoords_2_Stage0);
+ if (mask_color.w < 0.5) {
+ if (color.w > uouterThreshold_Stage3) {
+ float scale = uouterThreshold_Stage3 / color.w;
+ color.xyz *= scale;
+ color.w = uouterThreshold_Stage3;
+ }
+ } else if (color.w < uinnerThreshold_Stage3) {
+ float scale = uinnerThreshold_Stage3 / max(0.0010000000474974513, color.w);
+ color.xyz *= scale;
+ color.w = uinnerThreshold_Stage3;
+ }
+ output_Stage3 = color;
+ }
+ vec4 output_Stage4;
+ {
+ output_Stage4 = blend_dst_in(output_Stage3, TiledGradientEffect_Stage4_c1_c0(vec4(1.0)));
+ }
+ vec4 output_Stage5;
+ {
+ output_Stage5 = blend_dst_in(output_Stage4, PerlinNoise_Stage5_c2_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage5 * outputColor_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform vec2 uAtlasDimensionsInv_Stage0;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+uniform mat3 uCoordTransformMatrix_3_Stage0;
+uniform mat3 uCoordTransformMatrix_4_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in uvec2 inTextureCoords;
+out vec2 vTextureCoords_Stage0;
+flat out int vTexIndex_Stage0;
+out vec2 vIntTextureCoords_Stage0;
+out vec4 vinColor_Stage0;
+out vec2 vTransformedCoords_0_Stage0;
+out vec2 vTransformedCoords_1_Stage0;
+out vec2 vTransformedCoords_2_Stage0;
+out vec2 vTransformedCoords_3_Stage0;
+out vec2 vTransformedCoords_4_Stage0;
+void main() {
+ ivec2 signedCoords = ivec2(int(inTextureCoords.x), int(inTextureCoords.y));
+ vec2 unormTexCoords = vec2(float(signedCoords.x / 2), float(signedCoords.y / 2));
+ vTextureCoords_Stage0 = unormTexCoords * uAtlasDimensionsInv_Stage0;
+ vTexIndex_Stage0 = 0;
+ vIntTextureCoords_Stage0 = unormTexCoords;
+ vinColor_Stage0 = inColor;
+ vec3 pos3 = uViewM_Stage0 * vec3(inPosition, 1.0);
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_3_Stage0 = (uCoordTransformMatrix_3_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_4_Stage0 = (uCoordTransformMatrix_4_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos3.x, pos3.y, 0.0, pos3.z);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/517-3.shader_test b/shaders/skia/517-3.shader_test
new file mode 100644
index 0000000..ba85c21
--- /dev/null
+++ b/shaders/skia/517-3.shader_test
@@ -0,0 +1,86 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uscale01_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias01_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale23_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias23_Stage2_c0_c0_c1_c0;
+uniform float uthreshold_Stage2_c0_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 RadialGradientLayout_Stage2_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = length(vTransformedCoords_1_Stage0);
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 DualIntervalGradientColorizer_Stage2_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthreshold_Stage2_c0_c0_c1_c0) {
+ scale = uscale01_Stage2_c0_c0_c1_c0;
+ bias = ubias01_Stage2_c0_c0_c1_c0;
+ } else {
+ scale = uscale23_Stage2_c0_c0_c1_c0;
+ bias = ubias23_Stage2_c0_c0_c1_c0;
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = RadialGradientLayout_Stage2_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ t.x = fract(t.x);
+ }
+ _output = DualIntervalGradientColorizer_Stage2_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_dst_in(output_Stage1, TiledGradientEffect_Stage2_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/517-4.shader_test b/shaders/skia/517-4.shader_test
new file mode 100644
index 0000000..43d2fda
--- /dev/null
+++ b/shaders/skia/517-4.shader_test
@@ -0,0 +1,61 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 urectH_Stage2_c0_c0;
+uniform float uinvSixSigma_Stage2_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 RectBlurEffect_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ float xCoverage, yCoverage;
+ {
+ float x, y;
+ {
+ x = max(urectH_Stage2_c0_c0.x - gl_FragCoord.x, gl_FragCoord.x - urectH_Stage2_c0_c0.z);
+ y = max(urectH_Stage2_c0_c0.y - gl_FragCoord.y, gl_FragCoord.y - urectH_Stage2_c0_c0.w);
+ }
+ xCoverage = texture(uTextureSampler_0_Stage2, vec2(x * uinvSixSigma_Stage2_c0_c0, 0.5)).w;
+ yCoverage = texture(uTextureSampler_0_Stage2, vec2(y * uinvSixSigma_Stage2_c0_c0, 0.5)).w;
+ _output = (_input * xCoverage) * yCoverage;
+ }
+ _output = (_input * xCoverage) * yCoverage;
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_src_in(output_Stage1, RectBlurEffect_Stage2_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/517.shader_test b/shaders/skia/517.shader_test
new file mode 100644
index 0000000..f3f6e6b
--- /dev/null
+++ b/shaders/skia/517.shader_test
@@ -0,0 +1,99 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 ucolor_Stage1_c0_c0_c0_c0;
+uniform vec4 ucolor_Stage2_c1_c0;
+noperspective in vec4 vcolor_Stage0;
+vec4 ConstColorProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = _input.w * ucolor_Stage1_c0_c0_c0_c0;
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = ConstColorProcessor_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c1_c0;
+ }
+ return _output;
+}
+float _guarded_divide(float n, float d) {
+ return n / d;
+}
+float _soft_light_component(float sc, float sa, float dc, float da) {
+ if (2.0 * sc <= sa) {
+ return (_guarded_divide((dc * dc) * (sa - 2.0 * sc), da) + (1.0 - da) * sc) + dc * ((-sa + 2.0 * sc) + 1.0);
+ } else if (4.0 * dc <= da) {
+ float DSqd = dc * dc;
+ float DCub = DSqd * dc;
+ float DaSqd = da * da;
+ float DaCub = DaSqd * da;
+ return _guarded_divide(((DaSqd * (sc - dc * ((3.0 * sa - 6.0 * sc) - 1.0)) + ((12.0 * da) * DSqd) * (sa - 2.0 * sc)) - (16.0 * DCub) * (sa - 2.0 * sc)) - DaCub * sc, DaSqd);
+ }
+ return ((dc * ((sa - 2.0 * sc) + 1.0) + sc) - sqrt(da * dc) * (sa - 2.0 * sc)) - da * sc;
+}
+vec4 blend_soft_light(vec4 src, vec4 dst) {
+ if (dst.w == 0.0) {
+ return src;
+ }
+ return vec4(_soft_light_component(src.x, src.w, dst.x, dst.w), _soft_light_component(src.y, src.w, dst.y, dst.w), _soft_light_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 blend_darken(vec4 src, vec4 dst) {
+ vec4 result = blend_src_over(src, dst);
+ result.xyz = min(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
+ return result;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_soft_light(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_darken(ConstColorProcessor_Stage2_c1_c0(vec4(1.0)), output_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 position;
+in vec4 inColor;
+noperspective out vec4 vcolor_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/52-1.shader_test b/shaders/skia/52-1.shader_test
new file mode 100644
index 0000000..1a68a6f
--- /dev/null
+++ b/shaders/skia/52-1.shader_test
@@ -0,0 +1,55 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 TextureEffect_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage2, vTransformedCoords_1_Stage0) * _input;
+ return _output;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 blend_darken(vec4 src, vec4 dst) {
+ vec4 result = blend_src_over(src, dst);
+ result.xyz = min(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
+ return result;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_darken(output_Stage1, TextureEffect_Stage2_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/52-11.shader_test b/shaders/skia/52-11.shader_test
new file mode 100644
index 0000000..c0752f6
--- /dev/null
+++ b/shaders/skia/52-11.shader_test
@@ -0,0 +1,60 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uborder_Stage1;
+uniform vec4 usubset_Stage1;
+uniform vec4 unorm_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+flat in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec2 inCoord = vTransformedCoords_0_Stage0;
+ inCoord *= unorm_Stage1.xy;
+ vec2 subsetCoord;
+ subsetCoord.x = inCoord.x;
+ subsetCoord.y = inCoord.y;
+ vec2 clampedCoord;
+ clampedCoord.x = subsetCoord.x;
+ clampedCoord.y = subsetCoord.y;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord * unorm_Stage1.zw);
+ if (inCoord.x < usubset_Stage1.x || inCoord.x > usubset_Stage1.z) {
+ textureColor = uborder_Stage1;
+ }
+ if (inCoord.y < usubset_Stage1.y || inCoord.y > usubset_Stage1.w) {
+ textureColor = uborder_Stage1;
+ }
+ output_Stage1 = outputColor_Stage0 * textureColor;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec2 inLocalCoords;
+in vec4 color;
+flat out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vcolor_Stage0 = color;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoords, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/52-13.shader_test b/shaders/skia/52-13.shader_test
new file mode 100644
index 0000000..3d5bc45
--- /dev/null
+++ b/shaders/skia/52-13.shader_test
@@ -0,0 +1,111 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 uscale01_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias01_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale23_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias23_Stage1_c0_c0_c1_c0;
+uniform float uthreshold_Stage1_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage2_c1_c0_c0_c0;
+uniform vec4 ucolor_Stage2_c2_c0_c0_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 RadialGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = length(vTransformedCoords_0_Stage0);
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 DualIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthreshold_Stage1_c0_c0_c1_c0) {
+ scale = uscale01_Stage1_c0_c0_c1_c0;
+ bias = ubias01_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale23_Stage1_c0_c0_c1_c0;
+ bias = ubias23_Stage1_c0_c0_c1_c0;
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = RadialGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = DualIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c1_c0_c0_c0;
+ }
+ return _output;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 ComposeOne_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_src_over(ConstColorProcessor_Stage2_c1_c0_c0_c0(vec4(1.0)), _input);
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c2_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c2_c0_c0_c0;
+ }
+ return _output;
+}
+vec4 blend_src_atop(vec4 src, vec4 dst) {
+ return dst.w * src + (1.0 - src.w) * dst;
+}
+vec4 ComposeOne_Stage2_c2_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_src_atop(ConstColorProcessor_Stage2_c2_c0_c0_c0(vec4(1.0)), _input);
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = ComposeOne_Stage2_c2_c0(ComposeOne_Stage2_c1_c0(output_Stage1));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/52-14.shader_test b/shaders/skia/52-14.shader_test
new file mode 100644
index 0000000..c5b88f4
--- /dev/null
+++ b/shaders/skia/52-14.shader_test
@@ -0,0 +1,119 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 uscale01_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias01_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale23_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias23_Stage1_c0_c0_c1_c0;
+uniform float uthreshold_Stage1_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage2_c1_c0_c0_c0;
+uniform vec4 ucolor_Stage2_c2_c0_c0_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 RadialGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = length(vTransformedCoords_0_Stage0);
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 DualIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthreshold_Stage1_c0_c0_c1_c0) {
+ scale = uscale01_Stage1_c0_c0_c1_c0;
+ bias = ubias01_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale23_Stage1_c0_c0_c1_c0;
+ bias = ubias23_Stage1_c0_c0_c1_c0;
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = RadialGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = DualIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c1_c0_c0_c0;
+ }
+ return _output;
+}
+float _blend_overlay_component(float sc, float sa, float dc, float da) {
+ if (2.0 * dc <= da) {
+ return (2.0 * sc) * dc;
+ }
+ return sa * da - (2.0 * (da - dc)) * (sa - sc);
+}
+vec4 blend_overlay(vec4 src, vec4 dst) {
+ vec4 result = vec4(_blend_overlay_component(src.x, src.w, dst.x, dst.w), _blend_overlay_component(src.y, src.w, dst.y, dst.w), _blend_overlay_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+ result.xyz += dst.xyz * (1.0 - src.w) + src.xyz * (1.0 - dst.w);
+ return result;
+}
+vec4 ComposeOne_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_overlay(ConstColorProcessor_Stage2_c1_c0_c0_c0(vec4(1.0)), _input);
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c2_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c2_c0_c0_c0;
+ }
+ return _output;
+}
+vec4 blend_exclusion(vec4 src, vec4 dst) {
+ return vec4((dst.xyz + src.xyz) - (2.0 * dst.xyz) * src.xyz, src.w + (1.0 - src.w) * dst.w);
+}
+vec4 ComposeOne_Stage2_c2_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_exclusion(ConstColorProcessor_Stage2_c2_c0_c0_c0(vec4(1.0)), _input);
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = ComposeOne_Stage2_c2_c0(ComposeOne_Stage2_c1_c0(output_Stage1));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/52-2.shader_test b/shaders/skia/52-2.shader_test
new file mode 100644
index 0000000..d7c1f41
--- /dev/null
+++ b/shaders/skia/52-2.shader_test
@@ -0,0 +1,77 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uclamp_Stage1_c0_c0_c0_c0;
+uniform mat4 um_Stage2;
+uniform vec4 uv_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 inCoord = vTransformedCoords_0_Stage0;
+ vec2 subsetCoord;
+ subsetCoord.x = inCoord.x;
+ subsetCoord.y = inCoord.y;
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage1_c0_c0_c0_c0.x, uclamp_Stage1_c0_c0_c0_c0.z);
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage1_c0_c0_c0_c0.y, uclamp_Stage1_c0_c0_c0_c0.w);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ _output = _input * textureColor;
+ return _output;
+}
+vec4 YUVtoRGBEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 planes[1];
+ planes[0] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0));
+ vec4 color = vec4(planes[0].x, planes[0].y, planes[0].z, planes[0].w);
+ color.xyz *= color.w;
+ _output = color;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = YUVtoRGBEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ vec4 inputColor = output_Stage1;
+ {
+ float nonZeroAlpha = max(inputColor.w, 9.9999997473787516e-05);
+ inputColor = vec4(inputColor.xyz / nonZeroAlpha, inputColor.w);
+ }
+ output_Stage2 = um_Stage2 * inputColor + uv_Stage2;
+ {
+ output_Stage2 = clamp(output_Stage2, 0.0, 1.0);
+ }
+ {
+ output_Stage2.xyz *= output_Stage2.w;
+ }
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/52-21.shader_test b/shaders/skia/52-21.shader_test
new file mode 100644
index 0000000..b0cc0e5
--- /dev/null
+++ b/shaders/skia/52-21.shader_test
@@ -0,0 +1,94 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 uscale01_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias01_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale23_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias23_Stage1_c0_c0_c1_c0;
+uniform float uthreshold_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vEllipseOffsets_Stage0;
+noperspective in vec4 vEllipseRadii_Stage0;
+noperspective in vec4 vinColor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 RadialGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = length(vTransformedCoords_0_Stage0);
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 DualIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthreshold_Stage1_c0_c0_c1_c0) {
+ scale = uscale01_Stage1_c0_c0_c1_c0;
+ bias = ubias01_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale23_Stage1_c0_c0_c1_c0;
+ bias = ubias23_Stage1_c0_c0_c1_c0;
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = RadialGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = DualIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ vec2 offset = vEllipseOffsets_Stage0;
+ float test = dot(offset, offset) - 1.0;
+ vec2 grad = (2.0 * offset) * vEllipseRadii_Stage0.xy;
+ float grad_dot = dot(grad, grad);
+ grad_dot = max(grad_dot, 1.1754999560161448e-38);
+ float invlen = inversesqrt(grad_dot);
+ float edgeAlpha = clamp(0.5 - test * invlen, 0.0, 1.0);
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1 * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec2 inEllipseOffset;
+in vec4 inEllipseRadii;
+noperspective out vec2 vEllipseOffsets_Stage0;
+noperspective out vec4 vEllipseRadii_Stage0;
+noperspective out vec4 vinColor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vEllipseOffsets_Stage0 = inEllipseOffset;
+ vEllipseRadii_Stage0 = inEllipseRadii;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/52-22.shader_test b/shaders/skia/52-22.shader_test
new file mode 100644
index 0000000..fb26133
--- /dev/null
+++ b/shaders/skia/52-22.shader_test
@@ -0,0 +1,41 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform float uPixelSize_Stage1;
+uniform vec2 uRange_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = vec4(1.0, 1.0, 1.0, 1.0);
+ vec2 coord = vTransformedCoords_0_Stage0;
+ coord.y -= 25.0 * uPixelSize_Stage1;
+ for (int i = 0;i < 51; i++) {
+ output_Stage1 = min(output_Stage1, texture(uTextureSampler_0_Stage1, coord));
+ coord.y += uPixelSize_Stage1;
+ }
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/52-23.shader_test b/shaders/skia/52-23.shader_test
new file mode 100644
index 0000000..924243c
--- /dev/null
+++ b/shaders/skia/52-23.shader_test
@@ -0,0 +1,78 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage2_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c1_c0;
+ }
+ return _output;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_src_over(ConstColorProcessor_Stage2_c1_c0(vec4(1.0)), output_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/52-24.shader_test b/shaders/skia/52-24.shader_test
new file mode 100644
index 0000000..1e02b6f
--- /dev/null
+++ b/shaders/skia/52-24.shader_test
@@ -0,0 +1,44 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform float uPixelSize_Stage1;
+uniform vec2 uRange_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0;
+ coord.y -= 4.0 * uPixelSize_Stage1;
+ float highBound = min(uRange_Stage1.y, coord.y + 8.0 * uPixelSize_Stage1);
+ coord.y = max(uRange_Stage1.x, coord.y);
+ for (int i = 0;i < 9; i++) {
+ output_Stage1 = max(output_Stage1, texture(uTextureSampler_0_Stage1, coord));
+ coord.y += uPixelSize_Stage1;
+ coord.y = min(highBound, coord.y);
+ }
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/52-25.shader_test b/shaders/skia/52-25.shader_test
new file mode 100644
index 0000000..1cba041
--- /dev/null
+++ b/shaders/skia/52-25.shader_test
@@ -0,0 +1,135 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform float uSurfaceScale_Stage1;
+uniform vec3 uLightColor_Stage1;
+uniform float uKD_Stage1;
+uniform vec3 uLightDirection_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 light_Stage1(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ float colorScale = uKD_Stage1 * dot(normal, surfaceToLight);
+ return vec4(lightColor * clamp(colorScale, 0.0, 1.0), 1.0);
+}
+float sobel_Stage1(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage1(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage1(float m[9], float surfaceScale) {
+ return pointToNormal_Stage1(sobel_Stage1(m[1], m[2], m[4], m[5], 0.0, 0.0, 0.66666698455810547), sobel_Stage1(0.0, 0.0, m[1], m[4], m[2], m[5], 0.66666698455810547), surfaceScale);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ vec2 coord = vTransformedCoords_0_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp0 = textureColor;
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp1 = textureColor;
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp2 = textureColor;
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp3 = textureColor;
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp4 = textureColor;
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp5 = textureColor;
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp6 = textureColor;
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp7 = textureColor;
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp8 = textureColor;
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = uLightDirection_Stage1;
+ output_Stage1 = light_Stage1(normal_Stage1(m, uSurfaceScale_Stage1), surfaceToLight, uLightColor_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/52-26.shader_test b/shaders/skia/52-26.shader_test
new file mode 100644
index 0000000..35ab754
--- /dev/null
+++ b/shaders/skia/52-26.shader_test
@@ -0,0 +1,75 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec2 uDstTextureUpperLeft_Stage1;
+uniform vec2 uDstTextureCoordScale_Stage1;
+uniform sampler2D uTextureSampler_0_Stage0;
+uniform sampler2D uDstTextureSampler_Stage1;
+noperspective in vec2 vTextureCoords_Stage0;
+flat in int vTexIndex_Stage0;
+noperspective in vec4 vinColor_Stage0;
+float _blend_overlay_component(float sc, float sa, float dc, float da) {
+ if (2.0 * dc <= da) {
+ return (2.0 * sc) * dc;
+ }
+ return sa * da - (2.0 * (da - dc)) * (sa - sc);
+}
+vec4 blend_overlay(vec4 src, vec4 dst) {
+ vec4 result = vec4(_blend_overlay_component(src.x, src.w, dst.x, dst.w), _blend_overlay_component(src.y, src.w, dst.y, dst.w), _blend_overlay_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+ result.xyz += dst.xyz * (1.0 - src.w) + src.xyz * (1.0 - dst.w);
+ return result;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vinColor_Stage0;
+ vec4 texColor;
+ {
+ texColor = texture(uTextureSampler_0_Stage0, vTextureCoords_Stage0);
+ }
+ outputCoverage_Stage0 = texColor;
+ }
+ {
+ if (all(lessThanEqual(outputCoverage_Stage0.xyz, vec3(0.0)))) {
+ discard;
+ }
+ vec2 _dstTexCoord = (gl_FragCoord.xy - uDstTextureUpperLeft_Stage1) * uDstTextureCoordScale_Stage1;
+ _dstTexCoord.y = 1.0 - _dstTexCoord.y;
+ vec4 _dstColor = texture(uDstTextureSampler_Stage1, _dstTexCoord);
+ sk_FragColor = blend_overlay(outputColor_Stage0, _dstColor);
+ float lerpRed = mix(_dstColor.w, sk_FragColor.w, outputCoverage_Stage0.x);
+ float lerpBlue = mix(_dstColor.w, sk_FragColor.w, outputCoverage_Stage0.y);
+ float lerpGreen = mix(_dstColor.w, sk_FragColor.w, outputCoverage_Stage0.z);
+ sk_FragColor = outputCoverage_Stage0 * sk_FragColor + (vec4(1.0) - outputCoverage_Stage0) * _dstColor;
+ sk_FragColor.w = max(max(lerpRed, lerpBlue), lerpGreen);
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform vec2 uAtlasSizeInv_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in uvec2 inTextureCoords;
+noperspective out vec2 vTextureCoords_Stage0;
+flat out int vTexIndex_Stage0;
+noperspective out vec4 vinColor_Stage0;
+void main() {
+ ivec2 signedCoords = ivec2(int(inTextureCoords.x), int(inTextureCoords.y));
+ vec2 unormTexCoords = vec2(float(signedCoords.x / 2), float(signedCoords.y / 2));
+ vTextureCoords_Stage0 = unormTexCoords * uAtlasSizeInv_Stage0;
+ vTexIndex_Stage0 = 0;
+ vinColor_Stage0 = inColor;
+ gl_Position = vec4(inPosition.x, inPosition.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/52-27.shader_test b/shaders/skia/52-27.shader_test
new file mode 100644
index 0000000..45f6093
--- /dev/null
+++ b/shaders/skia/52-27.shader_test
@@ -0,0 +1,41 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform float uPixelSize_Stage1;
+uniform vec2 uRange_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0;
+ coord.x -= 10.0 * uPixelSize_Stage1;
+ for (int i = 0;i < 21; i++) {
+ output_Stage1 = max(output_Stage1, texture(uTextureSampler_0_Stage1, coord));
+ coord.x += uPixelSize_Stage1;
+ }
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/52-3.shader_test b/shaders/skia/52-3.shader_test
new file mode 100644
index 0000000..265ad2b
--- /dev/null
+++ b/shaders/skia/52-3.shader_test
@@ -0,0 +1,42 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 TextureEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ vec4 planes[1];
+ planes[0] = TextureEffect_Stage1_c0_c0(vec4(1.0));
+ vec4 color = vec4(planes[0].y, planes[0].x, planes[0].z, planes[0].w);
+ color.xyz *= color.w;
+ output_Stage1 = color;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/52-33.shader_test b/shaders/skia/52-33.shader_test
new file mode 100644
index 0000000..579bf31
--- /dev/null
+++ b/shaders/skia/52-33.shader_test
@@ -0,0 +1,44 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform float uPixelSize_Stage1;
+uniform vec2 uRange_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = vec4(1.0, 1.0, 1.0, 1.0);
+ vec2 coord = vTransformedCoords_0_Stage0;
+ coord.x -= uPixelSize_Stage1;
+ float highBound = min(uRange_Stage1.y, coord.x + 2.0 * uPixelSize_Stage1);
+ coord.x = max(uRange_Stage1.x, coord.x);
+ for (int i = 0;i < 3; i++) {
+ output_Stage1 = min(output_Stage1, texture(uTextureSampler_0_Stage1, coord));
+ coord.x += uPixelSize_Stage1;
+ coord.x = min(highBound, coord.x);
+ }
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/52-4.shader_test b/shaders/skia/52-4.shader_test
new file mode 100644
index 0000000..e5f0028
--- /dev/null
+++ b/shaders/skia/52-4.shader_test
@@ -0,0 +1,78 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform mat4 um_Stage2;
+uniform vec4 uv_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_1_Stage1, vTransformedCoords_1_Stage0) * _input;
+ return _output;
+}
+vec4 YUVtoRGBEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 planes[2];
+ planes[0] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0));
+ planes[1] = TextureEffect_Stage1_c0_c0_c1_c0(vec4(1.0));
+ vec4 color = vec4(planes[0].x, planes[1].y, planes[1].x, 1.0);
+ _output = color;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = YUVtoRGBEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ vec4 inputColor = output_Stage1;
+ {
+ float nonZeroAlpha = max(inputColor.w, 9.9999997473787516e-05);
+ inputColor = vec4(inputColor.xyz / nonZeroAlpha, inputColor.w);
+ }
+ output_Stage2 = um_Stage2 * inputColor + uv_Stage2;
+ {
+ output_Stage2 = clamp(output_Stage2, 0.0, 1.0);
+ }
+ {
+ output_Stage2.xyz *= output_Stage2.w;
+ }
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/52-41.shader_test b/shaders/skia/52-41.shader_test
new file mode 100644
index 0000000..2d1d573
--- /dev/null
+++ b/shaders/skia/52-41.shader_test
@@ -0,0 +1,54 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec2 uDstTextureUpperLeft_Stage1;
+uniform vec2 uDstTextureCoordScale_Stage1;
+uniform sampler2D uDstTextureSampler_Stage1;
+flat in vec4 vcolor_Stage0;
+noperspective in float vcoverage_Stage0;
+vec4 blend_dst_atop(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src + src.w * dst;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ float coverage = vcoverage_Stage0;
+ outputCoverage_Stage0 = vec4(coverage);
+ }
+ {
+ if (all(lessThanEqual(outputCoverage_Stage0.xyz, vec3(0.0)))) {
+ discard;
+ }
+ vec2 _dstTexCoord = (gl_FragCoord.xy - uDstTextureUpperLeft_Stage1) * uDstTextureCoordScale_Stage1;
+ _dstTexCoord.y = 1.0 - _dstTexCoord.y;
+ vec4 _dstColor = texture(uDstTextureSampler_Stage1, _dstTexCoord);
+ sk_FragColor = blend_dst_atop(outputColor_Stage0, _dstColor);
+ sk_FragColor = outputCoverage_Stage0 * sk_FragColor + (vec4(1.0) - outputCoverage_Stage0) * _dstColor;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 position;
+in float coverage;
+in vec4 color;
+flat out vec4 vcolor_Stage0;
+noperspective out float vcoverage_Stage0;
+void main() {
+ vec2 position = position;
+ vcolor_Stage0 = color;
+ vcoverage_Stage0 = coverage;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/52-42.shader_test b/shaders/skia/52-42.shader_test
new file mode 100644
index 0000000..8a2c054
--- /dev/null
+++ b/shaders/skia/52-42.shader_test
@@ -0,0 +1,104 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_0_Stage0;
+ float t = -1.0;
+ float v = 1.0;
+ {
+ {
+ float invR1 = ufocalParams_Stage1_c0_c0_c0_c0.x;
+ float fx = ufocalParams_Stage1_c0_c0_c0_c0.y;
+ float x_t = -1.0;
+ {
+ float temp = p.x * p.x - p.y * p.y;
+ if (temp >= 0.0) {
+ {
+ x_t = -sqrt(temp) - p.x * invR1;
+ }
+ }
+ }
+ {
+ if (x_t <= 0.0) {
+ v = -1.0;
+ }
+ }
+ {
+ {
+ t = -x_t + fx;
+ }
+ }
+ }
+ }
+ _output = vec4(t, v, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_dst_in(outputColor_Stage0, ClampedGradientEffect_Stage1_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/52-43.shader_test b/shaders/skia/52-43.shader_test
new file mode 100644
index 0000000..4481f35
--- /dev/null
+++ b/shaders/skia/52-43.shader_test
@@ -0,0 +1,120 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_0_Stage0;
+ float t = -1.0;
+ float v = 1.0;
+ {
+ {
+ float invR1 = ufocalParams_Stage1_c0_c0_c0_c0.x;
+ float fx = ufocalParams_Stage1_c0_c0_c0_c0.y;
+ float x_t = -1.0;
+ {
+ float temp = p.x * p.x - p.y * p.y;
+ if (temp >= 0.0) {
+ {
+ x_t = -sqrt(temp) - p.x * invR1;
+ }
+ }
+ }
+ {
+ if (x_t <= 0.0) {
+ v = -1.0;
+ }
+ }
+ {
+ {
+ t = -x_t + fx;
+ }
+ }
+ }
+ }
+ _output = vec4(t, v, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_dst_in(outputColor_Stage0, ClampedGradientEffect_Stage1_c0_c0(vec4(1.0)));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_1_Stage0.x);
+ uint y = uint(vTransformedCoords_1_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ output_Stage2 = vec4(clamp(output_Stage2.xyz + value * 0.0039215688593685627, 0.0, output_Stage2.w), output_Stage2.w);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/52-44.shader_test b/shaders/skia/52-44.shader_test
new file mode 100644
index 0000000..77e2629
--- /dev/null
+++ b/shaders/skia/52-44.shader_test
@@ -0,0 +1,110 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_0_Stage0;
+ float t = -1.0;
+ {
+ {
+ float invR1 = ufocalParams_Stage1_c0_c0_c0_c0.x;
+ float x_t = -1.0;
+ {
+ x_t = length(p) - p.x * invR1;
+ }
+ {
+ {
+ t = x_t;
+ }
+ }
+ }
+ }
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/52-45.shader_test b/shaders/skia/52-45.shader_test
new file mode 100644
index 0000000..0af4f17
--- /dev/null
+++ b/shaders/skia/52-45.shader_test
@@ -0,0 +1,125 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_0_Stage0;
+ float t = -1.0;
+ {
+ {
+ float invR1 = ufocalParams_Stage1_c0_c0_c0_c0.x;
+ float x_t = -1.0;
+ {
+ x_t = length(p) - p.x * invR1;
+ }
+ {
+ {
+ t = x_t;
+ }
+ }
+ }
+ }
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TiledGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_1_Stage0.x);
+ uint y = uint(vTransformedCoords_1_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ output_Stage2 = vec4(clamp(output_Stage2.xyz + value * 0.0039215688593685627, 0.0, output_Stage2.w), output_Stage2.w);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/52-46.shader_test b/shaders/skia/52-46.shader_test
new file mode 100644
index 0000000..c1d145a
--- /dev/null
+++ b/shaders/skia/52-46.shader_test
@@ -0,0 +1,123 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_0_Stage0;
+ float t = -1.0;
+ {
+ {
+ float invR1 = ufocalParams_Stage1_c0_c0_c0_c0.x;
+ float x_t = -1.0;
+ {
+ x_t = length(p) - p.x * invR1;
+ }
+ {
+ {
+ t = x_t;
+ }
+ }
+ }
+ }
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else {
+ {
+ t.x = fract(t.x);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TiledGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_1_Stage0.x);
+ uint y = uint(vTransformedCoords_1_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ output_Stage2 = vec4(clamp(output_Stage2.xyz + value * 0.0039215688593685627, 0.0, output_Stage2.w), output_Stage2.w);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/52-47.shader_test b/shaders/skia/52-47.shader_test
new file mode 100644
index 0000000..83c1069
--- /dev/null
+++ b/shaders/skia/52-47.shader_test
@@ -0,0 +1,126 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_0_Stage0;
+ float t = -1.0;
+ {
+ {
+ float invR1 = ufocalParams_Stage1_c0_c0_c0_c0.x;
+ float x_t = -1.0;
+ {
+ x_t = length(p) - p.x * invR1;
+ }
+ {
+ {
+ t = x_t;
+ }
+ }
+ }
+ }
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_1_Stage0.x);
+ uint y = uint(vTransformedCoords_1_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ output_Stage2 = vec4(clamp(output_Stage2.xyz + value * 0.0039215688593685627, 0.0, output_Stage2.w), output_Stage2.w);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/52-49.shader_test b/shaders/skia/52-49.shader_test
new file mode 100644
index 0000000..9a273ee
--- /dev/null
+++ b/shaders/skia/52-49.shader_test
@@ -0,0 +1,75 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 TextureEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = TextureEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = OverrideInputFragmentProcessor_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+float _blend_overlay_component(float sc, float sa, float dc, float da) {
+ if (2.0 * dc <= da) {
+ return (2.0 * sc) * dc;
+ }
+ return sa * da - (2.0 * (da - dc)) * (sa - sc);
+}
+vec4 blend_overlay(vec4 src, vec4 dst) {
+ vec4 result = vec4(_blend_overlay_component(src.x, src.w, dst.x, dst.w), _blend_overlay_component(src.y, src.w, dst.y, dst.w), _blend_overlay_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+ result.xyz += dst.xyz * (1.0 - src.w) + src.xyz * (1.0 - dst.w);
+ return result;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_overlay(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec2 inLocalCoord;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 color = inColor;
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/52-50.shader_test b/shaders/skia/52-50.shader_test
new file mode 100644
index 0000000..4143c6c
--- /dev/null
+++ b/shaders/skia/52-50.shader_test
@@ -0,0 +1,69 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec3 uedges_Stage1[4];
+uniform sampler2D uTextureSampler_0_Stage0;
+noperspective in vec2 vTextureCoords_Stage0;
+flat in int vTexIndex_Stage0;
+noperspective in vec4 vinColor_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vinColor_Stage0;
+ vec4 texColor;
+ {
+ texColor = texture(uTextureSampler_0_Stage0, vTextureCoords_Stage0);
+ }
+ outputCoverage_Stage0 = texColor;
+ }
+ vec4 output_Stage1;
+ {
+ float alpha = 1.0;
+ float edge;
+ edge = dot(uedges_Stage1[0], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage1[1], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage1[2], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage1[3], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ output_Stage1 = outputCoverage_Stage0 * alpha;
+ }
+ {
+ sk_FragColor = outputColor_Stage0 * output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform vec2 uAtlasSizeInv_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in uvec2 inTextureCoords;
+noperspective out vec2 vTextureCoords_Stage0;
+flat out int vTexIndex_Stage0;
+noperspective out vec4 vinColor_Stage0;
+void main() {
+ ivec2 signedCoords = ivec2(int(inTextureCoords.x), int(inTextureCoords.y));
+ vec2 unormTexCoords = vec2(float(signedCoords.x / 2), float(signedCoords.y / 2));
+ vTextureCoords_Stage0 = unormTexCoords * uAtlasSizeInv_Stage0;
+ vTexIndex_Stage0 = 0;
+ vinColor_Stage0 = inColor;
+ gl_Position = vec4(inPosition.x, inPosition.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/52-51.shader_test b/shaders/skia/52-51.shader_test
new file mode 100644
index 0000000..7ace1ef
--- /dev/null
+++ b/shaders/skia/52-51.shader_test
@@ -0,0 +1,102 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage2_c1_c0_c0_c0;
+uniform vec4 urightBorderColor_Stage2_c1_c0_c0_c0;
+uniform vec4 ustart_Stage2_c1_c0_c0_c0_c1_c0;
+uniform vec4 uend_Stage2_c1_c0_c0_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+noperspective in float vcoverage_Stage0;
+vec4 TextureEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+vec4 RadialGradientLayout_Stage2_c1_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = length(vTransformedCoords_1_Stage0);
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage2_c1_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage2_c1_c0_c0_c0_c1_c0 + t * uend_Stage2_c1_c0_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage2_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = RadialGradientLayout_Stage2_c1_c0_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage2_c1_c0_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage2_c1_c0_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage2_c1_c0_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+vec4 ComposeOne_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_dst_in(_input, ClampedGradientEffect_Stage2_c1_c0_c0_c0(vec4(1.0)));
+ return _output;
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ float coverage = vcoverage_Stage0;
+ outputCoverage_Stage0 = vec4(coverage);
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TextureEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_src_in(outputCoverage_Stage0, ComposeOne_Stage2_c1_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage1 * output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in float coverage;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+noperspective out float vcoverage_Stage0;
+void main() {
+ vec2 position = position;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ vcoverage_Stage0 = coverage;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/52-52.shader_test b/shaders/skia/52-52.shader_test
new file mode 100644
index 0000000..fd22c0d
--- /dev/null
+++ b/shaders/skia/52-52.shader_test
@@ -0,0 +1,127 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 uleftBorderColor_Stage1_c1_c0_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c1_c0_c0_c0;
+uniform vec4 ustart_Stage1_c1_c0_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c1_c0_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+vec4 ComposeOne_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_dst_in(_input, ClampedGradientEffect_Stage1_c0_c0_c0_c0(vec4(1.0)));
+ return _output;
+}
+vec4 LinearGradientLayout_Stage1_c1_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_1_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c1_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c1_c0_c0_c0_c1_c0 + t * uend_Stage1_c1_c0_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c1_c0_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c1_c0_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c1_c0_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c1_c0_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 ComposeOne_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_dst_in(_input, ClampedGradientEffect_Stage1_c1_c0_c0_c0(vec4(1.0)));
+ return _output;
+}
+vec4 blend_dst_out(vec4 src, vec4 dst) {
+ return (1.0 - src.w) * dst;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_dst_out(ComposeOne_Stage1_c0_c0(inputColor), ComposeOne_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/52-53.shader_test b/shaders/skia/52-53.shader_test
new file mode 100644
index 0000000..d3109dc
--- /dev/null
+++ b/shaders/skia/52-53.shader_test
@@ -0,0 +1,132 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uCoordTransformMatrix_2_Stage0;
+uniform vec4 ustart_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c0_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_3_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c0_c0_c1_c0;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+vec4 ComposeOne_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_dst_in(_input, TiledGradientEffect_Stage1_c0_c0_c0_c0(vec4(1.0)));
+ return _output;
+}
+vec4 TextureEffect_Stage1_c1_c0_c0_c0(vec4 _input, vec2 _coords) {
+ _coords = _coords * uCoordTransformMatrix_2_Stage0.xz + uCoordTransformMatrix_2_Stage0.yw;
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, _coords) * _input;
+ return _output;
+}
+vec4 Bicubic_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coord = vTransformedCoords_1_Stage0 - vec2(0.5);
+ vec2 f = fract(coord);
+ coord += 0.5 - f;
+ vec4 wx = mat4(0.055555555555555552, 0.88888888888888884, 0.055555555555555552, 0.0, -0.5, 0.0, 0.5, 0.0, 0.83333333333333337, -2.0, 1.5, -0.33333333333333331, -0.3888888888888889, 1.1666666666666667, -1.1666666666666667, 0.3888888888888889) * vec4(1.0, f.x, f.x * f.x, (f.x * f.x) * f.x);
+ vec4 wy = mat4(0.055555555555555552, 0.88888888888888884, 0.055555555555555552, 0.0, -0.5, 0.0, 0.5, 0.0, 0.83333333333333337, -2.0, 1.5, -0.33333333333333331, -0.3888888888888889, 1.1666666666666667, -1.1666666666666667, 0.3888888888888889) * vec4(1.0, f.y, f.y * f.y, (f.y * f.y) * f.y);
+ vec4 rowColors[4];
+ rowColors[0] = TextureEffect_Stage1_c1_c0_c0_c0(vec4(1.0), coord + vec2(-1.0, -1.0));
+ rowColors[1] = TextureEffect_Stage1_c1_c0_c0_c0(vec4(1.0), coord + vec2(0.0, -1.0));
+ rowColors[2] = TextureEffect_Stage1_c1_c0_c0_c0(vec4(1.0), coord + vec2(1.0, -1.0));
+ rowColors[3] = TextureEffect_Stage1_c1_c0_c0_c0(vec4(1.0), coord + vec2(2.0, -1.0));
+ vec4 s0 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ rowColors[0] = TextureEffect_Stage1_c1_c0_c0_c0(vec4(1.0), coord + vec2(-1.0, 0.0));
+ rowColors[1] = TextureEffect_Stage1_c1_c0_c0_c0(vec4(1.0), coord);
+ rowColors[2] = TextureEffect_Stage1_c1_c0_c0_c0(vec4(1.0), coord + vec2(1.0, 0.0));
+ rowColors[3] = TextureEffect_Stage1_c1_c0_c0_c0(vec4(1.0), coord + vec2(2.0, 0.0));
+ vec4 s1 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ rowColors[0] = TextureEffect_Stage1_c1_c0_c0_c0(vec4(1.0), coord + vec2(-1.0, 1.0));
+ rowColors[1] = TextureEffect_Stage1_c1_c0_c0_c0(vec4(1.0), coord + vec2(0.0, 1.0));
+ rowColors[2] = TextureEffect_Stage1_c1_c0_c0_c0(vec4(1.0), coord + vec2(1.0, 1.0));
+ rowColors[3] = TextureEffect_Stage1_c1_c0_c0_c0(vec4(1.0), coord + vec2(2.0, 1.0));
+ vec4 s2 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ rowColors[0] = TextureEffect_Stage1_c1_c0_c0_c0(vec4(1.0), coord + vec2(-1.0, 2.0));
+ rowColors[1] = TextureEffect_Stage1_c1_c0_c0_c0(vec4(1.0), coord + vec2(0.0, 2.0));
+ rowColors[2] = TextureEffect_Stage1_c1_c0_c0_c0(vec4(1.0), coord + vec2(1.0, 2.0));
+ rowColors[3] = TextureEffect_Stage1_c1_c0_c0_c0(vec4(1.0), coord + vec2(2.0, 2.0));
+ vec4 s3 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ vec4 bicubicColor = ((wy.x * s0 + wy.y * s1) + wy.z * s2) + wy.w * s3;
+ bicubicColor.xyz = max(vec3(0.0), min(bicubicColor.xyz, bicubicColor.www));
+ _output = bicubicColor * _input;
+ return _output;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = Bicubic_Stage1_c1_c0(ComposeOne_Stage1_c0_c0(outputColor_Stage0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = texture(uTextureSampler_0_Stage2, vTransformedCoords_3_Stage0);
+ }
+ {
+ sk_FragColor = output_Stage1 * output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_3_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_3_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_3_Stage0 = (uCoordTransformMatrix_3_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/52-55.shader_test b/shaders/skia/52-55.shader_test
new file mode 100644
index 0000000..81b6651
--- /dev/null
+++ b/shaders/skia/52-55.shader_test
@@ -0,0 +1,92 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uCoordTransformMatrix_1_Stage0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0_c0_c0(vec4 _input, vec2 _coords) {
+ _coords = _coords * uCoordTransformMatrix_1_Stage0.xz + uCoordTransformMatrix_1_Stage0.yw;
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, _coords) * _input;
+ return _output;
+}
+vec4 Bicubic_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coord = vTransformedCoords_0_Stage0 - vec2(0.5);
+ vec2 f = fract(coord);
+ coord += 0.5 - f;
+ vec4 wx = mat4(0.055555555555555552, 0.88888888888888884, 0.055555555555555552, 0.0, -0.5, 0.0, 0.5, 0.0, 0.83333333333333337, -2.0, 1.5, -0.33333333333333331, -0.3888888888888889, 1.1666666666666667, -1.1666666666666667, 0.3888888888888889) * vec4(1.0, f.x, f.x * f.x, (f.x * f.x) * f.x);
+ vec4 wy = mat4(0.055555555555555552, 0.88888888888888884, 0.055555555555555552, 0.0, -0.5, 0.0, 0.5, 0.0, 0.83333333333333337, -2.0, 1.5, -0.33333333333333331, -0.3888888888888889, 1.1666666666666667, -1.1666666666666667, 0.3888888888888889) * vec4(1.0, f.y, f.y * f.y, (f.y * f.y) * f.y);
+ vec4 rowColors[4];
+ rowColors[0] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(-1.0, -1.0));
+ rowColors[1] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(0.0, -1.0));
+ rowColors[2] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(1.0, -1.0));
+ rowColors[3] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(2.0, -1.0));
+ vec4 s0 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ rowColors[0] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(-1.0, 0.0));
+ rowColors[1] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord);
+ rowColors[2] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(1.0, 0.0));
+ rowColors[3] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(2.0, 0.0));
+ vec4 s1 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ rowColors[0] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(-1.0, 1.0));
+ rowColors[1] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(0.0, 1.0));
+ rowColors[2] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(1.0, 1.0));
+ rowColors[3] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(2.0, 1.0));
+ vec4 s2 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ rowColors[0] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(-1.0, 2.0));
+ rowColors[1] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(0.0, 2.0));
+ rowColors[2] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(1.0, 2.0));
+ rowColors[3] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(2.0, 2.0));
+ vec4 s3 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ vec4 bicubicColor = ((wy.x * s0 + wy.y * s1) + wy.z * s2) + wy.w * s3;
+ bicubicColor.xyz = max(vec3(0.0), min(bicubicColor.xyz, bicubicColor.www));
+ _output = bicubicColor * _input;
+ return _output;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = Bicubic_Stage1_c0_c0(vec4(1.0));
+ output_Stage1.xyz *= outputColor_Stage0.xyz;
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = texture(uTextureSampler_0_Stage2, vTransformedCoords_2_Stage0);
+ }
+ {
+ sk_FragColor = output_Stage1 * output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/52-57.shader_test b/shaders/skia/52-57.shader_test
new file mode 100644
index 0000000..cd5ba45
--- /dev/null
+++ b/shaders/skia/52-57.shader_test
@@ -0,0 +1,86 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uCoordTransformMatrix_1_Stage0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0_c0_c0(vec4 _input, vec2 _coords) {
+ _coords = _coords * uCoordTransformMatrix_1_Stage0.xz + uCoordTransformMatrix_1_Stage0.yw;
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, _coords) * _input;
+ return _output;
+}
+vec4 Bicubic_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coord = vTransformedCoords_0_Stage0 - vec2(0.5);
+ vec2 f = fract(coord);
+ coord += 0.5 - f;
+ vec4 wx = mat4(0.055555555555555552, 0.88888888888888884, 0.055555555555555552, 0.0, -0.5, 0.0, 0.5, 0.0, 0.83333333333333337, -2.0, 1.5, -0.33333333333333331, -0.3888888888888889, 1.1666666666666667, -1.1666666666666667, 0.3888888888888889) * vec4(1.0, f.x, f.x * f.x, (f.x * f.x) * f.x);
+ vec4 wy = mat4(0.055555555555555552, 0.88888888888888884, 0.055555555555555552, 0.0, -0.5, 0.0, 0.5, 0.0, 0.83333333333333337, -2.0, 1.5, -0.33333333333333331, -0.3888888888888889, 1.1666666666666667, -1.1666666666666667, 0.3888888888888889) * vec4(1.0, f.y, f.y * f.y, (f.y * f.y) * f.y);
+ vec4 rowColors[4];
+ rowColors[0] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(-1.0, -1.0));
+ rowColors[1] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(0.0, -1.0));
+ rowColors[2] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(1.0, -1.0));
+ rowColors[3] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(2.0, -1.0));
+ vec4 s0 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ rowColors[0] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(-1.0, 0.0));
+ rowColors[1] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord);
+ rowColors[2] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(1.0, 0.0));
+ rowColors[3] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(2.0, 0.0));
+ vec4 s1 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ rowColors[0] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(-1.0, 1.0));
+ rowColors[1] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(0.0, 1.0));
+ rowColors[2] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(1.0, 1.0));
+ rowColors[3] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(2.0, 1.0));
+ vec4 s2 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ rowColors[0] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(-1.0, 2.0));
+ rowColors[1] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(0.0, 2.0));
+ rowColors[2] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(1.0, 2.0));
+ rowColors[3] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(2.0, 2.0));
+ vec4 s3 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ vec4 bicubicColor = ((wy.x * s0 + wy.y * s1) + wy.z * s2) + wy.w * s3;
+ bicubicColor.xyz = max(vec3(0.0), min(bicubicColor.xyz, bicubicColor.www));
+ _output = bicubicColor * _input;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = Bicubic_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = texture(uTextureSampler_0_Stage2, vTransformedCoords_2_Stage0);
+ }
+ {
+ sk_FragColor = output_Stage1 * output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/52-6.shader_test b/shaders/skia/52-6.shader_test
new file mode 100644
index 0000000..1bed489
--- /dev/null
+++ b/shaders/skia/52-6.shader_test
@@ -0,0 +1,145 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage2;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.w) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ } else {
+ {
+ if (t < uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+vec4 ComposeOne_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_dst_in(_input, TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0)));
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = ComposeOne_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 blend_src(vec4 src, vec4 dst) {
+ return src;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_src(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ {
+ output_Stage2 = output_Stage1 * ucolor_Stage2;
+ }
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 inColor;
+in vec2 inLocalCoord;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/52-61.shader_test b/shaders/skia/52-61.shader_test
new file mode 100644
index 0000000..e3fd699
--- /dev/null
+++ b/shaders/skia/52-61.shader_test
@@ -0,0 +1,176 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_KHR_blend_equation_advanced : require
+out vec4 sk_FragColor;
+layout (blend_support_all_equations) out ;
+uniform vec2 uImageIncrement_Stage1;
+uniform vec4 uKernel_Stage1[2];
+uniform vec2 uKernelOffset_Stage1;
+uniform float uGain_Stage1;
+uniform float uBias_Stage1;
+uniform vec4 uTexDom_Stage1;
+uniform sampler2D uTextureSampler_0_Stage0;
+uniform sampler2D uTextureSampler_0_Stage1;
+in vec2 vTextureCoords_Stage0;
+flat in int vTexIndex_Stage0;
+in vec2 vIntTextureCoords_Stage0;
+in vec4 vinColor_Stage0;
+in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vinColor_Stage0;
+ vec2 uv = vTextureCoords_Stage0;
+ vec4 texColor;
+ {
+ texColor = texture(uTextureSampler_0_Stage0, uv);
+ }
+ float distance = 7.96875 * (texColor.x - 0.50196081399917603);
+ float afwidth;
+ vec2 dist_grad = vec2(dFdx(distance), dFdy(distance));
+ float dg_len2 = dot(dist_grad, dist_grad);
+ if (dg_len2 < 9.9999997473787516e-05) {
+ dist_grad = vec2(0.70709997415542603, 0.70709997415542603);
+ } else {
+ dist_grad = dist_grad * inversesqrt(dg_len2);
+ }
+ vec2 Jdx = dFdx(vIntTextureCoords_Stage0);
+ vec2 Jdy = dFdy(vIntTextureCoords_Stage0);
+ vec2 grad = vec2(dist_grad.x * Jdx.x + dist_grad.y * Jdy.x, dist_grad.x * Jdx.y + dist_grad.y * Jdy.y);
+ afwidth = 0.64999997615814209 * length(grad);
+ float val = clamp((distance + afwidth) / (2.0 * afwidth), 0.0, 1.0);
+ outputCoverage_Stage0 = vec4(val);
+ }
+ vec4 output_Stage1;
+ {
+ vec4 sum = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0 - uKernelOffset_Stage1 * uImageIncrement_Stage1;
+ vec4 c;
+ {
+ float k = uKernel_Stage1[0].x;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[0].y;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[0].z;
+ {
+ vec2 origCoord = coord + vec2(0.0, 2.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[0].w;
+ {
+ vec2 origCoord = coord + vec2(0.0, 3.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[1].x;
+ {
+ vec2 origCoord = coord + vec2(0.0, 4.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[1].y;
+ {
+ vec2 origCoord = coord + vec2(0.0, 5.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ vec2 origCoord = vTransformedCoords_0_Stage0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ output_Stage1.w = c.w;
+ output_Stage1.xyz = clamp(sum.xyz * uGain_Stage1 + uBias_Stage1, 0.0, 1.0);
+ output_Stage1.xyz *= output_Stage1.w;
+ output_Stage1 *= outputCoverage_Stage0;
+ }
+ {
+ sk_FragColor = output_Stage1 * outputColor_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform vec2 uAtlasDimensionsInv_Stage0;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in uvec2 inTextureCoords;
+out vec2 vTextureCoords_Stage0;
+flat out int vTexIndex_Stage0;
+out vec2 vIntTextureCoords_Stage0;
+out vec4 vinColor_Stage0;
+out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ ivec2 signedCoords = ivec2(int(inTextureCoords.x), int(inTextureCoords.y));
+ vec2 unormTexCoords = vec2(float(signedCoords.x / 2), float(signedCoords.y / 2));
+ vTextureCoords_Stage0 = unormTexCoords * uAtlasDimensionsInv_Stage0;
+ vTexIndex_Stage0 = 0;
+ vIntTextureCoords_Stage0 = unormTexCoords;
+ vinColor_Stage0 = inColor;
+ vec3 pos3 = uViewM_Stage0 * vec3(inPosition, 1.0);
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos3.x, pos3.y, 0.0, pos3.z);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/52-62.shader_test b/shaders/skia/52-62.shader_test
new file mode 100644
index 0000000..a52d871
--- /dev/null
+++ b/shaders/skia/52-62.shader_test
@@ -0,0 +1,84 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 ubaseFrequency_Stage2;
+uniform float uz_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+uniform sampler2D uTextureSampler_1_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec3 vTransformedCoords_1_Stage0;
+vec3 fade_Stage2(vec3 t) {
+ return ((t * t) * t) * (t * (t * 6.0 - 15.0) + 10.0);
+}
+float perm_Stage2(float x) {
+ return texture(uTextureSampler_0_Stage2, vec2(fract(x / 256.0), 0.0)).x * 255.0;
+}
+float grad_Stage2(float x, vec3 p) {
+ return dot(texture(uTextureSampler_1_Stage2, vec2(fract(x / 16.0), 0.0)).xyz * 255.0 - vec3(1.0), p);
+}
+float lerp_Stage2(float a, float b, float w) {
+ return a + w * (b - a);
+}
+float noise_Stage2(vec3 p) {
+ vec3 P = mod(floor(p), 256.0);
+ p -= floor(p);
+ vec3 f = fade_Stage2(p);
+ float A = perm_Stage2(P.x) + P.y;
+ float AA = perm_Stage2(A) + P.z;
+ float AB = perm_Stage2(A + 1.0) + P.z;
+ float B = perm_Stage2(P.x + 1.0) + P.y;
+ float BA = perm_Stage2(B) + P.z;
+ float BB = perm_Stage2(B + 1.0) + P.z;
+ float result = lerp_Stage2(lerp_Stage2(lerp_Stage2(grad_Stage2(perm_Stage2(AA), p), grad_Stage2(perm_Stage2(BA), p + vec3(-1.0, 0.0, 0.0)), f.x), lerp_Stage2(grad_Stage2(perm_Stage2(AB), p + vec3(0.0, -1.0, 0.0)), grad_Stage2(perm_Stage2(BB), p + vec3(-1.0, -1.0, 0.0)), f.x), f.y), lerp_Stage2(lerp_Stage2(grad_Stage2(perm_Stage2(AA + 1.0), p + vec3(0.0, 0.0, -1.0)), grad_Stage2(perm_Stage2(BA + 1.0), p + vec3(-1.0, 0.0, -1.0)), f.x), lerp_Stage2(grad_Stage2(perm_Stage2(AB + 1.0), p + vec3(0.0, -1.0, -1.0)), grad_Stage2(perm_Stage2(BB + 1.0), p + vec3(-1.0, -1.0, -1.0)), f.x), f.y), f.z);
+ return result;
+}
+float noiseOctaves_Stage2(vec3 p) {
+ float result = 0.0;
+ float ratio = 1.0;
+ for (float i = 0.0;i < 3.0; i++) {
+ result += noise_Stage2(p) / ratio;
+ p *= 2.0;
+ ratio *= 2.0;
+ }
+ return (result + 1.0) / 2.0;
+}
+void main() {
+ vec4 output_Stage2;
+ {
+ vec2 vTransformedCoords_1_Stage0_ensure2D = vTransformedCoords_1_Stage0.xy / vTransformedCoords_1_Stage0.z;
+ vec2 coords = vTransformedCoords_1_Stage0_ensure2D * ubaseFrequency_Stage2;
+ float r = noiseOctaves_Stage2(vec3(coords, uz_Stage2));
+ float g = noiseOctaves_Stage2(vec3(coords, uz_Stage2));
+ float b = noiseOctaves_Stage2(vec3(coords, uz_Stage2));
+ float a = noiseOctaves_Stage2(vec3(coords, uz_Stage2));
+ output_Stage2 = vec4(r, g, b, a);
+ output_Stage2 = clamp(output_Stage2, 0.0, 1.0);
+ output_Stage2 = vec4(output_Stage2.xyz * output_Stage2.www, output_Stage2.w);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec3 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0);
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/52-63.shader_test b/shaders/skia/52-63.shader_test
new file mode 100644
index 0000000..b9f3af0
--- /dev/null
+++ b/shaders/skia/52-63.shader_test
@@ -0,0 +1,97 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uCoordTransformMatrix_2_Stage0;
+uniform vec4 usubset_Stage2_c0_c0;
+uniform vec4 uclamp_Stage2_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 TextureEffect_Stage2_c0_c0(vec4 _input, vec2 _coords) {
+ _coords = _coords * uCoordTransformMatrix_2_Stage0.xz + uCoordTransformMatrix_2_Stage0.yw;
+ vec4 _output;
+ vec2 inCoord = _coords;
+ vec2 subsetCoord;
+ {
+ float w = usubset_Stage2_c0_c0.z - usubset_Stage2_c0_c0.x;
+ float w2 = 2.0 * w;
+ float m = mod(inCoord.x - usubset_Stage2_c0_c0.x, w2);
+ subsetCoord.x = mix(m, w2 - m, step(w, m)) + usubset_Stage2_c0_c0.x;
+ }
+ {
+ float w = usubset_Stage2_c0_c0.w - usubset_Stage2_c0_c0.y;
+ float w2 = 2.0 * w;
+ float m = mod(inCoord.y - usubset_Stage2_c0_c0.y, w2);
+ subsetCoord.y = mix(m, w2 - m, step(w, m)) + usubset_Stage2_c0_c0.y;
+ }
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage2_c0_c0.x, uclamp_Stage2_c0_c0.z);
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage2_c0_c0.y, uclamp_Stage2_c0_c0.w);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ _output = _input * textureColor;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ vec2 coord = vTransformedCoords_1_Stage0 - vec2(0.5);
+ vec2 f = fract(coord);
+ coord += 0.5 - f;
+ vec4 wx = mat4(0.055555555555555552, 0.88888888888888884, 0.055555555555555552, 0.0, -0.5, 0.0, 0.5, 0.0, 0.83333333333333337, -2.0, 1.5, -0.33333333333333331, -0.3888888888888889, 1.1666666666666667, -1.1666666666666667, 0.3888888888888889) * vec4(1.0, f.x, f.x * f.x, (f.x * f.x) * f.x);
+ vec4 wy = mat4(0.055555555555555552, 0.88888888888888884, 0.055555555555555552, 0.0, -0.5, 0.0, 0.5, 0.0, 0.83333333333333337, -2.0, 1.5, -0.33333333333333331, -0.3888888888888889, 1.1666666666666667, -1.1666666666666667, 0.3888888888888889) * vec4(1.0, f.y, f.y * f.y, (f.y * f.y) * f.y);
+ vec4 rowColors[4];
+ rowColors[0] = TextureEffect_Stage2_c0_c0(vec4(1.0), coord + vec2(-1.0, -1.0));
+ rowColors[1] = TextureEffect_Stage2_c0_c0(vec4(1.0), coord + vec2(0.0, -1.0));
+ rowColors[2] = TextureEffect_Stage2_c0_c0(vec4(1.0), coord + vec2(1.0, -1.0));
+ rowColors[3] = TextureEffect_Stage2_c0_c0(vec4(1.0), coord + vec2(2.0, -1.0));
+ vec4 s0 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ rowColors[0] = TextureEffect_Stage2_c0_c0(vec4(1.0), coord + vec2(-1.0, 0.0));
+ rowColors[1] = TextureEffect_Stage2_c0_c0(vec4(1.0), coord);
+ rowColors[2] = TextureEffect_Stage2_c0_c0(vec4(1.0), coord + vec2(1.0, 0.0));
+ rowColors[3] = TextureEffect_Stage2_c0_c0(vec4(1.0), coord + vec2(2.0, 0.0));
+ vec4 s1 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ rowColors[0] = TextureEffect_Stage2_c0_c0(vec4(1.0), coord + vec2(-1.0, 1.0));
+ rowColors[1] = TextureEffect_Stage2_c0_c0(vec4(1.0), coord + vec2(0.0, 1.0));
+ rowColors[2] = TextureEffect_Stage2_c0_c0(vec4(1.0), coord + vec2(1.0, 1.0));
+ rowColors[3] = TextureEffect_Stage2_c0_c0(vec4(1.0), coord + vec2(2.0, 1.0));
+ vec4 s2 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ rowColors[0] = TextureEffect_Stage2_c0_c0(vec4(1.0), coord + vec2(-1.0, 2.0));
+ rowColors[1] = TextureEffect_Stage2_c0_c0(vec4(1.0), coord + vec2(0.0, 2.0));
+ rowColors[2] = TextureEffect_Stage2_c0_c0(vec4(1.0), coord + vec2(1.0, 2.0));
+ rowColors[3] = TextureEffect_Stage2_c0_c0(vec4(1.0), coord + vec2(2.0, 2.0));
+ vec4 s3 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ vec4 bicubicColor = ((wy.x * s0 + wy.y * s1) + wy.z * s2) + wy.w * s3;
+ bicubicColor.xyz = max(vec3(0.0), min(bicubicColor.xyz, bicubicColor.www));
+ output_Stage2 = bicubicColor * output_Stage1;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/52-8.shader_test b/shaders/skia/52-8.shader_test
new file mode 100644
index 0000000..c3ae457
--- /dev/null
+++ b/shaders/skia/52-8.shader_test
@@ -0,0 +1,59 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uborder_Stage1;
+uniform vec4 usubset_Stage1;
+uniform vec4 uclamp_Stage1;
+uniform vec4 unorm_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+flat in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec2 inCoord = vTransformedCoords_0_Stage0;
+ inCoord *= unorm_Stage1.xy;
+ vec2 subsetCoord;
+ subsetCoord.x = inCoord.x;
+ subsetCoord.y = inCoord.y;
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage1.x, uclamp_Stage1.z);
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage1.y, uclamp_Stage1.w);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord * unorm_Stage1.zw);
+ float errX = subsetCoord.x - clampedCoord.x;
+ float errY = subsetCoord.y - clampedCoord.y;
+ textureColor = mix(textureColor, uborder_Stage1, min(abs(errX), 1.0));
+ textureColor = mix(textureColor, uborder_Stage1, min(abs(errY), 1.0));
+ output_Stage1 = outputColor_Stage0 * textureColor;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec2 inLocalCoords;
+in vec4 color;
+flat out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vcolor_Stage0 = color;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoords, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/52.shader_test b/shaders/skia/52.shader_test
new file mode 100644
index 0000000..2a73ca3
--- /dev/null
+++ b/shaders/skia/52.shader_test
@@ -0,0 +1,52 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 usubset_Stage1_c0_c0;
+uniform vec4 uclamp_Stage1_c0_c0;
+uniform sampler2DRect uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 inCoord = vTransformedCoords_0_Stage0;
+ vec2 subsetCoord;
+ subsetCoord.x = mod(inCoord.x - usubset_Stage1_c0_c0.x, usubset_Stage1_c0_c0.z - usubset_Stage1_c0_c0.x) + usubset_Stage1_c0_c0.x;
+ subsetCoord.y = mod(inCoord.y - usubset_Stage1_c0_c0.y, usubset_Stage1_c0_c0.w - usubset_Stage1_c0_c0.y) + usubset_Stage1_c0_c0.y;
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage1_c0_c0.x, uclamp_Stage1_c0_c0.z);
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage1_c0_c0.y, uclamp_Stage1_c0_c0.w);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ _output = _input * textureColor;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TextureEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/520-2.shader_test b/shaders/skia/520-2.shader_test
new file mode 100644
index 0000000..0144bb9
--- /dev/null
+++ b/shaders/skia/520-2.shader_test
@@ -0,0 +1,31 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uColor_Stage0;
+uniform float uCoverage_Stage0;
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ outputCoverage_Stage0 = vec4(uCoverage_Stage0);
+ }
+ {
+ sk_FragColor = outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 inPosition;
+void main() {
+ vec3 pos3 = uViewM_Stage0 * vec3(inPosition, 1.0);
+ gl_Position = vec4(pos3.x, pos3.y, 0.0, pos3.z);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/520-3.shader_test b/shaders/skia/520-3.shader_test
new file mode 100644
index 0000000..c2e0002
--- /dev/null
+++ b/shaders/skia/520-3.shader_test
@@ -0,0 +1,114 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uscale0_1_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale8_9_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias8_9_Stage2_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage2_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage2_c0_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 RadialGradientLayout_Stage2_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = length(vTransformedCoords_1_Stage0);
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage2_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.w) {
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage2_c0_c0_c1_c0;
+ bias = ubias0_1_Stage2_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage2_c0_c0_c1_c0;
+ bias = ubias2_3_Stage2_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage2_c0_c0_c1_c0;
+ bias = ubias4_5_Stage2_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage2_c0_c0_c1_c0;
+ bias = ubias6_7_Stage2_c0_c0_c1_c0;
+ }
+ }
+ } else {
+ {
+ {
+ scale = uscale8_9_Stage2_c0_c0_c1_c0;
+ bias = ubias8_9_Stage2_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = RadialGradientLayout_Stage2_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage2_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_dst_in(output_Stage1, TiledGradientEffect_Stage2_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/520-4.shader_test b/shaders/skia/520-4.shader_test
new file mode 100644
index 0000000..1441108
--- /dev/null
+++ b/shaders/skia/520-4.shader_test
@@ -0,0 +1,64 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 Big_Ole_Key_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = _input;
+ return _output;
+}
+float _blend_color_luminance(vec3 color) {
+ return dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), color);
+}
+vec3 _blend_set_color_luminance(vec3 hueSatColor, float alpha, vec3 lumColor) {
+ float lum = _blend_color_luminance(lumColor);
+ vec3 result = (lum - _blend_color_luminance(hueSatColor)) + hueSatColor;
+ float minComp = min(min(result.x, result.y), result.z);
+ float maxComp = max(max(result.x, result.y), result.z);
+ if (minComp < 0.0 && lum != minComp) {
+ result = lum + ((result - lum) * lum) / (lum - minComp);
+ }
+ if (maxComp > alpha && maxComp != lum) {
+ return lum + ((result - lum) * (alpha - lum)) / (maxComp - lum);
+ }
+ return result;
+}
+vec4 blend_color(vec4 src, vec4 dst) {
+ float alpha = dst.w * src.w;
+ vec3 sda = src.xyz * dst.w;
+ vec3 dsa = dst.xyz * src.w;
+ return vec4((((_blend_set_color_luminance(sda, alpha, dsa) + dst.xyz) - dsa) + src.xyz) - sda, (src.w + dst.w) - alpha);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_color(output_Stage1, Big_Ole_Key_Stage2_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/520.shader_test b/shaders/skia/520.shader_test
new file mode 100644
index 0000000..699757e
--- /dev/null
+++ b/shaders/skia/520.shader_test
@@ -0,0 +1,163 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage2;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.w) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ } else {
+ {
+ if (t < uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+vec4 ComposeOne_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_dst_in(_input, TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0)));
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = ComposeOne_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+float _guarded_divide(float n, float d) {
+ return n / d;
+}
+float _soft_light_component(float sc, float sa, float dc, float da) {
+ if (2.0 * sc <= sa) {
+ return (_guarded_divide((dc * dc) * (sa - 2.0 * sc), da) + (1.0 - da) * sc) + dc * ((-sa + 2.0 * sc) + 1.0);
+ } else if (4.0 * dc <= da) {
+ float DSqd = dc * dc;
+ float DCub = DSqd * dc;
+ float DaSqd = da * da;
+ float DaCub = DaSqd * da;
+ return _guarded_divide(((DaSqd * (sc - dc * ((3.0 * sa - 6.0 * sc) - 1.0)) + ((12.0 * da) * DSqd) * (sa - 2.0 * sc)) - (16.0 * DCub) * (sa - 2.0 * sc)) - DaCub * sc, DaSqd);
+ }
+ return ((dc * ((sa - 2.0 * sc) + 1.0) + sc) - sqrt(da * dc) * (sa - 2.0 * sc)) - da * sc;
+}
+vec4 blend_soft_light(vec4 src, vec4 dst) {
+ if (dst.w == 0.0) {
+ return src;
+ }
+ return vec4(_soft_light_component(src.x, src.w, dst.x, dst.w), _soft_light_component(src.y, src.w, dst.y, dst.w), _soft_light_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_soft_light(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ {
+ output_Stage2 = output_Stage1 * ucolor_Stage2;
+ }
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 inColor;
+in vec2 inLocalCoord;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/523-3.shader_test b/shaders/skia/523-3.shader_test
new file mode 100644
index 0000000..bd6c38c
--- /dev/null
+++ b/shaders/skia/523-3.shader_test
@@ -0,0 +1,106 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage2_c0_c0;
+uniform vec4 urightBorderColor_Stage2_c0_c0;
+uniform vec4 uscale0_1_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage2_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage2_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage2_c0_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 RadialGradientLayout_Stage2_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = length(vTransformedCoords_1_Stage0);
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage2_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage2_c0_c0_c1_c0;
+ bias = ubias0_1_Stage2_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage2_c0_c0_c1_c0;
+ bias = ubias2_3_Stage2_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage2_c0_c0_c1_c0;
+ bias = ubias4_5_Stage2_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage2_c0_c0_c1_c0;
+ bias = ubias6_7_Stage2_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = RadialGradientLayout_Stage2_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage2_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage2_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage2_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_dst_in(output_Stage1, ClampedGradientEffect_Stage2_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/523-4.shader_test b/shaders/skia/523-4.shader_test
new file mode 100644
index 0000000..69de6dd
--- /dev/null
+++ b/shaders/skia/523-4.shader_test
@@ -0,0 +1,79 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 urectH_Stage2_c0_c0;
+uniform float uinvSixSigma_Stage2_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 RectBlurEffect_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ float xCoverage, yCoverage;
+ {
+ float x, y;
+ {
+ x = max(urectH_Stage2_c0_c0.x - gl_FragCoord.x, gl_FragCoord.x - urectH_Stage2_c0_c0.z);
+ y = max(urectH_Stage2_c0_c0.y - gl_FragCoord.y, gl_FragCoord.y - urectH_Stage2_c0_c0.w);
+ }
+ xCoverage = texture(uTextureSampler_0_Stage2, vec2(x * uinvSixSigma_Stage2_c0_c0, 0.5)).w;
+ yCoverage = texture(uTextureSampler_0_Stage2, vec2(y * uinvSixSigma_Stage2_c0_c0, 0.5)).w;
+ _output = (_input * xCoverage) * yCoverage;
+ }
+ _output = (_input * xCoverage) * yCoverage;
+ return _output;
+}
+float _guarded_divide(float n, float d) {
+ return n / d;
+}
+float _soft_light_component(float sc, float sa, float dc, float da) {
+ if (2.0 * sc <= sa) {
+ return (_guarded_divide((dc * dc) * (sa - 2.0 * sc), da) + (1.0 - da) * sc) + dc * ((-sa + 2.0 * sc) + 1.0);
+ } else if (4.0 * dc <= da) {
+ float DSqd = dc * dc;
+ float DCub = DSqd * dc;
+ float DaSqd = da * da;
+ float DaCub = DaSqd * da;
+ return _guarded_divide(((DaSqd * (sc - dc * ((3.0 * sa - 6.0 * sc) - 1.0)) + ((12.0 * da) * DSqd) * (sa - 2.0 * sc)) - (16.0 * DCub) * (sa - 2.0 * sc)) - DaCub * sc, DaSqd);
+ }
+ return ((dc * ((sa - 2.0 * sc) + 1.0) + sc) - sqrt(da * dc) * (sa - 2.0 * sc)) - da * sc;
+}
+vec4 blend_soft_light(vec4 src, vec4 dst) {
+ if (dst.w == 0.0) {
+ return src;
+ }
+ return vec4(_soft_light_component(src.x, src.w, dst.x, dst.w), _soft_light_component(src.y, src.w, dst.y, dst.w), _soft_light_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_soft_light(output_Stage1, RectBlurEffect_Stage2_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/523.shader_test b/shaders/skia/523.shader_test
new file mode 100644
index 0000000..9d88a68
--- /dev/null
+++ b/shaders/skia/523.shader_test
@@ -0,0 +1,86 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 ucolor_Stage1_c0_c0_c0_c0;
+uniform vec4 ucolor_Stage2;
+noperspective in vec4 vcolor_Stage0;
+vec4 ConstColorProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = _input.w * ucolor_Stage1_c0_c0_c0_c0;
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = ConstColorProcessor_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+float _guarded_divide(float n, float d) {
+ return n / d;
+}
+float _soft_light_component(float sc, float sa, float dc, float da) {
+ if (2.0 * sc <= sa) {
+ return (_guarded_divide((dc * dc) * (sa - 2.0 * sc), da) + (1.0 - da) * sc) + dc * ((-sa + 2.0 * sc) + 1.0);
+ } else if (4.0 * dc <= da) {
+ float DSqd = dc * dc;
+ float DCub = DSqd * dc;
+ float DaSqd = da * da;
+ float DaCub = DaSqd * da;
+ return _guarded_divide(((DaSqd * (sc - dc * ((3.0 * sa - 6.0 * sc) - 1.0)) + ((12.0 * da) * DSqd) * (sa - 2.0 * sc)) - (16.0 * DCub) * (sa - 2.0 * sc)) - DaCub * sc, DaSqd);
+ }
+ return ((dc * ((sa - 2.0 * sc) + 1.0) + sc) - sqrt(da * dc) * (sa - 2.0 * sc)) - da * sc;
+}
+vec4 blend_soft_light(vec4 src, vec4 dst) {
+ if (dst.w == 0.0) {
+ return src;
+ }
+ return vec4(_soft_light_component(src.x, src.w, dst.x, dst.w), _soft_light_component(src.y, src.w, dst.y, dst.w), _soft_light_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_soft_light(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ {
+ output_Stage2 = output_Stage1 * ucolor_Stage2;
+ }
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 position;
+in vec4 inColor;
+noperspective out vec4 vcolor_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/526-2.shader_test b/shaders/skia/526-2.shader_test
new file mode 100644
index 0000000..a197908
--- /dev/null
+++ b/shaders/skia/526-2.shader_test
@@ -0,0 +1,173 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_KHR_blend_equation_advanced : require
+out vec4 sk_FragColor;
+layout (blend_support_all_equations) out ;
+uniform vec4 uColor_Stage0;
+uniform vec4 uCoordTransformMatrix_1_Stage0;
+uniform vec4 uCoordTransformMatrix_3_Stage0;
+uniform vec4 urectUniform_Stage1;
+uniform float ucornerRadius_Stage2;
+uniform vec4 uproxyRect_Stage2;
+uniform float ublurRadius_Stage2;
+uniform vec4 usubset_Stage3_c0_c0;
+uniform vec4 uclamp_Stage3_c0_c0;
+uniform float uPixelSize_Stage4_c1_c0;
+uniform vec2 uRange_Stage4_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage2;
+uniform sampler2D uTextureSampler_0_Stage3;
+uniform sampler2D uTextureSampler_0_Stage4;
+uniform sampler2D uTextureSampler_0_Stage5;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec3 vTransformedCoords_2_Stage0;
+noperspective in vec2 vTransformedCoords_4_Stage0;
+vec4 TextureEffect_Stage3_c0_c0(vec4 _input, vec2 _coords) {
+ _coords = _coords * uCoordTransformMatrix_1_Stage0.xz + uCoordTransformMatrix_1_Stage0.yw;
+ vec4 _output;
+ vec2 inCoord = _coords;
+ vec2 subsetCoord;
+ subsetCoord.x = mod(inCoord.x - usubset_Stage3_c0_c0.x, usubset_Stage3_c0_c0.z - usubset_Stage3_c0_c0.x) + usubset_Stage3_c0_c0.x;
+ subsetCoord.y = mod(inCoord.y - usubset_Stage3_c0_c0.y, usubset_Stage3_c0_c0.w - usubset_Stage3_c0_c0.y) + usubset_Stage3_c0_c0.y;
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage3_c0_c0.x, uclamp_Stage3_c0_c0.z);
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage3_c0_c0.y, uclamp_Stage3_c0_c0.w);
+ vec4 textureColor = texture(uTextureSampler_0_Stage3, clampedCoord);
+ _output = _input * textureColor;
+ return _output;
+}
+vec4 Morphology_Stage4_c1_c0(vec4 _input, vec2 _coords) {
+ _coords = _coords * uCoordTransformMatrix_3_Stage0.xz + uCoordTransformMatrix_3_Stage0.yw;
+ vec4 _output;
+ _output = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = _coords;
+ coord.y -= 8.0 * uPixelSize_Stage4_c1_c0;
+ for (int i = 0;i < 17; i++) {
+ _output = max(_output, texture(uTextureSampler_0_Stage4, coord));
+ coord.y += uPixelSize_Stage4_c1_c0;
+ }
+ _output *= _input;
+ return _output;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = uColor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ float alpha;
+ {
+ float xSub, ySub;
+ xSub = min(gl_FragCoord.x - urectUniform_Stage1.x, 0.0);
+ xSub += min(urectUniform_Stage1.z - gl_FragCoord.x, 0.0);
+ ySub = min(gl_FragCoord.y - urectUniform_Stage1.y, 0.0);
+ ySub += min(urectUniform_Stage1.w - gl_FragCoord.y, 0.0);
+ alpha = (1.0 + max(xSub, -1.0)) * (1.0 + max(ySub, -1.0));
+ }
+ {
+ alpha = 1.0 - alpha;
+ }
+ output_Stage1 = outputColor_Stage0 * alpha;
+ }
+ vec4 output_Stage2;
+ {
+ vec2 translatedFragPos = gl_FragCoord.xy - uproxyRect_Stage2.xy;
+ float threshold = ucornerRadius_Stage2 + 2.0 * ublurRadius_Stage2;
+ vec2 middle = (uproxyRect_Stage2.zw - uproxyRect_Stage2.xy) - 2.0 * threshold;
+ if (translatedFragPos.x >= threshold && translatedFragPos.x < middle.x + threshold) {
+ translatedFragPos.x = threshold;
+ } else if (translatedFragPos.x >= middle.x + threshold) {
+ translatedFragPos.x -= middle.x - 1.0;
+ }
+ if (translatedFragPos.y > threshold && translatedFragPos.y < middle.y + threshold) {
+ translatedFragPos.y = threshold;
+ } else if (translatedFragPos.y >= middle.y + threshold) {
+ translatedFragPos.y -= middle.y - 1.0;
+ }
+ vec2 proxyDims = vec2(2.0 * threshold + 1.0);
+ vec2 texCoord = translatedFragPos / proxyDims;
+ output_Stage2 = output_Stage1 * texture(uTextureSampler_0_Stage2, texCoord);
+ }
+ vec4 output_Stage3;
+ {
+ float coord = vTransformedCoords_0_Stage0.x - 0.5;
+ float f = fract(coord);
+ coord += 0.5 - f;
+ float f2 = f * f;
+ vec4 w = mat4(0.055555555555555552, 0.88888888888888884, 0.055555555555555552, 0.0, -0.5, 0.0, 0.5, 0.0, 0.83333333333333337, -2.0, 1.5, -0.33333333333333331, -0.3888888888888889, 1.1666666666666667, -1.1666666666666667, 0.3888888888888889) * vec4(1.0, f, f2, f2 * f);
+ vec4 c[4];
+ c[0] = TextureEffect_Stage3_c0_c0(vec4(1.0), vec2(coord + -1.0, vTransformedCoords_0_Stage0.y));
+ c[1] = TextureEffect_Stage3_c0_c0(vec4(1.0), vec2(coord, vTransformedCoords_0_Stage0.y));
+ c[2] = TextureEffect_Stage3_c0_c0(vec4(1.0), vec2(coord + 1.0, vTransformedCoords_0_Stage0.y));
+ c[3] = TextureEffect_Stage3_c0_c0(vec4(1.0), vec2(coord + 2.0, vTransformedCoords_0_Stage0.y));
+ vec4 bicubicColor = ((c[0] * w.x + c[1] * w.y) + c[2] * w.z) + c[3] * w.w;
+ bicubicColor.xyz = max(vec3(0.0), min(bicubicColor.xyz, bicubicColor.www));
+ output_Stage3 = bicubicColor * output_Stage2;
+ }
+ vec4 output_Stage4;
+ {
+ vec2 vTransformedCoords_2_Stage0_ensure2D = vTransformedCoords_2_Stage0.xy / vTransformedCoords_2_Stage0.z;
+ vec2 coord = vTransformedCoords_2_Stage0_ensure2D - vec2(0.5);
+ vec2 f = fract(coord);
+ coord += 0.5 - f;
+ vec4 wx = mat4(0.055555555555555552, 0.88888888888888884, 0.055555555555555552, 0.0, -0.5, 0.0, 0.5, 0.0, 0.83333333333333337, -2.0, 1.5, -0.33333333333333331, -0.3888888888888889, 1.1666666666666667, -1.1666666666666667, 0.3888888888888889) * vec4(1.0, f.x, f.x * f.x, (f.x * f.x) * f.x);
+ vec4 wy = mat4(0.055555555555555552, 0.88888888888888884, 0.055555555555555552, 0.0, -0.5, 0.0, 0.5, 0.0, 0.83333333333333337, -2.0, 1.5, -0.33333333333333331, -0.3888888888888889, 1.1666666666666667, -1.1666666666666667, 0.3888888888888889) * vec4(1.0, f.y, f.y * f.y, (f.y * f.y) * f.y);
+ vec4 rowColors[4];
+ rowColors[0] = Morphology_Stage4_c1_c0(vec4(1.0), coord + vec2(-1.0, -1.0));
+ rowColors[1] = Morphology_Stage4_c1_c0(vec4(1.0), coord + vec2(0.0, -1.0));
+ rowColors[2] = Morphology_Stage4_c1_c0(vec4(1.0), coord + vec2(1.0, -1.0));
+ rowColors[3] = Morphology_Stage4_c1_c0(vec4(1.0), coord + vec2(2.0, -1.0));
+ vec4 s0 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ rowColors[0] = Morphology_Stage4_c1_c0(vec4(1.0), coord + vec2(-1.0, 0.0));
+ rowColors[1] = Morphology_Stage4_c1_c0(vec4(1.0), coord);
+ rowColors[2] = Morphology_Stage4_c1_c0(vec4(1.0), coord + vec2(1.0, 0.0));
+ rowColors[3] = Morphology_Stage4_c1_c0(vec4(1.0), coord + vec2(2.0, 0.0));
+ vec4 s1 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ rowColors[0] = Morphology_Stage4_c1_c0(vec4(1.0), coord + vec2(-1.0, 1.0));
+ rowColors[1] = Morphology_Stage4_c1_c0(vec4(1.0), coord + vec2(0.0, 1.0));
+ rowColors[2] = Morphology_Stage4_c1_c0(vec4(1.0), coord + vec2(1.0, 1.0));
+ rowColors[3] = Morphology_Stage4_c1_c0(vec4(1.0), coord + vec2(2.0, 1.0));
+ vec4 s2 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ rowColors[0] = Morphology_Stage4_c1_c0(vec4(1.0), coord + vec2(-1.0, 2.0));
+ rowColors[1] = Morphology_Stage4_c1_c0(vec4(1.0), coord + vec2(0.0, 2.0));
+ rowColors[2] = Morphology_Stage4_c1_c0(vec4(1.0), coord + vec2(1.0, 2.0));
+ rowColors[3] = Morphology_Stage4_c1_c0(vec4(1.0), coord + vec2(2.0, 2.0));
+ vec4 s3 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ vec4 bicubicColor = ((wy.x * s0 + wy.y * s1) + wy.z * s2) + wy.w * s3;
+ bicubicColor = clamp(bicubicColor, 0.0, 1.0);
+ output_Stage4 = bicubicColor;
+ }
+ vec4 output_Stage5;
+ {
+ output_Stage5 = texture(uTextureSampler_0_Stage5, vTransformedCoords_4_Stage0) * output_Stage4;
+ }
+ {
+ sk_FragColor = output_Stage5 * output_Stage3;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+uniform mat3 uCoordTransformMatrix_4_Stage0;
+in vec2 inPosition;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec3 vTransformedCoords_2_Stage0;
+noperspective out vec2 vTransformedCoords_4_Stage0;
+void main() {
+ vec2 pos2 = (uViewM_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = uCoordTransformMatrix_2_Stage0 * vec3(inPosition, 1.0);
+ vTransformedCoords_4_Stage0 = (uCoordTransformMatrix_4_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/526-3.shader_test b/shaders/skia/526-3.shader_test
new file mode 100644
index 0000000..a6e23ea
--- /dev/null
+++ b/shaders/skia/526-3.shader_test
@@ -0,0 +1,88 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uscale01_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias01_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale23_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias23_Stage2_c0_c0_c1_c0;
+uniform float uthreshold_Stage2_c0_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 RadialGradientLayout_Stage2_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = length(vTransformedCoords_1_Stage0);
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 DualIntervalGradientColorizer_Stage2_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthreshold_Stage2_c0_c0_c1_c0) {
+ scale = uscale01_Stage2_c0_c0_c1_c0;
+ bias = ubias01_Stage2_c0_c0_c1_c0;
+ } else {
+ scale = uscale23_Stage2_c0_c0_c1_c0;
+ bias = ubias23_Stage2_c0_c0_c1_c0;
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = RadialGradientLayout_Stage2_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = DualIntervalGradientColorizer_Stage2_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_dst_in(output_Stage1, TiledGradientEffect_Stage2_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/526-4.shader_test b/shaders/skia/526-4.shader_test
new file mode 100644
index 0000000..e229f5e
--- /dev/null
+++ b/shaders/skia/526-4.shader_test
@@ -0,0 +1,48 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 ucolor_Stage2_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 ConstColorProcessor_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = _input * ucolor_Stage2_c0_c0;
+ }
+ return _output;
+}
+vec4 blend_src_out(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_src_out(ConstColorProcessor_Stage2_c0_c0(vec4(1.0)), output_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/526.shader_test b/shaders/skia/526.shader_test
new file mode 100644
index 0000000..c9cafc5
--- /dev/null
+++ b/shaders/skia/526.shader_test
@@ -0,0 +1,183 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage2;
+uniform vec4 ucolor_Stage3_c1_c0;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.w) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ } else {
+ {
+ if (t < uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+vec4 ComposeOne_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_dst_in(_input, TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0)));
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = ComposeOne_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 ConstColorProcessor_Stage3_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage3_c1_c0;
+ }
+ return _output;
+}
+float _guarded_divide(float n, float d) {
+ return n / d;
+}
+float _soft_light_component(float sc, float sa, float dc, float da) {
+ if (2.0 * sc <= sa) {
+ return (_guarded_divide((dc * dc) * (sa - 2.0 * sc), da) + (1.0 - da) * sc) + dc * ((-sa + 2.0 * sc) + 1.0);
+ } else if (4.0 * dc <= da) {
+ float DSqd = dc * dc;
+ float DCub = DSqd * dc;
+ float DaSqd = da * da;
+ float DaCub = DaSqd * da;
+ return _guarded_divide(((DaSqd * (sc - dc * ((3.0 * sa - 6.0 * sc) - 1.0)) + ((12.0 * da) * DSqd) * (sa - 2.0 * sc)) - (16.0 * DCub) * (sa - 2.0 * sc)) - DaCub * sc, DaSqd);
+ }
+ return ((dc * ((sa - 2.0 * sc) + 1.0) + sc) - sqrt(da * dc) * (sa - 2.0 * sc)) - da * sc;
+}
+vec4 blend_soft_light(vec4 src, vec4 dst) {
+ if (dst.w == 0.0) {
+ return src;
+ }
+ return vec4(_soft_light_component(src.x, src.w, dst.x, dst.w), _soft_light_component(src.y, src.w, dst.y, dst.w), _soft_light_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 blend_darken(vec4 src, vec4 dst) {
+ vec4 result = blend_src_over(src, dst);
+ result.xyz = min(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
+ return result;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_soft_light(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ {
+ output_Stage2 = output_Stage1 * ucolor_Stage2;
+ }
+ }
+ vec4 output_Stage3;
+ {
+ output_Stage3 = blend_darken(ConstColorProcessor_Stage3_c1_c0(vec4(1.0)), output_Stage2);
+ }
+ {
+ sk_FragColor = output_Stage3;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 inColor;
+in vec2 inLocalCoord;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/529-2.shader_test b/shaders/skia/529-2.shader_test
new file mode 100644
index 0000000..3706b42
--- /dev/null
+++ b/shaders/skia/529-2.shader_test
@@ -0,0 +1,82 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+uniform mat4 um_Stage1_c0_c0;
+uniform vec4 uv_Stage1_c0_c0;
+uniform vec4 ucircle_Stage1_c1_c0;
+noperspective in vec2 vEllipseOffsets0_Stage0;
+noperspective in vec2 vEllipseOffsets1_Stage0;
+noperspective in vec4 vinColor_Stage0;
+vec4 ColorMatrixFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = _input;
+ {
+ float nonZeroAlpha = max(inputColor.w, 9.9999997473787516e-05);
+ inputColor = vec4(inputColor.xyz / nonZeroAlpha, inputColor.w);
+ }
+ _output = um_Stage1_c0_c0 * inputColor + uv_Stage1_c0_c0;
+ {
+ _output.w = clamp(_output.w, 0.0, 1.0);
+ }
+ return _output;
+}
+vec4 CircleEffect_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ float d;
+ {
+ d = (length((ucircle_Stage1_c1_c0.xy - gl_FragCoord.xy) * ucircle_Stage1_c1_c0.w) - 1.0) * ucircle_Stage1_c1_c0.z;
+ }
+ {
+ _output = _input * clamp(d, 0.0, 1.0);
+ }
+ return _output;
+}
+vec4 blend_multiply(vec4 src, vec4 dst) {
+ return vec4(((1.0 - src.w) * dst.xyz + (1.0 - dst.w) * src.xyz) + src.xyz * dst.xyz, src.w + (1.0 - src.w) * dst.w);
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ vec2 scaledOffset = vEllipseOffsets0_Stage0;
+ float test = dot(scaledOffset, scaledOffset) - 1.0;
+ vec2 duvdx = dFdx(vEllipseOffsets0_Stage0);
+ vec2 duvdy = dFdy(vEllipseOffsets0_Stage0);
+ vec2 grad = vec2(vEllipseOffsets0_Stage0.x * duvdx.x + vEllipseOffsets0_Stage0.y * duvdx.y, vEllipseOffsets0_Stage0.x * duvdy.x + vEllipseOffsets0_Stage0.y * duvdy.y);
+ float grad_dot = 4.0 * dot(grad, grad);
+ grad_dot = max(grad_dot, 1.1754999560161448e-38);
+ float invlen = inversesqrt(grad_dot);
+ float edgeAlpha = clamp(0.5 - test * invlen, 0.0, 1.0);
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputCoverage_Stage0.xyz, 1.0);
+ output_Stage1 = blend_multiply(ColorMatrixFragmentProcessor_Stage1_c0_c0(inputColor), CircleEffect_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputCoverage_Stage0.w;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec2 inEllipseOffsets0;
+in vec2 inEllipseOffsets1;
+noperspective out vec2 vEllipseOffsets0_Stage0;
+noperspective out vec2 vEllipseOffsets1_Stage0;
+noperspective out vec4 vinColor_Stage0;
+void main() {
+ vEllipseOffsets0_Stage0 = inEllipseOffsets0;
+ vEllipseOffsets1_Stage0 = inEllipseOffsets1;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = (uViewM_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/529-3.shader_test b/shaders/skia/529-3.shader_test
new file mode 100644
index 0000000..02bbd4b
--- /dev/null
+++ b/shaders/skia/529-3.shader_test
@@ -0,0 +1,78 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage2_c0_c0;
+uniform vec4 urightBorderColor_Stage2_c0_c0;
+uniform vec4 ustart_Stage2_c0_c0_c1_c0;
+uniform vec4 uend_Stage2_c0_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 RadialGradientLayout_Stage2_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = length(vTransformedCoords_1_Stage0);
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage2_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage2_c0_c0_c1_c0 + t * uend_Stage2_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = RadialGradientLayout_Stage2_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage2_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage2_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage2_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_dst_in(output_Stage1, ClampedGradientEffect_Stage2_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/529-4.shader_test b/shaders/skia/529-4.shader_test
new file mode 100644
index 0000000..cc601f3
--- /dev/null
+++ b/shaders/skia/529-4.shader_test
@@ -0,0 +1,59 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec3 uedges_Stage2_c0_c0[1];
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 ConvexPoly_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ float alpha = 1.0;
+ float edge;
+ edge = dot(uedges_Stage2_c0_c0[0], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ alpha = 1.0 - alpha;
+ _output = _input * alpha;
+ return _output;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 blend_darken(vec4 src, vec4 dst) {
+ vec4 result = blend_src_over(src, dst);
+ result.xyz = min(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
+ return result;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_darken(ConvexPoly_Stage2_c0_c0(vec4(1.0)), output_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/529.shader_test b/shaders/skia/529.shader_test
new file mode 100644
index 0000000..aef3503
--- /dev/null
+++ b/shaders/skia/529.shader_test
@@ -0,0 +1,106 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 ucolor_Stage1_c0_c0_c0_c0;
+uniform vec4 ucolor_Stage2;
+uniform vec4 ucolor_Stage3_c1_c0;
+noperspective in vec4 vcolor_Stage0;
+vec4 ConstColorProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = _input.w * ucolor_Stage1_c0_c0_c0_c0;
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = ConstColorProcessor_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 ConstColorProcessor_Stage3_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage3_c1_c0;
+ }
+ return _output;
+}
+float _guarded_divide(float n, float d) {
+ return n / d;
+}
+float _soft_light_component(float sc, float sa, float dc, float da) {
+ if (2.0 * sc <= sa) {
+ return (_guarded_divide((dc * dc) * (sa - 2.0 * sc), da) + (1.0 - da) * sc) + dc * ((-sa + 2.0 * sc) + 1.0);
+ } else if (4.0 * dc <= da) {
+ float DSqd = dc * dc;
+ float DCub = DSqd * dc;
+ float DaSqd = da * da;
+ float DaCub = DaSqd * da;
+ return _guarded_divide(((DaSqd * (sc - dc * ((3.0 * sa - 6.0 * sc) - 1.0)) + ((12.0 * da) * DSqd) * (sa - 2.0 * sc)) - (16.0 * DCub) * (sa - 2.0 * sc)) - DaCub * sc, DaSqd);
+ }
+ return ((dc * ((sa - 2.0 * sc) + 1.0) + sc) - sqrt(da * dc) * (sa - 2.0 * sc)) - da * sc;
+}
+vec4 blend_soft_light(vec4 src, vec4 dst) {
+ if (dst.w == 0.0) {
+ return src;
+ }
+ return vec4(_soft_light_component(src.x, src.w, dst.x, dst.w), _soft_light_component(src.y, src.w, dst.y, dst.w), _soft_light_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 blend_darken(vec4 src, vec4 dst) {
+ vec4 result = blend_src_over(src, dst);
+ result.xyz = min(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
+ return result;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_soft_light(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ {
+ output_Stage2 = output_Stage1 * ucolor_Stage2;
+ }
+ }
+ vec4 output_Stage3;
+ {
+ output_Stage3 = blend_darken(ConstColorProcessor_Stage3_c1_c0(vec4(1.0)), output_Stage2);
+ }
+ {
+ sk_FragColor = output_Stage3;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 position;
+in vec4 inColor;
+noperspective out vec4 vcolor_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/532-3.shader_test b/shaders/skia/532-3.shader_test
new file mode 100644
index 0000000..33c5f45
--- /dev/null
+++ b/shaders/skia/532-3.shader_test
@@ -0,0 +1,105 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uscale0_1_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage2_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage2_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage2_c0_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 RadialGradientLayout_Stage2_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = length(vTransformedCoords_1_Stage0);
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage2_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage2_c0_c0_c1_c0;
+ bias = ubias0_1_Stage2_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage2_c0_c0_c1_c0;
+ bias = ubias2_3_Stage2_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage2_c0_c0_c1_c0;
+ bias = ubias4_5_Stage2_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage2_c0_c0_c1_c0;
+ bias = ubias6_7_Stage2_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = RadialGradientLayout_Stage2_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage2_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_dst_in(output_Stage1, TiledGradientEffect_Stage2_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/532-4.shader_test b/shaders/skia/532-4.shader_test
new file mode 100644
index 0000000..d5fe032
--- /dev/null
+++ b/shaders/skia/532-4.shader_test
@@ -0,0 +1,67 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 ConfigConversionEffect_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = floor(_input * 255.0 + 0.5) / 255.0;
+ {
+ _output.xyz = floor((_output.xyz * _output.w) * 255.0 + 0.5) / 255.0;
+ }
+ return _output;
+}
+float _blend_color_luminance(vec3 color) {
+ return dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), color);
+}
+vec3 _blend_set_color_luminance(vec3 hueSatColor, float alpha, vec3 lumColor) {
+ float lum = _blend_color_luminance(lumColor);
+ vec3 result = (lum - _blend_color_luminance(hueSatColor)) + hueSatColor;
+ float minComp = min(min(result.x, result.y), result.z);
+ float maxComp = max(max(result.x, result.y), result.z);
+ if (minComp < 0.0 && lum != minComp) {
+ result = lum + ((result - lum) * lum) / (lum - minComp);
+ }
+ if (maxComp > alpha && maxComp != lum) {
+ return lum + ((result - lum) * (alpha - lum)) / (maxComp - lum);
+ }
+ return result;
+}
+vec4 blend_color(vec4 src, vec4 dst) {
+ float alpha = dst.w * src.w;
+ vec3 sda = src.xyz * dst.w;
+ vec3 dsa = dst.xyz * src.w;
+ return vec4((((_blend_set_color_luminance(sda, alpha, dsa) + dst.xyz) - dsa) + src.xyz) - sda, (src.w + dst.w) - alpha);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_color(output_Stage1, ConfigConversionEffect_Stage2_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/532.shader_test b/shaders/skia/532.shader_test
new file mode 100644
index 0000000..3e00717
--- /dev/null
+++ b/shaders/skia/532.shader_test
@@ -0,0 +1,132 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.w) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ } else {
+ {
+ if (t < uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = OverrideInputFragmentProcessor_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 blend_difference(vec4 src, vec4 dst) {
+ return vec4((src.xyz + dst.xyz) - 2.0 * min(src.xyz * dst.w, dst.xyz * src.w), src.w + (1.0 - src.w) * dst.w);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_difference(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 inColor;
+in vec2 inLocalCoord;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/535-2.shader_test b/shaders/skia/535-2.shader_test
new file mode 100644
index 0000000..a3009f7
--- /dev/null
+++ b/shaders/skia/535-2.shader_test
@@ -0,0 +1,42 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+noperspective in vec4 vinCircleEdge_Stage0;
+noperspective in vec4 vinColor_Stage0;
+void main() {
+ {
+ vec4 circleEdge;
+ circleEdge = vinCircleEdge_Stage0;
+ float d = length(circleEdge.xy);
+ float distanceToOuterEdge = circleEdge.z * (1.0 - d);
+ float edgeAlpha = clamp(distanceToOuterEdge, 0.0, 1.0);
+ float distanceToInnerEdge = circleEdge.z * (d - circleEdge.w);
+ float innerAlpha = clamp(distanceToInnerEdge, 0.0, 1.0);
+ edgeAlpha *= innerAlpha;
+ }
+ {
+ sk_FragColor = vec4(0.0);
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 inPosition;
+in vec4 inColor;
+in vec4 inCircleEdge;
+noperspective out vec4 vinCircleEdge_Stage0;
+noperspective out vec4 vinColor_Stage0;
+void main() {
+ vinCircleEdge_Stage0 = inCircleEdge;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = inPosition;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/535-3.shader_test b/shaders/skia/535-3.shader_test
new file mode 100644
index 0000000..45f780b
--- /dev/null
+++ b/shaders/skia/535-3.shader_test
@@ -0,0 +1,112 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uscale0_1_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale8_9_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias8_9_Stage2_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage2_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage2_c0_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 RadialGradientLayout_Stage2_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = length(vTransformedCoords_1_Stage0);
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage2_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.w) {
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage2_c0_c0_c1_c0;
+ bias = ubias0_1_Stage2_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage2_c0_c0_c1_c0;
+ bias = ubias2_3_Stage2_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage2_c0_c0_c1_c0;
+ bias = ubias4_5_Stage2_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage2_c0_c0_c1_c0;
+ bias = ubias6_7_Stage2_c0_c0_c1_c0;
+ }
+ }
+ } else {
+ {
+ {
+ scale = uscale8_9_Stage2_c0_c0_c1_c0;
+ bias = ubias8_9_Stage2_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = RadialGradientLayout_Stage2_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ t.x = fract(t.x);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage2_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_dst_in(output_Stage1, TiledGradientEffect_Stage2_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/535-4.shader_test b/shaders/skia/535-4.shader_test
new file mode 100644
index 0000000..cc90e5b
--- /dev/null
+++ b/shaders/skia/535-4.shader_test
@@ -0,0 +1,131 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage2_c0_c0;
+uniform vec2 uBounds_Stage2_c0_c0;
+uniform vec4 uKernel_Stage2_c0_c0[2];
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 GaussianConvolution_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_1_Stage0 - 3.0 * uImageIncrement_Stage2_c0_c0;
+ vec2 coordSampled = vec2(0.0, 0.0);
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage2_c0_c0.x, uBounds_Stage2_c0_c0.y - uBounds_Stage2_c0_c0.x) + uBounds_Stage2_c0_c0.x;
+ _output += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2_c0_c0[0].x;
+ coord += uImageIncrement_Stage2_c0_c0;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage2_c0_c0.x, uBounds_Stage2_c0_c0.y - uBounds_Stage2_c0_c0.x) + uBounds_Stage2_c0_c0.x;
+ _output += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2_c0_c0[0].y;
+ coord += uImageIncrement_Stage2_c0_c0;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage2_c0_c0.x, uBounds_Stage2_c0_c0.y - uBounds_Stage2_c0_c0.x) + uBounds_Stage2_c0_c0.x;
+ _output += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2_c0_c0[0].z;
+ coord += uImageIncrement_Stage2_c0_c0;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage2_c0_c0.x, uBounds_Stage2_c0_c0.y - uBounds_Stage2_c0_c0.x) + uBounds_Stage2_c0_c0.x;
+ _output += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2_c0_c0[0].w;
+ coord += uImageIncrement_Stage2_c0_c0;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage2_c0_c0.x, uBounds_Stage2_c0_c0.y - uBounds_Stage2_c0_c0.x) + uBounds_Stage2_c0_c0.x;
+ _output += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2_c0_c0[1].x;
+ coord += uImageIncrement_Stage2_c0_c0;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage2_c0_c0.x, uBounds_Stage2_c0_c0.y - uBounds_Stage2_c0_c0.x) + uBounds_Stage2_c0_c0.x;
+ _output += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2_c0_c0[1].y;
+ coord += uImageIncrement_Stage2_c0_c0;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage2_c0_c0.x, uBounds_Stage2_c0_c0.y - uBounds_Stage2_c0_c0.x) + uBounds_Stage2_c0_c0.x;
+ _output += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2_c0_c0[1].z;
+ coord += uImageIncrement_Stage2_c0_c0;
+ _output *= _input;
+ return _output;
+}
+float _blend_color_saturation(vec3 color) {
+ return max(max(color.x, color.y), color.z) - min(min(color.x, color.y), color.z);
+}
+vec3 _blend_set_color_saturation_helper(vec3 minMidMax, float sat) {
+ if (minMidMax.x < minMidMax.z) {
+ return vec3(0.0, (sat * (minMidMax.y - minMidMax.x)) / (minMidMax.z - minMidMax.x), sat);
+ }
+ return vec3(0.0);
+}
+vec3 _blend_set_color_saturation(vec3 hueLumColor, vec3 satColor) {
+ float sat = _blend_color_saturation(satColor);
+ if (hueLumColor.x <= hueLumColor.y) {
+ if (hueLumColor.y <= hueLumColor.z) {
+ hueLumColor.xyz = _blend_set_color_saturation_helper(hueLumColor, sat);
+ } else if (hueLumColor.x <= hueLumColor.z) {
+ hueLumColor.xzy = _blend_set_color_saturation_helper(hueLumColor.xzy, sat);
+ } else {
+ hueLumColor.zxy = _blend_set_color_saturation_helper(hueLumColor.zxy, sat);
+ }
+ } else if (hueLumColor.x <= hueLumColor.z) {
+ hueLumColor.yxz = _blend_set_color_saturation_helper(hueLumColor.yxz, sat);
+ } else if (hueLumColor.y <= hueLumColor.z) {
+ hueLumColor.yzx = _blend_set_color_saturation_helper(hueLumColor.yzx, sat);
+ } else {
+ hueLumColor.zyx = _blend_set_color_saturation_helper(hueLumColor.zyx, sat);
+ }
+ return hueLumColor;
+}
+float _blend_color_luminance(vec3 color) {
+ return dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), color);
+}
+vec3 _blend_set_color_luminance(vec3 hueSatColor, float alpha, vec3 lumColor) {
+ float lum = _blend_color_luminance(lumColor);
+ vec3 result = (lum - _blend_color_luminance(hueSatColor)) + hueSatColor;
+ float minComp = min(min(result.x, result.y), result.z);
+ float maxComp = max(max(result.x, result.y), result.z);
+ if (minComp < 0.0 && lum != minComp) {
+ result = lum + ((result - lum) * lum) / (lum - minComp);
+ }
+ if (maxComp > alpha && maxComp != lum) {
+ return lum + ((result - lum) * (alpha - lum)) / (maxComp - lum);
+ }
+ return result;
+}
+vec4 blend_hue(vec4 src, vec4 dst) {
+ float alpha = dst.w * src.w;
+ vec3 sda = src.xyz * dst.w;
+ vec3 dsa = dst.xyz * src.w;
+ return vec4((((_blend_set_color_luminance(_blend_set_color_saturation(sda, dsa), alpha, dsa) + dst.xyz) - dsa) + src.xyz) - sda, (src.w + dst.w) - alpha);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_hue(GaussianConvolution_Stage2_c0_c0(vec4(1.0)), output_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/535.shader_test b/shaders/skia/535.shader_test
new file mode 100644
index 0000000..ba9c4f3
--- /dev/null
+++ b/shaders/skia/535.shader_test
@@ -0,0 +1,61 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 ucolor_Stage1_c0_c0_c0_c0;
+noperspective in vec4 vcolor_Stage0;
+vec4 ConstColorProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = _input.w * ucolor_Stage1_c0_c0_c0_c0;
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = ConstColorProcessor_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 blend_difference(vec4 src, vec4 dst) {
+ return vec4((src.xyz + dst.xyz) - 2.0 * min(src.xyz * dst.w, dst.xyz * src.w), src.w + (1.0 - src.w) * dst.w);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_difference(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 position;
+in vec4 inColor;
+noperspective out vec4 vcolor_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/538-2.shader_test b/shaders/skia/538-2.shader_test
new file mode 100644
index 0000000..5c06e0d
--- /dev/null
+++ b/shaders/skia/538-2.shader_test
@@ -0,0 +1,272 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_KHR_blend_equation_advanced : require
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+layout (blend_support_all_equations) out ;
+uniform vec2 uImageIncrement_Stage1;
+uniform float uSurfaceScale_Stage1;
+uniform vec3 uLightColor_Stage1;
+uniform float uKD_Stage1;
+uniform vec4 uTexDom_Stage1;
+uniform vec3 uDecalParams_Stage1;
+uniform vec3 uLightLocation_Stage1;
+uniform float uExponent_Stage1;
+uniform float uCosInnerConeAngle_Stage1;
+uniform float uCosOuterConeAngle_Stage1;
+uniform float uConeScale_Stage1;
+uniform vec3 uS_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 light_Stage1(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ float colorScale = uKD_Stage1 * dot(normal, surfaceToLight);
+ return vec4(lightColor * clamp(colorScale, 0.0, 1.0), 1.0);
+}
+float sobel_Stage1(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage1(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage1(float m[9], float surfaceScale) {
+ return pointToNormal_Stage1(sobel_Stage1(m[0], m[1], m[3], m[4], m[6], m[7], 0.5), sobel_Stage1(m[0], m[6], m[1], m[7], 0.0, 0.0, 0.33333298563957214), surfaceScale);
+}
+vec3 lightColor_Stage1(vec3 surfaceToLight) {
+ float cosAngle = -dot(surfaceToLight, uS_Stage1);
+ if (cosAngle < uCosOuterConeAngle_Stage1) {
+ return vec3(0.0);
+ }
+ float scale = pow(cosAngle, uExponent_Stage1);
+ if (cosAngle < uCosInnerConeAngle_Stage1) {
+ return ((uLightColor_Stage1 * scale) * (cosAngle - uCosOuterConeAngle_Stage1)) * uConeScale_Stage1;
+ }
+ return uLightColor_Stage1;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec2 coord = vTransformedCoords_0_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp0 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp5 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp6 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp7 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp8 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = normalize(uLightLocation_Stage1 - vec3(gl_FragCoord.xy, uSurfaceScale_Stage1 * m[4]));
+ output_Stage1 = light_Stage1(normal_Stage1(m, uSurfaceScale_Stage1), surfaceToLight, lightColor_Stage1(surfaceToLight));
+ output_Stage1 *= outputColor_Stage0;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform float uSrcTF_Stage0[7];
+uniform mat3 uColorXform_Stage0;
+uniform float uDstTF_Stage0[7];
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 inColor;
+in vec2 inLocalCoord;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+float src_tf_Stage0(float x) {
+ float G = uSrcTF_Stage0[0];
+ float A = uSrcTF_Stage0[1];
+ float B = uSrcTF_Stage0[2];
+ float C = uSrcTF_Stage0[3];
+ float D = uSrcTF_Stage0[4];
+ float E = uSrcTF_Stage0[5];
+ float F = uSrcTF_Stage0[6];
+ float s = sign(x);
+ x = abs(x);
+ x = x < D ? C * x + F : pow(A * x + B, G) + E;
+ return s * x;
+}
+float dst_tf_Stage0(float x) {
+ float G = uDstTF_Stage0[0];
+ float A = uDstTF_Stage0[1];
+ float B = uDstTF_Stage0[2];
+ float C = uDstTF_Stage0[3];
+ float D = uDstTF_Stage0[4];
+ float E = uDstTF_Stage0[5];
+ float F = uDstTF_Stage0[6];
+ float s = sign(x);
+ x = abs(x);
+ x = x < D ? C * x + F : pow(A * x + B, G) + E;
+ return s * x;
+}
+vec4 gamut_xform_Stage0(vec4 color) {
+ color.xyz = uColorXform_Stage0 * color.xyz;
+ return color;
+}
+vec4 color_xform_Stage0(vec4 color) {
+ float nonZeroAlpha = max(color.w, 9.9999997473787516e-05);
+ color = vec4(color.xyz / nonZeroAlpha, nonZeroAlpha);
+ color.x = src_tf_Stage0(color.x);
+ color.y = src_tf_Stage0(color.y);
+ color.z = src_tf_Stage0(color.z);
+ color = gamut_xform_Stage0(color);
+ color.x = dst_tf_Stage0(color.x);
+ color.y = dst_tf_Stage0(color.y);
+ color.z = dst_tf_Stage0(color.z);
+ color.xyz *= color.w;
+ return color;
+}
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = color_xform_Stage0(color);
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/538-3.shader_test b/shaders/skia/538-3.shader_test
new file mode 100644
index 0000000..b263fcc
--- /dev/null
+++ b/shaders/skia/538-3.shader_test
@@ -0,0 +1,77 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 ustart_Stage2_c0_c0_c1_c0;
+uniform vec4 uend_Stage2_c0_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 RadialGradientLayout_Stage2_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = length(vTransformedCoords_1_Stage0);
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage2_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage2_c0_c0_c1_c0 + t * uend_Stage2_c0_c0_c1_c0;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = RadialGradientLayout_Stage2_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = SingleIntervalGradientColorizer_Stage2_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_dst_in(output_Stage1, TiledGradientEffect_Stage2_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/538-4.shader_test b/shaders/skia/538-4.shader_test
new file mode 100644
index 0000000..5d0186c
--- /dev/null
+++ b/shaders/skia/538-4.shader_test
@@ -0,0 +1,85 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform float ucornerRadius_Stage2_c0_c0;
+uniform vec4 uproxyRect_Stage2_c0_c0;
+uniform float ublurRadius_Stage2_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 RRectBlurEffect_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 translatedFragPos = gl_FragCoord.xy - uproxyRect_Stage2_c0_c0.xy;
+ float threshold = ucornerRadius_Stage2_c0_c0 + 2.0 * ublurRadius_Stage2_c0_c0;
+ vec2 middle = (uproxyRect_Stage2_c0_c0.zw - uproxyRect_Stage2_c0_c0.xy) - 2.0 * threshold;
+ if (translatedFragPos.x >= threshold && translatedFragPos.x < middle.x + threshold) {
+ translatedFragPos.x = threshold;
+ } else if (translatedFragPos.x >= middle.x + threshold) {
+ translatedFragPos.x -= middle.x - 1.0;
+ }
+ if (translatedFragPos.y > threshold && translatedFragPos.y < middle.y + threshold) {
+ translatedFragPos.y = threshold;
+ } else if (translatedFragPos.y >= middle.y + threshold) {
+ translatedFragPos.y -= middle.y - 1.0;
+ }
+ vec2 proxyDims = vec2(2.0 * threshold + 1.0);
+ vec2 texCoord = translatedFragPos / proxyDims;
+ _output = _input * texture(uTextureSampler_0_Stage2, texCoord);
+ return _output;
+}
+float _blend_color_luminance(vec3 color) {
+ return dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), color);
+}
+vec3 _blend_set_color_luminance(vec3 hueSatColor, float alpha, vec3 lumColor) {
+ float lum = _blend_color_luminance(lumColor);
+ vec3 result = (lum - _blend_color_luminance(hueSatColor)) + hueSatColor;
+ float minComp = min(min(result.x, result.y), result.z);
+ float maxComp = max(max(result.x, result.y), result.z);
+ if (minComp < 0.0 && lum != minComp) {
+ result = lum + ((result - lum) * lum) / (lum - minComp);
+ }
+ if (maxComp > alpha && maxComp != lum) {
+ return lum + ((result - lum) * (alpha - lum)) / (maxComp - lum);
+ }
+ return result;
+}
+vec4 blend_luminosity(vec4 src, vec4 dst) {
+ float alpha = dst.w * src.w;
+ vec3 sda = src.xyz * dst.w;
+ vec3 dsa = dst.xyz * src.w;
+ return vec4((((_blend_set_color_luminance(dsa, alpha, sda) + dst.xyz) - dsa) + src.xyz) - sda, (src.w + dst.w) - alpha);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_luminosity(RRectBlurEffect_Stage2_c0_c0(vec4(1.0)), output_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/538.shader_test b/shaders/skia/538.shader_test
new file mode 100644
index 0000000..e3d2154
--- /dev/null
+++ b/shaders/skia/538.shader_test
@@ -0,0 +1,152 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage2_c1_c0;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.w) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ } else {
+ {
+ if (t < uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = OverrideInputFragmentProcessor_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c1_c0;
+ }
+ return _output;
+}
+vec4 blend_difference(vec4 src, vec4 dst) {
+ return vec4((src.xyz + dst.xyz) - 2.0 * min(src.xyz * dst.w, dst.xyz * src.w), src.w + (1.0 - src.w) * dst.w);
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 blend_darken(vec4 src, vec4 dst) {
+ vec4 result = blend_src_over(src, dst);
+ result.xyz = min(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
+ return result;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_difference(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_darken(ConstColorProcessor_Stage2_c1_c0(vec4(1.0)), output_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 inColor;
+in vec2 inLocalCoord;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/541-2.shader_test b/shaders/skia/541-2.shader_test
new file mode 100644
index 0000000..aaebe34
--- /dev/null
+++ b/shaders/skia/541-2.shader_test
@@ -0,0 +1,346 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+uniform vec2 uImageIncrement_Stage2;
+uniform vec4 uKernel_Stage2[4];
+uniform vec2 uKernelOffset_Stage2;
+uniform float uGain_Stage2;
+uniform float uBias_Stage2;
+uniform vec4 uleftBorderColor_Stage3_c0_c0;
+uniform vec4 urightBorderColor_Stage3_c0_c0;
+uniform float ubias_Stage3_c0_c0_c0_c0;
+uniform float uscale_Stage3_c0_c0_c0_c0;
+uniform vec4 ustart_Stage3_c0_c0_c1_c0;
+uniform vec4 uend_Stage3_c0_c0_c1_c0;
+uniform float ucornerRadius_Stage4;
+uniform vec4 uproxyRect_Stage4;
+uniform float ublurRadius_Stage4;
+uniform vec4 uk_Stage5;
+uniform vec4 ucolor_Stage5_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage2;
+uniform sampler2D uTextureSampler_0_Stage4;
+noperspective in vec2 vEllipseOffsets_Stage0;
+noperspective in vec4 vEllipseRadii_Stage0;
+noperspective in vec4 vinColor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+vec4 SweepGradientLayout_Stage3_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float angle;
+ {
+ angle = atan(-vTransformedCoords_1_Stage0.y, -vTransformedCoords_1_Stage0.x);
+ }
+ float t = ((angle * 0.15915493667125702 + 0.5) + ubias_Stage3_c0_c0_c0_c0) * uscale_Stage3_c0_c0_c0_c0;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage3_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage3_c0_c0_c1_c0 + t * uend_Stage3_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage3_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = SweepGradientLayout_Stage3_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage3_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage3_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage3_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 ConstColorProcessor_Stage5_c1_c0(vec4 _input, vec2 _coords) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage5_c1_c0;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ vec2 offset = vEllipseOffsets_Stage0;
+ offset *= vEllipseRadii_Stage0.xy;
+ float test = dot(offset, offset) - 1.0;
+ vec2 grad = (2.0 * offset) * vEllipseRadii_Stage0.xy;
+ float grad_dot = dot(grad, grad);
+ grad_dot = max(grad_dot, 1.1754999560161448e-38);
+ float invlen = inversesqrt(grad_dot);
+ float edgeAlpha = clamp(0.5 - test * invlen, 0.0, 1.0);
+ offset = vEllipseOffsets_Stage0 * vEllipseRadii_Stage0.zw;
+ test = dot(offset, offset) - 1.0;
+ grad = (2.0 * offset) * vEllipseRadii_Stage0.zw;
+ grad_dot = dot(grad, grad);
+ invlen = inversesqrt(grad_dot);
+ edgeAlpha *= clamp(0.5 + test * invlen, 0.0, 1.0);
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ vec4 output_Stage1;
+ {
+ {
+ float alpha = clamp(outputCoverage_Stage0.w, 0.0, 1.0);
+ output_Stage1 = vec4(clamp(outputCoverage_Stage0.xyz, 0.0, alpha), alpha);
+ }
+ }
+ vec4 output_Stage2;
+ {
+ vec4 sum = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0 - uKernelOffset_Stage2 * uImageIncrement_Stage2;
+ vec4 c;
+ {
+ float k = uKernel_Stage2[0].x;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[0].y;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[0].z;
+ {
+ vec2 origCoord = coord + vec2(2.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[0].w;
+ {
+ vec2 origCoord = coord + vec2(3.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[1].x;
+ {
+ vec2 origCoord = coord + vec2(4.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[1].y;
+ {
+ vec2 origCoord = coord + vec2(5.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[1].z;
+ {
+ vec2 origCoord = coord + vec2(6.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[1].w;
+ {
+ vec2 origCoord = coord + vec2(7.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[2].x;
+ {
+ vec2 origCoord = coord + vec2(8.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[2].y;
+ {
+ vec2 origCoord = coord + vec2(9.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[2].z;
+ {
+ vec2 origCoord = coord + vec2(10.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[2].w;
+ {
+ vec2 origCoord = coord + vec2(11.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[3].x;
+ {
+ vec2 origCoord = coord + vec2(12.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[3].y;
+ {
+ vec2 origCoord = coord + vec2(13.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[3].z;
+ {
+ vec2 origCoord = coord + vec2(14.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[3].w;
+ {
+ vec2 origCoord = coord + vec2(15.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ output_Stage2 = sum * uGain_Stage2 + uBias_Stage2;
+ output_Stage2.w = clamp(output_Stage2.w, 0.0, 1.0);
+ output_Stage2.xyz = clamp(output_Stage2.xyz, 0.0, output_Stage2.w);
+ output_Stage2 *= output_Stage1;
+ }
+ vec4 output_Stage3;
+ {
+ output_Stage3 = blend_dst_in(output_Stage2, ClampedGradientEffect_Stage3_c0_c0(vec4(1.0)));
+ }
+ vec4 output_Stage4;
+ {
+ vec2 translatedFragPos = gl_FragCoord.xy - uproxyRect_Stage4.xy;
+ float threshold = ucornerRadius_Stage4 + 2.0 * ublurRadius_Stage4;
+ vec2 middle = (uproxyRect_Stage4.zw - uproxyRect_Stage4.xy) - 2.0 * threshold;
+ if (translatedFragPos.x >= threshold && translatedFragPos.x < middle.x + threshold) {
+ translatedFragPos.x = threshold;
+ } else if (translatedFragPos.x >= middle.x + threshold) {
+ translatedFragPos.x -= middle.x - 1.0;
+ }
+ if (translatedFragPos.y > threshold && translatedFragPos.y < middle.y + threshold) {
+ translatedFragPos.y = threshold;
+ } else if (translatedFragPos.y >= middle.y + threshold) {
+ translatedFragPos.y -= middle.y - 1.0;
+ }
+ vec2 proxyDims = vec2(2.0 * threshold + 1.0);
+ vec2 texCoord = translatedFragPos / proxyDims;
+ output_Stage4 = output_Stage3 * texture(uTextureSampler_0_Stage4, texCoord);
+ }
+ vec4 output_Stage5;
+ {
+ output_Stage5 = output_Stage4;
+ vec4 dst = ConstColorProcessor_Stage5_c1_c0(vec4(1.0), vTransformedCoords_2_Stage0);
+ output_Stage5 = clamp((((uk_Stage5.x * output_Stage5) * dst + uk_Stage5.y * output_Stage5) + uk_Stage5.z * dst) + uk_Stage5.w, 0.0, 1.0);
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec2 inEllipseOffset;
+in vec4 inEllipseRadii;
+noperspective out vec2 vEllipseOffsets_Stage0;
+noperspective out vec4 vEllipseRadii_Stage0;
+noperspective out vec4 vinColor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+void main() {
+ vEllipseOffsets_Stage0 = inEllipseOffset;
+ vEllipseRadii_Stage0 = inEllipseRadii;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/541-3.shader_test b/shaders/skia/541-3.shader_test
new file mode 100644
index 0000000..9c89b5f
--- /dev/null
+++ b/shaders/skia/541-3.shader_test
@@ -0,0 +1,107 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage2_c0_c0;
+uniform vec4 urightBorderColor_Stage2_c0_c0;
+uniform float ubias_Stage2_c0_c0_c0_c0;
+uniform float uscale_Stage2_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage2_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage2_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage2_c0_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 SweepGradientLayout_Stage2_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float angle;
+ {
+ angle = atan(-vTransformedCoords_1_Stage0.y, -vTransformedCoords_1_Stage0.x);
+ }
+ float t = ((angle * 0.15915493667125702 + 0.5) + ubias_Stage2_c0_c0_c0_c0) * uscale_Stage2_c0_c0_c0_c0;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage2_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage2_c0_c0_c1_c0;
+ bias = ubias0_1_Stage2_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage2_c0_c0_c1_c0;
+ bias = ubias2_3_Stage2_c0_c0_c1_c0;
+ }
+ } else {
+ {
+ scale = uscale4_5_Stage2_c0_c0_c1_c0;
+ bias = ubias4_5_Stage2_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = SweepGradientLayout_Stage2_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage2_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage2_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage2_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_dst_in(output_Stage1, ClampedGradientEffect_Stage2_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/541-4.shader_test b/shaders/skia/541-4.shader_test
new file mode 100644
index 0000000..98acf07
--- /dev/null
+++ b/shaders/skia/541-4.shader_test
@@ -0,0 +1,71 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uboundsUniform_Stage2_c0_c0;
+uniform float uxInvZoom_Stage2_c0_c0;
+uniform float uyInvZoom_Stage2_c0_c0;
+uniform float uxInvInset_Stage2_c0_c0;
+uniform float uyInvInset_Stage2_c0_c0;
+uniform vec2 uoffset_Stage2_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 MagnifierEffect_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coord = vTransformedCoords_1_Stage0;
+ vec2 zoom_coord = uoffset_Stage2_c0_c0 + coord * vec2(uxInvZoom_Stage2_c0_c0, uyInvZoom_Stage2_c0_c0);
+ vec2 delta = (coord - uboundsUniform_Stage2_c0_c0.xy) * uboundsUniform_Stage2_c0_c0.zw;
+ delta = min(delta, vec2(1.0, 1.0) - delta);
+ delta *= vec2(uxInvInset_Stage2_c0_c0, uyInvInset_Stage2_c0_c0);
+ float weight = 0.0;
+ if (delta.x < 2.0 && delta.y < 2.0) {
+ delta = vec2(2.0, 2.0) - delta;
+ float dist = length(delta);
+ dist = max(2.0 - dist, 0.0);
+ weight = min(dist * dist, 1.0);
+ } else {
+ vec2 delta_squared = delta * delta;
+ weight = min(min(delta_squared.x, delta_squared.y), 1.0);
+ }
+ _output = texture(uTextureSampler_0_Stage2, mix(coord, zoom_coord, weight));
+ return _output;
+}
+vec4 blend_plus(vec4 src, vec4 dst) {
+ return min(src + dst, 1.0);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_plus(MagnifierEffect_Stage2_c0_c0(vec4(1.0)), output_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/541.shader_test b/shaders/skia/541.shader_test
new file mode 100644
index 0000000..b22d0fb
--- /dev/null
+++ b/shaders/skia/541.shader_test
@@ -0,0 +1,81 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 ucolor_Stage1_c0_c0_c0_c0;
+uniform vec4 ucolor_Stage2_c1_c0;
+noperspective in vec4 vcolor_Stage0;
+vec4 ConstColorProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = _input.w * ucolor_Stage1_c0_c0_c0_c0;
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = ConstColorProcessor_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c1_c0;
+ }
+ return _output;
+}
+vec4 blend_difference(vec4 src, vec4 dst) {
+ return vec4((src.xyz + dst.xyz) - 2.0 * min(src.xyz * dst.w, dst.xyz * src.w), src.w + (1.0 - src.w) * dst.w);
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 blend_darken(vec4 src, vec4 dst) {
+ vec4 result = blend_src_over(src, dst);
+ result.xyz = min(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
+ return result;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_difference(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_darken(ConstColorProcessor_Stage2_c1_c0(vec4(1.0)), output_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 position;
+in vec4 inColor;
+noperspective out vec4 vcolor_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/544-2.shader_test b/shaders/skia/544-2.shader_test
new file mode 100644
index 0000000..56d15ad
--- /dev/null
+++ b/shaders/skia/544-2.shader_test
@@ -0,0 +1,176 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uColor_Stage0;
+uniform float uCoverage_Stage0;
+uniform vec4 urectUniform_Stage1_c1_c0_c0_c0_c0_c0;
+uniform mat4 um_Stage1_c1_c0_c0_c0_c1_c0;
+uniform vec4 uv_Stage1_c1_c0_c0_c0_c1_c0;
+uniform mat4 um_Stage1_c1_c0_c1_c0;
+uniform vec4 uv_Stage1_c1_c0_c1_c0;
+uniform vec2 uDstTextureUpperLeft_Stage2;
+uniform vec2 uDstTextureCoordScale_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uDstTextureSampler_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 TextureEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+vec4 AARectEffect_Stage1_c1_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float alpha;
+ {
+ float xSub, ySub;
+ xSub = min(gl_FragCoord.x - urectUniform_Stage1_c1_c0_c0_c0_c0_c0.x, 0.0);
+ xSub += min(urectUniform_Stage1_c1_c0_c0_c0_c0_c0.z - gl_FragCoord.x, 0.0);
+ ySub = min(gl_FragCoord.y - urectUniform_Stage1_c1_c0_c0_c0_c0_c0.y, 0.0);
+ ySub += min(urectUniform_Stage1_c1_c0_c0_c0_c0_c0.w - gl_FragCoord.y, 0.0);
+ alpha = (1.0 + max(xSub, -1.0)) * (1.0 + max(ySub, -1.0));
+ }
+ _output = _input * alpha;
+ return _output;
+}
+vec4 ColorMatrixFragmentProcessor_Stage1_c1_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = _input;
+ {
+ float nonZeroAlpha = max(inputColor.w, 9.9999997473787516e-05);
+ inputColor = vec4(inputColor.xyz / nonZeroAlpha, inputColor.w);
+ }
+ _output = um_Stage1_c1_c0_c0_c0_c1_c0 * inputColor + uv_Stage1_c1_c0_c0_c0_c1_c0;
+ {
+ _output = clamp(_output, 0.0, 1.0);
+ }
+ return _output;
+}
+vec4 blend_dst_out(vec4 src, vec4 dst) {
+ return (1.0 - src.w) * dst;
+}
+vec4 ComposeTwo_Stage1_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_dst_out(AARectEffect_Stage1_c1_c0_c0_c0_c0_c0(inputColor), ColorMatrixFragmentProcessor_Stage1_c1_c0_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 ColorMatrixFragmentProcessor_Stage1_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = _input;
+ {
+ float nonZeroAlpha = max(inputColor.w, 9.9999997473787516e-05);
+ inputColor = vec4(inputColor.xyz / nonZeroAlpha, inputColor.w);
+ }
+ _output = um_Stage1_c1_c0_c1_c0 * inputColor + uv_Stage1_c1_c0_c1_c0;
+ {
+ _output.w = clamp(_output.w, 0.0, 1.0);
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 ComposeTwo_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_src_in(ComposeTwo_Stage1_c1_c0_c0_c0(inputColor), ColorMatrixFragmentProcessor_Stage1_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+float _blend_color_saturation(vec3 color) {
+ return max(max(color.x, color.y), color.z) - min(min(color.x, color.y), color.z);
+}
+vec3 _blend_set_color_saturation_helper(vec3 minMidMax, float sat) {
+ if (minMidMax.x < minMidMax.z) {
+ return vec3(0.0, (sat * (minMidMax.y - minMidMax.x)) / (minMidMax.z - minMidMax.x), sat);
+ }
+ return vec3(0.0);
+}
+vec3 _blend_set_color_saturation(vec3 hueLumColor, vec3 satColor) {
+ float sat = _blend_color_saturation(satColor);
+ if (hueLumColor.x <= hueLumColor.y) {
+ if (hueLumColor.y <= hueLumColor.z) {
+ hueLumColor.xyz = _blend_set_color_saturation_helper(hueLumColor, sat);
+ } else if (hueLumColor.x <= hueLumColor.z) {
+ hueLumColor.xzy = _blend_set_color_saturation_helper(hueLumColor.xzy, sat);
+ } else {
+ hueLumColor.zxy = _blend_set_color_saturation_helper(hueLumColor.zxy, sat);
+ }
+ } else if (hueLumColor.x <= hueLumColor.z) {
+ hueLumColor.yxz = _blend_set_color_saturation_helper(hueLumColor.yxz, sat);
+ } else if (hueLumColor.y <= hueLumColor.z) {
+ hueLumColor.yzx = _blend_set_color_saturation_helper(hueLumColor.yzx, sat);
+ } else {
+ hueLumColor.zyx = _blend_set_color_saturation_helper(hueLumColor.zyx, sat);
+ }
+ return hueLumColor;
+}
+float _blend_color_luminance(vec3 color) {
+ return dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), color);
+}
+vec3 _blend_set_color_luminance(vec3 hueSatColor, float alpha, vec3 lumColor) {
+ float lum = _blend_color_luminance(lumColor);
+ vec3 result = (lum - _blend_color_luminance(hueSatColor)) + hueSatColor;
+ float minComp = min(min(result.x, result.y), result.z);
+ float maxComp = max(max(result.x, result.y), result.z);
+ if (minComp < 0.0 && lum != minComp) {
+ result = lum + ((result - lum) * lum) / (lum - minComp);
+ }
+ if (maxComp > alpha && maxComp != lum) {
+ return lum + ((result - lum) * (alpha - lum)) / (maxComp - lum);
+ }
+ return result;
+}
+vec4 blend_hue(vec4 src, vec4 dst) {
+ float alpha = dst.w * src.w;
+ vec3 sda = src.xyz * dst.w;
+ vec3 dsa = dst.xyz * src.w;
+ return vec4((((_blend_set_color_luminance(_blend_set_color_saturation(sda, dsa), alpha, dsa) + dst.xyz) - dsa) + src.xyz) - sda, (src.w + dst.w) - alpha);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = uColor_Stage0;
+ outputCoverage_Stage0 = vec4(uCoverage_Stage0);
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_hue(TextureEffect_Stage1_c0_c0(inputColor), ComposeTwo_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ if (all(lessThanEqual(outputCoverage_Stage0.xyz, vec3(0.0)))) {
+ discard;
+ }
+ vec2 _dstTexCoord = (gl_FragCoord.xy - uDstTextureUpperLeft_Stage2) * uDstTextureCoordScale_Stage2;
+ _dstTexCoord.y = 1.0 - _dstTexCoord.y;
+ vec4 _dstColor = texture(uDstTextureSampler_Stage2, _dstTexCoord);
+ sk_FragColor = blend_src_in(output_Stage1, _dstColor);
+ sk_FragColor = outputCoverage_Stage0 * sk_FragColor + (vec4(1.0) - outputCoverage_Stage0) * _dstColor;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec2 pos2 = (uViewM_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/544-3.shader_test b/shaders/skia/544-3.shader_test
new file mode 100644
index 0000000..39be27e
--- /dev/null
+++ b/shaders/skia/544-3.shader_test
@@ -0,0 +1,95 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage2_c0_c0;
+uniform vec4 urightBorderColor_Stage2_c0_c0;
+uniform float ubias_Stage2_c0_c0_c0_c0;
+uniform float uscale_Stage2_c0_c0_c0_c0;
+uniform vec4 uscale01_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias01_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale23_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias23_Stage2_c0_c0_c1_c0;
+uniform float uthreshold_Stage2_c0_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 SweepGradientLayout_Stage2_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float angle;
+ {
+ angle = atan(-vTransformedCoords_1_Stage0.y, -vTransformedCoords_1_Stage0.x);
+ }
+ float t = ((angle * 0.15915493667125702 + 0.5) + ubias_Stage2_c0_c0_c0_c0) * uscale_Stage2_c0_c0_c0_c0;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 DualIntervalGradientColorizer_Stage2_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthreshold_Stage2_c0_c0_c1_c0) {
+ scale = uscale01_Stage2_c0_c0_c1_c0;
+ bias = ubias01_Stage2_c0_c0_c1_c0;
+ } else {
+ scale = uscale23_Stage2_c0_c0_c1_c0;
+ bias = ubias23_Stage2_c0_c0_c1_c0;
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = SweepGradientLayout_Stage2_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage2_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage2_c0_c0;
+ } else {
+ _output = DualIntervalGradientColorizer_Stage2_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_dst_in(output_Stage1, ClampedGradientEffect_Stage2_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/544-4.shader_test b/shaders/skia/544-4.shader_test
new file mode 100644
index 0000000..a7f3796
--- /dev/null
+++ b/shaders/skia/544-4.shader_test
@@ -0,0 +1,71 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec3 uedges_Stage2_c0_c0[1];
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 ConvexPoly_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ float alpha = 1.0;
+ float edge;
+ edge = dot(uedges_Stage2_c0_c0[0], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ _output = _input * alpha;
+ return _output;
+}
+float _guarded_divide(float n, float d) {
+ return n / d;
+}
+float _soft_light_component(float sc, float sa, float dc, float da) {
+ if (2.0 * sc <= sa) {
+ return (_guarded_divide((dc * dc) * (sa - 2.0 * sc), da) + (1.0 - da) * sc) + dc * ((-sa + 2.0 * sc) + 1.0);
+ } else if (4.0 * dc <= da) {
+ float DSqd = dc * dc;
+ float DCub = DSqd * dc;
+ float DaSqd = da * da;
+ float DaCub = DaSqd * da;
+ return _guarded_divide(((DaSqd * (sc - dc * ((3.0 * sa - 6.0 * sc) - 1.0)) + ((12.0 * da) * DSqd) * (sa - 2.0 * sc)) - (16.0 * DCub) * (sa - 2.0 * sc)) - DaCub * sc, DaSqd);
+ }
+ return ((dc * ((sa - 2.0 * sc) + 1.0) + sc) - sqrt(da * dc) * (sa - 2.0 * sc)) - da * sc;
+}
+vec4 blend_soft_light(vec4 src, vec4 dst) {
+ if (dst.w == 0.0) {
+ return src;
+ }
+ return vec4(_soft_light_component(src.x, src.w, dst.x, dst.w), _soft_light_component(src.y, src.w, dst.y, dst.w), _soft_light_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_soft_light(ConvexPoly_Stage2_c0_c0(vec4(1.0)), output_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/544.shader_test b/shaders/skia/544.shader_test
new file mode 100644
index 0000000..51588f3
--- /dev/null
+++ b/shaders/skia/544.shader_test
@@ -0,0 +1,145 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage2;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.w) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ } else {
+ {
+ if (t < uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+vec4 ComposeOne_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_dst_in(_input, TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0)));
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = ComposeOne_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 blend_difference(vec4 src, vec4 dst) {
+ return vec4((src.xyz + dst.xyz) - 2.0 * min(src.xyz * dst.w, dst.xyz * src.w), src.w + (1.0 - src.w) * dst.w);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_difference(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ {
+ output_Stage2 = output_Stage1 * ucolor_Stage2;
+ }
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 inColor;
+in vec2 inLocalCoord;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/547-3.shader_test b/shaders/skia/547-3.shader_test
new file mode 100644
index 0000000..cdac749
--- /dev/null
+++ b/shaders/skia/547-3.shader_test
@@ -0,0 +1,112 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage2_c0_c0;
+uniform vec4 urightBorderColor_Stage2_c0_c0;
+uniform float ubias_Stage2_c0_c0_c0_c0;
+uniform float uscale_Stage2_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage2_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage2_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage2_c0_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 SweepGradientLayout_Stage2_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float angle;
+ {
+ angle = atan(-vTransformedCoords_1_Stage0.y, -vTransformedCoords_1_Stage0.x);
+ }
+ float t = ((angle * 0.15915493667125702 + 0.5) + ubias_Stage2_c0_c0_c0_c0) * uscale_Stage2_c0_c0_c0_c0;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage2_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage2_c0_c0_c1_c0;
+ bias = ubias0_1_Stage2_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage2_c0_c0_c1_c0;
+ bias = ubias2_3_Stage2_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage2_c0_c0_c1_c0;
+ bias = ubias4_5_Stage2_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage2_c0_c0_c1_c0;
+ bias = ubias6_7_Stage2_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = SweepGradientLayout_Stage2_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage2_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage2_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage2_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_dst_in(output_Stage1, ClampedGradientEffect_Stage2_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/547-4.shader_test b/shaders/skia/547-4.shader_test
new file mode 100644
index 0000000..35adc98
--- /dev/null
+++ b/shaders/skia/547-4.shader_test
@@ -0,0 +1,45 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 Big_Ole_Key_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = _input;
+ return _output;
+}
+vec4 blend_dst_over(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src + dst;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_dst_over(output_Stage1, Big_Ole_Key_Stage2_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/547.shader_test b/shaders/skia/547.shader_test
new file mode 100644
index 0000000..d837780
--- /dev/null
+++ b/shaders/skia/547.shader_test
@@ -0,0 +1,68 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 ucolor_Stage1_c0_c0_c0_c0;
+uniform vec4 ucolor_Stage2;
+noperspective in vec4 vcolor_Stage0;
+vec4 ConstColorProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = _input.w * ucolor_Stage1_c0_c0_c0_c0;
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = ConstColorProcessor_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 blend_difference(vec4 src, vec4 dst) {
+ return vec4((src.xyz + dst.xyz) - 2.0 * min(src.xyz * dst.w, dst.xyz * src.w), src.w + (1.0 - src.w) * dst.w);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_difference(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ {
+ output_Stage2 = output_Stage1 * ucolor_Stage2;
+ }
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 position;
+in vec4 inColor;
+noperspective out vec4 vcolor_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/55-1.shader_test b/shaders/skia/55-1.shader_test
new file mode 100644
index 0000000..6725b2f
--- /dev/null
+++ b/shaders/skia/55-1.shader_test
@@ -0,0 +1,55 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 TextureEffect_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage2, vTransformedCoords_1_Stage0) * _input;
+ return _output;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 blend_lighten(vec4 src, vec4 dst) {
+ vec4 result = blend_src_over(src, dst);
+ result.xyz = max(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
+ return result;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_lighten(output_Stage1, TextureEffect_Stage2_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/55-13.shader_test b/shaders/skia/55-13.shader_test
new file mode 100644
index 0000000..3ded590
--- /dev/null
+++ b/shaders/skia/55-13.shader_test
@@ -0,0 +1,111 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 uscale01_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias01_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale23_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias23_Stage1_c0_c0_c1_c0;
+uniform float uthreshold_Stage1_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage2_c1_c0_c0_c0;
+uniform vec4 ucolor_Stage2_c2_c0_c0_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 RadialGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = length(vTransformedCoords_0_Stage0);
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 DualIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthreshold_Stage1_c0_c0_c1_c0) {
+ scale = uscale01_Stage1_c0_c0_c1_c0;
+ bias = ubias01_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale23_Stage1_c0_c0_c1_c0;
+ bias = ubias23_Stage1_c0_c0_c1_c0;
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = RadialGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = DualIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c1_c0_c0_c0;
+ }
+ return _output;
+}
+vec4 blend_xor(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src + (1.0 - src.w) * dst;
+}
+vec4 ComposeOne_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_xor(ConstColorProcessor_Stage2_c1_c0_c0_c0(vec4(1.0)), _input);
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c2_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c2_c0_c0_c0;
+ }
+ return _output;
+}
+vec4 blend_src_atop(vec4 src, vec4 dst) {
+ return dst.w * src + (1.0 - src.w) * dst;
+}
+vec4 ComposeOne_Stage2_c2_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_src_atop(ConstColorProcessor_Stage2_c2_c0_c0_c0(vec4(1.0)), _input);
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = ComposeOne_Stage2_c2_c0(ComposeOne_Stage2_c1_c0(output_Stage1));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/55-14.shader_test b/shaders/skia/55-14.shader_test
new file mode 100644
index 0000000..71ba851
--- /dev/null
+++ b/shaders/skia/55-14.shader_test
@@ -0,0 +1,116 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 uscale01_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias01_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale23_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias23_Stage1_c0_c0_c1_c0;
+uniform float uthreshold_Stage1_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage2_c1_c0_c0_c0;
+uniform vec4 ucolor_Stage2_c2_c0_c0_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 RadialGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = length(vTransformedCoords_0_Stage0);
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 DualIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthreshold_Stage1_c0_c0_c1_c0) {
+ scale = uscale01_Stage1_c0_c0_c1_c0;
+ bias = ubias01_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale23_Stage1_c0_c0_c1_c0;
+ bias = ubias23_Stage1_c0_c0_c1_c0;
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = RadialGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = DualIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c1_c0_c0_c0;
+ }
+ return _output;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 blend_darken(vec4 src, vec4 dst) {
+ vec4 result = blend_src_over(src, dst);
+ result.xyz = min(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
+ return result;
+}
+vec4 ComposeOne_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_darken(ConstColorProcessor_Stage2_c1_c0_c0_c0(vec4(1.0)), _input);
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c2_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c2_c0_c0_c0;
+ }
+ return _output;
+}
+vec4 blend_exclusion(vec4 src, vec4 dst) {
+ return vec4((dst.xyz + src.xyz) - (2.0 * dst.xyz) * src.xyz, src.w + (1.0 - src.w) * dst.w);
+}
+vec4 ComposeOne_Stage2_c2_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_exclusion(ConstColorProcessor_Stage2_c2_c0_c0_c0(vec4(1.0)), _input);
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = ComposeOne_Stage2_c2_c0(ComposeOne_Stage2_c1_c0(output_Stage1));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/55-17.shader_test b/shaders/skia/55-17.shader_test
new file mode 100644
index 0000000..53b193c
--- /dev/null
+++ b/shaders/skia/55-17.shader_test
@@ -0,0 +1,65 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 ucolor_Stage1_c1_c0_c0_c0;
+noperspective in vec4 vcolor_Stage0;
+vec4 BlurredEdgeFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ float factor = 1.0 - _input.w;
+ {
+ factor = exp((-factor * factor) * 4.0) - 0.017999999225139618;
+ }
+ _output = vec4(factor);
+ return _output;
+}
+vec4 ConstColorProcessor_Stage1_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage1_c1_c0_c0_c0;
+ }
+ return _output;
+}
+vec4 blend_modulate(vec4 src, vec4 dst) {
+ return src * dst;
+}
+vec4 ComposeOne_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_modulate(ConstColorProcessor_Stage1_c1_c0_c0_c0(vec4(1.0)), _input);
+ return _output;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ComposeOne_Stage1_c1_c0(BlurredEdgeFragmentProcessor_Stage1_c0_c0(outputColor_Stage0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 position;
+in vec4 inColor;
+noperspective out vec4 vcolor_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/55-2.shader_test b/shaders/skia/55-2.shader_test
new file mode 100644
index 0000000..eeff394
--- /dev/null
+++ b/shaders/skia/55-2.shader_test
@@ -0,0 +1,77 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uclamp_Stage1_c0_c0_c0_c0;
+uniform mat4 um_Stage2;
+uniform vec4 uv_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 inCoord = vTransformedCoords_0_Stage0;
+ vec2 subsetCoord;
+ subsetCoord.x = inCoord.x;
+ subsetCoord.y = inCoord.y;
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage1_c0_c0_c0_c0.x, uclamp_Stage1_c0_c0_c0_c0.z);
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage1_c0_c0_c0_c0.y, uclamp_Stage1_c0_c0_c0_c0.w);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ _output = _input * textureColor;
+ return _output;
+}
+vec4 YUVtoRGBEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 planes[1];
+ planes[0] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0));
+ vec4 color = vec4(planes[0].y, planes[0].z, planes[0].x, planes[0].w);
+ color.xyz *= color.w;
+ _output = color;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = YUVtoRGBEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ vec4 inputColor = output_Stage1;
+ {
+ float nonZeroAlpha = max(inputColor.w, 9.9999997473787516e-05);
+ inputColor = vec4(inputColor.xyz / nonZeroAlpha, inputColor.w);
+ }
+ output_Stage2 = um_Stage2 * inputColor + uv_Stage2;
+ {
+ output_Stage2 = clamp(output_Stage2, 0.0, 1.0);
+ }
+ {
+ output_Stage2.xyz *= output_Stage2.w;
+ }
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/55-20.shader_test b/shaders/skia/55-20.shader_test
new file mode 100644
index 0000000..bb30521
--- /dev/null
+++ b/shaders/skia/55-20.shader_test
@@ -0,0 +1,50 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uellipse_Stage1;
+flat in vec4 vcolor_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec2 d = gl_FragCoord.xy - uellipse_Stage1.xy;
+ vec2 Z = d * uellipse_Stage1.zw;
+ float implicit = dot(Z, d) - 1.0;
+ float grad_dot = 4.0 * dot(Z, Z);
+ {
+ grad_dot = max(grad_dot, 1.1754999560161448e-38);
+ }
+ float approx_dist = implicit * inversesqrt(grad_dot);
+ float alpha;
+ {
+ alpha = approx_dist > 0.0 ? 1.0 : 0.0;
+ }
+ output_Stage1 = vec4(alpha);
+ }
+ {
+ sk_FragColor = outputColor_Stage0 * output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 position;
+in vec4 color;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/55-21.shader_test b/shaders/skia/55-21.shader_test
new file mode 100644
index 0000000..e9c8b5d
--- /dev/null
+++ b/shaders/skia/55-21.shader_test
@@ -0,0 +1,82 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage2_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c1_c0;
+ }
+ return _output;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_src_over(ConstColorProcessor_Stage2_c1_c0(vec4(1.0)), output_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/55-22.shader_test b/shaders/skia/55-22.shader_test
new file mode 100644
index 0000000..178b715
--- /dev/null
+++ b/shaders/skia/55-22.shader_test
@@ -0,0 +1,41 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform float uPixelSize_Stage1;
+uniform vec2 uRange_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0;
+ coord.y -= 4.0 * uPixelSize_Stage1;
+ for (int i = 0;i < 9; i++) {
+ output_Stage1 = max(output_Stage1, texture(uTextureSampler_0_Stage1, coord));
+ coord.y += uPixelSize_Stage1;
+ }
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/55-23.shader_test b/shaders/skia/55-23.shader_test
new file mode 100644
index 0000000..9f13e73
--- /dev/null
+++ b/shaders/skia/55-23.shader_test
@@ -0,0 +1,135 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform float uSurfaceScale_Stage1;
+uniform vec3 uLightColor_Stage1;
+uniform float uKD_Stage1;
+uniform vec3 uLightDirection_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 light_Stage1(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ float colorScale = uKD_Stage1 * dot(normal, surfaceToLight);
+ return vec4(lightColor * clamp(colorScale, 0.0, 1.0), 1.0);
+}
+float sobel_Stage1(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage1(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage1(float m[9], float surfaceScale) {
+ return pointToNormal_Stage1(sobel_Stage1(m[0], m[2], m[3], m[5], 0.0, 0.0, 0.33333298563957214), sobel_Stage1(m[0], m[3], m[1], m[4], m[2], m[5], 0.5), surfaceScale);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ vec2 coord = vTransformedCoords_0_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp0 = textureColor;
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp1 = textureColor;
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp2 = textureColor;
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp3 = textureColor;
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp4 = textureColor;
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp5 = textureColor;
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp6 = textureColor;
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp7 = textureColor;
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp8 = textureColor;
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = uLightDirection_Stage1;
+ output_Stage1 = light_Stage1(normal_Stage1(m, uSurfaceScale_Stage1), surfaceToLight, uLightColor_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/55-24.shader_test b/shaders/skia/55-24.shader_test
new file mode 100644
index 0000000..a33a3c9
--- /dev/null
+++ b/shaders/skia/55-24.shader_test
@@ -0,0 +1,72 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec2 uDstTextureUpperLeft_Stage1;
+uniform vec2 uDstTextureCoordScale_Stage1;
+uniform sampler2D uTextureSampler_0_Stage0;
+uniform sampler2D uDstTextureSampler_Stage1;
+noperspective in vec2 vTextureCoords_Stage0;
+flat in int vTexIndex_Stage0;
+noperspective in vec4 vinColor_Stage0;
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 blend_darken(vec4 src, vec4 dst) {
+ vec4 result = blend_src_over(src, dst);
+ result.xyz = min(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
+ return result;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vinColor_Stage0;
+ vec4 texColor;
+ {
+ texColor = texture(uTextureSampler_0_Stage0, vTextureCoords_Stage0);
+ }
+ outputCoverage_Stage0 = texColor;
+ }
+ {
+ if (all(lessThanEqual(outputCoverage_Stage0.xyz, vec3(0.0)))) {
+ discard;
+ }
+ vec2 _dstTexCoord = (gl_FragCoord.xy - uDstTextureUpperLeft_Stage1) * uDstTextureCoordScale_Stage1;
+ _dstTexCoord.y = 1.0 - _dstTexCoord.y;
+ vec4 _dstColor = texture(uDstTextureSampler_Stage1, _dstTexCoord);
+ sk_FragColor = blend_darken(outputColor_Stage0, _dstColor);
+ float lerpRed = mix(_dstColor.w, sk_FragColor.w, outputCoverage_Stage0.x);
+ float lerpBlue = mix(_dstColor.w, sk_FragColor.w, outputCoverage_Stage0.y);
+ float lerpGreen = mix(_dstColor.w, sk_FragColor.w, outputCoverage_Stage0.z);
+ sk_FragColor = outputCoverage_Stage0 * sk_FragColor + (vec4(1.0) - outputCoverage_Stage0) * _dstColor;
+ sk_FragColor.w = max(max(lerpRed, lerpBlue), lerpGreen);
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform vec2 uAtlasSizeInv_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in uvec2 inTextureCoords;
+noperspective out vec2 vTextureCoords_Stage0;
+flat out int vTexIndex_Stage0;
+noperspective out vec4 vinColor_Stage0;
+void main() {
+ ivec2 signedCoords = ivec2(int(inTextureCoords.x), int(inTextureCoords.y));
+ vec2 unormTexCoords = vec2(float(signedCoords.x / 2), float(signedCoords.y / 2));
+ vTextureCoords_Stage0 = unormTexCoords * uAtlasSizeInv_Stage0;
+ vTexIndex_Stage0 = 0;
+ vinColor_Stage0 = inColor;
+ gl_Position = vec4(inPosition.x, inPosition.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/55-25.shader_test b/shaders/skia/55-25.shader_test
new file mode 100644
index 0000000..82aeca5
--- /dev/null
+++ b/shaders/skia/55-25.shader_test
@@ -0,0 +1,44 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform float uPixelSize_Stage1;
+uniform vec2 uRange_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0;
+ coord.y -= 5.0 * uPixelSize_Stage1;
+ float highBound = min(uRange_Stage1.y, coord.y + 10.0 * uPixelSize_Stage1);
+ coord.y = max(uRange_Stage1.x, coord.y);
+ for (int i = 0;i < 11; i++) {
+ output_Stage1 = max(output_Stage1, texture(uTextureSampler_0_Stage1, coord));
+ coord.y += uPixelSize_Stage1;
+ coord.y = min(highBound, coord.y);
+ }
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/55-30.shader_test b/shaders/skia/55-30.shader_test
new file mode 100644
index 0000000..0f05537
--- /dev/null
+++ b/shaders/skia/55-30.shader_test
@@ -0,0 +1,41 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform float uPixelSize_Stage1;
+uniform vec2 uRange_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = vec4(1.0, 1.0, 1.0, 1.0);
+ vec2 coord = vTransformedCoords_0_Stage0;
+ coord.x -= uPixelSize_Stage1;
+ for (int i = 0;i < 3; i++) {
+ output_Stage1 = min(output_Stage1, texture(uTextureSampler_0_Stage1, coord));
+ coord.x += uPixelSize_Stage1;
+ }
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/55-31.shader_test b/shaders/skia/55-31.shader_test
new file mode 100644
index 0000000..f618440
--- /dev/null
+++ b/shaders/skia/55-31.shader_test
@@ -0,0 +1,91 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uCoordTransformMatrix_2_Stage0;
+uniform vec4 uborder_Stage1;
+uniform vec4 usubset_Stage1;
+uniform vec4 unorm_Stage1;
+uniform vec4 uk_Stage2;
+uniform vec4 uborder_Stage2_c0_c0;
+uniform vec4 usubset_Stage2_c0_c0;
+uniform vec4 unorm_Stage2_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 TextureEffect_Stage2_c0_c0(vec4 _input, vec2 _coords) {
+ _coords = _coords * uCoordTransformMatrix_2_Stage0.xz + uCoordTransformMatrix_2_Stage0.yw;
+ vec4 _output;
+ vec2 inCoord = _coords;
+ inCoord *= unorm_Stage2_c0_c0.xy;
+ vec2 subsetCoord;
+ subsetCoord.x = inCoord.x;
+ subsetCoord.y = inCoord.y;
+ vec2 clampedCoord;
+ clampedCoord.x = subsetCoord.x;
+ clampedCoord.y = subsetCoord.y;
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord * unorm_Stage2_c0_c0.zw);
+ if (inCoord.x < usubset_Stage2_c0_c0.x || inCoord.x > usubset_Stage2_c0_c0.z) {
+ textureColor = uborder_Stage2_c0_c0;
+ }
+ if (inCoord.y < usubset_Stage2_c0_c0.y || inCoord.y > usubset_Stage2_c0_c0.w) {
+ textureColor = uborder_Stage2_c0_c0;
+ }
+ _output = _input * textureColor;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ vec2 inCoord = vTransformedCoords_0_Stage0;
+ inCoord *= unorm_Stage1.xy;
+ vec2 subsetCoord;
+ subsetCoord.x = inCoord.x;
+ subsetCoord.y = inCoord.y;
+ vec2 clampedCoord;
+ clampedCoord.x = subsetCoord.x;
+ clampedCoord.y = subsetCoord.y;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord * unorm_Stage1.zw);
+ if (inCoord.x < usubset_Stage1.x || inCoord.x > usubset_Stage1.z) {
+ textureColor = uborder_Stage1;
+ }
+ if (inCoord.y < usubset_Stage1.y || inCoord.y > usubset_Stage1.w) {
+ textureColor = uborder_Stage1;
+ }
+ output_Stage1 = textureColor;
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ vec4 dst = TextureEffect_Stage2_c0_c0(vec4(1.0), vTransformedCoords_1_Stage0);
+ output_Stage2 = clamp((((uk_Stage2.x * output_Stage2) * dst + uk_Stage2.y * output_Stage2) + uk_Stage2.z * dst) + uk_Stage2.w, 0.0, 1.0);
+ {
+ output_Stage2.xyz = min(output_Stage2.xyz, output_Stage2.w);
+ }
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/55-36.shader_test b/shaders/skia/55-36.shader_test
new file mode 100644
index 0000000..06d8d52
--- /dev/null
+++ b/shaders/skia/55-36.shader_test
@@ -0,0 +1,300 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform vec4 uKernel_Stage1[4];
+uniform vec2 uKernelOffset_Stage1;
+uniform float uGain_Stage1;
+uniform float uBias_Stage1;
+uniform vec4 uTexDom_Stage1;
+uniform vec3 uDecalParams_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ vec4 sum = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0 - uKernelOffset_Stage1 * uImageIncrement_Stage1;
+ vec4 c;
+ {
+ float k = uKernel_Stage1[0].x;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[0].y;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[0].z;
+ {
+ vec2 origCoord = coord + vec2(2.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[0].w;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[1].x;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[1].y;
+ {
+ vec2 origCoord = coord + vec2(2.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[1].z;
+ {
+ vec2 origCoord = coord + vec2(0.0, 2.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[1].w;
+ {
+ vec2 origCoord = coord + vec2(1.0, 2.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[2].x;
+ {
+ vec2 origCoord = coord + vec2(2.0, 2.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[2].y;
+ {
+ vec2 origCoord = coord + vec2(0.0, 3.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[2].z;
+ {
+ vec2 origCoord = coord + vec2(1.0, 3.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[2].w;
+ {
+ vec2 origCoord = coord + vec2(2.0, 3.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[3].x;
+ {
+ vec2 origCoord = coord + vec2(0.0, 4.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[3].y;
+ {
+ vec2 origCoord = coord + vec2(1.0, 4.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[3].z;
+ {
+ vec2 origCoord = coord + vec2(2.0, 4.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ output_Stage1 = sum * uGain_Stage1 + uBias_Stage1;
+ output_Stage1.w = clamp(output_Stage1.w, 0.0, 1.0);
+ output_Stage1.xyz = clamp(output_Stage1.xyz, 0.0, output_Stage1.w);
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/55-38.shader_test b/shaders/skia/55-38.shader_test
new file mode 100644
index 0000000..8297629
--- /dev/null
+++ b/shaders/skia/55-38.shader_test
@@ -0,0 +1,90 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_dst_in(outputColor_Stage0, ClampedGradientEffect_Stage1_c0_c0(vec4(1.0)));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_1_Stage0.x);
+ uint y = uint(vTransformedCoords_1_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ output_Stage2 = vec4(clamp(output_Stage2.xyz + value * 0.0039215688593685627, 0.0, output_Stage2.w), output_Stage2.w);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/55-39.shader_test b/shaders/skia/55-39.shader_test
new file mode 100644
index 0000000..0fcd6ae
--- /dev/null
+++ b/shaders/skia/55-39.shader_test
@@ -0,0 +1,113 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_0_Stage0;
+ float t = -1.0;
+ {
+ {
+ float invR1 = ufocalParams_Stage1_c0_c0_c0_c0.x;
+ float x_t = -1.0;
+ {
+ x_t = length(p) - p.x * invR1;
+ }
+ {
+ {
+ t = x_t;
+ }
+ }
+ {
+ t = 1.0 - t;
+ }
+ }
+ }
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/55-4.shader_test b/shaders/skia/55-4.shader_test
new file mode 100644
index 0000000..f73c62e
--- /dev/null
+++ b/shaders/skia/55-4.shader_test
@@ -0,0 +1,89 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform mat4 um_Stage2;
+uniform vec4 uv_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+uniform sampler2D uTextureSampler_2_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_1_Stage1, vTransformedCoords_1_Stage0) * _input;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c0_c0_c2_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_2_Stage1, vTransformedCoords_2_Stage0) * _input;
+ return _output;
+}
+vec4 YUVtoRGBEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 planes[3];
+ planes[0] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0));
+ planes[1] = TextureEffect_Stage1_c0_c0_c1_c0(vec4(1.0));
+ planes[2] = TextureEffect_Stage1_c0_c0_c2_c0(vec4(1.0));
+ vec4 color = vec4(planes[0].x, planes[1].x, planes[2].x, 1.0);
+ _output = color;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = YUVtoRGBEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ vec4 inputColor = output_Stage1;
+ {
+ float nonZeroAlpha = max(inputColor.w, 9.9999997473787516e-05);
+ inputColor = vec4(inputColor.xyz / nonZeroAlpha, inputColor.w);
+ }
+ output_Stage2 = um_Stage2 * inputColor + uv_Stage2;
+ {
+ output_Stage2 = clamp(output_Stage2, 0.0, 1.0);
+ }
+ {
+ output_Stage2.xyz *= output_Stage2.w;
+ }
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/55-40.shader_test b/shaders/skia/55-40.shader_test
new file mode 100644
index 0000000..0172582
--- /dev/null
+++ b/shaders/skia/55-40.shader_test
@@ -0,0 +1,128 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_0_Stage0;
+ float t = -1.0;
+ {
+ {
+ float invR1 = ufocalParams_Stage1_c0_c0_c0_c0.x;
+ float x_t = -1.0;
+ {
+ x_t = length(p) - p.x * invR1;
+ }
+ {
+ {
+ t = x_t;
+ }
+ }
+ {
+ t = 1.0 - t;
+ }
+ }
+ }
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TiledGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_1_Stage0.x);
+ uint y = uint(vTransformedCoords_1_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ output_Stage2 = vec4(clamp(output_Stage2.xyz + value * 0.0039215688593685627, 0.0, output_Stage2.w), output_Stage2.w);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/55-41.shader_test b/shaders/skia/55-41.shader_test
new file mode 100644
index 0000000..8b3ab7c
--- /dev/null
+++ b/shaders/skia/55-41.shader_test
@@ -0,0 +1,126 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_0_Stage0;
+ float t = -1.0;
+ {
+ {
+ float invR1 = ufocalParams_Stage1_c0_c0_c0_c0.x;
+ float x_t = -1.0;
+ {
+ x_t = length(p) - p.x * invR1;
+ }
+ {
+ {
+ t = x_t;
+ }
+ }
+ {
+ t = 1.0 - t;
+ }
+ }
+ }
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else {
+ {
+ t.x = fract(t.x);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TiledGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_1_Stage0.x);
+ uint y = uint(vTransformedCoords_1_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ output_Stage2 = vec4(clamp(output_Stage2.xyz + value * 0.0039215688593685627, 0.0, output_Stage2.w), output_Stage2.w);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/55-42.shader_test b/shaders/skia/55-42.shader_test
new file mode 100644
index 0000000..160c53b
--- /dev/null
+++ b/shaders/skia/55-42.shader_test
@@ -0,0 +1,129 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_0_Stage0;
+ float t = -1.0;
+ {
+ {
+ float invR1 = ufocalParams_Stage1_c0_c0_c0_c0.x;
+ float x_t = -1.0;
+ {
+ x_t = length(p) - p.x * invR1;
+ }
+ {
+ {
+ t = x_t;
+ }
+ }
+ {
+ t = 1.0 - t;
+ }
+ }
+ }
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_1_Stage0.x);
+ uint y = uint(vTransformedCoords_1_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ output_Stage2 = vec4(clamp(output_Stage2.xyz + value * 0.0039215688593685627, 0.0, output_Stage2.w), output_Stage2.w);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/55-43.shader_test b/shaders/skia/55-43.shader_test
new file mode 100644
index 0000000..4b7dcb6
--- /dev/null
+++ b/shaders/skia/55-43.shader_test
@@ -0,0 +1,72 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 TextureEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = TextureEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = OverrideInputFragmentProcessor_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 blend_darken(vec4 src, vec4 dst) {
+ vec4 result = blend_src_over(src, dst);
+ result.xyz = min(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
+ return result;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_darken(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec2 inLocalCoord;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 color = inColor;
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/55-46.shader_test b/shaders/skia/55-46.shader_test
new file mode 100644
index 0000000..5cb0fff
--- /dev/null
+++ b/shaders/skia/55-46.shader_test
@@ -0,0 +1,121 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 uleftBorderColor_Stage1_c1_c0_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c1_c0_c0_c0;
+uniform vec4 ustart_Stage1_c1_c0_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c1_c0_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = ClampedGradientEffect_Stage1_c0_c0_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ return _output;
+}
+vec4 LinearGradientLayout_Stage1_c1_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_1_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c1_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c1_c0_c0_c0_c1_c0 + t * uend_Stage1_c1_c0_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c1_c0_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c1_c0_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c1_c0_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c1_c0_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = ClampedGradientEffect_Stage1_c1_c0_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ return _output;
+}
+vec4 blend_src_atop(vec4 src, vec4 dst) {
+ return dst.w * src + (1.0 - src.w) * dst;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_src_atop(OverrideInputFragmentProcessor_Stage1_c0_c0(inputColor), OverrideInputFragmentProcessor_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/55-54.shader_test b/shaders/skia/55-54.shader_test
new file mode 100644
index 0000000..947aa41
--- /dev/null
+++ b/shaders/skia/55-54.shader_test
@@ -0,0 +1,48 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+noperspective in vec4 vQuadEdge_Stage0;
+noperspective in vec4 vinColor_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vinColor_Stage0;
+ float edgeAlpha;
+ vec2 duvdx = dFdx(vQuadEdge_Stage0.xy);
+ vec2 duvdy = -dFdy(vQuadEdge_Stage0.xy);
+ if (vQuadEdge_Stage0.z > 0.0 && vQuadEdge_Stage0.w > 0.0) {
+ edgeAlpha = min(min(vQuadEdge_Stage0.z, vQuadEdge_Stage0.w) + 0.5, 1.0);
+ } else {
+ vec2 gF = vec2((2.0 * vQuadEdge_Stage0.x) * duvdx.x - duvdx.y, (2.0 * vQuadEdge_Stage0.x) * duvdy.x - duvdy.y);
+ edgeAlpha = vQuadEdge_Stage0.x * vQuadEdge_Stage0.x - vQuadEdge_Stage0.y;
+ edgeAlpha = clamp(0.5 - edgeAlpha / length(gF), 0.0, 1.0);
+ }
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ {
+ sk_FragColor = (1.0 - outputColor_Stage0.w) * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 inPosition;
+in vec4 inColor;
+in vec4 inQuadEdge;
+noperspective out vec4 vQuadEdge_Stage0;
+noperspective out vec4 vinColor_Stage0;
+void main() {
+ vQuadEdge_Stage0 = inQuadEdge;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = inPosition;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/55-56.shader_test b/shaders/skia/55-56.shader_test
new file mode 100644
index 0000000..fbdea9c
--- /dev/null
+++ b/shaders/skia/55-56.shader_test
@@ -0,0 +1,83 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 ubaseFrequency_Stage2;
+uniform float uz_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+uniform sampler2D uTextureSampler_1_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec3 fade_Stage2(vec3 t) {
+ return ((t * t) * t) * (t * (t * 6.0 - 15.0) + 10.0);
+}
+float perm_Stage2(float x) {
+ return texture(uTextureSampler_0_Stage2, vec2(fract(x / 256.0), 0.0)).x * 255.0;
+}
+float grad_Stage2(float x, vec3 p) {
+ return dot(texture(uTextureSampler_1_Stage2, vec2(fract(x / 16.0), 0.0)).xyz * 255.0 - vec3(1.0), p);
+}
+float lerp_Stage2(float a, float b, float w) {
+ return a + w * (b - a);
+}
+float noise_Stage2(vec3 p) {
+ vec3 P = mod(floor(p), 256.0);
+ p -= floor(p);
+ vec3 f = fade_Stage2(p);
+ float A = perm_Stage2(P.x) + P.y;
+ float AA = perm_Stage2(A) + P.z;
+ float AB = perm_Stage2(A + 1.0) + P.z;
+ float B = perm_Stage2(P.x + 1.0) + P.y;
+ float BA = perm_Stage2(B) + P.z;
+ float BB = perm_Stage2(B + 1.0) + P.z;
+ float result = lerp_Stage2(lerp_Stage2(lerp_Stage2(grad_Stage2(perm_Stage2(AA), p), grad_Stage2(perm_Stage2(BA), p + vec3(-1.0, 0.0, 0.0)), f.x), lerp_Stage2(grad_Stage2(perm_Stage2(AB), p + vec3(0.0, -1.0, 0.0)), grad_Stage2(perm_Stage2(BB), p + vec3(-1.0, -1.0, 0.0)), f.x), f.y), lerp_Stage2(lerp_Stage2(grad_Stage2(perm_Stage2(AA + 1.0), p + vec3(0.0, 0.0, -1.0)), grad_Stage2(perm_Stage2(BA + 1.0), p + vec3(-1.0, 0.0, -1.0)), f.x), lerp_Stage2(grad_Stage2(perm_Stage2(AB + 1.0), p + vec3(0.0, -1.0, -1.0)), grad_Stage2(perm_Stage2(BB + 1.0), p + vec3(-1.0, -1.0, -1.0)), f.x), f.y), f.z);
+ return result;
+}
+float noiseOctaves_Stage2(vec3 p) {
+ float result = 0.0;
+ float ratio = 1.0;
+ for (float i = 0.0;i < 9.0; i++) {
+ result += noise_Stage2(p) / ratio;
+ p *= 2.0;
+ ratio *= 2.0;
+ }
+ return (result + 1.0) / 2.0;
+}
+void main() {
+ vec4 output_Stage2;
+ {
+ vec2 coords = vTransformedCoords_1_Stage0 * ubaseFrequency_Stage2;
+ float r = noiseOctaves_Stage2(vec3(coords, uz_Stage2));
+ float g = noiseOctaves_Stage2(vec3(coords, uz_Stage2));
+ float b = noiseOctaves_Stage2(vec3(coords, uz_Stage2));
+ float a = noiseOctaves_Stage2(vec3(coords, uz_Stage2));
+ output_Stage2 = vec4(r, g, b, a);
+ output_Stage2 = clamp(output_Stage2, 0.0, 1.0);
+ output_Stage2 = vec4(output_Stage2.xyz * output_Stage2.www, output_Stage2.w);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/55-57.shader_test b/shaders/skia/55-57.shader_test
new file mode 100644
index 0000000..476182c
--- /dev/null
+++ b/shaders/skia/55-57.shader_test
@@ -0,0 +1,86 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uCoordTransformMatrix_2_Stage0;
+uniform vec4 uclamp_Stage2_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 TextureEffect_Stage2_c0_c0(vec4 _input, vec2 _coords) {
+ _coords = _coords * uCoordTransformMatrix_2_Stage0.xz + uCoordTransformMatrix_2_Stage0.yw;
+ vec4 _output;
+ vec2 inCoord = _coords;
+ vec2 subsetCoord;
+ subsetCoord.x = inCoord.x;
+ subsetCoord.y = inCoord.y;
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage2_c0_c0.x, uclamp_Stage2_c0_c0.z);
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage2_c0_c0.y, uclamp_Stage2_c0_c0.w);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ _output = _input * textureColor;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ vec2 coord = vTransformedCoords_1_Stage0 - vec2(0.5);
+ vec2 f = fract(coord);
+ coord += 0.5 - f;
+ vec4 wx = mat4(0.055555555555555552, 0.88888888888888884, 0.055555555555555552, 0.0, -0.5, 0.0, 0.5, 0.0, 0.83333333333333337, -2.0, 1.5, -0.33333333333333331, -0.3888888888888889, 1.1666666666666667, -1.1666666666666667, 0.3888888888888889) * vec4(1.0, f.x, f.x * f.x, (f.x * f.x) * f.x);
+ vec4 wy = mat4(0.055555555555555552, 0.88888888888888884, 0.055555555555555552, 0.0, -0.5, 0.0, 0.5, 0.0, 0.83333333333333337, -2.0, 1.5, -0.33333333333333331, -0.3888888888888889, 1.1666666666666667, -1.1666666666666667, 0.3888888888888889) * vec4(1.0, f.y, f.y * f.y, (f.y * f.y) * f.y);
+ vec4 rowColors[4];
+ rowColors[0] = TextureEffect_Stage2_c0_c0(vec4(1.0), coord + vec2(-1.0, -1.0));
+ rowColors[1] = TextureEffect_Stage2_c0_c0(vec4(1.0), coord + vec2(0.0, -1.0));
+ rowColors[2] = TextureEffect_Stage2_c0_c0(vec4(1.0), coord + vec2(1.0, -1.0));
+ rowColors[3] = TextureEffect_Stage2_c0_c0(vec4(1.0), coord + vec2(2.0, -1.0));
+ vec4 s0 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ rowColors[0] = TextureEffect_Stage2_c0_c0(vec4(1.0), coord + vec2(-1.0, 0.0));
+ rowColors[1] = TextureEffect_Stage2_c0_c0(vec4(1.0), coord);
+ rowColors[2] = TextureEffect_Stage2_c0_c0(vec4(1.0), coord + vec2(1.0, 0.0));
+ rowColors[3] = TextureEffect_Stage2_c0_c0(vec4(1.0), coord + vec2(2.0, 0.0));
+ vec4 s1 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ rowColors[0] = TextureEffect_Stage2_c0_c0(vec4(1.0), coord + vec2(-1.0, 1.0));
+ rowColors[1] = TextureEffect_Stage2_c0_c0(vec4(1.0), coord + vec2(0.0, 1.0));
+ rowColors[2] = TextureEffect_Stage2_c0_c0(vec4(1.0), coord + vec2(1.0, 1.0));
+ rowColors[3] = TextureEffect_Stage2_c0_c0(vec4(1.0), coord + vec2(2.0, 1.0));
+ vec4 s2 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ rowColors[0] = TextureEffect_Stage2_c0_c0(vec4(1.0), coord + vec2(-1.0, 2.0));
+ rowColors[1] = TextureEffect_Stage2_c0_c0(vec4(1.0), coord + vec2(0.0, 2.0));
+ rowColors[2] = TextureEffect_Stage2_c0_c0(vec4(1.0), coord + vec2(1.0, 2.0));
+ rowColors[3] = TextureEffect_Stage2_c0_c0(vec4(1.0), coord + vec2(2.0, 2.0));
+ vec4 s3 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ vec4 bicubicColor = ((wy.x * s0 + wy.y * s1) + wy.z * s2) + wy.w * s3;
+ bicubicColor.xyz = max(vec3(0.0), min(bicubicColor.xyz, bicubicColor.www));
+ output_Stage2 = bicubicColor * output_Stage1;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/55-6.shader_test b/shaders/skia/55-6.shader_test
new file mode 100644
index 0000000..1a960e6
--- /dev/null
+++ b/shaders/skia/55-6.shader_test
@@ -0,0 +1,68 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 ucolor_Stage1_c0_c0_c0_c0;
+uniform vec4 ucolor_Stage2;
+noperspective in vec4 vcolor_Stage0;
+vec4 ConstColorProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = _input.w * ucolor_Stage1_c0_c0_c0_c0;
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = ConstColorProcessor_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 blend_src(vec4 src, vec4 dst) {
+ return src;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_src(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ {
+ output_Stage2 = output_Stage1 * ucolor_Stage2;
+ }
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 position;
+in vec4 inColor;
+noperspective out vec4 vcolor_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/55.shader_test b/shaders/skia/55.shader_test
new file mode 100644
index 0000000..6a03165
--- /dev/null
+++ b/shaders/skia/55.shader_test
@@ -0,0 +1,57 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 usubset_Stage1_c0_c0;
+uniform vec4 uclamp_Stage1_c0_c0;
+uniform sampler2DRect uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 inCoord = vTransformedCoords_0_Stage0;
+ vec2 subsetCoord;
+ {
+ float w = usubset_Stage1_c0_c0.z - usubset_Stage1_c0_c0.x;
+ float w2 = 2.0 * w;
+ float m = mod(inCoord.x - usubset_Stage1_c0_c0.x, w2);
+ subsetCoord.x = mix(m, w2 - m, step(w, m)) + usubset_Stage1_c0_c0.x;
+ }
+ subsetCoord.y = mod(inCoord.y - usubset_Stage1_c0_c0.y, usubset_Stage1_c0_c0.w - usubset_Stage1_c0_c0.y) + usubset_Stage1_c0_c0.y;
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage1_c0_c0.x, uclamp_Stage1_c0_c0.z);
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage1_c0_c0.y, uclamp_Stage1_c0_c0.w);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ _output = _input * textureColor;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TextureEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/550-3.shader_test b/shaders/skia/550-3.shader_test
new file mode 100644
index 0000000..dc1341f
--- /dev/null
+++ b/shaders/skia/550-3.shader_test
@@ -0,0 +1,118 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage2_c0_c0;
+uniform vec4 urightBorderColor_Stage2_c0_c0;
+uniform vec2 ufocalParams_Stage2_c0_c0_c0_c0;
+uniform vec4 uscale01_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias01_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale23_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias23_Stage2_c0_c0_c1_c0;
+uniform float uthreshold_Stage2_c0_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage2_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_1_Stage0;
+ float t = -1.0;
+ float v = 1.0;
+ {
+ {
+ float invR1 = ufocalParams_Stage2_c0_c0_c0_c0.x;
+ float x_t = -1.0;
+ {
+ float temp = p.x * p.x - p.y * p.y;
+ if (temp >= 0.0) {
+ {
+ x_t = sqrt(temp) - p.x * invR1;
+ }
+ }
+ }
+ {
+ if (x_t <= 0.0) {
+ v = -1.0;
+ }
+ }
+ {
+ {
+ t = x_t;
+ }
+ }
+ }
+ }
+ _output = vec4(t, v, 0.0, 0.0);
+ return _output;
+}
+vec4 DualIntervalGradientColorizer_Stage2_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthreshold_Stage2_c0_c0_c1_c0) {
+ scale = uscale01_Stage2_c0_c0_c1_c0;
+ bias = ubias01_Stage2_c0_c0_c1_c0;
+ } else {
+ scale = uscale23_Stage2_c0_c0_c1_c0;
+ bias = ubias23_Stage2_c0_c0_c1_c0;
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage2_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage2_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage2_c0_c0;
+ } else {
+ _output = DualIntervalGradientColorizer_Stage2_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_dst_in(output_Stage1, ClampedGradientEffect_Stage2_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/550-4.shader_test b/shaders/skia/550-4.shader_test
new file mode 100644
index 0000000..2b6e6cb
--- /dev/null
+++ b/shaders/skia/550-4.shader_test
@@ -0,0 +1,106 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 ubaseFrequency_Stage2_c0_c0;
+uniform float uz_Stage2_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+uniform sampler2D uTextureSampler_1_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec3 fade_Stage2_c0_c0(vec3 t) {
+ return ((t * t) * t) * (t * (t * 6.0 - 15.0) + 10.0);
+}
+float perm_Stage2_c0_c0(float x) {
+ return texture(uTextureSampler_0_Stage2, vec2(fract(x / 256.0), 0.0)).x * 255.0;
+}
+float grad_Stage2_c0_c0(float x, vec3 p) {
+ return dot(texture(uTextureSampler_1_Stage2, vec2(fract(x / 16.0), 0.0)).xyz * 255.0 - vec3(1.0), p);
+}
+float lerp_Stage2_c0_c0(float a, float b, float w) {
+ return a + w * (b - a);
+}
+float noise_Stage2_c0_c0(vec3 p) {
+ vec3 P = mod(floor(p), 256.0);
+ p -= floor(p);
+ vec3 f = fade_Stage2_c0_c0(p);
+ float A = perm_Stage2_c0_c0(P.x) + P.y;
+ float AA = perm_Stage2_c0_c0(A) + P.z;
+ float AB = perm_Stage2_c0_c0(A + 1.0) + P.z;
+ float B = perm_Stage2_c0_c0(P.x + 1.0) + P.y;
+ float BA = perm_Stage2_c0_c0(B) + P.z;
+ float BB = perm_Stage2_c0_c0(B + 1.0) + P.z;
+ float result = lerp_Stage2_c0_c0(lerp_Stage2_c0_c0(lerp_Stage2_c0_c0(grad_Stage2_c0_c0(perm_Stage2_c0_c0(AA), p), grad_Stage2_c0_c0(perm_Stage2_c0_c0(BA), p + vec3(-1.0, 0.0, 0.0)), f.x), lerp_Stage2_c0_c0(grad_Stage2_c0_c0(perm_Stage2_c0_c0(AB), p + vec3(0.0, -1.0, 0.0)), grad_Stage2_c0_c0(perm_Stage2_c0_c0(BB), p + vec3(-1.0, -1.0, 0.0)), f.x), f.y), lerp_Stage2_c0_c0(lerp_Stage2_c0_c0(grad_Stage2_c0_c0(perm_Stage2_c0_c0(AA + 1.0), p + vec3(0.0, 0.0, -1.0)), grad_Stage2_c0_c0(perm_Stage2_c0_c0(BA + 1.0), p + vec3(-1.0, 0.0, -1.0)), f.x), lerp_Stage2_c0_c0(grad_Stage2_c0_c0(perm_Stage2_c0_c0(AB + 1.0), p + vec3(0.0, -1.0, -1.0)), grad_Stage2_c0_c0(perm_Stage2_c0_c0(BB + 1.0), p + vec3(-1.0, -1.0, -1.0)), f.x), f.y), f.z);
+ return result;
+}
+float noiseOctaves_Stage2_c0_c0(vec3 p) {
+ float result = 0.0;
+ float ratio = 1.0;
+ for (float i = 0.0;i < 2.0; i++) {
+ result += noise_Stage2_c0_c0(p) / ratio;
+ p *= 2.0;
+ ratio *= 2.0;
+ }
+ return (result + 1.0) / 2.0;
+}
+vec4 ImprovedPerlinNoise_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coords = vTransformedCoords_1_Stage0 * ubaseFrequency_Stage2_c0_c0;
+ float r = noiseOctaves_Stage2_c0_c0(vec3(coords, uz_Stage2_c0_c0));
+ float g = noiseOctaves_Stage2_c0_c0(vec3(coords, uz_Stage2_c0_c0));
+ float b = noiseOctaves_Stage2_c0_c0(vec3(coords, uz_Stage2_c0_c0));
+ float a = noiseOctaves_Stage2_c0_c0(vec3(coords, uz_Stage2_c0_c0));
+ _output = vec4(r, g, b, a);
+ _output = clamp(_output, 0.0, 1.0);
+ _output = vec4(_output.xyz * _output.www, _output.w);
+ return _output;
+}
+float _blend_overlay_component(float sc, float sa, float dc, float da) {
+ if (2.0 * dc <= da) {
+ return (2.0 * sc) * dc;
+ }
+ return sa * da - (2.0 * (da - dc)) * (sa - sc);
+}
+vec4 blend_overlay(vec4 src, vec4 dst) {
+ vec4 result = vec4(_blend_overlay_component(src.x, src.w, dst.x, dst.w), _blend_overlay_component(src.y, src.w, dst.y, dst.w), _blend_overlay_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+ result.xyz += dst.xyz * (1.0 - src.w) + src.xyz * (1.0 - dst.w);
+ return result;
+}
+vec4 blend_hard_light(vec4 src, vec4 dst) {
+ return blend_overlay(dst, src);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_hard_light(ImprovedPerlinNoise_Stage2_c0_c0(vec4(1.0)), output_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/550.shader_test b/shaders/skia/550.shader_test
new file mode 100644
index 0000000..7ae94a5
--- /dev/null
+++ b/shaders/skia/550.shader_test
@@ -0,0 +1,165 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage2;
+uniform vec4 ucolor_Stage3_c1_c0;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.w) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ } else {
+ {
+ if (t < uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+vec4 ComposeOne_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_dst_in(_input, TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0)));
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = ComposeOne_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 ConstColorProcessor_Stage3_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage3_c1_c0;
+ }
+ return _output;
+}
+vec4 blend_difference(vec4 src, vec4 dst) {
+ return vec4((src.xyz + dst.xyz) - 2.0 * min(src.xyz * dst.w, dst.xyz * src.w), src.w + (1.0 - src.w) * dst.w);
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 blend_darken(vec4 src, vec4 dst) {
+ vec4 result = blend_src_over(src, dst);
+ result.xyz = min(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
+ return result;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_difference(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ {
+ output_Stage2 = output_Stage1 * ucolor_Stage2;
+ }
+ }
+ vec4 output_Stage3;
+ {
+ output_Stage3 = blend_darken(ConstColorProcessor_Stage3_c1_c0(vec4(1.0)), output_Stage2);
+ }
+ {
+ sk_FragColor = output_Stage3;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 inColor;
+in vec2 inLocalCoord;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/553-2.shader_test b/shaders/skia/553-2.shader_test
new file mode 100644
index 0000000..8874288
--- /dev/null
+++ b/shaders/skia/553-2.shader_test
@@ -0,0 +1,28 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+noperspective in vec4 vcolor_Stage0;
+void main() {
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 position;
+in vec4 inColor;
+noperspective out vec4 vcolor_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/553-3.shader_test b/shaders/skia/553-3.shader_test
new file mode 100644
index 0000000..4f1b8a6
--- /dev/null
+++ b/shaders/skia/553-3.shader_test
@@ -0,0 +1,101 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage2_c0_c0;
+uniform vec4 urightBorderColor_Stage2_c0_c0;
+uniform vec2 ufocalParams_Stage2_c0_c0_c0_c0;
+uniform vec4 ustart_Stage2_c0_c0_c1_c0;
+uniform vec4 uend_Stage2_c0_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage2_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_1_Stage0;
+ float t = -1.0;
+ float v = 1.0;
+ {
+ {
+ float x_t = -1.0;
+ {
+ x_t = dot(p, p) / p.x;
+ }
+ {
+ if (x_t <= 0.0) {
+ v = -1.0;
+ }
+ }
+ {
+ {
+ t = x_t;
+ }
+ }
+ }
+ }
+ _output = vec4(t, v, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage2_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage2_c0_c0_c1_c0 + t * uend_Stage2_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage2_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage2_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage2_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage2_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_dst_in(output_Stage1, ClampedGradientEffect_Stage2_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/553-4.shader_test b/shaders/skia/553-4.shader_test
new file mode 100644
index 0000000..0605813
--- /dev/null
+++ b/shaders/skia/553-4.shader_test
@@ -0,0 +1,261 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage2_c0_c0;
+uniform float uSurfaceScale_Stage2_c0_c0;
+uniform vec3 uLightColor_Stage2_c0_c0;
+uniform float uKS_Stage2_c0_c0;
+uniform float uShininess_Stage2_c0_c0;
+uniform vec4 uTexDom_Stage2_c0_c0;
+uniform vec3 uDecalParams_Stage2_c0_c0;
+uniform vec3 uLightLocation_Stage2_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 light_Stage2_c0_c0(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ vec3 halfDir = normalize(surfaceToLight + vec3(0.0, 0.0, 1.0));
+ float colorScale = uKS_Stage2_c0_c0 * pow(dot(normal, halfDir), uShininess_Stage2_c0_c0);
+ vec3 color = lightColor * clamp(colorScale, 0.0, 1.0);
+ return vec4(color, max(max(color.x, color.y), color.z));
+}
+float sobel_Stage2_c0_c0(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage2_c0_c0(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage2_c0_c0(float m[9], float surfaceScale) {
+ return pointToNormal_Stage2_c0_c0(sobel_Stage2_c0_c0(0.0, 0.0, m[3], m[5], m[6], m[8], 0.33333298563957214), sobel_Stage2_c0_c0(0.0, 0.0, m[4], m[7], m[5], m[8], 0.5), surfaceScale);
+}
+vec4 SpecularLighting_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coord = vTransformedCoords_1_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c0_c0.y);
+ if (err > uDecalParams_Stage2_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp0 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c0_c0.y);
+ if (err > uDecalParams_Stage2_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c0_c0.y);
+ if (err > uDecalParams_Stage2_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c0_c0.y);
+ if (err > uDecalParams_Stage2_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c0_c0.y);
+ if (err > uDecalParams_Stage2_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c0_c0.y);
+ if (err > uDecalParams_Stage2_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp5 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c0_c0.y);
+ if (err > uDecalParams_Stage2_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp6 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c0_c0.y);
+ if (err > uDecalParams_Stage2_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp7 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c0_c0.y);
+ if (err > uDecalParams_Stage2_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp8 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = normalize(uLightLocation_Stage2_c0_c0 - vec3(gl_FragCoord.xy, uSurfaceScale_Stage2_c0_c0 * m[4]));
+ _output = light_Stage2_c0_c0(normal_Stage2_c0_c0(m, uSurfaceScale_Stage2_c0_c0), surfaceToLight, uLightColor_Stage2_c0_c0);
+ _output *= _input;
+ return _output;
+}
+float _blend_color_saturation(vec3 color) {
+ return max(max(color.x, color.y), color.z) - min(min(color.x, color.y), color.z);
+}
+vec3 _blend_set_color_saturation_helper(vec3 minMidMax, float sat) {
+ if (minMidMax.x < minMidMax.z) {
+ return vec3(0.0, (sat * (minMidMax.y - minMidMax.x)) / (minMidMax.z - minMidMax.x), sat);
+ }
+ return vec3(0.0);
+}
+vec3 _blend_set_color_saturation(vec3 hueLumColor, vec3 satColor) {
+ float sat = _blend_color_saturation(satColor);
+ if (hueLumColor.x <= hueLumColor.y) {
+ if (hueLumColor.y <= hueLumColor.z) {
+ hueLumColor.xyz = _blend_set_color_saturation_helper(hueLumColor, sat);
+ } else if (hueLumColor.x <= hueLumColor.z) {
+ hueLumColor.xzy = _blend_set_color_saturation_helper(hueLumColor.xzy, sat);
+ } else {
+ hueLumColor.zxy = _blend_set_color_saturation_helper(hueLumColor.zxy, sat);
+ }
+ } else if (hueLumColor.x <= hueLumColor.z) {
+ hueLumColor.yxz = _blend_set_color_saturation_helper(hueLumColor.yxz, sat);
+ } else if (hueLumColor.y <= hueLumColor.z) {
+ hueLumColor.yzx = _blend_set_color_saturation_helper(hueLumColor.yzx, sat);
+ } else {
+ hueLumColor.zyx = _blend_set_color_saturation_helper(hueLumColor.zyx, sat);
+ }
+ return hueLumColor;
+}
+float _blend_color_luminance(vec3 color) {
+ return dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), color);
+}
+vec3 _blend_set_color_luminance(vec3 hueSatColor, float alpha, vec3 lumColor) {
+ float lum = _blend_color_luminance(lumColor);
+ vec3 result = (lum - _blend_color_luminance(hueSatColor)) + hueSatColor;
+ float minComp = min(min(result.x, result.y), result.z);
+ float maxComp = max(max(result.x, result.y), result.z);
+ if (minComp < 0.0 && lum != minComp) {
+ result = lum + ((result - lum) * lum) / (lum - minComp);
+ }
+ if (maxComp > alpha && maxComp != lum) {
+ return lum + ((result - lum) * (alpha - lum)) / (maxComp - lum);
+ }
+ return result;
+}
+vec4 blend_hue(vec4 src, vec4 dst) {
+ float alpha = dst.w * src.w;
+ vec3 sda = src.xyz * dst.w;
+ vec3 dsa = dst.xyz * src.w;
+ return vec4((((_blend_set_color_luminance(_blend_set_color_saturation(sda, dsa), alpha, dsa) + dst.xyz) - dsa) + src.xyz) - sda, (src.w + dst.w) - alpha);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_hue(SpecularLighting_Stage2_c0_c0(vec4(1.0)), output_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/553.shader_test b/shaders/skia/553.shader_test
new file mode 100644
index 0000000..c8cc801
--- /dev/null
+++ b/shaders/skia/553.shader_test
@@ -0,0 +1,88 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 ucolor_Stage1_c0_c0_c0_c0;
+uniform vec4 ucolor_Stage2;
+uniform vec4 ucolor_Stage3_c1_c0;
+noperspective in vec4 vcolor_Stage0;
+vec4 ConstColorProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = _input.w * ucolor_Stage1_c0_c0_c0_c0;
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = ConstColorProcessor_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 ConstColorProcessor_Stage3_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage3_c1_c0;
+ }
+ return _output;
+}
+vec4 blend_difference(vec4 src, vec4 dst) {
+ return vec4((src.xyz + dst.xyz) - 2.0 * min(src.xyz * dst.w, dst.xyz * src.w), src.w + (1.0 - src.w) * dst.w);
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 blend_darken(vec4 src, vec4 dst) {
+ vec4 result = blend_src_over(src, dst);
+ result.xyz = min(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
+ return result;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_difference(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ {
+ output_Stage2 = output_Stage1 * ucolor_Stage2;
+ }
+ }
+ vec4 output_Stage3;
+ {
+ output_Stage3 = blend_darken(ConstColorProcessor_Stage3_c1_c0(vec4(1.0)), output_Stage2);
+ }
+ {
+ sk_FragColor = output_Stage3;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 position;
+in vec4 inColor;
+noperspective out vec4 vcolor_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/556-2.shader_test b/shaders/skia/556-2.shader_test
new file mode 100644
index 0000000..5b3e8e6
--- /dev/null
+++ b/shaders/skia/556-2.shader_test
@@ -0,0 +1,154 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+uniform vec4 uColor_Stage0;
+uniform float uinnerThreshold_Stage1_c0_c0;
+uniform float uouterThreshold_Stage1_c0_c0;
+uniform vec3 uedges_Stage1_c1_c0[1];
+uniform vec4 uboundsUniform_Stage2;
+uniform float uxInvZoom_Stage2;
+uniform float uyInvZoom_Stage2;
+uniform float uxInvInset_Stage2;
+uniform float uyInvInset_Stage2;
+uniform vec2 uoffset_Stage2;
+uniform vec4 urectUniform_Stage3_c2_c0;
+uniform vec4 uinnerRect_Stage4;
+uniform vec4 uinvRadiiLTRB_Stage4;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+in vec2 vTransformedCoords_0_Stage0;
+in vec2 vTransformedCoords_1_Stage0;
+vec4 AlphaThresholdFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 color = _input;
+ vec4 mask_color = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ if (mask_color.w < 0.5) {
+ if (color.w > uouterThreshold_Stage1_c0_c0) {
+ float scale = uouterThreshold_Stage1_c0_c0 / color.w;
+ color.xyz *= scale;
+ color.w = uouterThreshold_Stage1_c0_c0;
+ }
+ } else if (color.w < uinnerThreshold_Stage1_c0_c0) {
+ float scale = uinnerThreshold_Stage1_c0_c0 / max(0.0010000000474974513, color.w);
+ color.xyz *= scale;
+ color.w = uinnerThreshold_Stage1_c0_c0;
+ }
+ _output = color;
+ return _output;
+}
+vec4 ConvexPoly_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ float alpha = 1.0;
+ float edge;
+ edge = dot(uedges_Stage1_c1_c0[0], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ alpha = 1.0 - alpha;
+ _output = _input * alpha;
+ return _output;
+}
+vec4 AARectEffect_Stage3_c2_c0(vec4 _input) {
+ vec4 _output;
+ float alpha;
+ {
+ alpha = float(all(greaterThan(vec4(gl_FragCoord.xy, urectUniform_Stage3_c2_c0.zw), vec4(urectUniform_Stage3_c2_c0.xy, gl_FragCoord.xy))) ? 1 : 0);
+ }
+ {
+ alpha = 1.0 - alpha;
+ }
+ _output = _input * alpha;
+ return _output;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+float _guarded_divide(float n, float d) {
+ return n / d;
+}
+float _color_burn_component(float sc, float sa, float dc, float da) {
+ if (da == dc) {
+ return (sa * da + sc * (1.0 - da)) + dc * (1.0 - sa);
+ } else if (sc == 0.0) {
+ return dc * (1.0 - sa);
+ }
+ float d = max(0.0, da - _guarded_divide((da - dc) * sa, sc));
+ return (d * sa + sc * (1.0 - da)) + dc * (1.0 - sa);
+}
+vec4 blend_color_burn(vec4 src, vec4 dst) {
+ return vec4(_color_burn_component(src.x, src.w, dst.x, dst.w), _color_burn_component(src.y, src.w, dst.y, dst.w), _color_burn_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+}
+void main() {
+ {
+ vec4 inputColor = vec4(vec4(1.0).xyz, 1.0);
+ blend_src_over(AlphaThresholdFragmentProcessor_Stage1_c0_c0(inputColor), ConvexPoly_Stage1_c1_c0(inputColor));
+ }
+ vec4 output_Stage2;
+ {
+ vec2 coord = vTransformedCoords_1_Stage0;
+ vec2 zoom_coord = uoffset_Stage2 + coord * vec2(uxInvZoom_Stage2, uyInvZoom_Stage2);
+ vec2 delta = (coord - uboundsUniform_Stage2.xy) * uboundsUniform_Stage2.zw;
+ delta = min(delta, vec2(1.0, 1.0) - delta);
+ delta *= vec2(uxInvInset_Stage2, uyInvInset_Stage2);
+ float weight = 0.0;
+ if (delta.x < 2.0 && delta.y < 2.0) {
+ delta = vec2(2.0, 2.0) - delta;
+ float dist = length(delta);
+ dist = max(2.0 - dist, 0.0);
+ weight = min(dist * dist, 1.0);
+ } else {
+ vec2 delta_squared = delta * delta;
+ weight = min(min(delta_squared.x, delta_squared.y), 1.0);
+ }
+ output_Stage2 = texture(uTextureSampler_0_Stage2, mix(coord, zoom_coord, weight));
+ }
+ vec4 output_Stage3;
+ {
+ output_Stage3 = blend_color_burn(output_Stage2, AARectEffect_Stage3_c2_c0(vec4(1.0)));
+ }
+ vec4 output_Stage4;
+ {
+ vec2 dxy0 = uinnerRect_Stage4.xy - gl_FragCoord.xy;
+ vec2 dxy1 = gl_FragCoord.xy - uinnerRect_Stage4.zw;
+ vec2 dxy = max(max(dxy0, dxy1), 0.0);
+ vec2 Z = max(max(dxy0 * uinvRadiiLTRB_Stage4.xy, dxy1 * uinvRadiiLTRB_Stage4.zw), 0.0);
+ float implicit = dot(Z, dxy) - 1.0;
+ float grad_dot = 4.0 * dot(Z, Z);
+ grad_dot = max(grad_dot, 9.9999997473787516e-05);
+ float approx_dist = implicit * inversesqrt(grad_dot);
+ float alpha = clamp(0.5 + approx_dist, 0.0, 1.0);
+ output_Stage4 = output_Stage3 * alpha;
+ }
+ vec4 output_Stage5;
+ {
+ output_Stage5 = floor(output_Stage4 * 255.0 + 0.5) / 255.0;
+ {
+ output_Stage5.xyz = output_Stage5.w <= 0.0 ? vec3(0.0) : floor((output_Stage5.xyz / output_Stage5.w) * 255.0 + 0.5) / 255.0;
+ }
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 inLocalCoord;
+out vec2 vTransformedCoords_0_Stage0;
+out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vec3 pos3 = uViewM_Stage0 * vec3(position, 1.0);
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos3.x, pos3.y, 0.0, pos3.z);
+ gl_PointSize = 1.0;
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/556-3.shader_test b/shaders/skia/556-3.shader_test
new file mode 100644
index 0000000..52f1477
--- /dev/null
+++ b/shaders/skia/556-3.shader_test
@@ -0,0 +1,100 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 ufocalParams_Stage2_c0_c0_c0_c0;
+uniform vec4 uscale01_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias01_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale23_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias23_Stage2_c0_c0_c1_c0;
+uniform float uthreshold_Stage2_c0_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage2_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_1_Stage0;
+ float t = -1.0;
+ {
+ {
+ float r0 = ufocalParams_Stage2_c0_c0_c0_c0.x;
+ {
+ t = length(p) - r0;
+ }
+ }
+ }
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 DualIntervalGradientColorizer_Stage2_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthreshold_Stage2_c0_c0_c1_c0) {
+ scale = uscale01_Stage2_c0_c0_c1_c0;
+ bias = ubias01_Stage2_c0_c0_c1_c0;
+ } else {
+ scale = uscale23_Stage2_c0_c0_c1_c0;
+ bias = ubias23_Stage2_c0_c0_c1_c0;
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage2_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = DualIntervalGradientColorizer_Stage2_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_dst_in(output_Stage1, TiledGradientEffect_Stage2_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/556-4.shader_test b/shaders/skia/556-4.shader_test
new file mode 100644
index 0000000..42e5740
--- /dev/null
+++ b/shaders/skia/556-4.shader_test
@@ -0,0 +1,92 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uScale_Stage2_c0_c0;
+uniform vec4 uTexDom_Stage2_c0_c0;
+uniform vec3 uDecalParams_Stage2_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+uniform sampler2D uTextureSampler_1_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+vec4 DisplacementMap_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 dColor = texture(uTextureSampler_0_Stage2, vTransformedCoords_1_Stage0);
+ dColor.xyz = dColor.w < 9.9999999747524271e-07 ? vec3(0.0) : clamp(dColor.xyz / dColor.w, 0.0, 1.0);
+ vec2 cCoords = vTransformedCoords_2_Stage0 + uScale_Stage2_c0_c0 * (dColor.zw - vec2(0.5));
+ {
+ vec2 origCoord = cCoords;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c0_c0.y);
+ if (err > uDecalParams_Stage2_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ _output = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ return _output;
+}
+float _blend_color_luminance(vec3 color) {
+ return dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), color);
+}
+vec3 _blend_set_color_luminance(vec3 hueSatColor, float alpha, vec3 lumColor) {
+ float lum = _blend_color_luminance(lumColor);
+ vec3 result = (lum - _blend_color_luminance(hueSatColor)) + hueSatColor;
+ float minComp = min(min(result.x, result.y), result.z);
+ float maxComp = max(max(result.x, result.y), result.z);
+ if (minComp < 0.0 && lum != minComp) {
+ result = lum + ((result - lum) * lum) / (lum - minComp);
+ }
+ if (maxComp > alpha && maxComp != lum) {
+ return lum + ((result - lum) * (alpha - lum)) / (maxComp - lum);
+ }
+ return result;
+}
+vec4 blend_color(vec4 src, vec4 dst) {
+ float alpha = dst.w * src.w;
+ vec3 sda = src.xyz * dst.w;
+ vec3 dsa = dst.xyz * src.w;
+ return vec4((((_blend_set_color_luminance(sda, alpha, dsa) + dst.xyz) - dsa) + src.xyz) - sda, (src.w + dst.w) - alpha);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_color(output_Stage1, DisplacementMap_Stage2_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/556.shader_test b/shaders/skia/556.shader_test
new file mode 100644
index 0000000..008354a
--- /dev/null
+++ b/shaders/skia/556.shader_test
@@ -0,0 +1,132 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.w) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ } else {
+ {
+ if (t < uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = OverrideInputFragmentProcessor_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 blend_exclusion(vec4 src, vec4 dst) {
+ return vec4((dst.xyz + src.xyz) - (2.0 * dst.xyz) * src.xyz, src.w + (1.0 - src.w) * dst.w);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_exclusion(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 inColor;
+in vec2 inLocalCoord;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/559-2.shader_test b/shaders/skia/559-2.shader_test
new file mode 100644
index 0000000..ef75c27
--- /dev/null
+++ b/shaders/skia/559-2.shader_test
@@ -0,0 +1,98 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform float ubias_Stage1_c0_c0_c0_c0;
+uniform float uscale_Stage1_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 SweepGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float angle;
+ {
+ angle = atan(-vTransformedCoords_0_Stage0.y, -vTransformedCoords_0_Stage0.x);
+ }
+ float t = ((angle * 0.15915493667125702 + 0.5) + ubias_Stage1_c0_c0_c0_c0) * uscale_Stage1_c0_c0_c0_c0;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = SweepGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ {
+ blend_dst_in(vec4(1.0), ClampedGradientEffect_Stage1_c0_c0(vec4(1.0)));
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 color = inColor;
+ vcolor_Stage0 = color;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/559-3.shader_test b/shaders/skia/559-3.shader_test
new file mode 100644
index 0000000..3a9bd11
--- /dev/null
+++ b/shaders/skia/559-3.shader_test
@@ -0,0 +1,121 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 ufocalParams_Stage2_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage2_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage2_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage2_c0_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage2_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_1_Stage0;
+ float t = -1.0;
+ float v = 1.0;
+ {
+ {
+ float r0_2 = ufocalParams_Stage2_c0_c0_c0_c0.y;
+ t = r0_2 - p.y * p.y;
+ if (t >= 0.0) {
+ t = p.x + sqrt(t);
+ } else {
+ v = -1.0;
+ }
+ }
+ }
+ _output = vec4(t, v, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage2_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage2_c0_c0_c1_c0;
+ bias = ubias0_1_Stage2_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage2_c0_c0_c1_c0;
+ bias = ubias2_3_Stage2_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage2_c0_c0_c1_c0;
+ bias = ubias4_5_Stage2_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage2_c0_c0_c1_c0;
+ bias = ubias6_7_Stage2_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage2_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage2_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_dst_in(output_Stage1, TiledGradientEffect_Stage2_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/559-4.shader_test b/shaders/skia/559-4.shader_test
new file mode 100644
index 0000000..4d2efdd
--- /dev/null
+++ b/shaders/skia/559-4.shader_test
@@ -0,0 +1,209 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage2_c0_c0;
+uniform float uSurfaceScale_Stage2_c0_c0;
+uniform vec3 uLightColor_Stage2_c0_c0;
+uniform float uKD_Stage2_c0_c0;
+uniform vec4 uTexDom_Stage2_c0_c0;
+uniform vec3 uDecalParams_Stage2_c0_c0;
+uniform vec3 uLightDirection_Stage2_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 light_Stage2_c0_c0(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ float colorScale = uKD_Stage2_c0_c0 * dot(normal, surfaceToLight);
+ return vec4(lightColor * clamp(colorScale, 0.0, 1.0), 1.0);
+}
+float sobel_Stage2_c0_c0(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage2_c0_c0(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage2_c0_c0(float m[9], float surfaceScale) {
+ return pointToNormal_Stage2_c0_c0(sobel_Stage2_c0_c0(m[0], m[2], m[3], m[5], 0.0, 0.0, 0.33333298563957214), sobel_Stage2_c0_c0(m[0], m[3], m[1], m[4], m[2], m[5], 0.5), surfaceScale);
+}
+vec4 DiffuseLighting_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coord = vTransformedCoords_1_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c0_c0.y);
+ if (err > uDecalParams_Stage2_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp0 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c0_c0.y);
+ if (err > uDecalParams_Stage2_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c0_c0.y);
+ if (err > uDecalParams_Stage2_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c0_c0.y);
+ if (err > uDecalParams_Stage2_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c0_c0.y);
+ if (err > uDecalParams_Stage2_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c0_c0.y);
+ if (err > uDecalParams_Stage2_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp5 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c0_c0.y);
+ if (err > uDecalParams_Stage2_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp6 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c0_c0.y);
+ if (err > uDecalParams_Stage2_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp7 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c0_c0.y);
+ if (err > uDecalParams_Stage2_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp8 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = uLightDirection_Stage2_c0_c0;
+ _output = light_Stage2_c0_c0(normal_Stage2_c0_c0(m, uSurfaceScale_Stage2_c0_c0), surfaceToLight, uLightColor_Stage2_c0_c0);
+ _output *= _input;
+ return _output;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_src_over(DiffuseLighting_Stage2_c0_c0(vec4(1.0)), output_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/559.shader_test b/shaders/skia/559.shader_test
new file mode 100644
index 0000000..123bf5e
--- /dev/null
+++ b/shaders/skia/559.shader_test
@@ -0,0 +1,61 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 ucolor_Stage1_c0_c0_c0_c0;
+noperspective in vec4 vcolor_Stage0;
+vec4 ConstColorProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = _input.w * ucolor_Stage1_c0_c0_c0_c0;
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = ConstColorProcessor_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 blend_exclusion(vec4 src, vec4 dst) {
+ return vec4((dst.xyz + src.xyz) - (2.0 * dst.xyz) * src.xyz, src.w + (1.0 - src.w) * dst.w);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_exclusion(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 position;
+in vec4 inColor;
+noperspective out vec4 vcolor_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/562-2.shader_test b/shaders/skia/562-2.shader_test
new file mode 100644
index 0000000..47a61b1
--- /dev/null
+++ b/shaders/skia/562-2.shader_test
@@ -0,0 +1,409 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform mat4 um_Stage1_c0_c0_c0_c0_c0_c0;
+uniform vec4 uv_Stage1_c0_c0_c0_c0_c0_c0;
+uniform vec4 ucircleData_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 ucolor0_Stage1_c0_c0_c1_c0_c0_c0;
+uniform vec4 ucolor1_Stage1_c0_c0_c1_c0_c0_c0;
+uniform vec4 ucolor2_Stage1_c0_c0_c1_c0_c0_c0;
+uniform vec4 ucolor3_Stage1_c0_c0_c1_c0_c0_c0;
+uniform vec4 ucolor4_Stage1_c0_c0_c1_c0_c0_c0;
+uniform vec4 ucolor5_Stage1_c0_c0_c1_c0_c0_c0;
+uniform vec4 uinnerRect_Stage1_c0_c0_c1_c0_c1_c0;
+uniform vec2 uradiusPlusHalf_Stage1_c0_c0_c1_c0_c1_c0;
+uniform vec4 urectUniform_Stage1_c1_c0_c0_c0;
+uniform vec2 uImageIncrement_Stage1_c1_c0_c1_c0_c1_c0;
+uniform float uSurfaceScale_Stage1_c1_c0_c1_c0_c1_c0;
+uniform vec3 uLightColor_Stage1_c1_c0_c1_c0_c1_c0;
+uniform float uKD_Stage1_c1_c0_c1_c0_c1_c0;
+uniform vec4 uTexDom_Stage1_c1_c0_c1_c0_c1_c0;
+uniform vec3 uDecalParams_Stage1_c1_c0_c1_c0_c1_c0;
+uniform vec3 uLightDirection_Stage1_c1_c0_c1_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+uniform sampler2D uTextureSampler_2_Stage1;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec3 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+noperspective in float vinCoverage_Stage0;
+vec4 ColorMatrixFragmentProcessor_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = _input;
+ {
+ float nonZeroAlpha = max(inputColor.w, 9.9999997473787516e-05);
+ inputColor = vec4(inputColor.xyz / nonZeroAlpha, inputColor.w);
+ }
+ _output = um_Stage1_c0_c0_c0_c0_c0_c0 * inputColor + uv_Stage1_c0_c0_c0_c0_c0_c0;
+ {
+ _output.w = clamp(_output.w, 0.0, 1.0);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 CircleBlurFragmentProcessor_Stage1_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 vec = vec2((gl_FragCoord.x - ucircleData_Stage1_c0_c0_c0_c0_c1_c0.x) * ucircleData_Stage1_c0_c0_c0_c0_c1_c0.w, (gl_FragCoord.y - ucircleData_Stage1_c0_c0_c0_c0_c1_c0.y) * ucircleData_Stage1_c0_c0_c0_c0_c1_c0.w);
+ float dist = length(vec) + (0.5 - ucircleData_Stage1_c0_c0_c0_c0_c1_c0.z) * ucircleData_Stage1_c0_c0_c0_c0_c1_c0.w;
+ _output = _input * texture(uTextureSampler_0_Stage1, vec2(dist, 0.5)).w;
+ return _output;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 ComposeTwo_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_src_over(ColorMatrixFragmentProcessor_Stage1_c0_c0_c0_c0_c0_c0(inputColor), CircleBlurFragmentProcessor_Stage1_c0_c0_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 Overdraw_Stage1_c0_c0_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = _input;
+ float alpha = 255.0 * _output.w;
+ if (alpha < 0.5) {
+ _output = ucolor0_Stage1_c0_c0_c1_c0_c0_c0;
+ } else if (alpha < 1.5) {
+ _output = ucolor1_Stage1_c0_c0_c1_c0_c0_c0;
+ } else if (alpha < 2.5) {
+ _output = ucolor2_Stage1_c0_c0_c1_c0_c0_c0;
+ } else if (alpha < 3.5) {
+ _output = ucolor3_Stage1_c0_c0_c1_c0_c0_c0;
+ } else if (alpha < 4.5) {
+ _output = ucolor4_Stage1_c0_c0_c1_c0_c0_c0;
+ } else {
+ _output = ucolor5_Stage1_c0_c0_c1_c0_c0_c0;
+ }
+ return _output;
+}
+vec4 CircularRRect_Stage1_c0_c0_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 dxy0 = uinnerRect_Stage1_c0_c0_c1_c0_c1_c0.xy - gl_FragCoord.xy;
+ vec2 dxy1 = gl_FragCoord.xy - uinnerRect_Stage1_c0_c0_c1_c0_c1_c0.zw;
+ vec2 dxy = max(max(dxy0, dxy1), 0.0);
+ float alpha = clamp(uradiusPlusHalf_Stage1_c0_c0_c1_c0_c1_c0.x - length(dxy), 0.0, 1.0);
+ alpha = 1.0 - alpha;
+ _output = _input * alpha;
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 ComposeTwo_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_src_in(Overdraw_Stage1_c0_c0_c1_c0_c0_c0(inputColor), CircularRRect_Stage1_c0_c0_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+float _blend_color_saturation(vec3 color) {
+ return max(max(color.x, color.y), color.z) - min(min(color.x, color.y), color.z);
+}
+vec3 _blend_set_color_saturation_helper(vec3 minMidMax, float sat) {
+ if (minMidMax.x < minMidMax.z) {
+ return vec3(0.0, (sat * (minMidMax.y - minMidMax.x)) / (minMidMax.z - minMidMax.x), sat);
+ }
+ return vec3(0.0);
+}
+vec3 _blend_set_color_saturation(vec3 hueLumColor, vec3 satColor) {
+ float sat = _blend_color_saturation(satColor);
+ if (hueLumColor.x <= hueLumColor.y) {
+ if (hueLumColor.y <= hueLumColor.z) {
+ hueLumColor.xyz = _blend_set_color_saturation_helper(hueLumColor, sat);
+ } else if (hueLumColor.x <= hueLumColor.z) {
+ hueLumColor.xzy = _blend_set_color_saturation_helper(hueLumColor.xzy, sat);
+ } else {
+ hueLumColor.zxy = _blend_set_color_saturation_helper(hueLumColor.zxy, sat);
+ }
+ } else if (hueLumColor.x <= hueLumColor.z) {
+ hueLumColor.yxz = _blend_set_color_saturation_helper(hueLumColor.yxz, sat);
+ } else if (hueLumColor.y <= hueLumColor.z) {
+ hueLumColor.yzx = _blend_set_color_saturation_helper(hueLumColor.yzx, sat);
+ } else {
+ hueLumColor.zyx = _blend_set_color_saturation_helper(hueLumColor.zyx, sat);
+ }
+ return hueLumColor;
+}
+float _blend_color_luminance(vec3 color) {
+ return dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), color);
+}
+vec3 _blend_set_color_luminance(vec3 hueSatColor, float alpha, vec3 lumColor) {
+ float lum = _blend_color_luminance(lumColor);
+ vec3 result = (lum - _blend_color_luminance(hueSatColor)) + hueSatColor;
+ float minComp = min(min(result.x, result.y), result.z);
+ float maxComp = max(max(result.x, result.y), result.z);
+ if (minComp < 0.0 && lum != minComp) {
+ result = lum + ((result - lum) * lum) / (lum - minComp);
+ }
+ if (maxComp > alpha && maxComp != lum) {
+ return lum + ((result - lum) * (alpha - lum)) / (maxComp - lum);
+ }
+ return result;
+}
+vec4 blend_saturation(vec4 src, vec4 dst) {
+ float alpha = dst.w * src.w;
+ vec3 sda = src.xyz * dst.w;
+ vec3 dsa = dst.xyz * src.w;
+ return vec4((((_blend_set_color_luminance(_blend_set_color_saturation(dsa, sda), alpha, dsa) + dst.xyz) - dsa) + src.xyz) - sda, (src.w + dst.w) - alpha);
+}
+vec4 ComposeTwo_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_saturation(ComposeTwo_Stage1_c0_c0_c0_c0(inputColor), ComposeTwo_Stage1_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 AARectEffect_Stage1_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float alpha;
+ {
+ float xSub, ySub;
+ xSub = min(gl_FragCoord.x - urectUniform_Stage1_c1_c0_c0_c0.x, 0.0);
+ xSub += min(urectUniform_Stage1_c1_c0_c0_c0.z - gl_FragCoord.x, 0.0);
+ ySub = min(gl_FragCoord.y - urectUniform_Stage1_c1_c0_c0_c0.y, 0.0);
+ ySub += min(urectUniform_Stage1_c1_c0_c0_c0.w - gl_FragCoord.y, 0.0);
+ alpha = (1.0 + max(xSub, -1.0)) * (1.0 + max(ySub, -1.0));
+ }
+ _output = _input * alpha;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c1_c0_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = textureProj(uTextureSampler_1_Stage1, vTransformedCoords_1_Stage0) * _input;
+ return _output;
+}
+vec4 light_Stage1_c1_c0_c1_c0_c1_c0(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ float colorScale = uKD_Stage1_c1_c0_c1_c0_c1_c0 * dot(normal, surfaceToLight);
+ return vec4(lightColor * clamp(colorScale, 0.0, 1.0), 1.0);
+}
+float sobel_Stage1_c1_c0_c1_c0_c1_c0(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage1_c1_c0_c1_c0_c1_c0(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage1_c1_c0_c1_c0_c1_c0(float m[9], float surfaceScale) {
+ return pointToNormal_Stage1_c1_c0_c1_c0_c1_c0(sobel_Stage1_c1_c0_c1_c0_c1_c0(m[1], m[2], m[4], m[5], m[7], m[8], 0.5), sobel_Stage1_c1_c0_c1_c0_c1_c0(0.0, 0.0, m[1], m[7], m[2], m[8], 0.33333298563957214), surfaceScale);
+}
+vec4 DiffuseLighting_Stage1_c1_c0_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coord = vTransformedCoords_2_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage1_c1_c0_c1_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c1_c0_c1_c0.xy, uTexDom_Stage1_c1_c0_c1_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c1_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c1_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c1_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c1_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp0 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1_c1_c0_c1_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c1_c0_c1_c0.xy, uTexDom_Stage1_c1_c0_c1_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c1_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c1_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c1_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c1_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1_c1_c0_c1_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c1_c0_c1_c0.xy, uTexDom_Stage1_c1_c0_c1_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c1_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c1_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c1_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c1_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage1_c1_c0_c1_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c1_c0_c1_c0.xy, uTexDom_Stage1_c1_c0_c1_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c1_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c1_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c1_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c1_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c1_c0_c1_c0.xy, uTexDom_Stage1_c1_c0_c1_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c1_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c1_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c1_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c1_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1_c1_c0_c1_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c1_c0_c1_c0.xy, uTexDom_Stage1_c1_c0_c1_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c1_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c1_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c1_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c1_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp5 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage1_c1_c0_c1_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c1_c0_c1_c0.xy, uTexDom_Stage1_c1_c0_c1_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c1_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c1_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c1_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c1_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp6 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage1_c1_c0_c1_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c1_c0_c1_c0.xy, uTexDom_Stage1_c1_c0_c1_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c1_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c1_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c1_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c1_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp7 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage1_c1_c0_c1_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c1_c0_c1_c0.xy, uTexDom_Stage1_c1_c0_c1_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c1_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c1_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c1_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c1_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp8 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = uLightDirection_Stage1_c1_c0_c1_c0_c1_c0;
+ _output = light_Stage1_c1_c0_c1_c0_c1_c0(normal_Stage1_c1_c0_c1_c0_c1_c0(m, uSurfaceScale_Stage1_c1_c0_c1_c0_c1_c0), surfaceToLight, uLightColor_Stage1_c1_c0_c1_c0_c1_c0);
+ _output *= _input;
+ return _output;
+}
+vec4 blend_color(vec4 src, vec4 dst) {
+ float alpha = dst.w * src.w;
+ vec3 sda = src.xyz * dst.w;
+ vec3 dsa = dst.xyz * src.w;
+ return vec4((((_blend_set_color_luminance(sda, alpha, dsa) + dst.xyz) - dsa) + src.xyz) - sda, (src.w + dst.w) - alpha);
+}
+vec4 ComposeTwo_Stage1_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_color(TextureEffect_Stage1_c1_c0_c1_c0_c0_c0(inputColor), DiffuseLighting_Stage1_c1_c0_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 ComposeTwo_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_src_over(AARectEffect_Stage1_c1_c0_c0_c0(inputColor), ComposeTwo_Stage1_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 blend_src_atop(vec4 src, vec4 dst) {
+ return dst.w * src + (1.0 - src.w) * dst;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ float alpha = 1.0;
+ alpha = vinCoverage_Stage0;
+ outputCoverage_Stage0 = vec4(alpha);
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_src_atop(ComposeTwo_Stage1_c0_c0(inputColor), ComposeTwo_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ sk_FragColor = (vec4(1.0) - output_Stage1) * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in float inCoverage;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec3 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+noperspective out float vinCoverage_Stage0;
+void main() {
+ vec4 color = inColor;
+ vcolor_Stage0 = color;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = uCoordTransformMatrix_1_Stage0 * vec3(inPosition, 1.0);
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(inPosition, 1.0)).xy;
+ vinCoverage_Stage0 = inCoverage;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/562-3.shader_test b/shaders/skia/562-3.shader_test
new file mode 100644
index 0000000..ed99949
--- /dev/null
+++ b/shaders/skia/562-3.shader_test
@@ -0,0 +1,127 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 ufocalParams_Stage2_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage2_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage2_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage2_c0_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage2_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_1_Stage0;
+ float t = -1.0;
+ float v = 1.0;
+ {
+ {
+ float invR1 = ufocalParams_Stage2_c0_c0_c0_c0.x;
+ float x_t = -1.0;
+ {
+ float temp = p.x * p.x - p.y * p.y;
+ if (temp >= 0.0) {
+ {
+ x_t = sqrt(temp) - p.x * invR1;
+ }
+ }
+ }
+ {
+ if (x_t <= 0.0) {
+ v = -1.0;
+ }
+ }
+ {
+ {
+ t = x_t;
+ }
+ }
+ }
+ }
+ _output = vec4(t, v, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage2_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage2_c0_c0_c1_c0;
+ bias = ubias0_1_Stage2_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage2_c0_c0_c1_c0;
+ bias = ubias2_3_Stage2_c0_c0_c1_c0;
+ }
+ } else {
+ {
+ scale = uscale4_5_Stage2_c0_c0_c1_c0;
+ bias = ubias4_5_Stage2_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage2_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else {
+ {
+ t.x = fract(t.x);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage2_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_dst_in(output_Stage1, TiledGradientEffect_Stage2_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/562-4.shader_test b/shaders/skia/562-4.shader_test
new file mode 100644
index 0000000..8fafbc0
--- /dev/null
+++ b/shaders/skia/562-4.shader_test
@@ -0,0 +1,84 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uScale_Stage2_c0_c0;
+uniform vec4 uTexDom_Stage2_c0_c0;
+uniform vec3 uDecalParams_Stage2_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+uniform sampler2D uTextureSampler_1_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+vec4 DisplacementMap_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 dColor = texture(uTextureSampler_0_Stage2, vTransformedCoords_1_Stage0);
+ dColor.xyz = dColor.w < 9.9999999747524271e-07 ? vec3(0.0) : clamp(dColor.xyz / dColor.w, 0.0, 1.0);
+ vec2 cCoords = vTransformedCoords_2_Stage0 + uScale_Stage2_c0_c0 * (dColor.wy - vec2(0.5));
+ {
+ vec2 origCoord = cCoords;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c0_c0.y);
+ if (err > uDecalParams_Stage2_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ _output = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ return _output;
+}
+float _blend_overlay_component(float sc, float sa, float dc, float da) {
+ if (2.0 * dc <= da) {
+ return (2.0 * sc) * dc;
+ }
+ return sa * da - (2.0 * (da - dc)) * (sa - sc);
+}
+vec4 blend_overlay(vec4 src, vec4 dst) {
+ vec4 result = vec4(_blend_overlay_component(src.x, src.w, dst.x, dst.w), _blend_overlay_component(src.y, src.w, dst.y, dst.w), _blend_overlay_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+ result.xyz += dst.xyz * (1.0 - src.w) + src.xyz * (1.0 - dst.w);
+ return result;
+}
+vec4 blend_hard_light(vec4 src, vec4 dst) {
+ return blend_overlay(dst, src);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_hard_light(DisplacementMap_Stage2_c0_c0(vec4(1.0)), output_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/562.shader_test b/shaders/skia/562.shader_test
new file mode 100644
index 0000000..5369a7e
--- /dev/null
+++ b/shaders/skia/562.shader_test
@@ -0,0 +1,152 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage2_c1_c0;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.w) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ } else {
+ {
+ if (t < uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = OverrideInputFragmentProcessor_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c1_c0;
+ }
+ return _output;
+}
+vec4 blend_exclusion(vec4 src, vec4 dst) {
+ return vec4((dst.xyz + src.xyz) - (2.0 * dst.xyz) * src.xyz, src.w + (1.0 - src.w) * dst.w);
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 blend_darken(vec4 src, vec4 dst) {
+ vec4 result = blend_src_over(src, dst);
+ result.xyz = min(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
+ return result;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_exclusion(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_darken(ConstColorProcessor_Stage2_c1_c0(vec4(1.0)), output_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 inColor;
+in vec2 inLocalCoord;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/565-2.shader_test b/shaders/skia/565-2.shader_test
new file mode 100644
index 0000000..dd6c876
--- /dev/null
+++ b/shaders/skia/565-2.shader_test
@@ -0,0 +1,26 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uColor_Stage0;
+void main() {
+ {
+ sk_FragColor = 1.0 - vec4(1.0);
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 inPosition;
+void main() {
+ vec3 pos3 = uViewM_Stage0 * vec3(inPosition, 1.0);
+ gl_Position = vec4(pos3.x, pos3.y, 0.0, pos3.z);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/565-3.shader_test b/shaders/skia/565-3.shader_test
new file mode 100644
index 0000000..8bdf991
--- /dev/null
+++ b/shaders/skia/565-3.shader_test
@@ -0,0 +1,118 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage2_c0_c0;
+uniform vec4 urightBorderColor_Stage2_c0_c0;
+uniform vec2 ufocalParams_Stage2_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage2_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage2_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage2_c0_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage2_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_1_Stage0;
+ float t = -1.0;
+ {
+ {
+ float r0 = ufocalParams_Stage2_c0_c0_c0_c0.x;
+ {
+ t = -length(p) - r0;
+ }
+ }
+ }
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage2_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage2_c0_c0_c1_c0;
+ bias = ubias0_1_Stage2_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage2_c0_c0_c1_c0;
+ bias = ubias2_3_Stage2_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage2_c0_c0_c1_c0;
+ bias = ubias4_5_Stage2_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage2_c0_c0_c1_c0;
+ bias = ubias6_7_Stage2_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage2_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage2_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage2_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage2_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_dst_in(output_Stage1, ClampedGradientEffect_Stage2_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/565-4.shader_test b/shaders/skia/565-4.shader_test
new file mode 100644
index 0000000..cb20199
--- /dev/null
+++ b/shaders/skia/565-4.shader_test
@@ -0,0 +1,381 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage2_c0_c0;
+uniform vec4 uKernel_Stage2_c0_c0[6];
+uniform vec2 uKernelOffset_Stage2_c0_c0;
+uniform float uGain_Stage2_c0_c0;
+uniform float uBias_Stage2_c0_c0;
+uniform vec4 uTexDom_Stage2_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 MatrixConvolution_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 sum = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_1_Stage0 - uKernelOffset_Stage2_c0_c0 * uImageIncrement_Stage2_c0_c0;
+ vec4 c;
+ {
+ float k = uKernel_Stage2_c0_c0[0].x;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2_c0_c0[0].y;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2_c0_c0[0].z;
+ {
+ vec2 origCoord = coord + vec2(2.0, 0.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2_c0_c0[0].w;
+ {
+ vec2 origCoord = coord + vec2(3.0, 0.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2_c0_c0[1].x;
+ {
+ vec2 origCoord = coord + vec2(4.0, 0.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2_c0_c0[1].y;
+ {
+ vec2 origCoord = coord + vec2(5.0, 0.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2_c0_c0[1].z;
+ {
+ vec2 origCoord = coord + vec2(6.0, 0.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2_c0_c0[1].w;
+ {
+ vec2 origCoord = coord + vec2(7.0, 0.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2_c0_c0[2].x;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2_c0_c0[2].y;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2_c0_c0[2].z;
+ {
+ vec2 origCoord = coord + vec2(2.0, 1.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2_c0_c0[2].w;
+ {
+ vec2 origCoord = coord + vec2(3.0, 1.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2_c0_c0[3].x;
+ {
+ vec2 origCoord = coord + vec2(4.0, 1.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2_c0_c0[3].y;
+ {
+ vec2 origCoord = coord + vec2(5.0, 1.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2_c0_c0[3].z;
+ {
+ vec2 origCoord = coord + vec2(6.0, 1.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2_c0_c0[3].w;
+ {
+ vec2 origCoord = coord + vec2(7.0, 1.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2_c0_c0[4].x;
+ {
+ vec2 origCoord = coord + vec2(0.0, 2.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2_c0_c0[4].y;
+ {
+ vec2 origCoord = coord + vec2(1.0, 2.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2_c0_c0[4].z;
+ {
+ vec2 origCoord = coord + vec2(2.0, 2.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2_c0_c0[4].w;
+ {
+ vec2 origCoord = coord + vec2(3.0, 2.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2_c0_c0[5].x;
+ {
+ vec2 origCoord = coord + vec2(4.0, 2.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2_c0_c0[5].y;
+ {
+ vec2 origCoord = coord + vec2(5.0, 2.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2_c0_c0[5].z;
+ {
+ vec2 origCoord = coord + vec2(6.0, 2.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2_c0_c0[5].w;
+ {
+ vec2 origCoord = coord + vec2(7.0, 2.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ vec2 origCoord = vTransformedCoords_1_Stage0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ c = textureColor;
+ }
+ _output.w = c.w;
+ _output.xyz = clamp(sum.xyz * uGain_Stage2_c0_c0 + uBias_Stage2_c0_c0, 0.0, 1.0);
+ _output.xyz *= _output.w;
+ _output *= _input;
+ return _output;
+}
+vec4 blend_multiply(vec4 src, vec4 dst) {
+ return vec4(((1.0 - src.w) * dst.xyz + (1.0 - dst.w) * src.xyz) + src.xyz * dst.xyz, src.w + (1.0 - src.w) * dst.w);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_multiply(MatrixConvolution_Stage2_c0_c0(vec4(1.0)), output_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/565.shader_test b/shaders/skia/565.shader_test
new file mode 100644
index 0000000..3abbc18
--- /dev/null
+++ b/shaders/skia/565.shader_test
@@ -0,0 +1,81 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 ucolor_Stage1_c0_c0_c0_c0;
+uniform vec4 ucolor_Stage2_c1_c0;
+noperspective in vec4 vcolor_Stage0;
+vec4 ConstColorProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = _input.w * ucolor_Stage1_c0_c0_c0_c0;
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = ConstColorProcessor_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c1_c0;
+ }
+ return _output;
+}
+vec4 blend_exclusion(vec4 src, vec4 dst) {
+ return vec4((dst.xyz + src.xyz) - (2.0 * dst.xyz) * src.xyz, src.w + (1.0 - src.w) * dst.w);
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 blend_darken(vec4 src, vec4 dst) {
+ vec4 result = blend_src_over(src, dst);
+ result.xyz = min(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
+ return result;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_exclusion(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_darken(ConstColorProcessor_Stage2_c1_c0(vec4(1.0)), output_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 position;
+in vec4 inColor;
+noperspective out vec4 vcolor_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/568-2.shader_test b/shaders/skia/568-2.shader_test
new file mode 100644
index 0000000..62666c7
--- /dev/null
+++ b/shaders/skia/568-2.shader_test
@@ -0,0 +1,54 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+uniform sampler2D uTextureSampler_0_Stage0;
+in vec2 vTextureCoords_Stage0;
+flat in int vTexIndex_Stage0;
+in vec2 vIntTextureCoords_Stage0;
+in vec4 vinColor_Stage0;
+void main() {
+ {
+ vec2 uv = vTextureCoords_Stage0;
+ vec4 texColor;
+ {
+ texColor = texture(uTextureSampler_0_Stage0, uv);
+ }
+ float distance = 7.96875 * (texColor.x - 0.50196081399917603);
+ vec2 dist_grad = vec2(dFdx(distance), dFdy(distance));
+ float dg_len2 = dot(dist_grad, dist_grad);
+ if (dg_len2 < 9.9999997473787516e-05) {
+ dist_grad = vec2(0.70709997415542603, 0.70709997415542603);
+ } else {
+ dist_grad = dist_grad * inversesqrt(dg_len2);
+ }
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform vec2 uAtlasDimensionsInv_Stage0;
+uniform mat3 uViewM_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in uvec2 inTextureCoords;
+out vec2 vTextureCoords_Stage0;
+flat out int vTexIndex_Stage0;
+out vec2 vIntTextureCoords_Stage0;
+out vec4 vinColor_Stage0;
+void main() {
+ ivec2 signedCoords = ivec2(int(inTextureCoords.x), int(inTextureCoords.y));
+ vec2 unormTexCoords = vec2(float(signedCoords.x / 2), float(signedCoords.y / 2));
+ vTextureCoords_Stage0 = unormTexCoords * uAtlasDimensionsInv_Stage0;
+ vTexIndex_Stage0 = 0;
+ vIntTextureCoords_Stage0 = unormTexCoords;
+ vinColor_Stage0 = inColor;
+ vec3 pos3 = uViewM_Stage0 * vec3(inPosition, 1.0);
+ gl_Position = vec4(pos3.x, pos3.y, 0.0, pos3.z);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/568-3.shader_test b/shaders/skia/568-3.shader_test
new file mode 100644
index 0000000..6c2cdf3
--- /dev/null
+++ b/shaders/skia/568-3.shader_test
@@ -0,0 +1,101 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage2_c0_c0;
+uniform vec4 urightBorderColor_Stage2_c0_c0;
+uniform vec2 ufocalParams_Stage2_c0_c0_c0_c0;
+uniform vec4 uscale01_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias01_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale23_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias23_Stage2_c0_c0_c1_c0;
+uniform float uthreshold_Stage2_c0_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage2_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_1_Stage0;
+ float t = -1.0;
+ {
+ {
+ float r0 = ufocalParams_Stage2_c0_c0_c0_c0.x;
+ {
+ t = length(p) - r0;
+ }
+ }
+ }
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 DualIntervalGradientColorizer_Stage2_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthreshold_Stage2_c0_c0_c1_c0) {
+ scale = uscale01_Stage2_c0_c0_c1_c0;
+ bias = ubias01_Stage2_c0_c0_c1_c0;
+ } else {
+ scale = uscale23_Stage2_c0_c0_c1_c0;
+ bias = ubias23_Stage2_c0_c0_c1_c0;
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage2_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage2_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage2_c0_c0;
+ } else {
+ _output = DualIntervalGradientColorizer_Stage2_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_dst_in(output_Stage1, ClampedGradientEffect_Stage2_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/568-4.shader_test b/shaders/skia/568-4.shader_test
new file mode 100644
index 0000000..0aca13b
--- /dev/null
+++ b/shaders/skia/568-4.shader_test
@@ -0,0 +1,65 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform float uinnerThreshold_Stage2_c0_c0;
+uniform float uouterThreshold_Stage2_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 AlphaThresholdFragmentProcessor_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 color = _input;
+ vec4 mask_color = texture(uTextureSampler_0_Stage2, vTransformedCoords_1_Stage0);
+ if (mask_color.w < 0.5) {
+ if (color.w > uouterThreshold_Stage2_c0_c0) {
+ float scale = uouterThreshold_Stage2_c0_c0 / color.w;
+ color.xyz *= scale;
+ color.w = uouterThreshold_Stage2_c0_c0;
+ }
+ } else if (color.w < uinnerThreshold_Stage2_c0_c0) {
+ float scale = uinnerThreshold_Stage2_c0_c0 / max(0.0010000000474974513, color.w);
+ color.xyz *= scale;
+ color.w = uinnerThreshold_Stage2_c0_c0;
+ }
+ _output = color;
+ return _output;
+}
+vec4 blend_plus(vec4 src, vec4 dst) {
+ return min(src + dst, 1.0);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_plus(AlphaThresholdFragmentProcessor_Stage2_c0_c0(vec4(1.0)), output_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/568.shader_test b/shaders/skia/568.shader_test
new file mode 100644
index 0000000..eae754f
--- /dev/null
+++ b/shaders/skia/568.shader_test
@@ -0,0 +1,145 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage2;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.w) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ } else {
+ {
+ if (t < uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+vec4 ComposeOne_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_dst_in(_input, TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0)));
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = ComposeOne_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 blend_exclusion(vec4 src, vec4 dst) {
+ return vec4((dst.xyz + src.xyz) - (2.0 * dst.xyz) * src.xyz, src.w + (1.0 - src.w) * dst.w);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_exclusion(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ {
+ output_Stage2 = output_Stage1 * ucolor_Stage2;
+ }
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 inColor;
+in vec2 inLocalCoord;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/571-3.shader_test b/shaders/skia/571-3.shader_test
new file mode 100644
index 0000000..0a88da0
--- /dev/null
+++ b/shaders/skia/571-3.shader_test
@@ -0,0 +1,115 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 ufocalParams_Stage2_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage2_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage2_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage2_c0_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage2_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_1_Stage0;
+ float t = -1.0;
+ {
+ {
+ float r0 = ufocalParams_Stage2_c0_c0_c0_c0.x;
+ {
+ t = -length(p) - r0;
+ }
+ }
+ }
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage2_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage2_c0_c0_c1_c0;
+ bias = ubias0_1_Stage2_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage2_c0_c0_c1_c0;
+ bias = ubias2_3_Stage2_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage2_c0_c0_c1_c0;
+ bias = ubias4_5_Stage2_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage2_c0_c0_c1_c0;
+ bias = ubias6_7_Stage2_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage2_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else {
+ {
+ t.x = fract(t.x);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage2_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_dst_in(output_Stage1, TiledGradientEffect_Stage2_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/571-4.shader_test b/shaders/skia/571-4.shader_test
new file mode 100644
index 0000000..c5b8d3e
--- /dev/null
+++ b/shaders/skia/571-4.shader_test
@@ -0,0 +1,61 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 urectH_Stage2_c0_c0;
+uniform float uinvSixSigma_Stage2_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 RectBlurEffect_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ float xCoverage, yCoverage;
+ {
+ float x, y;
+ {
+ x = max(urectH_Stage2_c0_c0.x - gl_FragCoord.x, gl_FragCoord.x - urectH_Stage2_c0_c0.z);
+ y = max(urectH_Stage2_c0_c0.y - gl_FragCoord.y, gl_FragCoord.y - urectH_Stage2_c0_c0.w);
+ }
+ xCoverage = texture(uTextureSampler_0_Stage2, vec2(x * uinvSixSigma_Stage2_c0_c0, 0.5)).w;
+ yCoverage = texture(uTextureSampler_0_Stage2, vec2(y * uinvSixSigma_Stage2_c0_c0, 0.5)).w;
+ _output = (_input * xCoverage) * yCoverage;
+ }
+ _output = (_input * xCoverage) * yCoverage;
+ return _output;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_src_over(output_Stage1, RectBlurEffect_Stage2_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/571.shader_test b/shaders/skia/571.shader_test
new file mode 100644
index 0000000..522bd72
--- /dev/null
+++ b/shaders/skia/571.shader_test
@@ -0,0 +1,68 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 ucolor_Stage1_c0_c0_c0_c0;
+uniform vec4 ucolor_Stage2;
+noperspective in vec4 vcolor_Stage0;
+vec4 ConstColorProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = _input.w * ucolor_Stage1_c0_c0_c0_c0;
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = ConstColorProcessor_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 blend_exclusion(vec4 src, vec4 dst) {
+ return vec4((dst.xyz + src.xyz) - (2.0 * dst.xyz) * src.xyz, src.w + (1.0 - src.w) * dst.w);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_exclusion(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ {
+ output_Stage2 = output_Stage1 * ucolor_Stage2;
+ }
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 position;
+in vec4 inColor;
+noperspective out vec4 vcolor_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/574-2.shader_test b/shaders/skia/574-2.shader_test
new file mode 100644
index 0000000..ce6b79f
--- /dev/null
+++ b/shaders/skia/574-2.shader_test
@@ -0,0 +1,30 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+noperspective in vec4 vcolor_Stage0;
+void main() {
+ {
+ sk_FragColor = vec4(0.0);
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+noperspective out vec4 vcolor_Stage0;
+void main() {
+ vec4 color = inColor;
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/574-3.shader_test b/shaders/skia/574-3.shader_test
new file mode 100644
index 0000000..de37133
--- /dev/null
+++ b/shaders/skia/574-3.shader_test
@@ -0,0 +1,130 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage2_c0_c0;
+uniform vec4 urightBorderColor_Stage2_c0_c0;
+uniform vec2 ufocalParams_Stage2_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage2_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage2_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage2_c0_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage2_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_1_Stage0;
+ float t = -1.0;
+ float v = 1.0;
+ {
+ {
+ float fx = ufocalParams_Stage2_c0_c0_c0_c0.y;
+ float x_t = -1.0;
+ {
+ x_t = dot(p, p) / p.x;
+ }
+ {
+ if (x_t <= 0.0) {
+ v = -1.0;
+ }
+ }
+ {
+ {
+ t = x_t + fx;
+ }
+ }
+ }
+ }
+ _output = vec4(t, v, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage2_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage2_c0_c0_c1_c0;
+ bias = ubias0_1_Stage2_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage2_c0_c0_c1_c0;
+ bias = ubias2_3_Stage2_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage2_c0_c0_c1_c0;
+ bias = ubias4_5_Stage2_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage2_c0_c0_c1_c0;
+ bias = ubias6_7_Stage2_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage2_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage2_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage2_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage2_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_dst_in(output_Stage1, ClampedGradientEffect_Stage2_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/574-4.shader_test b/shaders/skia/574-4.shader_test
new file mode 100644
index 0000000..fb67c7d
--- /dev/null
+++ b/shaders/skia/574-4.shader_test
@@ -0,0 +1,50 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 Big_Ole_Key_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = _input;
+ return _output;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 blend_lighten(vec4 src, vec4 dst) {
+ vec4 result = blend_src_over(src, dst);
+ result.xyz = max(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
+ return result;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_lighten(Big_Ole_Key_Stage2_c0_c0(vec4(1.0)), output_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/574.shader_test b/shaders/skia/574.shader_test
new file mode 100644
index 0000000..b78ca28
--- /dev/null
+++ b/shaders/skia/574.shader_test
@@ -0,0 +1,165 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage2;
+uniform vec4 ucolor_Stage3_c1_c0;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.w) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ } else {
+ {
+ if (t < uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+vec4 ComposeOne_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_dst_in(_input, TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0)));
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = ComposeOne_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 ConstColorProcessor_Stage3_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage3_c1_c0;
+ }
+ return _output;
+}
+vec4 blend_exclusion(vec4 src, vec4 dst) {
+ return vec4((dst.xyz + src.xyz) - (2.0 * dst.xyz) * src.xyz, src.w + (1.0 - src.w) * dst.w);
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 blend_darken(vec4 src, vec4 dst) {
+ vec4 result = blend_src_over(src, dst);
+ result.xyz = min(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
+ return result;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_exclusion(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ {
+ output_Stage2 = output_Stage1 * ucolor_Stage2;
+ }
+ }
+ vec4 output_Stage3;
+ {
+ output_Stage3 = blend_darken(ConstColorProcessor_Stage3_c1_c0(vec4(1.0)), output_Stage2);
+ }
+ {
+ sk_FragColor = output_Stage3;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 inColor;
+in vec2 inLocalCoord;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/577-2.shader_test b/shaders/skia/577-2.shader_test
new file mode 100644
index 0000000..c7fce33
--- /dev/null
+++ b/shaders/skia/577-2.shader_test
@@ -0,0 +1,159 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_KHR_blend_equation_advanced : require
+out vec4 sk_FragColor;
+layout (blend_support_all_equations) out ;
+uniform vec4 uColor_Stage0;
+uniform mat4 um_Stage1_c0_c0_c0_c0_c0_c0;
+uniform vec4 uv_Stage1_c0_c0_c0_c0_c0_c0;
+uniform vec3 uedges_Stage1_c0_c0_c0_c0_c1_c0[7];
+uniform mat4 um_Stage1_c0_c0_c1_c0;
+uniform vec4 uv_Stage1_c0_c0_c1_c0;
+noperspective in vec3 vDashParam_Stage0;
+noperspective in vec2 vCircleParams_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 ColorMatrixFragmentProcessor_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = _input;
+ {
+ float nonZeroAlpha = max(inputColor.w, 9.9999997473787516e-05);
+ inputColor = vec4(inputColor.xyz / nonZeroAlpha, inputColor.w);
+ }
+ _output = um_Stage1_c0_c0_c0_c0_c0_c0 * inputColor + uv_Stage1_c0_c0_c0_c0_c0_c0;
+ {
+ _output.w = clamp(_output.w, 0.0, 1.0);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 ConvexPoly_Stage1_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float alpha = 1.0;
+ float edge;
+ edge = dot(uedges_Stage1_c0_c0_c0_c0_c1_c0[0], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage1_c0_c0_c0_c0_c1_c0[1], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage1_c0_c0_c0_c0_c1_c0[2], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage1_c0_c0_c0_c0_c1_c0[3], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage1_c0_c0_c0_c0_c1_c0[4], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage1_c0_c0_c0_c0_c1_c0[5], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage1_c0_c0_c0_c0_c1_c0[6], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ alpha = 1.0 - alpha;
+ _output = _input * alpha;
+ return _output;
+}
+vec4 blend_dst_over(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src + dst;
+}
+vec4 ComposeTwo_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_dst_over(ColorMatrixFragmentProcessor_Stage1_c0_c0_c0_c0_c0_c0(inputColor), ConvexPoly_Stage1_c0_c0_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 ColorMatrixFragmentProcessor_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = _input;
+ {
+ float nonZeroAlpha = max(inputColor.w, 9.9999997473787516e-05);
+ inputColor = vec4(inputColor.xyz / nonZeroAlpha, inputColor.w);
+ }
+ _output = um_Stage1_c0_c0_c1_c0 * inputColor + uv_Stage1_c0_c0_c1_c0;
+ {
+ _output = clamp(_output, 0.0, 1.0);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_exclusion(vec4 src, vec4 dst) {
+ return vec4((dst.xyz + src.xyz) - (2.0 * dst.xyz) * src.xyz, src.w + (1.0 - src.w) * dst.w);
+}
+vec4 ComposeTwo_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_exclusion(ComposeTwo_Stage1_c0_c0_c0_c0(inputColor), ColorMatrixFragmentProcessor_Stage1_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 Dither_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = _input;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_0_Stage0.x);
+ uint y = uint(vTransformedCoords_0_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ _output = vec4(clamp(_output.xyz + value * 0.0039215688593685627, 0.0, _output.w), _output.w);
+ return _output;
+}
+vec4 blend_modulate(vec4 src, vec4 dst) {
+ return src * dst;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = uColor_Stage0;
+ float xShifted = vDashParam_Stage0.x - floor(vDashParam_Stage0.x / vDashParam_Stage0.z) * vDashParam_Stage0.z;
+ vec2 fragPosShifted = vec2(xShifted, vDashParam_Stage0.y);
+ vec2 center = vec2(vCircleParams_Stage0.y, 0.0);
+ float dist = length(center - fragPosShifted);
+ float alpha = 1.0;
+ alpha *= dist < vCircleParams_Stage0.x + 0.5 ? 1.0 : 0.0;
+ outputCoverage_Stage0 = vec4(alpha);
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_modulate(ComposeTwo_Stage1_c0_c0(inputColor), Dither_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ sk_FragColor = outputCoverage_Stage0 * output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec3 inDashParams;
+in vec2 inCircleParams;
+noperspective out vec3 vDashParam_Stage0;
+noperspective out vec2 vCircleParams_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vDashParam_Stage0 = inDashParams;
+ vCircleParams_Stage0 = inCircleParams;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/577-3.shader_test b/shaders/skia/577-3.shader_test
new file mode 100644
index 0000000..2992b7b
--- /dev/null
+++ b/shaders/skia/577-3.shader_test
@@ -0,0 +1,122 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage2_c0_c0;
+uniform vec4 urightBorderColor_Stage2_c0_c0;
+uniform vec2 ufocalParams_Stage2_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage2_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage2_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage2_c0_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage2_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_1_Stage0;
+ float t = -1.0;
+ float v = 1.0;
+ {
+ {
+ float r0_2 = ufocalParams_Stage2_c0_c0_c0_c0.y;
+ t = r0_2 - p.y * p.y;
+ if (t >= 0.0) {
+ t = p.x + sqrt(t);
+ } else {
+ v = -1.0;
+ }
+ }
+ }
+ _output = vec4(t, v, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage2_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage2_c0_c0_c1_c0;
+ bias = ubias0_1_Stage2_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage2_c0_c0_c1_c0;
+ bias = ubias2_3_Stage2_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage2_c0_c0_c1_c0;
+ bias = ubias4_5_Stage2_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage2_c0_c0_c1_c0;
+ bias = ubias6_7_Stage2_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage2_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage2_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage2_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage2_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_dst_in(output_Stage1, ClampedGradientEffect_Stage2_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/577-4.shader_test b/shaders/skia/577-4.shader_test
new file mode 100644
index 0000000..8c3f896
--- /dev/null
+++ b/shaders/skia/577-4.shader_test
@@ -0,0 +1,63 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 urectUniform_Stage2_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 AARectEffect_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ float alpha;
+ {
+ alpha = float(all(greaterThan(vec4(gl_FragCoord.xy, urectUniform_Stage2_c0_c0.zw), vec4(urectUniform_Stage2_c0_c0.xy, gl_FragCoord.xy))) ? 1 : 0);
+ }
+ _output = _input * alpha;
+ return _output;
+}
+float _blend_overlay_component(float sc, float sa, float dc, float da) {
+ if (2.0 * dc <= da) {
+ return (2.0 * sc) * dc;
+ }
+ return sa * da - (2.0 * (da - dc)) * (sa - sc);
+}
+vec4 blend_overlay(vec4 src, vec4 dst) {
+ vec4 result = vec4(_blend_overlay_component(src.x, src.w, dst.x, dst.w), _blend_overlay_component(src.y, src.w, dst.y, dst.w), _blend_overlay_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+ result.xyz += dst.xyz * (1.0 - src.w) + src.xyz * (1.0 - dst.w);
+ return result;
+}
+vec4 blend_hard_light(vec4 src, vec4 dst) {
+ return blend_overlay(dst, src);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_hard_light(AARectEffect_Stage2_c0_c0(vec4(1.0)), output_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/577.shader_test b/shaders/skia/577.shader_test
new file mode 100644
index 0000000..82a0467
--- /dev/null
+++ b/shaders/skia/577.shader_test
@@ -0,0 +1,88 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 ucolor_Stage1_c0_c0_c0_c0;
+uniform vec4 ucolor_Stage2;
+uniform vec4 ucolor_Stage3_c1_c0;
+noperspective in vec4 vcolor_Stage0;
+vec4 ConstColorProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = _input.w * ucolor_Stage1_c0_c0_c0_c0;
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = ConstColorProcessor_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 ConstColorProcessor_Stage3_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage3_c1_c0;
+ }
+ return _output;
+}
+vec4 blend_exclusion(vec4 src, vec4 dst) {
+ return vec4((dst.xyz + src.xyz) - (2.0 * dst.xyz) * src.xyz, src.w + (1.0 - src.w) * dst.w);
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 blend_darken(vec4 src, vec4 dst) {
+ vec4 result = blend_src_over(src, dst);
+ result.xyz = min(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
+ return result;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_exclusion(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ {
+ output_Stage2 = output_Stage1 * ucolor_Stage2;
+ }
+ }
+ vec4 output_Stage3;
+ {
+ output_Stage3 = blend_darken(ConstColorProcessor_Stage3_c1_c0(vec4(1.0)), output_Stage2);
+ }
+ {
+ sk_FragColor = output_Stage3;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 position;
+in vec4 inColor;
+noperspective out vec4 vcolor_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/58-1.shader_test b/shaders/skia/58-1.shader_test
new file mode 100644
index 0000000..78e93cd
--- /dev/null
+++ b/shaders/skia/58-1.shader_test
@@ -0,0 +1,65 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 TextureEffect_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage2, vTransformedCoords_1_Stage0) * _input;
+ return _output;
+}
+float _guarded_divide(float n, float d) {
+ return n / d;
+}
+float _color_dodge_component(float sc, float sa, float dc, float da) {
+ if (dc == 0.0) {
+ return sc * (1.0 - da);
+ } else {
+ float d = sa - sc;
+ if (d == 0.0) {
+ return (sa * da + sc * (1.0 - da)) + dc * (1.0 - sa);
+ }
+ d = min(da, _guarded_divide(dc * sa, d));
+ return (d * sa + sc * (1.0 - da)) + dc * (1.0 - sa);
+ }
+}
+vec4 blend_color_dodge(vec4 src, vec4 dst) {
+ return vec4(_color_dodge_component(src.x, src.w, dst.x, dst.w), _color_dodge_component(src.y, src.w, dst.y, dst.w), _color_dodge_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_color_dodge(output_Stage1, TextureEffect_Stage2_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/58-10.shader_test b/shaders/skia/58-10.shader_test
new file mode 100644
index 0000000..04d1ab5
--- /dev/null
+++ b/shaders/skia/58-10.shader_test
@@ -0,0 +1,55 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec4 vinCircleEdge_Stage0;
+noperspective in vec4 vinColor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 TextureEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ vec4 circleEdge;
+ circleEdge = vinCircleEdge_Stage0;
+ float d = length(circleEdge.xy);
+ float distanceToOuterEdge = circleEdge.z * (1.0 - d);
+ float edgeAlpha = clamp(distanceToOuterEdge, 0.0, 1.0);
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TextureEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1 * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec4 inCircleEdge;
+noperspective out vec4 vinCircleEdge_Stage0;
+noperspective out vec4 vinColor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vinCircleEdge_Stage0 = inCircleEdge;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/58-11.shader_test b/shaders/skia/58-11.shader_test
new file mode 100644
index 0000000..80db009
--- /dev/null
+++ b/shaders/skia/58-11.shader_test
@@ -0,0 +1,52 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uColor_Stage0;
+uniform vec2 uDstTextureUpperLeft_Stage1;
+uniform vec2 uDstTextureCoordScale_Stage1;
+uniform sampler2D uDstTextureSampler_Stage1;
+noperspective in float vinCoverage_Stage0;
+vec4 blend_src(vec4 src, vec4 dst) {
+ return src;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = uColor_Stage0;
+ float alpha = 1.0;
+ alpha = vinCoverage_Stage0;
+ outputCoverage_Stage0 = vec4(alpha);
+ }
+ {
+ if (all(lessThanEqual(outputCoverage_Stage0.xyz, vec3(0.0)))) {
+ discard;
+ }
+ vec2 _dstTexCoord = (gl_FragCoord.xy - uDstTextureUpperLeft_Stage1) * uDstTextureCoordScale_Stage1;
+ _dstTexCoord.y = 1.0 - _dstTexCoord.y;
+ vec4 _dstColor = texture(uDstTextureSampler_Stage1, _dstTexCoord);
+ sk_FragColor = blend_src(outputColor_Stage0, _dstColor);
+ sk_FragColor = outputCoverage_Stage0 * sk_FragColor + (vec4(1.0) - outputCoverage_Stage0) * _dstColor;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 inPosition;
+in float inCoverage;
+noperspective out float vinCoverage_Stage0;
+void main() {
+ vec2 pos2 = inPosition;
+ vinCoverage_Stage0 = inCoverage;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/58-12.shader_test b/shaders/skia/58-12.shader_test
new file mode 100644
index 0000000..452b645
--- /dev/null
+++ b/shaders/skia/58-12.shader_test
@@ -0,0 +1,44 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 ucircle_Stage1;
+flat in vec4 vcolor_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ float d;
+ {
+ d = (length((ucircle_Stage1.xy - gl_FragCoord.xy) * ucircle_Stage1.w) - 1.0) * ucircle_Stage1.z;
+ }
+ {
+ output_Stage1 = d > 0.5 ? vec4(1.0) : vec4(0.0);
+ }
+ }
+ {
+ sk_FragColor = outputColor_Stage0 * output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 position;
+in vec4 color;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/58-13.shader_test b/shaders/skia/58-13.shader_test
new file mode 100644
index 0000000..01bf710
--- /dev/null
+++ b/shaders/skia/58-13.shader_test
@@ -0,0 +1,92 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage2_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c1_c0;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_dst_in(outputColor_Stage0, ClampedGradientEffect_Stage1_c0_c0(vec4(1.0)));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_src_over(ConstColorProcessor_Stage2_c1_c0(vec4(1.0)), output_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/58-14.shader_test b/shaders/skia/58-14.shader_test
new file mode 100644
index 0000000..0db9333
--- /dev/null
+++ b/shaders/skia/58-14.shader_test
@@ -0,0 +1,44 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform float uPixelSize_Stage1;
+uniform vec2 uRange_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0;
+ coord.x -= 16.0 * uPixelSize_Stage1;
+ float highBound = min(uRange_Stage1.y, coord.x + 32.0 * uPixelSize_Stage1);
+ coord.x = max(uRange_Stage1.x, coord.x);
+ for (int i = 0;i < 33; i++) {
+ output_Stage1 = max(output_Stage1, texture(uTextureSampler_0_Stage1, coord));
+ coord.x += uPixelSize_Stage1;
+ coord.x = min(highBound, coord.x);
+ }
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/58-15.shader_test b/shaders/skia/58-15.shader_test
new file mode 100644
index 0000000..2836ba8
--- /dev/null
+++ b/shaders/skia/58-15.shader_test
@@ -0,0 +1,135 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform float uSurfaceScale_Stage1;
+uniform vec3 uLightColor_Stage1;
+uniform float uKD_Stage1;
+uniform vec3 uLightDirection_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 light_Stage1(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ float colorScale = uKD_Stage1 * dot(normal, surfaceToLight);
+ return vec4(lightColor * clamp(colorScale, 0.0, 1.0), 1.0);
+}
+float sobel_Stage1(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage1(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage1(float m[9], float surfaceScale) {
+ return pointToNormal_Stage1(sobel_Stage1(m[0], m[1], m[3], m[4], 0.0, 0.0, 0.66666698455810547), sobel_Stage1(m[0], m[3], m[1], m[4], 0.0, 0.0, 0.66666698455810547), surfaceScale);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ vec2 coord = vTransformedCoords_0_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp0 = textureColor;
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp1 = textureColor;
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp2 = textureColor;
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp3 = textureColor;
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp4 = textureColor;
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp5 = textureColor;
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp6 = textureColor;
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp7 = textureColor;
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp8 = textureColor;
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = uLightDirection_Stage1;
+ output_Stage1 = light_Stage1(normal_Stage1(m, uSurfaceScale_Stage1), surfaceToLight, uLightColor_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/58-16.shader_test b/shaders/skia/58-16.shader_test
new file mode 100644
index 0000000..3765813
--- /dev/null
+++ b/shaders/skia/58-16.shader_test
@@ -0,0 +1,72 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec2 uDstTextureUpperLeft_Stage1;
+uniform vec2 uDstTextureCoordScale_Stage1;
+uniform sampler2D uTextureSampler_0_Stage0;
+uniform sampler2D uDstTextureSampler_Stage1;
+noperspective in vec2 vTextureCoords_Stage0;
+flat in int vTexIndex_Stage0;
+noperspective in vec4 vinColor_Stage0;
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 blend_lighten(vec4 src, vec4 dst) {
+ vec4 result = blend_src_over(src, dst);
+ result.xyz = max(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
+ return result;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vinColor_Stage0;
+ vec4 texColor;
+ {
+ texColor = texture(uTextureSampler_0_Stage0, vTextureCoords_Stage0);
+ }
+ outputCoverage_Stage0 = texColor;
+ }
+ {
+ if (all(lessThanEqual(outputCoverage_Stage0.xyz, vec3(0.0)))) {
+ discard;
+ }
+ vec2 _dstTexCoord = (gl_FragCoord.xy - uDstTextureUpperLeft_Stage1) * uDstTextureCoordScale_Stage1;
+ _dstTexCoord.y = 1.0 - _dstTexCoord.y;
+ vec4 _dstColor = texture(uDstTextureSampler_Stage1, _dstTexCoord);
+ sk_FragColor = blend_lighten(outputColor_Stage0, _dstColor);
+ float lerpRed = mix(_dstColor.w, sk_FragColor.w, outputCoverage_Stage0.x);
+ float lerpBlue = mix(_dstColor.w, sk_FragColor.w, outputCoverage_Stage0.y);
+ float lerpGreen = mix(_dstColor.w, sk_FragColor.w, outputCoverage_Stage0.z);
+ sk_FragColor = outputCoverage_Stage0 * sk_FragColor + (vec4(1.0) - outputCoverage_Stage0) * _dstColor;
+ sk_FragColor.w = max(max(lerpRed, lerpBlue), lerpGreen);
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform vec2 uAtlasSizeInv_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in uvec2 inTextureCoords;
+noperspective out vec2 vTextureCoords_Stage0;
+flat out int vTexIndex_Stage0;
+noperspective out vec4 vinColor_Stage0;
+void main() {
+ ivec2 signedCoords = ivec2(int(inTextureCoords.x), int(inTextureCoords.y));
+ vec2 unormTexCoords = vec2(float(signedCoords.x / 2), float(signedCoords.y / 2));
+ vTextureCoords_Stage0 = unormTexCoords * uAtlasSizeInv_Stage0;
+ vTexIndex_Stage0 = 0;
+ vinColor_Stage0 = inColor;
+ gl_Position = vec4(inPosition.x, inPosition.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/58-17.shader_test b/shaders/skia/58-17.shader_test
new file mode 100644
index 0000000..3b9b1ed
--- /dev/null
+++ b/shaders/skia/58-17.shader_test
@@ -0,0 +1,41 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform float uPixelSize_Stage1;
+uniform vec2 uRange_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0;
+ coord.y -= 5.0 * uPixelSize_Stage1;
+ for (int i = 0;i < 11; i++) {
+ output_Stage1 = max(output_Stage1, texture(uTextureSampler_0_Stage1, coord));
+ coord.y += uPixelSize_Stage1;
+ }
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/58-2.shader_test b/shaders/skia/58-2.shader_test
new file mode 100644
index 0000000..1b274a8
--- /dev/null
+++ b/shaders/skia/58-2.shader_test
@@ -0,0 +1,117 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uclamp_Stage1_c0_c0_c0_c0;
+uniform vec4 uclamp_Stage1_c0_c0_c1_c0;
+uniform vec4 uclamp_Stage1_c0_c0_c2_c0;
+uniform mat4 um_Stage2;
+uniform vec4 uv_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+uniform sampler2D uTextureSampler_2_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 inCoord = vTransformedCoords_0_Stage0;
+ vec2 subsetCoord;
+ subsetCoord.x = inCoord.x;
+ subsetCoord.y = inCoord.y;
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage1_c0_c0_c0_c0.x, uclamp_Stage1_c0_c0_c0_c0.z);
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage1_c0_c0_c0_c0.y, uclamp_Stage1_c0_c0_c0_c0.w);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ _output = _input * textureColor;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 inCoord = vTransformedCoords_1_Stage0;
+ vec2 subsetCoord;
+ subsetCoord.x = inCoord.x;
+ subsetCoord.y = inCoord.y;
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage1_c0_c0_c1_c0.x, uclamp_Stage1_c0_c0_c1_c0.z);
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage1_c0_c0_c1_c0.y, uclamp_Stage1_c0_c0_c1_c0.w);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ _output = _input * textureColor;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c0_c0_c2_c0(vec4 _input) {
+ vec4 _output;
+ vec2 inCoord = vTransformedCoords_2_Stage0;
+ vec2 subsetCoord;
+ subsetCoord.x = inCoord.x;
+ subsetCoord.y = inCoord.y;
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage1_c0_c0_c2_c0.x, uclamp_Stage1_c0_c0_c2_c0.z);
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage1_c0_c0_c2_c0.y, uclamp_Stage1_c0_c0_c2_c0.w);
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ _output = _input * textureColor;
+ return _output;
+}
+vec4 YUVtoRGBEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 planes[3];
+ planes[0] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0));
+ planes[1] = TextureEffect_Stage1_c0_c0_c1_c0(vec4(1.0));
+ planes[2] = TextureEffect_Stage1_c0_c0_c2_c0(vec4(1.0));
+ vec4 color = vec4(planes[0].x, planes[1].x, planes[1].y, planes[2].w);
+ color.xyz *= color.w;
+ _output = color;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = YUVtoRGBEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ vec4 inputColor = output_Stage1;
+ {
+ float nonZeroAlpha = max(inputColor.w, 9.9999997473787516e-05);
+ inputColor = vec4(inputColor.xyz / nonZeroAlpha, inputColor.w);
+ }
+ output_Stage2 = um_Stage2 * inputColor + uv_Stage2;
+ {
+ output_Stage2 = clamp(output_Stage2, 0.0, 1.0);
+ }
+ {
+ output_Stage2.xyz *= output_Stage2.w;
+ }
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/58-22.shader_test b/shaders/skia/58-22.shader_test
new file mode 100644
index 0000000..b541a3c
--- /dev/null
+++ b/shaders/skia/58-22.shader_test
@@ -0,0 +1,44 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform float uPixelSize_Stage1;
+uniform vec2 uRange_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = vec4(1.0, 1.0, 1.0, 1.0);
+ vec2 coord = vTransformedCoords_0_Stage0;
+ coord.y -= uPixelSize_Stage1;
+ float highBound = min(uRange_Stage1.y, coord.y + 2.0 * uPixelSize_Stage1);
+ coord.y = max(uRange_Stage1.x, coord.y);
+ for (int i = 0;i < 3; i++) {
+ output_Stage1 = min(output_Stage1, texture(uTextureSampler_0_Stage1, coord));
+ coord.y += uPixelSize_Stage1;
+ coord.y = min(highBound, coord.y);
+ }
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/58-28.shader_test b/shaders/skia/58-28.shader_test
new file mode 100644
index 0000000..6ed83c0
--- /dev/null
+++ b/shaders/skia/58-28.shader_test
@@ -0,0 +1,63 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform vec2 uBounds_Stage1;
+uniform vec4 uKernel_Stage1[2];
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0 - 2.0 * uImageIncrement_Stage1;
+ vec2 coordSampled = vec2(0.0, 0.0);
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1.x && coord.x <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].x;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1.x && coord.x <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].y;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1.x && coord.x <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].z;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1.x && coord.x <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].w;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1.x && coord.x <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].x;
+ }
+ coord += uImageIncrement_Stage1;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/58-29.shader_test b/shaders/skia/58-29.shader_test
new file mode 100644
index 0000000..01b104a
--- /dev/null
+++ b/shaders/skia/58-29.shader_test
@@ -0,0 +1,74 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 RadialGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = length(vTransformedCoords_0_Stage0);
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = RadialGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_dst_in(outputColor_Stage0, ClampedGradientEffect_Stage1_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/58-30.shader_test b/shaders/skia/58-30.shader_test
new file mode 100644
index 0000000..2837788
--- /dev/null
+++ b/shaders/skia/58-30.shader_test
@@ -0,0 +1,90 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 RadialGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = length(vTransformedCoords_0_Stage0);
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = RadialGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_dst_in(outputColor_Stage0, ClampedGradientEffect_Stage1_c0_c0(vec4(1.0)));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_1_Stage0.x);
+ uint y = uint(vTransformedCoords_1_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ output_Stage2 = vec4(clamp(output_Stage2.xyz + value * 0.0039215688593685627, 0.0, output_Stage2.w), output_Stage2.w);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/58-35.shader_test b/shaders/skia/58-35.shader_test
new file mode 100644
index 0000000..b859349
--- /dev/null
+++ b/shaders/skia/58-35.shader_test
@@ -0,0 +1,72 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 TextureEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = TextureEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = OverrideInputFragmentProcessor_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 blend_lighten(vec4 src, vec4 dst) {
+ vec4 result = blend_src_over(src, dst);
+ result.xyz = max(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
+ return result;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_lighten(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec2 inLocalCoord;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 color = inColor;
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/58-37.shader_test b/shaders/skia/58-37.shader_test
new file mode 100644
index 0000000..0858493
--- /dev/null
+++ b/shaders/skia/58-37.shader_test
@@ -0,0 +1,44 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform float uPixelSize_Stage1;
+uniform vec2 uRange_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0;
+ coord.y -= 9.0 * uPixelSize_Stage1;
+ float highBound = min(uRange_Stage1.y, coord.y + 18.0 * uPixelSize_Stage1);
+ coord.y = max(uRange_Stage1.x, coord.y);
+ for (int i = 0;i < 19; i++) {
+ output_Stage1 = max(output_Stage1, texture(uTextureSampler_0_Stage1, coord));
+ coord.y += uPixelSize_Stage1;
+ coord.y = min(highBound, coord.y);
+ }
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/58-38.shader_test b/shaders/skia/58-38.shader_test
new file mode 100644
index 0000000..360b1aa
--- /dev/null
+++ b/shaders/skia/58-38.shader_test
@@ -0,0 +1,127 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 uleftBorderColor_Stage1_c1_c0_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c1_c0_c0_c0;
+uniform vec4 ustart_Stage1_c1_c0_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c1_c0_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+vec4 ComposeOne_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_dst_in(_input, ClampedGradientEffect_Stage1_c0_c0_c0_c0(vec4(1.0)));
+ return _output;
+}
+vec4 LinearGradientLayout_Stage1_c1_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_1_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c1_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c1_c0_c0_c0_c1_c0 + t * uend_Stage1_c1_c0_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c1_c0_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c1_c0_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c1_c0_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c1_c0_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 ComposeOne_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_dst_in(_input, ClampedGradientEffect_Stage1_c1_c0_c0_c0(vec4(1.0)));
+ return _output;
+}
+vec4 blend_src_atop(vec4 src, vec4 dst) {
+ return dst.w * src + (1.0 - src.w) * dst;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_src_atop(ComposeOne_Stage1_c0_c0(inputColor), ComposeOne_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/58-39.shader_test b/shaders/skia/58-39.shader_test
new file mode 100644
index 0000000..03f786c
--- /dev/null
+++ b/shaders/skia/58-39.shader_test
@@ -0,0 +1,97 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 ustart_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 uclamp_Stage1_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec4 vcolor_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c0_c0_c1_c0;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+vec4 ComposeOne_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_dst_in(_input, TiledGradientEffect_Stage1_c0_c0_c0_c0(vec4(1.0)));
+ return _output;
+}
+vec4 TextureEffect_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 inCoord = vTransformedCoords_1_Stage0;
+ vec2 subsetCoord;
+ subsetCoord.x = inCoord.x;
+ subsetCoord.y = inCoord.y;
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage1_c1_c0.x, uclamp_Stage1_c1_c0.z);
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage1_c1_c0.y, uclamp_Stage1_c1_c0.w);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ _output = _input * textureColor;
+ return _output;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TextureEffect_Stage1_c1_c0(ComposeOne_Stage1_c0_c0(outputColor_Stage0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/58-4.shader_test b/shaders/skia/58-4.shader_test
new file mode 100644
index 0000000..0d955de
--- /dev/null
+++ b/shaders/skia/58-4.shader_test
@@ -0,0 +1,89 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform mat4 um_Stage2;
+uniform vec4 uv_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+uniform sampler2D uTextureSampler_2_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_1_Stage1, vTransformedCoords_1_Stage0) * _input;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c0_c0_c2_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_2_Stage1, vTransformedCoords_2_Stage0) * _input;
+ return _output;
+}
+vec4 YUVtoRGBEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 planes[3];
+ planes[0] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0));
+ planes[1] = TextureEffect_Stage1_c0_c0_c1_c0(vec4(1.0));
+ planes[2] = TextureEffect_Stage1_c0_c0_c2_c0(vec4(1.0));
+ vec4 color = vec4(planes[0].x, planes[2].x, planes[1].x, 1.0);
+ _output = color;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = YUVtoRGBEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ vec4 inputColor = output_Stage1;
+ {
+ float nonZeroAlpha = max(inputColor.w, 9.9999997473787516e-05);
+ inputColor = vec4(inputColor.xyz / nonZeroAlpha, inputColor.w);
+ }
+ output_Stage2 = um_Stage2 * inputColor + uv_Stage2;
+ {
+ output_Stage2 = clamp(output_Stage2, 0.0, 1.0);
+ }
+ {
+ output_Stage2.xyz *= output_Stage2.w;
+ }
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/58-41.shader_test b/shaders/skia/58-41.shader_test
new file mode 100644
index 0000000..5dae5c1
--- /dev/null
+++ b/shaders/skia/58-41.shader_test
@@ -0,0 +1,57 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uclamp_Stage1_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 inCoord = vTransformedCoords_0_Stage0;
+ vec2 subsetCoord;
+ subsetCoord.x = inCoord.x;
+ subsetCoord.y = inCoord.y;
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage1_c0_c0.x, uclamp_Stage1_c0_c0.z);
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage1_c0_c0.y, uclamp_Stage1_c0_c0.w);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ _output = _input * textureColor;
+ return _output;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TextureEffect_Stage1_c0_c0(vec4(1.0));
+ output_Stage1.xyz *= outputColor_Stage0.xyz;
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/58-46.shader_test b/shaders/skia/58-46.shader_test
new file mode 100644
index 0000000..61746fe
--- /dev/null
+++ b/shaders/skia/58-46.shader_test
@@ -0,0 +1,48 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform sampler2D uTextureSampler_0_Stage0;
+noperspective in vec2 vTextureCoords_Stage0;
+flat in int vTexIndex_Stage0;
+noperspective in vec4 vinColor_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vinColor_Stage0;
+ vec4 texColor;
+ {
+ texColor = texture(uTextureSampler_0_Stage0, vTextureCoords_Stage0);
+ }
+ outputCoverage_Stage0 = texColor;
+ }
+ {
+ sk_FragColor = (1.0 - outputColor_Stage0.w) * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform vec2 uAtlasSizeInv_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in uvec2 inTextureCoords;
+noperspective out vec2 vTextureCoords_Stage0;
+flat out int vTexIndex_Stage0;
+noperspective out vec4 vinColor_Stage0;
+void main() {
+ ivec2 signedCoords = ivec2(int(inTextureCoords.x), int(inTextureCoords.y));
+ vec2 unormTexCoords = vec2(float(signedCoords.x / 2), float(signedCoords.y / 2));
+ vTextureCoords_Stage0 = unormTexCoords * uAtlasSizeInv_Stage0;
+ vTexIndex_Stage0 = 0;
+ vinColor_Stage0 = inColor;
+ gl_Position = vec4(inPosition.x, inPosition.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/58-47.shader_test b/shaders/skia/58-47.shader_test
new file mode 100644
index 0000000..388f514
--- /dev/null
+++ b/shaders/skia/58-47.shader_test
@@ -0,0 +1,115 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uColor_Stage0;
+uniform vec2 uScale_Stage1;
+uniform vec4 uTexDom_Stage1;
+uniform vec3 uDecalParams_Stage1;
+uniform vec4 uk_Stage2;
+uniform vec4 ucolor_Stage2_c0_c0;
+uniform vec4 uk_Stage3;
+uniform vec4 ucolor_Stage3_c1_c0;
+uniform vec2 uDstTextureUpperLeft_Stage4;
+uniform vec2 uDstTextureCoordScale_Stage4;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+uniform sampler2D uDstTextureSampler_Stage4;
+in vec2 vTransformedCoords_0_Stage0;
+in vec2 vTransformedCoords_1_Stage0;
+in vec2 vTransformedCoords_2_Stage0;
+in vec2 vTransformedCoords_3_Stage0;
+vec4 ConstColorProcessor_Stage2_c0_c0(vec4 _input, vec2 _coords) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c0_c0;
+ }
+ return _output;
+}
+vec4 ConstColorProcessor_Stage3_c1_c0(vec4 _input, vec2 _coords) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage3_c1_c0;
+ }
+ return _output;
+}
+vec4 blend_dst_atop(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src + src.w * dst;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ vec4 dColor = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ dColor.xyz = dColor.w < 9.9999999747524271e-07 ? vec3(0.0) : clamp(dColor.xyz / dColor.w, 0.0, 1.0);
+ vec2 cCoords = vTransformedCoords_1_Stage0 + uScale_Stage1 * (dColor.yw - vec2(0.5));
+ {
+ vec2 origCoord = cCoords;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ output_Stage1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ vec4 dst = ConstColorProcessor_Stage2_c0_c0(vec4(1.0), vTransformedCoords_2_Stage0);
+ output_Stage2 = clamp((((uk_Stage2.x * output_Stage2) * dst + uk_Stage2.y * output_Stage2) + uk_Stage2.z * dst) + uk_Stage2.w, 0.0, 1.0);
+ {
+ output_Stage2.xyz = min(output_Stage2.xyz, output_Stage2.w);
+ }
+ }
+ vec4 output_Stage3;
+ {
+ output_Stage3 = vec4(1.0);
+ vec4 dst = ConstColorProcessor_Stage3_c1_c0(vec4(1.0), vTransformedCoords_3_Stage0);
+ output_Stage3 = clamp(((vec4(uk_Stage3.x) * dst + vec4(uk_Stage3.y)) + uk_Stage3.z * dst) + uk_Stage3.w, 0.0, 1.0);
+ {
+ output_Stage3.xyz = min(output_Stage3.xyz, output_Stage3.w);
+ }
+ }
+ {
+ if (all(lessThanEqual(output_Stage3.xyz, vec3(0.0)))) {
+ discard;
+ }
+ vec2 _dstTexCoord = (gl_FragCoord.xy - uDstTextureUpperLeft_Stage4) * uDstTextureCoordScale_Stage4;
+ vec4 _dstColor = texture(uDstTextureSampler_Stage4, _dstTexCoord);
+ sk_FragColor = blend_dst_atop(output_Stage2, _dstColor);
+ sk_FragColor = output_Stage3 * sk_FragColor + (vec4(1.0) - output_Stage3) * _dstColor;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+uniform mat3 uCoordTransformMatrix_3_Stage0;
+in vec2 inPosition;
+in vec2 inLocalCoord;
+out vec2 vTransformedCoords_0_Stage0;
+out vec2 vTransformedCoords_1_Stage0;
+out vec2 vTransformedCoords_2_Stage0;
+out vec2 vTransformedCoords_3_Stage0;
+void main() {
+ vec3 pos3 = uViewM_Stage0 * vec3(inPosition, 1.0);
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ vTransformedCoords_3_Stage0 = (uCoordTransformMatrix_3_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos3.x, pos3.y, 0.0, pos3.z);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/58-48.shader_test b/shaders/skia/58-48.shader_test
new file mode 100644
index 0000000..904c057
--- /dev/null
+++ b/shaders/skia/58-48.shader_test
@@ -0,0 +1,203 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage2;
+uniform float uSurfaceScale_Stage2;
+uniform vec3 uLightColor_Stage2;
+uniform float uKD_Stage2;
+uniform vec4 uTexDom_Stage2;
+uniform vec3 uDecalParams_Stage2;
+uniform vec3 uLightLocation_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 light_Stage2(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ float colorScale = uKD_Stage2 * dot(normal, surfaceToLight);
+ return vec4(lightColor * clamp(colorScale, 0.0, 1.0), 1.0);
+}
+float sobel_Stage2(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage2(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage2(float m[9], float surfaceScale) {
+ return pointToNormal_Stage2(sobel_Stage2(0.0, 0.0, m[3], m[4], m[6], m[7], 0.66666698455810547), sobel_Stage2(m[3], m[6], m[4], m[7], 0.0, 0.0, 0.66666698455810547), surfaceScale);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ vec2 coord = vTransformedCoords_1_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp0 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp5 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp6 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp7 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp8 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = normalize(uLightLocation_Stage2 - vec3(gl_FragCoord.xy, uSurfaceScale_Stage2 * m[4]));
+ output_Stage2 = light_Stage2(normal_Stage2(m, uSurfaceScale_Stage2), surfaceToLight, uLightColor_Stage2);
+ output_Stage2 *= output_Stage1;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/58-49.shader_test b/shaders/skia/58-49.shader_test
new file mode 100644
index 0000000..dec6ae3
--- /dev/null
+++ b/shaders/skia/58-49.shader_test
@@ -0,0 +1,90 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 urectH_Stage2_c0_c0;
+uniform float uinvSixSigma_Stage2_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 RectBlurEffect_Stage2_c0_c0(vec4 _input, vec2 _coords) {
+ vec4 _output;
+ float xCoverage, yCoverage;
+ {
+ float x, y;
+ {
+ x = max(urectH_Stage2_c0_c0.x - gl_FragCoord.x, gl_FragCoord.x - urectH_Stage2_c0_c0.z);
+ y = max(urectH_Stage2_c0_c0.y - gl_FragCoord.y, gl_FragCoord.y - urectH_Stage2_c0_c0.w);
+ }
+ xCoverage = texture(uTextureSampler_0_Stage2, vec2(x * uinvSixSigma_Stage2_c0_c0, 0.5)).w;
+ yCoverage = texture(uTextureSampler_0_Stage2, vec2(y * uinvSixSigma_Stage2_c0_c0, 0.5)).w;
+ _output = (_input * xCoverage) * yCoverage;
+ }
+ _output = (_input * xCoverage) * yCoverage;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ vec2 coord = vTransformedCoords_1_Stage0 - vec2(0.5);
+ vec2 f = fract(coord);
+ coord += 0.5 - f;
+ vec4 wx = mat4(0.055555555555555552, 0.88888888888888884, 0.055555555555555552, 0.0, -0.5, 0.0, 0.5, 0.0, 0.83333333333333337, -2.0, 1.5, -0.33333333333333331, -0.3888888888888889, 1.1666666666666667, -1.1666666666666667, 0.3888888888888889) * vec4(1.0, f.x, f.x * f.x, (f.x * f.x) * f.x);
+ vec4 wy = mat4(0.055555555555555552, 0.88888888888888884, 0.055555555555555552, 0.0, -0.5, 0.0, 0.5, 0.0, 0.83333333333333337, -2.0, 1.5, -0.33333333333333331, -0.3888888888888889, 1.1666666666666667, -1.1666666666666667, 0.3888888888888889) * vec4(1.0, f.y, f.y * f.y, (f.y * f.y) * f.y);
+ vec4 rowColors[4];
+ rowColors[0] = RectBlurEffect_Stage2_c0_c0(vec4(1.0), coord + vec2(-1.0, -1.0));
+ rowColors[1] = RectBlurEffect_Stage2_c0_c0(vec4(1.0), coord + vec2(0.0, -1.0));
+ rowColors[2] = RectBlurEffect_Stage2_c0_c0(vec4(1.0), coord + vec2(1.0, -1.0));
+ rowColors[3] = RectBlurEffect_Stage2_c0_c0(vec4(1.0), coord + vec2(2.0, -1.0));
+ vec4 s0 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ rowColors[0] = RectBlurEffect_Stage2_c0_c0(vec4(1.0), coord + vec2(-1.0, 0.0));
+ rowColors[1] = RectBlurEffect_Stage2_c0_c0(vec4(1.0), coord);
+ rowColors[2] = RectBlurEffect_Stage2_c0_c0(vec4(1.0), coord + vec2(1.0, 0.0));
+ rowColors[3] = RectBlurEffect_Stage2_c0_c0(vec4(1.0), coord + vec2(2.0, 0.0));
+ vec4 s1 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ rowColors[0] = RectBlurEffect_Stage2_c0_c0(vec4(1.0), coord + vec2(-1.0, 1.0));
+ rowColors[1] = RectBlurEffect_Stage2_c0_c0(vec4(1.0), coord + vec2(0.0, 1.0));
+ rowColors[2] = RectBlurEffect_Stage2_c0_c0(vec4(1.0), coord + vec2(1.0, 1.0));
+ rowColors[3] = RectBlurEffect_Stage2_c0_c0(vec4(1.0), coord + vec2(2.0, 1.0));
+ vec4 s2 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ rowColors[0] = RectBlurEffect_Stage2_c0_c0(vec4(1.0), coord + vec2(-1.0, 2.0));
+ rowColors[1] = RectBlurEffect_Stage2_c0_c0(vec4(1.0), coord + vec2(0.0, 2.0));
+ rowColors[2] = RectBlurEffect_Stage2_c0_c0(vec4(1.0), coord + vec2(1.0, 2.0));
+ rowColors[3] = RectBlurEffect_Stage2_c0_c0(vec4(1.0), coord + vec2(2.0, 2.0));
+ vec4 s3 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ vec4 bicubicColor = ((wy.x * s0 + wy.y * s1) + wy.z * s2) + wy.w * s3;
+ bicubicColor = clamp(bicubicColor, 0.0, 1.0);
+ output_Stage2 = bicubicColor * output_Stage1;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/58-6.shader_test b/shaders/skia/58-6.shader_test
new file mode 100644
index 0000000..70cf38d
--- /dev/null
+++ b/shaders/skia/58-6.shader_test
@@ -0,0 +1,165 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage2;
+uniform vec4 ucolor_Stage3_c1_c0;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.w) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ } else {
+ {
+ if (t < uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+vec4 ComposeOne_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_dst_in(_input, TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0)));
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = ComposeOne_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 ConstColorProcessor_Stage3_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage3_c1_c0;
+ }
+ return _output;
+}
+vec4 blend_src(vec4 src, vec4 dst) {
+ return src;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 blend_darken(vec4 src, vec4 dst) {
+ vec4 result = blend_src_over(src, dst);
+ result.xyz = min(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
+ return result;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_src(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ {
+ output_Stage2 = output_Stage1 * ucolor_Stage2;
+ }
+ }
+ vec4 output_Stage3;
+ {
+ output_Stage3 = blend_darken(ConstColorProcessor_Stage3_c1_c0(vec4(1.0)), output_Stage2);
+ }
+ {
+ sk_FragColor = output_Stage3;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 inColor;
+in vec2 inLocalCoord;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/58-8.shader_test b/shaders/skia/58-8.shader_test
new file mode 100644
index 0000000..38d7d6d
--- /dev/null
+++ b/shaders/skia/58-8.shader_test
@@ -0,0 +1,111 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 uscale01_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias01_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale23_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias23_Stage1_c0_c0_c1_c0;
+uniform float uthreshold_Stage1_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage2_c1_c0_c0_c0;
+uniform vec4 ucolor_Stage2_c2_c0_c0_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 RadialGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = length(vTransformedCoords_0_Stage0);
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 DualIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthreshold_Stage1_c0_c0_c1_c0) {
+ scale = uscale01_Stage1_c0_c0_c1_c0;
+ bias = ubias01_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale23_Stage1_c0_c0_c1_c0;
+ bias = ubias23_Stage1_c0_c0_c1_c0;
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = RadialGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = DualIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c1_c0_c0_c0;
+ }
+ return _output;
+}
+vec4 blend_dst_out(vec4 src, vec4 dst) {
+ return (1.0 - src.w) * dst;
+}
+vec4 ComposeOne_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_dst_out(ConstColorProcessor_Stage2_c1_c0_c0_c0(vec4(1.0)), _input);
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c2_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c2_c0_c0_c0;
+ }
+ return _output;
+}
+vec4 blend_src_atop(vec4 src, vec4 dst) {
+ return dst.w * src + (1.0 - src.w) * dst;
+}
+vec4 ComposeOne_Stage2_c2_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_src_atop(ConstColorProcessor_Stage2_c2_c0_c0_c0(vec4(1.0)), _input);
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = ComposeOne_Stage2_c2_c0(ComposeOne_Stage2_c1_c0(output_Stage1));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/58-9.shader_test b/shaders/skia/58-9.shader_test
new file mode 100644
index 0000000..cf937aa
--- /dev/null
+++ b/shaders/skia/58-9.shader_test
@@ -0,0 +1,123 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 uscale01_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias01_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale23_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias23_Stage1_c0_c0_c1_c0;
+uniform float uthreshold_Stage1_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage2_c1_c0_c0_c0;
+uniform vec4 ucolor_Stage2_c2_c0_c0_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 RadialGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = length(vTransformedCoords_0_Stage0);
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 DualIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthreshold_Stage1_c0_c0_c1_c0) {
+ scale = uscale01_Stage1_c0_c0_c1_c0;
+ bias = ubias01_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale23_Stage1_c0_c0_c1_c0;
+ bias = ubias23_Stage1_c0_c0_c1_c0;
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = RadialGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = DualIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c1_c0_c0_c0;
+ }
+ return _output;
+}
+float _guarded_divide(float n, float d) {
+ return n / d;
+}
+float _color_burn_component(float sc, float sa, float dc, float da) {
+ if (da == dc) {
+ return (sa * da + sc * (1.0 - da)) + dc * (1.0 - sa);
+ } else if (sc == 0.0) {
+ return dc * (1.0 - sa);
+ }
+ float d = max(0.0, da - _guarded_divide((da - dc) * sa, sc));
+ return (d * sa + sc * (1.0 - da)) + dc * (1.0 - sa);
+}
+vec4 blend_color_burn(vec4 src, vec4 dst) {
+ return vec4(_color_burn_component(src.x, src.w, dst.x, dst.w), _color_burn_component(src.y, src.w, dst.y, dst.w), _color_burn_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+}
+vec4 ComposeOne_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_color_burn(ConstColorProcessor_Stage2_c1_c0_c0_c0(vec4(1.0)), _input);
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c2_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c2_c0_c0_c0;
+ }
+ return _output;
+}
+vec4 blend_exclusion(vec4 src, vec4 dst) {
+ return vec4((dst.xyz + src.xyz) - (2.0 * dst.xyz) * src.xyz, src.w + (1.0 - src.w) * dst.w);
+}
+vec4 ComposeOne_Stage2_c2_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_exclusion(ConstColorProcessor_Stage2_c2_c0_c0_c0(vec4(1.0)), _input);
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = ComposeOne_Stage2_c2_c0(ComposeOne_Stage2_c1_c0(output_Stage1));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/58.shader_test b/shaders/skia/58.shader_test
new file mode 100644
index 0000000..682f74e
--- /dev/null
+++ b/shaders/skia/58.shader_test
@@ -0,0 +1,57 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 usubset_Stage1_c0_c0;
+uniform vec4 uclamp_Stage1_c0_c0;
+uniform sampler2DRect uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 inCoord = vTransformedCoords_0_Stage0;
+ vec2 subsetCoord;
+ subsetCoord.x = inCoord.x;
+ {
+ float w = usubset_Stage1_c0_c0.w - usubset_Stage1_c0_c0.y;
+ float w2 = 2.0 * w;
+ float m = mod(inCoord.y - usubset_Stage1_c0_c0.y, w2);
+ subsetCoord.y = mix(m, w2 - m, step(w, m)) + usubset_Stage1_c0_c0.y;
+ }
+ vec2 clampedCoord;
+ clampedCoord.x = subsetCoord.x;
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage1_c0_c0.y, uclamp_Stage1_c0_c0.w);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ _output = _input * textureColor;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TextureEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/580-2.shader_test b/shaders/skia/580-2.shader_test
new file mode 100644
index 0000000..b99fe7f
--- /dev/null
+++ b/shaders/skia/580-2.shader_test
@@ -0,0 +1,79 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_KHR_blend_equation_advanced : require
+out vec4 sk_FragColor;
+layout (blend_support_all_equations) out ;
+uniform float uPixelSize_Stage3;
+uniform vec2 uRange_Stage3;
+uniform sampler2D uTextureSampler_0_Stage0;
+uniform sampler2D uTextureSampler_0_Stage3;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vtextureCoords_Stage0;
+flat in vec4 vtextureDomain_Stage0;
+flat in vec4 vcolor_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ vec2 textureCoords;
+ textureCoords = vtextureCoords_Stage0;
+ vec4 textureDomain;
+ textureDomain = vtextureDomain_Stage0;
+ outputColor_Stage0 = vcolor_Stage0;
+ outputColor_Stage0 = texture(uTextureSampler_0_Stage0, clamp(textureCoords, textureDomain.xy, textureDomain.zw)) * outputColor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ {
+ output_Stage1 = clamp(outputColor_Stage0, 0.0, 1.0);
+ }
+ }
+ vec4 output_Stage2;
+ {
+ {
+ float alpha = clamp(output_Stage1.w, 0.0, 1.0);
+ output_Stage2 = vec4(clamp(output_Stage1.xyz, 0.0, alpha), alpha);
+ }
+ }
+ vec4 output_Stage3;
+ {
+ output_Stage3 = vec4(1.0, 1.0, 1.0, 1.0);
+ vec2 coord = vTransformedCoords_0_Stage0;
+ coord.y -= 10.0 * uPixelSize_Stage3;
+ for (int i = 0;i < 21; i++) {
+ output_Stage3 = min(output_Stage3, texture(uTextureSampler_0_Stage3, coord));
+ coord.y += uPixelSize_Stage3;
+ }
+ output_Stage3 *= output_Stage2;
+ }
+ {
+ sk_FragColor = output_Stage3;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 textureCoords;
+in vec4 textureDomain;
+in vec4 color;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vtextureCoords_Stage0;
+flat out vec4 vtextureDomain_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vec2 pos2 = position;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(textureCoords, 1.0)).xy;
+ vtextureCoords_Stage0 = textureCoords;
+ vtextureDomain_Stage0 = textureDomain;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/580-3.shader_test b/shaders/skia/580-3.shader_test
new file mode 100644
index 0000000..6104734
--- /dev/null
+++ b/shaders/skia/580-3.shader_test
@@ -0,0 +1,61 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uScale_Stage2;
+uniform vec4 uTexDom_Stage2;
+uniform vec3 uDecalParams_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+uniform sampler2D uTextureSampler_1_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+void main() {
+ vec4 output_Stage2;
+ {
+ vec4 dColor = texture(uTextureSampler_0_Stage2, vTransformedCoords_1_Stage0);
+ dColor.xyz = dColor.w < 9.9999999747524271e-07 ? vec3(0.0) : clamp(dColor.xyz / dColor.w, 0.0, 1.0);
+ vec2 cCoords = vTransformedCoords_2_Stage0 + uScale_Stage2 * (dColor.yy - vec2(0.5));
+ {
+ vec2 origCoord = cCoords;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ output_Stage2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/580-4.shader_test b/shaders/skia/580-4.shader_test
new file mode 100644
index 0000000..7a59fb2
--- /dev/null
+++ b/shaders/skia/580-4.shader_test
@@ -0,0 +1,102 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 urectUniform_Stage2_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 AARectEffect_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ float alpha;
+ {
+ alpha = float(all(greaterThan(vec4(gl_FragCoord.xy, urectUniform_Stage2_c0_c0.zw), vec4(urectUniform_Stage2_c0_c0.xy, gl_FragCoord.xy))) ? 1 : 0);
+ }
+ {
+ alpha = 1.0 - alpha;
+ }
+ _output = _input * alpha;
+ return _output;
+}
+float _blend_color_saturation(vec3 color) {
+ return max(max(color.x, color.y), color.z) - min(min(color.x, color.y), color.z);
+}
+vec3 _blend_set_color_saturation_helper(vec3 minMidMax, float sat) {
+ if (minMidMax.x < minMidMax.z) {
+ return vec3(0.0, (sat * (minMidMax.y - minMidMax.x)) / (minMidMax.z - minMidMax.x), sat);
+ }
+ return vec3(0.0);
+}
+vec3 _blend_set_color_saturation(vec3 hueLumColor, vec3 satColor) {
+ float sat = _blend_color_saturation(satColor);
+ if (hueLumColor.x <= hueLumColor.y) {
+ if (hueLumColor.y <= hueLumColor.z) {
+ hueLumColor.xyz = _blend_set_color_saturation_helper(hueLumColor, sat);
+ } else if (hueLumColor.x <= hueLumColor.z) {
+ hueLumColor.xzy = _blend_set_color_saturation_helper(hueLumColor.xzy, sat);
+ } else {
+ hueLumColor.zxy = _blend_set_color_saturation_helper(hueLumColor.zxy, sat);
+ }
+ } else if (hueLumColor.x <= hueLumColor.z) {
+ hueLumColor.yxz = _blend_set_color_saturation_helper(hueLumColor.yxz, sat);
+ } else if (hueLumColor.y <= hueLumColor.z) {
+ hueLumColor.yzx = _blend_set_color_saturation_helper(hueLumColor.yzx, sat);
+ } else {
+ hueLumColor.zyx = _blend_set_color_saturation_helper(hueLumColor.zyx, sat);
+ }
+ return hueLumColor;
+}
+float _blend_color_luminance(vec3 color) {
+ return dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), color);
+}
+vec3 _blend_set_color_luminance(vec3 hueSatColor, float alpha, vec3 lumColor) {
+ float lum = _blend_color_luminance(lumColor);
+ vec3 result = (lum - _blend_color_luminance(hueSatColor)) + hueSatColor;
+ float minComp = min(min(result.x, result.y), result.z);
+ float maxComp = max(max(result.x, result.y), result.z);
+ if (minComp < 0.0 && lum != minComp) {
+ result = lum + ((result - lum) * lum) / (lum - minComp);
+ }
+ if (maxComp > alpha && maxComp != lum) {
+ return lum + ((result - lum) * (alpha - lum)) / (maxComp - lum);
+ }
+ return result;
+}
+vec4 blend_saturation(vec4 src, vec4 dst) {
+ float alpha = dst.w * src.w;
+ vec3 sda = src.xyz * dst.w;
+ vec3 dsa = dst.xyz * src.w;
+ return vec4((((_blend_set_color_luminance(_blend_set_color_saturation(dsa, sda), alpha, dsa) + dst.xyz) - dsa) + src.xyz) - sda, (src.w + dst.w) - alpha);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_saturation(output_Stage1, AARectEffect_Stage2_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/580.shader_test b/shaders/skia/580.shader_test
new file mode 100644
index 0000000..44c74da
--- /dev/null
+++ b/shaders/skia/580.shader_test
@@ -0,0 +1,132 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.w) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ } else {
+ {
+ if (t < uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = OverrideInputFragmentProcessor_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 blend_multiply(vec4 src, vec4 dst) {
+ return vec4(((1.0 - src.w) * dst.xyz + (1.0 - dst.w) * src.xyz) + src.xyz * dst.xyz, src.w + (1.0 - src.w) * dst.w);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_multiply(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 inColor;
+in vec2 inLocalCoord;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/583-2.shader_test b/shaders/skia/583-2.shader_test
new file mode 100644
index 0000000..835c92f
--- /dev/null
+++ b/shaders/skia/583-2.shader_test
@@ -0,0 +1,513 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform float uSrcTF_Stage0[7];
+uniform mat3 uColorXform_Stage0;
+uniform float uDstTF_Stage0[7];
+uniform float uinnerThreshold_Stage1;
+uniform float uouterThreshold_Stage1;
+uniform vec2 uImageIncrement_Stage2;
+uniform float uSurfaceScale_Stage2;
+uniform vec3 uLightColor_Stage2;
+uniform float uKD_Stage2;
+uniform vec4 uTexDom_Stage2;
+uniform vec3 uDecalParams_Stage2;
+uniform vec3 uLightLocation_Stage2;
+uniform mat4 um_Stage3;
+uniform vec4 uv_Stage3;
+uniform vec2 uImageIncrement_Stage4_c0_c0;
+uniform float uSurfaceScale_Stage4_c0_c0;
+uniform vec3 uLightColor_Stage4_c0_c0;
+uniform float uKS_Stage4_c0_c0;
+uniform float uShininess_Stage4_c0_c0;
+uniform vec4 uTexDom_Stage4_c0_c0;
+uniform vec3 uDecalParams_Stage4_c0_c0;
+uniform vec3 uLightDirection_Stage4_c0_c0;
+uniform vec4 urectUniform_Stage5;
+uniform vec2 uDstTextureUpperLeft_Stage6;
+uniform vec2 uDstTextureCoordScale_Stage6;
+uniform sampler2D uTextureSampler_0_Stage0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+uniform sampler2D uTextureSampler_0_Stage4;
+uniform sampler2D uDstTextureSampler_Stage6;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+noperspective in vec2 vtextureCoords_Stage0;
+flat in vec4 vtextureDomain_Stage0;
+flat in vec4 vcolor_Stage0;
+float src_tf_Stage0(float x) {
+ float G = uSrcTF_Stage0[0];
+ float A = uSrcTF_Stage0[1];
+ float B = uSrcTF_Stage0[2];
+ float C = uSrcTF_Stage0[3];
+ float D = uSrcTF_Stage0[4];
+ float E = uSrcTF_Stage0[5];
+ float F = uSrcTF_Stage0[6];
+ float s = sign(x);
+ x = abs(x);
+ x = x < D ? C * x + F : pow(A * x + B, G) + E;
+ return s * x;
+}
+float dst_tf_Stage0(float x) {
+ float G = uDstTF_Stage0[0];
+ float A = uDstTF_Stage0[1];
+ float B = uDstTF_Stage0[2];
+ float C = uDstTF_Stage0[3];
+ float D = uDstTF_Stage0[4];
+ float E = uDstTF_Stage0[5];
+ float F = uDstTF_Stage0[6];
+ float s = sign(x);
+ x = abs(x);
+ x = x < D ? C * x + F : pow(A * x + B, G) + E;
+ return s * x;
+}
+vec4 gamut_xform_Stage0(vec4 color) {
+ color.xyz = uColorXform_Stage0 * color.xyz;
+ return color;
+}
+vec4 color_xform_Stage0(vec4 color) {
+ float nonZeroAlpha = max(color.w, 9.9999997473787516e-05);
+ color = vec4(color.xyz / nonZeroAlpha, nonZeroAlpha);
+ color.x = src_tf_Stage0(color.x);
+ color.y = src_tf_Stage0(color.y);
+ color.z = src_tf_Stage0(color.z);
+ color = gamut_xform_Stage0(color);
+ color.x = dst_tf_Stage0(color.x);
+ color.y = dst_tf_Stage0(color.y);
+ color.z = dst_tf_Stage0(color.z);
+ color.xyz *= color.w;
+ return color;
+}
+vec4 light_Stage2(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ float colorScale = uKD_Stage2 * dot(normal, surfaceToLight);
+ return vec4(lightColor * clamp(colorScale, 0.0, 1.0), 1.0);
+}
+float sobel_Stage2(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage2(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage2(float m[9], float surfaceScale) {
+ return pointToNormal_Stage2(sobel_Stage2(m[1], m[2], m[4], m[5], m[7], m[8], 0.5), sobel_Stage2(0.0, 0.0, m[1], m[7], m[2], m[8], 0.33333298563957214), surfaceScale);
+}
+vec4 light_Stage4_c0_c0(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ vec3 halfDir = normalize(surfaceToLight + vec3(0.0, 0.0, 1.0));
+ float colorScale = uKS_Stage4_c0_c0 * pow(dot(normal, halfDir), uShininess_Stage4_c0_c0);
+ vec3 color = lightColor * clamp(colorScale, 0.0, 1.0);
+ return vec4(color, max(max(color.x, color.y), color.z));
+}
+float sobel_Stage4_c0_c0(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage4_c0_c0(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage4_c0_c0(float m[9], float surfaceScale) {
+ return pointToNormal_Stage4_c0_c0(sobel_Stage4_c0_c0(m[0], m[1], m[3], m[4], 0.0, 0.0, 0.66666698455810547), sobel_Stage4_c0_c0(m[0], m[3], m[1], m[4], 0.0, 0.0, 0.66666698455810547), surfaceScale);
+}
+vec4 SpecularLighting_Stage4_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coord = vTransformedCoords_2_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage4_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage4_c0_c0.xy, uTexDom_Stage4_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage4, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage4_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage4_c0_c0.y);
+ if (err > uDecalParams_Stage4_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage4_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp0 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage4_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage4_c0_c0.xy, uTexDom_Stage4_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage4, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage4_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage4_c0_c0.y);
+ if (err > uDecalParams_Stage4_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage4_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage4_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage4_c0_c0.xy, uTexDom_Stage4_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage4, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage4_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage4_c0_c0.y);
+ if (err > uDecalParams_Stage4_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage4_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage4_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage4_c0_c0.xy, uTexDom_Stage4_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage4, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage4_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage4_c0_c0.y);
+ if (err > uDecalParams_Stage4_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage4_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage4_c0_c0.xy, uTexDom_Stage4_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage4, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage4_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage4_c0_c0.y);
+ if (err > uDecalParams_Stage4_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage4_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage4_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage4_c0_c0.xy, uTexDom_Stage4_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage4, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage4_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage4_c0_c0.y);
+ if (err > uDecalParams_Stage4_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage4_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp5 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage4_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage4_c0_c0.xy, uTexDom_Stage4_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage4, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage4_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage4_c0_c0.y);
+ if (err > uDecalParams_Stage4_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage4_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp6 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage4_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage4_c0_c0.xy, uTexDom_Stage4_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage4, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage4_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage4_c0_c0.y);
+ if (err > uDecalParams_Stage4_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage4_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp7 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage4_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage4_c0_c0.xy, uTexDom_Stage4_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage4, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage4_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage4_c0_c0.y);
+ if (err > uDecalParams_Stage4_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage4_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp8 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = uLightDirection_Stage4_c0_c0;
+ _output = light_Stage4_c0_c0(normal_Stage4_c0_c0(m, uSurfaceScale_Stage4_c0_c0), surfaceToLight, uLightColor_Stage4_c0_c0);
+ _output *= _input;
+ return _output;
+}
+float _guarded_divide(float n, float d) {
+ return n / d;
+}
+float _color_burn_component(float sc, float sa, float dc, float da) {
+ if (da == dc) {
+ return (sa * da + sc * (1.0 - da)) + dc * (1.0 - sa);
+ } else if (sc == 0.0) {
+ return dc * (1.0 - sa);
+ }
+ float d = max(0.0, da - _guarded_divide((da - dc) * sa, sc));
+ return (d * sa + sc * (1.0 - da)) + dc * (1.0 - sa);
+}
+vec4 blend_color_burn(vec4 src, vec4 dst) {
+ return vec4(_color_burn_component(src.x, src.w, dst.x, dst.w), _color_burn_component(src.y, src.w, dst.y, dst.w), _color_burn_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ vec2 textureCoords;
+ textureCoords = vtextureCoords_Stage0;
+ vec4 textureDomain;
+ textureDomain = vtextureDomain_Stage0;
+ outputColor_Stage0 = vcolor_Stage0;
+ outputColor_Stage0 = color_xform_Stage0(texture(uTextureSampler_0_Stage0, clamp(textureCoords, textureDomain.xy, textureDomain.zw))) * outputColor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec4 color = outputColor_Stage0;
+ vec4 mask_color = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ if (mask_color.w < 0.5) {
+ if (color.w > uouterThreshold_Stage1) {
+ float scale = uouterThreshold_Stage1 / color.w;
+ color.xyz *= scale;
+ color.w = uouterThreshold_Stage1;
+ }
+ } else if (color.w < uinnerThreshold_Stage1) {
+ float scale = uinnerThreshold_Stage1 / max(0.0010000000474974513, color.w);
+ color.xyz *= scale;
+ color.w = uinnerThreshold_Stage1;
+ }
+ output_Stage1 = color;
+ }
+ vec4 output_Stage2;
+ {
+ vec2 coord = vTransformedCoords_1_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp0 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp5 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp6 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp7 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp8 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = normalize(uLightLocation_Stage2 - vec3(gl_FragCoord.xy, uSurfaceScale_Stage2 * m[4]));
+ output_Stage2 = light_Stage2(normal_Stage2(m, uSurfaceScale_Stage2), surfaceToLight, uLightColor_Stage2);
+ }
+ vec4 output_Stage3;
+ {
+ vec4 inputColor = output_Stage2;
+ output_Stage3 = um_Stage3 * inputColor + uv_Stage3;
+ {
+ output_Stage3.w = clamp(output_Stage3.w, 0.0, 1.0);
+ }
+ {
+ output_Stage3.xyz *= output_Stage3.w;
+ }
+ }
+ vec4 output_Stage4;
+ {
+ output_Stage4 = blend_color_burn(output_Stage3, SpecularLighting_Stage4_c0_c0(vec4(1.0)));
+ }
+ vec4 output_Stage5;
+ {
+ float alpha;
+ {
+ float xSub, ySub;
+ xSub = min(gl_FragCoord.x - urectUniform_Stage5.x, 0.0);
+ xSub += min(urectUniform_Stage5.z - gl_FragCoord.x, 0.0);
+ ySub = min(gl_FragCoord.y - urectUniform_Stage5.y, 0.0);
+ ySub += min(urectUniform_Stage5.w - gl_FragCoord.y, 0.0);
+ alpha = (1.0 + max(xSub, -1.0)) * (1.0 + max(ySub, -1.0));
+ }
+ output_Stage5 = output_Stage4 * alpha;
+ }
+ {
+ if (all(lessThanEqual(output_Stage5.xyz, vec3(0.0)))) {
+ discard;
+ }
+ vec2 _dstTexCoord = (gl_FragCoord.xy - uDstTextureUpperLeft_Stage6) * uDstTextureCoordScale_Stage6;
+ vec4 _dstColor = texture(uDstTextureSampler_Stage6, _dstTexCoord);
+ sk_FragColor = blend_src_in(output_Stage1, _dstColor);
+ sk_FragColor = output_Stage5 * sk_FragColor + (vec4(1.0) - output_Stage5) * _dstColor;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+in vec2 position;
+in vec2 textureCoords;
+in vec4 textureDomain;
+in vec4 color;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+noperspective out vec2 vtextureCoords_Stage0;
+flat out vec4 vtextureDomain_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vec2 pos2 = position;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(textureCoords, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(textureCoords, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(textureCoords, 1.0)).xy;
+ vtextureCoords_Stage0 = textureCoords;
+ vtextureDomain_Stage0 = textureDomain;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/583-3.shader_test b/shaders/skia/583-3.shader_test
new file mode 100644
index 0000000..3895fa2
--- /dev/null
+++ b/shaders/skia/583-3.shader_test
@@ -0,0 +1,61 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uScale_Stage2;
+uniform vec4 uTexDom_Stage2;
+uniform vec3 uDecalParams_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+uniform sampler2D uTextureSampler_1_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+void main() {
+ vec4 output_Stage2;
+ {
+ vec4 dColor = texture(uTextureSampler_0_Stage2, vTransformedCoords_1_Stage0);
+ dColor.xyz = dColor.w < 9.9999999747524271e-07 ? vec3(0.0) : clamp(dColor.xyz / dColor.w, 0.0, 1.0);
+ vec2 cCoords = vTransformedCoords_2_Stage0 + uScale_Stage2 * (dColor.zy - vec2(0.5));
+ {
+ vec2 origCoord = cCoords;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ output_Stage2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/583-4.shader_test b/shaders/skia/583-4.shader_test
new file mode 100644
index 0000000..9c66842
--- /dev/null
+++ b/shaders/skia/583-4.shader_test
@@ -0,0 +1,45 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 Big_Ole_Key_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = _input;
+ return _output;
+}
+vec4 blend_src_atop(vec4 src, vec4 dst) {
+ return dst.w * src + (1.0 - src.w) * dst;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_src_atop(Big_Ole_Key_Stage2_c0_c0(vec4(1.0)), output_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/583.shader_test b/shaders/skia/583.shader_test
new file mode 100644
index 0000000..d9469a1
--- /dev/null
+++ b/shaders/skia/583.shader_test
@@ -0,0 +1,61 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 ucolor_Stage1_c0_c0_c0_c0;
+noperspective in vec4 vcolor_Stage0;
+vec4 ConstColorProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = _input.w * ucolor_Stage1_c0_c0_c0_c0;
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = ConstColorProcessor_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 blend_multiply(vec4 src, vec4 dst) {
+ return vec4(((1.0 - src.w) * dst.xyz + (1.0 - dst.w) * src.xyz) + src.xyz * dst.xyz, src.w + (1.0 - src.w) * dst.w);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_multiply(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 position;
+in vec4 inColor;
+noperspective out vec4 vcolor_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/586-2.shader_test b/shaders/skia/586-2.shader_test
new file mode 100644
index 0000000..c64c7c7
--- /dev/null
+++ b/shaders/skia/586-2.shader_test
@@ -0,0 +1,145 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vEllipseOffsets0_Stage0;
+noperspective in vec2 vEllipseOffsets1_Stage0;
+noperspective in vec4 vinColor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_0_Stage0;
+ float t = -1.0;
+ float v = 1.0;
+ {
+ {
+ float fx = ufocalParams_Stage1_c0_c0_c0_c0.y;
+ float x_t = -1.0;
+ {
+ x_t = dot(p, p) / p.x;
+ }
+ {
+ if (x_t <= 0.0) {
+ v = -1.0;
+ }
+ }
+ {
+ {
+ t = x_t + fx;
+ }
+ }
+ }
+ }
+ _output = vec4(t, v, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ vec2 scaledOffset = vEllipseOffsets0_Stage0;
+ float test = dot(scaledOffset, scaledOffset) - 1.0;
+ vec2 duvdx = dFdx(vEllipseOffsets0_Stage0);
+ vec2 duvdy = -dFdy(vEllipseOffsets0_Stage0);
+ vec2 grad = vec2(vEllipseOffsets0_Stage0.x * duvdx.x + vEllipseOffsets0_Stage0.y * duvdx.y, vEllipseOffsets0_Stage0.x * duvdy.x + vEllipseOffsets0_Stage0.y * duvdy.y);
+ float grad_dot = 4.0 * dot(grad, grad);
+ grad_dot = max(grad_dot, 1.1754999560161448e-38);
+ float invlen = inversesqrt(grad_dot);
+ float edgeAlpha = clamp(0.5 - test * invlen, 0.0, 1.0);
+ scaledOffset = vEllipseOffsets1_Stage0;
+ test = dot(scaledOffset, scaledOffset) - 1.0;
+ duvdx = dFdx(vEllipseOffsets1_Stage0);
+ duvdy = -dFdy(vEllipseOffsets1_Stage0);
+ grad = vec2(vEllipseOffsets1_Stage0.x * duvdx.x + vEllipseOffsets1_Stage0.y * duvdx.y, vEllipseOffsets1_Stage0.x * duvdy.x + vEllipseOffsets1_Stage0.y * duvdy.y);
+ grad_dot = 4.0 * dot(grad, grad);
+ invlen = inversesqrt(grad_dot);
+ edgeAlpha *= clamp(0.5 + test * invlen, 0.0, 1.0);
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ {
+ blend_dst_in(outputCoverage_Stage0, ClampedGradientEffect_Stage1_c0_c0(vec4(1.0)));
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec2 inEllipseOffsets0;
+in vec2 inEllipseOffsets1;
+noperspective out vec2 vEllipseOffsets0_Stage0;
+noperspective out vec2 vEllipseOffsets1_Stage0;
+noperspective out vec4 vinColor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vEllipseOffsets0_Stage0 = inEllipseOffsets0;
+ vEllipseOffsets1_Stage0 = inEllipseOffsets1;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = (uViewM_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/586-3.shader_test b/shaders/skia/586-3.shader_test
new file mode 100644
index 0000000..c54b3e8
--- /dev/null
+++ b/shaders/skia/586-3.shader_test
@@ -0,0 +1,61 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uScale_Stage2;
+uniform vec4 uTexDom_Stage2;
+uniform vec3 uDecalParams_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+uniform sampler2D uTextureSampler_1_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+void main() {
+ vec4 output_Stage2;
+ {
+ vec4 dColor = texture(uTextureSampler_0_Stage2, vTransformedCoords_1_Stage0);
+ dColor.xyz = dColor.w < 9.9999999747524271e-07 ? vec3(0.0) : clamp(dColor.xyz / dColor.w, 0.0, 1.0);
+ vec2 cCoords = vTransformedCoords_2_Stage0 + uScale_Stage2 * (dColor.ww - vec2(0.5));
+ {
+ vec2 origCoord = cCoords;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ output_Stage2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/586-4.shader_test b/shaders/skia/586-4.shader_test
new file mode 100644
index 0000000..4f25641
--- /dev/null
+++ b/shaders/skia/586-4.shader_test
@@ -0,0 +1,66 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform float ucornerRadius_Stage2_c0_c0;
+uniform vec4 uproxyRect_Stage2_c0_c0;
+uniform float ublurRadius_Stage2_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 RRectBlurEffect_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 translatedFragPos = gl_FragCoord.xy - uproxyRect_Stage2_c0_c0.xy;
+ float threshold = ucornerRadius_Stage2_c0_c0 + 2.0 * ublurRadius_Stage2_c0_c0;
+ vec2 middle = (uproxyRect_Stage2_c0_c0.zw - uproxyRect_Stage2_c0_c0.xy) - 2.0 * threshold;
+ if (translatedFragPos.x >= threshold && translatedFragPos.x < middle.x + threshold) {
+ translatedFragPos.x = threshold;
+ } else if (translatedFragPos.x >= middle.x + threshold) {
+ translatedFragPos.x -= middle.x - 1.0;
+ }
+ if (translatedFragPos.y > threshold && translatedFragPos.y < middle.y + threshold) {
+ translatedFragPos.y = threshold;
+ } else if (translatedFragPos.y >= middle.y + threshold) {
+ translatedFragPos.y -= middle.y - 1.0;
+ }
+ vec2 proxyDims = vec2(2.0 * threshold + 1.0);
+ vec2 texCoord = translatedFragPos / proxyDims;
+ _output = _input * texture(uTextureSampler_0_Stage2, texCoord);
+ return _output;
+}
+vec4 blend_multiply(vec4 src, vec4 dst) {
+ return vec4(((1.0 - src.w) * dst.xyz + (1.0 - dst.w) * src.xyz) + src.xyz * dst.xyz, src.w + (1.0 - src.w) * dst.w);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_multiply(RRectBlurEffect_Stage2_c0_c0(vec4(1.0)), output_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/586.shader_test b/shaders/skia/586.shader_test
new file mode 100644
index 0000000..64a70ae
--- /dev/null
+++ b/shaders/skia/586.shader_test
@@ -0,0 +1,152 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage2_c1_c0;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.w) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ } else {
+ {
+ if (t < uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = OverrideInputFragmentProcessor_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c1_c0;
+ }
+ return _output;
+}
+vec4 blend_multiply(vec4 src, vec4 dst) {
+ return vec4(((1.0 - src.w) * dst.xyz + (1.0 - dst.w) * src.xyz) + src.xyz * dst.xyz, src.w + (1.0 - src.w) * dst.w);
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 blend_darken(vec4 src, vec4 dst) {
+ vec4 result = blend_src_over(src, dst);
+ result.xyz = min(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
+ return result;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_multiply(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_darken(ConstColorProcessor_Stage2_c1_c0(vec4(1.0)), output_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 inColor;
+in vec2 inLocalCoord;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/589-2.shader_test b/shaders/skia/589-2.shader_test
new file mode 100644
index 0000000..d92a912
--- /dev/null
+++ b/shaders/skia/589-2.shader_test
@@ -0,0 +1,30 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+noperspective in vec4 vcolor_Stage0;
+void main() {
+ {
+ sk_FragColor = vec4(1.0);
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 inPosition;
+in vec4 inColor;
+in vec2 inLocalCoord;
+noperspective out vec4 vcolor_Stage0;
+void main() {
+ vec4 color = inColor;
+ vcolor_Stage0 = color;
+ vec2 pos2 = inPosition;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/589-3.shader_test b/shaders/skia/589-3.shader_test
new file mode 100644
index 0000000..1b90391
--- /dev/null
+++ b/shaders/skia/589-3.shader_test
@@ -0,0 +1,61 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uScale_Stage2;
+uniform vec4 uTexDom_Stage2;
+uniform vec3 uDecalParams_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+uniform sampler2D uTextureSampler_1_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+void main() {
+ vec4 output_Stage2;
+ {
+ vec4 dColor = texture(uTextureSampler_0_Stage2, vTransformedCoords_1_Stage0);
+ dColor.xyz = dColor.w < 9.9999999747524271e-07 ? vec3(0.0) : clamp(dColor.xyz / dColor.w, 0.0, 1.0);
+ vec2 cCoords = vTransformedCoords_2_Stage0 + uScale_Stage2 * (dColor.zz - vec2(0.5));
+ {
+ vec2 origCoord = cCoords;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ output_Stage2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/589-4.shader_test b/shaders/skia/589-4.shader_test
new file mode 100644
index 0000000..5ef4c21
--- /dev/null
+++ b/shaders/skia/589-4.shader_test
@@ -0,0 +1,88 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage2_c0_c0;
+uniform vec4 uKernel_Stage2_c0_c0[2];
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 GaussianConvolution_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_1_Stage0 - 2.0 * uImageIncrement_Stage2_c0_c0;
+ vec2 coordSampled = vec2(0.0, 0.0);
+ coordSampled = coord;
+ _output += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2_c0_c0[0].x;
+ coord += uImageIncrement_Stage2_c0_c0;
+ coordSampled = coord;
+ _output += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2_c0_c0[0].y;
+ coord += uImageIncrement_Stage2_c0_c0;
+ coordSampled = coord;
+ _output += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2_c0_c0[0].z;
+ coord += uImageIncrement_Stage2_c0_c0;
+ coordSampled = coord;
+ _output += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2_c0_c0[0].w;
+ coord += uImageIncrement_Stage2_c0_c0;
+ coordSampled = coord;
+ _output += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2_c0_c0[1].x;
+ coord += uImageIncrement_Stage2_c0_c0;
+ _output *= _input;
+ return _output;
+}
+float _guarded_divide(float n, float d) {
+ return n / d;
+}
+float _soft_light_component(float sc, float sa, float dc, float da) {
+ if (2.0 * sc <= sa) {
+ return (_guarded_divide((dc * dc) * (sa - 2.0 * sc), da) + (1.0 - da) * sc) + dc * ((-sa + 2.0 * sc) + 1.0);
+ } else if (4.0 * dc <= da) {
+ float DSqd = dc * dc;
+ float DCub = DSqd * dc;
+ float DaSqd = da * da;
+ float DaCub = DaSqd * da;
+ return _guarded_divide(((DaSqd * (sc - dc * ((3.0 * sa - 6.0 * sc) - 1.0)) + ((12.0 * da) * DSqd) * (sa - 2.0 * sc)) - (16.0 * DCub) * (sa - 2.0 * sc)) - DaCub * sc, DaSqd);
+ }
+ return ((dc * ((sa - 2.0 * sc) + 1.0) + sc) - sqrt(da * dc) * (sa - 2.0 * sc)) - da * sc;
+}
+vec4 blend_soft_light(vec4 src, vec4 dst) {
+ if (dst.w == 0.0) {
+ return src;
+ }
+ return vec4(_soft_light_component(src.x, src.w, dst.x, dst.w), _soft_light_component(src.y, src.w, dst.y, dst.w), _soft_light_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_soft_light(output_Stage1, GaussianConvolution_Stage2_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/589.shader_test b/shaders/skia/589.shader_test
new file mode 100644
index 0000000..efdff8f
--- /dev/null
+++ b/shaders/skia/589.shader_test
@@ -0,0 +1,81 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 ucolor_Stage1_c0_c0_c0_c0;
+uniform vec4 ucolor_Stage2_c1_c0;
+noperspective in vec4 vcolor_Stage0;
+vec4 ConstColorProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = _input.w * ucolor_Stage1_c0_c0_c0_c0;
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = ConstColorProcessor_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c1_c0;
+ }
+ return _output;
+}
+vec4 blend_multiply(vec4 src, vec4 dst) {
+ return vec4(((1.0 - src.w) * dst.xyz + (1.0 - dst.w) * src.xyz) + src.xyz * dst.xyz, src.w + (1.0 - src.w) * dst.w);
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 blend_darken(vec4 src, vec4 dst) {
+ vec4 result = blend_src_over(src, dst);
+ result.xyz = min(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
+ return result;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_multiply(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_darken(ConstColorProcessor_Stage2_c1_c0(vec4(1.0)), output_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 position;
+in vec4 inColor;
+noperspective out vec4 vcolor_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/592-2.shader_test b/shaders/skia/592-2.shader_test
new file mode 100644
index 0000000..058ca4d
--- /dev/null
+++ b/shaders/skia/592-2.shader_test
@@ -0,0 +1,458 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1_c0_c0;
+uniform vec2 uBounds_Stage1_c0_c0;
+uniform vec4 uKernel_Stage1_c0_c0[5];
+uniform vec2 uImageIncrement_Stage1_c1_c0_c0_c0_c0_c0;
+uniform float uSurfaceScale_Stage1_c1_c0_c0_c0_c0_c0;
+uniform vec3 uLightColor_Stage1_c1_c0_c0_c0_c0_c0;
+uniform float uKD_Stage1_c1_c0_c0_c0_c0_c0;
+uniform vec4 uTexDom_Stage1_c1_c0_c0_c0_c0_c0;
+uniform vec3 uDecalParams_Stage1_c1_c0_c0_c0_c0_c0;
+uniform vec3 uLightLocation_Stage1_c1_c0_c0_c0_c0_c0;
+uniform vec4 uinnerRect_Stage1_c1_c0_c0_c0_c1_c0;
+uniform vec4 uinvRadiiLTRB_Stage1_c1_c0_c0_c0_c1_c0;
+uniform vec4 urectUniform_Stage1_c1_c0_c1_c0_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+uniform sampler2D uTextureSampler_2_Stage1;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+vec4 GaussianConvolution_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0 - 9.0 * uImageIncrement_Stage1_c0_c0;
+ vec2 coordSampled = vec2(0.0, 0.0);
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1_c0_c0.x && coord.x <= uBounds_Stage1_c0_c0.y) {
+ _output += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1_c0_c0[0].x;
+ }
+ coord += uImageIncrement_Stage1_c0_c0;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1_c0_c0.x && coord.x <= uBounds_Stage1_c0_c0.y) {
+ _output += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1_c0_c0[0].y;
+ }
+ coord += uImageIncrement_Stage1_c0_c0;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1_c0_c0.x && coord.x <= uBounds_Stage1_c0_c0.y) {
+ _output += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1_c0_c0[0].z;
+ }
+ coord += uImageIncrement_Stage1_c0_c0;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1_c0_c0.x && coord.x <= uBounds_Stage1_c0_c0.y) {
+ _output += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1_c0_c0[0].w;
+ }
+ coord += uImageIncrement_Stage1_c0_c0;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1_c0_c0.x && coord.x <= uBounds_Stage1_c0_c0.y) {
+ _output += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1_c0_c0[1].x;
+ }
+ coord += uImageIncrement_Stage1_c0_c0;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1_c0_c0.x && coord.x <= uBounds_Stage1_c0_c0.y) {
+ _output += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1_c0_c0[1].y;
+ }
+ coord += uImageIncrement_Stage1_c0_c0;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1_c0_c0.x && coord.x <= uBounds_Stage1_c0_c0.y) {
+ _output += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1_c0_c0[1].z;
+ }
+ coord += uImageIncrement_Stage1_c0_c0;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1_c0_c0.x && coord.x <= uBounds_Stage1_c0_c0.y) {
+ _output += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1_c0_c0[1].w;
+ }
+ coord += uImageIncrement_Stage1_c0_c0;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1_c0_c0.x && coord.x <= uBounds_Stage1_c0_c0.y) {
+ _output += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1_c0_c0[2].x;
+ }
+ coord += uImageIncrement_Stage1_c0_c0;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1_c0_c0.x && coord.x <= uBounds_Stage1_c0_c0.y) {
+ _output += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1_c0_c0[2].y;
+ }
+ coord += uImageIncrement_Stage1_c0_c0;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1_c0_c0.x && coord.x <= uBounds_Stage1_c0_c0.y) {
+ _output += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1_c0_c0[2].z;
+ }
+ coord += uImageIncrement_Stage1_c0_c0;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1_c0_c0.x && coord.x <= uBounds_Stage1_c0_c0.y) {
+ _output += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1_c0_c0[2].w;
+ }
+ coord += uImageIncrement_Stage1_c0_c0;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1_c0_c0.x && coord.x <= uBounds_Stage1_c0_c0.y) {
+ _output += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1_c0_c0[3].x;
+ }
+ coord += uImageIncrement_Stage1_c0_c0;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1_c0_c0.x && coord.x <= uBounds_Stage1_c0_c0.y) {
+ _output += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1_c0_c0[3].y;
+ }
+ coord += uImageIncrement_Stage1_c0_c0;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1_c0_c0.x && coord.x <= uBounds_Stage1_c0_c0.y) {
+ _output += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1_c0_c0[3].z;
+ }
+ coord += uImageIncrement_Stage1_c0_c0;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1_c0_c0.x && coord.x <= uBounds_Stage1_c0_c0.y) {
+ _output += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1_c0_c0[3].w;
+ }
+ coord += uImageIncrement_Stage1_c0_c0;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1_c0_c0.x && coord.x <= uBounds_Stage1_c0_c0.y) {
+ _output += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1_c0_c0[4].x;
+ }
+ coord += uImageIncrement_Stage1_c0_c0;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1_c0_c0.x && coord.x <= uBounds_Stage1_c0_c0.y) {
+ _output += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1_c0_c0[4].y;
+ }
+ coord += uImageIncrement_Stage1_c0_c0;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1_c0_c0.x && coord.x <= uBounds_Stage1_c0_c0.y) {
+ _output += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1_c0_c0[4].z;
+ }
+ coord += uImageIncrement_Stage1_c0_c0;
+ _output *= _input;
+ return _output;
+}
+vec4 light_Stage1_c1_c0_c0_c0_c0_c0(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ float colorScale = uKD_Stage1_c1_c0_c0_c0_c0_c0 * dot(normal, surfaceToLight);
+ return vec4(lightColor * clamp(colorScale, 0.0, 1.0), 1.0);
+}
+float sobel_Stage1_c1_c0_c0_c0_c0_c0(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage1_c1_c0_c0_c0_c0_c0(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage1_c1_c0_c0_c0_c0_c0(float m[9], float surfaceScale) {
+ return pointToNormal_Stage1_c1_c0_c0_c0_c0_c0(sobel_Stage1_c1_c0_c0_c0_c0_c0(m[0], m[1], m[3], m[4], m[6], m[7], 0.5), sobel_Stage1_c1_c0_c0_c0_c0_c0(m[0], m[6], m[1], m[7], 0.0, 0.0, 0.33333298563957214), surfaceScale);
+}
+vec4 DiffuseLighting_Stage1_c1_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coord = vTransformedCoords_1_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage1_c1_c0_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0_c0_c0.xy, uTexDom_Stage1_c1_c0_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp0 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1_c1_c0_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0_c0_c0.xy, uTexDom_Stage1_c1_c0_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1_c1_c0_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0_c0_c0.xy, uTexDom_Stage1_c1_c0_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage1_c1_c0_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0_c0_c0.xy, uTexDom_Stage1_c1_c0_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0_c0_c0.xy, uTexDom_Stage1_c1_c0_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1_c1_c0_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0_c0_c0.xy, uTexDom_Stage1_c1_c0_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp5 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage1_c1_c0_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0_c0_c0.xy, uTexDom_Stage1_c1_c0_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp6 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage1_c1_c0_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0_c0_c0.xy, uTexDom_Stage1_c1_c0_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp7 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage1_c1_c0_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0_c0_c0.xy, uTexDom_Stage1_c1_c0_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp8 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = normalize(uLightLocation_Stage1_c1_c0_c0_c0_c0_c0 - vec3(gl_FragCoord.xy, uSurfaceScale_Stage1_c1_c0_c0_c0_c0_c0 * m[4]));
+ _output = light_Stage1_c1_c0_c0_c0_c0_c0(normal_Stage1_c1_c0_c0_c0_c0_c0(m, uSurfaceScale_Stage1_c1_c0_c0_c0_c0_c0), surfaceToLight, uLightColor_Stage1_c1_c0_c0_c0_c0_c0);
+ _output *= _input;
+ return _output;
+}
+vec4 EllipticalRRect_Stage1_c1_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 dxy0 = uinnerRect_Stage1_c1_c0_c0_c0_c1_c0.xy - gl_FragCoord.xy;
+ vec2 dxy1 = gl_FragCoord.xy - uinnerRect_Stage1_c1_c0_c0_c0_c1_c0.zw;
+ vec2 dxy = max(max(dxy0, dxy1), 0.0);
+ vec2 Z = max(max(dxy0 * uinvRadiiLTRB_Stage1_c1_c0_c0_c0_c1_c0.xy, dxy1 * uinvRadiiLTRB_Stage1_c1_c0_c0_c0_c1_c0.zw), 0.0);
+ float implicit = dot(Z, dxy) - 1.0;
+ float grad_dot = 4.0 * dot(Z, Z);
+ grad_dot = max(grad_dot, 9.9999997473787516e-05);
+ float approx_dist = implicit * inversesqrt(grad_dot);
+ float alpha = clamp(0.5 - approx_dist, 0.0, 1.0);
+ _output = _input * alpha;
+ return _output;
+}
+float _blend_color_luminance(vec3 color) {
+ return dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), color);
+}
+vec3 _blend_set_color_luminance(vec3 hueSatColor, float alpha, vec3 lumColor) {
+ float lum = _blend_color_luminance(lumColor);
+ vec3 result = (lum - _blend_color_luminance(hueSatColor)) + hueSatColor;
+ float minComp = min(min(result.x, result.y), result.z);
+ float maxComp = max(max(result.x, result.y), result.z);
+ if (minComp < 0.0 && lum != minComp) {
+ result = lum + ((result - lum) * lum) / (lum - minComp);
+ }
+ if (maxComp > alpha && maxComp != lum) {
+ return lum + ((result - lum) * (alpha - lum)) / (maxComp - lum);
+ }
+ return result;
+}
+vec4 blend_luminosity(vec4 src, vec4 dst) {
+ float alpha = dst.w * src.w;
+ vec3 sda = src.xyz * dst.w;
+ vec3 dsa = dst.xyz * src.w;
+ return vec4((((_blend_set_color_luminance(dsa, alpha, sda) + dst.xyz) - dsa) + src.xyz) - sda, (src.w + dst.w) - alpha);
+}
+vec4 ComposeTwo_Stage1_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_luminosity(DiffuseLighting_Stage1_c1_c0_c0_c0_c0_c0(inputColor), EllipticalRRect_Stage1_c1_c0_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 AARectEffect_Stage1_c1_c0_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float alpha;
+ {
+ float xSub, ySub;
+ xSub = min(gl_FragCoord.x - urectUniform_Stage1_c1_c0_c1_c0_c0_c0.x, 0.0);
+ xSub += min(urectUniform_Stage1_c1_c0_c1_c0_c0_c0.z - gl_FragCoord.x, 0.0);
+ ySub = min(gl_FragCoord.y - urectUniform_Stage1_c1_c0_c1_c0_c0_c0.y, 0.0);
+ ySub += min(urectUniform_Stage1_c1_c0_c1_c0_c0_c0.w - gl_FragCoord.y, 0.0);
+ alpha = (1.0 + max(xSub, -1.0)) * (1.0 + max(ySub, -1.0));
+ }
+ {
+ alpha = 1.0 - alpha;
+ }
+ _output = _input * alpha;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c1_c0_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_2_Stage1, vTransformedCoords_2_Stage0) * _input;
+ return _output;
+}
+float _blend_overlay_component(float sc, float sa, float dc, float da) {
+ if (2.0 * dc <= da) {
+ return (2.0 * sc) * dc;
+ }
+ return sa * da - (2.0 * (da - dc)) * (sa - sc);
+}
+vec4 blend_overlay(vec4 src, vec4 dst) {
+ vec4 result = vec4(_blend_overlay_component(src.x, src.w, dst.x, dst.w), _blend_overlay_component(src.y, src.w, dst.y, dst.w), _blend_overlay_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+ result.xyz += dst.xyz * (1.0 - src.w) + src.xyz * (1.0 - dst.w);
+ return result;
+}
+vec4 blend_hard_light(vec4 src, vec4 dst) {
+ return blend_overlay(dst, src);
+}
+vec4 ComposeTwo_Stage1_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_hard_light(AARectEffect_Stage1_c1_c0_c1_c0_c0_c0(inputColor), TextureEffect_Stage1_c1_c0_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 blend_exclusion(vec4 src, vec4 dst) {
+ return vec4((dst.xyz + src.xyz) - (2.0 * dst.xyz) * src.xyz, src.w + (1.0 - src.w) * dst.w);
+}
+vec4 ComposeTwo_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_exclusion(ComposeTwo_Stage1_c1_c0_c0_c0(inputColor), ComposeTwo_Stage1_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+float _blend_color_saturation(vec3 color) {
+ return max(max(color.x, color.y), color.z) - min(min(color.x, color.y), color.z);
+}
+vec3 _blend_set_color_saturation_helper(vec3 minMidMax, float sat) {
+ if (minMidMax.x < minMidMax.z) {
+ return vec3(0.0, (sat * (minMidMax.y - minMidMax.x)) / (minMidMax.z - minMidMax.x), sat);
+ }
+ return vec3(0.0);
+}
+vec3 _blend_set_color_saturation(vec3 hueLumColor, vec3 satColor) {
+ float sat = _blend_color_saturation(satColor);
+ if (hueLumColor.x <= hueLumColor.y) {
+ if (hueLumColor.y <= hueLumColor.z) {
+ hueLumColor.xyz = _blend_set_color_saturation_helper(hueLumColor, sat);
+ } else if (hueLumColor.x <= hueLumColor.z) {
+ hueLumColor.xzy = _blend_set_color_saturation_helper(hueLumColor.xzy, sat);
+ } else {
+ hueLumColor.zxy = _blend_set_color_saturation_helper(hueLumColor.zxy, sat);
+ }
+ } else if (hueLumColor.x <= hueLumColor.z) {
+ hueLumColor.yxz = _blend_set_color_saturation_helper(hueLumColor.yxz, sat);
+ } else if (hueLumColor.y <= hueLumColor.z) {
+ hueLumColor.yzx = _blend_set_color_saturation_helper(hueLumColor.yzx, sat);
+ } else {
+ hueLumColor.zyx = _blend_set_color_saturation_helper(hueLumColor.zyx, sat);
+ }
+ return hueLumColor;
+}
+vec4 blend_saturation(vec4 src, vec4 dst) {
+ float alpha = dst.w * src.w;
+ vec3 sda = src.xyz * dst.w;
+ vec3 dsa = dst.xyz * src.w;
+ return vec4((((_blend_set_color_luminance(_blend_set_color_saturation(dsa, sda), alpha, dsa) + dst.xyz) - dsa) + src.xyz) - sda, (src.w + dst.w) - alpha);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_saturation(GaussianConvolution_Stage1_c0_c0(inputColor), ComposeTwo_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+void main() {
+ vec4 color = inColor;
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/592-3.shader_test b/shaders/skia/592-3.shader_test
new file mode 100644
index 0000000..1e7a076
--- /dev/null
+++ b/shaders/skia/592-3.shader_test
@@ -0,0 +1,61 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uScale_Stage2;
+uniform vec4 uTexDom_Stage2;
+uniform vec3 uDecalParams_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+uniform sampler2D uTextureSampler_1_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+void main() {
+ vec4 output_Stage2;
+ {
+ vec4 dColor = texture(uTextureSampler_0_Stage2, vTransformedCoords_1_Stage0);
+ dColor.xyz = dColor.w < 9.9999999747524271e-07 ? vec3(0.0) : clamp(dColor.xyz / dColor.w, 0.0, 1.0);
+ vec2 cCoords = vTransformedCoords_2_Stage0 + uScale_Stage2 * (dColor.yz - vec2(0.5));
+ {
+ vec2 origCoord = cCoords;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ output_Stage2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/592-4.shader_test b/shaders/skia/592-4.shader_test
new file mode 100644
index 0000000..b7d0400
--- /dev/null
+++ b/shaders/skia/592-4.shader_test
@@ -0,0 +1,97 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec3 vTransformedCoords_1_Stage0;
+vec4 TextureEffect_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = textureProj(uTextureSampler_0_Stage2, vTransformedCoords_1_Stage0) * _input;
+ return _output;
+}
+float _blend_color_saturation(vec3 color) {
+ return max(max(color.x, color.y), color.z) - min(min(color.x, color.y), color.z);
+}
+vec3 _blend_set_color_saturation_helper(vec3 minMidMax, float sat) {
+ if (minMidMax.x < minMidMax.z) {
+ return vec3(0.0, (sat * (minMidMax.y - minMidMax.x)) / (minMidMax.z - minMidMax.x), sat);
+ }
+ return vec3(0.0);
+}
+vec3 _blend_set_color_saturation(vec3 hueLumColor, vec3 satColor) {
+ float sat = _blend_color_saturation(satColor);
+ if (hueLumColor.x <= hueLumColor.y) {
+ if (hueLumColor.y <= hueLumColor.z) {
+ hueLumColor.xyz = _blend_set_color_saturation_helper(hueLumColor, sat);
+ } else if (hueLumColor.x <= hueLumColor.z) {
+ hueLumColor.xzy = _blend_set_color_saturation_helper(hueLumColor.xzy, sat);
+ } else {
+ hueLumColor.zxy = _blend_set_color_saturation_helper(hueLumColor.zxy, sat);
+ }
+ } else if (hueLumColor.x <= hueLumColor.z) {
+ hueLumColor.yxz = _blend_set_color_saturation_helper(hueLumColor.yxz, sat);
+ } else if (hueLumColor.y <= hueLumColor.z) {
+ hueLumColor.yzx = _blend_set_color_saturation_helper(hueLumColor.yzx, sat);
+ } else {
+ hueLumColor.zyx = _blend_set_color_saturation_helper(hueLumColor.zyx, sat);
+ }
+ return hueLumColor;
+}
+float _blend_color_luminance(vec3 color) {
+ return dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), color);
+}
+vec3 _blend_set_color_luminance(vec3 hueSatColor, float alpha, vec3 lumColor) {
+ float lum = _blend_color_luminance(lumColor);
+ vec3 result = (lum - _blend_color_luminance(hueSatColor)) + hueSatColor;
+ float minComp = min(min(result.x, result.y), result.z);
+ float maxComp = max(max(result.x, result.y), result.z);
+ if (minComp < 0.0 && lum != minComp) {
+ result = lum + ((result - lum) * lum) / (lum - minComp);
+ }
+ if (maxComp > alpha && maxComp != lum) {
+ return lum + ((result - lum) * (alpha - lum)) / (maxComp - lum);
+ }
+ return result;
+}
+vec4 blend_saturation(vec4 src, vec4 dst) {
+ float alpha = dst.w * src.w;
+ vec3 sda = src.xyz * dst.w;
+ vec3 dsa = dst.xyz * src.w;
+ return vec4((((_blend_set_color_luminance(_blend_set_color_saturation(dsa, sda), alpha, dsa) + dst.xyz) - dsa) + src.xyz) - sda, (src.w + dst.w) - alpha);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_saturation(TextureEffect_Stage2_c0_c0(vec4(1.0)), output_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec3 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0);
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/592.shader_test b/shaders/skia/592.shader_test
new file mode 100644
index 0000000..e737655
--- /dev/null
+++ b/shaders/skia/592.shader_test
@@ -0,0 +1,145 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage2;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.w) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ } else {
+ {
+ if (t < uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+vec4 ComposeOne_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_dst_in(_input, TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0)));
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = ComposeOne_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 blend_multiply(vec4 src, vec4 dst) {
+ return vec4(((1.0 - src.w) * dst.xyz + (1.0 - dst.w) * src.xyz) + src.xyz * dst.xyz, src.w + (1.0 - src.w) * dst.w);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_multiply(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ {
+ output_Stage2 = output_Stage1 * ucolor_Stage2;
+ }
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 inColor;
+in vec2 inLocalCoord;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/595-2.shader_test b/shaders/skia/595-2.shader_test
new file mode 100644
index 0000000..9d7b43f
--- /dev/null
+++ b/shaders/skia/595-2.shader_test
@@ -0,0 +1,274 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_KHR_blend_equation_advanced : require
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+layout (blend_support_all_equations) out ;
+uniform vec2 uImageIncrement_Stage1_c1_c0;
+uniform float uSurfaceScale_Stage1_c1_c0;
+uniform vec3 uLightColor_Stage1_c1_c0;
+uniform float uKD_Stage1_c1_c0;
+uniform vec4 uTexDom_Stage1_c1_c0;
+uniform vec3 uDecalParams_Stage1_c1_c0;
+uniform vec3 uLightLocation_Stage1_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vEllipseOffsets_Stage0;
+noperspective in vec4 vEllipseRadii_Stage0;
+noperspective in vec4 vinColor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 ConfigConversionEffect_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = floor(_input * 255.0 + 0.5) / 255.0;
+ {
+ _output.xyz = floor((_output.xyz * _output.w) * 255.0 + 0.5) / 255.0;
+ }
+ return _output;
+}
+vec4 ClampFragmentProcessor_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = clamp(_input, 0.0, 1.0);
+ }
+ return _output;
+}
+float _guarded_divide(float n, float d) {
+ return n / d;
+}
+float _soft_light_component(float sc, float sa, float dc, float da) {
+ if (2.0 * sc <= sa) {
+ return (_guarded_divide((dc * dc) * (sa - 2.0 * sc), da) + (1.0 - da) * sc) + dc * ((-sa + 2.0 * sc) + 1.0);
+ } else if (4.0 * dc <= da) {
+ float DSqd = dc * dc;
+ float DCub = DSqd * dc;
+ float DaSqd = da * da;
+ float DaCub = DaSqd * da;
+ return _guarded_divide(((DaSqd * (sc - dc * ((3.0 * sa - 6.0 * sc) - 1.0)) + ((12.0 * da) * DSqd) * (sa - 2.0 * sc)) - (16.0 * DCub) * (sa - 2.0 * sc)) - DaCub * sc, DaSqd);
+ }
+ return ((dc * ((sa - 2.0 * sc) + 1.0) + sc) - sqrt(da * dc) * (sa - 2.0 * sc)) - da * sc;
+}
+vec4 blend_soft_light(vec4 src, vec4 dst) {
+ if (dst.w == 0.0) {
+ return src;
+ }
+ return vec4(_soft_light_component(src.x, src.w, dst.x, dst.w), _soft_light_component(src.y, src.w, dst.y, dst.w), _soft_light_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+}
+vec4 ComposeTwo_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_soft_light(ConfigConversionEffect_Stage1_c0_c0_c0_c0(inputColor), ClampFragmentProcessor_Stage1_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 light_Stage1_c1_c0(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ float colorScale = uKD_Stage1_c1_c0 * dot(normal, surfaceToLight);
+ return vec4(lightColor * clamp(colorScale, 0.0, 1.0), 1.0);
+}
+float sobel_Stage1_c1_c0(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage1_c1_c0(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage1_c1_c0(float m[9], float surfaceScale) {
+ return pointToNormal_Stage1_c1_c0(sobel_Stage1_c1_c0(m[0], m[2], m[3], m[5], m[6], m[8], 0.25), sobel_Stage1_c1_c0(m[0], m[6], m[1], m[7], m[2], m[8], 0.25), surfaceScale);
+}
+vec4 DiffuseLighting_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coord = vTransformedCoords_0_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage1_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0.xy, uTexDom_Stage1_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp0 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0.xy, uTexDom_Stage1_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0.xy, uTexDom_Stage1_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage1_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0.xy, uTexDom_Stage1_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0.xy, uTexDom_Stage1_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0.xy, uTexDom_Stage1_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp5 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage1_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0.xy, uTexDom_Stage1_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp6 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage1_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0.xy, uTexDom_Stage1_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp7 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage1_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0.xy, uTexDom_Stage1_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp8 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = normalize(uLightLocation_Stage1_c1_c0 - vec3(gl_FragCoord.xy, uSurfaceScale_Stage1_c1_c0 * m[4]));
+ _output = light_Stage1_c1_c0(normal_Stage1_c1_c0(m, uSurfaceScale_Stage1_c1_c0), surfaceToLight, uLightColor_Stage1_c1_c0);
+ _output *= _input;
+ return _output;
+}
+vec4 blend_screen(vec4 src, vec4 dst) {
+ return src + (1.0 - src) * dst;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vinColor_Stage0;
+ vec2 offset = vEllipseOffsets_Stage0;
+ float test = dot(offset, offset) - 1.0;
+ vec2 grad = (2.0 * offset) * vEllipseRadii_Stage0.xy;
+ float grad_dot = dot(grad, grad);
+ grad_dot = max(grad_dot, 1.1754999560161448e-38);
+ float invlen = inversesqrt(grad_dot);
+ float edgeAlpha = clamp(0.5 - test * invlen, 0.0, 1.0);
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_screen(ComposeTwo_Stage1_c0_c0(inputColor), DiffuseLighting_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ sk_FragColor = outputCoverage_Stage0 * output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec2 inEllipseOffset;
+in vec4 inEllipseRadii;
+noperspective out vec2 vEllipseOffsets_Stage0;
+noperspective out vec4 vEllipseRadii_Stage0;
+noperspective out vec4 vinColor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vEllipseOffsets_Stage0 = inEllipseOffset;
+ vEllipseRadii_Stage0 = inEllipseRadii;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/595-3.shader_test b/shaders/skia/595-3.shader_test
new file mode 100644
index 0000000..1270051
--- /dev/null
+++ b/shaders/skia/595-3.shader_test
@@ -0,0 +1,61 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uScale_Stage2;
+uniform vec4 uTexDom_Stage2;
+uniform vec3 uDecalParams_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+uniform sampler2D uTextureSampler_1_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+void main() {
+ vec4 output_Stage2;
+ {
+ vec4 dColor = texture(uTextureSampler_0_Stage2, vTransformedCoords_1_Stage0);
+ dColor.xyz = dColor.w < 9.9999999747524271e-07 ? vec3(0.0) : clamp(dColor.xyz / dColor.w, 0.0, 1.0);
+ vec2 cCoords = vTransformedCoords_2_Stage0 + uScale_Stage2 * (dColor.wz - vec2(0.5));
+ {
+ vec2 origCoord = cCoords;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ output_Stage2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/595-4.shader_test b/shaders/skia/595-4.shader_test
new file mode 100644
index 0000000..af3eab7
--- /dev/null
+++ b/shaders/skia/595-4.shader_test
@@ -0,0 +1,47 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 ClampFragmentProcessor_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = clamp(_input, 0.0, 1.0);
+ }
+ return _output;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_src_over(output_Stage1, ClampFragmentProcessor_Stage2_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/595.shader_test b/shaders/skia/595.shader_test
new file mode 100644
index 0000000..b608591
--- /dev/null
+++ b/shaders/skia/595.shader_test
@@ -0,0 +1,68 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 ucolor_Stage1_c0_c0_c0_c0;
+uniform vec4 ucolor_Stage2;
+noperspective in vec4 vcolor_Stage0;
+vec4 ConstColorProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = _input.w * ucolor_Stage1_c0_c0_c0_c0;
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = ConstColorProcessor_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 blend_multiply(vec4 src, vec4 dst) {
+ return vec4(((1.0 - src.w) * dst.xyz + (1.0 - dst.w) * src.xyz) + src.xyz * dst.xyz, src.w + (1.0 - src.w) * dst.w);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_multiply(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ {
+ output_Stage2 = output_Stage1 * ucolor_Stage2;
+ }
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 position;
+in vec4 inColor;
+noperspective out vec4 vcolor_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/598-2.shader_test b/shaders/skia/598-2.shader_test
new file mode 100644
index 0000000..9911755
--- /dev/null
+++ b/shaders/skia/598-2.shader_test
@@ -0,0 +1,397 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_KHR_blend_equation_advanced : require
+out vec4 sk_FragColor;
+layout (blend_support_all_equations) out ;
+uniform vec2 uImageIncrement_Stage1_c0_c0_c1_c0_c0_c0;
+uniform float uSurfaceScale_Stage1_c0_c0_c1_c0_c0_c0;
+uniform vec3 uLightColor_Stage1_c0_c0_c1_c0_c0_c0;
+uniform float uKS_Stage1_c0_c0_c1_c0_c0_c0;
+uniform float uShininess_Stage1_c0_c0_c1_c0_c0_c0;
+uniform vec4 uTexDom_Stage1_c0_c0_c1_c0_c0_c0;
+uniform vec3 uDecalParams_Stage1_c0_c0_c1_c0_c0_c0;
+uniform vec3 uLightDirection_Stage1_c0_c0_c1_c0_c0_c0;
+uniform vec2 uScale_Stage1_c0_c0_c1_c0_c1_c0;
+uniform vec4 uTexDom_Stage1_c0_c0_c1_c0_c1_c0;
+uniform vec3 uDecalParams_Stage1_c0_c0_c1_c0_c1_c0;
+uniform vec2 uScale_Stage1_c1_c0_c0_c0_c0_c0;
+uniform vec4 uTexDom_Stage1_c1_c0_c0_c0_c0_c0;
+uniform vec3 uDecalParams_Stage1_c1_c0_c0_c0_c0_c0;
+uniform float uPixelSize_Stage1_c1_c0_c0_c0_c1_c0;
+uniform vec2 uRange_Stage1_c1_c0_c0_c0_c1_c0;
+uniform vec3 uedges_Stage1_c1_c0_c1_c0[1];
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+uniform sampler2D uTextureSampler_2_Stage1;
+uniform sampler2D uTextureSampler_3_Stage1;
+uniform sampler2D uTextureSampler_4_Stage1;
+uniform sampler2D uTextureSampler_5_Stage1;
+uniform sampler2D uTextureSampler_6_Stage1;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+noperspective in vec2 vTransformedCoords_3_Stage0;
+noperspective in vec2 vTransformedCoords_4_Stage0;
+noperspective in vec2 vTransformedCoords_5_Stage0;
+noperspective in float vinCoverage_Stage0;
+vec4 ColorTableEffect_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float nonZeroAlpha = max(_input.w, 9.9999997473787516e-05);
+ vec4 coord = vec4(_input.xyz / nonZeroAlpha, nonZeroAlpha);
+ coord = coord * 0.9960939884185791 + vec4(0.0019529999699443579, 0.0019529999699443579, 0.0019529999699443579, 0.0019529999699443579);
+ _output.w = texture(uTextureSampler_0_Stage1, vec2(coord.w, 0.125)).w;
+ _output.x = texture(uTextureSampler_0_Stage1, vec2(coord.x, 0.375)).w;
+ _output.y = texture(uTextureSampler_0_Stage1, vec2(coord.y, 0.625)).w;
+ _output.z = texture(uTextureSampler_0_Stage1, vec2(coord.z, 0.875)).w;
+ _output.xyz *= _output.w;
+ return _output;
+}
+vec4 light_Stage1_c0_c0_c1_c0_c0_c0(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ vec3 halfDir = normalize(surfaceToLight + vec3(0.0, 0.0, 1.0));
+ float colorScale = uKS_Stage1_c0_c0_c1_c0_c0_c0 * pow(dot(normal, halfDir), uShininess_Stage1_c0_c0_c1_c0_c0_c0);
+ vec3 color = lightColor * clamp(colorScale, 0.0, 1.0);
+ return vec4(color, max(max(color.x, color.y), color.z));
+}
+float sobel_Stage1_c0_c0_c1_c0_c0_c0(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage1_c0_c0_c1_c0_c0_c0(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage1_c0_c0_c1_c0_c0_c0(float m[9], float surfaceScale) {
+ return pointToNormal_Stage1_c0_c0_c1_c0_c0_c0(sobel_Stage1_c0_c0_c1_c0_c0_c0(0.0, 0.0, m[3], m[4], m[6], m[7], 0.66666698455810547), sobel_Stage1_c0_c0_c1_c0_c0_c0(m[3], m[6], m[4], m[7], 0.0, 0.0, 0.66666698455810547), surfaceScale);
+}
+vec4 SpecularLighting_Stage1_c0_c0_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coord = vTransformedCoords_0_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage1_c0_c0_c1_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c1_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c1_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c1_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c1_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c1_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c1_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp0 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1_c0_c0_c1_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c1_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c1_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c1_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c1_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c1_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c1_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1_c0_c0_c1_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c1_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c1_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c1_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c1_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c1_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c1_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage1_c0_c0_c1_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c1_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c1_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c1_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c1_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c1_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c1_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c1_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c1_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c1_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c1_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c1_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c1_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1_c0_c0_c1_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c1_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c1_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c1_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c1_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c1_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c1_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp5 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage1_c0_c0_c1_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c1_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c1_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c1_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c1_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c1_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c1_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp6 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage1_c0_c0_c1_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c1_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c1_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c1_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c1_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c1_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c1_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp7 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage1_c0_c0_c1_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c1_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c1_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c1_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c1_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c1_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c1_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp8 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = uLightDirection_Stage1_c0_c0_c1_c0_c0_c0;
+ _output = light_Stage1_c0_c0_c1_c0_c0_c0(normal_Stage1_c0_c0_c1_c0_c0_c0(m, uSurfaceScale_Stage1_c0_c0_c1_c0_c0_c0), surfaceToLight, uLightColor_Stage1_c0_c0_c1_c0_c0_c0);
+ _output *= _input;
+ return _output;
+}
+vec4 DisplacementMap_Stage1_c0_c0_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 dColor = texture(uTextureSampler_2_Stage1, vTransformedCoords_1_Stage0);
+ dColor.xyz = dColor.w < 9.9999999747524271e-07 ? vec3(0.0) : clamp(dColor.xyz / dColor.w, 0.0, 1.0);
+ vec2 cCoords = vTransformedCoords_2_Stage0 + uScale_Stage1_c0_c0_c1_c0_c1_c0 * (dColor.zz - vec2(0.5));
+ {
+ vec2 origCoord = cCoords;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c1_c0_c1_c0.xy, uTexDom_Stage1_c0_c0_c1_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_3_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c1_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c1_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c1_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c1_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ _output = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ return _output;
+}
+float _blend_overlay_component(float sc, float sa, float dc, float da) {
+ if (2.0 * dc <= da) {
+ return (2.0 * sc) * dc;
+ }
+ return sa * da - (2.0 * (da - dc)) * (sa - sc);
+}
+vec4 blend_overlay(vec4 src, vec4 dst) {
+ vec4 result = vec4(_blend_overlay_component(src.x, src.w, dst.x, dst.w), _blend_overlay_component(src.y, src.w, dst.y, dst.w), _blend_overlay_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+ result.xyz += dst.xyz * (1.0 - src.w) + src.xyz * (1.0 - dst.w);
+ return result;
+}
+vec4 ComposeTwo_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_overlay(SpecularLighting_Stage1_c0_c0_c1_c0_c0_c0(inputColor), DisplacementMap_Stage1_c0_c0_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 blend_modulate(vec4 src, vec4 dst) {
+ return src * dst;
+}
+vec4 ComposeTwo_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_modulate(ColorTableEffect_Stage1_c0_c0_c0_c0(inputColor), ComposeTwo_Stage1_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 DisplacementMap_Stage1_c1_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 dColor = texture(uTextureSampler_4_Stage1, vTransformedCoords_3_Stage0);
+ dColor.xyz = dColor.w < 9.9999999747524271e-07 ? vec3(0.0) : clamp(dColor.xyz / dColor.w, 0.0, 1.0);
+ vec2 cCoords = vTransformedCoords_4_Stage0 + uScale_Stage1_c1_c0_c0_c0_c0_c0 * (dColor.yw - vec2(0.5));
+ {
+ vec2 origCoord = cCoords;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0_c0_c0.xy, uTexDom_Stage1_c1_c0_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_5_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ _output = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ return _output;
+}
+vec4 Morphology_Stage1_c1_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = vec4(1.0, 1.0, 1.0, 1.0);
+ vec2 coord = vTransformedCoords_5_Stage0;
+ coord.y -= 2.0 * uPixelSize_Stage1_c1_c0_c0_c0_c1_c0;
+ for (int i = 0;i < 5; i++) {
+ _output = min(_output, texture(uTextureSampler_6_Stage1, coord));
+ coord.y += uPixelSize_Stage1_c1_c0_c0_c0_c1_c0;
+ }
+ _output *= _input;
+ return _output;
+}
+vec4 blend_src_out(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src;
+}
+vec4 ComposeTwo_Stage1_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_src_out(DisplacementMap_Stage1_c1_c0_c0_c0_c0_c0(inputColor), Morphology_Stage1_c1_c0_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 ConvexPoly_Stage1_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float alpha = 1.0;
+ float edge;
+ edge = dot(uedges_Stage1_c1_c0_c1_c0[0], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ _output = _input * alpha;
+ return _output;
+}
+float _blend_color_luminance(vec3 color) {
+ return dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), color);
+}
+vec3 _blend_set_color_luminance(vec3 hueSatColor, float alpha, vec3 lumColor) {
+ float lum = _blend_color_luminance(lumColor);
+ vec3 result = (lum - _blend_color_luminance(hueSatColor)) + hueSatColor;
+ float minComp = min(min(result.x, result.y), result.z);
+ float maxComp = max(max(result.x, result.y), result.z);
+ if (minComp < 0.0 && lum != minComp) {
+ result = lum + ((result - lum) * lum) / (lum - minComp);
+ }
+ if (maxComp > alpha && maxComp != lum) {
+ return lum + ((result - lum) * (alpha - lum)) / (maxComp - lum);
+ }
+ return result;
+}
+vec4 blend_luminosity(vec4 src, vec4 dst) {
+ float alpha = dst.w * src.w;
+ vec3 sda = src.xyz * dst.w;
+ vec3 dsa = dst.xyz * src.w;
+ return vec4((((_blend_set_color_luminance(dsa, alpha, sda) + dst.xyz) - dsa) + src.xyz) - sda, (src.w + dst.w) - alpha);
+}
+vec4 ComposeTwo_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_luminosity(ComposeTwo_Stage1_c1_c0_c0_c0(inputColor), ConvexPoly_Stage1_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ float alpha = 1.0;
+ alpha = vinCoverage_Stage0;
+ outputCoverage_Stage0 = vec4(alpha);
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_modulate(ComposeTwo_Stage1_c0_c0(inputColor), ComposeTwo_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ sk_FragColor = outputCoverage_Stage0 * output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+uniform mat3 uCoordTransformMatrix_3_Stage0;
+uniform mat3 uCoordTransformMatrix_4_Stage0;
+uniform mat3 uCoordTransformMatrix_5_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in float inCoverage;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+noperspective out vec2 vTransformedCoords_3_Stage0;
+noperspective out vec2 vTransformedCoords_4_Stage0;
+noperspective out vec2 vTransformedCoords_5_Stage0;
+noperspective out float vinCoverage_Stage0;
+void main() {
+ vec4 color = inColor;
+ vcolor_Stage0 = color;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_3_Stage0 = (uCoordTransformMatrix_3_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_4_Stage0 = (uCoordTransformMatrix_4_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_5_Stage0 = (uCoordTransformMatrix_5_Stage0 * vec3(inPosition, 1.0)).xy;
+ vinCoverage_Stage0 = inCoverage;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/598-3.shader_test b/shaders/skia/598-3.shader_test
new file mode 100644
index 0000000..a7b71e8
--- /dev/null
+++ b/shaders/skia/598-3.shader_test
@@ -0,0 +1,57 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform float uinnerThreshold_Stage2;
+uniform float uouterThreshold_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ vec4 color = output_Stage1;
+ vec4 mask_color = texture(uTextureSampler_0_Stage2, vTransformedCoords_1_Stage0);
+ if (mask_color.w < 0.5) {
+ if (color.w > uouterThreshold_Stage2) {
+ float scale = uouterThreshold_Stage2 / color.w;
+ color.xyz *= scale;
+ color.w = uouterThreshold_Stage2;
+ }
+ } else if (color.w < uinnerThreshold_Stage2) {
+ float scale = uinnerThreshold_Stage2 / max(0.0010000000474974513, color.w);
+ color.xyz *= scale;
+ color.w = uinnerThreshold_Stage2;
+ }
+ output_Stage2 = color;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/598-4.shader_test b/shaders/skia/598-4.shader_test
new file mode 100644
index 0000000..e95121d
--- /dev/null
+++ b/shaders/skia/598-4.shader_test
@@ -0,0 +1,73 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uinnerRect_Stage2_c0_c0;
+uniform vec2 uradiusPlusHalf_Stage2_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 CircularRRect_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 dxy0 = uinnerRect_Stage2_c0_c0.xy - gl_FragCoord.xy;
+ vec2 dxy1 = gl_FragCoord.xy - uinnerRect_Stage2_c0_c0.zw;
+ vec2 dxy = max(max(dxy0, dxy1), 0.0);
+ float alpha = clamp(uradiusPlusHalf_Stage2_c0_c0.x - length(dxy), 0.0, 1.0);
+ alpha = 1.0 - alpha;
+ _output = _input * alpha;
+ return _output;
+}
+float _blend_color_luminance(vec3 color) {
+ return dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), color);
+}
+vec3 _blend_set_color_luminance(vec3 hueSatColor, float alpha, vec3 lumColor) {
+ float lum = _blend_color_luminance(lumColor);
+ vec3 result = (lum - _blend_color_luminance(hueSatColor)) + hueSatColor;
+ float minComp = min(min(result.x, result.y), result.z);
+ float maxComp = max(max(result.x, result.y), result.z);
+ if (minComp < 0.0 && lum != minComp) {
+ result = lum + ((result - lum) * lum) / (lum - minComp);
+ }
+ if (maxComp > alpha && maxComp != lum) {
+ return lum + ((result - lum) * (alpha - lum)) / (maxComp - lum);
+ }
+ return result;
+}
+vec4 blend_luminosity(vec4 src, vec4 dst) {
+ float alpha = dst.w * src.w;
+ vec3 sda = src.xyz * dst.w;
+ vec3 dsa = dst.xyz * src.w;
+ return vec4((((_blend_set_color_luminance(dsa, alpha, sda) + dst.xyz) - dsa) + src.xyz) - sda, (src.w + dst.w) - alpha);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_luminosity(output_Stage1, CircularRRect_Stage2_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/598.shader_test b/shaders/skia/598.shader_test
new file mode 100644
index 0000000..9b6fe5d
--- /dev/null
+++ b/shaders/skia/598.shader_test
@@ -0,0 +1,165 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage2;
+uniform vec4 ucolor_Stage3_c1_c0;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.w) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ } else {
+ {
+ if (t < uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+vec4 ComposeOne_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_dst_in(_input, TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0)));
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = ComposeOne_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 ConstColorProcessor_Stage3_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage3_c1_c0;
+ }
+ return _output;
+}
+vec4 blend_multiply(vec4 src, vec4 dst) {
+ return vec4(((1.0 - src.w) * dst.xyz + (1.0 - dst.w) * src.xyz) + src.xyz * dst.xyz, src.w + (1.0 - src.w) * dst.w);
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 blend_darken(vec4 src, vec4 dst) {
+ vec4 result = blend_src_over(src, dst);
+ result.xyz = min(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
+ return result;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_multiply(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ {
+ output_Stage2 = output_Stage1 * ucolor_Stage2;
+ }
+ }
+ vec4 output_Stage3;
+ {
+ output_Stage3 = blend_darken(ConstColorProcessor_Stage3_c1_c0(vec4(1.0)), output_Stage2);
+ }
+ {
+ sk_FragColor = output_Stage3;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 inColor;
+in vec2 inLocalCoord;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/601-2.shader_test b/shaders/skia/601-2.shader_test
new file mode 100644
index 0000000..6470d95
--- /dev/null
+++ b/shaders/skia/601-2.shader_test
@@ -0,0 +1,92 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform float uSrcTF_Stage0[7];
+uniform mat3 uColorXform_Stage0;
+uniform float uDstTF_Stage0[7];
+uniform sampler2D uTextureSampler_0_Stage0;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vlocalCoord_Stage0;
+flat in vec4 vtexDomain_Stage0;
+float src_tf_Stage0(float x) {
+ float G = uSrcTF_Stage0[0];
+ float A = uSrcTF_Stage0[1];
+ float B = uSrcTF_Stage0[2];
+ float C = uSrcTF_Stage0[3];
+ float D = uSrcTF_Stage0[4];
+ float E = uSrcTF_Stage0[5];
+ float F = uSrcTF_Stage0[6];
+ float s = sign(x);
+ x = abs(x);
+ x = x < D ? C * x + F : pow(A * x + B, G) + E;
+ return s * x;
+}
+float dst_tf_Stage0(float x) {
+ float G = uDstTF_Stage0[0];
+ float A = uDstTF_Stage0[1];
+ float B = uDstTF_Stage0[2];
+ float C = uDstTF_Stage0[3];
+ float D = uDstTF_Stage0[4];
+ float E = uDstTF_Stage0[5];
+ float F = uDstTF_Stage0[6];
+ float s = sign(x);
+ x = abs(x);
+ x = x < D ? C * x + F : pow(A * x + B, G) + E;
+ return s * x;
+}
+vec4 gamut_xform_Stage0(vec4 color) {
+ color.xyz = uColorXform_Stage0 * color.xyz;
+ return color;
+}
+vec4 color_xform_Stage0(vec4 color) {
+ float nonZeroAlpha = max(color.w, 9.9999997473787516e-05);
+ color = vec4(color.xyz / nonZeroAlpha, nonZeroAlpha);
+ color.x = src_tf_Stage0(color.x);
+ color.y = src_tf_Stage0(color.y);
+ color.z = src_tf_Stage0(color.z);
+ color = gamut_xform_Stage0(color);
+ color.x = dst_tf_Stage0(color.x);
+ color.y = dst_tf_Stage0(color.y);
+ color.z = dst_tf_Stage0(color.z);
+ color.xyz *= color.w;
+ return color;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ vec2 texCoord;
+ texCoord = vlocalCoord_Stage0;
+ vec4 domain;
+ domain = vtexDomain_Stage0;
+ texCoord = clamp(texCoord, domain.xy, domain.zw);
+ outputColor_Stage0 = color_xform_Stage0(texture(uTextureSampler_0_Stage0, texCoord)) * outputColor_Stage0;
+ }
+ {
+ sk_FragColor = outputColor_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+in vec4 texDomain;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vlocalCoord_Stage0;
+flat out vec4 vtexDomain_Stage0;
+void main() {
+ vcolor_Stage0 = color;
+ vlocalCoord_Stage0 = localCoord;
+ vtexDomain_Stage0 = texDomain;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/601-3.shader_test b/shaders/skia/601-3.shader_test
new file mode 100644
index 0000000..31e0004
--- /dev/null
+++ b/shaders/skia/601-3.shader_test
@@ -0,0 +1,46 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 ucircle_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ float d;
+ {
+ d = (1.0 - length((ucircle_Stage2.xy - gl_FragCoord.xy) * ucircle_Stage2.w)) * ucircle_Stage2.z;
+ }
+ {
+ output_Stage2 = d > 0.5 ? output_Stage1 : vec4(0.0);
+ }
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/601-4.shader_test b/shaders/skia/601-4.shader_test
new file mode 100644
index 0000000..f7c1f0d
--- /dev/null
+++ b/shaders/skia/601-4.shader_test
@@ -0,0 +1,183 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage2_c0_c0;
+uniform vec2 uBounds_Stage2_c0_c0;
+uniform vec4 uKernel_Stage2_c0_c0[6];
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 GaussianConvolution_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_1_Stage0 - 11.0 * uImageIncrement_Stage2_c0_c0;
+ vec2 coordSampled = vec2(0.0, 0.0);
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage2_c0_c0.x && coord.x <= uBounds_Stage2_c0_c0.y) {
+ _output += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2_c0_c0[0].x;
+ }
+ coord += uImageIncrement_Stage2_c0_c0;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage2_c0_c0.x && coord.x <= uBounds_Stage2_c0_c0.y) {
+ _output += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2_c0_c0[0].y;
+ }
+ coord += uImageIncrement_Stage2_c0_c0;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage2_c0_c0.x && coord.x <= uBounds_Stage2_c0_c0.y) {
+ _output += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2_c0_c0[0].z;
+ }
+ coord += uImageIncrement_Stage2_c0_c0;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage2_c0_c0.x && coord.x <= uBounds_Stage2_c0_c0.y) {
+ _output += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2_c0_c0[0].w;
+ }
+ coord += uImageIncrement_Stage2_c0_c0;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage2_c0_c0.x && coord.x <= uBounds_Stage2_c0_c0.y) {
+ _output += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2_c0_c0[1].x;
+ }
+ coord += uImageIncrement_Stage2_c0_c0;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage2_c0_c0.x && coord.x <= uBounds_Stage2_c0_c0.y) {
+ _output += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2_c0_c0[1].y;
+ }
+ coord += uImageIncrement_Stage2_c0_c0;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage2_c0_c0.x && coord.x <= uBounds_Stage2_c0_c0.y) {
+ _output += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2_c0_c0[1].z;
+ }
+ coord += uImageIncrement_Stage2_c0_c0;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage2_c0_c0.x && coord.x <= uBounds_Stage2_c0_c0.y) {
+ _output += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2_c0_c0[1].w;
+ }
+ coord += uImageIncrement_Stage2_c0_c0;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage2_c0_c0.x && coord.x <= uBounds_Stage2_c0_c0.y) {
+ _output += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2_c0_c0[2].x;
+ }
+ coord += uImageIncrement_Stage2_c0_c0;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage2_c0_c0.x && coord.x <= uBounds_Stage2_c0_c0.y) {
+ _output += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2_c0_c0[2].y;
+ }
+ coord += uImageIncrement_Stage2_c0_c0;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage2_c0_c0.x && coord.x <= uBounds_Stage2_c0_c0.y) {
+ _output += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2_c0_c0[2].z;
+ }
+ coord += uImageIncrement_Stage2_c0_c0;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage2_c0_c0.x && coord.x <= uBounds_Stage2_c0_c0.y) {
+ _output += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2_c0_c0[2].w;
+ }
+ coord += uImageIncrement_Stage2_c0_c0;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage2_c0_c0.x && coord.x <= uBounds_Stage2_c0_c0.y) {
+ _output += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2_c0_c0[3].x;
+ }
+ coord += uImageIncrement_Stage2_c0_c0;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage2_c0_c0.x && coord.x <= uBounds_Stage2_c0_c0.y) {
+ _output += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2_c0_c0[3].y;
+ }
+ coord += uImageIncrement_Stage2_c0_c0;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage2_c0_c0.x && coord.x <= uBounds_Stage2_c0_c0.y) {
+ _output += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2_c0_c0[3].z;
+ }
+ coord += uImageIncrement_Stage2_c0_c0;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage2_c0_c0.x && coord.x <= uBounds_Stage2_c0_c0.y) {
+ _output += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2_c0_c0[3].w;
+ }
+ coord += uImageIncrement_Stage2_c0_c0;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage2_c0_c0.x && coord.x <= uBounds_Stage2_c0_c0.y) {
+ _output += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2_c0_c0[4].x;
+ }
+ coord += uImageIncrement_Stage2_c0_c0;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage2_c0_c0.x && coord.x <= uBounds_Stage2_c0_c0.y) {
+ _output += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2_c0_c0[4].y;
+ }
+ coord += uImageIncrement_Stage2_c0_c0;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage2_c0_c0.x && coord.x <= uBounds_Stage2_c0_c0.y) {
+ _output += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2_c0_c0[4].z;
+ }
+ coord += uImageIncrement_Stage2_c0_c0;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage2_c0_c0.x && coord.x <= uBounds_Stage2_c0_c0.y) {
+ _output += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2_c0_c0[4].w;
+ }
+ coord += uImageIncrement_Stage2_c0_c0;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage2_c0_c0.x && coord.x <= uBounds_Stage2_c0_c0.y) {
+ _output += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2_c0_c0[5].x;
+ }
+ coord += uImageIncrement_Stage2_c0_c0;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage2_c0_c0.x && coord.x <= uBounds_Stage2_c0_c0.y) {
+ _output += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2_c0_c0[5].y;
+ }
+ coord += uImageIncrement_Stage2_c0_c0;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage2_c0_c0.x && coord.x <= uBounds_Stage2_c0_c0.y) {
+ _output += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2_c0_c0[5].z;
+ }
+ coord += uImageIncrement_Stage2_c0_c0;
+ _output *= _input;
+ return _output;
+}
+float _guarded_divide(float n, float d) {
+ return n / d;
+}
+float _color_burn_component(float sc, float sa, float dc, float da) {
+ if (da == dc) {
+ return (sa * da + sc * (1.0 - da)) + dc * (1.0 - sa);
+ } else if (sc == 0.0) {
+ return dc * (1.0 - sa);
+ }
+ float d = max(0.0, da - _guarded_divide((da - dc) * sa, sc));
+ return (d * sa + sc * (1.0 - da)) + dc * (1.0 - sa);
+}
+vec4 blend_color_burn(vec4 src, vec4 dst) {
+ return vec4(_color_burn_component(src.x, src.w, dst.x, dst.w), _color_burn_component(src.y, src.w, dst.y, dst.w), _color_burn_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_color_burn(GaussianConvolution_Stage2_c0_c0(vec4(1.0)), output_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/601.shader_test b/shaders/skia/601.shader_test
new file mode 100644
index 0000000..212be55
--- /dev/null
+++ b/shaders/skia/601.shader_test
@@ -0,0 +1,88 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 ucolor_Stage1_c0_c0_c0_c0;
+uniform vec4 ucolor_Stage2;
+uniform vec4 ucolor_Stage3_c1_c0;
+noperspective in vec4 vcolor_Stage0;
+vec4 ConstColorProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = _input.w * ucolor_Stage1_c0_c0_c0_c0;
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = ConstColorProcessor_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 ConstColorProcessor_Stage3_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage3_c1_c0;
+ }
+ return _output;
+}
+vec4 blend_multiply(vec4 src, vec4 dst) {
+ return vec4(((1.0 - src.w) * dst.xyz + (1.0 - dst.w) * src.xyz) + src.xyz * dst.xyz, src.w + (1.0 - src.w) * dst.w);
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 blend_darken(vec4 src, vec4 dst) {
+ vec4 result = blend_src_over(src, dst);
+ result.xyz = min(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
+ return result;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_multiply(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ {
+ output_Stage2 = output_Stage1 * ucolor_Stage2;
+ }
+ }
+ vec4 output_Stage3;
+ {
+ output_Stage3 = blend_darken(ConstColorProcessor_Stage3_c1_c0(vec4(1.0)), output_Stage2);
+ }
+ {
+ sk_FragColor = output_Stage3;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 position;
+in vec4 inColor;
+noperspective out vec4 vcolor_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/604-2.shader_test b/shaders/skia/604-2.shader_test
new file mode 100644
index 0000000..8cf263d
--- /dev/null
+++ b/shaders/skia/604-2.shader_test
@@ -0,0 +1,90 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 ucircleData_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec4 vcolor_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ vec2 vec = vec2((gl_FragCoord.x - ucircleData_Stage1.x) * ucircleData_Stage1.w, (gl_FragCoord.y - ucircleData_Stage1.y) * ucircleData_Stage1.w);
+ float dist = length(vec) + (0.5 - ucircleData_Stage1.z) * ucircleData_Stage1.w;
+ output_Stage1 = vec4(texture(uTextureSampler_0_Stage1, vec2(dist, 0.5)).w);
+ }
+ {
+ sk_FragColor = 1.0 - output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform float uSrcTF_Stage0[7];
+uniform mat3 uColorXform_Stage0;
+uniform float uDstTF_Stage0[7];
+uniform mat3 uViewM_Stage0;
+in vec2 position;
+in vec4 inColor;
+noperspective out vec4 vcolor_Stage0;
+float src_tf_Stage0(float x) {
+ float G = uSrcTF_Stage0[0];
+ float A = uSrcTF_Stage0[1];
+ float B = uSrcTF_Stage0[2];
+ float C = uSrcTF_Stage0[3];
+ float D = uSrcTF_Stage0[4];
+ float E = uSrcTF_Stage0[5];
+ float F = uSrcTF_Stage0[6];
+ float s = sign(x);
+ x = abs(x);
+ x = x < D ? C * x + F : pow(A * x + B, G) + E;
+ return s * x;
+}
+float dst_tf_Stage0(float x) {
+ float G = uDstTF_Stage0[0];
+ float A = uDstTF_Stage0[1];
+ float B = uDstTF_Stage0[2];
+ float C = uDstTF_Stage0[3];
+ float D = uDstTF_Stage0[4];
+ float E = uDstTF_Stage0[5];
+ float F = uDstTF_Stage0[6];
+ float s = sign(x);
+ x = abs(x);
+ x = x < D ? C * x + F : pow(A * x + B, G) + E;
+ return s * x;
+}
+vec4 gamut_xform_Stage0(vec4 color) {
+ color.xyz = uColorXform_Stage0 * color.xyz;
+ return color;
+}
+vec4 color_xform_Stage0(vec4 color) {
+ float nonZeroAlpha = max(color.w, 9.9999997473787516e-05);
+ color = vec4(color.xyz / nonZeroAlpha, nonZeroAlpha);
+ color.x = src_tf_Stage0(color.x);
+ color.y = src_tf_Stage0(color.y);
+ color.z = src_tf_Stage0(color.z);
+ color = gamut_xform_Stage0(color);
+ color.x = dst_tf_Stage0(color.x);
+ color.y = dst_tf_Stage0(color.y);
+ color.z = dst_tf_Stage0(color.z);
+ color.xyz *= color.w;
+ return color;
+}
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = color_xform_Stage0(color);
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_PointSize = 1.0;
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/604-3.shader_test b/shaders/skia/604-3.shader_test
new file mode 100644
index 0000000..b92f53a
--- /dev/null
+++ b/shaders/skia/604-3.shader_test
@@ -0,0 +1,46 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 ucircle_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ float d;
+ {
+ d = (1.0 - length((ucircle_Stage2.xy - gl_FragCoord.xy) * ucircle_Stage2.w)) * ucircle_Stage2.z;
+ }
+ {
+ output_Stage2 = output_Stage1 * clamp(d, 0.0, 1.0);
+ }
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/604-4.shader_test b/shaders/skia/604-4.shader_test
new file mode 100644
index 0000000..3bfd68c
--- /dev/null
+++ b/shaders/skia/604-4.shader_test
@@ -0,0 +1,55 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform mat4 um_Stage2_c0_c0;
+uniform vec4 uv_Stage2_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 ColorMatrixFragmentProcessor_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = _input;
+ {
+ float nonZeroAlpha = max(inputColor.w, 9.9999997473787516e-05);
+ inputColor = vec4(inputColor.xyz / nonZeroAlpha, inputColor.w);
+ }
+ _output = um_Stage2_c0_c0 * inputColor + uv_Stage2_c0_c0;
+ {
+ _output = clamp(_output, 0.0, 1.0);
+ }
+ return _output;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_src_over(ColorMatrixFragmentProcessor_Stage2_c0_c0(vec4(1.0)), output_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/604.shader_test b/shaders/skia/604.shader_test
new file mode 100644
index 0000000..20fe1e0
--- /dev/null
+++ b/shaders/skia/604.shader_test
@@ -0,0 +1,179 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.w) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ } else {
+ {
+ if (t < uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = OverrideInputFragmentProcessor_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+float _blend_color_saturation(vec3 color) {
+ return max(max(color.x, color.y), color.z) - min(min(color.x, color.y), color.z);
+}
+vec3 _blend_set_color_saturation_helper(vec3 minMidMax, float sat) {
+ if (minMidMax.x < minMidMax.z) {
+ return vec3(0.0, (sat * (minMidMax.y - minMidMax.x)) / (minMidMax.z - minMidMax.x), sat);
+ }
+ return vec3(0.0);
+}
+vec3 _blend_set_color_saturation(vec3 hueLumColor, vec3 satColor) {
+ float sat = _blend_color_saturation(satColor);
+ if (hueLumColor.x <= hueLumColor.y) {
+ if (hueLumColor.y <= hueLumColor.z) {
+ hueLumColor.xyz = _blend_set_color_saturation_helper(hueLumColor, sat);
+ } else if (hueLumColor.x <= hueLumColor.z) {
+ hueLumColor.xzy = _blend_set_color_saturation_helper(hueLumColor.xzy, sat);
+ } else {
+ hueLumColor.zxy = _blend_set_color_saturation_helper(hueLumColor.zxy, sat);
+ }
+ } else if (hueLumColor.x <= hueLumColor.z) {
+ hueLumColor.yxz = _blend_set_color_saturation_helper(hueLumColor.yxz, sat);
+ } else if (hueLumColor.y <= hueLumColor.z) {
+ hueLumColor.yzx = _blend_set_color_saturation_helper(hueLumColor.yzx, sat);
+ } else {
+ hueLumColor.zyx = _blend_set_color_saturation_helper(hueLumColor.zyx, sat);
+ }
+ return hueLumColor;
+}
+float _blend_color_luminance(vec3 color) {
+ return dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), color);
+}
+vec3 _blend_set_color_luminance(vec3 hueSatColor, float alpha, vec3 lumColor) {
+ float lum = _blend_color_luminance(lumColor);
+ vec3 result = (lum - _blend_color_luminance(hueSatColor)) + hueSatColor;
+ float minComp = min(min(result.x, result.y), result.z);
+ float maxComp = max(max(result.x, result.y), result.z);
+ if (minComp < 0.0 && lum != minComp) {
+ result = lum + ((result - lum) * lum) / (lum - minComp);
+ }
+ if (maxComp > alpha && maxComp != lum) {
+ return lum + ((result - lum) * (alpha - lum)) / (maxComp - lum);
+ }
+ return result;
+}
+vec4 blend_hue(vec4 src, vec4 dst) {
+ float alpha = dst.w * src.w;
+ vec3 sda = src.xyz * dst.w;
+ vec3 dsa = dst.xyz * src.w;
+ return vec4((((_blend_set_color_luminance(_blend_set_color_saturation(sda, dsa), alpha, dsa) + dst.xyz) - dsa) + src.xyz) - sda, (src.w + dst.w) - alpha);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_hue(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 inColor;
+in vec2 inLocalCoord;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/607-3.shader_test b/shaders/skia/607-3.shader_test
new file mode 100644
index 0000000..f0f5676
--- /dev/null
+++ b/shaders/skia/607-3.shader_test
@@ -0,0 +1,46 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 ucircle_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ float d;
+ {
+ d = (length((ucircle_Stage2.xy - gl_FragCoord.xy) * ucircle_Stage2.w) - 1.0) * ucircle_Stage2.z;
+ }
+ {
+ output_Stage2 = d > 0.5 ? output_Stage1 : vec4(0.0);
+ }
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/607-4.shader_test b/shaders/skia/607-4.shader_test
new file mode 100644
index 0000000..44fe032
--- /dev/null
+++ b/shaders/skia/607-4.shader_test
@@ -0,0 +1,105 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uinnerRect_Stage2_c0_c0;
+uniform vec4 uinvRadiiLTRB_Stage2_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 EllipticalRRect_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 dxy0 = uinnerRect_Stage2_c0_c0.xy - gl_FragCoord.xy;
+ vec2 dxy1 = gl_FragCoord.xy - uinnerRect_Stage2_c0_c0.zw;
+ vec2 dxy = max(max(dxy0, dxy1), 0.0);
+ vec2 Z = max(max(dxy0 * uinvRadiiLTRB_Stage2_c0_c0.xy, dxy1 * uinvRadiiLTRB_Stage2_c0_c0.zw), 0.0);
+ float implicit = dot(Z, dxy) - 1.0;
+ float grad_dot = 4.0 * dot(Z, Z);
+ grad_dot = max(grad_dot, 9.9999997473787516e-05);
+ float approx_dist = implicit * inversesqrt(grad_dot);
+ float alpha = clamp(0.5 + approx_dist, 0.0, 1.0);
+ _output = _input * alpha;
+ return _output;
+}
+float _blend_color_saturation(vec3 color) {
+ return max(max(color.x, color.y), color.z) - min(min(color.x, color.y), color.z);
+}
+vec3 _blend_set_color_saturation_helper(vec3 minMidMax, float sat) {
+ if (minMidMax.x < minMidMax.z) {
+ return vec3(0.0, (sat * (minMidMax.y - minMidMax.x)) / (minMidMax.z - minMidMax.x), sat);
+ }
+ return vec3(0.0);
+}
+vec3 _blend_set_color_saturation(vec3 hueLumColor, vec3 satColor) {
+ float sat = _blend_color_saturation(satColor);
+ if (hueLumColor.x <= hueLumColor.y) {
+ if (hueLumColor.y <= hueLumColor.z) {
+ hueLumColor.xyz = _blend_set_color_saturation_helper(hueLumColor, sat);
+ } else if (hueLumColor.x <= hueLumColor.z) {
+ hueLumColor.xzy = _blend_set_color_saturation_helper(hueLumColor.xzy, sat);
+ } else {
+ hueLumColor.zxy = _blend_set_color_saturation_helper(hueLumColor.zxy, sat);
+ }
+ } else if (hueLumColor.x <= hueLumColor.z) {
+ hueLumColor.yxz = _blend_set_color_saturation_helper(hueLumColor.yxz, sat);
+ } else if (hueLumColor.y <= hueLumColor.z) {
+ hueLumColor.yzx = _blend_set_color_saturation_helper(hueLumColor.yzx, sat);
+ } else {
+ hueLumColor.zyx = _blend_set_color_saturation_helper(hueLumColor.zyx, sat);
+ }
+ return hueLumColor;
+}
+float _blend_color_luminance(vec3 color) {
+ return dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), color);
+}
+vec3 _blend_set_color_luminance(vec3 hueSatColor, float alpha, vec3 lumColor) {
+ float lum = _blend_color_luminance(lumColor);
+ vec3 result = (lum - _blend_color_luminance(hueSatColor)) + hueSatColor;
+ float minComp = min(min(result.x, result.y), result.z);
+ float maxComp = max(max(result.x, result.y), result.z);
+ if (minComp < 0.0 && lum != minComp) {
+ result = lum + ((result - lum) * lum) / (lum - minComp);
+ }
+ if (maxComp > alpha && maxComp != lum) {
+ return lum + ((result - lum) * (alpha - lum)) / (maxComp - lum);
+ }
+ return result;
+}
+vec4 blend_hue(vec4 src, vec4 dst) {
+ float alpha = dst.w * src.w;
+ vec3 sda = src.xyz * dst.w;
+ vec3 dsa = dst.xyz * src.w;
+ return vec4((((_blend_set_color_luminance(_blend_set_color_saturation(sda, dsa), alpha, dsa) + dst.xyz) - dsa) + src.xyz) - sda, (src.w + dst.w) - alpha);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_hue(EllipticalRRect_Stage2_c0_c0(vec4(1.0)), output_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/607.shader_test b/shaders/skia/607.shader_test
new file mode 100644
index 0000000..c2557a0
--- /dev/null
+++ b/shaders/skia/607.shader_test
@@ -0,0 +1,108 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 ucolor_Stage1_c0_c0_c0_c0;
+noperspective in vec4 vcolor_Stage0;
+vec4 ConstColorProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = _input.w * ucolor_Stage1_c0_c0_c0_c0;
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = ConstColorProcessor_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+float _blend_color_saturation(vec3 color) {
+ return max(max(color.x, color.y), color.z) - min(min(color.x, color.y), color.z);
+}
+vec3 _blend_set_color_saturation_helper(vec3 minMidMax, float sat) {
+ if (minMidMax.x < minMidMax.z) {
+ return vec3(0.0, (sat * (minMidMax.y - minMidMax.x)) / (minMidMax.z - minMidMax.x), sat);
+ }
+ return vec3(0.0);
+}
+vec3 _blend_set_color_saturation(vec3 hueLumColor, vec3 satColor) {
+ float sat = _blend_color_saturation(satColor);
+ if (hueLumColor.x <= hueLumColor.y) {
+ if (hueLumColor.y <= hueLumColor.z) {
+ hueLumColor.xyz = _blend_set_color_saturation_helper(hueLumColor, sat);
+ } else if (hueLumColor.x <= hueLumColor.z) {
+ hueLumColor.xzy = _blend_set_color_saturation_helper(hueLumColor.xzy, sat);
+ } else {
+ hueLumColor.zxy = _blend_set_color_saturation_helper(hueLumColor.zxy, sat);
+ }
+ } else if (hueLumColor.x <= hueLumColor.z) {
+ hueLumColor.yxz = _blend_set_color_saturation_helper(hueLumColor.yxz, sat);
+ } else if (hueLumColor.y <= hueLumColor.z) {
+ hueLumColor.yzx = _blend_set_color_saturation_helper(hueLumColor.yzx, sat);
+ } else {
+ hueLumColor.zyx = _blend_set_color_saturation_helper(hueLumColor.zyx, sat);
+ }
+ return hueLumColor;
+}
+float _blend_color_luminance(vec3 color) {
+ return dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), color);
+}
+vec3 _blend_set_color_luminance(vec3 hueSatColor, float alpha, vec3 lumColor) {
+ float lum = _blend_color_luminance(lumColor);
+ vec3 result = (lum - _blend_color_luminance(hueSatColor)) + hueSatColor;
+ float minComp = min(min(result.x, result.y), result.z);
+ float maxComp = max(max(result.x, result.y), result.z);
+ if (minComp < 0.0 && lum != minComp) {
+ result = lum + ((result - lum) * lum) / (lum - minComp);
+ }
+ if (maxComp > alpha && maxComp != lum) {
+ return lum + ((result - lum) * (alpha - lum)) / (maxComp - lum);
+ }
+ return result;
+}
+vec4 blend_hue(vec4 src, vec4 dst) {
+ float alpha = dst.w * src.w;
+ vec3 sda = src.xyz * dst.w;
+ vec3 dsa = dst.xyz * src.w;
+ return vec4((((_blend_set_color_luminance(_blend_set_color_saturation(sda, dsa), alpha, dsa) + dst.xyz) - dsa) + src.xyz) - sda, (src.w + dst.w) - alpha);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_hue(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 position;
+in vec4 inColor;
+noperspective out vec4 vcolor_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/61-1.shader_test b/shaders/skia/61-1.shader_test
new file mode 100644
index 0000000..52ef4f0
--- /dev/null
+++ b/shaders/skia/61-1.shader_test
@@ -0,0 +1,62 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 TextureEffect_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage2, vTransformedCoords_1_Stage0) * _input;
+ return _output;
+}
+float _guarded_divide(float n, float d) {
+ return n / d;
+}
+float _color_burn_component(float sc, float sa, float dc, float da) {
+ if (da == dc) {
+ return (sa * da + sc * (1.0 - da)) + dc * (1.0 - sa);
+ } else if (sc == 0.0) {
+ return dc * (1.0 - sa);
+ }
+ float d = max(0.0, da - _guarded_divide((da - dc) * sa, sc));
+ return (d * sa + sc * (1.0 - da)) + dc * (1.0 - sa);
+}
+vec4 blend_color_burn(vec4 src, vec4 dst) {
+ return vec4(_color_burn_component(src.x, src.w, dst.x, dst.w), _color_burn_component(src.y, src.w, dst.y, dst.w), _color_burn_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_color_burn(output_Stage1, TextureEffect_Stage2_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/61-10.shader_test b/shaders/skia/61-10.shader_test
new file mode 100644
index 0000000..7a67a4b
--- /dev/null
+++ b/shaders/skia/61-10.shader_test
@@ -0,0 +1,54 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec2 uDstTextureUpperLeft_Stage1;
+uniform vec2 uDstTextureCoordScale_Stage1;
+uniform sampler2D uDstTextureSampler_Stage1;
+flat in vec4 vcolor_Stage0;
+noperspective in float vcoverage_Stage0;
+vec4 blend_src(vec4 src, vec4 dst) {
+ return src;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ float coverage = vcoverage_Stage0;
+ outputCoverage_Stage0 = vec4(coverage);
+ }
+ {
+ if (all(lessThanEqual(outputCoverage_Stage0.xyz, vec3(0.0)))) {
+ discard;
+ }
+ vec2 _dstTexCoord = (gl_FragCoord.xy - uDstTextureUpperLeft_Stage1) * uDstTextureCoordScale_Stage1;
+ _dstTexCoord.y = 1.0 - _dstTexCoord.y;
+ vec4 _dstColor = texture(uDstTextureSampler_Stage1, _dstTexCoord);
+ sk_FragColor = blend_src(outputColor_Stage0, _dstColor);
+ sk_FragColor = outputCoverage_Stage0 * sk_FragColor + (vec4(1.0) - outputCoverage_Stage0) * _dstColor;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 position;
+in float coverage;
+in vec4 color;
+flat out vec4 vcolor_Stage0;
+noperspective out float vcoverage_Stage0;
+void main() {
+ vec2 position = position;
+ vcolor_Stage0 = color;
+ vcoverage_Stage0 = coverage;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/61-11.shader_test b/shaders/skia/61-11.shader_test
new file mode 100644
index 0000000..b218585
--- /dev/null
+++ b/shaders/skia/61-11.shader_test
@@ -0,0 +1,50 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 urectUniform_Stage1;
+flat in vec4 vcolor_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ float alpha;
+ {
+ float xSub, ySub;
+ xSub = min(gl_FragCoord.x - urectUniform_Stage1.x, 0.0);
+ xSub += min(urectUniform_Stage1.z - gl_FragCoord.x, 0.0);
+ ySub = min(gl_FragCoord.y - urectUniform_Stage1.y, 0.0);
+ ySub += min(urectUniform_Stage1.w - gl_FragCoord.y, 0.0);
+ alpha = (1.0 + max(xSub, -1.0)) * (1.0 + max(ySub, -1.0));
+ }
+ {
+ alpha = 1.0 - alpha;
+ }
+ output_Stage1 = vec4(alpha);
+ }
+ {
+ sk_FragColor = outputColor_Stage0 * output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 position;
+in vec4 color;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/61-12.shader_test b/shaders/skia/61-12.shader_test
new file mode 100644
index 0000000..c85d7d1
--- /dev/null
+++ b/shaders/skia/61-12.shader_test
@@ -0,0 +1,75 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage2_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c1_c0;
+ }
+ return _output;
+}
+vec4 blend_dst_over(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src + dst;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_dst_over(ConstColorProcessor_Stage2_c1_c0(vec4(1.0)), output_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/61-13.shader_test b/shaders/skia/61-13.shader_test
new file mode 100644
index 0000000..237dc05
--- /dev/null
+++ b/shaders/skia/61-13.shader_test
@@ -0,0 +1,41 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform float uPixelSize_Stage1;
+uniform vec2 uRange_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0;
+ coord.x -= 16.0 * uPixelSize_Stage1;
+ for (int i = 0;i < 33; i++) {
+ output_Stage1 = max(output_Stage1, texture(uTextureSampler_0_Stage1, coord));
+ coord.x += uPixelSize_Stage1;
+ }
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/61-14.shader_test b/shaders/skia/61-14.shader_test
new file mode 100644
index 0000000..b6f3e56
--- /dev/null
+++ b/shaders/skia/61-14.shader_test
@@ -0,0 +1,153 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform float uSurfaceScale_Stage1;
+uniform vec3 uLightColor_Stage1;
+uniform float uKD_Stage1;
+uniform vec3 uLightLocation_Stage1;
+uniform float uExponent_Stage1;
+uniform float uCosInnerConeAngle_Stage1;
+uniform float uCosOuterConeAngle_Stage1;
+uniform float uConeScale_Stage1;
+uniform vec3 uS_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 light_Stage1(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ float colorScale = uKD_Stage1 * dot(normal, surfaceToLight);
+ return vec4(lightColor * clamp(colorScale, 0.0, 1.0), 1.0);
+}
+float sobel_Stage1(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage1(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage1(float m[9], float surfaceScale) {
+ return pointToNormal_Stage1(sobel_Stage1(0.0, 0.0, m[4], m[5], m[7], m[8], 0.66666698455810547), sobel_Stage1(0.0, 0.0, m[4], m[7], m[5], m[8], 0.66666698455810547), surfaceScale);
+}
+vec3 lightColor_Stage1(vec3 surfaceToLight) {
+ float cosAngle = -dot(surfaceToLight, uS_Stage1);
+ if (cosAngle < uCosOuterConeAngle_Stage1) {
+ return vec3(0.0);
+ }
+ float scale = pow(cosAngle, uExponent_Stage1);
+ if (cosAngle < uCosInnerConeAngle_Stage1) {
+ return ((uLightColor_Stage1 * scale) * (cosAngle - uCosOuterConeAngle_Stage1)) * uConeScale_Stage1;
+ }
+ return uLightColor_Stage1;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ vec2 coord = vTransformedCoords_0_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp0 = textureColor;
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp1 = textureColor;
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp2 = textureColor;
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp3 = textureColor;
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp4 = textureColor;
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp5 = textureColor;
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp6 = textureColor;
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp7 = textureColor;
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp8 = textureColor;
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = normalize(uLightLocation_Stage1 - vec3(gl_FragCoord.xy, uSurfaceScale_Stage1 * m[4]));
+ output_Stage1 = light_Stage1(normal_Stage1(m, uSurfaceScale_Stage1), surfaceToLight, lightColor_Stage1(surfaceToLight));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/61-15.shader_test b/shaders/skia/61-15.shader_test
new file mode 100644
index 0000000..2082138
--- /dev/null
+++ b/shaders/skia/61-15.shader_test
@@ -0,0 +1,82 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec2 uDstTextureUpperLeft_Stage1;
+uniform vec2 uDstTextureCoordScale_Stage1;
+uniform sampler2D uTextureSampler_0_Stage0;
+uniform sampler2D uDstTextureSampler_Stage1;
+noperspective in vec2 vTextureCoords_Stage0;
+flat in int vTexIndex_Stage0;
+noperspective in vec4 vinColor_Stage0;
+float _guarded_divide(float n, float d) {
+ return n / d;
+}
+float _color_dodge_component(float sc, float sa, float dc, float da) {
+ if (dc == 0.0) {
+ return sc * (1.0 - da);
+ } else {
+ float d = sa - sc;
+ if (d == 0.0) {
+ return (sa * da + sc * (1.0 - da)) + dc * (1.0 - sa);
+ }
+ d = min(da, _guarded_divide(dc * sa, d));
+ return (d * sa + sc * (1.0 - da)) + dc * (1.0 - sa);
+ }
+}
+vec4 blend_color_dodge(vec4 src, vec4 dst) {
+ return vec4(_color_dodge_component(src.x, src.w, dst.x, dst.w), _color_dodge_component(src.y, src.w, dst.y, dst.w), _color_dodge_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vinColor_Stage0;
+ vec4 texColor;
+ {
+ texColor = texture(uTextureSampler_0_Stage0, vTextureCoords_Stage0);
+ }
+ outputCoverage_Stage0 = texColor;
+ }
+ {
+ if (all(lessThanEqual(outputCoverage_Stage0.xyz, vec3(0.0)))) {
+ discard;
+ }
+ vec2 _dstTexCoord = (gl_FragCoord.xy - uDstTextureUpperLeft_Stage1) * uDstTextureCoordScale_Stage1;
+ _dstTexCoord.y = 1.0 - _dstTexCoord.y;
+ vec4 _dstColor = texture(uDstTextureSampler_Stage1, _dstTexCoord);
+ sk_FragColor = blend_color_dodge(outputColor_Stage0, _dstColor);
+ float lerpRed = mix(_dstColor.w, sk_FragColor.w, outputCoverage_Stage0.x);
+ float lerpBlue = mix(_dstColor.w, sk_FragColor.w, outputCoverage_Stage0.y);
+ float lerpGreen = mix(_dstColor.w, sk_FragColor.w, outputCoverage_Stage0.z);
+ sk_FragColor = outputCoverage_Stage0 * sk_FragColor + (vec4(1.0) - outputCoverage_Stage0) * _dstColor;
+ sk_FragColor.w = max(max(lerpRed, lerpBlue), lerpGreen);
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform vec2 uAtlasSizeInv_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in uvec2 inTextureCoords;
+noperspective out vec2 vTextureCoords_Stage0;
+flat out int vTexIndex_Stage0;
+noperspective out vec4 vinColor_Stage0;
+void main() {
+ ivec2 signedCoords = ivec2(int(inTextureCoords.x), int(inTextureCoords.y));
+ vec2 unormTexCoords = vec2(float(signedCoords.x / 2), float(signedCoords.y / 2));
+ vTextureCoords_Stage0 = unormTexCoords * uAtlasSizeInv_Stage0;
+ vTexIndex_Stage0 = 0;
+ vinColor_Stage0 = inColor;
+ gl_Position = vec4(inPosition.x, inPosition.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/61-16.shader_test b/shaders/skia/61-16.shader_test
new file mode 100644
index 0000000..f387ce8
--- /dev/null
+++ b/shaders/skia/61-16.shader_test
@@ -0,0 +1,44 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform float uPixelSize_Stage1;
+uniform vec2 uRange_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = vec4(1.0, 1.0, 1.0, 1.0);
+ vec2 coord = vTransformedCoords_0_Stage0;
+ coord.x -= 10.0 * uPixelSize_Stage1;
+ float highBound = min(uRange_Stage1.y, coord.x + 20.0 * uPixelSize_Stage1);
+ coord.x = max(uRange_Stage1.x, coord.x);
+ for (int i = 0;i < 21; i++) {
+ output_Stage1 = min(output_Stage1, texture(uTextureSampler_0_Stage1, coord));
+ coord.x += uPixelSize_Stage1;
+ coord.x = min(highBound, coord.x);
+ }
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/61-2.shader_test b/shaders/skia/61-2.shader_test
new file mode 100644
index 0000000..da2ab85
--- /dev/null
+++ b/shaders/skia/61-2.shader_test
@@ -0,0 +1,117 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uclamp_Stage1_c0_c0_c0_c0;
+uniform vec4 uclamp_Stage1_c0_c0_c1_c0;
+uniform vec4 uclamp_Stage1_c0_c0_c2_c0;
+uniform mat4 um_Stage2;
+uniform vec4 uv_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+uniform sampler2D uTextureSampler_2_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 inCoord = vTransformedCoords_0_Stage0;
+ vec2 subsetCoord;
+ subsetCoord.x = inCoord.x;
+ subsetCoord.y = inCoord.y;
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage1_c0_c0_c0_c0.x, uclamp_Stage1_c0_c0_c0_c0.z);
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage1_c0_c0_c0_c0.y, uclamp_Stage1_c0_c0_c0_c0.w);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ _output = _input * textureColor;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 inCoord = vTransformedCoords_1_Stage0;
+ vec2 subsetCoord;
+ subsetCoord.x = inCoord.x;
+ subsetCoord.y = inCoord.y;
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage1_c0_c0_c1_c0.x, uclamp_Stage1_c0_c0_c1_c0.z);
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage1_c0_c0_c1_c0.y, uclamp_Stage1_c0_c0_c1_c0.w);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ _output = _input * textureColor;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c0_c0_c2_c0(vec4 _input) {
+ vec4 _output;
+ vec2 inCoord = vTransformedCoords_2_Stage0;
+ vec2 subsetCoord;
+ subsetCoord.x = inCoord.x;
+ subsetCoord.y = inCoord.y;
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage1_c0_c0_c2_c0.x, uclamp_Stage1_c0_c0_c2_c0.z);
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage1_c0_c0_c2_c0.y, uclamp_Stage1_c0_c0_c2_c0.w);
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ _output = _input * textureColor;
+ return _output;
+}
+vec4 YUVtoRGBEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 planes[3];
+ planes[0] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0));
+ planes[1] = TextureEffect_Stage1_c0_c0_c1_c0(vec4(1.0));
+ planes[2] = TextureEffect_Stage1_c0_c0_c2_c0(vec4(1.0));
+ vec4 color = vec4(planes[0].x, planes[1].y, planes[1].x, planes[2].w);
+ color.xyz *= color.w;
+ _output = color;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = YUVtoRGBEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ vec4 inputColor = output_Stage1;
+ {
+ float nonZeroAlpha = max(inputColor.w, 9.9999997473787516e-05);
+ inputColor = vec4(inputColor.xyz / nonZeroAlpha, inputColor.w);
+ }
+ output_Stage2 = um_Stage2 * inputColor + uv_Stage2;
+ {
+ output_Stage2 = clamp(output_Stage2, 0.0, 1.0);
+ }
+ {
+ output_Stage2.xyz *= output_Stage2.w;
+ }
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/61-21.shader_test b/shaders/skia/61-21.shader_test
new file mode 100644
index 0000000..594e377
--- /dev/null
+++ b/shaders/skia/61-21.shader_test
@@ -0,0 +1,41 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform float uPixelSize_Stage1;
+uniform vec2 uRange_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = vec4(1.0, 1.0, 1.0, 1.0);
+ vec2 coord = vTransformedCoords_0_Stage0;
+ coord.y -= uPixelSize_Stage1;
+ for (int i = 0;i < 3; i++) {
+ output_Stage1 = min(output_Stage1, texture(uTextureSampler_0_Stage1, coord));
+ coord.y += uPixelSize_Stage1;
+ }
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/61-27.shader_test b/shaders/skia/61-27.shader_test
new file mode 100644
index 0000000..70713b3
--- /dev/null
+++ b/shaders/skia/61-27.shader_test
@@ -0,0 +1,58 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform vec2 uBounds_Stage1;
+uniform vec4 uKernel_Stage1[2];
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0 - 2.0 * uImageIncrement_Stage1;
+ vec2 coordSampled = vec2(0.0, 0.0);
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].x;
+ coord += uImageIncrement_Stage1;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/61-28.shader_test b/shaders/skia/61-28.shader_test
new file mode 100644
index 0000000..d928fe5
--- /dev/null
+++ b/shaders/skia/61-28.shader_test
@@ -0,0 +1,80 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform float ubias_Stage1_c0_c0_c0_c0;
+uniform float uscale_Stage1_c0_c0_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 SweepGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float angle;
+ {
+ angle = atan(-vTransformedCoords_0_Stage0.y, -vTransformedCoords_0_Stage0.x);
+ }
+ float t = ((angle * 0.15915493667125702 + 0.5) + ubias_Stage1_c0_c0_c0_c0) * uscale_Stage1_c0_c0_c0_c0;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = SweepGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_dst_in(outputColor_Stage0, ClampedGradientEffect_Stage1_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/61-29.shader_test b/shaders/skia/61-29.shader_test
new file mode 100644
index 0000000..33609fb
--- /dev/null
+++ b/shaders/skia/61-29.shader_test
@@ -0,0 +1,96 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform float ubias_Stage1_c0_c0_c0_c0;
+uniform float uscale_Stage1_c0_c0_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 SweepGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float angle;
+ {
+ angle = atan(-vTransformedCoords_0_Stage0.y, -vTransformedCoords_0_Stage0.x);
+ }
+ float t = ((angle * 0.15915493667125702 + 0.5) + ubias_Stage1_c0_c0_c0_c0) * uscale_Stage1_c0_c0_c0_c0;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = SweepGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_dst_in(outputColor_Stage0, ClampedGradientEffect_Stage1_c0_c0(vec4(1.0)));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_1_Stage0.x);
+ uint y = uint(vTransformedCoords_1_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ output_Stage2 = vec4(clamp(output_Stage2.xyz + value * 0.0039215688593685627, 0.0, output_Stage2.w), output_Stage2.w);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/61-30.shader_test b/shaders/skia/61-30.shader_test
new file mode 100644
index 0000000..767bf96
--- /dev/null
+++ b/shaders/skia/61-30.shader_test
@@ -0,0 +1,104 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_0_Stage0;
+ float t = -1.0;
+ {
+ {
+ float r0 = ufocalParams_Stage1_c0_c0_c0_c0.x;
+ {
+ t = -length(p) - r0;
+ }
+ }
+ }
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/61-31.shader_test b/shaders/skia/61-31.shader_test
new file mode 100644
index 0000000..c6f6257
--- /dev/null
+++ b/shaders/skia/61-31.shader_test
@@ -0,0 +1,119 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_0_Stage0;
+ float t = -1.0;
+ {
+ {
+ float r0 = ufocalParams_Stage1_c0_c0_c0_c0.x;
+ {
+ t = -length(p) - r0;
+ }
+ }
+ }
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TiledGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_1_Stage0.x);
+ uint y = uint(vTransformedCoords_1_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ output_Stage2 = vec4(clamp(output_Stage2.xyz + value * 0.0039215688593685627, 0.0, output_Stage2.w), output_Stage2.w);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/61-32.shader_test b/shaders/skia/61-32.shader_test
new file mode 100644
index 0000000..3139bb0
--- /dev/null
+++ b/shaders/skia/61-32.shader_test
@@ -0,0 +1,117 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_0_Stage0;
+ float t = -1.0;
+ {
+ {
+ float r0 = ufocalParams_Stage1_c0_c0_c0_c0.x;
+ {
+ t = -length(p) - r0;
+ }
+ }
+ }
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else {
+ {
+ t.x = fract(t.x);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TiledGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_1_Stage0.x);
+ uint y = uint(vTransformedCoords_1_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ output_Stage2 = vec4(clamp(output_Stage2.xyz + value * 0.0039215688593685627, 0.0, output_Stage2.w), output_Stage2.w);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/61-33.shader_test b/shaders/skia/61-33.shader_test
new file mode 100644
index 0000000..bb1804e
--- /dev/null
+++ b/shaders/skia/61-33.shader_test
@@ -0,0 +1,120 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_0_Stage0;
+ float t = -1.0;
+ {
+ {
+ float r0 = ufocalParams_Stage1_c0_c0_c0_c0.x;
+ {
+ t = -length(p) - r0;
+ }
+ }
+ }
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_1_Stage0.x);
+ uint y = uint(vTransformedCoords_1_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ output_Stage2 = vec4(clamp(output_Stage2.xyz + value * 0.0039215688593685627, 0.0, output_Stage2.w), output_Stage2.w);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/61-34.shader_test b/shaders/skia/61-34.shader_test
new file mode 100644
index 0000000..2e76faf
--- /dev/null
+++ b/shaders/skia/61-34.shader_test
@@ -0,0 +1,82 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 TextureEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = TextureEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = OverrideInputFragmentProcessor_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+float _guarded_divide(float n, float d) {
+ return n / d;
+}
+float _color_dodge_component(float sc, float sa, float dc, float da) {
+ if (dc == 0.0) {
+ return sc * (1.0 - da);
+ } else {
+ float d = sa - sc;
+ if (d == 0.0) {
+ return (sa * da + sc * (1.0 - da)) + dc * (1.0 - sa);
+ }
+ d = min(da, _guarded_divide(dc * sa, d));
+ return (d * sa + sc * (1.0 - da)) + dc * (1.0 - sa);
+ }
+}
+vec4 blend_color_dodge(vec4 src, vec4 dst) {
+ return vec4(_color_dodge_component(src.x, src.w, dst.x, dst.w), _color_dodge_component(src.y, src.w, dst.y, dst.w), _color_dodge_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_color_dodge(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec2 inLocalCoord;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 color = inColor;
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/61-35.shader_test b/shaders/skia/61-35.shader_test
new file mode 100644
index 0000000..18b003f
--- /dev/null
+++ b/shaders/skia/61-35.shader_test
@@ -0,0 +1,41 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform float uPixelSize_Stage1;
+uniform vec2 uRange_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0;
+ coord.y -= 9.0 * uPixelSize_Stage1;
+ for (int i = 0;i < 19; i++) {
+ output_Stage1 = max(output_Stage1, texture(uTextureSampler_0_Stage1, coord));
+ coord.y += uPixelSize_Stage1;
+ }
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/61-36.shader_test b/shaders/skia/61-36.shader_test
new file mode 100644
index 0000000..e0d1dac
--- /dev/null
+++ b/shaders/skia/61-36.shader_test
@@ -0,0 +1,121 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 uleftBorderColor_Stage1_c1_c0_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c1_c0_c0_c0;
+uniform vec4 ustart_Stage1_c1_c0_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c1_c0_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = ClampedGradientEffect_Stage1_c0_c0_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ return _output;
+}
+vec4 LinearGradientLayout_Stage1_c1_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_1_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c1_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c1_c0_c0_c0_c1_c0 + t * uend_Stage1_c1_c0_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c1_c0_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c1_c0_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c1_c0_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c1_c0_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = ClampedGradientEffect_Stage1_c1_c0_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ return _output;
+}
+vec4 blend_dst_atop(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src + src.w * dst;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_dst_atop(OverrideInputFragmentProcessor_Stage1_c0_c0(inputColor), OverrideInputFragmentProcessor_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/61-39.shader_test b/shaders/skia/61-39.shader_test
new file mode 100644
index 0000000..f49b5ea
--- /dev/null
+++ b/shaders/skia/61-39.shader_test
@@ -0,0 +1,48 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TextureEffect_Stage1_c0_c0(vec4(1.0));
+ output_Stage1.xyz *= outputColor_Stage0.xyz;
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/61-45.shader_test b/shaders/skia/61-45.shader_test
new file mode 100644
index 0000000..085b90c
--- /dev/null
+++ b/shaders/skia/61-45.shader_test
@@ -0,0 +1,72 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+uniform float uinnerThreshold_Stage3;
+uniform float uouterThreshold_Stage3;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+uniform sampler2D uTextureSampler_0_Stage3;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ float nonZeroAlpha = max(1.0, 9.9999997473787516e-05);
+ vec4 coord = vec4(vec4(1.0).xyz / nonZeroAlpha, nonZeroAlpha);
+ coord = coord * 0.9960939884185791 + vec4(0.0019529999699443579, 0.0019529999699443579, 0.0019529999699443579, 0.0019529999699443579);
+ output_Stage1.w = texture(uTextureSampler_0_Stage1, vec2(coord.w, 0.125)).w;
+ output_Stage1.x = texture(uTextureSampler_0_Stage1, vec2(coord.x, 0.375)).w;
+ output_Stage1.y = texture(uTextureSampler_0_Stage1, vec2(coord.y, 0.625)).w;
+ output_Stage1.z = texture(uTextureSampler_0_Stage1, vec2(coord.z, 0.875)).w;
+ output_Stage1.xyz *= output_Stage1.w;
+ }
+ vec4 output_Stage2;
+ {
+ float nonZeroAlpha = max(output_Stage1.w, 9.9999997473787516e-05);
+ vec4 coord = vec4(output_Stage1.xyz / nonZeroAlpha, nonZeroAlpha);
+ coord = coord * 0.9960939884185791 + vec4(0.0019529999699443579, 0.0019529999699443579, 0.0019529999699443579, 0.0019529999699443579);
+ output_Stage2.w = texture(uTextureSampler_0_Stage2, vec2(coord.w, 0.125)).w;
+ output_Stage2.x = texture(uTextureSampler_0_Stage2, vec2(coord.x, 0.375)).w;
+ output_Stage2.y = texture(uTextureSampler_0_Stage2, vec2(coord.y, 0.625)).w;
+ output_Stage2.z = texture(uTextureSampler_0_Stage2, vec2(coord.z, 0.875)).w;
+ output_Stage2.xyz *= output_Stage2.w;
+ }
+ {
+ vec4 color = output_Stage2;
+ vec4 mask_color = texture(uTextureSampler_0_Stage3, vTransformedCoords_0_Stage0);
+ if (mask_color.w < 0.5) {
+ if (color.w > uouterThreshold_Stage3) {
+ float scale = uouterThreshold_Stage3 / color.w;
+ color.xyz *= scale;
+ color.w = uouterThreshold_Stage3;
+ }
+ } else if (color.w < uinnerThreshold_Stage3) {
+ float scale = uinnerThreshold_Stage3 / max(0.0010000000474974513, color.w);
+ color.xyz *= scale;
+ color.w = uinnerThreshold_Stage3;
+ }
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 color = inColor;
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/61-46.shader_test b/shaders/skia/61-46.shader_test
new file mode 100644
index 0000000..14462ae
--- /dev/null
+++ b/shaders/skia/61-46.shader_test
@@ -0,0 +1,219 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage2;
+uniform float uSurfaceScale_Stage2;
+uniform vec3 uLightColor_Stage2;
+uniform float uKD_Stage2;
+uniform vec4 uTexDom_Stage2;
+uniform vec3 uDecalParams_Stage2;
+uniform vec3 uLightLocation_Stage2;
+uniform float uExponent_Stage2;
+uniform float uCosInnerConeAngle_Stage2;
+uniform float uCosOuterConeAngle_Stage2;
+uniform float uConeScale_Stage2;
+uniform vec3 uS_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 light_Stage2(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ float colorScale = uKD_Stage2 * dot(normal, surfaceToLight);
+ return vec4(lightColor * clamp(colorScale, 0.0, 1.0), 1.0);
+}
+float sobel_Stage2(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage2(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage2(float m[9], float surfaceScale) {
+ return pointToNormal_Stage2(sobel_Stage2(m[0], m[1], m[3], m[4], m[6], m[7], 0.5), sobel_Stage2(m[0], m[6], m[1], m[7], 0.0, 0.0, 0.33333298563957214), surfaceScale);
+}
+vec3 lightColor_Stage2(vec3 surfaceToLight) {
+ float cosAngle = -dot(surfaceToLight, uS_Stage2);
+ if (cosAngle < uCosOuterConeAngle_Stage2) {
+ return vec3(0.0);
+ }
+ float scale = pow(cosAngle, uExponent_Stage2);
+ if (cosAngle < uCosInnerConeAngle_Stage2) {
+ return ((uLightColor_Stage2 * scale) * (cosAngle - uCosOuterConeAngle_Stage2)) * uConeScale_Stage2;
+ }
+ return uLightColor_Stage2;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ vec2 coord = vTransformedCoords_1_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp0 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp5 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp6 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp7 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp8 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = normalize(uLightLocation_Stage2 - vec3(gl_FragCoord.xy, uSurfaceScale_Stage2 * m[4]));
+ output_Stage2 = light_Stage2(normal_Stage2(m, uSurfaceScale_Stage2), surfaceToLight, lightColor_Stage2(surfaceToLight));
+ output_Stage2 *= output_Stage1;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/61-47.shader_test b/shaders/skia/61-47.shader_test
new file mode 100644
index 0000000..9b6facc
--- /dev/null
+++ b/shaders/skia/61-47.shader_test
@@ -0,0 +1,72 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uCoordTransformMatrix_2_Stage0;
+uniform vec4 usubset_Stage2_c0_c0;
+uniform vec4 uclamp_Stage2_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec3 vTransformedCoords_1_Stage0;
+vec4 TextureEffect_Stage2_c0_c0(vec4 _input, vec2 _coords) {
+ _coords = _coords * uCoordTransformMatrix_2_Stage0.xz + uCoordTransformMatrix_2_Stage0.yw;
+ vec4 _output;
+ vec2 inCoord = _coords;
+ vec2 subsetCoord;
+ subsetCoord.x = inCoord.x;
+ subsetCoord.y = mod(inCoord.y - usubset_Stage2_c0_c0.y, usubset_Stage2_c0_c0.w - usubset_Stage2_c0_c0.y) + usubset_Stage2_c0_c0.y;
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage2_c0_c0.x, uclamp_Stage2_c0_c0.z);
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage2_c0_c0.y, uclamp_Stage2_c0_c0.w);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ _output = _input * textureColor;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ vec2 vTransformedCoords_1_Stage0_ensure2D = vTransformedCoords_1_Stage0.xy / vTransformedCoords_1_Stage0.z;
+ float coord = vTransformedCoords_1_Stage0_ensure2D.y - 0.5;
+ float f = fract(coord);
+ coord += 0.5 - f;
+ float f2 = f * f;
+ vec4 w = mat4(0.055555555555555552, 0.88888888888888884, 0.055555555555555552, 0.0, -0.5, 0.0, 0.5, 0.0, 0.83333333333333337, -2.0, 1.5, -0.33333333333333331, -0.3888888888888889, 1.1666666666666667, -1.1666666666666667, 0.3888888888888889) * vec4(1.0, f, f2, f2 * f);
+ vec4 c[4];
+ c[0] = TextureEffect_Stage2_c0_c0(vec4(1.0), vec2(vTransformedCoords_1_Stage0_ensure2D.x, coord + -1.0));
+ c[1] = TextureEffect_Stage2_c0_c0(vec4(1.0), vec2(vTransformedCoords_1_Stage0_ensure2D.x, coord));
+ c[2] = TextureEffect_Stage2_c0_c0(vec4(1.0), vec2(vTransformedCoords_1_Stage0_ensure2D.x, coord + 1.0));
+ c[3] = TextureEffect_Stage2_c0_c0(vec4(1.0), vec2(vTransformedCoords_1_Stage0_ensure2D.x, coord + 2.0));
+ vec4 bicubicColor = ((c[0] * w.x + c[1] * w.y) + c[2] * w.z) + c[3] * w.w;
+ bicubicColor.xyz = max(vec3(0.0), min(bicubicColor.xyz, bicubicColor.www));
+ output_Stage2 = bicubicColor * output_Stage1;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec3 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0);
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/61-5.shader_test b/shaders/skia/61-5.shader_test
new file mode 100644
index 0000000..b5a962e
--- /dev/null
+++ b/shaders/skia/61-5.shader_test
@@ -0,0 +1,88 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 ucolor_Stage1_c0_c0_c0_c0;
+uniform vec4 ucolor_Stage2;
+uniform vec4 ucolor_Stage3_c1_c0;
+noperspective in vec4 vcolor_Stage0;
+vec4 ConstColorProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = _input.w * ucolor_Stage1_c0_c0_c0_c0;
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = ConstColorProcessor_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 ConstColorProcessor_Stage3_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage3_c1_c0;
+ }
+ return _output;
+}
+vec4 blend_src(vec4 src, vec4 dst) {
+ return src;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 blend_darken(vec4 src, vec4 dst) {
+ vec4 result = blend_src_over(src, dst);
+ result.xyz = min(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
+ return result;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_src(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ {
+ output_Stage2 = output_Stage1 * ucolor_Stage2;
+ }
+ }
+ vec4 output_Stage3;
+ {
+ output_Stage3 = blend_darken(ConstColorProcessor_Stage3_c1_c0(vec4(1.0)), output_Stage2);
+ }
+ {
+ sk_FragColor = output_Stage3;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 position;
+in vec4 inColor;
+noperspective out vec4 vcolor_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/61-7.shader_test b/shaders/skia/61-7.shader_test
new file mode 100644
index 0000000..d35cd47
--- /dev/null
+++ b/shaders/skia/61-7.shader_test
@@ -0,0 +1,108 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 uscale01_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias01_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale23_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias23_Stage1_c0_c0_c1_c0;
+uniform float uthreshold_Stage1_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage2_c1_c0_c0_c0;
+uniform vec4 ucolor_Stage2_c2_c0_c0_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 RadialGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = length(vTransformedCoords_0_Stage0);
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 DualIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthreshold_Stage1_c0_c0_c1_c0) {
+ scale = uscale01_Stage1_c0_c0_c1_c0;
+ bias = ubias01_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale23_Stage1_c0_c0_c1_c0;
+ bias = ubias23_Stage1_c0_c0_c1_c0;
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = RadialGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = DualIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c1_c0_c0_c0;
+ }
+ return _output;
+}
+vec4 blend_src_atop(vec4 src, vec4 dst) {
+ return dst.w * src + (1.0 - src.w) * dst;
+}
+vec4 ComposeOne_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_src_atop(ConstColorProcessor_Stage2_c1_c0_c0_c0(vec4(1.0)), _input);
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c2_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c2_c0_c0_c0;
+ }
+ return _output;
+}
+vec4 ComposeOne_Stage2_c2_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_src_atop(ConstColorProcessor_Stage2_c2_c0_c0_c0(vec4(1.0)), _input);
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = ComposeOne_Stage2_c2_c0(ComposeOne_Stage2_c1_c0(output_Stage1));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/61-8.shader_test b/shaders/skia/61-8.shader_test
new file mode 100644
index 0000000..6002cc3
--- /dev/null
+++ b/shaders/skia/61-8.shader_test
@@ -0,0 +1,108 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 uscale01_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias01_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale23_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias23_Stage1_c0_c0_c1_c0;
+uniform float uthreshold_Stage1_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage2_c1_c0_c0_c0;
+uniform vec4 ucolor_Stage2_c2_c0_c0_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 RadialGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = length(vTransformedCoords_0_Stage0);
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 DualIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthreshold_Stage1_c0_c0_c1_c0) {
+ scale = uscale01_Stage1_c0_c0_c1_c0;
+ bias = ubias01_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale23_Stage1_c0_c0_c1_c0;
+ bias = ubias23_Stage1_c0_c0_c1_c0;
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = RadialGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = DualIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c1_c0_c0_c0;
+ }
+ return _output;
+}
+vec4 blend_exclusion(vec4 src, vec4 dst) {
+ return vec4((dst.xyz + src.xyz) - (2.0 * dst.xyz) * src.xyz, src.w + (1.0 - src.w) * dst.w);
+}
+vec4 ComposeOne_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_exclusion(ConstColorProcessor_Stage2_c1_c0_c0_c0(vec4(1.0)), _input);
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c2_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c2_c0_c0_c0;
+ }
+ return _output;
+}
+vec4 ComposeOne_Stage2_c2_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_exclusion(ConstColorProcessor_Stage2_c2_c0_c0_c0(vec4(1.0)), _input);
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = ComposeOne_Stage2_c2_c0(ComposeOne_Stage2_c1_c0(output_Stage1));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/61-9.shader_test b/shaders/skia/61-9.shader_test
new file mode 100644
index 0000000..0d1b618
--- /dev/null
+++ b/shaders/skia/61-9.shader_test
@@ -0,0 +1,60 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec4 vQuadEdge_Stage0;
+noperspective in vec4 vinColor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 TextureEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ float edgeAlpha;
+ vec2 duvdx = dFdx(vQuadEdge_Stage0.xy);
+ vec2 duvdy = -dFdy(vQuadEdge_Stage0.xy);
+ if (vQuadEdge_Stage0.z > 0.0 && vQuadEdge_Stage0.w > 0.0) {
+ edgeAlpha = min(min(vQuadEdge_Stage0.z, vQuadEdge_Stage0.w) + 0.5, 1.0);
+ } else {
+ vec2 gF = vec2((2.0 * vQuadEdge_Stage0.x) * duvdx.x - duvdx.y, (2.0 * vQuadEdge_Stage0.x) * duvdy.x - duvdy.y);
+ edgeAlpha = vQuadEdge_Stage0.x * vQuadEdge_Stage0.x - vQuadEdge_Stage0.y;
+ edgeAlpha = clamp(0.5 - edgeAlpha / length(gF), 0.0, 1.0);
+ }
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TextureEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1 * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec4 inQuadEdge;
+noperspective out vec4 vQuadEdge_Stage0;
+noperspective out vec4 vinColor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vQuadEdge_Stage0 = inQuadEdge;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/61.shader_test b/shaders/skia/61.shader_test
new file mode 100644
index 0000000..7a517a7
--- /dev/null
+++ b/shaders/skia/61.shader_test
@@ -0,0 +1,62 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 usubset_Stage1_c0_c0;
+uniform vec4 uclamp_Stage1_c0_c0;
+uniform sampler2DRect uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 inCoord = vTransformedCoords_0_Stage0;
+ vec2 subsetCoord;
+ {
+ float w = usubset_Stage1_c0_c0.z - usubset_Stage1_c0_c0.x;
+ float w2 = 2.0 * w;
+ float m = mod(inCoord.x - usubset_Stage1_c0_c0.x, w2);
+ subsetCoord.x = mix(m, w2 - m, step(w, m)) + usubset_Stage1_c0_c0.x;
+ }
+ {
+ float w = usubset_Stage1_c0_c0.w - usubset_Stage1_c0_c0.y;
+ float w2 = 2.0 * w;
+ float m = mod(inCoord.y - usubset_Stage1_c0_c0.y, w2);
+ subsetCoord.y = mix(m, w2 - m, step(w, m)) + usubset_Stage1_c0_c0.y;
+ }
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage1_c0_c0.x, uclamp_Stage1_c0_c0.z);
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage1_c0_c0.y, uclamp_Stage1_c0_c0.w);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ _output = _input * textureColor;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TextureEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/610-2.shader_test b/shaders/skia/610-2.shader_test
new file mode 100644
index 0000000..8a1e2c7
--- /dev/null
+++ b/shaders/skia/610-2.shader_test
@@ -0,0 +1,101 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uColor_Stage0;
+uniform float uinnerThreshold_Stage1_c0_c0;
+uniform float uouterThreshold_Stage1_c0_c0;
+uniform vec3 uedges_Stage1_c1_c0[4];
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec3 vDashParams_Stage0;
+noperspective in vec4 vRectParams_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 AlphaThresholdFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 color = _input;
+ vec4 mask_color = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ if (mask_color.w < 0.5) {
+ if (color.w > uouterThreshold_Stage1_c0_c0) {
+ float scale = uouterThreshold_Stage1_c0_c0 / color.w;
+ color.xyz *= scale;
+ color.w = uouterThreshold_Stage1_c0_c0;
+ }
+ } else if (color.w < uinnerThreshold_Stage1_c0_c0) {
+ float scale = uinnerThreshold_Stage1_c0_c0 / max(0.0010000000474974513, color.w);
+ color.xyz *= scale;
+ color.w = uinnerThreshold_Stage1_c0_c0;
+ }
+ _output = color;
+ return _output;
+}
+vec4 ConvexPoly_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ float alpha = 1.0;
+ float edge;
+ edge = dot(uedges_Stage1_c1_c0[0], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage1_c1_c0[1], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage1_c1_c0[2], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage1_c1_c0[3], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ _output = _input * alpha;
+ return _output;
+}
+vec4 blend_plus(vec4 src, vec4 dst) {
+ return min(src + dst, 1.0);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = uColor_Stage0;
+ float xShifted = vDashParams_Stage0.x - floor(vDashParams_Stage0.x / vDashParams_Stage0.z) * vDashParams_Stage0.z;
+ vec2 fragPosShifted = vec2(xShifted, vDashParams_Stage0.y);
+ float xSub, ySub;
+ xSub = min(fragPosShifted.x - vRectParams_Stage0.x, 0.0);
+ xSub += min(vRectParams_Stage0.z - fragPosShifted.x, 0.0);
+ ySub = min(fragPosShifted.y - vRectParams_Stage0.y, 0.0);
+ ySub += min(vRectParams_Stage0.w - fragPosShifted.y, 0.0);
+ float alpha = (1.0 + max(xSub, -1.0)) * (1.0 + max(ySub, -1.0));
+ outputCoverage_Stage0 = vec4(alpha);
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_plus(AlphaThresholdFragmentProcessor_Stage1_c0_c0(inputColor), ConvexPoly_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ sk_FragColor = output_Stage1 * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec3 inDashParams;
+in vec4 inRect;
+noperspective out vec3 vDashParams_Stage0;
+noperspective out vec4 vRectParams_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vDashParams_Stage0 = inDashParams;
+ vRectParams_Stage0 = inRect;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/610-3.shader_test b/shaders/skia/610-3.shader_test
new file mode 100644
index 0000000..868ad7d
--- /dev/null
+++ b/shaders/skia/610-3.shader_test
@@ -0,0 +1,52 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uellipse_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ vec2 d = gl_FragCoord.xy - uellipse_Stage2.xy;
+ vec2 Z = d * uellipse_Stage2.zw;
+ float implicit = dot(Z, d) - 1.0;
+ float grad_dot = 4.0 * dot(Z, Z);
+ {
+ grad_dot = max(grad_dot, 1.1754999560161448e-38);
+ }
+ float approx_dist = implicit * inversesqrt(grad_dot);
+ float alpha;
+ {
+ alpha = clamp(0.5 - approx_dist, 0.0, 1.0);
+ }
+ output_Stage2 = output_Stage1 * alpha;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/610-4.shader_test b/shaders/skia/610-4.shader_test
new file mode 100644
index 0000000..641e76e
--- /dev/null
+++ b/shaders/skia/610-4.shader_test
@@ -0,0 +1,54 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 ucircle_Stage2_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 CircleEffect_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ float d;
+ {
+ d = (1.0 - length((ucircle_Stage2_c0_c0.xy - gl_FragCoord.xy) * ucircle_Stage2_c0_c0.w)) * ucircle_Stage2_c0_c0.z;
+ }
+ {
+ _output = d > 0.5 ? _input : vec4(0.0);
+ }
+ return _output;
+}
+vec4 blend_screen(vec4 src, vec4 dst) {
+ return src + (1.0 - src) * dst;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_screen(output_Stage1, CircleEffect_Stage2_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/610.shader_test b/shaders/skia/610.shader_test
new file mode 100644
index 0000000..e4983ad
--- /dev/null
+++ b/shaders/skia/610.shader_test
@@ -0,0 +1,199 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage2_c1_c0;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.w) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ } else {
+ {
+ if (t < uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = OverrideInputFragmentProcessor_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c1_c0;
+ }
+ return _output;
+}
+float _blend_color_saturation(vec3 color) {
+ return max(max(color.x, color.y), color.z) - min(min(color.x, color.y), color.z);
+}
+vec3 _blend_set_color_saturation_helper(vec3 minMidMax, float sat) {
+ if (minMidMax.x < minMidMax.z) {
+ return vec3(0.0, (sat * (minMidMax.y - minMidMax.x)) / (minMidMax.z - minMidMax.x), sat);
+ }
+ return vec3(0.0);
+}
+vec3 _blend_set_color_saturation(vec3 hueLumColor, vec3 satColor) {
+ float sat = _blend_color_saturation(satColor);
+ if (hueLumColor.x <= hueLumColor.y) {
+ if (hueLumColor.y <= hueLumColor.z) {
+ hueLumColor.xyz = _blend_set_color_saturation_helper(hueLumColor, sat);
+ } else if (hueLumColor.x <= hueLumColor.z) {
+ hueLumColor.xzy = _blend_set_color_saturation_helper(hueLumColor.xzy, sat);
+ } else {
+ hueLumColor.zxy = _blend_set_color_saturation_helper(hueLumColor.zxy, sat);
+ }
+ } else if (hueLumColor.x <= hueLumColor.z) {
+ hueLumColor.yxz = _blend_set_color_saturation_helper(hueLumColor.yxz, sat);
+ } else if (hueLumColor.y <= hueLumColor.z) {
+ hueLumColor.yzx = _blend_set_color_saturation_helper(hueLumColor.yzx, sat);
+ } else {
+ hueLumColor.zyx = _blend_set_color_saturation_helper(hueLumColor.zyx, sat);
+ }
+ return hueLumColor;
+}
+float _blend_color_luminance(vec3 color) {
+ return dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), color);
+}
+vec3 _blend_set_color_luminance(vec3 hueSatColor, float alpha, vec3 lumColor) {
+ float lum = _blend_color_luminance(lumColor);
+ vec3 result = (lum - _blend_color_luminance(hueSatColor)) + hueSatColor;
+ float minComp = min(min(result.x, result.y), result.z);
+ float maxComp = max(max(result.x, result.y), result.z);
+ if (minComp < 0.0 && lum != minComp) {
+ result = lum + ((result - lum) * lum) / (lum - minComp);
+ }
+ if (maxComp > alpha && maxComp != lum) {
+ return lum + ((result - lum) * (alpha - lum)) / (maxComp - lum);
+ }
+ return result;
+}
+vec4 blend_hue(vec4 src, vec4 dst) {
+ float alpha = dst.w * src.w;
+ vec3 sda = src.xyz * dst.w;
+ vec3 dsa = dst.xyz * src.w;
+ return vec4((((_blend_set_color_luminance(_blend_set_color_saturation(sda, dsa), alpha, dsa) + dst.xyz) - dsa) + src.xyz) - sda, (src.w + dst.w) - alpha);
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 blend_darken(vec4 src, vec4 dst) {
+ vec4 result = blend_src_over(src, dst);
+ result.xyz = min(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
+ return result;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_hue(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_darken(ConstColorProcessor_Stage2_c1_c0(vec4(1.0)), output_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 inColor;
+in vec2 inLocalCoord;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/613-2.shader_test b/shaders/skia/613-2.shader_test
new file mode 100644
index 0000000..3445198
--- /dev/null
+++ b/shaders/skia/613-2.shader_test
@@ -0,0 +1,46 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform sampler2D uTextureSampler_0_Stage0;
+noperspective in vec2 vtextureCoords_Stage0;
+flat in vec4 vtextureDomain_Stage0;
+flat in vec4 vcolor_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ vec2 textureCoords;
+ textureCoords = vtextureCoords_Stage0;
+ vec4 textureDomain;
+ textureDomain = vtextureDomain_Stage0;
+ outputColor_Stage0 = vcolor_Stage0;
+ outputColor_Stage0 = texture(uTextureSampler_0_Stage0, clamp(textureCoords, textureDomain.xy, textureDomain.zw)) * outputColor_Stage0;
+ }
+ {
+ sk_FragColor = vec4(0.0);
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 position;
+in vec2 textureCoords;
+in vec4 textureDomain;
+in vec4 color;
+noperspective out vec2 vtextureCoords_Stage0;
+flat out vec4 vtextureDomain_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vec2 pos2 = position;
+ vtextureCoords_Stage0 = textureCoords;
+ vtextureDomain_Stage0 = textureDomain;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/613-3.shader_test b/shaders/skia/613-3.shader_test
new file mode 100644
index 0000000..0ae6809
--- /dev/null
+++ b/shaders/skia/613-3.shader_test
@@ -0,0 +1,52 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uellipse_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ vec2 d = gl_FragCoord.xy - uellipse_Stage2.xy;
+ vec2 Z = d * uellipse_Stage2.zw;
+ float implicit = dot(Z, d) - 1.0;
+ float grad_dot = 4.0 * dot(Z, Z);
+ {
+ grad_dot = max(grad_dot, 1.1754999560161448e-38);
+ }
+ float approx_dist = implicit * inversesqrt(grad_dot);
+ float alpha;
+ {
+ alpha = approx_dist > 0.0 ? 0.0 : 1.0;
+ }
+ output_Stage2 = output_Stage1 * alpha;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/613-4.shader_test b/shaders/skia/613-4.shader_test
new file mode 100644
index 0000000..f5f5322
--- /dev/null
+++ b/shaders/skia/613-4.shader_test
@@ -0,0 +1,143 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 ubaseFrequency_Stage2_c0_c0;
+uniform float uz_Stage2_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+uniform sampler2D uTextureSampler_1_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec3 vTransformedCoords_1_Stage0;
+vec3 fade_Stage2_c0_c0(vec3 t) {
+ return ((t * t) * t) * (t * (t * 6.0 - 15.0) + 10.0);
+}
+float perm_Stage2_c0_c0(float x) {
+ return texture(uTextureSampler_0_Stage2, vec2(fract(x / 256.0), 0.0)).x * 255.0;
+}
+float grad_Stage2_c0_c0(float x, vec3 p) {
+ return dot(texture(uTextureSampler_1_Stage2, vec2(fract(x / 16.0), 0.0)).xyz * 255.0 - vec3(1.0), p);
+}
+float lerp_Stage2_c0_c0(float a, float b, float w) {
+ return a + w * (b - a);
+}
+float noise_Stage2_c0_c0(vec3 p) {
+ vec3 P = mod(floor(p), 256.0);
+ p -= floor(p);
+ vec3 f = fade_Stage2_c0_c0(p);
+ float A = perm_Stage2_c0_c0(P.x) + P.y;
+ float AA = perm_Stage2_c0_c0(A) + P.z;
+ float AB = perm_Stage2_c0_c0(A + 1.0) + P.z;
+ float B = perm_Stage2_c0_c0(P.x + 1.0) + P.y;
+ float BA = perm_Stage2_c0_c0(B) + P.z;
+ float BB = perm_Stage2_c0_c0(B + 1.0) + P.z;
+ float result = lerp_Stage2_c0_c0(lerp_Stage2_c0_c0(lerp_Stage2_c0_c0(grad_Stage2_c0_c0(perm_Stage2_c0_c0(AA), p), grad_Stage2_c0_c0(perm_Stage2_c0_c0(BA), p + vec3(-1.0, 0.0, 0.0)), f.x), lerp_Stage2_c0_c0(grad_Stage2_c0_c0(perm_Stage2_c0_c0(AB), p + vec3(0.0, -1.0, 0.0)), grad_Stage2_c0_c0(perm_Stage2_c0_c0(BB), p + vec3(-1.0, -1.0, 0.0)), f.x), f.y), lerp_Stage2_c0_c0(lerp_Stage2_c0_c0(grad_Stage2_c0_c0(perm_Stage2_c0_c0(AA + 1.0), p + vec3(0.0, 0.0, -1.0)), grad_Stage2_c0_c0(perm_Stage2_c0_c0(BA + 1.0), p + vec3(-1.0, 0.0, -1.0)), f.x), lerp_Stage2_c0_c0(grad_Stage2_c0_c0(perm_Stage2_c0_c0(AB + 1.0), p + vec3(0.0, -1.0, -1.0)), grad_Stage2_c0_c0(perm_Stage2_c0_c0(BB + 1.0), p + vec3(-1.0, -1.0, -1.0)), f.x), f.y), f.z);
+ return result;
+}
+float noiseOctaves_Stage2_c0_c0(vec3 p) {
+ float result = 0.0;
+ float ratio = 1.0;
+ for (float i = 0.0;i < 4.0; i++) {
+ result += noise_Stage2_c0_c0(p) / ratio;
+ p *= 2.0;
+ ratio *= 2.0;
+ }
+ return (result + 1.0) / 2.0;
+}
+vec4 ImprovedPerlinNoise_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 vTransformedCoords_1_Stage0_ensure2D = vTransformedCoords_1_Stage0.xy / vTransformedCoords_1_Stage0.z;
+ vec2 coords = vTransformedCoords_1_Stage0_ensure2D * ubaseFrequency_Stage2_c0_c0;
+ float r = noiseOctaves_Stage2_c0_c0(vec3(coords, uz_Stage2_c0_c0));
+ float g = noiseOctaves_Stage2_c0_c0(vec3(coords, uz_Stage2_c0_c0));
+ float b = noiseOctaves_Stage2_c0_c0(vec3(coords, uz_Stage2_c0_c0));
+ float a = noiseOctaves_Stage2_c0_c0(vec3(coords, uz_Stage2_c0_c0));
+ _output = vec4(r, g, b, a);
+ _output = clamp(_output, 0.0, 1.0);
+ _output = vec4(_output.xyz * _output.www, _output.w);
+ return _output;
+}
+float _blend_color_saturation(vec3 color) {
+ return max(max(color.x, color.y), color.z) - min(min(color.x, color.y), color.z);
+}
+vec3 _blend_set_color_saturation_helper(vec3 minMidMax, float sat) {
+ if (minMidMax.x < minMidMax.z) {
+ return vec3(0.0, (sat * (minMidMax.y - minMidMax.x)) / (minMidMax.z - minMidMax.x), sat);
+ }
+ return vec3(0.0);
+}
+vec3 _blend_set_color_saturation(vec3 hueLumColor, vec3 satColor) {
+ float sat = _blend_color_saturation(satColor);
+ if (hueLumColor.x <= hueLumColor.y) {
+ if (hueLumColor.y <= hueLumColor.z) {
+ hueLumColor.xyz = _blend_set_color_saturation_helper(hueLumColor, sat);
+ } else if (hueLumColor.x <= hueLumColor.z) {
+ hueLumColor.xzy = _blend_set_color_saturation_helper(hueLumColor.xzy, sat);
+ } else {
+ hueLumColor.zxy = _blend_set_color_saturation_helper(hueLumColor.zxy, sat);
+ }
+ } else if (hueLumColor.x <= hueLumColor.z) {
+ hueLumColor.yxz = _blend_set_color_saturation_helper(hueLumColor.yxz, sat);
+ } else if (hueLumColor.y <= hueLumColor.z) {
+ hueLumColor.yzx = _blend_set_color_saturation_helper(hueLumColor.yzx, sat);
+ } else {
+ hueLumColor.zyx = _blend_set_color_saturation_helper(hueLumColor.zyx, sat);
+ }
+ return hueLumColor;
+}
+float _blend_color_luminance(vec3 color) {
+ return dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), color);
+}
+vec3 _blend_set_color_luminance(vec3 hueSatColor, float alpha, vec3 lumColor) {
+ float lum = _blend_color_luminance(lumColor);
+ vec3 result = (lum - _blend_color_luminance(hueSatColor)) + hueSatColor;
+ float minComp = min(min(result.x, result.y), result.z);
+ float maxComp = max(max(result.x, result.y), result.z);
+ if (minComp < 0.0 && lum != minComp) {
+ result = lum + ((result - lum) * lum) / (lum - minComp);
+ }
+ if (maxComp > alpha && maxComp != lum) {
+ return lum + ((result - lum) * (alpha - lum)) / (maxComp - lum);
+ }
+ return result;
+}
+vec4 blend_hue(vec4 src, vec4 dst) {
+ float alpha = dst.w * src.w;
+ vec3 sda = src.xyz * dst.w;
+ vec3 dsa = dst.xyz * src.w;
+ return vec4((((_blend_set_color_luminance(_blend_set_color_saturation(sda, dsa), alpha, dsa) + dst.xyz) - dsa) + src.xyz) - sda, (src.w + dst.w) - alpha);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_hue(output_Stage1, ImprovedPerlinNoise_Stage2_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec3 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0);
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/613.shader_test b/shaders/skia/613.shader_test
new file mode 100644
index 0000000..bd3177e
--- /dev/null
+++ b/shaders/skia/613.shader_test
@@ -0,0 +1,128 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 ucolor_Stage1_c0_c0_c0_c0;
+uniform vec4 ucolor_Stage2_c1_c0;
+noperspective in vec4 vcolor_Stage0;
+vec4 ConstColorProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = _input.w * ucolor_Stage1_c0_c0_c0_c0;
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = ConstColorProcessor_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c1_c0;
+ }
+ return _output;
+}
+float _blend_color_saturation(vec3 color) {
+ return max(max(color.x, color.y), color.z) - min(min(color.x, color.y), color.z);
+}
+vec3 _blend_set_color_saturation_helper(vec3 minMidMax, float sat) {
+ if (minMidMax.x < minMidMax.z) {
+ return vec3(0.0, (sat * (minMidMax.y - minMidMax.x)) / (minMidMax.z - minMidMax.x), sat);
+ }
+ return vec3(0.0);
+}
+vec3 _blend_set_color_saturation(vec3 hueLumColor, vec3 satColor) {
+ float sat = _blend_color_saturation(satColor);
+ if (hueLumColor.x <= hueLumColor.y) {
+ if (hueLumColor.y <= hueLumColor.z) {
+ hueLumColor.xyz = _blend_set_color_saturation_helper(hueLumColor, sat);
+ } else if (hueLumColor.x <= hueLumColor.z) {
+ hueLumColor.xzy = _blend_set_color_saturation_helper(hueLumColor.xzy, sat);
+ } else {
+ hueLumColor.zxy = _blend_set_color_saturation_helper(hueLumColor.zxy, sat);
+ }
+ } else if (hueLumColor.x <= hueLumColor.z) {
+ hueLumColor.yxz = _blend_set_color_saturation_helper(hueLumColor.yxz, sat);
+ } else if (hueLumColor.y <= hueLumColor.z) {
+ hueLumColor.yzx = _blend_set_color_saturation_helper(hueLumColor.yzx, sat);
+ } else {
+ hueLumColor.zyx = _blend_set_color_saturation_helper(hueLumColor.zyx, sat);
+ }
+ return hueLumColor;
+}
+float _blend_color_luminance(vec3 color) {
+ return dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), color);
+}
+vec3 _blend_set_color_luminance(vec3 hueSatColor, float alpha, vec3 lumColor) {
+ float lum = _blend_color_luminance(lumColor);
+ vec3 result = (lum - _blend_color_luminance(hueSatColor)) + hueSatColor;
+ float minComp = min(min(result.x, result.y), result.z);
+ float maxComp = max(max(result.x, result.y), result.z);
+ if (minComp < 0.0 && lum != minComp) {
+ result = lum + ((result - lum) * lum) / (lum - minComp);
+ }
+ if (maxComp > alpha && maxComp != lum) {
+ return lum + ((result - lum) * (alpha - lum)) / (maxComp - lum);
+ }
+ return result;
+}
+vec4 blend_hue(vec4 src, vec4 dst) {
+ float alpha = dst.w * src.w;
+ vec3 sda = src.xyz * dst.w;
+ vec3 dsa = dst.xyz * src.w;
+ return vec4((((_blend_set_color_luminance(_blend_set_color_saturation(sda, dsa), alpha, dsa) + dst.xyz) - dsa) + src.xyz) - sda, (src.w + dst.w) - alpha);
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 blend_darken(vec4 src, vec4 dst) {
+ vec4 result = blend_src_over(src, dst);
+ result.xyz = min(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
+ return result;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_hue(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_darken(ConstColorProcessor_Stage2_c1_c0(vec4(1.0)), output_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 position;
+in vec4 inColor;
+noperspective out vec4 vcolor_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/616-2.shader_test b/shaders/skia/616-2.shader_test
new file mode 100644
index 0000000..990b927
--- /dev/null
+++ b/shaders/skia/616-2.shader_test
@@ -0,0 +1,439 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform float uinnerThreshold_Stage1_c0_c0;
+uniform float uouterThreshold_Stage1_c0_c0;
+uniform mat4 um_Stage1_c1_c0_c0_c0_c1_c0;
+uniform vec4 uv_Stage1_c1_c0_c0_c0_c1_c0;
+uniform vec2 uImageIncrement_Stage1_c1_c0_c1_c0_c0_c0;
+uniform vec4 uKernel_Stage1_c1_c0_c1_c0_c0_c0[5];
+uniform vec2 uKernelOffset_Stage1_c1_c0_c1_c0_c0_c0;
+uniform float uGain_Stage1_c1_c0_c1_c0_c0_c0;
+uniform float uBias_Stage1_c1_c0_c1_c0_c0_c0;
+uniform vec4 uTexDom_Stage1_c1_c0_c1_c0_c0_c0;
+uniform vec4 ucolor_Stage1_c1_c0_c1_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 AlphaThresholdFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 color = _input;
+ vec4 mask_color = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ if (mask_color.w < 0.5) {
+ if (color.w > uouterThreshold_Stage1_c0_c0) {
+ float scale = uouterThreshold_Stage1_c0_c0 / color.w;
+ color.xyz *= scale;
+ color.w = uouterThreshold_Stage1_c0_c0;
+ }
+ } else if (color.w < uinnerThreshold_Stage1_c0_c0) {
+ float scale = uinnerThreshold_Stage1_c0_c0 / max(0.0010000000474974513, color.w);
+ color.xyz *= scale;
+ color.w = uinnerThreshold_Stage1_c0_c0;
+ }
+ _output = color;
+ return _output;
+}
+vec4 Big_Ole_Key_Stage1_c1_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = _input;
+ return _output;
+}
+vec4 ColorMatrixFragmentProcessor_Stage1_c1_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = _input;
+ _output = um_Stage1_c1_c0_c0_c0_c1_c0 * inputColor + uv_Stage1_c1_c0_c0_c0_c1_c0;
+ {
+ _output.w = clamp(_output.w, 0.0, 1.0);
+ }
+ return _output;
+}
+vec4 blend_exclusion(vec4 src, vec4 dst) {
+ return vec4((dst.xyz + src.xyz) - (2.0 * dst.xyz) * src.xyz, src.w + (1.0 - src.w) * dst.w);
+}
+vec4 ComposeTwo_Stage1_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_exclusion(Big_Ole_Key_Stage1_c1_c0_c0_c0_c0_c0(inputColor), ColorMatrixFragmentProcessor_Stage1_c1_c0_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 MatrixConvolution_Stage1_c1_c0_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 sum = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_1_Stage0 - uKernelOffset_Stage1_c1_c0_c1_c0_c0_c0 * uImageIncrement_Stage1_c1_c0_c1_c0_c0_c0;
+ vec4 c;
+ {
+ float k = uKernel_Stage1_c1_c0_c1_c0_c0_c0[0].x;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c1_c0_c0_c0.xy, uTexDom_Stage1_c1_c0_c1_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0_c1_c0_c0_c0[0].y;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1_c1_c0_c1_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c1_c0_c0_c0.xy, uTexDom_Stage1_c1_c0_c1_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0_c1_c0_c0_c0[0].z;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1_c1_c0_c1_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c1_c0_c0_c0.xy, uTexDom_Stage1_c1_c0_c1_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0_c1_c0_c0_c0[0].w;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1_c1_c0_c1_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c1_c0_c0_c0.xy, uTexDom_Stage1_c1_c0_c1_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0_c1_c0_c0_c0[1].x;
+ {
+ vec2 origCoord = coord + vec2(0.0, 2.0) * uImageIncrement_Stage1_c1_c0_c1_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c1_c0_c0_c0.xy, uTexDom_Stage1_c1_c0_c1_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0_c1_c0_c0_c0[1].y;
+ {
+ vec2 origCoord = coord + vec2(1.0, 2.0) * uImageIncrement_Stage1_c1_c0_c1_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c1_c0_c0_c0.xy, uTexDom_Stage1_c1_c0_c1_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0_c1_c0_c0_c0[1].z;
+ {
+ vec2 origCoord = coord + vec2(0.0, 3.0) * uImageIncrement_Stage1_c1_c0_c1_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c1_c0_c0_c0.xy, uTexDom_Stage1_c1_c0_c1_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0_c1_c0_c0_c0[1].w;
+ {
+ vec2 origCoord = coord + vec2(1.0, 3.0) * uImageIncrement_Stage1_c1_c0_c1_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c1_c0_c0_c0.xy, uTexDom_Stage1_c1_c0_c1_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0_c1_c0_c0_c0[2].x;
+ {
+ vec2 origCoord = coord + vec2(0.0, 4.0) * uImageIncrement_Stage1_c1_c0_c1_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c1_c0_c0_c0.xy, uTexDom_Stage1_c1_c0_c1_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0_c1_c0_c0_c0[2].y;
+ {
+ vec2 origCoord = coord + vec2(1.0, 4.0) * uImageIncrement_Stage1_c1_c0_c1_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c1_c0_c0_c0.xy, uTexDom_Stage1_c1_c0_c1_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0_c1_c0_c0_c0[2].z;
+ {
+ vec2 origCoord = coord + vec2(0.0, 5.0) * uImageIncrement_Stage1_c1_c0_c1_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c1_c0_c0_c0.xy, uTexDom_Stage1_c1_c0_c1_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0_c1_c0_c0_c0[2].w;
+ {
+ vec2 origCoord = coord + vec2(1.0, 5.0) * uImageIncrement_Stage1_c1_c0_c1_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c1_c0_c0_c0.xy, uTexDom_Stage1_c1_c0_c1_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0_c1_c0_c0_c0[3].x;
+ {
+ vec2 origCoord = coord + vec2(0.0, 6.0) * uImageIncrement_Stage1_c1_c0_c1_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c1_c0_c0_c0.xy, uTexDom_Stage1_c1_c0_c1_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0_c1_c0_c0_c0[3].y;
+ {
+ vec2 origCoord = coord + vec2(1.0, 6.0) * uImageIncrement_Stage1_c1_c0_c1_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c1_c0_c0_c0.xy, uTexDom_Stage1_c1_c0_c1_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0_c1_c0_c0_c0[3].z;
+ {
+ vec2 origCoord = coord + vec2(0.0, 7.0) * uImageIncrement_Stage1_c1_c0_c1_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c1_c0_c0_c0.xy, uTexDom_Stage1_c1_c0_c1_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0_c1_c0_c0_c0[3].w;
+ {
+ vec2 origCoord = coord + vec2(1.0, 7.0) * uImageIncrement_Stage1_c1_c0_c1_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c1_c0_c0_c0.xy, uTexDom_Stage1_c1_c0_c1_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0_c1_c0_c0_c0[4].x;
+ {
+ vec2 origCoord = coord + vec2(0.0, 8.0) * uImageIncrement_Stage1_c1_c0_c1_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c1_c0_c0_c0.xy, uTexDom_Stage1_c1_c0_c1_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0_c1_c0_c0_c0[4].y;
+ {
+ vec2 origCoord = coord + vec2(1.0, 8.0) * uImageIncrement_Stage1_c1_c0_c1_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c1_c0_c0_c0.xy, uTexDom_Stage1_c1_c0_c1_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ vec2 origCoord = vTransformedCoords_1_Stage0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c1_c0_c0_c0.xy, uTexDom_Stage1_c1_c0_c1_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ _output.w = c.w;
+ _output.xyz = clamp(sum.xyz * uGain_Stage1_c1_c0_c1_c0_c0_c0 + uBias_Stage1_c1_c0_c1_c0_c0_c0, 0.0, 1.0);
+ _output.xyz *= _output.w;
+ _output *= _input;
+ return _output;
+}
+vec4 ConstColorProcessor_Stage1_c1_c0_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = _input * ucolor_Stage1_c1_c0_c1_c0_c1_c0;
+ }
+ return _output;
+}
+float _blend_color_saturation(vec3 color) {
+ return max(max(color.x, color.y), color.z) - min(min(color.x, color.y), color.z);
+}
+vec3 _blend_set_color_saturation_helper(vec3 minMidMax, float sat) {
+ if (minMidMax.x < minMidMax.z) {
+ return vec3(0.0, (sat * (minMidMax.y - minMidMax.x)) / (minMidMax.z - minMidMax.x), sat);
+ }
+ return vec3(0.0);
+}
+vec3 _blend_set_color_saturation(vec3 hueLumColor, vec3 satColor) {
+ float sat = _blend_color_saturation(satColor);
+ if (hueLumColor.x <= hueLumColor.y) {
+ if (hueLumColor.y <= hueLumColor.z) {
+ hueLumColor.xyz = _blend_set_color_saturation_helper(hueLumColor, sat);
+ } else if (hueLumColor.x <= hueLumColor.z) {
+ hueLumColor.xzy = _blend_set_color_saturation_helper(hueLumColor.xzy, sat);
+ } else {
+ hueLumColor.zxy = _blend_set_color_saturation_helper(hueLumColor.zxy, sat);
+ }
+ } else if (hueLumColor.x <= hueLumColor.z) {
+ hueLumColor.yxz = _blend_set_color_saturation_helper(hueLumColor.yxz, sat);
+ } else if (hueLumColor.y <= hueLumColor.z) {
+ hueLumColor.yzx = _blend_set_color_saturation_helper(hueLumColor.yzx, sat);
+ } else {
+ hueLumColor.zyx = _blend_set_color_saturation_helper(hueLumColor.zyx, sat);
+ }
+ return hueLumColor;
+}
+float _blend_color_luminance(vec3 color) {
+ return dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), color);
+}
+vec3 _blend_set_color_luminance(vec3 hueSatColor, float alpha, vec3 lumColor) {
+ float lum = _blend_color_luminance(lumColor);
+ vec3 result = (lum - _blend_color_luminance(hueSatColor)) + hueSatColor;
+ float minComp = min(min(result.x, result.y), result.z);
+ float maxComp = max(max(result.x, result.y), result.z);
+ if (minComp < 0.0 && lum != minComp) {
+ result = lum + ((result - lum) * lum) / (lum - minComp);
+ }
+ if (maxComp > alpha && maxComp != lum) {
+ return lum + ((result - lum) * (alpha - lum)) / (maxComp - lum);
+ }
+ return result;
+}
+vec4 blend_hue(vec4 src, vec4 dst) {
+ float alpha = dst.w * src.w;
+ vec3 sda = src.xyz * dst.w;
+ vec3 dsa = dst.xyz * src.w;
+ return vec4((((_blend_set_color_luminance(_blend_set_color_saturation(sda, dsa), alpha, dsa) + dst.xyz) - dsa) + src.xyz) - sda, (src.w + dst.w) - alpha);
+}
+vec4 ComposeTwo_Stage1_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_hue(MatrixConvolution_Stage1_c1_c0_c1_c0_c0_c0(inputColor), ConstColorProcessor_Stage1_c1_c0_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 blend_dst_over(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src + dst;
+}
+vec4 ComposeTwo_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_dst_over(ComposeTwo_Stage1_c1_c0_c0_c0(inputColor), ComposeTwo_Stage1_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+float _blend_overlay_component(float sc, float sa, float dc, float da) {
+ if (2.0 * dc <= da) {
+ return (2.0 * sc) * dc;
+ }
+ return sa * da - (2.0 * (da - dc)) * (sa - sc);
+}
+vec4 blend_overlay(vec4 src, vec4 dst) {
+ vec4 result = vec4(_blend_overlay_component(src.x, src.w, dst.x, dst.w), _blend_overlay_component(src.y, src.w, dst.y, dst.w), _blend_overlay_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+ result.xyz += dst.xyz * (1.0 - src.w) + src.xyz * (1.0 - dst.w);
+ return result;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_overlay(AlphaThresholdFragmentProcessor_Stage1_c0_c0(inputColor), ComposeTwo_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vec4 color = inColor;
+ vcolor_Stage0 = color;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/616-3.shader_test b/shaders/skia/616-3.shader_test
new file mode 100644
index 0000000..c4a7fd9
--- /dev/null
+++ b/shaders/skia/616-3.shader_test
@@ -0,0 +1,52 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uellipse_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ vec2 d = gl_FragCoord.xy - uellipse_Stage2.xy;
+ vec2 Z = d * uellipse_Stage2.zw;
+ float implicit = dot(Z, d) - 1.0;
+ float grad_dot = 4.0 * dot(Z, Z);
+ {
+ grad_dot = max(grad_dot, 1.1754999560161448e-38);
+ }
+ float approx_dist = implicit * inversesqrt(grad_dot);
+ float alpha;
+ {
+ alpha = clamp(0.5 + approx_dist, 0.0, 1.0);
+ }
+ output_Stage2 = output_Stage1 * alpha;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/616-4.shader_test b/shaders/skia/616-4.shader_test
new file mode 100644
index 0000000..a51e699
--- /dev/null
+++ b/shaders/skia/616-4.shader_test
@@ -0,0 +1,77 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform float uinnerThreshold_Stage2_c0_c0;
+uniform float uouterThreshold_Stage2_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 AlphaThresholdFragmentProcessor_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 color = _input;
+ vec4 mask_color = texture(uTextureSampler_0_Stage2, vTransformedCoords_1_Stage0);
+ if (mask_color.w < 0.5) {
+ if (color.w > uouterThreshold_Stage2_c0_c0) {
+ float scale = uouterThreshold_Stage2_c0_c0 / color.w;
+ color.xyz *= scale;
+ color.w = uouterThreshold_Stage2_c0_c0;
+ }
+ } else if (color.w < uinnerThreshold_Stage2_c0_c0) {
+ float scale = uinnerThreshold_Stage2_c0_c0 / max(0.0010000000474974513, color.w);
+ color.xyz *= scale;
+ color.w = uinnerThreshold_Stage2_c0_c0;
+ }
+ _output = color;
+ return _output;
+}
+float _guarded_divide(float n, float d) {
+ return n / d;
+}
+float _color_burn_component(float sc, float sa, float dc, float da) {
+ if (da == dc) {
+ return (sa * da + sc * (1.0 - da)) + dc * (1.0 - sa);
+ } else if (sc == 0.0) {
+ return dc * (1.0 - sa);
+ }
+ float d = max(0.0, da - _guarded_divide((da - dc) * sa, sc));
+ return (d * sa + sc * (1.0 - da)) + dc * (1.0 - sa);
+}
+vec4 blend_color_burn(vec4 src, vec4 dst) {
+ return vec4(_color_burn_component(src.x, src.w, dst.x, dst.w), _color_burn_component(src.y, src.w, dst.y, dst.w), _color_burn_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_color_burn(AlphaThresholdFragmentProcessor_Stage2_c0_c0(vec4(1.0)), output_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/616.shader_test b/shaders/skia/616.shader_test
new file mode 100644
index 0000000..0682a05
--- /dev/null
+++ b/shaders/skia/616.shader_test
@@ -0,0 +1,192 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage2;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.w) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ } else {
+ {
+ if (t < uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+vec4 ComposeOne_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_dst_in(_input, TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0)));
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = ComposeOne_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+float _blend_color_saturation(vec3 color) {
+ return max(max(color.x, color.y), color.z) - min(min(color.x, color.y), color.z);
+}
+vec3 _blend_set_color_saturation_helper(vec3 minMidMax, float sat) {
+ if (minMidMax.x < minMidMax.z) {
+ return vec3(0.0, (sat * (minMidMax.y - minMidMax.x)) / (minMidMax.z - minMidMax.x), sat);
+ }
+ return vec3(0.0);
+}
+vec3 _blend_set_color_saturation(vec3 hueLumColor, vec3 satColor) {
+ float sat = _blend_color_saturation(satColor);
+ if (hueLumColor.x <= hueLumColor.y) {
+ if (hueLumColor.y <= hueLumColor.z) {
+ hueLumColor.xyz = _blend_set_color_saturation_helper(hueLumColor, sat);
+ } else if (hueLumColor.x <= hueLumColor.z) {
+ hueLumColor.xzy = _blend_set_color_saturation_helper(hueLumColor.xzy, sat);
+ } else {
+ hueLumColor.zxy = _blend_set_color_saturation_helper(hueLumColor.zxy, sat);
+ }
+ } else if (hueLumColor.x <= hueLumColor.z) {
+ hueLumColor.yxz = _blend_set_color_saturation_helper(hueLumColor.yxz, sat);
+ } else if (hueLumColor.y <= hueLumColor.z) {
+ hueLumColor.yzx = _blend_set_color_saturation_helper(hueLumColor.yzx, sat);
+ } else {
+ hueLumColor.zyx = _blend_set_color_saturation_helper(hueLumColor.zyx, sat);
+ }
+ return hueLumColor;
+}
+float _blend_color_luminance(vec3 color) {
+ return dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), color);
+}
+vec3 _blend_set_color_luminance(vec3 hueSatColor, float alpha, vec3 lumColor) {
+ float lum = _blend_color_luminance(lumColor);
+ vec3 result = (lum - _blend_color_luminance(hueSatColor)) + hueSatColor;
+ float minComp = min(min(result.x, result.y), result.z);
+ float maxComp = max(max(result.x, result.y), result.z);
+ if (minComp < 0.0 && lum != minComp) {
+ result = lum + ((result - lum) * lum) / (lum - minComp);
+ }
+ if (maxComp > alpha && maxComp != lum) {
+ return lum + ((result - lum) * (alpha - lum)) / (maxComp - lum);
+ }
+ return result;
+}
+vec4 blend_hue(vec4 src, vec4 dst) {
+ float alpha = dst.w * src.w;
+ vec3 sda = src.xyz * dst.w;
+ vec3 dsa = dst.xyz * src.w;
+ return vec4((((_blend_set_color_luminance(_blend_set_color_saturation(sda, dsa), alpha, dsa) + dst.xyz) - dsa) + src.xyz) - sda, (src.w + dst.w) - alpha);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_hue(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ {
+ output_Stage2 = output_Stage1 * ucolor_Stage2;
+ }
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 inColor;
+in vec2 inLocalCoord;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/619-2.shader_test b/shaders/skia/619-2.shader_test
new file mode 100644
index 0000000..b351b60
--- /dev/null
+++ b/shaders/skia/619-2.shader_test
@@ -0,0 +1,319 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1_c0_c0_c0_c0_c0_c0;
+uniform float uSurfaceScale_Stage1_c0_c0_c0_c0_c0_c0;
+uniform vec3 uLightColor_Stage1_c0_c0_c0_c0_c0_c0;
+uniform float uKD_Stage1_c0_c0_c0_c0_c0_c0;
+uniform vec4 uTexDom_Stage1_c0_c0_c0_c0_c0_c0;
+uniform vec3 uDecalParams_Stage1_c0_c0_c0_c0_c0_c0;
+uniform vec3 uLightLocation_Stage1_c0_c0_c0_c0_c0_c0;
+uniform vec4 uellipse_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage1_c0_c0_c1_c0;
+uniform float uPixelSize_Stage1_c1_c0;
+uniform vec2 uRange_Stage1_c1_c0;
+uniform vec2 uDstTextureUpperLeft_Stage2;
+uniform vec2 uDstTextureCoordScale_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+uniform sampler2D uDstTextureSampler_Stage2;
+noperspective in vec2 vEllipseOffsets_Stage0;
+noperspective in vec4 vEllipseRadii_Stage0;
+noperspective in vec4 vinColor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 light_Stage1_c0_c0_c0_c0_c0_c0(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ float colorScale = uKD_Stage1_c0_c0_c0_c0_c0_c0 * dot(normal, surfaceToLight);
+ return vec4(lightColor * clamp(colorScale, 0.0, 1.0), 1.0);
+}
+float sobel_Stage1_c0_c0_c0_c0_c0_c0(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage1_c0_c0_c0_c0_c0_c0(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage1_c0_c0_c0_c0_c0_c0(float m[9], float surfaceScale) {
+ return pointToNormal_Stage1_c0_c0_c0_c0_c0_c0(sobel_Stage1_c0_c0_c0_c0_c0_c0(m[0], m[1], m[3], m[4], 0.0, 0.0, 0.66666698455810547), sobel_Stage1_c0_c0_c0_c0_c0_c0(m[0], m[3], m[1], m[4], 0.0, 0.0, 0.66666698455810547), surfaceScale);
+}
+vec4 DiffuseLighting_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coord = vTransformedCoords_0_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage1_c0_c0_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp0 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1_c0_c0_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1_c0_c0_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage1_c0_c0_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1_c0_c0_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp5 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage1_c0_c0_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp6 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage1_c0_c0_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp7 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage1_c0_c0_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp8 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = normalize(uLightLocation_Stage1_c0_c0_c0_c0_c0_c0 - vec3(gl_FragCoord.xy, uSurfaceScale_Stage1_c0_c0_c0_c0_c0_c0 * m[4]));
+ _output = light_Stage1_c0_c0_c0_c0_c0_c0(normal_Stage1_c0_c0_c0_c0_c0_c0(m, uSurfaceScale_Stage1_c0_c0_c0_c0_c0_c0), surfaceToLight, uLightColor_Stage1_c0_c0_c0_c0_c0_c0);
+ _output *= _input;
+ return _output;
+}
+vec4 EllipseEffect_Stage1_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 d = gl_FragCoord.xy - uellipse_Stage1_c0_c0_c0_c0_c1_c0.xy;
+ vec2 Z = d * uellipse_Stage1_c0_c0_c0_c0_c1_c0.zw;
+ float implicit = dot(Z, d) - 1.0;
+ float grad_dot = 4.0 * dot(Z, Z);
+ {
+ grad_dot = max(grad_dot, 1.1754999560161448e-38);
+ }
+ float approx_dist = implicit * inversesqrt(grad_dot);
+ float alpha;
+ {
+ alpha = approx_dist > 0.0 ? 1.0 : 0.0;
+ }
+ _output = _input * alpha;
+ return _output;
+}
+vec4 blend_modulate(vec4 src, vec4 dst) {
+ return src * dst;
+}
+vec4 ComposeTwo_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_modulate(DiffuseLighting_Stage1_c0_c0_c0_c0_c0_c0(inputColor), EllipseEffect_Stage1_c0_c0_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 ConstColorProcessor_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage1_c0_c0_c1_c0;
+ }
+ return _output;
+}
+float _guarded_divide(float n, float d) {
+ return n / d;
+}
+float _color_burn_component(float sc, float sa, float dc, float da) {
+ if (da == dc) {
+ return (sa * da + sc * (1.0 - da)) + dc * (1.0 - sa);
+ } else if (sc == 0.0) {
+ return dc * (1.0 - sa);
+ }
+ float d = max(0.0, da - _guarded_divide((da - dc) * sa, sc));
+ return (d * sa + sc * (1.0 - da)) + dc * (1.0 - sa);
+}
+vec4 blend_color_burn(vec4 src, vec4 dst) {
+ return vec4(_color_burn_component(src.x, src.w, dst.x, dst.w), _color_burn_component(src.y, src.w, dst.y, dst.w), _color_burn_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+}
+vec4 ComposeTwo_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_color_burn(ComposeTwo_Stage1_c0_c0_c0_c0(inputColor), ConstColorProcessor_Stage1_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 Morphology_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = vec4(1.0, 1.0, 1.0, 1.0);
+ vec2 coord = vTransformedCoords_1_Stage0;
+ coord.y -= 7.0 * uPixelSize_Stage1_c1_c0;
+ for (int i = 0;i < 15; i++) {
+ _output = min(_output, texture(uTextureSampler_1_Stage1, coord));
+ coord.y += uPixelSize_Stage1_c1_c0;
+ }
+ _output *= _input;
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_src_out(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vinColor_Stage0;
+ vec2 offset = vEllipseOffsets_Stage0;
+ float test = dot(offset, offset) - 1.0;
+ vec2 grad = (2.0 * offset) * vEllipseRadii_Stage0.xy;
+ float grad_dot = dot(grad, grad);
+ grad_dot = max(grad_dot, 1.1754999560161448e-38);
+ float invlen = inversesqrt(grad_dot);
+ float edgeAlpha = clamp(0.5 - test * invlen, 0.0, 1.0);
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_src_in(ComposeTwo_Stage1_c0_c0(inputColor), Morphology_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ if (all(lessThanEqual(outputCoverage_Stage0.xyz, vec3(0.0)))) {
+ discard;
+ }
+ vec2 _dstTexCoord = (gl_FragCoord.xy - uDstTextureUpperLeft_Stage2) * uDstTextureCoordScale_Stage2;
+ _dstTexCoord.y = 1.0 - _dstTexCoord.y;
+ vec4 _dstColor = texture(uDstTextureSampler_Stage2, _dstTexCoord);
+ sk_FragColor = blend_src_out(output_Stage1, _dstColor);
+ sk_FragColor = outputCoverage_Stage0 * sk_FragColor + (vec4(1.0) - outputCoverage_Stage0) * _dstColor;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec2 inEllipseOffset;
+in vec4 inEllipseRadii;
+noperspective out vec2 vEllipseOffsets_Stage0;
+noperspective out vec4 vEllipseRadii_Stage0;
+noperspective out vec4 vinColor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vEllipseOffsets_Stage0 = inEllipseOffset;
+ vEllipseRadii_Stage0 = inEllipseRadii;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/619-3.shader_test b/shaders/skia/619-3.shader_test
new file mode 100644
index 0000000..30c3c42
--- /dev/null
+++ b/shaders/skia/619-3.shader_test
@@ -0,0 +1,52 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uellipse_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ vec2 d = gl_FragCoord.xy - uellipse_Stage2.xy;
+ vec2 Z = d * uellipse_Stage2.zw;
+ float implicit = dot(Z, d) - 1.0;
+ float grad_dot = 4.0 * dot(Z, Z);
+ {
+ grad_dot = max(grad_dot, 1.1754999560161448e-38);
+ }
+ float approx_dist = implicit * inversesqrt(grad_dot);
+ float alpha;
+ {
+ alpha = approx_dist > 0.0 ? 1.0 : 0.0;
+ }
+ output_Stage2 = output_Stage1 * alpha;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/619-4.shader_test b/shaders/skia/619-4.shader_test
new file mode 100644
index 0000000..94392e0
--- /dev/null
+++ b/shaders/skia/619-4.shader_test
@@ -0,0 +1,48 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 ucolor_Stage2_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 ConstColorProcessor_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c0_c0;
+ }
+ return _output;
+}
+vec4 blend_screen(vec4 src, vec4 dst) {
+ return src + (1.0 - src) * dst;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_screen(ConstColorProcessor_Stage2_c0_c0(vec4(1.0)), output_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/619.shader_test b/shaders/skia/619.shader_test
new file mode 100644
index 0000000..8391dc3
--- /dev/null
+++ b/shaders/skia/619.shader_test
@@ -0,0 +1,115 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 ucolor_Stage1_c0_c0_c0_c0;
+uniform vec4 ucolor_Stage2;
+noperspective in vec4 vcolor_Stage0;
+vec4 ConstColorProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = _input.w * ucolor_Stage1_c0_c0_c0_c0;
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = ConstColorProcessor_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+float _blend_color_saturation(vec3 color) {
+ return max(max(color.x, color.y), color.z) - min(min(color.x, color.y), color.z);
+}
+vec3 _blend_set_color_saturation_helper(vec3 minMidMax, float sat) {
+ if (minMidMax.x < minMidMax.z) {
+ return vec3(0.0, (sat * (minMidMax.y - minMidMax.x)) / (minMidMax.z - minMidMax.x), sat);
+ }
+ return vec3(0.0);
+}
+vec3 _blend_set_color_saturation(vec3 hueLumColor, vec3 satColor) {
+ float sat = _blend_color_saturation(satColor);
+ if (hueLumColor.x <= hueLumColor.y) {
+ if (hueLumColor.y <= hueLumColor.z) {
+ hueLumColor.xyz = _blend_set_color_saturation_helper(hueLumColor, sat);
+ } else if (hueLumColor.x <= hueLumColor.z) {
+ hueLumColor.xzy = _blend_set_color_saturation_helper(hueLumColor.xzy, sat);
+ } else {
+ hueLumColor.zxy = _blend_set_color_saturation_helper(hueLumColor.zxy, sat);
+ }
+ } else if (hueLumColor.x <= hueLumColor.z) {
+ hueLumColor.yxz = _blend_set_color_saturation_helper(hueLumColor.yxz, sat);
+ } else if (hueLumColor.y <= hueLumColor.z) {
+ hueLumColor.yzx = _blend_set_color_saturation_helper(hueLumColor.yzx, sat);
+ } else {
+ hueLumColor.zyx = _blend_set_color_saturation_helper(hueLumColor.zyx, sat);
+ }
+ return hueLumColor;
+}
+float _blend_color_luminance(vec3 color) {
+ return dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), color);
+}
+vec3 _blend_set_color_luminance(vec3 hueSatColor, float alpha, vec3 lumColor) {
+ float lum = _blend_color_luminance(lumColor);
+ vec3 result = (lum - _blend_color_luminance(hueSatColor)) + hueSatColor;
+ float minComp = min(min(result.x, result.y), result.z);
+ float maxComp = max(max(result.x, result.y), result.z);
+ if (minComp < 0.0 && lum != minComp) {
+ result = lum + ((result - lum) * lum) / (lum - minComp);
+ }
+ if (maxComp > alpha && maxComp != lum) {
+ return lum + ((result - lum) * (alpha - lum)) / (maxComp - lum);
+ }
+ return result;
+}
+vec4 blend_hue(vec4 src, vec4 dst) {
+ float alpha = dst.w * src.w;
+ vec3 sda = src.xyz * dst.w;
+ vec3 dsa = dst.xyz * src.w;
+ return vec4((((_blend_set_color_luminance(_blend_set_color_saturation(sda, dsa), alpha, dsa) + dst.xyz) - dsa) + src.xyz) - sda, (src.w + dst.w) - alpha);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_hue(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ {
+ output_Stage2 = output_Stage1 * ucolor_Stage2;
+ }
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 position;
+in vec4 inColor;
+noperspective out vec4 vcolor_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/622-2.shader_test b/shaders/skia/622-2.shader_test
new file mode 100644
index 0000000..24c189f
--- /dev/null
+++ b/shaders/skia/622-2.shader_test
@@ -0,0 +1,218 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 ucircleData_Stage1_c0_c0_c0_c0_c0_c0;
+uniform vec3 uedges_Stage1_c0_c0_c1_c0_c0_c0[6];
+uniform vec4 ucolor_Stage1_c0_c0_c1_c0_c1_c0;
+uniform vec2 ubaseFrequency_Stage1_c1_c0;
+uniform float uz_Stage1_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+uniform sampler2D uTextureSampler_2_Stage1;
+uniform sampler2D uTextureSampler_3_Stage1;
+noperspective in vec4 vinCircleEdge_Stage0;
+noperspective in vec4 vinColor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec3 vTransformedCoords_1_Stage0;
+vec4 CircleBlurFragmentProcessor_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 vec = vec2((gl_FragCoord.x - ucircleData_Stage1_c0_c0_c0_c0_c0_c0.x) * ucircleData_Stage1_c0_c0_c0_c0_c0_c0.w, (gl_FragCoord.y - ucircleData_Stage1_c0_c0_c0_c0_c0_c0.y) * ucircleData_Stage1_c0_c0_c0_c0_c0_c0.w);
+ float dist = length(vec) + (0.5 - ucircleData_Stage1_c0_c0_c0_c0_c0_c0.z) * ucircleData_Stage1_c0_c0_c0_c0_c0_c0.w;
+ _output = _input * texture(uTextureSampler_0_Stage1, vec2(dist, 0.5)).w;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_1_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+float _blend_overlay_component(float sc, float sa, float dc, float da) {
+ if (2.0 * dc <= da) {
+ return (2.0 * sc) * dc;
+ }
+ return sa * da - (2.0 * (da - dc)) * (sa - sc);
+}
+vec4 blend_overlay(vec4 src, vec4 dst) {
+ vec4 result = vec4(_blend_overlay_component(src.x, src.w, dst.x, dst.w), _blend_overlay_component(src.y, src.w, dst.y, dst.w), _blend_overlay_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+ result.xyz += dst.xyz * (1.0 - src.w) + src.xyz * (1.0 - dst.w);
+ return result;
+}
+vec4 blend_hard_light(vec4 src, vec4 dst) {
+ return blend_overlay(dst, src);
+}
+vec4 ComposeTwo_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_hard_light(CircleBlurFragmentProcessor_Stage1_c0_c0_c0_c0_c0_c0(inputColor), TextureEffect_Stage1_c0_c0_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 ConvexPoly_Stage1_c0_c0_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float alpha = 1.0;
+ float edge;
+ edge = dot(uedges_Stage1_c0_c0_c1_c0_c0_c0[0], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage1_c0_c0_c1_c0_c0_c0[1], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage1_c0_c0_c1_c0_c0_c0[2], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage1_c0_c0_c1_c0_c0_c0[3], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage1_c0_c0_c1_c0_c0_c0[4], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage1_c0_c0_c1_c0_c0_c0[5], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ _output = _input * alpha;
+ return _output;
+}
+vec4 ConstColorProcessor_Stage1_c0_c0_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage1_c0_c0_c1_c0_c1_c0;
+ }
+ return _output;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 ComposeTwo_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_src_over(ConvexPoly_Stage1_c0_c0_c1_c0_c0_c0(inputColor), ConstColorProcessor_Stage1_c0_c0_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 ComposeTwo_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_hard_light(ComposeTwo_Stage1_c0_c0_c0_c0(inputColor), ComposeTwo_Stage1_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec3 fade_Stage1_c1_c0(vec3 t) {
+ return ((t * t) * t) * (t * (t * 6.0 - 15.0) + 10.0);
+}
+float perm_Stage1_c1_c0(float x) {
+ return texture(uTextureSampler_2_Stage1, vec2(fract(x / 256.0), 0.0)).x * 255.0;
+}
+float grad_Stage1_c1_c0(float x, vec3 p) {
+ return dot(texture(uTextureSampler_3_Stage1, vec2(fract(x / 16.0), 0.0)).xyz * 255.0 - vec3(1.0), p);
+}
+float lerp_Stage1_c1_c0(float a, float b, float w) {
+ return a + w * (b - a);
+}
+float noise_Stage1_c1_c0(vec3 p) {
+ vec3 P = mod(floor(p), 256.0);
+ p -= floor(p);
+ vec3 f = fade_Stage1_c1_c0(p);
+ float A = perm_Stage1_c1_c0(P.x) + P.y;
+ float AA = perm_Stage1_c1_c0(A) + P.z;
+ float AB = perm_Stage1_c1_c0(A + 1.0) + P.z;
+ float B = perm_Stage1_c1_c0(P.x + 1.0) + P.y;
+ float BA = perm_Stage1_c1_c0(B) + P.z;
+ float BB = perm_Stage1_c1_c0(B + 1.0) + P.z;
+ float result = lerp_Stage1_c1_c0(lerp_Stage1_c1_c0(lerp_Stage1_c1_c0(grad_Stage1_c1_c0(perm_Stage1_c1_c0(AA), p), grad_Stage1_c1_c0(perm_Stage1_c1_c0(BA), p + vec3(-1.0, 0.0, 0.0)), f.x), lerp_Stage1_c1_c0(grad_Stage1_c1_c0(perm_Stage1_c1_c0(AB), p + vec3(0.0, -1.0, 0.0)), grad_Stage1_c1_c0(perm_Stage1_c1_c0(BB), p + vec3(-1.0, -1.0, 0.0)), f.x), f.y), lerp_Stage1_c1_c0(lerp_Stage1_c1_c0(grad_Stage1_c1_c0(perm_Stage1_c1_c0(AA + 1.0), p + vec3(0.0, 0.0, -1.0)), grad_Stage1_c1_c0(perm_Stage1_c1_c0(BA + 1.0), p + vec3(-1.0, 0.0, -1.0)), f.x), lerp_Stage1_c1_c0(grad_Stage1_c1_c0(perm_Stage1_c1_c0(AB + 1.0), p + vec3(0.0, -1.0, -1.0)), grad_Stage1_c1_c0(perm_Stage1_c1_c0(BB + 1.0), p + vec3(-1.0, -1.0, -1.0)), f.x), f.y), f.z);
+ return result;
+}
+float noiseOctaves_Stage1_c1_c0(vec3 p) {
+ float result = 0.0;
+ float ratio = 1.0;
+ for (float i = 0.0;i < 8.0; i++) {
+ result += noise_Stage1_c1_c0(p) / ratio;
+ p *= 2.0;
+ ratio *= 2.0;
+ }
+ return (result + 1.0) / 2.0;
+}
+vec4 ImprovedPerlinNoise_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 vTransformedCoords_1_Stage0_ensure2D = vTransformedCoords_1_Stage0.xy / vTransformedCoords_1_Stage0.z;
+ vec2 coords = vTransformedCoords_1_Stage0_ensure2D * ubaseFrequency_Stage1_c1_c0;
+ float r = noiseOctaves_Stage1_c1_c0(vec3(coords, uz_Stage1_c1_c0));
+ float g = noiseOctaves_Stage1_c1_c0(vec3(coords, uz_Stage1_c1_c0));
+ float b = noiseOctaves_Stage1_c1_c0(vec3(coords, uz_Stage1_c1_c0));
+ float a = noiseOctaves_Stage1_c1_c0(vec3(coords, uz_Stage1_c1_c0));
+ _output = vec4(r, g, b, a);
+ _output = clamp(_output, 0.0, 1.0);
+ _output = vec4(_output.xyz * _output.www, _output.w);
+ return _output;
+}
+float _blend_color_luminance(vec3 color) {
+ return dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), color);
+}
+vec3 _blend_set_color_luminance(vec3 hueSatColor, float alpha, vec3 lumColor) {
+ float lum = _blend_color_luminance(lumColor);
+ vec3 result = (lum - _blend_color_luminance(hueSatColor)) + hueSatColor;
+ float minComp = min(min(result.x, result.y), result.z);
+ float maxComp = max(max(result.x, result.y), result.z);
+ if (minComp < 0.0 && lum != minComp) {
+ result = lum + ((result - lum) * lum) / (lum - minComp);
+ }
+ if (maxComp > alpha && maxComp != lum) {
+ return lum + ((result - lum) * (alpha - lum)) / (maxComp - lum);
+ }
+ return result;
+}
+vec4 blend_color(vec4 src, vec4 dst) {
+ float alpha = dst.w * src.w;
+ vec3 sda = src.xyz * dst.w;
+ vec3 dsa = dst.xyz * src.w;
+ return vec4((((_blend_set_color_luminance(sda, alpha, dsa) + dst.xyz) - dsa) + src.xyz) - sda, (src.w + dst.w) - alpha);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ vec4 circleEdge;
+ circleEdge = vinCircleEdge_Stage0;
+ outputColor_Stage0 = vinColor_Stage0;
+ float d = length(circleEdge.xy);
+ float distanceToOuterEdge = circleEdge.z * (1.0 - d);
+ float edgeAlpha = clamp(distanceToOuterEdge, 0.0, 1.0);
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_color(ComposeTwo_Stage1_c0_c0(inputColor), ImprovedPerlinNoise_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ sk_FragColor = (1.0 - output_Stage1.w) * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec4 inCircleEdge;
+noperspective out vec4 vinCircleEdge_Stage0;
+noperspective out vec4 vinColor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec3 vTransformedCoords_1_Stage0;
+void main() {
+ vinCircleEdge_Stage0 = inCircleEdge;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = uCoordTransformMatrix_1_Stage0 * vec3(inPosition, 1.0);
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/622-3.shader_test b/shaders/skia/622-3.shader_test
new file mode 100644
index 0000000..3c6ac4d
--- /dev/null
+++ b/shaders/skia/622-3.shader_test
@@ -0,0 +1,51 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 ucircleData_Stage2_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 CircleBlurFragmentProcessor_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 vec = vec2((gl_FragCoord.x - ucircleData_Stage2_c0_c0.x) * ucircleData_Stage2_c0_c0.w, (gl_FragCoord.y - ucircleData_Stage2_c0_c0.y) * ucircleData_Stage2_c0_c0.w);
+ float dist = length(vec) + (0.5 - ucircleData_Stage2_c0_c0.z) * ucircleData_Stage2_c0_c0.w;
+ _output = _input * texture(uTextureSampler_0_Stage2, vec2(dist, 0.5)).w;
+ return _output;
+}
+vec4 blend_exclusion(vec4 src, vec4 dst) {
+ return vec4((dst.xyz + src.xyz) - (2.0 * dst.xyz) * src.xyz, src.w + (1.0 - src.w) * dst.w);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_exclusion(output_Stage1, CircleBlurFragmentProcessor_Stage2_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/622.shader_test b/shaders/skia/622.shader_test
new file mode 100644
index 0000000..3d22741
--- /dev/null
+++ b/shaders/skia/622.shader_test
@@ -0,0 +1,212 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage2;
+uniform vec4 ucolor_Stage3_c1_c0;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.w) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ } else {
+ {
+ if (t < uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+vec4 ComposeOne_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_dst_in(_input, TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0)));
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = ComposeOne_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 ConstColorProcessor_Stage3_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage3_c1_c0;
+ }
+ return _output;
+}
+float _blend_color_saturation(vec3 color) {
+ return max(max(color.x, color.y), color.z) - min(min(color.x, color.y), color.z);
+}
+vec3 _blend_set_color_saturation_helper(vec3 minMidMax, float sat) {
+ if (minMidMax.x < minMidMax.z) {
+ return vec3(0.0, (sat * (minMidMax.y - minMidMax.x)) / (minMidMax.z - minMidMax.x), sat);
+ }
+ return vec3(0.0);
+}
+vec3 _blend_set_color_saturation(vec3 hueLumColor, vec3 satColor) {
+ float sat = _blend_color_saturation(satColor);
+ if (hueLumColor.x <= hueLumColor.y) {
+ if (hueLumColor.y <= hueLumColor.z) {
+ hueLumColor.xyz = _blend_set_color_saturation_helper(hueLumColor, sat);
+ } else if (hueLumColor.x <= hueLumColor.z) {
+ hueLumColor.xzy = _blend_set_color_saturation_helper(hueLumColor.xzy, sat);
+ } else {
+ hueLumColor.zxy = _blend_set_color_saturation_helper(hueLumColor.zxy, sat);
+ }
+ } else if (hueLumColor.x <= hueLumColor.z) {
+ hueLumColor.yxz = _blend_set_color_saturation_helper(hueLumColor.yxz, sat);
+ } else if (hueLumColor.y <= hueLumColor.z) {
+ hueLumColor.yzx = _blend_set_color_saturation_helper(hueLumColor.yzx, sat);
+ } else {
+ hueLumColor.zyx = _blend_set_color_saturation_helper(hueLumColor.zyx, sat);
+ }
+ return hueLumColor;
+}
+float _blend_color_luminance(vec3 color) {
+ return dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), color);
+}
+vec3 _blend_set_color_luminance(vec3 hueSatColor, float alpha, vec3 lumColor) {
+ float lum = _blend_color_luminance(lumColor);
+ vec3 result = (lum - _blend_color_luminance(hueSatColor)) + hueSatColor;
+ float minComp = min(min(result.x, result.y), result.z);
+ float maxComp = max(max(result.x, result.y), result.z);
+ if (minComp < 0.0 && lum != minComp) {
+ result = lum + ((result - lum) * lum) / (lum - minComp);
+ }
+ if (maxComp > alpha && maxComp != lum) {
+ return lum + ((result - lum) * (alpha - lum)) / (maxComp - lum);
+ }
+ return result;
+}
+vec4 blend_hue(vec4 src, vec4 dst) {
+ float alpha = dst.w * src.w;
+ vec3 sda = src.xyz * dst.w;
+ vec3 dsa = dst.xyz * src.w;
+ return vec4((((_blend_set_color_luminance(_blend_set_color_saturation(sda, dsa), alpha, dsa) + dst.xyz) - dsa) + src.xyz) - sda, (src.w + dst.w) - alpha);
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 blend_darken(vec4 src, vec4 dst) {
+ vec4 result = blend_src_over(src, dst);
+ result.xyz = min(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
+ return result;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_hue(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ {
+ output_Stage2 = output_Stage1 * ucolor_Stage2;
+ }
+ }
+ vec4 output_Stage3;
+ {
+ output_Stage3 = blend_darken(ConstColorProcessor_Stage3_c1_c0(vec4(1.0)), output_Stage2);
+ }
+ {
+ sk_FragColor = output_Stage3;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 inColor;
+in vec2 inLocalCoord;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/625-2.shader_test b/shaders/skia/625-2.shader_test
new file mode 100644
index 0000000..1ee3cf7
--- /dev/null
+++ b/shaders/skia/625-2.shader_test
@@ -0,0 +1,126 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_KHR_blend_equation_advanced : require
+out vec4 sk_FragColor;
+layout (blend_support_all_equations) out ;
+uniform vec4 ucolor_Stage1_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTextureCoords_Stage0;
+flat in int vTexIndex_Stage0;
+noperspective in vec4 vinColor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 TextureEffect_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+vec4 Big_Ole_Key_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = _input;
+ return _output;
+}
+float _blend_color_luminance(vec3 color) {
+ return dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), color);
+}
+vec3 _blend_set_color_luminance(vec3 hueSatColor, float alpha, vec3 lumColor) {
+ float lum = _blend_color_luminance(lumColor);
+ vec3 result = (lum - _blend_color_luminance(hueSatColor)) + hueSatColor;
+ float minComp = min(min(result.x, result.y), result.z);
+ float maxComp = max(max(result.x, result.y), result.z);
+ if (minComp < 0.0 && lum != minComp) {
+ result = lum + ((result - lum) * lum) / (lum - minComp);
+ }
+ if (maxComp > alpha && maxComp != lum) {
+ return lum + ((result - lum) * (alpha - lum)) / (maxComp - lum);
+ }
+ return result;
+}
+vec4 blend_color(vec4 src, vec4 dst) {
+ float alpha = dst.w * src.w;
+ vec3 sda = src.xyz * dst.w;
+ vec3 dsa = dst.xyz * src.w;
+ return vec4((((_blend_set_color_luminance(sda, alpha, dsa) + dst.xyz) - dsa) + src.xyz) - sda, (src.w + dst.w) - alpha);
+}
+vec4 ComposeTwo_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_color(TextureEffect_Stage1_c0_c0_c0_c0(inputColor), Big_Ole_Key_Stage1_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 ConstColorProcessor_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage1_c1_c0;
+ }
+ return _output;
+}
+float _guarded_divide(float n, float d) {
+ return n / d;
+}
+float _color_dodge_component(float sc, float sa, float dc, float da) {
+ if (dc == 0.0) {
+ return sc * (1.0 - da);
+ } else {
+ float d = sa - sc;
+ if (d == 0.0) {
+ return (sa * da + sc * (1.0 - da)) + dc * (1.0 - sa);
+ }
+ d = min(da, _guarded_divide(dc * sa, d));
+ return (d * sa + sc * (1.0 - da)) + dc * (1.0 - sa);
+ }
+}
+vec4 blend_color_dodge(vec4 src, vec4 dst) {
+ return vec4(_color_dodge_component(src.x, src.w, dst.x, dst.w), _color_dodge_component(src.y, src.w, dst.y, dst.w), _color_dodge_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vinColor_Stage0;
+ vec4 texColor;
+ {
+ texColor = texture(uTextureSampler_0_Stage0, vTextureCoords_Stage0);
+ }
+ outputCoverage_Stage0 = texColor;
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_color_dodge(ComposeTwo_Stage1_c0_c0(inputColor), ConstColorProcessor_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ sk_FragColor = outputCoverage_Stage0 * output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform vec2 uAtlasSizeInv_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in uvec2 inTextureCoords;
+noperspective out vec2 vTextureCoords_Stage0;
+flat out int vTexIndex_Stage0;
+noperspective out vec4 vinColor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ ivec2 signedCoords = ivec2(int(inTextureCoords.x), int(inTextureCoords.y));
+ vec2 unormTexCoords = vec2(float(signedCoords.x / 2), float(signedCoords.y / 2));
+ vTextureCoords_Stage0 = unormTexCoords * uAtlasSizeInv_Stage0;
+ vTexIndex_Stage0 = 0;
+ vinColor_Stage0 = inColor;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(inPosition.x, inPosition.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/625-3.shader_test b/shaders/skia/625-3.shader_test
new file mode 100644
index 0000000..cb46370
--- /dev/null
+++ b/shaders/skia/625-3.shader_test
@@ -0,0 +1,60 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 ClampFragmentProcessor_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ float alpha = clamp(_input.w, 0.0, 1.0);
+ _output = vec4(clamp(_input.xyz, 0.0, alpha), alpha);
+ }
+ return _output;
+}
+float _guarded_divide(float n, float d) {
+ return n / d;
+}
+float _color_burn_component(float sc, float sa, float dc, float da) {
+ if (da == dc) {
+ return (sa * da + sc * (1.0 - da)) + dc * (1.0 - sa);
+ } else if (sc == 0.0) {
+ return dc * (1.0 - sa);
+ }
+ float d = max(0.0, da - _guarded_divide((da - dc) * sa, sc));
+ return (d * sa + sc * (1.0 - da)) + dc * (1.0 - sa);
+}
+vec4 blend_color_burn(vec4 src, vec4 dst) {
+ return vec4(_color_burn_component(src.x, src.w, dst.x, dst.w), _color_burn_component(src.y, src.w, dst.y, dst.w), _color_burn_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_color_burn(output_Stage1, ClampFragmentProcessor_Stage2_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/625.shader_test b/shaders/skia/625.shader_test
new file mode 100644
index 0000000..2589201
--- /dev/null
+++ b/shaders/skia/625.shader_test
@@ -0,0 +1,135 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 ucolor_Stage1_c0_c0_c0_c0;
+uniform vec4 ucolor_Stage2;
+uniform vec4 ucolor_Stage3_c1_c0;
+noperspective in vec4 vcolor_Stage0;
+vec4 ConstColorProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = _input.w * ucolor_Stage1_c0_c0_c0_c0;
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = ConstColorProcessor_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 ConstColorProcessor_Stage3_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage3_c1_c0;
+ }
+ return _output;
+}
+float _blend_color_saturation(vec3 color) {
+ return max(max(color.x, color.y), color.z) - min(min(color.x, color.y), color.z);
+}
+vec3 _blend_set_color_saturation_helper(vec3 minMidMax, float sat) {
+ if (minMidMax.x < minMidMax.z) {
+ return vec3(0.0, (sat * (minMidMax.y - minMidMax.x)) / (minMidMax.z - minMidMax.x), sat);
+ }
+ return vec3(0.0);
+}
+vec3 _blend_set_color_saturation(vec3 hueLumColor, vec3 satColor) {
+ float sat = _blend_color_saturation(satColor);
+ if (hueLumColor.x <= hueLumColor.y) {
+ if (hueLumColor.y <= hueLumColor.z) {
+ hueLumColor.xyz = _blend_set_color_saturation_helper(hueLumColor, sat);
+ } else if (hueLumColor.x <= hueLumColor.z) {
+ hueLumColor.xzy = _blend_set_color_saturation_helper(hueLumColor.xzy, sat);
+ } else {
+ hueLumColor.zxy = _blend_set_color_saturation_helper(hueLumColor.zxy, sat);
+ }
+ } else if (hueLumColor.x <= hueLumColor.z) {
+ hueLumColor.yxz = _blend_set_color_saturation_helper(hueLumColor.yxz, sat);
+ } else if (hueLumColor.y <= hueLumColor.z) {
+ hueLumColor.yzx = _blend_set_color_saturation_helper(hueLumColor.yzx, sat);
+ } else {
+ hueLumColor.zyx = _blend_set_color_saturation_helper(hueLumColor.zyx, sat);
+ }
+ return hueLumColor;
+}
+float _blend_color_luminance(vec3 color) {
+ return dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), color);
+}
+vec3 _blend_set_color_luminance(vec3 hueSatColor, float alpha, vec3 lumColor) {
+ float lum = _blend_color_luminance(lumColor);
+ vec3 result = (lum - _blend_color_luminance(hueSatColor)) + hueSatColor;
+ float minComp = min(min(result.x, result.y), result.z);
+ float maxComp = max(max(result.x, result.y), result.z);
+ if (minComp < 0.0 && lum != minComp) {
+ result = lum + ((result - lum) * lum) / (lum - minComp);
+ }
+ if (maxComp > alpha && maxComp != lum) {
+ return lum + ((result - lum) * (alpha - lum)) / (maxComp - lum);
+ }
+ return result;
+}
+vec4 blend_hue(vec4 src, vec4 dst) {
+ float alpha = dst.w * src.w;
+ vec3 sda = src.xyz * dst.w;
+ vec3 dsa = dst.xyz * src.w;
+ return vec4((((_blend_set_color_luminance(_blend_set_color_saturation(sda, dsa), alpha, dsa) + dst.xyz) - dsa) + src.xyz) - sda, (src.w + dst.w) - alpha);
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 blend_darken(vec4 src, vec4 dst) {
+ vec4 result = blend_src_over(src, dst);
+ result.xyz = min(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
+ return result;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_hue(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ {
+ output_Stage2 = output_Stage1 * ucolor_Stage2;
+ }
+ }
+ vec4 output_Stage3;
+ {
+ output_Stage3 = blend_darken(ConstColorProcessor_Stage3_c1_c0(vec4(1.0)), output_Stage2);
+ }
+ {
+ sk_FragColor = output_Stage3;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 position;
+in vec4 inColor;
+noperspective out vec4 vcolor_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/628-2.shader_test b/shaders/skia/628-2.shader_test
new file mode 100644
index 0000000..c0ac34a
--- /dev/null
+++ b/shaders/skia/628-2.shader_test
@@ -0,0 +1,92 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform float uSrcTF_Stage0[7];
+uniform mat3 uColorXform_Stage0;
+uniform float uDstTF_Stage0[7];
+uniform sampler2D uTextureSampler_0_Stage0;
+noperspective in vec2 vtextureCoords_Stage0;
+flat in vec4 vtextureDomain_Stage0;
+flat in vec4 vcolor_Stage0;
+float src_tf_Stage0(float x) {
+ float G = uSrcTF_Stage0[0];
+ float A = uSrcTF_Stage0[1];
+ float B = uSrcTF_Stage0[2];
+ float C = uSrcTF_Stage0[3];
+ float D = uSrcTF_Stage0[4];
+ float E = uSrcTF_Stage0[5];
+ float F = uSrcTF_Stage0[6];
+ float s = sign(x);
+ x = abs(x);
+ x = x < D ? C * x + F : pow(A * x + B, G) + E;
+ return s * x;
+}
+float dst_tf_Stage0(float x) {
+ float G = uDstTF_Stage0[0];
+ float A = uDstTF_Stage0[1];
+ float B = uDstTF_Stage0[2];
+ float C = uDstTF_Stage0[3];
+ float D = uDstTF_Stage0[4];
+ float E = uDstTF_Stage0[5];
+ float F = uDstTF_Stage0[6];
+ float s = sign(x);
+ x = abs(x);
+ x = x < D ? C * x + F : pow(A * x + B, G) + E;
+ return s * x;
+}
+vec4 gamut_xform_Stage0(vec4 color) {
+ color.xyz = uColorXform_Stage0 * color.xyz;
+ return color;
+}
+vec4 color_xform_Stage0(vec4 color) {
+ float nonZeroAlpha = max(color.w, 9.9999997473787516e-05);
+ color = vec4(color.xyz / nonZeroAlpha, nonZeroAlpha);
+ color.x = src_tf_Stage0(color.x);
+ color.y = src_tf_Stage0(color.y);
+ color.z = src_tf_Stage0(color.z);
+ color = gamut_xform_Stage0(color);
+ color.x = dst_tf_Stage0(color.x);
+ color.y = dst_tf_Stage0(color.y);
+ color.z = dst_tf_Stage0(color.z);
+ color.xyz *= color.w;
+ return color;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ vec2 textureCoords;
+ textureCoords = vtextureCoords_Stage0;
+ vec4 textureDomain;
+ textureDomain = vtextureDomain_Stage0;
+ outputColor_Stage0 = vcolor_Stage0;
+ outputColor_Stage0 = color_xform_Stage0(texture(uTextureSampler_0_Stage0, clamp(textureCoords, textureDomain.xy, textureDomain.zw))) * outputColor_Stage0;
+ }
+ {
+ sk_FragColor = vec4(1.0);
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 position;
+in vec2 textureCoords;
+in vec4 textureDomain;
+in vec4 color;
+noperspective out vec2 vtextureCoords_Stage0;
+flat out vec4 vtextureDomain_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vec2 pos2 = position;
+ vtextureCoords_Stage0 = textureCoords;
+ vtextureDomain_Stage0 = textureDomain;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/628-3.shader_test b/shaders/skia/628-3.shader_test
new file mode 100644
index 0000000..1a78379
--- /dev/null
+++ b/shaders/skia/628-3.shader_test
@@ -0,0 +1,57 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 urectUniform_Stage2_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 AARectEffect_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ float alpha;
+ {
+ float xSub, ySub;
+ xSub = min(gl_FragCoord.x - urectUniform_Stage2_c0_c0.x, 0.0);
+ xSub += min(urectUniform_Stage2_c0_c0.z - gl_FragCoord.x, 0.0);
+ ySub = min(gl_FragCoord.y - urectUniform_Stage2_c0_c0.y, 0.0);
+ ySub += min(urectUniform_Stage2_c0_c0.w - gl_FragCoord.y, 0.0);
+ alpha = (1.0 + max(xSub, -1.0)) * (1.0 + max(ySub, -1.0));
+ }
+ _output = _input * alpha;
+ return _output;
+}
+vec4 blend_multiply(vec4 src, vec4 dst) {
+ return vec4(((1.0 - src.w) * dst.xyz + (1.0 - dst.w) * src.xyz) + src.xyz * dst.xyz, src.w + (1.0 - src.w) * dst.w);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_multiply(output_Stage1, AARectEffect_Stage2_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/628.shader_test b/shaders/skia/628.shader_test
new file mode 100644
index 0000000..e38f18e
--- /dev/null
+++ b/shaders/skia/628.shader_test
@@ -0,0 +1,179 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.w) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ } else {
+ {
+ if (t < uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = OverrideInputFragmentProcessor_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+float _blend_color_saturation(vec3 color) {
+ return max(max(color.x, color.y), color.z) - min(min(color.x, color.y), color.z);
+}
+vec3 _blend_set_color_saturation_helper(vec3 minMidMax, float sat) {
+ if (minMidMax.x < minMidMax.z) {
+ return vec3(0.0, (sat * (minMidMax.y - minMidMax.x)) / (minMidMax.z - minMidMax.x), sat);
+ }
+ return vec3(0.0);
+}
+vec3 _blend_set_color_saturation(vec3 hueLumColor, vec3 satColor) {
+ float sat = _blend_color_saturation(satColor);
+ if (hueLumColor.x <= hueLumColor.y) {
+ if (hueLumColor.y <= hueLumColor.z) {
+ hueLumColor.xyz = _blend_set_color_saturation_helper(hueLumColor, sat);
+ } else if (hueLumColor.x <= hueLumColor.z) {
+ hueLumColor.xzy = _blend_set_color_saturation_helper(hueLumColor.xzy, sat);
+ } else {
+ hueLumColor.zxy = _blend_set_color_saturation_helper(hueLumColor.zxy, sat);
+ }
+ } else if (hueLumColor.x <= hueLumColor.z) {
+ hueLumColor.yxz = _blend_set_color_saturation_helper(hueLumColor.yxz, sat);
+ } else if (hueLumColor.y <= hueLumColor.z) {
+ hueLumColor.yzx = _blend_set_color_saturation_helper(hueLumColor.yzx, sat);
+ } else {
+ hueLumColor.zyx = _blend_set_color_saturation_helper(hueLumColor.zyx, sat);
+ }
+ return hueLumColor;
+}
+float _blend_color_luminance(vec3 color) {
+ return dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), color);
+}
+vec3 _blend_set_color_luminance(vec3 hueSatColor, float alpha, vec3 lumColor) {
+ float lum = _blend_color_luminance(lumColor);
+ vec3 result = (lum - _blend_color_luminance(hueSatColor)) + hueSatColor;
+ float minComp = min(min(result.x, result.y), result.z);
+ float maxComp = max(max(result.x, result.y), result.z);
+ if (minComp < 0.0 && lum != minComp) {
+ result = lum + ((result - lum) * lum) / (lum - minComp);
+ }
+ if (maxComp > alpha && maxComp != lum) {
+ return lum + ((result - lum) * (alpha - lum)) / (maxComp - lum);
+ }
+ return result;
+}
+vec4 blend_saturation(vec4 src, vec4 dst) {
+ float alpha = dst.w * src.w;
+ vec3 sda = src.xyz * dst.w;
+ vec3 dsa = dst.xyz * src.w;
+ return vec4((((_blend_set_color_luminance(_blend_set_color_saturation(dsa, sda), alpha, dsa) + dst.xyz) - dsa) + src.xyz) - sda, (src.w + dst.w) - alpha);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_saturation(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 inColor;
+in vec2 inLocalCoord;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/631-2.shader_test b/shaders/skia/631-2.shader_test
new file mode 100644
index 0000000..25bd789
--- /dev/null
+++ b/shaders/skia/631-2.shader_test
@@ -0,0 +1,597 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_KHR_blend_equation_advanced : require
+out vec4 sk_FragColor;
+layout (blend_support_all_equations) out ;
+uniform vec2 uScale_Stage1_c0_c0_c0_c0_c0_c0;
+uniform vec4 uTexDom_Stage1_c0_c0_c0_c0_c0_c0;
+uniform vec3 uDecalParams_Stage1_c0_c0_c0_c0_c0_c0;
+uniform vec2 uImageIncrement_Stage1_c0_c0_c1_c0;
+uniform vec4 uKernel_Stage1_c0_c0_c1_c0[5];
+uniform vec2 uKernelOffset_Stage1_c0_c0_c1_c0;
+uniform float uGain_Stage1_c0_c0_c1_c0;
+uniform float uBias_Stage1_c0_c0_c1_c0;
+uniform vec4 uTexDom_Stage1_c0_c0_c1_c0;
+uniform vec3 uDecalParams_Stage1_c0_c0_c1_c0;
+uniform vec2 uScale_Stage1_c1_c0_c0_c0;
+uniform vec4 uTexDom_Stage1_c1_c0_c0_c0;
+uniform vec3 uDecalParams_Stage1_c1_c0_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+uniform sampler2D uTextureSampler_2_Stage1;
+uniform sampler2D uTextureSampler_3_Stage1;
+uniform sampler2D uTextureSampler_4_Stage1;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+noperspective in vec2 vTransformedCoords_3_Stage0;
+noperspective in vec2 vTransformedCoords_4_Stage0;
+noperspective in float vinCoverage_Stage0;
+vec4 DisplacementMap_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 dColor = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ dColor.xyz = dColor.w < 9.9999999747524271e-07 ? vec3(0.0) : clamp(dColor.xyz / dColor.w, 0.0, 1.0);
+ vec2 cCoords = vTransformedCoords_1_Stage0 + uScale_Stage1_c0_c0_c0_c0_c0_c0 * (dColor.yy - vec2(0.5));
+ {
+ vec2 origCoord = cCoords;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ _output = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ return _output;
+}
+vec4 ConfigConversionEffect_Stage1_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = floor(_input * 255.0 + 0.5) / 255.0;
+ {
+ _output.xyz = floor((_output.xyz * _output.w) * 255.0 + 0.5) / 255.0;
+ }
+ return _output;
+}
+float _guarded_divide(float n, float d) {
+ return n / d;
+}
+float _color_burn_component(float sc, float sa, float dc, float da) {
+ if (da == dc) {
+ return (sa * da + sc * (1.0 - da)) + dc * (1.0 - sa);
+ } else if (sc == 0.0) {
+ return dc * (1.0 - sa);
+ }
+ float d = max(0.0, da - _guarded_divide((da - dc) * sa, sc));
+ return (d * sa + sc * (1.0 - da)) + dc * (1.0 - sa);
+}
+vec4 blend_color_burn(vec4 src, vec4 dst) {
+ return vec4(_color_burn_component(src.x, src.w, dst.x, dst.w), _color_burn_component(src.y, src.w, dst.y, dst.w), _color_burn_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+}
+vec4 ComposeTwo_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_color_burn(DisplacementMap_Stage1_c0_c0_c0_c0_c0_c0(inputColor), ConfigConversionEffect_Stage1_c0_c0_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 MatrixConvolution_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 sum = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_2_Stage0 - uKernelOffset_Stage1_c0_c0_c1_c0 * uImageIncrement_Stage1_c0_c0_c1_c0;
+ vec4 c;
+ {
+ float k = uKernel_Stage1_c0_c0_c1_c0[0].x;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c1_c0.xy, uTexDom_Stage1_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c1_c0[0].y;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c1_c0.xy, uTexDom_Stage1_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c1_c0[0].z;
+ {
+ vec2 origCoord = coord + vec2(2.0, 0.0) * uImageIncrement_Stage1_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c1_c0.xy, uTexDom_Stage1_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c1_c0[0].w;
+ {
+ vec2 origCoord = coord + vec2(3.0, 0.0) * uImageIncrement_Stage1_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c1_c0.xy, uTexDom_Stage1_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c1_c0[1].x;
+ {
+ vec2 origCoord = coord + vec2(4.0, 0.0) * uImageIncrement_Stage1_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c1_c0.xy, uTexDom_Stage1_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c1_c0[1].y;
+ {
+ vec2 origCoord = coord + vec2(5.0, 0.0) * uImageIncrement_Stage1_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c1_c0.xy, uTexDom_Stage1_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c1_c0[1].z;
+ {
+ vec2 origCoord = coord + vec2(6.0, 0.0) * uImageIncrement_Stage1_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c1_c0.xy, uTexDom_Stage1_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c1_c0[1].w;
+ {
+ vec2 origCoord = coord + vec2(7.0, 0.0) * uImageIncrement_Stage1_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c1_c0.xy, uTexDom_Stage1_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c1_c0[2].x;
+ {
+ vec2 origCoord = coord + vec2(8.0, 0.0) * uImageIncrement_Stage1_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c1_c0.xy, uTexDom_Stage1_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c1_c0[2].y;
+ {
+ vec2 origCoord = coord + vec2(9.0, 0.0) * uImageIncrement_Stage1_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c1_c0.xy, uTexDom_Stage1_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c1_c0[2].z;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c1_c0.xy, uTexDom_Stage1_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c1_c0[2].w;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c1_c0.xy, uTexDom_Stage1_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c1_c0[3].x;
+ {
+ vec2 origCoord = coord + vec2(2.0, 1.0) * uImageIncrement_Stage1_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c1_c0.xy, uTexDom_Stage1_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c1_c0[3].y;
+ {
+ vec2 origCoord = coord + vec2(3.0, 1.0) * uImageIncrement_Stage1_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c1_c0.xy, uTexDom_Stage1_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c1_c0[3].z;
+ {
+ vec2 origCoord = coord + vec2(4.0, 1.0) * uImageIncrement_Stage1_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c1_c0.xy, uTexDom_Stage1_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c1_c0[3].w;
+ {
+ vec2 origCoord = coord + vec2(5.0, 1.0) * uImageIncrement_Stage1_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c1_c0.xy, uTexDom_Stage1_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c1_c0[4].x;
+ {
+ vec2 origCoord = coord + vec2(6.0, 1.0) * uImageIncrement_Stage1_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c1_c0.xy, uTexDom_Stage1_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c1_c0[4].y;
+ {
+ vec2 origCoord = coord + vec2(7.0, 1.0) * uImageIncrement_Stage1_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c1_c0.xy, uTexDom_Stage1_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c1_c0[4].z;
+ {
+ vec2 origCoord = coord + vec2(8.0, 1.0) * uImageIncrement_Stage1_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c1_c0.xy, uTexDom_Stage1_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c1_c0[4].w;
+ {
+ vec2 origCoord = coord + vec2(9.0, 1.0) * uImageIncrement_Stage1_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c1_c0.xy, uTexDom_Stage1_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ vec2 origCoord = vTransformedCoords_2_Stage0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c1_c0.xy, uTexDom_Stage1_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ _output.w = c.w;
+ _output.xyz = clamp(sum.xyz * uGain_Stage1_c0_c0_c1_c0 + uBias_Stage1_c0_c0_c1_c0, 0.0, 1.0);
+ _output.xyz *= _output.w;
+ _output *= _input;
+ return _output;
+}
+float _blend_overlay_component(float sc, float sa, float dc, float da) {
+ if (2.0 * dc <= da) {
+ return (2.0 * sc) * dc;
+ }
+ return sa * da - (2.0 * (da - dc)) * (sa - sc);
+}
+vec4 blend_overlay(vec4 src, vec4 dst) {
+ vec4 result = vec4(_blend_overlay_component(src.x, src.w, dst.x, dst.w), _blend_overlay_component(src.y, src.w, dst.y, dst.w), _blend_overlay_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+ result.xyz += dst.xyz * (1.0 - src.w) + src.xyz * (1.0 - dst.w);
+ return result;
+}
+vec4 ComposeTwo_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_overlay(ComposeTwo_Stage1_c0_c0_c0_c0(inputColor), MatrixConvolution_Stage1_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 DisplacementMap_Stage1_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 dColor = texture(uTextureSampler_3_Stage1, vTransformedCoords_3_Stage0);
+ dColor.xyz = dColor.w < 9.9999999747524271e-07 ? vec3(0.0) : clamp(dColor.xyz / dColor.w, 0.0, 1.0);
+ vec2 cCoords = vTransformedCoords_4_Stage0 + uScale_Stage1_c1_c0_c0_c0 * (dColor.wz - vec2(0.5));
+ {
+ vec2 origCoord = cCoords;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0.xy, uTexDom_Stage1_c1_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_4_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ _output = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ return _output;
+}
+vec4 Big_Ole_Key_Stage1_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = _input;
+ return _output;
+}
+vec4 blend_modulate(vec4 src, vec4 dst) {
+ return src * dst;
+}
+vec4 ComposeTwo_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_modulate(DisplacementMap_Stage1_c1_c0_c0_c0(inputColor), Big_Ole_Key_Stage1_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 blend_multiply(vec4 src, vec4 dst) {
+ return vec4(((1.0 - src.w) * dst.xyz + (1.0 - dst.w) * src.xyz) + src.xyz * dst.xyz, src.w + (1.0 - src.w) * dst.w);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ float alpha = 1.0;
+ alpha = vinCoverage_Stage0;
+ outputCoverage_Stage0 = vec4(alpha);
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_multiply(ComposeTwo_Stage1_c0_c0(inputColor), ComposeTwo_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ sk_FragColor = outputCoverage_Stage0 * output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+uniform mat3 uCoordTransformMatrix_3_Stage0;
+uniform mat3 uCoordTransformMatrix_4_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in float inCoverage;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+noperspective out vec2 vTransformedCoords_3_Stage0;
+noperspective out vec2 vTransformedCoords_4_Stage0;
+noperspective out float vinCoverage_Stage0;
+void main() {
+ vec4 color = inColor;
+ vcolor_Stage0 = color;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_3_Stage0 = (uCoordTransformMatrix_3_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_4_Stage0 = (uCoordTransformMatrix_4_Stage0 * vec3(inPosition, 1.0)).xy;
+ vinCoverage_Stage0 = inCoverage;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/631-3.shader_test b/shaders/skia/631-3.shader_test
new file mode 100644
index 0000000..a4766af
--- /dev/null
+++ b/shaders/skia/631-3.shader_test
@@ -0,0 +1,101 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 ucircle_Stage2_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 CircleEffect_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ float d;
+ {
+ d = (length((ucircle_Stage2_c0_c0.xy - gl_FragCoord.xy) * ucircle_Stage2_c0_c0.w) - 1.0) * ucircle_Stage2_c0_c0.z;
+ }
+ {
+ _output = _input * clamp(d, 0.0, 1.0);
+ }
+ return _output;
+}
+float _blend_color_saturation(vec3 color) {
+ return max(max(color.x, color.y), color.z) - min(min(color.x, color.y), color.z);
+}
+vec3 _blend_set_color_saturation_helper(vec3 minMidMax, float sat) {
+ if (minMidMax.x < minMidMax.z) {
+ return vec3(0.0, (sat * (minMidMax.y - minMidMax.x)) / (minMidMax.z - minMidMax.x), sat);
+ }
+ return vec3(0.0);
+}
+vec3 _blend_set_color_saturation(vec3 hueLumColor, vec3 satColor) {
+ float sat = _blend_color_saturation(satColor);
+ if (hueLumColor.x <= hueLumColor.y) {
+ if (hueLumColor.y <= hueLumColor.z) {
+ hueLumColor.xyz = _blend_set_color_saturation_helper(hueLumColor, sat);
+ } else if (hueLumColor.x <= hueLumColor.z) {
+ hueLumColor.xzy = _blend_set_color_saturation_helper(hueLumColor.xzy, sat);
+ } else {
+ hueLumColor.zxy = _blend_set_color_saturation_helper(hueLumColor.zxy, sat);
+ }
+ } else if (hueLumColor.x <= hueLumColor.z) {
+ hueLumColor.yxz = _blend_set_color_saturation_helper(hueLumColor.yxz, sat);
+ } else if (hueLumColor.y <= hueLumColor.z) {
+ hueLumColor.yzx = _blend_set_color_saturation_helper(hueLumColor.yzx, sat);
+ } else {
+ hueLumColor.zyx = _blend_set_color_saturation_helper(hueLumColor.zyx, sat);
+ }
+ return hueLumColor;
+}
+float _blend_color_luminance(vec3 color) {
+ return dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), color);
+}
+vec3 _blend_set_color_luminance(vec3 hueSatColor, float alpha, vec3 lumColor) {
+ float lum = _blend_color_luminance(lumColor);
+ vec3 result = (lum - _blend_color_luminance(hueSatColor)) + hueSatColor;
+ float minComp = min(min(result.x, result.y), result.z);
+ float maxComp = max(max(result.x, result.y), result.z);
+ if (minComp < 0.0 && lum != minComp) {
+ result = lum + ((result - lum) * lum) / (lum - minComp);
+ }
+ if (maxComp > alpha && maxComp != lum) {
+ return lum + ((result - lum) * (alpha - lum)) / (maxComp - lum);
+ }
+ return result;
+}
+vec4 blend_hue(vec4 src, vec4 dst) {
+ float alpha = dst.w * src.w;
+ vec3 sda = src.xyz * dst.w;
+ vec3 dsa = dst.xyz * src.w;
+ return vec4((((_blend_set_color_luminance(_blend_set_color_saturation(sda, dsa), alpha, dsa) + dst.xyz) - dsa) + src.xyz) - sda, (src.w + dst.w) - alpha);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_hue(output_Stage1, CircleEffect_Stage2_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/631.shader_test b/shaders/skia/631.shader_test
new file mode 100644
index 0000000..e34a989
--- /dev/null
+++ b/shaders/skia/631.shader_test
@@ -0,0 +1,108 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 ucolor_Stage1_c0_c0_c0_c0;
+noperspective in vec4 vcolor_Stage0;
+vec4 ConstColorProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = _input.w * ucolor_Stage1_c0_c0_c0_c0;
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = ConstColorProcessor_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+float _blend_color_saturation(vec3 color) {
+ return max(max(color.x, color.y), color.z) - min(min(color.x, color.y), color.z);
+}
+vec3 _blend_set_color_saturation_helper(vec3 minMidMax, float sat) {
+ if (minMidMax.x < minMidMax.z) {
+ return vec3(0.0, (sat * (minMidMax.y - minMidMax.x)) / (minMidMax.z - minMidMax.x), sat);
+ }
+ return vec3(0.0);
+}
+vec3 _blend_set_color_saturation(vec3 hueLumColor, vec3 satColor) {
+ float sat = _blend_color_saturation(satColor);
+ if (hueLumColor.x <= hueLumColor.y) {
+ if (hueLumColor.y <= hueLumColor.z) {
+ hueLumColor.xyz = _blend_set_color_saturation_helper(hueLumColor, sat);
+ } else if (hueLumColor.x <= hueLumColor.z) {
+ hueLumColor.xzy = _blend_set_color_saturation_helper(hueLumColor.xzy, sat);
+ } else {
+ hueLumColor.zxy = _blend_set_color_saturation_helper(hueLumColor.zxy, sat);
+ }
+ } else if (hueLumColor.x <= hueLumColor.z) {
+ hueLumColor.yxz = _blend_set_color_saturation_helper(hueLumColor.yxz, sat);
+ } else if (hueLumColor.y <= hueLumColor.z) {
+ hueLumColor.yzx = _blend_set_color_saturation_helper(hueLumColor.yzx, sat);
+ } else {
+ hueLumColor.zyx = _blend_set_color_saturation_helper(hueLumColor.zyx, sat);
+ }
+ return hueLumColor;
+}
+float _blend_color_luminance(vec3 color) {
+ return dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), color);
+}
+vec3 _blend_set_color_luminance(vec3 hueSatColor, float alpha, vec3 lumColor) {
+ float lum = _blend_color_luminance(lumColor);
+ vec3 result = (lum - _blend_color_luminance(hueSatColor)) + hueSatColor;
+ float minComp = min(min(result.x, result.y), result.z);
+ float maxComp = max(max(result.x, result.y), result.z);
+ if (minComp < 0.0 && lum != minComp) {
+ result = lum + ((result - lum) * lum) / (lum - minComp);
+ }
+ if (maxComp > alpha && maxComp != lum) {
+ return lum + ((result - lum) * (alpha - lum)) / (maxComp - lum);
+ }
+ return result;
+}
+vec4 blend_saturation(vec4 src, vec4 dst) {
+ float alpha = dst.w * src.w;
+ vec3 sda = src.xyz * dst.w;
+ vec3 dsa = dst.xyz * src.w;
+ return vec4((((_blend_set_color_luminance(_blend_set_color_saturation(dsa, sda), alpha, dsa) + dst.xyz) - dsa) + src.xyz) - sda, (src.w + dst.w) - alpha);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_saturation(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 position;
+in vec4 inColor;
+noperspective out vec4 vcolor_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/634-2.shader_test b/shaders/skia/634-2.shader_test
new file mode 100644
index 0000000..4d748b1
--- /dev/null
+++ b/shaders/skia/634-2.shader_test
@@ -0,0 +1,76 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uCoordTransformMatrix_1_Stage0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vEllipseOffsets_Stage0;
+noperspective in vec4 vEllipseRadii_Stage0;
+noperspective in vec4 vinColor_Stage0;
+noperspective in vec3 vTransformedCoords_0_Stage0;
+vec4 TextureEffect_Stage1_c0_c0(vec4 _input, vec2 _coords) {
+ _coords = _coords * uCoordTransformMatrix_1_Stage0.xz + uCoordTransformMatrix_1_Stage0.yw;
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, _coords) * _input;
+ return _output;
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ vec2 offset = vEllipseOffsets_Stage0;
+ float test = dot(offset, offset) - 1.0;
+ vec2 grad = (2.0 * offset) * vEllipseRadii_Stage0.xy;
+ float grad_dot = dot(grad, grad);
+ grad_dot = max(grad_dot, 1.1754999560161448e-38);
+ float invlen = inversesqrt(grad_dot);
+ float edgeAlpha = clamp(0.5 - test * invlen, 0.0, 1.0);
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ vec4 output_Stage1;
+ {
+ vec2 vTransformedCoords_0_Stage0_ensure2D = vTransformedCoords_0_Stage0.xy / vTransformedCoords_0_Stage0.z;
+ float coord = vTransformedCoords_0_Stage0_ensure2D.x - 0.5;
+ float f = fract(coord);
+ coord += 0.5 - f;
+ float f2 = f * f;
+ vec4 w = mat4(0.055555555555555552, 0.88888888888888884, 0.055555555555555552, 0.0, -0.5, 0.0, 0.5, 0.0, 0.83333333333333337, -2.0, 1.5, -0.33333333333333331, -0.3888888888888889, 1.1666666666666667, -1.1666666666666667, 0.3888888888888889) * vec4(1.0, f, f2, f2 * f);
+ vec4 c[4];
+ c[0] = TextureEffect_Stage1_c0_c0(vec4(1.0), vec2(coord + -1.0, vTransformedCoords_0_Stage0_ensure2D.y));
+ c[1] = TextureEffect_Stage1_c0_c0(vec4(1.0), vec2(coord, vTransformedCoords_0_Stage0_ensure2D.y));
+ c[2] = TextureEffect_Stage1_c0_c0(vec4(1.0), vec2(coord + 1.0, vTransformedCoords_0_Stage0_ensure2D.y));
+ c[3] = TextureEffect_Stage1_c0_c0(vec4(1.0), vec2(coord + 2.0, vTransformedCoords_0_Stage0_ensure2D.y));
+ vec4 bicubicColor = ((c[0] * w.x + c[1] * w.y) + c[2] * w.z) + c[3] * w.w;
+ bicubicColor.xyz = max(vec3(0.0), min(bicubicColor.xyz, bicubicColor.www));
+ output_Stage1 = bicubicColor * outputCoverage_Stage0;
+ }
+ {
+ sk_FragColor = 1.0 - output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec2 inEllipseOffset;
+in vec4 inEllipseRadii;
+noperspective out vec2 vEllipseOffsets_Stage0;
+noperspective out vec4 vEllipseRadii_Stage0;
+noperspective out vec4 vinColor_Stage0;
+noperspective out vec3 vTransformedCoords_0_Stage0;
+void main() {
+ vEllipseOffsets_Stage0 = inEllipseOffset;
+ vEllipseRadii_Stage0 = inEllipseRadii;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0);
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/634-3.shader_test b/shaders/skia/634-3.shader_test
new file mode 100644
index 0000000..cba4ce4
--- /dev/null
+++ b/shaders/skia/634-3.shader_test
@@ -0,0 +1,50 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 TextureEffect_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage2, vTransformedCoords_1_Stage0) * _input;
+ return _output;
+}
+vec4 blend_difference(vec4 src, vec4 dst) {
+ return vec4((src.xyz + dst.xyz) - 2.0 * min(src.xyz * dst.w, dst.xyz * src.w), src.w + (1.0 - src.w) * dst.w);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_difference(TextureEffect_Stage2_c0_c0(vec4(1.0)), output_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/634.shader_test b/shaders/skia/634.shader_test
new file mode 100644
index 0000000..e1ba5f8
--- /dev/null
+++ b/shaders/skia/634.shader_test
@@ -0,0 +1,199 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage2_c1_c0;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.w) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ } else {
+ {
+ if (t < uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = OverrideInputFragmentProcessor_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c1_c0;
+ }
+ return _output;
+}
+float _blend_color_saturation(vec3 color) {
+ return max(max(color.x, color.y), color.z) - min(min(color.x, color.y), color.z);
+}
+vec3 _blend_set_color_saturation_helper(vec3 minMidMax, float sat) {
+ if (minMidMax.x < minMidMax.z) {
+ return vec3(0.0, (sat * (minMidMax.y - minMidMax.x)) / (minMidMax.z - minMidMax.x), sat);
+ }
+ return vec3(0.0);
+}
+vec3 _blend_set_color_saturation(vec3 hueLumColor, vec3 satColor) {
+ float sat = _blend_color_saturation(satColor);
+ if (hueLumColor.x <= hueLumColor.y) {
+ if (hueLumColor.y <= hueLumColor.z) {
+ hueLumColor.xyz = _blend_set_color_saturation_helper(hueLumColor, sat);
+ } else if (hueLumColor.x <= hueLumColor.z) {
+ hueLumColor.xzy = _blend_set_color_saturation_helper(hueLumColor.xzy, sat);
+ } else {
+ hueLumColor.zxy = _blend_set_color_saturation_helper(hueLumColor.zxy, sat);
+ }
+ } else if (hueLumColor.x <= hueLumColor.z) {
+ hueLumColor.yxz = _blend_set_color_saturation_helper(hueLumColor.yxz, sat);
+ } else if (hueLumColor.y <= hueLumColor.z) {
+ hueLumColor.yzx = _blend_set_color_saturation_helper(hueLumColor.yzx, sat);
+ } else {
+ hueLumColor.zyx = _blend_set_color_saturation_helper(hueLumColor.zyx, sat);
+ }
+ return hueLumColor;
+}
+float _blend_color_luminance(vec3 color) {
+ return dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), color);
+}
+vec3 _blend_set_color_luminance(vec3 hueSatColor, float alpha, vec3 lumColor) {
+ float lum = _blend_color_luminance(lumColor);
+ vec3 result = (lum - _blend_color_luminance(hueSatColor)) + hueSatColor;
+ float minComp = min(min(result.x, result.y), result.z);
+ float maxComp = max(max(result.x, result.y), result.z);
+ if (minComp < 0.0 && lum != minComp) {
+ result = lum + ((result - lum) * lum) / (lum - minComp);
+ }
+ if (maxComp > alpha && maxComp != lum) {
+ return lum + ((result - lum) * (alpha - lum)) / (maxComp - lum);
+ }
+ return result;
+}
+vec4 blend_saturation(vec4 src, vec4 dst) {
+ float alpha = dst.w * src.w;
+ vec3 sda = src.xyz * dst.w;
+ vec3 dsa = dst.xyz * src.w;
+ return vec4((((_blend_set_color_luminance(_blend_set_color_saturation(dsa, sda), alpha, dsa) + dst.xyz) - dsa) + src.xyz) - sda, (src.w + dst.w) - alpha);
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 blend_darken(vec4 src, vec4 dst) {
+ vec4 result = blend_src_over(src, dst);
+ result.xyz = min(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
+ return result;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_saturation(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_darken(ConstColorProcessor_Stage2_c1_c0(vec4(1.0)), output_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 inColor;
+in vec2 inLocalCoord;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/637-2.shader_test b/shaders/skia/637-2.shader_test
new file mode 100644
index 0000000..f4c5ef2
--- /dev/null
+++ b/shaders/skia/637-2.shader_test
@@ -0,0 +1,176 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_KHR_blend_equation_advanced : require
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+layout (blend_support_all_equations) out ;
+uniform vec4 uCoordTransformMatrix_1_Stage0;
+uniform vec4 uellipse_Stage2_c0_c0;
+uniform vec4 urectUniform_Stage2_c1_c0;
+uniform vec2 uScale_Stage5;
+uniform vec4 uTexDom_Stage5;
+uniform vec3 uDecalParams_Stage5;
+uniform sampler2D uTextureSampler_0_Stage3;
+uniform sampler2D uTextureSampler_0_Stage5;
+uniform sampler2D uTextureSampler_1_Stage5;
+noperspective in vec2 vEllipseOffsets_Stage0;
+noperspective in vec4 vEllipseRadii_Stage0;
+noperspective in vec4 vinColor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+noperspective in vec2 vTransformedCoords_3_Stage0;
+vec4 EllipseEffect_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 d = gl_FragCoord.xy - uellipse_Stage2_c0_c0.xy;
+ vec2 Z = d * uellipse_Stage2_c0_c0.zw;
+ float implicit = dot(Z, d) - 1.0;
+ float grad_dot = 4.0 * dot(Z, Z);
+ {
+ grad_dot = max(grad_dot, 1.1754999560161448e-38);
+ }
+ float approx_dist = implicit * inversesqrt(grad_dot);
+ float alpha;
+ {
+ alpha = clamp(0.5 + approx_dist, 0.0, 1.0);
+ }
+ _output = _input * alpha;
+ return _output;
+}
+vec4 AARectEffect_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ float alpha;
+ {
+ alpha = float(all(greaterThan(vec4(gl_FragCoord.xy, urectUniform_Stage2_c1_c0.zw), vec4(urectUniform_Stage2_c1_c0.xy, gl_FragCoord.xy))) ? 1 : 0);
+ }
+ _output = _input * alpha;
+ return _output;
+}
+vec4 TextureEffect_Stage3_c2_c0(vec4 _input, vec2 _coords) {
+ _coords = _coords * uCoordTransformMatrix_1_Stage0.xz + uCoordTransformMatrix_1_Stage0.yw;
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage3, _coords) * _input;
+ return _output;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 blend_darken(vec4 src, vec4 dst) {
+ vec4 result = blend_src_over(src, dst);
+ result.xyz = min(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
+ return result;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vinColor_Stage0;
+ vec2 offset = vEllipseOffsets_Stage0;
+ offset *= vEllipseRadii_Stage0.xy;
+ float test = dot(offset, offset) - 1.0;
+ vec2 grad = (2.0 * offset) * vEllipseRadii_Stage0.xy;
+ float grad_dot = dot(grad, grad);
+ grad_dot = max(grad_dot, 1.1754999560161448e-38);
+ float invlen = inversesqrt(grad_dot);
+ float edgeAlpha = clamp(0.5 - test * invlen, 0.0, 1.0);
+ offset = vEllipseOffsets_Stage0 * vEllipseRadii_Stage0.zw;
+ test = dot(offset, offset) - 1.0;
+ grad = (2.0 * offset) * vEllipseRadii_Stage0.zw;
+ grad_dot = dot(grad, grad);
+ invlen = inversesqrt(grad_dot);
+ edgeAlpha *= clamp(0.5 + test * invlen, 0.0, 1.0);
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = floor(outputColor_Stage0 * 255.0 + 0.5) / 255.0;
+ {
+ output_Stage1.xyz = floor((output_Stage1.xyz * output_Stage1.w) * 255.0 + 0.5) / 255.0;
+ }
+ }
+ vec4 output_Stage2;
+ {
+ vec4 inputColor = vec4(output_Stage1.xyz, 1.0);
+ output_Stage2 = blend_darken(EllipseEffect_Stage2_c0_c0(inputColor), AARectEffect_Stage2_c1_c0(inputColor));
+ output_Stage2 *= output_Stage1.w;
+ }
+ vec4 output_Stage3;
+ {
+ float coord = vTransformedCoords_0_Stage0.x - 0.5;
+ float f = fract(coord);
+ coord += 0.5 - f;
+ float f2 = f * f;
+ vec4 w = mat4(0.055555555555555552, 0.88888888888888884, 0.055555555555555552, 0.0, -0.5, 0.0, 0.5, 0.0, 0.83333333333333337, -2.0, 1.5, -0.33333333333333331, -0.3888888888888889, 1.1666666666666667, -1.1666666666666667, 0.3888888888888889) * vec4(1.0, f, f2, f2 * f);
+ vec4 c[4];
+ c[0] = TextureEffect_Stage3_c2_c0(vec4(1.0), vec2(coord + -1.0, vTransformedCoords_0_Stage0.y));
+ c[1] = TextureEffect_Stage3_c2_c0(vec4(1.0), vec2(coord, vTransformedCoords_0_Stage0.y));
+ c[2] = TextureEffect_Stage3_c2_c0(vec4(1.0), vec2(coord + 1.0, vTransformedCoords_0_Stage0.y));
+ c[3] = TextureEffect_Stage3_c2_c0(vec4(1.0), vec2(coord + 2.0, vTransformedCoords_0_Stage0.y));
+ vec4 bicubicColor = ((c[0] * w.x + c[1] * w.y) + c[2] * w.z) + c[3] * w.w;
+ bicubicColor.xyz = max(vec3(0.0), min(bicubicColor.xyz, bicubicColor.www));
+ output_Stage3 = bicubicColor * outputCoverage_Stage0;
+ }
+ vec4 output_Stage4;
+ {
+ output_Stage4 = floor(output_Stage3 * 255.0 + 0.5) / 255.0;
+ {
+ output_Stage4.xyz = output_Stage4.w <= 0.0 ? vec3(0.0) : floor((output_Stage4.xyz / output_Stage4.w) * 255.0 + 0.5) / 255.0;
+ }
+ }
+ vec4 output_Stage5;
+ {
+ vec4 dColor = texture(uTextureSampler_0_Stage5, vTransformedCoords_2_Stage0);
+ dColor.xyz = dColor.w < 9.9999999747524271e-07 ? vec3(0.0) : clamp(dColor.xyz / dColor.w, 0.0, 1.0);
+ vec2 cCoords = vTransformedCoords_3_Stage0 + uScale_Stage5 * (dColor.zw - vec2(0.5));
+ {
+ vec2 origCoord = cCoords;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage5.xy, uTexDom_Stage5.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage5, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage5.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage5.y);
+ if (err > uDecalParams_Stage5.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage5.z < 1.0) {
+ err = 0.0;
+ }
+ output_Stage5 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ }
+ {
+ sk_FragColor = output_Stage5 * output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+uniform mat3 uCoordTransformMatrix_3_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec2 inEllipseOffset;
+in vec4 inEllipseRadii;
+noperspective out vec2 vEllipseOffsets_Stage0;
+noperspective out vec4 vEllipseRadii_Stage0;
+noperspective out vec4 vinColor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+noperspective out vec2 vTransformedCoords_3_Stage0;
+void main() {
+ vEllipseOffsets_Stage0 = inEllipseOffset;
+ vEllipseRadii_Stage0 = inEllipseRadii;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_3_Stage0 = (uCoordTransformMatrix_3_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/637-3.shader_test b/shaders/skia/637-3.shader_test
new file mode 100644
index 0000000..1f9a0d1
--- /dev/null
+++ b/shaders/skia/637-3.shader_test
@@ -0,0 +1,65 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uinnerRect_Stage2_c0_c0;
+uniform vec2 uradiusPlusHalf_Stage2_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 CircularRRect_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 dxy0 = uinnerRect_Stage2_c0_c0.xy - gl_FragCoord.xy;
+ vec2 dxy1 = gl_FragCoord.xy - uinnerRect_Stage2_c0_c0.zw;
+ vec2 dxy = max(max(dxy0, dxy1), 0.0);
+ float alpha = clamp(uradiusPlusHalf_Stage2_c0_c0.x - length(dxy), 0.0, 1.0);
+ alpha = 1.0 - alpha;
+ _output = _input * alpha;
+ return _output;
+}
+float _blend_overlay_component(float sc, float sa, float dc, float da) {
+ if (2.0 * dc <= da) {
+ return (2.0 * sc) * dc;
+ }
+ return sa * da - (2.0 * (da - dc)) * (sa - sc);
+}
+vec4 blend_overlay(vec4 src, vec4 dst) {
+ vec4 result = vec4(_blend_overlay_component(src.x, src.w, dst.x, dst.w), _blend_overlay_component(src.y, src.w, dst.y, dst.w), _blend_overlay_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+ result.xyz += dst.xyz * (1.0 - src.w) + src.xyz * (1.0 - dst.w);
+ return result;
+}
+vec4 blend_hard_light(vec4 src, vec4 dst) {
+ return blend_overlay(dst, src);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_hard_light(CircularRRect_Stage2_c0_c0(vec4(1.0)), output_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/637.shader_test b/shaders/skia/637.shader_test
new file mode 100644
index 0000000..236b4cd
--- /dev/null
+++ b/shaders/skia/637.shader_test
@@ -0,0 +1,128 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 ucolor_Stage1_c0_c0_c0_c0;
+uniform vec4 ucolor_Stage2_c1_c0;
+noperspective in vec4 vcolor_Stage0;
+vec4 ConstColorProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = _input.w * ucolor_Stage1_c0_c0_c0_c0;
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = ConstColorProcessor_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c1_c0;
+ }
+ return _output;
+}
+float _blend_color_saturation(vec3 color) {
+ return max(max(color.x, color.y), color.z) - min(min(color.x, color.y), color.z);
+}
+vec3 _blend_set_color_saturation_helper(vec3 minMidMax, float sat) {
+ if (minMidMax.x < minMidMax.z) {
+ return vec3(0.0, (sat * (minMidMax.y - minMidMax.x)) / (minMidMax.z - minMidMax.x), sat);
+ }
+ return vec3(0.0);
+}
+vec3 _blend_set_color_saturation(vec3 hueLumColor, vec3 satColor) {
+ float sat = _blend_color_saturation(satColor);
+ if (hueLumColor.x <= hueLumColor.y) {
+ if (hueLumColor.y <= hueLumColor.z) {
+ hueLumColor.xyz = _blend_set_color_saturation_helper(hueLumColor, sat);
+ } else if (hueLumColor.x <= hueLumColor.z) {
+ hueLumColor.xzy = _blend_set_color_saturation_helper(hueLumColor.xzy, sat);
+ } else {
+ hueLumColor.zxy = _blend_set_color_saturation_helper(hueLumColor.zxy, sat);
+ }
+ } else if (hueLumColor.x <= hueLumColor.z) {
+ hueLumColor.yxz = _blend_set_color_saturation_helper(hueLumColor.yxz, sat);
+ } else if (hueLumColor.y <= hueLumColor.z) {
+ hueLumColor.yzx = _blend_set_color_saturation_helper(hueLumColor.yzx, sat);
+ } else {
+ hueLumColor.zyx = _blend_set_color_saturation_helper(hueLumColor.zyx, sat);
+ }
+ return hueLumColor;
+}
+float _blend_color_luminance(vec3 color) {
+ return dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), color);
+}
+vec3 _blend_set_color_luminance(vec3 hueSatColor, float alpha, vec3 lumColor) {
+ float lum = _blend_color_luminance(lumColor);
+ vec3 result = (lum - _blend_color_luminance(hueSatColor)) + hueSatColor;
+ float minComp = min(min(result.x, result.y), result.z);
+ float maxComp = max(max(result.x, result.y), result.z);
+ if (minComp < 0.0 && lum != minComp) {
+ result = lum + ((result - lum) * lum) / (lum - minComp);
+ }
+ if (maxComp > alpha && maxComp != lum) {
+ return lum + ((result - lum) * (alpha - lum)) / (maxComp - lum);
+ }
+ return result;
+}
+vec4 blend_saturation(vec4 src, vec4 dst) {
+ float alpha = dst.w * src.w;
+ vec3 sda = src.xyz * dst.w;
+ vec3 dsa = dst.xyz * src.w;
+ return vec4((((_blend_set_color_luminance(_blend_set_color_saturation(dsa, sda), alpha, dsa) + dst.xyz) - dsa) + src.xyz) - sda, (src.w + dst.w) - alpha);
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 blend_darken(vec4 src, vec4 dst) {
+ vec4 result = blend_src_over(src, dst);
+ result.xyz = min(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
+ return result;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_saturation(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_darken(ConstColorProcessor_Stage2_c1_c0(vec4(1.0)), output_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 position;
+in vec4 inColor;
+noperspective out vec4 vcolor_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/64-1.shader_test b/shaders/skia/64-1.shader_test
new file mode 100644
index 0000000..4e4a541
--- /dev/null
+++ b/shaders/skia/64-1.shader_test
@@ -0,0 +1,61 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 TextureEffect_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage2, vTransformedCoords_1_Stage0) * _input;
+ return _output;
+}
+float _blend_overlay_component(float sc, float sa, float dc, float da) {
+ if (2.0 * dc <= da) {
+ return (2.0 * sc) * dc;
+ }
+ return sa * da - (2.0 * (da - dc)) * (sa - sc);
+}
+vec4 blend_overlay(vec4 src, vec4 dst) {
+ vec4 result = vec4(_blend_overlay_component(src.x, src.w, dst.x, dst.w), _blend_overlay_component(src.y, src.w, dst.y, dst.w), _blend_overlay_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+ result.xyz += dst.xyz * (1.0 - src.w) + src.xyz * (1.0 - dst.w);
+ return result;
+}
+vec4 blend_hard_light(vec4 src, vec4 dst) {
+ return blend_overlay(dst, src);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_hard_light(output_Stage1, TextureEffect_Stage2_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/64-10.shader_test b/shaders/skia/64-10.shader_test
new file mode 100644
index 0000000..cefa0a4
--- /dev/null
+++ b/shaders/skia/64-10.shader_test
@@ -0,0 +1,79 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage2_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c1_c0;
+ }
+ return _output;
+}
+vec4 blend_dst_over(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src + dst;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_dst_over(ConstColorProcessor_Stage2_c1_c0(vec4(1.0)), output_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/64-11.shader_test b/shaders/skia/64-11.shader_test
new file mode 100644
index 0000000..9260c20
--- /dev/null
+++ b/shaders/skia/64-11.shader_test
@@ -0,0 +1,44 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform float uPixelSize_Stage1;
+uniform vec2 uRange_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0;
+ coord.y -= 16.0 * uPixelSize_Stage1;
+ float highBound = min(uRange_Stage1.y, coord.y + 32.0 * uPixelSize_Stage1);
+ coord.y = max(uRange_Stage1.x, coord.y);
+ for (int i = 0;i < 33; i++) {
+ output_Stage1 = max(output_Stage1, texture(uTextureSampler_0_Stage1, coord));
+ coord.y += uPixelSize_Stage1;
+ coord.y = min(highBound, coord.y);
+ }
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/64-12.shader_test b/shaders/skia/64-12.shader_test
new file mode 100644
index 0000000..bcffafa
--- /dev/null
+++ b/shaders/skia/64-12.shader_test
@@ -0,0 +1,153 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform float uSurfaceScale_Stage1;
+uniform vec3 uLightColor_Stage1;
+uniform float uKD_Stage1;
+uniform vec3 uLightLocation_Stage1;
+uniform float uExponent_Stage1;
+uniform float uCosInnerConeAngle_Stage1;
+uniform float uCosOuterConeAngle_Stage1;
+uniform float uConeScale_Stage1;
+uniform vec3 uS_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 light_Stage1(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ float colorScale = uKD_Stage1 * dot(normal, surfaceToLight);
+ return vec4(lightColor * clamp(colorScale, 0.0, 1.0), 1.0);
+}
+float sobel_Stage1(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage1(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage1(float m[9], float surfaceScale) {
+ return pointToNormal_Stage1(sobel_Stage1(0.0, 0.0, m[3], m[5], m[6], m[8], 0.33333298563957214), sobel_Stage1(0.0, 0.0, m[4], m[7], m[5], m[8], 0.5), surfaceScale);
+}
+vec3 lightColor_Stage1(vec3 surfaceToLight) {
+ float cosAngle = -dot(surfaceToLight, uS_Stage1);
+ if (cosAngle < uCosOuterConeAngle_Stage1) {
+ return vec3(0.0);
+ }
+ float scale = pow(cosAngle, uExponent_Stage1);
+ if (cosAngle < uCosInnerConeAngle_Stage1) {
+ return ((uLightColor_Stage1 * scale) * (cosAngle - uCosOuterConeAngle_Stage1)) * uConeScale_Stage1;
+ }
+ return uLightColor_Stage1;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ vec2 coord = vTransformedCoords_0_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp0 = textureColor;
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp1 = textureColor;
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp2 = textureColor;
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp3 = textureColor;
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp4 = textureColor;
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp5 = textureColor;
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp6 = textureColor;
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp7 = textureColor;
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp8 = textureColor;
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = normalize(uLightLocation_Stage1 - vec3(gl_FragCoord.xy, uSurfaceScale_Stage1 * m[4]));
+ output_Stage1 = light_Stage1(normal_Stage1(m, uSurfaceScale_Stage1), surfaceToLight, lightColor_Stage1(surfaceToLight));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/64-13.shader_test b/shaders/skia/64-13.shader_test
new file mode 100644
index 0000000..458d1f2
--- /dev/null
+++ b/shaders/skia/64-13.shader_test
@@ -0,0 +1,79 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec2 uDstTextureUpperLeft_Stage1;
+uniform vec2 uDstTextureCoordScale_Stage1;
+uniform sampler2D uTextureSampler_0_Stage0;
+uniform sampler2D uDstTextureSampler_Stage1;
+noperspective in vec2 vTextureCoords_Stage0;
+flat in int vTexIndex_Stage0;
+noperspective in vec4 vinColor_Stage0;
+float _guarded_divide(float n, float d) {
+ return n / d;
+}
+float _color_burn_component(float sc, float sa, float dc, float da) {
+ if (da == dc) {
+ return (sa * da + sc * (1.0 - da)) + dc * (1.0 - sa);
+ } else if (sc == 0.0) {
+ return dc * (1.0 - sa);
+ }
+ float d = max(0.0, da - _guarded_divide((da - dc) * sa, sc));
+ return (d * sa + sc * (1.0 - da)) + dc * (1.0 - sa);
+}
+vec4 blend_color_burn(vec4 src, vec4 dst) {
+ return vec4(_color_burn_component(src.x, src.w, dst.x, dst.w), _color_burn_component(src.y, src.w, dst.y, dst.w), _color_burn_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vinColor_Stage0;
+ vec4 texColor;
+ {
+ texColor = texture(uTextureSampler_0_Stage0, vTextureCoords_Stage0);
+ }
+ outputCoverage_Stage0 = texColor;
+ }
+ {
+ if (all(lessThanEqual(outputCoverage_Stage0.xyz, vec3(0.0)))) {
+ discard;
+ }
+ vec2 _dstTexCoord = (gl_FragCoord.xy - uDstTextureUpperLeft_Stage1) * uDstTextureCoordScale_Stage1;
+ _dstTexCoord.y = 1.0 - _dstTexCoord.y;
+ vec4 _dstColor = texture(uDstTextureSampler_Stage1, _dstTexCoord);
+ sk_FragColor = blend_color_burn(outputColor_Stage0, _dstColor);
+ float lerpRed = mix(_dstColor.w, sk_FragColor.w, outputCoverage_Stage0.x);
+ float lerpBlue = mix(_dstColor.w, sk_FragColor.w, outputCoverage_Stage0.y);
+ float lerpGreen = mix(_dstColor.w, sk_FragColor.w, outputCoverage_Stage0.z);
+ sk_FragColor = outputCoverage_Stage0 * sk_FragColor + (vec4(1.0) - outputCoverage_Stage0) * _dstColor;
+ sk_FragColor.w = max(max(lerpRed, lerpBlue), lerpGreen);
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform vec2 uAtlasSizeInv_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in uvec2 inTextureCoords;
+noperspective out vec2 vTextureCoords_Stage0;
+flat out int vTexIndex_Stage0;
+noperspective out vec4 vinColor_Stage0;
+void main() {
+ ivec2 signedCoords = ivec2(int(inTextureCoords.x), int(inTextureCoords.y));
+ vec2 unormTexCoords = vec2(float(signedCoords.x / 2), float(signedCoords.y / 2));
+ vTextureCoords_Stage0 = unormTexCoords * uAtlasSizeInv_Stage0;
+ vTexIndex_Stage0 = 0;
+ vinColor_Stage0 = inColor;
+ gl_Position = vec4(inPosition.x, inPosition.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/64-14.shader_test b/shaders/skia/64-14.shader_test
new file mode 100644
index 0000000..781e37c
--- /dev/null
+++ b/shaders/skia/64-14.shader_test
@@ -0,0 +1,41 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform float uPixelSize_Stage1;
+uniform vec2 uRange_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = vec4(1.0, 1.0, 1.0, 1.0);
+ vec2 coord = vTransformedCoords_0_Stage0;
+ coord.x -= 10.0 * uPixelSize_Stage1;
+ for (int i = 0;i < 21; i++) {
+ output_Stage1 = min(output_Stage1, texture(uTextureSampler_0_Stage1, coord));
+ coord.x += uPixelSize_Stage1;
+ }
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/64-18.shader_test b/shaders/skia/64-18.shader_test
new file mode 100644
index 0000000..3abe705
--- /dev/null
+++ b/shaders/skia/64-18.shader_test
@@ -0,0 +1,76 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uclamp_Stage1_c0_c0;
+uniform vec4 ucolor_Stage2_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+noperspective in float vcoverage_Stage0;
+vec4 TextureEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 inCoord = vTransformedCoords_0_Stage0;
+ vec2 subsetCoord;
+ subsetCoord.x = inCoord.x;
+ subsetCoord.y = inCoord.y;
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage1_c0_c0.x, uclamp_Stage1_c0_c0.z);
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage1_c0_c0.y, uclamp_Stage1_c0_c0.w);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ _output = _input * textureColor;
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c1_c0;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ float coverage = vcoverage_Stage0;
+ outputCoverage_Stage0 = vec4(coverage);
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TextureEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_src_in(ConstColorProcessor_Stage2_c1_c0(vec4(1.0)), output_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage2 * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in float coverage;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+noperspective out float vcoverage_Stage0;
+void main() {
+ vec2 position = position;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ vcoverage_Stage0 = coverage;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/64-2.shader_test b/shaders/skia/64-2.shader_test
new file mode 100644
index 0000000..0433b9b
--- /dev/null
+++ b/shaders/skia/64-2.shader_test
@@ -0,0 +1,137 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uclamp_Stage1_c0_c0_c0_c0;
+uniform vec4 uclamp_Stage1_c0_c0_c1_c0;
+uniform vec4 uclamp_Stage1_c0_c0_c2_c0;
+uniform vec4 uclamp_Stage1_c0_c0_c3_c0;
+uniform mat4 um_Stage2;
+uniform vec4 uv_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+uniform sampler2D uTextureSampler_2_Stage1;
+uniform sampler2D uTextureSampler_3_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+noperspective in vec2 vTransformedCoords_3_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 inCoord = vTransformedCoords_0_Stage0;
+ vec2 subsetCoord;
+ subsetCoord.x = inCoord.x;
+ subsetCoord.y = inCoord.y;
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage1_c0_c0_c0_c0.x, uclamp_Stage1_c0_c0_c0_c0.z);
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage1_c0_c0_c0_c0.y, uclamp_Stage1_c0_c0_c0_c0.w);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ _output = _input * textureColor;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 inCoord = vTransformedCoords_1_Stage0;
+ vec2 subsetCoord;
+ subsetCoord.x = inCoord.x;
+ subsetCoord.y = inCoord.y;
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage1_c0_c0_c1_c0.x, uclamp_Stage1_c0_c0_c1_c0.z);
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage1_c0_c0_c1_c0.y, uclamp_Stage1_c0_c0_c1_c0.w);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ _output = _input * textureColor;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c0_c0_c2_c0(vec4 _input) {
+ vec4 _output;
+ vec2 inCoord = vTransformedCoords_2_Stage0;
+ vec2 subsetCoord;
+ subsetCoord.x = inCoord.x;
+ subsetCoord.y = inCoord.y;
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage1_c0_c0_c2_c0.x, uclamp_Stage1_c0_c0_c2_c0.z);
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage1_c0_c0_c2_c0.y, uclamp_Stage1_c0_c0_c2_c0.w);
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ _output = _input * textureColor;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c0_c0_c3_c0(vec4 _input) {
+ vec4 _output;
+ vec2 inCoord = vTransformedCoords_3_Stage0;
+ vec2 subsetCoord;
+ subsetCoord.x = inCoord.x;
+ subsetCoord.y = inCoord.y;
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage1_c0_c0_c3_c0.x, uclamp_Stage1_c0_c0_c3_c0.z);
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage1_c0_c0_c3_c0.y, uclamp_Stage1_c0_c0_c3_c0.w);
+ vec4 textureColor = texture(uTextureSampler_3_Stage1, clampedCoord);
+ _output = _input * textureColor;
+ return _output;
+}
+vec4 YUVtoRGBEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 planes[4];
+ planes[0] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0));
+ planes[1] = TextureEffect_Stage1_c0_c0_c1_c0(vec4(1.0));
+ planes[2] = TextureEffect_Stage1_c0_c0_c2_c0(vec4(1.0));
+ planes[3] = TextureEffect_Stage1_c0_c0_c3_c0(vec4(1.0));
+ vec4 color = vec4(planes[0].x, planes[1].x, planes[2].x, planes[3].w);
+ color.xyz *= color.w;
+ _output = color;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = YUVtoRGBEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ vec4 inputColor = output_Stage1;
+ {
+ float nonZeroAlpha = max(inputColor.w, 9.9999997473787516e-05);
+ inputColor = vec4(inputColor.xyz / nonZeroAlpha, inputColor.w);
+ }
+ output_Stage2 = um_Stage2 * inputColor + uv_Stage2;
+ {
+ output_Stage2 = clamp(output_Stage2, 0.0, 1.0);
+ }
+ {
+ output_Stage2.xyz *= output_Stage2.w;
+ }
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+uniform mat3 uCoordTransformMatrix_3_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+noperspective out vec2 vTransformedCoords_3_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_3_Stage0 = (uCoordTransformMatrix_3_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/64-21.shader_test b/shaders/skia/64-21.shader_test
new file mode 100644
index 0000000..3f14c59
--- /dev/null
+++ b/shaders/skia/64-21.shader_test
@@ -0,0 +1,66 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform vec2 uBounds_Stage1;
+uniform vec4 uKernel_Stage1[2];
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0 - 3.0 * uImageIncrement_Stage1;
+ vec2 coordSampled = vec2(0.0, 0.0);
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].z;
+ coord += uImageIncrement_Stage1;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/64-24.shader_test b/shaders/skia/64-24.shader_test
new file mode 100644
index 0000000..602514b
--- /dev/null
+++ b/shaders/skia/64-24.shader_test
@@ -0,0 +1,88 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform vec4 uKernel_Stage1[5];
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0 - 8.0 * uImageIncrement_Stage1;
+ vec2 coordSampled = vec2(0.0, 0.0);
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[4].x;
+ coord += uImageIncrement_Stage1;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/64-25.shader_test b/shaders/skia/64-25.shader_test
new file mode 100644
index 0000000..3e3b661
--- /dev/null
+++ b/shaders/skia/64-25.shader_test
@@ -0,0 +1,300 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform vec4 uKernel_Stage1[4];
+uniform vec2 uKernelOffset_Stage1;
+uniform float uGain_Stage1;
+uniform float uBias_Stage1;
+uniform vec4 uTexDom_Stage1;
+uniform vec3 uDecalParams_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ vec4 sum = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0 - uKernelOffset_Stage1 * uImageIncrement_Stage1;
+ vec4 c;
+ {
+ float k = uKernel_Stage1[0].x;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[0].y;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[0].z;
+ {
+ vec2 origCoord = coord + vec2(2.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[0].w;
+ {
+ vec2 origCoord = coord + vec2(3.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[1].x;
+ {
+ vec2 origCoord = coord + vec2(4.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[1].y;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[1].z;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[1].w;
+ {
+ vec2 origCoord = coord + vec2(2.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[2].x;
+ {
+ vec2 origCoord = coord + vec2(3.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[2].y;
+ {
+ vec2 origCoord = coord + vec2(4.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[2].z;
+ {
+ vec2 origCoord = coord + vec2(0.0, 2.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[2].w;
+ {
+ vec2 origCoord = coord + vec2(1.0, 2.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[3].x;
+ {
+ vec2 origCoord = coord + vec2(2.0, 2.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[3].y;
+ {
+ vec2 origCoord = coord + vec2(3.0, 2.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[3].z;
+ {
+ vec2 origCoord = coord + vec2(4.0, 2.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ output_Stage1 = sum * uGain_Stage1 + uBias_Stage1;
+ output_Stage1.w = clamp(output_Stage1.w, 0.0, 1.0);
+ output_Stage1.xyz = clamp(output_Stage1.xyz, 0.0, output_Stage1.w);
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/64-26.shader_test b/shaders/skia/64-26.shader_test
new file mode 100644
index 0000000..98d9341
--- /dev/null
+++ b/shaders/skia/64-26.shader_test
@@ -0,0 +1,85 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 uscale01_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias01_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale23_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias23_Stage1_c0_c0_c1_c0;
+uniform float uthreshold_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 DualIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthreshold_Stage1_c0_c0_c1_c0) {
+ scale = uscale01_Stage1_c0_c0_c1_c0;
+ bias = ubias01_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale23_Stage1_c0_c0_c1_c0;
+ bias = ubias23_Stage1_c0_c0_c1_c0;
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = DualIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_dst_in(outputColor_Stage0, ClampedGradientEffect_Stage1_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/64-27.shader_test b/shaders/skia/64-27.shader_test
new file mode 100644
index 0000000..d064c36
--- /dev/null
+++ b/shaders/skia/64-27.shader_test
@@ -0,0 +1,101 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 uscale01_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias01_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale23_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias23_Stage1_c0_c0_c1_c0;
+uniform float uthreshold_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 DualIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthreshold_Stage1_c0_c0_c1_c0) {
+ scale = uscale01_Stage1_c0_c0_c1_c0;
+ bias = ubias01_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale23_Stage1_c0_c0_c1_c0;
+ bias = ubias23_Stage1_c0_c0_c1_c0;
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = DualIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_dst_in(outputColor_Stage0, ClampedGradientEffect_Stage1_c0_c0(vec4(1.0)));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_1_Stage0.x);
+ uint y = uint(vTransformedCoords_1_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ output_Stage2 = vec4(clamp(output_Stage2.xyz + value * 0.0039215688593685627, 0.0, output_Stage2.w), output_Stage2.w);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/64-28.shader_test b/shaders/skia/64-28.shader_test
new file mode 100644
index 0000000..9675a47
--- /dev/null
+++ b/shaders/skia/64-28.shader_test
@@ -0,0 +1,79 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 TextureEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = TextureEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = OverrideInputFragmentProcessor_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+float _guarded_divide(float n, float d) {
+ return n / d;
+}
+float _color_burn_component(float sc, float sa, float dc, float da) {
+ if (da == dc) {
+ return (sa * da + sc * (1.0 - da)) + dc * (1.0 - sa);
+ } else if (sc == 0.0) {
+ return dc * (1.0 - sa);
+ }
+ float d = max(0.0, da - _guarded_divide((da - dc) * sa, sc));
+ return (d * sa + sc * (1.0 - da)) + dc * (1.0 - sa);
+}
+vec4 blend_color_burn(vec4 src, vec4 dst) {
+ return vec4(_color_burn_component(src.x, src.w, dst.x, dst.w), _color_burn_component(src.y, src.w, dst.y, dst.w), _color_burn_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_color_burn(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec2 inLocalCoord;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 color = inColor;
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/64-30.shader_test b/shaders/skia/64-30.shader_test
new file mode 100644
index 0000000..3c83465
--- /dev/null
+++ b/shaders/skia/64-30.shader_test
@@ -0,0 +1,127 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 uleftBorderColor_Stage1_c1_c0_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c1_c0_c0_c0;
+uniform vec4 ustart_Stage1_c1_c0_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c1_c0_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+vec4 ComposeOne_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_dst_in(_input, ClampedGradientEffect_Stage1_c0_c0_c0_c0(vec4(1.0)));
+ return _output;
+}
+vec4 LinearGradientLayout_Stage1_c1_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_1_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c1_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c1_c0_c0_c0_c1_c0 + t * uend_Stage1_c1_c0_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c1_c0_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c1_c0_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c1_c0_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c1_c0_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 ComposeOne_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_dst_in(_input, ClampedGradientEffect_Stage1_c1_c0_c0_c0(vec4(1.0)));
+ return _output;
+}
+vec4 blend_dst_atop(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src + src.w * dst;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_dst_atop(ComposeOne_Stage1_c0_c0(inputColor), ComposeOne_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/64-31.shader_test b/shaders/skia/64-31.shader_test
new file mode 100644
index 0000000..26222f1
--- /dev/null
+++ b/shaders/skia/64-31.shader_test
@@ -0,0 +1,132 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uCoordTransformMatrix_2_Stage0;
+uniform vec4 ustart_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 uclamp_Stage1_c1_c0_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec4 vcolor_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c0_c0_c1_c0;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+vec4 ComposeOne_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_dst_in(_input, TiledGradientEffect_Stage1_c0_c0_c0_c0(vec4(1.0)));
+ return _output;
+}
+vec4 TextureEffect_Stage1_c1_c0_c0_c0(vec4 _input, vec2 _coords) {
+ _coords = _coords * uCoordTransformMatrix_2_Stage0.xz + uCoordTransformMatrix_2_Stage0.yw;
+ vec4 _output;
+ vec2 inCoord = _coords;
+ vec2 subsetCoord;
+ subsetCoord.x = inCoord.x;
+ subsetCoord.y = inCoord.y;
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage1_c1_c0_c0_c0.x, uclamp_Stage1_c1_c0_c0_c0.z);
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage1_c1_c0_c0_c0.y, uclamp_Stage1_c1_c0_c0_c0.w);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ _output = _input * textureColor;
+ return _output;
+}
+vec4 Bicubic_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coord = vTransformedCoords_1_Stage0 - vec2(0.5);
+ vec2 f = fract(coord);
+ coord += 0.5 - f;
+ vec4 wx = mat4(0.055555555555555552, 0.88888888888888884, 0.055555555555555552, 0.0, -0.5, 0.0, 0.5, 0.0, 0.83333333333333337, -2.0, 1.5, -0.33333333333333331, -0.3888888888888889, 1.1666666666666667, -1.1666666666666667, 0.3888888888888889) * vec4(1.0, f.x, f.x * f.x, (f.x * f.x) * f.x);
+ vec4 wy = mat4(0.055555555555555552, 0.88888888888888884, 0.055555555555555552, 0.0, -0.5, 0.0, 0.5, 0.0, 0.83333333333333337, -2.0, 1.5, -0.33333333333333331, -0.3888888888888889, 1.1666666666666667, -1.1666666666666667, 0.3888888888888889) * vec4(1.0, f.y, f.y * f.y, (f.y * f.y) * f.y);
+ vec4 rowColors[4];
+ rowColors[0] = TextureEffect_Stage1_c1_c0_c0_c0(vec4(1.0), coord + vec2(-1.0, -1.0));
+ rowColors[1] = TextureEffect_Stage1_c1_c0_c0_c0(vec4(1.0), coord + vec2(0.0, -1.0));
+ rowColors[2] = TextureEffect_Stage1_c1_c0_c0_c0(vec4(1.0), coord + vec2(1.0, -1.0));
+ rowColors[3] = TextureEffect_Stage1_c1_c0_c0_c0(vec4(1.0), coord + vec2(2.0, -1.0));
+ vec4 s0 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ rowColors[0] = TextureEffect_Stage1_c1_c0_c0_c0(vec4(1.0), coord + vec2(-1.0, 0.0));
+ rowColors[1] = TextureEffect_Stage1_c1_c0_c0_c0(vec4(1.0), coord);
+ rowColors[2] = TextureEffect_Stage1_c1_c0_c0_c0(vec4(1.0), coord + vec2(1.0, 0.0));
+ rowColors[3] = TextureEffect_Stage1_c1_c0_c0_c0(vec4(1.0), coord + vec2(2.0, 0.0));
+ vec4 s1 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ rowColors[0] = TextureEffect_Stage1_c1_c0_c0_c0(vec4(1.0), coord + vec2(-1.0, 1.0));
+ rowColors[1] = TextureEffect_Stage1_c1_c0_c0_c0(vec4(1.0), coord + vec2(0.0, 1.0));
+ rowColors[2] = TextureEffect_Stage1_c1_c0_c0_c0(vec4(1.0), coord + vec2(1.0, 1.0));
+ rowColors[3] = TextureEffect_Stage1_c1_c0_c0_c0(vec4(1.0), coord + vec2(2.0, 1.0));
+ vec4 s2 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ rowColors[0] = TextureEffect_Stage1_c1_c0_c0_c0(vec4(1.0), coord + vec2(-1.0, 2.0));
+ rowColors[1] = TextureEffect_Stage1_c1_c0_c0_c0(vec4(1.0), coord + vec2(0.0, 2.0));
+ rowColors[2] = TextureEffect_Stage1_c1_c0_c0_c0(vec4(1.0), coord + vec2(1.0, 2.0));
+ rowColors[3] = TextureEffect_Stage1_c1_c0_c0_c0(vec4(1.0), coord + vec2(2.0, 2.0));
+ vec4 s3 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ vec4 bicubicColor = ((wy.x * s0 + wy.y * s1) + wy.z * s2) + wy.w * s3;
+ bicubicColor.xyz = max(vec3(0.0), min(bicubicColor.xyz, bicubicColor.www));
+ _output = bicubicColor * _input;
+ return _output;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = Bicubic_Stage1_c1_c0(ComposeOne_Stage1_c0_c0(outputColor_Stage0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/64-33.shader_test b/shaders/skia/64-33.shader_test
new file mode 100644
index 0000000..acb5796
--- /dev/null
+++ b/shaders/skia/64-33.shader_test
@@ -0,0 +1,46 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform sampler2D uTextureSampler_0_Stage0;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vlocalCoord_Stage0;
+flat in vec4 vtexDomain_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ vec2 texCoord;
+ texCoord = vlocalCoord_Stage0;
+ vec4 domain;
+ domain = vtexDomain_Stage0;
+ texCoord = clamp(texCoord, domain.xy, domain.zw);
+ outputColor_Stage0 = texture(uTextureSampler_0_Stage0, texCoord) * outputColor_Stage0;
+ }
+ {
+ sk_FragColor = outputColor_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+in vec4 texDomain;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vlocalCoord_Stage0;
+flat out vec4 vtexDomain_Stage0;
+void main() {
+ vcolor_Stage0 = color;
+ vlocalCoord_Stage0 = localCoord;
+ vtexDomain_Stage0 = texDomain;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/64-35.shader_test b/shaders/skia/64-35.shader_test
new file mode 100644
index 0000000..8ebe621
--- /dev/null
+++ b/shaders/skia/64-35.shader_test
@@ -0,0 +1,50 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform sampler2D uTextureSampler_0_Stage0;
+noperspective in vec2 vlocalCoord_Stage0;
+flat in vec4 vtexDomain_Stage0;
+noperspective in float vcoverage_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vec4(1.0);
+ vec2 texCoord;
+ texCoord = vlocalCoord_Stage0;
+ vec4 domain;
+ domain = vtexDomain_Stage0;
+ texCoord = clamp(texCoord, domain.xy, domain.zw);
+ outputColor_Stage0 = texture(uTextureSampler_0_Stage0, texCoord);
+ float coverage = vcoverage_Stage0;
+ outputCoverage_Stage0 = vec4(coverage);
+ }
+ {
+ sk_FragColor = outputColor_Stage0 * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 position;
+in float coverage;
+in vec2 localCoord;
+in vec4 texDomain;
+noperspective out vec2 vlocalCoord_Stage0;
+flat out vec4 vtexDomain_Stage0;
+noperspective out float vcoverage_Stage0;
+void main() {
+ vec2 position = position;
+ vlocalCoord_Stage0 = localCoord;
+ vtexDomain_Stage0 = texDomain;
+ vcoverage_Stage0 = coverage;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/64-39.shader_test b/shaders/skia/64-39.shader_test
new file mode 100644
index 0000000..2a33bab
--- /dev/null
+++ b/shaders/skia/64-39.shader_test
@@ -0,0 +1,169 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uColor_Stage0;
+uniform float uinnerThreshold_Stage1;
+uniform float uouterThreshold_Stage1;
+uniform vec4 uinnerRect_Stage2;
+uniform vec2 uradiusPlusHalf_Stage2;
+uniform vec2 ubaseFrequency_Stage3_c0_c0;
+uniform vec2 ustitchData_Stage3_c0_c0;
+uniform vec4 urectUniform_Stage4;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage3;
+uniform sampler2D uTextureSampler_1_Stage3;
+noperspective in vec3 vDashParams_Stage0;
+noperspective in vec4 vRectParams_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+float perlinnoise_Stage3_c0_c0(float chanCoord, vec2 noiseVec, vec2 stitchData) {
+ vec4 floorVal;
+ floorVal.xy = floor(noiseVec);
+ floorVal.zw = floorVal.xy + vec2(1.0);
+ vec2 fractVal = fract(noiseVec);
+ vec2 noiseSmooth = (fractVal * fractVal) * (vec2(3.0) - vec2(2.0) * fractVal);
+ if (floorVal.x >= stitchData.x) {
+ floorVal.x -= stitchData.x;
+ }
+ if (floorVal.y >= stitchData.y) {
+ floorVal.y -= stitchData.y;
+ }
+ if (floorVal.z >= stitchData.x) {
+ floorVal.z -= stitchData.x;
+ }
+ if (floorVal.w >= stitchData.y) {
+ floorVal.w -= stitchData.y;
+ }
+ floorVal = fract(floor(mod(floorVal, 256.0)) / vec4(256.0));
+ vec2 latticeIdx;
+ latticeIdx.x = texture(uTextureSampler_0_Stage3, vec2(floorVal.x, 0.5)).x;
+ latticeIdx.y = texture(uTextureSampler_0_Stage3, vec2(floorVal.z, 0.5)).x;
+ vec4 bcoords = fract(latticeIdx.xyxy + floorVal.yyww);
+ vec2 uv;
+ vec4 lattice = texture(uTextureSampler_1_Stage3, vec2(bcoords.x, chanCoord)).zyxw;
+ uv.x = dot((lattice.yw + lattice.xz * vec2(0.00390625)) * vec2(2.0) - vec2(1.0), fractVal);
+ fractVal.x -= 1.0;
+ lattice = texture(uTextureSampler_1_Stage3, vec2(bcoords.y, chanCoord)).zyxw;
+ uv.y = dot((lattice.yw + lattice.xz * vec2(0.00390625)) * vec2(2.0) - vec2(1.0), fractVal);
+ vec2 ab;
+ ab.x = mix(uv.x, uv.y, noiseSmooth.x);
+ fractVal.y -= 1.0;
+ lattice = texture(uTextureSampler_1_Stage3, vec2(bcoords.w, chanCoord)).zyxw;
+ uv.y = dot((lattice.yw + lattice.xz * vec2(0.00390625)) * vec2(2.0) - vec2(1.0), fractVal);
+ fractVal.x += 1.0;
+ lattice = texture(uTextureSampler_1_Stage3, vec2(bcoords.z, chanCoord)).zyxw;
+ uv.x = dot((lattice.yw + lattice.xz * vec2(0.00390625)) * vec2(2.0) - vec2(1.0), fractVal);
+ ab.y = mix(uv.x, uv.y, noiseSmooth.x);
+ return mix(ab.x, ab.y, noiseSmooth.y);
+}
+vec4 PerlinNoise_Stage3_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 noiseVec = floor(vTransformedCoords_1_Stage0) * ubaseFrequency_Stage3_c0_c0;
+ _output = vec4(0.0);
+ vec2 stitchData = ustitchData_Stage3_c0_c0;
+ float ratio = 1.0;
+ for (int octave = 0;octave < 3; ++octave) {
+ _output += abs(vec4(perlinnoise_Stage3_c0_c0(0.125, noiseVec, stitchData), perlinnoise_Stage3_c0_c0(0.375, noiseVec, stitchData), perlinnoise_Stage3_c0_c0(0.625, noiseVec, stitchData), perlinnoise_Stage3_c0_c0(0.875, noiseVec, stitchData))) * ratio;
+ noiseVec *= vec2(2.0);
+ ratio *= 0.5;
+ stitchData *= vec2(2.0);
+ }
+ _output = clamp(_output, 0.0, 1.0);
+ _output = vec4(_output.xyz * _output.www, _output.w);
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = uColor_Stage0;
+ float xShifted = vDashParams_Stage0.x - floor(vDashParams_Stage0.x / vDashParams_Stage0.z) * vDashParams_Stage0.z;
+ vec2 fragPosShifted = vec2(xShifted, vDashParams_Stage0.y);
+ float xSub, ySub;
+ xSub = min(fragPosShifted.x - vRectParams_Stage0.x, 0.0);
+ xSub += min(vRectParams_Stage0.z - fragPosShifted.x, 0.0);
+ ySub = min(fragPosShifted.y - vRectParams_Stage0.y, 0.0);
+ ySub += min(vRectParams_Stage0.w - fragPosShifted.y, 0.0);
+ float alpha = (1.0 + max(xSub, -1.0)) * (1.0 + max(ySub, -1.0));
+ outputCoverage_Stage0 = vec4(alpha);
+ }
+ vec4 output_Stage1;
+ {
+ vec4 color = outputCoverage_Stage0;
+ vec4 mask_color = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ if (mask_color.w < 0.5) {
+ if (color.w > uouterThreshold_Stage1) {
+ float scale = uouterThreshold_Stage1 / color.w;
+ color.xyz *= scale;
+ color.w = uouterThreshold_Stage1;
+ }
+ } else if (color.w < uinnerThreshold_Stage1) {
+ float scale = uinnerThreshold_Stage1 / max(0.0010000000474974513, color.w);
+ color.xyz *= scale;
+ color.w = uinnerThreshold_Stage1;
+ }
+ output_Stage1 = color;
+ }
+ vec4 output_Stage2;
+ {
+ vec2 dxy0 = uinnerRect_Stage2.xy - gl_FragCoord.xy;
+ vec2 dxy1 = gl_FragCoord.xy - uinnerRect_Stage2.zw;
+ vec2 dxy = max(max(dxy0, dxy1), 0.0);
+ float alpha = clamp(uradiusPlusHalf_Stage2.x - length(dxy), 0.0, 1.0);
+ output_Stage2 = output_Stage1 * alpha;
+ }
+ vec4 output_Stage3;
+ {
+ output_Stage3 = blend_dst_in(output_Stage2, PerlinNoise_Stage3_c0_c0(vec4(1.0)));
+ }
+ vec4 output_Stage4;
+ {
+ float alpha;
+ {
+ alpha = float(all(greaterThan(vec4(gl_FragCoord.xy, urectUniform_Stage4.zw), vec4(urectUniform_Stage4.xy, gl_FragCoord.xy))) ? 1 : 0);
+ }
+ {
+ alpha = 1.0 - alpha;
+ }
+ output_Stage4 = output_Stage3 * alpha;
+ }
+ {
+ sk_FragColor = outputColor_Stage0 * output_Stage4;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 inPosition;
+in vec3 inDashParams;
+in vec4 inRect;
+noperspective out vec3 vDashParams_Stage0;
+noperspective out vec4 vRectParams_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vDashParams_Stage0 = inDashParams;
+ vRectParams_Stage0 = inRect;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/64-40.shader_test b/shaders/skia/64-40.shader_test
new file mode 100644
index 0000000..c188711
--- /dev/null
+++ b/shaders/skia/64-40.shader_test
@@ -0,0 +1,201 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage2;
+uniform float uSurfaceScale_Stage2;
+uniform vec3 uLightColor_Stage2;
+uniform float uKD_Stage2;
+uniform vec4 uTexDom_Stage2;
+uniform vec3 uDecalParams_Stage2;
+uniform vec3 uLightDirection_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 light_Stage2(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ float colorScale = uKD_Stage2 * dot(normal, surfaceToLight);
+ return vec4(lightColor * clamp(colorScale, 0.0, 1.0), 1.0);
+}
+float sobel_Stage2(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage2(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage2(float m[9], float surfaceScale) {
+ return pointToNormal_Stage2(sobel_Stage2(0.0, 0.0, m[4], m[5], m[7], m[8], 0.66666698455810547), sobel_Stage2(0.0, 0.0, m[4], m[7], m[5], m[8], 0.66666698455810547), surfaceScale);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ vec2 coord = vTransformedCoords_1_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp0 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp5 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp6 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp7 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp8 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = uLightDirection_Stage2;
+ output_Stage2 = light_Stage2(normal_Stage2(m, uSurfaceScale_Stage2), surfaceToLight, uLightColor_Stage2);
+ output_Stage2 *= output_Stage1;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/64-41.shader_test b/shaders/skia/64-41.shader_test
new file mode 100644
index 0000000..060f040
--- /dev/null
+++ b/shaders/skia/64-41.shader_test
@@ -0,0 +1,76 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uCoordTransformMatrix_2_Stage0;
+uniform vec4 usubset_Stage2_c0_c0;
+uniform vec4 uclamp_Stage2_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 TextureEffect_Stage2_c0_c0(vec4 _input, vec2 _coords) {
+ _coords = _coords * uCoordTransformMatrix_2_Stage0.xz + uCoordTransformMatrix_2_Stage0.yw;
+ vec4 _output;
+ vec2 inCoord = _coords;
+ vec2 subsetCoord;
+ subsetCoord.x = inCoord.x;
+ {
+ float w = usubset_Stage2_c0_c0.w - usubset_Stage2_c0_c0.y;
+ float w2 = 2.0 * w;
+ float m = mod(inCoord.y - usubset_Stage2_c0_c0.y, w2);
+ subsetCoord.y = mix(m, w2 - m, step(w, m)) + usubset_Stage2_c0_c0.y;
+ }
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage2_c0_c0.x, uclamp_Stage2_c0_c0.z);
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage2_c0_c0.y, uclamp_Stage2_c0_c0.w);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ _output = _input * textureColor;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ float coord = vTransformedCoords_1_Stage0.y - 0.5;
+ float f = fract(coord);
+ coord += 0.5 - f;
+ float f2 = f * f;
+ vec4 w = mat4(0.055555555555555552, 0.88888888888888884, 0.055555555555555552, 0.0, -0.5, 0.0, 0.5, 0.0, 0.83333333333333337, -2.0, 1.5, -0.33333333333333331, -0.3888888888888889, 1.1666666666666667, -1.1666666666666667, 0.3888888888888889) * vec4(1.0, f, f2, f2 * f);
+ vec4 c[4];
+ c[0] = TextureEffect_Stage2_c0_c0(vec4(1.0), vec2(vTransformedCoords_1_Stage0.x, coord + -1.0));
+ c[1] = TextureEffect_Stage2_c0_c0(vec4(1.0), vec2(vTransformedCoords_1_Stage0.x, coord));
+ c[2] = TextureEffect_Stage2_c0_c0(vec4(1.0), vec2(vTransformedCoords_1_Stage0.x, coord + 1.0));
+ c[3] = TextureEffect_Stage2_c0_c0(vec4(1.0), vec2(vTransformedCoords_1_Stage0.x, coord + 2.0));
+ vec4 bicubicColor = ((c[0] * w.x + c[1] * w.y) + c[2] * w.z) + c[3] * w.w;
+ bicubicColor.xyz = max(vec3(0.0), min(bicubicColor.xyz, bicubicColor.www));
+ output_Stage2 = bicubicColor * output_Stage1;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/64-5.shader_test b/shaders/skia/64-5.shader_test
new file mode 100644
index 0000000..d634c39
--- /dev/null
+++ b/shaders/skia/64-5.shader_test
@@ -0,0 +1,103 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uColor_Stage0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale8_9_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale10_11_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias8_9_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias10_11_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.w) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c1_c0;
+ }
+ }
+ } else {
+ {
+ if (t < uthresholds9_13_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale8_9_Stage1_c0_c0_c1_c0;
+ bias = ubias8_9_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale10_11_Stage1_c0_c0_c1_c0;
+ bias = ubias10_11_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TiledGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 inLocalCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec2 pos2 = position;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/64-7.shader_test b/shaders/skia/64-7.shader_test
new file mode 100644
index 0000000..340daf2
--- /dev/null
+++ b/shaders/skia/64-7.shader_test
@@ -0,0 +1,49 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uColor_Stage0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in float vinCoverage_Stage0;
+vec4 TextureEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ float alpha = 1.0;
+ alpha = vinCoverage_Stage0;
+ outputCoverage_Stage0 = vec4(alpha);
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TextureEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1 * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in float inCoverage;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out float vinCoverage_Stage0;
+void main() {
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ vinCoverage_Stage0 = inCoverage;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/64-8.shader_test b/shaders/skia/64-8.shader_test
new file mode 100644
index 0000000..6d1d0b2
--- /dev/null
+++ b/shaders/skia/64-8.shader_test
@@ -0,0 +1,105 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec2 uDstTextureUpperLeft_Stage1;
+uniform vec2 uDstTextureCoordScale_Stage1;
+uniform sampler2D uDstTextureSampler_Stage1;
+flat in vec4 vcolor_Stage0;
+noperspective in vec2 varccoord_Stage0;
+vec4 blend_src(vec4 src, vec4 dst) {
+ return src;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ float x_plus_1 = varccoord_Stage0.x, y = varccoord_Stage0.y;
+ float coverage;
+ if (0.0 == x_plus_1) {
+ coverage = y;
+ } else {
+ float fn = x_plus_1 * (x_plus_1 - 2.0);
+ fn = ((y) * (y) + (fn));
+ float fnwidth = fwidth(fn);
+ float d = fn / fnwidth;
+ coverage = clamp(0.5 - d, 0.0, 1.0);
+ }
+ outputCoverage_Stage0 = vec4(coverage);
+ }
+ {
+ if (all(lessThanEqual(outputCoverage_Stage0.xyz, vec3(0.0)))) {
+ discard;
+ }
+ vec2 _dstTexCoord = (gl_FragCoord.xy - uDstTextureUpperLeft_Stage1) * uDstTextureCoordScale_Stage1;
+ _dstTexCoord.y = 1.0 - _dstTexCoord.y;
+ vec4 _dstColor = texture(uDstTextureSampler_Stage1, _dstTexCoord);
+ sk_FragColor = blend_src(outputColor_Stage0, _dstColor);
+ sk_FragColor = outputCoverage_Stage0 * sk_FragColor + (vec4(1.0) - outputCoverage_Stage0) * _dstColor;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec4 radii_selector;
+in vec4 corner_and_radius_outsets;
+in vec4 aa_bloat_and_coverage;
+in vec4 skew;
+in vec2 translate;
+in vec4 radii_x;
+in vec4 radii_y;
+in vec4 color;
+flat out vec4 vcolor_Stage0;
+noperspective out vec2 varccoord_Stage0;
+void main() {
+ vcolor_Stage0 = color;
+ vec2 corner = corner_and_radius_outsets.xy;
+ vec2 radius_outset = corner_and_radius_outsets.zw;
+ vec2 aa_bloat_direction = aa_bloat_and_coverage.xy;
+ float coverage = aa_bloat_and_coverage.z;
+ float is_linear_coverage = aa_bloat_and_coverage.w;
+ vec2 pixellength = inversesqrt(vec2(dot(skew.xz, skew.xz), dot(skew.yw, skew.yw)));
+ vec4 normalized_axis_dirs = skew * pixellength.xyxy;
+ vec2 axiswidths = abs(normalized_axis_dirs.xy) + abs(normalized_axis_dirs.zw);
+ vec2 aa_bloatradius = (axiswidths * pixellength) * 0.5;
+ vec4 radii_and_neighbors = radii_selector * mat4(radii_x, radii_y, radii_x.yxwz, radii_y.wzyx);
+ vec2 radii = radii_and_neighbors.xy;
+ vec2 neighbor_radii = radii_and_neighbors.zw;
+ if (any(greaterThan(aa_bloatradius, vec2(1.0)))) {
+ corner = max(abs(corner), aa_bloatradius) * sign(corner);
+ coverage /= max(aa_bloatradius.x, 1.0) * max(aa_bloatradius.y, 1.0);
+ radii = vec2(0.0);
+ }
+ if (any(lessThan(radii, aa_bloatradius * 1.25))) {
+ radii = aa_bloatradius;
+ radius_outset = floor(abs(radius_outset)) * radius_outset;
+ is_linear_coverage = 1.0;
+ } else {
+ radii = clamp(radii, pixellength, 2.0 - pixellength);
+ neighbor_radii = clamp(neighbor_radii, pixellength, 2.0 - pixellength);
+ vec2 spacing = (2.0 - radii) - neighbor_radii;
+ vec2 extra_pad = max(pixellength * 0.0625 - spacing, vec2(0.0));
+ radii -= extra_pad * 0.5;
+ }
+ vec2 aa_outset = aa_bloat_direction * aa_bloatradius;
+ vec2 vertexpos = (corner + radius_outset * radii) + aa_outset;
+ mat2 skewmatrix = mat2(skew.xy, skew.zw);
+ vec2 devcoord = vertexpos * skewmatrix + translate;
+ if (0.0 != is_linear_coverage) {
+ varccoord_Stage0.xy = vec2(0.0, coverage);
+ } else {
+ vec2 arccoord = (1.0 - abs(radius_outset)) + (aa_outset / radii) * corner;
+ varccoord_Stage0.xy = vec2(arccoord.x + 1.0, arccoord.y);
+ }
+ gl_Position = vec4(devcoord.x, devcoord.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/64-9.shader_test b/shaders/skia/64-9.shader_test
new file mode 100644
index 0000000..85dff2e
--- /dev/null
+++ b/shaders/skia/64-9.shader_test
@@ -0,0 +1,50 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uellipse_Stage1;
+flat in vec4 vcolor_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec2 d = gl_FragCoord.xy - uellipse_Stage1.xy;
+ vec2 Z = d * uellipse_Stage1.zw;
+ float implicit = dot(Z, d) - 1.0;
+ float grad_dot = 4.0 * dot(Z, Z);
+ {
+ grad_dot = max(grad_dot, 1.1754999560161448e-38);
+ }
+ float approx_dist = implicit * inversesqrt(grad_dot);
+ float alpha;
+ {
+ alpha = clamp(0.5 + approx_dist, 0.0, 1.0);
+ }
+ output_Stage1 = vec4(alpha);
+ }
+ {
+ sk_FragColor = outputColor_Stage0 * output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 position;
+in vec4 color;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/64.shader_test b/shaders/skia/64.shader_test
new file mode 100644
index 0000000..3c21c95
--- /dev/null
+++ b/shaders/skia/64.shader_test
@@ -0,0 +1,57 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 usubset_Stage1_c0_c0;
+uniform vec4 uclamp_Stage1_c0_c0;
+uniform sampler2DRect uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 inCoord = vTransformedCoords_0_Stage0;
+ vec2 subsetCoord;
+ subsetCoord.x = mod(inCoord.x - usubset_Stage1_c0_c0.x, usubset_Stage1_c0_c0.z - usubset_Stage1_c0_c0.x) + usubset_Stage1_c0_c0.x;
+ subsetCoord.y = inCoord.y;
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage1_c0_c0.x, uclamp_Stage1_c0_c0.z);
+ clampedCoord.y = subsetCoord.y;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float errX = subsetCoord.x - clampedCoord.x;
+ float repeatCoordX = errX > 0.0 ? uclamp_Stage1_c0_c0.x : uclamp_Stage1_c0_c0.z;
+ if (errX != 0.0) {
+ textureColor = mix(textureColor, texture(uTextureSampler_0_Stage1, vec2(repeatCoordX, clampedCoord.y)), abs(errX));
+ }
+ _output = _input * textureColor;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TextureEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/640-3.shader_test b/shaders/skia/640-3.shader_test
new file mode 100644
index 0000000..9751340
--- /dev/null
+++ b/shaders/skia/640-3.shader_test
@@ -0,0 +1,62 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 TextureEffect_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage2, vTransformedCoords_1_Stage0) * _input;
+ return _output;
+}
+float _guarded_divide(float n, float d) {
+ return n / d;
+}
+float _color_burn_component(float sc, float sa, float dc, float da) {
+ if (da == dc) {
+ return (sa * da + sc * (1.0 - da)) + dc * (1.0 - sa);
+ } else if (sc == 0.0) {
+ return dc * (1.0 - sa);
+ }
+ float d = max(0.0, da - _guarded_divide((da - dc) * sa, sc));
+ return (d * sa + sc * (1.0 - da)) + dc * (1.0 - sa);
+}
+vec4 blend_color_burn(vec4 src, vec4 dst) {
+ return vec4(_color_burn_component(src.x, src.w, dst.x, dst.w), _color_burn_component(src.y, src.w, dst.y, dst.w), _color_burn_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_color_burn(TextureEffect_Stage2_c0_c0(vec4(1.0)), output_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/640.shader_test b/shaders/skia/640.shader_test
new file mode 100644
index 0000000..f523bb2
--- /dev/null
+++ b/shaders/skia/640.shader_test
@@ -0,0 +1,192 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage2;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.w) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ } else {
+ {
+ if (t < uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+vec4 ComposeOne_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_dst_in(_input, TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0)));
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = ComposeOne_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+float _blend_color_saturation(vec3 color) {
+ return max(max(color.x, color.y), color.z) - min(min(color.x, color.y), color.z);
+}
+vec3 _blend_set_color_saturation_helper(vec3 minMidMax, float sat) {
+ if (minMidMax.x < minMidMax.z) {
+ return vec3(0.0, (sat * (minMidMax.y - minMidMax.x)) / (minMidMax.z - minMidMax.x), sat);
+ }
+ return vec3(0.0);
+}
+vec3 _blend_set_color_saturation(vec3 hueLumColor, vec3 satColor) {
+ float sat = _blend_color_saturation(satColor);
+ if (hueLumColor.x <= hueLumColor.y) {
+ if (hueLumColor.y <= hueLumColor.z) {
+ hueLumColor.xyz = _blend_set_color_saturation_helper(hueLumColor, sat);
+ } else if (hueLumColor.x <= hueLumColor.z) {
+ hueLumColor.xzy = _blend_set_color_saturation_helper(hueLumColor.xzy, sat);
+ } else {
+ hueLumColor.zxy = _blend_set_color_saturation_helper(hueLumColor.zxy, sat);
+ }
+ } else if (hueLumColor.x <= hueLumColor.z) {
+ hueLumColor.yxz = _blend_set_color_saturation_helper(hueLumColor.yxz, sat);
+ } else if (hueLumColor.y <= hueLumColor.z) {
+ hueLumColor.yzx = _blend_set_color_saturation_helper(hueLumColor.yzx, sat);
+ } else {
+ hueLumColor.zyx = _blend_set_color_saturation_helper(hueLumColor.zyx, sat);
+ }
+ return hueLumColor;
+}
+float _blend_color_luminance(vec3 color) {
+ return dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), color);
+}
+vec3 _blend_set_color_luminance(vec3 hueSatColor, float alpha, vec3 lumColor) {
+ float lum = _blend_color_luminance(lumColor);
+ vec3 result = (lum - _blend_color_luminance(hueSatColor)) + hueSatColor;
+ float minComp = min(min(result.x, result.y), result.z);
+ float maxComp = max(max(result.x, result.y), result.z);
+ if (minComp < 0.0 && lum != minComp) {
+ result = lum + ((result - lum) * lum) / (lum - minComp);
+ }
+ if (maxComp > alpha && maxComp != lum) {
+ return lum + ((result - lum) * (alpha - lum)) / (maxComp - lum);
+ }
+ return result;
+}
+vec4 blend_saturation(vec4 src, vec4 dst) {
+ float alpha = dst.w * src.w;
+ vec3 sda = src.xyz * dst.w;
+ vec3 dsa = dst.xyz * src.w;
+ return vec4((((_blend_set_color_luminance(_blend_set_color_saturation(dsa, sda), alpha, dsa) + dst.xyz) - dsa) + src.xyz) - sda, (src.w + dst.w) - alpha);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_saturation(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ {
+ output_Stage2 = output_Stage1 * ucolor_Stage2;
+ }
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 inColor;
+in vec2 inLocalCoord;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/643-2.shader_test b/shaders/skia/643-2.shader_test
new file mode 100644
index 0000000..953c2cb
--- /dev/null
+++ b/shaders/skia/643-2.shader_test
@@ -0,0 +1,127 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform float uinnerThreshold_Stage2;
+uniform float uouterThreshold_Stage2;
+uniform vec4 uinnerRect_Stage5;
+uniform vec4 uinvRadiiLTRB_Stage5;
+uniform vec2 uDstTextureUpperLeft_Stage6;
+uniform vec2 uDstTextureCoordScale_Stage6;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+uniform sampler2D uTextureSampler_0_Stage3;
+uniform sampler2D uDstTextureSampler_Stage6;
+noperspective in vec2 vEllipseOffsets_Stage0;
+noperspective in vec4 vEllipseRadii_Stage0;
+noperspective in vec4 vinColor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+vec4 blend_src(vec4 src, vec4 dst) {
+ return src;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vinColor_Stage0;
+ vec2 offset = vEllipseOffsets_Stage0;
+ float test = dot(offset, offset) - 1.0;
+ vec2 grad = (2.0 * offset) * vEllipseRadii_Stage0.xy;
+ float grad_dot = dot(grad, grad);
+ grad_dot = max(grad_dot, 1.1754999560161448e-38);
+ float invlen = inversesqrt(grad_dot);
+ float edgeAlpha = clamp(0.5 - test * invlen, 0.0, 1.0);
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * outputColor_Stage0;
+ }
+ vec4 output_Stage2;
+ {
+ vec4 color = output_Stage1;
+ vec4 mask_color = texture(uTextureSampler_0_Stage2, vTransformedCoords_1_Stage0);
+ if (mask_color.w < 0.5) {
+ if (color.w > uouterThreshold_Stage2) {
+ float scale = uouterThreshold_Stage2 / color.w;
+ color.xyz *= scale;
+ color.w = uouterThreshold_Stage2;
+ }
+ } else if (color.w < uinnerThreshold_Stage2) {
+ float scale = uinnerThreshold_Stage2 / max(0.0010000000474974513, color.w);
+ color.xyz *= scale;
+ color.w = uinnerThreshold_Stage2;
+ }
+ output_Stage2 = color;
+ }
+ vec4 output_Stage3;
+ {
+ output_Stage3 = texture(uTextureSampler_0_Stage3, vTransformedCoords_2_Stage0) * output_Stage2;
+ }
+ vec4 output_Stage4;
+ {
+ {
+ output_Stage4 = clamp(outputCoverage_Stage0, 0.0, 1.0);
+ }
+ }
+ vec4 output_Stage5;
+ {
+ vec2 dxy0 = uinnerRect_Stage5.xy - gl_FragCoord.xy;
+ vec2 dxy1 = gl_FragCoord.xy - uinnerRect_Stage5.zw;
+ vec2 dxy = max(max(dxy0, dxy1), 0.0);
+ vec2 Z = max(max(dxy0 * uinvRadiiLTRB_Stage5.xy, dxy1 * uinvRadiiLTRB_Stage5.zw), 0.0);
+ float implicit = dot(Z, dxy) - 1.0;
+ float grad_dot = 4.0 * dot(Z, Z);
+ grad_dot = max(grad_dot, 9.9999997473787516e-05);
+ float approx_dist = implicit * inversesqrt(grad_dot);
+ float alpha = clamp(0.5 - approx_dist, 0.0, 1.0);
+ output_Stage5 = output_Stage4 * alpha;
+ }
+ {
+ if (all(lessThanEqual(output_Stage5.xyz, vec3(0.0)))) {
+ discard;
+ }
+ vec2 _dstTexCoord = (gl_FragCoord.xy - uDstTextureUpperLeft_Stage6) * uDstTextureCoordScale_Stage6;
+ _dstTexCoord.y = 1.0 - _dstTexCoord.y;
+ vec4 _dstColor = texture(uDstTextureSampler_Stage6, _dstTexCoord);
+ sk_FragColor = blend_src(output_Stage3, _dstColor);
+ sk_FragColor = output_Stage5 * sk_FragColor + (vec4(1.0) - output_Stage5) * _dstColor;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec2 inEllipseOffset;
+in vec4 inEllipseRadii;
+noperspective out vec2 vEllipseOffsets_Stage0;
+noperspective out vec4 vEllipseRadii_Stage0;
+noperspective out vec4 vinColor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+void main() {
+ vEllipseOffsets_Stage0 = inEllipseOffset;
+ vEllipseRadii_Stage0 = inEllipseRadii;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/643-3.shader_test b/shaders/skia/643-3.shader_test
new file mode 100644
index 0000000..37cdc8d
--- /dev/null
+++ b/shaders/skia/643-3.shader_test
@@ -0,0 +1,437 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage2_c0_c0;
+uniform vec4 uKernel_Stage2_c0_c0[6];
+uniform vec2 uKernelOffset_Stage2_c0_c0;
+uniform float uGain_Stage2_c0_c0;
+uniform float uBias_Stage2_c0_c0;
+uniform vec4 uTexDom_Stage2_c0_c0;
+uniform vec3 uDecalParams_Stage2_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 MatrixConvolution_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 sum = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_1_Stage0 - uKernelOffset_Stage2_c0_c0 * uImageIncrement_Stage2_c0_c0;
+ vec4 c;
+ {
+ float k = uKernel_Stage2_c0_c0[0].x;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c0_c0.y);
+ if (err > uDecalParams_Stage2_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2_c0_c0[0].y;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c0_c0.y);
+ if (err > uDecalParams_Stage2_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2_c0_c0[0].z;
+ {
+ vec2 origCoord = coord + vec2(2.0, 0.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c0_c0.y);
+ if (err > uDecalParams_Stage2_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2_c0_c0[0].w;
+ {
+ vec2 origCoord = coord + vec2(3.0, 0.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c0_c0.y);
+ if (err > uDecalParams_Stage2_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2_c0_c0[1].x;
+ {
+ vec2 origCoord = coord + vec2(4.0, 0.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c0_c0.y);
+ if (err > uDecalParams_Stage2_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2_c0_c0[1].y;
+ {
+ vec2 origCoord = coord + vec2(5.0, 0.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c0_c0.y);
+ if (err > uDecalParams_Stage2_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2_c0_c0[1].z;
+ {
+ vec2 origCoord = coord + vec2(6.0, 0.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c0_c0.y);
+ if (err > uDecalParams_Stage2_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2_c0_c0[1].w;
+ {
+ vec2 origCoord = coord + vec2(7.0, 0.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c0_c0.y);
+ if (err > uDecalParams_Stage2_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2_c0_c0[2].x;
+ {
+ vec2 origCoord = coord + vec2(8.0, 0.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c0_c0.y);
+ if (err > uDecalParams_Stage2_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2_c0_c0[2].y;
+ {
+ vec2 origCoord = coord + vec2(9.0, 0.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c0_c0.y);
+ if (err > uDecalParams_Stage2_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2_c0_c0[2].z;
+ {
+ vec2 origCoord = coord + vec2(10.0, 0.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c0_c0.y);
+ if (err > uDecalParams_Stage2_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2_c0_c0[2].w;
+ {
+ vec2 origCoord = coord + vec2(11.0, 0.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c0_c0.y);
+ if (err > uDecalParams_Stage2_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2_c0_c0[3].x;
+ {
+ vec2 origCoord = coord + vec2(12.0, 0.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c0_c0.y);
+ if (err > uDecalParams_Stage2_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2_c0_c0[3].y;
+ {
+ vec2 origCoord = coord + vec2(13.0, 0.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c0_c0.y);
+ if (err > uDecalParams_Stage2_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2_c0_c0[3].z;
+ {
+ vec2 origCoord = coord + vec2(14.0, 0.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c0_c0.y);
+ if (err > uDecalParams_Stage2_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2_c0_c0[3].w;
+ {
+ vec2 origCoord = coord + vec2(15.0, 0.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c0_c0.y);
+ if (err > uDecalParams_Stage2_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2_c0_c0[4].x;
+ {
+ vec2 origCoord = coord + vec2(16.0, 0.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c0_c0.y);
+ if (err > uDecalParams_Stage2_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2_c0_c0[4].y;
+ {
+ vec2 origCoord = coord + vec2(17.0, 0.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c0_c0.y);
+ if (err > uDecalParams_Stage2_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2_c0_c0[4].z;
+ {
+ vec2 origCoord = coord + vec2(18.0, 0.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c0_c0.y);
+ if (err > uDecalParams_Stage2_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2_c0_c0[4].w;
+ {
+ vec2 origCoord = coord + vec2(19.0, 0.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c0_c0.y);
+ if (err > uDecalParams_Stage2_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2_c0_c0[5].x;
+ {
+ vec2 origCoord = coord + vec2(20.0, 0.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c0_c0.y);
+ if (err > uDecalParams_Stage2_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2_c0_c0[5].y;
+ {
+ vec2 origCoord = coord + vec2(21.0, 0.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c0_c0.y);
+ if (err > uDecalParams_Stage2_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ _output = sum * uGain_Stage2_c0_c0 + uBias_Stage2_c0_c0;
+ _output.w = clamp(_output.w, 0.0, 1.0);
+ _output.xyz = clamp(_output.xyz, 0.0, _output.w);
+ _output *= _input;
+ return _output;
+}
+vec4 blend_src_atop(vec4 src, vec4 dst) {
+ return dst.w * src + (1.0 - src.w) * dst;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_src_atop(MatrixConvolution_Stage2_c0_c0(vec4(1.0)), output_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/643.shader_test b/shaders/skia/643.shader_test
new file mode 100644
index 0000000..4475d64
--- /dev/null
+++ b/shaders/skia/643.shader_test
@@ -0,0 +1,115 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 ucolor_Stage1_c0_c0_c0_c0;
+uniform vec4 ucolor_Stage2;
+noperspective in vec4 vcolor_Stage0;
+vec4 ConstColorProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = _input.w * ucolor_Stage1_c0_c0_c0_c0;
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = ConstColorProcessor_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+float _blend_color_saturation(vec3 color) {
+ return max(max(color.x, color.y), color.z) - min(min(color.x, color.y), color.z);
+}
+vec3 _blend_set_color_saturation_helper(vec3 minMidMax, float sat) {
+ if (minMidMax.x < minMidMax.z) {
+ return vec3(0.0, (sat * (minMidMax.y - minMidMax.x)) / (minMidMax.z - minMidMax.x), sat);
+ }
+ return vec3(0.0);
+}
+vec3 _blend_set_color_saturation(vec3 hueLumColor, vec3 satColor) {
+ float sat = _blend_color_saturation(satColor);
+ if (hueLumColor.x <= hueLumColor.y) {
+ if (hueLumColor.y <= hueLumColor.z) {
+ hueLumColor.xyz = _blend_set_color_saturation_helper(hueLumColor, sat);
+ } else if (hueLumColor.x <= hueLumColor.z) {
+ hueLumColor.xzy = _blend_set_color_saturation_helper(hueLumColor.xzy, sat);
+ } else {
+ hueLumColor.zxy = _blend_set_color_saturation_helper(hueLumColor.zxy, sat);
+ }
+ } else if (hueLumColor.x <= hueLumColor.z) {
+ hueLumColor.yxz = _blend_set_color_saturation_helper(hueLumColor.yxz, sat);
+ } else if (hueLumColor.y <= hueLumColor.z) {
+ hueLumColor.yzx = _blend_set_color_saturation_helper(hueLumColor.yzx, sat);
+ } else {
+ hueLumColor.zyx = _blend_set_color_saturation_helper(hueLumColor.zyx, sat);
+ }
+ return hueLumColor;
+}
+float _blend_color_luminance(vec3 color) {
+ return dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), color);
+}
+vec3 _blend_set_color_luminance(vec3 hueSatColor, float alpha, vec3 lumColor) {
+ float lum = _blend_color_luminance(lumColor);
+ vec3 result = (lum - _blend_color_luminance(hueSatColor)) + hueSatColor;
+ float minComp = min(min(result.x, result.y), result.z);
+ float maxComp = max(max(result.x, result.y), result.z);
+ if (minComp < 0.0 && lum != minComp) {
+ result = lum + ((result - lum) * lum) / (lum - minComp);
+ }
+ if (maxComp > alpha && maxComp != lum) {
+ return lum + ((result - lum) * (alpha - lum)) / (maxComp - lum);
+ }
+ return result;
+}
+vec4 blend_saturation(vec4 src, vec4 dst) {
+ float alpha = dst.w * src.w;
+ vec3 sda = src.xyz * dst.w;
+ vec3 dsa = dst.xyz * src.w;
+ return vec4((((_blend_set_color_luminance(_blend_set_color_saturation(dsa, sda), alpha, dsa) + dst.xyz) - dsa) + src.xyz) - sda, (src.w + dst.w) - alpha);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_saturation(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ {
+ output_Stage2 = output_Stage1 * ucolor_Stage2;
+ }
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 position;
+in vec4 inColor;
+noperspective out vec4 vcolor_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/646-2.shader_test b/shaders/skia/646-2.shader_test
new file mode 100644
index 0000000..63b4d6a
--- /dev/null
+++ b/shaders/skia/646-2.shader_test
@@ -0,0 +1,25 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+uniform vec4 uColor_Stage0;
+void main() {
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 inPosition;
+void main() {
+ vec2 pos2 = inPosition;
+ {
+ vec2 _posTmp = pos2;
+ _posTmp = floor(_posTmp) + vec2(0.5, 0.5);
+ gl_Position = vec4(_posTmp, 0.0, 1.0);
+ }
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/646-3.shader_test b/shaders/skia/646-3.shader_test
new file mode 100644
index 0000000..7921ed7
--- /dev/null
+++ b/shaders/skia/646-3.shader_test
@@ -0,0 +1,230 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage2_c0_c0;
+uniform float uSurfaceScale_Stage2_c0_c0;
+uniform vec3 uLightColor_Stage2_c0_c0;
+uniform float uKS_Stage2_c0_c0;
+uniform float uShininess_Stage2_c0_c0;
+uniform vec4 uTexDom_Stage2_c0_c0;
+uniform vec3 uDecalParams_Stage2_c0_c0;
+uniform vec3 uLightLocation_Stage2_c0_c0;
+uniform float uExponent_Stage2_c0_c0;
+uniform float uCosInnerConeAngle_Stage2_c0_c0;
+uniform float uCosOuterConeAngle_Stage2_c0_c0;
+uniform float uConeScale_Stage2_c0_c0;
+uniform vec3 uS_Stage2_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 light_Stage2_c0_c0(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ vec3 halfDir = normalize(surfaceToLight + vec3(0.0, 0.0, 1.0));
+ float colorScale = uKS_Stage2_c0_c0 * pow(dot(normal, halfDir), uShininess_Stage2_c0_c0);
+ vec3 color = lightColor * clamp(colorScale, 0.0, 1.0);
+ return vec4(color, max(max(color.x, color.y), color.z));
+}
+float sobel_Stage2_c0_c0(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage2_c0_c0(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage2_c0_c0(float m[9], float surfaceScale) {
+ return pointToNormal_Stage2_c0_c0(sobel_Stage2_c0_c0(0.0, 0.0, m[3], m[4], m[6], m[7], 0.66666698455810547), sobel_Stage2_c0_c0(m[3], m[6], m[4], m[7], 0.0, 0.0, 0.66666698455810547), surfaceScale);
+}
+vec3 lightColor_Stage2_c0_c0(vec3 surfaceToLight) {
+ float cosAngle = -dot(surfaceToLight, uS_Stage2_c0_c0);
+ if (cosAngle < uCosOuterConeAngle_Stage2_c0_c0) {
+ return vec3(0.0);
+ }
+ float scale = pow(cosAngle, uExponent_Stage2_c0_c0);
+ if (cosAngle < uCosInnerConeAngle_Stage2_c0_c0) {
+ return ((uLightColor_Stage2_c0_c0 * scale) * (cosAngle - uCosOuterConeAngle_Stage2_c0_c0)) * uConeScale_Stage2_c0_c0;
+ }
+ return uLightColor_Stage2_c0_c0;
+}
+vec4 SpecularLighting_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coord = vTransformedCoords_1_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c0_c0.y);
+ if (err > uDecalParams_Stage2_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp0 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c0_c0.y);
+ if (err > uDecalParams_Stage2_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c0_c0.y);
+ if (err > uDecalParams_Stage2_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c0_c0.y);
+ if (err > uDecalParams_Stage2_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c0_c0.y);
+ if (err > uDecalParams_Stage2_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c0_c0.y);
+ if (err > uDecalParams_Stage2_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp5 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c0_c0.y);
+ if (err > uDecalParams_Stage2_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp6 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c0_c0.y);
+ if (err > uDecalParams_Stage2_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp7 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c0_c0.y);
+ if (err > uDecalParams_Stage2_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp8 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = normalize(uLightLocation_Stage2_c0_c0 - vec3(gl_FragCoord.xy, uSurfaceScale_Stage2_c0_c0 * m[4]));
+ _output = light_Stage2_c0_c0(normal_Stage2_c0_c0(m, uSurfaceScale_Stage2_c0_c0), surfaceToLight, lightColor_Stage2_c0_c0(surfaceToLight));
+ _output *= _input;
+ return _output;
+}
+vec4 blend_plus(vec4 src, vec4 dst) {
+ return min(src + dst, 1.0);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_plus(SpecularLighting_Stage2_c0_c0(vec4(1.0)), output_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/646.shader_test b/shaders/skia/646.shader_test
new file mode 100644
index 0000000..e0b050f
--- /dev/null
+++ b/shaders/skia/646.shader_test
@@ -0,0 +1,212 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage2;
+uniform vec4 ucolor_Stage3_c1_c0;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.w) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ } else {
+ {
+ if (t < uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+vec4 ComposeOne_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_dst_in(_input, TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0)));
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = ComposeOne_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 ConstColorProcessor_Stage3_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage3_c1_c0;
+ }
+ return _output;
+}
+float _blend_color_saturation(vec3 color) {
+ return max(max(color.x, color.y), color.z) - min(min(color.x, color.y), color.z);
+}
+vec3 _blend_set_color_saturation_helper(vec3 minMidMax, float sat) {
+ if (minMidMax.x < minMidMax.z) {
+ return vec3(0.0, (sat * (minMidMax.y - minMidMax.x)) / (minMidMax.z - minMidMax.x), sat);
+ }
+ return vec3(0.0);
+}
+vec3 _blend_set_color_saturation(vec3 hueLumColor, vec3 satColor) {
+ float sat = _blend_color_saturation(satColor);
+ if (hueLumColor.x <= hueLumColor.y) {
+ if (hueLumColor.y <= hueLumColor.z) {
+ hueLumColor.xyz = _blend_set_color_saturation_helper(hueLumColor, sat);
+ } else if (hueLumColor.x <= hueLumColor.z) {
+ hueLumColor.xzy = _blend_set_color_saturation_helper(hueLumColor.xzy, sat);
+ } else {
+ hueLumColor.zxy = _blend_set_color_saturation_helper(hueLumColor.zxy, sat);
+ }
+ } else if (hueLumColor.x <= hueLumColor.z) {
+ hueLumColor.yxz = _blend_set_color_saturation_helper(hueLumColor.yxz, sat);
+ } else if (hueLumColor.y <= hueLumColor.z) {
+ hueLumColor.yzx = _blend_set_color_saturation_helper(hueLumColor.yzx, sat);
+ } else {
+ hueLumColor.zyx = _blend_set_color_saturation_helper(hueLumColor.zyx, sat);
+ }
+ return hueLumColor;
+}
+float _blend_color_luminance(vec3 color) {
+ return dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), color);
+}
+vec3 _blend_set_color_luminance(vec3 hueSatColor, float alpha, vec3 lumColor) {
+ float lum = _blend_color_luminance(lumColor);
+ vec3 result = (lum - _blend_color_luminance(hueSatColor)) + hueSatColor;
+ float minComp = min(min(result.x, result.y), result.z);
+ float maxComp = max(max(result.x, result.y), result.z);
+ if (minComp < 0.0 && lum != minComp) {
+ result = lum + ((result - lum) * lum) / (lum - minComp);
+ }
+ if (maxComp > alpha && maxComp != lum) {
+ return lum + ((result - lum) * (alpha - lum)) / (maxComp - lum);
+ }
+ return result;
+}
+vec4 blend_saturation(vec4 src, vec4 dst) {
+ float alpha = dst.w * src.w;
+ vec3 sda = src.xyz * dst.w;
+ vec3 dsa = dst.xyz * src.w;
+ return vec4((((_blend_set_color_luminance(_blend_set_color_saturation(dsa, sda), alpha, dsa) + dst.xyz) - dsa) + src.xyz) - sda, (src.w + dst.w) - alpha);
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 blend_darken(vec4 src, vec4 dst) {
+ vec4 result = blend_src_over(src, dst);
+ result.xyz = min(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
+ return result;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_saturation(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ {
+ output_Stage2 = output_Stage1 * ucolor_Stage2;
+ }
+ }
+ vec4 output_Stage3;
+ {
+ output_Stage3 = blend_darken(ConstColorProcessor_Stage3_c1_c0(vec4(1.0)), output_Stage2);
+ }
+ {
+ sk_FragColor = output_Stage3;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 inColor;
+in vec2 inLocalCoord;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/649-3.shader_test b/shaders/skia/649-3.shader_test
new file mode 100644
index 0000000..53b0d20
--- /dev/null
+++ b/shaders/skia/649-3.shader_test
@@ -0,0 +1,78 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uellipse_Stage2_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 EllipseEffect_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 d = gl_FragCoord.xy - uellipse_Stage2_c0_c0.xy;
+ vec2 Z = d * uellipse_Stage2_c0_c0.zw;
+ float implicit = dot(Z, d) - 1.0;
+ float grad_dot = 4.0 * dot(Z, Z);
+ {
+ grad_dot = max(grad_dot, 1.1754999560161448e-38);
+ }
+ float approx_dist = implicit * inversesqrt(grad_dot);
+ float alpha;
+ {
+ alpha = approx_dist > 0.0 ? 0.0 : 1.0;
+ }
+ _output = _input * alpha;
+ return _output;
+}
+float _guarded_divide(float n, float d) {
+ return n / d;
+}
+float _soft_light_component(float sc, float sa, float dc, float da) {
+ if (2.0 * sc <= sa) {
+ return (_guarded_divide((dc * dc) * (sa - 2.0 * sc), da) + (1.0 - da) * sc) + dc * ((-sa + 2.0 * sc) + 1.0);
+ } else if (4.0 * dc <= da) {
+ float DSqd = dc * dc;
+ float DCub = DSqd * dc;
+ float DaSqd = da * da;
+ float DaCub = DaSqd * da;
+ return _guarded_divide(((DaSqd * (sc - dc * ((3.0 * sa - 6.0 * sc) - 1.0)) + ((12.0 * da) * DSqd) * (sa - 2.0 * sc)) - (16.0 * DCub) * (sa - 2.0 * sc)) - DaCub * sc, DaSqd);
+ }
+ return ((dc * ((sa - 2.0 * sc) + 1.0) + sc) - sqrt(da * dc) * (sa - 2.0 * sc)) - da * sc;
+}
+vec4 blend_soft_light(vec4 src, vec4 dst) {
+ if (dst.w == 0.0) {
+ return src;
+ }
+ return vec4(_soft_light_component(src.x, src.w, dst.x, dst.w), _soft_light_component(src.y, src.w, dst.y, dst.w), _soft_light_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_soft_light(output_Stage1, EllipseEffect_Stage2_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/649.shader_test b/shaders/skia/649.shader_test
new file mode 100644
index 0000000..2cf0f5a
--- /dev/null
+++ b/shaders/skia/649.shader_test
@@ -0,0 +1,135 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 ucolor_Stage1_c0_c0_c0_c0;
+uniform vec4 ucolor_Stage2;
+uniform vec4 ucolor_Stage3_c1_c0;
+noperspective in vec4 vcolor_Stage0;
+vec4 ConstColorProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = _input.w * ucolor_Stage1_c0_c0_c0_c0;
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = ConstColorProcessor_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 ConstColorProcessor_Stage3_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage3_c1_c0;
+ }
+ return _output;
+}
+float _blend_color_saturation(vec3 color) {
+ return max(max(color.x, color.y), color.z) - min(min(color.x, color.y), color.z);
+}
+vec3 _blend_set_color_saturation_helper(vec3 minMidMax, float sat) {
+ if (minMidMax.x < minMidMax.z) {
+ return vec3(0.0, (sat * (minMidMax.y - minMidMax.x)) / (minMidMax.z - minMidMax.x), sat);
+ }
+ return vec3(0.0);
+}
+vec3 _blend_set_color_saturation(vec3 hueLumColor, vec3 satColor) {
+ float sat = _blend_color_saturation(satColor);
+ if (hueLumColor.x <= hueLumColor.y) {
+ if (hueLumColor.y <= hueLumColor.z) {
+ hueLumColor.xyz = _blend_set_color_saturation_helper(hueLumColor, sat);
+ } else if (hueLumColor.x <= hueLumColor.z) {
+ hueLumColor.xzy = _blend_set_color_saturation_helper(hueLumColor.xzy, sat);
+ } else {
+ hueLumColor.zxy = _blend_set_color_saturation_helper(hueLumColor.zxy, sat);
+ }
+ } else if (hueLumColor.x <= hueLumColor.z) {
+ hueLumColor.yxz = _blend_set_color_saturation_helper(hueLumColor.yxz, sat);
+ } else if (hueLumColor.y <= hueLumColor.z) {
+ hueLumColor.yzx = _blend_set_color_saturation_helper(hueLumColor.yzx, sat);
+ } else {
+ hueLumColor.zyx = _blend_set_color_saturation_helper(hueLumColor.zyx, sat);
+ }
+ return hueLumColor;
+}
+float _blend_color_luminance(vec3 color) {
+ return dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), color);
+}
+vec3 _blend_set_color_luminance(vec3 hueSatColor, float alpha, vec3 lumColor) {
+ float lum = _blend_color_luminance(lumColor);
+ vec3 result = (lum - _blend_color_luminance(hueSatColor)) + hueSatColor;
+ float minComp = min(min(result.x, result.y), result.z);
+ float maxComp = max(max(result.x, result.y), result.z);
+ if (minComp < 0.0 && lum != minComp) {
+ result = lum + ((result - lum) * lum) / (lum - minComp);
+ }
+ if (maxComp > alpha && maxComp != lum) {
+ return lum + ((result - lum) * (alpha - lum)) / (maxComp - lum);
+ }
+ return result;
+}
+vec4 blend_saturation(vec4 src, vec4 dst) {
+ float alpha = dst.w * src.w;
+ vec3 sda = src.xyz * dst.w;
+ vec3 dsa = dst.xyz * src.w;
+ return vec4((((_blend_set_color_luminance(_blend_set_color_saturation(dsa, sda), alpha, dsa) + dst.xyz) - dsa) + src.xyz) - sda, (src.w + dst.w) - alpha);
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 blend_darken(vec4 src, vec4 dst) {
+ vec4 result = blend_src_over(src, dst);
+ result.xyz = min(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
+ return result;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_saturation(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ {
+ output_Stage2 = output_Stage1 * ucolor_Stage2;
+ }
+ }
+ vec4 output_Stage3;
+ {
+ output_Stage3 = blend_darken(ConstColorProcessor_Stage3_c1_c0(vec4(1.0)), output_Stage2);
+ }
+ {
+ sk_FragColor = output_Stage3;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 position;
+in vec4 inColor;
+noperspective out vec4 vcolor_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/652-3.shader_test b/shaders/skia/652-3.shader_test
new file mode 100644
index 0000000..1b22cb8
--- /dev/null
+++ b/shaders/skia/652-3.shader_test
@@ -0,0 +1,70 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 ucircleData_Stage2_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 CircleBlurFragmentProcessor_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 vec = vec2((gl_FragCoord.x - ucircleData_Stage2_c0_c0.x) * ucircleData_Stage2_c0_c0.w, (gl_FragCoord.y - ucircleData_Stage2_c0_c0.y) * ucircleData_Stage2_c0_c0.w);
+ float dist = length(vec) + (0.5 - ucircleData_Stage2_c0_c0.z) * ucircleData_Stage2_c0_c0.w;
+ _output = _input * texture(uTextureSampler_0_Stage2, vec2(dist, 0.5)).w;
+ return _output;
+}
+float _blend_color_luminance(vec3 color) {
+ return dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), color);
+}
+vec3 _blend_set_color_luminance(vec3 hueSatColor, float alpha, vec3 lumColor) {
+ float lum = _blend_color_luminance(lumColor);
+ vec3 result = (lum - _blend_color_luminance(hueSatColor)) + hueSatColor;
+ float minComp = min(min(result.x, result.y), result.z);
+ float maxComp = max(max(result.x, result.y), result.z);
+ if (minComp < 0.0 && lum != minComp) {
+ result = lum + ((result - lum) * lum) / (lum - minComp);
+ }
+ if (maxComp > alpha && maxComp != lum) {
+ return lum + ((result - lum) * (alpha - lum)) / (maxComp - lum);
+ }
+ return result;
+}
+vec4 blend_color(vec4 src, vec4 dst) {
+ float alpha = dst.w * src.w;
+ vec3 sda = src.xyz * dst.w;
+ vec3 dsa = dst.xyz * src.w;
+ return vec4((((_blend_set_color_luminance(sda, alpha, dsa) + dst.xyz) - dsa) + src.xyz) - sda, (src.w + dst.w) - alpha);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_color(output_Stage1, CircleBlurFragmentProcessor_Stage2_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/652.shader_test b/shaders/skia/652.shader_test
new file mode 100644
index 0000000..816794f
--- /dev/null
+++ b/shaders/skia/652.shader_test
@@ -0,0 +1,151 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.w) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ } else {
+ {
+ if (t < uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = OverrideInputFragmentProcessor_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+float _blend_color_luminance(vec3 color) {
+ return dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), color);
+}
+vec3 _blend_set_color_luminance(vec3 hueSatColor, float alpha, vec3 lumColor) {
+ float lum = _blend_color_luminance(lumColor);
+ vec3 result = (lum - _blend_color_luminance(hueSatColor)) + hueSatColor;
+ float minComp = min(min(result.x, result.y), result.z);
+ float maxComp = max(max(result.x, result.y), result.z);
+ if (minComp < 0.0 && lum != minComp) {
+ result = lum + ((result - lum) * lum) / (lum - minComp);
+ }
+ if (maxComp > alpha && maxComp != lum) {
+ return lum + ((result - lum) * (alpha - lum)) / (maxComp - lum);
+ }
+ return result;
+}
+vec4 blend_color(vec4 src, vec4 dst) {
+ float alpha = dst.w * src.w;
+ vec3 sda = src.xyz * dst.w;
+ vec3 dsa = dst.xyz * src.w;
+ return vec4((((_blend_set_color_luminance(sda, alpha, dsa) + dst.xyz) - dsa) + src.xyz) - sda, (src.w + dst.w) - alpha);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_color(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 inColor;
+in vec2 inLocalCoord;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/655-2.shader_test b/shaders/skia/655-2.shader_test
new file mode 100644
index 0000000..ad8218c
--- /dev/null
+++ b/shaders/skia/655-2.shader_test
@@ -0,0 +1,258 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_KHR_blend_equation_advanced : require
+out vec4 sk_FragColor;
+layout (blend_support_all_equations) out ;
+uniform vec4 ucircle_Stage1_c0_c0_c0_c0_c0_c0;
+uniform vec4 ucircle_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec2 uImageIncrement_Stage1_c0_c0_c1_c0_c0_c0;
+uniform vec2 uBounds_Stage1_c0_c0_c1_c0_c0_c0;
+uniform vec4 uKernel_Stage1_c0_c0_c1_c0_c0_c0[3];
+uniform vec4 ucircle_Stage1_c0_c0_c1_c0_c1_c0;
+uniform vec4 uinnerRect_Stage1_c1_c0;
+uniform vec2 uinvRadiiXY_Stage1_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vEllipseOffsets0_Stage0;
+noperspective in vec2 vEllipseOffsets1_Stage0;
+noperspective in vec4 vinColor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 CircleEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float d;
+ {
+ d = (length((ucircle_Stage1_c0_c0_c0_c0_c0_c0.xy - gl_FragCoord.xy) * ucircle_Stage1_c0_c0_c0_c0_c0_c0.w) - 1.0) * ucircle_Stage1_c0_c0_c0_c0_c0_c0.z;
+ }
+ {
+ _output = _input * clamp(d, 0.0, 1.0);
+ }
+ return _output;
+}
+vec4 CircleEffect_Stage1_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float d;
+ {
+ d = (1.0 - length((ucircle_Stage1_c0_c0_c0_c0_c1_c0.xy - gl_FragCoord.xy) * ucircle_Stage1_c0_c0_c0_c0_c1_c0.w)) * ucircle_Stage1_c0_c0_c0_c0_c1_c0.z;
+ }
+ {
+ _output = _input * clamp(d, 0.0, 1.0);
+ }
+ return _output;
+}
+vec4 blend_exclusion(vec4 src, vec4 dst) {
+ return vec4((dst.xyz + src.xyz) - (2.0 * dst.xyz) * src.xyz, src.w + (1.0 - src.w) * dst.w);
+}
+vec4 ComposeTwo_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_exclusion(CircleEffect_Stage1_c0_c0_c0_c0_c0_c0(inputColor), CircleEffect_Stage1_c0_c0_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 GaussianConvolution_Stage1_c0_c0_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0 - 4.0 * uImageIncrement_Stage1_c0_c0_c1_c0_c0_c0;
+ vec2 coordSampled = vec2(0.0, 0.0);
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1_c0_c0_c1_c0_c0_c0.x && coord.x <= uBounds_Stage1_c0_c0_c1_c0_c0_c0.y) {
+ _output += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c1_c0_c0_c0[0].x;
+ }
+ coord += uImageIncrement_Stage1_c0_c0_c1_c0_c0_c0;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1_c0_c0_c1_c0_c0_c0.x && coord.x <= uBounds_Stage1_c0_c0_c1_c0_c0_c0.y) {
+ _output += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c1_c0_c0_c0[0].y;
+ }
+ coord += uImageIncrement_Stage1_c0_c0_c1_c0_c0_c0;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1_c0_c0_c1_c0_c0_c0.x && coord.x <= uBounds_Stage1_c0_c0_c1_c0_c0_c0.y) {
+ _output += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c1_c0_c0_c0[0].z;
+ }
+ coord += uImageIncrement_Stage1_c0_c0_c1_c0_c0_c0;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1_c0_c0_c1_c0_c0_c0.x && coord.x <= uBounds_Stage1_c0_c0_c1_c0_c0_c0.y) {
+ _output += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c1_c0_c0_c0[0].w;
+ }
+ coord += uImageIncrement_Stage1_c0_c0_c1_c0_c0_c0;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1_c0_c0_c1_c0_c0_c0.x && coord.x <= uBounds_Stage1_c0_c0_c1_c0_c0_c0.y) {
+ _output += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c1_c0_c0_c0[1].x;
+ }
+ coord += uImageIncrement_Stage1_c0_c0_c1_c0_c0_c0;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1_c0_c0_c1_c0_c0_c0.x && coord.x <= uBounds_Stage1_c0_c0_c1_c0_c0_c0.y) {
+ _output += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c1_c0_c0_c0[1].y;
+ }
+ coord += uImageIncrement_Stage1_c0_c0_c1_c0_c0_c0;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1_c0_c0_c1_c0_c0_c0.x && coord.x <= uBounds_Stage1_c0_c0_c1_c0_c0_c0.y) {
+ _output += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c1_c0_c0_c0[1].z;
+ }
+ coord += uImageIncrement_Stage1_c0_c0_c1_c0_c0_c0;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1_c0_c0_c1_c0_c0_c0.x && coord.x <= uBounds_Stage1_c0_c0_c1_c0_c0_c0.y) {
+ _output += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c1_c0_c0_c0[1].w;
+ }
+ coord += uImageIncrement_Stage1_c0_c0_c1_c0_c0_c0;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1_c0_c0_c1_c0_c0_c0.x && coord.x <= uBounds_Stage1_c0_c0_c1_c0_c0_c0.y) {
+ _output += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c1_c0_c0_c0[2].x;
+ }
+ coord += uImageIncrement_Stage1_c0_c0_c1_c0_c0_c0;
+ _output *= _input;
+ return _output;
+}
+vec4 CircleEffect_Stage1_c0_c0_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float d;
+ {
+ d = (length((ucircle_Stage1_c0_c0_c1_c0_c1_c0.xy - gl_FragCoord.xy) * ucircle_Stage1_c0_c0_c1_c0_c1_c0.w) - 1.0) * ucircle_Stage1_c0_c0_c1_c0_c1_c0.z;
+ }
+ {
+ _output = _input * clamp(d, 0.0, 1.0);
+ }
+ return _output;
+}
+vec4 blend_xor(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src + (1.0 - src.w) * dst;
+}
+vec4 ComposeTwo_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_xor(GaussianConvolution_Stage1_c0_c0_c1_c0_c0_c0(inputColor), CircleEffect_Stage1_c0_c0_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+float _blend_color_saturation(vec3 color) {
+ return max(max(color.x, color.y), color.z) - min(min(color.x, color.y), color.z);
+}
+vec3 _blend_set_color_saturation_helper(vec3 minMidMax, float sat) {
+ if (minMidMax.x < minMidMax.z) {
+ return vec3(0.0, (sat * (minMidMax.y - minMidMax.x)) / (minMidMax.z - minMidMax.x), sat);
+ }
+ return vec3(0.0);
+}
+vec3 _blend_set_color_saturation(vec3 hueLumColor, vec3 satColor) {
+ float sat = _blend_color_saturation(satColor);
+ if (hueLumColor.x <= hueLumColor.y) {
+ if (hueLumColor.y <= hueLumColor.z) {
+ hueLumColor.xyz = _blend_set_color_saturation_helper(hueLumColor, sat);
+ } else if (hueLumColor.x <= hueLumColor.z) {
+ hueLumColor.xzy = _blend_set_color_saturation_helper(hueLumColor.xzy, sat);
+ } else {
+ hueLumColor.zxy = _blend_set_color_saturation_helper(hueLumColor.zxy, sat);
+ }
+ } else if (hueLumColor.x <= hueLumColor.z) {
+ hueLumColor.yxz = _blend_set_color_saturation_helper(hueLumColor.yxz, sat);
+ } else if (hueLumColor.y <= hueLumColor.z) {
+ hueLumColor.yzx = _blend_set_color_saturation_helper(hueLumColor.yzx, sat);
+ } else {
+ hueLumColor.zyx = _blend_set_color_saturation_helper(hueLumColor.zyx, sat);
+ }
+ return hueLumColor;
+}
+float _blend_color_luminance(vec3 color) {
+ return dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), color);
+}
+vec3 _blend_set_color_luminance(vec3 hueSatColor, float alpha, vec3 lumColor) {
+ float lum = _blend_color_luminance(lumColor);
+ vec3 result = (lum - _blend_color_luminance(hueSatColor)) + hueSatColor;
+ float minComp = min(min(result.x, result.y), result.z);
+ float maxComp = max(max(result.x, result.y), result.z);
+ if (minComp < 0.0 && lum != minComp) {
+ result = lum + ((result - lum) * lum) / (lum - minComp);
+ }
+ if (maxComp > alpha && maxComp != lum) {
+ return lum + ((result - lum) * (alpha - lum)) / (maxComp - lum);
+ }
+ return result;
+}
+vec4 blend_hue(vec4 src, vec4 dst) {
+ float alpha = dst.w * src.w;
+ vec3 sda = src.xyz * dst.w;
+ vec3 dsa = dst.xyz * src.w;
+ return vec4((((_blend_set_color_luminance(_blend_set_color_saturation(sda, dsa), alpha, dsa) + dst.xyz) - dsa) + src.xyz) - sda, (src.w + dst.w) - alpha);
+}
+vec4 ComposeTwo_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_hue(ComposeTwo_Stage1_c0_c0_c0_c0(inputColor), ComposeTwo_Stage1_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 EllipticalRRect_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 dxy0 = uinnerRect_Stage1_c1_c0.xy - gl_FragCoord.xy;
+ vec2 dxy1 = gl_FragCoord.xy - uinnerRect_Stage1_c1_c0.zw;
+ vec2 dxy = max(max(dxy0, dxy1), 0.0);
+ vec2 Z = dxy * uinvRadiiXY_Stage1_c1_c0;
+ float implicit = dot(Z, dxy) - 1.0;
+ float grad_dot = 4.0 * dot(Z, Z);
+ grad_dot = max(grad_dot, 9.9999997473787516e-05);
+ float approx_dist = implicit * inversesqrt(grad_dot);
+ float alpha = clamp(0.5 + approx_dist, 0.0, 1.0);
+ _output = _input * alpha;
+ return _output;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vinColor_Stage0;
+ vec2 scaledOffset = vEllipseOffsets0_Stage0;
+ float test = dot(scaledOffset, scaledOffset) - 1.0;
+ vec2 duvdx = dFdx(vEllipseOffsets0_Stage0);
+ vec2 duvdy = dFdy(vEllipseOffsets0_Stage0);
+ vec2 grad = vec2(vEllipseOffsets0_Stage0.x * duvdx.x + vEllipseOffsets0_Stage0.y * duvdx.y, vEllipseOffsets0_Stage0.x * duvdy.x + vEllipseOffsets0_Stage0.y * duvdy.y);
+ float grad_dot = 4.0 * dot(grad, grad);
+ grad_dot = max(grad_dot, 1.1754999560161448e-38);
+ float invlen = inversesqrt(grad_dot);
+ float edgeAlpha = clamp(0.5 - test * invlen, 0.0, 1.0);
+ scaledOffset = vEllipseOffsets1_Stage0;
+ test = dot(scaledOffset, scaledOffset) - 1.0;
+ duvdx = dFdx(vEllipseOffsets1_Stage0);
+ duvdy = dFdy(vEllipseOffsets1_Stage0);
+ grad = vec2(vEllipseOffsets1_Stage0.x * duvdx.x + vEllipseOffsets1_Stage0.y * duvdx.y, vEllipseOffsets1_Stage0.x * duvdy.x + vEllipseOffsets1_Stage0.y * duvdy.y);
+ grad_dot = 4.0 * dot(grad, grad);
+ invlen = inversesqrt(grad_dot);
+ edgeAlpha *= clamp(0.5 + test * invlen, 0.0, 1.0);
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_exclusion(ComposeTwo_Stage1_c0_c0(inputColor), EllipticalRRect_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ sk_FragColor = outputCoverage_Stage0 * output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec2 inEllipseOffsets0;
+in vec2 inEllipseOffsets1;
+noperspective out vec2 vEllipseOffsets0_Stage0;
+noperspective out vec2 vEllipseOffsets1_Stage0;
+noperspective out vec4 vinColor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vEllipseOffsets0_Stage0 = inEllipseOffsets0;
+ vEllipseOffsets1_Stage0 = inEllipseOffsets1;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = (uViewM_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/655-3.shader_test b/shaders/skia/655-3.shader_test
new file mode 100644
index 0000000..e159d9f
--- /dev/null
+++ b/shaders/skia/655-3.shader_test
@@ -0,0 +1,209 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage2_c0_c0;
+uniform float uSurfaceScale_Stage2_c0_c0;
+uniform vec3 uLightColor_Stage2_c0_c0;
+uniform float uKD_Stage2_c0_c0;
+uniform vec4 uTexDom_Stage2_c0_c0;
+uniform vec3 uDecalParams_Stage2_c0_c0;
+uniform vec3 uLightDirection_Stage2_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 light_Stage2_c0_c0(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ float colorScale = uKD_Stage2_c0_c0 * dot(normal, surfaceToLight);
+ return vec4(lightColor * clamp(colorScale, 0.0, 1.0), 1.0);
+}
+float sobel_Stage2_c0_c0(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage2_c0_c0(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage2_c0_c0(float m[9], float surfaceScale) {
+ return pointToNormal_Stage2_c0_c0(sobel_Stage2_c0_c0(m[0], m[2], m[3], m[5], m[6], m[8], 0.25), sobel_Stage2_c0_c0(m[0], m[6], m[1], m[7], m[2], m[8], 0.25), surfaceScale);
+}
+vec4 DiffuseLighting_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coord = vTransformedCoords_1_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c0_c0.y);
+ if (err > uDecalParams_Stage2_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp0 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c0_c0.y);
+ if (err > uDecalParams_Stage2_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c0_c0.y);
+ if (err > uDecalParams_Stage2_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c0_c0.y);
+ if (err > uDecalParams_Stage2_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c0_c0.y);
+ if (err > uDecalParams_Stage2_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c0_c0.y);
+ if (err > uDecalParams_Stage2_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp5 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c0_c0.y);
+ if (err > uDecalParams_Stage2_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp6 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c0_c0.y);
+ if (err > uDecalParams_Stage2_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp7 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c0_c0.y);
+ if (err > uDecalParams_Stage2_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp8 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = uLightDirection_Stage2_c0_c0;
+ _output = light_Stage2_c0_c0(normal_Stage2_c0_c0(m, uSurfaceScale_Stage2_c0_c0), surfaceToLight, uLightColor_Stage2_c0_c0);
+ _output *= _input;
+ return _output;
+}
+vec4 blend_multiply(vec4 src, vec4 dst) {
+ return vec4(((1.0 - src.w) * dst.xyz + (1.0 - dst.w) * src.xyz) + src.xyz * dst.xyz, src.w + (1.0 - src.w) * dst.w);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_multiply(output_Stage1, DiffuseLighting_Stage2_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/655.shader_test b/shaders/skia/655.shader_test
new file mode 100644
index 0000000..3f7afcb
--- /dev/null
+++ b/shaders/skia/655.shader_test
@@ -0,0 +1,80 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 ucolor_Stage1_c0_c0_c0_c0;
+noperspective in vec4 vcolor_Stage0;
+vec4 ConstColorProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = _input.w * ucolor_Stage1_c0_c0_c0_c0;
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = ConstColorProcessor_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+float _blend_color_luminance(vec3 color) {
+ return dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), color);
+}
+vec3 _blend_set_color_luminance(vec3 hueSatColor, float alpha, vec3 lumColor) {
+ float lum = _blend_color_luminance(lumColor);
+ vec3 result = (lum - _blend_color_luminance(hueSatColor)) + hueSatColor;
+ float minComp = min(min(result.x, result.y), result.z);
+ float maxComp = max(max(result.x, result.y), result.z);
+ if (minComp < 0.0 && lum != minComp) {
+ result = lum + ((result - lum) * lum) / (lum - minComp);
+ }
+ if (maxComp > alpha && maxComp != lum) {
+ return lum + ((result - lum) * (alpha - lum)) / (maxComp - lum);
+ }
+ return result;
+}
+vec4 blend_color(vec4 src, vec4 dst) {
+ float alpha = dst.w * src.w;
+ vec3 sda = src.xyz * dst.w;
+ vec3 dsa = dst.xyz * src.w;
+ return vec4((((_blend_set_color_luminance(sda, alpha, dsa) + dst.xyz) - dsa) + src.xyz) - sda, (src.w + dst.w) - alpha);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_color(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 position;
+in vec4 inColor;
+noperspective out vec4 vcolor_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/658-2.shader_test b/shaders/skia/658-2.shader_test
new file mode 100644
index 0000000..6b2d0e9
--- /dev/null
+++ b/shaders/skia/658-2.shader_test
@@ -0,0 +1,42 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uColor_Stage0;
+uniform float uCoverage_Stage0;
+uniform vec4 uinnerRect_Stage1;
+uniform vec2 uradiusPlusHalf_Stage1;
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ outputCoverage_Stage0 = vec4(uCoverage_Stage0);
+ }
+ vec4 output_Stage1;
+ {
+ vec2 dxy0 = uinnerRect_Stage1.xy - gl_FragCoord.xy;
+ vec2 dxy1 = gl_FragCoord.xy - uinnerRect_Stage1.zw;
+ vec2 dxy = max(max(dxy0, dxy1), 0.0);
+ float alpha = clamp(uradiusPlusHalf_Stage1.x - length(dxy), 0.0, 1.0);
+ alpha = 1.0 - alpha;
+ output_Stage1 = outputCoverage_Stage0 * alpha;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 inPosition;
+void main() {
+ vec3 pos3 = uViewM_Stage0 * vec3(inPosition, 1.0);
+ gl_Position = vec4(pos3.x, pos3.y, 0.0, pos3.z);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/658-3.shader_test b/shaders/skia/658-3.shader_test
new file mode 100644
index 0000000..6ceb04a
--- /dev/null
+++ b/shaders/skia/658-3.shader_test
@@ -0,0 +1,112 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform float uinnerThreshold_Stage2_c0_c0;
+uniform float uouterThreshold_Stage2_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 AlphaThresholdFragmentProcessor_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 color = _input;
+ vec4 mask_color = texture(uTextureSampler_0_Stage2, vTransformedCoords_1_Stage0);
+ if (mask_color.w < 0.5) {
+ if (color.w > uouterThreshold_Stage2_c0_c0) {
+ float scale = uouterThreshold_Stage2_c0_c0 / color.w;
+ color.xyz *= scale;
+ color.w = uouterThreshold_Stage2_c0_c0;
+ }
+ } else if (color.w < uinnerThreshold_Stage2_c0_c0) {
+ float scale = uinnerThreshold_Stage2_c0_c0 / max(0.0010000000474974513, color.w);
+ color.xyz *= scale;
+ color.w = uinnerThreshold_Stage2_c0_c0;
+ }
+ _output = color;
+ return _output;
+}
+float _blend_color_saturation(vec3 color) {
+ return max(max(color.x, color.y), color.z) - min(min(color.x, color.y), color.z);
+}
+vec3 _blend_set_color_saturation_helper(vec3 minMidMax, float sat) {
+ if (minMidMax.x < minMidMax.z) {
+ return vec3(0.0, (sat * (minMidMax.y - minMidMax.x)) / (minMidMax.z - minMidMax.x), sat);
+ }
+ return vec3(0.0);
+}
+vec3 _blend_set_color_saturation(vec3 hueLumColor, vec3 satColor) {
+ float sat = _blend_color_saturation(satColor);
+ if (hueLumColor.x <= hueLumColor.y) {
+ if (hueLumColor.y <= hueLumColor.z) {
+ hueLumColor.xyz = _blend_set_color_saturation_helper(hueLumColor, sat);
+ } else if (hueLumColor.x <= hueLumColor.z) {
+ hueLumColor.xzy = _blend_set_color_saturation_helper(hueLumColor.xzy, sat);
+ } else {
+ hueLumColor.zxy = _blend_set_color_saturation_helper(hueLumColor.zxy, sat);
+ }
+ } else if (hueLumColor.x <= hueLumColor.z) {
+ hueLumColor.yxz = _blend_set_color_saturation_helper(hueLumColor.yxz, sat);
+ } else if (hueLumColor.y <= hueLumColor.z) {
+ hueLumColor.yzx = _blend_set_color_saturation_helper(hueLumColor.yzx, sat);
+ } else {
+ hueLumColor.zyx = _blend_set_color_saturation_helper(hueLumColor.zyx, sat);
+ }
+ return hueLumColor;
+}
+float _blend_color_luminance(vec3 color) {
+ return dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), color);
+}
+vec3 _blend_set_color_luminance(vec3 hueSatColor, float alpha, vec3 lumColor) {
+ float lum = _blend_color_luminance(lumColor);
+ vec3 result = (lum - _blend_color_luminance(hueSatColor)) + hueSatColor;
+ float minComp = min(min(result.x, result.y), result.z);
+ float maxComp = max(max(result.x, result.y), result.z);
+ if (minComp < 0.0 && lum != minComp) {
+ result = lum + ((result - lum) * lum) / (lum - minComp);
+ }
+ if (maxComp > alpha && maxComp != lum) {
+ return lum + ((result - lum) * (alpha - lum)) / (maxComp - lum);
+ }
+ return result;
+}
+vec4 blend_hue(vec4 src, vec4 dst) {
+ float alpha = dst.w * src.w;
+ vec3 sda = src.xyz * dst.w;
+ vec3 dsa = dst.xyz * src.w;
+ return vec4((((_blend_set_color_luminance(_blend_set_color_saturation(sda, dsa), alpha, dsa) + dst.xyz) - dsa) + src.xyz) - sda, (src.w + dst.w) - alpha);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_hue(output_Stage1, AlphaThresholdFragmentProcessor_Stage2_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/658.shader_test b/shaders/skia/658.shader_test
new file mode 100644
index 0000000..1060b17
--- /dev/null
+++ b/shaders/skia/658.shader_test
@@ -0,0 +1,171 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage2_c1_c0;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.w) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ } else {
+ {
+ if (t < uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = OverrideInputFragmentProcessor_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c1_c0;
+ }
+ return _output;
+}
+float _blend_color_luminance(vec3 color) {
+ return dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), color);
+}
+vec3 _blend_set_color_luminance(vec3 hueSatColor, float alpha, vec3 lumColor) {
+ float lum = _blend_color_luminance(lumColor);
+ vec3 result = (lum - _blend_color_luminance(hueSatColor)) + hueSatColor;
+ float minComp = min(min(result.x, result.y), result.z);
+ float maxComp = max(max(result.x, result.y), result.z);
+ if (minComp < 0.0 && lum != minComp) {
+ result = lum + ((result - lum) * lum) / (lum - minComp);
+ }
+ if (maxComp > alpha && maxComp != lum) {
+ return lum + ((result - lum) * (alpha - lum)) / (maxComp - lum);
+ }
+ return result;
+}
+vec4 blend_color(vec4 src, vec4 dst) {
+ float alpha = dst.w * src.w;
+ vec3 sda = src.xyz * dst.w;
+ vec3 dsa = dst.xyz * src.w;
+ return vec4((((_blend_set_color_luminance(sda, alpha, dsa) + dst.xyz) - dsa) + src.xyz) - sda, (src.w + dst.w) - alpha);
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 blend_darken(vec4 src, vec4 dst) {
+ vec4 result = blend_src_over(src, dst);
+ result.xyz = min(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
+ return result;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_color(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_darken(ConstColorProcessor_Stage2_c1_c0(vec4(1.0)), output_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 inColor;
+in vec2 inLocalCoord;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/661-2.shader_test b/shaders/skia/661-2.shader_test
new file mode 100644
index 0000000..3404275
--- /dev/null
+++ b/shaders/skia/661-2.shader_test
@@ -0,0 +1,41 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uColor_Stage0;
+noperspective in vec3 vDashParam_Stage0;
+noperspective in vec2 vCircleParams_Stage0;
+void main() {
+ {
+ float xShifted = vDashParam_Stage0.x - floor(vDashParam_Stage0.x / vDashParam_Stage0.z) * vDashParam_Stage0.z;
+ vec2 fragPosShifted = vec2(xShifted, vDashParam_Stage0.y);
+ vec2 center = vec2(vCircleParams_Stage0.y, 0.0);
+ float dist = length(center - fragPosShifted);
+ float diff = dist - vCircleParams_Stage0.x;
+ diff = 1.0 - diff;
+ }
+ {
+ sk_FragColor = vec4(0.0);
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 inPosition;
+in vec3 inDashParams;
+in vec2 inCircleParams;
+noperspective out vec3 vDashParam_Stage0;
+noperspective out vec2 vCircleParams_Stage0;
+void main() {
+ vDashParam_Stage0 = inDashParams;
+ vCircleParams_Stage0 = inCircleParams;
+ vec2 pos2 = inPosition;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/661-3.shader_test b/shaders/skia/661-3.shader_test
new file mode 100644
index 0000000..21cf0a2
--- /dev/null
+++ b/shaders/skia/661-3.shader_test
@@ -0,0 +1,57 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 ucircle_Stage2_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 CircleEffect_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ float d;
+ {
+ d = (length((ucircle_Stage2_c0_c0.xy - gl_FragCoord.xy) * ucircle_Stage2_c0_c0.w) - 1.0) * ucircle_Stage2_c0_c0.z;
+ }
+ {
+ _output = _input * clamp(d, 0.0, 1.0);
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_dst_in(output_Stage1, CircleEffect_Stage2_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/661.shader_test b/shaders/skia/661.shader_test
new file mode 100644
index 0000000..0940b56
--- /dev/null
+++ b/shaders/skia/661.shader_test
@@ -0,0 +1,100 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 ucolor_Stage1_c0_c0_c0_c0;
+uniform vec4 ucolor_Stage2_c1_c0;
+noperspective in vec4 vcolor_Stage0;
+vec4 ConstColorProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = _input.w * ucolor_Stage1_c0_c0_c0_c0;
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = ConstColorProcessor_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c1_c0;
+ }
+ return _output;
+}
+float _blend_color_luminance(vec3 color) {
+ return dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), color);
+}
+vec3 _blend_set_color_luminance(vec3 hueSatColor, float alpha, vec3 lumColor) {
+ float lum = _blend_color_luminance(lumColor);
+ vec3 result = (lum - _blend_color_luminance(hueSatColor)) + hueSatColor;
+ float minComp = min(min(result.x, result.y), result.z);
+ float maxComp = max(max(result.x, result.y), result.z);
+ if (minComp < 0.0 && lum != minComp) {
+ result = lum + ((result - lum) * lum) / (lum - minComp);
+ }
+ if (maxComp > alpha && maxComp != lum) {
+ return lum + ((result - lum) * (alpha - lum)) / (maxComp - lum);
+ }
+ return result;
+}
+vec4 blend_color(vec4 src, vec4 dst) {
+ float alpha = dst.w * src.w;
+ vec3 sda = src.xyz * dst.w;
+ vec3 dsa = dst.xyz * src.w;
+ return vec4((((_blend_set_color_luminance(sda, alpha, dsa) + dst.xyz) - dsa) + src.xyz) - sda, (src.w + dst.w) - alpha);
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 blend_darken(vec4 src, vec4 dst) {
+ vec4 result = blend_src_over(src, dst);
+ result.xyz = min(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
+ return result;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_color(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_darken(ConstColorProcessor_Stage2_c1_c0(vec4(1.0)), output_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 position;
+in vec4 inColor;
+noperspective out vec4 vcolor_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/664-2.shader_test b/shaders/skia/664-2.shader_test
new file mode 100644
index 0000000..f3bd663
--- /dev/null
+++ b/shaders/skia/664-2.shader_test
@@ -0,0 +1,27 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uColor_Stage0;
+uniform float uCoverage_Stage0;
+void main() {
+ {
+ sk_FragColor = vec4(0.0);
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 inPosition;
+void main() {
+ vec2 pos2 = (uViewM_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/664-3.shader_test b/shaders/skia/664-3.shader_test
new file mode 100644
index 0000000..b13a009
--- /dev/null
+++ b/shaders/skia/664-3.shader_test
@@ -0,0 +1,50 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 TextureEffect_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage2, vTransformedCoords_1_Stage0) * _input;
+ return _output;
+}
+vec4 blend_src_atop(vec4 src, vec4 dst) {
+ return dst.w * src + (1.0 - src.w) * dst;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_src_atop(TextureEffect_Stage2_c0_c0(vec4(1.0)), output_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/664.shader_test b/shaders/skia/664.shader_test
new file mode 100644
index 0000000..bd76b96
--- /dev/null
+++ b/shaders/skia/664.shader_test
@@ -0,0 +1,164 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage2;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.w) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ } else {
+ {
+ if (t < uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+vec4 ComposeOne_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_dst_in(_input, TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0)));
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = ComposeOne_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+float _blend_color_luminance(vec3 color) {
+ return dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), color);
+}
+vec3 _blend_set_color_luminance(vec3 hueSatColor, float alpha, vec3 lumColor) {
+ float lum = _blend_color_luminance(lumColor);
+ vec3 result = (lum - _blend_color_luminance(hueSatColor)) + hueSatColor;
+ float minComp = min(min(result.x, result.y), result.z);
+ float maxComp = max(max(result.x, result.y), result.z);
+ if (minComp < 0.0 && lum != minComp) {
+ result = lum + ((result - lum) * lum) / (lum - minComp);
+ }
+ if (maxComp > alpha && maxComp != lum) {
+ return lum + ((result - lum) * (alpha - lum)) / (maxComp - lum);
+ }
+ return result;
+}
+vec4 blend_color(vec4 src, vec4 dst) {
+ float alpha = dst.w * src.w;
+ vec3 sda = src.xyz * dst.w;
+ vec3 dsa = dst.xyz * src.w;
+ return vec4((((_blend_set_color_luminance(sda, alpha, dsa) + dst.xyz) - dsa) + src.xyz) - sda, (src.w + dst.w) - alpha);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_color(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ {
+ output_Stage2 = output_Stage1 * ucolor_Stage2;
+ }
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 inColor;
+in vec2 inLocalCoord;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/667-2.shader_test b/shaders/skia/667-2.shader_test
new file mode 100644
index 0000000..15cbcc3
--- /dev/null
+++ b/shaders/skia/667-2.shader_test
@@ -0,0 +1,168 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform float ubias_Stage1_c0_c0_c0_c0;
+uniform float uscale_Stage1_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+uniform vec4 uinnerRect_Stage2_c1_c0;
+uniform vec2 uradiusPlusHalf_Stage2_c1_c0;
+noperspective in vec2 vEllipseOffsets0_Stage0;
+noperspective in vec2 vEllipseOffsets1_Stage0;
+noperspective in vec4 vinColor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 SweepGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float angle;
+ {
+ angle = atan(-vTransformedCoords_0_Stage0.y, -vTransformedCoords_0_Stage0.x);
+ }
+ float t = ((angle * 0.15915493667125702 + 0.5) + ubias_Stage1_c0_c0_c0_c0) * uscale_Stage1_c0_c0_c0_c0;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = SweepGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 CircularRRect_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 dxy0 = uinnerRect_Stage2_c1_c0.xy - gl_FragCoord.xy;
+ vec2 dxy1 = gl_FragCoord.xy - uinnerRect_Stage2_c1_c0.zw;
+ vec2 dxy = max(max(dxy0, dxy1), 0.0);
+ float alpha = clamp(uradiusPlusHalf_Stage2_c1_c0.x - length(dxy), 0.0, 1.0);
+ _output = _input * alpha;
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+float _blend_color_luminance(vec3 color) {
+ return dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), color);
+}
+vec3 _blend_set_color_luminance(vec3 hueSatColor, float alpha, vec3 lumColor) {
+ float lum = _blend_color_luminance(lumColor);
+ vec3 result = (lum - _blend_color_luminance(hueSatColor)) + hueSatColor;
+ float minComp = min(min(result.x, result.y), result.z);
+ float maxComp = max(max(result.x, result.y), result.z);
+ if (minComp < 0.0 && lum != minComp) {
+ result = lum + ((result - lum) * lum) / (lum - minComp);
+ }
+ if (maxComp > alpha && maxComp != lum) {
+ return lum + ((result - lum) * (alpha - lum)) / (maxComp - lum);
+ }
+ return result;
+}
+vec4 blend_luminosity(vec4 src, vec4 dst) {
+ float alpha = dst.w * src.w;
+ vec3 sda = src.xyz * dst.w;
+ vec3 dsa = dst.xyz * src.w;
+ return vec4((((_blend_set_color_luminance(dsa, alpha, sda) + dst.xyz) - dsa) + src.xyz) - sda, (src.w + dst.w) - alpha);
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ vec2 scaledOffset = vEllipseOffsets0_Stage0;
+ float test = dot(scaledOffset, scaledOffset) - 1.0;
+ vec2 duvdx = dFdx(vEllipseOffsets0_Stage0);
+ vec2 duvdy = -dFdy(vEllipseOffsets0_Stage0);
+ vec2 grad = vec2(vEllipseOffsets0_Stage0.x * duvdx.x + vEllipseOffsets0_Stage0.y * duvdx.y, vEllipseOffsets0_Stage0.x * duvdy.x + vEllipseOffsets0_Stage0.y * duvdy.y);
+ float grad_dot = 4.0 * dot(grad, grad);
+ grad_dot = max(grad_dot, 1.1754999560161448e-38);
+ float invlen = inversesqrt(grad_dot);
+ float edgeAlpha = clamp(0.5 - test * invlen, 0.0, 1.0);
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_dst_in(outputCoverage_Stage0, ClampedGradientEffect_Stage1_c0_c0(vec4(1.0)));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_luminosity(output_Stage1, CircularRRect_Stage2_c1_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec2 inEllipseOffsets0;
+in vec2 inEllipseOffsets1;
+noperspective out vec2 vEllipseOffsets0_Stage0;
+noperspective out vec2 vEllipseOffsets1_Stage0;
+noperspective out vec4 vinColor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vEllipseOffsets0_Stage0 = inEllipseOffsets0;
+ vEllipseOffsets1_Stage0 = inEllipseOffsets1;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = (uViewM_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/667-3.shader_test b/shaders/skia/667-3.shader_test
new file mode 100644
index 0000000..b736476
--- /dev/null
+++ b/shaders/skia/667-3.shader_test
@@ -0,0 +1,47 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 ClampFragmentProcessor_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = clamp(_input, 0.0, 1.0);
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_src_in(ClampFragmentProcessor_Stage2_c0_c0(vec4(1.0)), output_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/667.shader_test b/shaders/skia/667.shader_test
new file mode 100644
index 0000000..ece5896
--- /dev/null
+++ b/shaders/skia/667.shader_test
@@ -0,0 +1,87 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 ucolor_Stage1_c0_c0_c0_c0;
+uniform vec4 ucolor_Stage2;
+noperspective in vec4 vcolor_Stage0;
+vec4 ConstColorProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = _input.w * ucolor_Stage1_c0_c0_c0_c0;
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = ConstColorProcessor_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+float _blend_color_luminance(vec3 color) {
+ return dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), color);
+}
+vec3 _blend_set_color_luminance(vec3 hueSatColor, float alpha, vec3 lumColor) {
+ float lum = _blend_color_luminance(lumColor);
+ vec3 result = (lum - _blend_color_luminance(hueSatColor)) + hueSatColor;
+ float minComp = min(min(result.x, result.y), result.z);
+ float maxComp = max(max(result.x, result.y), result.z);
+ if (minComp < 0.0 && lum != minComp) {
+ result = lum + ((result - lum) * lum) / (lum - minComp);
+ }
+ if (maxComp > alpha && maxComp != lum) {
+ return lum + ((result - lum) * (alpha - lum)) / (maxComp - lum);
+ }
+ return result;
+}
+vec4 blend_color(vec4 src, vec4 dst) {
+ float alpha = dst.w * src.w;
+ vec3 sda = src.xyz * dst.w;
+ vec3 dsa = dst.xyz * src.w;
+ return vec4((((_blend_set_color_luminance(sda, alpha, dsa) + dst.xyz) - dsa) + src.xyz) - sda, (src.w + dst.w) - alpha);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_color(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ {
+ output_Stage2 = output_Stage1 * ucolor_Stage2;
+ }
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 position;
+in vec4 inColor;
+noperspective out vec4 vcolor_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/67-1.shader_test b/shaders/skia/67-1.shader_test
new file mode 100644
index 0000000..62d8599
--- /dev/null
+++ b/shaders/skia/67-1.shader_test
@@ -0,0 +1,68 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 TextureEffect_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage2, vTransformedCoords_1_Stage0) * _input;
+ return _output;
+}
+float _guarded_divide(float n, float d) {
+ return n / d;
+}
+float _soft_light_component(float sc, float sa, float dc, float da) {
+ if (2.0 * sc <= sa) {
+ return (_guarded_divide((dc * dc) * (sa - 2.0 * sc), da) + (1.0 - da) * sc) + dc * ((-sa + 2.0 * sc) + 1.0);
+ } else if (4.0 * dc <= da) {
+ float DSqd = dc * dc;
+ float DCub = DSqd * dc;
+ float DaSqd = da * da;
+ float DaCub = DaSqd * da;
+ return _guarded_divide(((DaSqd * (sc - dc * ((3.0 * sa - 6.0 * sc) - 1.0)) + ((12.0 * da) * DSqd) * (sa - 2.0 * sc)) - (16.0 * DCub) * (sa - 2.0 * sc)) - DaCub * sc, DaSqd);
+ }
+ return ((dc * ((sa - 2.0 * sc) + 1.0) + sc) - sqrt(da * dc) * (sa - 2.0 * sc)) - da * sc;
+}
+vec4 blend_soft_light(vec4 src, vec4 dst) {
+ if (dst.w == 0.0) {
+ return src;
+ }
+ return vec4(_soft_light_component(src.x, src.w, dst.x, dst.w), _soft_light_component(src.y, src.w, dst.y, dst.w), _soft_light_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_soft_light(output_Stage1, TextureEffect_Stage2_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/67-10.shader_test b/shaders/skia/67-10.shader_test
new file mode 100644
index 0000000..89fa7e1
--- /dev/null
+++ b/shaders/skia/67-10.shader_test
@@ -0,0 +1,89 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage2_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c1_c0;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+vec4 blend_dst_over(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src + dst;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_dst_in(outputColor_Stage0, ClampedGradientEffect_Stage1_c0_c0(vec4(1.0)));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_dst_over(ConstColorProcessor_Stage2_c1_c0(vec4(1.0)), output_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/67-11.shader_test b/shaders/skia/67-11.shader_test
new file mode 100644
index 0000000..4e57999
--- /dev/null
+++ b/shaders/skia/67-11.shader_test
@@ -0,0 +1,41 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform float uPixelSize_Stage1;
+uniform vec2 uRange_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0;
+ coord.y -= 16.0 * uPixelSize_Stage1;
+ for (int i = 0;i < 33; i++) {
+ output_Stage1 = max(output_Stage1, texture(uTextureSampler_0_Stage1, coord));
+ coord.y += uPixelSize_Stage1;
+ }
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/67-12.shader_test b/shaders/skia/67-12.shader_test
new file mode 100644
index 0000000..b53850f
--- /dev/null
+++ b/shaders/skia/67-12.shader_test
@@ -0,0 +1,153 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform float uSurfaceScale_Stage1;
+uniform vec3 uLightColor_Stage1;
+uniform float uKD_Stage1;
+uniform vec3 uLightLocation_Stage1;
+uniform float uExponent_Stage1;
+uniform float uCosInnerConeAngle_Stage1;
+uniform float uCosOuterConeAngle_Stage1;
+uniform float uConeScale_Stage1;
+uniform vec3 uS_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 light_Stage1(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ float colorScale = uKD_Stage1 * dot(normal, surfaceToLight);
+ return vec4(lightColor * clamp(colorScale, 0.0, 1.0), 1.0);
+}
+float sobel_Stage1(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage1(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage1(float m[9], float surfaceScale) {
+ return pointToNormal_Stage1(sobel_Stage1(0.0, 0.0, m[3], m[4], m[6], m[7], 0.66666698455810547), sobel_Stage1(m[3], m[6], m[4], m[7], 0.0, 0.0, 0.66666698455810547), surfaceScale);
+}
+vec3 lightColor_Stage1(vec3 surfaceToLight) {
+ float cosAngle = -dot(surfaceToLight, uS_Stage1);
+ if (cosAngle < uCosOuterConeAngle_Stage1) {
+ return vec3(0.0);
+ }
+ float scale = pow(cosAngle, uExponent_Stage1);
+ if (cosAngle < uCosInnerConeAngle_Stage1) {
+ return ((uLightColor_Stage1 * scale) * (cosAngle - uCosOuterConeAngle_Stage1)) * uConeScale_Stage1;
+ }
+ return uLightColor_Stage1;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ vec2 coord = vTransformedCoords_0_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp0 = textureColor;
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp1 = textureColor;
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp2 = textureColor;
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp3 = textureColor;
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp4 = textureColor;
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp5 = textureColor;
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp6 = textureColor;
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp7 = textureColor;
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp8 = textureColor;
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = normalize(uLightLocation_Stage1 - vec3(gl_FragCoord.xy, uSurfaceScale_Stage1 * m[4]));
+ output_Stage1 = light_Stage1(normal_Stage1(m, uSurfaceScale_Stage1), surfaceToLight, lightColor_Stage1(surfaceToLight));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/67-14.shader_test b/shaders/skia/67-14.shader_test
new file mode 100644
index 0000000..0edea91
--- /dev/null
+++ b/shaders/skia/67-14.shader_test
@@ -0,0 +1,44 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform float uPixelSize_Stage1;
+uniform vec2 uRange_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = vec4(1.0, 1.0, 1.0, 1.0);
+ vec2 coord = vTransformedCoords_0_Stage0;
+ coord.y -= 5.0 * uPixelSize_Stage1;
+ float highBound = min(uRange_Stage1.y, coord.y + 10.0 * uPixelSize_Stage1);
+ coord.y = max(uRange_Stage1.x, coord.y);
+ for (int i = 0;i < 11; i++) {
+ output_Stage1 = min(output_Stage1, texture(uTextureSampler_0_Stage1, coord));
+ coord.y += uPixelSize_Stage1;
+ coord.y = min(highBound, coord.y);
+ }
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/67-18.shader_test b/shaders/skia/67-18.shader_test
new file mode 100644
index 0000000..bf216dc
--- /dev/null
+++ b/shaders/skia/67-18.shader_test
@@ -0,0 +1,92 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 ubaseFrequency_Stage1_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+float perlinnoise_Stage1_c0_c0(float chanCoord, vec2 noiseVec) {
+ vec4 floorVal;
+ floorVal.xy = floor(noiseVec);
+ floorVal.zw = floorVal.xy + vec2(1.0);
+ vec2 fractVal = fract(noiseVec);
+ vec2 noiseSmooth = (fractVal * fractVal) * (vec2(3.0) - vec2(2.0) * fractVal);
+ floorVal = fract(floor(mod(floorVal, 256.0)) / vec4(256.0));
+ vec2 latticeIdx;
+ latticeIdx.x = texture(uTextureSampler_0_Stage1, vec2(floorVal.x, 0.5)).x;
+ latticeIdx.y = texture(uTextureSampler_0_Stage1, vec2(floorVal.z, 0.5)).x;
+ vec4 bcoords = fract(latticeIdx.xyxy + floorVal.yyww);
+ vec2 uv;
+ vec4 lattice = texture(uTextureSampler_1_Stage1, vec2(bcoords.x, chanCoord)).zyxw;
+ uv.x = dot((lattice.yw + lattice.xz * vec2(0.00390625)) * vec2(2.0) - vec2(1.0), fractVal);
+ fractVal.x -= 1.0;
+ lattice = texture(uTextureSampler_1_Stage1, vec2(bcoords.y, chanCoord)).zyxw;
+ uv.y = dot((lattice.yw + lattice.xz * vec2(0.00390625)) * vec2(2.0) - vec2(1.0), fractVal);
+ vec2 ab;
+ ab.x = mix(uv.x, uv.y, noiseSmooth.x);
+ fractVal.y -= 1.0;
+ lattice = texture(uTextureSampler_1_Stage1, vec2(bcoords.w, chanCoord)).zyxw;
+ uv.y = dot((lattice.yw + lattice.xz * vec2(0.00390625)) * vec2(2.0) - vec2(1.0), fractVal);
+ fractVal.x += 1.0;
+ lattice = texture(uTextureSampler_1_Stage1, vec2(bcoords.z, chanCoord)).zyxw;
+ uv.x = dot((lattice.yw + lattice.xz * vec2(0.00390625)) * vec2(2.0) - vec2(1.0), fractVal);
+ ab.y = mix(uv.x, uv.y, noiseSmooth.x);
+ return mix(ab.x, ab.y, noiseSmooth.y);
+}
+vec4 PerlinNoise_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 noiseVec = floor(vTransformedCoords_0_Stage0) * ubaseFrequency_Stage1_c0_c0;
+ _output = vec4(0.0);
+ float ratio = 1.0;
+ for (int octave = 0;octave < 1; ++octave) {
+ _output += vec4(perlinnoise_Stage1_c0_c0(0.125, noiseVec), perlinnoise_Stage1_c0_c0(0.375, noiseVec), perlinnoise_Stage1_c0_c0(0.625, noiseVec), perlinnoise_Stage1_c0_c0(0.875, noiseVec)) * ratio;
+ noiseVec *= vec2(2.0);
+ ratio *= 0.5;
+ }
+ _output = _output * vec4(0.5) + vec4(0.5);
+ _output = clamp(_output, 0.0, 1.0);
+ _output = vec4(_output.xyz * _output.www, _output.w);
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_dst_in(outputColor_Stage0, PerlinNoise_Stage1_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/67-2.shader_test b/shaders/skia/67-2.shader_test
new file mode 100644
index 0000000..e64cbf4
--- /dev/null
+++ b/shaders/skia/67-2.shader_test
@@ -0,0 +1,137 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uclamp_Stage1_c0_c0_c0_c0;
+uniform vec4 uclamp_Stage1_c0_c0_c1_c0;
+uniform vec4 uclamp_Stage1_c0_c0_c2_c0;
+uniform vec4 uclamp_Stage1_c0_c0_c3_c0;
+uniform mat4 um_Stage2;
+uniform vec4 uv_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+uniform sampler2D uTextureSampler_2_Stage1;
+uniform sampler2D uTextureSampler_3_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+noperspective in vec2 vTransformedCoords_3_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 inCoord = vTransformedCoords_0_Stage0;
+ vec2 subsetCoord;
+ subsetCoord.x = inCoord.x;
+ subsetCoord.y = inCoord.y;
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage1_c0_c0_c0_c0.x, uclamp_Stage1_c0_c0_c0_c0.z);
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage1_c0_c0_c0_c0.y, uclamp_Stage1_c0_c0_c0_c0.w);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ _output = _input * textureColor;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 inCoord = vTransformedCoords_1_Stage0;
+ vec2 subsetCoord;
+ subsetCoord.x = inCoord.x;
+ subsetCoord.y = inCoord.y;
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage1_c0_c0_c1_c0.x, uclamp_Stage1_c0_c0_c1_c0.z);
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage1_c0_c0_c1_c0.y, uclamp_Stage1_c0_c0_c1_c0.w);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ _output = _input * textureColor;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c0_c0_c2_c0(vec4 _input) {
+ vec4 _output;
+ vec2 inCoord = vTransformedCoords_2_Stage0;
+ vec2 subsetCoord;
+ subsetCoord.x = inCoord.x;
+ subsetCoord.y = inCoord.y;
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage1_c0_c0_c2_c0.x, uclamp_Stage1_c0_c0_c2_c0.z);
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage1_c0_c0_c2_c0.y, uclamp_Stage1_c0_c0_c2_c0.w);
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ _output = _input * textureColor;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c0_c0_c3_c0(vec4 _input) {
+ vec4 _output;
+ vec2 inCoord = vTransformedCoords_3_Stage0;
+ vec2 subsetCoord;
+ subsetCoord.x = inCoord.x;
+ subsetCoord.y = inCoord.y;
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage1_c0_c0_c3_c0.x, uclamp_Stage1_c0_c0_c3_c0.z);
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage1_c0_c0_c3_c0.y, uclamp_Stage1_c0_c0_c3_c0.w);
+ vec4 textureColor = texture(uTextureSampler_3_Stage1, clampedCoord);
+ _output = _input * textureColor;
+ return _output;
+}
+vec4 YUVtoRGBEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 planes[4];
+ planes[0] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0));
+ planes[1] = TextureEffect_Stage1_c0_c0_c1_c0(vec4(1.0));
+ planes[2] = TextureEffect_Stage1_c0_c0_c2_c0(vec4(1.0));
+ planes[3] = TextureEffect_Stage1_c0_c0_c3_c0(vec4(1.0));
+ vec4 color = vec4(planes[0].x, planes[2].x, planes[1].x, planes[3].w);
+ color.xyz *= color.w;
+ _output = color;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = YUVtoRGBEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ vec4 inputColor = output_Stage1;
+ {
+ float nonZeroAlpha = max(inputColor.w, 9.9999997473787516e-05);
+ inputColor = vec4(inputColor.xyz / nonZeroAlpha, inputColor.w);
+ }
+ output_Stage2 = um_Stage2 * inputColor + uv_Stage2;
+ {
+ output_Stage2 = clamp(output_Stage2, 0.0, 1.0);
+ }
+ {
+ output_Stage2.xyz *= output_Stage2.w;
+ }
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+uniform mat3 uCoordTransformMatrix_3_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+noperspective out vec2 vTransformedCoords_3_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_3_Stage0 = (uCoordTransformMatrix_3_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/67-24.shader_test b/shaders/skia/67-24.shader_test
new file mode 100644
index 0000000..e495ab9
--- /dev/null
+++ b/shaders/skia/67-24.shader_test
@@ -0,0 +1,470 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform vec4 uKernel_Stage1[7];
+uniform vec2 uKernelOffset_Stage1;
+uniform float uGain_Stage1;
+uniform float uBias_Stage1;
+uniform vec4 uTexDom_Stage1;
+uniform vec3 uDecalParams_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ vec4 sum = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0 - uKernelOffset_Stage1 * uImageIncrement_Stage1;
+ vec4 c;
+ {
+ float k = uKernel_Stage1[0].x;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[0].y;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[0].z;
+ {
+ vec2 origCoord = coord + vec2(2.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[0].w;
+ {
+ vec2 origCoord = coord + vec2(3.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[1].x;
+ {
+ vec2 origCoord = coord + vec2(4.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[1].y;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[1].z;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[1].w;
+ {
+ vec2 origCoord = coord + vec2(2.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[2].x;
+ {
+ vec2 origCoord = coord + vec2(3.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[2].y;
+ {
+ vec2 origCoord = coord + vec2(4.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[2].z;
+ {
+ vec2 origCoord = coord + vec2(0.0, 2.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[2].w;
+ {
+ vec2 origCoord = coord + vec2(1.0, 2.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[3].x;
+ {
+ vec2 origCoord = coord + vec2(2.0, 2.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[3].y;
+ {
+ vec2 origCoord = coord + vec2(3.0, 2.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[3].z;
+ {
+ vec2 origCoord = coord + vec2(4.0, 2.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[3].w;
+ {
+ vec2 origCoord = coord + vec2(0.0, 3.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[4].x;
+ {
+ vec2 origCoord = coord + vec2(1.0, 3.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[4].y;
+ {
+ vec2 origCoord = coord + vec2(2.0, 3.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[4].z;
+ {
+ vec2 origCoord = coord + vec2(3.0, 3.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[4].w;
+ {
+ vec2 origCoord = coord + vec2(4.0, 3.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[5].x;
+ {
+ vec2 origCoord = coord + vec2(0.0, 4.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[5].y;
+ {
+ vec2 origCoord = coord + vec2(1.0, 4.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[5].z;
+ {
+ vec2 origCoord = coord + vec2(2.0, 4.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[5].w;
+ {
+ vec2 origCoord = coord + vec2(3.0, 4.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[6].x;
+ {
+ vec2 origCoord = coord + vec2(4.0, 4.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ output_Stage1 = sum * uGain_Stage1 + uBias_Stage1;
+ output_Stage1.w = clamp(output_Stage1.w, 0.0, 1.0);
+ output_Stage1.xyz = clamp(output_Stage1.xyz, 0.0, output_Stage1.w);
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/67-25.shader_test b/shaders/skia/67-25.shader_test
new file mode 100644
index 0000000..7431195
--- /dev/null
+++ b/shaders/skia/67-25.shader_test
@@ -0,0 +1,85 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 uscale01_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias01_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale23_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias23_Stage1_c0_c0_c1_c0;
+uniform float uthreshold_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 RadialGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = length(vTransformedCoords_0_Stage0);
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 DualIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthreshold_Stage1_c0_c0_c1_c0) {
+ scale = uscale01_Stage1_c0_c0_c1_c0;
+ bias = ubias01_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale23_Stage1_c0_c0_c1_c0;
+ bias = ubias23_Stage1_c0_c0_c1_c0;
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = RadialGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = DualIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_dst_in(outputColor_Stage0, ClampedGradientEffect_Stage1_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/67-26.shader_test b/shaders/skia/67-26.shader_test
new file mode 100644
index 0000000..4198d0f
--- /dev/null
+++ b/shaders/skia/67-26.shader_test
@@ -0,0 +1,101 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 uscale01_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias01_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale23_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias23_Stage1_c0_c0_c1_c0;
+uniform float uthreshold_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 RadialGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = length(vTransformedCoords_0_Stage0);
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 DualIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthreshold_Stage1_c0_c0_c1_c0) {
+ scale = uscale01_Stage1_c0_c0_c1_c0;
+ bias = ubias01_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale23_Stage1_c0_c0_c1_c0;
+ bias = ubias23_Stage1_c0_c0_c1_c0;
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = RadialGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = DualIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_dst_in(outputColor_Stage0, ClampedGradientEffect_Stage1_c0_c0(vec4(1.0)));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_1_Stage0.x);
+ uint y = uint(vTransformedCoords_1_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ output_Stage2 = vec4(clamp(output_Stage2.xyz + value * 0.0039215688593685627, 0.0, output_Stage2.w), output_Stage2.w);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/67-27.shader_test b/shaders/skia/67-27.shader_test
new file mode 100644
index 0000000..20adfc8
--- /dev/null
+++ b/shaders/skia/67-27.shader_test
@@ -0,0 +1,78 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 TextureEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = TextureEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = OverrideInputFragmentProcessor_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+float _blend_overlay_component(float sc, float sa, float dc, float da) {
+ if (2.0 * dc <= da) {
+ return (2.0 * sc) * dc;
+ }
+ return sa * da - (2.0 * (da - dc)) * (sa - sc);
+}
+vec4 blend_overlay(vec4 src, vec4 dst) {
+ vec4 result = vec4(_blend_overlay_component(src.x, src.w, dst.x, dst.w), _blend_overlay_component(src.y, src.w, dst.y, dst.w), _blend_overlay_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+ result.xyz += dst.xyz * (1.0 - src.w) + src.xyz * (1.0 - dst.w);
+ return result;
+}
+vec4 blend_hard_light(vec4 src, vec4 dst) {
+ return blend_overlay(dst, src);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_hard_light(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec2 inLocalCoord;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 color = inColor;
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/67-29.shader_test b/shaders/skia/67-29.shader_test
new file mode 100644
index 0000000..7f8ffde
--- /dev/null
+++ b/shaders/skia/67-29.shader_test
@@ -0,0 +1,121 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 uleftBorderColor_Stage1_c1_c0_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c1_c0_c0_c0;
+uniform vec4 ustart_Stage1_c1_c0_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c1_c0_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = ClampedGradientEffect_Stage1_c0_c0_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ return _output;
+}
+vec4 LinearGradientLayout_Stage1_c1_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_1_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c1_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c1_c0_c0_c0_c1_c0 + t * uend_Stage1_c1_c0_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c1_c0_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c1_c0_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c1_c0_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c1_c0_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = ClampedGradientEffect_Stage1_c1_c0_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ return _output;
+}
+vec4 blend_xor(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src + (1.0 - src.w) * dst;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_xor(OverrideInputFragmentProcessor_Stage1_c0_c0(inputColor), OverrideInputFragmentProcessor_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/67-3.shader_test b/shaders/skia/67-3.shader_test
new file mode 100644
index 0000000..9693ca4
--- /dev/null
+++ b/shaders/skia/67-3.shader_test
@@ -0,0 +1,83 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform float uSrcTF_Stage2[7];
+uniform mat3 uColorXform_Stage2;
+uniform float uDstTF_Stage2[7];
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+float src_tf_Stage2(float x) {
+ float G = uSrcTF_Stage2[0];
+ float A = uSrcTF_Stage2[1];
+ float B = uSrcTF_Stage2[2];
+ float C = uSrcTF_Stage2[3];
+ float D = uSrcTF_Stage2[4];
+ float E = uSrcTF_Stage2[5];
+ float F = uSrcTF_Stage2[6];
+ float s = sign(x);
+ x = abs(x);
+ x = x < D ? C * x + F : pow(A * x + B, G) + E;
+ return s * x;
+}
+float dst_tf_Stage2(float x) {
+ float G = uDstTF_Stage2[0];
+ float A = uDstTF_Stage2[1];
+ float B = uDstTF_Stage2[2];
+ float C = uDstTF_Stage2[3];
+ float D = uDstTF_Stage2[4];
+ float E = uDstTF_Stage2[5];
+ float F = uDstTF_Stage2[6];
+ float s = sign(x);
+ x = abs(x);
+ x = x < D ? C * x + F : pow(A * x + B, G) + E;
+ return s * x;
+}
+vec4 gamut_xform_Stage2(vec4 color) {
+ color.xyz = uColorXform_Stage2 * color.xyz;
+ return color;
+}
+vec4 color_xform_Stage2(vec4 color) {
+ float nonZeroAlpha = max(color.w, 9.9999997473787516e-05);
+ color = vec4(color.xyz / nonZeroAlpha, nonZeroAlpha);
+ color.x = src_tf_Stage2(color.x);
+ color.y = src_tf_Stage2(color.y);
+ color.z = src_tf_Stage2(color.z);
+ color = gamut_xform_Stage2(color);
+ color.x = dst_tf_Stage2(color.x);
+ color.y = dst_tf_Stage2(color.y);
+ color.z = dst_tf_Stage2(color.z);
+ color.xyz *= color.w;
+ return color;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = color_xform_Stage2(output_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/67-30.shader_test b/shaders/skia/67-30.shader_test
new file mode 100644
index 0000000..9a0aed1
--- /dev/null
+++ b/shaders/skia/67-30.shader_test
@@ -0,0 +1,123 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uCoordTransformMatrix_2_Stage0;
+uniform vec4 ustart_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c0_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec4 vcolor_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c0_c0_c1_c0;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+vec4 ComposeOne_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_dst_in(_input, TiledGradientEffect_Stage1_c0_c0_c0_c0(vec4(1.0)));
+ return _output;
+}
+vec4 TextureEffect_Stage1_c1_c0_c0_c0(vec4 _input, vec2 _coords) {
+ _coords = _coords * uCoordTransformMatrix_2_Stage0.xz + uCoordTransformMatrix_2_Stage0.yw;
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, _coords) * _input;
+ return _output;
+}
+vec4 Bicubic_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coord = vTransformedCoords_1_Stage0 - vec2(0.5);
+ vec2 f = fract(coord);
+ coord += 0.5 - f;
+ vec4 wx = mat4(0.055555555555555552, 0.88888888888888884, 0.055555555555555552, 0.0, -0.5, 0.0, 0.5, 0.0, 0.83333333333333337, -2.0, 1.5, -0.33333333333333331, -0.3888888888888889, 1.1666666666666667, -1.1666666666666667, 0.3888888888888889) * vec4(1.0, f.x, f.x * f.x, (f.x * f.x) * f.x);
+ vec4 wy = mat4(0.055555555555555552, 0.88888888888888884, 0.055555555555555552, 0.0, -0.5, 0.0, 0.5, 0.0, 0.83333333333333337, -2.0, 1.5, -0.33333333333333331, -0.3888888888888889, 1.1666666666666667, -1.1666666666666667, 0.3888888888888889) * vec4(1.0, f.y, f.y * f.y, (f.y * f.y) * f.y);
+ vec4 rowColors[4];
+ rowColors[0] = TextureEffect_Stage1_c1_c0_c0_c0(vec4(1.0), coord + vec2(-1.0, -1.0));
+ rowColors[1] = TextureEffect_Stage1_c1_c0_c0_c0(vec4(1.0), coord + vec2(0.0, -1.0));
+ rowColors[2] = TextureEffect_Stage1_c1_c0_c0_c0(vec4(1.0), coord + vec2(1.0, -1.0));
+ rowColors[3] = TextureEffect_Stage1_c1_c0_c0_c0(vec4(1.0), coord + vec2(2.0, -1.0));
+ vec4 s0 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ rowColors[0] = TextureEffect_Stage1_c1_c0_c0_c0(vec4(1.0), coord + vec2(-1.0, 0.0));
+ rowColors[1] = TextureEffect_Stage1_c1_c0_c0_c0(vec4(1.0), coord);
+ rowColors[2] = TextureEffect_Stage1_c1_c0_c0_c0(vec4(1.0), coord + vec2(1.0, 0.0));
+ rowColors[3] = TextureEffect_Stage1_c1_c0_c0_c0(vec4(1.0), coord + vec2(2.0, 0.0));
+ vec4 s1 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ rowColors[0] = TextureEffect_Stage1_c1_c0_c0_c0(vec4(1.0), coord + vec2(-1.0, 1.0));
+ rowColors[1] = TextureEffect_Stage1_c1_c0_c0_c0(vec4(1.0), coord + vec2(0.0, 1.0));
+ rowColors[2] = TextureEffect_Stage1_c1_c0_c0_c0(vec4(1.0), coord + vec2(1.0, 1.0));
+ rowColors[3] = TextureEffect_Stage1_c1_c0_c0_c0(vec4(1.0), coord + vec2(2.0, 1.0));
+ vec4 s2 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ rowColors[0] = TextureEffect_Stage1_c1_c0_c0_c0(vec4(1.0), coord + vec2(-1.0, 2.0));
+ rowColors[1] = TextureEffect_Stage1_c1_c0_c0_c0(vec4(1.0), coord + vec2(0.0, 2.0));
+ rowColors[2] = TextureEffect_Stage1_c1_c0_c0_c0(vec4(1.0), coord + vec2(1.0, 2.0));
+ rowColors[3] = TextureEffect_Stage1_c1_c0_c0_c0(vec4(1.0), coord + vec2(2.0, 2.0));
+ vec4 s3 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ vec4 bicubicColor = ((wy.x * s0 + wy.y * s1) + wy.z * s2) + wy.w * s3;
+ bicubicColor.xyz = max(vec3(0.0), min(bicubicColor.xyz, bicubicColor.www));
+ _output = bicubicColor * _input;
+ return _output;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = Bicubic_Stage1_c1_c0(ComposeOne_Stage1_c0_c0(outputColor_Stage0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/67-37.shader_test b/shaders/skia/67-37.shader_test
new file mode 100644
index 0000000..94dc0e5
--- /dev/null
+++ b/shaders/skia/67-37.shader_test
@@ -0,0 +1,63 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec2 uDstTextureUpperLeft_Stage1;
+uniform vec2 uDstTextureCoordScale_Stage1;
+uniform sampler2D uDstTextureSampler_Stage1;
+noperspective in vec4 vQuadEdge_Stage0;
+noperspective in vec4 vinColor_Stage0;
+vec4 blend_src_out(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vinColor_Stage0;
+ float edgeAlpha;
+ vec2 duvdx = dFdx(vQuadEdge_Stage0.xy);
+ vec2 duvdy = -dFdy(vQuadEdge_Stage0.xy);
+ if (vQuadEdge_Stage0.z > 0.0 && vQuadEdge_Stage0.w > 0.0) {
+ edgeAlpha = min(min(vQuadEdge_Stage0.z, vQuadEdge_Stage0.w) + 0.5, 1.0);
+ } else {
+ vec2 gF = vec2((2.0 * vQuadEdge_Stage0.x) * duvdx.x - duvdx.y, (2.0 * vQuadEdge_Stage0.x) * duvdy.x - duvdy.y);
+ edgeAlpha = vQuadEdge_Stage0.x * vQuadEdge_Stage0.x - vQuadEdge_Stage0.y;
+ edgeAlpha = clamp(0.5 - edgeAlpha / length(gF), 0.0, 1.0);
+ }
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ {
+ if (all(lessThanEqual(outputCoverage_Stage0.xyz, vec3(0.0)))) {
+ discard;
+ }
+ vec2 _dstTexCoord = (gl_FragCoord.xy - uDstTextureUpperLeft_Stage1) * uDstTextureCoordScale_Stage1;
+ _dstTexCoord.y = 1.0 - _dstTexCoord.y;
+ vec4 _dstColor = texture(uDstTextureSampler_Stage1, _dstTexCoord);
+ sk_FragColor = blend_src_out(outputColor_Stage0, _dstColor);
+ sk_FragColor = outputCoverage_Stage0 * sk_FragColor + (vec4(1.0) - outputCoverage_Stage0) * _dstColor;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 inPosition;
+in vec4 inColor;
+in vec4 inQuadEdge;
+noperspective out vec4 vQuadEdge_Stage0;
+noperspective out vec4 vinColor_Stage0;
+void main() {
+ vQuadEdge_Stage0 = inQuadEdge;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = inPosition;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/67-39.shader_test b/shaders/skia/67-39.shader_test
new file mode 100644
index 0000000..c139af9
--- /dev/null
+++ b/shaders/skia/67-39.shader_test
@@ -0,0 +1,203 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage2;
+uniform float uSurfaceScale_Stage2;
+uniform vec3 uLightColor_Stage2;
+uniform float uKD_Stage2;
+uniform vec4 uTexDom_Stage2;
+uniform vec3 uDecalParams_Stage2;
+uniform vec3 uLightLocation_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 light_Stage2(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ float colorScale = uKD_Stage2 * dot(normal, surfaceToLight);
+ return vec4(lightColor * clamp(colorScale, 0.0, 1.0), 1.0);
+}
+float sobel_Stage2(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage2(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage2(float m[9], float surfaceScale) {
+ return pointToNormal_Stage2(sobel_Stage2(0.0, 0.0, m[4], m[5], m[7], m[8], 0.66666698455810547), sobel_Stage2(0.0, 0.0, m[4], m[7], m[5], m[8], 0.66666698455810547), surfaceScale);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ vec2 coord = vTransformedCoords_1_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp0 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp5 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp6 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp7 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp8 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = normalize(uLightLocation_Stage2 - vec3(gl_FragCoord.xy, uSurfaceScale_Stage2 * m[4]));
+ output_Stage2 = light_Stage2(normal_Stage2(m, uSurfaceScale_Stage2), surfaceToLight, uLightColor_Stage2);
+ output_Stage2 *= output_Stage1;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/67-4.shader_test b/shaders/skia/67-4.shader_test
new file mode 100644
index 0000000..a158005
--- /dev/null
+++ b/shaders/skia/67-4.shader_test
@@ -0,0 +1,76 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform mat3 ucolorSpaceMatrix_Stage1_c0_c0;
+uniform vec3 ucolorSpaceTranslate_Stage1_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+uniform sampler2D uTextureSampler_2_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_1_Stage1, vTransformedCoords_1_Stage0) * _input;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c0_c0_c2_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_2_Stage1, vTransformedCoords_2_Stage0) * _input;
+ return _output;
+}
+vec4 YUVtoRGBEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 planes[3];
+ planes[0] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0));
+ planes[1] = TextureEffect_Stage1_c0_c0_c1_c0(vec4(1.0));
+ planes[2] = TextureEffect_Stage1_c0_c0_c2_c0(vec4(1.0));
+ vec4 color = vec4(planes[0].w, planes[1].x, planes[1].y, planes[2].w);
+ color.xyz = clamp(color.xyz * ucolorSpaceMatrix_Stage1_c0_c0 + ucolorSpaceTranslate_Stage1_c0_c0, 0.0, 1.0);
+ color.xyz *= color.w;
+ _output = color;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = YUVtoRGBEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/67-5.shader_test b/shaders/skia/67-5.shader_test
new file mode 100644
index 0000000..e09a840
--- /dev/null
+++ b/shaders/skia/67-5.shader_test
@@ -0,0 +1,123 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uColor_Stage0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale8_9_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale10_11_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias8_9_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias10_11_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage2_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.w) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c1_c0;
+ }
+ }
+ } else {
+ {
+ if (t < uthresholds9_13_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale8_9_Stage1_c0_c0_c1_c0;
+ bias = ubias8_9_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale10_11_Stage1_c0_c0_c1_c0;
+ bias = ubias10_11_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c1_c0;
+ }
+ return _output;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 blend_darken(vec4 src, vec4 dst) {
+ vec4 result = blend_src_over(src, dst);
+ result.xyz = min(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
+ return result;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TiledGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_darken(ConstColorProcessor_Stage2_c1_c0(vec4(1.0)), output_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 inLocalCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec2 pos2 = position;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/67-7.shader_test b/shaders/skia/67-7.shader_test
new file mode 100644
index 0000000..9c27443
--- /dev/null
+++ b/shaders/skia/67-7.shader_test
@@ -0,0 +1,60 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform sampler2D uTextureSampler_0_Stage0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTextureCoords_Stage0;
+flat in int vTexIndex_Stage0;
+noperspective in vec4 vinColor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 TextureEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ vec4 texColor;
+ {
+ texColor = texture(uTextureSampler_0_Stage0, vTextureCoords_Stage0);
+ }
+ outputCoverage_Stage0 = texColor;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TextureEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1 * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform vec2 uAtlasSizeInv_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in uvec2 inTextureCoords;
+noperspective out vec2 vTextureCoords_Stage0;
+flat out int vTexIndex_Stage0;
+noperspective out vec4 vinColor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ ivec2 signedCoords = ivec2(int(inTextureCoords.x), int(inTextureCoords.y));
+ vec2 unormTexCoords = vec2(float(signedCoords.x / 2), float(signedCoords.y / 2));
+ vTextureCoords_Stage0 = unormTexCoords * uAtlasSizeInv_Stage0;
+ vTexIndex_Stage0 = 0;
+ vinColor_Stage0 = inColor;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(inPosition.x, inPosition.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/67-8.shader_test b/shaders/skia/67-8.shader_test
new file mode 100644
index 0000000..ed6ea6f
--- /dev/null
+++ b/shaders/skia/67-8.shader_test
@@ -0,0 +1,35 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uColor_Stage0;
+noperspective in float vinCoverage_Stage0;
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ float alpha = 1.0;
+ alpha = vinCoverage_Stage0;
+ outputCoverage_Stage0 = vec4(alpha);
+ }
+ {
+ sk_FragColor = outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 inPosition;
+in float inCoverage;
+noperspective out float vinCoverage_Stage0;
+void main() {
+ vec2 pos2 = inPosition;
+ vinCoverage_Stage0 = inCoverage;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/67-9.shader_test b/shaders/skia/67-9.shader_test
new file mode 100644
index 0000000..9165db4
--- /dev/null
+++ b/shaders/skia/67-9.shader_test
@@ -0,0 +1,44 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uinnerRect_Stage1;
+uniform vec2 uradiusPlusHalf_Stage1;
+flat in vec4 vcolor_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec2 dxy0 = uinnerRect_Stage1.xy - gl_FragCoord.xy;
+ vec2 dxy1 = gl_FragCoord.xy - uinnerRect_Stage1.zw;
+ vec2 dxy = max(max(dxy0, dxy1), 0.0);
+ float alpha = clamp(uradiusPlusHalf_Stage1.x - length(dxy), 0.0, 1.0);
+ alpha = 1.0 - alpha;
+ output_Stage1 = vec4(alpha);
+ }
+ {
+ sk_FragColor = outputColor_Stage0 * output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 position;
+in vec4 color;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/67.shader_test b/shaders/skia/67.shader_test
new file mode 100644
index 0000000..a13edbe
--- /dev/null
+++ b/shaders/skia/67.shader_test
@@ -0,0 +1,57 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 usubset_Stage1_c0_c0;
+uniform vec4 uclamp_Stage1_c0_c0;
+uniform sampler2DRect uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 inCoord = vTransformedCoords_0_Stage0;
+ vec2 subsetCoord;
+ subsetCoord.x = inCoord.x;
+ subsetCoord.y = mod(inCoord.y - usubset_Stage1_c0_c0.y, usubset_Stage1_c0_c0.w - usubset_Stage1_c0_c0.y) + usubset_Stage1_c0_c0.y;
+ vec2 clampedCoord;
+ clampedCoord.x = subsetCoord.x;
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage1_c0_c0.y, uclamp_Stage1_c0_c0.w);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float errY = subsetCoord.y - clampedCoord.y;
+ float repeatCoordY = errY > 0.0 ? uclamp_Stage1_c0_c0.y : uclamp_Stage1_c0_c0.w;
+ if (errY != 0.0) {
+ textureColor = mix(textureColor, texture(uTextureSampler_0_Stage1, vec2(clampedCoord.x, repeatCoordY)), abs(errY));
+ }
+ _output = _input * textureColor;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TextureEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/670-2.shader_test b/shaders/skia/670-2.shader_test
new file mode 100644
index 0000000..2bce9c2
--- /dev/null
+++ b/shaders/skia/670-2.shader_test
@@ -0,0 +1,41 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+noperspective in vec4 vinCircleEdge_Stage0;
+noperspective in vec4 vinColor_Stage0;
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ vec4 circleEdge;
+ circleEdge = vinCircleEdge_Stage0;
+ float d = length(circleEdge.xy);
+ float distanceToOuterEdge = circleEdge.z * (1.0 - d);
+ float edgeAlpha = clamp(distanceToOuterEdge, 0.0, 1.0);
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ {
+ sk_FragColor = 1.0 - outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 inPosition;
+in vec4 inColor;
+in vec4 inCircleEdge;
+noperspective out vec4 vinCircleEdge_Stage0;
+noperspective out vec4 vinColor_Stage0;
+void main() {
+ vinCircleEdge_Stage0 = inCircleEdge;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = inPosition;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/670-3.shader_test b/shaders/skia/670-3.shader_test
new file mode 100644
index 0000000..144f478
--- /dev/null
+++ b/shaders/skia/670-3.shader_test
@@ -0,0 +1,71 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 ColorTableEffect_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ float nonZeroAlpha = max(_input.w, 9.9999997473787516e-05);
+ vec4 coord = vec4(_input.xyz / nonZeroAlpha, nonZeroAlpha);
+ coord = coord * 0.9960939884185791 + vec4(0.0019529999699443579, 0.0019529999699443579, 0.0019529999699443579, 0.0019529999699443579);
+ _output.w = texture(uTextureSampler_0_Stage2, vec2(coord.w, 0.125)).w;
+ _output.x = texture(uTextureSampler_0_Stage2, vec2(coord.x, 0.375)).w;
+ _output.y = texture(uTextureSampler_0_Stage2, vec2(coord.y, 0.625)).w;
+ _output.z = texture(uTextureSampler_0_Stage2, vec2(coord.z, 0.875)).w;
+ _output.xyz *= _output.w;
+ return _output;
+}
+float _guarded_divide(float n, float d) {
+ return n / d;
+}
+float _soft_light_component(float sc, float sa, float dc, float da) {
+ if (2.0 * sc <= sa) {
+ return (_guarded_divide((dc * dc) * (sa - 2.0 * sc), da) + (1.0 - da) * sc) + dc * ((-sa + 2.0 * sc) + 1.0);
+ } else if (4.0 * dc <= da) {
+ float DSqd = dc * dc;
+ float DCub = DSqd * dc;
+ float DaSqd = da * da;
+ float DaCub = DaSqd * da;
+ return _guarded_divide(((DaSqd * (sc - dc * ((3.0 * sa - 6.0 * sc) - 1.0)) + ((12.0 * da) * DSqd) * (sa - 2.0 * sc)) - (16.0 * DCub) * (sa - 2.0 * sc)) - DaCub * sc, DaSqd);
+ }
+ return ((dc * ((sa - 2.0 * sc) + 1.0) + sc) - sqrt(da * dc) * (sa - 2.0 * sc)) - da * sc;
+}
+vec4 blend_soft_light(vec4 src, vec4 dst) {
+ if (dst.w == 0.0) {
+ return src;
+ }
+ return vec4(_soft_light_component(src.x, src.w, dst.x, dst.w), _soft_light_component(src.y, src.w, dst.y, dst.w), _soft_light_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_soft_light(ColorTableEffect_Stage2_c0_c0(vec4(1.0)), output_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/670.shader_test b/shaders/skia/670.shader_test
new file mode 100644
index 0000000..4858e46
--- /dev/null
+++ b/shaders/skia/670.shader_test
@@ -0,0 +1,184 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage2;
+uniform vec4 ucolor_Stage3_c1_c0;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.w) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ } else {
+ {
+ if (t < uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+vec4 ComposeOne_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_dst_in(_input, TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0)));
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = ComposeOne_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 ConstColorProcessor_Stage3_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage3_c1_c0;
+ }
+ return _output;
+}
+float _blend_color_luminance(vec3 color) {
+ return dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), color);
+}
+vec3 _blend_set_color_luminance(vec3 hueSatColor, float alpha, vec3 lumColor) {
+ float lum = _blend_color_luminance(lumColor);
+ vec3 result = (lum - _blend_color_luminance(hueSatColor)) + hueSatColor;
+ float minComp = min(min(result.x, result.y), result.z);
+ float maxComp = max(max(result.x, result.y), result.z);
+ if (minComp < 0.0 && lum != minComp) {
+ result = lum + ((result - lum) * lum) / (lum - minComp);
+ }
+ if (maxComp > alpha && maxComp != lum) {
+ return lum + ((result - lum) * (alpha - lum)) / (maxComp - lum);
+ }
+ return result;
+}
+vec4 blend_color(vec4 src, vec4 dst) {
+ float alpha = dst.w * src.w;
+ vec3 sda = src.xyz * dst.w;
+ vec3 dsa = dst.xyz * src.w;
+ return vec4((((_blend_set_color_luminance(sda, alpha, dsa) + dst.xyz) - dsa) + src.xyz) - sda, (src.w + dst.w) - alpha);
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 blend_darken(vec4 src, vec4 dst) {
+ vec4 result = blend_src_over(src, dst);
+ result.xyz = min(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
+ return result;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_color(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ {
+ output_Stage2 = output_Stage1 * ucolor_Stage2;
+ }
+ }
+ vec4 output_Stage3;
+ {
+ output_Stage3 = blend_darken(ConstColorProcessor_Stage3_c1_c0(vec4(1.0)), output_Stage2);
+ }
+ {
+ sk_FragColor = output_Stage3;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 inColor;
+in vec2 inLocalCoord;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/673-2.shader_test b/shaders/skia/673-2.shader_test
new file mode 100644
index 0000000..cb09299
--- /dev/null
+++ b/shaders/skia/673-2.shader_test
@@ -0,0 +1,160 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform float uSrcTF_Stage0[7];
+uniform mat3 uColorXform_Stage0;
+uniform float uDstTF_Stage0[7];
+uniform vec2 ubaseFrequency_Stage1;
+uniform float uz_Stage1;
+uniform mat4 um_Stage2;
+uniform vec4 uv_Stage2;
+uniform sampler2D uTextureSampler_0_Stage0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vtextureCoords_Stage0;
+flat in vec4 vtextureDomain_Stage0;
+flat in vec4 vcolor_Stage0;
+float src_tf_Stage0(float x) {
+ float G = uSrcTF_Stage0[0];
+ float A = uSrcTF_Stage0[1];
+ float B = uSrcTF_Stage0[2];
+ float C = uSrcTF_Stage0[3];
+ float D = uSrcTF_Stage0[4];
+ float E = uSrcTF_Stage0[5];
+ float F = uSrcTF_Stage0[6];
+ float s = sign(x);
+ x = abs(x);
+ x = x < D ? C * x + F : pow(A * x + B, G) + E;
+ return s * x;
+}
+float dst_tf_Stage0(float x) {
+ float G = uDstTF_Stage0[0];
+ float A = uDstTF_Stage0[1];
+ float B = uDstTF_Stage0[2];
+ float C = uDstTF_Stage0[3];
+ float D = uDstTF_Stage0[4];
+ float E = uDstTF_Stage0[5];
+ float F = uDstTF_Stage0[6];
+ float s = sign(x);
+ x = abs(x);
+ x = x < D ? C * x + F : pow(A * x + B, G) + E;
+ return s * x;
+}
+vec4 gamut_xform_Stage0(vec4 color) {
+ color.xyz = uColorXform_Stage0 * color.xyz;
+ return color;
+}
+vec4 color_xform_Stage0(vec4 color) {
+ float nonZeroAlpha = max(color.w, 9.9999997473787516e-05);
+ color = vec4(color.xyz / nonZeroAlpha, nonZeroAlpha);
+ color.x = src_tf_Stage0(color.x);
+ color.y = src_tf_Stage0(color.y);
+ color.z = src_tf_Stage0(color.z);
+ color = gamut_xform_Stage0(color);
+ color.x = dst_tf_Stage0(color.x);
+ color.y = dst_tf_Stage0(color.y);
+ color.z = dst_tf_Stage0(color.z);
+ color.xyz *= color.w;
+ return color;
+}
+vec3 fade_Stage1(vec3 t) {
+ return ((t * t) * t) * (t * (t * 6.0 - 15.0) + 10.0);
+}
+float perm_Stage1(float x) {
+ return texture(uTextureSampler_0_Stage1, vec2(fract(x / 256.0), 0.0)).x * 255.0;
+}
+float grad_Stage1(float x, vec3 p) {
+ return dot(texture(uTextureSampler_1_Stage1, vec2(fract(x / 16.0), 0.0)).xyz * 255.0 - vec3(1.0), p);
+}
+float lerp_Stage1(float a, float b, float w) {
+ return a + w * (b - a);
+}
+float noise_Stage1(vec3 p) {
+ vec3 P = mod(floor(p), 256.0);
+ p -= floor(p);
+ vec3 f = fade_Stage1(p);
+ float A = perm_Stage1(P.x) + P.y;
+ float AA = perm_Stage1(A) + P.z;
+ float AB = perm_Stage1(A + 1.0) + P.z;
+ float B = perm_Stage1(P.x + 1.0) + P.y;
+ float BA = perm_Stage1(B) + P.z;
+ float BB = perm_Stage1(B + 1.0) + P.z;
+ float result = lerp_Stage1(lerp_Stage1(lerp_Stage1(grad_Stage1(perm_Stage1(AA), p), grad_Stage1(perm_Stage1(BA), p + vec3(-1.0, 0.0, 0.0)), f.x), lerp_Stage1(grad_Stage1(perm_Stage1(AB), p + vec3(0.0, -1.0, 0.0)), grad_Stage1(perm_Stage1(BB), p + vec3(-1.0, -1.0, 0.0)), f.x), f.y), lerp_Stage1(lerp_Stage1(grad_Stage1(perm_Stage1(AA + 1.0), p + vec3(0.0, 0.0, -1.0)), grad_Stage1(perm_Stage1(BA + 1.0), p + vec3(-1.0, 0.0, -1.0)), f.x), lerp_Stage1(grad_Stage1(perm_Stage1(AB + 1.0), p + vec3(0.0, -1.0, -1.0)), grad_Stage1(perm_Stage1(BB + 1.0), p + vec3(-1.0, -1.0, -1.0)), f.x), f.y), f.z);
+ return result;
+}
+float noiseOctaves_Stage1(vec3 p) {
+ float result = 0.0;
+ float ratio = 1.0;
+ for (float i = 0.0;i < 5.0; i++) {
+ result += noise_Stage1(p) / ratio;
+ p *= 2.0;
+ ratio *= 2.0;
+ }
+ return (result + 1.0) / 2.0;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ vec2 textureCoords;
+ textureCoords = vtextureCoords_Stage0;
+ vec4 textureDomain;
+ textureDomain = vtextureDomain_Stage0;
+ outputColor_Stage0 = vcolor_Stage0;
+ outputColor_Stage0 = color_xform_Stage0(texture(uTextureSampler_0_Stage0, clamp(textureCoords, textureDomain.xy, textureDomain.zw))) * outputColor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec2 coords = vTransformedCoords_0_Stage0 * ubaseFrequency_Stage1;
+ float r = noiseOctaves_Stage1(vec3(coords, uz_Stage1));
+ float g = noiseOctaves_Stage1(vec3(coords, uz_Stage1));
+ float b = noiseOctaves_Stage1(vec3(coords, uz_Stage1));
+ float a = noiseOctaves_Stage1(vec3(coords, uz_Stage1));
+ output_Stage1 = vec4(r, g, b, a);
+ output_Stage1 = clamp(output_Stage1, 0.0, 1.0);
+ output_Stage1 = vec4(output_Stage1.xyz * output_Stage1.www, output_Stage1.w);
+ }
+ vec4 output_Stage2;
+ {
+ vec4 inputColor = output_Stage1;
+ {
+ float nonZeroAlpha = max(inputColor.w, 9.9999997473787516e-05);
+ inputColor = vec4(inputColor.xyz / nonZeroAlpha, inputColor.w);
+ }
+ output_Stage2 = um_Stage2 * inputColor + uv_Stage2;
+ {
+ output_Stage2.w = clamp(output_Stage2.w, 0.0, 1.0);
+ }
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 textureCoords;
+in vec4 textureDomain;
+in vec4 color;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vtextureCoords_Stage0;
+flat out vec4 vtextureDomain_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vec2 pos2 = position;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(textureCoords, 1.0)).xy;
+ vtextureCoords_Stage0 = textureCoords;
+ vtextureDomain_Stage0 = textureDomain;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/673-3.shader_test b/shaders/skia/673-3.shader_test
new file mode 100644
index 0000000..6f74069
--- /dev/null
+++ b/shaders/skia/673-3.shader_test
@@ -0,0 +1,315 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage2_c0_c0;
+uniform vec4 uKernel_Stage2_c0_c0[6];
+uniform vec2 uKernelOffset_Stage2_c0_c0;
+uniform float uGain_Stage2_c0_c0;
+uniform float uBias_Stage2_c0_c0;
+uniform vec4 uTexDom_Stage2_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 MatrixConvolution_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 sum = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_1_Stage0 - uKernelOffset_Stage2_c0_c0 * uImageIncrement_Stage2_c0_c0;
+ vec4 c;
+ {
+ float k = uKernel_Stage2_c0_c0[0].x;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2_c0_c0[0].y;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2_c0_c0[0].z;
+ {
+ vec2 origCoord = coord + vec2(2.0, 0.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2_c0_c0[0].w;
+ {
+ vec2 origCoord = coord + vec2(3.0, 0.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2_c0_c0[1].x;
+ {
+ vec2 origCoord = coord + vec2(4.0, 0.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2_c0_c0[1].y;
+ {
+ vec2 origCoord = coord + vec2(5.0, 0.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2_c0_c0[1].z;
+ {
+ vec2 origCoord = coord + vec2(6.0, 0.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2_c0_c0[1].w;
+ {
+ vec2 origCoord = coord + vec2(7.0, 0.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2_c0_c0[2].x;
+ {
+ vec2 origCoord = coord + vec2(8.0, 0.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2_c0_c0[2].y;
+ {
+ vec2 origCoord = coord + vec2(9.0, 0.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2_c0_c0[2].z;
+ {
+ vec2 origCoord = coord + vec2(10.0, 0.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2_c0_c0[2].w;
+ {
+ vec2 origCoord = coord + vec2(11.0, 0.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2_c0_c0[3].x;
+ {
+ vec2 origCoord = coord + vec2(12.0, 0.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2_c0_c0[3].y;
+ {
+ vec2 origCoord = coord + vec2(13.0, 0.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2_c0_c0[3].z;
+ {
+ vec2 origCoord = coord + vec2(14.0, 0.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2_c0_c0[3].w;
+ {
+ vec2 origCoord = coord + vec2(15.0, 0.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2_c0_c0[4].x;
+ {
+ vec2 origCoord = coord + vec2(16.0, 0.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2_c0_c0[4].y;
+ {
+ vec2 origCoord = coord + vec2(17.0, 0.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2_c0_c0[4].z;
+ {
+ vec2 origCoord = coord + vec2(18.0, 0.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2_c0_c0[4].w;
+ {
+ vec2 origCoord = coord + vec2(19.0, 0.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2_c0_c0[5].x;
+ {
+ vec2 origCoord = coord + vec2(20.0, 0.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2_c0_c0[5].y;
+ {
+ vec2 origCoord = coord + vec2(21.0, 0.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2_c0_c0[5].z;
+ {
+ vec2 origCoord = coord + vec2(22.0, 0.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ _output = sum * uGain_Stage2_c0_c0 + uBias_Stage2_c0_c0;
+ _output.w = clamp(_output.w, 0.0, 1.0);
+ _output.xyz = clamp(_output.xyz, 0.0, _output.w);
+ _output *= _input;
+ return _output;
+}
+vec4 blend_dst_over(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src + dst;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_dst_over(output_Stage1, MatrixConvolution_Stage2_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/673.shader_test b/shaders/skia/673.shader_test
new file mode 100644
index 0000000..988a200
--- /dev/null
+++ b/shaders/skia/673.shader_test
@@ -0,0 +1,107 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 ucolor_Stage1_c0_c0_c0_c0;
+uniform vec4 ucolor_Stage2;
+uniform vec4 ucolor_Stage3_c1_c0;
+noperspective in vec4 vcolor_Stage0;
+vec4 ConstColorProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = _input.w * ucolor_Stage1_c0_c0_c0_c0;
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = ConstColorProcessor_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 ConstColorProcessor_Stage3_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage3_c1_c0;
+ }
+ return _output;
+}
+float _blend_color_luminance(vec3 color) {
+ return dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), color);
+}
+vec3 _blend_set_color_luminance(vec3 hueSatColor, float alpha, vec3 lumColor) {
+ float lum = _blend_color_luminance(lumColor);
+ vec3 result = (lum - _blend_color_luminance(hueSatColor)) + hueSatColor;
+ float minComp = min(min(result.x, result.y), result.z);
+ float maxComp = max(max(result.x, result.y), result.z);
+ if (minComp < 0.0 && lum != minComp) {
+ result = lum + ((result - lum) * lum) / (lum - minComp);
+ }
+ if (maxComp > alpha && maxComp != lum) {
+ return lum + ((result - lum) * (alpha - lum)) / (maxComp - lum);
+ }
+ return result;
+}
+vec4 blend_color(vec4 src, vec4 dst) {
+ float alpha = dst.w * src.w;
+ vec3 sda = src.xyz * dst.w;
+ vec3 dsa = dst.xyz * src.w;
+ return vec4((((_blend_set_color_luminance(sda, alpha, dsa) + dst.xyz) - dsa) + src.xyz) - sda, (src.w + dst.w) - alpha);
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 blend_darken(vec4 src, vec4 dst) {
+ vec4 result = blend_src_over(src, dst);
+ result.xyz = min(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
+ return result;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_color(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ {
+ output_Stage2 = output_Stage1 * ucolor_Stage2;
+ }
+ }
+ vec4 output_Stage3;
+ {
+ output_Stage3 = blend_darken(ConstColorProcessor_Stage3_c1_c0(vec4(1.0)), output_Stage2);
+ }
+ {
+ sk_FragColor = output_Stage3;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 position;
+in vec4 inColor;
+noperspective out vec4 vcolor_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/676-2.shader_test b/shaders/skia/676-2.shader_test
new file mode 100644
index 0000000..5add37d
--- /dev/null
+++ b/shaders/skia/676-2.shader_test
@@ -0,0 +1,51 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+in vec2 vEllipseOffsets0_Stage0;
+in vec2 vEllipseOffsets1_Stage0;
+in vec4 vinColor_Stage0;
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ vec2 scaledOffset = vEllipseOffsets0_Stage0;
+ float test = dot(scaledOffset, scaledOffset) - 1.0;
+ vec2 duvdx = dFdx(vEllipseOffsets0_Stage0);
+ vec2 duvdy = dFdy(vEllipseOffsets0_Stage0);
+ vec2 grad = vec2(vEllipseOffsets0_Stage0.x * duvdx.x + vEllipseOffsets0_Stage0.y * duvdx.y, vEllipseOffsets0_Stage0.x * duvdy.x + vEllipseOffsets0_Stage0.y * duvdy.y);
+ float grad_dot = 4.0 * dot(grad, grad);
+ grad_dot = max(grad_dot, 1.1754999560161448e-38);
+ float invlen = inversesqrt(grad_dot);
+ float edgeAlpha = clamp(1.0 - test * invlen, 0.0, 1.0);
+ edgeAlpha *= clamp(1.0 + test * invlen, 0.0, 1.0);
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ {
+ sk_FragColor = 1.0 - outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec2 inEllipseOffsets0;
+in vec2 inEllipseOffsets1;
+out vec2 vEllipseOffsets0_Stage0;
+out vec2 vEllipseOffsets1_Stage0;
+out vec4 vinColor_Stage0;
+void main() {
+ vEllipseOffsets0_Stage0 = inEllipseOffsets0;
+ vEllipseOffsets1_Stage0 = inEllipseOffsets1;
+ vinColor_Stage0 = inColor;
+ vec3 pos3 = uViewM_Stage0 * vec3(inPosition, 1.0);
+ gl_Position = vec4(pos3.x, pos3.y, 0.0, pos3.z);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/676-3.shader_test b/shaders/skia/676-3.shader_test
new file mode 100644
index 0000000..4d3261f
--- /dev/null
+++ b/shaders/skia/676-3.shader_test
@@ -0,0 +1,95 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 ubaseFrequency_Stage2_c0_c0;
+uniform float uz_Stage2_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+uniform sampler2D uTextureSampler_1_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec3 fade_Stage2_c0_c0(vec3 t) {
+ return ((t * t) * t) * (t * (t * 6.0 - 15.0) + 10.0);
+}
+float perm_Stage2_c0_c0(float x) {
+ return texture(uTextureSampler_0_Stage2, vec2(fract(x / 256.0), 0.0)).x * 255.0;
+}
+float grad_Stage2_c0_c0(float x, vec3 p) {
+ return dot(texture(uTextureSampler_1_Stage2, vec2(fract(x / 16.0), 0.0)).xyz * 255.0 - vec3(1.0), p);
+}
+float lerp_Stage2_c0_c0(float a, float b, float w) {
+ return a + w * (b - a);
+}
+float noise_Stage2_c0_c0(vec3 p) {
+ vec3 P = mod(floor(p), 256.0);
+ p -= floor(p);
+ vec3 f = fade_Stage2_c0_c0(p);
+ float A = perm_Stage2_c0_c0(P.x) + P.y;
+ float AA = perm_Stage2_c0_c0(A) + P.z;
+ float AB = perm_Stage2_c0_c0(A + 1.0) + P.z;
+ float B = perm_Stage2_c0_c0(P.x + 1.0) + P.y;
+ float BA = perm_Stage2_c0_c0(B) + P.z;
+ float BB = perm_Stage2_c0_c0(B + 1.0) + P.z;
+ float result = lerp_Stage2_c0_c0(lerp_Stage2_c0_c0(lerp_Stage2_c0_c0(grad_Stage2_c0_c0(perm_Stage2_c0_c0(AA), p), grad_Stage2_c0_c0(perm_Stage2_c0_c0(BA), p + vec3(-1.0, 0.0, 0.0)), f.x), lerp_Stage2_c0_c0(grad_Stage2_c0_c0(perm_Stage2_c0_c0(AB), p + vec3(0.0, -1.0, 0.0)), grad_Stage2_c0_c0(perm_Stage2_c0_c0(BB), p + vec3(-1.0, -1.0, 0.0)), f.x), f.y), lerp_Stage2_c0_c0(lerp_Stage2_c0_c0(grad_Stage2_c0_c0(perm_Stage2_c0_c0(AA + 1.0), p + vec3(0.0, 0.0, -1.0)), grad_Stage2_c0_c0(perm_Stage2_c0_c0(BA + 1.0), p + vec3(-1.0, 0.0, -1.0)), f.x), lerp_Stage2_c0_c0(grad_Stage2_c0_c0(perm_Stage2_c0_c0(AB + 1.0), p + vec3(0.0, -1.0, -1.0)), grad_Stage2_c0_c0(perm_Stage2_c0_c0(BB + 1.0), p + vec3(-1.0, -1.0, -1.0)), f.x), f.y), f.z);
+ return result;
+}
+float noiseOctaves_Stage2_c0_c0(vec3 p) {
+ float result = 0.0;
+ float ratio = 1.0;
+ for (float i = 0.0;i < 10.0; i++) {
+ result += noise_Stage2_c0_c0(p) / ratio;
+ p *= 2.0;
+ ratio *= 2.0;
+ }
+ return (result + 1.0) / 2.0;
+}
+vec4 ImprovedPerlinNoise_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coords = vTransformedCoords_1_Stage0 * ubaseFrequency_Stage2_c0_c0;
+ float r = noiseOctaves_Stage2_c0_c0(vec3(coords, uz_Stage2_c0_c0));
+ float g = noiseOctaves_Stage2_c0_c0(vec3(coords, uz_Stage2_c0_c0));
+ float b = noiseOctaves_Stage2_c0_c0(vec3(coords, uz_Stage2_c0_c0));
+ float a = noiseOctaves_Stage2_c0_c0(vec3(coords, uz_Stage2_c0_c0));
+ _output = vec4(r, g, b, a);
+ _output = clamp(_output, 0.0, 1.0);
+ _output = vec4(_output.xyz * _output.www, _output.w);
+ return _output;
+}
+vec4 blend_multiply(vec4 src, vec4 dst) {
+ return vec4(((1.0 - src.w) * dst.xyz + (1.0 - dst.w) * src.xyz) + src.xyz * dst.xyz, src.w + (1.0 - src.w) * dst.w);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_multiply(output_Stage1, ImprovedPerlinNoise_Stage2_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/676.shader_test b/shaders/skia/676.shader_test
new file mode 100644
index 0000000..0054ced
--- /dev/null
+++ b/shaders/skia/676.shader_test
@@ -0,0 +1,151 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.w) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ } else {
+ {
+ if (t < uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = OverrideInputFragmentProcessor_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+float _blend_color_luminance(vec3 color) {
+ return dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), color);
+}
+vec3 _blend_set_color_luminance(vec3 hueSatColor, float alpha, vec3 lumColor) {
+ float lum = _blend_color_luminance(lumColor);
+ vec3 result = (lum - _blend_color_luminance(hueSatColor)) + hueSatColor;
+ float minComp = min(min(result.x, result.y), result.z);
+ float maxComp = max(max(result.x, result.y), result.z);
+ if (minComp < 0.0 && lum != minComp) {
+ result = lum + ((result - lum) * lum) / (lum - minComp);
+ }
+ if (maxComp > alpha && maxComp != lum) {
+ return lum + ((result - lum) * (alpha - lum)) / (maxComp - lum);
+ }
+ return result;
+}
+vec4 blend_luminosity(vec4 src, vec4 dst) {
+ float alpha = dst.w * src.w;
+ vec3 sda = src.xyz * dst.w;
+ vec3 dsa = dst.xyz * src.w;
+ return vec4((((_blend_set_color_luminance(dsa, alpha, sda) + dst.xyz) - dsa) + src.xyz) - sda, (src.w + dst.w) - alpha);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_luminosity(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 inColor;
+in vec2 inLocalCoord;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/679-2.shader_test b/shaders/skia/679-2.shader_test
new file mode 100644
index 0000000..bacb0d4
--- /dev/null
+++ b/shaders/skia/679-2.shader_test
@@ -0,0 +1,330 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec2 uBounds_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 uKernel_Stage1_c0_c0_c0_c0_c1_c0[4];
+uniform vec4 uellipse_Stage1_c0_c0_c1_c0_c0_c0;
+uniform vec4 urectUniform_Stage1_c0_c0_c1_c0_c1_c0;
+uniform vec2 uScale_Stage1_c1_c0_c0_c0;
+uniform vec4 uTexDom_Stage1_c1_c0_c0_c0;
+uniform vec3 uDecalParams_Stage1_c1_c0_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+uniform sampler2D uTextureSampler_2_Stage1;
+uniform sampler2D uTextureSampler_3_Stage1;
+noperspective in vec4 vinCircleEdge_Stage0;
+noperspective in vec4 vinColor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+vec4 ColorTableEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float nonZeroAlpha = max(_input.w, 9.9999997473787516e-05);
+ vec4 coord = vec4(_input.xyz / nonZeroAlpha, nonZeroAlpha);
+ coord = coord * 0.9960939884185791 + vec4(0.0019529999699443579, 0.0019529999699443579, 0.0019529999699443579, 0.0019529999699443579);
+ _output.w = texture(uTextureSampler_0_Stage1, vec2(coord.w, 0.125)).w;
+ _output.x = texture(uTextureSampler_0_Stage1, vec2(coord.x, 0.375)).w;
+ _output.y = texture(uTextureSampler_0_Stage1, vec2(coord.y, 0.625)).w;
+ _output.z = texture(uTextureSampler_0_Stage1, vec2(coord.z, 0.875)).w;
+ _output.xyz *= _output.w;
+ return _output;
+}
+vec4 GaussianConvolution_Stage1_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0 - 6.0 * uImageIncrement_Stage1_c0_c0_c0_c0_c1_c0;
+ vec2 coordSampled = vec2(0.0, 0.0);
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage1_c0_c0_c0_c0_c1_c0.x && coord.y <= uBounds_Stage1_c0_c0_c0_c0_c1_c0.y) {
+ _output += texture(uTextureSampler_1_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c0_c0_c1_c0[0].x;
+ }
+ coord += uImageIncrement_Stage1_c0_c0_c0_c0_c1_c0;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage1_c0_c0_c0_c0_c1_c0.x && coord.y <= uBounds_Stage1_c0_c0_c0_c0_c1_c0.y) {
+ _output += texture(uTextureSampler_1_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c0_c0_c1_c0[0].y;
+ }
+ coord += uImageIncrement_Stage1_c0_c0_c0_c0_c1_c0;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage1_c0_c0_c0_c0_c1_c0.x && coord.y <= uBounds_Stage1_c0_c0_c0_c0_c1_c0.y) {
+ _output += texture(uTextureSampler_1_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c0_c0_c1_c0[0].z;
+ }
+ coord += uImageIncrement_Stage1_c0_c0_c0_c0_c1_c0;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage1_c0_c0_c0_c0_c1_c0.x && coord.y <= uBounds_Stage1_c0_c0_c0_c0_c1_c0.y) {
+ _output += texture(uTextureSampler_1_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c0_c0_c1_c0[0].w;
+ }
+ coord += uImageIncrement_Stage1_c0_c0_c0_c0_c1_c0;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage1_c0_c0_c0_c0_c1_c0.x && coord.y <= uBounds_Stage1_c0_c0_c0_c0_c1_c0.y) {
+ _output += texture(uTextureSampler_1_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c0_c0_c1_c0[1].x;
+ }
+ coord += uImageIncrement_Stage1_c0_c0_c0_c0_c1_c0;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage1_c0_c0_c0_c0_c1_c0.x && coord.y <= uBounds_Stage1_c0_c0_c0_c0_c1_c0.y) {
+ _output += texture(uTextureSampler_1_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c0_c0_c1_c0[1].y;
+ }
+ coord += uImageIncrement_Stage1_c0_c0_c0_c0_c1_c0;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage1_c0_c0_c0_c0_c1_c0.x && coord.y <= uBounds_Stage1_c0_c0_c0_c0_c1_c0.y) {
+ _output += texture(uTextureSampler_1_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c0_c0_c1_c0[1].z;
+ }
+ coord += uImageIncrement_Stage1_c0_c0_c0_c0_c1_c0;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage1_c0_c0_c0_c0_c1_c0.x && coord.y <= uBounds_Stage1_c0_c0_c0_c0_c1_c0.y) {
+ _output += texture(uTextureSampler_1_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c0_c0_c1_c0[1].w;
+ }
+ coord += uImageIncrement_Stage1_c0_c0_c0_c0_c1_c0;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage1_c0_c0_c0_c0_c1_c0.x && coord.y <= uBounds_Stage1_c0_c0_c0_c0_c1_c0.y) {
+ _output += texture(uTextureSampler_1_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c0_c0_c1_c0[2].x;
+ }
+ coord += uImageIncrement_Stage1_c0_c0_c0_c0_c1_c0;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage1_c0_c0_c0_c0_c1_c0.x && coord.y <= uBounds_Stage1_c0_c0_c0_c0_c1_c0.y) {
+ _output += texture(uTextureSampler_1_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c0_c0_c1_c0[2].y;
+ }
+ coord += uImageIncrement_Stage1_c0_c0_c0_c0_c1_c0;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage1_c0_c0_c0_c0_c1_c0.x && coord.y <= uBounds_Stage1_c0_c0_c0_c0_c1_c0.y) {
+ _output += texture(uTextureSampler_1_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c0_c0_c1_c0[2].z;
+ }
+ coord += uImageIncrement_Stage1_c0_c0_c0_c0_c1_c0;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage1_c0_c0_c0_c0_c1_c0.x && coord.y <= uBounds_Stage1_c0_c0_c0_c0_c1_c0.y) {
+ _output += texture(uTextureSampler_1_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c0_c0_c1_c0[2].w;
+ }
+ coord += uImageIncrement_Stage1_c0_c0_c0_c0_c1_c0;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage1_c0_c0_c0_c0_c1_c0.x && coord.y <= uBounds_Stage1_c0_c0_c0_c0_c1_c0.y) {
+ _output += texture(uTextureSampler_1_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c0_c0_c1_c0[3].x;
+ }
+ coord += uImageIncrement_Stage1_c0_c0_c0_c0_c1_c0;
+ _output *= _input;
+ return _output;
+}
+float _guarded_divide(float n, float d) {
+ return n / d;
+}
+float _color_dodge_component(float sc, float sa, float dc, float da) {
+ if (dc == 0.0) {
+ return sc * (1.0 - da);
+ } else {
+ float d = sa - sc;
+ if (d == 0.0) {
+ return (sa * da + sc * (1.0 - da)) + dc * (1.0 - sa);
+ }
+ d = min(da, _guarded_divide(dc * sa, d));
+ return (d * sa + sc * (1.0 - da)) + dc * (1.0 - sa);
+ }
+}
+vec4 blend_color_dodge(vec4 src, vec4 dst) {
+ return vec4(_color_dodge_component(src.x, src.w, dst.x, dst.w), _color_dodge_component(src.y, src.w, dst.y, dst.w), _color_dodge_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+}
+vec4 ComposeTwo_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_color_dodge(ColorTableEffect_Stage1_c0_c0_c0_c0_c0_c0(inputColor), GaussianConvolution_Stage1_c0_c0_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 EllipseEffect_Stage1_c0_c0_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 d = gl_FragCoord.xy - uellipse_Stage1_c0_c0_c1_c0_c0_c0.xy;
+ vec2 Z = d * uellipse_Stage1_c0_c0_c1_c0_c0_c0.zw;
+ float implicit = dot(Z, d) - 1.0;
+ float grad_dot = 4.0 * dot(Z, Z);
+ {
+ grad_dot = max(grad_dot, 1.1754999560161448e-38);
+ }
+ float approx_dist = implicit * inversesqrt(grad_dot);
+ float alpha;
+ {
+ alpha = clamp(0.5 - approx_dist, 0.0, 1.0);
+ }
+ _output = _input * alpha;
+ return _output;
+}
+vec4 AARectEffect_Stage1_c0_c0_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float alpha;
+ {
+ float xSub, ySub;
+ xSub = min(gl_FragCoord.x - urectUniform_Stage1_c0_c0_c1_c0_c1_c0.x, 0.0);
+ xSub += min(urectUniform_Stage1_c0_c0_c1_c0_c1_c0.z - gl_FragCoord.x, 0.0);
+ ySub = min(gl_FragCoord.y - urectUniform_Stage1_c0_c0_c1_c0_c1_c0.y, 0.0);
+ ySub += min(urectUniform_Stage1_c0_c0_c1_c0_c1_c0.w - gl_FragCoord.y, 0.0);
+ alpha = (1.0 + max(xSub, -1.0)) * (1.0 + max(ySub, -1.0));
+ }
+ {
+ alpha = 1.0 - alpha;
+ }
+ _output = _input * alpha;
+ return _output;
+}
+vec4 blend_src_out(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src;
+}
+vec4 ComposeTwo_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_src_out(EllipseEffect_Stage1_c0_c0_c1_c0_c0_c0(inputColor), AARectEffect_Stage1_c0_c0_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+float _blend_color_saturation(vec3 color) {
+ return max(max(color.x, color.y), color.z) - min(min(color.x, color.y), color.z);
+}
+vec3 _blend_set_color_saturation_helper(vec3 minMidMax, float sat) {
+ if (minMidMax.x < minMidMax.z) {
+ return vec3(0.0, (sat * (minMidMax.y - minMidMax.x)) / (minMidMax.z - minMidMax.x), sat);
+ }
+ return vec3(0.0);
+}
+vec3 _blend_set_color_saturation(vec3 hueLumColor, vec3 satColor) {
+ float sat = _blend_color_saturation(satColor);
+ if (hueLumColor.x <= hueLumColor.y) {
+ if (hueLumColor.y <= hueLumColor.z) {
+ hueLumColor.xyz = _blend_set_color_saturation_helper(hueLumColor, sat);
+ } else if (hueLumColor.x <= hueLumColor.z) {
+ hueLumColor.xzy = _blend_set_color_saturation_helper(hueLumColor.xzy, sat);
+ } else {
+ hueLumColor.zxy = _blend_set_color_saturation_helper(hueLumColor.zxy, sat);
+ }
+ } else if (hueLumColor.x <= hueLumColor.z) {
+ hueLumColor.yxz = _blend_set_color_saturation_helper(hueLumColor.yxz, sat);
+ } else if (hueLumColor.y <= hueLumColor.z) {
+ hueLumColor.yzx = _blend_set_color_saturation_helper(hueLumColor.yzx, sat);
+ } else {
+ hueLumColor.zyx = _blend_set_color_saturation_helper(hueLumColor.zyx, sat);
+ }
+ return hueLumColor;
+}
+float _blend_color_luminance(vec3 color) {
+ return dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), color);
+}
+vec3 _blend_set_color_luminance(vec3 hueSatColor, float alpha, vec3 lumColor) {
+ float lum = _blend_color_luminance(lumColor);
+ vec3 result = (lum - _blend_color_luminance(hueSatColor)) + hueSatColor;
+ float minComp = min(min(result.x, result.y), result.z);
+ float maxComp = max(max(result.x, result.y), result.z);
+ if (minComp < 0.0 && lum != minComp) {
+ result = lum + ((result - lum) * lum) / (lum - minComp);
+ }
+ if (maxComp > alpha && maxComp != lum) {
+ return lum + ((result - lum) * (alpha - lum)) / (maxComp - lum);
+ }
+ return result;
+}
+vec4 blend_saturation(vec4 src, vec4 dst) {
+ float alpha = dst.w * src.w;
+ vec3 sda = src.xyz * dst.w;
+ vec3 dsa = dst.xyz * src.w;
+ return vec4((((_blend_set_color_luminance(_blend_set_color_saturation(dsa, sda), alpha, dsa) + dst.xyz) - dsa) + src.xyz) - sda, (src.w + dst.w) - alpha);
+}
+vec4 ComposeTwo_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_saturation(ComposeTwo_Stage1_c0_c0_c0_c0(inputColor), ComposeTwo_Stage1_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 DisplacementMap_Stage1_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 dColor = texture(uTextureSampler_2_Stage1, vTransformedCoords_1_Stage0);
+ dColor.xyz = dColor.w < 9.9999999747524271e-07 ? vec3(0.0) : clamp(dColor.xyz / dColor.w, 0.0, 1.0);
+ vec2 cCoords = vTransformedCoords_2_Stage0 + uScale_Stage1_c1_c0_c0_c0 * (dColor.zw - vec2(0.5));
+ {
+ vec2 origCoord = cCoords;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0.xy, uTexDom_Stage1_c1_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_3_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ _output = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ return _output;
+}
+vec4 ClampFragmentProcessor_Stage1_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ float alpha = clamp(_input.w, 0.0, 1.0);
+ _output = vec4(clamp(_input.xyz, 0.0, alpha), alpha);
+ }
+ return _output;
+}
+vec4 blend_dst_atop(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src + src.w * dst;
+}
+vec4 ComposeTwo_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_dst_atop(DisplacementMap_Stage1_c1_c0_c0_c0(inputColor), ClampFragmentProcessor_Stage1_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ vec4 circleEdge;
+ circleEdge = vinCircleEdge_Stage0;
+ outputColor_Stage0 = vinColor_Stage0;
+ float d = length(circleEdge.xy);
+ float distanceToOuterEdge = circleEdge.z * (1.0 - d);
+ float edgeAlpha = clamp(distanceToOuterEdge, 0.0, 1.0);
+ float distanceToInnerEdge = circleEdge.z * (d - circleEdge.w);
+ float innerAlpha = clamp(distanceToInnerEdge, 0.0, 1.0);
+ edgeAlpha *= innerAlpha;
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_src_over(ComposeTwo_Stage1_c0_c0(inputColor), ComposeTwo_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ sk_FragColor = (vec4(1.0) - output_Stage1) * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec4 inCircleEdge;
+noperspective out vec4 vinCircleEdge_Stage0;
+noperspective out vec4 vinColor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+void main() {
+ vinCircleEdge_Stage0 = inCircleEdge;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/679-3.shader_test b/shaders/skia/679-3.shader_test
new file mode 100644
index 0000000..f310b11
--- /dev/null
+++ b/shaders/skia/679-3.shader_test
@@ -0,0 +1,48 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 ucolor_Stage2_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 ConstColorProcessor_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c0_c0;
+ }
+ return _output;
+}
+vec4 blend_dst(vec4 src, vec4 dst) {
+ return dst;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_dst(output_Stage1, ConstColorProcessor_Stage2_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/679.shader_test b/shaders/skia/679.shader_test
new file mode 100644
index 0000000..436c881
--- /dev/null
+++ b/shaders/skia/679.shader_test
@@ -0,0 +1,80 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 ucolor_Stage1_c0_c0_c0_c0;
+noperspective in vec4 vcolor_Stage0;
+vec4 ConstColorProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = _input.w * ucolor_Stage1_c0_c0_c0_c0;
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = ConstColorProcessor_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+float _blend_color_luminance(vec3 color) {
+ return dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), color);
+}
+vec3 _blend_set_color_luminance(vec3 hueSatColor, float alpha, vec3 lumColor) {
+ float lum = _blend_color_luminance(lumColor);
+ vec3 result = (lum - _blend_color_luminance(hueSatColor)) + hueSatColor;
+ float minComp = min(min(result.x, result.y), result.z);
+ float maxComp = max(max(result.x, result.y), result.z);
+ if (minComp < 0.0 && lum != minComp) {
+ result = lum + ((result - lum) * lum) / (lum - minComp);
+ }
+ if (maxComp > alpha && maxComp != lum) {
+ return lum + ((result - lum) * (alpha - lum)) / (maxComp - lum);
+ }
+ return result;
+}
+vec4 blend_luminosity(vec4 src, vec4 dst) {
+ float alpha = dst.w * src.w;
+ vec3 sda = src.xyz * dst.w;
+ vec3 dsa = dst.xyz * src.w;
+ return vec4((((_blend_set_color_luminance(dsa, alpha, sda) + dst.xyz) - dsa) + src.xyz) - sda, (src.w + dst.w) - alpha);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_luminosity(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 position;
+in vec4 inColor;
+noperspective out vec4 vcolor_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/682-2.shader_test b/shaders/skia/682-2.shader_test
new file mode 100644
index 0000000..6fe0bff
--- /dev/null
+++ b/shaders/skia/682-2.shader_test
@@ -0,0 +1,102 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform float ucornerRadius_Stage1;
+uniform vec4 uproxyRect_Stage1;
+uniform float ublurRadius_Stage1;
+uniform vec4 ucircle_Stage3;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vEllipseOffsets_Stage0;
+noperspective in vec4 vEllipseRadii_Stage0;
+noperspective in vec4 vinColor_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vinColor_Stage0;
+ vec2 offset = vEllipseOffsets_Stage0;
+ float test = dot(offset, offset) - 1.0;
+ vec2 grad = (2.0 * offset) * vEllipseRadii_Stage0.xy;
+ float grad_dot = dot(grad, grad);
+ grad_dot = max(grad_dot, 1.1754999560161448e-38);
+ float invlen = inversesqrt(grad_dot);
+ float edgeAlpha = clamp(0.5 - test * invlen, 0.0, 1.0);
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ vec4 output_Stage1;
+ {
+ vec2 translatedFragPos = gl_FragCoord.xy - uproxyRect_Stage1.xy;
+ float threshold = ucornerRadius_Stage1 + 2.0 * ublurRadius_Stage1;
+ vec2 middle = (uproxyRect_Stage1.zw - uproxyRect_Stage1.xy) - 2.0 * threshold;
+ if (translatedFragPos.x >= threshold && translatedFragPos.x < middle.x + threshold) {
+ translatedFragPos.x = threshold;
+ } else if (translatedFragPos.x >= middle.x + threshold) {
+ translatedFragPos.x -= middle.x - 1.0;
+ }
+ if (translatedFragPos.y > threshold && translatedFragPos.y < middle.y + threshold) {
+ translatedFragPos.y = threshold;
+ } else if (translatedFragPos.y >= middle.y + threshold) {
+ translatedFragPos.y -= middle.y - 1.0;
+ }
+ vec2 proxyDims = vec2(2.0 * threshold + 1.0);
+ vec2 texCoord = translatedFragPos / proxyDims;
+ output_Stage1 = outputCoverage_Stage0 * texture(uTextureSampler_0_Stage1, texCoord);
+ }
+ vec4 output_Stage2;
+ {
+ float nonZeroAlpha = max(output_Stage1.w, 9.9999997473787516e-05);
+ vec4 coord = vec4(output_Stage1.xyz / nonZeroAlpha, nonZeroAlpha);
+ coord = coord * 0.9960939884185791 + vec4(0.0019529999699443579, 0.0019529999699443579, 0.0019529999699443579, 0.0019529999699443579);
+ output_Stage2.w = texture(uTextureSampler_0_Stage2, vec2(coord.w, 0.125)).w;
+ output_Stage2.x = texture(uTextureSampler_0_Stage2, vec2(coord.x, 0.375)).w;
+ output_Stage2.y = texture(uTextureSampler_0_Stage2, vec2(coord.y, 0.625)).w;
+ output_Stage2.z = texture(uTextureSampler_0_Stage2, vec2(coord.z, 0.875)).w;
+ output_Stage2.xyz *= output_Stage2.w;
+ }
+ vec4 output_Stage3;
+ {
+ float d;
+ {
+ d = (1.0 - length((ucircle_Stage3.xy - gl_FragCoord.xy) * ucircle_Stage3.w)) * ucircle_Stage3.z;
+ }
+ {
+ output_Stage3 = d > 0.5 ? output_Stage2 : vec4(0.0);
+ }
+ }
+ vec4 output_Stage4;
+ {
+ output_Stage4 = floor(output_Stage3 * 255.0 + 0.5) / 255.0;
+ {
+ output_Stage4.xyz = output_Stage4.w <= 0.0 ? vec3(0.0) : floor((output_Stage4.xyz / output_Stage4.w) * 255.0 + 0.5) / 255.0;
+ }
+ }
+ {
+ sk_FragColor = (vec4(1.0) - outputColor_Stage0) * output_Stage4;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 inPosition;
+in vec4 inColor;
+in vec2 inEllipseOffset;
+in vec4 inEllipseRadii;
+noperspective out vec2 vEllipseOffsets_Stage0;
+noperspective out vec4 vEllipseRadii_Stage0;
+noperspective out vec4 vinColor_Stage0;
+void main() {
+ vEllipseOffsets_Stage0 = inEllipseOffset;
+ vEllipseRadii_Stage0 = inEllipseRadii;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = inPosition;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/682-3.shader_test b/shaders/skia/682-3.shader_test
new file mode 100644
index 0000000..95e84e0
--- /dev/null
+++ b/shaders/skia/682-3.shader_test
@@ -0,0 +1,158 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage2_c0_c0;
+uniform vec2 uBounds_Stage2_c0_c0;
+uniform vec4 uKernel_Stage2_c0_c0[6];
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 GaussianConvolution_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_1_Stage0 - 10.0 * uImageIncrement_Stage2_c0_c0;
+ vec2 coordSampled = vec2(0.0, 0.0);
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage2_c0_c0.x, uBounds_Stage2_c0_c0.y - uBounds_Stage2_c0_c0.x) + uBounds_Stage2_c0_c0.x;
+ _output += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2_c0_c0[0].x;
+ coord += uImageIncrement_Stage2_c0_c0;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage2_c0_c0.x, uBounds_Stage2_c0_c0.y - uBounds_Stage2_c0_c0.x) + uBounds_Stage2_c0_c0.x;
+ _output += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2_c0_c0[0].y;
+ coord += uImageIncrement_Stage2_c0_c0;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage2_c0_c0.x, uBounds_Stage2_c0_c0.y - uBounds_Stage2_c0_c0.x) + uBounds_Stage2_c0_c0.x;
+ _output += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2_c0_c0[0].z;
+ coord += uImageIncrement_Stage2_c0_c0;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage2_c0_c0.x, uBounds_Stage2_c0_c0.y - uBounds_Stage2_c0_c0.x) + uBounds_Stage2_c0_c0.x;
+ _output += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2_c0_c0[0].w;
+ coord += uImageIncrement_Stage2_c0_c0;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage2_c0_c0.x, uBounds_Stage2_c0_c0.y - uBounds_Stage2_c0_c0.x) + uBounds_Stage2_c0_c0.x;
+ _output += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2_c0_c0[1].x;
+ coord += uImageIncrement_Stage2_c0_c0;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage2_c0_c0.x, uBounds_Stage2_c0_c0.y - uBounds_Stage2_c0_c0.x) + uBounds_Stage2_c0_c0.x;
+ _output += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2_c0_c0[1].y;
+ coord += uImageIncrement_Stage2_c0_c0;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage2_c0_c0.x, uBounds_Stage2_c0_c0.y - uBounds_Stage2_c0_c0.x) + uBounds_Stage2_c0_c0.x;
+ _output += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2_c0_c0[1].z;
+ coord += uImageIncrement_Stage2_c0_c0;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage2_c0_c0.x, uBounds_Stage2_c0_c0.y - uBounds_Stage2_c0_c0.x) + uBounds_Stage2_c0_c0.x;
+ _output += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2_c0_c0[1].w;
+ coord += uImageIncrement_Stage2_c0_c0;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage2_c0_c0.x, uBounds_Stage2_c0_c0.y - uBounds_Stage2_c0_c0.x) + uBounds_Stage2_c0_c0.x;
+ _output += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2_c0_c0[2].x;
+ coord += uImageIncrement_Stage2_c0_c0;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage2_c0_c0.x, uBounds_Stage2_c0_c0.y - uBounds_Stage2_c0_c0.x) + uBounds_Stage2_c0_c0.x;
+ _output += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2_c0_c0[2].y;
+ coord += uImageIncrement_Stage2_c0_c0;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage2_c0_c0.x, uBounds_Stage2_c0_c0.y - uBounds_Stage2_c0_c0.x) + uBounds_Stage2_c0_c0.x;
+ _output += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2_c0_c0[2].z;
+ coord += uImageIncrement_Stage2_c0_c0;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage2_c0_c0.x, uBounds_Stage2_c0_c0.y - uBounds_Stage2_c0_c0.x) + uBounds_Stage2_c0_c0.x;
+ _output += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2_c0_c0[2].w;
+ coord += uImageIncrement_Stage2_c0_c0;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage2_c0_c0.x, uBounds_Stage2_c0_c0.y - uBounds_Stage2_c0_c0.x) + uBounds_Stage2_c0_c0.x;
+ _output += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2_c0_c0[3].x;
+ coord += uImageIncrement_Stage2_c0_c0;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage2_c0_c0.x, uBounds_Stage2_c0_c0.y - uBounds_Stage2_c0_c0.x) + uBounds_Stage2_c0_c0.x;
+ _output += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2_c0_c0[3].y;
+ coord += uImageIncrement_Stage2_c0_c0;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage2_c0_c0.x, uBounds_Stage2_c0_c0.y - uBounds_Stage2_c0_c0.x) + uBounds_Stage2_c0_c0.x;
+ _output += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2_c0_c0[3].z;
+ coord += uImageIncrement_Stage2_c0_c0;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage2_c0_c0.x, uBounds_Stage2_c0_c0.y - uBounds_Stage2_c0_c0.x) + uBounds_Stage2_c0_c0.x;
+ _output += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2_c0_c0[3].w;
+ coord += uImageIncrement_Stage2_c0_c0;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage2_c0_c0.x, uBounds_Stage2_c0_c0.y - uBounds_Stage2_c0_c0.x) + uBounds_Stage2_c0_c0.x;
+ _output += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2_c0_c0[4].x;
+ coord += uImageIncrement_Stage2_c0_c0;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage2_c0_c0.x, uBounds_Stage2_c0_c0.y - uBounds_Stage2_c0_c0.x) + uBounds_Stage2_c0_c0.x;
+ _output += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2_c0_c0[4].y;
+ coord += uImageIncrement_Stage2_c0_c0;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage2_c0_c0.x, uBounds_Stage2_c0_c0.y - uBounds_Stage2_c0_c0.x) + uBounds_Stage2_c0_c0.x;
+ _output += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2_c0_c0[4].z;
+ coord += uImageIncrement_Stage2_c0_c0;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage2_c0_c0.x, uBounds_Stage2_c0_c0.y - uBounds_Stage2_c0_c0.x) + uBounds_Stage2_c0_c0.x;
+ _output += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2_c0_c0[4].w;
+ coord += uImageIncrement_Stage2_c0_c0;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage2_c0_c0.x, uBounds_Stage2_c0_c0.y - uBounds_Stage2_c0_c0.x) + uBounds_Stage2_c0_c0.x;
+ _output += texture(uTextureSampler_0_Stage2, coordSampled) * uKernel_Stage2_c0_c0[5].x;
+ coord += uImageIncrement_Stage2_c0_c0;
+ _output *= _input;
+ return _output;
+}
+float _guarded_divide(float n, float d) {
+ return n / d;
+}
+float _soft_light_component(float sc, float sa, float dc, float da) {
+ if (2.0 * sc <= sa) {
+ return (_guarded_divide((dc * dc) * (sa - 2.0 * sc), da) + (1.0 - da) * sc) + dc * ((-sa + 2.0 * sc) + 1.0);
+ } else if (4.0 * dc <= da) {
+ float DSqd = dc * dc;
+ float DCub = DSqd * dc;
+ float DaSqd = da * da;
+ float DaCub = DaSqd * da;
+ return _guarded_divide(((DaSqd * (sc - dc * ((3.0 * sa - 6.0 * sc) - 1.0)) + ((12.0 * da) * DSqd) * (sa - 2.0 * sc)) - (16.0 * DCub) * (sa - 2.0 * sc)) - DaCub * sc, DaSqd);
+ }
+ return ((dc * ((sa - 2.0 * sc) + 1.0) + sc) - sqrt(da * dc) * (sa - 2.0 * sc)) - da * sc;
+}
+vec4 blend_soft_light(vec4 src, vec4 dst) {
+ if (dst.w == 0.0) {
+ return src;
+ }
+ return vec4(_soft_light_component(src.x, src.w, dst.x, dst.w), _soft_light_component(src.y, src.w, dst.y, dst.w), _soft_light_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_soft_light(GaussianConvolution_Stage2_c0_c0(vec4(1.0)), output_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/682.shader_test b/shaders/skia/682.shader_test
new file mode 100644
index 0000000..fbe71e1
--- /dev/null
+++ b/shaders/skia/682.shader_test
@@ -0,0 +1,171 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage2_c1_c0;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.w) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ } else {
+ {
+ if (t < uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = OverrideInputFragmentProcessor_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c1_c0;
+ }
+ return _output;
+}
+float _blend_color_luminance(vec3 color) {
+ return dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), color);
+}
+vec3 _blend_set_color_luminance(vec3 hueSatColor, float alpha, vec3 lumColor) {
+ float lum = _blend_color_luminance(lumColor);
+ vec3 result = (lum - _blend_color_luminance(hueSatColor)) + hueSatColor;
+ float minComp = min(min(result.x, result.y), result.z);
+ float maxComp = max(max(result.x, result.y), result.z);
+ if (minComp < 0.0 && lum != minComp) {
+ result = lum + ((result - lum) * lum) / (lum - minComp);
+ }
+ if (maxComp > alpha && maxComp != lum) {
+ return lum + ((result - lum) * (alpha - lum)) / (maxComp - lum);
+ }
+ return result;
+}
+vec4 blend_luminosity(vec4 src, vec4 dst) {
+ float alpha = dst.w * src.w;
+ vec3 sda = src.xyz * dst.w;
+ vec3 dsa = dst.xyz * src.w;
+ return vec4((((_blend_set_color_luminance(dsa, alpha, sda) + dst.xyz) - dsa) + src.xyz) - sda, (src.w + dst.w) - alpha);
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 blend_darken(vec4 src, vec4 dst) {
+ vec4 result = blend_src_over(src, dst);
+ result.xyz = min(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
+ return result;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_luminosity(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_darken(ConstColorProcessor_Stage2_c1_c0(vec4(1.0)), output_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 inColor;
+in vec2 inLocalCoord;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/685-2.shader_test b/shaders/skia/685-2.shader_test
new file mode 100644
index 0000000..b984810
--- /dev/null
+++ b/shaders/skia/685-2.shader_test
@@ -0,0 +1,39 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_KHR_blend_equation_advanced : require
+out vec4 sk_FragColor;
+layout (blend_support_all_equations) out ;
+noperspective in vec4 vcolor_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ {
+ sk_FragColor = outputColor_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 position;
+in vec4 inColor;
+noperspective out vec4 vcolor_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_PointSize = 1.0;
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/685-3.shader_test b/shaders/skia/685-3.shader_test
new file mode 100644
index 0000000..eba90e9
--- /dev/null
+++ b/shaders/skia/685-3.shader_test
@@ -0,0 +1,51 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 ucircleData_Stage2_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 CircleBlurFragmentProcessor_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 vec = vec2((gl_FragCoord.x - ucircleData_Stage2_c0_c0.x) * ucircleData_Stage2_c0_c0.w, (gl_FragCoord.y - ucircleData_Stage2_c0_c0.y) * ucircleData_Stage2_c0_c0.w);
+ float dist = length(vec) + (0.5 - ucircleData_Stage2_c0_c0.z) * ucircleData_Stage2_c0_c0.w;
+ _output = _input * texture(uTextureSampler_0_Stage2, vec2(dist, 0.5)).w;
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_src_in(output_Stage1, CircleBlurFragmentProcessor_Stage2_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/685.shader_test b/shaders/skia/685.shader_test
new file mode 100644
index 0000000..6702be1
--- /dev/null
+++ b/shaders/skia/685.shader_test
@@ -0,0 +1,100 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 ucolor_Stage1_c0_c0_c0_c0;
+uniform vec4 ucolor_Stage2_c1_c0;
+noperspective in vec4 vcolor_Stage0;
+vec4 ConstColorProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = _input.w * ucolor_Stage1_c0_c0_c0_c0;
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = ConstColorProcessor_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c1_c0;
+ }
+ return _output;
+}
+float _blend_color_luminance(vec3 color) {
+ return dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), color);
+}
+vec3 _blend_set_color_luminance(vec3 hueSatColor, float alpha, vec3 lumColor) {
+ float lum = _blend_color_luminance(lumColor);
+ vec3 result = (lum - _blend_color_luminance(hueSatColor)) + hueSatColor;
+ float minComp = min(min(result.x, result.y), result.z);
+ float maxComp = max(max(result.x, result.y), result.z);
+ if (minComp < 0.0 && lum != minComp) {
+ result = lum + ((result - lum) * lum) / (lum - minComp);
+ }
+ if (maxComp > alpha && maxComp != lum) {
+ return lum + ((result - lum) * (alpha - lum)) / (maxComp - lum);
+ }
+ return result;
+}
+vec4 blend_luminosity(vec4 src, vec4 dst) {
+ float alpha = dst.w * src.w;
+ vec3 sda = src.xyz * dst.w;
+ vec3 dsa = dst.xyz * src.w;
+ return vec4((((_blend_set_color_luminance(dsa, alpha, sda) + dst.xyz) - dsa) + src.xyz) - sda, (src.w + dst.w) - alpha);
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 blend_darken(vec4 src, vec4 dst) {
+ vec4 result = blend_src_over(src, dst);
+ result.xyz = min(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
+ return result;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_luminosity(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_darken(ConstColorProcessor_Stage2_c1_c0(vec4(1.0)), output_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 position;
+in vec4 inColor;
+noperspective out vec4 vcolor_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/688-2.shader_test b/shaders/skia/688-2.shader_test
new file mode 100644
index 0000000..2c608d3
--- /dev/null
+++ b/shaders/skia/688-2.shader_test
@@ -0,0 +1,43 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uColor_Stage0;
+noperspective in vec3 vDashParam_Stage0;
+noperspective in vec2 vCircleParams_Stage0;
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ float xShifted = vDashParam_Stage0.x - floor(vDashParam_Stage0.x / vDashParam_Stage0.z) * vDashParam_Stage0.z;
+ vec2 fragPosShifted = vec2(xShifted, vDashParam_Stage0.y);
+ vec2 center = vec2(vCircleParams_Stage0.y, 0.0);
+ float dist = length(center - fragPosShifted);
+ float alpha = 1.0;
+ alpha *= dist < vCircleParams_Stage0.x + 0.5 ? 1.0 : 0.0;
+ outputCoverage_Stage0 = vec4(alpha);
+ }
+ {
+ sk_FragColor = outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 inPosition;
+in vec3 inDashParams;
+in vec2 inCircleParams;
+noperspective out vec3 vDashParam_Stage0;
+noperspective out vec2 vCircleParams_Stage0;
+void main() {
+ vDashParam_Stage0 = inDashParams;
+ vCircleParams_Stage0 = inCircleParams;
+ vec2 pos2 = inPosition;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/688-3.shader_test b/shaders/skia/688-3.shader_test
new file mode 100644
index 0000000..f6d1f17
--- /dev/null
+++ b/shaders/skia/688-3.shader_test
@@ -0,0 +1,58 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uinnerRect_Stage2_c0_c0;
+uniform vec2 uradiusPlusHalf_Stage2_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 CircularRRect_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 dxy0 = uinnerRect_Stage2_c0_c0.xy - gl_FragCoord.xy;
+ vec2 dxy1 = gl_FragCoord.xy - uinnerRect_Stage2_c0_c0.zw;
+ vec2 dxy = max(max(dxy0, dxy1), 0.0);
+ float alpha = clamp(uradiusPlusHalf_Stage2_c0_c0.x - length(dxy), 0.0, 1.0);
+ _output = _input * alpha;
+ return _output;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 blend_darken(vec4 src, vec4 dst) {
+ vec4 result = blend_src_over(src, dst);
+ result.xyz = min(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
+ return result;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_darken(output_Stage1, CircularRRect_Stage2_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/688.shader_test b/shaders/skia/688.shader_test
new file mode 100644
index 0000000..8cda25f
--- /dev/null
+++ b/shaders/skia/688.shader_test
@@ -0,0 +1,164 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage2;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.w) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ } else {
+ {
+ if (t < uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+vec4 ComposeOne_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_dst_in(_input, TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0)));
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = ComposeOne_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+float _blend_color_luminance(vec3 color) {
+ return dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), color);
+}
+vec3 _blend_set_color_luminance(vec3 hueSatColor, float alpha, vec3 lumColor) {
+ float lum = _blend_color_luminance(lumColor);
+ vec3 result = (lum - _blend_color_luminance(hueSatColor)) + hueSatColor;
+ float minComp = min(min(result.x, result.y), result.z);
+ float maxComp = max(max(result.x, result.y), result.z);
+ if (minComp < 0.0 && lum != minComp) {
+ result = lum + ((result - lum) * lum) / (lum - minComp);
+ }
+ if (maxComp > alpha && maxComp != lum) {
+ return lum + ((result - lum) * (alpha - lum)) / (maxComp - lum);
+ }
+ return result;
+}
+vec4 blend_luminosity(vec4 src, vec4 dst) {
+ float alpha = dst.w * src.w;
+ vec3 sda = src.xyz * dst.w;
+ vec3 dsa = dst.xyz * src.w;
+ return vec4((((_blend_set_color_luminance(dsa, alpha, sda) + dst.xyz) - dsa) + src.xyz) - sda, (src.w + dst.w) - alpha);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_luminosity(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ {
+ output_Stage2 = output_Stage1 * ucolor_Stage2;
+ }
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 inColor;
+in vec2 inLocalCoord;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/691-2.shader_test b/shaders/skia/691-2.shader_test
new file mode 100644
index 0000000..c864bcf
--- /dev/null
+++ b/shaders/skia/691-2.shader_test
@@ -0,0 +1,65 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform mat4 um_Stage2;
+uniform vec4 uv_Stage2;
+noperspective in vec4 vcolor_Stage0;
+noperspective in float vinCoverage_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ float alpha = 1.0;
+ alpha = vinCoverage_Stage0;
+ outputCoverage_Stage0 = vec4(alpha);
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = floor(outputColor_Stage0 * 255.0 + 0.5) / 255.0;
+ {
+ output_Stage1.xyz = output_Stage1.w <= 0.0 ? vec3(0.0) : floor((output_Stage1.xyz / output_Stage1.w) * 255.0 + 0.5) / 255.0;
+ }
+ }
+ vec4 output_Stage2;
+ {
+ vec4 inputColor = output_Stage1;
+ output_Stage2 = um_Stage2 * inputColor + uv_Stage2;
+ {
+ output_Stage2 = clamp(output_Stage2, 0.0, 1.0);
+ }
+ {
+ output_Stage2.xyz *= output_Stage2.w;
+ }
+ }
+ vec4 output_Stage3;
+ {
+ output_Stage3 = output_Stage2;
+ }
+ {
+ sk_FragColor = output_Stage3 * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 inPosition;
+in vec4 inColor;
+in float inCoverage;
+noperspective out vec4 vcolor_Stage0;
+noperspective out float vinCoverage_Stage0;
+void main() {
+ vec4 color = inColor;
+ vcolor_Stage0 = color;
+ vec2 pos2 = inPosition;
+ vinCoverage_Stage0 = inCoverage;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/691-3.shader_test b/shaders/skia/691-3.shader_test
new file mode 100644
index 0000000..125c880
--- /dev/null
+++ b/shaders/skia/691-3.shader_test
@@ -0,0 +1,71 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uboundsUniform_Stage2_c0_c0;
+uniform float uxInvZoom_Stage2_c0_c0;
+uniform float uyInvZoom_Stage2_c0_c0;
+uniform float uxInvInset_Stage2_c0_c0;
+uniform float uyInvInset_Stage2_c0_c0;
+uniform vec2 uoffset_Stage2_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 MagnifierEffect_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coord = vTransformedCoords_1_Stage0;
+ vec2 zoom_coord = uoffset_Stage2_c0_c0 + coord * vec2(uxInvZoom_Stage2_c0_c0, uyInvZoom_Stage2_c0_c0);
+ vec2 delta = (coord - uboundsUniform_Stage2_c0_c0.xy) * uboundsUniform_Stage2_c0_c0.zw;
+ delta = min(delta, vec2(1.0, 1.0) - delta);
+ delta *= vec2(uxInvInset_Stage2_c0_c0, uyInvInset_Stage2_c0_c0);
+ float weight = 0.0;
+ if (delta.x < 2.0 && delta.y < 2.0) {
+ delta = vec2(2.0, 2.0) - delta;
+ float dist = length(delta);
+ dist = max(2.0 - dist, 0.0);
+ weight = min(dist * dist, 1.0);
+ } else {
+ vec2 delta_squared = delta * delta;
+ weight = min(min(delta_squared.x, delta_squared.y), 1.0);
+ }
+ _output = texture(uTextureSampler_0_Stage2, mix(coord, zoom_coord, weight));
+ return _output;
+}
+vec4 blend_exclusion(vec4 src, vec4 dst) {
+ return vec4((dst.xyz + src.xyz) - (2.0 * dst.xyz) * src.xyz, src.w + (1.0 - src.w) * dst.w);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_exclusion(MagnifierEffect_Stage2_c0_c0(vec4(1.0)), output_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/691.shader_test b/shaders/skia/691.shader_test
new file mode 100644
index 0000000..f51d76a
--- /dev/null
+++ b/shaders/skia/691.shader_test
@@ -0,0 +1,87 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 ucolor_Stage1_c0_c0_c0_c0;
+uniform vec4 ucolor_Stage2;
+noperspective in vec4 vcolor_Stage0;
+vec4 ConstColorProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = _input.w * ucolor_Stage1_c0_c0_c0_c0;
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = ConstColorProcessor_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+float _blend_color_luminance(vec3 color) {
+ return dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), color);
+}
+vec3 _blend_set_color_luminance(vec3 hueSatColor, float alpha, vec3 lumColor) {
+ float lum = _blend_color_luminance(lumColor);
+ vec3 result = (lum - _blend_color_luminance(hueSatColor)) + hueSatColor;
+ float minComp = min(min(result.x, result.y), result.z);
+ float maxComp = max(max(result.x, result.y), result.z);
+ if (minComp < 0.0 && lum != minComp) {
+ result = lum + ((result - lum) * lum) / (lum - minComp);
+ }
+ if (maxComp > alpha && maxComp != lum) {
+ return lum + ((result - lum) * (alpha - lum)) / (maxComp - lum);
+ }
+ return result;
+}
+vec4 blend_luminosity(vec4 src, vec4 dst) {
+ float alpha = dst.w * src.w;
+ vec3 sda = src.xyz * dst.w;
+ vec3 dsa = dst.xyz * src.w;
+ return vec4((((_blend_set_color_luminance(dsa, alpha, sda) + dst.xyz) - dsa) + src.xyz) - sda, (src.w + dst.w) - alpha);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_luminosity(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ {
+ output_Stage2 = output_Stage1 * ucolor_Stage2;
+ }
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 position;
+in vec4 inColor;
+noperspective out vec4 vcolor_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/694-2.shader_test b/shaders/skia/694-2.shader_test
new file mode 100644
index 0000000..a42d18d
--- /dev/null
+++ b/shaders/skia/694-2.shader_test
@@ -0,0 +1,64 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 ucircleData_Stage1;
+uniform vec4 uinnerRect_Stage2;
+uniform vec2 uradiusPlusHalf_Stage2;
+uniform vec4 urectH_Stage3;
+uniform float uinvSixSigma_Stage3;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage3;
+flat in vec4 vcolor_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ vec2 vec = vec2((gl_FragCoord.x - ucircleData_Stage1.x) * ucircleData_Stage1.w, (gl_FragCoord.y - ucircleData_Stage1.y) * ucircleData_Stage1.w);
+ float dist = length(vec) + (0.5 - ucircleData_Stage1.z) * ucircleData_Stage1.w;
+ output_Stage1 = vec4(texture(uTextureSampler_0_Stage1, vec2(dist, 0.5)).w);
+ }
+ vec4 output_Stage2;
+ {
+ vec2 dxy0 = uinnerRect_Stage2.xy - gl_FragCoord.xy;
+ vec2 dxy1 = gl_FragCoord.xy - uinnerRect_Stage2.zw;
+ vec2 dxy = max(max(dxy0, dxy1), 0.0);
+ float alpha = clamp(uradiusPlusHalf_Stage2.x - length(dxy), 0.0, 1.0);
+ alpha = 1.0 - alpha;
+ output_Stage2 = output_Stage1 * alpha;
+ }
+ vec4 output_Stage3;
+ {
+ float xCoverage, yCoverage;
+ {
+ float x, y;
+ {
+ x = max(urectH_Stage3.x - gl_FragCoord.x, gl_FragCoord.x - urectH_Stage3.z);
+ y = max(urectH_Stage3.y - gl_FragCoord.y, gl_FragCoord.y - urectH_Stage3.w);
+ }
+ xCoverage = texture(uTextureSampler_0_Stage3, vec2(x * uinvSixSigma_Stage3, 0.5)).w;
+ yCoverage = texture(uTextureSampler_0_Stage3, vec2(y * uinvSixSigma_Stage3, 0.5)).w;
+ output_Stage3 = (output_Stage2 * xCoverage) * yCoverage;
+ }
+ output_Stage3 = (output_Stage2 * xCoverage) * yCoverage;
+ }
+ {
+ sk_FragColor = 1.0 - output_Stage3;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 position;
+in vec4 color;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/694-3.shader_test b/shaders/skia/694-3.shader_test
new file mode 100644
index 0000000..d034665
--- /dev/null
+++ b/shaders/skia/694-3.shader_test
@@ -0,0 +1,79 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 urectUniform_Stage2_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 AARectEffect_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ float alpha;
+ {
+ float xSub, ySub;
+ xSub = min(gl_FragCoord.x - urectUniform_Stage2_c0_c0.x, 0.0);
+ xSub += min(urectUniform_Stage2_c0_c0.z - gl_FragCoord.x, 0.0);
+ ySub = min(gl_FragCoord.y - urectUniform_Stage2_c0_c0.y, 0.0);
+ ySub += min(urectUniform_Stage2_c0_c0.w - gl_FragCoord.y, 0.0);
+ alpha = (1.0 + max(xSub, -1.0)) * (1.0 + max(ySub, -1.0));
+ }
+ {
+ alpha = 1.0 - alpha;
+ }
+ _output = _input * alpha;
+ return _output;
+}
+float _blend_color_luminance(vec3 color) {
+ return dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), color);
+}
+vec3 _blend_set_color_luminance(vec3 hueSatColor, float alpha, vec3 lumColor) {
+ float lum = _blend_color_luminance(lumColor);
+ vec3 result = (lum - _blend_color_luminance(hueSatColor)) + hueSatColor;
+ float minComp = min(min(result.x, result.y), result.z);
+ float maxComp = max(max(result.x, result.y), result.z);
+ if (minComp < 0.0 && lum != minComp) {
+ result = lum + ((result - lum) * lum) / (lum - minComp);
+ }
+ if (maxComp > alpha && maxComp != lum) {
+ return lum + ((result - lum) * (alpha - lum)) / (maxComp - lum);
+ }
+ return result;
+}
+vec4 blend_color(vec4 src, vec4 dst) {
+ float alpha = dst.w * src.w;
+ vec3 sda = src.xyz * dst.w;
+ vec3 dsa = dst.xyz * src.w;
+ return vec4((((_blend_set_color_luminance(sda, alpha, dsa) + dst.xyz) - dsa) + src.xyz) - sda, (src.w + dst.w) - alpha);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_color(AARectEffect_Stage2_c0_c0(vec4(1.0)), output_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/694.shader_test b/shaders/skia/694.shader_test
new file mode 100644
index 0000000..052fe6a
--- /dev/null
+++ b/shaders/skia/694.shader_test
@@ -0,0 +1,184 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage2;
+uniform vec4 ucolor_Stage3_c1_c0;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.w) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ } else {
+ {
+ if (t < uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+vec4 ComposeOne_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_dst_in(_input, TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0)));
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = ComposeOne_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 ConstColorProcessor_Stage3_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage3_c1_c0;
+ }
+ return _output;
+}
+float _blend_color_luminance(vec3 color) {
+ return dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), color);
+}
+vec3 _blend_set_color_luminance(vec3 hueSatColor, float alpha, vec3 lumColor) {
+ float lum = _blend_color_luminance(lumColor);
+ vec3 result = (lum - _blend_color_luminance(hueSatColor)) + hueSatColor;
+ float minComp = min(min(result.x, result.y), result.z);
+ float maxComp = max(max(result.x, result.y), result.z);
+ if (minComp < 0.0 && lum != minComp) {
+ result = lum + ((result - lum) * lum) / (lum - minComp);
+ }
+ if (maxComp > alpha && maxComp != lum) {
+ return lum + ((result - lum) * (alpha - lum)) / (maxComp - lum);
+ }
+ return result;
+}
+vec4 blend_luminosity(vec4 src, vec4 dst) {
+ float alpha = dst.w * src.w;
+ vec3 sda = src.xyz * dst.w;
+ vec3 dsa = dst.xyz * src.w;
+ return vec4((((_blend_set_color_luminance(dsa, alpha, sda) + dst.xyz) - dsa) + src.xyz) - sda, (src.w + dst.w) - alpha);
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 blend_darken(vec4 src, vec4 dst) {
+ vec4 result = blend_src_over(src, dst);
+ result.xyz = min(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
+ return result;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_luminosity(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ {
+ output_Stage2 = output_Stage1 * ucolor_Stage2;
+ }
+ }
+ vec4 output_Stage3;
+ {
+ output_Stage3 = blend_darken(ConstColorProcessor_Stage3_c1_c0(vec4(1.0)), output_Stage2);
+ }
+ {
+ sk_FragColor = output_Stage3;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 inColor;
+in vec2 inLocalCoord;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/697-2.shader_test b/shaders/skia/697-2.shader_test
new file mode 100644
index 0000000..ee3b89c
--- /dev/null
+++ b/shaders/skia/697-2.shader_test
@@ -0,0 +1,256 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_KHR_blend_equation_advanced : require
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+layout (blend_support_all_equations) out ;
+uniform vec4 ucircle_Stage1_c0_c0;
+uniform vec4 uinnerRect_Stage1_c1_c0;
+uniform vec2 uinvRadiiXY_Stage1_c1_c0;
+uniform vec4 uinnerRect_Stage2;
+uniform vec4 uinvRadiiLTRB_Stage2;
+uniform vec4 uleftBorderColor_Stage3_c2_c0;
+uniform vec4 urightBorderColor_Stage3_c2_c0;
+uniform float ubias_Stage3_c2_c0_c0_c0;
+uniform float uscale_Stage3_c2_c0_c0_c0;
+uniform vec4 uscale0_1_Stage3_c2_c0_c1_c0;
+uniform vec4 uscale2_3_Stage3_c2_c0_c1_c0;
+uniform vec4 uscale4_5_Stage3_c2_c0_c1_c0;
+uniform vec4 uscale6_7_Stage3_c2_c0_c1_c0;
+uniform vec4 uscale8_9_Stage3_c2_c0_c1_c0;
+uniform vec4 ubias0_1_Stage3_c2_c0_c1_c0;
+uniform vec4 ubias2_3_Stage3_c2_c0_c1_c0;
+uniform vec4 ubias4_5_Stage3_c2_c0_c1_c0;
+uniform vec4 ubias6_7_Stage3_c2_c0_c1_c0;
+uniform vec4 ubias8_9_Stage3_c2_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage3_c2_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage3_c2_c0_c1_c0;
+uniform vec2 ubaseFrequency_Stage4_c3_c0;
+uniform sampler2D uTextureSampler_0_Stage4;
+uniform sampler2D uTextureSampler_1_Stage4;
+noperspective in vec2 vEllipseOffsets_Stage0;
+noperspective in vec4 vEllipseRadii_Stage0;
+noperspective in vec4 vinColor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec3 vTransformedCoords_1_Stage0;
+vec4 CircleEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ float d;
+ {
+ d = (1.0 - length((ucircle_Stage1_c0_c0.xy - gl_FragCoord.xy) * ucircle_Stage1_c0_c0.w)) * ucircle_Stage1_c0_c0.z;
+ }
+ {
+ _output = _input * clamp(d, 0.0, 1.0);
+ }
+ return _output;
+}
+vec4 EllipticalRRect_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 dxy0 = uinnerRect_Stage1_c1_c0.xy - gl_FragCoord.xy;
+ vec2 dxy1 = gl_FragCoord.xy - uinnerRect_Stage1_c1_c0.zw;
+ vec2 dxy = max(max(dxy0, dxy1), 0.0);
+ vec2 Z = dxy * uinvRadiiXY_Stage1_c1_c0;
+ float implicit = dot(Z, dxy) - 1.0;
+ float grad_dot = 4.0 * dot(Z, Z);
+ grad_dot = max(grad_dot, 9.9999997473787516e-05);
+ float approx_dist = implicit * inversesqrt(grad_dot);
+ float alpha = clamp(0.5 - approx_dist, 0.0, 1.0);
+ _output = _input * alpha;
+ return _output;
+}
+vec4 SweepGradientLayout_Stage3_c2_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float angle;
+ {
+ angle = atan(-vTransformedCoords_0_Stage0.y, -vTransformedCoords_0_Stage0.x);
+ }
+ float t = ((angle * 0.15915493667125702 + 0.5) + ubias_Stage3_c2_c0_c0_c0) * uscale_Stage3_c2_c0_c0_c0;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage3_c2_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthresholds1_7_Stage3_c2_c0_c1_c0.w) {
+ if (t < uthresholds1_7_Stage3_c2_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage3_c2_c0_c1_c0.x) {
+ scale = uscale0_1_Stage3_c2_c0_c1_c0;
+ bias = ubias0_1_Stage3_c2_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage3_c2_c0_c1_c0;
+ bias = ubias2_3_Stage3_c2_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage3_c2_c0_c1_c0.z) {
+ scale = uscale4_5_Stage3_c2_c0_c1_c0;
+ bias = ubias4_5_Stage3_c2_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage3_c2_c0_c1_c0;
+ bias = ubias6_7_Stage3_c2_c0_c1_c0;
+ }
+ }
+ } else {
+ {
+ {
+ scale = uscale8_9_Stage3_c2_c0_c1_c0;
+ bias = ubias8_9_Stage3_c2_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage3_c2_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = SweepGradientLayout_Stage3_c2_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage3_c2_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage3_c2_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage3_c2_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+float perlinnoise_Stage4_c3_c0(float chanCoord, vec2 noiseVec) {
+ vec4 floorVal;
+ floorVal.xy = floor(noiseVec);
+ floorVal.zw = floorVal.xy + vec2(1.0);
+ vec2 fractVal = fract(noiseVec);
+ vec2 noiseSmooth = (fractVal * fractVal) * (vec2(3.0) - vec2(2.0) * fractVal);
+ floorVal = fract(floor(mod(floorVal, 256.0)) / vec4(256.0));
+ vec2 latticeIdx;
+ latticeIdx.x = texture(uTextureSampler_0_Stage4, vec2(floorVal.x, 0.5)).x;
+ latticeIdx.y = texture(uTextureSampler_0_Stage4, vec2(floorVal.z, 0.5)).x;
+ vec4 bcoords = fract(latticeIdx.xyxy + floorVal.yyww);
+ vec2 uv;
+ vec4 lattice = texture(uTextureSampler_1_Stage4, vec2(bcoords.x, chanCoord)).zyxw;
+ uv.x = dot((lattice.yw + lattice.xz * vec2(0.00390625)) * vec2(2.0) - vec2(1.0), fractVal);
+ fractVal.x -= 1.0;
+ lattice = texture(uTextureSampler_1_Stage4, vec2(bcoords.y, chanCoord)).zyxw;
+ uv.y = dot((lattice.yw + lattice.xz * vec2(0.00390625)) * vec2(2.0) - vec2(1.0), fractVal);
+ vec2 ab;
+ ab.x = mix(uv.x, uv.y, noiseSmooth.x);
+ fractVal.y -= 1.0;
+ lattice = texture(uTextureSampler_1_Stage4, vec2(bcoords.w, chanCoord)).zyxw;
+ uv.y = dot((lattice.yw + lattice.xz * vec2(0.00390625)) * vec2(2.0) - vec2(1.0), fractVal);
+ fractVal.x += 1.0;
+ lattice = texture(uTextureSampler_1_Stage4, vec2(bcoords.z, chanCoord)).zyxw;
+ uv.x = dot((lattice.yw + lattice.xz * vec2(0.00390625)) * vec2(2.0) - vec2(1.0), fractVal);
+ ab.y = mix(uv.x, uv.y, noiseSmooth.x);
+ return mix(ab.x, ab.y, noiseSmooth.y);
+}
+vec4 PerlinNoise_Stage4_c3_c0(vec4 _input) {
+ vec4 _output;
+ vec2 vTransformedCoords_1_Stage0_ensure2D = vTransformedCoords_1_Stage0.xy / vTransformedCoords_1_Stage0.z;
+ vec2 noiseVec = floor(vTransformedCoords_1_Stage0_ensure2D) * ubaseFrequency_Stage4_c3_c0;
+ _output = vec4(0.0);
+ float ratio = 1.0;
+ for (int octave = 0;octave < 5; ++octave) {
+ _output += vec4(perlinnoise_Stage4_c3_c0(0.125, noiseVec), perlinnoise_Stage4_c3_c0(0.375, noiseVec), perlinnoise_Stage4_c3_c0(0.625, noiseVec), perlinnoise_Stage4_c3_c0(0.875, noiseVec)) * ratio;
+ noiseVec *= vec2(2.0);
+ ratio *= 0.5;
+ }
+ _output = _output * vec4(0.5) + vec4(0.5);
+ _output = clamp(_output, 0.0, 1.0);
+ _output = vec4(_output.xyz * _output.www, _output.w);
+ return _output;
+}
+float _blend_overlay_component(float sc, float sa, float dc, float da) {
+ if (2.0 * dc <= da) {
+ return (2.0 * sc) * dc;
+ }
+ return sa * da - (2.0 * (da - dc)) * (sa - sc);
+}
+vec4 blend_overlay(vec4 src, vec4 dst) {
+ vec4 result = vec4(_blend_overlay_component(src.x, src.w, dst.x, dst.w), _blend_overlay_component(src.y, src.w, dst.y, dst.w), _blend_overlay_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+ result.xyz += dst.xyz * (1.0 - src.w) + src.xyz * (1.0 - dst.w);
+ return result;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vinColor_Stage0;
+ vec2 offset = vEllipseOffsets_Stage0;
+ float test = dot(offset, offset) - 1.0;
+ vec2 grad = (2.0 * offset) * vEllipseRadii_Stage0.xy;
+ float grad_dot = dot(grad, grad);
+ grad_dot = max(grad_dot, 1.1754999560161448e-38);
+ float invlen = inversesqrt(grad_dot);
+ float edgeAlpha = clamp(0.5 - test * invlen, 0.0, 1.0);
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_overlay(CircleEffect_Stage1_c0_c0(inputColor), EllipticalRRect_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ vec4 output_Stage2;
+ {
+ vec2 dxy0 = uinnerRect_Stage2.xy - gl_FragCoord.xy;
+ vec2 dxy1 = gl_FragCoord.xy - uinnerRect_Stage2.zw;
+ vec2 dxy = max(max(dxy0, dxy1), 0.0);
+ vec2 Z = max(max(dxy0 * uinvRadiiLTRB_Stage2.xy, dxy1 * uinvRadiiLTRB_Stage2.zw), 0.0);
+ float implicit = dot(Z, dxy) - 1.0;
+ float grad_dot = 4.0 * dot(Z, Z);
+ grad_dot = max(grad_dot, 9.9999997473787516e-05);
+ float approx_dist = implicit * inversesqrt(grad_dot);
+ float alpha = clamp(0.5 + approx_dist, 0.0, 1.0);
+ output_Stage2 = outputCoverage_Stage0 * alpha;
+ }
+ vec4 output_Stage3;
+ {
+ output_Stage3 = blend_dst_in(output_Stage2, ClampedGradientEffect_Stage3_c2_c0(vec4(1.0)));
+ }
+ vec4 output_Stage4;
+ {
+ output_Stage4 = blend_dst_in(output_Stage3, PerlinNoise_Stage4_c3_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage4 * output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec2 inEllipseOffset;
+in vec4 inEllipseRadii;
+noperspective out vec2 vEllipseOffsets_Stage0;
+noperspective out vec4 vEllipseRadii_Stage0;
+noperspective out vec4 vinColor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec3 vTransformedCoords_1_Stage0;
+void main() {
+ vEllipseOffsets_Stage0 = inEllipseOffset;
+ vEllipseRadii_Stage0 = inEllipseRadii;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = uCoordTransformMatrix_1_Stage0 * vec3(inPosition, 1.0);
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/697-3.shader_test b/shaders/skia/697-3.shader_test
new file mode 100644
index 0000000..b596524
--- /dev/null
+++ b/shaders/skia/697-3.shader_test
@@ -0,0 +1,69 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform float ucornerRadius_Stage2_c0_c0;
+uniform vec4 uproxyRect_Stage2_c0_c0;
+uniform float ublurRadius_Stage2_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 RRectBlurEffect_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 translatedFragPos = gl_FragCoord.xy - uproxyRect_Stage2_c0_c0.xy;
+ float threshold = ucornerRadius_Stage2_c0_c0 + 2.0 * ublurRadius_Stage2_c0_c0;
+ vec2 middle = (uproxyRect_Stage2_c0_c0.zw - uproxyRect_Stage2_c0_c0.xy) - 2.0 * threshold;
+ if (translatedFragPos.x >= threshold && translatedFragPos.x < middle.x + threshold) {
+ translatedFragPos.x = threshold;
+ } else if (translatedFragPos.x >= middle.x + threshold) {
+ translatedFragPos.x -= middle.x - 1.0;
+ }
+ if (translatedFragPos.y > threshold && translatedFragPos.y < middle.y + threshold) {
+ translatedFragPos.y = threshold;
+ } else if (translatedFragPos.y >= middle.y + threshold) {
+ translatedFragPos.y -= middle.y - 1.0;
+ }
+ vec2 proxyDims = vec2(2.0 * threshold + 1.0);
+ vec2 texCoord = translatedFragPos / proxyDims;
+ _output = _input * texture(uTextureSampler_0_Stage2, texCoord);
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_dst_in(RRectBlurEffect_Stage2_c0_c0(vec4(1.0)), output_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/697.shader_test b/shaders/skia/697.shader_test
new file mode 100644
index 0000000..dadc2dd
--- /dev/null
+++ b/shaders/skia/697.shader_test
@@ -0,0 +1,30 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uColor_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = uColor_Stage0;
+ }
+ {
+ sk_FragColor = outputColor_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 position;
+void main() {
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/7-1.shader_test b/shaders/skia/7-1.shader_test
new file mode 100644
index 0000000..8928aa2
--- /dev/null
+++ b/shaders/skia/7-1.shader_test
@@ -0,0 +1,124 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 usubset_Stage1_c0_c0;
+uniform vec4 uclamp_Stage1_c0_c0;
+uniform vec4 usubset_Stage1_c1_c0;
+uniform vec4 uclamp_Stage1_c1_c0;
+uniform vec4 unorm_Stage1_c1_c0;
+uniform vec4 usubset_Stage1_c2_c0;
+uniform vec4 uclamp_Stage1_c2_c0;
+uniform vec4 unorm_Stage1_c2_c0;
+uniform mat3 ucolorSpaceMatrix_Stage1;
+uniform vec3 ucolorSpaceTranslate_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+uniform sampler2D uTextureSampler_2_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+vec4 TextureEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 inCoord = vTransformedCoords_0_Stage0;
+ vec2 subsetCoord;
+ subsetCoord.x = mod(inCoord.x - usubset_Stage1_c0_c0.x, usubset_Stage1_c0_c0.z - usubset_Stage1_c0_c0.x) + usubset_Stage1_c0_c0.x;
+ subsetCoord.y = mod(inCoord.y - usubset_Stage1_c0_c0.y, usubset_Stage1_c0_c0.w - usubset_Stage1_c0_c0.y) + usubset_Stage1_c0_c0.y;
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage1_c0_c0.x, uclamp_Stage1_c0_c0.z);
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage1_c0_c0.y, uclamp_Stage1_c0_c0.w);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ _output = _input * textureColor;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 inCoord = vTransformedCoords_1_Stage0;
+ inCoord *= unorm_Stage1_c1_c0.xy;
+ vec2 subsetCoord;
+ subsetCoord.x = mod(inCoord.x - usubset_Stage1_c1_c0.x, usubset_Stage1_c1_c0.z - usubset_Stage1_c1_c0.x) + usubset_Stage1_c1_c0.x;
+ subsetCoord.y = mod(inCoord.y - usubset_Stage1_c1_c0.y, usubset_Stage1_c1_c0.w - usubset_Stage1_c1_c0.y) + usubset_Stage1_c1_c0.y;
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage1_c1_c0.x, uclamp_Stage1_c1_c0.z);
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage1_c1_c0.y, uclamp_Stage1_c1_c0.w);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord * unorm_Stage1_c1_c0.zw);
+ float errX = subsetCoord.x - clampedCoord.x;
+ float repeatCoordX = errX > 0.0 ? uclamp_Stage1_c1_c0.x : uclamp_Stage1_c1_c0.z;
+ float errY = subsetCoord.y - clampedCoord.y;
+ float repeatCoordY = errY > 0.0 ? uclamp_Stage1_c1_c0.y : uclamp_Stage1_c1_c0.w;
+ if (errX != 0.0 && errY != 0.0) {
+ errX = abs(errX);
+ textureColor = mix(mix(textureColor, texture(uTextureSampler_1_Stage1, vec2(repeatCoordX, clampedCoord.y) * unorm_Stage1_c1_c0.zw), errX), mix(texture(uTextureSampler_1_Stage1, vec2(clampedCoord.x, repeatCoordY) * unorm_Stage1_c1_c0.zw), texture(uTextureSampler_1_Stage1, vec2(repeatCoordX, repeatCoordY) * unorm_Stage1_c1_c0.zw), errX), abs(errY));
+ } else if (errX != 0.0) {
+ textureColor = mix(textureColor, texture(uTextureSampler_1_Stage1, vec2(repeatCoordX, clampedCoord.y) * unorm_Stage1_c1_c0.zw), abs(errX));
+ } else if (errY != 0.0) {
+ textureColor = mix(textureColor, texture(uTextureSampler_1_Stage1, vec2(clampedCoord.x, repeatCoordY) * unorm_Stage1_c1_c0.zw), abs(errY));
+ }
+ _output = _input * textureColor;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c2_c0(vec4 _input) {
+ vec4 _output;
+ vec2 inCoord = vTransformedCoords_2_Stage0;
+ inCoord *= unorm_Stage1_c2_c0.xy;
+ vec2 subsetCoord;
+ subsetCoord.x = mod(inCoord.x - usubset_Stage1_c2_c0.x, usubset_Stage1_c2_c0.z - usubset_Stage1_c2_c0.x) + usubset_Stage1_c2_c0.x;
+ subsetCoord.y = mod(inCoord.y - usubset_Stage1_c2_c0.y, usubset_Stage1_c2_c0.w - usubset_Stage1_c2_c0.y) + usubset_Stage1_c2_c0.y;
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage1_c2_c0.x, uclamp_Stage1_c2_c0.z);
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage1_c2_c0.y, uclamp_Stage1_c2_c0.w);
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord * unorm_Stage1_c2_c0.zw);
+ float errX = subsetCoord.x - clampedCoord.x;
+ float repeatCoordX = errX > 0.0 ? uclamp_Stage1_c2_c0.x : uclamp_Stage1_c2_c0.z;
+ float errY = subsetCoord.y - clampedCoord.y;
+ float repeatCoordY = errY > 0.0 ? uclamp_Stage1_c2_c0.y : uclamp_Stage1_c2_c0.w;
+ if (errX != 0.0 && errY != 0.0) {
+ errX = abs(errX);
+ textureColor = mix(mix(textureColor, texture(uTextureSampler_2_Stage1, vec2(repeatCoordX, clampedCoord.y) * unorm_Stage1_c2_c0.zw), errX), mix(texture(uTextureSampler_2_Stage1, vec2(clampedCoord.x, repeatCoordY) * unorm_Stage1_c2_c0.zw), texture(uTextureSampler_2_Stage1, vec2(repeatCoordX, repeatCoordY) * unorm_Stage1_c2_c0.zw), errX), abs(errY));
+ } else if (errX != 0.0) {
+ textureColor = mix(textureColor, texture(uTextureSampler_2_Stage1, vec2(repeatCoordX, clampedCoord.y) * unorm_Stage1_c2_c0.zw), abs(errX));
+ } else if (errY != 0.0) {
+ textureColor = mix(textureColor, texture(uTextureSampler_2_Stage1, vec2(clampedCoord.x, repeatCoordY) * unorm_Stage1_c2_c0.zw), abs(errY));
+ }
+ _output = _input * textureColor;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ vec4 planes[3];
+ planes[0] = TextureEffect_Stage1_c0_c0(vec4(1.0));
+ planes[1] = TextureEffect_Stage1_c1_c0(vec4(1.0));
+ planes[2] = TextureEffect_Stage1_c2_c0(vec4(1.0));
+ vec4 color = vec4(planes[0].x, planes[1].x, planes[2].x, 1.0);
+ color.xyz = clamp(color.xyz * ucolorSpaceMatrix_Stage1 + ucolorSpaceTranslate_Stage1, 0.0, 1.0);
+ output_Stage1 = color;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/7-10.shader_test b/shaders/skia/7-10.shader_test
new file mode 100644
index 0000000..5edb8bc
--- /dev/null
+++ b/shaders/skia/7-10.shader_test
@@ -0,0 +1,103 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uclamp_Stage1_c0_c0_c0_c0;
+uniform vec4 uclamp_Stage1_c0_c0_c1_c0;
+uniform vec4 uclamp_Stage1_c0_c0_c2_c0;
+uniform mat3 ucolorSpaceMatrix_Stage1_c0_c0;
+uniform vec3 ucolorSpaceTranslate_Stage1_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+uniform sampler2D uTextureSampler_2_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 inCoord = vTransformedCoords_0_Stage0;
+ vec2 subsetCoord;
+ subsetCoord.x = inCoord.x;
+ subsetCoord.y = inCoord.y;
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage1_c0_c0_c0_c0.x, uclamp_Stage1_c0_c0_c0_c0.z);
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage1_c0_c0_c0_c0.y, uclamp_Stage1_c0_c0_c0_c0.w);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ _output = _input * textureColor;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 inCoord = vTransformedCoords_1_Stage0;
+ vec2 subsetCoord;
+ subsetCoord.x = inCoord.x;
+ subsetCoord.y = inCoord.y;
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage1_c0_c0_c1_c0.x, uclamp_Stage1_c0_c0_c1_c0.z);
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage1_c0_c0_c1_c0.y, uclamp_Stage1_c0_c0_c1_c0.w);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ _output = _input * textureColor;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c0_c0_c2_c0(vec4 _input) {
+ vec4 _output;
+ vec2 inCoord = vTransformedCoords_2_Stage0;
+ vec2 subsetCoord;
+ subsetCoord.x = inCoord.x;
+ subsetCoord.y = inCoord.y;
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage1_c0_c0_c2_c0.x, uclamp_Stage1_c0_c0_c2_c0.z);
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage1_c0_c0_c2_c0.y, uclamp_Stage1_c0_c0_c2_c0.w);
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ _output = _input * textureColor;
+ return _output;
+}
+vec4 YUVtoRGBEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 planes[3];
+ planes[0] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0));
+ planes[1] = TextureEffect_Stage1_c0_c0_c1_c0(vec4(1.0));
+ planes[2] = TextureEffect_Stage1_c0_c0_c2_c0(vec4(1.0));
+ vec4 color = vec4(planes[0].w, planes[1].x, planes[1].y, planes[2].w);
+ color.xyz = clamp(color.xyz * ucolorSpaceMatrix_Stage1_c0_c0 + ucolorSpaceTranslate_Stage1_c0_c0, 0.0, 1.0);
+ color.xyz *= color.w;
+ _output = color;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = YUVtoRGBEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/7-11.shader_test b/shaders/skia/7-11.shader_test
new file mode 100644
index 0000000..ad30a08
--- /dev/null
+++ b/shaders/skia/7-11.shader_test
@@ -0,0 +1,67 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform mat3 ucolorSpaceMatrix_Stage1;
+uniform vec3 ucolorSpaceTranslate_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+uniform sampler2D uTextureSampler_2_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+vec4 TextureEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_1_Stage1, vTransformedCoords_1_Stage0) * _input;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c2_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_2_Stage1, vTransformedCoords_2_Stage0) * _input;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ vec4 planes[3];
+ planes[0] = TextureEffect_Stage1_c0_c0(vec4(1.0));
+ planes[1] = TextureEffect_Stage1_c1_c0(vec4(1.0));
+ planes[2] = TextureEffect_Stage1_c2_c0(vec4(1.0));
+ vec4 color = vec4(planes[0].x, planes[1].x, planes[1].y, planes[2].w);
+ color.xyz = clamp(color.xyz * ucolorSpaceMatrix_Stage1 + ucolorSpaceTranslate_Stage1, 0.0, 1.0);
+ color.xyz *= color.w;
+ output_Stage1 = color;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/7-117.shader_test b/shaders/skia/7-117.shader_test
new file mode 100644
index 0000000..7580d95
--- /dev/null
+++ b/shaders/skia/7-117.shader_test
@@ -0,0 +1,64 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform sampler2D uTextureSampler_0_Stage1;
+in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+in float vcoverage_Stage0;
+flat in vec4 vgeomDomain_Stage0;
+vec4 TextureEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ float coverage = vcoverage_Stage0 * gl_FragCoord.w;
+ vec4 geoDomain;
+ geoDomain = vgeomDomain_Stage0;
+ if (coverage < 0.5) {
+ vec4 dists4 = clamp(vec4(1.0, 1.0, -1.0, -1.0) * (gl_FragCoord.xyxy - geoDomain), 0.0, 1.0);
+ vec2 dists2 = dists4.xy * dists4.zw;
+ coverage = min(coverage, dists2.x * dists2.y);
+ }
+ outputCoverage_Stage0 = vec4(coverage);
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TextureEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1 * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec4 positionWithCoverage;
+in vec4 color;
+in vec2 localCoord;
+in vec4 geomDomain;
+out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+out float vcoverage_Stage0;
+flat out vec4 vgeomDomain_Stage0;
+void main() {
+ vec3 position = positionWithCoverage.xyz;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ vcoverage_Stage0 = positionWithCoverage.w * positionWithCoverage.z;
+ vgeomDomain_Stage0 = geomDomain;
+ gl_Position = vec4(position.x, position.y, 0.0, position.z);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/7-119.shader_test b/shaders/skia/7-119.shader_test
new file mode 100644
index 0000000..5edddfe
--- /dev/null
+++ b/shaders/skia/7-119.shader_test
@@ -0,0 +1,107 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 ubaseFrequency_Stage1_c0_c0;
+uniform vec2 ustitchData_Stage1_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+float perlinnoise_Stage1_c0_c0(float chanCoord, vec2 noiseVec, vec2 stitchData) {
+ vec4 floorVal;
+ floorVal.xy = floor(noiseVec);
+ floorVal.zw = floorVal.xy + vec2(1.0);
+ vec2 fractVal = fract(noiseVec);
+ vec2 noiseSmooth = (fractVal * fractVal) * (vec2(3.0) - vec2(2.0) * fractVal);
+ if (floorVal.x >= stitchData.x) {
+ floorVal.x -= stitchData.x;
+ }
+ if (floorVal.y >= stitchData.y) {
+ floorVal.y -= stitchData.y;
+ }
+ if (floorVal.z >= stitchData.x) {
+ floorVal.z -= stitchData.x;
+ }
+ if (floorVal.w >= stitchData.y) {
+ floorVal.w -= stitchData.y;
+ }
+ floorVal = fract(floor(mod(floorVal, 256.0)) / vec4(256.0));
+ vec2 latticeIdx;
+ latticeIdx.x = texture(uTextureSampler_0_Stage1, vec2(floorVal.x, 0.5)).x;
+ latticeIdx.y = texture(uTextureSampler_0_Stage1, vec2(floorVal.z, 0.5)).x;
+ vec4 bcoords = fract(latticeIdx.xyxy + floorVal.yyww);
+ vec2 uv;
+ vec4 lattice = texture(uTextureSampler_1_Stage1, vec2(bcoords.x, chanCoord)).zyxw;
+ uv.x = dot((lattice.yw + lattice.xz * vec2(0.00390625)) * vec2(2.0) - vec2(1.0), fractVal);
+ fractVal.x -= 1.0;
+ lattice = texture(uTextureSampler_1_Stage1, vec2(bcoords.y, chanCoord)).zyxw;
+ uv.y = dot((lattice.yw + lattice.xz * vec2(0.00390625)) * vec2(2.0) - vec2(1.0), fractVal);
+ vec2 ab;
+ ab.x = mix(uv.x, uv.y, noiseSmooth.x);
+ fractVal.y -= 1.0;
+ lattice = texture(uTextureSampler_1_Stage1, vec2(bcoords.w, chanCoord)).zyxw;
+ uv.y = dot((lattice.yw + lattice.xz * vec2(0.00390625)) * vec2(2.0) - vec2(1.0), fractVal);
+ fractVal.x += 1.0;
+ lattice = texture(uTextureSampler_1_Stage1, vec2(bcoords.z, chanCoord)).zyxw;
+ uv.x = dot((lattice.yw + lattice.xz * vec2(0.00390625)) * vec2(2.0) - vec2(1.0), fractVal);
+ ab.y = mix(uv.x, uv.y, noiseSmooth.x);
+ return mix(ab.x, ab.y, noiseSmooth.y);
+}
+vec4 PerlinNoise_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 noiseVec = floor(vTransformedCoords_0_Stage0) * ubaseFrequency_Stage1_c0_c0;
+ _output = vec4(0.0);
+ vec2 stitchData = ustitchData_Stage1_c0_c0;
+ float ratio = 1.0;
+ for (int octave = 0;octave < 1; ++octave) {
+ _output += vec4(perlinnoise_Stage1_c0_c0(0.125, noiseVec, stitchData), perlinnoise_Stage1_c0_c0(0.375, noiseVec, stitchData), perlinnoise_Stage1_c0_c0(0.625, noiseVec, stitchData), perlinnoise_Stage1_c0_c0(0.875, noiseVec, stitchData)) * ratio;
+ noiseVec *= vec2(2.0);
+ ratio *= 0.5;
+ stitchData *= vec2(2.0);
+ }
+ _output = _output * vec4(0.5) + vec4(0.5);
+ _output = clamp(_output, 0.0, 1.0);
+ _output = vec4(_output.xyz * _output.www, _output.w);
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_dst_in(outputColor_Stage0, PerlinNoise_Stage1_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/7-145.shader_test b/shaders/skia/7-145.shader_test
new file mode 100644
index 0000000..8328ddc
--- /dev/null
+++ b/shaders/skia/7-145.shader_test
@@ -0,0 +1,44 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform float uPixelSize_Stage1;
+uniform vec2 uRange_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0;
+ coord.y -= 2.0 * uPixelSize_Stage1;
+ float highBound = min(uRange_Stage1.y, coord.y + 4.0 * uPixelSize_Stage1);
+ coord.y = max(uRange_Stage1.x, coord.y);
+ for (int i = 0;i < 5; i++) {
+ output_Stage1 = max(output_Stage1, texture(uTextureSampler_0_Stage1, coord));
+ coord.y += uPixelSize_Stage1;
+ coord.y = min(highBound, coord.y);
+ }
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/7-146.shader_test b/shaders/skia/7-146.shader_test
new file mode 100644
index 0000000..86be160
--- /dev/null
+++ b/shaders/skia/7-146.shader_test
@@ -0,0 +1,75 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage2_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c1_c0;
+ }
+ return _output;
+}
+vec4 blend_src(vec4 src, vec4 dst) {
+ return src;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_src(ConstColorProcessor_Stage2_c1_c0(vec4(1.0)), output_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/7-147.shader_test b/shaders/skia/7-147.shader_test
new file mode 100644
index 0000000..a6d3241
--- /dev/null
+++ b/shaders/skia/7-147.shader_test
@@ -0,0 +1,121 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform float ubias_Stage1_c0_c0_c0_c0;
+uniform float uscale_Stage1_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+uniform mat4 um_Stage2_c2_c0;
+uniform vec4 uv_Stage2_c2_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 SweepGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float angle;
+ {
+ angle = atan(-vTransformedCoords_0_Stage0.y, -vTransformedCoords_0_Stage0.x);
+ }
+ float t = ((angle * 0.15915493667125702 + 0.5) + ubias_Stage1_c0_c0_c0_c0) * uscale_Stage1_c0_c0_c0_c0;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = SweepGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 LumaColorFilterEffect_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ float luma = clamp(dot(vec3(0.2125999927520752, 0.71520000696182251, 0.072200000286102295), _input.xyz), 0.0, 1.0);
+ _output = vec4(0.0, 0.0, 0.0, luma);
+ return _output;
+}
+vec4 ColorMatrixFragmentProcessor_Stage2_c2_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = _input;
+ {
+ float nonZeroAlpha = max(inputColor.w, 9.9999997473787516e-05);
+ inputColor = vec4(inputColor.xyz / nonZeroAlpha, inputColor.w);
+ }
+ _output = um_Stage2_c2_c0 * inputColor + uv_Stage2_c2_c0;
+ {
+ _output = clamp(_output, 0.0, 1.0);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = ColorMatrixFragmentProcessor_Stage2_c2_c0(LumaColorFilterEffect_Stage2_c1_c0(output_Stage1));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/7-15.shader_test b/shaders/skia/7-15.shader_test
new file mode 100644
index 0000000..6ee0e85
--- /dev/null
+++ b/shaders/skia/7-15.shader_test
@@ -0,0 +1,38 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 ucolor_Stage1;
+noperspective in vec4 vcolor_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ {
+ output_Stage1 = ucolor_Stage1;
+ }
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 position;
+in vec4 inColor;
+noperspective out vec4 vcolor_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = position;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/7-159.shader_test b/shaders/skia/7-159.shader_test
new file mode 100644
index 0000000..05c08f8
--- /dev/null
+++ b/shaders/skia/7-159.shader_test
@@ -0,0 +1,137 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform float uSurfaceScale_Stage1;
+uniform vec3 uLightColor_Stage1;
+uniform float uKD_Stage1;
+uniform vec3 uLightLocation_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 light_Stage1(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ float colorScale = uKD_Stage1 * dot(normal, surfaceToLight);
+ return vec4(lightColor * clamp(colorScale, 0.0, 1.0), 1.0);
+}
+float sobel_Stage1(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage1(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage1(float m[9], float surfaceScale) {
+ return pointToNormal_Stage1(sobel_Stage1(0.0, 0.0, m[3], m[5], m[6], m[8], 0.33333298563957214), sobel_Stage1(0.0, 0.0, m[4], m[7], m[5], m[8], 0.5), surfaceScale);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ vec2 coord = vTransformedCoords_0_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp0 = textureColor;
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp1 = textureColor;
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp2 = textureColor;
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp3 = textureColor;
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp4 = textureColor;
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp5 = textureColor;
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp6 = textureColor;
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp7 = textureColor;
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp8 = textureColor;
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = normalize(uLightLocation_Stage1 - vec3(gl_FragCoord.xy, uSurfaceScale_Stage1 * m[4]));
+ output_Stage1 = light_Stage1(normal_Stage1(m, uSurfaceScale_Stage1), surfaceToLight, uLightColor_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/7-160.shader_test b/shaders/skia/7-160.shader_test
new file mode 100644
index 0000000..c134ed2
--- /dev/null
+++ b/shaders/skia/7-160.shader_test
@@ -0,0 +1,78 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec2 uDstTextureUpperLeft_Stage1;
+uniform vec2 uDstTextureCoordScale_Stage1;
+uniform sampler2D uTextureSampler_0_Stage0;
+uniform sampler2D uDstTextureSampler_Stage1;
+noperspective in vec2 vTextureCoords_Stage0;
+flat in int vTexIndex_Stage0;
+noperspective in vec4 vinColor_Stage0;
+float _blend_overlay_component(float sc, float sa, float dc, float da) {
+ if (2.0 * dc <= da) {
+ return (2.0 * sc) * dc;
+ }
+ return sa * da - (2.0 * (da - dc)) * (sa - sc);
+}
+vec4 blend_overlay(vec4 src, vec4 dst) {
+ vec4 result = vec4(_blend_overlay_component(src.x, src.w, dst.x, dst.w), _blend_overlay_component(src.y, src.w, dst.y, dst.w), _blend_overlay_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+ result.xyz += dst.xyz * (1.0 - src.w) + src.xyz * (1.0 - dst.w);
+ return result;
+}
+vec4 blend_hard_light(vec4 src, vec4 dst) {
+ return blend_overlay(dst, src);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vinColor_Stage0;
+ vec4 texColor;
+ {
+ texColor = texture(uTextureSampler_0_Stage0, vTextureCoords_Stage0);
+ }
+ outputCoverage_Stage0 = texColor;
+ }
+ {
+ if (all(lessThanEqual(outputCoverage_Stage0.xyz, vec3(0.0)))) {
+ discard;
+ }
+ vec2 _dstTexCoord = (gl_FragCoord.xy - uDstTextureUpperLeft_Stage1) * uDstTextureCoordScale_Stage1;
+ _dstTexCoord.y = 1.0 - _dstTexCoord.y;
+ vec4 _dstColor = texture(uDstTextureSampler_Stage1, _dstTexCoord);
+ sk_FragColor = blend_hard_light(outputColor_Stage0, _dstColor);
+ float lerpRed = mix(_dstColor.w, sk_FragColor.w, outputCoverage_Stage0.x);
+ float lerpBlue = mix(_dstColor.w, sk_FragColor.w, outputCoverage_Stage0.y);
+ float lerpGreen = mix(_dstColor.w, sk_FragColor.w, outputCoverage_Stage0.z);
+ sk_FragColor = outputCoverage_Stage0 * sk_FragColor + (vec4(1.0) - outputCoverage_Stage0) * _dstColor;
+ sk_FragColor.w = max(max(lerpRed, lerpBlue), lerpGreen);
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform vec2 uAtlasSizeInv_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in uvec2 inTextureCoords;
+noperspective out vec2 vTextureCoords_Stage0;
+flat out int vTexIndex_Stage0;
+noperspective out vec4 vinColor_Stage0;
+void main() {
+ ivec2 signedCoords = ivec2(int(inTextureCoords.x), int(inTextureCoords.y));
+ vec2 unormTexCoords = vec2(float(signedCoords.x / 2), float(signedCoords.y / 2));
+ vTextureCoords_Stage0 = unormTexCoords * uAtlasSizeInv_Stage0;
+ vTexIndex_Stage0 = 0;
+ vinColor_Stage0 = inColor;
+ gl_Position = vec4(inPosition.x, inPosition.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/7-161.shader_test b/shaders/skia/7-161.shader_test
new file mode 100644
index 0000000..e6277d7
--- /dev/null
+++ b/shaders/skia/7-161.shader_test
@@ -0,0 +1,67 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec2 uDstTextureUpperLeft_Stage1;
+uniform vec2 uDstTextureCoordScale_Stage1;
+uniform sampler2D uTextureSampler_0_Stage0;
+uniform sampler2D uDstTextureSampler_Stage1;
+noperspective in vec2 vTextureCoords_Stage0;
+flat in int vTexIndex_Stage0;
+noperspective in vec4 vinColor_Stage0;
+vec4 blend_clear(vec4 src, vec4 dst) {
+ return vec4(0.0);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vinColor_Stage0;
+ vec4 texColor;
+ {
+ texColor = texture(uTextureSampler_0_Stage0, vTextureCoords_Stage0);
+ }
+ outputCoverage_Stage0 = texColor;
+ }
+ {
+ if (all(lessThanEqual(outputCoverage_Stage0.xyz, vec3(0.0)))) {
+ discard;
+ }
+ vec2 _dstTexCoord = (gl_FragCoord.xy - uDstTextureUpperLeft_Stage1) * uDstTextureCoordScale_Stage1;
+ _dstTexCoord.y = 1.0 - _dstTexCoord.y;
+ vec4 _dstColor = texture(uDstTextureSampler_Stage1, _dstTexCoord);
+ sk_FragColor = blend_clear(outputColor_Stage0, _dstColor);
+ float lerpRed = mix(_dstColor.w, sk_FragColor.w, outputCoverage_Stage0.x);
+ float lerpBlue = mix(_dstColor.w, sk_FragColor.w, outputCoverage_Stage0.y);
+ float lerpGreen = mix(_dstColor.w, sk_FragColor.w, outputCoverage_Stage0.z);
+ sk_FragColor = outputCoverage_Stage0 * sk_FragColor + (vec4(1.0) - outputCoverage_Stage0) * _dstColor;
+ sk_FragColor.w = max(max(lerpRed, lerpBlue), lerpGreen);
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform vec2 uAtlasSizeInv_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in uvec2 inTextureCoords;
+noperspective out vec2 vTextureCoords_Stage0;
+flat out int vTexIndex_Stage0;
+noperspective out vec4 vinColor_Stage0;
+void main() {
+ ivec2 signedCoords = ivec2(int(inTextureCoords.x), int(inTextureCoords.y));
+ vec2 unormTexCoords = vec2(float(signedCoords.x / 2), float(signedCoords.y / 2));
+ vTextureCoords_Stage0 = unormTexCoords * uAtlasSizeInv_Stage0;
+ vTexIndex_Stage0 = 0;
+ vinColor_Stage0 = inColor;
+ gl_Position = vec4(inPosition.x, inPosition.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/7-17.shader_test b/shaders/skia/7-17.shader_test
new file mode 100644
index 0000000..80bcad5
--- /dev/null
+++ b/shaders/skia/7-17.shader_test
@@ -0,0 +1,40 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = floor(output_Stage1 * 255.0 + 0.5) / 255.0;
+ {
+ output_Stage2.xyz = floor((output_Stage2.xyz * output_Stage2.w) * 255.0 + 0.5) / 255.0;
+ }
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/7-170.shader_test b/shaders/skia/7-170.shader_test
new file mode 100644
index 0000000..59498f1
--- /dev/null
+++ b/shaders/skia/7-170.shader_test
@@ -0,0 +1,57 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 ucolor_Stage2_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c1_c0;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TextureEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_src_in(ConstColorProcessor_Stage2_c1_c0(vec4(1.0)), output_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/7-2.shader_test b/shaders/skia/7-2.shader_test
new file mode 100644
index 0000000..8e4ba9b
--- /dev/null
+++ b/shaders/skia/7-2.shader_test
@@ -0,0 +1,66 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform mat3 ucolorSpaceMatrix_Stage1;
+uniform vec3 ucolorSpaceTranslate_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+uniform sampler2D uTextureSampler_2_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+vec4 TextureEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_1_Stage1, vTransformedCoords_1_Stage0) * _input;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c2_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_2_Stage1, vTransformedCoords_2_Stage0) * _input;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ vec4 planes[3];
+ planes[0] = TextureEffect_Stage1_c0_c0(vec4(1.0));
+ planes[1] = TextureEffect_Stage1_c1_c0(vec4(1.0));
+ planes[2] = TextureEffect_Stage1_c2_c0(vec4(1.0));
+ vec4 color = vec4(planes[1].x, planes[0].x, planes[2].x, 1.0);
+ color.xyz = clamp(color.xyz * ucolorSpaceMatrix_Stage1 + ucolorSpaceTranslate_Stage1, 0.0, 1.0);
+ output_Stage1 = color;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/7-21.shader_test b/shaders/skia/7-21.shader_test
new file mode 100644
index 0000000..d22a9e2
--- /dev/null
+++ b/shaders/skia/7-21.shader_test
@@ -0,0 +1,61 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ t.x = fract(t.x);
+ }
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TiledGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/7-211.shader_test b/shaders/skia/7-211.shader_test
new file mode 100644
index 0000000..0d5ef62
--- /dev/null
+++ b/shaders/skia/7-211.shader_test
@@ -0,0 +1,87 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/7-216.shader_test b/shaders/skia/7-216.shader_test
new file mode 100644
index 0000000..60a5bca
--- /dev/null
+++ b/shaders/skia/7-216.shader_test
@@ -0,0 +1,114 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uscale01_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias01_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale23_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias23_Stage1_c0_c0_c1_c0;
+uniform float uthreshold_Stage1_c0_c0_c1_c0;
+uniform vec2 uDstTextureUpperLeft_Stage2;
+uniform vec2 uDstTextureCoordScale_Stage2;
+uniform sampler2D uTextureSampler_0_Stage0;
+uniform sampler2D uDstTextureSampler_Stage2;
+noperspective in vec2 vTextureCoords_Stage0;
+flat in int vTexIndex_Stage0;
+noperspective in vec4 vinColor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 DualIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthreshold_Stage1_c0_c0_c1_c0) {
+ scale = uscale01_Stage1_c0_c0_c1_c0;
+ bias = ubias01_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale23_Stage1_c0_c0_c1_c0;
+ bias = ubias23_Stage1_c0_c0_c1_c0;
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = DualIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ vec4 texColor;
+ {
+ texColor = texture(uTextureSampler_0_Stage0, vTextureCoords_Stage0);
+ }
+ outputCoverage_Stage0 = texColor;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TiledGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ if (all(lessThanEqual(outputCoverage_Stage0.xyz, vec3(0.0)))) {
+ discard;
+ }
+ vec2 _dstTexCoord = (gl_FragCoord.xy - uDstTextureUpperLeft_Stage2) * uDstTextureCoordScale_Stage2;
+ _dstTexCoord.y = 1.0 - _dstTexCoord.y;
+ vec4 _dstColor = texture(uDstTextureSampler_Stage2, _dstTexCoord);
+ sk_FragColor = blend_src_over(output_Stage1, _dstColor);
+ float lerpRed = mix(_dstColor.w, sk_FragColor.w, outputCoverage_Stage0.x);
+ float lerpBlue = mix(_dstColor.w, sk_FragColor.w, outputCoverage_Stage0.y);
+ float lerpGreen = mix(_dstColor.w, sk_FragColor.w, outputCoverage_Stage0.z);
+ sk_FragColor = outputCoverage_Stage0 * sk_FragColor + (vec4(1.0) - outputCoverage_Stage0) * _dstColor;
+ sk_FragColor.w = max(max(lerpRed, lerpBlue), lerpGreen);
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform vec2 uAtlasSizeInv_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in uvec2 inTextureCoords;
+noperspective out vec2 vTextureCoords_Stage0;
+flat out int vTexIndex_Stage0;
+noperspective out vec4 vinColor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ ivec2 signedCoords = ivec2(int(inTextureCoords.x), int(inTextureCoords.y));
+ vec2 unormTexCoords = vec2(float(signedCoords.x / 2), float(signedCoords.y / 2));
+ vTextureCoords_Stage0 = unormTexCoords * uAtlasSizeInv_Stage0;
+ vTexIndex_Stage0 = 0;
+ vinColor_Stage0 = inColor;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(inPosition.x, inPosition.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/7-218.shader_test b/shaders/skia/7-218.shader_test
new file mode 100644
index 0000000..8808cd1
--- /dev/null
+++ b/shaders/skia/7-218.shader_test
@@ -0,0 +1,118 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale8_9_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale10_11_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale12_13_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale14_15_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias8_9_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias10_11_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias12_13_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias14_15_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.w) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c1_c0;
+ }
+ }
+ } else {
+ if (t < uthresholds9_13_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds9_13_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale8_9_Stage1_c0_c0_c1_c0;
+ bias = ubias8_9_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale10_11_Stage1_c0_c0_c1_c0;
+ bias = ubias10_11_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds9_13_Stage1_c0_c0_c1_c0.z) {
+ scale = uscale12_13_Stage1_c0_c0_c1_c0;
+ bias = ubias12_13_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale14_15_Stage1_c0_c0_c1_c0;
+ bias = ubias14_15_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/7-219.shader_test b/shaders/skia/7-219.shader_test
new file mode 100644
index 0000000..394c309
--- /dev/null
+++ b/shaders/skia/7-219.shader_test
@@ -0,0 +1,134 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale8_9_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale10_11_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale12_13_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale14_15_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias8_9_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias10_11_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias12_13_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias14_15_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.w) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c1_c0;
+ }
+ }
+ } else {
+ if (t < uthresholds9_13_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds9_13_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale8_9_Stage1_c0_c0_c1_c0;
+ bias = ubias8_9_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale10_11_Stage1_c0_c0_c1_c0;
+ bias = ubias10_11_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds9_13_Stage1_c0_c0_c1_c0.z) {
+ scale = uscale12_13_Stage1_c0_c0_c1_c0;
+ bias = ubias12_13_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale14_15_Stage1_c0_c0_c1_c0;
+ bias = ubias14_15_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_1_Stage0.x);
+ uint y = uint(vTransformedCoords_1_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ output_Stage2 = vec4(clamp(output_Stage2.xyz + value * 0.0039215688593685627, 0.0, output_Stage2.w), output_Stage2.w);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/7-22.shader_test b/shaders/skia/7-22.shader_test
new file mode 100644
index 0000000..5acbb79
--- /dev/null
+++ b/shaders/skia/7-22.shader_test
@@ -0,0 +1,93 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uCoordTransformMatrix_1_Stage0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0_c0_c0(vec4 _input, vec2 _coords) {
+ _coords = _coords * uCoordTransformMatrix_1_Stage0.xz + uCoordTransformMatrix_1_Stage0.yw;
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, _coords) * _input;
+ return _output;
+}
+vec4 Bicubic_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coord = vTransformedCoords_0_Stage0 - vec2(0.5);
+ vec2 f = fract(coord);
+ coord += 0.5 - f;
+ vec4 wx = mat4(0.055555555555555552, 0.88888888888888884, 0.055555555555555552, 0.0, -0.5, 0.0, 0.5, 0.0, 0.83333333333333337, -2.0, 1.5, -0.33333333333333331, -0.3888888888888889, 1.1666666666666667, -1.1666666666666667, 0.3888888888888889) * vec4(1.0, f.x, f.x * f.x, (f.x * f.x) * f.x);
+ vec4 wy = mat4(0.055555555555555552, 0.88888888888888884, 0.055555555555555552, 0.0, -0.5, 0.0, 0.5, 0.0, 0.83333333333333337, -2.0, 1.5, -0.33333333333333331, -0.3888888888888889, 1.1666666666666667, -1.1666666666666667, 0.3888888888888889) * vec4(1.0, f.y, f.y * f.y, (f.y * f.y) * f.y);
+ vec4 rowColors[4];
+ rowColors[0] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(-1.0, -1.0));
+ rowColors[1] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(0.0, -1.0));
+ rowColors[2] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(1.0, -1.0));
+ rowColors[3] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(2.0, -1.0));
+ vec4 s0 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ rowColors[0] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(-1.0, 0.0));
+ rowColors[1] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord);
+ rowColors[2] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(1.0, 0.0));
+ rowColors[3] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(2.0, 0.0));
+ vec4 s1 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ rowColors[0] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(-1.0, 1.0));
+ rowColors[1] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(0.0, 1.0));
+ rowColors[2] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(1.0, 1.0));
+ rowColors[3] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(2.0, 1.0));
+ vec4 s2 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ rowColors[0] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(-1.0, 2.0));
+ rowColors[1] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(0.0, 2.0));
+ rowColors[2] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(1.0, 2.0));
+ rowColors[3] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(2.0, 2.0));
+ vec4 s3 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ vec4 bicubicColor = ((wy.x * s0 + wy.y * s1) + wy.z * s2) + wy.w * s3;
+ bicubicColor.xyz = max(vec3(0.0), min(bicubicColor.xyz, bicubicColor.www));
+ _output = bicubicColor * _input;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = Bicubic_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_2_Stage0.x);
+ uint y = uint(vTransformedCoords_2_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ output_Stage2 = vec4(clamp(output_Stage2.xyz + value * 0.0039215688593685627, 0.0, output_Stage2.w), output_Stage2.w);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/7-220.shader_test b/shaders/skia/7-220.shader_test
new file mode 100644
index 0000000..0250938
--- /dev/null
+++ b/shaders/skia/7-220.shader_test
@@ -0,0 +1,94 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_0_Stage0;
+ float t = -1.0;
+ float v = 1.0;
+ {
+ {
+ float invR1 = ufocalParams_Stage1_c0_c0_c0_c0.x;
+ float fx = ufocalParams_Stage1_c0_c0_c0_c0.y;
+ float x_t = -1.0;
+ {
+ float temp = p.x * p.x - p.y * p.y;
+ if (temp >= 0.0) {
+ {
+ x_t = -sqrt(temp) - p.x * invR1;
+ }
+ }
+ }
+ {
+ if (x_t <= 0.0) {
+ v = -1.0;
+ }
+ }
+ {
+ {
+ t = -x_t + fx;
+ }
+ }
+ }
+ }
+ _output = vec4(t, v, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/7-221.shader_test b/shaders/skia/7-221.shader_test
new file mode 100644
index 0000000..4a637a0
--- /dev/null
+++ b/shaders/skia/7-221.shader_test
@@ -0,0 +1,110 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_0_Stage0;
+ float t = -1.0;
+ float v = 1.0;
+ {
+ {
+ float invR1 = ufocalParams_Stage1_c0_c0_c0_c0.x;
+ float fx = ufocalParams_Stage1_c0_c0_c0_c0.y;
+ float x_t = -1.0;
+ {
+ float temp = p.x * p.x - p.y * p.y;
+ if (temp >= 0.0) {
+ {
+ x_t = -sqrt(temp) - p.x * invR1;
+ }
+ }
+ }
+ {
+ if (x_t <= 0.0) {
+ v = -1.0;
+ }
+ }
+ {
+ {
+ t = -x_t + fx;
+ }
+ }
+ }
+ }
+ _output = vec4(t, v, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_1_Stage0.x);
+ uint y = uint(vTransformedCoords_1_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ output_Stage2 = vec4(clamp(output_Stage2.xyz + value * 0.0039215688593685627, 0.0, output_Stage2.w), output_Stage2.w);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/7-222.shader_test b/shaders/skia/7-222.shader_test
new file mode 100644
index 0000000..d889e21
--- /dev/null
+++ b/shaders/skia/7-222.shader_test
@@ -0,0 +1,68 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uColor_Stage0;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform float ubias_Stage1_c0_c0_c0_c0;
+uniform float uscale_Stage1_c0_c0_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 SweepGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float angle;
+ {
+ angle = atan(-vTransformedCoords_0_Stage0.y, -vTransformedCoords_0_Stage0.x);
+ }
+ float t = ((angle * 0.15915493667125702 + 0.5) + ubias_Stage1_c0_c0_c0_c0) * uscale_Stage1_c0_c0_c0_c0;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = SweepGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec2 pos2 = (uViewM_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/7-223.shader_test b/shaders/skia/7-223.shader_test
new file mode 100644
index 0000000..335b7c5
--- /dev/null
+++ b/shaders/skia/7-223.shader_test
@@ -0,0 +1,88 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_0_Stage0;
+ float t = -1.0;
+ float v = 1.0;
+ {
+ {
+ float fx = ufocalParams_Stage1_c0_c0_c0_c0.y;
+ float x_t = -1.0;
+ {
+ x_t = dot(p, p) / p.x;
+ }
+ {
+ if (x_t <= 0.0) {
+ v = -1.0;
+ }
+ }
+ {
+ {
+ t = x_t + fx;
+ }
+ }
+ }
+ }
+ _output = vec4(t, v, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/7-224.shader_test b/shaders/skia/7-224.shader_test
new file mode 100644
index 0000000..3b7bb01
--- /dev/null
+++ b/shaders/skia/7-224.shader_test
@@ -0,0 +1,93 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_0_Stage0;
+ float t = -1.0;
+ float v = 1.0;
+ {
+ {
+ float invR1 = ufocalParams_Stage1_c0_c0_c0_c0.x;
+ float x_t = -1.0;
+ {
+ float temp = p.x * p.x - p.y * p.y;
+ if (temp >= 0.0) {
+ {
+ x_t = sqrt(temp) - p.x * invR1;
+ }
+ }
+ }
+ {
+ if (x_t <= 0.0) {
+ v = -1.0;
+ }
+ }
+ {
+ {
+ t = x_t;
+ }
+ }
+ }
+ }
+ _output = vec4(t, v, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/7-226.shader_test b/shaders/skia/7-226.shader_test
new file mode 100644
index 0000000..8e1d9f1
--- /dev/null
+++ b/shaders/skia/7-226.shader_test
@@ -0,0 +1,103 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_0_Stage0;
+ float t = -1.0;
+ float v = 1.0;
+ {
+ {
+ float fx = ufocalParams_Stage1_c0_c0_c0_c0.y;
+ float x_t = -1.0;
+ {
+ x_t = dot(p, p) / p.x;
+ }
+ {
+ if (x_t <= 0.0) {
+ v = -1.0;
+ }
+ }
+ {
+ {
+ t = x_t + fx;
+ }
+ }
+ }
+ }
+ _output = vec4(t, v, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TiledGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_1_Stage0.x);
+ uint y = uint(vTransformedCoords_1_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ output_Stage2 = vec4(clamp(output_Stage2.xyz + value * 0.0039215688593685627, 0.0, output_Stage2.w), output_Stage2.w);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/7-227.shader_test b/shaders/skia/7-227.shader_test
new file mode 100644
index 0000000..b2d3385
--- /dev/null
+++ b/shaders/skia/7-227.shader_test
@@ -0,0 +1,108 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_0_Stage0;
+ float t = -1.0;
+ float v = 1.0;
+ {
+ {
+ float invR1 = ufocalParams_Stage1_c0_c0_c0_c0.x;
+ float x_t = -1.0;
+ {
+ float temp = p.x * p.x - p.y * p.y;
+ if (temp >= 0.0) {
+ {
+ x_t = sqrt(temp) - p.x * invR1;
+ }
+ }
+ }
+ {
+ if (x_t <= 0.0) {
+ v = -1.0;
+ }
+ }
+ {
+ {
+ t = x_t;
+ }
+ }
+ }
+ }
+ _output = vec4(t, v, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TiledGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_1_Stage0.x);
+ uint y = uint(vTransformedCoords_1_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ output_Stage2 = vec4(clamp(output_Stage2.xyz + value * 0.0039215688593685627, 0.0, output_Stage2.w), output_Stage2.w);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/7-228.shader_test b/shaders/skia/7-228.shader_test
new file mode 100644
index 0000000..d2f5332
--- /dev/null
+++ b/shaders/skia/7-228.shader_test
@@ -0,0 +1,91 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_0_Stage0;
+ float t = -1.0;
+ {
+ {
+ float r0 = ufocalParams_Stage1_c0_c0_c0_c0.x;
+ {
+ t = length(p) - r0;
+ }
+ }
+ }
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TiledGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_1_Stage0.x);
+ uint y = uint(vTransformedCoords_1_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ output_Stage2 = vec4(clamp(output_Stage2.xyz + value * 0.0039215688593685627, 0.0, output_Stage2.w), output_Stage2.w);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/7-229.shader_test b/shaders/skia/7-229.shader_test
new file mode 100644
index 0000000..df844ea
--- /dev/null
+++ b/shaders/skia/7-229.shader_test
@@ -0,0 +1,101 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_0_Stage0;
+ float t = -1.0;
+ float v = 1.0;
+ {
+ {
+ float fx = ufocalParams_Stage1_c0_c0_c0_c0.y;
+ float x_t = -1.0;
+ {
+ x_t = dot(p, p) / p.x;
+ }
+ {
+ if (x_t <= 0.0) {
+ v = -1.0;
+ }
+ }
+ {
+ {
+ t = x_t + fx;
+ }
+ }
+ }
+ }
+ _output = vec4(t, v, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else {
+ {
+ t.x = fract(t.x);
+ }
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TiledGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_1_Stage0.x);
+ uint y = uint(vTransformedCoords_1_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ output_Stage2 = vec4(clamp(output_Stage2.xyz + value * 0.0039215688593685627, 0.0, output_Stage2.w), output_Stage2.w);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/7-230.shader_test b/shaders/skia/7-230.shader_test
new file mode 100644
index 0000000..7c29266
--- /dev/null
+++ b/shaders/skia/7-230.shader_test
@@ -0,0 +1,106 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_0_Stage0;
+ float t = -1.0;
+ float v = 1.0;
+ {
+ {
+ float invR1 = ufocalParams_Stage1_c0_c0_c0_c0.x;
+ float x_t = -1.0;
+ {
+ float temp = p.x * p.x - p.y * p.y;
+ if (temp >= 0.0) {
+ {
+ x_t = sqrt(temp) - p.x * invR1;
+ }
+ }
+ }
+ {
+ if (x_t <= 0.0) {
+ v = -1.0;
+ }
+ }
+ {
+ {
+ t = x_t;
+ }
+ }
+ }
+ }
+ _output = vec4(t, v, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else {
+ {
+ t.x = fract(t.x);
+ }
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TiledGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_1_Stage0.x);
+ uint y = uint(vTransformedCoords_1_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ output_Stage2 = vec4(clamp(output_Stage2.xyz + value * 0.0039215688593685627, 0.0, output_Stage2.w), output_Stage2.w);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/7-231.shader_test b/shaders/skia/7-231.shader_test
new file mode 100644
index 0000000..91f9c01
--- /dev/null
+++ b/shaders/skia/7-231.shader_test
@@ -0,0 +1,89 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_0_Stage0;
+ float t = -1.0;
+ {
+ {
+ float r0 = ufocalParams_Stage1_c0_c0_c0_c0.x;
+ {
+ t = length(p) - r0;
+ }
+ }
+ }
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else {
+ {
+ t.x = fract(t.x);
+ }
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TiledGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_1_Stage0.x);
+ uint y = uint(vTransformedCoords_1_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ output_Stage2 = vec4(clamp(output_Stage2.xyz + value * 0.0039215688593685627, 0.0, output_Stage2.w), output_Stage2.w);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/7-232.shader_test b/shaders/skia/7-232.shader_test
new file mode 100644
index 0000000..1f65f64
--- /dev/null
+++ b/shaders/skia/7-232.shader_test
@@ -0,0 +1,104 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_0_Stage0;
+ float t = -1.0;
+ float v = 1.0;
+ {
+ {
+ float fx = ufocalParams_Stage1_c0_c0_c0_c0.y;
+ float x_t = -1.0;
+ {
+ x_t = dot(p, p) / p.x;
+ }
+ {
+ if (x_t <= 0.0) {
+ v = -1.0;
+ }
+ }
+ {
+ {
+ t = x_t + fx;
+ }
+ }
+ }
+ }
+ _output = vec4(t, v, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_1_Stage0.x);
+ uint y = uint(vTransformedCoords_1_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ output_Stage2 = vec4(clamp(output_Stage2.xyz + value * 0.0039215688593685627, 0.0, output_Stage2.w), output_Stage2.w);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/7-233.shader_test b/shaders/skia/7-233.shader_test
new file mode 100644
index 0000000..367e98d
--- /dev/null
+++ b/shaders/skia/7-233.shader_test
@@ -0,0 +1,109 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_0_Stage0;
+ float t = -1.0;
+ float v = 1.0;
+ {
+ {
+ float invR1 = ufocalParams_Stage1_c0_c0_c0_c0.x;
+ float x_t = -1.0;
+ {
+ float temp = p.x * p.x - p.y * p.y;
+ if (temp >= 0.0) {
+ {
+ x_t = sqrt(temp) - p.x * invR1;
+ }
+ }
+ }
+ {
+ if (x_t <= 0.0) {
+ v = -1.0;
+ }
+ }
+ {
+ {
+ t = x_t;
+ }
+ }
+ }
+ }
+ _output = vec4(t, v, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_1_Stage0.x);
+ uint y = uint(vTransformedCoords_1_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ output_Stage2 = vec4(clamp(output_Stage2.xyz + value * 0.0039215688593685627, 0.0, output_Stage2.w), output_Stage2.w);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/7-236.shader_test b/shaders/skia/7-236.shader_test
new file mode 100644
index 0000000..0dcef3d
--- /dev/null
+++ b/shaders/skia/7-236.shader_test
@@ -0,0 +1,92 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform float ubias_Stage1_c0_c0_c0_c0;
+uniform float uscale_Stage1_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 SweepGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float angle;
+ {
+ angle = atan(-vTransformedCoords_0_Stage0.y, -vTransformedCoords_0_Stage0.x);
+ }
+ float t = ((angle * 0.15915493667125702 + 0.5) + ubias_Stage1_c0_c0_c0_c0) * uscale_Stage1_c0_c0_c0_c0;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = SweepGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TiledGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/7-237.shader_test b/shaders/skia/7-237.shader_test
new file mode 100644
index 0000000..591a324
--- /dev/null
+++ b/shaders/skia/7-237.shader_test
@@ -0,0 +1,63 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec4 vinCircleEdge_Stage0;
+noperspective in vec4 vinColor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 TextureEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ vec4 circleEdge;
+ circleEdge = vinCircleEdge_Stage0;
+ outputColor_Stage0 = vinColor_Stage0;
+ float d = length(circleEdge.xy);
+ float distanceToOuterEdge = circleEdge.z * (1.0 - d);
+ float edgeAlpha = clamp(distanceToOuterEdge, 0.0, 1.0);
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_dst_in(outputColor_Stage0, TextureEffect_Stage1_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage1 * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec4 inCircleEdge;
+noperspective out vec4 vinCircleEdge_Stage0;
+noperspective out vec4 vinColor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vinCircleEdge_Stage0 = inCircleEdge;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/7-239.shader_test b/shaders/skia/7-239.shader_test
new file mode 100644
index 0000000..a8b7927
--- /dev/null
+++ b/shaders/skia/7-239.shader_test
@@ -0,0 +1,99 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+flat in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec4 varccoord_Stage0;
+vec4 RadialGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = length(vTransformedCoords_0_Stage0);
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = RadialGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ outputCoverage_Stage0 = vec4(1.0);
+ if (vec2(0.0) != varccoord_Stage0.xy) {
+ float fn = dot(varccoord_Stage0.xy, varccoord_Stage0.xy) - 1.0;
+ if (fn > 0.0) {
+ outputCoverage_Stage0 = vec4(0.0);
+ }
+ }
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1 * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec4 radii_selector;
+in vec4 corner_and_radius_outsets;
+in vec4 skew;
+in vec2 translate;
+in vec4 radii_x;
+in vec4 radii_y;
+in vec4 color;
+in vec4 local_rect;
+flat out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec4 varccoord_Stage0;
+void main() {
+ vcolor_Stage0 = color;
+ vec2 corner = corner_and_radius_outsets.xy;
+ vec2 radius_outset = corner_and_radius_outsets.zw;
+ vec2 radii;
+ radii.x = dot(radii_selector, radii_x);
+ radii.y = dot(radii_selector, radii_y);
+ bool is_arc_section = radii.x > 0.0;
+ radii = abs(radii);
+ vec2 vertexpos = corner + radius_outset * radii;
+ vec2 localcoord = (local_rect.xy * (1.0 - vertexpos) + local_rect.zw * (1.0 + vertexpos)) * 0.5;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localcoord, 1.0)).xy;
+ mat2 skewmatrix = mat2(skew.xy, skew.zw);
+ vec2 devcoord = vertexpos * skewmatrix + translate;
+ if (is_arc_section) {
+ varccoord_Stage0.xy = 1.0 - abs(radius_outset);
+ mat2 derivatives = inverse(skewmatrix);
+ varccoord_Stage0.zw = derivatives * (((varccoord_Stage0.xy / radii) * corner) * 2.0);
+ } else {
+ varccoord_Stage0 = vec4(0.0);
+ }
+ gl_Position = vec4(devcoord.x, devcoord.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/7-240.shader_test b/shaders/skia/7-240.shader_test
new file mode 100644
index 0000000..ef5a59e
--- /dev/null
+++ b/shaders/skia/7-240.shader_test
@@ -0,0 +1,115 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+flat in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec4 varccoord_Stage0;
+vec4 RadialGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = length(vTransformedCoords_0_Stage0);
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = RadialGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ outputCoverage_Stage0 = vec4(1.0);
+ if (vec2(0.0) != varccoord_Stage0.xy) {
+ float fn = dot(varccoord_Stage0.xy, varccoord_Stage0.xy) - 1.0;
+ if (fn > 0.0) {
+ outputCoverage_Stage0 = vec4(0.0);
+ }
+ }
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_1_Stage0.x);
+ uint y = uint(vTransformedCoords_1_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ output_Stage2 = vec4(clamp(output_Stage2.xyz + value * 0.0039215688593685627, 0.0, output_Stage2.w), output_Stage2.w);
+ }
+ {
+ sk_FragColor = output_Stage2 * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec4 radii_selector;
+in vec4 corner_and_radius_outsets;
+in vec4 skew;
+in vec2 translate;
+in vec4 radii_x;
+in vec4 radii_y;
+in vec4 color;
+in vec4 local_rect;
+flat out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec4 varccoord_Stage0;
+void main() {
+ vcolor_Stage0 = color;
+ vec2 corner = corner_and_radius_outsets.xy;
+ vec2 radius_outset = corner_and_radius_outsets.zw;
+ vec2 radii;
+ radii.x = dot(radii_selector, radii_x);
+ radii.y = dot(radii_selector, radii_y);
+ bool is_arc_section = radii.x > 0.0;
+ radii = abs(radii);
+ vec2 vertexpos = corner + radius_outset * radii;
+ vec2 localcoord = (local_rect.xy * (1.0 - vertexpos) + local_rect.zw * (1.0 + vertexpos)) * 0.5;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localcoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localcoord, 1.0)).xy;
+ mat2 skewmatrix = mat2(skew.xy, skew.zw);
+ vec2 devcoord = vertexpos * skewmatrix + translate;
+ if (is_arc_section) {
+ varccoord_Stage0.xy = 1.0 - abs(radius_outset);
+ mat2 derivatives = inverse(skewmatrix);
+ varccoord_Stage0.zw = derivatives * (((varccoord_Stage0.xy / radii) * corner) * 2.0);
+ } else {
+ varccoord_Stage0 = vec4(0.0);
+ }
+ gl_Position = vec4(devcoord.x, devcoord.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/7-241.shader_test b/shaders/skia/7-241.shader_test
new file mode 100644
index 0000000..a3f8815
--- /dev/null
+++ b/shaders/skia/7-241.shader_test
@@ -0,0 +1,92 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform float ubias_Stage1_c0_c0_c0_c0;
+uniform float uscale_Stage1_c0_c0_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+in float vcoverage_Stage0;
+flat in vec4 vgeomDomain_Stage0;
+vec4 SweepGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float angle;
+ {
+ angle = atan(-vTransformedCoords_0_Stage0.y, -vTransformedCoords_0_Stage0.x);
+ }
+ float t = ((angle * 0.15915493667125702 + 0.5) + ubias_Stage1_c0_c0_c0_c0) * uscale_Stage1_c0_c0_c0_c0;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = SweepGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ float coverage = vcoverage_Stage0 * gl_FragCoord.w;
+ vec4 geoDomain;
+ geoDomain = vgeomDomain_Stage0;
+ if (coverage < 0.5) {
+ vec4 dists4 = clamp(vec4(1.0, 1.0, -1.0, -1.0) * (gl_FragCoord.xyxy - geoDomain), 0.0, 1.0);
+ vec2 dists2 = dists4.xy * dists4.zw;
+ coverage = min(coverage, dists2.x * dists2.y);
+ }
+ outputCoverage_Stage0 = vec4(coverage);
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1 * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec4 positionWithCoverage;
+in vec4 color;
+in vec2 localCoord;
+in vec4 geomDomain;
+out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+out float vcoverage_Stage0;
+flat out vec4 vgeomDomain_Stage0;
+void main() {
+ vec3 position = positionWithCoverage.xyz;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ vcoverage_Stage0 = positionWithCoverage.w * positionWithCoverage.z;
+ vgeomDomain_Stage0 = geomDomain;
+ gl_Position = vec4(position.x, position.y, 0.0, position.z);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/7-242.shader_test b/shaders/skia/7-242.shader_test
new file mode 100644
index 0000000..84473ab
--- /dev/null
+++ b/shaders/skia/7-242.shader_test
@@ -0,0 +1,108 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform float ubias_Stage1_c0_c0_c0_c0;
+uniform float uscale_Stage1_c0_c0_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+in vec2 vTransformedCoords_0_Stage0;
+in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+in float vcoverage_Stage0;
+flat in vec4 vgeomDomain_Stage0;
+vec4 SweepGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float angle;
+ {
+ angle = atan(-vTransformedCoords_0_Stage0.y, -vTransformedCoords_0_Stage0.x);
+ }
+ float t = ((angle * 0.15915493667125702 + 0.5) + ubias_Stage1_c0_c0_c0_c0) * uscale_Stage1_c0_c0_c0_c0;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = SweepGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ float coverage = vcoverage_Stage0 * gl_FragCoord.w;
+ vec4 geoDomain;
+ geoDomain = vgeomDomain_Stage0;
+ if (coverage < 0.5) {
+ vec4 dists4 = clamp(vec4(1.0, 1.0, -1.0, -1.0) * (gl_FragCoord.xyxy - geoDomain), 0.0, 1.0);
+ vec2 dists2 = dists4.xy * dists4.zw;
+ coverage = min(coverage, dists2.x * dists2.y);
+ }
+ outputCoverage_Stage0 = vec4(coverage);
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_1_Stage0.x);
+ uint y = uint(vTransformedCoords_1_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ output_Stage2 = vec4(clamp(output_Stage2.xyz + value * 0.0039215688593685627, 0.0, output_Stage2.w), output_Stage2.w);
+ }
+ {
+ sk_FragColor = output_Stage2 * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec4 positionWithCoverage;
+in vec4 color;
+in vec2 localCoord;
+in vec4 geomDomain;
+out vec2 vTransformedCoords_0_Stage0;
+out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+out float vcoverage_Stage0;
+flat out vec4 vgeomDomain_Stage0;
+void main() {
+ vec3 position = positionWithCoverage.xyz;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ vcoverage_Stage0 = positionWithCoverage.w * positionWithCoverage.z;
+ vgeomDomain_Stage0 = geomDomain;
+ gl_Position = vec4(position.x, position.y, 0.0, position.z);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/7-243.shader_test b/shaders/skia/7-243.shader_test
new file mode 100644
index 0000000..b3c11b1
--- /dev/null
+++ b/shaders/skia/7-243.shader_test
@@ -0,0 +1,71 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform float ubias_Stage1_c0_c0_c0_c0;
+uniform float uscale_Stage1_c0_c0_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+noperspective in vec3 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 SweepGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 vTransformedCoords_0_Stage0_ensure2D = vTransformedCoords_0_Stage0.xy / vTransformedCoords_0_Stage0.z;
+ float angle;
+ {
+ angle = atan(-vTransformedCoords_0_Stage0_ensure2D.y, -vTransformedCoords_0_Stage0_ensure2D.x);
+ }
+ float t = ((angle * 0.15915493667125702 + 0.5) + ubias_Stage1_c0_c0_c0_c0) * uscale_Stage1_c0_c0_c0_c0;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = SweepGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec3 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0);
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/7-244.shader_test b/shaders/skia/7-244.shader_test
new file mode 100644
index 0000000..35ffe66
--- /dev/null
+++ b/shaders/skia/7-244.shader_test
@@ -0,0 +1,87 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform float ubias_Stage1_c0_c0_c0_c0;
+uniform float uscale_Stage1_c0_c0_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+noperspective in vec3 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 SweepGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 vTransformedCoords_0_Stage0_ensure2D = vTransformedCoords_0_Stage0.xy / vTransformedCoords_0_Stage0.z;
+ float angle;
+ {
+ angle = atan(-vTransformedCoords_0_Stage0_ensure2D.y, -vTransformedCoords_0_Stage0_ensure2D.x);
+ }
+ float t = ((angle * 0.15915493667125702 + 0.5) + ubias_Stage1_c0_c0_c0_c0) * uscale_Stage1_c0_c0_c0_c0;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = SweepGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_1_Stage0.x);
+ uint y = uint(vTransformedCoords_1_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ output_Stage2 = vec4(clamp(output_Stage2.xyz + value * 0.0039215688593685627, 0.0, output_Stage2.w), output_Stage2.w);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec3 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0);
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/7-249.shader_test b/shaders/skia/7-249.shader_test
new file mode 100644
index 0000000..526aa83
--- /dev/null
+++ b/shaders/skia/7-249.shader_test
@@ -0,0 +1,69 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform float ubias_Stage1_c0_c0_c0_c0;
+uniform float uscale_Stage1_c0_c0_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 SweepGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float angle;
+ {
+ angle = atan(-vTransformedCoords_0_Stage0.y, -vTransformedCoords_0_Stage0.x);
+ }
+ float t = ((angle * 0.15915493667125702 + 0.5) + ubias_Stage1_c0_c0_c0_c0) * uscale_Stage1_c0_c0_c0_c0;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 TextureGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coord = vec2(_input.x, 0.5);
+ _output = texture(uTextureSampler_0_Stage1, coord);
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = SweepGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = TextureGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/7-27.shader_test b/shaders/skia/7-27.shader_test
new file mode 100644
index 0000000..384f94b
--- /dev/null
+++ b/shaders/skia/7-27.shader_test
@@ -0,0 +1,35 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+noperspective in vec4 vcolor_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ {
+ sk_FragColor = outputColor_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform vec4 uColor_Stage0;
+in vec2 inPosition;
+in float inCoverage;
+noperspective out vec4 vcolor_Stage0;
+void main() {
+ vec4 color = uColor_Stage0;
+ color = color * inCoverage;
+ vcolor_Stage0 = color;
+ vec2 pos2 = inPosition;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/7-275.shader_test b/shaders/skia/7-275.shader_test
new file mode 100644
index 0000000..f35d05d
--- /dev/null
+++ b/shaders/skia/7-275.shader_test
@@ -0,0 +1,94 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uColor_Stage0;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 uscale01_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias01_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale23_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias23_Stage1_c0_c0_c1_c0;
+uniform float uthreshold_Stage1_c0_c0_c1_c0;
+uniform vec3 uedges_Stage2[4];
+in vec2 vTransformedCoords_0_Stage0;
+vec4 RadialGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = length(vTransformedCoords_0_Stage0);
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 DualIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthreshold_Stage1_c0_c0_c1_c0) {
+ scale = uscale01_Stage1_c0_c0_c1_c0;
+ bias = ubias01_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale23_Stage1_c0_c0_c1_c0;
+ bias = ubias23_Stage1_c0_c0_c1_c0;
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = RadialGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = DualIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ float alpha = 1.0;
+ float edge;
+ edge = dot(uedges_Stage2[0], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage2[1], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage2[2], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage2[3], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ output_Stage2 = vec4(alpha);
+ }
+ {
+ sk_FragColor = output_Stage1 * output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec3 pos3 = uViewM_Stage0 * vec3(inPosition, 1.0);
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos3.x, pos3.y, 0.0, pos3.z);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/7-280.shader_test b/shaders/skia/7-280.shader_test
new file mode 100644
index 0000000..c85235e
--- /dev/null
+++ b/shaders/skia/7-280.shader_test
@@ -0,0 +1,66 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 ucolor_Stage2_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage3;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c1_c0;
+ }
+ return _output;
+}
+vec4 blend_src_atop(vec4 src, vec4 dst) {
+ return dst.w * src + (1.0 - src.w) * dst;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TextureEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_src_atop(ConstColorProcessor_Stage2_c1_c0(vec4(1.0)), output_Stage1);
+ }
+ vec4 output_Stage3;
+ {
+ output_Stage3 = texture(uTextureSampler_0_Stage3, vTransformedCoords_1_Stage0);
+ }
+ {
+ sk_FragColor = output_Stage2 * output_Stage3;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/7-281.shader_test b/shaders/skia/7-281.shader_test
new file mode 100644
index 0000000..d104603
--- /dev/null
+++ b/shaders/skia/7-281.shader_test
@@ -0,0 +1,77 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_KHR_blend_equation_advanced : require
+out vec4 sk_FragColor;
+layout (blend_support_all_equations) out ;
+uniform mat3 ucolorSpaceMatrix_Stage1_c0_c0;
+uniform vec3 ucolorSpaceTranslate_Stage1_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+uniform sampler2D uTextureSampler_2_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_1_Stage1, vTransformedCoords_1_Stage0) * _input;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c0_c0_c2_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_2_Stage1, vTransformedCoords_2_Stage0) * _input;
+ return _output;
+}
+vec4 YUVtoRGBEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 planes[3];
+ planes[0] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0));
+ planes[1] = TextureEffect_Stage1_c0_c0_c1_c0(vec4(1.0));
+ planes[2] = TextureEffect_Stage1_c0_c0_c2_c0(vec4(1.0));
+ vec4 color = vec4(planes[0].x, planes[1].x, planes[2].x, 1.0);
+ color.xyz = clamp(color.xyz * ucolorSpaceMatrix_Stage1_c0_c0 + ucolorSpaceTranslate_Stage1_c0_c0, 0.0, 1.0);
+ _output = color;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = YUVtoRGBEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/7-283.shader_test b/shaders/skia/7-283.shader_test
new file mode 100644
index 0000000..fd8cfd2
--- /dev/null
+++ b/shaders/skia/7-283.shader_test
@@ -0,0 +1,55 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 ucircle_Stage1;
+uniform vec4 ucircle_Stage2;
+flat in vec4 vcolor_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ float d;
+ {
+ d = (length((ucircle_Stage1.xy - gl_FragCoord.xy) * ucircle_Stage1.w) - 1.0) * ucircle_Stage1.z;
+ }
+ {
+ output_Stage1 = vec4(clamp(d, 0.0, 1.0));
+ }
+ }
+ vec4 output_Stage2;
+ {
+ float d;
+ {
+ d = (1.0 - length((ucircle_Stage2.xy - gl_FragCoord.xy) * ucircle_Stage2.w)) * ucircle_Stage2.z;
+ }
+ {
+ output_Stage2 = output_Stage1 * clamp(d, 0.0, 1.0);
+ }
+ }
+ {
+ sk_FragColor = outputColor_Stage0 * output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 position;
+in vec4 color;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/7-287.shader_test b/shaders/skia/7-287.shader_test
new file mode 100644
index 0000000..49e8059
--- /dev/null
+++ b/shaders/skia/7-287.shader_test
@@ -0,0 +1,73 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+noperspective in float vcoverage_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ float coverage = vcoverage_Stage0;
+ outputCoverage_Stage0 = vec4(coverage);
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TiledGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1 * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in float coverage;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+noperspective out float vcoverage_Stage0;
+void main() {
+ vec2 position = position;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ vcoverage_Stage0 = coverage;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/7-288.shader_test b/shaders/skia/7-288.shader_test
new file mode 100644
index 0000000..e12c93c
--- /dev/null
+++ b/shaders/skia/7-288.shader_test
@@ -0,0 +1,39 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform sampler2D uTextureSampler_0_Stage0;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vlocalCoord_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ vec2 texCoord;
+ texCoord = vlocalCoord_Stage0;
+ outputColor_Stage0 = texture(uTextureSampler_0_Stage0, texCoord) * outputColor_Stage0;
+ }
+ {
+ sk_FragColor = outputColor_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vlocalCoord_Stage0;
+void main() {
+ vcolor_Stage0 = color;
+ vlocalCoord_Stage0 = localCoord;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/7-289.shader_test b/shaders/skia/7-289.shader_test
new file mode 100644
index 0000000..ef855f9
--- /dev/null
+++ b/shaders/skia/7-289.shader_test
@@ -0,0 +1,43 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_KHR_blend_equation_advanced : require
+out vec4 sk_FragColor;
+layout (blend_support_all_equations) out ;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec4 vcolor_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * outputColor_Stage0;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/7-294.shader_test b/shaders/skia/7-294.shader_test
new file mode 100644
index 0000000..e89b8a9
--- /dev/null
+++ b/shaders/skia/7-294.shader_test
@@ -0,0 +1,38 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 ucolor_Stage1;
+noperspective in vec4 vcolor_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ {
+ output_Stage1 = ucolor_Stage1;
+ }
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec2 inLocalCoord;
+noperspective out vec4 vcolor_Stage0;
+void main() {
+ vec4 color = inColor;
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/7-295.shader_test b/shaders/skia/7-295.shader_test
new file mode 100644
index 0000000..fbfa562
--- /dev/null
+++ b/shaders/skia/7-295.shader_test
@@ -0,0 +1,82 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 ucolor_Stage2_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 TextureEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = TextureEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = OverrideInputFragmentProcessor_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c1_c0;
+ }
+ return _output;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 blend_modulate(vec4 src, vec4 dst) {
+ return src * dst;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_src_over(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_modulate(ConstColorProcessor_Stage2_c1_c0(vec4(1.0)), output_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec2 inLocalCoord;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 color = inColor;
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/7-297.shader_test b/shaders/skia/7-297.shader_test
new file mode 100644
index 0000000..314c8b3
--- /dev/null
+++ b/shaders/skia/7-297.shader_test
@@ -0,0 +1,40 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uColor_Stage0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 TextureEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TextureEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec2 inLocalCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/7-298.shader_test b/shaders/skia/7-298.shader_test
new file mode 100644
index 0000000..c7861dd
--- /dev/null
+++ b/shaders/skia/7-298.shader_test
@@ -0,0 +1,56 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uScale_Stage1;
+uniform vec4 uTexDom_Stage1;
+uniform vec3 uDecalParams_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ vec4 dColor = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ dColor.xyz = dColor.w < 9.9999999747524271e-07 ? vec3(0.0) : clamp(dColor.xyz / dColor.w, 0.0, 1.0);
+ vec2 cCoords = vTransformedCoords_1_Stage0 + uScale_Stage1 * (dColor.zw - vec2(0.5));
+ {
+ vec2 origCoord = cCoords;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ output_Stage1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/7-3.shader_test b/shaders/skia/7-3.shader_test
new file mode 100644
index 0000000..884a566
--- /dev/null
+++ b/shaders/skia/7-3.shader_test
@@ -0,0 +1,34 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uColor_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = uColor_Stage0;
+ }
+ {
+ sk_FragColor = outputColor_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 inPosition;
+void main() {
+ vec2 pos2 = (uViewM_Stage0 * vec3(inPosition, 1.0)).xy;
+ {
+ vec2 _posTmp = pos2;
+ _posTmp = floor(_posTmp) + vec2(0.5, 0.5);
+ gl_Position = vec4(_posTmp, 0.0, 1.0);
+ }
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/7-300.shader_test b/shaders/skia/7-300.shader_test
new file mode 100644
index 0000000..8f367ba
--- /dev/null
+++ b/shaders/skia/7-300.shader_test
@@ -0,0 +1,59 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform float uDistanceAdjust_Stage0;
+uniform sampler2D uTextureSampler_0_Stage0;
+noperspective in vec4 vinColor_Stage0;
+noperspective in vec2 vTextureCoords_Stage0;
+flat in int vTexIndex_Stage0;
+noperspective in vec2 vIntTextureCoords_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vinColor_Stage0;
+ vec2 uv = vTextureCoords_Stage0;
+ vec4 texColor;
+ {
+ texColor = texture(uTextureSampler_0_Stage0, uv);
+ }
+ float distance = 7.96875 * (texColor.x - 0.50196081399917603);
+ distance -= uDistanceAdjust_Stage0;
+ float afwidth;
+ float st_grad_len = length(-dFdy(vIntTextureCoords_Stage0));
+ afwidth = abs(0.64999997615814209 * st_grad_len);
+ float val = smoothstep(-afwidth, afwidth, distance);
+ outputCoverage_Stage0 = vec4(val);
+ }
+ {
+ sk_FragColor = outputColor_Stage0 * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform vec2 uAtlasDimensionsInv_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in uvec2 inTextureCoords;
+noperspective out vec4 vinColor_Stage0;
+noperspective out vec2 vTextureCoords_Stage0;
+flat out int vTexIndex_Stage0;
+noperspective out vec2 vIntTextureCoords_Stage0;
+void main() {
+ vinColor_Stage0 = inColor;
+ ivec2 signedCoords = ivec2(int(inTextureCoords.x), int(inTextureCoords.y));
+ vec2 unormTexCoords = vec2(float(signedCoords.x / 2), float(signedCoords.y / 2));
+ vTextureCoords_Stage0 = unormTexCoords * uAtlasDimensionsInv_Stage0;
+ vTexIndex_Stage0 = 0;
+ vIntTextureCoords_Stage0 = unormTexCoords;
+ gl_Position = vec4(inPosition.x, inPosition.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/7-31.shader_test b/shaders/skia/7-31.shader_test
new file mode 100644
index 0000000..01cbeaa
--- /dev/null
+++ b/shaders/skia/7-31.shader_test
@@ -0,0 +1,89 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform vec4 uKernel_Stage1[5];
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0 - 8.0 * uImageIncrement_Stage1;
+ vec2 coordSampled = vec2(0.0, 0.0);
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[4].x;
+ coord += uImageIncrement_Stage1;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ sk_FragColor = sk_FragColor.wwww;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/7-312.shader_test b/shaders/skia/7-312.shader_test
new file mode 100644
index 0000000..9eb22eb
--- /dev/null
+++ b/shaders/skia/7-312.shader_test
@@ -0,0 +1,52 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec3 uedges_Stage1[3];
+flat in vec4 vcolor_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ float alpha = 1.0;
+ float edge;
+ edge = dot(uedges_Stage1[0], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage1[1], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage1[2], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ alpha = 1.0 - alpha;
+ output_Stage1 = vec4(alpha);
+ }
+ {
+ sk_FragColor = outputColor_Stage0 * output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 inPosition;
+in vec2 inLocalCoords;
+in vec4 color;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vcolor_Stage0 = color;
+ vec2 pos2 = inPosition;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/7-313.shader_test b/shaders/skia/7-313.shader_test
new file mode 100644
index 0000000..ee4d0c3
--- /dev/null
+++ b/shaders/skia/7-313.shader_test
@@ -0,0 +1,53 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec3 uedges_Stage1[3];
+uniform sampler2D uTextureSampler_0_Stage0;
+noperspective in vec2 vlocalCoord_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vec4(1.0);
+ vec2 texCoord;
+ texCoord = vlocalCoord_Stage0;
+ outputColor_Stage0 = texture(uTextureSampler_0_Stage0, texCoord);
+ }
+ vec4 output_Stage1;
+ {
+ float alpha = 1.0;
+ float edge;
+ edge = dot(uedges_Stage1[0], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage1[1], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage1[2], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ output_Stage1 = vec4(alpha);
+ }
+ {
+ sk_FragColor = outputColor_Stage0 * output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vlocalCoord_Stage0;
+void main() {
+ vlocalCoord_Stage0 = localCoord;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/7-320.shader_test b/shaders/skia/7-320.shader_test
new file mode 100644
index 0000000..deb5031
--- /dev/null
+++ b/shaders/skia/7-320.shader_test
@@ -0,0 +1,60 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform sampler2D uTextureSampler_0_Stage0;
+flat in vec4 vcolor_Stage0;
+noperspective in vec2 vlocalCoord_Stage0;
+noperspective in float vcoverage_Stage0;
+flat in vec4 vgeomDomain_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ vec2 texCoord;
+ texCoord = vlocalCoord_Stage0;
+ outputColor_Stage0 = texture(uTextureSampler_0_Stage0, texCoord) * outputColor_Stage0;
+ float coverage = vcoverage_Stage0;
+ vec4 geoDomain;
+ geoDomain = vgeomDomain_Stage0;
+ if (coverage < 0.5) {
+ vec4 dists4 = clamp(vec4(1.0, 1.0, -1.0, -1.0) * (gl_FragCoord.xyxy - geoDomain), 0.0, 1.0);
+ vec2 dists2 = dists4.xy * dists4.zw;
+ coverage = min(coverage, dists2.x * dists2.y);
+ }
+ outputCoverage_Stage0 = vec4(coverage);
+ }
+ {
+ sk_FragColor = outputColor_Stage0 * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 position;
+in float coverage;
+in vec4 color;
+in vec2 localCoord;
+in vec4 geomDomain;
+flat out vec4 vcolor_Stage0;
+noperspective out vec2 vlocalCoord_Stage0;
+noperspective out float vcoverage_Stage0;
+flat out vec4 vgeomDomain_Stage0;
+void main() {
+ vec2 position = position;
+ vcolor_Stage0 = color;
+ vlocalCoord_Stage0 = localCoord;
+ vcoverage_Stage0 = coverage;
+ vgeomDomain_Stage0 = geomDomain;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/7-322.shader_test b/shaders/skia/7-322.shader_test
new file mode 100644
index 0000000..dea712e
--- /dev/null
+++ b/shaders/skia/7-322.shader_test
@@ -0,0 +1,109 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 ustart_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c0_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+noperspective in float vcoverage_Stage0;
+flat in vec4 vgeomDomain_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c0_c0_c1_c0;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+vec4 ComposeOne_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_dst_in(_input, TiledGradientEffect_Stage1_c0_c0_c0_c0(vec4(1.0)));
+ return _output;
+}
+vec4 TextureEffect_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_1_Stage0) * _input;
+ return _output;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ float coverage = vcoverage_Stage0;
+ vec4 geoDomain;
+ geoDomain = vgeomDomain_Stage0;
+ if (coverage < 0.5) {
+ vec4 dists4 = clamp(vec4(1.0, 1.0, -1.0, -1.0) * (gl_FragCoord.xyxy - geoDomain), 0.0, 1.0);
+ vec2 dists2 = dists4.xy * dists4.zw;
+ coverage = min(coverage, dists2.x * dists2.y);
+ }
+ outputCoverage_Stage0 = vec4(coverage);
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TextureEffect_Stage1_c1_c0(ComposeOne_Stage1_c0_c0(outputColor_Stage0));
+ }
+ {
+ sk_FragColor = output_Stage1 * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in float coverage;
+in vec4 color;
+in vec2 localCoord;
+in vec4 geomDomain;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+noperspective out float vcoverage_Stage0;
+flat out vec4 vgeomDomain_Stage0;
+void main() {
+ vec2 position = position;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ vcoverage_Stage0 = coverage;
+ vgeomDomain_Stage0 = geomDomain;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/7-326.shader_test b/shaders/skia/7-326.shader_test
new file mode 100644
index 0000000..5daa3e0
--- /dev/null
+++ b/shaders/skia/7-326.shader_test
@@ -0,0 +1,91 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c1_c0_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c1_c0_c0_c0;
+uniform vec4 ustart_Stage1_c1_c0_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c1_c0_c0_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+vec4 LinearGradientLayout_Stage1_c1_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_1_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c1_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c1_c0_c0_c0_c1_c0 + t * uend_Stage1_c1_c0_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c1_c0_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c1_c0_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c1_c0_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c1_c0_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = ClampedGradientEffect_Stage1_c1_c0_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ return _output;
+}
+vec4 blend_dst_over(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src + dst;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_dst_over(TextureEffect_Stage1_c0_c0(inputColor), OverrideInputFragmentProcessor_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/7-328.shader_test b/shaders/skia/7-328.shader_test
new file mode 100644
index 0000000..fbb308a
--- /dev/null
+++ b/shaders/skia/7-328.shader_test
@@ -0,0 +1,121 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 uleftBorderColor_Stage1_c1_c0_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c1_c0_c0_c0;
+uniform vec4 ustart_Stage1_c1_c0_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c1_c0_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+vec4 ComposeOne_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_dst_in(_input, ClampedGradientEffect_Stage1_c0_c0_c0_c0(vec4(1.0)));
+ return _output;
+}
+vec4 LinearGradientLayout_Stage1_c1_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_1_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c1_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c1_c0_c0_c0_c1_c0 + t * uend_Stage1_c1_c0_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c1_c0_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c1_c0_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c1_c0_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c1_c0_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 ComposeOne_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_dst_in(_input, ClampedGradientEffect_Stage1_c1_c0_c0_c0(vec4(1.0)));
+ return _output;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_dst_in(ComposeOne_Stage1_c0_c0(inputColor), ComposeOne_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/7-34.shader_test b/shaders/skia/7-34.shader_test
new file mode 100644
index 0000000..8b8eb2a
--- /dev/null
+++ b/shaders/skia/7-34.shader_test
@@ -0,0 +1,29 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uColor_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = uColor_Stage0;
+ }
+ {
+ sk_FragColor = outputColor_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 position;
+void main() {
+ vec2 pos2 = position;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/7-349.shader_test b/shaders/skia/7-349.shader_test
new file mode 100644
index 0000000..9e27e40
--- /dev/null
+++ b/shaders/skia/7-349.shader_test
@@ -0,0 +1,133 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform float ubias_Stage1_c0_c0_c0_c0;
+uniform float uscale_Stage1_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+uniform mat4 um_Stage2_c2_c0;
+uniform vec4 uv_Stage2_c2_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 SweepGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float angle;
+ {
+ angle = atan(-vTransformedCoords_0_Stage0.y, -vTransformedCoords_0_Stage0.x);
+ }
+ float t = ((angle * 0.15915493667125702 + 0.5) + ubias_Stage1_c0_c0_c0_c0) * uscale_Stage1_c0_c0_c0_c0;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = SweepGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ t.x = fract(t.x);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 RGBToHSLFilterEffect_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 c = _input;
+ vec4 p = c.y < c.z ? vec4(c.zy, -1.0, 0.66666668653488159) : vec4(c.yz, 0.0, -0.3333333432674408);
+ vec4 q = c.x < p.x ? vec4(p.x, c.x, p.yw) : vec4(c.x, p.x, p.yz);
+ float pmV = q.x;
+ float pmC = pmV - min(q.y, q.z);
+ float pmL = pmV - pmC * 0.5;
+ float H = abs(q.w + (q.y - q.z) / (pmC * 6.0 + 9.9999997473787516e-05));
+ float S = pmC / ((c.w + 9.9999997473787516e-05) - abs(pmL * 2.0 - c.w));
+ float L = pmL / (c.w + 9.9999997473787516e-05);
+ _output = vec4(H, S, L, c.w);
+ return _output;
+}
+vec4 ColorMatrixFragmentProcessor_Stage2_c2_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = _input;
+ _output = um_Stage2_c2_c0 * inputColor + uv_Stage2_c2_c0;
+ {
+ _output.w = clamp(_output.w, 0.0, 1.0);
+ }
+ return _output;
+}
+vec4 HSLToRGBFilterEffect_Stage2_c3_c0(vec4 _input) {
+ vec4 _output;
+ vec3 hsl = _input.xyz;
+ float C = (1.0 - abs(2.0 * hsl.z - 1.0)) * hsl.y;
+ vec3 p = hsl.xxx + vec3(0.0, 0.66666668653488159, 0.3333333432674408);
+ vec3 q = clamp(abs(fract(p) * 6.0 - 3.0) - 1.0, 0.0, 1.0);
+ vec3 rgb = (q - 0.5) * C + hsl.z;
+ _output = clamp(vec4(rgb, _input.w), 0.0, 1.0);
+ _output.xyz *= _output.w;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TiledGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = HSLToRGBFilterEffect_Stage2_c3_c0(ColorMatrixFragmentProcessor_Stage2_c2_c0(RGBToHSLFilterEffect_Stage2_c1_c0(output_Stage1)));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/7-350.shader_test b/shaders/skia/7-350.shader_test
new file mode 100644
index 0000000..7c9cff6
--- /dev/null
+++ b/shaders/skia/7-350.shader_test
@@ -0,0 +1,123 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale8_9_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale10_11_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias8_9_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias10_11_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+uniform mat4 um_Stage2;
+uniform vec4 uv_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.w) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c1_c0;
+ }
+ }
+ } else {
+ {
+ if (t < uthresholds9_13_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale8_9_Stage1_c0_c0_c1_c0;
+ bias = ubias8_9_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale10_11_Stage1_c0_c0_c1_c0;
+ bias = ubias10_11_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ vec4 inputColor = output_Stage1;
+ {
+ float nonZeroAlpha = max(inputColor.w, 9.9999997473787516e-05);
+ inputColor = vec4(inputColor.xyz / nonZeroAlpha, inputColor.w);
+ }
+ output_Stage2 = um_Stage2 * inputColor + uv_Stage2;
+ {
+ output_Stage2 = clamp(output_Stage2, 0.0, 1.0);
+ }
+ {
+ output_Stage2.xyz *= output_Stage2.w;
+ }
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/7-353.shader_test b/shaders/skia/7-353.shader_test
new file mode 100644
index 0000000..c174f88
--- /dev/null
+++ b/shaders/skia/7-353.shader_test
@@ -0,0 +1,97 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uscale01_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias01_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale23_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias23_Stage1_c0_c0_c0_c0_c1_c0;
+uniform float uthreshold_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage1_c1_c0_c0_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 DualIntervalGradientColorizer_Stage1_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthreshold_Stage1_c0_c0_c0_c0_c1_c0) {
+ scale = uscale01_Stage1_c0_c0_c0_c0_c1_c0;
+ bias = ubias01_Stage1_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale23_Stage1_c0_c0_c0_c0_c1_c0;
+ bias = ubias23_Stage1_c0_c0_c0_c0_c1_c0;
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ t.x = fract(t.x);
+ }
+ _output = DualIntervalGradientColorizer_Stage1_c0_c0_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = TiledGradientEffect_Stage1_c0_c0_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ return _output;
+}
+vec4 ConstColorProcessor_Stage1_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage1_c1_c0_c0_c0;
+ }
+ return _output;
+}
+vec4 blend_src(vec4 src, vec4 dst) {
+ return src;
+}
+vec4 ComposeOne_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_src(ConstColorProcessor_Stage1_c1_c0_c0_c0(vec4(1.0)), _input);
+ return _output;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ComposeOne_Stage1_c1_c0(OverrideInputFragmentProcessor_Stage1_c0_c0(outputColor_Stage0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/7-355.shader_test b/shaders/skia/7-355.shader_test
new file mode 100644
index 0000000..cfa7428
--- /dev/null
+++ b/shaders/skia/7-355.shader_test
@@ -0,0 +1,44 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uColor_Stage0;
+uniform sampler2D uTextureSampler_0_Stage0;
+noperspective in vec2 vTextureCoords_Stage0;
+flat in int vTexIndex_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = uColor_Stage0;
+ vec4 texColor;
+ {
+ texColor = texture(uTextureSampler_0_Stage0, vTextureCoords_Stage0);
+ }
+ outputColor_Stage0 = outputColor_Stage0 * texColor;
+ }
+ {
+ sk_FragColor = vec4(0.0);
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform vec2 uAtlasSizeInv_Stage0;
+in vec2 inPosition;
+in uvec2 inTextureCoords;
+noperspective out vec2 vTextureCoords_Stage0;
+flat out int vTexIndex_Stage0;
+void main() {
+ ivec2 signedCoords = ivec2(int(inTextureCoords.x), int(inTextureCoords.y));
+ vec2 unormTexCoords = vec2(float(signedCoords.x / 2), float(signedCoords.y / 2));
+ vTextureCoords_Stage0 = unormTexCoords * uAtlasSizeInv_Stage0;
+ vTexIndex_Stage0 = 0;
+ gl_Position = vec4(inPosition.x, inPosition.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/7-356.shader_test b/shaders/skia/7-356.shader_test
new file mode 100644
index 0000000..824b3af
--- /dev/null
+++ b/shaders/skia/7-356.shader_test
@@ -0,0 +1,61 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uColor_Stage0;
+uniform mat4 um_Stage1;
+uniform vec4 uv_Stage1;
+uniform sampler2D uTextureSampler_0_Stage0;
+noperspective in vec2 vTextureCoords_Stage0;
+flat in int vTexIndex_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = uColor_Stage0;
+ vec4 texColor;
+ {
+ texColor = texture(uTextureSampler_0_Stage0, vTextureCoords_Stage0);
+ }
+ outputColor_Stage0 = outputColor_Stage0 * texColor;
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = outputColor_Stage0;
+ {
+ float nonZeroAlpha = max(inputColor.w, 9.9999997473787516e-05);
+ inputColor = vec4(inputColor.xyz / nonZeroAlpha, inputColor.w);
+ }
+ output_Stage1 = um_Stage1 * inputColor + uv_Stage1;
+ {
+ output_Stage1 = clamp(output_Stage1, 0.0, 1.0);
+ }
+ {
+ output_Stage1.xyz *= output_Stage1.w;
+ }
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform vec2 uAtlasSizeInv_Stage0;
+in vec2 inPosition;
+in uvec2 inTextureCoords;
+noperspective out vec2 vTextureCoords_Stage0;
+flat out int vTexIndex_Stage0;
+void main() {
+ ivec2 signedCoords = ivec2(int(inTextureCoords.x), int(inTextureCoords.y));
+ vec2 unormTexCoords = vec2(float(signedCoords.x / 2), float(signedCoords.y / 2));
+ vTextureCoords_Stage0 = unormTexCoords * uAtlasSizeInv_Stage0;
+ vTexIndex_Stage0 = 0;
+ gl_Position = vec4(inPosition.x, inPosition.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/7-357.shader_test b/shaders/skia/7-357.shader_test
new file mode 100644
index 0000000..0e1d6e9
--- /dev/null
+++ b/shaders/skia/7-357.shader_test
@@ -0,0 +1,27 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = gl_FrontFacing ? vec4(0.0, 1.0, 0.0, 1.0) : vec4(1.0, 0.0, 0.0, 1.0);
+ }
+ {
+ sk_FragColor = outputColor_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 position;
+void main() {
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/7-372.shader_test b/shaders/skia/7-372.shader_test
new file mode 100644
index 0000000..09a7ce2
--- /dev/null
+++ b/shaders/skia/7-372.shader_test
@@ -0,0 +1,41 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 ucircleData_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+flat in vec4 vcolor_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec2 vec = vec2((gl_FragCoord.x - ucircleData_Stage1.x) * ucircleData_Stage1.w, (gl_FragCoord.y - ucircleData_Stage1.y) * ucircleData_Stage1.w);
+ float dist = length(vec) + (0.5 - ucircleData_Stage1.z) * ucircleData_Stage1.w;
+ output_Stage1 = vec4(texture(uTextureSampler_0_Stage1, vec2(dist, 0.5)).w);
+ }
+ {
+ sk_FragColor = outputColor_Stage0 * output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 position;
+in vec4 color;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/7-377.shader_test b/shaders/skia/7-377.shader_test
new file mode 100644
index 0000000..a6c0db8
--- /dev/null
+++ b/shaders/skia/7-377.shader_test
@@ -0,0 +1,83 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform vec4 uKernel_Stage1[4];
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0 - 7.0 * uImageIncrement_Stage1;
+ vec2 coordSampled = vec2(0.0, 0.0);
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].z;
+ coord += uImageIncrement_Stage1;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ sk_FragColor = sk_FragColor.wwww;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/7-378.shader_test b/shaders/skia/7-378.shader_test
new file mode 100644
index 0000000..217d3ce
--- /dev/null
+++ b/shaders/skia/7-378.shader_test
@@ -0,0 +1,99 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform vec2 uBounds_Stage1;
+uniform vec4 uKernel_Stage1[4];
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0 - 7.0 * uImageIncrement_Stage1;
+ vec2 coordSampled = vec2(0.0, 0.0);
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].z;
+ coord += uImageIncrement_Stage1;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ sk_FragColor = sk_FragColor.wwww;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/7-380.shader_test b/shaders/skia/7-380.shader_test
new file mode 100644
index 0000000..9e54a10
--- /dev/null
+++ b/shaders/skia/7-380.shader_test
@@ -0,0 +1,83 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform vec2 uBounds_Stage1;
+uniform vec4 uKernel_Stage1[3];
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0 - 5.0 * uImageIncrement_Stage1;
+ vec2 coordSampled = vec2(0.0, 0.0);
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].z;
+ coord += uImageIncrement_Stage1;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ sk_FragColor = sk_FragColor.wwww;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/7-39.shader_test b/shaders/skia/7-39.shader_test
new file mode 100644
index 0000000..56ae4ae
--- /dev/null
+++ b/shaders/skia/7-39.shader_test
@@ -0,0 +1,43 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+noperspective in vec4 vinCircleEdge_Stage0;
+noperspective in vec4 vinColor_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ vec4 circleEdge;
+ circleEdge = vinCircleEdge_Stage0;
+ outputColor_Stage0 = vinColor_Stage0;
+ float d = length(circleEdge.xy);
+ float distanceToOuterEdge = circleEdge.z * (1.0 - d);
+ float edgeAlpha = clamp(distanceToOuterEdge, 0.0, 1.0);
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ {
+ sk_FragColor = outputColor_Stage0 * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 inPosition;
+in vec4 inColor;
+in vec4 inCircleEdge;
+noperspective out vec4 vinCircleEdge_Stage0;
+noperspective out vec4 vinColor_Stage0;
+void main() {
+ vinCircleEdge_Stage0 = inCircleEdge;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = inPosition;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/7-40.shader_test b/shaders/skia/7-40.shader_test
new file mode 100644
index 0000000..d7f23f5
--- /dev/null
+++ b/shaders/skia/7-40.shader_test
@@ -0,0 +1,90 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 uscale01_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias01_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale23_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias23_Stage1_c0_c0_c1_c0;
+uniform float uthreshold_Stage1_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage2_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 RadialGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = length(vTransformedCoords_0_Stage0);
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 DualIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthreshold_Stage1_c0_c0_c1_c0) {
+ scale = uscale01_Stage1_c0_c0_c1_c0;
+ bias = ubias01_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale23_Stage1_c0_c0_c1_c0;
+ bias = ubias23_Stage1_c0_c0_c1_c0;
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = RadialGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = DualIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c1_c0;
+ }
+ return _output;
+}
+vec4 blend_xor(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src + (1.0 - src.w) * dst;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_xor(ConstColorProcessor_Stage2_c1_c0(vec4(1.0)), output_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/7-41.shader_test b/shaders/skia/7-41.shader_test
new file mode 100644
index 0000000..5445d8f
--- /dev/null
+++ b/shaders/skia/7-41.shader_test
@@ -0,0 +1,95 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 uscale01_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias01_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale23_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias23_Stage1_c0_c0_c1_c0;
+uniform float uthreshold_Stage1_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage2_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 RadialGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = length(vTransformedCoords_0_Stage0);
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 DualIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthreshold_Stage1_c0_c0_c1_c0) {
+ scale = uscale01_Stage1_c0_c0_c1_c0;
+ bias = ubias01_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale23_Stage1_c0_c0_c1_c0;
+ bias = ubias23_Stage1_c0_c0_c1_c0;
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = RadialGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = DualIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c1_c0;
+ }
+ return _output;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 blend_darken(vec4 src, vec4 dst) {
+ vec4 result = blend_src_over(src, dst);
+ result.xyz = min(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
+ return result;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_darken(ConstColorProcessor_Stage2_c1_c0(vec4(1.0)), output_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/7-42.shader_test b/shaders/skia/7-42.shader_test
new file mode 100644
index 0000000..abbd83c
--- /dev/null
+++ b/shaders/skia/7-42.shader_test
@@ -0,0 +1,72 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+uniform sampler2D uTextureSampler_1_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+vec4 ColorTableEffect_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ float nonZeroAlpha = max(_input.w, 9.9999997473787516e-05);
+ vec4 coord = vec4(_input.xyz / nonZeroAlpha, nonZeroAlpha);
+ coord = coord * 0.9960939884185791 + vec4(0.0019529999699443579, 0.0019529999699443579, 0.0019529999699443579, 0.0019529999699443579);
+ _output.w = texture(uTextureSampler_0_Stage2, vec2(coord.w, 0.125)).w;
+ _output.x = texture(uTextureSampler_0_Stage2, vec2(coord.x, 0.375)).w;
+ _output.y = texture(uTextureSampler_0_Stage2, vec2(coord.y, 0.625)).w;
+ _output.z = texture(uTextureSampler_0_Stage2, vec2(coord.z, 0.875)).w;
+ _output.xyz *= _output.w;
+ return _output;
+}
+vec4 ColorTableEffect_Stage2_c2_c0(vec4 _input) {
+ vec4 _output;
+ float nonZeroAlpha = max(_input.w, 9.9999997473787516e-05);
+ vec4 coord = vec4(_input.xyz / nonZeroAlpha, nonZeroAlpha);
+ coord = coord * 0.9960939884185791 + vec4(0.0019529999699443579, 0.0019529999699443579, 0.0019529999699443579, 0.0019529999699443579);
+ _output.w = texture(uTextureSampler_1_Stage2, vec2(coord.w, 0.125)).w;
+ _output.x = texture(uTextureSampler_1_Stage2, vec2(coord.x, 0.375)).w;
+ _output.y = texture(uTextureSampler_1_Stage2, vec2(coord.y, 0.625)).w;
+ _output.z = texture(uTextureSampler_1_Stage2, vec2(coord.z, 0.875)).w;
+ _output.xyz *= _output.w;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TextureEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = ColorTableEffect_Stage2_c2_c0(ColorTableEffect_Stage2_c1_c0(output_Stage1));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/7-422.shader_test b/shaders/skia/7-422.shader_test
new file mode 100644
index 0000000..2b22c6c
--- /dev/null
+++ b/shaders/skia/7-422.shader_test
@@ -0,0 +1,98 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform vec2 uBounds_Stage1;
+uniform vec4 uKernel_Stage1[4];
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0 - 7.0 * uImageIncrement_Stage1;
+ vec2 coordSampled = vec2(0.0, 0.0);
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].z;
+ coord += uImageIncrement_Stage1;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/7-426.shader_test b/shaders/skia/7-426.shader_test
new file mode 100644
index 0000000..fa8e4de
--- /dev/null
+++ b/shaders/skia/7-426.shader_test
@@ -0,0 +1,91 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 ucolor_Stage1_c0_c0;
+uniform mat4 um_Stage2;
+uniform vec4 uv_Stage2;
+uniform vec4 urectH_Stage3;
+uniform float uinvSixSigma_Stage3;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage3;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 ConstColorProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = _input.w * ucolor_Stage1_c0_c0;
+ }
+ return _output;
+}
+vec4 TextureEffect_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TextureEffect_Stage1_c1_c0(ConstColorProcessor_Stage1_c0_c0(outputColor_Stage0));
+ }
+ vec4 output_Stage2;
+ {
+ vec4 inputColor = output_Stage1;
+ {
+ float nonZeroAlpha = max(inputColor.w, 9.9999997473787516e-05);
+ inputColor = vec4(inputColor.xyz / nonZeroAlpha, inputColor.w);
+ }
+ output_Stage2 = um_Stage2 * inputColor + uv_Stage2;
+ {
+ output_Stage2 = clamp(output_Stage2, 0.0, 1.0);
+ }
+ {
+ output_Stage2.xyz *= output_Stage2.w;
+ }
+ }
+ vec4 output_Stage3;
+ {
+ float xCoverage, yCoverage;
+ {
+ float x, y;
+ {
+ x = max(urectH_Stage3.x - gl_FragCoord.x, gl_FragCoord.x - urectH_Stage3.z);
+ y = max(urectH_Stage3.y - gl_FragCoord.y, gl_FragCoord.y - urectH_Stage3.w);
+ }
+ xCoverage = texture(uTextureSampler_0_Stage3, vec2(x * uinvSixSigma_Stage3, 0.5)).w;
+ yCoverage = texture(uTextureSampler_0_Stage3, vec2(y * uinvSixSigma_Stage3, 0.5)).w;
+ output_Stage3 = vec4(xCoverage) * yCoverage;
+ }
+ output_Stage3 = vec4(xCoverage) * yCoverage;
+ }
+ {
+ sk_FragColor = output_Stage2 * output_Stage3;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/7-443.shader_test b/shaders/skia/7-443.shader_test
new file mode 100644
index 0000000..a16e714
--- /dev/null
+++ b/shaders/skia/7-443.shader_test
@@ -0,0 +1,55 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 ugColors_Stage1_c0_c0[2];
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 runtime_shader_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = _input;
+ _output = ugColors_Stage1_c0_c0[0];
+ return _output;
+}
+vec4 ClampFragmentProcessor_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ float alpha = clamp(_input.w, 0.0, 1.0);
+ _output = vec4(clamp(_input.xyz, 0.0, alpha), alpha);
+ }
+ return _output;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampFragmentProcessor_Stage1_c1_c0(runtime_shader_Stage1_c0_c0(outputColor_Stage0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/7-446.shader_test b/shaders/skia/7-446.shader_test
new file mode 100644
index 0000000..abc6c6a
--- /dev/null
+++ b/shaders/skia/7-446.shader_test
@@ -0,0 +1,67 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform float uSrcTF_Stage1[7];
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 TextureEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+float src_tf_Stage1(float x) {
+ float G = uSrcTF_Stage1[0];
+ float A = uSrcTF_Stage1[1];
+ float B = uSrcTF_Stage1[2];
+ float C = uSrcTF_Stage1[3];
+ float D = uSrcTF_Stage1[4];
+ float E = uSrcTF_Stage1[5];
+ float F = uSrcTF_Stage1[6];
+ float s = sign(x);
+ x = abs(x);
+ x = x < D ? C * x + F : pow(A * x + B, G) + E;
+ return s * x;
+}
+vec4 color_xform_Stage1(vec4 color) {
+ float nonZeroAlpha = max(color.w, 9.9999997473787516e-05);
+ color = vec4(color.xyz / nonZeroAlpha, nonZeroAlpha);
+ color.x = src_tf_Stage1(color.x);
+ color.y = src_tf_Stage1(color.y);
+ color.z = src_tf_Stage1(color.z);
+ color.xyz *= color.w;
+ return color;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = color_xform_Stage1(TextureEffect_Stage1_c0_c0(vec4(1.0)));
+ }
+ vec4 output_Stage2;
+ {
+ {
+ output_Stage2 = clamp(output_Stage1, 0.0, 1.0);
+ }
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/7-449.shader_test b/shaders/skia/7-449.shader_test
new file mode 100644
index 0000000..8d4bf22
--- /dev/null
+++ b/shaders/skia/7-449.shader_test
@@ -0,0 +1,107 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 ubaseFrequency_Stage2_c0_c0;
+uniform vec2 ustitchData_Stage2_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+uniform sampler2D uTextureSampler_1_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+float perlinnoise_Stage2_c0_c0(float chanCoord, vec2 noiseVec, vec2 stitchData) {
+ vec4 floorVal;
+ floorVal.xy = floor(noiseVec);
+ floorVal.zw = floorVal.xy + vec2(1.0);
+ vec2 fractVal = fract(noiseVec);
+ vec2 noiseSmooth = (fractVal * fractVal) * (vec2(3.0) - vec2(2.0) * fractVal);
+ if (floorVal.x >= stitchData.x) {
+ floorVal.x -= stitchData.x;
+ }
+ if (floorVal.y >= stitchData.y) {
+ floorVal.y -= stitchData.y;
+ }
+ if (floorVal.z >= stitchData.x) {
+ floorVal.z -= stitchData.x;
+ }
+ if (floorVal.w >= stitchData.y) {
+ floorVal.w -= stitchData.y;
+ }
+ floorVal = fract(floor(mod(floorVal, 256.0)) / vec4(256.0));
+ vec2 latticeIdx;
+ latticeIdx.x = texture(uTextureSampler_0_Stage2, vec2(floorVal.x, 0.5)).x;
+ latticeIdx.y = texture(uTextureSampler_0_Stage2, vec2(floorVal.z, 0.5)).x;
+ vec4 bcoords = fract(latticeIdx.xyxy + floorVal.yyww);
+ vec2 uv;
+ vec4 lattice = texture(uTextureSampler_1_Stage2, vec2(bcoords.x, chanCoord)).zyxw;
+ uv.x = dot((lattice.yw + lattice.xz * vec2(0.00390625)) * vec2(2.0) - vec2(1.0), fractVal);
+ fractVal.x -= 1.0;
+ lattice = texture(uTextureSampler_1_Stage2, vec2(bcoords.y, chanCoord)).zyxw;
+ uv.y = dot((lattice.yw + lattice.xz * vec2(0.00390625)) * vec2(2.0) - vec2(1.0), fractVal);
+ vec2 ab;
+ ab.x = mix(uv.x, uv.y, noiseSmooth.x);
+ fractVal.y -= 1.0;
+ lattice = texture(uTextureSampler_1_Stage2, vec2(bcoords.w, chanCoord)).zyxw;
+ uv.y = dot((lattice.yw + lattice.xz * vec2(0.00390625)) * vec2(2.0) - vec2(1.0), fractVal);
+ fractVal.x += 1.0;
+ lattice = texture(uTextureSampler_1_Stage2, vec2(bcoords.z, chanCoord)).zyxw;
+ uv.x = dot((lattice.yw + lattice.xz * vec2(0.00390625)) * vec2(2.0) - vec2(1.0), fractVal);
+ ab.y = mix(uv.x, uv.y, noiseSmooth.x);
+ return mix(ab.x, ab.y, noiseSmooth.y);
+}
+vec4 PerlinNoise_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 noiseVec = floor(vTransformedCoords_1_Stage0) * ubaseFrequency_Stage2_c0_c0;
+ _output = vec4(0.0);
+ vec2 stitchData = ustitchData_Stage2_c0_c0;
+ float ratio = 1.0;
+ for (int octave = 0;octave < 4; ++octave) {
+ _output += abs(vec4(perlinnoise_Stage2_c0_c0(0.125, noiseVec, stitchData), perlinnoise_Stage2_c0_c0(0.375, noiseVec, stitchData), perlinnoise_Stage2_c0_c0(0.625, noiseVec, stitchData), perlinnoise_Stage2_c0_c0(0.875, noiseVec, stitchData))) * ratio;
+ noiseVec *= vec2(2.0);
+ ratio *= 0.5;
+ stitchData *= vec2(2.0);
+ }
+ _output = clamp(_output, 0.0, 1.0);
+ _output = vec4(_output.xyz * _output.www, _output.w);
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_dst_in(output_Stage1, PerlinNoise_Stage2_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/7-450.shader_test b/shaders/skia/7-450.shader_test
new file mode 100644
index 0000000..4f2bba4
--- /dev/null
+++ b/shaders/skia/7-450.shader_test
@@ -0,0 +1,51 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform float uPixelSize_Stage2;
+uniform vec2 uRange_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = vec4(1.0, 1.0, 1.0, 1.0);
+ vec2 coord = vTransformedCoords_1_Stage0;
+ coord.y -= 9.0 * uPixelSize_Stage2;
+ for (int i = 0;i < 19; i++) {
+ output_Stage2 = min(output_Stage2, texture(uTextureSampler_0_Stage2, coord));
+ coord.y += uPixelSize_Stage2;
+ }
+ output_Stage2 *= output_Stage1;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/7-452.shader_test b/shaders/skia/7-452.shader_test
new file mode 100644
index 0000000..62d117c
--- /dev/null
+++ b/shaders/skia/7-452.shader_test
@@ -0,0 +1,78 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform mat3 ucolorSpaceMatrix_Stage1;
+uniform vec3 ucolorSpaceTranslate_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+uniform sampler2D uTextureSampler_2_Stage1;
+uniform sampler2D uTextureSampler_3_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+noperspective in vec2 vTransformedCoords_3_Stage0;
+vec4 TextureEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_1_Stage1, vTransformedCoords_1_Stage0) * _input;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c2_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_2_Stage1, vTransformedCoords_2_Stage0) * _input;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c3_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_3_Stage1, vTransformedCoords_3_Stage0) * _input;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ vec4 planes[4];
+ planes[0] = TextureEffect_Stage1_c0_c0(vec4(1.0));
+ planes[1] = TextureEffect_Stage1_c1_c0(vec4(1.0));
+ planes[2] = TextureEffect_Stage1_c2_c0(vec4(1.0));
+ planes[3] = TextureEffect_Stage1_c3_c0(vec4(1.0));
+ vec4 color = vec4(planes[0].w, planes[1].w, planes[2].w, planes[3].w);
+ color.xyz = clamp(color.xyz * ucolorSpaceMatrix_Stage1 + ucolorSpaceTranslate_Stage1, 0.0, 1.0);
+ color.xyz *= color.w;
+ output_Stage1 = color;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+uniform mat3 uCoordTransformMatrix_3_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+noperspective out vec2 vTransformedCoords_3_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_3_Stage0 = (uCoordTransformMatrix_3_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/7-460.shader_test b/shaders/skia/7-460.shader_test
new file mode 100644
index 0000000..b445423
--- /dev/null
+++ b/shaders/skia/7-460.shader_test
@@ -0,0 +1,34 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+noperspective in vec4 vcolor_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ {
+ sk_FragColor = outputColor_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 vertex;
+in vec2 location;
+in vec4 color;
+noperspective out vec4 vcolor_Stage0;
+void main() {
+ vcolor_Stage0 = color;
+ vec2 offset = vertex;
+ vec2 vertex = location + offset * 2.0;
+ gl_Position = vec4(vertex.x, vertex.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/7-465.shader_test b/shaders/skia/7-465.shader_test
new file mode 100644
index 0000000..8614265
--- /dev/null
+++ b/shaders/skia/7-465.shader_test
@@ -0,0 +1,58 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uclamp_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in float vcoverage_Stage0;
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ float coverage = vcoverage_Stage0;
+ outputCoverage_Stage0 = vec4(coverage);
+ }
+ vec4 output_Stage1;
+ {
+ vec2 inCoord = vTransformedCoords_0_Stage0;
+ vec2 subsetCoord;
+ subsetCoord.x = inCoord.x;
+ subsetCoord.y = inCoord.y;
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage1.x, uclamp_Stage1.z);
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage1.y, uclamp_Stage1.w);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ output_Stage1 = textureColor;
+ }
+ vec4 output_Stage2;
+ {
+ {
+ output_Stage2 = clamp(output_Stage1, 0.0, 1.0);
+ }
+ }
+ {
+ sk_FragColor = output_Stage2 * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in float coverage;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out float vcoverage_Stage0;
+void main() {
+ vec2 position = position;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcoverage_Stage0 = coverage;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/7-466.shader_test b/shaders/skia/7-466.shader_test
new file mode 100644
index 0000000..4a11ab1
--- /dev/null
+++ b/shaders/skia/7-466.shader_test
@@ -0,0 +1,54 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uColor_Stage0;
+uniform float ucornerRadius_Stage1;
+uniform vec4 uproxyRect_Stage1;
+uniform float ublurRadius_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = uColor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec2 translatedFragPos = gl_FragCoord.xy - uproxyRect_Stage1.xy;
+ float threshold = ucornerRadius_Stage1 + 2.0 * ublurRadius_Stage1;
+ vec2 middle = (uproxyRect_Stage1.zw - uproxyRect_Stage1.xy) - 2.0 * threshold;
+ if (translatedFragPos.x >= threshold && translatedFragPos.x < middle.x + threshold) {
+ translatedFragPos.x = threshold;
+ } else if (translatedFragPos.x >= middle.x + threshold) {
+ translatedFragPos.x -= middle.x - 1.0;
+ }
+ if (translatedFragPos.y > threshold && translatedFragPos.y < middle.y + threshold) {
+ translatedFragPos.y = threshold;
+ } else if (translatedFragPos.y >= middle.y + threshold) {
+ translatedFragPos.y -= middle.y - 1.0;
+ }
+ vec2 proxyDims = vec2(2.0 * threshold + 1.0);
+ vec2 texCoord = translatedFragPos / proxyDims;
+ output_Stage1 = texture(uTextureSampler_0_Stage1, texCoord);
+ }
+ {
+ sk_FragColor = outputColor_Stage0 * output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 position;
+void main() {
+ vec2 pos2 = position;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/7-51.shader_test b/shaders/skia/7-51.shader_test
new file mode 100644
index 0000000..300c246
--- /dev/null
+++ b/shaders/skia/7-51.shader_test
@@ -0,0 +1,35 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+noperspective in vec4 vcolor_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ {
+ sk_FragColor = outputColor_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 inPosition;
+in vec4 inColor;
+in float inCoverage;
+noperspective out vec4 vcolor_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color * inCoverage;
+ vcolor_Stage0 = color;
+ vec2 pos2 = inPosition;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/7-56.shader_test b/shaders/skia/7-56.shader_test
new file mode 100644
index 0000000..25789bd
--- /dev/null
+++ b/shaders/skia/7-56.shader_test
@@ -0,0 +1,75 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in float vinCoverage_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ float alpha = 1.0;
+ alpha = vinCoverage_Stage0;
+ outputCoverage_Stage0 = vec4(alpha);
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1 * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in float inCoverage;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out float vinCoverage_Stage0;
+void main() {
+ vec4 color = inColor;
+ vcolor_Stage0 = color;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ vinCoverage_Stage0 = inCoverage;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/7-58.shader_test b/shaders/skia/7-58.shader_test
new file mode 100644
index 0000000..d9f463a
--- /dev/null
+++ b/shaders/skia/7-58.shader_test
@@ -0,0 +1,69 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform float uDstTF_Stage2[7];
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+float dst_tf_Stage2(float x) {
+ float G = uDstTF_Stage2[0];
+ float A = uDstTF_Stage2[1];
+ float B = uDstTF_Stage2[2];
+ float C = uDstTF_Stage2[3];
+ float D = uDstTF_Stage2[4];
+ float E = uDstTF_Stage2[5];
+ float F = uDstTF_Stage2[6];
+ float s = sign(x);
+ x = abs(x);
+ x = x < D ? C * x + F : pow(A * x + B, G) + E;
+ return s * x;
+}
+vec4 color_xform_Stage2(vec4 color) {
+ float nonZeroAlpha = max(color.w, 9.9999997473787516e-05);
+ color = vec4(color.xyz / nonZeroAlpha, nonZeroAlpha);
+ color.x = dst_tf_Stage2(color.x);
+ color.y = dst_tf_Stage2(color.y);
+ color.z = dst_tf_Stage2(color.z);
+ color.xyz *= color.w;
+ return color;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TextureEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = color_xform_Stage2(output_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/7-60.shader_test b/shaders/skia/7-60.shader_test
new file mode 100644
index 0000000..1f1cb51
--- /dev/null
+++ b/shaders/skia/7-60.shader_test
@@ -0,0 +1,163 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform vec2 uBounds_Stage1;
+uniform vec4 uKernel_Stage1[7];
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0 - 12.0 * uImageIncrement_Stage1;
+ vec2 coordSampled = vec2(0.0, 0.0);
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1.x && coord.x <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].x;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1.x && coord.x <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].y;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1.x && coord.x <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].z;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1.x && coord.x <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].w;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1.x && coord.x <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].x;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1.x && coord.x <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].y;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1.x && coord.x <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].z;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1.x && coord.x <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].w;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1.x && coord.x <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].x;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1.x && coord.x <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].y;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1.x && coord.x <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].z;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1.x && coord.x <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].w;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1.x && coord.x <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].x;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1.x && coord.x <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].y;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1.x && coord.x <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].z;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1.x && coord.x <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].w;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1.x && coord.x <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[4].x;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1.x && coord.x <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[4].y;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1.x && coord.x <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[4].z;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1.x && coord.x <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[4].w;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1.x && coord.x <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[5].x;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1.x && coord.x <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[5].y;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1.x && coord.x <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[5].z;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1.x && coord.x <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[5].w;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1.x && coord.x <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[6].x;
+ }
+ coord += uImageIncrement_Stage1;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/7-63.shader_test b/shaders/skia/7-63.shader_test
new file mode 100644
index 0000000..f9bd424
--- /dev/null
+++ b/shaders/skia/7-63.shader_test
@@ -0,0 +1,319 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform vec4 uKernel_Stage1[7];
+uniform vec2 uKernelOffset_Stage1;
+uniform float uGain_Stage1;
+uniform float uBias_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ vec4 sum = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0 - uKernelOffset_Stage1 * uImageIncrement_Stage1;
+ vec4 c;
+ {
+ float k = uKernel_Stage1[0].x;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[0].y;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[0].z;
+ {
+ vec2 origCoord = coord + vec2(2.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[0].w;
+ {
+ vec2 origCoord = coord + vec2(3.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[1].x;
+ {
+ vec2 origCoord = coord + vec2(4.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[1].y;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[1].z;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[1].w;
+ {
+ vec2 origCoord = coord + vec2(2.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[2].x;
+ {
+ vec2 origCoord = coord + vec2(3.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[2].y;
+ {
+ vec2 origCoord = coord + vec2(4.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[2].z;
+ {
+ vec2 origCoord = coord + vec2(0.0, 2.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[2].w;
+ {
+ vec2 origCoord = coord + vec2(1.0, 2.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[3].x;
+ {
+ vec2 origCoord = coord + vec2(2.0, 2.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[3].y;
+ {
+ vec2 origCoord = coord + vec2(3.0, 2.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[3].z;
+ {
+ vec2 origCoord = coord + vec2(4.0, 2.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[3].w;
+ {
+ vec2 origCoord = coord + vec2(0.0, 3.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[4].x;
+ {
+ vec2 origCoord = coord + vec2(1.0, 3.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[4].y;
+ {
+ vec2 origCoord = coord + vec2(2.0, 3.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[4].z;
+ {
+ vec2 origCoord = coord + vec2(3.0, 3.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[4].w;
+ {
+ vec2 origCoord = coord + vec2(4.0, 3.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[5].x;
+ {
+ vec2 origCoord = coord + vec2(0.0, 4.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[5].y;
+ {
+ vec2 origCoord = coord + vec2(1.0, 4.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[5].z;
+ {
+ vec2 origCoord = coord + vec2(2.0, 4.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[5].w;
+ {
+ vec2 origCoord = coord + vec2(3.0, 4.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[6].x;
+ {
+ vec2 origCoord = coord + vec2(4.0, 4.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ output_Stage1 = sum * uGain_Stage1 + uBias_Stage1;
+ output_Stage1.w = clamp(output_Stage1.w, 0.0, 1.0);
+ output_Stage1.xyz = clamp(output_Stage1.xyz, 0.0, output_Stage1.w);
+ }
+ {
+ sk_FragColor = output_Stage1;
+ sk_FragColor = sk_FragColor.wwww;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/7-65.shader_test b/shaders/skia/7-65.shader_test
new file mode 100644
index 0000000..fff85c2
--- /dev/null
+++ b/shaders/skia/7-65.shader_test
@@ -0,0 +1,67 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform vec2 uBounds_Stage1;
+uniform vec4 uKernel_Stage1[2];
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0 - 3.0 * uImageIncrement_Stage1;
+ vec2 coordSampled = vec2(0.0, 0.0);
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].z;
+ coord += uImageIncrement_Stage1;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ sk_FragColor = sk_FragColor.wwww;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/7-67.shader_test b/shaders/skia/7-67.shader_test
new file mode 100644
index 0000000..2eca0b8
--- /dev/null
+++ b/shaders/skia/7-67.shader_test
@@ -0,0 +1,60 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uinnerRect_Stage1_c0_c0;
+uniform vec2 uradiusPlusHalf_Stage1_c0_c0;
+uniform vec4 uinnerRect_Stage1_c1_c0;
+uniform vec2 uradiusPlusHalf_Stage1_c1_c0;
+flat in vec4 vcolor_Stage0;
+vec4 CircularRRect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 dxy0 = uinnerRect_Stage1_c0_c0.xy - gl_FragCoord.xy;
+ vec2 dxy1 = gl_FragCoord.xy - uinnerRect_Stage1_c0_c0.zw;
+ vec2 dxy = max(max(dxy0, dxy1), 0.0);
+ float alpha = clamp(uradiusPlusHalf_Stage1_c0_c0.x - length(dxy), 0.0, 1.0);
+ alpha = 1.0 - alpha;
+ _output = _input * alpha;
+ return _output;
+}
+vec4 CircularRRect_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 dxy0 = uinnerRect_Stage1_c1_c0.xy - gl_FragCoord.xy;
+ vec2 dxy1 = gl_FragCoord.xy - uinnerRect_Stage1_c1_c0.zw;
+ vec2 dxy = max(max(dxy0, dxy1), 0.0);
+ float alpha = clamp(uradiusPlusHalf_Stage1_c1_c0.x - length(dxy), 0.0, 1.0);
+ _output = _input * alpha;
+ return _output;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = CircularRRect_Stage1_c1_c0(CircularRRect_Stage1_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = outputColor_Stage0 * output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 position;
+in vec4 color;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/7-68.shader_test b/shaders/skia/7-68.shader_test
new file mode 100644
index 0000000..631cd34
--- /dev/null
+++ b/shaders/skia/7-68.shader_test
@@ -0,0 +1,70 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 urectUniform_Stage1_c0_c0;
+uniform vec4 urectUniform_Stage1_c1_c0;
+flat in vec4 vcolor_Stage0;
+vec4 AARectEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ float alpha;
+ {
+ float xSub, ySub;
+ xSub = min(gl_FragCoord.x - urectUniform_Stage1_c0_c0.x, 0.0);
+ xSub += min(urectUniform_Stage1_c0_c0.z - gl_FragCoord.x, 0.0);
+ ySub = min(gl_FragCoord.y - urectUniform_Stage1_c0_c0.y, 0.0);
+ ySub += min(urectUniform_Stage1_c0_c0.w - gl_FragCoord.y, 0.0);
+ alpha = (1.0 + max(xSub, -1.0)) * (1.0 + max(ySub, -1.0));
+ }
+ {
+ alpha = 1.0 - alpha;
+ }
+ _output = _input * alpha;
+ return _output;
+}
+vec4 AARectEffect_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ float alpha;
+ {
+ float xSub, ySub;
+ xSub = min(gl_FragCoord.x - urectUniform_Stage1_c1_c0.x, 0.0);
+ xSub += min(urectUniform_Stage1_c1_c0.z - gl_FragCoord.x, 0.0);
+ ySub = min(gl_FragCoord.y - urectUniform_Stage1_c1_c0.y, 0.0);
+ ySub += min(urectUniform_Stage1_c1_c0.w - gl_FragCoord.y, 0.0);
+ alpha = (1.0 + max(xSub, -1.0)) * (1.0 + max(ySub, -1.0));
+ }
+ _output = _input * alpha;
+ return _output;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = AARectEffect_Stage1_c1_c0(AARectEffect_Stage1_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = outputColor_Stage0 * output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 position;
+in vec4 color;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/7-69.shader_test b/shaders/skia/7-69.shader_test
new file mode 100644
index 0000000..70f3b3c
--- /dev/null
+++ b/shaders/skia/7-69.shader_test
@@ -0,0 +1,54 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uboundsUniform_Stage1;
+uniform float uxInvZoom_Stage1;
+uniform float uyInvZoom_Stage1;
+uniform float uxInvInset_Stage1;
+uniform float uyInvInset_Stage1;
+uniform vec2 uoffset_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ vec2 coord = vTransformedCoords_0_Stage0;
+ vec2 zoom_coord = uoffset_Stage1 + coord * vec2(uxInvZoom_Stage1, uyInvZoom_Stage1);
+ vec2 delta = (coord - uboundsUniform_Stage1.xy) * uboundsUniform_Stage1.zw;
+ delta = min(delta, vec2(1.0, 1.0) - delta);
+ delta *= vec2(uxInvInset_Stage1, uyInvInset_Stage1);
+ float weight = 0.0;
+ if (delta.x < 2.0 && delta.y < 2.0) {
+ delta = vec2(2.0, 2.0) - delta;
+ float dist = length(delta);
+ dist = max(2.0 - dist, 0.0);
+ weight = min(dist * dist, 1.0);
+ } else {
+ vec2 delta_squared = delta * delta;
+ weight = min(min(delta_squared.x, delta_squared.y), 1.0);
+ }
+ output_Stage1 = texture(uTextureSampler_0_Stage1, mix(coord, zoom_coord, weight));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/7-7.shader_test b/shaders/skia/7-7.shader_test
new file mode 100644
index 0000000..e77bf3c
--- /dev/null
+++ b/shaders/skia/7-7.shader_test
@@ -0,0 +1,100 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uinnerRect_Stage1_c0_c0;
+uniform vec4 uinvRadiiLTRB_Stage1_c0_c0;
+uniform vec4 uinnerRect_Stage1_c1_c0;
+uniform vec2 uinvRadiiXY_Stage1_c1_c0;
+uniform vec4 urectUniform_Stage1_c2_c0;
+uniform vec4 urectUniform_Stage1_c3_c0;
+flat in vec4 vcolor_Stage0;
+vec4 EllipticalRRect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 dxy0 = uinnerRect_Stage1_c0_c0.xy - gl_FragCoord.xy;
+ vec2 dxy1 = gl_FragCoord.xy - uinnerRect_Stage1_c0_c0.zw;
+ vec2 dxy = max(max(dxy0, dxy1), 0.0);
+ vec2 Z = max(max(dxy0 * uinvRadiiLTRB_Stage1_c0_c0.xy, dxy1 * uinvRadiiLTRB_Stage1_c0_c0.zw), 0.0);
+ float implicit = dot(Z, dxy) - 1.0;
+ float grad_dot = 4.0 * dot(Z, Z);
+ grad_dot = max(grad_dot, 9.9999997473787516e-05);
+ float approx_dist = implicit * inversesqrt(grad_dot);
+ float alpha = clamp(0.5 + approx_dist, 0.0, 1.0);
+ _output = _input * alpha;
+ return _output;
+}
+vec4 EllipticalRRect_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 dxy0 = uinnerRect_Stage1_c1_c0.xy - gl_FragCoord.xy;
+ vec2 dxy1 = gl_FragCoord.xy - uinnerRect_Stage1_c1_c0.zw;
+ vec2 dxy = max(max(dxy0, dxy1), 0.0);
+ vec2 Z = dxy * uinvRadiiXY_Stage1_c1_c0;
+ float implicit = dot(Z, dxy) - 1.0;
+ float grad_dot = 4.0 * dot(Z, Z);
+ grad_dot = max(grad_dot, 9.9999997473787516e-05);
+ float approx_dist = implicit * inversesqrt(grad_dot);
+ float alpha = clamp(0.5 + approx_dist, 0.0, 1.0);
+ _output = _input * alpha;
+ return _output;
+}
+vec4 AARectEffect_Stage1_c2_c0(vec4 _input) {
+ vec4 _output;
+ float alpha;
+ {
+ float xSub, ySub;
+ xSub = min(gl_FragCoord.x - urectUniform_Stage1_c2_c0.x, 0.0);
+ xSub += min(urectUniform_Stage1_c2_c0.z - gl_FragCoord.x, 0.0);
+ ySub = min(gl_FragCoord.y - urectUniform_Stage1_c2_c0.y, 0.0);
+ ySub += min(urectUniform_Stage1_c2_c0.w - gl_FragCoord.y, 0.0);
+ alpha = (1.0 + max(xSub, -1.0)) * (1.0 + max(ySub, -1.0));
+ }
+ {
+ alpha = 1.0 - alpha;
+ }
+ _output = _input * alpha;
+ return _output;
+}
+vec4 AARectEffect_Stage1_c3_c0(vec4 _input) {
+ vec4 _output;
+ float alpha;
+ {
+ alpha = float(all(greaterThan(vec4(gl_FragCoord.xy, urectUniform_Stage1_c3_c0.zw), vec4(urectUniform_Stage1_c3_c0.xy, gl_FragCoord.xy))) ? 1 : 0);
+ }
+ {
+ alpha = 1.0 - alpha;
+ }
+ _output = _input * alpha;
+ return _output;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = AARectEffect_Stage1_c3_c0(AARectEffect_Stage1_c2_c0(EllipticalRRect_Stage1_c1_c0(EllipticalRRect_Stage1_c0_c0(vec4(1.0)))));
+ }
+ {
+ sk_FragColor = outputColor_Stage0 * output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 position;
+in vec4 color;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/7-70.shader_test b/shaders/skia/7-70.shader_test
new file mode 100644
index 0000000..f78618f
--- /dev/null
+++ b/shaders/skia/7-70.shader_test
@@ -0,0 +1,93 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+flat in vec4 vcolor_Stage0;
+noperspective in vec4 varccoord_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ float x_plus_1 = varccoord_Stage0.x, y = varccoord_Stage0.y;
+ float coverage;
+ if (0.0 == x_plus_1) {
+ coverage = y;
+ } else {
+ float fn = x_plus_1 * (x_plus_1 - 2.0);
+ fn = ((y) * (y) + (fn));
+ float gx = varccoord_Stage0.z, gy = varccoord_Stage0.w;
+ float fnwidth = abs(gx) + abs(gy);
+ float d = fn / fnwidth;
+ coverage = clamp(0.5 - d, 0.0, 1.0);
+ }
+ outputCoverage_Stage0 = vec4(coverage);
+ }
+ {
+ sk_FragColor = outputColor_Stage0 * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec4 radii_selector;
+in vec4 corner_and_radius_outsets;
+in vec4 aa_bloat_and_coverage;
+in vec4 skew;
+in vec2 translate;
+in vec4 radii_x;
+in vec4 radii_y;
+in vec4 color;
+flat out vec4 vcolor_Stage0;
+noperspective out vec4 varccoord_Stage0;
+void main() {
+ vcolor_Stage0 = color;
+ vec2 corner = corner_and_radius_outsets.xy;
+ vec2 radius_outset = corner_and_radius_outsets.zw;
+ vec2 aa_bloat_direction = aa_bloat_and_coverage.xy;
+ float coverage = aa_bloat_and_coverage.z;
+ float is_linear_coverage = aa_bloat_and_coverage.w;
+ vec2 pixellength = inversesqrt(vec2(dot(skew.xz, skew.xz), dot(skew.yw, skew.yw)));
+ vec4 normalized_axis_dirs = skew * pixellength.xyxy;
+ vec2 axiswidths = abs(normalized_axis_dirs.xy) + abs(normalized_axis_dirs.zw);
+ vec2 aa_bloatradius = (axiswidths * pixellength) * 0.5;
+ vec4 radii_and_neighbors = radii_selector * mat4(radii_x, radii_y, radii_x.yxwz, radii_y.wzyx);
+ vec2 radii = radii_and_neighbors.xy;
+ vec2 neighbor_radii = radii_and_neighbors.zw;
+ if (any(greaterThan(aa_bloatradius, vec2(1.0)))) {
+ corner = max(abs(corner), aa_bloatradius) * sign(corner);
+ coverage /= max(aa_bloatradius.x, 1.0) * max(aa_bloatradius.y, 1.0);
+ radii = vec2(0.0);
+ }
+ if (any(lessThan(radii, aa_bloatradius * 1.25))) {
+ radii = aa_bloatradius;
+ radius_outset = floor(abs(radius_outset)) * radius_outset;
+ is_linear_coverage = 1.0;
+ } else {
+ radii = clamp(radii, pixellength, 2.0 - pixellength);
+ neighbor_radii = clamp(neighbor_radii, pixellength, 2.0 - pixellength);
+ vec2 spacing = (2.0 - radii) - neighbor_radii;
+ vec2 extra_pad = max(pixellength * 0.0625 - spacing, vec2(0.0));
+ radii -= extra_pad * 0.5;
+ }
+ vec2 aa_outset = aa_bloat_direction * aa_bloatradius;
+ vec2 vertexpos = (corner + radius_outset * radii) + aa_outset;
+ mat2 skewmatrix = mat2(skew.xy, skew.zw);
+ vec2 devcoord = vertexpos * skewmatrix + translate;
+ if (0.0 != is_linear_coverage) {
+ varccoord_Stage0.xy = vec2(0.0, coverage);
+ } else {
+ vec2 arccoord = (1.0 - abs(radius_outset)) + (aa_outset / radii) * corner;
+ varccoord_Stage0.xy = vec2(arccoord.x + 1.0, arccoord.y);
+ mat2 derivatives = inverse(skewmatrix);
+ varccoord_Stage0.zw = derivatives * ((arccoord / radii) * 2.0);
+ }
+ gl_Position = vec4(devcoord.x, devcoord.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/7-71.shader_test b/shaders/skia/7-71.shader_test
new file mode 100644
index 0000000..c524bc4
--- /dev/null
+++ b/shaders/skia/7-71.shader_test
@@ -0,0 +1,75 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 RadialGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = length(vTransformedCoords_0_Stage0);
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = RadialGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ float factor = 1.0 - output_Stage1.w;
+ {
+ factor = exp((-factor * factor) * 4.0) - 0.017999999225139618;
+ }
+ output_Stage2 = vec4(factor);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/7-72.shader_test b/shaders/skia/7-72.shader_test
new file mode 100644
index 0000000..b1b5e31
--- /dev/null
+++ b/shaders/skia/7-72.shader_test
@@ -0,0 +1,64 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 ucolor_Stage1_c1_c0_c0_c0;
+noperspective in vec4 vcolor_Stage0;
+vec4 BlurredEdgeFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ float factor = 1.0 - _input.w;
+ {
+ factor = exp((-factor * factor) * 4.0) - 0.017999999225139618;
+ }
+ _output = vec4(factor);
+ return _output;
+}
+vec4 ConstColorProcessor_Stage1_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage1_c1_c0_c0_c0;
+ }
+ return _output;
+}
+vec4 blend_modulate(vec4 src, vec4 dst) {
+ return src * dst;
+}
+vec4 ComposeOne_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_modulate(ConstColorProcessor_Stage1_c1_c0_c0_c0(vec4(1.0)), _input);
+ return _output;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ComposeOne_Stage1_c1_c0(BlurredEdgeFragmentProcessor_Stage1_c0_c0(outputColor_Stage0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 position;
+in vec4 inColor;
+noperspective out vec4 vcolor_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = position;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/7-76.shader_test b/shaders/skia/7-76.shader_test
new file mode 100644
index 0000000..25c2916
--- /dev/null
+++ b/shaders/skia/7-76.shader_test
@@ -0,0 +1,48 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+noperspective in vec4 vQuadEdge_Stage0;
+noperspective in vec4 vinColor_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vinColor_Stage0;
+ float edgeAlpha;
+ vec2 duvdx = dFdx(vQuadEdge_Stage0.xy);
+ vec2 duvdy = dFdy(vQuadEdge_Stage0.xy);
+ if (vQuadEdge_Stage0.z > 0.0 && vQuadEdge_Stage0.w > 0.0) {
+ edgeAlpha = min(min(vQuadEdge_Stage0.z, vQuadEdge_Stage0.w) + 0.5, 1.0);
+ } else {
+ vec2 gF = vec2((2.0 * vQuadEdge_Stage0.x) * duvdx.x - duvdx.y, (2.0 * vQuadEdge_Stage0.x) * duvdy.x - duvdy.y);
+ edgeAlpha = vQuadEdge_Stage0.x * vQuadEdge_Stage0.x - vQuadEdge_Stage0.y;
+ edgeAlpha = clamp(0.5 - edgeAlpha / length(gF), 0.0, 1.0);
+ }
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ {
+ sk_FragColor = outputColor_Stage0 * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 inPosition;
+in vec4 inColor;
+in vec4 inQuadEdge;
+noperspective out vec4 vQuadEdge_Stage0;
+noperspective out vec4 vinColor_Stage0;
+void main() {
+ vQuadEdge_Stage0 = inQuadEdge;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = inPosition;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/7-77.shader_test b/shaders/skia/7-77.shader_test
new file mode 100644
index 0000000..e42ffff
--- /dev/null
+++ b/shaders/skia/7-77.shader_test
@@ -0,0 +1,124 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 ustart_Stage2_c2_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uend_Stage2_c2_c0_c0_c0_c0_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+flat in vec4 vcolor_Stage0;
+noperspective in float vcoverage_Stage0;
+vec4 TextureEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+vec4 TextureEffect_Stage2_c1_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage2, vTransformedCoords_1_Stage0) * _input;
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+vec4 ComposeOne_Stage2_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_dst_in(_input, TextureEffect_Stage2_c1_c0_c0_c0_c0_c0(vec4(1.0)));
+ return _output;
+}
+vec4 ComposeOne_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_src_in(_input, ComposeOne_Stage2_c1_c0_c0_c0(vec4(1.0)));
+ return _output;
+}
+vec4 LinearGradientLayout_Stage2_c2_c0_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_2_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage2_c2_c0_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage2_c2_c0_c0_c0_c0_c0_c1_c0 + t * uend_Stage2_c2_c0_c0_c0_c0_c0_c1_c0;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage2_c2_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage2_c2_c0_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ t.x = fract(t.x);
+ }
+ _output = SingleIntervalGradientColorizer_Stage2_c2_c0_c0_c0_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 ComposeOne_Stage2_c2_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_dst_in(_input, TiledGradientEffect_Stage2_c2_c0_c0_c0_c0_c0(vec4(1.0)));
+ return _output;
+}
+vec4 ComposeOne_Stage2_c2_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_src_in(_input, ComposeOne_Stage2_c2_c0_c0_c0(vec4(1.0)));
+ return _output;
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ float coverage = vcoverage_Stage0;
+ outputCoverage_Stage0 = vec4(coverage);
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TextureEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = ComposeOne_Stage2_c2_c0(ComposeOne_Stage2_c1_c0(outputCoverage_Stage0));
+ }
+ {
+ sk_FragColor = output_Stage1 * output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+in vec2 position;
+in float coverage;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+flat out vec4 vcolor_Stage0;
+noperspective out float vcoverage_Stage0;
+void main() {
+ vec2 position = position;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ vcoverage_Stage0 = coverage;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/7-8.shader_test b/shaders/skia/7-8.shader_test
new file mode 100644
index 0000000..b88ca98
--- /dev/null
+++ b/shaders/skia/7-8.shader_test
@@ -0,0 +1,71 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ return _output;
+}
+vec4 TextureEffect_Stage1_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_1_Stage1, vTransformedCoords_1_Stage0) * _input;
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = TextureEffect_Stage1_c1_c0_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ return _output;
+}
+vec4 blend_difference(vec4 src, vec4 dst) {
+ return vec4((src.xyz + dst.xyz) - 2.0 * min(src.xyz * dst.w, dst.xyz * src.w), src.w + (1.0 - src.w) * dst.w);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_difference(OverrideInputFragmentProcessor_Stage1_c0_c0(inputColor), OverrideInputFragmentProcessor_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/7-81.shader_test b/shaders/skia/7-81.shader_test
new file mode 100644
index 0000000..edb26ab
--- /dev/null
+++ b/shaders/skia/7-81.shader_test
@@ -0,0 +1,47 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 TextureEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TextureEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = texture(uTextureSampler_0_Stage2, vTransformedCoords_1_Stage0);
+ }
+ {
+ sk_FragColor = output_Stage1 * output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/7-83.shader_test b/shaders/skia/7-83.shader_test
new file mode 100644
index 0000000..c7e551a
--- /dev/null
+++ b/shaders/skia/7-83.shader_test
@@ -0,0 +1,61 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+vec4 TextureEffect_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage2, vTransformedCoords_1_Stage0) * _input;
+ return _output;
+}
+vec4 Swizzle_Stage2_c2_c0(vec4 _input) {
+ vec4 _output;
+ _output = _input.wwww;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TextureEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = Swizzle_Stage2_c2_c0(TextureEffect_Stage2_c1_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage1 * output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/7-85.shader_test b/shaders/skia/7-85.shader_test
new file mode 100644
index 0000000..9174b6e
--- /dev/null
+++ b/shaders/skia/7-85.shader_test
@@ -0,0 +1,63 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 urectUniform_Stage1_c0_c0;
+uniform vec4 urectUniform_Stage1_c1_c0;
+flat in vec4 vcolor_Stage0;
+vec4 AARectEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ float alpha;
+ {
+ alpha = float(all(greaterThan(vec4(gl_FragCoord.xy, urectUniform_Stage1_c0_c0.zw), vec4(urectUniform_Stage1_c0_c0.xy, gl_FragCoord.xy))) ? 1 : 0);
+ }
+ {
+ alpha = 1.0 - alpha;
+ }
+ _output = _input * alpha;
+ return _output;
+}
+vec4 AARectEffect_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ float alpha;
+ {
+ alpha = float(all(greaterThan(vec4(gl_FragCoord.xy, urectUniform_Stage1_c1_c0.zw), vec4(urectUniform_Stage1_c1_c0.xy, gl_FragCoord.xy))) ? 1 : 0);
+ }
+ {
+ alpha = 1.0 - alpha;
+ }
+ _output = _input * alpha;
+ return _output;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = AARectEffect_Stage1_c1_c0(AARectEffect_Stage1_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = outputColor_Stage0 * output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 position;
+in vec4 color;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/7-88.shader_test b/shaders/skia/7-88.shader_test
new file mode 100644
index 0000000..5816c2c
--- /dev/null
+++ b/shaders/skia/7-88.shader_test
@@ -0,0 +1,44 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 ucircle_Stage1;
+flat in vec4 vcolor_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ float d;
+ {
+ d = (1.0 - length((ucircle_Stage1.xy - gl_FragCoord.xy) * ucircle_Stage1.w)) * ucircle_Stage1.z;
+ }
+ {
+ output_Stage1 = d > 0.5 ? vec4(1.0) : vec4(0.0);
+ }
+ }
+ {
+ sk_FragColor = outputColor_Stage0 * output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 position;
+in vec4 color;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/7-9.shader_test b/shaders/skia/7-9.shader_test
new file mode 100644
index 0000000..36bdbd5
--- /dev/null
+++ b/shaders/skia/7-9.shader_test
@@ -0,0 +1,96 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform float uSrcTF_Stage1[7];
+uniform mat3 uColorXform_Stage1;
+uniform float uDstTF_Stage1[7];
+uniform mat3 ucolorSpaceMatrix_Stage1_c0_c0;
+uniform vec3 ucolorSpaceTranslate_Stage1_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 TextureEffect_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+vec4 YUVtoRGBEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 planes[1];
+ planes[0] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0));
+ vec4 color = vec4(planes[0].x, planes[0].y, planes[0].z, planes[0].w);
+ color.xyz = clamp(color.xyz * ucolorSpaceMatrix_Stage1_c0_c0 + ucolorSpaceTranslate_Stage1_c0_c0, 0.0, 1.0);
+ color.xyz *= color.w;
+ _output = color;
+ return _output;
+}
+float src_tf_Stage1(float x) {
+ float G = uSrcTF_Stage1[0];
+ float A = uSrcTF_Stage1[1];
+ float B = uSrcTF_Stage1[2];
+ float C = uSrcTF_Stage1[3];
+ float D = uSrcTF_Stage1[4];
+ float E = uSrcTF_Stage1[5];
+ float F = uSrcTF_Stage1[6];
+ float s = sign(x);
+ x = abs(x);
+ x = x < D ? C * x + F : pow(A * x + B, G) + E;
+ return s * x;
+}
+float dst_tf_Stage1(float x) {
+ float G = uDstTF_Stage1[0];
+ float A = uDstTF_Stage1[1];
+ float B = uDstTF_Stage1[2];
+ float C = uDstTF_Stage1[3];
+ float D = uDstTF_Stage1[4];
+ float E = uDstTF_Stage1[5];
+ float F = uDstTF_Stage1[6];
+ float s = sign(x);
+ x = abs(x);
+ x = x < D ? C * x + F : pow(A * x + B, G) + E;
+ return s * x;
+}
+vec4 gamut_xform_Stage1(vec4 color) {
+ color.xyz = uColorXform_Stage1 * color.xyz;
+ return color;
+}
+vec4 color_xform_Stage1(vec4 color) {
+ float nonZeroAlpha = max(color.w, 9.9999997473787516e-05);
+ color = vec4(color.xyz / nonZeroAlpha, nonZeroAlpha);
+ color.x = src_tf_Stage1(color.x);
+ color.y = src_tf_Stage1(color.y);
+ color.z = src_tf_Stage1(color.z);
+ color = gamut_xform_Stage1(color);
+ color.x = dst_tf_Stage1(color.x);
+ color.y = dst_tf_Stage1(color.y);
+ color.z = dst_tf_Stage1(color.z);
+ color.xyz *= color.w;
+ return color;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = color_xform_Stage1(YUVtoRGBEffect_Stage1_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/7-97.shader_test b/shaders/skia/7-97.shader_test
new file mode 100644
index 0000000..1381519
--- /dev/null
+++ b/shaders/skia/7-97.shader_test
@@ -0,0 +1,56 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 urectH_Stage1;
+uniform float uinvSixSigma_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+flat in vec4 vcolor_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ float xCoverage, yCoverage;
+ {
+ float l, r, t, b;
+ {
+ l = gl_FragCoord.x - urectH_Stage1.x;
+ r = urectH_Stage1.z - gl_FragCoord.x;
+ t = gl_FragCoord.y - urectH_Stage1.y;
+ b = urectH_Stage1.w - gl_FragCoord.y;
+ }
+ float il = 1.0 + l * uinvSixSigma_Stage1;
+ float ir = 1.0 + r * uinvSixSigma_Stage1;
+ float it = 1.0 + t * uinvSixSigma_Stage1;
+ float ib = 1.0 + b * uinvSixSigma_Stage1;
+ xCoverage = (1.0 - texture(uTextureSampler_0_Stage1, vec2(il, 0.5)).w) - texture(uTextureSampler_0_Stage1, vec2(ir, 0.5)).w;
+ yCoverage = (1.0 - texture(uTextureSampler_0_Stage1, vec2(it, 0.5)).w) - texture(uTextureSampler_0_Stage1, vec2(ib, 0.5)).w;
+ }
+ output_Stage1 = vec4(xCoverage) * yCoverage;
+ }
+ {
+ sk_FragColor = outputColor_Stage0 * output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 position;
+in vec4 color;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/7.shader_test b/shaders/skia/7.shader_test
new file mode 100644
index 0000000..359f769
--- /dev/null
+++ b/shaders/skia/7.shader_test
@@ -0,0 +1,57 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 usubset_Stage1_c0_c0;
+uniform vec4 uclamp_Stage1_c0_c0;
+uniform sampler2DRect uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 inCoord = vTransformedCoords_0_Stage0;
+ vec2 subsetCoord;
+ subsetCoord.x = mod(inCoord.x - usubset_Stage1_c0_c0.x, usubset_Stage1_c0_c0.z - usubset_Stage1_c0_c0.x) + usubset_Stage1_c0_c0.x;
+ {
+ float w = usubset_Stage1_c0_c0.w - usubset_Stage1_c0_c0.y;
+ float w2 = 2.0 * w;
+ float m = mod(inCoord.y - usubset_Stage1_c0_c0.y, w2);
+ subsetCoord.y = mix(m, w2 - m, step(w, m)) + usubset_Stage1_c0_c0.y;
+ }
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage1_c0_c0.x, uclamp_Stage1_c0_c0.z);
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage1_c0_c0.y, uclamp_Stage1_c0_c0.w);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ _output = _input * textureColor;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TextureEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/70-1.shader_test b/shaders/skia/70-1.shader_test
new file mode 100644
index 0000000..57b9e7c
--- /dev/null
+++ b/shaders/skia/70-1.shader_test
@@ -0,0 +1,50 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 TextureEffect_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage2, vTransformedCoords_1_Stage0) * _input;
+ return _output;
+}
+vec4 blend_difference(vec4 src, vec4 dst) {
+ return vec4((src.xyz + dst.xyz) - 2.0 * min(src.xyz * dst.w, dst.xyz * src.w), src.w + (1.0 - src.w) * dst.w);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_difference(output_Stage1, TextureEffect_Stage2_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/70-10.shader_test b/shaders/skia/70-10.shader_test
new file mode 100644
index 0000000..f6e9acb
--- /dev/null
+++ b/shaders/skia/70-10.shader_test
@@ -0,0 +1,78 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage2_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c1_c0;
+ }
+ return _output;
+}
+vec4 blend_dst_over(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src + dst;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_dst_over(ConstColorProcessor_Stage2_c1_c0(vec4(1.0)), output_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/70-11.shader_test b/shaders/skia/70-11.shader_test
new file mode 100644
index 0000000..611db63
--- /dev/null
+++ b/shaders/skia/70-11.shader_test
@@ -0,0 +1,44 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform float uPixelSize_Stage1;
+uniform vec2 uRange_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = vec4(1.0, 1.0, 1.0, 1.0);
+ vec2 coord = vTransformedCoords_0_Stage0;
+ coord.x -= 8.0 * uPixelSize_Stage1;
+ float highBound = min(uRange_Stage1.y, coord.x + 16.0 * uPixelSize_Stage1);
+ coord.x = max(uRange_Stage1.x, coord.x);
+ for (int i = 0;i < 17; i++) {
+ output_Stage1 = min(output_Stage1, texture(uTextureSampler_0_Stage1, coord));
+ coord.x += uPixelSize_Stage1;
+ coord.x = min(highBound, coord.x);
+ }
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/70-12.shader_test b/shaders/skia/70-12.shader_test
new file mode 100644
index 0000000..fe38f8b
--- /dev/null
+++ b/shaders/skia/70-12.shader_test
@@ -0,0 +1,153 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform float uSurfaceScale_Stage1;
+uniform vec3 uLightColor_Stage1;
+uniform float uKD_Stage1;
+uniform vec3 uLightLocation_Stage1;
+uniform float uExponent_Stage1;
+uniform float uCosInnerConeAngle_Stage1;
+uniform float uCosOuterConeAngle_Stage1;
+uniform float uConeScale_Stage1;
+uniform vec3 uS_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 light_Stage1(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ float colorScale = uKD_Stage1 * dot(normal, surfaceToLight);
+ return vec4(lightColor * clamp(colorScale, 0.0, 1.0), 1.0);
+}
+float sobel_Stage1(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage1(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage1(float m[9], float surfaceScale) {
+ return pointToNormal_Stage1(sobel_Stage1(m[1], m[2], m[4], m[5], m[7], m[8], 0.5), sobel_Stage1(0.0, 0.0, m[1], m[7], m[2], m[8], 0.33333298563957214), surfaceScale);
+}
+vec3 lightColor_Stage1(vec3 surfaceToLight) {
+ float cosAngle = -dot(surfaceToLight, uS_Stage1);
+ if (cosAngle < uCosOuterConeAngle_Stage1) {
+ return vec3(0.0);
+ }
+ float scale = pow(cosAngle, uExponent_Stage1);
+ if (cosAngle < uCosInnerConeAngle_Stage1) {
+ return ((uLightColor_Stage1 * scale) * (cosAngle - uCosOuterConeAngle_Stage1)) * uConeScale_Stage1;
+ }
+ return uLightColor_Stage1;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ vec2 coord = vTransformedCoords_0_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp0 = textureColor;
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp1 = textureColor;
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp2 = textureColor;
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp3 = textureColor;
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp4 = textureColor;
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp5 = textureColor;
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp6 = textureColor;
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp7 = textureColor;
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp8 = textureColor;
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = normalize(uLightLocation_Stage1 - vec3(gl_FragCoord.xy, uSurfaceScale_Stage1 * m[4]));
+ output_Stage1 = light_Stage1(normal_Stage1(m, uSurfaceScale_Stage1), surfaceToLight, lightColor_Stage1(surfaceToLight));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/70-13.shader_test b/shaders/skia/70-13.shader_test
new file mode 100644
index 0000000..92f9c63
--- /dev/null
+++ b/shaders/skia/70-13.shader_test
@@ -0,0 +1,85 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec2 uDstTextureUpperLeft_Stage1;
+uniform vec2 uDstTextureCoordScale_Stage1;
+uniform sampler2D uTextureSampler_0_Stage0;
+uniform sampler2D uDstTextureSampler_Stage1;
+noperspective in vec2 vTextureCoords_Stage0;
+flat in int vTexIndex_Stage0;
+noperspective in vec4 vinColor_Stage0;
+float _guarded_divide(float n, float d) {
+ return n / d;
+}
+float _soft_light_component(float sc, float sa, float dc, float da) {
+ if (2.0 * sc <= sa) {
+ return (_guarded_divide((dc * dc) * (sa - 2.0 * sc), da) + (1.0 - da) * sc) + dc * ((-sa + 2.0 * sc) + 1.0);
+ } else if (4.0 * dc <= da) {
+ float DSqd = dc * dc;
+ float DCub = DSqd * dc;
+ float DaSqd = da * da;
+ float DaCub = DaSqd * da;
+ return _guarded_divide(((DaSqd * (sc - dc * ((3.0 * sa - 6.0 * sc) - 1.0)) + ((12.0 * da) * DSqd) * (sa - 2.0 * sc)) - (16.0 * DCub) * (sa - 2.0 * sc)) - DaCub * sc, DaSqd);
+ }
+ return ((dc * ((sa - 2.0 * sc) + 1.0) + sc) - sqrt(da * dc) * (sa - 2.0 * sc)) - da * sc;
+}
+vec4 blend_soft_light(vec4 src, vec4 dst) {
+ if (dst.w == 0.0) {
+ return src;
+ }
+ return vec4(_soft_light_component(src.x, src.w, dst.x, dst.w), _soft_light_component(src.y, src.w, dst.y, dst.w), _soft_light_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vinColor_Stage0;
+ vec4 texColor;
+ {
+ texColor = texture(uTextureSampler_0_Stage0, vTextureCoords_Stage0);
+ }
+ outputCoverage_Stage0 = texColor;
+ }
+ {
+ if (all(lessThanEqual(outputCoverage_Stage0.xyz, vec3(0.0)))) {
+ discard;
+ }
+ vec2 _dstTexCoord = (gl_FragCoord.xy - uDstTextureUpperLeft_Stage1) * uDstTextureCoordScale_Stage1;
+ _dstTexCoord.y = 1.0 - _dstTexCoord.y;
+ vec4 _dstColor = texture(uDstTextureSampler_Stage1, _dstTexCoord);
+ sk_FragColor = blend_soft_light(outputColor_Stage0, _dstColor);
+ float lerpRed = mix(_dstColor.w, sk_FragColor.w, outputCoverage_Stage0.x);
+ float lerpBlue = mix(_dstColor.w, sk_FragColor.w, outputCoverage_Stage0.y);
+ float lerpGreen = mix(_dstColor.w, sk_FragColor.w, outputCoverage_Stage0.z);
+ sk_FragColor = outputCoverage_Stage0 * sk_FragColor + (vec4(1.0) - outputCoverage_Stage0) * _dstColor;
+ sk_FragColor.w = max(max(lerpRed, lerpBlue), lerpGreen);
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform vec2 uAtlasSizeInv_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in uvec2 inTextureCoords;
+noperspective out vec2 vTextureCoords_Stage0;
+flat out int vTexIndex_Stage0;
+noperspective out vec4 vinColor_Stage0;
+void main() {
+ ivec2 signedCoords = ivec2(int(inTextureCoords.x), int(inTextureCoords.y));
+ vec2 unormTexCoords = vec2(float(signedCoords.x / 2), float(signedCoords.y / 2));
+ vTextureCoords_Stage0 = unormTexCoords * uAtlasSizeInv_Stage0;
+ vTexIndex_Stage0 = 0;
+ vinColor_Stage0 = inColor;
+ gl_Position = vec4(inPosition.x, inPosition.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/70-14.shader_test b/shaders/skia/70-14.shader_test
new file mode 100644
index 0000000..d78a28f
--- /dev/null
+++ b/shaders/skia/70-14.shader_test
@@ -0,0 +1,41 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform float uPixelSize_Stage1;
+uniform vec2 uRange_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = vec4(1.0, 1.0, 1.0, 1.0);
+ vec2 coord = vTransformedCoords_0_Stage0;
+ coord.y -= 5.0 * uPixelSize_Stage1;
+ for (int i = 0;i < 11; i++) {
+ output_Stage1 = min(output_Stage1, texture(uTextureSampler_0_Stage1, coord));
+ coord.y += uPixelSize_Stage1;
+ }
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/70-2.shader_test b/shaders/skia/70-2.shader_test
new file mode 100644
index 0000000..91d199d
--- /dev/null
+++ b/shaders/skia/70-2.shader_test
@@ -0,0 +1,96 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uclamp_Stage1_c0_c0_c0_c0;
+uniform vec4 uclamp_Stage1_c0_c0_c1_c0;
+uniform mat4 um_Stage2;
+uniform vec4 uv_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 inCoord = vTransformedCoords_0_Stage0;
+ vec2 subsetCoord;
+ subsetCoord.x = inCoord.x;
+ subsetCoord.y = inCoord.y;
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage1_c0_c0_c0_c0.x, uclamp_Stage1_c0_c0_c0_c0.z);
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage1_c0_c0_c0_c0.y, uclamp_Stage1_c0_c0_c0_c0.w);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ _output = _input * textureColor;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 inCoord = vTransformedCoords_1_Stage0;
+ vec2 subsetCoord;
+ subsetCoord.x = inCoord.x;
+ subsetCoord.y = inCoord.y;
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage1_c0_c0_c1_c0.x, uclamp_Stage1_c0_c0_c1_c0.z);
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage1_c0_c0_c1_c0.y, uclamp_Stage1_c0_c0_c1_c0.w);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ _output = _input * textureColor;
+ return _output;
+}
+vec4 YUVtoRGBEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 planes[2];
+ planes[0] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0));
+ planes[1] = TextureEffect_Stage1_c0_c0_c1_c0(vec4(1.0));
+ vec4 color = vec4(planes[0].w, planes[1].x, planes[1].y, 1.0);
+ _output = color;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = YUVtoRGBEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ vec4 inputColor = output_Stage1;
+ {
+ float nonZeroAlpha = max(inputColor.w, 9.9999997473787516e-05);
+ inputColor = vec4(inputColor.xyz / nonZeroAlpha, inputColor.w);
+ }
+ output_Stage2 = um_Stage2 * inputColor + uv_Stage2;
+ {
+ output_Stage2 = clamp(output_Stage2, 0.0, 1.0);
+ }
+ {
+ output_Stage2.xyz *= output_Stage2.w;
+ }
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/70-25.shader_test b/shaders/skia/70-25.shader_test
new file mode 100644
index 0000000..416e154
--- /dev/null
+++ b/shaders/skia/70-25.shader_test
@@ -0,0 +1,91 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform float ubias_Stage1_c0_c0_c0_c0;
+uniform float uscale_Stage1_c0_c0_c0_c0;
+uniform vec4 uscale01_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias01_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale23_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias23_Stage1_c0_c0_c1_c0;
+uniform float uthreshold_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 SweepGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float angle;
+ {
+ angle = atan(-vTransformedCoords_0_Stage0.y, -vTransformedCoords_0_Stage0.x);
+ }
+ float t = ((angle * 0.15915493667125702 + 0.5) + ubias_Stage1_c0_c0_c0_c0) * uscale_Stage1_c0_c0_c0_c0;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 DualIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthreshold_Stage1_c0_c0_c1_c0) {
+ scale = uscale01_Stage1_c0_c0_c1_c0;
+ bias = ubias01_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale23_Stage1_c0_c0_c1_c0;
+ bias = ubias23_Stage1_c0_c0_c1_c0;
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = SweepGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = DualIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_dst_in(outputColor_Stage0, ClampedGradientEffect_Stage1_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/70-26.shader_test b/shaders/skia/70-26.shader_test
new file mode 100644
index 0000000..6905233
--- /dev/null
+++ b/shaders/skia/70-26.shader_test
@@ -0,0 +1,107 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform float ubias_Stage1_c0_c0_c0_c0;
+uniform float uscale_Stage1_c0_c0_c0_c0;
+uniform vec4 uscale01_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias01_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale23_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias23_Stage1_c0_c0_c1_c0;
+uniform float uthreshold_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 SweepGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float angle;
+ {
+ angle = atan(-vTransformedCoords_0_Stage0.y, -vTransformedCoords_0_Stage0.x);
+ }
+ float t = ((angle * 0.15915493667125702 + 0.5) + ubias_Stage1_c0_c0_c0_c0) * uscale_Stage1_c0_c0_c0_c0;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 DualIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthreshold_Stage1_c0_c0_c1_c0) {
+ scale = uscale01_Stage1_c0_c0_c1_c0;
+ bias = ubias01_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale23_Stage1_c0_c0_c1_c0;
+ bias = ubias23_Stage1_c0_c0_c1_c0;
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = SweepGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = DualIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_dst_in(outputColor_Stage0, ClampedGradientEffect_Stage1_c0_c0(vec4(1.0)));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_1_Stage0.x);
+ uint y = uint(vTransformedCoords_1_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ output_Stage2 = vec4(clamp(output_Stage2.xyz + value * 0.0039215688593685627, 0.0, output_Stage2.w), output_Stage2.w);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/70-27.shader_test b/shaders/skia/70-27.shader_test
new file mode 100644
index 0000000..78f5de4
--- /dev/null
+++ b/shaders/skia/70-27.shader_test
@@ -0,0 +1,85 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 TextureEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = TextureEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = OverrideInputFragmentProcessor_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+float _guarded_divide(float n, float d) {
+ return n / d;
+}
+float _soft_light_component(float sc, float sa, float dc, float da) {
+ if (2.0 * sc <= sa) {
+ return (_guarded_divide((dc * dc) * (sa - 2.0 * sc), da) + (1.0 - da) * sc) + dc * ((-sa + 2.0 * sc) + 1.0);
+ } else if (4.0 * dc <= da) {
+ float DSqd = dc * dc;
+ float DCub = DSqd * dc;
+ float DaSqd = da * da;
+ float DaCub = DaSqd * da;
+ return _guarded_divide(((DaSqd * (sc - dc * ((3.0 * sa - 6.0 * sc) - 1.0)) + ((12.0 * da) * DSqd) * (sa - 2.0 * sc)) - (16.0 * DCub) * (sa - 2.0 * sc)) - DaCub * sc, DaSqd);
+ }
+ return ((dc * ((sa - 2.0 * sc) + 1.0) + sc) - sqrt(da * dc) * (sa - 2.0 * sc)) - da * sc;
+}
+vec4 blend_soft_light(vec4 src, vec4 dst) {
+ if (dst.w == 0.0) {
+ return src;
+ }
+ return vec4(_soft_light_component(src.x, src.w, dst.x, dst.w), _soft_light_component(src.y, src.w, dst.y, dst.w), _soft_light_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_soft_light(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec2 inLocalCoord;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 color = inColor;
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/70-28.shader_test b/shaders/skia/70-28.shader_test
new file mode 100644
index 0000000..875c5d2
--- /dev/null
+++ b/shaders/skia/70-28.shader_test
@@ -0,0 +1,81 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform mat4 um_Stage2;
+uniform vec4 uv_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+in float vcoverage_Stage0;
+flat in vec4 vgeomDomain_Stage0;
+vec4 TextureEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ float coverage = vcoverage_Stage0 * gl_FragCoord.w;
+ vec4 geoDomain;
+ geoDomain = vgeomDomain_Stage0;
+ if (coverage < 0.5) {
+ vec4 dists4 = clamp(vec4(1.0, 1.0, -1.0, -1.0) * (gl_FragCoord.xyxy - geoDomain), 0.0, 1.0);
+ vec2 dists2 = dists4.xy * dists4.zw;
+ coverage = min(coverage, dists2.x * dists2.y);
+ }
+ outputCoverage_Stage0 = vec4(coverage);
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TextureEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ vec4 inputColor = output_Stage1;
+ {
+ float nonZeroAlpha = max(inputColor.w, 9.9999997473787516e-05);
+ inputColor = vec4(inputColor.xyz / nonZeroAlpha, inputColor.w);
+ }
+ output_Stage2 = um_Stage2 * inputColor + uv_Stage2;
+ {
+ output_Stage2 = clamp(output_Stage2, 0.0, 1.0);
+ }
+ {
+ output_Stage2.xyz *= output_Stage2.w;
+ }
+ }
+ {
+ sk_FragColor = output_Stage2 * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec4 positionWithCoverage;
+in vec4 color;
+in vec2 localCoord;
+in vec4 geomDomain;
+out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+out float vcoverage_Stage0;
+flat out vec4 vgeomDomain_Stage0;
+void main() {
+ vec3 position = positionWithCoverage.xyz;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ vcoverage_Stage0 = positionWithCoverage.w * positionWithCoverage.z;
+ vgeomDomain_Stage0 = geomDomain;
+ gl_Position = vec4(position.x, position.y, 0.0, position.z);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/70-29.shader_test b/shaders/skia/70-29.shader_test
new file mode 100644
index 0000000..3f98b13
--- /dev/null
+++ b/shaders/skia/70-29.shader_test
@@ -0,0 +1,127 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 uleftBorderColor_Stage1_c1_c0_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c1_c0_c0_c0;
+uniform vec4 ustart_Stage1_c1_c0_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c1_c0_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+vec4 ComposeOne_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_dst_in(_input, ClampedGradientEffect_Stage1_c0_c0_c0_c0(vec4(1.0)));
+ return _output;
+}
+vec4 LinearGradientLayout_Stage1_c1_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_1_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c1_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c1_c0_c0_c0_c1_c0 + t * uend_Stage1_c1_c0_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c1_c0_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c1_c0_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c1_c0_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c1_c0_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 ComposeOne_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_dst_in(_input, ClampedGradientEffect_Stage1_c1_c0_c0_c0(vec4(1.0)));
+ return _output;
+}
+vec4 blend_xor(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src + (1.0 - src.w) * dst;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_xor(ComposeOne_Stage1_c0_c0(inputColor), ComposeOne_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/70-3.shader_test b/shaders/skia/70-3.shader_test
new file mode 100644
index 0000000..78e7a18
--- /dev/null
+++ b/shaders/skia/70-3.shader_test
@@ -0,0 +1,127 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform float uSrcTF_Stage1_c0_c0[7];
+uniform mat3 uColorXform_Stage1_c0_c0;
+uniform float uDstTF_Stage1_c0_c0[7];
+uniform mat3 ucolorSpaceMatrix_Stage1_c0_c0_c0_c0;
+uniform vec3 ucolorSpaceTranslate_Stage1_c0_c0_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+uniform sampler2D uTextureSampler_2_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_1_Stage1, vTransformedCoords_1_Stage0) * _input;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c0_c0_c0_c0_c2_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_2_Stage1, vTransformedCoords_2_Stage0) * _input;
+ return _output;
+}
+vec4 YUVtoRGBEffect_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 planes[3];
+ planes[0] = TextureEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ planes[1] = TextureEffect_Stage1_c0_c0_c0_c0_c1_c0(vec4(1.0));
+ planes[2] = TextureEffect_Stage1_c0_c0_c0_c0_c2_c0(vec4(1.0));
+ vec4 color = vec4(planes[0].w, planes[1].x, planes[1].y, planes[2].w);
+ color.xyz = clamp(color.xyz * ucolorSpaceMatrix_Stage1_c0_c0_c0_c0 + ucolorSpaceTranslate_Stage1_c0_c0_c0_c0, 0.0, 1.0);
+ color.xyz *= color.w;
+ _output = color;
+ return _output;
+}
+float src_tf_Stage1_c0_c0(float x) {
+ float G = uSrcTF_Stage1_c0_c0[0];
+ float A = uSrcTF_Stage1_c0_c0[1];
+ float B = uSrcTF_Stage1_c0_c0[2];
+ float C = uSrcTF_Stage1_c0_c0[3];
+ float D = uSrcTF_Stage1_c0_c0[4];
+ float E = uSrcTF_Stage1_c0_c0[5];
+ float F = uSrcTF_Stage1_c0_c0[6];
+ float s = sign(x);
+ x = abs(x);
+ x = x < D ? C * x + F : pow(A * x + B, G) + E;
+ return s * x;
+}
+float dst_tf_Stage1_c0_c0(float x) {
+ float G = uDstTF_Stage1_c0_c0[0];
+ float A = uDstTF_Stage1_c0_c0[1];
+ float B = uDstTF_Stage1_c0_c0[2];
+ float C = uDstTF_Stage1_c0_c0[3];
+ float D = uDstTF_Stage1_c0_c0[4];
+ float E = uDstTF_Stage1_c0_c0[5];
+ float F = uDstTF_Stage1_c0_c0[6];
+ float s = sign(x);
+ x = abs(x);
+ x = x < D ? C * x + F : pow(A * x + B, G) + E;
+ return s * x;
+}
+vec4 gamut_xform_Stage1_c0_c0(vec4 color) {
+ color.xyz = uColorXform_Stage1_c0_c0 * color.xyz;
+ return color;
+}
+vec4 color_xform_Stage1_c0_c0(vec4 color) {
+ float nonZeroAlpha = max(color.w, 9.9999997473787516e-05);
+ color = vec4(color.xyz / nonZeroAlpha, nonZeroAlpha);
+ color.x = src_tf_Stage1_c0_c0(color.x);
+ color.y = src_tf_Stage1_c0_c0(color.y);
+ color.z = src_tf_Stage1_c0_c0(color.z);
+ color = gamut_xform_Stage1_c0_c0(color);
+ color.x = dst_tf_Stage1_c0_c0(color.x);
+ color.y = dst_tf_Stage1_c0_c0(color.y);
+ color.z = dst_tf_Stage1_c0_c0(color.z);
+ color.xyz *= color.w;
+ return color;
+}
+vec4 ColorSpaceXform_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = color_xform_Stage1_c0_c0(YUVtoRGBEffect_Stage1_c0_c0_c0_c0(vec4(1.0))) * _input;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ColorSpaceXform_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/70-30.shader_test b/shaders/skia/70-30.shader_test
new file mode 100644
index 0000000..76eb03c
--- /dev/null
+++ b/shaders/skia/70-30.shader_test
@@ -0,0 +1,100 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uCoordTransformMatrix_1_Stage0;
+uniform vec4 uclamp_Stage1_c0_c0_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+noperspective in float vcoverage_Stage0;
+vec4 TextureEffect_Stage1_c0_c0_c0_c0(vec4 _input, vec2 _coords) {
+ _coords = _coords * uCoordTransformMatrix_1_Stage0.xz + uCoordTransformMatrix_1_Stage0.yw;
+ vec4 _output;
+ vec2 inCoord = _coords;
+ vec2 subsetCoord;
+ subsetCoord.x = inCoord.x;
+ subsetCoord.y = inCoord.y;
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage1_c0_c0_c0_c0.x, uclamp_Stage1_c0_c0_c0_c0.z);
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage1_c0_c0_c0_c0.y, uclamp_Stage1_c0_c0_c0_c0.w);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ _output = _input * textureColor;
+ return _output;
+}
+vec4 Bicubic_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coord = vTransformedCoords_0_Stage0 - vec2(0.5);
+ vec2 f = fract(coord);
+ coord += 0.5 - f;
+ vec4 wx = mat4(0.055555555555555552, 0.88888888888888884, 0.055555555555555552, 0.0, -0.5, 0.0, 0.5, 0.0, 0.83333333333333337, -2.0, 1.5, -0.33333333333333331, -0.3888888888888889, 1.1666666666666667, -1.1666666666666667, 0.3888888888888889) * vec4(1.0, f.x, f.x * f.x, (f.x * f.x) * f.x);
+ vec4 wy = mat4(0.055555555555555552, 0.88888888888888884, 0.055555555555555552, 0.0, -0.5, 0.0, 0.5, 0.0, 0.83333333333333337, -2.0, 1.5, -0.33333333333333331, -0.3888888888888889, 1.1666666666666667, -1.1666666666666667, 0.3888888888888889) * vec4(1.0, f.y, f.y * f.y, (f.y * f.y) * f.y);
+ vec4 rowColors[4];
+ rowColors[0] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(-1.0, -1.0));
+ rowColors[1] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(0.0, -1.0));
+ rowColors[2] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(1.0, -1.0));
+ rowColors[3] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(2.0, -1.0));
+ vec4 s0 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ rowColors[0] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(-1.0, 0.0));
+ rowColors[1] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord);
+ rowColors[2] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(1.0, 0.0));
+ rowColors[3] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(2.0, 0.0));
+ vec4 s1 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ rowColors[0] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(-1.0, 1.0));
+ rowColors[1] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(0.0, 1.0));
+ rowColors[2] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(1.0, 1.0));
+ rowColors[3] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(2.0, 1.0));
+ vec4 s2 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ rowColors[0] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(-1.0, 2.0));
+ rowColors[1] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(0.0, 2.0));
+ rowColors[2] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(1.0, 2.0));
+ rowColors[3] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(2.0, 2.0));
+ vec4 s3 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ vec4 bicubicColor = ((wy.x * s0 + wy.y * s1) + wy.z * s2) + wy.w * s3;
+ bicubicColor.xyz = max(vec3(0.0), min(bicubicColor.xyz, bicubicColor.www));
+ _output = bicubicColor * _input;
+ return _output;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ float coverage = vcoverage_Stage0;
+ outputCoverage_Stage0 = vec4(coverage);
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = Bicubic_Stage1_c0_c0(vec4(1.0));
+ output_Stage1.xyz *= outputColor_Stage0.xyz;
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ sk_FragColor = output_Stage1 * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in float coverage;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+noperspective out float vcoverage_Stage0;
+void main() {
+ vec2 position = position;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ vcoverage_Stage0 = coverage;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/70-32.shader_test b/shaders/skia/70-32.shader_test
new file mode 100644
index 0000000..ac35531
--- /dev/null
+++ b/shaders/skia/70-32.shader_test
@@ -0,0 +1,96 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uCoordTransformMatrix_1_Stage0;
+uniform vec4 uclamp_Stage1_c0_c0_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+noperspective in float vcoverage_Stage0;
+vec4 TextureEffect_Stage1_c0_c0_c0_c0(vec4 _input, vec2 _coords) {
+ _coords = _coords * uCoordTransformMatrix_1_Stage0.xz + uCoordTransformMatrix_1_Stage0.yw;
+ vec4 _output;
+ vec2 inCoord = _coords;
+ vec2 subsetCoord;
+ subsetCoord.x = inCoord.x;
+ subsetCoord.y = inCoord.y;
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage1_c0_c0_c0_c0.x, uclamp_Stage1_c0_c0_c0_c0.z);
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage1_c0_c0_c0_c0.y, uclamp_Stage1_c0_c0_c0_c0.w);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ _output = _input * textureColor;
+ return _output;
+}
+vec4 Bicubic_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coord = vTransformedCoords_0_Stage0 - vec2(0.5);
+ vec2 f = fract(coord);
+ coord += 0.5 - f;
+ vec4 wx = mat4(0.055555555555555552, 0.88888888888888884, 0.055555555555555552, 0.0, -0.5, 0.0, 0.5, 0.0, 0.83333333333333337, -2.0, 1.5, -0.33333333333333331, -0.3888888888888889, 1.1666666666666667, -1.1666666666666667, 0.3888888888888889) * vec4(1.0, f.x, f.x * f.x, (f.x * f.x) * f.x);
+ vec4 wy = mat4(0.055555555555555552, 0.88888888888888884, 0.055555555555555552, 0.0, -0.5, 0.0, 0.5, 0.0, 0.83333333333333337, -2.0, 1.5, -0.33333333333333331, -0.3888888888888889, 1.1666666666666667, -1.1666666666666667, 0.3888888888888889) * vec4(1.0, f.y, f.y * f.y, (f.y * f.y) * f.y);
+ vec4 rowColors[4];
+ rowColors[0] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(-1.0, -1.0));
+ rowColors[1] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(0.0, -1.0));
+ rowColors[2] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(1.0, -1.0));
+ rowColors[3] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(2.0, -1.0));
+ vec4 s0 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ rowColors[0] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(-1.0, 0.0));
+ rowColors[1] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord);
+ rowColors[2] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(1.0, 0.0));
+ rowColors[3] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(2.0, 0.0));
+ vec4 s1 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ rowColors[0] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(-1.0, 1.0));
+ rowColors[1] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(0.0, 1.0));
+ rowColors[2] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(1.0, 1.0));
+ rowColors[3] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(2.0, 1.0));
+ vec4 s2 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ rowColors[0] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(-1.0, 2.0));
+ rowColors[1] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(0.0, 2.0));
+ rowColors[2] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(1.0, 2.0));
+ rowColors[3] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(2.0, 2.0));
+ vec4 s3 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ vec4 bicubicColor = ((wy.x * s0 + wy.y * s1) + wy.z * s2) + wy.w * s3;
+ bicubicColor.xyz = max(vec3(0.0), min(bicubicColor.xyz, bicubicColor.www));
+ _output = bicubicColor * _input;
+ return _output;
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ float coverage = vcoverage_Stage0;
+ outputCoverage_Stage0 = vec4(coverage);
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = Bicubic_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1 * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in float coverage;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+noperspective out float vcoverage_Stage0;
+void main() {
+ vec2 position = position;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ vcoverage_Stage0 = coverage;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/70-35.shader_test b/shaders/skia/70-35.shader_test
new file mode 100644
index 0000000..372398e
--- /dev/null
+++ b/shaders/skia/70-35.shader_test
@@ -0,0 +1,63 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec2 uDstTextureUpperLeft_Stage1;
+uniform vec2 uDstTextureCoordScale_Stage1;
+uniform sampler2D uTextureSampler_0_Stage0;
+uniform sampler2D uDstTextureSampler_Stage1;
+noperspective in vec2 vTextureCoords_Stage0;
+flat in int vTexIndex_Stage0;
+noperspective in vec4 vinColor_Stage0;
+vec4 blend_src_out(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vinColor_Stage0;
+ vec4 texColor;
+ {
+ texColor = texture(uTextureSampler_0_Stage0, vTextureCoords_Stage0);
+ }
+ outputCoverage_Stage0 = texColor;
+ }
+ {
+ if (all(lessThanEqual(outputCoverage_Stage0.xyz, vec3(0.0)))) {
+ discard;
+ }
+ vec2 _dstTexCoord = (gl_FragCoord.xy - uDstTextureUpperLeft_Stage1) * uDstTextureCoordScale_Stage1;
+ _dstTexCoord.y = 1.0 - _dstTexCoord.y;
+ vec4 _dstColor = texture(uDstTextureSampler_Stage1, _dstTexCoord);
+ sk_FragColor = blend_src_out(outputColor_Stage0, _dstColor);
+ sk_FragColor = outputCoverage_Stage0 * sk_FragColor + (vec4(1.0) - outputCoverage_Stage0) * _dstColor;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform vec2 uAtlasSizeInv_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in uvec2 inTextureCoords;
+noperspective out vec2 vTextureCoords_Stage0;
+flat out int vTexIndex_Stage0;
+noperspective out vec4 vinColor_Stage0;
+void main() {
+ ivec2 signedCoords = ivec2(int(inTextureCoords.x), int(inTextureCoords.y));
+ vec2 unormTexCoords = vec2(float(signedCoords.x / 2), float(signedCoords.y / 2));
+ vTextureCoords_Stage0 = unormTexCoords * uAtlasSizeInv_Stage0;
+ vTexIndex_Stage0 = 0;
+ vinColor_Stage0 = inColor;
+ gl_Position = vec4(inPosition.x, inPosition.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/70-36.shader_test b/shaders/skia/70-36.shader_test
new file mode 100644
index 0000000..a9bf55d
--- /dev/null
+++ b/shaders/skia/70-36.shader_test
@@ -0,0 +1,26 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uColor_Stage0;
+void main() {
+ {
+ sk_FragColor = vec4(1.0);
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 inPosition;
+in vec2 inLocalCoord;
+void main() {
+ vec2 pos2 = inPosition;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/70-37.shader_test b/shaders/skia/70-37.shader_test
new file mode 100644
index 0000000..a962e91
--- /dev/null
+++ b/shaders/skia/70-37.shader_test
@@ -0,0 +1,219 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage2;
+uniform float uSurfaceScale_Stage2;
+uniform vec3 uLightColor_Stage2;
+uniform float uKD_Stage2;
+uniform vec4 uTexDom_Stage2;
+uniform vec3 uDecalParams_Stage2;
+uniform vec3 uLightLocation_Stage2;
+uniform float uExponent_Stage2;
+uniform float uCosInnerConeAngle_Stage2;
+uniform float uCosOuterConeAngle_Stage2;
+uniform float uConeScale_Stage2;
+uniform vec3 uS_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 light_Stage2(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ float colorScale = uKD_Stage2 * dot(normal, surfaceToLight);
+ return vec4(lightColor * clamp(colorScale, 0.0, 1.0), 1.0);
+}
+float sobel_Stage2(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage2(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage2(float m[9], float surfaceScale) {
+ return pointToNormal_Stage2(sobel_Stage2(m[0], m[2], m[3], m[5], m[6], m[8], 0.25), sobel_Stage2(m[0], m[6], m[1], m[7], m[2], m[8], 0.25), surfaceScale);
+}
+vec3 lightColor_Stage2(vec3 surfaceToLight) {
+ float cosAngle = -dot(surfaceToLight, uS_Stage2);
+ if (cosAngle < uCosOuterConeAngle_Stage2) {
+ return vec3(0.0);
+ }
+ float scale = pow(cosAngle, uExponent_Stage2);
+ if (cosAngle < uCosInnerConeAngle_Stage2) {
+ return ((uLightColor_Stage2 * scale) * (cosAngle - uCosOuterConeAngle_Stage2)) * uConeScale_Stage2;
+ }
+ return uLightColor_Stage2;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ vec2 coord = vTransformedCoords_1_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp0 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp5 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp6 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp7 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp8 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = normalize(uLightLocation_Stage2 - vec3(gl_FragCoord.xy, uSurfaceScale_Stage2 * m[4]));
+ output_Stage2 = light_Stage2(normal_Stage2(m, uSurfaceScale_Stage2), surfaceToLight, lightColor_Stage2(surfaceToLight));
+ output_Stage2 *= output_Stage1;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/70-38.shader_test b/shaders/skia/70-38.shader_test
new file mode 100644
index 0000000..cd9c509
--- /dev/null
+++ b/shaders/skia/70-38.shader_test
@@ -0,0 +1,71 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uinnerRect_Stage2_c0_c0;
+uniform vec2 uinvRadiiXY_Stage2_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 EllipticalRRect_Stage2_c0_c0(vec4 _input, vec2 _coords) {
+ vec4 _output;
+ vec2 dxy0 = uinnerRect_Stage2_c0_c0.xy - gl_FragCoord.xy;
+ vec2 dxy1 = gl_FragCoord.xy - uinnerRect_Stage2_c0_c0.zw;
+ vec2 dxy = max(max(dxy0, dxy1), 0.0);
+ vec2 Z = dxy * uinvRadiiXY_Stage2_c0_c0;
+ float implicit = dot(Z, dxy) - 1.0;
+ float grad_dot = 4.0 * dot(Z, Z);
+ grad_dot = max(grad_dot, 9.9999997473787516e-05);
+ float approx_dist = implicit * inversesqrt(grad_dot);
+ float alpha = clamp(0.5 - approx_dist, 0.0, 1.0);
+ _output = _input * alpha;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ float coord = vTransformedCoords_1_Stage0.y - 0.5;
+ float f = fract(coord);
+ coord += 0.5 - f;
+ float f2 = f * f;
+ vec4 w = mat4(0.055555555555555552, 0.88888888888888884, 0.055555555555555552, 0.0, -0.5, 0.0, 0.5, 0.0, 0.83333333333333337, -2.0, 1.5, -0.33333333333333331, -0.3888888888888889, 1.1666666666666667, -1.1666666666666667, 0.3888888888888889) * vec4(1.0, f, f2, f2 * f);
+ vec4 c[4];
+ c[0] = EllipticalRRect_Stage2_c0_c0(vec4(1.0), vec2(vTransformedCoords_1_Stage0.x, coord + -1.0));
+ c[1] = EllipticalRRect_Stage2_c0_c0(vec4(1.0), vec2(vTransformedCoords_1_Stage0.x, coord));
+ c[2] = EllipticalRRect_Stage2_c0_c0(vec4(1.0), vec2(vTransformedCoords_1_Stage0.x, coord + 1.0));
+ c[3] = EllipticalRRect_Stage2_c0_c0(vec4(1.0), vec2(vTransformedCoords_1_Stage0.x, coord + 2.0));
+ vec4 bicubicColor = ((c[0] * w.x + c[1] * w.y) + c[2] * w.z) + c[3] * w.w;
+ bicubicColor = clamp(bicubicColor, 0.0, 1.0);
+ output_Stage2 = bicubicColor * output_Stage1;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/70-4.shader_test b/shaders/skia/70-4.shader_test
new file mode 100644
index 0000000..d0e1fda
--- /dev/null
+++ b/shaders/skia/70-4.shader_test
@@ -0,0 +1,54 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform mat3 ucolorSpaceMatrix_Stage1_c0_c0;
+uniform vec3 ucolorSpaceTranslate_Stage1_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+vec4 YUVtoRGBEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 planes[1];
+ planes[0] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0));
+ vec4 color = vec4(planes[0].x, planes[0].y, planes[0].z, planes[0].w);
+ color.xyz = clamp(color.xyz * ucolorSpaceMatrix_Stage1_c0_c0 + ucolorSpaceTranslate_Stage1_c0_c0, 0.0, 1.0);
+ color.xyz *= color.w;
+ _output = color;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = YUVtoRGBEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/70-5.shader_test b/shaders/skia/70-5.shader_test
new file mode 100644
index 0000000..967da62
--- /dev/null
+++ b/shaders/skia/70-5.shader_test
@@ -0,0 +1,113 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uColor_Stage0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale8_9_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale10_11_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias8_9_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias10_11_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.w) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c1_c0;
+ }
+ }
+ } else {
+ {
+ if (t < uthresholds9_13_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale8_9_Stage1_c0_c0_c1_c0;
+ bias = ubias8_9_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale10_11_Stage1_c0_c0_c1_c0;
+ bias = ubias10_11_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = uColor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_dst_in(outputColor_Stage0, TiledGradientEffect_Stage1_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 inLocalCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec2 pos2 = position;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/70-7.shader_test b/shaders/skia/70-7.shader_test
new file mode 100644
index 0000000..564cfff
--- /dev/null
+++ b/shaders/skia/70-7.shader_test
@@ -0,0 +1,77 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform sampler2D uTextureSampler_0_Stage1;
+flat in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec4 varccoord_Stage0;
+vec4 TextureEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ outputCoverage_Stage0 = vec4(1.0);
+ if (vec2(0.0) != varccoord_Stage0.xy) {
+ float fn = dot(varccoord_Stage0.xy, varccoord_Stage0.xy) - 1.0;
+ if (fn > 0.0) {
+ outputCoverage_Stage0 = vec4(0.0);
+ }
+ }
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TextureEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1 * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec4 radii_selector;
+in vec4 corner_and_radius_outsets;
+in vec4 skew;
+in vec2 translate;
+in vec4 radii_x;
+in vec4 radii_y;
+in vec4 color;
+in vec4 local_rect;
+flat out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec4 varccoord_Stage0;
+void main() {
+ vcolor_Stage0 = color;
+ vec2 corner = corner_and_radius_outsets.xy;
+ vec2 radius_outset = corner_and_radius_outsets.zw;
+ vec2 radii;
+ radii.x = dot(radii_selector, radii_x);
+ radii.y = dot(radii_selector, radii_y);
+ bool is_arc_section = radii.x > 0.0;
+ radii = abs(radii);
+ vec2 vertexpos = corner + radius_outset * radii;
+ vec2 localcoord = (local_rect.xy * (1.0 - vertexpos) + local_rect.zw * (1.0 + vertexpos)) * 0.5;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localcoord, 1.0)).xy;
+ mat2 skewmatrix = mat2(skew.xy, skew.zw);
+ vec2 devcoord = vertexpos * skewmatrix + translate;
+ if (is_arc_section) {
+ varccoord_Stage0.xy = 1.0 - abs(radius_outset);
+ mat2 derivatives = inverse(skewmatrix);
+ varccoord_Stage0.zw = derivatives * (((varccoord_Stage0.xy / radii) * corner) * 2.0);
+ } else {
+ varccoord_Stage0 = vec4(0.0);
+ }
+ gl_Position = vec4(devcoord.x, devcoord.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/70-8.shader_test b/shaders/skia/70-8.shader_test
new file mode 100644
index 0000000..9a531f6
--- /dev/null
+++ b/shaders/skia/70-8.shader_test
@@ -0,0 +1,37 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+flat in vec4 vcolor_Stage0;
+noperspective in float vcoverage_Stage0;
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ float coverage = vcoverage_Stage0;
+ outputCoverage_Stage0 = vec4(coverage);
+ }
+ {
+ sk_FragColor = outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 position;
+in float coverage;
+in vec4 color;
+flat out vec4 vcolor_Stage0;
+noperspective out float vcoverage_Stage0;
+void main() {
+ vec2 position = position;
+ vcolor_Stage0 = color;
+ vcoverage_Stage0 = coverage;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/70-9.shader_test b/shaders/skia/70-9.shader_test
new file mode 100644
index 0000000..e4ae6e1
--- /dev/null
+++ b/shaders/skia/70-9.shader_test
@@ -0,0 +1,48 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uinnerRect_Stage1;
+uniform vec2 uinvRadiiXY_Stage1;
+flat in vec4 vcolor_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec2 dxy0 = uinnerRect_Stage1.xy - gl_FragCoord.xy;
+ vec2 dxy1 = gl_FragCoord.xy - uinnerRect_Stage1.zw;
+ vec2 dxy = max(max(dxy0, dxy1), 0.0);
+ vec2 Z = dxy * uinvRadiiXY_Stage1;
+ float implicit = dot(Z, dxy) - 1.0;
+ float grad_dot = 4.0 * dot(Z, Z);
+ grad_dot = max(grad_dot, 9.9999997473787516e-05);
+ float approx_dist = implicit * inversesqrt(grad_dot);
+ float alpha = clamp(0.5 + approx_dist, 0.0, 1.0);
+ output_Stage1 = vec4(alpha);
+ }
+ {
+ sk_FragColor = outputColor_Stage0 * output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 position;
+in vec4 color;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/70.shader_test b/shaders/skia/70.shader_test
new file mode 100644
index 0000000..796426d
--- /dev/null
+++ b/shaders/skia/70.shader_test
@@ -0,0 +1,64 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 usubset_Stage1_c0_c0;
+uniform vec4 uclamp_Stage1_c0_c0;
+uniform sampler2DRect uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 inCoord = vTransformedCoords_0_Stage0;
+ vec2 subsetCoord;
+ subsetCoord.x = mod(inCoord.x - usubset_Stage1_c0_c0.x, usubset_Stage1_c0_c0.z - usubset_Stage1_c0_c0.x) + usubset_Stage1_c0_c0.x;
+ subsetCoord.y = mod(inCoord.y - usubset_Stage1_c0_c0.y, usubset_Stage1_c0_c0.w - usubset_Stage1_c0_c0.y) + usubset_Stage1_c0_c0.y;
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage1_c0_c0.x, uclamp_Stage1_c0_c0.z);
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage1_c0_c0.y, uclamp_Stage1_c0_c0.w);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float errX = subsetCoord.x - clampedCoord.x;
+ float repeatCoordX = errX > 0.0 ? uclamp_Stage1_c0_c0.x : uclamp_Stage1_c0_c0.z;
+ float errY = subsetCoord.y - clampedCoord.y;
+ float repeatCoordY = errY > 0.0 ? uclamp_Stage1_c0_c0.y : uclamp_Stage1_c0_c0.w;
+ if (errX != 0.0 && errY != 0.0) {
+ errX = abs(errX);
+ textureColor = mix(mix(textureColor, texture(uTextureSampler_0_Stage1, vec2(repeatCoordX, clampedCoord.y)), errX), mix(texture(uTextureSampler_0_Stage1, vec2(clampedCoord.x, repeatCoordY)), texture(uTextureSampler_0_Stage1, vec2(repeatCoordX, repeatCoordY)), errX), abs(errY));
+ } else if (errX != 0.0) {
+ textureColor = mix(textureColor, texture(uTextureSampler_0_Stage1, vec2(repeatCoordX, clampedCoord.y)), abs(errX));
+ } else if (errY != 0.0) {
+ textureColor = mix(textureColor, texture(uTextureSampler_0_Stage1, vec2(clampedCoord.x, repeatCoordY)), abs(errY));
+ }
+ _output = _input * textureColor;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TextureEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/700-2.shader_test b/shaders/skia/700-2.shader_test
new file mode 100644
index 0000000..6dc59cf
--- /dev/null
+++ b/shaders/skia/700-2.shader_test
@@ -0,0 +1,506 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+uniform vec2 uImageIncrement_Stage1;
+uniform float uSurfaceScale_Stage1;
+uniform vec3 uLightColor_Stage1;
+uniform float uKD_Stage1;
+uniform vec4 uTexDom_Stage1;
+uniform vec3 uDecalParams_Stage1;
+uniform vec3 uLightDirection_Stage1;
+uniform vec2 uImageIncrement_Stage2_c0_c0;
+uniform float uSurfaceScale_Stage2_c0_c0;
+uniform vec3 uLightColor_Stage2_c0_c0;
+uniform float uKD_Stage2_c0_c0;
+uniform vec4 uTexDom_Stage2_c0_c0;
+uniform vec3 uDecalParams_Stage2_c0_c0;
+uniform vec3 uLightLocation_Stage2_c0_c0;
+uniform vec2 uImageIncrement_Stage2_c1_c0;
+uniform vec2 uBounds_Stage2_c1_c0;
+uniform vec4 uKernel_Stage2_c1_c0[7];
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+uniform sampler2D uTextureSampler_1_Stage2;
+noperspective in vec4 vQuadEdge_Stage0;
+noperspective in vec4 vinColor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+vec4 light_Stage1(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ float colorScale = uKD_Stage1 * dot(normal, surfaceToLight);
+ return vec4(lightColor * clamp(colorScale, 0.0, 1.0), 1.0);
+}
+float sobel_Stage1(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage1(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage1(float m[9], float surfaceScale) {
+ return pointToNormal_Stage1(sobel_Stage1(0.0, 0.0, m[3], m[4], m[6], m[7], 0.66666698455810547), sobel_Stage1(m[3], m[6], m[4], m[7], 0.0, 0.0, 0.66666698455810547), surfaceScale);
+}
+vec4 light_Stage2_c0_c0(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ float colorScale = uKD_Stage2_c0_c0 * dot(normal, surfaceToLight);
+ return vec4(lightColor * clamp(colorScale, 0.0, 1.0), 1.0);
+}
+float sobel_Stage2_c0_c0(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage2_c0_c0(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage2_c0_c0(float m[9], float surfaceScale) {
+ return pointToNormal_Stage2_c0_c0(sobel_Stage2_c0_c0(m[0], m[1], m[3], m[4], 0.0, 0.0, 0.66666698455810547), sobel_Stage2_c0_c0(m[0], m[3], m[1], m[4], 0.0, 0.0, 0.66666698455810547), surfaceScale);
+}
+vec4 DiffuseLighting_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coord = vTransformedCoords_1_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c0_c0.y);
+ if (err > uDecalParams_Stage2_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp0 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c0_c0.y);
+ if (err > uDecalParams_Stage2_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c0_c0.y);
+ if (err > uDecalParams_Stage2_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c0_c0.y);
+ if (err > uDecalParams_Stage2_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c0_c0.y);
+ if (err > uDecalParams_Stage2_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c0_c0.y);
+ if (err > uDecalParams_Stage2_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp5 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c0_c0.y);
+ if (err > uDecalParams_Stage2_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp6 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c0_c0.y);
+ if (err > uDecalParams_Stage2_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp7 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage2_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c0_c0.xy, uTexDom_Stage2_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c0_c0.y);
+ if (err > uDecalParams_Stage2_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp8 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = normalize(uLightLocation_Stage2_c0_c0 - vec3(gl_FragCoord.xy, uSurfaceScale_Stage2_c0_c0 * m[4]));
+ _output = light_Stage2_c0_c0(normal_Stage2_c0_c0(m, uSurfaceScale_Stage2_c0_c0), surfaceToLight, uLightColor_Stage2_c0_c0);
+ _output *= _input;
+ return _output;
+}
+vec4 GaussianConvolution_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_2_Stage0 - 12.0 * uImageIncrement_Stage2_c1_c0;
+ vec2 coordSampled = vec2(0.0, 0.0);
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage2_c1_c0.x, uBounds_Stage2_c1_c0.y - uBounds_Stage2_c1_c0.x) + uBounds_Stage2_c1_c0.x;
+ _output += texture(uTextureSampler_1_Stage2, coordSampled) * uKernel_Stage2_c1_c0[0].x;
+ coord += uImageIncrement_Stage2_c1_c0;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage2_c1_c0.x, uBounds_Stage2_c1_c0.y - uBounds_Stage2_c1_c0.x) + uBounds_Stage2_c1_c0.x;
+ _output += texture(uTextureSampler_1_Stage2, coordSampled) * uKernel_Stage2_c1_c0[0].y;
+ coord += uImageIncrement_Stage2_c1_c0;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage2_c1_c0.x, uBounds_Stage2_c1_c0.y - uBounds_Stage2_c1_c0.x) + uBounds_Stage2_c1_c0.x;
+ _output += texture(uTextureSampler_1_Stage2, coordSampled) * uKernel_Stage2_c1_c0[0].z;
+ coord += uImageIncrement_Stage2_c1_c0;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage2_c1_c0.x, uBounds_Stage2_c1_c0.y - uBounds_Stage2_c1_c0.x) + uBounds_Stage2_c1_c0.x;
+ _output += texture(uTextureSampler_1_Stage2, coordSampled) * uKernel_Stage2_c1_c0[0].w;
+ coord += uImageIncrement_Stage2_c1_c0;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage2_c1_c0.x, uBounds_Stage2_c1_c0.y - uBounds_Stage2_c1_c0.x) + uBounds_Stage2_c1_c0.x;
+ _output += texture(uTextureSampler_1_Stage2, coordSampled) * uKernel_Stage2_c1_c0[1].x;
+ coord += uImageIncrement_Stage2_c1_c0;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage2_c1_c0.x, uBounds_Stage2_c1_c0.y - uBounds_Stage2_c1_c0.x) + uBounds_Stage2_c1_c0.x;
+ _output += texture(uTextureSampler_1_Stage2, coordSampled) * uKernel_Stage2_c1_c0[1].y;
+ coord += uImageIncrement_Stage2_c1_c0;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage2_c1_c0.x, uBounds_Stage2_c1_c0.y - uBounds_Stage2_c1_c0.x) + uBounds_Stage2_c1_c0.x;
+ _output += texture(uTextureSampler_1_Stage2, coordSampled) * uKernel_Stage2_c1_c0[1].z;
+ coord += uImageIncrement_Stage2_c1_c0;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage2_c1_c0.x, uBounds_Stage2_c1_c0.y - uBounds_Stage2_c1_c0.x) + uBounds_Stage2_c1_c0.x;
+ _output += texture(uTextureSampler_1_Stage2, coordSampled) * uKernel_Stage2_c1_c0[1].w;
+ coord += uImageIncrement_Stage2_c1_c0;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage2_c1_c0.x, uBounds_Stage2_c1_c0.y - uBounds_Stage2_c1_c0.x) + uBounds_Stage2_c1_c0.x;
+ _output += texture(uTextureSampler_1_Stage2, coordSampled) * uKernel_Stage2_c1_c0[2].x;
+ coord += uImageIncrement_Stage2_c1_c0;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage2_c1_c0.x, uBounds_Stage2_c1_c0.y - uBounds_Stage2_c1_c0.x) + uBounds_Stage2_c1_c0.x;
+ _output += texture(uTextureSampler_1_Stage2, coordSampled) * uKernel_Stage2_c1_c0[2].y;
+ coord += uImageIncrement_Stage2_c1_c0;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage2_c1_c0.x, uBounds_Stage2_c1_c0.y - uBounds_Stage2_c1_c0.x) + uBounds_Stage2_c1_c0.x;
+ _output += texture(uTextureSampler_1_Stage2, coordSampled) * uKernel_Stage2_c1_c0[2].z;
+ coord += uImageIncrement_Stage2_c1_c0;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage2_c1_c0.x, uBounds_Stage2_c1_c0.y - uBounds_Stage2_c1_c0.x) + uBounds_Stage2_c1_c0.x;
+ _output += texture(uTextureSampler_1_Stage2, coordSampled) * uKernel_Stage2_c1_c0[2].w;
+ coord += uImageIncrement_Stage2_c1_c0;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage2_c1_c0.x, uBounds_Stage2_c1_c0.y - uBounds_Stage2_c1_c0.x) + uBounds_Stage2_c1_c0.x;
+ _output += texture(uTextureSampler_1_Stage2, coordSampled) * uKernel_Stage2_c1_c0[3].x;
+ coord += uImageIncrement_Stage2_c1_c0;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage2_c1_c0.x, uBounds_Stage2_c1_c0.y - uBounds_Stage2_c1_c0.x) + uBounds_Stage2_c1_c0.x;
+ _output += texture(uTextureSampler_1_Stage2, coordSampled) * uKernel_Stage2_c1_c0[3].y;
+ coord += uImageIncrement_Stage2_c1_c0;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage2_c1_c0.x, uBounds_Stage2_c1_c0.y - uBounds_Stage2_c1_c0.x) + uBounds_Stage2_c1_c0.x;
+ _output += texture(uTextureSampler_1_Stage2, coordSampled) * uKernel_Stage2_c1_c0[3].z;
+ coord += uImageIncrement_Stage2_c1_c0;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage2_c1_c0.x, uBounds_Stage2_c1_c0.y - uBounds_Stage2_c1_c0.x) + uBounds_Stage2_c1_c0.x;
+ _output += texture(uTextureSampler_1_Stage2, coordSampled) * uKernel_Stage2_c1_c0[3].w;
+ coord += uImageIncrement_Stage2_c1_c0;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage2_c1_c0.x, uBounds_Stage2_c1_c0.y - uBounds_Stage2_c1_c0.x) + uBounds_Stage2_c1_c0.x;
+ _output += texture(uTextureSampler_1_Stage2, coordSampled) * uKernel_Stage2_c1_c0[4].x;
+ coord += uImageIncrement_Stage2_c1_c0;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage2_c1_c0.x, uBounds_Stage2_c1_c0.y - uBounds_Stage2_c1_c0.x) + uBounds_Stage2_c1_c0.x;
+ _output += texture(uTextureSampler_1_Stage2, coordSampled) * uKernel_Stage2_c1_c0[4].y;
+ coord += uImageIncrement_Stage2_c1_c0;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage2_c1_c0.x, uBounds_Stage2_c1_c0.y - uBounds_Stage2_c1_c0.x) + uBounds_Stage2_c1_c0.x;
+ _output += texture(uTextureSampler_1_Stage2, coordSampled) * uKernel_Stage2_c1_c0[4].z;
+ coord += uImageIncrement_Stage2_c1_c0;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage2_c1_c0.x, uBounds_Stage2_c1_c0.y - uBounds_Stage2_c1_c0.x) + uBounds_Stage2_c1_c0.x;
+ _output += texture(uTextureSampler_1_Stage2, coordSampled) * uKernel_Stage2_c1_c0[4].w;
+ coord += uImageIncrement_Stage2_c1_c0;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage2_c1_c0.x, uBounds_Stage2_c1_c0.y - uBounds_Stage2_c1_c0.x) + uBounds_Stage2_c1_c0.x;
+ _output += texture(uTextureSampler_1_Stage2, coordSampled) * uKernel_Stage2_c1_c0[5].x;
+ coord += uImageIncrement_Stage2_c1_c0;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage2_c1_c0.x, uBounds_Stage2_c1_c0.y - uBounds_Stage2_c1_c0.x) + uBounds_Stage2_c1_c0.x;
+ _output += texture(uTextureSampler_1_Stage2, coordSampled) * uKernel_Stage2_c1_c0[5].y;
+ coord += uImageIncrement_Stage2_c1_c0;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage2_c1_c0.x, uBounds_Stage2_c1_c0.y - uBounds_Stage2_c1_c0.x) + uBounds_Stage2_c1_c0.x;
+ _output += texture(uTextureSampler_1_Stage2, coordSampled) * uKernel_Stage2_c1_c0[5].z;
+ coord += uImageIncrement_Stage2_c1_c0;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage2_c1_c0.x, uBounds_Stage2_c1_c0.y - uBounds_Stage2_c1_c0.x) + uBounds_Stage2_c1_c0.x;
+ _output += texture(uTextureSampler_1_Stage2, coordSampled) * uKernel_Stage2_c1_c0[5].w;
+ coord += uImageIncrement_Stage2_c1_c0;
+ coordSampled = coord;
+ coordSampled.y = mod(coord.y - uBounds_Stage2_c1_c0.x, uBounds_Stage2_c1_c0.y - uBounds_Stage2_c1_c0.x) + uBounds_Stage2_c1_c0.x;
+ _output += texture(uTextureSampler_1_Stage2, coordSampled) * uKernel_Stage2_c1_c0[6].x;
+ coord += uImageIncrement_Stage2_c1_c0;
+ _output *= _input;
+ return _output;
+}
+vec4 blend_exclusion(vec4 src, vec4 dst) {
+ return vec4((dst.xyz + src.xyz) - (2.0 * dst.xyz) * src.xyz, src.w + (1.0 - src.w) * dst.w);
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ float edgeAlpha;
+ vec2 duvdx = dFdx(vQuadEdge_Stage0.xy);
+ vec2 duvdy = -dFdy(vQuadEdge_Stage0.xy);
+ if (vQuadEdge_Stage0.z > 0.0 && vQuadEdge_Stage0.w > 0.0) {
+ edgeAlpha = min(min(vQuadEdge_Stage0.z, vQuadEdge_Stage0.w) + 0.5, 1.0);
+ } else {
+ vec2 gF = vec2((2.0 * vQuadEdge_Stage0.x) * duvdx.x - duvdx.y, (2.0 * vQuadEdge_Stage0.x) * duvdy.x - duvdy.y);
+ edgeAlpha = vQuadEdge_Stage0.x * vQuadEdge_Stage0.x - vQuadEdge_Stage0.y;
+ edgeAlpha = clamp(0.5 - edgeAlpha / length(gF), 0.0, 1.0);
+ }
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ vec4 output_Stage1;
+ {
+ vec2 coord = vTransformedCoords_0_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp0 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp5 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp6 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp7 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp8 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = uLightDirection_Stage1;
+ output_Stage1 = light_Stage1(normal_Stage1(m, uSurfaceScale_Stage1), surfaceToLight, uLightColor_Stage1);
+ output_Stage1 *= outputCoverage_Stage0;
+ }
+ vec4 output_Stage2;
+ {
+ vec4 inputColor = vec4(output_Stage1.xyz, 1.0);
+ output_Stage2 = blend_exclusion(DiffuseLighting_Stage2_c0_c0(inputColor), GaussianConvolution_Stage2_c1_c0(inputColor));
+ output_Stage2 *= output_Stage1.w;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec4 inQuadEdge;
+noperspective out vec4 vQuadEdge_Stage0;
+noperspective out vec4 vinColor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+void main() {
+ vQuadEdge_Stage0 = inQuadEdge;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/700.shader_test b/shaders/skia/700.shader_test
new file mode 100644
index 0000000..fb201ae
--- /dev/null
+++ b/shaders/skia/700.shader_test
@@ -0,0 +1,107 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 ucolor_Stage1_c0_c0_c0_c0;
+uniform vec4 ucolor_Stage2;
+uniform vec4 ucolor_Stage3_c1_c0;
+noperspective in vec4 vcolor_Stage0;
+vec4 ConstColorProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = _input.w * ucolor_Stage1_c0_c0_c0_c0;
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = ConstColorProcessor_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 ConstColorProcessor_Stage3_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage3_c1_c0;
+ }
+ return _output;
+}
+float _blend_color_luminance(vec3 color) {
+ return dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), color);
+}
+vec3 _blend_set_color_luminance(vec3 hueSatColor, float alpha, vec3 lumColor) {
+ float lum = _blend_color_luminance(lumColor);
+ vec3 result = (lum - _blend_color_luminance(hueSatColor)) + hueSatColor;
+ float minComp = min(min(result.x, result.y), result.z);
+ float maxComp = max(max(result.x, result.y), result.z);
+ if (minComp < 0.0 && lum != minComp) {
+ result = lum + ((result - lum) * lum) / (lum - minComp);
+ }
+ if (maxComp > alpha && maxComp != lum) {
+ return lum + ((result - lum) * (alpha - lum)) / (maxComp - lum);
+ }
+ return result;
+}
+vec4 blend_luminosity(vec4 src, vec4 dst) {
+ float alpha = dst.w * src.w;
+ vec3 sda = src.xyz * dst.w;
+ vec3 dsa = dst.xyz * src.w;
+ return vec4((((_blend_set_color_luminance(dsa, alpha, sda) + dst.xyz) - dsa) + src.xyz) - sda, (src.w + dst.w) - alpha);
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 blend_darken(vec4 src, vec4 dst) {
+ vec4 result = blend_src_over(src, dst);
+ result.xyz = min(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
+ return result;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_luminosity(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ {
+ output_Stage2 = output_Stage1 * ucolor_Stage2;
+ }
+ }
+ vec4 output_Stage3;
+ {
+ output_Stage3 = blend_darken(ConstColorProcessor_Stage3_c1_c0(vec4(1.0)), output_Stage2);
+ }
+ {
+ sk_FragColor = output_Stage3;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 position;
+in vec4 inColor;
+noperspective out vec4 vcolor_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/706.shader_test b/shaders/skia/706.shader_test
new file mode 100644
index 0000000..2911fdd
--- /dev/null
+++ b/shaders/skia/706.shader_test
@@ -0,0 +1,150 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 ucircleData_Stage1;
+uniform vec4 ustart_Stage2_c0_c0_c1_c0;
+uniform vec4 uend_Stage2_c0_c0_c1_c0;
+uniform vec4 uleftBorderColor_Stage3_c1_c0;
+uniform vec4 urightBorderColor_Stage3_c1_c0;
+uniform vec4 uscale0_1_Stage3_c1_c0_c1_c0;
+uniform vec4 uscale2_3_Stage3_c1_c0_c1_c0;
+uniform vec4 uscale4_5_Stage3_c1_c0_c1_c0;
+uniform vec4 uscale6_7_Stage3_c1_c0_c1_c0;
+uniform vec4 ubias0_1_Stage3_c1_c0_c1_c0;
+uniform vec4 ubias2_3_Stage3_c1_c0_c1_c0;
+uniform vec4 ubias4_5_Stage3_c1_c0_c1_c0;
+uniform vec4 ubias6_7_Stage3_c1_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage3_c1_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage3_c1_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 LinearGradientLayout_Stage2_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage2_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage2_c0_c0_c1_c0 + t * uend_Stage2_c0_c0_c1_c0;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage2_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ t.x = fract(t.x);
+ }
+ _output = SingleIntervalGradientColorizer_Stage2_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 LinearGradientLayout_Stage3_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_1_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage3_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage3_c1_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage3_c1_c0_c1_c0.x) {
+ scale = uscale0_1_Stage3_c1_c0_c1_c0;
+ bias = ubias0_1_Stage3_c1_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage3_c1_c0_c1_c0;
+ bias = ubias2_3_Stage3_c1_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage3_c1_c0_c1_c0.z) {
+ scale = uscale4_5_Stage3_c1_c0_c1_c0;
+ bias = ubias4_5_Stage3_c1_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage3_c1_c0_c1_c0;
+ bias = ubias6_7_Stage3_c1_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage3_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage3_c1_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage3_c1_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage3_c1_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage3_c1_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec2 vec = vec2((gl_FragCoord.x - ucircleData_Stage1.x) * ucircleData_Stage1.w, (gl_FragCoord.y - ucircleData_Stage1.y) * ucircleData_Stage1.w);
+ float dist = length(vec) + (0.5 - ucircleData_Stage1.z) * ucircleData_Stage1.w;
+ output_Stage1 = outputColor_Stage0 * texture(uTextureSampler_0_Stage1, vec2(dist, 0.5)).w;
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_dst_in(vec4(1.0), TiledGradientEffect_Stage2_c0_c0(vec4(1.0)));
+ }
+ vec4 output_Stage3;
+ {
+ output_Stage3 = blend_dst_in(output_Stage2, ClampedGradientEffect_Stage3_c1_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage1 * output_Stage3;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vec4 color = inColor;
+ vcolor_Stage0 = color;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/709.shader_test b/shaders/skia/709.shader_test
new file mode 100644
index 0000000..7fa831e
--- /dev/null
+++ b/shaders/skia/709.shader_test
@@ -0,0 +1,724 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_KHR_blend_equation_advanced : require
+out vec4 sk_FragColor;
+layout (blend_support_all_equations) out ;
+uniform float ucornerRadius_Stage1_c0_c0_c0_c0_c0_c0;
+uniform vec4 uproxyRect_Stage1_c0_c0_c0_c0_c0_c0;
+uniform float ublurRadius_Stage1_c0_c0_c0_c0_c0_c0;
+uniform vec2 uImageIncrement_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 uKernel_Stage1_c0_c0_c0_c0_c1_c0[4];
+uniform vec2 uKernelOffset_Stage1_c0_c0_c0_c0_c1_c0;
+uniform float uGain_Stage1_c0_c0_c0_c0_c1_c0;
+uniform float uBias_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec2 uImageIncrement_Stage1_c0_c0_c1_c0_c0_c0;
+uniform float uSurfaceScale_Stage1_c0_c0_c1_c0_c0_c0;
+uniform vec3 uLightColor_Stage1_c0_c0_c1_c0_c0_c0;
+uniform float uKS_Stage1_c0_c0_c1_c0_c0_c0;
+uniform float uShininess_Stage1_c0_c0_c1_c0_c0_c0;
+uniform vec4 uTexDom_Stage1_c0_c0_c1_c0_c0_c0;
+uniform vec3 uDecalParams_Stage1_c0_c0_c1_c0_c0_c0;
+uniform vec3 uLightLocation_Stage1_c0_c0_c1_c0_c0_c0;
+uniform float uPixelSize_Stage1_c0_c0_c1_c0_c1_c0;
+uniform vec2 uRange_Stage1_c0_c0_c1_c0_c1_c0;
+uniform vec4 ucolor0_Stage1_c1_c0_c0_c0_c0_c0;
+uniform vec4 ucolor1_Stage1_c1_c0_c0_c0_c0_c0;
+uniform vec4 ucolor2_Stage1_c1_c0_c0_c0_c0_c0;
+uniform vec4 ucolor3_Stage1_c1_c0_c0_c0_c0_c0;
+uniform vec4 ucolor4_Stage1_c1_c0_c0_c0_c0_c0;
+uniform vec4 ucolor5_Stage1_c1_c0_c0_c0_c0_c0;
+uniform vec2 uImageIncrement_Stage1_c1_c0_c0_c0_c1_c0;
+uniform float uSurfaceScale_Stage1_c1_c0_c0_c0_c1_c0;
+uniform vec3 uLightColor_Stage1_c1_c0_c0_c0_c1_c0;
+uniform float uKS_Stage1_c1_c0_c0_c0_c1_c0;
+uniform float uShininess_Stage1_c1_c0_c0_c0_c1_c0;
+uniform vec4 uTexDom_Stage1_c1_c0_c0_c0_c1_c0;
+uniform vec3 uDecalParams_Stage1_c1_c0_c0_c0_c1_c0;
+uniform vec3 uLightDirection_Stage1_c1_c0_c0_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+uniform sampler2D uTextureSampler_2_Stage1;
+uniform sampler2D uTextureSampler_3_Stage1;
+uniform sampler2D uTextureSampler_4_Stage1;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+noperspective in vec2 vTransformedCoords_3_Stage0;
+noperspective in vec2 vTransformedCoords_4_Stage0;
+noperspective in vec2 vTransformedCoords_5_Stage0;
+vec4 RRectBlurEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 translatedFragPos = gl_FragCoord.xy - uproxyRect_Stage1_c0_c0_c0_c0_c0_c0.xy;
+ float threshold = ucornerRadius_Stage1_c0_c0_c0_c0_c0_c0 + 2.0 * ublurRadius_Stage1_c0_c0_c0_c0_c0_c0;
+ vec2 middle = (uproxyRect_Stage1_c0_c0_c0_c0_c0_c0.zw - uproxyRect_Stage1_c0_c0_c0_c0_c0_c0.xy) - 2.0 * threshold;
+ if (translatedFragPos.x >= threshold && translatedFragPos.x < middle.x + threshold) {
+ translatedFragPos.x = threshold;
+ } else if (translatedFragPos.x >= middle.x + threshold) {
+ translatedFragPos.x -= middle.x - 1.0;
+ }
+ if (translatedFragPos.y > threshold && translatedFragPos.y < middle.y + threshold) {
+ translatedFragPos.y = threshold;
+ } else if (translatedFragPos.y >= middle.y + threshold) {
+ translatedFragPos.y -= middle.y - 1.0;
+ }
+ vec2 proxyDims = vec2(2.0 * threshold + 1.0);
+ vec2 texCoord = translatedFragPos / proxyDims;
+ _output = _input * texture(uTextureSampler_0_Stage1, texCoord);
+ return _output;
+}
+vec4 MatrixConvolution_Stage1_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 sum = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0 - uKernelOffset_Stage1_c0_c0_c0_c0_c1_c0 * uImageIncrement_Stage1_c0_c0_c0_c0_c1_c0;
+ vec4 c;
+ {
+ float k = uKernel_Stage1_c0_c0_c0_c0_c1_c0[0].x;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c0_c0_c1_c0[0].y;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1_c0_c0_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c0_c0_c1_c0[0].z;
+ {
+ vec2 origCoord = coord + vec2(2.0, 0.0) * uImageIncrement_Stage1_c0_c0_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c0_c0_c1_c0[0].w;
+ {
+ vec2 origCoord = coord + vec2(3.0, 0.0) * uImageIncrement_Stage1_c0_c0_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c0_c0_c1_c0[1].x;
+ {
+ vec2 origCoord = coord + vec2(4.0, 0.0) * uImageIncrement_Stage1_c0_c0_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c0_c0_c1_c0[1].y;
+ {
+ vec2 origCoord = coord + vec2(5.0, 0.0) * uImageIncrement_Stage1_c0_c0_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c0_c0_c1_c0[1].z;
+ {
+ vec2 origCoord = coord + vec2(6.0, 0.0) * uImageIncrement_Stage1_c0_c0_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c0_c0_c1_c0[1].w;
+ {
+ vec2 origCoord = coord + vec2(7.0, 0.0) * uImageIncrement_Stage1_c0_c0_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c0_c0_c1_c0[2].x;
+ {
+ vec2 origCoord = coord + vec2(8.0, 0.0) * uImageIncrement_Stage1_c0_c0_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c0_c0_c1_c0[2].y;
+ {
+ vec2 origCoord = coord + vec2(9.0, 0.0) * uImageIncrement_Stage1_c0_c0_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c0_c0_c1_c0[2].z;
+ {
+ vec2 origCoord = coord + vec2(10.0, 0.0) * uImageIncrement_Stage1_c0_c0_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c0_c0_c1_c0[2].w;
+ {
+ vec2 origCoord = coord + vec2(11.0, 0.0) * uImageIncrement_Stage1_c0_c0_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c0_c0_c1_c0[3].x;
+ {
+ vec2 origCoord = coord + vec2(12.0, 0.0) * uImageIncrement_Stage1_c0_c0_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c0_c0_c1_c0[3].y;
+ {
+ vec2 origCoord = coord + vec2(13.0, 0.0) * uImageIncrement_Stage1_c0_c0_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c0_c0_c1_c0[3].z;
+ {
+ vec2 origCoord = coord + vec2(14.0, 0.0) * uImageIncrement_Stage1_c0_c0_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c0_c0_c1_c0[3].w;
+ {
+ vec2 origCoord = coord + vec2(15.0, 0.0) * uImageIncrement_Stage1_c0_c0_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ _output = sum * uGain_Stage1_c0_c0_c0_c0_c1_c0 + uBias_Stage1_c0_c0_c0_c0_c1_c0;
+ _output.w = clamp(_output.w, 0.0, 1.0);
+ _output.xyz = clamp(_output.xyz, 0.0, _output.w);
+ _output *= _input;
+ return _output;
+}
+vec4 blend_screen(vec4 src, vec4 dst) {
+ return src + (1.0 - src) * dst;
+}
+vec4 ComposeTwo_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_screen(RRectBlurEffect_Stage1_c0_c0_c0_c0_c0_c0(inputColor), MatrixConvolution_Stage1_c0_c0_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 light_Stage1_c0_c0_c1_c0_c0_c0(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ vec3 halfDir = normalize(surfaceToLight + vec3(0.0, 0.0, 1.0));
+ float colorScale = uKS_Stage1_c0_c0_c1_c0_c0_c0 * pow(dot(normal, halfDir), uShininess_Stage1_c0_c0_c1_c0_c0_c0);
+ vec3 color = lightColor * clamp(colorScale, 0.0, 1.0);
+ return vec4(color, max(max(color.x, color.y), color.z));
+}
+float sobel_Stage1_c0_c0_c1_c0_c0_c0(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage1_c0_c0_c1_c0_c0_c0(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage1_c0_c0_c1_c0_c0_c0(float m[9], float surfaceScale) {
+ return pointToNormal_Stage1_c0_c0_c1_c0_c0_c0(sobel_Stage1_c0_c0_c1_c0_c0_c0(0.0, 0.0, m[3], m[5], m[6], m[8], 0.33333298563957214), sobel_Stage1_c0_c0_c1_c0_c0_c0(0.0, 0.0, m[4], m[7], m[5], m[8], 0.5), surfaceScale);
+}
+vec4 SpecularLighting_Stage1_c0_c0_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coord = vTransformedCoords_1_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage1_c0_c0_c1_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c1_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c1_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c1_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c1_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c1_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c1_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp0 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1_c0_c0_c1_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c1_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c1_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c1_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c1_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c1_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c1_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1_c0_c0_c1_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c1_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c1_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c1_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c1_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c1_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c1_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage1_c0_c0_c1_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c1_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c1_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c1_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c1_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c1_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c1_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c1_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c1_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c1_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c1_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c1_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c1_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1_c0_c0_c1_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c1_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c1_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c1_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c1_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c1_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c1_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp5 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage1_c0_c0_c1_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c1_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c1_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c1_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c1_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c1_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c1_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp6 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage1_c0_c0_c1_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c1_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c1_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c1_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c1_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c1_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c1_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp7 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage1_c0_c0_c1_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c1_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c1_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c1_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c1_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c1_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c1_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp8 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = normalize(uLightLocation_Stage1_c0_c0_c1_c0_c0_c0 - vec3(gl_FragCoord.xy, uSurfaceScale_Stage1_c0_c0_c1_c0_c0_c0 * m[4]));
+ _output = light_Stage1_c0_c0_c1_c0_c0_c0(normal_Stage1_c0_c0_c1_c0_c0_c0(m, uSurfaceScale_Stage1_c0_c0_c1_c0_c0_c0), surfaceToLight, uLightColor_Stage1_c0_c0_c1_c0_c0_c0);
+ _output *= _input;
+ return _output;
+}
+vec4 Morphology_Stage1_c0_c0_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_2_Stage0;
+ coord.y -= uPixelSize_Stage1_c0_c0_c1_c0_c1_c0;
+ for (int i = 0;i < 3; i++) {
+ _output = max(_output, texture(uTextureSampler_3_Stage1, coord));
+ coord.y += uPixelSize_Stage1_c0_c0_c1_c0_c1_c0;
+ }
+ _output *= _input;
+ return _output;
+}
+vec4 blend_xor(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src + (1.0 - src.w) * dst;
+}
+vec4 ComposeTwo_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_xor(SpecularLighting_Stage1_c0_c0_c1_c0_c0_c0(inputColor), Morphology_Stage1_c0_c0_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 blend_src_out(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src;
+}
+vec4 ComposeTwo_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_src_out(ComposeTwo_Stage1_c0_c0_c0_c0(inputColor), ComposeTwo_Stage1_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 Overdraw_Stage1_c1_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = _input;
+ float alpha = 255.0 * _output.w;
+ if (alpha < 0.5) {
+ _output = ucolor0_Stage1_c1_c0_c0_c0_c0_c0;
+ } else if (alpha < 1.5) {
+ _output = ucolor1_Stage1_c1_c0_c0_c0_c0_c0;
+ } else if (alpha < 2.5) {
+ _output = ucolor2_Stage1_c1_c0_c0_c0_c0_c0;
+ } else if (alpha < 3.5) {
+ _output = ucolor3_Stage1_c1_c0_c0_c0_c0_c0;
+ } else if (alpha < 4.5) {
+ _output = ucolor4_Stage1_c1_c0_c0_c0_c0_c0;
+ } else {
+ _output = ucolor5_Stage1_c1_c0_c0_c0_c0_c0;
+ }
+ return _output;
+}
+vec4 light_Stage1_c1_c0_c0_c0_c1_c0(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ vec3 halfDir = normalize(surfaceToLight + vec3(0.0, 0.0, 1.0));
+ float colorScale = uKS_Stage1_c1_c0_c0_c0_c1_c0 * pow(dot(normal, halfDir), uShininess_Stage1_c1_c0_c0_c0_c1_c0);
+ vec3 color = lightColor * clamp(colorScale, 0.0, 1.0);
+ return vec4(color, max(max(color.x, color.y), color.z));
+}
+float sobel_Stage1_c1_c0_c0_c0_c1_c0(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage1_c1_c0_c0_c0_c1_c0(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage1_c1_c0_c0_c0_c1_c0(float m[9], float surfaceScale) {
+ return pointToNormal_Stage1_c1_c0_c0_c0_c1_c0(sobel_Stage1_c1_c0_c0_c0_c1_c0(m[0], m[2], m[3], m[5], 0.0, 0.0, 0.33333298563957214), sobel_Stage1_c1_c0_c0_c0_c1_c0(m[0], m[3], m[1], m[4], m[2], m[5], 0.5), surfaceScale);
+}
+vec4 SpecularLighting_Stage1_c1_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coord = vTransformedCoords_4_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage1_c1_c0_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0_c1_c0.xy, uTexDom_Stage1_c1_c0_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_4_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp0 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1_c1_c0_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0_c1_c0.xy, uTexDom_Stage1_c1_c0_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_4_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1_c1_c0_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0_c1_c0.xy, uTexDom_Stage1_c1_c0_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_4_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage1_c1_c0_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0_c1_c0.xy, uTexDom_Stage1_c1_c0_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_4_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0_c1_c0.xy, uTexDom_Stage1_c1_c0_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_4_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1_c1_c0_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0_c1_c0.xy, uTexDom_Stage1_c1_c0_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_4_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp5 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage1_c1_c0_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0_c1_c0.xy, uTexDom_Stage1_c1_c0_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_4_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp6 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage1_c1_c0_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0_c1_c0.xy, uTexDom_Stage1_c1_c0_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_4_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp7 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage1_c1_c0_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0_c1_c0.xy, uTexDom_Stage1_c1_c0_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_4_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp8 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = uLightDirection_Stage1_c1_c0_c0_c0_c1_c0;
+ _output = light_Stage1_c1_c0_c0_c0_c1_c0(normal_Stage1_c1_c0_c0_c0_c1_c0(m, uSurfaceScale_Stage1_c1_c0_c0_c0_c1_c0), surfaceToLight, uLightColor_Stage1_c1_c0_c0_c0_c1_c0);
+ _output *= _input;
+ return _output;
+}
+vec4 ComposeTwo_Stage1_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_src_out(Overdraw_Stage1_c1_c0_c0_c0_c0_c0(inputColor), SpecularLighting_Stage1_c1_c0_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 Dither_Stage1_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = _input;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_5_Stage0.x);
+ uint y = uint(vTransformedCoords_5_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ _output = vec4(clamp(_output.xyz + value * 0.0039215688593685627, 0.0, _output.w), _output.w);
+ return _output;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 blend_lighten(vec4 src, vec4 dst) {
+ vec4 result = blend_src_over(src, dst);
+ result.xyz = max(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
+ return result;
+}
+vec4 ComposeTwo_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_lighten(ComposeTwo_Stage1_c1_c0_c0_c0(inputColor), Dither_Stage1_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_lighten(ComposeTwo_Stage1_c0_c0(inputColor), ComposeTwo_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+uniform mat3 uCoordTransformMatrix_3_Stage0;
+uniform mat3 uCoordTransformMatrix_4_Stage0;
+uniform mat3 uCoordTransformMatrix_5_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+noperspective out vec2 vTransformedCoords_3_Stage0;
+noperspective out vec2 vTransformedCoords_4_Stage0;
+noperspective out vec2 vTransformedCoords_5_Stage0;
+void main() {
+ vec4 color = inColor;
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_3_Stage0 = (uCoordTransformMatrix_3_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_4_Stage0 = (uCoordTransformMatrix_4_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_5_Stage0 = (uCoordTransformMatrix_5_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/712.shader_test b/shaders/skia/712.shader_test
new file mode 100644
index 0000000..ddc4025
--- /dev/null
+++ b/shaders/skia/712.shader_test
@@ -0,0 +1,325 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_KHR_blend_equation_advanced : require
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+layout (blend_support_all_equations) out ;
+uniform vec2 uImageIncrement_Stage1_c0_c0;
+uniform float uSurfaceScale_Stage1_c0_c0;
+uniform vec3 uLightColor_Stage1_c0_c0;
+uniform float uKS_Stage1_c0_c0;
+uniform float uShininess_Stage1_c0_c0;
+uniform vec4 uTexDom_Stage1_c0_c0;
+uniform vec3 uDecalParams_Stage1_c0_c0;
+uniform vec3 uLightDirection_Stage1_c0_c0;
+uniform vec4 uellipse_Stage1_c1_c0_c0_c0;
+uniform vec4 uboundsUniform_Stage1_c1_c0_c1_c0;
+uniform float uxInvZoom_Stage1_c1_c0_c1_c0;
+uniform float uyInvZoom_Stage1_c1_c0_c1_c0;
+uniform float uxInvInset_Stage1_c1_c0_c1_c0;
+uniform float uyInvInset_Stage1_c1_c0_c1_c0;
+uniform vec2 uoffset_Stage1_c1_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 light_Stage1_c0_c0(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ vec3 halfDir = normalize(surfaceToLight + vec3(0.0, 0.0, 1.0));
+ float colorScale = uKS_Stage1_c0_c0 * pow(dot(normal, halfDir), uShininess_Stage1_c0_c0);
+ vec3 color = lightColor * clamp(colorScale, 0.0, 1.0);
+ return vec4(color, max(max(color.x, color.y), color.z));
+}
+float sobel_Stage1_c0_c0(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage1_c0_c0(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage1_c0_c0(float m[9], float surfaceScale) {
+ return pointToNormal_Stage1_c0_c0(sobel_Stage1_c0_c0(m[0], m[2], m[3], m[5], m[6], m[8], 0.25), sobel_Stage1_c0_c0(m[0], m[6], m[1], m[7], m[2], m[8], 0.25), surfaceScale);
+}
+vec4 SpecularLighting_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coord = vTransformedCoords_0_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage1_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0.xy, uTexDom_Stage1_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp0 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0.xy, uTexDom_Stage1_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0.xy, uTexDom_Stage1_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage1_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0.xy, uTexDom_Stage1_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0.xy, uTexDom_Stage1_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0.xy, uTexDom_Stage1_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp5 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage1_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0.xy, uTexDom_Stage1_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp6 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage1_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0.xy, uTexDom_Stage1_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp7 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage1_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0.xy, uTexDom_Stage1_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp8 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = uLightDirection_Stage1_c0_c0;
+ _output = light_Stage1_c0_c0(normal_Stage1_c0_c0(m, uSurfaceScale_Stage1_c0_c0), surfaceToLight, uLightColor_Stage1_c0_c0);
+ _output *= _input;
+ return _output;
+}
+vec4 EllipseEffect_Stage1_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 d = gl_FragCoord.xy - uellipse_Stage1_c1_c0_c0_c0.xy;
+ vec2 Z = d * uellipse_Stage1_c1_c0_c0_c0.zw;
+ float implicit = dot(Z, d) - 1.0;
+ float grad_dot = 4.0 * dot(Z, Z);
+ {
+ grad_dot = max(grad_dot, 1.1754999560161448e-38);
+ }
+ float approx_dist = implicit * inversesqrt(grad_dot);
+ float alpha;
+ {
+ alpha = approx_dist > 0.0 ? 0.0 : 1.0;
+ }
+ _output = _input * alpha;
+ return _output;
+}
+vec4 MagnifierEffect_Stage1_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coord = vTransformedCoords_1_Stage0;
+ vec2 zoom_coord = uoffset_Stage1_c1_c0_c1_c0 + coord * vec2(uxInvZoom_Stage1_c1_c0_c1_c0, uyInvZoom_Stage1_c1_c0_c1_c0);
+ vec2 delta = (coord - uboundsUniform_Stage1_c1_c0_c1_c0.xy) * uboundsUniform_Stage1_c1_c0_c1_c0.zw;
+ delta = min(delta, vec2(1.0, 1.0) - delta);
+ delta *= vec2(uxInvInset_Stage1_c1_c0_c1_c0, uyInvInset_Stage1_c1_c0_c1_c0);
+ float weight = 0.0;
+ if (delta.x < 2.0 && delta.y < 2.0) {
+ delta = vec2(2.0, 2.0) - delta;
+ float dist = length(delta);
+ dist = max(2.0 - dist, 0.0);
+ weight = min(dist * dist, 1.0);
+ } else {
+ vec2 delta_squared = delta * delta;
+ weight = min(min(delta_squared.x, delta_squared.y), 1.0);
+ }
+ _output = texture(uTextureSampler_1_Stage1, mix(coord, zoom_coord, weight));
+ return _output;
+}
+float _blend_color_saturation(vec3 color) {
+ return max(max(color.x, color.y), color.z) - min(min(color.x, color.y), color.z);
+}
+vec3 _blend_set_color_saturation_helper(vec3 minMidMax, float sat) {
+ if (minMidMax.x < minMidMax.z) {
+ return vec3(0.0, (sat * (minMidMax.y - minMidMax.x)) / (minMidMax.z - minMidMax.x), sat);
+ }
+ return vec3(0.0);
+}
+vec3 _blend_set_color_saturation(vec3 hueLumColor, vec3 satColor) {
+ float sat = _blend_color_saturation(satColor);
+ if (hueLumColor.x <= hueLumColor.y) {
+ if (hueLumColor.y <= hueLumColor.z) {
+ hueLumColor.xyz = _blend_set_color_saturation_helper(hueLumColor, sat);
+ } else if (hueLumColor.x <= hueLumColor.z) {
+ hueLumColor.xzy = _blend_set_color_saturation_helper(hueLumColor.xzy, sat);
+ } else {
+ hueLumColor.zxy = _blend_set_color_saturation_helper(hueLumColor.zxy, sat);
+ }
+ } else if (hueLumColor.x <= hueLumColor.z) {
+ hueLumColor.yxz = _blend_set_color_saturation_helper(hueLumColor.yxz, sat);
+ } else if (hueLumColor.y <= hueLumColor.z) {
+ hueLumColor.yzx = _blend_set_color_saturation_helper(hueLumColor.yzx, sat);
+ } else {
+ hueLumColor.zyx = _blend_set_color_saturation_helper(hueLumColor.zyx, sat);
+ }
+ return hueLumColor;
+}
+float _blend_color_luminance(vec3 color) {
+ return dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), color);
+}
+vec3 _blend_set_color_luminance(vec3 hueSatColor, float alpha, vec3 lumColor) {
+ float lum = _blend_color_luminance(lumColor);
+ vec3 result = (lum - _blend_color_luminance(hueSatColor)) + hueSatColor;
+ float minComp = min(min(result.x, result.y), result.z);
+ float maxComp = max(max(result.x, result.y), result.z);
+ if (minComp < 0.0 && lum != minComp) {
+ result = lum + ((result - lum) * lum) / (lum - minComp);
+ }
+ if (maxComp > alpha && maxComp != lum) {
+ return lum + ((result - lum) * (alpha - lum)) / (maxComp - lum);
+ }
+ return result;
+}
+vec4 blend_hue(vec4 src, vec4 dst) {
+ float alpha = dst.w * src.w;
+ vec3 sda = src.xyz * dst.w;
+ vec3 dsa = dst.xyz * src.w;
+ return vec4((((_blend_set_color_luminance(_blend_set_color_saturation(sda, dsa), alpha, dsa) + dst.xyz) - dsa) + src.xyz) - sda, (src.w + dst.w) - alpha);
+}
+vec4 ComposeTwo_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_hue(EllipseEffect_Stage1_c1_c0_c0_c0(inputColor), MagnifierEffect_Stage1_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 blend_difference(vec4 src, vec4 dst) {
+ return vec4((src.xyz + dst.xyz) - 2.0 * min(src.xyz * dst.w, dst.xyz * src.w), src.w + (1.0 - src.w) * dst.w);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_difference(SpecularLighting_Stage1_c0_c0(inputColor), ComposeTwo_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vec4 color = inColor;
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/715.shader_test b/shaders/skia/715.shader_test
new file mode 100644
index 0000000..4bef71a
--- /dev/null
+++ b/shaders/skia/715.shader_test
@@ -0,0 +1,219 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 ubaseFrequency_Stage1_c0_c0;
+uniform vec2 ustitchData_Stage1_c0_c0;
+uniform vec4 ucolor_Stage3;
+uniform vec4 urectUniform_Stage4;
+uniform vec4 uscale0_1_Stage6_c1_c0_c1_c0;
+uniform vec4 uscale2_3_Stage6_c1_c0_c1_c0;
+uniform vec4 uscale4_5_Stage6_c1_c0_c1_c0;
+uniform vec4 ubias0_1_Stage6_c1_c0_c1_c0;
+uniform vec4 ubias2_3_Stage6_c1_c0_c1_c0;
+uniform vec4 ubias4_5_Stage6_c1_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage6_c1_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage6_c1_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec4 vQuadEdge_Stage0;
+noperspective in vec4 vinColor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+float perlinnoise_Stage1_c0_c0(float chanCoord, vec2 noiseVec, vec2 stitchData) {
+ vec4 floorVal;
+ floorVal.xy = floor(noiseVec);
+ floorVal.zw = floorVal.xy + vec2(1.0);
+ vec2 fractVal = fract(noiseVec);
+ vec2 noiseSmooth = (fractVal * fractVal) * (vec2(3.0) - vec2(2.0) * fractVal);
+ if (floorVal.x >= stitchData.x) {
+ floorVal.x -= stitchData.x;
+ }
+ if (floorVal.y >= stitchData.y) {
+ floorVal.y -= stitchData.y;
+ }
+ if (floorVal.z >= stitchData.x) {
+ floorVal.z -= stitchData.x;
+ }
+ if (floorVal.w >= stitchData.y) {
+ floorVal.w -= stitchData.y;
+ }
+ floorVal = fract(floor(mod(floorVal, 256.0)) / vec4(256.0));
+ vec2 latticeIdx;
+ latticeIdx.x = texture(uTextureSampler_0_Stage1, vec2(floorVal.x, 0.5)).x;
+ latticeIdx.y = texture(uTextureSampler_0_Stage1, vec2(floorVal.z, 0.5)).x;
+ vec4 bcoords = fract(latticeIdx.xyxy + floorVal.yyww);
+ vec2 uv;
+ vec4 lattice = texture(uTextureSampler_1_Stage1, vec2(bcoords.x, chanCoord)).zyxw;
+ uv.x = dot((lattice.yw + lattice.xz * vec2(0.00390625)) * vec2(2.0) - vec2(1.0), fractVal);
+ fractVal.x -= 1.0;
+ lattice = texture(uTextureSampler_1_Stage1, vec2(bcoords.y, chanCoord)).zyxw;
+ uv.y = dot((lattice.yw + lattice.xz * vec2(0.00390625)) * vec2(2.0) - vec2(1.0), fractVal);
+ vec2 ab;
+ ab.x = mix(uv.x, uv.y, noiseSmooth.x);
+ fractVal.y -= 1.0;
+ lattice = texture(uTextureSampler_1_Stage1, vec2(bcoords.w, chanCoord)).zyxw;
+ uv.y = dot((lattice.yw + lattice.xz * vec2(0.00390625)) * vec2(2.0) - vec2(1.0), fractVal);
+ fractVal.x += 1.0;
+ lattice = texture(uTextureSampler_1_Stage1, vec2(bcoords.z, chanCoord)).zyxw;
+ uv.x = dot((lattice.yw + lattice.xz * vec2(0.00390625)) * vec2(2.0) - vec2(1.0), fractVal);
+ ab.y = mix(uv.x, uv.y, noiseSmooth.x);
+ return mix(ab.x, ab.y, noiseSmooth.y);
+}
+vec4 PerlinNoise_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 noiseVec = floor(vTransformedCoords_0_Stage0) * ubaseFrequency_Stage1_c0_c0;
+ _output = vec4(0.0);
+ vec2 stitchData = ustitchData_Stage1_c0_c0;
+ float ratio = 1.0;
+ for (int octave = 0;octave < 4; ++octave) {
+ _output += abs(vec4(perlinnoise_Stage1_c0_c0(0.125, noiseVec, stitchData), perlinnoise_Stage1_c0_c0(0.375, noiseVec, stitchData), perlinnoise_Stage1_c0_c0(0.625, noiseVec, stitchData), perlinnoise_Stage1_c0_c0(0.875, noiseVec, stitchData))) * ratio;
+ noiseVec *= vec2(2.0);
+ ratio *= 0.5;
+ stitchData *= vec2(2.0);
+ }
+ _output = clamp(_output, 0.0, 1.0);
+ _output = vec4(_output.xyz * _output.www, _output.w);
+ return _output;
+}
+vec4 RadialGradientLayout_Stage6_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = length(vTransformedCoords_1_Stage0);
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage6_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage6_c1_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage6_c1_c0_c1_c0.x) {
+ scale = uscale0_1_Stage6_c1_c0_c1_c0;
+ bias = ubias0_1_Stage6_c1_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage6_c1_c0_c1_c0;
+ bias = ubias2_3_Stage6_c1_c0_c1_c0;
+ }
+ } else {
+ {
+ scale = uscale4_5_Stage6_c1_c0_c1_c0;
+ bias = ubias4_5_Stage6_c1_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage6_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = RadialGradientLayout_Stage6_c1_c0_c0_c0(vec4(1.0));
+ {
+ {
+ t.x = fract(t.x);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage6_c1_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ float edgeAlpha;
+ vec2 duvdx = dFdx(vQuadEdge_Stage0.xy);
+ vec2 duvdy = dFdy(vQuadEdge_Stage0.xy);
+ if (vQuadEdge_Stage0.z > 0.0 && vQuadEdge_Stage0.w > 0.0) {
+ edgeAlpha = min(min(vQuadEdge_Stage0.z, vQuadEdge_Stage0.w) + 0.5, 1.0);
+ } else {
+ vec2 gF = vec2((2.0 * vQuadEdge_Stage0.x) * duvdx.x - duvdx.y, (2.0 * vQuadEdge_Stage0.x) * duvdy.x - duvdy.y);
+ edgeAlpha = vQuadEdge_Stage0.x * vQuadEdge_Stage0.x - vQuadEdge_Stage0.y;
+ edgeAlpha = clamp(0.5 - edgeAlpha / length(gF), 0.0, 1.0);
+ }
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_dst_in(outputCoverage_Stage0, PerlinNoise_Stage1_c0_c0(vec4(1.0)));
+ }
+ vec4 output_Stage2;
+ {
+ float nonZeroAlpha = max(output_Stage1.w, 9.9999997473787516e-05);
+ vec4 coord = vec4(output_Stage1.xyz / nonZeroAlpha, nonZeroAlpha);
+ coord = coord * 0.9960939884185791 + vec4(0.0019529999699443579, 0.0019529999699443579, 0.0019529999699443579, 0.0019529999699443579);
+ output_Stage2.w = texture(uTextureSampler_0_Stage2, vec2(coord.w, 0.125)).w;
+ output_Stage2.x = texture(uTextureSampler_0_Stage2, vec2(coord.x, 0.375)).w;
+ output_Stage2.y = texture(uTextureSampler_0_Stage2, vec2(coord.y, 0.625)).w;
+ output_Stage2.z = texture(uTextureSampler_0_Stage2, vec2(coord.z, 0.875)).w;
+ output_Stage2.xyz *= output_Stage2.w;
+ }
+ vec4 output_Stage3;
+ {
+ {
+ output_Stage3 = output_Stage2 * ucolor_Stage3;
+ }
+ }
+ vec4 output_Stage4;
+ {
+ float alpha;
+ {
+ float xSub, ySub;
+ xSub = min(gl_FragCoord.x - urectUniform_Stage4.x, 0.0);
+ xSub += min(urectUniform_Stage4.z - gl_FragCoord.x, 0.0);
+ ySub = min(gl_FragCoord.y - urectUniform_Stage4.y, 0.0);
+ ySub += min(urectUniform_Stage4.w - gl_FragCoord.y, 0.0);
+ alpha = (1.0 + max(xSub, -1.0)) * (1.0 + max(ySub, -1.0));
+ }
+ output_Stage4 = output_Stage3 * alpha;
+ }
+ vec4 output_Stage5;
+ {
+ output_Stage5 = floor(output_Stage4 * 255.0 + 0.5) / 255.0;
+ {
+ output_Stage5.xyz = output_Stage5.w <= 0.0 ? vec3(0.0) : floor((output_Stage5.xyz / output_Stage5.w) * 255.0 + 0.5) / 255.0;
+ }
+ }
+ vec4 output_Stage6;
+ {
+ output_Stage6 = blend_dst_in(output_Stage5, TiledGradientEffect_Stage6_c1_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage6;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec4 inQuadEdge;
+noperspective out vec4 vQuadEdge_Stage0;
+noperspective out vec4 vinColor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vQuadEdge_Stage0 = inQuadEdge;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/718-1.shader_test b/shaders/skia/718-1.shader_test
new file mode 100644
index 0000000..26ea237
--- /dev/null
+++ b/shaders/skia/718-1.shader_test
@@ -0,0 +1,43 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform mat4 um_Stage2;
+uniform vec4 uv_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ vec4 inputColor = output_Stage1;
+ output_Stage2 = um_Stage2 * inputColor + uv_Stage2;
+ {
+ output_Stage2.w = clamp(output_Stage2.w, 0.0, 1.0);
+ }
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/718.shader_test b/shaders/skia/718.shader_test
new file mode 100644
index 0000000..fcfa993
--- /dev/null
+++ b/shaders/skia/718.shader_test
@@ -0,0 +1,493 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_KHR_blend_equation_advanced : require
+out vec4 sk_FragColor;
+layout (blend_support_all_equations) out ;
+uniform vec2 uImageIncrement_Stage1;
+uniform vec4 uKernel_Stage1[6];
+uniform vec2 uKernelOffset_Stage1;
+uniform float uGain_Stage1;
+uniform float uBias_Stage1;
+uniform vec2 ufocalParams_Stage3_c1_c0_c0_c0;
+uniform vec4 uscale0_1_Stage3_c1_c0_c1_c0;
+uniform vec4 uscale2_3_Stage3_c1_c0_c1_c0;
+uniform vec4 uscale4_5_Stage3_c1_c0_c1_c0;
+uniform vec4 uscale6_7_Stage3_c1_c0_c1_c0;
+uniform vec4 ubias0_1_Stage3_c1_c0_c1_c0;
+uniform vec4 ubias2_3_Stage3_c1_c0_c1_c0;
+uniform vec4 ubias4_5_Stage3_c1_c0_c1_c0;
+uniform vec4 ubias6_7_Stage3_c1_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage3_c1_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage3_c1_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vEllipseOffsets_Stage0;
+noperspective in vec4 vEllipseRadii_Stage0;
+noperspective in vec4 vinColor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_3_Stage0;
+vec4 Dither_Stage2_c0_c0(vec4 _input, vec2 _coords) {
+ vec4 _output;
+ _output = _input;
+ float value;
+ {
+ uint x = uint(_coords.x);
+ uint y = uint(_coords.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ _output = vec4(clamp(_output.xyz + value * 0.01587301678955555, 0.0, _output.w), _output.w);
+ return _output;
+}
+vec4 TwoPointConicalGradientLayout_Stage3_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_3_Stage0;
+ float t = -1.0;
+ float v = 1.0;
+ {
+ {
+ float invR1 = ufocalParams_Stage3_c1_c0_c0_c0.x;
+ float fx = ufocalParams_Stage3_c1_c0_c0_c0.y;
+ float x_t = -1.0;
+ {
+ float temp = p.x * p.x - p.y * p.y;
+ if (temp >= 0.0) {
+ {
+ x_t = sqrt(temp) - p.x * invR1;
+ }
+ }
+ }
+ {
+ if (x_t <= 0.0) {
+ v = -1.0;
+ }
+ }
+ {
+ {
+ t = x_t + fx;
+ }
+ }
+ }
+ }
+ _output = vec4(t, v, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage3_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage3_c1_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage3_c1_c0_c1_c0.x) {
+ scale = uscale0_1_Stage3_c1_c0_c1_c0;
+ bias = ubias0_1_Stage3_c1_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage3_c1_c0_c1_c0;
+ bias = ubias2_3_Stage3_c1_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage3_c1_c0_c1_c0.z) {
+ scale = uscale4_5_Stage3_c1_c0_c1_c0;
+ bias = ubias4_5_Stage3_c1_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage3_c1_c0_c1_c0;
+ bias = ubias6_7_Stage3_c1_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage3_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage3_c1_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage3_c1_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vinColor_Stage0;
+ vec2 offset = vEllipseOffsets_Stage0;
+ offset *= vEllipseRadii_Stage0.xy;
+ float test = dot(offset, offset) - 1.0;
+ vec2 grad = (2.0 * offset) * vEllipseRadii_Stage0.xy;
+ float grad_dot = dot(grad, grad);
+ grad_dot = max(grad_dot, 1.1754999560161448e-38);
+ float invlen = inversesqrt(grad_dot);
+ float edgeAlpha = clamp(0.5 - test * invlen, 0.0, 1.0);
+ offset = vEllipseOffsets_Stage0 * vEllipseRadii_Stage0.zw;
+ test = dot(offset, offset) - 1.0;
+ grad = (2.0 * offset) * vEllipseRadii_Stage0.zw;
+ grad_dot = dot(grad, grad);
+ invlen = inversesqrt(grad_dot);
+ edgeAlpha *= clamp(0.5 + test * invlen, 0.0, 1.0);
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ vec4 output_Stage1;
+ {
+ vec4 sum = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0 - uKernelOffset_Stage1 * uImageIncrement_Stage1;
+ vec4 c;
+ {
+ float k = uKernel_Stage1[0].x;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[0].y;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[0].z;
+ {
+ vec2 origCoord = coord + vec2(2.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[0].w;
+ {
+ vec2 origCoord = coord + vec2(3.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[1].x;
+ {
+ vec2 origCoord = coord + vec2(4.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[1].y;
+ {
+ vec2 origCoord = coord + vec2(5.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[1].z;
+ {
+ vec2 origCoord = coord + vec2(6.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[1].w;
+ {
+ vec2 origCoord = coord + vec2(7.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[2].x;
+ {
+ vec2 origCoord = coord + vec2(8.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[2].y;
+ {
+ vec2 origCoord = coord + vec2(9.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[2].z;
+ {
+ vec2 origCoord = coord + vec2(10.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[2].w;
+ {
+ vec2 origCoord = coord + vec2(11.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[3].x;
+ {
+ vec2 origCoord = coord + vec2(12.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[3].y;
+ {
+ vec2 origCoord = coord + vec2(13.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[3].z;
+ {
+ vec2 origCoord = coord + vec2(14.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[3].w;
+ {
+ vec2 origCoord = coord + vec2(15.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[4].x;
+ {
+ vec2 origCoord = coord + vec2(16.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[4].y;
+ {
+ vec2 origCoord = coord + vec2(17.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[4].z;
+ {
+ vec2 origCoord = coord + vec2(18.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[4].w;
+ {
+ vec2 origCoord = coord + vec2(19.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[5].x;
+ {
+ vec2 origCoord = coord + vec2(20.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ vec2 origCoord = vTransformedCoords_0_Stage0;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ output_Stage1.w = c.w;
+ output_Stage1.xyz = clamp(sum.xyz * uGain_Stage1 + uBias_Stage1, 0.0, 1.0);
+ output_Stage1.xyz *= output_Stage1.w;
+ output_Stage1 *= outputColor_Stage0;
+ }
+ vec4 output_Stage2;
+ {
+ float coord = vTransformedCoords_1_Stage0.x - 0.5;
+ float f = fract(coord);
+ coord += 0.5 - f;
+ float f2 = f * f;
+ vec4 w = mat4(0.055555555555555552, 0.88888888888888884, 0.055555555555555552, 0.0, -0.5, 0.0, 0.5, 0.0, 0.83333333333333337, -2.0, 1.5, -0.33333333333333331, -0.3888888888888889, 1.1666666666666667, -1.1666666666666667, 0.3888888888888889) * vec4(1.0, f, f2, f2 * f);
+ vec4 c[4];
+ c[0] = Dither_Stage2_c0_c0(vec4(1.0), vec2(coord + -1.0, vTransformedCoords_1_Stage0.y));
+ c[1] = Dither_Stage2_c0_c0(vec4(1.0), vec2(coord, vTransformedCoords_1_Stage0.y));
+ c[2] = Dither_Stage2_c0_c0(vec4(1.0), vec2(coord + 1.0, vTransformedCoords_1_Stage0.y));
+ c[3] = Dither_Stage2_c0_c0(vec4(1.0), vec2(coord + 2.0, vTransformedCoords_1_Stage0.y));
+ vec4 bicubicColor = ((c[0] * w.x + c[1] * w.y) + c[2] * w.z) + c[3] * w.w;
+ bicubicColor = clamp(bicubicColor, 0.0, 1.0);
+ output_Stage2 = bicubicColor * output_Stage1;
+ }
+ vec4 output_Stage3;
+ {
+ output_Stage3 = blend_dst_in(output_Stage2, TiledGradientEffect_Stage3_c1_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = outputCoverage_Stage0 * output_Stage3;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_3_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec2 inEllipseOffset;
+in vec4 inEllipseRadii;
+noperspective out vec2 vEllipseOffsets_Stage0;
+noperspective out vec4 vEllipseRadii_Stage0;
+noperspective out vec4 vinColor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_3_Stage0;
+void main() {
+ vEllipseOffsets_Stage0 = inEllipseOffset;
+ vEllipseRadii_Stage0 = inEllipseRadii;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_3_Stage0 = (uCoordTransformMatrix_3_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/724.shader_test b/shaders/skia/724.shader_test
new file mode 100644
index 0000000..9c93621
--- /dev/null
+++ b/shaders/skia/724.shader_test
@@ -0,0 +1,356 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage2_c0_c0;
+uniform vec4 urightBorderColor_Stage2_c0_c0;
+uniform vec4 uscale0_1_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale8_9_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias8_9_Stage2_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage2_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage2_c0_c0_c1_c0;
+uniform vec4 ucircleData_Stage3;
+uniform vec3 uedges_Stage4_c1_c0[7];
+uniform vec2 uImageIncrement_Stage5;
+uniform float uSurfaceScale_Stage5;
+uniform vec3 uLightColor_Stage5;
+uniform float uKS_Stage5;
+uniform float uShininess_Stage5;
+uniform vec4 uTexDom_Stage5;
+uniform vec3 uDecalParams_Stage5;
+uniform vec3 uLightDirection_Stage5;
+uniform sampler2D uTextureSampler_0_Stage3;
+uniform sampler2D uTextureSampler_0_Stage5;
+noperspective in vec2 vEllipseOffsets0_Stage0;
+noperspective in vec2 vEllipseOffsets1_Stage0;
+noperspective in vec4 vinColor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 RadialGradientLayout_Stage2_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = length(vTransformedCoords_0_Stage0);
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage2_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.w) {
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage2_c0_c0_c1_c0;
+ bias = ubias0_1_Stage2_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage2_c0_c0_c1_c0;
+ bias = ubias2_3_Stage2_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage2_c0_c0_c1_c0;
+ bias = ubias4_5_Stage2_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage2_c0_c0_c1_c0;
+ bias = ubias6_7_Stage2_c0_c0_c1_c0;
+ }
+ }
+ } else {
+ {
+ {
+ scale = uscale8_9_Stage2_c0_c0_c1_c0;
+ bias = ubias8_9_Stage2_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = RadialGradientLayout_Stage2_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage2_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage2_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage2_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 ConvexPoly_Stage4_c1_c0(vec4 _input) {
+ vec4 _output;
+ float alpha = 1.0;
+ float edge;
+ edge = dot(uedges_Stage4_c1_c0[0], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage4_c1_c0[1], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage4_c1_c0[2], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage4_c1_c0[3], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage4_c1_c0[4], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage4_c1_c0[5], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage4_c1_c0[6], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ _output = _input * alpha;
+ return _output;
+}
+vec4 light_Stage5(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ vec3 halfDir = normalize(surfaceToLight + vec3(0.0, 0.0, 1.0));
+ float colorScale = uKS_Stage5 * pow(dot(normal, halfDir), uShininess_Stage5);
+ vec3 color = lightColor * clamp(colorScale, 0.0, 1.0);
+ return vec4(color, max(max(color.x, color.y), color.z));
+}
+float sobel_Stage5(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage5(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage5(float m[9], float surfaceScale) {
+ return pointToNormal_Stage5(sobel_Stage5(0.0, 0.0, m[3], m[5], m[6], m[8], 0.33333298563957214), sobel_Stage5(0.0, 0.0, m[4], m[7], m[5], m[8], 0.5), surfaceScale);
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+vec4 blend_dst_out(vec4 src, vec4 dst) {
+ return (1.0 - src.w) * dst;
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ vec2 scaledOffset = vEllipseOffsets0_Stage0;
+ float test = dot(scaledOffset, scaledOffset) - 1.0;
+ vec2 duvdx = dFdx(vEllipseOffsets0_Stage0);
+ vec2 duvdy = -dFdy(vEllipseOffsets0_Stage0);
+ vec2 grad = vec2(vEllipseOffsets0_Stage0.x * duvdx.x + vEllipseOffsets0_Stage0.y * duvdx.y, vEllipseOffsets0_Stage0.x * duvdy.x + vEllipseOffsets0_Stage0.y * duvdy.y);
+ float grad_dot = 4.0 * dot(grad, grad);
+ grad_dot = max(grad_dot, 1.1754999560161448e-38);
+ float invlen = inversesqrt(grad_dot);
+ float edgeAlpha = clamp(0.5 - test * invlen, 0.0, 1.0);
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = floor(outputCoverage_Stage0 * 255.0 + 0.5) / 255.0;
+ {
+ output_Stage1.xyz = floor((output_Stage1.xyz * output_Stage1.w) * 255.0 + 0.5) / 255.0;
+ }
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_dst_in(output_Stage1, ClampedGradientEffect_Stage2_c0_c0(vec4(1.0)));
+ }
+ vec4 output_Stage3;
+ {
+ vec2 vec = vec2((gl_FragCoord.x - ucircleData_Stage3.x) * ucircleData_Stage3.w, (gl_FragCoord.y - ucircleData_Stage3.y) * ucircleData_Stage3.w);
+ float dist = length(vec) + (0.5 - ucircleData_Stage3.z) * ucircleData_Stage3.w;
+ output_Stage3 = output_Stage2 * texture(uTextureSampler_0_Stage3, vec2(dist, 0.5)).w;
+ }
+ vec4 output_Stage4;
+ {
+ output_Stage4 = blend_dst_out(output_Stage3, ConvexPoly_Stage4_c1_c0(vec4(1.0)));
+ }
+ vec4 output_Stage5;
+ {
+ vec2 coord = vTransformedCoords_1_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage5;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage5.xy, uTexDom_Stage5.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage5, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage5.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage5.y);
+ if (err > uDecalParams_Stage5.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage5.z < 1.0) {
+ err = 0.0;
+ }
+ temp0 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage5;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage5.xy, uTexDom_Stage5.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage5, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage5.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage5.y);
+ if (err > uDecalParams_Stage5.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage5.z < 1.0) {
+ err = 0.0;
+ }
+ temp1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage5;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage5.xy, uTexDom_Stage5.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage5, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage5.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage5.y);
+ if (err > uDecalParams_Stage5.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage5.z < 1.0) {
+ err = 0.0;
+ }
+ temp2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage5;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage5.xy, uTexDom_Stage5.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage5, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage5.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage5.y);
+ if (err > uDecalParams_Stage5.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage5.z < 1.0) {
+ err = 0.0;
+ }
+ temp3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage5.xy, uTexDom_Stage5.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage5, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage5.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage5.y);
+ if (err > uDecalParams_Stage5.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage5.z < 1.0) {
+ err = 0.0;
+ }
+ temp4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage5;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage5.xy, uTexDom_Stage5.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage5, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage5.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage5.y);
+ if (err > uDecalParams_Stage5.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage5.z < 1.0) {
+ err = 0.0;
+ }
+ temp5 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage5;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage5.xy, uTexDom_Stage5.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage5, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage5.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage5.y);
+ if (err > uDecalParams_Stage5.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage5.z < 1.0) {
+ err = 0.0;
+ }
+ temp6 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage5;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage5.xy, uTexDom_Stage5.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage5, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage5.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage5.y);
+ if (err > uDecalParams_Stage5.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage5.z < 1.0) {
+ err = 0.0;
+ }
+ temp7 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage5;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage5.xy, uTexDom_Stage5.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage5, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage5.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage5.y);
+ if (err > uDecalParams_Stage5.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage5.z < 1.0) {
+ err = 0.0;
+ }
+ temp8 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = uLightDirection_Stage5;
+ output_Stage5 = light_Stage5(normal_Stage5(m, uSurfaceScale_Stage5), surfaceToLight, uLightColor_Stage5);
+ output_Stage5 *= output_Stage4;
+ }
+ {
+ sk_FragColor = vec4(0.0);
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec2 inEllipseOffsets0;
+in vec2 inEllipseOffsets1;
+noperspective out vec2 vEllipseOffsets0_Stage0;
+noperspective out vec2 vEllipseOffsets1_Stage0;
+noperspective out vec4 vinColor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vEllipseOffsets0_Stage0 = inEllipseOffsets0;
+ vEllipseOffsets1_Stage0 = inEllipseOffsets1;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = (uViewM_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/73-1.shader_test b/shaders/skia/73-1.shader_test
new file mode 100644
index 0000000..d654dc5
--- /dev/null
+++ b/shaders/skia/73-1.shader_test
@@ -0,0 +1,50 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 TextureEffect_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage2, vTransformedCoords_1_Stage0) * _input;
+ return _output;
+}
+vec4 blend_exclusion(vec4 src, vec4 dst) {
+ return vec4((dst.xyz + src.xyz) - (2.0 * dst.xyz) * src.xyz, src.w + (1.0 - src.w) * dst.w);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_exclusion(output_Stage1, TextureEffect_Stage2_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/73-10.shader_test b/shaders/skia/73-10.shader_test
new file mode 100644
index 0000000..5176ae2
--- /dev/null
+++ b/shaders/skia/73-10.shader_test
@@ -0,0 +1,82 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage2_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c1_c0;
+ }
+ return _output;
+}
+vec4 blend_dst_over(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src + dst;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_dst_over(ConstColorProcessor_Stage2_c1_c0(vec4(1.0)), output_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/73-11.shader_test b/shaders/skia/73-11.shader_test
new file mode 100644
index 0000000..e4ee286
--- /dev/null
+++ b/shaders/skia/73-11.shader_test
@@ -0,0 +1,41 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform float uPixelSize_Stage1;
+uniform vec2 uRange_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = vec4(1.0, 1.0, 1.0, 1.0);
+ vec2 coord = vTransformedCoords_0_Stage0;
+ coord.x -= 8.0 * uPixelSize_Stage1;
+ for (int i = 0;i < 17; i++) {
+ output_Stage1 = min(output_Stage1, texture(uTextureSampler_0_Stage1, coord));
+ coord.x += uPixelSize_Stage1;
+ }
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/73-12.shader_test b/shaders/skia/73-12.shader_test
new file mode 100644
index 0000000..bfedfa3
--- /dev/null
+++ b/shaders/skia/73-12.shader_test
@@ -0,0 +1,153 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform float uSurfaceScale_Stage1;
+uniform vec3 uLightColor_Stage1;
+uniform float uKD_Stage1;
+uniform vec3 uLightLocation_Stage1;
+uniform float uExponent_Stage1;
+uniform float uCosInnerConeAngle_Stage1;
+uniform float uCosOuterConeAngle_Stage1;
+uniform float uConeScale_Stage1;
+uniform vec3 uS_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 light_Stage1(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ float colorScale = uKD_Stage1 * dot(normal, surfaceToLight);
+ return vec4(lightColor * clamp(colorScale, 0.0, 1.0), 1.0);
+}
+float sobel_Stage1(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage1(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage1(float m[9], float surfaceScale) {
+ return pointToNormal_Stage1(sobel_Stage1(m[0], m[2], m[3], m[5], m[6], m[8], 0.25), sobel_Stage1(m[0], m[6], m[1], m[7], m[2], m[8], 0.25), surfaceScale);
+}
+vec3 lightColor_Stage1(vec3 surfaceToLight) {
+ float cosAngle = -dot(surfaceToLight, uS_Stage1);
+ if (cosAngle < uCosOuterConeAngle_Stage1) {
+ return vec3(0.0);
+ }
+ float scale = pow(cosAngle, uExponent_Stage1);
+ if (cosAngle < uCosInnerConeAngle_Stage1) {
+ return ((uLightColor_Stage1 * scale) * (cosAngle - uCosOuterConeAngle_Stage1)) * uConeScale_Stage1;
+ }
+ return uLightColor_Stage1;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ vec2 coord = vTransformedCoords_0_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp0 = textureColor;
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp1 = textureColor;
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp2 = textureColor;
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp3 = textureColor;
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp4 = textureColor;
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp5 = textureColor;
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp6 = textureColor;
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp7 = textureColor;
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp8 = textureColor;
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = normalize(uLightLocation_Stage1 - vec3(gl_FragCoord.xy, uSurfaceScale_Stage1 * m[4]));
+ output_Stage1 = light_Stage1(normal_Stage1(m, uSurfaceScale_Stage1), surfaceToLight, lightColor_Stage1(surfaceToLight));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/73-14.shader_test b/shaders/skia/73-14.shader_test
new file mode 100644
index 0000000..506ed94
--- /dev/null
+++ b/shaders/skia/73-14.shader_test
@@ -0,0 +1,56 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uScale_Stage1;
+uniform vec4 uTexDom_Stage1;
+uniform vec3 uDecalParams_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ vec4 dColor = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ dColor.xyz = dColor.w < 9.9999999747524271e-07 ? vec3(0.0) : clamp(dColor.xyz / dColor.w, 0.0, 1.0);
+ vec2 cCoords = vTransformedCoords_1_Stage0 + uScale_Stage1 * (dColor.xy - vec2(0.5));
+ {
+ vec2 origCoord = cCoords;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ output_Stage1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/73-2.shader_test b/shaders/skia/73-2.shader_test
new file mode 100644
index 0000000..5d4a41b
--- /dev/null
+++ b/shaders/skia/73-2.shader_test
@@ -0,0 +1,96 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uclamp_Stage1_c0_c0_c0_c0;
+uniform vec4 uclamp_Stage1_c0_c0_c1_c0;
+uniform mat4 um_Stage2;
+uniform vec4 uv_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 inCoord = vTransformedCoords_0_Stage0;
+ vec2 subsetCoord;
+ subsetCoord.x = inCoord.x;
+ subsetCoord.y = inCoord.y;
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage1_c0_c0_c0_c0.x, uclamp_Stage1_c0_c0_c0_c0.z);
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage1_c0_c0_c0_c0.y, uclamp_Stage1_c0_c0_c0_c0.w);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ _output = _input * textureColor;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 inCoord = vTransformedCoords_1_Stage0;
+ vec2 subsetCoord;
+ subsetCoord.x = inCoord.x;
+ subsetCoord.y = inCoord.y;
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage1_c0_c0_c1_c0.x, uclamp_Stage1_c0_c0_c1_c0.z);
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage1_c0_c0_c1_c0.y, uclamp_Stage1_c0_c0_c1_c0.w);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ _output = _input * textureColor;
+ return _output;
+}
+vec4 YUVtoRGBEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 planes[2];
+ planes[0] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0));
+ planes[1] = TextureEffect_Stage1_c0_c0_c1_c0(vec4(1.0));
+ vec4 color = vec4(planes[0].x, planes[1].x, planes[1].y, 1.0);
+ _output = color;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = YUVtoRGBEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ vec4 inputColor = output_Stage1;
+ {
+ float nonZeroAlpha = max(inputColor.w, 9.9999997473787516e-05);
+ inputColor = vec4(inputColor.xyz / nonZeroAlpha, inputColor.w);
+ }
+ output_Stage2 = um_Stage2 * inputColor + uv_Stage2;
+ {
+ output_Stage2 = clamp(output_Stage2, 0.0, 1.0);
+ }
+ {
+ output_Stage2.xyz *= output_Stage2.w;
+ }
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/73-20.shader_test b/shaders/skia/73-20.shader_test
new file mode 100644
index 0000000..b2b04f2
--- /dev/null
+++ b/shaders/skia/73-20.shader_test
@@ -0,0 +1,42 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uclamp_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ vec2 inCoord = vTransformedCoords_0_Stage0;
+ vec2 subsetCoord;
+ subsetCoord.x = inCoord.x;
+ subsetCoord.y = inCoord.y;
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage1.x, uclamp_Stage1.z);
+ clampedCoord.y = subsetCoord.y;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ output_Stage1 = textureColor;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/73-24.shader_test b/shaders/skia/73-24.shader_test
new file mode 100644
index 0000000..1a56572
--- /dev/null
+++ b/shaders/skia/73-24.shader_test
@@ -0,0 +1,48 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uborder_Stage1;
+uniform vec4 usubset_Stage1;
+uniform vec4 uclamp_Stage1;
+uniform vec4 unorm_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ vec2 inCoord = vTransformedCoords_0_Stage0;
+ inCoord *= unorm_Stage1.xy;
+ vec2 subsetCoord;
+ subsetCoord.x = inCoord.x;
+ subsetCoord.y = inCoord.y;
+ vec2 clampedCoord;
+ clampedCoord.x = subsetCoord.x;
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage1.y, uclamp_Stage1.w);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord * unorm_Stage1.zw);
+ float errY = subsetCoord.y - clampedCoord.y;
+ textureColor = mix(textureColor, uborder_Stage1, min(abs(errY), 1.0));
+ output_Stage1 = textureColor;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/73-25.shader_test b/shaders/skia/73-25.shader_test
new file mode 100644
index 0000000..941c713
--- /dev/null
+++ b/shaders/skia/73-25.shader_test
@@ -0,0 +1,104 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 uscale01_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias01_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale23_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias23_Stage1_c0_c0_c1_c0;
+uniform float uthreshold_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_0_Stage0;
+ float t = -1.0;
+ {
+ {
+ float invR1 = ufocalParams_Stage1_c0_c0_c0_c0.x;
+ float fx = ufocalParams_Stage1_c0_c0_c0_c0.y;
+ float x_t = -1.0;
+ {
+ x_t = length(p) - p.x * invR1;
+ }
+ {
+ {
+ t = x_t + fx;
+ }
+ }
+ }
+ }
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 DualIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthreshold_Stage1_c0_c0_c1_c0) {
+ scale = uscale01_Stage1_c0_c0_c1_c0;
+ bias = ubias01_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale23_Stage1_c0_c0_c1_c0;
+ bias = ubias23_Stage1_c0_c0_c1_c0;
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = DualIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_dst_in(outputColor_Stage0, ClampedGradientEffect_Stage1_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/73-26.shader_test b/shaders/skia/73-26.shader_test
new file mode 100644
index 0000000..614c4eb
--- /dev/null
+++ b/shaders/skia/73-26.shader_test
@@ -0,0 +1,120 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 uscale01_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias01_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale23_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias23_Stage1_c0_c0_c1_c0;
+uniform float uthreshold_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_0_Stage0;
+ float t = -1.0;
+ {
+ {
+ float invR1 = ufocalParams_Stage1_c0_c0_c0_c0.x;
+ float fx = ufocalParams_Stage1_c0_c0_c0_c0.y;
+ float x_t = -1.0;
+ {
+ x_t = length(p) - p.x * invR1;
+ }
+ {
+ {
+ t = x_t + fx;
+ }
+ }
+ }
+ }
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 DualIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthreshold_Stage1_c0_c0_c1_c0) {
+ scale = uscale01_Stage1_c0_c0_c1_c0;
+ bias = ubias01_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale23_Stage1_c0_c0_c1_c0;
+ bias = ubias23_Stage1_c0_c0_c1_c0;
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = DualIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_dst_in(outputColor_Stage0, ClampedGradientEffect_Stage1_c0_c0(vec4(1.0)));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_1_Stage0.x);
+ uint y = uint(vTransformedCoords_1_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ output_Stage2 = vec4(clamp(output_Stage2.xyz + value * 0.0039215688593685627, 0.0, output_Stage2.w), output_Stage2.w);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/73-27.shader_test b/shaders/skia/73-27.shader_test
new file mode 100644
index 0000000..16b8de1
--- /dev/null
+++ b/shaders/skia/73-27.shader_test
@@ -0,0 +1,67 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 TextureEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = TextureEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = OverrideInputFragmentProcessor_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 blend_difference(vec4 src, vec4 dst) {
+ return vec4((src.xyz + dst.xyz) - 2.0 * min(src.xyz * dst.w, dst.xyz * src.w), src.w + (1.0 - src.w) * dst.w);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_difference(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec2 inLocalCoord;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 color = inColor;
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/73-29.shader_test b/shaders/skia/73-29.shader_test
new file mode 100644
index 0000000..e95fa00
--- /dev/null
+++ b/shaders/skia/73-29.shader_test
@@ -0,0 +1,121 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 uleftBorderColor_Stage1_c1_c0_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c1_c0_c0_c0;
+uniform vec4 ustart_Stage1_c1_c0_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c1_c0_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = ClampedGradientEffect_Stage1_c0_c0_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ return _output;
+}
+vec4 LinearGradientLayout_Stage1_c1_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_1_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c1_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c1_c0_c0_c0_c1_c0 + t * uend_Stage1_c1_c0_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c1_c0_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c1_c0_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c1_c0_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c1_c0_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = ClampedGradientEffect_Stage1_c1_c0_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ return _output;
+}
+vec4 blend_plus(vec4 src, vec4 dst) {
+ return min(src + dst, 1.0);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_plus(OverrideInputFragmentProcessor_Stage1_c0_c0(inputColor), OverrideInputFragmentProcessor_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/73-30.shader_test b/shaders/skia/73-30.shader_test
new file mode 100644
index 0000000..d2f3a91
--- /dev/null
+++ b/shaders/skia/73-30.shader_test
@@ -0,0 +1,91 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uCoordTransformMatrix_1_Stage0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+noperspective in float vcoverage_Stage0;
+vec4 TextureEffect_Stage1_c0_c0_c0_c0(vec4 _input, vec2 _coords) {
+ _coords = _coords * uCoordTransformMatrix_1_Stage0.xz + uCoordTransformMatrix_1_Stage0.yw;
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, _coords) * _input;
+ return _output;
+}
+vec4 Bicubic_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coord = vTransformedCoords_0_Stage0 - vec2(0.5);
+ vec2 f = fract(coord);
+ coord += 0.5 - f;
+ vec4 wx = mat4(0.055555555555555552, 0.88888888888888884, 0.055555555555555552, 0.0, -0.5, 0.0, 0.5, 0.0, 0.83333333333333337, -2.0, 1.5, -0.33333333333333331, -0.3888888888888889, 1.1666666666666667, -1.1666666666666667, 0.3888888888888889) * vec4(1.0, f.x, f.x * f.x, (f.x * f.x) * f.x);
+ vec4 wy = mat4(0.055555555555555552, 0.88888888888888884, 0.055555555555555552, 0.0, -0.5, 0.0, 0.5, 0.0, 0.83333333333333337, -2.0, 1.5, -0.33333333333333331, -0.3888888888888889, 1.1666666666666667, -1.1666666666666667, 0.3888888888888889) * vec4(1.0, f.y, f.y * f.y, (f.y * f.y) * f.y);
+ vec4 rowColors[4];
+ rowColors[0] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(-1.0, -1.0));
+ rowColors[1] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(0.0, -1.0));
+ rowColors[2] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(1.0, -1.0));
+ rowColors[3] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(2.0, -1.0));
+ vec4 s0 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ rowColors[0] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(-1.0, 0.0));
+ rowColors[1] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord);
+ rowColors[2] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(1.0, 0.0));
+ rowColors[3] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(2.0, 0.0));
+ vec4 s1 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ rowColors[0] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(-1.0, 1.0));
+ rowColors[1] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(0.0, 1.0));
+ rowColors[2] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(1.0, 1.0));
+ rowColors[3] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(2.0, 1.0));
+ vec4 s2 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ rowColors[0] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(-1.0, 2.0));
+ rowColors[1] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(0.0, 2.0));
+ rowColors[2] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(1.0, 2.0));
+ rowColors[3] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(2.0, 2.0));
+ vec4 s3 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ vec4 bicubicColor = ((wy.x * s0 + wy.y * s1) + wy.z * s2) + wy.w * s3;
+ bicubicColor.xyz = max(vec3(0.0), min(bicubicColor.xyz, bicubicColor.www));
+ _output = bicubicColor * _input;
+ return _output;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ float coverage = vcoverage_Stage0;
+ outputCoverage_Stage0 = vec4(coverage);
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = Bicubic_Stage1_c0_c0(vec4(1.0));
+ output_Stage1.xyz *= outputColor_Stage0.xyz;
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ sk_FragColor = output_Stage1 * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in float coverage;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+noperspective out float vcoverage_Stage0;
+void main() {
+ vec2 position = position;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ vcoverage_Stage0 = coverage;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/73-36.shader_test b/shaders/skia/73-36.shader_test
new file mode 100644
index 0000000..dce3494
--- /dev/null
+++ b/shaders/skia/73-36.shader_test
@@ -0,0 +1,229 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uColor_Stage0;
+uniform vec4 ucolor_Stage1_c0_c0_c0_c0;
+uniform vec4 uboundsUniform_Stage1_c0_c0_c1_c0_c0_c0;
+uniform float uxInvZoom_Stage1_c0_c0_c1_c0_c0_c0;
+uniform float uyInvZoom_Stage1_c0_c0_c1_c0_c0_c0;
+uniform float uxInvInset_Stage1_c0_c0_c1_c0_c0_c0;
+uniform float uyInvInset_Stage1_c0_c0_c1_c0_c0_c0;
+uniform vec2 uoffset_Stage1_c0_c0_c1_c0_c0_c0;
+uniform vec3 uedges_Stage1_c0_c0_c1_c0_c1_c0[1];
+uniform mat4 um_Stage1_c1_c0_c0_c0_c0_c0;
+uniform vec4 uv_Stage1_c1_c0_c0_c0_c0_c0;
+uniform vec4 urectUniform_Stage1_c1_c0_c0_c0_c1_c0;
+uniform float uinnerThreshold_Stage1_c1_c0_c1_c0_c0_c0;
+uniform float uouterThreshold_Stage1_c1_c0_c1_c0_c0_c0;
+uniform vec4 uinnerRect_Stage1_c1_c0_c1_c0_c1_c0;
+uniform vec2 uradiusPlusHalf_Stage1_c1_c0_c1_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 ConstColorProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage1_c0_c0_c0_c0;
+ }
+ return _output;
+}
+vec4 MagnifierEffect_Stage1_c0_c0_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coord = vTransformedCoords_0_Stage0;
+ vec2 zoom_coord = uoffset_Stage1_c0_c0_c1_c0_c0_c0 + coord * vec2(uxInvZoom_Stage1_c0_c0_c1_c0_c0_c0, uyInvZoom_Stage1_c0_c0_c1_c0_c0_c0);
+ vec2 delta = (coord - uboundsUniform_Stage1_c0_c0_c1_c0_c0_c0.xy) * uboundsUniform_Stage1_c0_c0_c1_c0_c0_c0.zw;
+ delta = min(delta, vec2(1.0, 1.0) - delta);
+ delta *= vec2(uxInvInset_Stage1_c0_c0_c1_c0_c0_c0, uyInvInset_Stage1_c0_c0_c1_c0_c0_c0);
+ float weight = 0.0;
+ if (delta.x < 2.0 && delta.y < 2.0) {
+ delta = vec2(2.0, 2.0) - delta;
+ float dist = length(delta);
+ dist = max(2.0 - dist, 0.0);
+ weight = min(dist * dist, 1.0);
+ } else {
+ vec2 delta_squared = delta * delta;
+ weight = min(min(delta_squared.x, delta_squared.y), 1.0);
+ }
+ _output = texture(uTextureSampler_0_Stage1, mix(coord, zoom_coord, weight));
+ return _output;
+}
+vec4 ConvexPoly_Stage1_c0_c0_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float alpha = 1.0;
+ float edge;
+ edge = dot(uedges_Stage1_c0_c0_c1_c0_c1_c0[0], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ alpha = 1.0 - alpha;
+ _output = _input * alpha;
+ return _output;
+}
+float _blend_color_luminance(vec3 color) {
+ return dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), color);
+}
+vec3 _blend_set_color_luminance(vec3 hueSatColor, float alpha, vec3 lumColor) {
+ float lum = _blend_color_luminance(lumColor);
+ vec3 result = (lum - _blend_color_luminance(hueSatColor)) + hueSatColor;
+ float minComp = min(min(result.x, result.y), result.z);
+ float maxComp = max(max(result.x, result.y), result.z);
+ if (minComp < 0.0 && lum != minComp) {
+ result = lum + ((result - lum) * lum) / (lum - minComp);
+ }
+ if (maxComp > alpha && maxComp != lum) {
+ return lum + ((result - lum) * (alpha - lum)) / (maxComp - lum);
+ }
+ return result;
+}
+vec4 blend_color(vec4 src, vec4 dst) {
+ float alpha = dst.w * src.w;
+ vec3 sda = src.xyz * dst.w;
+ vec3 dsa = dst.xyz * src.w;
+ return vec4((((_blend_set_color_luminance(sda, alpha, dsa) + dst.xyz) - dsa) + src.xyz) - sda, (src.w + dst.w) - alpha);
+}
+vec4 ComposeTwo_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_color(MagnifierEffect_Stage1_c0_c0_c1_c0_c0_c0(inputColor), ConvexPoly_Stage1_c0_c0_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 blend_dst_out(vec4 src, vec4 dst) {
+ return (1.0 - src.w) * dst;
+}
+vec4 ComposeTwo_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_dst_out(ConstColorProcessor_Stage1_c0_c0_c0_c0(inputColor), ComposeTwo_Stage1_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 ColorMatrixFragmentProcessor_Stage1_c1_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = _input;
+ _output = um_Stage1_c1_c0_c0_c0_c0_c0 * inputColor + uv_Stage1_c1_c0_c0_c0_c0_c0;
+ {
+ _output = clamp(_output, 0.0, 1.0);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 AARectEffect_Stage1_c1_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float alpha;
+ {
+ alpha = float(all(greaterThan(vec4(gl_FragCoord.xy, urectUniform_Stage1_c1_c0_c0_c0_c1_c0.zw), vec4(urectUniform_Stage1_c1_c0_c0_c0_c1_c0.xy, gl_FragCoord.xy))) ? 1 : 0);
+ }
+ {
+ alpha = 1.0 - alpha;
+ }
+ _output = _input * alpha;
+ return _output;
+}
+vec4 blend_dst_over(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src + dst;
+}
+vec4 ComposeTwo_Stage1_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_dst_over(ColorMatrixFragmentProcessor_Stage1_c1_c0_c0_c0_c0_c0(inputColor), AARectEffect_Stage1_c1_c0_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 AlphaThresholdFragmentProcessor_Stage1_c1_c0_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 color = _input;
+ vec4 mask_color = texture(uTextureSampler_1_Stage1, vTransformedCoords_1_Stage0);
+ if (mask_color.w < 0.5) {
+ if (color.w > uouterThreshold_Stage1_c1_c0_c1_c0_c0_c0) {
+ float scale = uouterThreshold_Stage1_c1_c0_c1_c0_c0_c0 / color.w;
+ color.xyz *= scale;
+ color.w = uouterThreshold_Stage1_c1_c0_c1_c0_c0_c0;
+ }
+ } else if (color.w < uinnerThreshold_Stage1_c1_c0_c1_c0_c0_c0) {
+ float scale = uinnerThreshold_Stage1_c1_c0_c1_c0_c0_c0 / max(0.0010000000474974513, color.w);
+ color.xyz *= scale;
+ color.w = uinnerThreshold_Stage1_c1_c0_c1_c0_c0_c0;
+ }
+ _output = color;
+ return _output;
+}
+vec4 CircularRRect_Stage1_c1_c0_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 dxy0 = uinnerRect_Stage1_c1_c0_c1_c0_c1_c0.xy - gl_FragCoord.xy;
+ vec2 dxy1 = gl_FragCoord.xy - uinnerRect_Stage1_c1_c0_c1_c0_c1_c0.zw;
+ vec2 dxy = max(max(dxy0, dxy1), 0.0);
+ float alpha = clamp(uradiusPlusHalf_Stage1_c1_c0_c1_c0_c1_c0.x - length(dxy), 0.0, 1.0);
+ _output = _input * alpha;
+ return _output;
+}
+vec4 blend_difference(vec4 src, vec4 dst) {
+ return vec4((src.xyz + dst.xyz) - 2.0 * min(src.xyz * dst.w, dst.xyz * src.w), src.w + (1.0 - src.w) * dst.w);
+}
+vec4 ComposeTwo_Stage1_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_difference(AlphaThresholdFragmentProcessor_Stage1_c1_c0_c1_c0_c0_c0(inputColor), CircularRRect_Stage1_c1_c0_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 blend_darken(vec4 src, vec4 dst) {
+ vec4 result = blend_src_over(src, dst);
+ result.xyz = min(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
+ return result;
+}
+vec4 ComposeTwo_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_darken(ComposeTwo_Stage1_c1_c0_c0_c0(inputColor), ComposeTwo_Stage1_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 blend_multiply(vec4 src, vec4 dst) {
+ return vec4(((1.0 - src.w) * dst.xyz + (1.0 - dst.w) * src.xyz) + src.xyz * dst.xyz, src.w + (1.0 - src.w) * dst.w);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = uColor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_multiply(ComposeTwo_Stage1_c0_c0(inputColor), ComposeTwo_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 inPosition;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vec2 pos2 = (uViewM_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/73-37.shader_test b/shaders/skia/73-37.shader_test
new file mode 100644
index 0000000..7855027
--- /dev/null
+++ b/shaders/skia/73-37.shader_test
@@ -0,0 +1,203 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage2;
+uniform float uSurfaceScale_Stage2;
+uniform vec3 uLightColor_Stage2;
+uniform float uKD_Stage2;
+uniform vec4 uTexDom_Stage2;
+uniform vec3 uDecalParams_Stage2;
+uniform vec3 uLightLocation_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 light_Stage2(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ float colorScale = uKD_Stage2 * dot(normal, surfaceToLight);
+ return vec4(lightColor * clamp(colorScale, 0.0, 1.0), 1.0);
+}
+float sobel_Stage2(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage2(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage2(float m[9], float surfaceScale) {
+ return pointToNormal_Stage2(sobel_Stage2(m[0], m[1], m[3], m[4], m[6], m[7], 0.5), sobel_Stage2(m[0], m[6], m[1], m[7], 0.0, 0.0, 0.33333298563957214), surfaceScale);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ vec2 coord = vTransformedCoords_1_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp0 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp5 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp6 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp7 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp8 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = normalize(uLightLocation_Stage2 - vec3(gl_FragCoord.xy, uSurfaceScale_Stage2 * m[4]));
+ output_Stage2 = light_Stage2(normal_Stage2(m, uSurfaceScale_Stage2), surfaceToLight, uLightColor_Stage2);
+ output_Stage2 *= output_Stage1;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/73-38.shader_test b/shaders/skia/73-38.shader_test
new file mode 100644
index 0000000..f4d2424
--- /dev/null
+++ b/shaders/skia/73-38.shader_test
@@ -0,0 +1,61 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 ucolor_Stage2_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 ConstColorProcessor_Stage2_c0_c0(vec4 _input, vec2 _coords) {
+ vec4 _output;
+ {
+ _output = _input.w * ucolor_Stage2_c0_c0;
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ float coord = vTransformedCoords_1_Stage0.x - 0.5;
+ float f = fract(coord);
+ coord += 0.5 - f;
+ float f2 = f * f;
+ vec4 w = mat4(0.055555555555555552, 0.88888888888888884, 0.055555555555555552, 0.0, -0.5, 0.0, 0.5, 0.0, 0.83333333333333337, -2.0, 1.5, -0.33333333333333331, -0.3888888888888889, 1.1666666666666667, -1.1666666666666667, 0.3888888888888889) * vec4(1.0, f, f2, f2 * f);
+ vec4 c[4];
+ c[0] = ConstColorProcessor_Stage2_c0_c0(vec4(1.0), vec2(coord + -1.0, vTransformedCoords_1_Stage0.y));
+ c[1] = ConstColorProcessor_Stage2_c0_c0(vec4(1.0), vec2(coord, vTransformedCoords_1_Stage0.y));
+ c[2] = ConstColorProcessor_Stage2_c0_c0(vec4(1.0), vec2(coord + 1.0, vTransformedCoords_1_Stage0.y));
+ c[3] = ConstColorProcessor_Stage2_c0_c0(vec4(1.0), vec2(coord + 2.0, vTransformedCoords_1_Stage0.y));
+ vec4 bicubicColor = ((c[0] * w.x + c[1] * w.y) + c[2] * w.z) + c[3] * w.w;
+ bicubicColor = clamp(bicubicColor, 0.0, 1.0);
+ output_Stage2 = bicubicColor * output_Stage1;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/73-4.shader_test b/shaders/skia/73-4.shader_test
new file mode 100644
index 0000000..21676ed
--- /dev/null
+++ b/shaders/skia/73-4.shader_test
@@ -0,0 +1,54 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform mat3 ucolorSpaceMatrix_Stage1_c0_c0;
+uniform vec3 ucolorSpaceTranslate_Stage1_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+vec4 YUVtoRGBEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 planes[1];
+ planes[0] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0));
+ vec4 color = vec4(planes[0].y, planes[0].z, planes[0].x, planes[0].w);
+ color.xyz = clamp(color.xyz * ucolorSpaceMatrix_Stage1_c0_c0 + ucolorSpaceTranslate_Stage1_c0_c0, 0.0, 1.0);
+ color.xyz *= color.w;
+ _output = color;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = YUVtoRGBEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/73-5.shader_test b/shaders/skia/73-5.shader_test
new file mode 100644
index 0000000..2f1dedd
--- /dev/null
+++ b/shaders/skia/73-5.shader_test
@@ -0,0 +1,133 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uColor_Stage0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale8_9_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale10_11_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias8_9_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias10_11_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage2_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.w) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c1_c0;
+ }
+ }
+ } else {
+ {
+ if (t < uthresholds9_13_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale8_9_Stage1_c0_c0_c1_c0;
+ bias = ubias8_9_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale10_11_Stage1_c0_c0_c1_c0;
+ bias = ubias10_11_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c1_c0;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 blend_darken(vec4 src, vec4 dst) {
+ vec4 result = blend_src_over(src, dst);
+ result.xyz = min(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
+ return result;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = uColor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_dst_in(outputColor_Stage0, TiledGradientEffect_Stage1_c0_c0(vec4(1.0)));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_darken(ConstColorProcessor_Stage2_c1_c0(vec4(1.0)), output_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 inLocalCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec2 pos2 = position;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/73-7.shader_test b/shaders/skia/73-7.shader_test
new file mode 100644
index 0000000..6efbd27
--- /dev/null
+++ b/shaders/skia/73-7.shader_test
@@ -0,0 +1,40 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uColor_Stage0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 TextureEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TextureEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec2 pos2 = (uViewM_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/73-8.shader_test b/shaders/skia/73-8.shader_test
new file mode 100644
index 0000000..51b96b3
--- /dev/null
+++ b/shaders/skia/73-8.shader_test
@@ -0,0 +1,88 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+flat in vec4 vcolor_Stage0;
+noperspective in vec2 varccoord_Stage0;
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ float x_plus_1 = varccoord_Stage0.x, y = varccoord_Stage0.y;
+ float coverage;
+ if (0.0 == x_plus_1) {
+ coverage = y;
+ } else {
+ float fn = x_plus_1 * (x_plus_1 - 2.0);
+ fn = ((y) * (y) + (fn));
+ float fnwidth = fwidth(fn);
+ float d = fn / fnwidth;
+ coverage = clamp(0.5 - d, 0.0, 1.0);
+ }
+ outputCoverage_Stage0 = vec4(coverage);
+ }
+ {
+ sk_FragColor = outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec4 radii_selector;
+in vec4 corner_and_radius_outsets;
+in vec4 aa_bloat_and_coverage;
+in vec4 skew;
+in vec2 translate;
+in vec4 radii_x;
+in vec4 radii_y;
+in vec4 color;
+flat out vec4 vcolor_Stage0;
+noperspective out vec2 varccoord_Stage0;
+void main() {
+ vcolor_Stage0 = color;
+ vec2 corner = corner_and_radius_outsets.xy;
+ vec2 radius_outset = corner_and_radius_outsets.zw;
+ vec2 aa_bloat_direction = aa_bloat_and_coverage.xy;
+ float coverage = aa_bloat_and_coverage.z;
+ float is_linear_coverage = aa_bloat_and_coverage.w;
+ vec2 pixellength = inversesqrt(vec2(dot(skew.xz, skew.xz), dot(skew.yw, skew.yw)));
+ vec4 normalized_axis_dirs = skew * pixellength.xyxy;
+ vec2 axiswidths = abs(normalized_axis_dirs.xy) + abs(normalized_axis_dirs.zw);
+ vec2 aa_bloatradius = (axiswidths * pixellength) * 0.5;
+ vec4 radii_and_neighbors = radii_selector * mat4(radii_x, radii_y, radii_x.yxwz, radii_y.wzyx);
+ vec2 radii = radii_and_neighbors.xy;
+ vec2 neighbor_radii = radii_and_neighbors.zw;
+ if (any(greaterThan(aa_bloatradius, vec2(1.0)))) {
+ corner = max(abs(corner), aa_bloatradius) * sign(corner);
+ coverage /= max(aa_bloatradius.x, 1.0) * max(aa_bloatradius.y, 1.0);
+ radii = vec2(0.0);
+ }
+ if (any(lessThan(radii, aa_bloatradius * 1.25))) {
+ radii = aa_bloatradius;
+ radius_outset = floor(abs(radius_outset)) * radius_outset;
+ is_linear_coverage = 1.0;
+ } else {
+ radii = clamp(radii, pixellength, 2.0 - pixellength);
+ neighbor_radii = clamp(neighbor_radii, pixellength, 2.0 - pixellength);
+ vec2 spacing = (2.0 - radii) - neighbor_radii;
+ vec2 extra_pad = max(pixellength * 0.0625 - spacing, vec2(0.0));
+ radii -= extra_pad * 0.5;
+ }
+ vec2 aa_outset = aa_bloat_direction * aa_bloatradius;
+ vec2 vertexpos = (corner + radius_outset * radii) + aa_outset;
+ mat2 skewmatrix = mat2(skew.xy, skew.zw);
+ vec2 devcoord = vertexpos * skewmatrix + translate;
+ if (0.0 != is_linear_coverage) {
+ varccoord_Stage0.xy = vec2(0.0, coverage);
+ } else {
+ vec2 arccoord = (1.0 - abs(radius_outset)) + (aa_outset / radii) * corner;
+ varccoord_Stage0.xy = vec2(arccoord.x + 1.0, arccoord.y);
+ }
+ gl_Position = vec4(devcoord.x, devcoord.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/73-9.shader_test b/shaders/skia/73-9.shader_test
new file mode 100644
index 0000000..70cb97e
--- /dev/null
+++ b/shaders/skia/73-9.shader_test
@@ -0,0 +1,44 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 ucircle_Stage1;
+flat in vec4 vcolor_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ float d;
+ {
+ d = (length((ucircle_Stage1.xy - gl_FragCoord.xy) * ucircle_Stage1.w) - 1.0) * ucircle_Stage1.z;
+ }
+ {
+ output_Stage1 = vec4(clamp(d, 0.0, 1.0));
+ }
+ }
+ {
+ sk_FragColor = outputColor_Stage0 * output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 position;
+in vec4 color;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/73.shader_test b/shaders/skia/73.shader_test
new file mode 100644
index 0000000..4d993f5
--- /dev/null
+++ b/shaders/skia/73.shader_test
@@ -0,0 +1,62 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 usubset_Stage1_c0_c0;
+uniform vec4 uclamp_Stage1_c0_c0;
+uniform sampler2DRect uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 inCoord = vTransformedCoords_0_Stage0;
+ vec2 subsetCoord;
+ {
+ float w = usubset_Stage1_c0_c0.z - usubset_Stage1_c0_c0.x;
+ float w2 = 2.0 * w;
+ float m = mod(inCoord.x - usubset_Stage1_c0_c0.x, w2);
+ subsetCoord.x = mix(m, w2 - m, step(w, m)) + usubset_Stage1_c0_c0.x;
+ }
+ subsetCoord.y = mod(inCoord.y - usubset_Stage1_c0_c0.y, usubset_Stage1_c0_c0.w - usubset_Stage1_c0_c0.y) + usubset_Stage1_c0_c0.y;
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage1_c0_c0.x, uclamp_Stage1_c0_c0.z);
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage1_c0_c0.y, uclamp_Stage1_c0_c0.w);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float errY = subsetCoord.y - clampedCoord.y;
+ float repeatCoordY = errY > 0.0 ? uclamp_Stage1_c0_c0.y : uclamp_Stage1_c0_c0.w;
+ if (errY != 0.0) {
+ textureColor = mix(textureColor, texture(uTextureSampler_0_Stage1, vec2(clampedCoord.x, repeatCoordY)), abs(errY));
+ }
+ _output = _input * textureColor;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TextureEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/730.shader_test b/shaders/skia/730.shader_test
new file mode 100644
index 0000000..b017a73
--- /dev/null
+++ b/shaders/skia/730.shader_test
@@ -0,0 +1,374 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_KHR_blend_equation_advanced : require
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+layout (blend_support_all_equations) out ;
+uniform vec2 uImageIncrement_Stage1_c0_c0;
+uniform vec4 uKernel_Stage1_c0_c0[4];
+uniform vec2 uKernelOffset_Stage1_c0_c0;
+uniform float uGain_Stage1_c0_c0;
+uniform float uBias_Stage1_c0_c0;
+uniform vec4 uTexDom_Stage1_c0_c0;
+uniform vec3 uDecalParams_Stage1_c0_c0;
+uniform vec4 ucircle_Stage1_c1_c0;
+uniform vec4 uk_Stage2;
+uniform vec4 ucolor_Stage2_c2_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec4 vinCircleEdge_Stage0;
+noperspective in vec4 vinColor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 MatrixConvolution_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 sum = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0 - uKernelOffset_Stage1_c0_c0 * uImageIncrement_Stage1_c0_c0;
+ vec4 c;
+ {
+ float k = uKernel_Stage1_c0_c0[0].x;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0.xy, uTexDom_Stage1_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0[0].y;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0.xy, uTexDom_Stage1_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0[0].z;
+ {
+ vec2 origCoord = coord + vec2(2.0, 0.0) * uImageIncrement_Stage1_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0.xy, uTexDom_Stage1_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0[0].w;
+ {
+ vec2 origCoord = coord + vec2(3.0, 0.0) * uImageIncrement_Stage1_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0.xy, uTexDom_Stage1_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0[1].x;
+ {
+ vec2 origCoord = coord + vec2(4.0, 0.0) * uImageIncrement_Stage1_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0.xy, uTexDom_Stage1_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0[1].y;
+ {
+ vec2 origCoord = coord + vec2(5.0, 0.0) * uImageIncrement_Stage1_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0.xy, uTexDom_Stage1_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0[1].z;
+ {
+ vec2 origCoord = coord + vec2(6.0, 0.0) * uImageIncrement_Stage1_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0.xy, uTexDom_Stage1_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0[1].w;
+ {
+ vec2 origCoord = coord + vec2(7.0, 0.0) * uImageIncrement_Stage1_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0.xy, uTexDom_Stage1_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0[2].x;
+ {
+ vec2 origCoord = coord + vec2(8.0, 0.0) * uImageIncrement_Stage1_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0.xy, uTexDom_Stage1_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0[2].y;
+ {
+ vec2 origCoord = coord + vec2(9.0, 0.0) * uImageIncrement_Stage1_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0.xy, uTexDom_Stage1_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0[2].z;
+ {
+ vec2 origCoord = coord + vec2(10.0, 0.0) * uImageIncrement_Stage1_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0.xy, uTexDom_Stage1_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0[2].w;
+ {
+ vec2 origCoord = coord + vec2(11.0, 0.0) * uImageIncrement_Stage1_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0.xy, uTexDom_Stage1_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0[3].x;
+ {
+ vec2 origCoord = coord + vec2(12.0, 0.0) * uImageIncrement_Stage1_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0.xy, uTexDom_Stage1_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0[3].y;
+ {
+ vec2 origCoord = coord + vec2(13.0, 0.0) * uImageIncrement_Stage1_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0.xy, uTexDom_Stage1_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ _output = sum * uGain_Stage1_c0_c0 + uBias_Stage1_c0_c0;
+ _output.w = clamp(_output.w, 0.0, 1.0);
+ _output.xyz = clamp(_output.xyz, 0.0, _output.w);
+ _output *= _input;
+ return _output;
+}
+vec4 CircleEffect_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ float d;
+ {
+ d = (length((ucircle_Stage1_c1_c0.xy - gl_FragCoord.xy) * ucircle_Stage1_c1_c0.w) - 1.0) * ucircle_Stage1_c1_c0.z;
+ }
+ {
+ _output = _input * clamp(d, 0.0, 1.0);
+ }
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c2_c0(vec4 _input, vec2 _coords) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c2_c0;
+ }
+ return _output;
+}
+float _blend_color_luminance(vec3 color) {
+ return dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), color);
+}
+vec3 _blend_set_color_luminance(vec3 hueSatColor, float alpha, vec3 lumColor) {
+ float lum = _blend_color_luminance(lumColor);
+ vec3 result = (lum - _blend_color_luminance(hueSatColor)) + hueSatColor;
+ float minComp = min(min(result.x, result.y), result.z);
+ float maxComp = max(max(result.x, result.y), result.z);
+ if (minComp < 0.0 && lum != minComp) {
+ result = lum + ((result - lum) * lum) / (lum - minComp);
+ }
+ if (maxComp > alpha && maxComp != lum) {
+ return lum + ((result - lum) * (alpha - lum)) / (maxComp - lum);
+ }
+ return result;
+}
+vec4 blend_luminosity(vec4 src, vec4 dst) {
+ float alpha = dst.w * src.w;
+ vec3 sda = src.xyz * dst.w;
+ vec3 dsa = dst.xyz * src.w;
+ return vec4((((_blend_set_color_luminance(dsa, alpha, sda) + dst.xyz) - dsa) + src.xyz) - sda, (src.w + dst.w) - alpha);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ vec4 circleEdge;
+ circleEdge = vinCircleEdge_Stage0;
+ outputColor_Stage0 = vinColor_Stage0;
+ float d = length(circleEdge.xy);
+ float distanceToOuterEdge = circleEdge.z * (1.0 - d);
+ float edgeAlpha = clamp(distanceToOuterEdge, 0.0, 1.0);
+ float distanceToInnerEdge = circleEdge.z * (d - circleEdge.w);
+ float innerAlpha = clamp(distanceToInnerEdge, 0.0, 1.0);
+ edgeAlpha *= innerAlpha;
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_luminosity(MatrixConvolution_Stage1_c0_c0(inputColor), CircleEffect_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ vec4 dst = ConstColorProcessor_Stage2_c2_c0(vec4(1.0), vTransformedCoords_1_Stage0);
+ output_Stage2 = clamp((((uk_Stage2.x * output_Stage2) * dst + uk_Stage2.y * output_Stage2) + uk_Stage2.z * dst) + uk_Stage2.w, 0.0, 1.0);
+ }
+ vec4 output_Stage3;
+ {
+ output_Stage3 = outputCoverage_Stage0;
+ }
+ {
+ sk_FragColor = output_Stage3 * output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec4 inCircleEdge;
+noperspective out vec4 vinCircleEdge_Stage0;
+noperspective out vec4 vinColor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vinCircleEdge_Stage0 = inCircleEdge;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/733.shader_test b/shaders/skia/733.shader_test
new file mode 100644
index 0000000..a03002a
--- /dev/null
+++ b/shaders/skia/733.shader_test
@@ -0,0 +1,26 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uColor_Stage0;
+void main() {
+ {
+ sk_FragColor = vec4(1.0);
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 inPosition;
+void main() {
+ vec2 pos2 = (uViewM_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/739.shader_test b/shaders/skia/739.shader_test
new file mode 100644
index 0000000..9eeb87e
--- /dev/null
+++ b/shaders/skia/739.shader_test
@@ -0,0 +1,47 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+noperspective in vec2 vEllipseOffsets_Stage0;
+noperspective in vec4 vEllipseRadii_Stage0;
+noperspective in vec4 vinColor_Stage0;
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ vec2 offset = vEllipseOffsets_Stage0;
+ float test = dot(offset, offset) - 1.0;
+ vec2 grad = (2.0 * offset) * vEllipseRadii_Stage0.xy;
+ float grad_dot = dot(grad, grad);
+ grad_dot = max(grad_dot, 1.1754999560161448e-38);
+ float invlen = inversesqrt(grad_dot);
+ float edgeAlpha = clamp(0.5 - test * invlen, 0.0, 1.0);
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ {
+ sk_FragColor = outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 inPosition;
+in vec4 inColor;
+in vec2 inEllipseOffset;
+in vec4 inEllipseRadii;
+noperspective out vec2 vEllipseOffsets_Stage0;
+noperspective out vec4 vEllipseRadii_Stage0;
+noperspective out vec4 vinColor_Stage0;
+void main() {
+ vEllipseOffsets_Stage0 = inEllipseOffset;
+ vEllipseRadii_Stage0 = inEllipseRadii;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = inPosition;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/745.shader_test b/shaders/skia/745.shader_test
new file mode 100644
index 0000000..7e7b2b8
--- /dev/null
+++ b/shaders/skia/745.shader_test
@@ -0,0 +1,168 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_KHR_blend_equation_advanced : require
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+layout (blend_support_all_equations) out ;
+uniform vec4 uboundsUniform_Stage1_c0_c0_c0_c0_c0_c0;
+uniform float uxInvZoom_Stage1_c0_c0_c0_c0_c0_c0;
+uniform float uyInvZoom_Stage1_c0_c0_c0_c0_c0_c0;
+uniform float uxInvInset_Stage1_c0_c0_c0_c0_c0_c0;
+uniform float uyInvInset_Stage1_c0_c0_c0_c0_c0_c0;
+uniform vec2 uoffset_Stage1_c0_c0_c0_c0_c0_c0;
+uniform float ucornerRadius_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 uproxyRect_Stage1_c0_c0_c0_c0_c1_c0;
+uniform float ublurRadius_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec3 uedges_Stage1_c1_c0_c0_c0[2];
+uniform vec4 ucolor_Stage1_c1_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 MagnifierEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coord = vTransformedCoords_0_Stage0;
+ vec2 zoom_coord = uoffset_Stage1_c0_c0_c0_c0_c0_c0 + coord * vec2(uxInvZoom_Stage1_c0_c0_c0_c0_c0_c0, uyInvZoom_Stage1_c0_c0_c0_c0_c0_c0);
+ vec2 delta = (coord - uboundsUniform_Stage1_c0_c0_c0_c0_c0_c0.xy) * uboundsUniform_Stage1_c0_c0_c0_c0_c0_c0.zw;
+ delta = min(delta, vec2(1.0, 1.0) - delta);
+ delta *= vec2(uxInvInset_Stage1_c0_c0_c0_c0_c0_c0, uyInvInset_Stage1_c0_c0_c0_c0_c0_c0);
+ float weight = 0.0;
+ if (delta.x < 2.0 && delta.y < 2.0) {
+ delta = vec2(2.0, 2.0) - delta;
+ float dist = length(delta);
+ dist = max(2.0 - dist, 0.0);
+ weight = min(dist * dist, 1.0);
+ } else {
+ vec2 delta_squared = delta * delta;
+ weight = min(min(delta_squared.x, delta_squared.y), 1.0);
+ }
+ _output = texture(uTextureSampler_0_Stage1, mix(coord, zoom_coord, weight));
+ return _output;
+}
+vec4 RRectBlurEffect_Stage1_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 translatedFragPos = gl_FragCoord.xy - uproxyRect_Stage1_c0_c0_c0_c0_c1_c0.xy;
+ float threshold = ucornerRadius_Stage1_c0_c0_c0_c0_c1_c0 + 2.0 * ublurRadius_Stage1_c0_c0_c0_c0_c1_c0;
+ vec2 middle = (uproxyRect_Stage1_c0_c0_c0_c0_c1_c0.zw - uproxyRect_Stage1_c0_c0_c0_c0_c1_c0.xy) - 2.0 * threshold;
+ if (translatedFragPos.x >= threshold && translatedFragPos.x < middle.x + threshold) {
+ translatedFragPos.x = threshold;
+ } else if (translatedFragPos.x >= middle.x + threshold) {
+ translatedFragPos.x -= middle.x - 1.0;
+ }
+ if (translatedFragPos.y > threshold && translatedFragPos.y < middle.y + threshold) {
+ translatedFragPos.y = threshold;
+ } else if (translatedFragPos.y >= middle.y + threshold) {
+ translatedFragPos.y -= middle.y - 1.0;
+ }
+ vec2 proxyDims = vec2(2.0 * threshold + 1.0);
+ vec2 texCoord = translatedFragPos / proxyDims;
+ _output = _input * texture(uTextureSampler_1_Stage1, texCoord);
+ return _output;
+}
+vec4 blend_plus(vec4 src, vec4 dst) {
+ return min(src + dst, 1.0);
+}
+vec4 ComposeTwo_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_plus(MagnifierEffect_Stage1_c0_c0_c0_c0_c0_c0(inputColor), RRectBlurEffect_Stage1_c0_c0_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 Big_Ole_Key_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = _input;
+ return _output;
+}
+float _blend_overlay_component(float sc, float sa, float dc, float da) {
+ if (2.0 * dc <= da) {
+ return (2.0 * sc) * dc;
+ }
+ return sa * da - (2.0 * (da - dc)) * (sa - sc);
+}
+vec4 blend_overlay(vec4 src, vec4 dst) {
+ vec4 result = vec4(_blend_overlay_component(src.x, src.w, dst.x, dst.w), _blend_overlay_component(src.y, src.w, dst.y, dst.w), _blend_overlay_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+ result.xyz += dst.xyz * (1.0 - src.w) + src.xyz * (1.0 - dst.w);
+ return result;
+}
+vec4 blend_hard_light(vec4 src, vec4 dst) {
+ return blend_overlay(dst, src);
+}
+vec4 ComposeTwo_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_hard_light(ComposeTwo_Stage1_c0_c0_c0_c0(inputColor), Big_Ole_Key_Stage1_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 ConvexPoly_Stage1_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float alpha = 1.0;
+ float edge;
+ edge = dot(uedges_Stage1_c1_c0_c0_c0[0], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage1_c1_c0_c0_c0[1], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ _output = _input * alpha;
+ return _output;
+}
+vec4 ConstColorProcessor_Stage1_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage1_c1_c0_c1_c0;
+ }
+ return _output;
+}
+vec4 blend_multiply(vec4 src, vec4 dst) {
+ return vec4(((1.0 - src.w) * dst.xyz + (1.0 - dst.w) * src.xyz) + src.xyz * dst.xyz, src.w + (1.0 - src.w) * dst.w);
+}
+vec4 ComposeTwo_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_multiply(ConvexPoly_Stage1_c1_c0_c0_c0(inputColor), ConstColorProcessor_Stage1_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_multiply(ComposeTwo_Stage1_c0_c0(inputColor), ComposeTwo_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec2 inLocalCoord;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 color = inColor;
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/748.shader_test b/shaders/skia/748.shader_test
new file mode 100644
index 0000000..6649bed
--- /dev/null
+++ b/shaders/skia/748.shader_test
@@ -0,0 +1,46 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform sampler2D uTextureSampler_0_Stage0;
+noperspective in vec2 vtextureCoords_Stage0;
+flat in vec4 vtextureDomain_Stage0;
+flat in vec4 vcolor_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ vec2 textureCoords;
+ textureCoords = vtextureCoords_Stage0;
+ vec4 textureDomain;
+ textureDomain = vtextureDomain_Stage0;
+ outputColor_Stage0 = vcolor_Stage0;
+ outputColor_Stage0 = texture(uTextureSampler_0_Stage0, clamp(textureCoords, textureDomain.xy, textureDomain.zw)) * outputColor_Stage0;
+ }
+ {
+ sk_FragColor = vec4(1.0);
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 position;
+in vec2 textureCoords;
+in vec4 textureDomain;
+in vec4 color;
+noperspective out vec2 vtextureCoords_Stage0;
+flat out vec4 vtextureDomain_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vec2 pos2 = position;
+ vtextureCoords_Stage0 = textureCoords;
+ vtextureDomain_Stage0 = textureDomain;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/751-1.shader_test b/shaders/skia/751-1.shader_test
new file mode 100644
index 0000000..859c67b
--- /dev/null
+++ b/shaders/skia/751-1.shader_test
@@ -0,0 +1,101 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage2_c0_c0;
+uniform vec4 urightBorderColor_Stage2_c0_c0;
+uniform vec4 uscale0_1_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage2_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage2_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage2_c0_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 LinearGradientLayout_Stage2_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_1_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage2_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage2_c0_c0_c1_c0;
+ bias = ubias0_1_Stage2_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage2_c0_c0_c1_c0;
+ bias = ubias2_3_Stage2_c0_c0_c1_c0;
+ }
+ } else {
+ {
+ scale = uscale4_5_Stage2_c0_c0_c1_c0;
+ bias = ubias4_5_Stage2_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage2_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage2_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage2_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage2_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_dst_in(output_Stage1, ClampedGradientEffect_Stage2_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/754.shader_test b/shaders/skia/754.shader_test
new file mode 100644
index 0000000..28a6418
--- /dev/null
+++ b/shaders/skia/754.shader_test
@@ -0,0 +1,452 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 urectH_Stage1_c0_c0;
+uniform float uinvSixSigma_Stage1_c0_c0;
+uniform vec2 uImageIncrement_Stage1_c1_c0;
+uniform vec4 uKernel_Stage1_c1_c0[5];
+uniform vec2 uKernelOffset_Stage1_c1_c0;
+uniform float uGain_Stage1_c1_c0;
+uniform float uBias_Stage1_c1_c0;
+uniform vec4 uTexDom_Stage1_c1_c0;
+uniform vec3 uDecalParams_Stage1_c1_c0;
+uniform vec2 uDstTextureUpperLeft_Stage2;
+uniform vec2 uDstTextureCoordScale_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+uniform sampler2D uDstTextureSampler_Stage2;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in float vinCoverage_Stage0;
+vec4 RectBlurEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ float xCoverage, yCoverage;
+ {
+ float x, y;
+ {
+ x = max(urectH_Stage1_c0_c0.x - gl_FragCoord.x, gl_FragCoord.x - urectH_Stage1_c0_c0.z);
+ y = max(urectH_Stage1_c0_c0.y - gl_FragCoord.y, gl_FragCoord.y - urectH_Stage1_c0_c0.w);
+ }
+ xCoverage = texture(uTextureSampler_0_Stage1, vec2(x * uinvSixSigma_Stage1_c0_c0, 0.5)).w;
+ yCoverage = texture(uTextureSampler_0_Stage1, vec2(y * uinvSixSigma_Stage1_c0_c0, 0.5)).w;
+ _output = (_input * xCoverage) * yCoverage;
+ }
+ _output = (_input * xCoverage) * yCoverage;
+ return _output;
+}
+vec4 MatrixConvolution_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 sum = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0 - uKernelOffset_Stage1_c1_c0 * uImageIncrement_Stage1_c1_c0;
+ vec4 c;
+ {
+ float k = uKernel_Stage1_c1_c0[0].x;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0.xy, uTexDom_Stage1_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0[0].y;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0.xy, uTexDom_Stage1_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0[0].z;
+ {
+ vec2 origCoord = coord + vec2(2.0, 0.0) * uImageIncrement_Stage1_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0.xy, uTexDom_Stage1_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0[0].w;
+ {
+ vec2 origCoord = coord + vec2(3.0, 0.0) * uImageIncrement_Stage1_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0.xy, uTexDom_Stage1_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0[1].x;
+ {
+ vec2 origCoord = coord + vec2(4.0, 0.0) * uImageIncrement_Stage1_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0.xy, uTexDom_Stage1_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0[1].y;
+ {
+ vec2 origCoord = coord + vec2(5.0, 0.0) * uImageIncrement_Stage1_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0.xy, uTexDom_Stage1_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0[1].z;
+ {
+ vec2 origCoord = coord + vec2(6.0, 0.0) * uImageIncrement_Stage1_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0.xy, uTexDom_Stage1_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0[1].w;
+ {
+ vec2 origCoord = coord + vec2(7.0, 0.0) * uImageIncrement_Stage1_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0.xy, uTexDom_Stage1_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0[2].x;
+ {
+ vec2 origCoord = coord + vec2(8.0, 0.0) * uImageIncrement_Stage1_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0.xy, uTexDom_Stage1_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0[2].y;
+ {
+ vec2 origCoord = coord + vec2(9.0, 0.0) * uImageIncrement_Stage1_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0.xy, uTexDom_Stage1_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0[2].z;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0.xy, uTexDom_Stage1_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0[2].w;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0.xy, uTexDom_Stage1_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0[3].x;
+ {
+ vec2 origCoord = coord + vec2(2.0, 1.0) * uImageIncrement_Stage1_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0.xy, uTexDom_Stage1_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0[3].y;
+ {
+ vec2 origCoord = coord + vec2(3.0, 1.0) * uImageIncrement_Stage1_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0.xy, uTexDom_Stage1_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0[3].z;
+ {
+ vec2 origCoord = coord + vec2(4.0, 1.0) * uImageIncrement_Stage1_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0.xy, uTexDom_Stage1_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0[3].w;
+ {
+ vec2 origCoord = coord + vec2(5.0, 1.0) * uImageIncrement_Stage1_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0.xy, uTexDom_Stage1_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0[4].x;
+ {
+ vec2 origCoord = coord + vec2(6.0, 1.0) * uImageIncrement_Stage1_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0.xy, uTexDom_Stage1_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0[4].y;
+ {
+ vec2 origCoord = coord + vec2(7.0, 1.0) * uImageIncrement_Stage1_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0.xy, uTexDom_Stage1_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0[4].z;
+ {
+ vec2 origCoord = coord + vec2(8.0, 1.0) * uImageIncrement_Stage1_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0.xy, uTexDom_Stage1_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0[4].w;
+ {
+ vec2 origCoord = coord + vec2(9.0, 1.0) * uImageIncrement_Stage1_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0.xy, uTexDom_Stage1_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ _output = sum * uGain_Stage1_c1_c0 + uBias_Stage1_c1_c0;
+ _output.w = clamp(_output.w, 0.0, 1.0);
+ _output.xyz = clamp(_output.xyz, 0.0, _output.w);
+ _output *= _input;
+ return _output;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 blend_lighten(vec4 src, vec4 dst) {
+ vec4 result = blend_src_over(src, dst);
+ result.xyz = max(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
+ return result;
+}
+vec4 blend_src(vec4 src, vec4 dst) {
+ return src;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ float alpha = 1.0;
+ alpha = vinCoverage_Stage0;
+ outputCoverage_Stage0 = vec4(alpha);
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_lighten(RectBlurEffect_Stage1_c0_c0(inputColor), MatrixConvolution_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ if (all(lessThanEqual(outputCoverage_Stage0.xyz, vec3(0.0)))) {
+ discard;
+ }
+ vec2 _dstTexCoord = (gl_FragCoord.xy - uDstTextureUpperLeft_Stage2) * uDstTextureCoordScale_Stage2;
+ _dstTexCoord.y = 1.0 - _dstTexCoord.y;
+ vec4 _dstColor = texture(uDstTextureSampler_Stage2, _dstTexCoord);
+ sk_FragColor = blend_src(output_Stage1, _dstColor);
+ sk_FragColor = outputCoverage_Stage0 * sk_FragColor + (vec4(1.0) - outputCoverage_Stage0) * _dstColor;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in float inCoverage;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out float vinCoverage_Stage0;
+void main() {
+ vec4 color = inColor;
+ vcolor_Stage0 = color;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ vinCoverage_Stage0 = inCoverage;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/757-1.shader_test b/shaders/skia/757-1.shader_test
new file mode 100644
index 0000000..d960282
--- /dev/null
+++ b/shaders/skia/757-1.shader_test
@@ -0,0 +1,98 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uscale0_1_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage2_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage2_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage2_c0_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 LinearGradientLayout_Stage2_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_1_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage2_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage2_c0_c0_c1_c0;
+ bias = ubias0_1_Stage2_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage2_c0_c0_c1_c0;
+ bias = ubias2_3_Stage2_c0_c0_c1_c0;
+ }
+ } else {
+ {
+ scale = uscale4_5_Stage2_c0_c0_c1_c0;
+ bias = ubias4_5_Stage2_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage2_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ t.x = fract(t.x);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage2_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_dst_in(output_Stage1, TiledGradientEffect_Stage2_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/757.shader_test b/shaders/skia/757.shader_test
new file mode 100644
index 0000000..c3b6bda
--- /dev/null
+++ b/shaders/skia/757.shader_test
@@ -0,0 +1,112 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform float uSrcTF_Stage0[7];
+uniform mat3 uColorXform_Stage0;
+uniform float uDstTF_Stage0[7];
+uniform vec4 uinnerRect_Stage2;
+uniform vec2 uradiusPlusHalf_Stage2;
+uniform sampler2D uTextureSampler_0_Stage0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vtextureCoords_Stage0;
+flat in vec4 vtextureDomain_Stage0;
+flat in vec4 vcolor_Stage0;
+float src_tf_Stage0(float x) {
+ float G = uSrcTF_Stage0[0];
+ float A = uSrcTF_Stage0[1];
+ float B = uSrcTF_Stage0[2];
+ float C = uSrcTF_Stage0[3];
+ float D = uSrcTF_Stage0[4];
+ float E = uSrcTF_Stage0[5];
+ float F = uSrcTF_Stage0[6];
+ float s = sign(x);
+ x = abs(x);
+ x = x < D ? C * x + F : pow(A * x + B, G) + E;
+ return s * x;
+}
+float dst_tf_Stage0(float x) {
+ float G = uDstTF_Stage0[0];
+ float A = uDstTF_Stage0[1];
+ float B = uDstTF_Stage0[2];
+ float C = uDstTF_Stage0[3];
+ float D = uDstTF_Stage0[4];
+ float E = uDstTF_Stage0[5];
+ float F = uDstTF_Stage0[6];
+ float s = sign(x);
+ x = abs(x);
+ x = x < D ? C * x + F : pow(A * x + B, G) + E;
+ return s * x;
+}
+vec4 gamut_xform_Stage0(vec4 color) {
+ color.xyz = uColorXform_Stage0 * color.xyz;
+ return color;
+}
+vec4 color_xform_Stage0(vec4 color) {
+ float nonZeroAlpha = max(color.w, 9.9999997473787516e-05);
+ color = vec4(color.xyz / nonZeroAlpha, nonZeroAlpha);
+ color.x = src_tf_Stage0(color.x);
+ color.y = src_tf_Stage0(color.y);
+ color.z = src_tf_Stage0(color.z);
+ color = gamut_xform_Stage0(color);
+ color.x = dst_tf_Stage0(color.x);
+ color.y = dst_tf_Stage0(color.y);
+ color.z = dst_tf_Stage0(color.z);
+ color.xyz *= color.w;
+ return color;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ vec2 textureCoords;
+ textureCoords = vtextureCoords_Stage0;
+ vec4 textureDomain;
+ textureDomain = vtextureDomain_Stage0;
+ outputColor_Stage0 = vcolor_Stage0;
+ outputColor_Stage0 = color_xform_Stage0(texture(uTextureSampler_0_Stage0, clamp(textureCoords, textureDomain.xy, textureDomain.zw))) * outputColor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ vec2 dxy0 = uinnerRect_Stage2.xy - gl_FragCoord.xy;
+ vec2 dxy1 = gl_FragCoord.xy - uinnerRect_Stage2.zw;
+ vec2 dxy = max(max(dxy0, dxy1), 0.0);
+ float alpha = clamp(uradiusPlusHalf_Stage2.x - length(dxy), 0.0, 1.0);
+ alpha = 1.0 - alpha;
+ output_Stage2 = output_Stage1 * alpha;
+ }
+ {
+ sk_FragColor = 1.0 - output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 textureCoords;
+in vec4 textureDomain;
+in vec4 color;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vtextureCoords_Stage0;
+flat out vec4 vtextureDomain_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vec2 pos2 = position;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(textureCoords, 1.0)).xy;
+ vtextureCoords_Stage0 = textureCoords;
+ vtextureDomain_Stage0 = textureDomain;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/76-1.shader_test b/shaders/skia/76-1.shader_test
new file mode 100644
index 0000000..a6b01fc
--- /dev/null
+++ b/shaders/skia/76-1.shader_test
@@ -0,0 +1,50 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 TextureEffect_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage2, vTransformedCoords_1_Stage0) * _input;
+ return _output;
+}
+vec4 blend_multiply(vec4 src, vec4 dst) {
+ return vec4(((1.0 - src.w) * dst.xyz + (1.0 - dst.w) * src.xyz) + src.xyz * dst.xyz, src.w + (1.0 - src.w) * dst.w);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_multiply(output_Stage1, TextureEffect_Stage2_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/76-10.shader_test b/shaders/skia/76-10.shader_test
new file mode 100644
index 0000000..2bc8507
--- /dev/null
+++ b/shaders/skia/76-10.shader_test
@@ -0,0 +1,92 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage2_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c1_c0;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+vec4 blend_dst_over(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src + dst;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_dst_in(outputColor_Stage0, ClampedGradientEffect_Stage1_c0_c0(vec4(1.0)));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_dst_over(ConstColorProcessor_Stage2_c1_c0(vec4(1.0)), output_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/76-11.shader_test b/shaders/skia/76-11.shader_test
new file mode 100644
index 0000000..e2627d2
--- /dev/null
+++ b/shaders/skia/76-11.shader_test
@@ -0,0 +1,44 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform float uPixelSize_Stage1;
+uniform vec2 uRange_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = vec4(1.0, 1.0, 1.0, 1.0);
+ vec2 coord = vTransformedCoords_0_Stage0;
+ coord.y -= 8.0 * uPixelSize_Stage1;
+ float highBound = min(uRange_Stage1.y, coord.y + 16.0 * uPixelSize_Stage1);
+ coord.y = max(uRange_Stage1.x, coord.y);
+ for (int i = 0;i < 17; i++) {
+ output_Stage1 = min(output_Stage1, texture(uTextureSampler_0_Stage1, coord));
+ coord.y += uPixelSize_Stage1;
+ coord.y = min(highBound, coord.y);
+ }
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/76-12.shader_test b/shaders/skia/76-12.shader_test
new file mode 100644
index 0000000..43dcc9a
--- /dev/null
+++ b/shaders/skia/76-12.shader_test
@@ -0,0 +1,153 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform float uSurfaceScale_Stage1;
+uniform vec3 uLightColor_Stage1;
+uniform float uKD_Stage1;
+uniform vec3 uLightLocation_Stage1;
+uniform float uExponent_Stage1;
+uniform float uCosInnerConeAngle_Stage1;
+uniform float uCosOuterConeAngle_Stage1;
+uniform float uConeScale_Stage1;
+uniform vec3 uS_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 light_Stage1(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ float colorScale = uKD_Stage1 * dot(normal, surfaceToLight);
+ return vec4(lightColor * clamp(colorScale, 0.0, 1.0), 1.0);
+}
+float sobel_Stage1(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage1(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage1(float m[9], float surfaceScale) {
+ return pointToNormal_Stage1(sobel_Stage1(m[0], m[1], m[3], m[4], m[6], m[7], 0.5), sobel_Stage1(m[0], m[6], m[1], m[7], 0.0, 0.0, 0.33333298563957214), surfaceScale);
+}
+vec3 lightColor_Stage1(vec3 surfaceToLight) {
+ float cosAngle = -dot(surfaceToLight, uS_Stage1);
+ if (cosAngle < uCosOuterConeAngle_Stage1) {
+ return vec3(0.0);
+ }
+ float scale = pow(cosAngle, uExponent_Stage1);
+ if (cosAngle < uCosInnerConeAngle_Stage1) {
+ return ((uLightColor_Stage1 * scale) * (cosAngle - uCosOuterConeAngle_Stage1)) * uConeScale_Stage1;
+ }
+ return uLightColor_Stage1;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ vec2 coord = vTransformedCoords_0_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp0 = textureColor;
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp1 = textureColor;
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp2 = textureColor;
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp3 = textureColor;
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp4 = textureColor;
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp5 = textureColor;
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp6 = textureColor;
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp7 = textureColor;
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp8 = textureColor;
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = normalize(uLightLocation_Stage1 - vec3(gl_FragCoord.xy, uSurfaceScale_Stage1 * m[4]));
+ output_Stage1 = light_Stage1(normal_Stage1(m, uSurfaceScale_Stage1), surfaceToLight, lightColor_Stage1(surfaceToLight));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/76-13.shader_test b/shaders/skia/76-13.shader_test
new file mode 100644
index 0000000..b10a421
--- /dev/null
+++ b/shaders/skia/76-13.shader_test
@@ -0,0 +1,67 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec2 uDstTextureUpperLeft_Stage1;
+uniform vec2 uDstTextureCoordScale_Stage1;
+uniform sampler2D uTextureSampler_0_Stage0;
+uniform sampler2D uDstTextureSampler_Stage1;
+noperspective in vec2 vTextureCoords_Stage0;
+flat in int vTexIndex_Stage0;
+noperspective in vec4 vinColor_Stage0;
+vec4 blend_exclusion(vec4 src, vec4 dst) {
+ return vec4((dst.xyz + src.xyz) - (2.0 * dst.xyz) * src.xyz, src.w + (1.0 - src.w) * dst.w);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vinColor_Stage0;
+ vec4 texColor;
+ {
+ texColor = texture(uTextureSampler_0_Stage0, vTextureCoords_Stage0);
+ }
+ outputCoverage_Stage0 = texColor;
+ }
+ {
+ if (all(lessThanEqual(outputCoverage_Stage0.xyz, vec3(0.0)))) {
+ discard;
+ }
+ vec2 _dstTexCoord = (gl_FragCoord.xy - uDstTextureUpperLeft_Stage1) * uDstTextureCoordScale_Stage1;
+ _dstTexCoord.y = 1.0 - _dstTexCoord.y;
+ vec4 _dstColor = texture(uDstTextureSampler_Stage1, _dstTexCoord);
+ sk_FragColor = blend_exclusion(outputColor_Stage0, _dstColor);
+ float lerpRed = mix(_dstColor.w, sk_FragColor.w, outputCoverage_Stage0.x);
+ float lerpBlue = mix(_dstColor.w, sk_FragColor.w, outputCoverage_Stage0.y);
+ float lerpGreen = mix(_dstColor.w, sk_FragColor.w, outputCoverage_Stage0.z);
+ sk_FragColor = outputCoverage_Stage0 * sk_FragColor + (vec4(1.0) - outputCoverage_Stage0) * _dstColor;
+ sk_FragColor.w = max(max(lerpRed, lerpBlue), lerpGreen);
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform vec2 uAtlasSizeInv_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in uvec2 inTextureCoords;
+noperspective out vec2 vTextureCoords_Stage0;
+flat out int vTexIndex_Stage0;
+noperspective out vec4 vinColor_Stage0;
+void main() {
+ ivec2 signedCoords = ivec2(int(inTextureCoords.x), int(inTextureCoords.y));
+ vec2 unormTexCoords = vec2(float(signedCoords.x / 2), float(signedCoords.y / 2));
+ vTextureCoords_Stage0 = unormTexCoords * uAtlasSizeInv_Stage0;
+ vTexIndex_Stage0 = 0;
+ vinColor_Stage0 = inColor;
+ gl_Position = vec4(inPosition.x, inPosition.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/76-14.shader_test b/shaders/skia/76-14.shader_test
new file mode 100644
index 0000000..beb7ce1
--- /dev/null
+++ b/shaders/skia/76-14.shader_test
@@ -0,0 +1,70 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uCoordTransformMatrix_2_Stage0;
+uniform vec4 uborder_Stage1;
+uniform vec4 usubset_Stage1;
+uniform vec4 unorm_Stage1;
+uniform vec4 uk_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 TextureEffect_Stage2_c0_c0(vec4 _input, vec2 _coords) {
+ _coords = _coords * uCoordTransformMatrix_2_Stage0.xz + uCoordTransformMatrix_2_Stage0.yw;
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage2, _coords) * _input;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ vec2 inCoord = vTransformedCoords_0_Stage0;
+ inCoord *= unorm_Stage1.xy;
+ vec2 subsetCoord;
+ subsetCoord.x = inCoord.x;
+ subsetCoord.y = inCoord.y;
+ vec2 clampedCoord;
+ clampedCoord.x = subsetCoord.x;
+ clampedCoord.y = subsetCoord.y;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord * unorm_Stage1.zw);
+ if (inCoord.x < usubset_Stage1.x || inCoord.x > usubset_Stage1.z) {
+ textureColor = uborder_Stage1;
+ }
+ if (inCoord.y < usubset_Stage1.y || inCoord.y > usubset_Stage1.w) {
+ textureColor = uborder_Stage1;
+ }
+ output_Stage1 = textureColor;
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ vec4 dst = TextureEffect_Stage2_c0_c0(vec4(1.0), vTransformedCoords_1_Stage0);
+ output_Stage2 = clamp((((uk_Stage2.x * output_Stage2) * dst + uk_Stage2.y * output_Stage2) + uk_Stage2.z * dst) + uk_Stage2.w, 0.0, 1.0);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/76-19.shader_test b/shaders/skia/76-19.shader_test
new file mode 100644
index 0000000..93f1ac8
--- /dev/null
+++ b/shaders/skia/76-19.shader_test
@@ -0,0 +1,68 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uborder_Stage2_c0_c0;
+uniform vec4 usubset_Stage2_c0_c0;
+uniform vec4 unorm_Stage2_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 TextureEffect_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 inCoord = vTransformedCoords_1_Stage0;
+ inCoord *= unorm_Stage2_c0_c0.xy;
+ vec2 subsetCoord;
+ subsetCoord.x = inCoord.x;
+ subsetCoord.y = inCoord.y;
+ vec2 clampedCoord;
+ clampedCoord.x = subsetCoord.x;
+ clampedCoord.y = subsetCoord.y;
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord * unorm_Stage2_c0_c0.zw);
+ if (inCoord.x < usubset_Stage2_c0_c0.x || inCoord.x > usubset_Stage2_c0_c0.z) {
+ textureColor = uborder_Stage2_c0_c0;
+ }
+ if (inCoord.y < usubset_Stage2_c0_c0.y || inCoord.y > usubset_Stage2_c0_c0.w) {
+ textureColor = uborder_Stage2_c0_c0;
+ }
+ _output = _input * textureColor;
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_src_in(output_Stage1, TextureEffect_Stage2_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/76-2.shader_test b/shaders/skia/76-2.shader_test
new file mode 100644
index 0000000..cd20df9
--- /dev/null
+++ b/shaders/skia/76-2.shader_test
@@ -0,0 +1,96 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uclamp_Stage1_c0_c0_c0_c0;
+uniform vec4 uclamp_Stage1_c0_c0_c1_c0;
+uniform mat4 um_Stage2;
+uniform vec4 uv_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 inCoord = vTransformedCoords_0_Stage0;
+ vec2 subsetCoord;
+ subsetCoord.x = inCoord.x;
+ subsetCoord.y = inCoord.y;
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage1_c0_c0_c0_c0.x, uclamp_Stage1_c0_c0_c0_c0.z);
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage1_c0_c0_c0_c0.y, uclamp_Stage1_c0_c0_c0_c0.w);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ _output = _input * textureColor;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 inCoord = vTransformedCoords_1_Stage0;
+ vec2 subsetCoord;
+ subsetCoord.x = inCoord.x;
+ subsetCoord.y = inCoord.y;
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage1_c0_c0_c1_c0.x, uclamp_Stage1_c0_c0_c1_c0.z);
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage1_c0_c0_c1_c0.y, uclamp_Stage1_c0_c0_c1_c0.w);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ _output = _input * textureColor;
+ return _output;
+}
+vec4 YUVtoRGBEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 planes[2];
+ planes[0] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0));
+ planes[1] = TextureEffect_Stage1_c0_c0_c1_c0(vec4(1.0));
+ vec4 color = vec4(planes[0].x, planes[1].y, planes[1].x, 1.0);
+ _output = color;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = YUVtoRGBEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ vec4 inputColor = output_Stage1;
+ {
+ float nonZeroAlpha = max(inputColor.w, 9.9999997473787516e-05);
+ inputColor = vec4(inputColor.xyz / nonZeroAlpha, inputColor.w);
+ }
+ output_Stage2 = um_Stage2 * inputColor + uv_Stage2;
+ {
+ output_Stage2 = clamp(output_Stage2, 0.0, 1.0);
+ }
+ {
+ output_Stage2.xyz *= output_Stage2.w;
+ }
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/76-23.shader_test b/shaders/skia/76-23.shader_test
new file mode 100644
index 0000000..2f863f6
--- /dev/null
+++ b/shaders/skia/76-23.shader_test
@@ -0,0 +1,42 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uclamp_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ vec2 inCoord = vTransformedCoords_0_Stage0;
+ vec2 subsetCoord;
+ subsetCoord.x = inCoord.x;
+ subsetCoord.y = inCoord.y;
+ vec2 clampedCoord;
+ clampedCoord.x = subsetCoord.x;
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage1.y, uclamp_Stage1.w);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ output_Stage1 = textureColor;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/76-24.shader_test b/shaders/skia/76-24.shader_test
new file mode 100644
index 0000000..e9a5206
--- /dev/null
+++ b/shaders/skia/76-24.shader_test
@@ -0,0 +1,115 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 uscale01_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias01_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale23_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias23_Stage1_c0_c0_c1_c0;
+uniform float uthreshold_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_0_Stage0;
+ float t = -1.0;
+ float v = 1.0;
+ {
+ {
+ float invR1 = ufocalParams_Stage1_c0_c0_c0_c0.x;
+ float fx = ufocalParams_Stage1_c0_c0_c0_c0.y;
+ float x_t = -1.0;
+ {
+ float temp = p.x * p.x - p.y * p.y;
+ if (temp >= 0.0) {
+ {
+ x_t = -sqrt(temp) - p.x * invR1;
+ }
+ }
+ }
+ {
+ if (x_t <= 0.0) {
+ v = -1.0;
+ }
+ }
+ {
+ {
+ t = -x_t + fx;
+ }
+ }
+ }
+ }
+ _output = vec4(t, v, 0.0, 0.0);
+ return _output;
+}
+vec4 DualIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthreshold_Stage1_c0_c0_c1_c0) {
+ scale = uscale01_Stage1_c0_c0_c1_c0;
+ bias = ubias01_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale23_Stage1_c0_c0_c1_c0;
+ bias = ubias23_Stage1_c0_c0_c1_c0;
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = DualIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_dst_in(outputColor_Stage0, ClampedGradientEffect_Stage1_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/76-25.shader_test b/shaders/skia/76-25.shader_test
new file mode 100644
index 0000000..6c93a29
--- /dev/null
+++ b/shaders/skia/76-25.shader_test
@@ -0,0 +1,131 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 uscale01_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias01_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale23_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias23_Stage1_c0_c0_c1_c0;
+uniform float uthreshold_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_0_Stage0;
+ float t = -1.0;
+ float v = 1.0;
+ {
+ {
+ float invR1 = ufocalParams_Stage1_c0_c0_c0_c0.x;
+ float fx = ufocalParams_Stage1_c0_c0_c0_c0.y;
+ float x_t = -1.0;
+ {
+ float temp = p.x * p.x - p.y * p.y;
+ if (temp >= 0.0) {
+ {
+ x_t = -sqrt(temp) - p.x * invR1;
+ }
+ }
+ }
+ {
+ if (x_t <= 0.0) {
+ v = -1.0;
+ }
+ }
+ {
+ {
+ t = -x_t + fx;
+ }
+ }
+ }
+ }
+ _output = vec4(t, v, 0.0, 0.0);
+ return _output;
+}
+vec4 DualIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthreshold_Stage1_c0_c0_c1_c0) {
+ scale = uscale01_Stage1_c0_c0_c1_c0;
+ bias = ubias01_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale23_Stage1_c0_c0_c1_c0;
+ bias = ubias23_Stage1_c0_c0_c1_c0;
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = DualIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_dst_in(outputColor_Stage0, ClampedGradientEffect_Stage1_c0_c0(vec4(1.0)));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_1_Stage0.x);
+ uint y = uint(vTransformedCoords_1_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ output_Stage2 = vec4(clamp(output_Stage2.xyz + value * 0.0039215688593685627, 0.0, output_Stage2.w), output_Stage2.w);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/76-26.shader_test b/shaders/skia/76-26.shader_test
new file mode 100644
index 0000000..e9bb8ac
--- /dev/null
+++ b/shaders/skia/76-26.shader_test
@@ -0,0 +1,67 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 TextureEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = TextureEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = OverrideInputFragmentProcessor_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 blend_exclusion(vec4 src, vec4 dst) {
+ return vec4((dst.xyz + src.xyz) - (2.0 * dst.xyz) * src.xyz, src.w + (1.0 - src.w) * dst.w);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_exclusion(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec2 inLocalCoord;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 color = inColor;
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/76-27.shader_test b/shaders/skia/76-27.shader_test
new file mode 100644
index 0000000..902d837
--- /dev/null
+++ b/shaders/skia/76-27.shader_test
@@ -0,0 +1,44 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform float uPixelSize_Stage1;
+uniform vec2 uRange_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0;
+ coord.x -= 6.0 * uPixelSize_Stage1;
+ float highBound = min(uRange_Stage1.y, coord.x + 12.0 * uPixelSize_Stage1);
+ coord.x = max(uRange_Stage1.x, coord.x);
+ for (int i = 0;i < 13; i++) {
+ output_Stage1 = max(output_Stage1, texture(uTextureSampler_0_Stage1, coord));
+ coord.x += uPixelSize_Stage1;
+ coord.x = min(highBound, coord.x);
+ }
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/76-28.shader_test b/shaders/skia/76-28.shader_test
new file mode 100644
index 0000000..1834221
--- /dev/null
+++ b/shaders/skia/76-28.shader_test
@@ -0,0 +1,127 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 uleftBorderColor_Stage1_c1_c0_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c1_c0_c0_c0;
+uniform vec4 ustart_Stage1_c1_c0_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c1_c0_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+vec4 ComposeOne_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_dst_in(_input, ClampedGradientEffect_Stage1_c0_c0_c0_c0(vec4(1.0)));
+ return _output;
+}
+vec4 LinearGradientLayout_Stage1_c1_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_1_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c1_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c1_c0_c0_c0_c1_c0 + t * uend_Stage1_c1_c0_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c1_c0_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c1_c0_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c1_c0_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c1_c0_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 ComposeOne_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_dst_in(_input, ClampedGradientEffect_Stage1_c1_c0_c0_c0(vec4(1.0)));
+ return _output;
+}
+vec4 blend_plus(vec4 src, vec4 dst) {
+ return min(src + dst, 1.0);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_plus(ComposeOne_Stage1_c0_c0(inputColor), ComposeOne_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/76-29.shader_test b/shaders/skia/76-29.shader_test
new file mode 100644
index 0000000..312f382
--- /dev/null
+++ b/shaders/skia/76-29.shader_test
@@ -0,0 +1,65 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uclamp_Stage1_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+noperspective in float vcoverage_Stage0;
+vec4 TextureEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 inCoord = vTransformedCoords_0_Stage0;
+ vec2 subsetCoord;
+ subsetCoord.x = inCoord.x;
+ subsetCoord.y = inCoord.y;
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage1_c0_c0.x, uclamp_Stage1_c0_c0.z);
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage1_c0_c0.y, uclamp_Stage1_c0_c0.w);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ _output = _input * textureColor;
+ return _output;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ float coverage = vcoverage_Stage0;
+ outputCoverage_Stage0 = vec4(coverage);
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TextureEffect_Stage1_c0_c0(vec4(1.0));
+ output_Stage1.xyz *= outputColor_Stage0.xyz;
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ sk_FragColor = output_Stage1 * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in float coverage;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+noperspective out float vcoverage_Stage0;
+void main() {
+ vec2 position = position;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ vcoverage_Stage0 = coverage;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/76-3.shader_test b/shaders/skia/76-3.shader_test
new file mode 100644
index 0000000..8c1be24
--- /dev/null
+++ b/shaders/skia/76-3.shader_test
@@ -0,0 +1,105 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform float uSrcTF_Stage1_c0_c0[7];
+uniform mat3 uColorXform_Stage1_c0_c0;
+uniform float uDstTF_Stage1_c0_c0[7];
+uniform mat3 ucolorSpaceMatrix_Stage1_c0_c0_c0_c0;
+uniform vec3 ucolorSpaceTranslate_Stage1_c0_c0_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+vec4 YUVtoRGBEffect_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 planes[1];
+ planes[0] = TextureEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ vec4 color = vec4(planes[0].y, planes[0].z, planes[0].x, planes[0].w);
+ color.xyz = clamp(color.xyz * ucolorSpaceMatrix_Stage1_c0_c0_c0_c0 + ucolorSpaceTranslate_Stage1_c0_c0_c0_c0, 0.0, 1.0);
+ color.xyz *= color.w;
+ _output = color;
+ return _output;
+}
+float src_tf_Stage1_c0_c0(float x) {
+ float G = uSrcTF_Stage1_c0_c0[0];
+ float A = uSrcTF_Stage1_c0_c0[1];
+ float B = uSrcTF_Stage1_c0_c0[2];
+ float C = uSrcTF_Stage1_c0_c0[3];
+ float D = uSrcTF_Stage1_c0_c0[4];
+ float E = uSrcTF_Stage1_c0_c0[5];
+ float F = uSrcTF_Stage1_c0_c0[6];
+ float s = sign(x);
+ x = abs(x);
+ x = x < D ? C * x + F : pow(A * x + B, G) + E;
+ return s * x;
+}
+float dst_tf_Stage1_c0_c0(float x) {
+ float G = uDstTF_Stage1_c0_c0[0];
+ float A = uDstTF_Stage1_c0_c0[1];
+ float B = uDstTF_Stage1_c0_c0[2];
+ float C = uDstTF_Stage1_c0_c0[3];
+ float D = uDstTF_Stage1_c0_c0[4];
+ float E = uDstTF_Stage1_c0_c0[5];
+ float F = uDstTF_Stage1_c0_c0[6];
+ float s = sign(x);
+ x = abs(x);
+ x = x < D ? C * x + F : pow(A * x + B, G) + E;
+ return s * x;
+}
+vec4 gamut_xform_Stage1_c0_c0(vec4 color) {
+ color.xyz = uColorXform_Stage1_c0_c0 * color.xyz;
+ return color;
+}
+vec4 color_xform_Stage1_c0_c0(vec4 color) {
+ float nonZeroAlpha = max(color.w, 9.9999997473787516e-05);
+ color = vec4(color.xyz / nonZeroAlpha, nonZeroAlpha);
+ color.x = src_tf_Stage1_c0_c0(color.x);
+ color.y = src_tf_Stage1_c0_c0(color.y);
+ color.z = src_tf_Stage1_c0_c0(color.z);
+ color = gamut_xform_Stage1_c0_c0(color);
+ color.x = dst_tf_Stage1_c0_c0(color.x);
+ color.y = dst_tf_Stage1_c0_c0(color.y);
+ color.z = dst_tf_Stage1_c0_c0(color.z);
+ color.xyz *= color.w;
+ return color;
+}
+vec4 ColorSpaceXform_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = color_xform_Stage1_c0_c0(YUVtoRGBEffect_Stage1_c0_c0_c0_c0(vec4(1.0))) * _input;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ColorSpaceXform_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/76-31.shader_test b/shaders/skia/76-31.shader_test
new file mode 100644
index 0000000..4c6d5fb
--- /dev/null
+++ b/shaders/skia/76-31.shader_test
@@ -0,0 +1,61 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uclamp_Stage1_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+noperspective in float vcoverage_Stage0;
+vec4 TextureEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 inCoord = vTransformedCoords_0_Stage0;
+ vec2 subsetCoord;
+ subsetCoord.x = inCoord.x;
+ subsetCoord.y = inCoord.y;
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage1_c0_c0.x, uclamp_Stage1_c0_c0.z);
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage1_c0_c0.y, uclamp_Stage1_c0_c0.w);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ _output = _input * textureColor;
+ return _output;
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ float coverage = vcoverage_Stage0;
+ outputCoverage_Stage0 = vec4(coverage);
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TextureEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1 * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in float coverage;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+noperspective out float vcoverage_Stage0;
+void main() {
+ vec2 position = position;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ vcoverage_Stage0 = coverage;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/76-34.shader_test b/shaders/skia/76-34.shader_test
new file mode 100644
index 0000000..745ae58
--- /dev/null
+++ b/shaders/skia/76-34.shader_test
@@ -0,0 +1,63 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec2 uDstTextureUpperLeft_Stage1;
+uniform vec2 uDstTextureCoordScale_Stage1;
+uniform sampler2D uDstTextureSampler_Stage1;
+noperspective in vec4 vQuadEdge_Stage0;
+noperspective in vec4 vinColor_Stage0;
+vec4 blend_dst_atop(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src + src.w * dst;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vinColor_Stage0;
+ float edgeAlpha;
+ vec2 duvdx = dFdx(vQuadEdge_Stage0.xy);
+ vec2 duvdy = -dFdy(vQuadEdge_Stage0.xy);
+ if (vQuadEdge_Stage0.z > 0.0 && vQuadEdge_Stage0.w > 0.0) {
+ edgeAlpha = min(min(vQuadEdge_Stage0.z, vQuadEdge_Stage0.w) + 0.5, 1.0);
+ } else {
+ vec2 gF = vec2((2.0 * vQuadEdge_Stage0.x) * duvdx.x - duvdx.y, (2.0 * vQuadEdge_Stage0.x) * duvdy.x - duvdy.y);
+ edgeAlpha = vQuadEdge_Stage0.x * vQuadEdge_Stage0.x - vQuadEdge_Stage0.y;
+ edgeAlpha = clamp(0.5 - edgeAlpha / length(gF), 0.0, 1.0);
+ }
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ {
+ if (all(lessThanEqual(outputCoverage_Stage0.xyz, vec3(0.0)))) {
+ discard;
+ }
+ vec2 _dstTexCoord = (gl_FragCoord.xy - uDstTextureUpperLeft_Stage1) * uDstTextureCoordScale_Stage1;
+ _dstTexCoord.y = 1.0 - _dstTexCoord.y;
+ vec4 _dstColor = texture(uDstTextureSampler_Stage1, _dstTexCoord);
+ sk_FragColor = blend_dst_atop(outputColor_Stage0, _dstColor);
+ sk_FragColor = outputCoverage_Stage0 * sk_FragColor + (vec4(1.0) - outputCoverage_Stage0) * _dstColor;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 inPosition;
+in vec4 inColor;
+in vec4 inQuadEdge;
+noperspective out vec4 vQuadEdge_Stage0;
+noperspective out vec4 vinColor_Stage0;
+void main() {
+ vQuadEdge_Stage0 = inQuadEdge;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = inPosition;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/76-35.shader_test b/shaders/skia/76-35.shader_test
new file mode 100644
index 0000000..0d10877
--- /dev/null
+++ b/shaders/skia/76-35.shader_test
@@ -0,0 +1,178 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_KHR_blend_equation_advanced : require
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+layout (blend_support_all_equations) out ;
+uniform vec4 ucircleData_Stage1_c0_c0_c1_c0;
+uniform float uPixelSize_Stage1_c1_c0_c0_c0_c0_c0;
+uniform vec2 uRange_Stage1_c1_c0_c0_c0_c0_c0;
+uniform vec4 urectUniform_Stage1_c1_c0_c0_c0_c1_c0;
+uniform vec4 urectUniform_Stage1_c1_c0_c1_c0_c0_c0;
+uniform mat4 um_Stage1_c1_c0_c1_c0_c1_c0;
+uniform vec4 uv_Stage1_c1_c0_c1_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+uniform sampler2D uTextureSampler_2_Stage1;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 ColorTableEffect_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float nonZeroAlpha = max(_input.w, 9.9999997473787516e-05);
+ vec4 coord = vec4(_input.xyz / nonZeroAlpha, nonZeroAlpha);
+ coord = coord * 0.9960939884185791 + vec4(0.0019529999699443579, 0.0019529999699443579, 0.0019529999699443579, 0.0019529999699443579);
+ _output.w = texture(uTextureSampler_0_Stage1, vec2(coord.w, 0.125)).w;
+ _output.x = texture(uTextureSampler_0_Stage1, vec2(coord.x, 0.375)).w;
+ _output.y = texture(uTextureSampler_0_Stage1, vec2(coord.y, 0.625)).w;
+ _output.z = texture(uTextureSampler_0_Stage1, vec2(coord.z, 0.875)).w;
+ _output.xyz *= _output.w;
+ return _output;
+}
+vec4 CircleBlurFragmentProcessor_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 vec = vec2((gl_FragCoord.x - ucircleData_Stage1_c0_c0_c1_c0.x) * ucircleData_Stage1_c0_c0_c1_c0.w, (gl_FragCoord.y - ucircleData_Stage1_c0_c0_c1_c0.y) * ucircleData_Stage1_c0_c0_c1_c0.w);
+ float dist = length(vec) + (0.5 - ucircleData_Stage1_c0_c0_c1_c0.z) * ucircleData_Stage1_c0_c0_c1_c0.w;
+ _output = _input * texture(uTextureSampler_1_Stage1, vec2(dist, 0.5)).w;
+ return _output;
+}
+float _blend_color_luminance(vec3 color) {
+ return dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), color);
+}
+vec3 _blend_set_color_luminance(vec3 hueSatColor, float alpha, vec3 lumColor) {
+ float lum = _blend_color_luminance(lumColor);
+ vec3 result = (lum - _blend_color_luminance(hueSatColor)) + hueSatColor;
+ float minComp = min(min(result.x, result.y), result.z);
+ float maxComp = max(max(result.x, result.y), result.z);
+ if (minComp < 0.0 && lum != minComp) {
+ result = lum + ((result - lum) * lum) / (lum - minComp);
+ }
+ if (maxComp > alpha && maxComp != lum) {
+ return lum + ((result - lum) * (alpha - lum)) / (maxComp - lum);
+ }
+ return result;
+}
+vec4 blend_color(vec4 src, vec4 dst) {
+ float alpha = dst.w * src.w;
+ vec3 sda = src.xyz * dst.w;
+ vec3 dsa = dst.xyz * src.w;
+ return vec4((((_blend_set_color_luminance(sda, alpha, dsa) + dst.xyz) - dsa) + src.xyz) - sda, (src.w + dst.w) - alpha);
+}
+vec4 ComposeTwo_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_color(ColorTableEffect_Stage1_c0_c0_c0_c0(inputColor), CircleBlurFragmentProcessor_Stage1_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 Morphology_Stage1_c1_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0;
+ coord.y -= 6.0 * uPixelSize_Stage1_c1_c0_c0_c0_c0_c0;
+ for (int i = 0;i < 13; i++) {
+ _output = max(_output, texture(uTextureSampler_2_Stage1, coord));
+ coord.y += uPixelSize_Stage1_c1_c0_c0_c0_c0_c0;
+ }
+ _output *= _input;
+ return _output;
+}
+vec4 AARectEffect_Stage1_c1_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float alpha;
+ {
+ alpha = float(all(greaterThan(vec4(gl_FragCoord.xy, urectUniform_Stage1_c1_c0_c0_c0_c1_c0.zw), vec4(urectUniform_Stage1_c1_c0_c0_c0_c1_c0.xy, gl_FragCoord.xy))) ? 1 : 0);
+ }
+ _output = _input * alpha;
+ return _output;
+}
+vec4 ComposeTwo_Stage1_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_color(Morphology_Stage1_c1_c0_c0_c0_c0_c0(inputColor), AARectEffect_Stage1_c1_c0_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 AARectEffect_Stage1_c1_c0_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float alpha;
+ {
+ alpha = float(all(greaterThan(vec4(gl_FragCoord.xy, urectUniform_Stage1_c1_c0_c1_c0_c0_c0.zw), vec4(urectUniform_Stage1_c1_c0_c1_c0_c0_c0.xy, gl_FragCoord.xy))) ? 1 : 0);
+ }
+ {
+ alpha = 1.0 - alpha;
+ }
+ _output = _input * alpha;
+ return _output;
+}
+vec4 ColorMatrixFragmentProcessor_Stage1_c1_c0_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = _input;
+ _output = um_Stage1_c1_c0_c1_c0_c1_c0 * inputColor + uv_Stage1_c1_c0_c1_c0_c1_c0;
+ {
+ _output.w = clamp(_output.w, 0.0, 1.0);
+ }
+ return _output;
+}
+vec4 blend_src_out(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src;
+}
+vec4 ComposeTwo_Stage1_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_src_out(AARectEffect_Stage1_c1_c0_c1_c0_c0_c0(inputColor), ColorMatrixFragmentProcessor_Stage1_c1_c0_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 ComposeTwo_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_src_in(ComposeTwo_Stage1_c1_c0_c0_c0(inputColor), ComposeTwo_Stage1_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 blend_modulate(vec4 src, vec4 dst) {
+ return src * dst;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_modulate(ComposeTwo_Stage1_c0_c0(inputColor), ComposeTwo_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 color = inColor;
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/76-36.shader_test b/shaders/skia/76-36.shader_test
new file mode 100644
index 0000000..ac17b35
--- /dev/null
+++ b/shaders/skia/76-36.shader_test
@@ -0,0 +1,222 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage2;
+uniform float uSurfaceScale_Stage2;
+uniform vec3 uLightColor_Stage2;
+uniform float uKS_Stage2;
+uniform float uShininess_Stage2;
+uniform vec4 uTexDom_Stage2;
+uniform vec3 uDecalParams_Stage2;
+uniform vec3 uLightLocation_Stage2;
+uniform float uExponent_Stage2;
+uniform float uCosInnerConeAngle_Stage2;
+uniform float uCosOuterConeAngle_Stage2;
+uniform float uConeScale_Stage2;
+uniform vec3 uS_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 light_Stage2(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ vec3 halfDir = normalize(surfaceToLight + vec3(0.0, 0.0, 1.0));
+ float colorScale = uKS_Stage2 * pow(dot(normal, halfDir), uShininess_Stage2);
+ vec3 color = lightColor * clamp(colorScale, 0.0, 1.0);
+ return vec4(color, max(max(color.x, color.y), color.z));
+}
+float sobel_Stage2(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage2(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage2(float m[9], float surfaceScale) {
+ return pointToNormal_Stage2(sobel_Stage2(m[0], m[2], m[3], m[5], 0.0, 0.0, 0.33333298563957214), sobel_Stage2(m[0], m[3], m[1], m[4], m[2], m[5], 0.5), surfaceScale);
+}
+vec3 lightColor_Stage2(vec3 surfaceToLight) {
+ float cosAngle = -dot(surfaceToLight, uS_Stage2);
+ if (cosAngle < uCosOuterConeAngle_Stage2) {
+ return vec3(0.0);
+ }
+ float scale = pow(cosAngle, uExponent_Stage2);
+ if (cosAngle < uCosInnerConeAngle_Stage2) {
+ return ((uLightColor_Stage2 * scale) * (cosAngle - uCosOuterConeAngle_Stage2)) * uConeScale_Stage2;
+ }
+ return uLightColor_Stage2;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ vec2 coord = vTransformedCoords_1_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp0 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp5 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp6 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp7 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp8 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = normalize(uLightLocation_Stage2 - vec3(gl_FragCoord.xy, uSurfaceScale_Stage2 * m[4]));
+ output_Stage2 = light_Stage2(normal_Stage2(m, uSurfaceScale_Stage2), surfaceToLight, lightColor_Stage2(surfaceToLight));
+ output_Stage2 *= output_Stage1;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/76-37.shader_test b/shaders/skia/76-37.shader_test
new file mode 100644
index 0000000..b0e2110
--- /dev/null
+++ b/shaders/skia/76-37.shader_test
@@ -0,0 +1,77 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uCoordTransformMatrix_2_Stage0;
+uniform vec4 usubset_Stage2_c0_c0;
+uniform vec4 uclamp_Stage2_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec3 vTransformedCoords_1_Stage0;
+vec4 TextureEffect_Stage2_c0_c0(vec4 _input, vec2 _coords) {
+ _coords = _coords * uCoordTransformMatrix_2_Stage0.xz + uCoordTransformMatrix_2_Stage0.yw;
+ vec4 _output;
+ vec2 inCoord = _coords;
+ vec2 subsetCoord;
+ subsetCoord.x = inCoord.x;
+ {
+ float w = usubset_Stage2_c0_c0.w - usubset_Stage2_c0_c0.y;
+ float w2 = 2.0 * w;
+ float m = mod(inCoord.y - usubset_Stage2_c0_c0.y, w2);
+ subsetCoord.y = mix(m, w2 - m, step(w, m)) + usubset_Stage2_c0_c0.y;
+ }
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage2_c0_c0.x, uclamp_Stage2_c0_c0.z);
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage2_c0_c0.y, uclamp_Stage2_c0_c0.w);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ _output = _input * textureColor;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ vec2 vTransformedCoords_1_Stage0_ensure2D = vTransformedCoords_1_Stage0.xy / vTransformedCoords_1_Stage0.z;
+ float coord = vTransformedCoords_1_Stage0_ensure2D.x - 0.5;
+ float f = fract(coord);
+ coord += 0.5 - f;
+ float f2 = f * f;
+ vec4 w = mat4(0.055555555555555552, 0.88888888888888884, 0.055555555555555552, 0.0, -0.5, 0.0, 0.5, 0.0, 0.83333333333333337, -2.0, 1.5, -0.33333333333333331, -0.3888888888888889, 1.1666666666666667, -1.1666666666666667, 0.3888888888888889) * vec4(1.0, f, f2, f2 * f);
+ vec4 c[4];
+ c[0] = TextureEffect_Stage2_c0_c0(vec4(1.0), vec2(coord + -1.0, vTransformedCoords_1_Stage0_ensure2D.y));
+ c[1] = TextureEffect_Stage2_c0_c0(vec4(1.0), vec2(coord, vTransformedCoords_1_Stage0_ensure2D.y));
+ c[2] = TextureEffect_Stage2_c0_c0(vec4(1.0), vec2(coord + 1.0, vTransformedCoords_1_Stage0_ensure2D.y));
+ c[3] = TextureEffect_Stage2_c0_c0(vec4(1.0), vec2(coord + 2.0, vTransformedCoords_1_Stage0_ensure2D.y));
+ vec4 bicubicColor = ((c[0] * w.x + c[1] * w.y) + c[2] * w.z) + c[3] * w.w;
+ bicubicColor.xyz = max(vec3(0.0), min(bicubicColor.xyz, bicubicColor.www));
+ output_Stage2 = bicubicColor * output_Stage1;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec3 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0);
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/76-5.shader_test b/shaders/skia/76-5.shader_test
new file mode 100644
index 0000000..99725e7
--- /dev/null
+++ b/shaders/skia/76-5.shader_test
@@ -0,0 +1,132 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.w) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ } else {
+ {
+ if (t < uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = OverrideInputFragmentProcessor_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_src_over(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 inColor;
+in vec2 inLocalCoord;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/76-7.shader_test b/shaders/skia/76-7.shader_test
new file mode 100644
index 0000000..ddf5551
--- /dev/null
+++ b/shaders/skia/76-7.shader_test
@@ -0,0 +1,38 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+flat in vec4 vcolor_Stage0;
+noperspective in float vcoverage_Stage0;
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ float coverage = vcoverage_Stage0;
+ outputCoverage_Stage0 = vec4(coverage);
+ }
+ {
+ sk_FragColor = outputCoverage_Stage0;
+ sk_FragColor = sk_FragColor.wwww;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 position;
+in float coverage;
+in vec4 color;
+flat out vec4 vcolor_Stage0;
+noperspective out float vcoverage_Stage0;
+void main() {
+ vec2 position = position;
+ vcolor_Stage0 = color;
+ vcoverage_Stage0 = coverage;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/76-8.shader_test b/shaders/skia/76-8.shader_test
new file mode 100644
index 0000000..95ddf65
--- /dev/null
+++ b/shaders/skia/76-8.shader_test
@@ -0,0 +1,79 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uColor_Stage0;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in float vinCoverage_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = uColor_Stage0;
+ float alpha = 1.0;
+ alpha = vinCoverage_Stage0;
+ outputCoverage_Stage0 = vec4(alpha);
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_dst_in(outputColor_Stage0, ClampedGradientEffect_Stage1_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage1 * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in float inCoverage;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out float vinCoverage_Stage0;
+void main() {
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ vinCoverage_Stage0 = inCoverage;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/76-9.shader_test b/shaders/skia/76-9.shader_test
new file mode 100644
index 0000000..f8e61d1
--- /dev/null
+++ b/shaders/skia/76-9.shader_test
@@ -0,0 +1,44 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uinnerRect_Stage1;
+uniform vec2 uradiusPlusHalf_Stage1;
+flat in vec4 vcolor_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec2 dxy = max(uinnerRect_Stage1.xy - gl_FragCoord.xy, 0.0);
+ float rightAlpha = clamp(uinnerRect_Stage1.z - gl_FragCoord.x, 0.0, 1.0);
+ float bottomAlpha = clamp(uinnerRect_Stage1.w - gl_FragCoord.y, 0.0, 1.0);
+ float alpha = (bottomAlpha * rightAlpha) * clamp(uradiusPlusHalf_Stage1.x - length(dxy), 0.0, 1.0);
+ alpha = 1.0 - alpha;
+ output_Stage1 = vec4(alpha);
+ }
+ {
+ sk_FragColor = outputColor_Stage0 * output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 position;
+in vec4 color;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/76.shader_test b/shaders/skia/76.shader_test
new file mode 100644
index 0000000..5a619e0
--- /dev/null
+++ b/shaders/skia/76.shader_test
@@ -0,0 +1,85 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 usubset_Stage1_c0_c0_c0_c0;
+uniform vec4 uclamp_Stage1_c0_c0_c0_c0;
+uniform sampler2DRect uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0_c0_c0(vec4 _input, vec2 _coords) {
+ vec4 _output;
+ vec2 inCoord = _coords;
+ vec2 subsetCoord;
+ subsetCoord.x = mod(inCoord.x - usubset_Stage1_c0_c0_c0_c0.x, usubset_Stage1_c0_c0_c0_c0.z - usubset_Stage1_c0_c0_c0_c0.x) + usubset_Stage1_c0_c0_c0_c0.x;
+ subsetCoord.y = inCoord.y;
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage1_c0_c0_c0_c0.x, uclamp_Stage1_c0_c0_c0_c0.z);
+ clampedCoord.y = subsetCoord.y;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ _output = _input * textureColor;
+ return _output;
+}
+vec4 Bicubic_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coord = vTransformedCoords_0_Stage0 - vec2(0.5);
+ vec2 f = fract(coord);
+ coord += 0.5 - f;
+ vec4 wx = mat4(0.055555555555555552, 0.88888888888888884, 0.055555555555555552, 0.0, -0.5, 0.0, 0.5, 0.0, 0.83333333333333337, -2.0, 1.5, -0.33333333333333331, -0.3888888888888889, 1.1666666666666667, -1.1666666666666667, 0.3888888888888889) * vec4(1.0, f.x, f.x * f.x, (f.x * f.x) * f.x);
+ vec4 wy = mat4(0.055555555555555552, 0.88888888888888884, 0.055555555555555552, 0.0, -0.5, 0.0, 0.5, 0.0, 0.83333333333333337, -2.0, 1.5, -0.33333333333333331, -0.3888888888888889, 1.1666666666666667, -1.1666666666666667, 0.3888888888888889) * vec4(1.0, f.y, f.y * f.y, (f.y * f.y) * f.y);
+ vec4 rowColors[4];
+ rowColors[0] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(-1.0, -1.0));
+ rowColors[1] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(0.0, -1.0));
+ rowColors[2] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(1.0, -1.0));
+ rowColors[3] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(2.0, -1.0));
+ vec4 s0 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ rowColors[0] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(-1.0, 0.0));
+ rowColors[1] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord);
+ rowColors[2] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(1.0, 0.0));
+ rowColors[3] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(2.0, 0.0));
+ vec4 s1 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ rowColors[0] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(-1.0, 1.0));
+ rowColors[1] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(0.0, 1.0));
+ rowColors[2] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(1.0, 1.0));
+ rowColors[3] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(2.0, 1.0));
+ vec4 s2 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ rowColors[0] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(-1.0, 2.0));
+ rowColors[1] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(0.0, 2.0));
+ rowColors[2] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(1.0, 2.0));
+ rowColors[3] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(2.0, 2.0));
+ vec4 s3 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ vec4 bicubicColor = ((wy.x * s0 + wy.y * s1) + wy.z * s2) + wy.w * s3;
+ bicubicColor = clamp(bicubicColor, 0.0, 1.0);
+ _output = bicubicColor * _input;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = Bicubic_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/760.shader_test b/shaders/skia/760.shader_test
new file mode 100644
index 0000000..d9424f8
--- /dev/null
+++ b/shaders/skia/760.shader_test
@@ -0,0 +1,489 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1_c0_c0_c0_c0_c0_c0;
+uniform float uSurfaceScale_Stage1_c0_c0_c0_c0_c0_c0;
+uniform vec3 uLightColor_Stage1_c0_c0_c0_c0_c0_c0;
+uniform float uKD_Stage1_c0_c0_c0_c0_c0_c0;
+uniform vec4 uTexDom_Stage1_c0_c0_c0_c0_c0_c0;
+uniform vec3 uDecalParams_Stage1_c0_c0_c0_c0_c0_c0;
+uniform vec3 uLightLocation_Stage1_c0_c0_c0_c0_c0_c0;
+uniform float uExponent_Stage1_c0_c0_c0_c0_c0_c0;
+uniform float uCosInnerConeAngle_Stage1_c0_c0_c0_c0_c0_c0;
+uniform float uCosOuterConeAngle_Stage1_c0_c0_c0_c0_c0_c0;
+uniform float uConeScale_Stage1_c0_c0_c0_c0_c0_c0;
+uniform vec3 uS_Stage1_c0_c0_c0_c0_c0_c0;
+uniform vec2 uImageIncrement_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 uKernel_Stage1_c0_c0_c0_c0_c1_c0[5];
+uniform vec4 uellipse_Stage1_c0_c0_c1_c0_c0_c0;
+uniform float uPixelSize_Stage1_c1_c0_c0_c0_c0_c0;
+uniform vec2 uRange_Stage1_c1_c0_c0_c0_c0_c0;
+uniform vec4 ucolor_Stage1_c1_c0_c0_c0_c1_c0;
+uniform vec4 uboundsUniform_Stage1_c1_c0_c1_c0_c0_c0;
+uniform float uxInvZoom_Stage1_c1_c0_c1_c0_c0_c0;
+uniform float uyInvZoom_Stage1_c1_c0_c1_c0_c0_c0;
+uniform float uxInvInset_Stage1_c1_c0_c1_c0_c0_c0;
+uniform float uyInvInset_Stage1_c1_c0_c1_c0_c0_c0;
+uniform vec2 uoffset_Stage1_c1_c0_c1_c0_c0_c0;
+uniform float uPixelSize_Stage1_c1_c0_c1_c0_c1_c0;
+uniform vec2 uRange_Stage1_c1_c0_c1_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+uniform sampler2D uTextureSampler_2_Stage1;
+uniform sampler2D uTextureSampler_3_Stage1;
+uniform sampler2D uTextureSampler_4_Stage1;
+uniform sampler2D uTextureSampler_5_Stage1;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+noperspective in vec2 vTransformedCoords_3_Stage0;
+noperspective in vec2 vTransformedCoords_4_Stage0;
+vec4 light_Stage1_c0_c0_c0_c0_c0_c0(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ float colorScale = uKD_Stage1_c0_c0_c0_c0_c0_c0 * dot(normal, surfaceToLight);
+ return vec4(lightColor * clamp(colorScale, 0.0, 1.0), 1.0);
+}
+float sobel_Stage1_c0_c0_c0_c0_c0_c0(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage1_c0_c0_c0_c0_c0_c0(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage1_c0_c0_c0_c0_c0_c0(float m[9], float surfaceScale) {
+ return pointToNormal_Stage1_c0_c0_c0_c0_c0_c0(sobel_Stage1_c0_c0_c0_c0_c0_c0(m[1], m[2], m[4], m[5], m[7], m[8], 0.5), sobel_Stage1_c0_c0_c0_c0_c0_c0(0.0, 0.0, m[1], m[7], m[2], m[8], 0.33333298563957214), surfaceScale);
+}
+vec3 lightColor_Stage1_c0_c0_c0_c0_c0_c0(vec3 surfaceToLight) {
+ float cosAngle = -dot(surfaceToLight, uS_Stage1_c0_c0_c0_c0_c0_c0);
+ if (cosAngle < uCosOuterConeAngle_Stage1_c0_c0_c0_c0_c0_c0) {
+ return vec3(0.0);
+ }
+ float scale = pow(cosAngle, uExponent_Stage1_c0_c0_c0_c0_c0_c0);
+ if (cosAngle < uCosInnerConeAngle_Stage1_c0_c0_c0_c0_c0_c0) {
+ return ((uLightColor_Stage1_c0_c0_c0_c0_c0_c0 * scale) * (cosAngle - uCosOuterConeAngle_Stage1_c0_c0_c0_c0_c0_c0)) * uConeScale_Stage1_c0_c0_c0_c0_c0_c0;
+ }
+ return uLightColor_Stage1_c0_c0_c0_c0_c0_c0;
+}
+vec4 DiffuseLighting_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coord = vTransformedCoords_0_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage1_c0_c0_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp0 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1_c0_c0_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1_c0_c0_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage1_c0_c0_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1_c0_c0_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp5 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage1_c0_c0_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp6 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage1_c0_c0_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp7 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage1_c0_c0_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp8 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = normalize(uLightLocation_Stage1_c0_c0_c0_c0_c0_c0 - vec3(gl_FragCoord.xy, uSurfaceScale_Stage1_c0_c0_c0_c0_c0_c0 * m[4]));
+ _output = light_Stage1_c0_c0_c0_c0_c0_c0(normal_Stage1_c0_c0_c0_c0_c0_c0(m, uSurfaceScale_Stage1_c0_c0_c0_c0_c0_c0), surfaceToLight, lightColor_Stage1_c0_c0_c0_c0_c0_c0(surfaceToLight));
+ _output *= _input;
+ return _output;
+}
+vec4 GaussianConvolution_Stage1_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_1_Stage0 - 8.0 * uImageIncrement_Stage1_c0_c0_c0_c0_c1_c0;
+ vec2 coordSampled = vec2(0.0, 0.0);
+ coordSampled = coord;
+ _output += texture(uTextureSampler_1_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c0_c0_c1_c0[0].x;
+ coord += uImageIncrement_Stage1_c0_c0_c0_c0_c1_c0;
+ coordSampled = coord;
+ _output += texture(uTextureSampler_1_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c0_c0_c1_c0[0].y;
+ coord += uImageIncrement_Stage1_c0_c0_c0_c0_c1_c0;
+ coordSampled = coord;
+ _output += texture(uTextureSampler_1_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c0_c0_c1_c0[0].z;
+ coord += uImageIncrement_Stage1_c0_c0_c0_c0_c1_c0;
+ coordSampled = coord;
+ _output += texture(uTextureSampler_1_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c0_c0_c1_c0[0].w;
+ coord += uImageIncrement_Stage1_c0_c0_c0_c0_c1_c0;
+ coordSampled = coord;
+ _output += texture(uTextureSampler_1_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c0_c0_c1_c0[1].x;
+ coord += uImageIncrement_Stage1_c0_c0_c0_c0_c1_c0;
+ coordSampled = coord;
+ _output += texture(uTextureSampler_1_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c0_c0_c1_c0[1].y;
+ coord += uImageIncrement_Stage1_c0_c0_c0_c0_c1_c0;
+ coordSampled = coord;
+ _output += texture(uTextureSampler_1_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c0_c0_c1_c0[1].z;
+ coord += uImageIncrement_Stage1_c0_c0_c0_c0_c1_c0;
+ coordSampled = coord;
+ _output += texture(uTextureSampler_1_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c0_c0_c1_c0[1].w;
+ coord += uImageIncrement_Stage1_c0_c0_c0_c0_c1_c0;
+ coordSampled = coord;
+ _output += texture(uTextureSampler_1_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c0_c0_c1_c0[2].x;
+ coord += uImageIncrement_Stage1_c0_c0_c0_c0_c1_c0;
+ coordSampled = coord;
+ _output += texture(uTextureSampler_1_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c0_c0_c1_c0[2].y;
+ coord += uImageIncrement_Stage1_c0_c0_c0_c0_c1_c0;
+ coordSampled = coord;
+ _output += texture(uTextureSampler_1_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c0_c0_c1_c0[2].z;
+ coord += uImageIncrement_Stage1_c0_c0_c0_c0_c1_c0;
+ coordSampled = coord;
+ _output += texture(uTextureSampler_1_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c0_c0_c1_c0[2].w;
+ coord += uImageIncrement_Stage1_c0_c0_c0_c0_c1_c0;
+ coordSampled = coord;
+ _output += texture(uTextureSampler_1_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c0_c0_c1_c0[3].x;
+ coord += uImageIncrement_Stage1_c0_c0_c0_c0_c1_c0;
+ coordSampled = coord;
+ _output += texture(uTextureSampler_1_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c0_c0_c1_c0[3].y;
+ coord += uImageIncrement_Stage1_c0_c0_c0_c0_c1_c0;
+ coordSampled = coord;
+ _output += texture(uTextureSampler_1_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c0_c0_c1_c0[3].z;
+ coord += uImageIncrement_Stage1_c0_c0_c0_c0_c1_c0;
+ coordSampled = coord;
+ _output += texture(uTextureSampler_1_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c0_c0_c1_c0[3].w;
+ coord += uImageIncrement_Stage1_c0_c0_c0_c0_c1_c0;
+ coordSampled = coord;
+ _output += texture(uTextureSampler_1_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c0_c0_c1_c0[4].x;
+ coord += uImageIncrement_Stage1_c0_c0_c0_c0_c1_c0;
+ _output *= _input;
+ return _output;
+}
+float _blend_color_luminance(vec3 color) {
+ return dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), color);
+}
+vec3 _blend_set_color_luminance(vec3 hueSatColor, float alpha, vec3 lumColor) {
+ float lum = _blend_color_luminance(lumColor);
+ vec3 result = (lum - _blend_color_luminance(hueSatColor)) + hueSatColor;
+ float minComp = min(min(result.x, result.y), result.z);
+ float maxComp = max(max(result.x, result.y), result.z);
+ if (minComp < 0.0 && lum != minComp) {
+ result = lum + ((result - lum) * lum) / (lum - minComp);
+ }
+ if (maxComp > alpha && maxComp != lum) {
+ return lum + ((result - lum) * (alpha - lum)) / (maxComp - lum);
+ }
+ return result;
+}
+vec4 blend_luminosity(vec4 src, vec4 dst) {
+ float alpha = dst.w * src.w;
+ vec3 sda = src.xyz * dst.w;
+ vec3 dsa = dst.xyz * src.w;
+ return vec4((((_blend_set_color_luminance(dsa, alpha, sda) + dst.xyz) - dsa) + src.xyz) - sda, (src.w + dst.w) - alpha);
+}
+vec4 ComposeTwo_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_luminosity(DiffuseLighting_Stage1_c0_c0_c0_c0_c0_c0(inputColor), GaussianConvolution_Stage1_c0_c0_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 EllipseEffect_Stage1_c0_c0_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 d = gl_FragCoord.xy - uellipse_Stage1_c0_c0_c1_c0_c0_c0.xy;
+ vec2 Z = d * uellipse_Stage1_c0_c0_c1_c0_c0_c0.zw;
+ float implicit = dot(Z, d) - 1.0;
+ float grad_dot = 4.0 * dot(Z, Z);
+ {
+ grad_dot = max(grad_dot, 1.1754999560161448e-38);
+ }
+ float approx_dist = implicit * inversesqrt(grad_dot);
+ float alpha;
+ {
+ alpha = approx_dist > 0.0 ? 0.0 : 1.0;
+ }
+ _output = _input * alpha;
+ return _output;
+}
+vec4 ColorTableEffect_Stage1_c0_c0_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float nonZeroAlpha = max(_input.w, 9.9999997473787516e-05);
+ vec4 coord = vec4(_input.xyz / nonZeroAlpha, nonZeroAlpha);
+ coord = coord * 0.9960939884185791 + vec4(0.0019529999699443579, 0.0019529999699443579, 0.0019529999699443579, 0.0019529999699443579);
+ _output.w = texture(uTextureSampler_2_Stage1, vec2(coord.w, 0.125)).w;
+ _output.x = texture(uTextureSampler_2_Stage1, vec2(coord.x, 0.375)).w;
+ _output.y = texture(uTextureSampler_2_Stage1, vec2(coord.y, 0.625)).w;
+ _output.z = texture(uTextureSampler_2_Stage1, vec2(coord.z, 0.875)).w;
+ _output.xyz *= _output.w;
+ return _output;
+}
+vec4 blend_xor(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src + (1.0 - src.w) * dst;
+}
+vec4 ComposeTwo_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_xor(EllipseEffect_Stage1_c0_c0_c1_c0_c0_c0(inputColor), ColorTableEffect_Stage1_c0_c0_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 blend_color(vec4 src, vec4 dst) {
+ float alpha = dst.w * src.w;
+ vec3 sda = src.xyz * dst.w;
+ vec3 dsa = dst.xyz * src.w;
+ return vec4((((_blend_set_color_luminance(sda, alpha, dsa) + dst.xyz) - dsa) + src.xyz) - sda, (src.w + dst.w) - alpha);
+}
+vec4 ComposeTwo_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_color(ComposeTwo_Stage1_c0_c0_c0_c0(inputColor), ComposeTwo_Stage1_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 Morphology_Stage1_c1_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_2_Stage0;
+ coord.x -= 5.0 * uPixelSize_Stage1_c1_c0_c0_c0_c0_c0;
+ for (int i = 0;i < 11; i++) {
+ _output = max(_output, texture(uTextureSampler_3_Stage1, coord));
+ coord.x += uPixelSize_Stage1_c1_c0_c0_c0_c0_c0;
+ }
+ _output *= _input;
+ return _output;
+}
+vec4 ConstColorProcessor_Stage1_c1_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage1_c1_c0_c0_c0_c1_c0;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+vec4 ComposeTwo_Stage1_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_dst_in(Morphology_Stage1_c1_c0_c0_c0_c0_c0(inputColor), ConstColorProcessor_Stage1_c1_c0_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 MagnifierEffect_Stage1_c1_c0_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coord = vTransformedCoords_3_Stage0;
+ vec2 zoom_coord = uoffset_Stage1_c1_c0_c1_c0_c0_c0 + coord * vec2(uxInvZoom_Stage1_c1_c0_c1_c0_c0_c0, uyInvZoom_Stage1_c1_c0_c1_c0_c0_c0);
+ vec2 delta = (coord - uboundsUniform_Stage1_c1_c0_c1_c0_c0_c0.xy) * uboundsUniform_Stage1_c1_c0_c1_c0_c0_c0.zw;
+ delta = min(delta, vec2(1.0, 1.0) - delta);
+ delta *= vec2(uxInvInset_Stage1_c1_c0_c1_c0_c0_c0, uyInvInset_Stage1_c1_c0_c1_c0_c0_c0);
+ float weight = 0.0;
+ if (delta.x < 2.0 && delta.y < 2.0) {
+ delta = vec2(2.0, 2.0) - delta;
+ float dist = length(delta);
+ dist = max(2.0 - dist, 0.0);
+ weight = min(dist * dist, 1.0);
+ } else {
+ vec2 delta_squared = delta * delta;
+ weight = min(min(delta_squared.x, delta_squared.y), 1.0);
+ }
+ _output = texture(uTextureSampler_4_Stage1, mix(coord, zoom_coord, weight));
+ return _output;
+}
+vec4 Morphology_Stage1_c1_c0_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_4_Stage0;
+ coord.x -= 7.0 * uPixelSize_Stage1_c1_c0_c1_c0_c1_c0;
+ for (int i = 0;i < 15; i++) {
+ _output = max(_output, texture(uTextureSampler_5_Stage1, coord));
+ coord.x += uPixelSize_Stage1_c1_c0_c1_c0_c1_c0;
+ }
+ _output *= _input;
+ return _output;
+}
+vec4 blend_src_out(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src;
+}
+vec4 ComposeTwo_Stage1_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_src_out(MagnifierEffect_Stage1_c1_c0_c1_c0_c0_c0(inputColor), Morphology_Stage1_c1_c0_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 blend_exclusion(vec4 src, vec4 dst) {
+ return vec4((dst.xyz + src.xyz) - (2.0 * dst.xyz) * src.xyz, src.w + (1.0 - src.w) * dst.w);
+}
+vec4 ComposeTwo_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_exclusion(ComposeTwo_Stage1_c1_c0_c0_c0(inputColor), ComposeTwo_Stage1_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 blend_dst_over(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src + dst;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_dst_over(ComposeTwo_Stage1_c0_c0(inputColor), ComposeTwo_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+uniform mat3 uCoordTransformMatrix_3_Stage0;
+uniform mat3 uCoordTransformMatrix_4_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+noperspective out vec2 vTransformedCoords_3_Stage0;
+noperspective out vec2 vTransformedCoords_4_Stage0;
+void main() {
+ vec4 color = inColor;
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_3_Stage0 = (uCoordTransformMatrix_3_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_4_Stage0 = (uCoordTransformMatrix_4_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/763.shader_test b/shaders/skia/763.shader_test
new file mode 100644
index 0000000..52b3ee6
--- /dev/null
+++ b/shaders/skia/763.shader_test
@@ -0,0 +1,215 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+uniform float ucornerRadius_Stage1_c0_c0;
+uniform vec4 uproxyRect_Stage1_c0_c0;
+uniform float ublurRadius_Stage1_c0_c0;
+uniform vec4 ucolor_Stage1_c1_c0;
+uniform vec4 urectH_Stage2;
+uniform float uinvSixSigma_Stage2;
+uniform vec4 uscale0_1_Stage3_c2_c0_c1_c0;
+uniform vec4 uscale2_3_Stage3_c2_c0_c1_c0;
+uniform vec4 uscale4_5_Stage3_c2_c0_c1_c0;
+uniform vec4 uscale6_7_Stage3_c2_c0_c1_c0;
+uniform vec4 ubias0_1_Stage3_c2_c0_c1_c0;
+uniform vec4 ubias2_3_Stage3_c2_c0_c1_c0;
+uniform vec4 ubias4_5_Stage3_c2_c0_c1_c0;
+uniform vec4 ubias6_7_Stage3_c2_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage3_c2_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage3_c2_c0_c1_c0;
+uniform float uPixelSize_Stage4;
+uniform vec2 uRange_Stage4;
+uniform float ucornerRadius_Stage5;
+uniform vec4 uproxyRect_Stage5;
+uniform float ublurRadius_Stage5;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+uniform sampler2D uTextureSampler_0_Stage4;
+uniform sampler2D uTextureSampler_0_Stage5;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in float vinCoverage_Stage0;
+vec4 RRectBlurEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 translatedFragPos = gl_FragCoord.xy - uproxyRect_Stage1_c0_c0.xy;
+ float threshold = ucornerRadius_Stage1_c0_c0 + 2.0 * ublurRadius_Stage1_c0_c0;
+ vec2 middle = (uproxyRect_Stage1_c0_c0.zw - uproxyRect_Stage1_c0_c0.xy) - 2.0 * threshold;
+ if (translatedFragPos.x >= threshold && translatedFragPos.x < middle.x + threshold) {
+ translatedFragPos.x = threshold;
+ } else if (translatedFragPos.x >= middle.x + threshold) {
+ translatedFragPos.x -= middle.x - 1.0;
+ }
+ if (translatedFragPos.y > threshold && translatedFragPos.y < middle.y + threshold) {
+ translatedFragPos.y = threshold;
+ } else if (translatedFragPos.y >= middle.y + threshold) {
+ translatedFragPos.y -= middle.y - 1.0;
+ }
+ vec2 proxyDims = vec2(2.0 * threshold + 1.0);
+ vec2 texCoord = translatedFragPos / proxyDims;
+ _output = _input * texture(uTextureSampler_0_Stage1, texCoord);
+ return _output;
+}
+vec4 ConstColorProcessor_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = _input * ucolor_Stage1_c1_c0;
+ }
+ return _output;
+}
+vec4 LinearGradientLayout_Stage3_c2_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage3_c2_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage3_c2_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage3_c2_c0_c1_c0.x) {
+ scale = uscale0_1_Stage3_c2_c0_c1_c0;
+ bias = ubias0_1_Stage3_c2_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage3_c2_c0_c1_c0;
+ bias = ubias2_3_Stage3_c2_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage3_c2_c0_c1_c0.z) {
+ scale = uscale4_5_Stage3_c2_c0_c1_c0;
+ bias = ubias4_5_Stage3_c2_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage3_c2_c0_c1_c0;
+ bias = ubias6_7_Stage3_c2_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage3_c2_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage3_c2_c0_c0_c0(vec4(1.0));
+ {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage3_c2_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+float _guarded_divide(float n, float d) {
+ return n / d;
+}
+float _color_burn_component(float sc, float sa, float dc, float da) {
+ if (da == dc) {
+ return (sa * da + sc * (1.0 - da)) + dc * (1.0 - sa);
+ } else if (sc == 0.0) {
+ return dc * (1.0 - sa);
+ }
+ float d = max(0.0, da - _guarded_divide((da - dc) * sa, sc));
+ return (d * sa + sc * (1.0 - da)) + dc * (1.0 - sa);
+}
+vec4 blend_color_burn(vec4 src, vec4 dst) {
+ return vec4(_color_burn_component(src.x, src.w, dst.x, dst.w), _color_burn_component(src.y, src.w, dst.y, dst.w), _color_burn_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ float alpha = 1.0;
+ alpha = vinCoverage_Stage0;
+ outputCoverage_Stage0 = vec4(alpha);
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputCoverage_Stage0.xyz, 1.0);
+ output_Stage1 = blend_color_burn(RRectBlurEffect_Stage1_c0_c0(inputColor), ConstColorProcessor_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputCoverage_Stage0.w;
+ }
+ vec4 output_Stage2;
+ {
+ float xCoverage, yCoverage;
+ {
+ float x, y;
+ {
+ x = max(urectH_Stage2.x - gl_FragCoord.x, gl_FragCoord.x - urectH_Stage2.z);
+ y = max(urectH_Stage2.y - gl_FragCoord.y, gl_FragCoord.y - urectH_Stage2.w);
+ }
+ xCoverage = texture(uTextureSampler_0_Stage2, vec2(x * uinvSixSigma_Stage2, 0.5)).w;
+ yCoverage = texture(uTextureSampler_0_Stage2, vec2(y * uinvSixSigma_Stage2, 0.5)).w;
+ output_Stage2 = (output_Stage1 * xCoverage) * yCoverage;
+ }
+ output_Stage2 = (output_Stage1 * xCoverage) * yCoverage;
+ }
+ vec4 output_Stage3;
+ {
+ output_Stage3 = blend_dst_in(output_Stage2, TiledGradientEffect_Stage3_c2_c0(vec4(1.0)));
+ }
+ vec4 output_Stage4;
+ {
+ output_Stage4 = vec4(1.0, 1.0, 1.0, 1.0);
+ vec2 coord = vTransformedCoords_1_Stage0;
+ coord.x -= 3.0 * uPixelSize_Stage4;
+ for (int i = 0;i < 7; i++) {
+ output_Stage4 = min(output_Stage4, texture(uTextureSampler_0_Stage4, coord));
+ coord.x += uPixelSize_Stage4;
+ }
+ output_Stage4 *= output_Stage3;
+ }
+ {
+ vec2 translatedFragPos = gl_FragCoord.xy - uproxyRect_Stage5.xy;
+ float threshold = ucornerRadius_Stage5 + 2.0 * ublurRadius_Stage5;
+ vec2 middle = (uproxyRect_Stage5.zw - uproxyRect_Stage5.xy) - 2.0 * threshold;
+ if (translatedFragPos.x >= threshold && translatedFragPos.x < middle.x + threshold) {
+ translatedFragPos.x = threshold;
+ } else if (translatedFragPos.x >= middle.x + threshold) {
+ translatedFragPos.x -= middle.x - 1.0;
+ }
+ if (translatedFragPos.y > threshold && translatedFragPos.y < middle.y + threshold) {
+ translatedFragPos.y = threshold;
+ } else if (translatedFragPos.y >= middle.y + threshold) {
+ translatedFragPos.y -= middle.y - 1.0;
+ }
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in float inCoverage;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out float vinCoverage_Stage0;
+void main() {
+ vec4 color = inColor;
+ vcolor_Stage0 = color;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(inPosition, 1.0)).xy;
+ vinCoverage_Stage0 = inCoverage;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/766.shader_test b/shaders/skia/766.shader_test
new file mode 100644
index 0000000..3e67089
--- /dev/null
+++ b/shaders/skia/766.shader_test
@@ -0,0 +1,36 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+uniform vec4 uColor_Stage0;
+noperspective in vec3 vDashParams_Stage0;
+noperspective in vec4 vRectParams_Stage0;
+void main() {
+ {
+ float xShifted = vDashParams_Stage0.x - floor(vDashParams_Stage0.x / vDashParams_Stage0.z) * vDashParams_Stage0.z;
+ vec2 fragPosShifted = vec2(xShifted, vDashParams_Stage0.y);
+ float alpha = 1.0;
+ alpha *= fragPosShifted.x - vRectParams_Stage0.x > -0.5 ? 1.0 : 0.0;
+ alpha *= vRectParams_Stage0.z - fragPosShifted.x >= -0.5 ? 1.0 : 0.0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 inPosition;
+in vec3 inDashParams;
+in vec4 inRect;
+noperspective out vec3 vDashParams_Stage0;
+noperspective out vec4 vRectParams_Stage0;
+void main() {
+ vDashParams_Stage0 = inDashParams;
+ vRectParams_Stage0 = inRect;
+ vec2 pos2 = inPosition;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/769.shader_test b/shaders/skia/769.shader_test
new file mode 100644
index 0000000..b226dd0
--- /dev/null
+++ b/shaders/skia/769.shader_test
@@ -0,0 +1,672 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_KHR_blend_equation_advanced : require
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+layout (blend_support_all_equations) out ;
+uniform vec2 uImageIncrement_Stage1;
+uniform vec2 uBounds_Stage1;
+uniform vec4 uKernel_Stage1[6];
+uniform vec2 uImageIncrement_Stage2;
+uniform float uSurfaceScale_Stage2;
+uniform vec3 uLightColor_Stage2;
+uniform float uKD_Stage2;
+uniform vec4 uTexDom_Stage2;
+uniform vec3 uDecalParams_Stage2;
+uniform vec3 uLightLocation_Stage2;
+uniform float uExponent_Stage2;
+uniform float uCosInnerConeAngle_Stage2;
+uniform float uCosOuterConeAngle_Stage2;
+uniform float uConeScale_Stage2;
+uniform vec3 uS_Stage2;
+uniform vec2 uImageIncrement_Stage3;
+uniform vec4 uKernel_Stage3[6];
+uniform vec2 uKernelOffset_Stage3;
+uniform float uGain_Stage3;
+uniform float uBias_Stage3;
+uniform vec4 uTexDom_Stage3;
+uniform float uinnerThreshold_Stage4;
+uniform float uouterThreshold_Stage4;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+uniform sampler2D uTextureSampler_0_Stage3;
+uniform sampler2D uTextureSampler_0_Stage4;
+noperspective in vec2 vEllipseOffsets_Stage0;
+noperspective in vec4 vEllipseRadii_Stage0;
+noperspective in vec4 vinColor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+noperspective in vec2 vTransformedCoords_3_Stage0;
+vec4 light_Stage2(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ float colorScale = uKD_Stage2 * dot(normal, surfaceToLight);
+ return vec4(lightColor * clamp(colorScale, 0.0, 1.0), 1.0);
+}
+float sobel_Stage2(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage2(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage2(float m[9], float surfaceScale) {
+ return pointToNormal_Stage2(sobel_Stage2(m[1], m[2], m[4], m[5], 0.0, 0.0, 0.66666698455810547), sobel_Stage2(0.0, 0.0, m[1], m[4], m[2], m[5], 0.66666698455810547), surfaceScale);
+}
+vec3 lightColor_Stage2(vec3 surfaceToLight) {
+ float cosAngle = -dot(surfaceToLight, uS_Stage2);
+ if (cosAngle < uCosOuterConeAngle_Stage2) {
+ return vec3(0.0);
+ }
+ float scale = pow(cosAngle, uExponent_Stage2);
+ if (cosAngle < uCosInnerConeAngle_Stage2) {
+ return ((uLightColor_Stage2 * scale) * (cosAngle - uCosOuterConeAngle_Stage2)) * uConeScale_Stage2;
+ }
+ return uLightColor_Stage2;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vinColor_Stage0;
+ vec2 offset = vEllipseOffsets_Stage0;
+ offset *= vEllipseRadii_Stage0.xy;
+ float test = dot(offset, offset) - 1.0;
+ vec2 grad = (2.0 * offset) * vEllipseRadii_Stage0.xy;
+ float grad_dot = dot(grad, grad);
+ grad_dot = max(grad_dot, 1.1754999560161448e-38);
+ float invlen = inversesqrt(grad_dot);
+ float edgeAlpha = clamp(0.5 - test * invlen, 0.0, 1.0);
+ offset = vEllipseOffsets_Stage0 * vEllipseRadii_Stage0.zw;
+ test = dot(offset, offset) - 1.0;
+ grad = (2.0 * offset) * vEllipseRadii_Stage0.zw;
+ grad_dot = dot(grad, grad);
+ invlen = inversesqrt(grad_dot);
+ edgeAlpha *= clamp(0.5 + test * invlen, 0.0, 1.0);
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0 - 11.0 * uImageIncrement_Stage1;
+ vec2 coordSampled = vec2(0.0, 0.0);
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage1.x && coord.y <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].x;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage1.x && coord.y <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].y;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage1.x && coord.y <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].z;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage1.x && coord.y <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].w;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage1.x && coord.y <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].x;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage1.x && coord.y <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].y;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage1.x && coord.y <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].z;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage1.x && coord.y <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].w;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage1.x && coord.y <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].x;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage1.x && coord.y <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].y;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage1.x && coord.y <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].z;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage1.x && coord.y <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].w;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage1.x && coord.y <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].x;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage1.x && coord.y <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].y;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage1.x && coord.y <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].z;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage1.x && coord.y <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].w;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage1.x && coord.y <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[4].x;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage1.x && coord.y <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[4].y;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage1.x && coord.y <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[4].z;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage1.x && coord.y <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[4].w;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage1.x && coord.y <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[5].x;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage1.x && coord.y <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[5].y;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage1.x && coord.y <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[5].z;
+ }
+ coord += uImageIncrement_Stage1;
+ output_Stage1 *= outputColor_Stage0;
+ }
+ vec4 output_Stage2;
+ {
+ vec2 coord = vTransformedCoords_1_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp0 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp5 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp6 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp7 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp8 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = normalize(uLightLocation_Stage2 - vec3(gl_FragCoord.xy, uSurfaceScale_Stage2 * m[4]));
+ output_Stage2 = light_Stage2(normal_Stage2(m, uSurfaceScale_Stage2), surfaceToLight, lightColor_Stage2(surfaceToLight));
+ output_Stage2 *= output_Stage1;
+ }
+ vec4 output_Stage3;
+ {
+ vec4 sum = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_2_Stage0 - uKernelOffset_Stage3 * uImageIncrement_Stage3;
+ vec4 c;
+ {
+ float k = uKernel_Stage3[0].x;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage3.xy, uTexDom_Stage3.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage3, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage3[0].y;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage3;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage3.xy, uTexDom_Stage3.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage3, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage3[0].z;
+ {
+ vec2 origCoord = coord + vec2(2.0, 0.0) * uImageIncrement_Stage3;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage3.xy, uTexDom_Stage3.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage3, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage3[0].w;
+ {
+ vec2 origCoord = coord + vec2(3.0, 0.0) * uImageIncrement_Stage3;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage3.xy, uTexDom_Stage3.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage3, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage3[1].x;
+ {
+ vec2 origCoord = coord + vec2(4.0, 0.0) * uImageIncrement_Stage3;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage3.xy, uTexDom_Stage3.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage3, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage3[1].y;
+ {
+ vec2 origCoord = coord + vec2(5.0, 0.0) * uImageIncrement_Stage3;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage3.xy, uTexDom_Stage3.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage3, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage3[1].z;
+ {
+ vec2 origCoord = coord + vec2(6.0, 0.0) * uImageIncrement_Stage3;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage3.xy, uTexDom_Stage3.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage3, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage3[1].w;
+ {
+ vec2 origCoord = coord + vec2(7.0, 0.0) * uImageIncrement_Stage3;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage3.xy, uTexDom_Stage3.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage3, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage3[2].x;
+ {
+ vec2 origCoord = coord + vec2(8.0, 0.0) * uImageIncrement_Stage3;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage3.xy, uTexDom_Stage3.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage3, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage3[2].y;
+ {
+ vec2 origCoord = coord + vec2(9.0, 0.0) * uImageIncrement_Stage3;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage3.xy, uTexDom_Stage3.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage3, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage3[2].z;
+ {
+ vec2 origCoord = coord + vec2(10.0, 0.0) * uImageIncrement_Stage3;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage3.xy, uTexDom_Stage3.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage3, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage3[2].w;
+ {
+ vec2 origCoord = coord + vec2(11.0, 0.0) * uImageIncrement_Stage3;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage3.xy, uTexDom_Stage3.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage3, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage3[3].x;
+ {
+ vec2 origCoord = coord + vec2(12.0, 0.0) * uImageIncrement_Stage3;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage3.xy, uTexDom_Stage3.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage3, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage3[3].y;
+ {
+ vec2 origCoord = coord + vec2(13.0, 0.0) * uImageIncrement_Stage3;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage3.xy, uTexDom_Stage3.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage3, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage3[3].z;
+ {
+ vec2 origCoord = coord + vec2(14.0, 0.0) * uImageIncrement_Stage3;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage3.xy, uTexDom_Stage3.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage3, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage3[3].w;
+ {
+ vec2 origCoord = coord + vec2(15.0, 0.0) * uImageIncrement_Stage3;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage3.xy, uTexDom_Stage3.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage3, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage3[4].x;
+ {
+ vec2 origCoord = coord + vec2(16.0, 0.0) * uImageIncrement_Stage3;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage3.xy, uTexDom_Stage3.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage3, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage3[4].y;
+ {
+ vec2 origCoord = coord + vec2(17.0, 0.0) * uImageIncrement_Stage3;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage3.xy, uTexDom_Stage3.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage3, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage3[4].z;
+ {
+ vec2 origCoord = coord + vec2(18.0, 0.0) * uImageIncrement_Stage3;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage3.xy, uTexDom_Stage3.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage3, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage3[4].w;
+ {
+ vec2 origCoord = coord + vec2(19.0, 0.0) * uImageIncrement_Stage3;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage3.xy, uTexDom_Stage3.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage3, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage3[5].x;
+ {
+ vec2 origCoord = coord + vec2(20.0, 0.0) * uImageIncrement_Stage3;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage3.xy, uTexDom_Stage3.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage3, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage3[5].y;
+ {
+ vec2 origCoord = coord + vec2(21.0, 0.0) * uImageIncrement_Stage3;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage3.xy, uTexDom_Stage3.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage3, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage3[5].z;
+ {
+ vec2 origCoord = coord + vec2(22.0, 0.0) * uImageIncrement_Stage3;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage3.xy, uTexDom_Stage3.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage3, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ output_Stage3 = sum * uGain_Stage3 + uBias_Stage3;
+ output_Stage3.w = clamp(output_Stage3.w, 0.0, 1.0);
+ output_Stage3.xyz = clamp(output_Stage3.xyz, 0.0, output_Stage3.w);
+ output_Stage3 *= output_Stage2;
+ }
+ vec4 output_Stage4;
+ {
+ vec4 color = outputCoverage_Stage0;
+ vec4 mask_color = texture(uTextureSampler_0_Stage4, vTransformedCoords_3_Stage0);
+ if (mask_color.w < 0.5) {
+ if (color.w > uouterThreshold_Stage4) {
+ float scale = uouterThreshold_Stage4 / color.w;
+ color.xyz *= scale;
+ color.w = uouterThreshold_Stage4;
+ }
+ } else if (color.w < uinnerThreshold_Stage4) {
+ float scale = uinnerThreshold_Stage4 / max(0.0010000000474974513, color.w);
+ color.xyz *= scale;
+ color.w = uinnerThreshold_Stage4;
+ }
+ output_Stage4 = color;
+ }
+ {
+ sk_FragColor = output_Stage4 * output_Stage3;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+uniform mat3 uCoordTransformMatrix_3_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec2 inEllipseOffset;
+in vec4 inEllipseRadii;
+noperspective out vec2 vEllipseOffsets_Stage0;
+noperspective out vec4 vEllipseRadii_Stage0;
+noperspective out vec4 vinColor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+noperspective out vec2 vTransformedCoords_3_Stage0;
+void main() {
+ vEllipseOffsets_Stage0 = inEllipseOffset;
+ vEllipseRadii_Stage0 = inEllipseRadii;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_3_Stage0 = (uCoordTransformMatrix_3_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/772.shader_test b/shaders/skia/772.shader_test
new file mode 100644
index 0000000..a211e32
--- /dev/null
+++ b/shaders/skia/772.shader_test
@@ -0,0 +1,115 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uColor_Stage0;
+uniform float uCoverage_Stage0;
+uniform vec4 ucircle_Stage1_c0_c0_c0_c0;
+uniform vec4 ucolor_Stage1_c0_c0_c1_c0;
+uniform vec4 ucolor0_Stage1_c1_c0;
+uniform vec4 ucolor1_Stage1_c1_c0;
+uniform vec4 ucolor2_Stage1_c1_c0;
+uniform vec4 ucolor3_Stage1_c1_c0;
+uniform vec4 ucolor4_Stage1_c1_c0;
+uniform vec4 ucolor5_Stage1_c1_c0;
+uniform vec2 uDstTextureUpperLeft_Stage2;
+uniform vec2 uDstTextureCoordScale_Stage2;
+uniform sampler2D uDstTextureSampler_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 CircleEffect_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float d;
+ {
+ d = (1.0 - length((ucircle_Stage1_c0_c0_c0_c0.xy - gl_FragCoord.xy) * ucircle_Stage1_c0_c0_c0_c0.w)) * ucircle_Stage1_c0_c0_c0_c0.z;
+ }
+ {
+ _output = _input * clamp(d, 0.0, 1.0);
+ }
+ return _output;
+}
+vec4 ConstColorProcessor_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = _input * ucolor_Stage1_c0_c0_c1_c0;
+ }
+ return _output;
+}
+vec4 blend_screen(vec4 src, vec4 dst) {
+ return src + (1.0 - src) * dst;
+}
+vec4 ComposeTwo_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_screen(CircleEffect_Stage1_c0_c0_c0_c0(inputColor), ConstColorProcessor_Stage1_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 Overdraw_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = _input;
+ float alpha = 255.0 * _output.w;
+ if (alpha < 0.5) {
+ _output = ucolor0_Stage1_c1_c0;
+ } else if (alpha < 1.5) {
+ _output = ucolor1_Stage1_c1_c0;
+ } else if (alpha < 2.5) {
+ _output = ucolor2_Stage1_c1_c0;
+ } else if (alpha < 3.5) {
+ _output = ucolor3_Stage1_c1_c0;
+ } else if (alpha < 4.5) {
+ _output = ucolor4_Stage1_c1_c0;
+ } else {
+ _output = ucolor5_Stage1_c1_c0;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = uColor_Stage0;
+ outputCoverage_Stage0 = vec4(uCoverage_Stage0);
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_dst_in(ComposeTwo_Stage1_c0_c0(inputColor), Overdraw_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ if (all(lessThanEqual(outputCoverage_Stage0.xyz, vec3(0.0)))) {
+ discard;
+ }
+ vec2 _dstTexCoord = (gl_FragCoord.xy - uDstTextureUpperLeft_Stage2) * uDstTextureCoordScale_Stage2;
+ _dstTexCoord.y = 1.0 - _dstTexCoord.y;
+ vec4 _dstColor = texture(uDstTextureSampler_Stage2, _dstTexCoord);
+ sk_FragColor = blend_src_in(output_Stage1, _dstColor);
+ sk_FragColor = outputCoverage_Stage0 * sk_FragColor + (vec4(1.0) - outputCoverage_Stage0) * _dstColor;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/775-1.shader_test b/shaders/skia/775-1.shader_test
new file mode 100644
index 0000000..54ffc44
--- /dev/null
+++ b/shaders/skia/775-1.shader_test
@@ -0,0 +1,78 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage2_c0_c0;
+uniform vec4 urightBorderColor_Stage2_c0_c0;
+uniform vec4 ustart_Stage2_c0_c0_c1_c0;
+uniform vec4 uend_Stage2_c0_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 LinearGradientLayout_Stage2_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_1_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage2_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage2_c0_c0_c1_c0 + t * uend_Stage2_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage2_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage2_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage2_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage2_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_dst_in(output_Stage1, ClampedGradientEffect_Stage2_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/775.shader_test b/shaders/skia/775.shader_test
new file mode 100644
index 0000000..5b23705
--- /dev/null
+++ b/shaders/skia/775.shader_test
@@ -0,0 +1,369 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_KHR_blend_equation_advanced : require
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+layout (blend_support_all_equations) out ;
+uniform float uSrcTF_Stage0[7];
+uniform mat3 uColorXform_Stage0;
+uniform float uDstTF_Stage0[7];
+uniform vec4 ucolor_Stage1_c0_c0_c0_c0;
+uniform vec4 uboundsUniform_Stage1_c0_c0_c1_c0;
+uniform float uxInvZoom_Stage1_c0_c0_c1_c0;
+uniform float uyInvZoom_Stage1_c0_c0_c1_c0;
+uniform float uxInvInset_Stage1_c0_c0_c1_c0;
+uniform float uyInvInset_Stage1_c0_c0_c1_c0;
+uniform vec2 uoffset_Stage1_c0_c0_c1_c0;
+uniform vec3 uedges_Stage1_c1_c0_c0_c0_c0_c0[8];
+uniform float ucornerRadius_Stage1_c1_c0_c0_c0_c1_c0;
+uniform vec4 uproxyRect_Stage1_c1_c0_c0_c0_c1_c0;
+uniform float ublurRadius_Stage1_c1_c0_c0_c0_c1_c0;
+uniform float uinnerThreshold_Stage1_c1_c0_c1_c0_c0_c0;
+uniform float uouterThreshold_Stage1_c1_c0_c1_c0_c0_c0;
+uniform vec2 uScale_Stage1_c1_c0_c1_c0_c1_c0;
+uniform vec4 uTexDom_Stage1_c1_c0_c1_c0_c1_c0;
+uniform vec3 uDecalParams_Stage1_c1_c0_c1_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+uniform sampler2D uTextureSampler_2_Stage1;
+uniform sampler2D uTextureSampler_3_Stage1;
+uniform sampler2D uTextureSampler_4_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+noperspective in vec2 vTransformedCoords_3_Stage0;
+noperspective in vec2 vtextureCoords_Stage0;
+flat in vec4 vtextureDomain_Stage0;
+flat in vec4 vcolor_Stage0;
+float src_tf_Stage0(float x) {
+ float G = uSrcTF_Stage0[0];
+ float A = uSrcTF_Stage0[1];
+ float B = uSrcTF_Stage0[2];
+ float C = uSrcTF_Stage0[3];
+ float D = uSrcTF_Stage0[4];
+ float E = uSrcTF_Stage0[5];
+ float F = uSrcTF_Stage0[6];
+ float s = sign(x);
+ x = abs(x);
+ x = x < D ? C * x + F : pow(A * x + B, G) + E;
+ return s * x;
+}
+float dst_tf_Stage0(float x) {
+ float G = uDstTF_Stage0[0];
+ float A = uDstTF_Stage0[1];
+ float B = uDstTF_Stage0[2];
+ float C = uDstTF_Stage0[3];
+ float D = uDstTF_Stage0[4];
+ float E = uDstTF_Stage0[5];
+ float F = uDstTF_Stage0[6];
+ float s = sign(x);
+ x = abs(x);
+ x = x < D ? C * x + F : pow(A * x + B, G) + E;
+ return s * x;
+}
+vec4 gamut_xform_Stage0(vec4 color) {
+ color.xyz = uColorXform_Stage0 * color.xyz;
+ return color;
+}
+vec4 color_xform_Stage0(vec4 color) {
+ float nonZeroAlpha = max(color.w, 9.9999997473787516e-05);
+ color = vec4(color.xyz / nonZeroAlpha, nonZeroAlpha);
+ color.x = src_tf_Stage0(color.x);
+ color.y = src_tf_Stage0(color.y);
+ color.z = src_tf_Stage0(color.z);
+ color = gamut_xform_Stage0(color);
+ color.x = dst_tf_Stage0(color.x);
+ color.y = dst_tf_Stage0(color.y);
+ color.z = dst_tf_Stage0(color.z);
+ color.xyz *= color.w;
+ return color;
+}
+vec4 ConstColorProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage1_c0_c0_c0_c0;
+ }
+ return _output;
+}
+vec4 MagnifierEffect_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coord = vTransformedCoords_0_Stage0;
+ vec2 zoom_coord = uoffset_Stage1_c0_c0_c1_c0 + coord * vec2(uxInvZoom_Stage1_c0_c0_c1_c0, uyInvZoom_Stage1_c0_c0_c1_c0);
+ vec2 delta = (coord - uboundsUniform_Stage1_c0_c0_c1_c0.xy) * uboundsUniform_Stage1_c0_c0_c1_c0.zw;
+ delta = min(delta, vec2(1.0, 1.0) - delta);
+ delta *= vec2(uxInvInset_Stage1_c0_c0_c1_c0, uyInvInset_Stage1_c0_c0_c1_c0);
+ float weight = 0.0;
+ if (delta.x < 2.0 && delta.y < 2.0) {
+ delta = vec2(2.0, 2.0) - delta;
+ float dist = length(delta);
+ dist = max(2.0 - dist, 0.0);
+ weight = min(dist * dist, 1.0);
+ } else {
+ vec2 delta_squared = delta * delta;
+ weight = min(min(delta_squared.x, delta_squared.y), 1.0);
+ }
+ _output = texture(uTextureSampler_0_Stage1, mix(coord, zoom_coord, weight));
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 ComposeTwo_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_src_in(ConstColorProcessor_Stage1_c0_c0_c0_c0(inputColor), MagnifierEffect_Stage1_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 ConvexPoly_Stage1_c1_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float alpha = 1.0;
+ float edge;
+ edge = dot(uedges_Stage1_c1_c0_c0_c0_c0_c0[0], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage1_c1_c0_c0_c0_c0_c0[1], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage1_c1_c0_c0_c0_c0_c0[2], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage1_c1_c0_c0_c0_c0_c0[3], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage1_c1_c0_c0_c0_c0_c0[4], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage1_c1_c0_c0_c0_c0_c0[5], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage1_c1_c0_c0_c0_c0_c0[6], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage1_c1_c0_c0_c0_c0_c0[7], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ alpha = 1.0 - alpha;
+ _output = _input * alpha;
+ return _output;
+}
+vec4 RRectBlurEffect_Stage1_c1_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 translatedFragPos = gl_FragCoord.xy - uproxyRect_Stage1_c1_c0_c0_c0_c1_c0.xy;
+ float threshold = ucornerRadius_Stage1_c1_c0_c0_c0_c1_c0 + 2.0 * ublurRadius_Stage1_c1_c0_c0_c0_c1_c0;
+ vec2 middle = (uproxyRect_Stage1_c1_c0_c0_c0_c1_c0.zw - uproxyRect_Stage1_c1_c0_c0_c0_c1_c0.xy) - 2.0 * threshold;
+ if (translatedFragPos.x >= threshold && translatedFragPos.x < middle.x + threshold) {
+ translatedFragPos.x = threshold;
+ } else if (translatedFragPos.x >= middle.x + threshold) {
+ translatedFragPos.x -= middle.x - 1.0;
+ }
+ if (translatedFragPos.y > threshold && translatedFragPos.y < middle.y + threshold) {
+ translatedFragPos.y = threshold;
+ } else if (translatedFragPos.y >= middle.y + threshold) {
+ translatedFragPos.y -= middle.y - 1.0;
+ }
+ vec2 proxyDims = vec2(2.0 * threshold + 1.0);
+ vec2 texCoord = translatedFragPos / proxyDims;
+ _output = _input * texture(uTextureSampler_1_Stage1, texCoord);
+ return _output;
+}
+float _guarded_divide(float n, float d) {
+ return n / d;
+}
+float _color_dodge_component(float sc, float sa, float dc, float da) {
+ if (dc == 0.0) {
+ return sc * (1.0 - da);
+ } else {
+ float d = sa - sc;
+ if (d == 0.0) {
+ return (sa * da + sc * (1.0 - da)) + dc * (1.0 - sa);
+ }
+ d = min(da, _guarded_divide(dc * sa, d));
+ return (d * sa + sc * (1.0 - da)) + dc * (1.0 - sa);
+ }
+}
+vec4 blend_color_dodge(vec4 src, vec4 dst) {
+ return vec4(_color_dodge_component(src.x, src.w, dst.x, dst.w), _color_dodge_component(src.y, src.w, dst.y, dst.w), _color_dodge_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+}
+vec4 ComposeTwo_Stage1_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_color_dodge(ConvexPoly_Stage1_c1_c0_c0_c0_c0_c0(inputColor), RRectBlurEffect_Stage1_c1_c0_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 AlphaThresholdFragmentProcessor_Stage1_c1_c0_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 color = _input;
+ vec4 mask_color = texture(uTextureSampler_2_Stage1, vTransformedCoords_1_Stage0);
+ if (mask_color.w < 0.5) {
+ if (color.w > uouterThreshold_Stage1_c1_c0_c1_c0_c0_c0) {
+ float scale = uouterThreshold_Stage1_c1_c0_c1_c0_c0_c0 / color.w;
+ color.xyz *= scale;
+ color.w = uouterThreshold_Stage1_c1_c0_c1_c0_c0_c0;
+ }
+ } else if (color.w < uinnerThreshold_Stage1_c1_c0_c1_c0_c0_c0) {
+ float scale = uinnerThreshold_Stage1_c1_c0_c1_c0_c0_c0 / max(0.0010000000474974513, color.w);
+ color.xyz *= scale;
+ color.w = uinnerThreshold_Stage1_c1_c0_c1_c0_c0_c0;
+ }
+ _output = color;
+ return _output;
+}
+vec4 DisplacementMap_Stage1_c1_c0_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 dColor = texture(uTextureSampler_3_Stage1, vTransformedCoords_2_Stage0);
+ dColor.xyz = dColor.w < 9.9999999747524271e-07 ? vec3(0.0) : clamp(dColor.xyz / dColor.w, 0.0, 1.0);
+ vec2 cCoords = vTransformedCoords_3_Stage0 + uScale_Stage1_c1_c0_c1_c0_c1_c0 * (dColor.ww - vec2(0.5));
+ {
+ vec2 origCoord = cCoords;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c1_c0_c1_c0.xy, uTexDom_Stage1_c1_c0_c1_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_4_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c1_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c1_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c1_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c1_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ _output = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ return _output;
+}
+vec4 blend_src_out(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src;
+}
+vec4 ComposeTwo_Stage1_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_src_out(AlphaThresholdFragmentProcessor_Stage1_c1_c0_c1_c0_c0_c0(inputColor), DisplacementMap_Stage1_c1_c0_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+float _blend_color_saturation(vec3 color) {
+ return max(max(color.x, color.y), color.z) - min(min(color.x, color.y), color.z);
+}
+vec3 _blend_set_color_saturation_helper(vec3 minMidMax, float sat) {
+ if (minMidMax.x < minMidMax.z) {
+ return vec3(0.0, (sat * (minMidMax.y - minMidMax.x)) / (minMidMax.z - minMidMax.x), sat);
+ }
+ return vec3(0.0);
+}
+vec3 _blend_set_color_saturation(vec3 hueLumColor, vec3 satColor) {
+ float sat = _blend_color_saturation(satColor);
+ if (hueLumColor.x <= hueLumColor.y) {
+ if (hueLumColor.y <= hueLumColor.z) {
+ hueLumColor.xyz = _blend_set_color_saturation_helper(hueLumColor, sat);
+ } else if (hueLumColor.x <= hueLumColor.z) {
+ hueLumColor.xzy = _blend_set_color_saturation_helper(hueLumColor.xzy, sat);
+ } else {
+ hueLumColor.zxy = _blend_set_color_saturation_helper(hueLumColor.zxy, sat);
+ }
+ } else if (hueLumColor.x <= hueLumColor.z) {
+ hueLumColor.yxz = _blend_set_color_saturation_helper(hueLumColor.yxz, sat);
+ } else if (hueLumColor.y <= hueLumColor.z) {
+ hueLumColor.yzx = _blend_set_color_saturation_helper(hueLumColor.yzx, sat);
+ } else {
+ hueLumColor.zyx = _blend_set_color_saturation_helper(hueLumColor.zyx, sat);
+ }
+ return hueLumColor;
+}
+float _blend_color_luminance(vec3 color) {
+ return dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), color);
+}
+vec3 _blend_set_color_luminance(vec3 hueSatColor, float alpha, vec3 lumColor) {
+ float lum = _blend_color_luminance(lumColor);
+ vec3 result = (lum - _blend_color_luminance(hueSatColor)) + hueSatColor;
+ float minComp = min(min(result.x, result.y), result.z);
+ float maxComp = max(max(result.x, result.y), result.z);
+ if (minComp < 0.0 && lum != minComp) {
+ result = lum + ((result - lum) * lum) / (lum - minComp);
+ }
+ if (maxComp > alpha && maxComp != lum) {
+ return lum + ((result - lum) * (alpha - lum)) / (maxComp - lum);
+ }
+ return result;
+}
+vec4 blend_saturation(vec4 src, vec4 dst) {
+ float alpha = dst.w * src.w;
+ vec3 sda = src.xyz * dst.w;
+ vec3 dsa = dst.xyz * src.w;
+ return vec4((((_blend_set_color_luminance(_blend_set_color_saturation(dsa, sda), alpha, dsa) + dst.xyz) - dsa) + src.xyz) - sda, (src.w + dst.w) - alpha);
+}
+vec4 ComposeTwo_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_saturation(ComposeTwo_Stage1_c1_c0_c0_c0(inputColor), ComposeTwo_Stage1_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+float _blend_overlay_component(float sc, float sa, float dc, float da) {
+ if (2.0 * dc <= da) {
+ return (2.0 * sc) * dc;
+ }
+ return sa * da - (2.0 * (da - dc)) * (sa - sc);
+}
+vec4 blend_overlay(vec4 src, vec4 dst) {
+ vec4 result = vec4(_blend_overlay_component(src.x, src.w, dst.x, dst.w), _blend_overlay_component(src.y, src.w, dst.y, dst.w), _blend_overlay_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+ result.xyz += dst.xyz * (1.0 - src.w) + src.xyz * (1.0 - dst.w);
+ return result;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ vec2 textureCoords;
+ textureCoords = vtextureCoords_Stage0;
+ vec4 textureDomain;
+ textureDomain = vtextureDomain_Stage0;
+ outputColor_Stage0 = vcolor_Stage0;
+ outputColor_Stage0 = color_xform_Stage0(texture(uTextureSampler_0_Stage0, clamp(textureCoords, textureDomain.xy, textureDomain.zw))) * outputColor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_overlay(ComposeTwo_Stage1_c0_c0(inputColor), ComposeTwo_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+uniform mat3 uCoordTransformMatrix_3_Stage0;
+in vec2 position;
+in vec2 textureCoords;
+in vec4 textureDomain;
+in vec4 color;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+noperspective out vec2 vTransformedCoords_3_Stage0;
+noperspective out vec2 vtextureCoords_Stage0;
+flat out vec4 vtextureDomain_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vec2 pos2 = position;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(textureCoords, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(textureCoords, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(textureCoords, 1.0)).xy;
+ vTransformedCoords_3_Stage0 = (uCoordTransformMatrix_3_Stage0 * vec3(textureCoords, 1.0)).xy;
+ vtextureCoords_Stage0 = textureCoords;
+ vtextureDomain_Stage0 = textureDomain;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/778-1.shader_test b/shaders/skia/778-1.shader_test
new file mode 100644
index 0000000..139093b
--- /dev/null
+++ b/shaders/skia/778-1.shader_test
@@ -0,0 +1,75 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 ustart_Stage2_c0_c0_c1_c0;
+uniform vec4 uend_Stage2_c0_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 LinearGradientLayout_Stage2_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_1_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage2_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage2_c0_c0_c1_c0 + t * uend_Stage2_c0_c0_c1_c0;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage2_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ t.x = fract(t.x);
+ }
+ _output = SingleIntervalGradientColorizer_Stage2_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_dst_in(output_Stage1, TiledGradientEffect_Stage2_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/778.shader_test b/shaders/skia/778.shader_test
new file mode 100644
index 0000000..fc96a4d
--- /dev/null
+++ b/shaders/skia/778.shader_test
@@ -0,0 +1,373 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_KHR_blend_equation_advanced : require
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+layout (blend_support_all_equations) out ;
+uniform vec4 uColor_Stage0;
+uniform vec2 uImageIncrement_Stage1_c0_c0_c0_c0_c0_c0;
+uniform vec2 uBounds_Stage1_c0_c0_c0_c0_c0_c0;
+uniform vec4 uKernel_Stage1_c0_c0_c0_c0_c0_c0[3];
+uniform vec2 uImageIncrement_Stage1_c0_c0_c0_c0_c1_c0;
+uniform float uSurfaceScale_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec3 uLightColor_Stage1_c0_c0_c0_c0_c1_c0;
+uniform float uKD_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 uTexDom_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec3 uDecalParams_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec3 uLightDirection_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage1_c0_c0_c1_c0_c0_c0;
+uniform vec4 uellipse_Stage1_c0_c0_c1_c0_c1_c0;
+uniform vec3 uedges_Stage1_c1_c0[2];
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+noperspective in vec3 vDashParam_Stage0;
+noperspective in vec2 vCircleParams_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 GaussianConvolution_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0 - 4.0 * uImageIncrement_Stage1_c0_c0_c0_c0_c0_c0;
+ vec2 coordSampled = vec2(0.0, 0.0);
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1_c0_c0_c0_c0_c0_c0.x && coord.x <= uBounds_Stage1_c0_c0_c0_c0_c0_c0.y) {
+ _output += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c0_c0_c0_c0[0].x;
+ }
+ coord += uImageIncrement_Stage1_c0_c0_c0_c0_c0_c0;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1_c0_c0_c0_c0_c0_c0.x && coord.x <= uBounds_Stage1_c0_c0_c0_c0_c0_c0.y) {
+ _output += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c0_c0_c0_c0[0].y;
+ }
+ coord += uImageIncrement_Stage1_c0_c0_c0_c0_c0_c0;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1_c0_c0_c0_c0_c0_c0.x && coord.x <= uBounds_Stage1_c0_c0_c0_c0_c0_c0.y) {
+ _output += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c0_c0_c0_c0[0].z;
+ }
+ coord += uImageIncrement_Stage1_c0_c0_c0_c0_c0_c0;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1_c0_c0_c0_c0_c0_c0.x && coord.x <= uBounds_Stage1_c0_c0_c0_c0_c0_c0.y) {
+ _output += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c0_c0_c0_c0[0].w;
+ }
+ coord += uImageIncrement_Stage1_c0_c0_c0_c0_c0_c0;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1_c0_c0_c0_c0_c0_c0.x && coord.x <= uBounds_Stage1_c0_c0_c0_c0_c0_c0.y) {
+ _output += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c0_c0_c0_c0[1].x;
+ }
+ coord += uImageIncrement_Stage1_c0_c0_c0_c0_c0_c0;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1_c0_c0_c0_c0_c0_c0.x && coord.x <= uBounds_Stage1_c0_c0_c0_c0_c0_c0.y) {
+ _output += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c0_c0_c0_c0[1].y;
+ }
+ coord += uImageIncrement_Stage1_c0_c0_c0_c0_c0_c0;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1_c0_c0_c0_c0_c0_c0.x && coord.x <= uBounds_Stage1_c0_c0_c0_c0_c0_c0.y) {
+ _output += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c0_c0_c0_c0[1].z;
+ }
+ coord += uImageIncrement_Stage1_c0_c0_c0_c0_c0_c0;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1_c0_c0_c0_c0_c0_c0.x && coord.x <= uBounds_Stage1_c0_c0_c0_c0_c0_c0.y) {
+ _output += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c0_c0_c0_c0[1].w;
+ }
+ coord += uImageIncrement_Stage1_c0_c0_c0_c0_c0_c0;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1_c0_c0_c0_c0_c0_c0.x && coord.x <= uBounds_Stage1_c0_c0_c0_c0_c0_c0.y) {
+ _output += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c0_c0_c0_c0[2].x;
+ }
+ coord += uImageIncrement_Stage1_c0_c0_c0_c0_c0_c0;
+ _output *= _input;
+ return _output;
+}
+vec4 light_Stage1_c0_c0_c0_c0_c1_c0(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ float colorScale = uKD_Stage1_c0_c0_c0_c0_c1_c0 * dot(normal, surfaceToLight);
+ return vec4(lightColor * clamp(colorScale, 0.0, 1.0), 1.0);
+}
+float sobel_Stage1_c0_c0_c0_c0_c1_c0(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage1_c0_c0_c0_c0_c1_c0(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage1_c0_c0_c0_c0_c1_c0(float m[9], float surfaceScale) {
+ return pointToNormal_Stage1_c0_c0_c0_c0_c1_c0(sobel_Stage1_c0_c0_c0_c0_c1_c0(m[0], m[2], m[3], m[5], m[6], m[8], 0.25), sobel_Stage1_c0_c0_c0_c0_c1_c0(m[0], m[6], m[1], m[7], m[2], m[8], 0.25), surfaceScale);
+}
+vec4 DiffuseLighting_Stage1_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coord = vTransformedCoords_1_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage1_c0_c0_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0_c1_c0.xy, uTexDom_Stage1_c0_c0_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp0 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1_c0_c0_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0_c1_c0.xy, uTexDom_Stage1_c0_c0_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1_c0_c0_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0_c1_c0.xy, uTexDom_Stage1_c0_c0_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage1_c0_c0_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0_c1_c0.xy, uTexDom_Stage1_c0_c0_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0_c1_c0.xy, uTexDom_Stage1_c0_c0_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1_c0_c0_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0_c1_c0.xy, uTexDom_Stage1_c0_c0_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp5 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage1_c0_c0_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0_c1_c0.xy, uTexDom_Stage1_c0_c0_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp6 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage1_c0_c0_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0_c1_c0.xy, uTexDom_Stage1_c0_c0_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp7 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage1_c0_c0_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0_c1_c0.xy, uTexDom_Stage1_c0_c0_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp8 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = uLightDirection_Stage1_c0_c0_c0_c0_c1_c0;
+ _output = light_Stage1_c0_c0_c0_c0_c1_c0(normal_Stage1_c0_c0_c0_c0_c1_c0(m, uSurfaceScale_Stage1_c0_c0_c0_c0_c1_c0), surfaceToLight, uLightColor_Stage1_c0_c0_c0_c0_c1_c0);
+ _output *= _input;
+ return _output;
+}
+vec4 blend_dst_atop(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src + src.w * dst;
+}
+vec4 ComposeTwo_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_dst_atop(GaussianConvolution_Stage1_c0_c0_c0_c0_c0_c0(inputColor), DiffuseLighting_Stage1_c0_c0_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 ConstColorProcessor_Stage1_c0_c0_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = _input * ucolor_Stage1_c0_c0_c1_c0_c0_c0;
+ }
+ return _output;
+}
+vec4 EllipseEffect_Stage1_c0_c0_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 d = gl_FragCoord.xy - uellipse_Stage1_c0_c0_c1_c0_c1_c0.xy;
+ vec2 Z = d * uellipse_Stage1_c0_c0_c1_c0_c1_c0.zw;
+ float implicit = dot(Z, d) - 1.0;
+ float grad_dot = 4.0 * dot(Z, Z);
+ {
+ grad_dot = max(grad_dot, 1.1754999560161448e-38);
+ }
+ float approx_dist = implicit * inversesqrt(grad_dot);
+ float alpha;
+ {
+ alpha = clamp(0.5 + approx_dist, 0.0, 1.0);
+ }
+ _output = _input * alpha;
+ return _output;
+}
+vec4 blend_dst_over(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src + dst;
+}
+vec4 ComposeTwo_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_dst_over(ConstColorProcessor_Stage1_c0_c0_c1_c0_c0_c0(inputColor), EllipseEffect_Stage1_c0_c0_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+float _guarded_divide(float n, float d) {
+ return n / d;
+}
+float _soft_light_component(float sc, float sa, float dc, float da) {
+ if (2.0 * sc <= sa) {
+ return (_guarded_divide((dc * dc) * (sa - 2.0 * sc), da) + (1.0 - da) * sc) + dc * ((-sa + 2.0 * sc) + 1.0);
+ } else if (4.0 * dc <= da) {
+ float DSqd = dc * dc;
+ float DCub = DSqd * dc;
+ float DaSqd = da * da;
+ float DaCub = DaSqd * da;
+ return _guarded_divide(((DaSqd * (sc - dc * ((3.0 * sa - 6.0 * sc) - 1.0)) + ((12.0 * da) * DSqd) * (sa - 2.0 * sc)) - (16.0 * DCub) * (sa - 2.0 * sc)) - DaCub * sc, DaSqd);
+ }
+ return ((dc * ((sa - 2.0 * sc) + 1.0) + sc) - sqrt(da * dc) * (sa - 2.0 * sc)) - da * sc;
+}
+vec4 blend_soft_light(vec4 src, vec4 dst) {
+ if (dst.w == 0.0) {
+ return src;
+ }
+ return vec4(_soft_light_component(src.x, src.w, dst.x, dst.w), _soft_light_component(src.y, src.w, dst.y, dst.w), _soft_light_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+}
+vec4 ComposeTwo_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_soft_light(ComposeTwo_Stage1_c0_c0_c0_c0(inputColor), ComposeTwo_Stage1_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 ConvexPoly_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ float alpha = 1.0;
+ float edge;
+ edge = dot(uedges_Stage1_c1_c0[0], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage1_c1_c0[1], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ _output = _input * alpha;
+ return _output;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = uColor_Stage0;
+ float xShifted = vDashParam_Stage0.x - floor(vDashParam_Stage0.x / vDashParam_Stage0.z) * vDashParam_Stage0.z;
+ vec2 fragPosShifted = vec2(xShifted, vDashParam_Stage0.y);
+ vec2 center = vec2(vCircleParams_Stage0.y, 0.0);
+ float dist = length(center - fragPosShifted);
+ float alpha = 1.0;
+ alpha *= dist < vCircleParams_Stage0.x + 0.5 ? 1.0 : 0.0;
+ outputCoverage_Stage0 = vec4(alpha);
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_dst_over(ComposeTwo_Stage1_c0_c0(inputColor), ConvexPoly_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ sk_FragColor = outputCoverage_Stage0 * output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 inPosition;
+in vec3 inDashParams;
+in vec2 inCircleParams;
+noperspective out vec3 vDashParam_Stage0;
+noperspective out vec2 vCircleParams_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vDashParam_Stage0 = inDashParams;
+ vCircleParams_Stage0 = inCircleParams;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/781-1.shader_test b/shaders/skia/781-1.shader_test
new file mode 100644
index 0000000..f668f97
--- /dev/null
+++ b/shaders/skia/781-1.shader_test
@@ -0,0 +1,77 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 ustart_Stage2_c0_c0_c1_c0;
+uniform vec4 uend_Stage2_c0_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 LinearGradientLayout_Stage2_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_1_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage2_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage2_c0_c0_c1_c0 + t * uend_Stage2_c0_c0_c1_c0;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage2_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = SingleIntervalGradientColorizer_Stage2_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_dst_in(output_Stage1, TiledGradientEffect_Stage2_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/781.shader_test b/shaders/skia/781.shader_test
new file mode 100644
index 0000000..e65091d
--- /dev/null
+++ b/shaders/skia/781.shader_test
@@ -0,0 +1,431 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform mat3 uCoordTransformMatrix_3_Stage0;
+uniform vec2 uImageIncrement_Stage1;
+uniform float uSurfaceScale_Stage1;
+uniform vec3 uLightColor_Stage1;
+uniform float uKD_Stage1;
+uniform vec4 uTexDom_Stage1;
+uniform vec3 uDecalParams_Stage1;
+uniform vec3 uLightDirection_Stage1;
+uniform vec2 ufocalParams_Stage2_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage2_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage2_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage2_c0_c0_c1_c0;
+uniform vec4 ucircleData_Stage3;
+uniform vec4 uinnerRect_Stage4;
+uniform vec2 uradiusPlusHalf_Stage4;
+uniform vec2 ubaseFrequency_Stage5_c1_c0;
+uniform float uz_Stage5_c1_c0;
+uniform float ucornerRadius_Stage6;
+uniform vec4 uproxyRect_Stage6;
+uniform float ublurRadius_Stage6;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage3;
+uniform sampler2D uTextureSampler_0_Stage5;
+uniform sampler2D uTextureSampler_1_Stage5;
+uniform sampler2D uTextureSampler_0_Stage6;
+noperspective in vec4 vinCircleEdge_Stage0;
+noperspective in vec4 vinColor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+vec4 light_Stage1(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ float colorScale = uKD_Stage1 * dot(normal, surfaceToLight);
+ return vec4(lightColor * clamp(colorScale, 0.0, 1.0), 1.0);
+}
+float sobel_Stage1(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage1(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage1(float m[9], float surfaceScale) {
+ return pointToNormal_Stage1(sobel_Stage1(0.0, 0.0, m[4], m[5], m[7], m[8], 0.66666698455810547), sobel_Stage1(0.0, 0.0, m[4], m[7], m[5], m[8], 0.66666698455810547), surfaceScale);
+}
+vec4 TwoPointConicalGradientLayout_Stage2_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_1_Stage0;
+ float t = -1.0;
+ {
+ {
+ float r0 = ufocalParams_Stage2_c0_c0_c0_c0.x;
+ {
+ t = -length(p) - r0;
+ }
+ }
+ }
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage2_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage2_c0_c0_c1_c0;
+ bias = ubias0_1_Stage2_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage2_c0_c0_c1_c0;
+ bias = ubias2_3_Stage2_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage2_c0_c0_c1_c0;
+ bias = ubias4_5_Stage2_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage2_c0_c0_c1_c0;
+ bias = ubias6_7_Stage2_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage2_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage2_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec3 fade_Stage5_c1_c0(vec3 t) {
+ return ((t * t) * t) * (t * (t * 6.0 - 15.0) + 10.0);
+}
+float perm_Stage5_c1_c0(float x) {
+ return texture(uTextureSampler_0_Stage5, vec2(fract(x / 256.0), 0.0)).x * 255.0;
+}
+float grad_Stage5_c1_c0(float x, vec3 p) {
+ return dot(texture(uTextureSampler_1_Stage5, vec2(fract(x / 16.0), 0.0)).xyz * 255.0 - vec3(1.0), p);
+}
+float lerp_Stage5_c1_c0(float a, float b, float w) {
+ return a + w * (b - a);
+}
+float noise_Stage5_c1_c0(vec3 p) {
+ vec3 P = mod(floor(p), 256.0);
+ p -= floor(p);
+ vec3 f = fade_Stage5_c1_c0(p);
+ float A = perm_Stage5_c1_c0(P.x) + P.y;
+ float AA = perm_Stage5_c1_c0(A) + P.z;
+ float AB = perm_Stage5_c1_c0(A + 1.0) + P.z;
+ float B = perm_Stage5_c1_c0(P.x + 1.0) + P.y;
+ float BA = perm_Stage5_c1_c0(B) + P.z;
+ float BB = perm_Stage5_c1_c0(B + 1.0) + P.z;
+ float result = lerp_Stage5_c1_c0(lerp_Stage5_c1_c0(lerp_Stage5_c1_c0(grad_Stage5_c1_c0(perm_Stage5_c1_c0(AA), p), grad_Stage5_c1_c0(perm_Stage5_c1_c0(BA), p + vec3(-1.0, 0.0, 0.0)), f.x), lerp_Stage5_c1_c0(grad_Stage5_c1_c0(perm_Stage5_c1_c0(AB), p + vec3(0.0, -1.0, 0.0)), grad_Stage5_c1_c0(perm_Stage5_c1_c0(BB), p + vec3(-1.0, -1.0, 0.0)), f.x), f.y), lerp_Stage5_c1_c0(lerp_Stage5_c1_c0(grad_Stage5_c1_c0(perm_Stage5_c1_c0(AA + 1.0), p + vec3(0.0, 0.0, -1.0)), grad_Stage5_c1_c0(perm_Stage5_c1_c0(BA + 1.0), p + vec3(-1.0, 0.0, -1.0)), f.x), lerp_Stage5_c1_c0(grad_Stage5_c1_c0(perm_Stage5_c1_c0(AB + 1.0), p + vec3(0.0, -1.0, -1.0)), grad_Stage5_c1_c0(perm_Stage5_c1_c0(BB + 1.0), p + vec3(-1.0, -1.0, -1.0)), f.x), f.y), f.z);
+ return result;
+}
+float noiseOctaves_Stage5_c1_c0(vec3 p) {
+ float result = 0.0;
+ float ratio = 1.0;
+ for (float i = 0.0;i < 5.0; i++) {
+ result += noise_Stage5_c1_c0(p) / ratio;
+ p *= 2.0;
+ ratio *= 2.0;
+ }
+ return (result + 1.0) / 2.0;
+}
+vec4 ImprovedPerlinNoise_Stage5_c1_c0(vec4 _input, vec2 _coords) {
+ _coords = (uCoordTransformMatrix_3_Stage0 * vec3(_coords, 1.0)).xy;
+ vec4 _output;
+ vec2 coords = _coords * ubaseFrequency_Stage5_c1_c0;
+ float r = noiseOctaves_Stage5_c1_c0(vec3(coords, uz_Stage5_c1_c0));
+ float g = noiseOctaves_Stage5_c1_c0(vec3(coords, uz_Stage5_c1_c0));
+ float b = noiseOctaves_Stage5_c1_c0(vec3(coords, uz_Stage5_c1_c0));
+ float a = noiseOctaves_Stage5_c1_c0(vec3(coords, uz_Stage5_c1_c0));
+ _output = vec4(r, g, b, a);
+ _output = clamp(_output, 0.0, 1.0);
+ _output = vec4(_output.xyz * _output.www, _output.w);
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ vec4 circleEdge;
+ circleEdge = vinCircleEdge_Stage0;
+ outputColor_Stage0 = vinColor_Stage0;
+ float d = length(circleEdge.xy);
+ float distanceToOuterEdge = circleEdge.z * (1.0 - d);
+ float edgeAlpha = clamp(distanceToOuterEdge, 0.0, 1.0);
+ float distanceToInnerEdge = circleEdge.z * (d - circleEdge.w);
+ float innerAlpha = clamp(distanceToInnerEdge, 0.0, 1.0);
+ edgeAlpha *= innerAlpha;
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ vec4 output_Stage1;
+ {
+ vec2 coord = vTransformedCoords_0_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp0 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp5 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp6 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp7 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp8 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = uLightDirection_Stage1;
+ output_Stage1 = light_Stage1(normal_Stage1(m, uSurfaceScale_Stage1), surfaceToLight, uLightColor_Stage1);
+ output_Stage1 *= outputColor_Stage0;
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_dst_in(output_Stage1, TiledGradientEffect_Stage2_c0_c0(vec4(1.0)));
+ }
+ vec4 output_Stage3;
+ {
+ vec2 vec = vec2((gl_FragCoord.x - ucircleData_Stage3.x) * ucircleData_Stage3.w, (gl_FragCoord.y - ucircleData_Stage3.y) * ucircleData_Stage3.w);
+ float dist = length(vec) + (0.5 - ucircleData_Stage3.z) * ucircleData_Stage3.w;
+ output_Stage3 = output_Stage2 * texture(uTextureSampler_0_Stage3, vec2(dist, 0.5)).w;
+ }
+ vec4 output_Stage4;
+ {
+ vec2 dxy0 = uinnerRect_Stage4.xy - gl_FragCoord.xy;
+ vec2 dxy1 = gl_FragCoord.xy - uinnerRect_Stage4.zw;
+ vec2 dxy = max(max(dxy0, dxy1), 0.0);
+ float alpha = clamp(uradiusPlusHalf_Stage4.x - length(dxy), 0.0, 1.0);
+ alpha = 1.0 - alpha;
+ output_Stage4 = output_Stage3 * alpha;
+ }
+ vec4 output_Stage5;
+ {
+ vec2 coord = vTransformedCoords_2_Stage0 - vec2(0.5);
+ vec2 f = fract(coord);
+ coord += 0.5 - f;
+ vec4 wx = mat4(0.055555555555555552, 0.88888888888888884, 0.055555555555555552, 0.0, -0.5, 0.0, 0.5, 0.0, 0.83333333333333337, -2.0, 1.5, -0.33333333333333331, -0.3888888888888889, 1.1666666666666667, -1.1666666666666667, 0.3888888888888889) * vec4(1.0, f.x, f.x * f.x, (f.x * f.x) * f.x);
+ vec4 wy = mat4(0.055555555555555552, 0.88888888888888884, 0.055555555555555552, 0.0, -0.5, 0.0, 0.5, 0.0, 0.83333333333333337, -2.0, 1.5, -0.33333333333333331, -0.3888888888888889, 1.1666666666666667, -1.1666666666666667, 0.3888888888888889) * vec4(1.0, f.y, f.y * f.y, (f.y * f.y) * f.y);
+ vec4 rowColors[4];
+ rowColors[0] = ImprovedPerlinNoise_Stage5_c1_c0(vec4(1.0), coord + vec2(-1.0, -1.0));
+ rowColors[1] = ImprovedPerlinNoise_Stage5_c1_c0(vec4(1.0), coord + vec2(0.0, -1.0));
+ rowColors[2] = ImprovedPerlinNoise_Stage5_c1_c0(vec4(1.0), coord + vec2(1.0, -1.0));
+ rowColors[3] = ImprovedPerlinNoise_Stage5_c1_c0(vec4(1.0), coord + vec2(2.0, -1.0));
+ vec4 s0 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ rowColors[0] = ImprovedPerlinNoise_Stage5_c1_c0(vec4(1.0), coord + vec2(-1.0, 0.0));
+ rowColors[1] = ImprovedPerlinNoise_Stage5_c1_c0(vec4(1.0), coord);
+ rowColors[2] = ImprovedPerlinNoise_Stage5_c1_c0(vec4(1.0), coord + vec2(1.0, 0.0));
+ rowColors[3] = ImprovedPerlinNoise_Stage5_c1_c0(vec4(1.0), coord + vec2(2.0, 0.0));
+ vec4 s1 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ rowColors[0] = ImprovedPerlinNoise_Stage5_c1_c0(vec4(1.0), coord + vec2(-1.0, 1.0));
+ rowColors[1] = ImprovedPerlinNoise_Stage5_c1_c0(vec4(1.0), coord + vec2(0.0, 1.0));
+ rowColors[2] = ImprovedPerlinNoise_Stage5_c1_c0(vec4(1.0), coord + vec2(1.0, 1.0));
+ rowColors[3] = ImprovedPerlinNoise_Stage5_c1_c0(vec4(1.0), coord + vec2(2.0, 1.0));
+ vec4 s2 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ rowColors[0] = ImprovedPerlinNoise_Stage5_c1_c0(vec4(1.0), coord + vec2(-1.0, 2.0));
+ rowColors[1] = ImprovedPerlinNoise_Stage5_c1_c0(vec4(1.0), coord + vec2(0.0, 2.0));
+ rowColors[2] = ImprovedPerlinNoise_Stage5_c1_c0(vec4(1.0), coord + vec2(1.0, 2.0));
+ rowColors[3] = ImprovedPerlinNoise_Stage5_c1_c0(vec4(1.0), coord + vec2(2.0, 2.0));
+ vec4 s3 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ vec4 bicubicColor = ((wy.x * s0 + wy.y * s1) + wy.z * s2) + wy.w * s3;
+ bicubicColor = clamp(bicubicColor, 0.0, 1.0);
+ output_Stage5 = bicubicColor * output_Stage4;
+ }
+ vec4 output_Stage6;
+ {
+ vec2 translatedFragPos = gl_FragCoord.xy - uproxyRect_Stage6.xy;
+ float threshold = ucornerRadius_Stage6 + 2.0 * ublurRadius_Stage6;
+ vec2 middle = (uproxyRect_Stage6.zw - uproxyRect_Stage6.xy) - 2.0 * threshold;
+ if (translatedFragPos.x >= threshold && translatedFragPos.x < middle.x + threshold) {
+ translatedFragPos.x = threshold;
+ } else if (translatedFragPos.x >= middle.x + threshold) {
+ translatedFragPos.x -= middle.x - 1.0;
+ }
+ if (translatedFragPos.y > threshold && translatedFragPos.y < middle.y + threshold) {
+ translatedFragPos.y = threshold;
+ } else if (translatedFragPos.y >= middle.y + threshold) {
+ translatedFragPos.y -= middle.y - 1.0;
+ }
+ vec2 proxyDims = vec2(2.0 * threshold + 1.0);
+ vec2 texCoord = translatedFragPos / proxyDims;
+ output_Stage6 = output_Stage5 * texture(uTextureSampler_0_Stage6, texCoord);
+ }
+ {
+ sk_FragColor = output_Stage6 * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec4 inCircleEdge;
+noperspective out vec4 vinCircleEdge_Stage0;
+noperspective out vec4 vinColor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+void main() {
+ vinCircleEdge_Stage0 = inCircleEdge;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/784-1.shader_test b/shaders/skia/784-1.shader_test
new file mode 100644
index 0000000..631cfbd
--- /dev/null
+++ b/shaders/skia/784-1.shader_test
@@ -0,0 +1,88 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uscale01_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias01_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale23_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias23_Stage2_c0_c0_c1_c0;
+uniform float uthreshold_Stage2_c0_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 LinearGradientLayout_Stage2_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_1_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 DualIntervalGradientColorizer_Stage2_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthreshold_Stage2_c0_c0_c1_c0) {
+ scale = uscale01_Stage2_c0_c0_c1_c0;
+ bias = ubias01_Stage2_c0_c0_c1_c0;
+ } else {
+ scale = uscale23_Stage2_c0_c0_c1_c0;
+ bias = ubias23_Stage2_c0_c0_c1_c0;
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage2_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = DualIntervalGradientColorizer_Stage2_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_dst_in(output_Stage1, TiledGradientEffect_Stage2_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/784.shader_test b/shaders/skia/784.shader_test
new file mode 100644
index 0000000..bd4f020
--- /dev/null
+++ b/shaders/skia/784.shader_test
@@ -0,0 +1,371 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec3 uedges_Stage1_c0_c0_c1_c0[7];
+uniform vec2 uImageIncrement_Stage1_c1_c0_c0_c0;
+uniform float uSurfaceScale_Stage1_c1_c0_c0_c0;
+uniform vec3 uLightColor_Stage1_c1_c0_c0_c0;
+uniform float uKD_Stage1_c1_c0_c0_c0;
+uniform vec4 uTexDom_Stage1_c1_c0_c0_c0;
+uniform vec3 uDecalParams_Stage1_c1_c0_c0_c0;
+uniform vec3 uLightLocation_Stage1_c1_c0_c0_c0;
+uniform float uExponent_Stage1_c1_c0_c0_c0;
+uniform float uCosInnerConeAngle_Stage1_c1_c0_c0_c0;
+uniform float uCosOuterConeAngle_Stage1_c1_c0_c0_c0;
+uniform float uConeScale_Stage1_c1_c0_c0_c0;
+uniform vec3 uS_Stage1_c1_c0_c0_c0;
+uniform vec4 ucolor_Stage1_c1_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 ColorTableEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float nonZeroAlpha = max(_input.w, 9.9999997473787516e-05);
+ vec4 coord = vec4(_input.xyz / nonZeroAlpha, nonZeroAlpha);
+ coord = coord * 0.9960939884185791 + vec4(0.0019529999699443579, 0.0019529999699443579, 0.0019529999699443579, 0.0019529999699443579);
+ _output.w = texture(uTextureSampler_0_Stage1, vec2(coord.w, 0.125)).w;
+ _output.x = texture(uTextureSampler_0_Stage1, vec2(coord.x, 0.375)).w;
+ _output.y = texture(uTextureSampler_0_Stage1, vec2(coord.y, 0.625)).w;
+ _output.z = texture(uTextureSampler_0_Stage1, vec2(coord.z, 0.875)).w;
+ _output.xyz *= _output.w;
+ return _output;
+}
+vec4 ClampFragmentProcessor_Stage1_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ float alpha = clamp(_input.w, 0.0, 1.0);
+ _output = vec4(clamp(_input.xyz, 0.0, alpha), alpha);
+ }
+ return _output;
+}
+float _guarded_divide(float n, float d) {
+ return n / d;
+}
+float _color_burn_component(float sc, float sa, float dc, float da) {
+ if (da == dc) {
+ return (sa * da + sc * (1.0 - da)) + dc * (1.0 - sa);
+ } else if (sc == 0.0) {
+ return dc * (1.0 - sa);
+ }
+ float d = max(0.0, da - _guarded_divide((da - dc) * sa, sc));
+ return (d * sa + sc * (1.0 - da)) + dc * (1.0 - sa);
+}
+vec4 blend_color_burn(vec4 src, vec4 dst) {
+ return vec4(_color_burn_component(src.x, src.w, dst.x, dst.w), _color_burn_component(src.y, src.w, dst.y, dst.w), _color_burn_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+}
+vec4 ComposeTwo_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_color_burn(ColorTableEffect_Stage1_c0_c0_c0_c0_c0_c0(inputColor), ClampFragmentProcessor_Stage1_c0_c0_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 ConvexPoly_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float alpha = 1.0;
+ float edge;
+ edge = dot(uedges_Stage1_c0_c0_c1_c0[0], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage1_c0_c0_c1_c0[1], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage1_c0_c0_c1_c0[2], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage1_c0_c0_c1_c0[3], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage1_c0_c0_c1_c0[4], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage1_c0_c0_c1_c0[5], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage1_c0_c0_c1_c0[6], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ _output = _input * alpha;
+ return _output;
+}
+float _blend_color_saturation(vec3 color) {
+ return max(max(color.x, color.y), color.z) - min(min(color.x, color.y), color.z);
+}
+vec3 _blend_set_color_saturation_helper(vec3 minMidMax, float sat) {
+ if (minMidMax.x < minMidMax.z) {
+ return vec3(0.0, (sat * (minMidMax.y - minMidMax.x)) / (minMidMax.z - minMidMax.x), sat);
+ }
+ return vec3(0.0);
+}
+vec3 _blend_set_color_saturation(vec3 hueLumColor, vec3 satColor) {
+ float sat = _blend_color_saturation(satColor);
+ if (hueLumColor.x <= hueLumColor.y) {
+ if (hueLumColor.y <= hueLumColor.z) {
+ hueLumColor.xyz = _blend_set_color_saturation_helper(hueLumColor, sat);
+ } else if (hueLumColor.x <= hueLumColor.z) {
+ hueLumColor.xzy = _blend_set_color_saturation_helper(hueLumColor.xzy, sat);
+ } else {
+ hueLumColor.zxy = _blend_set_color_saturation_helper(hueLumColor.zxy, sat);
+ }
+ } else if (hueLumColor.x <= hueLumColor.z) {
+ hueLumColor.yxz = _blend_set_color_saturation_helper(hueLumColor.yxz, sat);
+ } else if (hueLumColor.y <= hueLumColor.z) {
+ hueLumColor.yzx = _blend_set_color_saturation_helper(hueLumColor.yzx, sat);
+ } else {
+ hueLumColor.zyx = _blend_set_color_saturation_helper(hueLumColor.zyx, sat);
+ }
+ return hueLumColor;
+}
+float _blend_color_luminance(vec3 color) {
+ return dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), color);
+}
+vec3 _blend_set_color_luminance(vec3 hueSatColor, float alpha, vec3 lumColor) {
+ float lum = _blend_color_luminance(lumColor);
+ vec3 result = (lum - _blend_color_luminance(hueSatColor)) + hueSatColor;
+ float minComp = min(min(result.x, result.y), result.z);
+ float maxComp = max(max(result.x, result.y), result.z);
+ if (minComp < 0.0 && lum != minComp) {
+ result = lum + ((result - lum) * lum) / (lum - minComp);
+ }
+ if (maxComp > alpha && maxComp != lum) {
+ return lum + ((result - lum) * (alpha - lum)) / (maxComp - lum);
+ }
+ return result;
+}
+vec4 blend_saturation(vec4 src, vec4 dst) {
+ float alpha = dst.w * src.w;
+ vec3 sda = src.xyz * dst.w;
+ vec3 dsa = dst.xyz * src.w;
+ return vec4((((_blend_set_color_luminance(_blend_set_color_saturation(dsa, sda), alpha, dsa) + dst.xyz) - dsa) + src.xyz) - sda, (src.w + dst.w) - alpha);
+}
+vec4 ComposeTwo_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_saturation(ComposeTwo_Stage1_c0_c0_c0_c0(inputColor), ConvexPoly_Stage1_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 light_Stage1_c1_c0_c0_c0(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ float colorScale = uKD_Stage1_c1_c0_c0_c0 * dot(normal, surfaceToLight);
+ return vec4(lightColor * clamp(colorScale, 0.0, 1.0), 1.0);
+}
+float sobel_Stage1_c1_c0_c0_c0(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage1_c1_c0_c0_c0(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage1_c1_c0_c0_c0(float m[9], float surfaceScale) {
+ return pointToNormal_Stage1_c1_c0_c0_c0(sobel_Stage1_c1_c0_c0_c0(m[1], m[2], m[4], m[5], 0.0, 0.0, 0.66666698455810547), sobel_Stage1_c1_c0_c0_c0(0.0, 0.0, m[1], m[4], m[2], m[5], 0.66666698455810547), surfaceScale);
+}
+vec3 lightColor_Stage1_c1_c0_c0_c0(vec3 surfaceToLight) {
+ float cosAngle = -dot(surfaceToLight, uS_Stage1_c1_c0_c0_c0);
+ if (cosAngle < uCosOuterConeAngle_Stage1_c1_c0_c0_c0) {
+ return vec3(0.0);
+ }
+ float scale = pow(cosAngle, uExponent_Stage1_c1_c0_c0_c0);
+ if (cosAngle < uCosInnerConeAngle_Stage1_c1_c0_c0_c0) {
+ return ((uLightColor_Stage1_c1_c0_c0_c0 * scale) * (cosAngle - uCosOuterConeAngle_Stage1_c1_c0_c0_c0)) * uConeScale_Stage1_c1_c0_c0_c0;
+ }
+ return uLightColor_Stage1_c1_c0_c0_c0;
+}
+vec4 DiffuseLighting_Stage1_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coord = vTransformedCoords_0_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage1_c1_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0.xy, uTexDom_Stage1_c1_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp0 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1_c1_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0.xy, uTexDom_Stage1_c1_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1_c1_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0.xy, uTexDom_Stage1_c1_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage1_c1_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0.xy, uTexDom_Stage1_c1_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0.xy, uTexDom_Stage1_c1_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1_c1_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0.xy, uTexDom_Stage1_c1_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp5 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage1_c1_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0.xy, uTexDom_Stage1_c1_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp6 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage1_c1_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0.xy, uTexDom_Stage1_c1_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp7 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage1_c1_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0.xy, uTexDom_Stage1_c1_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp8 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = normalize(uLightLocation_Stage1_c1_c0_c0_c0 - vec3(gl_FragCoord.xy, uSurfaceScale_Stage1_c1_c0_c0_c0 * m[4]));
+ _output = light_Stage1_c1_c0_c0_c0(normal_Stage1_c1_c0_c0_c0(m, uSurfaceScale_Stage1_c1_c0_c0_c0), surfaceToLight, lightColor_Stage1_c1_c0_c0_c0(surfaceToLight));
+ _output *= _input;
+ return _output;
+}
+vec4 ConstColorProcessor_Stage1_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage1_c1_c0_c1_c0;
+ }
+ return _output;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 blend_darken(vec4 src, vec4 dst) {
+ vec4 result = blend_src_over(src, dst);
+ result.xyz = min(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
+ return result;
+}
+vec4 ComposeTwo_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_darken(DiffuseLighting_Stage1_c1_c0_c0_c0(inputColor), ConstColorProcessor_Stage1_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 blend_xor(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src + (1.0 - src.w) * dst;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(vec4(1.0).xyz, 1.0);
+ output_Stage1 = blend_xor(ComposeTwo_Stage1_c0_c0(inputColor), ComposeTwo_Stage1_c1_c0(inputColor));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/787-1.shader_test b/shaders/skia/787-1.shader_test
new file mode 100644
index 0000000..a722ee0
--- /dev/null
+++ b/shaders/skia/787-1.shader_test
@@ -0,0 +1,112 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uscale0_1_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale8_9_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias8_9_Stage2_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage2_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage2_c0_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 LinearGradientLayout_Stage2_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_1_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage2_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.w) {
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage2_c0_c0_c1_c0;
+ bias = ubias0_1_Stage2_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage2_c0_c0_c1_c0;
+ bias = ubias2_3_Stage2_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage2_c0_c0_c1_c0;
+ bias = ubias4_5_Stage2_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage2_c0_c0_c1_c0;
+ bias = ubias6_7_Stage2_c0_c0_c1_c0;
+ }
+ }
+ } else {
+ {
+ {
+ scale = uscale8_9_Stage2_c0_c0_c1_c0;
+ bias = ubias8_9_Stage2_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage2_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ t.x = fract(t.x);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage2_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_dst_in(output_Stage1, TiledGradientEffect_Stage2_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/787.shader_test b/shaders/skia/787.shader_test
new file mode 100644
index 0000000..9163ad2
--- /dev/null
+++ b/shaders/skia/787.shader_test
@@ -0,0 +1,40 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+noperspective in vec4 vQuadEdge_Stage0;
+noperspective in vec4 vinColor_Stage0;
+void main() {
+ {
+ float edgeAlpha;
+ vec2 duvdx = dFdx(vQuadEdge_Stage0.xy);
+ vec2 duvdy = -dFdy(vQuadEdge_Stage0.xy);
+ if (vQuadEdge_Stage0.z > 0.0 && vQuadEdge_Stage0.w > 0.0) {
+ edgeAlpha = min(min(vQuadEdge_Stage0.z, vQuadEdge_Stage0.w) + 0.5, 1.0);
+ } else {
+ vec2 gF = vec2((2.0 * vQuadEdge_Stage0.x) * duvdx.x - duvdx.y, (2.0 * vQuadEdge_Stage0.x) * duvdy.x - duvdy.y);
+ edgeAlpha = vQuadEdge_Stage0.x * vQuadEdge_Stage0.x - vQuadEdge_Stage0.y;
+ edgeAlpha = clamp(0.5 - edgeAlpha / length(gF), 0.0, 1.0);
+ }
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 inPosition;
+in vec4 inColor;
+in vec4 inQuadEdge;
+noperspective out vec4 vQuadEdge_Stage0;
+noperspective out vec4 vinColor_Stage0;
+void main() {
+ vQuadEdge_Stage0 = inQuadEdge;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = inPosition;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/79-1.shader_test b/shaders/skia/79-1.shader_test
new file mode 100644
index 0000000..08271b6
--- /dev/null
+++ b/shaders/skia/79-1.shader_test
@@ -0,0 +1,97 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 TextureEffect_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage2, vTransformedCoords_1_Stage0) * _input;
+ return _output;
+}
+float _blend_color_saturation(vec3 color) {
+ return max(max(color.x, color.y), color.z) - min(min(color.x, color.y), color.z);
+}
+vec3 _blend_set_color_saturation_helper(vec3 minMidMax, float sat) {
+ if (minMidMax.x < minMidMax.z) {
+ return vec3(0.0, (sat * (minMidMax.y - minMidMax.x)) / (minMidMax.z - minMidMax.x), sat);
+ }
+ return vec3(0.0);
+}
+vec3 _blend_set_color_saturation(vec3 hueLumColor, vec3 satColor) {
+ float sat = _blend_color_saturation(satColor);
+ if (hueLumColor.x <= hueLumColor.y) {
+ if (hueLumColor.y <= hueLumColor.z) {
+ hueLumColor.xyz = _blend_set_color_saturation_helper(hueLumColor, sat);
+ } else if (hueLumColor.x <= hueLumColor.z) {
+ hueLumColor.xzy = _blend_set_color_saturation_helper(hueLumColor.xzy, sat);
+ } else {
+ hueLumColor.zxy = _blend_set_color_saturation_helper(hueLumColor.zxy, sat);
+ }
+ } else if (hueLumColor.x <= hueLumColor.z) {
+ hueLumColor.yxz = _blend_set_color_saturation_helper(hueLumColor.yxz, sat);
+ } else if (hueLumColor.y <= hueLumColor.z) {
+ hueLumColor.yzx = _blend_set_color_saturation_helper(hueLumColor.yzx, sat);
+ } else {
+ hueLumColor.zyx = _blend_set_color_saturation_helper(hueLumColor.zyx, sat);
+ }
+ return hueLumColor;
+}
+float _blend_color_luminance(vec3 color) {
+ return dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), color);
+}
+vec3 _blend_set_color_luminance(vec3 hueSatColor, float alpha, vec3 lumColor) {
+ float lum = _blend_color_luminance(lumColor);
+ vec3 result = (lum - _blend_color_luminance(hueSatColor)) + hueSatColor;
+ float minComp = min(min(result.x, result.y), result.z);
+ float maxComp = max(max(result.x, result.y), result.z);
+ if (minComp < 0.0 && lum != minComp) {
+ result = lum + ((result - lum) * lum) / (lum - minComp);
+ }
+ if (maxComp > alpha && maxComp != lum) {
+ return lum + ((result - lum) * (alpha - lum)) / (maxComp - lum);
+ }
+ return result;
+}
+vec4 blend_hue(vec4 src, vec4 dst) {
+ float alpha = dst.w * src.w;
+ vec3 sda = src.xyz * dst.w;
+ vec3 dsa = dst.xyz * src.w;
+ return vec4((((_blend_set_color_luminance(_blend_set_color_saturation(sda, dsa), alpha, dsa) + dst.xyz) - dsa) + src.xyz) - sda, (src.w + dst.w) - alpha);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_hue(output_Stage1, TextureEffect_Stage2_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/79-10.shader_test b/shaders/skia/79-10.shader_test
new file mode 100644
index 0000000..ca50f8d
--- /dev/null
+++ b/shaders/skia/79-10.shader_test
@@ -0,0 +1,75 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage2_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c1_c0;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_src_in(ConstColorProcessor_Stage2_c1_c0(vec4(1.0)), output_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/79-11.shader_test b/shaders/skia/79-11.shader_test
new file mode 100644
index 0000000..fb065f0
--- /dev/null
+++ b/shaders/skia/79-11.shader_test
@@ -0,0 +1,41 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform float uPixelSize_Stage1;
+uniform vec2 uRange_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = vec4(1.0, 1.0, 1.0, 1.0);
+ vec2 coord = vTransformedCoords_0_Stage0;
+ coord.y -= 8.0 * uPixelSize_Stage1;
+ for (int i = 0;i < 17; i++) {
+ output_Stage1 = min(output_Stage1, texture(uTextureSampler_0_Stage1, coord));
+ coord.y += uPixelSize_Stage1;
+ }
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/79-12.shader_test b/shaders/skia/79-12.shader_test
new file mode 100644
index 0000000..4df94e3
--- /dev/null
+++ b/shaders/skia/79-12.shader_test
@@ -0,0 +1,153 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform float uSurfaceScale_Stage1;
+uniform vec3 uLightColor_Stage1;
+uniform float uKD_Stage1;
+uniform vec3 uLightLocation_Stage1;
+uniform float uExponent_Stage1;
+uniform float uCosInnerConeAngle_Stage1;
+uniform float uCosOuterConeAngle_Stage1;
+uniform float uConeScale_Stage1;
+uniform vec3 uS_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 light_Stage1(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ float colorScale = uKD_Stage1 * dot(normal, surfaceToLight);
+ return vec4(lightColor * clamp(colorScale, 0.0, 1.0), 1.0);
+}
+float sobel_Stage1(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage1(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage1(float m[9], float surfaceScale) {
+ return pointToNormal_Stage1(sobel_Stage1(m[1], m[2], m[4], m[5], 0.0, 0.0, 0.66666698455810547), sobel_Stage1(0.0, 0.0, m[1], m[4], m[2], m[5], 0.66666698455810547), surfaceScale);
+}
+vec3 lightColor_Stage1(vec3 surfaceToLight) {
+ float cosAngle = -dot(surfaceToLight, uS_Stage1);
+ if (cosAngle < uCosOuterConeAngle_Stage1) {
+ return vec3(0.0);
+ }
+ float scale = pow(cosAngle, uExponent_Stage1);
+ if (cosAngle < uCosInnerConeAngle_Stage1) {
+ return ((uLightColor_Stage1 * scale) * (cosAngle - uCosOuterConeAngle_Stage1)) * uConeScale_Stage1;
+ }
+ return uLightColor_Stage1;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ vec2 coord = vTransformedCoords_0_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp0 = textureColor;
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp1 = textureColor;
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp2 = textureColor;
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp3 = textureColor;
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp4 = textureColor;
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp5 = textureColor;
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp6 = textureColor;
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp7 = textureColor;
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp8 = textureColor;
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = normalize(uLightLocation_Stage1 - vec3(gl_FragCoord.xy, uSurfaceScale_Stage1 * m[4]));
+ output_Stage1 = light_Stage1(normal_Stage1(m, uSurfaceScale_Stage1), surfaceToLight, lightColor_Stage1(surfaceToLight));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/79-13.shader_test b/shaders/skia/79-13.shader_test
new file mode 100644
index 0000000..fea310b
--- /dev/null
+++ b/shaders/skia/79-13.shader_test
@@ -0,0 +1,67 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec2 uDstTextureUpperLeft_Stage1;
+uniform vec2 uDstTextureCoordScale_Stage1;
+uniform sampler2D uTextureSampler_0_Stage0;
+uniform sampler2D uDstTextureSampler_Stage1;
+noperspective in vec2 vTextureCoords_Stage0;
+flat in int vTexIndex_Stage0;
+noperspective in vec4 vinColor_Stage0;
+vec4 blend_multiply(vec4 src, vec4 dst) {
+ return vec4(((1.0 - src.w) * dst.xyz + (1.0 - dst.w) * src.xyz) + src.xyz * dst.xyz, src.w + (1.0 - src.w) * dst.w);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vinColor_Stage0;
+ vec4 texColor;
+ {
+ texColor = texture(uTextureSampler_0_Stage0, vTextureCoords_Stage0);
+ }
+ outputCoverage_Stage0 = texColor;
+ }
+ {
+ if (all(lessThanEqual(outputCoverage_Stage0.xyz, vec3(0.0)))) {
+ discard;
+ }
+ vec2 _dstTexCoord = (gl_FragCoord.xy - uDstTextureUpperLeft_Stage1) * uDstTextureCoordScale_Stage1;
+ _dstTexCoord.y = 1.0 - _dstTexCoord.y;
+ vec4 _dstColor = texture(uDstTextureSampler_Stage1, _dstTexCoord);
+ sk_FragColor = blend_multiply(outputColor_Stage0, _dstColor);
+ float lerpRed = mix(_dstColor.w, sk_FragColor.w, outputCoverage_Stage0.x);
+ float lerpBlue = mix(_dstColor.w, sk_FragColor.w, outputCoverage_Stage0.y);
+ float lerpGreen = mix(_dstColor.w, sk_FragColor.w, outputCoverage_Stage0.z);
+ sk_FragColor = outputCoverage_Stage0 * sk_FragColor + (vec4(1.0) - outputCoverage_Stage0) * _dstColor;
+ sk_FragColor.w = max(max(lerpRed, lerpBlue), lerpGreen);
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform vec2 uAtlasSizeInv_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in uvec2 inTextureCoords;
+noperspective out vec2 vTextureCoords_Stage0;
+flat out int vTexIndex_Stage0;
+noperspective out vec4 vinColor_Stage0;
+void main() {
+ ivec2 signedCoords = ivec2(int(inTextureCoords.x), int(inTextureCoords.y));
+ vec2 unormTexCoords = vec2(float(signedCoords.x / 2), float(signedCoords.y / 2));
+ vTextureCoords_Stage0 = unormTexCoords * uAtlasSizeInv_Stage0;
+ vTexIndex_Stage0 = 0;
+ vinColor_Stage0 = inColor;
+ gl_Position = vec4(inPosition.x, inPosition.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/79-14.shader_test b/shaders/skia/79-14.shader_test
new file mode 100644
index 0000000..e8691c2
--- /dev/null
+++ b/shaders/skia/79-14.shader_test
@@ -0,0 +1,68 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uborder_Stage1;
+uniform vec4 usubset_Stage1;
+uniform vec4 unorm_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 TextureEffect_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage2, vTransformedCoords_1_Stage0) * _input;
+ return _output;
+}
+vec4 blend_modulate(vec4 src, vec4 dst) {
+ return src * dst;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ vec2 inCoord = vTransformedCoords_0_Stage0;
+ inCoord *= unorm_Stage1.xy;
+ vec2 subsetCoord;
+ subsetCoord.x = inCoord.x;
+ subsetCoord.y = inCoord.y;
+ vec2 clampedCoord;
+ clampedCoord.x = subsetCoord.x;
+ clampedCoord.y = subsetCoord.y;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord * unorm_Stage1.zw);
+ if (inCoord.x < usubset_Stage1.x || inCoord.x > usubset_Stage1.z) {
+ textureColor = uborder_Stage1;
+ }
+ if (inCoord.y < usubset_Stage1.y || inCoord.y > usubset_Stage1.w) {
+ textureColor = uborder_Stage1;
+ }
+ output_Stage1 = textureColor;
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_modulate(output_Stage1, TextureEffect_Stage2_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/79-2.shader_test b/shaders/skia/79-2.shader_test
new file mode 100644
index 0000000..1252ca1
--- /dev/null
+++ b/shaders/skia/79-2.shader_test
@@ -0,0 +1,116 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uclamp_Stage1_c0_c0_c0_c0;
+uniform vec4 uclamp_Stage1_c0_c0_c1_c0;
+uniform vec4 uclamp_Stage1_c0_c0_c2_c0;
+uniform mat4 um_Stage2;
+uniform vec4 uv_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+uniform sampler2D uTextureSampler_2_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 inCoord = vTransformedCoords_0_Stage0;
+ vec2 subsetCoord;
+ subsetCoord.x = inCoord.x;
+ subsetCoord.y = inCoord.y;
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage1_c0_c0_c0_c0.x, uclamp_Stage1_c0_c0_c0_c0.z);
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage1_c0_c0_c0_c0.y, uclamp_Stage1_c0_c0_c0_c0.w);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ _output = _input * textureColor;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 inCoord = vTransformedCoords_1_Stage0;
+ vec2 subsetCoord;
+ subsetCoord.x = inCoord.x;
+ subsetCoord.y = inCoord.y;
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage1_c0_c0_c1_c0.x, uclamp_Stage1_c0_c0_c1_c0.z);
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage1_c0_c0_c1_c0.y, uclamp_Stage1_c0_c0_c1_c0.w);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ _output = _input * textureColor;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c0_c0_c2_c0(vec4 _input) {
+ vec4 _output;
+ vec2 inCoord = vTransformedCoords_2_Stage0;
+ vec2 subsetCoord;
+ subsetCoord.x = inCoord.x;
+ subsetCoord.y = inCoord.y;
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage1_c0_c0_c2_c0.x, uclamp_Stage1_c0_c0_c2_c0.z);
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage1_c0_c0_c2_c0.y, uclamp_Stage1_c0_c0_c2_c0.w);
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ _output = _input * textureColor;
+ return _output;
+}
+vec4 YUVtoRGBEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 planes[3];
+ planes[0] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0));
+ planes[1] = TextureEffect_Stage1_c0_c0_c1_c0(vec4(1.0));
+ planes[2] = TextureEffect_Stage1_c0_c0_c2_c0(vec4(1.0));
+ vec4 color = vec4(planes[0].x, planes[1].x, planes[2].x, 1.0);
+ _output = color;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = YUVtoRGBEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ vec4 inputColor = output_Stage1;
+ {
+ float nonZeroAlpha = max(inputColor.w, 9.9999997473787516e-05);
+ inputColor = vec4(inputColor.xyz / nonZeroAlpha, inputColor.w);
+ }
+ output_Stage2 = um_Stage2 * inputColor + uv_Stage2;
+ {
+ output_Stage2 = clamp(output_Stage2, 0.0, 1.0);
+ }
+ {
+ output_Stage2.xyz *= output_Stage2.w;
+ }
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/79-22.shader_test b/shaders/skia/79-22.shader_test
new file mode 100644
index 0000000..b09ce68
--- /dev/null
+++ b/shaders/skia/79-22.shader_test
@@ -0,0 +1,83 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform vec2 uBounds_Stage1;
+uniform vec4 uKernel_Stage1[3];
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0 - 4.0 * uImageIncrement_Stage1;
+ vec2 coordSampled = vec2(0.0, 0.0);
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1.x && coord.x <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].x;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1.x && coord.x <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].y;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1.x && coord.x <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].z;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1.x && coord.x <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].w;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1.x && coord.x <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].x;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1.x && coord.x <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].y;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1.x && coord.x <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].z;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1.x && coord.x <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].w;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.x >= uBounds_Stage1.x && coord.x <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].x;
+ }
+ coord += uImageIncrement_Stage1;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/79-24.shader_test b/shaders/skia/79-24.shader_test
new file mode 100644
index 0000000..57a85d7
--- /dev/null
+++ b/shaders/skia/79-24.shader_test
@@ -0,0 +1,97 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_dst_in(outputColor_Stage0, ClampedGradientEffect_Stage1_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/79-25.shader_test b/shaders/skia/79-25.shader_test
new file mode 100644
index 0000000..fbfa690
--- /dev/null
+++ b/shaders/skia/79-25.shader_test
@@ -0,0 +1,113 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_dst_in(outputColor_Stage0, ClampedGradientEffect_Stage1_c0_c0(vec4(1.0)));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_1_Stage0.x);
+ uint y = uint(vTransformedCoords_1_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ output_Stage2 = vec4(clamp(output_Stage2.xyz + value * 0.0039215688593685627, 0.0, output_Stage2.w), output_Stage2.w);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/79-26.shader_test b/shaders/skia/79-26.shader_test
new file mode 100644
index 0000000..5aeef6d
--- /dev/null
+++ b/shaders/skia/79-26.shader_test
@@ -0,0 +1,67 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 TextureEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = TextureEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = OverrideInputFragmentProcessor_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 blend_multiply(vec4 src, vec4 dst) {
+ return vec4(((1.0 - src.w) * dst.xyz + (1.0 - dst.w) * src.xyz) + src.xyz * dst.xyz, src.w + (1.0 - src.w) * dst.w);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_multiply(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec2 inLocalCoord;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 color = inColor;
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/79-27.shader_test b/shaders/skia/79-27.shader_test
new file mode 100644
index 0000000..b0e9cdb
--- /dev/null
+++ b/shaders/skia/79-27.shader_test
@@ -0,0 +1,41 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform float uPixelSize_Stage1;
+uniform vec2 uRange_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0;
+ coord.x -= 6.0 * uPixelSize_Stage1;
+ for (int i = 0;i < 13; i++) {
+ output_Stage1 = max(output_Stage1, texture(uTextureSampler_0_Stage1, coord));
+ coord.x += uPixelSize_Stage1;
+ }
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/79-28.shader_test b/shaders/skia/79-28.shader_test
new file mode 100644
index 0000000..1060c42
--- /dev/null
+++ b/shaders/skia/79-28.shader_test
@@ -0,0 +1,121 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 uleftBorderColor_Stage1_c1_c0_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c1_c0_c0_c0;
+uniform vec4 ustart_Stage1_c1_c0_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c1_c0_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = ClampedGradientEffect_Stage1_c0_c0_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ return _output;
+}
+vec4 LinearGradientLayout_Stage1_c1_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_1_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c1_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c1_c0_c0_c0_c1_c0 + t * uend_Stage1_c1_c0_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c1_c0_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c1_c0_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c1_c0_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c1_c0_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = ClampedGradientEffect_Stage1_c1_c0_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ return _output;
+}
+vec4 blend_modulate(vec4 src, vec4 dst) {
+ return src * dst;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_modulate(OverrideInputFragmentProcessor_Stage1_c0_c0(inputColor), OverrideInputFragmentProcessor_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/79-29.shader_test b/shaders/skia/79-29.shader_test
new file mode 100644
index 0000000..f9f1935
--- /dev/null
+++ b/shaders/skia/79-29.shader_test
@@ -0,0 +1,56 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+noperspective in float vcoverage_Stage0;
+vec4 TextureEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ float coverage = vcoverage_Stage0;
+ outputCoverage_Stage0 = vec4(coverage);
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TextureEffect_Stage1_c0_c0(vec4(1.0));
+ output_Stage1.xyz *= outputColor_Stage0.xyz;
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ sk_FragColor = output_Stage1 * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in float coverage;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+noperspective out float vcoverage_Stage0;
+void main() {
+ vec2 position = position;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ vcoverage_Stage0 = coverage;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/79-3.shader_test b/shaders/skia/79-3.shader_test
new file mode 100644
index 0000000..99220b3
--- /dev/null
+++ b/shaders/skia/79-3.shader_test
@@ -0,0 +1,127 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform float uSrcTF_Stage1_c0_c0[7];
+uniform mat3 uColorXform_Stage1_c0_c0;
+uniform float uDstTF_Stage1_c0_c0[7];
+uniform mat3 ucolorSpaceMatrix_Stage1_c0_c0_c0_c0;
+uniform vec3 ucolorSpaceTranslate_Stage1_c0_c0_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+uniform sampler2D uTextureSampler_2_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_1_Stage1, vTransformedCoords_1_Stage0) * _input;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c0_c0_c0_c0_c2_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_2_Stage1, vTransformedCoords_2_Stage0) * _input;
+ return _output;
+}
+vec4 YUVtoRGBEffect_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 planes[3];
+ planes[0] = TextureEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ planes[1] = TextureEffect_Stage1_c0_c0_c0_c0_c1_c0(vec4(1.0));
+ planes[2] = TextureEffect_Stage1_c0_c0_c0_c0_c2_c0(vec4(1.0));
+ vec4 color = vec4(planes[0].x, planes[1].y, planes[1].x, planes[2].w);
+ color.xyz = clamp(color.xyz * ucolorSpaceMatrix_Stage1_c0_c0_c0_c0 + ucolorSpaceTranslate_Stage1_c0_c0_c0_c0, 0.0, 1.0);
+ color.xyz *= color.w;
+ _output = color;
+ return _output;
+}
+float src_tf_Stage1_c0_c0(float x) {
+ float G = uSrcTF_Stage1_c0_c0[0];
+ float A = uSrcTF_Stage1_c0_c0[1];
+ float B = uSrcTF_Stage1_c0_c0[2];
+ float C = uSrcTF_Stage1_c0_c0[3];
+ float D = uSrcTF_Stage1_c0_c0[4];
+ float E = uSrcTF_Stage1_c0_c0[5];
+ float F = uSrcTF_Stage1_c0_c0[6];
+ float s = sign(x);
+ x = abs(x);
+ x = x < D ? C * x + F : pow(A * x + B, G) + E;
+ return s * x;
+}
+float dst_tf_Stage1_c0_c0(float x) {
+ float G = uDstTF_Stage1_c0_c0[0];
+ float A = uDstTF_Stage1_c0_c0[1];
+ float B = uDstTF_Stage1_c0_c0[2];
+ float C = uDstTF_Stage1_c0_c0[3];
+ float D = uDstTF_Stage1_c0_c0[4];
+ float E = uDstTF_Stage1_c0_c0[5];
+ float F = uDstTF_Stage1_c0_c0[6];
+ float s = sign(x);
+ x = abs(x);
+ x = x < D ? C * x + F : pow(A * x + B, G) + E;
+ return s * x;
+}
+vec4 gamut_xform_Stage1_c0_c0(vec4 color) {
+ color.xyz = uColorXform_Stage1_c0_c0 * color.xyz;
+ return color;
+}
+vec4 color_xform_Stage1_c0_c0(vec4 color) {
+ float nonZeroAlpha = max(color.w, 9.9999997473787516e-05);
+ color = vec4(color.xyz / nonZeroAlpha, nonZeroAlpha);
+ color.x = src_tf_Stage1_c0_c0(color.x);
+ color.y = src_tf_Stage1_c0_c0(color.y);
+ color.z = src_tf_Stage1_c0_c0(color.z);
+ color = gamut_xform_Stage1_c0_c0(color);
+ color.x = dst_tf_Stage1_c0_c0(color.x);
+ color.y = dst_tf_Stage1_c0_c0(color.y);
+ color.z = dst_tf_Stage1_c0_c0(color.z);
+ color.xyz *= color.w;
+ return color;
+}
+vec4 ColorSpaceXform_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = color_xform_Stage1_c0_c0(YUVtoRGBEffect_Stage1_c0_c0_c0_c0(vec4(1.0))) * _input;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ColorSpaceXform_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/79-34.shader_test b/shaders/skia/79-34.shader_test
new file mode 100644
index 0000000..bbe7d76
--- /dev/null
+++ b/shaders/skia/79-34.shader_test
@@ -0,0 +1,63 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec2 uDstTextureUpperLeft_Stage1;
+uniform vec2 uDstTextureCoordScale_Stage1;
+uniform sampler2D uTextureSampler_0_Stage0;
+uniform sampler2D uDstTextureSampler_Stage1;
+noperspective in vec2 vTextureCoords_Stage0;
+flat in int vTexIndex_Stage0;
+noperspective in vec4 vinColor_Stage0;
+vec4 blend_dst_atop(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src + src.w * dst;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vinColor_Stage0;
+ vec4 texColor;
+ {
+ texColor = texture(uTextureSampler_0_Stage0, vTextureCoords_Stage0);
+ }
+ outputCoverage_Stage0 = texColor;
+ }
+ {
+ if (all(lessThanEqual(outputCoverage_Stage0.xyz, vec3(0.0)))) {
+ discard;
+ }
+ vec2 _dstTexCoord = (gl_FragCoord.xy - uDstTextureUpperLeft_Stage1) * uDstTextureCoordScale_Stage1;
+ _dstTexCoord.y = 1.0 - _dstTexCoord.y;
+ vec4 _dstColor = texture(uDstTextureSampler_Stage1, _dstTexCoord);
+ sk_FragColor = blend_dst_atop(outputColor_Stage0, _dstColor);
+ sk_FragColor = outputCoverage_Stage0 * sk_FragColor + (vec4(1.0) - outputCoverage_Stage0) * _dstColor;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform vec2 uAtlasSizeInv_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in uvec2 inTextureCoords;
+noperspective out vec2 vTextureCoords_Stage0;
+flat out int vTexIndex_Stage0;
+noperspective out vec4 vinColor_Stage0;
+void main() {
+ ivec2 signedCoords = ivec2(int(inTextureCoords.x), int(inTextureCoords.y));
+ vec2 unormTexCoords = vec2(float(signedCoords.x / 2), float(signedCoords.y / 2));
+ vTextureCoords_Stage0 = unormTexCoords * uAtlasSizeInv_Stage0;
+ vTexIndex_Stage0 = 0;
+ vinColor_Stage0 = inColor;
+ gl_Position = vec4(inPosition.x, inPosition.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/79-35.shader_test b/shaders/skia/79-35.shader_test
new file mode 100644
index 0000000..36c4691
--- /dev/null
+++ b/shaders/skia/79-35.shader_test
@@ -0,0 +1,89 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_KHR_blend_equation_advanced : require
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+layout (blend_support_all_equations) out ;
+uniform vec4 urectUniform_Stage1;
+uniform float uPixelSize_Stage2;
+uniform vec2 uRange_Stage2;
+uniform vec4 urectUniform_Stage3;
+uniform sampler2D uTextureSampler_0_Stage2;
+in vec4 vcolor_Stage0;
+in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ float alpha;
+ {
+ float xSub, ySub;
+ xSub = min(gl_FragCoord.x - urectUniform_Stage1.x, 0.0);
+ xSub += min(urectUniform_Stage1.z - gl_FragCoord.x, 0.0);
+ ySub = min(gl_FragCoord.y - urectUniform_Stage1.y, 0.0);
+ ySub += min(urectUniform_Stage1.w - gl_FragCoord.y, 0.0);
+ alpha = (1.0 + max(xSub, -1.0)) * (1.0 + max(ySub, -1.0));
+ }
+ {
+ alpha = 1.0 - alpha;
+ }
+ output_Stage1 = outputColor_Stage0 * alpha;
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = vec4(1.0, 1.0, 1.0, 1.0);
+ vec2 coord = vTransformedCoords_0_Stage0;
+ coord.y -= 3.0 * uPixelSize_Stage2;
+ for (int i = 0;i < 7; i++) {
+ output_Stage2 = min(output_Stage2, texture(uTextureSampler_0_Stage2, coord));
+ coord.y += uPixelSize_Stage2;
+ }
+ }
+ vec4 output_Stage3;
+ {
+ float alpha;
+ {
+ float xSub, ySub;
+ xSub = min(gl_FragCoord.x - urectUniform_Stage3.x, 0.0);
+ xSub += min(urectUniform_Stage3.z - gl_FragCoord.x, 0.0);
+ ySub = min(gl_FragCoord.y - urectUniform_Stage3.y, 0.0);
+ ySub += min(urectUniform_Stage3.w - gl_FragCoord.y, 0.0);
+ alpha = (1.0 + max(xSub, -1.0)) * (1.0 + max(ySub, -1.0));
+ }
+ output_Stage3 = output_Stage2 * alpha;
+ }
+ {
+ sk_FragColor = output_Stage3 * output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 inColor;
+out vec4 vcolor_Stage0;
+out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec3 pos3 = uViewM_Stage0 * vec3(position, 1.0);
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(position, 1.0)).xy;
+ gl_Position = vec4(pos3.x, pos3.y, 0.0, pos3.z);
+ gl_PointSize = 1.0;
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/79-36.shader_test b/shaders/skia/79-36.shader_test
new file mode 100644
index 0000000..66287c0
--- /dev/null
+++ b/shaders/skia/79-36.shader_test
@@ -0,0 +1,222 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage2;
+uniform float uSurfaceScale_Stage2;
+uniform vec3 uLightColor_Stage2;
+uniform float uKS_Stage2;
+uniform float uShininess_Stage2;
+uniform vec4 uTexDom_Stage2;
+uniform vec3 uDecalParams_Stage2;
+uniform vec3 uLightLocation_Stage2;
+uniform float uExponent_Stage2;
+uniform float uCosInnerConeAngle_Stage2;
+uniform float uCosOuterConeAngle_Stage2;
+uniform float uConeScale_Stage2;
+uniform vec3 uS_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 light_Stage2(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ vec3 halfDir = normalize(surfaceToLight + vec3(0.0, 0.0, 1.0));
+ float colorScale = uKS_Stage2 * pow(dot(normal, halfDir), uShininess_Stage2);
+ vec3 color = lightColor * clamp(colorScale, 0.0, 1.0);
+ return vec4(color, max(max(color.x, color.y), color.z));
+}
+float sobel_Stage2(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage2(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage2(float m[9], float surfaceScale) {
+ return pointToNormal_Stage2(sobel_Stage2(0.0, 0.0, m[3], m[4], m[6], m[7], 0.66666698455810547), sobel_Stage2(m[3], m[6], m[4], m[7], 0.0, 0.0, 0.66666698455810547), surfaceScale);
+}
+vec3 lightColor_Stage2(vec3 surfaceToLight) {
+ float cosAngle = -dot(surfaceToLight, uS_Stage2);
+ if (cosAngle < uCosOuterConeAngle_Stage2) {
+ return vec3(0.0);
+ }
+ float scale = pow(cosAngle, uExponent_Stage2);
+ if (cosAngle < uCosInnerConeAngle_Stage2) {
+ return ((uLightColor_Stage2 * scale) * (cosAngle - uCosOuterConeAngle_Stage2)) * uConeScale_Stage2;
+ }
+ return uLightColor_Stage2;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ vec2 coord = vTransformedCoords_1_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp0 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp5 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp6 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp7 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp8 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = normalize(uLightLocation_Stage2 - vec3(gl_FragCoord.xy, uSurfaceScale_Stage2 * m[4]));
+ output_Stage2 = light_Stage2(normal_Stage2(m, uSurfaceScale_Stage2), surfaceToLight, lightColor_Stage2(surfaceToLight));
+ output_Stage2 *= output_Stage1;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/79-37.shader_test b/shaders/skia/79-37.shader_test
new file mode 100644
index 0000000..afeeb0d
--- /dev/null
+++ b/shaders/skia/79-37.shader_test
@@ -0,0 +1,77 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 ucolor_Stage2_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 ConstColorProcessor_Stage2_c0_c0(vec4 _input, vec2 _coords) {
+ vec4 _output;
+ {
+ _output = _input.w * ucolor_Stage2_c0_c0;
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ vec2 coord = vTransformedCoords_1_Stage0 - vec2(0.5);
+ vec2 f = fract(coord);
+ coord += 0.5 - f;
+ vec4 wx = mat4(0.055555555555555552, 0.88888888888888884, 0.055555555555555552, 0.0, -0.5, 0.0, 0.5, 0.0, 0.83333333333333337, -2.0, 1.5, -0.33333333333333331, -0.3888888888888889, 1.1666666666666667, -1.1666666666666667, 0.3888888888888889) * vec4(1.0, f.x, f.x * f.x, (f.x * f.x) * f.x);
+ vec4 wy = mat4(0.055555555555555552, 0.88888888888888884, 0.055555555555555552, 0.0, -0.5, 0.0, 0.5, 0.0, 0.83333333333333337, -2.0, 1.5, -0.33333333333333331, -0.3888888888888889, 1.1666666666666667, -1.1666666666666667, 0.3888888888888889) * vec4(1.0, f.y, f.y * f.y, (f.y * f.y) * f.y);
+ vec4 rowColors[4];
+ rowColors[0] = ConstColorProcessor_Stage2_c0_c0(vec4(1.0), coord + vec2(-1.0, -1.0));
+ rowColors[1] = ConstColorProcessor_Stage2_c0_c0(vec4(1.0), coord + vec2(0.0, -1.0));
+ rowColors[2] = ConstColorProcessor_Stage2_c0_c0(vec4(1.0), coord + vec2(1.0, -1.0));
+ rowColors[3] = ConstColorProcessor_Stage2_c0_c0(vec4(1.0), coord + vec2(2.0, -1.0));
+ vec4 s0 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ rowColors[0] = ConstColorProcessor_Stage2_c0_c0(vec4(1.0), coord + vec2(-1.0, 0.0));
+ rowColors[1] = ConstColorProcessor_Stage2_c0_c0(vec4(1.0), coord);
+ rowColors[2] = ConstColorProcessor_Stage2_c0_c0(vec4(1.0), coord + vec2(1.0, 0.0));
+ rowColors[3] = ConstColorProcessor_Stage2_c0_c0(vec4(1.0), coord + vec2(2.0, 0.0));
+ vec4 s1 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ rowColors[0] = ConstColorProcessor_Stage2_c0_c0(vec4(1.0), coord + vec2(-1.0, 1.0));
+ rowColors[1] = ConstColorProcessor_Stage2_c0_c0(vec4(1.0), coord + vec2(0.0, 1.0));
+ rowColors[2] = ConstColorProcessor_Stage2_c0_c0(vec4(1.0), coord + vec2(1.0, 1.0));
+ rowColors[3] = ConstColorProcessor_Stage2_c0_c0(vec4(1.0), coord + vec2(2.0, 1.0));
+ vec4 s2 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ rowColors[0] = ConstColorProcessor_Stage2_c0_c0(vec4(1.0), coord + vec2(-1.0, 2.0));
+ rowColors[1] = ConstColorProcessor_Stage2_c0_c0(vec4(1.0), coord + vec2(0.0, 2.0));
+ rowColors[2] = ConstColorProcessor_Stage2_c0_c0(vec4(1.0), coord + vec2(1.0, 2.0));
+ rowColors[3] = ConstColorProcessor_Stage2_c0_c0(vec4(1.0), coord + vec2(2.0, 2.0));
+ vec4 s3 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ vec4 bicubicColor = ((wy.x * s0 + wy.y * s1) + wy.z * s2) + wy.w * s3;
+ bicubicColor = clamp(bicubicColor, 0.0, 1.0);
+ output_Stage2 = bicubicColor * output_Stage1;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/79-5.shader_test b/shaders/skia/79-5.shader_test
new file mode 100644
index 0000000..0f8808c
--- /dev/null
+++ b/shaders/skia/79-5.shader_test
@@ -0,0 +1,61 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 ucolor_Stage1_c0_c0_c0_c0;
+noperspective in vec4 vcolor_Stage0;
+vec4 ConstColorProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = _input.w * ucolor_Stage1_c0_c0_c0_c0;
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = ConstColorProcessor_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_src_over(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 position;
+in vec4 inColor;
+noperspective out vec4 vcolor_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/79-7.shader_test b/shaders/skia/79-7.shader_test
new file mode 100644
index 0000000..b18844a
--- /dev/null
+++ b/shaders/skia/79-7.shader_test
@@ -0,0 +1,95 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform vec4 uKernel_Stage1[5];
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0 - 9.0 * uImageIncrement_Stage1;
+ vec2 coordSampled = vec2(0.0, 0.0);
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[4].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[4].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[4].z;
+ coord += uImageIncrement_Stage1;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ sk_FragColor = sk_FragColor.wwww;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/79-8.shader_test b/shaders/skia/79-8.shader_test
new file mode 100644
index 0000000..6fb3b32
--- /dev/null
+++ b/shaders/skia/79-8.shader_test
@@ -0,0 +1,74 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec4 vcolor_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_dst_in(outputColor_Stage0, ClampedGradientEffect_Stage1_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/79-9.shader_test b/shaders/skia/79-9.shader_test
new file mode 100644
index 0000000..df25b83
--- /dev/null
+++ b/shaders/skia/79-9.shader_test
@@ -0,0 +1,44 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uinnerRect_Stage1;
+uniform vec2 uradiusPlusHalf_Stage1;
+flat in vec4 vcolor_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec2 dxy = max(vec2(gl_FragCoord.x - uinnerRect_Stage1.z, uinnerRect_Stage1.y - gl_FragCoord.y), 0.0);
+ float leftAlpha = clamp(gl_FragCoord.x - uinnerRect_Stage1.x, 0.0, 1.0);
+ float bottomAlpha = clamp(uinnerRect_Stage1.w - gl_FragCoord.y, 0.0, 1.0);
+ float alpha = (bottomAlpha * leftAlpha) * clamp(uradiusPlusHalf_Stage1.x - length(dxy), 0.0, 1.0);
+ alpha = 1.0 - alpha;
+ output_Stage1 = vec4(alpha);
+ }
+ {
+ sk_FragColor = outputColor_Stage0 * output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 position;
+in vec4 color;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/79.shader_test b/shaders/skia/79.shader_test
new file mode 100644
index 0000000..7a2a5d3
--- /dev/null
+++ b/shaders/skia/79.shader_test
@@ -0,0 +1,90 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 usubset_Stage1_c0_c0_c0_c0;
+uniform vec4 uclamp_Stage1_c0_c0_c0_c0;
+uniform sampler2DRect uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0_c0_c0(vec4 _input, vec2 _coords) {
+ vec4 _output;
+ vec2 inCoord = _coords;
+ vec2 subsetCoord;
+ {
+ float w = usubset_Stage1_c0_c0_c0_c0.z - usubset_Stage1_c0_c0_c0_c0.x;
+ float w2 = 2.0 * w;
+ float m = mod(inCoord.x - usubset_Stage1_c0_c0_c0_c0.x, w2);
+ subsetCoord.x = mix(m, w2 - m, step(w, m)) + usubset_Stage1_c0_c0_c0_c0.x;
+ }
+ subsetCoord.y = inCoord.y;
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage1_c0_c0_c0_c0.x, uclamp_Stage1_c0_c0_c0_c0.z);
+ clampedCoord.y = subsetCoord.y;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ _output = _input * textureColor;
+ return _output;
+}
+vec4 Bicubic_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coord = vTransformedCoords_0_Stage0 - vec2(0.5);
+ vec2 f = fract(coord);
+ coord += 0.5 - f;
+ vec4 wx = mat4(0.055555555555555552, 0.88888888888888884, 0.055555555555555552, 0.0, -0.5, 0.0, 0.5, 0.0, 0.83333333333333337, -2.0, 1.5, -0.33333333333333331, -0.3888888888888889, 1.1666666666666667, -1.1666666666666667, 0.3888888888888889) * vec4(1.0, f.x, f.x * f.x, (f.x * f.x) * f.x);
+ vec4 wy = mat4(0.055555555555555552, 0.88888888888888884, 0.055555555555555552, 0.0, -0.5, 0.0, 0.5, 0.0, 0.83333333333333337, -2.0, 1.5, -0.33333333333333331, -0.3888888888888889, 1.1666666666666667, -1.1666666666666667, 0.3888888888888889) * vec4(1.0, f.y, f.y * f.y, (f.y * f.y) * f.y);
+ vec4 rowColors[4];
+ rowColors[0] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(-1.0, -1.0));
+ rowColors[1] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(0.0, -1.0));
+ rowColors[2] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(1.0, -1.0));
+ rowColors[3] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(2.0, -1.0));
+ vec4 s0 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ rowColors[0] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(-1.0, 0.0));
+ rowColors[1] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord);
+ rowColors[2] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(1.0, 0.0));
+ rowColors[3] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(2.0, 0.0));
+ vec4 s1 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ rowColors[0] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(-1.0, 1.0));
+ rowColors[1] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(0.0, 1.0));
+ rowColors[2] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(1.0, 1.0));
+ rowColors[3] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(2.0, 1.0));
+ vec4 s2 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ rowColors[0] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(-1.0, 2.0));
+ rowColors[1] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(0.0, 2.0));
+ rowColors[2] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(1.0, 2.0));
+ rowColors[3] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(2.0, 2.0));
+ vec4 s3 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ vec4 bicubicColor = ((wy.x * s0 + wy.y * s1) + wy.z * s2) + wy.w * s3;
+ bicubicColor = clamp(bicubicColor, 0.0, 1.0);
+ _output = bicubicColor * _input;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = Bicubic_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/790-1.shader_test b/shaders/skia/790-1.shader_test
new file mode 100644
index 0000000..5f3388f
--- /dev/null
+++ b/shaders/skia/790-1.shader_test
@@ -0,0 +1,114 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uscale0_1_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale8_9_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias8_9_Stage2_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage2_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage2_c0_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 LinearGradientLayout_Stage2_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_1_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage2_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.w) {
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage2_c0_c0_c1_c0;
+ bias = ubias0_1_Stage2_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage2_c0_c0_c1_c0;
+ bias = ubias2_3_Stage2_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage2_c0_c0_c1_c0;
+ bias = ubias4_5_Stage2_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage2_c0_c0_c1_c0;
+ bias = ubias6_7_Stage2_c0_c0_c1_c0;
+ }
+ }
+ } else {
+ {
+ {
+ scale = uscale8_9_Stage2_c0_c0_c1_c0;
+ bias = ubias8_9_Stage2_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage2_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage2_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_dst_in(output_Stage1, TiledGradientEffect_Stage2_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/790.shader_test b/shaders/skia/790.shader_test
new file mode 100644
index 0000000..2ade253
--- /dev/null
+++ b/shaders/skia/790.shader_test
@@ -0,0 +1,87 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_KHR_blend_equation_advanced : require
+out vec4 sk_FragColor;
+layout (blend_support_all_equations) out ;
+uniform vec4 ucolor_Stage1;
+noperspective in vec4 vcolor_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ {
+ output_Stage1 = ucolor_Stage1;
+ }
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform float uSrcTF_Stage0[7];
+uniform mat3 uColorXform_Stage0;
+uniform float uDstTF_Stage0[7];
+in vec2 position;
+in vec4 inColor;
+noperspective out vec4 vcolor_Stage0;
+float src_tf_Stage0(float x) {
+ float G = uSrcTF_Stage0[0];
+ float A = uSrcTF_Stage0[1];
+ float B = uSrcTF_Stage0[2];
+ float C = uSrcTF_Stage0[3];
+ float D = uSrcTF_Stage0[4];
+ float E = uSrcTF_Stage0[5];
+ float F = uSrcTF_Stage0[6];
+ float s = sign(x);
+ x = abs(x);
+ x = x < D ? C * x + F : pow(A * x + B, G) + E;
+ return s * x;
+}
+float dst_tf_Stage0(float x) {
+ float G = uDstTF_Stage0[0];
+ float A = uDstTF_Stage0[1];
+ float B = uDstTF_Stage0[2];
+ float C = uDstTF_Stage0[3];
+ float D = uDstTF_Stage0[4];
+ float E = uDstTF_Stage0[5];
+ float F = uDstTF_Stage0[6];
+ float s = sign(x);
+ x = abs(x);
+ x = x < D ? C * x + F : pow(A * x + B, G) + E;
+ return s * x;
+}
+vec4 gamut_xform_Stage0(vec4 color) {
+ color.xyz = uColorXform_Stage0 * color.xyz;
+ return color;
+}
+vec4 color_xform_Stage0(vec4 color) {
+ float nonZeroAlpha = max(color.w, 9.9999997473787516e-05);
+ color = vec4(color.xyz / nonZeroAlpha, nonZeroAlpha);
+ color.x = src_tf_Stage0(color.x);
+ color.y = src_tf_Stage0(color.y);
+ color.z = src_tf_Stage0(color.z);
+ color = gamut_xform_Stage0(color);
+ color.x = dst_tf_Stage0(color.x);
+ color.y = dst_tf_Stage0(color.y);
+ color.z = dst_tf_Stage0(color.z);
+ color.xyz *= color.w;
+ return color;
+}
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = color_xform_Stage0(color);
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = position;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/793.shader_test b/shaders/skia/793.shader_test
new file mode 100644
index 0000000..8e0273e
--- /dev/null
+++ b/shaders/skia/793.shader_test
@@ -0,0 +1,342 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_KHR_blend_equation_advanced : require
+out vec4 sk_FragColor;
+layout (blend_support_all_equations) out ;
+uniform vec2 uImageIncrement_Stage1;
+uniform vec2 uBounds_Stage1;
+uniform vec4 uKernel_Stage1[3];
+uniform vec4 uinnerRect_Stage2;
+uniform vec2 uradiusPlusHalf_Stage2;
+uniform vec2 uImageIncrement_Stage3;
+uniform float uSurfaceScale_Stage3;
+uniform vec3 uLightColor_Stage3;
+uniform float uKS_Stage3;
+uniform float uShininess_Stage3;
+uniform vec4 uTexDom_Stage3;
+uniform vec3 uDecalParams_Stage3;
+uniform vec3 uLightDirection_Stage3;
+uniform vec4 urectH_Stage4;
+uniform float uinvSixSigma_Stage4;
+uniform vec4 uinnerRect_Stage5_c0_c0;
+uniform vec2 uradiusPlusHalf_Stage5_c0_c0;
+uniform vec2 uImageIncrement_Stage5_c1_c0;
+uniform vec2 uBounds_Stage5_c1_c0;
+uniform vec4 uKernel_Stage5_c1_c0[1];
+uniform vec4 uinnerRect_Stage6;
+uniform vec2 uradiusPlusHalf_Stage6;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage3;
+uniform sampler2D uTextureSampler_0_Stage4;
+uniform sampler2D uTextureSampler_0_Stage5;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+vec4 light_Stage3(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ vec3 halfDir = normalize(surfaceToLight + vec3(0.0, 0.0, 1.0));
+ float colorScale = uKS_Stage3 * pow(dot(normal, halfDir), uShininess_Stage3);
+ vec3 color = lightColor * clamp(colorScale, 0.0, 1.0);
+ return vec4(color, max(max(color.x, color.y), color.z));
+}
+float sobel_Stage3(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage3(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage3(float m[9], float surfaceScale) {
+ return pointToNormal_Stage3(sobel_Stage3(0.0, 0.0, m[4], m[5], m[7], m[8], 0.66666698455810547), sobel_Stage3(0.0, 0.0, m[4], m[7], m[5], m[8], 0.66666698455810547), surfaceScale);
+}
+vec4 CircularRRect_Stage5_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 dxy0 = uinnerRect_Stage5_c0_c0.xy - gl_FragCoord.xy;
+ vec2 dxy1 = gl_FragCoord.xy - uinnerRect_Stage5_c0_c0.zw;
+ vec2 dxy = max(max(dxy0, dxy1), 0.0);
+ float alpha = clamp(uradiusPlusHalf_Stage5_c0_c0.x - length(dxy), 0.0, 1.0);
+ alpha = 1.0 - alpha;
+ _output = _input * alpha;
+ return _output;
+}
+vec4 GaussianConvolution_Stage5_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_2_Stage0 - uImageIncrement_Stage5_c1_c0;
+ vec2 coordSampled = vec2(0.0, 0.0);
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage5_c1_c0.x, uBounds_Stage5_c1_c0.y - uBounds_Stage5_c1_c0.x) + uBounds_Stage5_c1_c0.x;
+ _output += texture(uTextureSampler_0_Stage5, coordSampled) * uKernel_Stage5_c1_c0[0].x;
+ coord += uImageIncrement_Stage5_c1_c0;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage5_c1_c0.x, uBounds_Stage5_c1_c0.y - uBounds_Stage5_c1_c0.x) + uBounds_Stage5_c1_c0.x;
+ _output += texture(uTextureSampler_0_Stage5, coordSampled) * uKernel_Stage5_c1_c0[0].y;
+ coord += uImageIncrement_Stage5_c1_c0;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage5_c1_c0.x, uBounds_Stage5_c1_c0.y - uBounds_Stage5_c1_c0.x) + uBounds_Stage5_c1_c0.x;
+ _output += texture(uTextureSampler_0_Stage5, coordSampled) * uKernel_Stage5_c1_c0[0].z;
+ coord += uImageIncrement_Stage5_c1_c0;
+ _output *= _input;
+ return _output;
+}
+vec4 blend_xor(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src + (1.0 - src.w) * dst;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0 - 5.0 * uImageIncrement_Stage1;
+ vec2 coordSampled = vec2(0.0, 0.0);
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage1.x, uBounds_Stage1.y - uBounds_Stage1.x) + uBounds_Stage1.x;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage1.x, uBounds_Stage1.y - uBounds_Stage1.x) + uBounds_Stage1.x;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage1.x, uBounds_Stage1.y - uBounds_Stage1.x) + uBounds_Stage1.x;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage1.x, uBounds_Stage1.y - uBounds_Stage1.x) + uBounds_Stage1.x;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage1.x, uBounds_Stage1.y - uBounds_Stage1.x) + uBounds_Stage1.x;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage1.x, uBounds_Stage1.y - uBounds_Stage1.x) + uBounds_Stage1.x;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage1.x, uBounds_Stage1.y - uBounds_Stage1.x) + uBounds_Stage1.x;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage1.x, uBounds_Stage1.y - uBounds_Stage1.x) + uBounds_Stage1.x;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage1.x, uBounds_Stage1.y - uBounds_Stage1.x) + uBounds_Stage1.x;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage1.x, uBounds_Stage1.y - uBounds_Stage1.x) + uBounds_Stage1.x;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = mod(coord.x - uBounds_Stage1.x, uBounds_Stage1.y - uBounds_Stage1.x) + uBounds_Stage1.x;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].z;
+ coord += uImageIncrement_Stage1;
+ }
+ vec4 output_Stage2;
+ {
+ vec2 dxy0 = uinnerRect_Stage2.xy - gl_FragCoord.xy;
+ vec2 dxy1 = gl_FragCoord.xy - uinnerRect_Stage2.zw;
+ vec2 dxy = max(max(dxy0, dxy1), 0.0);
+ float alpha = clamp(uradiusPlusHalf_Stage2.x - length(dxy), 0.0, 1.0);
+ output_Stage2 = vec4(alpha);
+ }
+ vec4 output_Stage3;
+ {
+ vec2 coord = vTransformedCoords_1_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage3;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage3.xy, uTexDom_Stage3.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage3, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage3.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage3.y);
+ if (err > uDecalParams_Stage3.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage3.z < 1.0) {
+ err = 0.0;
+ }
+ temp0 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage3;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage3.xy, uTexDom_Stage3.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage3, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage3.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage3.y);
+ if (err > uDecalParams_Stage3.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage3.z < 1.0) {
+ err = 0.0;
+ }
+ temp1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage3;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage3.xy, uTexDom_Stage3.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage3, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage3.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage3.y);
+ if (err > uDecalParams_Stage3.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage3.z < 1.0) {
+ err = 0.0;
+ }
+ temp2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage3;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage3.xy, uTexDom_Stage3.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage3, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage3.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage3.y);
+ if (err > uDecalParams_Stage3.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage3.z < 1.0) {
+ err = 0.0;
+ }
+ temp3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage3.xy, uTexDom_Stage3.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage3, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage3.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage3.y);
+ if (err > uDecalParams_Stage3.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage3.z < 1.0) {
+ err = 0.0;
+ }
+ temp4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage3;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage3.xy, uTexDom_Stage3.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage3, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage3.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage3.y);
+ if (err > uDecalParams_Stage3.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage3.z < 1.0) {
+ err = 0.0;
+ }
+ temp5 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage3;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage3.xy, uTexDom_Stage3.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage3, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage3.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage3.y);
+ if (err > uDecalParams_Stage3.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage3.z < 1.0) {
+ err = 0.0;
+ }
+ temp6 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage3;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage3.xy, uTexDom_Stage3.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage3, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage3.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage3.y);
+ if (err > uDecalParams_Stage3.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage3.z < 1.0) {
+ err = 0.0;
+ }
+ temp7 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage3;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage3.xy, uTexDom_Stage3.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage3, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage3.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage3.y);
+ if (err > uDecalParams_Stage3.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage3.z < 1.0) {
+ err = 0.0;
+ }
+ temp8 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = uLightDirection_Stage3;
+ output_Stage3 = light_Stage3(normal_Stage3(m, uSurfaceScale_Stage3), surfaceToLight, uLightColor_Stage3);
+ output_Stage3 *= output_Stage2;
+ }
+ vec4 output_Stage4;
+ {
+ float xCoverage, yCoverage;
+ {
+ float x, y;
+ {
+ x = max(urectH_Stage4.x - gl_FragCoord.x, gl_FragCoord.x - urectH_Stage4.z);
+ y = max(urectH_Stage4.y - gl_FragCoord.y, gl_FragCoord.y - urectH_Stage4.w);
+ }
+ xCoverage = texture(uTextureSampler_0_Stage4, vec2(x * uinvSixSigma_Stage4, 0.5)).w;
+ yCoverage = texture(uTextureSampler_0_Stage4, vec2(y * uinvSixSigma_Stage4, 0.5)).w;
+ output_Stage4 = (output_Stage3 * xCoverage) * yCoverage;
+ }
+ output_Stage4 = (output_Stage3 * xCoverage) * yCoverage;
+ }
+ vec4 output_Stage5;
+ {
+ vec4 inputColor = vec4(output_Stage4.xyz, 1.0);
+ output_Stage5 = blend_xor(CircularRRect_Stage5_c0_c0(inputColor), GaussianConvolution_Stage5_c1_c0(inputColor));
+ output_Stage5 *= output_Stage4.w;
+ }
+ vec4 output_Stage6;
+ {
+ vec2 dxy0 = uinnerRect_Stage6.xy - gl_FragCoord.xy;
+ vec2 dxy1 = gl_FragCoord.xy - uinnerRect_Stage6.zw;
+ vec2 dxy = max(max(dxy0, dxy1), 0.0);
+ float alpha = clamp(uradiusPlusHalf_Stage6.x - length(dxy), 0.0, 1.0);
+ output_Stage6 = output_Stage5 * alpha;
+ }
+ {
+ sk_FragColor = output_Stage6 * output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/796-1.shader_test b/shaders/skia/796-1.shader_test
new file mode 100644
index 0000000..3a50f89
--- /dev/null
+++ b/shaders/skia/796-1.shader_test
@@ -0,0 +1,98 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uscale0_1_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage2_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage2_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage2_c0_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 RadialGradientLayout_Stage2_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = length(vTransformedCoords_1_Stage0);
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage2_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage2_c0_c0_c1_c0;
+ bias = ubias0_1_Stage2_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage2_c0_c0_c1_c0;
+ bias = ubias2_3_Stage2_c0_c0_c1_c0;
+ }
+ } else {
+ {
+ scale = uscale4_5_Stage2_c0_c0_c1_c0;
+ bias = ubias4_5_Stage2_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = RadialGradientLayout_Stage2_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ t.x = fract(t.x);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage2_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_dst_in(output_Stage1, TiledGradientEffect_Stage2_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/796.shader_test b/shaders/skia/796.shader_test
new file mode 100644
index 0000000..31327c3
--- /dev/null
+++ b/shaders/skia/796.shader_test
@@ -0,0 +1,96 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+uniform float uPixelSize_Stage1;
+uniform vec2 uRange_Stage1;
+uniform vec4 uinnerRect_Stage3;
+uniform vec4 uinvRadiiLTRB_Stage3;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+uniform sampler2D uTextureSampler_1_Stage2;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in float vinCoverage_Stage0;
+vec4 ColorTableEffect_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ float nonZeroAlpha = max(_input.w, 9.9999997473787516e-05);
+ vec4 coord = vec4(_input.xyz / nonZeroAlpha, nonZeroAlpha);
+ coord = coord * 0.9960939884185791 + vec4(0.0019529999699443579, 0.0019529999699443579, 0.0019529999699443579, 0.0019529999699443579);
+ _output.w = texture(uTextureSampler_0_Stage2, vec2(coord.w, 0.125)).w;
+ _output.x = texture(uTextureSampler_0_Stage2, vec2(coord.x, 0.375)).w;
+ _output.y = texture(uTextureSampler_0_Stage2, vec2(coord.y, 0.625)).w;
+ _output.z = texture(uTextureSampler_0_Stage2, vec2(coord.z, 0.875)).w;
+ _output.xyz *= _output.w;
+ return _output;
+}
+vec4 TextureEffect_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_1_Stage2, vTransformedCoords_1_Stage0) * _input;
+ return _output;
+}
+vec4 blend_dst_over(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src + dst;
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ float alpha = 1.0;
+ alpha = vinCoverage_Stage0;
+ outputCoverage_Stage0 = vec4(alpha);
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0;
+ coord.y -= 3.0 * uPixelSize_Stage1;
+ for (int i = 0;i < 7; i++) {
+ output_Stage1 = max(output_Stage1, texture(uTextureSampler_0_Stage1, coord));
+ coord.y += uPixelSize_Stage1;
+ }
+ output_Stage1 *= outputCoverage_Stage0;
+ }
+ vec4 output_Stage2;
+ {
+ vec4 inputColor = vec4(output_Stage1.xyz, 1.0);
+ output_Stage2 = blend_dst_over(ColorTableEffect_Stage2_c0_c0(inputColor), TextureEffect_Stage2_c1_c0(inputColor));
+ output_Stage2 *= output_Stage1.w;
+ }
+ {
+ vec2 dxy0 = uinnerRect_Stage3.xy - gl_FragCoord.xy;
+ vec2 dxy1 = gl_FragCoord.xy - uinnerRect_Stage3.zw;
+ vec2 Z = max(max(dxy0 * uinvRadiiLTRB_Stage3.xy, dxy1 * uinvRadiiLTRB_Stage3.zw), 0.0);
+ float grad_dot = 4.0 * dot(Z, Z);
+ grad_dot = max(grad_dot, 9.9999997473787516e-05);
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in float inCoverage;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out float vinCoverage_Stage0;
+void main() {
+ vec4 color = inColor;
+ vcolor_Stage0 = color;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(inPosition, 1.0)).xy;
+ vinCoverage_Stage0 = inCoverage;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/799.shader_test b/shaders/skia/799.shader_test
new file mode 100644
index 0000000..863a9b0
--- /dev/null
+++ b/shaders/skia/799.shader_test
@@ -0,0 +1,121 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_KHR_blend_equation_advanced : require
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+layout (blend_support_all_equations) out ;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+uniform vec4 uinnerRect_Stage2;
+uniform vec2 uradiusPlusHalf_Stage2;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 RadialGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = length(vTransformedCoords_0_Stage0);
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = RadialGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_dst_in(outputColor_Stage0, TiledGradientEffect_Stage1_c0_c0(vec4(1.0)));
+ }
+ vec4 output_Stage2;
+ {
+ vec2 dxy0 = uinnerRect_Stage2.xy - gl_FragCoord.xy;
+ vec2 dxy1 = gl_FragCoord.xy - uinnerRect_Stage2.zw;
+ vec2 dxy = max(max(dxy0, dxy1), 0.0);
+ float alpha = clamp(uradiusPlusHalf_Stage2.x - length(dxy), 0.0, 1.0);
+ output_Stage2 = vec4(alpha);
+ }
+ vec4 output_Stage3;
+ {
+ output_Stage3 = floor(output_Stage2 * 255.0 + 0.5) / 255.0;
+ {
+ output_Stage3.xyz = output_Stage3.w <= 0.0 ? vec3(0.0) : floor((output_Stage3.xyz / output_Stage3.w) * 255.0 + 0.5) / 255.0;
+ }
+ }
+ {
+ sk_FragColor = output_Stage3 * output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 color = inColor;
+ vcolor_Stage0 = color;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/802-1.shader_test b/shaders/skia/802-1.shader_test
new file mode 100644
index 0000000..da47816
--- /dev/null
+++ b/shaders/skia/802-1.shader_test
@@ -0,0 +1,89 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage2_c0_c0;
+uniform vec4 urightBorderColor_Stage2_c0_c0;
+uniform vec4 uscale01_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias01_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale23_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias23_Stage2_c0_c0_c1_c0;
+uniform float uthreshold_Stage2_c0_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 RadialGradientLayout_Stage2_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = length(vTransformedCoords_1_Stage0);
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 DualIntervalGradientColorizer_Stage2_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthreshold_Stage2_c0_c0_c1_c0) {
+ scale = uscale01_Stage2_c0_c0_c1_c0;
+ bias = ubias01_Stage2_c0_c0_c1_c0;
+ } else {
+ scale = uscale23_Stage2_c0_c0_c1_c0;
+ bias = ubias23_Stage2_c0_c0_c1_c0;
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = RadialGradientLayout_Stage2_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage2_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage2_c0_c0;
+ } else {
+ _output = DualIntervalGradientColorizer_Stage2_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_dst_in(output_Stage1, ClampedGradientEffect_Stage2_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/802.shader_test b/shaders/skia/802.shader_test
new file mode 100644
index 0000000..86b8bc6
--- /dev/null
+++ b/shaders/skia/802.shader_test
@@ -0,0 +1,42 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+uniform sampler2D uTextureSampler_0_Stage0;
+noperspective in vec2 vtextureCoords_Stage0;
+flat in vec4 vtextureDomain_Stage0;
+flat in vec4 vcolor_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ vec2 textureCoords;
+ textureCoords = vtextureCoords_Stage0;
+ vec4 textureDomain;
+ textureDomain = vtextureDomain_Stage0;
+ outputColor_Stage0 = vcolor_Stage0;
+ outputColor_Stage0 = texture(uTextureSampler_0_Stage0, clamp(textureCoords, textureDomain.xy, textureDomain.zw)) * outputColor_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 position;
+in vec2 textureCoords;
+in vec4 textureDomain;
+in vec4 color;
+noperspective out vec2 vtextureCoords_Stage0;
+flat out vec4 vtextureDomain_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vec2 pos2 = position;
+ vtextureCoords_Stage0 = textureCoords;
+ vtextureDomain_Stage0 = textureDomain;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/805.shader_test b/shaders/skia/805.shader_test
new file mode 100644
index 0000000..96663bf
--- /dev/null
+++ b/shaders/skia/805.shader_test
@@ -0,0 +1,27 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+noperspective in vec4 vcolor_Stage0;
+void main() {
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform vec4 uColor_Stage0;
+in vec2 inPosition;
+in float inCoverage;
+noperspective out vec4 vcolor_Stage0;
+void main() {
+ vec4 color = uColor_Stage0;
+ color = color * inCoverage;
+ vcolor_Stage0 = color;
+ vec2 pos2 = inPosition;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/808-1.shader_test b/shaders/skia/808-1.shader_test
new file mode 100644
index 0000000..41eb6e0
--- /dev/null
+++ b/shaders/skia/808-1.shader_test
@@ -0,0 +1,115 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage2_c0_c0;
+uniform vec4 urightBorderColor_Stage2_c0_c0;
+uniform vec4 uscale0_1_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale8_9_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias8_9_Stage2_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage2_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage2_c0_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 RadialGradientLayout_Stage2_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = length(vTransformedCoords_1_Stage0);
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage2_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.w) {
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage2_c0_c0_c1_c0;
+ bias = ubias0_1_Stage2_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage2_c0_c0_c1_c0;
+ bias = ubias2_3_Stage2_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage2_c0_c0_c1_c0;
+ bias = ubias4_5_Stage2_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage2_c0_c0_c1_c0;
+ bias = ubias6_7_Stage2_c0_c0_c1_c0;
+ }
+ }
+ } else {
+ {
+ {
+ scale = uscale8_9_Stage2_c0_c0_c1_c0;
+ bias = ubias8_9_Stage2_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = RadialGradientLayout_Stage2_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage2_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage2_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage2_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_dst_in(output_Stage1, ClampedGradientEffect_Stage2_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/808.shader_test b/shaders/skia/808.shader_test
new file mode 100644
index 0000000..1d7b90b
--- /dev/null
+++ b/shaders/skia/808.shader_test
@@ -0,0 +1,468 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_KHR_blend_equation_advanced : require
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+layout (blend_support_all_equations) out ;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+uniform mat4 um_Stage2_c1_c0;
+uniform vec4 uv_Stage2_c1_c0;
+uniform vec2 uImageIncrement_Stage2_c2_c0;
+uniform float uSurfaceScale_Stage2_c2_c0;
+uniform vec3 uLightColor_Stage2_c2_c0;
+uniform float uKS_Stage2_c2_c0;
+uniform float uShininess_Stage2_c2_c0;
+uniform vec4 uTexDom_Stage2_c2_c0;
+uniform vec3 uDecalParams_Stage2_c2_c0;
+uniform vec3 uLightDirection_Stage2_c2_c0;
+uniform vec4 urectH_Stage3;
+uniform float uinvSixSigma_Stage3;
+uniform vec2 ubaseFrequency_Stage4_c3_c0;
+uniform vec2 ustitchData_Stage4_c3_c0;
+uniform vec2 ubaseFrequency_Stage5_c4_c0;
+uniform vec2 ustitchData_Stage5_c4_c0;
+uniform sampler2D uTextureSampler_0_Stage2;
+uniform sampler2D uTextureSampler_0_Stage3;
+uniform sampler2D uTextureSampler_0_Stage4;
+uniform sampler2D uTextureSampler_1_Stage4;
+uniform sampler2D uTextureSampler_0_Stage5;
+uniform sampler2D uTextureSampler_1_Stage5;
+noperspective in vec4 vinCircleEdge_Stage0;
+noperspective in vec4 vinColor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+noperspective in vec3 vTransformedCoords_3_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 ColorMatrixFragmentProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = _input;
+ _output = um_Stage2_c1_c0 * inputColor + uv_Stage2_c1_c0;
+ {
+ _output = clamp(_output, 0.0, 1.0);
+ }
+ return _output;
+}
+vec4 light_Stage2_c2_c0(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ vec3 halfDir = normalize(surfaceToLight + vec3(0.0, 0.0, 1.0));
+ float colorScale = uKS_Stage2_c2_c0 * pow(dot(normal, halfDir), uShininess_Stage2_c2_c0);
+ vec3 color = lightColor * clamp(colorScale, 0.0, 1.0);
+ return vec4(color, max(max(color.x, color.y), color.z));
+}
+float sobel_Stage2_c2_c0(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage2_c2_c0(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage2_c2_c0(float m[9], float surfaceScale) {
+ return pointToNormal_Stage2_c2_c0(sobel_Stage2_c2_c0(m[1], m[2], m[4], m[5], m[7], m[8], 0.5), sobel_Stage2_c2_c0(0.0, 0.0, m[1], m[7], m[2], m[8], 0.33333298563957214), surfaceScale);
+}
+vec4 SpecularLighting_Stage2_c2_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coord = vTransformedCoords_1_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage2_c2_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c2_c0.xy, uTexDom_Stage2_c2_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c2_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c2_c0.y);
+ if (err > uDecalParams_Stage2_c2_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c2_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp0 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage2_c2_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c2_c0.xy, uTexDom_Stage2_c2_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c2_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c2_c0.y);
+ if (err > uDecalParams_Stage2_c2_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c2_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage2_c2_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c2_c0.xy, uTexDom_Stage2_c2_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c2_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c2_c0.y);
+ if (err > uDecalParams_Stage2_c2_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c2_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage2_c2_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c2_c0.xy, uTexDom_Stage2_c2_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c2_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c2_c0.y);
+ if (err > uDecalParams_Stage2_c2_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c2_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c2_c0.xy, uTexDom_Stage2_c2_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c2_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c2_c0.y);
+ if (err > uDecalParams_Stage2_c2_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c2_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage2_c2_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c2_c0.xy, uTexDom_Stage2_c2_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c2_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c2_c0.y);
+ if (err > uDecalParams_Stage2_c2_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c2_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp5 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage2_c2_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c2_c0.xy, uTexDom_Stage2_c2_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c2_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c2_c0.y);
+ if (err > uDecalParams_Stage2_c2_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c2_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp6 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage2_c2_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c2_c0.xy, uTexDom_Stage2_c2_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c2_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c2_c0.y);
+ if (err > uDecalParams_Stage2_c2_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c2_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp7 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage2_c2_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2_c2_c0.xy, uTexDom_Stage2_c2_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2_c2_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2_c2_c0.y);
+ if (err > uDecalParams_Stage2_c2_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2_c2_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp8 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = uLightDirection_Stage2_c2_c0;
+ _output = light_Stage2_c2_c0(normal_Stage2_c2_c0(m, uSurfaceScale_Stage2_c2_c0), surfaceToLight, uLightColor_Stage2_c2_c0);
+ _output *= _input;
+ return _output;
+}
+float perlinnoise_Stage4_c3_c0(float chanCoord, vec2 noiseVec, vec2 stitchData) {
+ vec4 floorVal;
+ floorVal.xy = floor(noiseVec);
+ floorVal.zw = floorVal.xy + vec2(1.0);
+ vec2 fractVal = fract(noiseVec);
+ vec2 noiseSmooth = (fractVal * fractVal) * (vec2(3.0) - vec2(2.0) * fractVal);
+ if (floorVal.x >= stitchData.x) {
+ floorVal.x -= stitchData.x;
+ }
+ if (floorVal.y >= stitchData.y) {
+ floorVal.y -= stitchData.y;
+ }
+ if (floorVal.z >= stitchData.x) {
+ floorVal.z -= stitchData.x;
+ }
+ if (floorVal.w >= stitchData.y) {
+ floorVal.w -= stitchData.y;
+ }
+ floorVal = fract(floor(mod(floorVal, 256.0)) / vec4(256.0));
+ vec2 latticeIdx;
+ latticeIdx.x = texture(uTextureSampler_0_Stage4, vec2(floorVal.x, 0.5)).x;
+ latticeIdx.y = texture(uTextureSampler_0_Stage4, vec2(floorVal.z, 0.5)).x;
+ vec4 bcoords = fract(latticeIdx.xyxy + floorVal.yyww);
+ vec2 uv;
+ vec4 lattice = texture(uTextureSampler_1_Stage4, vec2(bcoords.x, chanCoord)).zyxw;
+ uv.x = dot((lattice.yw + lattice.xz * vec2(0.00390625)) * vec2(2.0) - vec2(1.0), fractVal);
+ fractVal.x -= 1.0;
+ lattice = texture(uTextureSampler_1_Stage4, vec2(bcoords.y, chanCoord)).zyxw;
+ uv.y = dot((lattice.yw + lattice.xz * vec2(0.00390625)) * vec2(2.0) - vec2(1.0), fractVal);
+ vec2 ab;
+ ab.x = mix(uv.x, uv.y, noiseSmooth.x);
+ fractVal.y -= 1.0;
+ lattice = texture(uTextureSampler_1_Stage4, vec2(bcoords.w, chanCoord)).zyxw;
+ uv.y = dot((lattice.yw + lattice.xz * vec2(0.00390625)) * vec2(2.0) - vec2(1.0), fractVal);
+ fractVal.x += 1.0;
+ lattice = texture(uTextureSampler_1_Stage4, vec2(bcoords.z, chanCoord)).zyxw;
+ uv.x = dot((lattice.yw + lattice.xz * vec2(0.00390625)) * vec2(2.0) - vec2(1.0), fractVal);
+ ab.y = mix(uv.x, uv.y, noiseSmooth.x);
+ return mix(ab.x, ab.y, noiseSmooth.y);
+}
+vec4 PerlinNoise_Stage4_c3_c0(vec4 _input) {
+ vec4 _output;
+ vec2 noiseVec = floor(vTransformedCoords_2_Stage0) * ubaseFrequency_Stage4_c3_c0;
+ _output = vec4(0.0);
+ vec2 stitchData = ustitchData_Stage4_c3_c0;
+ float ratio = 1.0;
+ for (int octave = 0;octave < 6; ++octave) {
+ _output += vec4(perlinnoise_Stage4_c3_c0(0.125, noiseVec, stitchData), perlinnoise_Stage4_c3_c0(0.375, noiseVec, stitchData), perlinnoise_Stage4_c3_c0(0.625, noiseVec, stitchData), perlinnoise_Stage4_c3_c0(0.875, noiseVec, stitchData)) * ratio;
+ noiseVec *= vec2(2.0);
+ ratio *= 0.5;
+ stitchData *= vec2(2.0);
+ }
+ _output = _output * vec4(0.5) + vec4(0.5);
+ _output = clamp(_output, 0.0, 1.0);
+ _output = vec4(_output.xyz * _output.www, _output.w);
+ return _output;
+}
+float perlinnoise_Stage5_c4_c0(float chanCoord, vec2 noiseVec, vec2 stitchData) {
+ vec4 floorVal;
+ floorVal.xy = floor(noiseVec);
+ floorVal.zw = floorVal.xy + vec2(1.0);
+ vec2 fractVal = fract(noiseVec);
+ vec2 noiseSmooth = (fractVal * fractVal) * (vec2(3.0) - vec2(2.0) * fractVal);
+ if (floorVal.x >= stitchData.x) {
+ floorVal.x -= stitchData.x;
+ }
+ if (floorVal.y >= stitchData.y) {
+ floorVal.y -= stitchData.y;
+ }
+ if (floorVal.z >= stitchData.x) {
+ floorVal.z -= stitchData.x;
+ }
+ if (floorVal.w >= stitchData.y) {
+ floorVal.w -= stitchData.y;
+ }
+ floorVal = fract(floor(mod(floorVal, 256.0)) / vec4(256.0));
+ vec2 latticeIdx;
+ latticeIdx.x = texture(uTextureSampler_0_Stage5, vec2(floorVal.x, 0.5)).x;
+ latticeIdx.y = texture(uTextureSampler_0_Stage5, vec2(floorVal.z, 0.5)).x;
+ vec4 bcoords = fract(latticeIdx.xyxy + floorVal.yyww);
+ vec2 uv;
+ vec4 lattice = texture(uTextureSampler_1_Stage5, vec2(bcoords.x, chanCoord)).zyxw;
+ uv.x = dot((lattice.yw + lattice.xz * vec2(0.00390625)) * vec2(2.0) - vec2(1.0), fractVal);
+ fractVal.x -= 1.0;
+ lattice = texture(uTextureSampler_1_Stage5, vec2(bcoords.y, chanCoord)).zyxw;
+ uv.y = dot((lattice.yw + lattice.xz * vec2(0.00390625)) * vec2(2.0) - vec2(1.0), fractVal);
+ vec2 ab;
+ ab.x = mix(uv.x, uv.y, noiseSmooth.x);
+ fractVal.y -= 1.0;
+ lattice = texture(uTextureSampler_1_Stage5, vec2(bcoords.w, chanCoord)).zyxw;
+ uv.y = dot((lattice.yw + lattice.xz * vec2(0.00390625)) * vec2(2.0) - vec2(1.0), fractVal);
+ fractVal.x += 1.0;
+ lattice = texture(uTextureSampler_1_Stage5, vec2(bcoords.z, chanCoord)).zyxw;
+ uv.x = dot((lattice.yw + lattice.xz * vec2(0.00390625)) * vec2(2.0) - vec2(1.0), fractVal);
+ ab.y = mix(uv.x, uv.y, noiseSmooth.x);
+ return mix(ab.x, ab.y, noiseSmooth.y);
+}
+vec4 PerlinNoise_Stage5_c4_c0(vec4 _input) {
+ vec4 _output;
+ vec2 vTransformedCoords_3_Stage0_ensure2D = vTransformedCoords_3_Stage0.xy / vTransformedCoords_3_Stage0.z;
+ vec2 noiseVec = floor(vTransformedCoords_3_Stage0_ensure2D) * ubaseFrequency_Stage5_c4_c0;
+ _output = vec4(0.0);
+ vec2 stitchData = ustitchData_Stage5_c4_c0;
+ float ratio = 1.0;
+ for (int octave = 0;octave < 9; ++octave) {
+ _output += vec4(perlinnoise_Stage5_c4_c0(0.125, noiseVec, stitchData), perlinnoise_Stage5_c4_c0(0.375, noiseVec, stitchData), perlinnoise_Stage5_c4_c0(0.625, noiseVec, stitchData), perlinnoise_Stage5_c4_c0(0.875, noiseVec, stitchData)) * ratio;
+ noiseVec *= vec2(2.0);
+ ratio *= 0.5;
+ stitchData *= vec2(2.0);
+ }
+ _output = _output * vec4(0.5) + vec4(0.5);
+ _output = clamp(_output, 0.0, 1.0);
+ _output = vec4(_output.xyz * _output.www, _output.w);
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ vec4 circleEdge;
+ circleEdge = vinCircleEdge_Stage0;
+ outputColor_Stage0 = vinColor_Stage0;
+ float d = length(circleEdge.xy);
+ float distanceToOuterEdge = circleEdge.z * (1.0 - d);
+ float edgeAlpha = clamp(distanceToOuterEdge, 0.0, 1.0);
+ float distanceToInnerEdge = circleEdge.z * (d - circleEdge.w);
+ float innerAlpha = clamp(distanceToInnerEdge, 0.0, 1.0);
+ edgeAlpha *= innerAlpha;
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_dst_in(outputColor_Stage0, TiledGradientEffect_Stage1_c0_c0(vec4(1.0)));
+ }
+ vec4 output_Stage2;
+ {
+ vec4 inputColor = vec4(output_Stage1.xyz, 1.0);
+ output_Stage2 = blend_dst_in(ColorMatrixFragmentProcessor_Stage2_c1_c0(inputColor), SpecularLighting_Stage2_c2_c0(inputColor));
+ output_Stage2 *= output_Stage1.w;
+ }
+ vec4 output_Stage3;
+ {
+ float xCoverage, yCoverage;
+ {
+ float x, y;
+ {
+ x = max(urectH_Stage3.x - gl_FragCoord.x, gl_FragCoord.x - urectH_Stage3.z);
+ y = max(urectH_Stage3.y - gl_FragCoord.y, gl_FragCoord.y - urectH_Stage3.w);
+ }
+ xCoverage = texture(uTextureSampler_0_Stage3, vec2(x * uinvSixSigma_Stage3, 0.5)).w;
+ yCoverage = texture(uTextureSampler_0_Stage3, vec2(y * uinvSixSigma_Stage3, 0.5)).w;
+ output_Stage3 = (outputCoverage_Stage0 * xCoverage) * yCoverage;
+ }
+ output_Stage3 = (outputCoverage_Stage0 * xCoverage) * yCoverage;
+ }
+ vec4 output_Stage4;
+ {
+ output_Stage4 = blend_dst_in(output_Stage3, PerlinNoise_Stage4_c3_c0(vec4(1.0)));
+ }
+ vec4 output_Stage5;
+ {
+ output_Stage5 = blend_dst_in(output_Stage4, PerlinNoise_Stage5_c4_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage5 * output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+uniform mat3 uCoordTransformMatrix_3_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec4 inCircleEdge;
+noperspective out vec4 vinCircleEdge_Stage0;
+noperspective out vec4 vinColor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+noperspective out vec3 vTransformedCoords_3_Stage0;
+void main() {
+ vinCircleEdge_Stage0 = inCircleEdge;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_3_Stage0 = uCoordTransformMatrix_3_Stage0 * vec3(inPosition, 1.0);
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/811.shader_test b/shaders/skia/811.shader_test
new file mode 100644
index 0000000..ef015d4
--- /dev/null
+++ b/shaders/skia/811.shader_test
@@ -0,0 +1,202 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform float uPixelSize_Stage1;
+uniform vec2 uRange_Stage1;
+uniform vec4 uleftBorderColor_Stage2_c0_c0;
+uniform vec4 urightBorderColor_Stage2_c0_c0;
+uniform float ubias_Stage2_c0_c0_c0_c0;
+uniform float uscale_Stage2_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage2_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage2_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage2_c0_c0_c1_c0;
+uniform float uPixelSize_Stage3;
+uniform vec2 uRange_Stage3;
+uniform vec4 uinnerRect_Stage4;
+uniform vec2 uinvRadiiXY_Stage4;
+uniform vec2 ubaseFrequency_Stage5;
+uniform float uz_Stage5;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage3;
+uniform sampler2D uTextureSampler_0_Stage5;
+uniform sampler2D uTextureSampler_1_Stage5;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+noperspective in vec2 vTransformedCoords_3_Stage0;
+vec4 SweepGradientLayout_Stage2_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float angle;
+ {
+ angle = atan(-vTransformedCoords_1_Stage0.y, -vTransformedCoords_1_Stage0.x);
+ }
+ float t = ((angle * 0.15915493667125702 + 0.5) + ubias_Stage2_c0_c0_c0_c0) * uscale_Stage2_c0_c0_c0_c0;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage2_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage2_c0_c0_c1_c0;
+ bias = ubias0_1_Stage2_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage2_c0_c0_c1_c0;
+ bias = ubias2_3_Stage2_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage2_c0_c0_c1_c0;
+ bias = ubias4_5_Stage2_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage2_c0_c0_c1_c0;
+ bias = ubias6_7_Stage2_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = SweepGradientLayout_Stage2_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage2_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage2_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage2_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec3 fade_Stage5(vec3 t) {
+ return ((t * t) * t) * (t * (t * 6.0 - 15.0) + 10.0);
+}
+float perm_Stage5(float x) {
+ return texture(uTextureSampler_0_Stage5, vec2(fract(x / 256.0), 0.0)).x * 255.0;
+}
+float grad_Stage5(float x, vec3 p) {
+ return dot(texture(uTextureSampler_1_Stage5, vec2(fract(x / 16.0), 0.0)).xyz * 255.0 - vec3(1.0), p);
+}
+float lerp_Stage5(float a, float b, float w) {
+ return a + w * (b - a);
+}
+float noise_Stage5(vec3 p) {
+ vec3 P = mod(floor(p), 256.0);
+ p -= floor(p);
+ vec3 f = fade_Stage5(p);
+ float A = perm_Stage5(P.x) + P.y;
+ float AA = perm_Stage5(A) + P.z;
+ float AB = perm_Stage5(A + 1.0) + P.z;
+ float B = perm_Stage5(P.x + 1.0) + P.y;
+ float BA = perm_Stage5(B) + P.z;
+ float BB = perm_Stage5(B + 1.0) + P.z;
+ float result = lerp_Stage5(lerp_Stage5(lerp_Stage5(grad_Stage5(perm_Stage5(AA), p), grad_Stage5(perm_Stage5(BA), p + vec3(-1.0, 0.0, 0.0)), f.x), lerp_Stage5(grad_Stage5(perm_Stage5(AB), p + vec3(0.0, -1.0, 0.0)), grad_Stage5(perm_Stage5(BB), p + vec3(-1.0, -1.0, 0.0)), f.x), f.y), lerp_Stage5(lerp_Stage5(grad_Stage5(perm_Stage5(AA + 1.0), p + vec3(0.0, 0.0, -1.0)), grad_Stage5(perm_Stage5(BA + 1.0), p + vec3(-1.0, 0.0, -1.0)), f.x), lerp_Stage5(grad_Stage5(perm_Stage5(AB + 1.0), p + vec3(0.0, -1.0, -1.0)), grad_Stage5(perm_Stage5(BB + 1.0), p + vec3(-1.0, -1.0, -1.0)), f.x), f.y), f.z);
+ return result;
+}
+float noiseOctaves_Stage5(vec3 p) {
+ float result = 0.0;
+ float ratio = 1.0;
+ for (float i = 0.0;i < 3.0; i++) {
+ result += noise_Stage5(p) / ratio;
+ p *= 2.0;
+ ratio *= 2.0;
+ }
+ return (result + 1.0) / 2.0;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = vec4(1.0, 1.0, 1.0, 1.0);
+ vec2 coord = vTransformedCoords_0_Stage0;
+ coord.x -= 3.0 * uPixelSize_Stage1;
+ for (int i = 0;i < 7; i++) {
+ output_Stage1 = min(output_Stage1, texture(uTextureSampler_0_Stage1, coord));
+ coord.x += uPixelSize_Stage1;
+ }
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_dst_in(output_Stage1, ClampedGradientEffect_Stage2_c0_c0(vec4(1.0)));
+ }
+ vec4 output_Stage3;
+ {
+ output_Stage3 = vec4(1.0, 1.0, 1.0, 1.0);
+ vec2 coord = vTransformedCoords_2_Stage0;
+ coord.y -= 6.0 * uPixelSize_Stage3;
+ for (int i = 0;i < 13; i++) {
+ output_Stage3 = min(output_Stage3, texture(uTextureSampler_0_Stage3, coord));
+ coord.y += uPixelSize_Stage3;
+ }
+ output_Stage3 *= output_Stage2;
+ }
+ {
+ vec2 dxy0 = uinnerRect_Stage4.xy - gl_FragCoord.xy;
+ vec2 dxy1 = gl_FragCoord.xy - uinnerRect_Stage4.zw;
+ vec2 dxy = max(max(dxy0, dxy1), 0.0);
+ vec2 Z = dxy * uinvRadiiXY_Stage4;
+ float grad_dot = 4.0 * dot(Z, Z);
+ grad_dot = max(grad_dot, 9.9999997473787516e-05);
+ }
+ vec4 output_Stage5;
+ {
+ vec2 coords = vTransformedCoords_3_Stage0 * ubaseFrequency_Stage5;
+ float r = noiseOctaves_Stage5(vec3(coords, uz_Stage5));
+ float g = noiseOctaves_Stage5(vec3(coords, uz_Stage5));
+ float b = noiseOctaves_Stage5(vec3(coords, uz_Stage5));
+ float a = noiseOctaves_Stage5(vec3(coords, uz_Stage5));
+ output_Stage5 = vec4(r, g, b, a);
+ output_Stage5 = clamp(output_Stage5, 0.0, 1.0);
+ output_Stage5 = vec4(output_Stage5.xyz * output_Stage5.www, output_Stage5.w);
+ }
+ {
+ sk_FragColor = output_Stage5;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+uniform mat3 uCoordTransformMatrix_3_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+noperspective out vec2 vTransformedCoords_3_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_3_Stage0 = (uCoordTransformMatrix_3_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/814-1.shader_test b/shaders/skia/814-1.shader_test
new file mode 100644
index 0000000..cf31c5b
--- /dev/null
+++ b/shaders/skia/814-1.shader_test
@@ -0,0 +1,103 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uscale0_1_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage2_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage2_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage2_c0_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 RadialGradientLayout_Stage2_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = length(vTransformedCoords_1_Stage0);
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage2_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage2_c0_c0_c1_c0;
+ bias = ubias0_1_Stage2_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage2_c0_c0_c1_c0;
+ bias = ubias2_3_Stage2_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage2_c0_c0_c1_c0;
+ bias = ubias4_5_Stage2_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage2_c0_c0_c1_c0;
+ bias = ubias6_7_Stage2_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = RadialGradientLayout_Stage2_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ t.x = fract(t.x);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage2_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_dst_in(output_Stage1, TiledGradientEffect_Stage2_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/814.shader_test b/shaders/skia/814.shader_test
new file mode 100644
index 0000000..c6a28cc
--- /dev/null
+++ b/shaders/skia/814.shader_test
@@ -0,0 +1,156 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uColor_Stage0;
+uniform vec4 uinnerRect_Stage1_c0_c0_c0_c0;
+uniform vec2 uradiusPlusHalf_Stage1_c0_c0_c0_c0;
+uniform vec4 ucircleData_Stage1_c0_c0_c1_c0_c1_c0;
+uniform float uPixelSize_Stage1_c1_c0_c0_c0_c0_c0;
+uniform vec2 uRange_Stage1_c1_c0_c0_c0_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 CircularRRect_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 dxy0 = uinnerRect_Stage1_c0_c0_c0_c0.xy - gl_FragCoord.xy;
+ vec2 dxy1 = gl_FragCoord.xy - uinnerRect_Stage1_c0_c0_c0_c0.zw;
+ vec2 dxy = max(max(dxy0, dxy1), 0.0);
+ float alpha = clamp(uradiusPlusHalf_Stage1_c0_c0_c0_c0.x - length(dxy), 0.0, 1.0);
+ _output = _input * alpha;
+ return _output;
+}
+vec4 ClampFragmentProcessor_Stage1_c0_c0_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ float alpha = clamp(_input.w, 0.0, 1.0);
+ _output = vec4(clamp(_input.xyz, 0.0, alpha), alpha);
+ }
+ return _output;
+}
+vec4 CircleBlurFragmentProcessor_Stage1_c0_c0_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 vec = vec2((gl_FragCoord.x - ucircleData_Stage1_c0_c0_c1_c0_c1_c0.x) * ucircleData_Stage1_c0_c0_c1_c0_c1_c0.w, (gl_FragCoord.y - ucircleData_Stage1_c0_c0_c1_c0_c1_c0.y) * ucircleData_Stage1_c0_c0_c1_c0_c1_c0.w);
+ float dist = length(vec) + (0.5 - ucircleData_Stage1_c0_c0_c1_c0_c1_c0.z) * ucircleData_Stage1_c0_c0_c1_c0_c1_c0.w;
+ _output = _input * texture(uTextureSampler_0_Stage1, vec2(dist, 0.5)).w;
+ return _output;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 blend_lighten(vec4 src, vec4 dst) {
+ vec4 result = blend_src_over(src, dst);
+ result.xyz = max(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
+ return result;
+}
+vec4 ComposeTwo_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_lighten(ClampFragmentProcessor_Stage1_c0_c0_c1_c0_c0_c0(inputColor), CircleBlurFragmentProcessor_Stage1_c0_c0_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 blend_xor(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src + (1.0 - src.w) * dst;
+}
+vec4 ComposeTwo_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_xor(CircularRRect_Stage1_c0_c0_c0_c0(inputColor), ComposeTwo_Stage1_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 Morphology_Stage1_c1_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0;
+ coord.y -= 5.0 * uPixelSize_Stage1_c1_c0_c0_c0_c0_c0;
+ for (int i = 0;i < 11; i++) {
+ _output = max(_output, texture(uTextureSampler_1_Stage1, coord));
+ coord.y += uPixelSize_Stage1_c1_c0_c0_c0_c0_c0;
+ }
+ _output *= _input;
+ return _output;
+}
+vec4 ConfigConversionEffect_Stage1_c1_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = floor(_input * 255.0 + 0.5) / 255.0;
+ {
+ _output.xyz = _output.w <= 0.0 ? vec3(0.0) : floor((_output.xyz / _output.w) * 255.0 + 0.5) / 255.0;
+ }
+ return _output;
+}
+float _guarded_divide(float n, float d) {
+ return n / d;
+}
+float _color_burn_component(float sc, float sa, float dc, float da) {
+ if (da == dc) {
+ return (sa * da + sc * (1.0 - da)) + dc * (1.0 - sa);
+ } else if (sc == 0.0) {
+ return dc * (1.0 - sa);
+ }
+ float d = max(0.0, da - _guarded_divide((da - dc) * sa, sc));
+ return (d * sa + sc * (1.0 - da)) + dc * (1.0 - sa);
+}
+vec4 blend_color_burn(vec4 src, vec4 dst) {
+ return vec4(_color_burn_component(src.x, src.w, dst.x, dst.w), _color_burn_component(src.y, src.w, dst.y, dst.w), _color_burn_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+}
+vec4 ComposeTwo_Stage1_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_color_burn(Morphology_Stage1_c1_c0_c0_c0_c0_c0(inputColor), ConfigConversionEffect_Stage1_c1_c0_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 Big_Ole_Key_Stage1_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = _input;
+ return _output;
+}
+vec4 ComposeTwo_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_src_over(ComposeTwo_Stage1_c1_c0_c0_c0(inputColor), Big_Ole_Key_Stage1_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = uColor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_dst_in(ComposeTwo_Stage1_c0_c0(inputColor), ComposeTwo_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec2 inLocalCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/82-1.shader_test b/shaders/skia/82-1.shader_test
new file mode 100644
index 0000000..b1555a0
--- /dev/null
+++ b/shaders/skia/82-1.shader_test
@@ -0,0 +1,97 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 TextureEffect_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage2, vTransformedCoords_1_Stage0) * _input;
+ return _output;
+}
+float _blend_color_saturation(vec3 color) {
+ return max(max(color.x, color.y), color.z) - min(min(color.x, color.y), color.z);
+}
+vec3 _blend_set_color_saturation_helper(vec3 minMidMax, float sat) {
+ if (minMidMax.x < minMidMax.z) {
+ return vec3(0.0, (sat * (minMidMax.y - minMidMax.x)) / (minMidMax.z - minMidMax.x), sat);
+ }
+ return vec3(0.0);
+}
+vec3 _blend_set_color_saturation(vec3 hueLumColor, vec3 satColor) {
+ float sat = _blend_color_saturation(satColor);
+ if (hueLumColor.x <= hueLumColor.y) {
+ if (hueLumColor.y <= hueLumColor.z) {
+ hueLumColor.xyz = _blend_set_color_saturation_helper(hueLumColor, sat);
+ } else if (hueLumColor.x <= hueLumColor.z) {
+ hueLumColor.xzy = _blend_set_color_saturation_helper(hueLumColor.xzy, sat);
+ } else {
+ hueLumColor.zxy = _blend_set_color_saturation_helper(hueLumColor.zxy, sat);
+ }
+ } else if (hueLumColor.x <= hueLumColor.z) {
+ hueLumColor.yxz = _blend_set_color_saturation_helper(hueLumColor.yxz, sat);
+ } else if (hueLumColor.y <= hueLumColor.z) {
+ hueLumColor.yzx = _blend_set_color_saturation_helper(hueLumColor.yzx, sat);
+ } else {
+ hueLumColor.zyx = _blend_set_color_saturation_helper(hueLumColor.zyx, sat);
+ }
+ return hueLumColor;
+}
+float _blend_color_luminance(vec3 color) {
+ return dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), color);
+}
+vec3 _blend_set_color_luminance(vec3 hueSatColor, float alpha, vec3 lumColor) {
+ float lum = _blend_color_luminance(lumColor);
+ vec3 result = (lum - _blend_color_luminance(hueSatColor)) + hueSatColor;
+ float minComp = min(min(result.x, result.y), result.z);
+ float maxComp = max(max(result.x, result.y), result.z);
+ if (minComp < 0.0 && lum != minComp) {
+ result = lum + ((result - lum) * lum) / (lum - minComp);
+ }
+ if (maxComp > alpha && maxComp != lum) {
+ return lum + ((result - lum) * (alpha - lum)) / (maxComp - lum);
+ }
+ return result;
+}
+vec4 blend_saturation(vec4 src, vec4 dst) {
+ float alpha = dst.w * src.w;
+ vec3 sda = src.xyz * dst.w;
+ vec3 dsa = dst.xyz * src.w;
+ return vec4((((_blend_set_color_luminance(_blend_set_color_saturation(dsa, sda), alpha, dsa) + dst.xyz) - dsa) + src.xyz) - sda, (src.w + dst.w) - alpha);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_saturation(output_Stage1, TextureEffect_Stage2_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/82-10.shader_test b/shaders/skia/82-10.shader_test
new file mode 100644
index 0000000..de50b05
--- /dev/null
+++ b/shaders/skia/82-10.shader_test
@@ -0,0 +1,79 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage2_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c1_c0;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_src_in(ConstColorProcessor_Stage2_c1_c0(vec4(1.0)), output_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/82-11.shader_test b/shaders/skia/82-11.shader_test
new file mode 100644
index 0000000..d4be924
--- /dev/null
+++ b/shaders/skia/82-11.shader_test
@@ -0,0 +1,44 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform float uPixelSize_Stage1;
+uniform vec2 uRange_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = vec4(1.0, 1.0, 1.0, 1.0);
+ vec2 coord = vTransformedCoords_0_Stage0;
+ coord.x -= 4.0 * uPixelSize_Stage1;
+ float highBound = min(uRange_Stage1.y, coord.x + 8.0 * uPixelSize_Stage1);
+ coord.x = max(uRange_Stage1.x, coord.x);
+ for (int i = 0;i < 9; i++) {
+ output_Stage1 = min(output_Stage1, texture(uTextureSampler_0_Stage1, coord));
+ coord.x += uPixelSize_Stage1;
+ coord.x = min(highBound, coord.x);
+ }
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/82-12.shader_test b/shaders/skia/82-12.shader_test
new file mode 100644
index 0000000..c5e8d20
--- /dev/null
+++ b/shaders/skia/82-12.shader_test
@@ -0,0 +1,153 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform float uSurfaceScale_Stage1;
+uniform vec3 uLightColor_Stage1;
+uniform float uKD_Stage1;
+uniform vec3 uLightLocation_Stage1;
+uniform float uExponent_Stage1;
+uniform float uCosInnerConeAngle_Stage1;
+uniform float uCosOuterConeAngle_Stage1;
+uniform float uConeScale_Stage1;
+uniform vec3 uS_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 light_Stage1(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ float colorScale = uKD_Stage1 * dot(normal, surfaceToLight);
+ return vec4(lightColor * clamp(colorScale, 0.0, 1.0), 1.0);
+}
+float sobel_Stage1(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage1(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage1(float m[9], float surfaceScale) {
+ return pointToNormal_Stage1(sobel_Stage1(m[0], m[2], m[3], m[5], 0.0, 0.0, 0.33333298563957214), sobel_Stage1(m[0], m[3], m[1], m[4], m[2], m[5], 0.5), surfaceScale);
+}
+vec3 lightColor_Stage1(vec3 surfaceToLight) {
+ float cosAngle = -dot(surfaceToLight, uS_Stage1);
+ if (cosAngle < uCosOuterConeAngle_Stage1) {
+ return vec3(0.0);
+ }
+ float scale = pow(cosAngle, uExponent_Stage1);
+ if (cosAngle < uCosInnerConeAngle_Stage1) {
+ return ((uLightColor_Stage1 * scale) * (cosAngle - uCosOuterConeAngle_Stage1)) * uConeScale_Stage1;
+ }
+ return uLightColor_Stage1;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ vec2 coord = vTransformedCoords_0_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp0 = textureColor;
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp1 = textureColor;
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp2 = textureColor;
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp3 = textureColor;
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp4 = textureColor;
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp5 = textureColor;
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp6 = textureColor;
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp7 = textureColor;
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp8 = textureColor;
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = normalize(uLightLocation_Stage1 - vec3(gl_FragCoord.xy, uSurfaceScale_Stage1 * m[4]));
+ output_Stage1 = light_Stage1(normal_Stage1(m, uSurfaceScale_Stage1), surfaceToLight, lightColor_Stage1(surfaceToLight));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/82-13.shader_test b/shaders/skia/82-13.shader_test
new file mode 100644
index 0000000..ce47a87
--- /dev/null
+++ b/shaders/skia/82-13.shader_test
@@ -0,0 +1,114 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec2 uDstTextureUpperLeft_Stage1;
+uniform vec2 uDstTextureCoordScale_Stage1;
+uniform sampler2D uTextureSampler_0_Stage0;
+uniform sampler2D uDstTextureSampler_Stage1;
+noperspective in vec2 vTextureCoords_Stage0;
+flat in int vTexIndex_Stage0;
+noperspective in vec4 vinColor_Stage0;
+float _blend_color_saturation(vec3 color) {
+ return max(max(color.x, color.y), color.z) - min(min(color.x, color.y), color.z);
+}
+vec3 _blend_set_color_saturation_helper(vec3 minMidMax, float sat) {
+ if (minMidMax.x < minMidMax.z) {
+ return vec3(0.0, (sat * (minMidMax.y - minMidMax.x)) / (minMidMax.z - minMidMax.x), sat);
+ }
+ return vec3(0.0);
+}
+vec3 _blend_set_color_saturation(vec3 hueLumColor, vec3 satColor) {
+ float sat = _blend_color_saturation(satColor);
+ if (hueLumColor.x <= hueLumColor.y) {
+ if (hueLumColor.y <= hueLumColor.z) {
+ hueLumColor.xyz = _blend_set_color_saturation_helper(hueLumColor, sat);
+ } else if (hueLumColor.x <= hueLumColor.z) {
+ hueLumColor.xzy = _blend_set_color_saturation_helper(hueLumColor.xzy, sat);
+ } else {
+ hueLumColor.zxy = _blend_set_color_saturation_helper(hueLumColor.zxy, sat);
+ }
+ } else if (hueLumColor.x <= hueLumColor.z) {
+ hueLumColor.yxz = _blend_set_color_saturation_helper(hueLumColor.yxz, sat);
+ } else if (hueLumColor.y <= hueLumColor.z) {
+ hueLumColor.yzx = _blend_set_color_saturation_helper(hueLumColor.yzx, sat);
+ } else {
+ hueLumColor.zyx = _blend_set_color_saturation_helper(hueLumColor.zyx, sat);
+ }
+ return hueLumColor;
+}
+float _blend_color_luminance(vec3 color) {
+ return dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), color);
+}
+vec3 _blend_set_color_luminance(vec3 hueSatColor, float alpha, vec3 lumColor) {
+ float lum = _blend_color_luminance(lumColor);
+ vec3 result = (lum - _blend_color_luminance(hueSatColor)) + hueSatColor;
+ float minComp = min(min(result.x, result.y), result.z);
+ float maxComp = max(max(result.x, result.y), result.z);
+ if (minComp < 0.0 && lum != minComp) {
+ result = lum + ((result - lum) * lum) / (lum - minComp);
+ }
+ if (maxComp > alpha && maxComp != lum) {
+ return lum + ((result - lum) * (alpha - lum)) / (maxComp - lum);
+ }
+ return result;
+}
+vec4 blend_hue(vec4 src, vec4 dst) {
+ float alpha = dst.w * src.w;
+ vec3 sda = src.xyz * dst.w;
+ vec3 dsa = dst.xyz * src.w;
+ return vec4((((_blend_set_color_luminance(_blend_set_color_saturation(sda, dsa), alpha, dsa) + dst.xyz) - dsa) + src.xyz) - sda, (src.w + dst.w) - alpha);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vinColor_Stage0;
+ vec4 texColor;
+ {
+ texColor = texture(uTextureSampler_0_Stage0, vTextureCoords_Stage0);
+ }
+ outputCoverage_Stage0 = texColor;
+ }
+ {
+ if (all(lessThanEqual(outputCoverage_Stage0.xyz, vec3(0.0)))) {
+ discard;
+ }
+ vec2 _dstTexCoord = (gl_FragCoord.xy - uDstTextureUpperLeft_Stage1) * uDstTextureCoordScale_Stage1;
+ _dstTexCoord.y = 1.0 - _dstTexCoord.y;
+ vec4 _dstColor = texture(uDstTextureSampler_Stage1, _dstTexCoord);
+ sk_FragColor = blend_hue(outputColor_Stage0, _dstColor);
+ float lerpRed = mix(_dstColor.w, sk_FragColor.w, outputCoverage_Stage0.x);
+ float lerpBlue = mix(_dstColor.w, sk_FragColor.w, outputCoverage_Stage0.y);
+ float lerpGreen = mix(_dstColor.w, sk_FragColor.w, outputCoverage_Stage0.z);
+ sk_FragColor = outputCoverage_Stage0 * sk_FragColor + (vec4(1.0) - outputCoverage_Stage0) * _dstColor;
+ sk_FragColor.w = max(max(lerpRed, lerpBlue), lerpGreen);
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform vec2 uAtlasSizeInv_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in uvec2 inTextureCoords;
+noperspective out vec2 vTextureCoords_Stage0;
+flat out int vTexIndex_Stage0;
+noperspective out vec4 vinColor_Stage0;
+void main() {
+ ivec2 signedCoords = ivec2(int(inTextureCoords.x), int(inTextureCoords.y));
+ vec2 unormTexCoords = vec2(float(signedCoords.x / 2), float(signedCoords.y / 2));
+ vTextureCoords_Stage0 = unormTexCoords * uAtlasSizeInv_Stage0;
+ vTexIndex_Stage0 = 0;
+ vinColor_Stage0 = inColor;
+ gl_Position = vec4(inPosition.x, inPosition.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/82-2.shader_test b/shaders/skia/82-2.shader_test
new file mode 100644
index 0000000..80de18b
--- /dev/null
+++ b/shaders/skia/82-2.shader_test
@@ -0,0 +1,116 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uclamp_Stage1_c0_c0_c0_c0;
+uniform vec4 uclamp_Stage1_c0_c0_c1_c0;
+uniform vec4 uclamp_Stage1_c0_c0_c2_c0;
+uniform mat4 um_Stage2;
+uniform vec4 uv_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+uniform sampler2D uTextureSampler_2_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 inCoord = vTransformedCoords_0_Stage0;
+ vec2 subsetCoord;
+ subsetCoord.x = inCoord.x;
+ subsetCoord.y = inCoord.y;
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage1_c0_c0_c0_c0.x, uclamp_Stage1_c0_c0_c0_c0.z);
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage1_c0_c0_c0_c0.y, uclamp_Stage1_c0_c0_c0_c0.w);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ _output = _input * textureColor;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 inCoord = vTransformedCoords_1_Stage0;
+ vec2 subsetCoord;
+ subsetCoord.x = inCoord.x;
+ subsetCoord.y = inCoord.y;
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage1_c0_c0_c1_c0.x, uclamp_Stage1_c0_c0_c1_c0.z);
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage1_c0_c0_c1_c0.y, uclamp_Stage1_c0_c0_c1_c0.w);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ _output = _input * textureColor;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c0_c0_c2_c0(vec4 _input) {
+ vec4 _output;
+ vec2 inCoord = vTransformedCoords_2_Stage0;
+ vec2 subsetCoord;
+ subsetCoord.x = inCoord.x;
+ subsetCoord.y = inCoord.y;
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage1_c0_c0_c2_c0.x, uclamp_Stage1_c0_c0_c2_c0.z);
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage1_c0_c0_c2_c0.y, uclamp_Stage1_c0_c0_c2_c0.w);
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ _output = _input * textureColor;
+ return _output;
+}
+vec4 YUVtoRGBEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 planes[3];
+ planes[0] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0));
+ planes[1] = TextureEffect_Stage1_c0_c0_c1_c0(vec4(1.0));
+ planes[2] = TextureEffect_Stage1_c0_c0_c2_c0(vec4(1.0));
+ vec4 color = vec4(planes[0].x, planes[2].x, planes[1].x, 1.0);
+ _output = color;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = YUVtoRGBEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ vec4 inputColor = output_Stage1;
+ {
+ float nonZeroAlpha = max(inputColor.w, 9.9999997473787516e-05);
+ inputColor = vec4(inputColor.xyz / nonZeroAlpha, inputColor.w);
+ }
+ output_Stage2 = um_Stage2 * inputColor + uv_Stage2;
+ {
+ output_Stage2 = clamp(output_Stage2, 0.0, 1.0);
+ }
+ {
+ output_Stage2.xyz *= output_Stage2.w;
+ }
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/82-21.shader_test b/shaders/skia/82-21.shader_test
new file mode 100644
index 0000000..b2844fe
--- /dev/null
+++ b/shaders/skia/82-21.shader_test
@@ -0,0 +1,64 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform vec4 uKernel_Stage1[3];
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0 - 4.0 * uImageIncrement_Stage1;
+ vec2 coordSampled = vec2(0.0, 0.0);
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].x;
+ coord += uImageIncrement_Stage1;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/82-23.shader_test b/shaders/skia/82-23.shader_test
new file mode 100644
index 0000000..4d1f7c7
--- /dev/null
+++ b/shaders/skia/82-23.shader_test
@@ -0,0 +1,97 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 RadialGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = length(vTransformedCoords_0_Stage0);
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = RadialGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_dst_in(outputColor_Stage0, ClampedGradientEffect_Stage1_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/82-24.shader_test b/shaders/skia/82-24.shader_test
new file mode 100644
index 0000000..b46890e
--- /dev/null
+++ b/shaders/skia/82-24.shader_test
@@ -0,0 +1,113 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 RadialGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = length(vTransformedCoords_0_Stage0);
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = RadialGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_dst_in(outputColor_Stage0, ClampedGradientEffect_Stage1_c0_c0(vec4(1.0)));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_1_Stage0.x);
+ uint y = uint(vTransformedCoords_1_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ output_Stage2 = vec4(clamp(output_Stage2.xyz + value * 0.0039215688593685627, 0.0, output_Stage2.w), output_Stage2.w);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/82-25.shader_test b/shaders/skia/82-25.shader_test
new file mode 100644
index 0000000..4f1a585
--- /dev/null
+++ b/shaders/skia/82-25.shader_test
@@ -0,0 +1,114 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 TextureEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = TextureEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = OverrideInputFragmentProcessor_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+float _blend_color_saturation(vec3 color) {
+ return max(max(color.x, color.y), color.z) - min(min(color.x, color.y), color.z);
+}
+vec3 _blend_set_color_saturation_helper(vec3 minMidMax, float sat) {
+ if (minMidMax.x < minMidMax.z) {
+ return vec3(0.0, (sat * (minMidMax.y - minMidMax.x)) / (minMidMax.z - minMidMax.x), sat);
+ }
+ return vec3(0.0);
+}
+vec3 _blend_set_color_saturation(vec3 hueLumColor, vec3 satColor) {
+ float sat = _blend_color_saturation(satColor);
+ if (hueLumColor.x <= hueLumColor.y) {
+ if (hueLumColor.y <= hueLumColor.z) {
+ hueLumColor.xyz = _blend_set_color_saturation_helper(hueLumColor, sat);
+ } else if (hueLumColor.x <= hueLumColor.z) {
+ hueLumColor.xzy = _blend_set_color_saturation_helper(hueLumColor.xzy, sat);
+ } else {
+ hueLumColor.zxy = _blend_set_color_saturation_helper(hueLumColor.zxy, sat);
+ }
+ } else if (hueLumColor.x <= hueLumColor.z) {
+ hueLumColor.yxz = _blend_set_color_saturation_helper(hueLumColor.yxz, sat);
+ } else if (hueLumColor.y <= hueLumColor.z) {
+ hueLumColor.yzx = _blend_set_color_saturation_helper(hueLumColor.yzx, sat);
+ } else {
+ hueLumColor.zyx = _blend_set_color_saturation_helper(hueLumColor.zyx, sat);
+ }
+ return hueLumColor;
+}
+float _blend_color_luminance(vec3 color) {
+ return dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), color);
+}
+vec3 _blend_set_color_luminance(vec3 hueSatColor, float alpha, vec3 lumColor) {
+ float lum = _blend_color_luminance(lumColor);
+ vec3 result = (lum - _blend_color_luminance(hueSatColor)) + hueSatColor;
+ float minComp = min(min(result.x, result.y), result.z);
+ float maxComp = max(max(result.x, result.y), result.z);
+ if (minComp < 0.0 && lum != minComp) {
+ result = lum + ((result - lum) * lum) / (lum - minComp);
+ }
+ if (maxComp > alpha && maxComp != lum) {
+ return lum + ((result - lum) * (alpha - lum)) / (maxComp - lum);
+ }
+ return result;
+}
+vec4 blend_hue(vec4 src, vec4 dst) {
+ float alpha = dst.w * src.w;
+ vec3 sda = src.xyz * dst.w;
+ vec3 dsa = dst.xyz * src.w;
+ return vec4((((_blend_set_color_luminance(_blend_set_color_saturation(sda, dsa), alpha, dsa) + dst.xyz) - dsa) + src.xyz) - sda, (src.w + dst.w) - alpha);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_hue(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec2 inLocalCoord;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 color = inColor;
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/82-26.shader_test b/shaders/skia/82-26.shader_test
new file mode 100644
index 0000000..f4f0f60
--- /dev/null
+++ b/shaders/skia/82-26.shader_test
@@ -0,0 +1,44 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform float uPixelSize_Stage1;
+uniform vec2 uRange_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0;
+ coord.y -= 11.0 * uPixelSize_Stage1;
+ float highBound = min(uRange_Stage1.y, coord.y + 22.0 * uPixelSize_Stage1);
+ coord.y = max(uRange_Stage1.x, coord.y);
+ for (int i = 0;i < 23; i++) {
+ output_Stage1 = max(output_Stage1, texture(uTextureSampler_0_Stage1, coord));
+ coord.y += uPixelSize_Stage1;
+ coord.y = min(highBound, coord.y);
+ }
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/82-27.shader_test b/shaders/skia/82-27.shader_test
new file mode 100644
index 0000000..83868c9
--- /dev/null
+++ b/shaders/skia/82-27.shader_test
@@ -0,0 +1,127 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 uleftBorderColor_Stage1_c1_c0_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c1_c0_c0_c0;
+uniform vec4 ustart_Stage1_c1_c0_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c1_c0_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+vec4 ComposeOne_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_dst_in(_input, ClampedGradientEffect_Stage1_c0_c0_c0_c0(vec4(1.0)));
+ return _output;
+}
+vec4 LinearGradientLayout_Stage1_c1_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_1_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c1_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c1_c0_c0_c0_c1_c0 + t * uend_Stage1_c1_c0_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c1_c0_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c1_c0_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c1_c0_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c1_c0_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 ComposeOne_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_dst_in(_input, ClampedGradientEffect_Stage1_c1_c0_c0_c0(vec4(1.0)));
+ return _output;
+}
+vec4 blend_modulate(vec4 src, vec4 dst) {
+ return src * dst;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_modulate(ComposeOne_Stage1_c0_c0(inputColor), ComposeOne_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/82-29.shader_test b/shaders/skia/82-29.shader_test
new file mode 100644
index 0000000..9bd7e9f
--- /dev/null
+++ b/shaders/skia/82-29.shader_test
@@ -0,0 +1,39 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+flat in vec4 vcolor_Stage0;
+noperspective in float vcoverage_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ float coverage = vcoverage_Stage0;
+ outputCoverage_Stage0 = vec4(coverage);
+ }
+ {
+ sk_FragColor = (vec4(1.0) - outputColor_Stage0) * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 position;
+in float coverage;
+in vec4 color;
+flat out vec4 vcolor_Stage0;
+noperspective out float vcoverage_Stage0;
+void main() {
+ vec2 position = position;
+ vcolor_Stage0 = color;
+ vcoverage_Stage0 = coverage;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/82-3.shader_test b/shaders/skia/82-3.shader_test
new file mode 100644
index 0000000..f612520
--- /dev/null
+++ b/shaders/skia/82-3.shader_test
@@ -0,0 +1,138 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform float uSrcTF_Stage1_c0_c0[7];
+uniform mat3 uColorXform_Stage1_c0_c0;
+uniform float uDstTF_Stage1_c0_c0[7];
+uniform mat3 ucolorSpaceMatrix_Stage1_c0_c0_c0_c0;
+uniform vec3 ucolorSpaceTranslate_Stage1_c0_c0_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+uniform sampler2D uTextureSampler_2_Stage1;
+uniform sampler2D uTextureSampler_3_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+noperspective in vec2 vTransformedCoords_3_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_1_Stage1, vTransformedCoords_1_Stage0) * _input;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c0_c0_c0_c0_c2_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_2_Stage1, vTransformedCoords_2_Stage0) * _input;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c0_c0_c0_c0_c3_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_3_Stage1, vTransformedCoords_3_Stage0) * _input;
+ return _output;
+}
+vec4 YUVtoRGBEffect_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 planes[4];
+ planes[0] = TextureEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ planes[1] = TextureEffect_Stage1_c0_c0_c0_c0_c1_c0(vec4(1.0));
+ planes[2] = TextureEffect_Stage1_c0_c0_c0_c0_c2_c0(vec4(1.0));
+ planes[3] = TextureEffect_Stage1_c0_c0_c0_c0_c3_c0(vec4(1.0));
+ vec4 color = vec4(planes[0].x, planes[1].x, planes[2].x, planes[3].w);
+ color.xyz = clamp(color.xyz * ucolorSpaceMatrix_Stage1_c0_c0_c0_c0 + ucolorSpaceTranslate_Stage1_c0_c0_c0_c0, 0.0, 1.0);
+ color.xyz *= color.w;
+ _output = color;
+ return _output;
+}
+float src_tf_Stage1_c0_c0(float x) {
+ float G = uSrcTF_Stage1_c0_c0[0];
+ float A = uSrcTF_Stage1_c0_c0[1];
+ float B = uSrcTF_Stage1_c0_c0[2];
+ float C = uSrcTF_Stage1_c0_c0[3];
+ float D = uSrcTF_Stage1_c0_c0[4];
+ float E = uSrcTF_Stage1_c0_c0[5];
+ float F = uSrcTF_Stage1_c0_c0[6];
+ float s = sign(x);
+ x = abs(x);
+ x = x < D ? C * x + F : pow(A * x + B, G) + E;
+ return s * x;
+}
+float dst_tf_Stage1_c0_c0(float x) {
+ float G = uDstTF_Stage1_c0_c0[0];
+ float A = uDstTF_Stage1_c0_c0[1];
+ float B = uDstTF_Stage1_c0_c0[2];
+ float C = uDstTF_Stage1_c0_c0[3];
+ float D = uDstTF_Stage1_c0_c0[4];
+ float E = uDstTF_Stage1_c0_c0[5];
+ float F = uDstTF_Stage1_c0_c0[6];
+ float s = sign(x);
+ x = abs(x);
+ x = x < D ? C * x + F : pow(A * x + B, G) + E;
+ return s * x;
+}
+vec4 gamut_xform_Stage1_c0_c0(vec4 color) {
+ color.xyz = uColorXform_Stage1_c0_c0 * color.xyz;
+ return color;
+}
+vec4 color_xform_Stage1_c0_c0(vec4 color) {
+ float nonZeroAlpha = max(color.w, 9.9999997473787516e-05);
+ color = vec4(color.xyz / nonZeroAlpha, nonZeroAlpha);
+ color.x = src_tf_Stage1_c0_c0(color.x);
+ color.y = src_tf_Stage1_c0_c0(color.y);
+ color.z = src_tf_Stage1_c0_c0(color.z);
+ color = gamut_xform_Stage1_c0_c0(color);
+ color.x = dst_tf_Stage1_c0_c0(color.x);
+ color.y = dst_tf_Stage1_c0_c0(color.y);
+ color.z = dst_tf_Stage1_c0_c0(color.z);
+ color.xyz *= color.w;
+ return color;
+}
+vec4 ColorSpaceXform_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = color_xform_Stage1_c0_c0(YUVtoRGBEffect_Stage1_c0_c0_c0_c0(vec4(1.0))) * _input;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ColorSpaceXform_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+uniform mat3 uCoordTransformMatrix_3_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+noperspective out vec2 vTransformedCoords_3_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_3_Stage0 = (uCoordTransformMatrix_3_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/82-30.shader_test b/shaders/skia/82-30.shader_test
new file mode 100644
index 0000000..5b7f4c5
--- /dev/null
+++ b/shaders/skia/82-30.shader_test
@@ -0,0 +1,215 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 ucircle_Stage1_c0_c0_c0_c0_c0_c0;
+uniform vec4 urectH_Stage1_c0_c0_c1_c0_c0_c0;
+uniform float uinvSixSigma_Stage1_c0_c0_c1_c0_c0_c0;
+uniform vec4 ucircleData_Stage1_c0_c0_c1_c0_c1_c0;
+uniform vec2 uScale_Stage1_c1_c0_c0_c0;
+uniform vec4 uTexDom_Stage1_c1_c0_c0_c0;
+uniform vec3 uDecalParams_Stage1_c1_c0_c0_c0;
+uniform float uPixelSize_Stage1_c1_c0_c1_c0;
+uniform vec2 uRange_Stage1_c1_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+uniform sampler2D uTextureSampler_2_Stage1;
+uniform sampler2D uTextureSampler_3_Stage1;
+uniform sampler2D uTextureSampler_4_Stage1;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+vec4 CircleEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float d;
+ {
+ d = (length((ucircle_Stage1_c0_c0_c0_c0_c0_c0.xy - gl_FragCoord.xy) * ucircle_Stage1_c0_c0_c0_c0_c0_c0.w) - 1.0) * ucircle_Stage1_c0_c0_c0_c0_c0_c0.z;
+ }
+ {
+ _output = _input * clamp(d, 0.0, 1.0);
+ }
+ return _output;
+}
+vec4 ConfigConversionEffect_Stage1_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = floor(_input * 255.0 + 0.5) / 255.0;
+ {
+ _output.xyz = floor((_output.xyz * _output.w) * 255.0 + 0.5) / 255.0;
+ }
+ return _output;
+}
+float _blend_color_luminance(vec3 color) {
+ return dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), color);
+}
+vec3 _blend_set_color_luminance(vec3 hueSatColor, float alpha, vec3 lumColor) {
+ float lum = _blend_color_luminance(lumColor);
+ vec3 result = (lum - _blend_color_luminance(hueSatColor)) + hueSatColor;
+ float minComp = min(min(result.x, result.y), result.z);
+ float maxComp = max(max(result.x, result.y), result.z);
+ if (minComp < 0.0 && lum != minComp) {
+ result = lum + ((result - lum) * lum) / (lum - minComp);
+ }
+ if (maxComp > alpha && maxComp != lum) {
+ return lum + ((result - lum) * (alpha - lum)) / (maxComp - lum);
+ }
+ return result;
+}
+vec4 blend_color(vec4 src, vec4 dst) {
+ float alpha = dst.w * src.w;
+ vec3 sda = src.xyz * dst.w;
+ vec3 dsa = dst.xyz * src.w;
+ return vec4((((_blend_set_color_luminance(sda, alpha, dsa) + dst.xyz) - dsa) + src.xyz) - sda, (src.w + dst.w) - alpha);
+}
+vec4 ComposeTwo_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_color(CircleEffect_Stage1_c0_c0_c0_c0_c0_c0(inputColor), ConfigConversionEffect_Stage1_c0_c0_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 RectBlurEffect_Stage1_c0_c0_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float xCoverage, yCoverage;
+ {
+ float x, y;
+ {
+ x = max(urectH_Stage1_c0_c0_c1_c0_c0_c0.x - gl_FragCoord.x, gl_FragCoord.x - urectH_Stage1_c0_c0_c1_c0_c0_c0.z);
+ y = max(urectH_Stage1_c0_c0_c1_c0_c0_c0.y - gl_FragCoord.y, gl_FragCoord.y - urectH_Stage1_c0_c0_c1_c0_c0_c0.w);
+ }
+ xCoverage = texture(uTextureSampler_0_Stage1, vec2(x * uinvSixSigma_Stage1_c0_c0_c1_c0_c0_c0, 0.5)).w;
+ yCoverage = texture(uTextureSampler_0_Stage1, vec2(y * uinvSixSigma_Stage1_c0_c0_c1_c0_c0_c0, 0.5)).w;
+ _output = (_input * xCoverage) * yCoverage;
+ }
+ _output = (_input * xCoverage) * yCoverage;
+ return _output;
+}
+vec4 CircleBlurFragmentProcessor_Stage1_c0_c0_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 vec = vec2((gl_FragCoord.x - ucircleData_Stage1_c0_c0_c1_c0_c1_c0.x) * ucircleData_Stage1_c0_c0_c1_c0_c1_c0.w, (gl_FragCoord.y - ucircleData_Stage1_c0_c0_c1_c0_c1_c0.y) * ucircleData_Stage1_c0_c0_c1_c0_c1_c0.w);
+ float dist = length(vec) + (0.5 - ucircleData_Stage1_c0_c0_c1_c0_c1_c0.z) * ucircleData_Stage1_c0_c0_c1_c0_c1_c0.w;
+ _output = _input * texture(uTextureSampler_1_Stage1, vec2(dist, 0.5)).w;
+ return _output;
+}
+vec4 blend_dst_over(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src + dst;
+}
+vec4 ComposeTwo_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_dst_over(RectBlurEffect_Stage1_c0_c0_c1_c0_c0_c0(inputColor), CircleBlurFragmentProcessor_Stage1_c0_c0_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 blend_multiply(vec4 src, vec4 dst) {
+ return vec4(((1.0 - src.w) * dst.xyz + (1.0 - dst.w) * src.xyz) + src.xyz * dst.xyz, src.w + (1.0 - src.w) * dst.w);
+}
+vec4 ComposeTwo_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_multiply(ComposeTwo_Stage1_c0_c0_c0_c0(inputColor), ComposeTwo_Stage1_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 DisplacementMap_Stage1_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 dColor = texture(uTextureSampler_2_Stage1, vTransformedCoords_0_Stage0);
+ dColor.xyz = dColor.w < 9.9999999747524271e-07 ? vec3(0.0) : clamp(dColor.xyz / dColor.w, 0.0, 1.0);
+ vec2 cCoords = vTransformedCoords_1_Stage0 + uScale_Stage1_c1_c0_c0_c0 * (dColor.zz - vec2(0.5));
+ {
+ vec2 origCoord = cCoords;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c0_c0.xy, uTexDom_Stage1_c1_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_3_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ _output = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ return _output;
+}
+vec4 Morphology_Stage1_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_2_Stage0;
+ coord.x -= 5.0 * uPixelSize_Stage1_c1_c0_c1_c0;
+ for (int i = 0;i < 11; i++) {
+ _output = max(_output, texture(uTextureSampler_4_Stage1, coord));
+ coord.x += uPixelSize_Stage1_c1_c0_c1_c0;
+ }
+ _output *= _input;
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+vec4 ComposeTwo_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_dst_in(DisplacementMap_Stage1_c1_c0_c0_c0(inputColor), Morphology_Stage1_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+float _blend_overlay_component(float sc, float sa, float dc, float da) {
+ if (2.0 * dc <= da) {
+ return (2.0 * sc) * dc;
+ }
+ return sa * da - (2.0 * (da - dc)) * (sa - sc);
+}
+vec4 blend_overlay(vec4 src, vec4 dst) {
+ vec4 result = vec4(_blend_overlay_component(src.x, src.w, dst.x, dst.w), _blend_overlay_component(src.y, src.w, dst.y, dst.w), _blend_overlay_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+ result.xyz += dst.xyz * (1.0 - src.w) + src.xyz * (1.0 - dst.w);
+ return result;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_overlay(ComposeTwo_Stage1_c0_c0(inputColor), ComposeTwo_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec2 inLocalCoord;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+void main() {
+ vec4 color = inColor;
+ vcolor_Stage0 = color;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/82-31.shader_test b/shaders/skia/82-31.shader_test
new file mode 100644
index 0000000..c1a4af9
--- /dev/null
+++ b/shaders/skia/82-31.shader_test
@@ -0,0 +1,206 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage2;
+uniform float uSurfaceScale_Stage2;
+uniform vec3 uLightColor_Stage2;
+uniform float uKS_Stage2;
+uniform float uShininess_Stage2;
+uniform vec4 uTexDom_Stage2;
+uniform vec3 uDecalParams_Stage2;
+uniform vec3 uLightLocation_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 light_Stage2(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ vec3 halfDir = normalize(surfaceToLight + vec3(0.0, 0.0, 1.0));
+ float colorScale = uKS_Stage2 * pow(dot(normal, halfDir), uShininess_Stage2);
+ vec3 color = lightColor * clamp(colorScale, 0.0, 1.0);
+ return vec4(color, max(max(color.x, color.y), color.z));
+}
+float sobel_Stage2(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage2(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage2(float m[9], float surfaceScale) {
+ return pointToNormal_Stage2(sobel_Stage2(0.0, 0.0, m[3], m[5], m[6], m[8], 0.33333298563957214), sobel_Stage2(0.0, 0.0, m[4], m[7], m[5], m[8], 0.5), surfaceScale);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ vec2 coord = vTransformedCoords_1_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp0 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp5 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp6 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp7 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp8 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = normalize(uLightLocation_Stage2 - vec3(gl_FragCoord.xy, uSurfaceScale_Stage2 * m[4]));
+ output_Stage2 = light_Stage2(normal_Stage2(m, uSurfaceScale_Stage2), surfaceToLight, uLightColor_Stage2);
+ output_Stage2 *= output_Stage1;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/82-4.shader_test b/shaders/skia/82-4.shader_test
new file mode 100644
index 0000000..2a63920
--- /dev/null
+++ b/shaders/skia/82-4.shader_test
@@ -0,0 +1,64 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform mat3 ucolorSpaceMatrix_Stage1_c0_c0;
+uniform vec3 ucolorSpaceTranslate_Stage1_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_1_Stage1, vTransformedCoords_1_Stage0) * _input;
+ return _output;
+}
+vec4 YUVtoRGBEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 planes[2];
+ planes[0] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0));
+ planes[1] = TextureEffect_Stage1_c0_c0_c1_c0(vec4(1.0));
+ vec4 color = vec4(planes[0].w, planes[1].x, planes[1].y, 1.0);
+ color.xyz = clamp(color.xyz * ucolorSpaceMatrix_Stage1_c0_c0 + ucolorSpaceTranslate_Stage1_c0_c0, 0.0, 1.0);
+ _output = color;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = YUVtoRGBEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/82-5.shader_test b/shaders/skia/82-5.shader_test
new file mode 100644
index 0000000..1d432e3
--- /dev/null
+++ b/shaders/skia/82-5.shader_test
@@ -0,0 +1,149 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage2_c1_c0;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.w) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ } else {
+ {
+ if (t < uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = OverrideInputFragmentProcessor_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c1_c0;
+ }
+ return _output;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 blend_darken(vec4 src, vec4 dst) {
+ vec4 result = blend_src_over(src, dst);
+ result.xyz = min(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
+ return result;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_src_over(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_darken(ConstColorProcessor_Stage2_c1_c0(vec4(1.0)), output_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 inColor;
+in vec2 inLocalCoord;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/82-7.shader_test b/shaders/skia/82-7.shader_test
new file mode 100644
index 0000000..e076615
--- /dev/null
+++ b/shaders/skia/82-7.shader_test
@@ -0,0 +1,115 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform vec2 uBounds_Stage1;
+uniform vec4 uKernel_Stage1[5];
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0 - 9.0 * uImageIncrement_Stage1;
+ vec2 coordSampled = vec2(0.0, 0.0);
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[4].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[4].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[4].z;
+ coord += uImageIncrement_Stage1;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ sk_FragColor = sk_FragColor.wwww;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/82-8.shader_test b/shaders/skia/82-8.shader_test
new file mode 100644
index 0000000..5f769d3
--- /dev/null
+++ b/shaders/skia/82-8.shader_test
@@ -0,0 +1,134 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+flat in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 varccoord_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ float x_plus_1 = varccoord_Stage0.x, y = varccoord_Stage0.y;
+ float coverage;
+ if (0.0 == x_plus_1) {
+ coverage = y;
+ } else {
+ float fn = x_plus_1 * (x_plus_1 - 2.0);
+ fn = ((y) * (y) + (fn));
+ float fnwidth = fwidth(fn);
+ float d = fn / fnwidth;
+ coverage = clamp(0.5 - d, 0.0, 1.0);
+ }
+ outputCoverage_Stage0 = vec4(coverage);
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_dst_in(outputColor_Stage0, ClampedGradientEffect_Stage1_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage1 * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec4 radii_selector;
+in vec4 corner_and_radius_outsets;
+in vec4 aa_bloat_and_coverage;
+in vec4 skew;
+in vec2 translate;
+in vec4 radii_x;
+in vec4 radii_y;
+in vec4 color;
+in vec4 local_rect;
+flat out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 varccoord_Stage0;
+void main() {
+ vcolor_Stage0 = color;
+ vec2 corner = corner_and_radius_outsets.xy;
+ vec2 radius_outset = corner_and_radius_outsets.zw;
+ vec2 aa_bloat_direction = aa_bloat_and_coverage.xy;
+ float coverage = aa_bloat_and_coverage.z;
+ float is_linear_coverage = aa_bloat_and_coverage.w;
+ vec2 pixellength = inversesqrt(vec2(dot(skew.xz, skew.xz), dot(skew.yw, skew.yw)));
+ vec4 normalized_axis_dirs = skew * pixellength.xyxy;
+ vec2 axiswidths = abs(normalized_axis_dirs.xy) + abs(normalized_axis_dirs.zw);
+ vec2 aa_bloatradius = (axiswidths * pixellength) * 0.5;
+ vec4 radii_and_neighbors = radii_selector * mat4(radii_x, radii_y, radii_x.yxwz, radii_y.wzyx);
+ vec2 radii = radii_and_neighbors.xy;
+ vec2 neighbor_radii = radii_and_neighbors.zw;
+ if (any(greaterThan(aa_bloatradius, vec2(1.0)))) {
+ corner = max(abs(corner), aa_bloatradius) * sign(corner);
+ coverage /= max(aa_bloatradius.x, 1.0) * max(aa_bloatradius.y, 1.0);
+ radii = vec2(0.0);
+ }
+ if (any(lessThan(radii, aa_bloatradius * 1.25))) {
+ radii = aa_bloatradius;
+ radius_outset = floor(abs(radius_outset)) * radius_outset;
+ is_linear_coverage = 1.0;
+ } else {
+ radii = clamp(radii, pixellength, 2.0 - pixellength);
+ neighbor_radii = clamp(neighbor_radii, pixellength, 2.0 - pixellength);
+ vec2 spacing = (2.0 - radii) - neighbor_radii;
+ vec2 extra_pad = max(pixellength * 0.0625 - spacing, vec2(0.0));
+ radii -= extra_pad * 0.5;
+ }
+ vec2 aa_outset = aa_bloat_direction * aa_bloatradius;
+ vec2 vertexpos = (corner + radius_outset * radii) + aa_outset;
+ vec2 localcoord = (local_rect.xy * (1.0 - vertexpos) + local_rect.zw * (1.0 + vertexpos)) * 0.5;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localcoord, 1.0)).xy;
+ mat2 skewmatrix = mat2(skew.xy, skew.zw);
+ vec2 devcoord = vertexpos * skewmatrix + translate;
+ if (0.0 != is_linear_coverage) {
+ varccoord_Stage0.xy = vec2(0.0, coverage);
+ } else {
+ vec2 arccoord = (1.0 - abs(radius_outset)) + (aa_outset / radii) * corner;
+ varccoord_Stage0.xy = vec2(arccoord.x + 1.0, arccoord.y);
+ }
+ gl_Position = vec4(devcoord.x, devcoord.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/82-9.shader_test b/shaders/skia/82-9.shader_test
new file mode 100644
index 0000000..5a2cd51
--- /dev/null
+++ b/shaders/skia/82-9.shader_test
@@ -0,0 +1,44 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uinnerRect_Stage1;
+uniform vec2 uradiusPlusHalf_Stage1;
+flat in vec4 vcolor_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec2 dxy = max(gl_FragCoord.xy - uinnerRect_Stage1.zw, 0.0);
+ float leftAlpha = clamp(gl_FragCoord.x - uinnerRect_Stage1.x, 0.0, 1.0);
+ float topAlpha = clamp(gl_FragCoord.y - uinnerRect_Stage1.y, 0.0, 1.0);
+ float alpha = (topAlpha * leftAlpha) * clamp(uradiusPlusHalf_Stage1.x - length(dxy), 0.0, 1.0);
+ alpha = 1.0 - alpha;
+ output_Stage1 = vec4(alpha);
+ }
+ {
+ sk_FragColor = outputColor_Stage0 * output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 position;
+in vec4 color;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/82.shader_test b/shaders/skia/82.shader_test
new file mode 100644
index 0000000..d7404f2
--- /dev/null
+++ b/shaders/skia/82.shader_test
@@ -0,0 +1,85 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 usubset_Stage1_c0_c0_c0_c0;
+uniform vec4 uclamp_Stage1_c0_c0_c0_c0;
+uniform sampler2DRect uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0_c0_c0(vec4 _input, vec2 _coords) {
+ vec4 _output;
+ vec2 inCoord = _coords;
+ vec2 subsetCoord;
+ subsetCoord.x = inCoord.x;
+ subsetCoord.y = mod(inCoord.y - usubset_Stage1_c0_c0_c0_c0.y, usubset_Stage1_c0_c0_c0_c0.w - usubset_Stage1_c0_c0_c0_c0.y) + usubset_Stage1_c0_c0_c0_c0.y;
+ vec2 clampedCoord;
+ clampedCoord.x = subsetCoord.x;
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage1_c0_c0_c0_c0.y, uclamp_Stage1_c0_c0_c0_c0.w);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ _output = _input * textureColor;
+ return _output;
+}
+vec4 Bicubic_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coord = vTransformedCoords_0_Stage0 - vec2(0.5);
+ vec2 f = fract(coord);
+ coord += 0.5 - f;
+ vec4 wx = mat4(0.055555555555555552, 0.88888888888888884, 0.055555555555555552, 0.0, -0.5, 0.0, 0.5, 0.0, 0.83333333333333337, -2.0, 1.5, -0.33333333333333331, -0.3888888888888889, 1.1666666666666667, -1.1666666666666667, 0.3888888888888889) * vec4(1.0, f.x, f.x * f.x, (f.x * f.x) * f.x);
+ vec4 wy = mat4(0.055555555555555552, 0.88888888888888884, 0.055555555555555552, 0.0, -0.5, 0.0, 0.5, 0.0, 0.83333333333333337, -2.0, 1.5, -0.33333333333333331, -0.3888888888888889, 1.1666666666666667, -1.1666666666666667, 0.3888888888888889) * vec4(1.0, f.y, f.y * f.y, (f.y * f.y) * f.y);
+ vec4 rowColors[4];
+ rowColors[0] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(-1.0, -1.0));
+ rowColors[1] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(0.0, -1.0));
+ rowColors[2] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(1.0, -1.0));
+ rowColors[3] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(2.0, -1.0));
+ vec4 s0 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ rowColors[0] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(-1.0, 0.0));
+ rowColors[1] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord);
+ rowColors[2] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(1.0, 0.0));
+ rowColors[3] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(2.0, 0.0));
+ vec4 s1 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ rowColors[0] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(-1.0, 1.0));
+ rowColors[1] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(0.0, 1.0));
+ rowColors[2] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(1.0, 1.0));
+ rowColors[3] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(2.0, 1.0));
+ vec4 s2 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ rowColors[0] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(-1.0, 2.0));
+ rowColors[1] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(0.0, 2.0));
+ rowColors[2] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(1.0, 2.0));
+ rowColors[3] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(2.0, 2.0));
+ vec4 s3 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ vec4 bicubicColor = ((wy.x * s0 + wy.y * s1) + wy.z * s2) + wy.w * s3;
+ bicubicColor = clamp(bicubicColor, 0.0, 1.0);
+ _output = bicubicColor * _input;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = Bicubic_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/820.shader_test b/shaders/skia/820.shader_test
new file mode 100644
index 0000000..908475c
--- /dev/null
+++ b/shaders/skia/820.shader_test
@@ -0,0 +1,474 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 ucircle_Stage1;
+uniform vec4 ucircle_Stage2;
+uniform float uPixelSize_Stage3;
+uniform vec2 uRange_Stage3;
+uniform vec2 uImageIncrement_Stage4_c0_c0;
+uniform vec4 uKernel_Stage4_c0_c0[5];
+uniform vec2 uKernelOffset_Stage4_c0_c0;
+uniform float uGain_Stage4_c0_c0;
+uniform float uBias_Stage4_c0_c0;
+uniform vec4 uTexDom_Stage4_c0_c0;
+uniform vec3 uDecalParams_Stage4_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage3;
+uniform sampler2D uTextureSampler_0_Stage4;
+noperspective in vec2 vEllipseOffsets_Stage0;
+noperspective in vec4 vEllipseRadii_Stage0;
+noperspective in vec4 vinColor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 MatrixConvolution_Stage4_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 sum = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_1_Stage0 - uKernelOffset_Stage4_c0_c0 * uImageIncrement_Stage4_c0_c0;
+ vec4 c;
+ {
+ float k = uKernel_Stage4_c0_c0[0].x;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage4_c0_c0.xy, uTexDom_Stage4_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage4, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage4_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage4_c0_c0.y);
+ if (err > uDecalParams_Stage4_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage4_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage4_c0_c0[0].y;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage4_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage4_c0_c0.xy, uTexDom_Stage4_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage4, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage4_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage4_c0_c0.y);
+ if (err > uDecalParams_Stage4_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage4_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage4_c0_c0[0].z;
+ {
+ vec2 origCoord = coord + vec2(2.0, 0.0) * uImageIncrement_Stage4_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage4_c0_c0.xy, uTexDom_Stage4_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage4, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage4_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage4_c0_c0.y);
+ if (err > uDecalParams_Stage4_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage4_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage4_c0_c0[0].w;
+ {
+ vec2 origCoord = coord + vec2(3.0, 0.0) * uImageIncrement_Stage4_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage4_c0_c0.xy, uTexDom_Stage4_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage4, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage4_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage4_c0_c0.y);
+ if (err > uDecalParams_Stage4_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage4_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage4_c0_c0[1].x;
+ {
+ vec2 origCoord = coord + vec2(4.0, 0.0) * uImageIncrement_Stage4_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage4_c0_c0.xy, uTexDom_Stage4_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage4, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage4_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage4_c0_c0.y);
+ if (err > uDecalParams_Stage4_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage4_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage4_c0_c0[1].y;
+ {
+ vec2 origCoord = coord + vec2(5.0, 0.0) * uImageIncrement_Stage4_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage4_c0_c0.xy, uTexDom_Stage4_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage4, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage4_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage4_c0_c0.y);
+ if (err > uDecalParams_Stage4_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage4_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage4_c0_c0[1].z;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage4_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage4_c0_c0.xy, uTexDom_Stage4_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage4, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage4_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage4_c0_c0.y);
+ if (err > uDecalParams_Stage4_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage4_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage4_c0_c0[1].w;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage4_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage4_c0_c0.xy, uTexDom_Stage4_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage4, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage4_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage4_c0_c0.y);
+ if (err > uDecalParams_Stage4_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage4_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage4_c0_c0[2].x;
+ {
+ vec2 origCoord = coord + vec2(2.0, 1.0) * uImageIncrement_Stage4_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage4_c0_c0.xy, uTexDom_Stage4_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage4, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage4_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage4_c0_c0.y);
+ if (err > uDecalParams_Stage4_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage4_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage4_c0_c0[2].y;
+ {
+ vec2 origCoord = coord + vec2(3.0, 1.0) * uImageIncrement_Stage4_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage4_c0_c0.xy, uTexDom_Stage4_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage4, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage4_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage4_c0_c0.y);
+ if (err > uDecalParams_Stage4_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage4_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage4_c0_c0[2].z;
+ {
+ vec2 origCoord = coord + vec2(4.0, 1.0) * uImageIncrement_Stage4_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage4_c0_c0.xy, uTexDom_Stage4_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage4, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage4_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage4_c0_c0.y);
+ if (err > uDecalParams_Stage4_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage4_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage4_c0_c0[2].w;
+ {
+ vec2 origCoord = coord + vec2(5.0, 1.0) * uImageIncrement_Stage4_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage4_c0_c0.xy, uTexDom_Stage4_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage4, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage4_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage4_c0_c0.y);
+ if (err > uDecalParams_Stage4_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage4_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage4_c0_c0[3].x;
+ {
+ vec2 origCoord = coord + vec2(0.0, 2.0) * uImageIncrement_Stage4_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage4_c0_c0.xy, uTexDom_Stage4_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage4, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage4_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage4_c0_c0.y);
+ if (err > uDecalParams_Stage4_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage4_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage4_c0_c0[3].y;
+ {
+ vec2 origCoord = coord + vec2(1.0, 2.0) * uImageIncrement_Stage4_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage4_c0_c0.xy, uTexDom_Stage4_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage4, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage4_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage4_c0_c0.y);
+ if (err > uDecalParams_Stage4_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage4_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage4_c0_c0[3].z;
+ {
+ vec2 origCoord = coord + vec2(2.0, 2.0) * uImageIncrement_Stage4_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage4_c0_c0.xy, uTexDom_Stage4_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage4, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage4_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage4_c0_c0.y);
+ if (err > uDecalParams_Stage4_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage4_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage4_c0_c0[3].w;
+ {
+ vec2 origCoord = coord + vec2(3.0, 2.0) * uImageIncrement_Stage4_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage4_c0_c0.xy, uTexDom_Stage4_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage4, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage4_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage4_c0_c0.y);
+ if (err > uDecalParams_Stage4_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage4_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage4_c0_c0[4].x;
+ {
+ vec2 origCoord = coord + vec2(4.0, 2.0) * uImageIncrement_Stage4_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage4_c0_c0.xy, uTexDom_Stage4_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage4, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage4_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage4_c0_c0.y);
+ if (err > uDecalParams_Stage4_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage4_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage4_c0_c0[4].y;
+ {
+ vec2 origCoord = coord + vec2(5.0, 2.0) * uImageIncrement_Stage4_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage4_c0_c0.xy, uTexDom_Stage4_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage4, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage4_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage4_c0_c0.y);
+ if (err > uDecalParams_Stage4_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage4_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ vec2 origCoord = vTransformedCoords_1_Stage0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage4_c0_c0.xy, uTexDom_Stage4_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage4, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage4_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage4_c0_c0.y);
+ if (err > uDecalParams_Stage4_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage4_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ _output.w = c.w;
+ _output.xyz = clamp(sum.xyz * uGain_Stage4_c0_c0 + uBias_Stage4_c0_c0, 0.0, 1.0);
+ _output.xyz *= _output.w;
+ _output *= _input;
+ return _output;
+}
+vec4 blend_exclusion(vec4 src, vec4 dst) {
+ return vec4((dst.xyz + src.xyz) - (2.0 * dst.xyz) * src.xyz, src.w + (1.0 - src.w) * dst.w);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vinColor_Stage0;
+ vec2 offset = vEllipseOffsets_Stage0;
+ float test = dot(offset, offset) - 1.0;
+ vec2 grad = (2.0 * offset) * vEllipseRadii_Stage0.xy;
+ float grad_dot = dot(grad, grad);
+ grad_dot = max(grad_dot, 1.1754999560161448e-38);
+ float invlen = inversesqrt(grad_dot);
+ float edgeAlpha = clamp(0.5 - test * invlen, 0.0, 1.0);
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ vec4 output_Stage1;
+ {
+ float d;
+ {
+ d = (length((ucircle_Stage1.xy - gl_FragCoord.xy) * ucircle_Stage1.w) - 1.0) * ucircle_Stage1.z;
+ }
+ {
+ output_Stage1 = d > 0.5 ? outputColor_Stage0 : vec4(0.0);
+ }
+ }
+ vec4 output_Stage2;
+ {
+ float d;
+ {
+ d = (length((ucircle_Stage2.xy - gl_FragCoord.xy) * ucircle_Stage2.w) - 1.0) * ucircle_Stage2.z;
+ }
+ {
+ output_Stage2 = output_Stage1 * clamp(d, 0.0, 1.0);
+ }
+ }
+ vec4 output_Stage3;
+ {
+ output_Stage3 = vec4(1.0, 1.0, 1.0, 1.0);
+ vec2 coord = vTransformedCoords_0_Stage0;
+ coord.y -= 3.0 * uPixelSize_Stage3;
+ for (int i = 0;i < 7; i++) {
+ output_Stage3 = min(output_Stage3, texture(uTextureSampler_0_Stage3, coord));
+ coord.y += uPixelSize_Stage3;
+ }
+ output_Stage3 *= outputCoverage_Stage0;
+ }
+ vec4 output_Stage4;
+ {
+ output_Stage4 = blend_exclusion(output_Stage3, MatrixConvolution_Stage4_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage2 * output_Stage4;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec2 inEllipseOffset;
+in vec4 inEllipseRadii;
+noperspective out vec2 vEllipseOffsets_Stage0;
+noperspective out vec4 vEllipseRadii_Stage0;
+noperspective out vec4 vinColor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vEllipseOffsets_Stage0 = inEllipseOffset;
+ vEllipseRadii_Stage0 = inEllipseRadii;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/823-1.shader_test b/shaders/skia/823-1.shader_test
new file mode 100644
index 0000000..ec2f07c
--- /dev/null
+++ b/shaders/skia/823-1.shader_test
@@ -0,0 +1,100 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uscale0_1_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage2_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage2_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage2_c0_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 RadialGradientLayout_Stage2_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = length(vTransformedCoords_1_Stage0);
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage2_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage2_c0_c0_c1_c0;
+ bias = ubias0_1_Stage2_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage2_c0_c0_c1_c0;
+ bias = ubias2_3_Stage2_c0_c0_c1_c0;
+ }
+ } else {
+ {
+ scale = uscale4_5_Stage2_c0_c0_c1_c0;
+ bias = ubias4_5_Stage2_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = RadialGradientLayout_Stage2_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage2_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_dst_in(output_Stage1, TiledGradientEffect_Stage2_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/823.shader_test b/shaders/skia/823.shader_test
new file mode 100644
index 0000000..a924be7
--- /dev/null
+++ b/shaders/skia/823.shader_test
@@ -0,0 +1,39 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+noperspective in vec4 vcolor_Stage0;
+noperspective in float vinCoverage_Stage0;
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ float alpha = 1.0;
+ alpha = vinCoverage_Stage0;
+ outputCoverage_Stage0 = vec4(alpha);
+ }
+ {
+ sk_FragColor = 1.0 - outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 inPosition;
+in vec4 inColor;
+in float inCoverage;
+noperspective out vec4 vcolor_Stage0;
+noperspective out float vinCoverage_Stage0;
+void main() {
+ vec4 color = inColor;
+ vcolor_Stage0 = color;
+ vec2 pos2 = inPosition;
+ vinCoverage_Stage0 = inCoverage;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/826-1.shader_test b/shaders/skia/826-1.shader_test
new file mode 100644
index 0000000..599a5bb
--- /dev/null
+++ b/shaders/skia/826-1.shader_test
@@ -0,0 +1,75 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 ustart_Stage2_c0_c0_c1_c0;
+uniform vec4 uend_Stage2_c0_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 RadialGradientLayout_Stage2_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = length(vTransformedCoords_1_Stage0);
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage2_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage2_c0_c0_c1_c0 + t * uend_Stage2_c0_c0_c1_c0;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = RadialGradientLayout_Stage2_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ t.x = fract(t.x);
+ }
+ _output = SingleIntervalGradientColorizer_Stage2_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_dst_in(output_Stage1, TiledGradientEffect_Stage2_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/826.shader_test b/shaders/skia/826.shader_test
new file mode 100644
index 0000000..7e77f36
--- /dev/null
+++ b/shaders/skia/826.shader_test
@@ -0,0 +1,23 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+uniform vec4 uColor_Stage0;
+uniform float uCoverage_Stage0;
+void main() {
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 inPosition;
+void main() {
+ vec2 pos2 = (uViewM_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/829.shader_test b/shaders/skia/829.shader_test
new file mode 100644
index 0000000..742890d
--- /dev/null
+++ b/shaders/skia/829.shader_test
@@ -0,0 +1,235 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 ucolor_Stage1_c0_c0_c1_c0_c0_c0;
+uniform vec2 uScale_Stage1_c0_c0_c1_c0_c1_c0;
+uniform vec4 uTexDom_Stage1_c0_c0_c1_c0_c1_c0;
+uniform vec3 uDecalParams_Stage1_c0_c0_c1_c0_c1_c0;
+uniform float uinnerThreshold_Stage1_c1_c0_c0_c0;
+uniform float uouterThreshold_Stage1_c1_c0_c0_c0;
+uniform float uPixelSize_Stage1_c1_c0_c1_c0_c0_c0;
+uniform vec2 uRange_Stage1_c1_c0_c1_c0_c0_c0;
+uniform vec4 ucolor_Stage1_c1_c0_c1_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+uniform sampler2D uTextureSampler_2_Stage1;
+uniform sampler2D uTextureSampler_3_Stage1;
+uniform sampler2D uTextureSampler_4_Stage1;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+noperspective in vec2 vTransformedCoords_3_Stage0;
+noperspective in vec2 vTransformedCoords_4_Stage0;
+vec4 TextureEffect_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+vec4 ConstColorProcessor_Stage1_c0_c0_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = _input.w * ucolor_Stage1_c0_c0_c1_c0_c0_c0;
+ }
+ return _output;
+}
+vec4 DisplacementMap_Stage1_c0_c0_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 dColor = texture(uTextureSampler_1_Stage1, vTransformedCoords_1_Stage0);
+ dColor.xyz = dColor.w < 9.9999999747524271e-07 ? vec3(0.0) : clamp(dColor.xyz / dColor.w, 0.0, 1.0);
+ vec2 cCoords = vTransformedCoords_2_Stage0 + uScale_Stage1_c0_c0_c1_c0_c1_c0 * (dColor.zw - vec2(0.5));
+ {
+ vec2 origCoord = cCoords;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c1_c0_c1_c0.xy, uTexDom_Stage1_c0_c0_c1_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c1_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c1_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c1_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c1_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ _output = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ return _output;
+}
+vec4 blend_dst_over(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src + dst;
+}
+vec4 ComposeTwo_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_dst_over(ConstColorProcessor_Stage1_c0_c0_c1_c0_c0_c0(inputColor), DisplacementMap_Stage1_c0_c0_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 blend_src_out(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src;
+}
+vec4 ComposeTwo_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_src_out(TextureEffect_Stage1_c0_c0_c0_c0(inputColor), ComposeTwo_Stage1_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 AlphaThresholdFragmentProcessor_Stage1_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 color = _input;
+ vec4 mask_color = texture(uTextureSampler_3_Stage1, vTransformedCoords_3_Stage0);
+ if (mask_color.w < 0.5) {
+ if (color.w > uouterThreshold_Stage1_c1_c0_c0_c0) {
+ float scale = uouterThreshold_Stage1_c1_c0_c0_c0 / color.w;
+ color.xyz *= scale;
+ color.w = uouterThreshold_Stage1_c1_c0_c0_c0;
+ }
+ } else if (color.w < uinnerThreshold_Stage1_c1_c0_c0_c0) {
+ float scale = uinnerThreshold_Stage1_c1_c0_c0_c0 / max(0.0010000000474974513, color.w);
+ color.xyz *= scale;
+ color.w = uinnerThreshold_Stage1_c1_c0_c0_c0;
+ }
+ _output = color;
+ return _output;
+}
+vec4 Morphology_Stage1_c1_c0_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = vec4(1.0, 1.0, 1.0, 1.0);
+ vec2 coord = vTransformedCoords_4_Stage0;
+ coord.y -= 8.0 * uPixelSize_Stage1_c1_c0_c1_c0_c0_c0;
+ for (int i = 0;i < 17; i++) {
+ _output = min(_output, texture(uTextureSampler_4_Stage1, coord));
+ coord.y += uPixelSize_Stage1_c1_c0_c1_c0_c0_c0;
+ }
+ _output *= _input;
+ return _output;
+}
+vec4 ConstColorProcessor_Stage1_c1_c0_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage1_c1_c0_c1_c0_c1_c0;
+ }
+ return _output;
+}
+vec4 ComposeTwo_Stage1_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_src_out(Morphology_Stage1_c1_c0_c1_c0_c0_c0(inputColor), ConstColorProcessor_Stage1_c1_c0_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 blend_lighten(vec4 src, vec4 dst) {
+ vec4 result = blend_src_over(src, dst);
+ result.xyz = max(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
+ return result;
+}
+vec4 ComposeTwo_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_lighten(AlphaThresholdFragmentProcessor_Stage1_c1_c0_c0_c0(inputColor), ComposeTwo_Stage1_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+float _blend_color_saturation(vec3 color) {
+ return max(max(color.x, color.y), color.z) - min(min(color.x, color.y), color.z);
+}
+vec3 _blend_set_color_saturation_helper(vec3 minMidMax, float sat) {
+ if (minMidMax.x < minMidMax.z) {
+ return vec3(0.0, (sat * (minMidMax.y - minMidMax.x)) / (minMidMax.z - minMidMax.x), sat);
+ }
+ return vec3(0.0);
+}
+vec3 _blend_set_color_saturation(vec3 hueLumColor, vec3 satColor) {
+ float sat = _blend_color_saturation(satColor);
+ if (hueLumColor.x <= hueLumColor.y) {
+ if (hueLumColor.y <= hueLumColor.z) {
+ hueLumColor.xyz = _blend_set_color_saturation_helper(hueLumColor, sat);
+ } else if (hueLumColor.x <= hueLumColor.z) {
+ hueLumColor.xzy = _blend_set_color_saturation_helper(hueLumColor.xzy, sat);
+ } else {
+ hueLumColor.zxy = _blend_set_color_saturation_helper(hueLumColor.zxy, sat);
+ }
+ } else if (hueLumColor.x <= hueLumColor.z) {
+ hueLumColor.yxz = _blend_set_color_saturation_helper(hueLumColor.yxz, sat);
+ } else if (hueLumColor.y <= hueLumColor.z) {
+ hueLumColor.yzx = _blend_set_color_saturation_helper(hueLumColor.yzx, sat);
+ } else {
+ hueLumColor.zyx = _blend_set_color_saturation_helper(hueLumColor.zyx, sat);
+ }
+ return hueLumColor;
+}
+float _blend_color_luminance(vec3 color) {
+ return dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), color);
+}
+vec3 _blend_set_color_luminance(vec3 hueSatColor, float alpha, vec3 lumColor) {
+ float lum = _blend_color_luminance(lumColor);
+ vec3 result = (lum - _blend_color_luminance(hueSatColor)) + hueSatColor;
+ float minComp = min(min(result.x, result.y), result.z);
+ float maxComp = max(max(result.x, result.y), result.z);
+ if (minComp < 0.0 && lum != minComp) {
+ result = lum + ((result - lum) * lum) / (lum - minComp);
+ }
+ if (maxComp > alpha && maxComp != lum) {
+ return lum + ((result - lum) * (alpha - lum)) / (maxComp - lum);
+ }
+ return result;
+}
+vec4 blend_saturation(vec4 src, vec4 dst) {
+ float alpha = dst.w * src.w;
+ vec3 sda = src.xyz * dst.w;
+ vec3 dsa = dst.xyz * src.w;
+ return vec4((((_blend_set_color_luminance(_blend_set_color_saturation(dsa, sda), alpha, dsa) + dst.xyz) - dsa) + src.xyz) - sda, (src.w + dst.w) - alpha);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_saturation(ComposeTwo_Stage1_c0_c0(inputColor), ComposeTwo_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+uniform mat3 uCoordTransformMatrix_3_Stage0;
+uniform mat3 uCoordTransformMatrix_4_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+noperspective out vec2 vTransformedCoords_3_Stage0;
+noperspective out vec2 vTransformedCoords_4_Stage0;
+void main() {
+ vec4 color = inColor;
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_3_Stage0 = (uCoordTransformMatrix_3_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_4_Stage0 = (uCoordTransformMatrix_4_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/832.shader_test b/shaders/skia/832.shader_test
new file mode 100644
index 0000000..4ea9642
--- /dev/null
+++ b/shaders/skia/832.shader_test
@@ -0,0 +1,32 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+noperspective in vec4 vinCircleEdge_Stage0;
+noperspective in vec4 vinColor_Stage0;
+void main() {
+ {
+ sk_FragColor = vec4(0.0);
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 inPosition;
+in vec4 inColor;
+in vec4 inCircleEdge;
+noperspective out vec4 vinCircleEdge_Stage0;
+noperspective out vec4 vinColor_Stage0;
+void main() {
+ vinCircleEdge_Stage0 = inCircleEdge;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = inPosition;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/835.shader_test b/shaders/skia/835.shader_test
new file mode 100644
index 0000000..76ec11b
--- /dev/null
+++ b/shaders/skia/835.shader_test
@@ -0,0 +1,227 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform vec4 uKernel_Stage1[2];
+uniform vec2 uKernelOffset_Stage1;
+uniform float uGain_Stage1;
+uniform float uBias_Stage1;
+uniform vec4 uTexDom_Stage1;
+uniform vec3 uDecalParams_Stage1;
+uniform vec4 uellipse_Stage2;
+uniform mat4 um_Stage3;
+uniform vec4 uv_Stage3;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec4 vinCircleEdge_Stage0;
+noperspective in vec4 vinColor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ vec4 circleEdge;
+ circleEdge = vinCircleEdge_Stage0;
+ outputColor_Stage0 = vinColor_Stage0;
+ float d = length(circleEdge.xy);
+ float distanceToOuterEdge = circleEdge.z * (1.0 - d);
+ float edgeAlpha = clamp(distanceToOuterEdge, 0.0, 1.0);
+ float distanceToInnerEdge = circleEdge.z * (d - circleEdge.w);
+ float innerAlpha = clamp(distanceToInnerEdge, 0.0, 1.0);
+ edgeAlpha *= innerAlpha;
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ vec4 output_Stage1;
+ {
+ vec4 sum = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0 - uKernelOffset_Stage1 * uImageIncrement_Stage1;
+ vec4 c;
+ {
+ float k = uKernel_Stage1[0].x;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[0].y;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[0].z;
+ {
+ vec2 origCoord = coord + vec2(2.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[0].w;
+ {
+ vec2 origCoord = coord + vec2(3.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[1].x;
+ {
+ vec2 origCoord = coord + vec2(4.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[1].y;
+ {
+ vec2 origCoord = coord + vec2(5.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[1].z;
+ {
+ vec2 origCoord = coord + vec2(6.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ output_Stage1 = sum * uGain_Stage1 + uBias_Stage1;
+ output_Stage1.w = clamp(output_Stage1.w, 0.0, 1.0);
+ output_Stage1.xyz = clamp(output_Stage1.xyz, 0.0, output_Stage1.w);
+ output_Stage1 *= outputColor_Stage0;
+ }
+ vec4 output_Stage2;
+ {
+ vec2 d = gl_FragCoord.xy - uellipse_Stage2.xy;
+ vec2 Z = d * uellipse_Stage2.zw;
+ float implicit = dot(Z, d) - 1.0;
+ float grad_dot = 4.0 * dot(Z, Z);
+ {
+ grad_dot = max(grad_dot, 1.1754999560161448e-38);
+ }
+ float approx_dist = implicit * inversesqrt(grad_dot);
+ float alpha;
+ {
+ alpha = approx_dist > 0.0 ? 0.0 : 1.0;
+ }
+ output_Stage2 = output_Stage1 * alpha;
+ }
+ vec4 output_Stage3;
+ {
+ vec4 inputColor = output_Stage2;
+ {
+ float nonZeroAlpha = max(inputColor.w, 9.9999997473787516e-05);
+ inputColor = vec4(inputColor.xyz / nonZeroAlpha, inputColor.w);
+ }
+ output_Stage3 = um_Stage3 * inputColor + uv_Stage3;
+ {
+ output_Stage3 = clamp(output_Stage3, 0.0, 1.0);
+ }
+ {
+ output_Stage3.xyz *= output_Stage3.w;
+ }
+ }
+ vec4 output_Stage4;
+ {
+ output_Stage4 = outputCoverage_Stage0;
+ }
+ {
+ sk_FragColor = output_Stage3 * output_Stage4;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec4 inCircleEdge;
+noperspective out vec4 vinCircleEdge_Stage0;
+noperspective out vec4 vinColor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vinCircleEdge_Stage0 = inCircleEdge;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/838.shader_test b/shaders/skia/838.shader_test
new file mode 100644
index 0000000..35604ca
--- /dev/null
+++ b/shaders/skia/838.shader_test
@@ -0,0 +1,42 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+flat in vec4 vcolor_Stage0;
+noperspective in float vcoverage_Stage0;
+flat in vec4 vgeomDomain_Stage0;
+void main() {
+ {
+ float coverage = vcoverage_Stage0;
+ vec4 geoDomain;
+ geoDomain = vgeomDomain_Stage0;
+ if (coverage < 0.5) {
+ vec4 dists4 = clamp(vec4(1.0, 1.0, -1.0, -1.0) * (gl_FragCoord.xyxy - geoDomain), 0.0, 1.0);
+ vec2 dists2 = dists4.xy * dists4.zw;
+ coverage = min(coverage, dists2.x * dists2.y);
+ }
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 position;
+in float coverage;
+in vec4 color;
+in vec4 geomDomain;
+flat out vec4 vcolor_Stage0;
+noperspective out float vcoverage_Stage0;
+flat out vec4 vgeomDomain_Stage0;
+void main() {
+ vec2 position = position;
+ vcolor_Stage0 = color;
+ vcoverage_Stage0 = coverage;
+ vgeomDomain_Stage0 = geomDomain;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/841.shader_test b/shaders/skia/841.shader_test
new file mode 100644
index 0000000..7618d26
--- /dev/null
+++ b/shaders/skia/841.shader_test
@@ -0,0 +1,49 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 ucolor0_Stage1;
+uniform vec4 ucolor1_Stage1;
+uniform vec4 ucolor2_Stage1;
+uniform vec4 ucolor3_Stage1;
+uniform vec4 ucolor4_Stage1;
+uniform vec4 ucolor5_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = vec4(1.0);
+ {
+ output_Stage1 = ucolor5_Stage1;
+ }
+ }
+ {
+ sk_FragColor = outputColor_Stage0 * output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/847-1.shader_test b/shaders/skia/847-1.shader_test
new file mode 100644
index 0000000..a36cb29
--- /dev/null
+++ b/shaders/skia/847-1.shader_test
@@ -0,0 +1,84 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage2_c0_c0;
+uniform vec4 urightBorderColor_Stage2_c0_c0;
+uniform float ubias_Stage2_c0_c0_c0_c0;
+uniform float uscale_Stage2_c0_c0_c0_c0;
+uniform vec4 ustart_Stage2_c0_c0_c1_c0;
+uniform vec4 uend_Stage2_c0_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 SweepGradientLayout_Stage2_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float angle;
+ {
+ angle = atan(-vTransformedCoords_1_Stage0.y, -vTransformedCoords_1_Stage0.x);
+ }
+ float t = ((angle * 0.15915493667125702 + 0.5) + ubias_Stage2_c0_c0_c0_c0) * uscale_Stage2_c0_c0_c0_c0;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage2_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage2_c0_c0_c1_c0 + t * uend_Stage2_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = SweepGradientLayout_Stage2_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage2_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage2_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage2_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_dst_in(output_Stage1, ClampedGradientEffect_Stage2_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/847.shader_test b/shaders/skia/847.shader_test
new file mode 100644
index 0000000..99087b8
--- /dev/null
+++ b/shaders/skia/847.shader_test
@@ -0,0 +1,217 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_KHR_blend_equation_advanced : require
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+layout (blend_support_all_equations) out ;
+uniform vec4 uinnerRect_Stage1_c0_c0;
+uniform vec4 uinvRadiiLTRB_Stage1_c0_c0;
+uniform vec4 uinnerRect_Stage1_c1_c0;
+uniform vec2 uradiusPlusHalf_Stage1_c1_c0;
+uniform vec4 ucircle_Stage2;
+uniform vec4 uscale0_1_Stage3_c2_c0_c1_c0;
+uniform vec4 uscale2_3_Stage3_c2_c0_c1_c0;
+uniform vec4 uscale4_5_Stage3_c2_c0_c1_c0;
+uniform vec4 uscale6_7_Stage3_c2_c0_c1_c0;
+uniform vec4 uscale8_9_Stage3_c2_c0_c1_c0;
+uniform vec4 ubias0_1_Stage3_c2_c0_c1_c0;
+uniform vec4 ubias2_3_Stage3_c2_c0_c1_c0;
+uniform vec4 ubias4_5_Stage3_c2_c0_c1_c0;
+uniform vec4 ubias6_7_Stage3_c2_c0_c1_c0;
+uniform vec4 ubias8_9_Stage3_c2_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage3_c2_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage3_c2_c0_c1_c0;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 EllipticalRRect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 dxy0 = uinnerRect_Stage1_c0_c0.xy - gl_FragCoord.xy;
+ vec2 dxy1 = gl_FragCoord.xy - uinnerRect_Stage1_c0_c0.zw;
+ vec2 dxy = max(max(dxy0, dxy1), 0.0);
+ vec2 Z = max(max(dxy0 * uinvRadiiLTRB_Stage1_c0_c0.xy, dxy1 * uinvRadiiLTRB_Stage1_c0_c0.zw), 0.0);
+ float implicit = dot(Z, dxy) - 1.0;
+ float grad_dot = 4.0 * dot(Z, Z);
+ grad_dot = max(grad_dot, 9.9999997473787516e-05);
+ float approx_dist = implicit * inversesqrt(grad_dot);
+ float alpha = clamp(0.5 - approx_dist, 0.0, 1.0);
+ _output = _input * alpha;
+ return _output;
+}
+vec4 CircularRRect_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 dxy0 = uinnerRect_Stage1_c1_c0.xy - gl_FragCoord.xy;
+ vec2 dxy1 = gl_FragCoord.xy - uinnerRect_Stage1_c1_c0.zw;
+ vec2 dxy = max(max(dxy0, dxy1), 0.0);
+ float alpha = clamp(uradiusPlusHalf_Stage1_c1_c0.x - length(dxy), 0.0, 1.0);
+ alpha = 1.0 - alpha;
+ _output = _input * alpha;
+ return _output;
+}
+vec4 LinearGradientLayout_Stage3_c2_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage3_c2_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthresholds1_7_Stage3_c2_c0_c1_c0.w) {
+ if (t < uthresholds1_7_Stage3_c2_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage3_c2_c0_c1_c0.x) {
+ scale = uscale0_1_Stage3_c2_c0_c1_c0;
+ bias = ubias0_1_Stage3_c2_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage3_c2_c0_c1_c0;
+ bias = ubias2_3_Stage3_c2_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage3_c2_c0_c1_c0.z) {
+ scale = uscale4_5_Stage3_c2_c0_c1_c0;
+ bias = ubias4_5_Stage3_c2_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage3_c2_c0_c1_c0;
+ bias = ubias6_7_Stage3_c2_c0_c1_c0;
+ }
+ }
+ } else {
+ {
+ {
+ scale = uscale8_9_Stage3_c2_c0_c1_c0;
+ bias = ubias8_9_Stage3_c2_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage3_c2_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage3_c2_c0_c0_c0(vec4(1.0));
+ {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage3_c2_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_dst_over(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src + dst;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_dst_over(EllipticalRRect_Stage1_c0_c0(inputColor), CircularRRect_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ vec4 output_Stage2;
+ {
+ float d;
+ {
+ d = (1.0 - length((ucircle_Stage2.xy - gl_FragCoord.xy) * ucircle_Stage2.w)) * ucircle_Stage2.z;
+ }
+ {
+ output_Stage2 = output_Stage1 * clamp(d, 0.0, 1.0);
+ }
+ }
+ vec4 output_Stage3;
+ {
+ output_Stage3 = blend_dst_in(output_Stage2, TiledGradientEffect_Stage3_c2_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage3;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform float uSrcTF_Stage0[7];
+uniform mat3 uColorXform_Stage0;
+uniform float uDstTF_Stage0[7];
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 inColor;
+in vec2 inLocalCoord;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+float src_tf_Stage0(float x) {
+ float G = uSrcTF_Stage0[0];
+ float A = uSrcTF_Stage0[1];
+ float B = uSrcTF_Stage0[2];
+ float C = uSrcTF_Stage0[3];
+ float D = uSrcTF_Stage0[4];
+ float E = uSrcTF_Stage0[5];
+ float F = uSrcTF_Stage0[6];
+ float s = sign(x);
+ x = abs(x);
+ x = x < D ? C * x + F : pow(A * x + B, G) + E;
+ return s * x;
+}
+float dst_tf_Stage0(float x) {
+ float G = uDstTF_Stage0[0];
+ float A = uDstTF_Stage0[1];
+ float B = uDstTF_Stage0[2];
+ float C = uDstTF_Stage0[3];
+ float D = uDstTF_Stage0[4];
+ float E = uDstTF_Stage0[5];
+ float F = uDstTF_Stage0[6];
+ float s = sign(x);
+ x = abs(x);
+ x = x < D ? C * x + F : pow(A * x + B, G) + E;
+ return s * x;
+}
+vec4 gamut_xform_Stage0(vec4 color) {
+ color.xyz = uColorXform_Stage0 * color.xyz;
+ return color;
+}
+vec4 color_xform_Stage0(vec4 color) {
+ float nonZeroAlpha = max(color.w, 9.9999997473787516e-05);
+ color = vec4(color.xyz / nonZeroAlpha, nonZeroAlpha);
+ color.x = src_tf_Stage0(color.x);
+ color.y = src_tf_Stage0(color.y);
+ color.z = src_tf_Stage0(color.z);
+ color = gamut_xform_Stage0(color);
+ color.x = dst_tf_Stage0(color.x);
+ color.y = dst_tf_Stage0(color.y);
+ color.z = dst_tf_Stage0(color.z);
+ color.xyz *= color.w;
+ return color;
+}
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = color_xform_Stage0(color);
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/85-1.shader_test b/shaders/skia/85-1.shader_test
new file mode 100644
index 0000000..6ad9ce0
--- /dev/null
+++ b/shaders/skia/85-1.shader_test
@@ -0,0 +1,69 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 TextureEffect_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage2, vTransformedCoords_1_Stage0) * _input;
+ return _output;
+}
+float _blend_color_luminance(vec3 color) {
+ return dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), color);
+}
+vec3 _blend_set_color_luminance(vec3 hueSatColor, float alpha, vec3 lumColor) {
+ float lum = _blend_color_luminance(lumColor);
+ vec3 result = (lum - _blend_color_luminance(hueSatColor)) + hueSatColor;
+ float minComp = min(min(result.x, result.y), result.z);
+ float maxComp = max(max(result.x, result.y), result.z);
+ if (minComp < 0.0 && lum != minComp) {
+ result = lum + ((result - lum) * lum) / (lum - minComp);
+ }
+ if (maxComp > alpha && maxComp != lum) {
+ return lum + ((result - lum) * (alpha - lum)) / (maxComp - lum);
+ }
+ return result;
+}
+vec4 blend_color(vec4 src, vec4 dst) {
+ float alpha = dst.w * src.w;
+ vec3 sda = src.xyz * dst.w;
+ vec3 dsa = dst.xyz * src.w;
+ return vec4((((_blend_set_color_luminance(sda, alpha, dsa) + dst.xyz) - dsa) + src.xyz) - sda, (src.w + dst.w) - alpha);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_color(output_Stage1, TextureEffect_Stage2_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/85-10.shader_test b/shaders/skia/85-10.shader_test
new file mode 100644
index 0000000..99957d5
--- /dev/null
+++ b/shaders/skia/85-10.shader_test
@@ -0,0 +1,41 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform float uPixelSize_Stage1;
+uniform vec2 uRange_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = vec4(1.0, 1.0, 1.0, 1.0);
+ vec2 coord = vTransformedCoords_0_Stage0;
+ coord.x -= 4.0 * uPixelSize_Stage1;
+ for (int i = 0;i < 9; i++) {
+ output_Stage1 = min(output_Stage1, texture(uTextureSampler_0_Stage1, coord));
+ coord.x += uPixelSize_Stage1;
+ }
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/85-11.shader_test b/shaders/skia/85-11.shader_test
new file mode 100644
index 0000000..40d96d2
--- /dev/null
+++ b/shaders/skia/85-11.shader_test
@@ -0,0 +1,153 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform float uSurfaceScale_Stage1;
+uniform vec3 uLightColor_Stage1;
+uniform float uKD_Stage1;
+uniform vec3 uLightLocation_Stage1;
+uniform float uExponent_Stage1;
+uniform float uCosInnerConeAngle_Stage1;
+uniform float uCosOuterConeAngle_Stage1;
+uniform float uConeScale_Stage1;
+uniform vec3 uS_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 light_Stage1(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ float colorScale = uKD_Stage1 * dot(normal, surfaceToLight);
+ return vec4(lightColor * clamp(colorScale, 0.0, 1.0), 1.0);
+}
+float sobel_Stage1(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage1(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage1(float m[9], float surfaceScale) {
+ return pointToNormal_Stage1(sobel_Stage1(m[0], m[1], m[3], m[4], 0.0, 0.0, 0.66666698455810547), sobel_Stage1(m[0], m[3], m[1], m[4], 0.0, 0.0, 0.66666698455810547), surfaceScale);
+}
+vec3 lightColor_Stage1(vec3 surfaceToLight) {
+ float cosAngle = -dot(surfaceToLight, uS_Stage1);
+ if (cosAngle < uCosOuterConeAngle_Stage1) {
+ return vec3(0.0);
+ }
+ float scale = pow(cosAngle, uExponent_Stage1);
+ if (cosAngle < uCosInnerConeAngle_Stage1) {
+ return ((uLightColor_Stage1 * scale) * (cosAngle - uCosOuterConeAngle_Stage1)) * uConeScale_Stage1;
+ }
+ return uLightColor_Stage1;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ vec2 coord = vTransformedCoords_0_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp0 = textureColor;
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp1 = textureColor;
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp2 = textureColor;
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp3 = textureColor;
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp4 = textureColor;
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp5 = textureColor;
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp6 = textureColor;
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp7 = textureColor;
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp8 = textureColor;
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = normalize(uLightLocation_Stage1 - vec3(gl_FragCoord.xy, uSurfaceScale_Stage1 * m[4]));
+ output_Stage1 = light_Stage1(normal_Stage1(m, uSurfaceScale_Stage1), surfaceToLight, lightColor_Stage1(surfaceToLight));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/85-12.shader_test b/shaders/skia/85-12.shader_test
new file mode 100644
index 0000000..c8ebfdc
--- /dev/null
+++ b/shaders/skia/85-12.shader_test
@@ -0,0 +1,114 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec2 uDstTextureUpperLeft_Stage1;
+uniform vec2 uDstTextureCoordScale_Stage1;
+uniform sampler2D uTextureSampler_0_Stage0;
+uniform sampler2D uDstTextureSampler_Stage1;
+noperspective in vec2 vTextureCoords_Stage0;
+flat in int vTexIndex_Stage0;
+noperspective in vec4 vinColor_Stage0;
+float _blend_color_saturation(vec3 color) {
+ return max(max(color.x, color.y), color.z) - min(min(color.x, color.y), color.z);
+}
+vec3 _blend_set_color_saturation_helper(vec3 minMidMax, float sat) {
+ if (minMidMax.x < minMidMax.z) {
+ return vec3(0.0, (sat * (minMidMax.y - minMidMax.x)) / (minMidMax.z - minMidMax.x), sat);
+ }
+ return vec3(0.0);
+}
+vec3 _blend_set_color_saturation(vec3 hueLumColor, vec3 satColor) {
+ float sat = _blend_color_saturation(satColor);
+ if (hueLumColor.x <= hueLumColor.y) {
+ if (hueLumColor.y <= hueLumColor.z) {
+ hueLumColor.xyz = _blend_set_color_saturation_helper(hueLumColor, sat);
+ } else if (hueLumColor.x <= hueLumColor.z) {
+ hueLumColor.xzy = _blend_set_color_saturation_helper(hueLumColor.xzy, sat);
+ } else {
+ hueLumColor.zxy = _blend_set_color_saturation_helper(hueLumColor.zxy, sat);
+ }
+ } else if (hueLumColor.x <= hueLumColor.z) {
+ hueLumColor.yxz = _blend_set_color_saturation_helper(hueLumColor.yxz, sat);
+ } else if (hueLumColor.y <= hueLumColor.z) {
+ hueLumColor.yzx = _blend_set_color_saturation_helper(hueLumColor.yzx, sat);
+ } else {
+ hueLumColor.zyx = _blend_set_color_saturation_helper(hueLumColor.zyx, sat);
+ }
+ return hueLumColor;
+}
+float _blend_color_luminance(vec3 color) {
+ return dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), color);
+}
+vec3 _blend_set_color_luminance(vec3 hueSatColor, float alpha, vec3 lumColor) {
+ float lum = _blend_color_luminance(lumColor);
+ vec3 result = (lum - _blend_color_luminance(hueSatColor)) + hueSatColor;
+ float minComp = min(min(result.x, result.y), result.z);
+ float maxComp = max(max(result.x, result.y), result.z);
+ if (minComp < 0.0 && lum != minComp) {
+ result = lum + ((result - lum) * lum) / (lum - minComp);
+ }
+ if (maxComp > alpha && maxComp != lum) {
+ return lum + ((result - lum) * (alpha - lum)) / (maxComp - lum);
+ }
+ return result;
+}
+vec4 blend_saturation(vec4 src, vec4 dst) {
+ float alpha = dst.w * src.w;
+ vec3 sda = src.xyz * dst.w;
+ vec3 dsa = dst.xyz * src.w;
+ return vec4((((_blend_set_color_luminance(_blend_set_color_saturation(dsa, sda), alpha, dsa) + dst.xyz) - dsa) + src.xyz) - sda, (src.w + dst.w) - alpha);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vinColor_Stage0;
+ vec4 texColor;
+ {
+ texColor = texture(uTextureSampler_0_Stage0, vTextureCoords_Stage0);
+ }
+ outputCoverage_Stage0 = texColor;
+ }
+ {
+ if (all(lessThanEqual(outputCoverage_Stage0.xyz, vec3(0.0)))) {
+ discard;
+ }
+ vec2 _dstTexCoord = (gl_FragCoord.xy - uDstTextureUpperLeft_Stage1) * uDstTextureCoordScale_Stage1;
+ _dstTexCoord.y = 1.0 - _dstTexCoord.y;
+ vec4 _dstColor = texture(uDstTextureSampler_Stage1, _dstTexCoord);
+ sk_FragColor = blend_saturation(outputColor_Stage0, _dstColor);
+ float lerpRed = mix(_dstColor.w, sk_FragColor.w, outputCoverage_Stage0.x);
+ float lerpBlue = mix(_dstColor.w, sk_FragColor.w, outputCoverage_Stage0.y);
+ float lerpGreen = mix(_dstColor.w, sk_FragColor.w, outputCoverage_Stage0.z);
+ sk_FragColor = outputCoverage_Stage0 * sk_FragColor + (vec4(1.0) - outputCoverage_Stage0) * _dstColor;
+ sk_FragColor.w = max(max(lerpRed, lerpBlue), lerpGreen);
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform vec2 uAtlasSizeInv_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in uvec2 inTextureCoords;
+noperspective out vec2 vTextureCoords_Stage0;
+flat out int vTexIndex_Stage0;
+noperspective out vec4 vinColor_Stage0;
+void main() {
+ ivec2 signedCoords = ivec2(int(inTextureCoords.x), int(inTextureCoords.y));
+ vec2 unormTexCoords = vec2(float(signedCoords.x / 2), float(signedCoords.y / 2));
+ vTextureCoords_Stage0 = unormTexCoords * uAtlasSizeInv_Stage0;
+ vTexIndex_Stage0 = 0;
+ vinColor_Stage0 = inColor;
+ gl_Position = vec4(inPosition.x, inPosition.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/85-13.shader_test b/shaders/skia/85-13.shader_test
new file mode 100644
index 0000000..5cf62ba
--- /dev/null
+++ b/shaders/skia/85-13.shader_test
@@ -0,0 +1,67 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uclamp_Stage1;
+uniform vec2 uDstTextureUpperLeft_Stage2;
+uniform vec2 uDstTextureCoordScale_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uDstTextureSampler_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in float vcoverage_Stage0;
+vec4 blend_src(vec4 src, vec4 dst) {
+ return src;
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ float coverage = vcoverage_Stage0;
+ outputCoverage_Stage0 = vec4(coverage);
+ }
+ vec4 output_Stage1;
+ {
+ vec2 inCoord = vTransformedCoords_0_Stage0;
+ vec2 subsetCoord;
+ subsetCoord.x = inCoord.x;
+ subsetCoord.y = inCoord.y;
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage1.x, uclamp_Stage1.z);
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage1.y, uclamp_Stage1.w);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ output_Stage1 = textureColor;
+ }
+ {
+ if (all(lessThanEqual(outputCoverage_Stage0.xyz, vec3(0.0)))) {
+ discard;
+ }
+ vec2 _dstTexCoord = (gl_FragCoord.xy - uDstTextureUpperLeft_Stage2) * uDstTextureCoordScale_Stage2;
+ _dstTexCoord.y = 1.0 - _dstTexCoord.y;
+ vec4 _dstColor = texture(uDstTextureSampler_Stage2, _dstTexCoord);
+ sk_FragColor = blend_src(output_Stage1, _dstColor);
+ sk_FragColor = outputCoverage_Stage0 * sk_FragColor + (vec4(1.0) - outputCoverage_Stage0) * _dstColor;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in float coverage;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out float vcoverage_Stage0;
+void main() {
+ vec2 position = position;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcoverage_Stage0 = coverage;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/85-2.shader_test b/shaders/skia/85-2.shader_test
new file mode 100644
index 0000000..4476d1c
--- /dev/null
+++ b/shaders/skia/85-2.shader_test
@@ -0,0 +1,112 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform float uSrcTF_Stage1_c0_c0[7];
+uniform mat3 uColorXform_Stage1_c0_c0;
+uniform float uDstTF_Stage1_c0_c0[7];
+uniform mat3 ucolorSpaceMatrix_Stage1_c0_c0_c0_c0;
+uniform vec3 ucolorSpaceTranslate_Stage1_c0_c0_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_1_Stage1, vTransformedCoords_1_Stage0) * _input;
+ return _output;
+}
+vec4 YUVtoRGBEffect_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 planes[2];
+ planes[0] = TextureEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ planes[1] = TextureEffect_Stage1_c0_c0_c0_c0_c1_c0(vec4(1.0));
+ vec4 color = vec4(planes[0].w, planes[1].x, planes[1].y, 1.0);
+ color.xyz = clamp(color.xyz * ucolorSpaceMatrix_Stage1_c0_c0_c0_c0 + ucolorSpaceTranslate_Stage1_c0_c0_c0_c0, 0.0, 1.0);
+ _output = color;
+ return _output;
+}
+float src_tf_Stage1_c0_c0(float x) {
+ float G = uSrcTF_Stage1_c0_c0[0];
+ float A = uSrcTF_Stage1_c0_c0[1];
+ float B = uSrcTF_Stage1_c0_c0[2];
+ float C = uSrcTF_Stage1_c0_c0[3];
+ float D = uSrcTF_Stage1_c0_c0[4];
+ float E = uSrcTF_Stage1_c0_c0[5];
+ float F = uSrcTF_Stage1_c0_c0[6];
+ float s = sign(x);
+ x = abs(x);
+ x = x < D ? C * x + F : pow(A * x + B, G) + E;
+ return s * x;
+}
+float dst_tf_Stage1_c0_c0(float x) {
+ float G = uDstTF_Stage1_c0_c0[0];
+ float A = uDstTF_Stage1_c0_c0[1];
+ float B = uDstTF_Stage1_c0_c0[2];
+ float C = uDstTF_Stage1_c0_c0[3];
+ float D = uDstTF_Stage1_c0_c0[4];
+ float E = uDstTF_Stage1_c0_c0[5];
+ float F = uDstTF_Stage1_c0_c0[6];
+ float s = sign(x);
+ x = abs(x);
+ x = x < D ? C * x + F : pow(A * x + B, G) + E;
+ return s * x;
+}
+vec4 gamut_xform_Stage1_c0_c0(vec4 color) {
+ color.xyz = uColorXform_Stage1_c0_c0 * color.xyz;
+ return color;
+}
+vec4 color_xform_Stage1_c0_c0(vec4 color) {
+ color.x = src_tf_Stage1_c0_c0(color.x);
+ color.y = src_tf_Stage1_c0_c0(color.y);
+ color.z = src_tf_Stage1_c0_c0(color.z);
+ color = gamut_xform_Stage1_c0_c0(color);
+ color.x = dst_tf_Stage1_c0_c0(color.x);
+ color.y = dst_tf_Stage1_c0_c0(color.y);
+ color.z = dst_tf_Stage1_c0_c0(color.z);
+ return color;
+}
+vec4 ColorSpaceXform_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = color_xform_Stage1_c0_c0(YUVtoRGBEffect_Stage1_c0_c0_c0_c0(vec4(1.0))) * _input;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ColorSpaceXform_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/85-20.shader_test b/shaders/skia/85-20.shader_test
new file mode 100644
index 0000000..93c6943
--- /dev/null
+++ b/shaders/skia/85-20.shader_test
@@ -0,0 +1,83 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform vec2 uBounds_Stage1;
+uniform vec4 uKernel_Stage1[3];
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0 - 4.0 * uImageIncrement_Stage1;
+ vec2 coordSampled = vec2(0.0, 0.0);
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage1.x && coord.y <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].x;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage1.x && coord.y <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].y;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage1.x && coord.y <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].z;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage1.x && coord.y <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].w;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage1.x && coord.y <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].x;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage1.x && coord.y <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].y;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage1.x && coord.y <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].z;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage1.x && coord.y <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].w;
+ }
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ if (coord.y >= uBounds_Stage1.x && coord.y <= uBounds_Stage1.y) {
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].x;
+ }
+ coord += uImageIncrement_Stage1;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/85-21.shader_test b/shaders/skia/85-21.shader_test
new file mode 100644
index 0000000..853dceb
--- /dev/null
+++ b/shaders/skia/85-21.shader_test
@@ -0,0 +1,48 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uborder_Stage1;
+uniform vec4 usubset_Stage1;
+uniform vec4 uclamp_Stage1;
+uniform vec4 unorm_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ vec2 inCoord = vTransformedCoords_0_Stage0;
+ inCoord *= unorm_Stage1.xy;
+ vec2 subsetCoord;
+ subsetCoord.x = inCoord.x;
+ subsetCoord.y = inCoord.y;
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage1.x, uclamp_Stage1.z);
+ clampedCoord.y = subsetCoord.y;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord * unorm_Stage1.zw);
+ float errX = subsetCoord.x - clampedCoord.x;
+ textureColor = mix(textureColor, uborder_Stage1, min(abs(errX), 1.0));
+ output_Stage1 = textureColor;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/85-22.shader_test b/shaders/skia/85-22.shader_test
new file mode 100644
index 0000000..f7f5447
--- /dev/null
+++ b/shaders/skia/85-22.shader_test
@@ -0,0 +1,103 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform float ubias_Stage1_c0_c0_c0_c0;
+uniform float uscale_Stage1_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 SweepGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float angle;
+ {
+ angle = atan(-vTransformedCoords_0_Stage0.y, -vTransformedCoords_0_Stage0.x);
+ }
+ float t = ((angle * 0.15915493667125702 + 0.5) + ubias_Stage1_c0_c0_c0_c0) * uscale_Stage1_c0_c0_c0_c0;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = SweepGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_dst_in(outputColor_Stage0, ClampedGradientEffect_Stage1_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/85-23.shader_test b/shaders/skia/85-23.shader_test
new file mode 100644
index 0000000..adcedd8
--- /dev/null
+++ b/shaders/skia/85-23.shader_test
@@ -0,0 +1,119 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform float ubias_Stage1_c0_c0_c0_c0;
+uniform float uscale_Stage1_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 SweepGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float angle;
+ {
+ angle = atan(-vTransformedCoords_0_Stage0.y, -vTransformedCoords_0_Stage0.x);
+ }
+ float t = ((angle * 0.15915493667125702 + 0.5) + ubias_Stage1_c0_c0_c0_c0) * uscale_Stage1_c0_c0_c0_c0;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = SweepGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_dst_in(outputColor_Stage0, ClampedGradientEffect_Stage1_c0_c0(vec4(1.0)));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_1_Stage0.x);
+ uint y = uint(vTransformedCoords_1_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ output_Stage2 = vec4(clamp(output_Stage2.xyz + value * 0.0039215688593685627, 0.0, output_Stage2.w), output_Stage2.w);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/85-24.shader_test b/shaders/skia/85-24.shader_test
new file mode 100644
index 0000000..30c8490
--- /dev/null
+++ b/shaders/skia/85-24.shader_test
@@ -0,0 +1,114 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 TextureEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = TextureEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = OverrideInputFragmentProcessor_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+float _blend_color_saturation(vec3 color) {
+ return max(max(color.x, color.y), color.z) - min(min(color.x, color.y), color.z);
+}
+vec3 _blend_set_color_saturation_helper(vec3 minMidMax, float sat) {
+ if (minMidMax.x < minMidMax.z) {
+ return vec3(0.0, (sat * (minMidMax.y - minMidMax.x)) / (minMidMax.z - minMidMax.x), sat);
+ }
+ return vec3(0.0);
+}
+vec3 _blend_set_color_saturation(vec3 hueLumColor, vec3 satColor) {
+ float sat = _blend_color_saturation(satColor);
+ if (hueLumColor.x <= hueLumColor.y) {
+ if (hueLumColor.y <= hueLumColor.z) {
+ hueLumColor.xyz = _blend_set_color_saturation_helper(hueLumColor, sat);
+ } else if (hueLumColor.x <= hueLumColor.z) {
+ hueLumColor.xzy = _blend_set_color_saturation_helper(hueLumColor.xzy, sat);
+ } else {
+ hueLumColor.zxy = _blend_set_color_saturation_helper(hueLumColor.zxy, sat);
+ }
+ } else if (hueLumColor.x <= hueLumColor.z) {
+ hueLumColor.yxz = _blend_set_color_saturation_helper(hueLumColor.yxz, sat);
+ } else if (hueLumColor.y <= hueLumColor.z) {
+ hueLumColor.yzx = _blend_set_color_saturation_helper(hueLumColor.yzx, sat);
+ } else {
+ hueLumColor.zyx = _blend_set_color_saturation_helper(hueLumColor.zyx, sat);
+ }
+ return hueLumColor;
+}
+float _blend_color_luminance(vec3 color) {
+ return dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), color);
+}
+vec3 _blend_set_color_luminance(vec3 hueSatColor, float alpha, vec3 lumColor) {
+ float lum = _blend_color_luminance(lumColor);
+ vec3 result = (lum - _blend_color_luminance(hueSatColor)) + hueSatColor;
+ float minComp = min(min(result.x, result.y), result.z);
+ float maxComp = max(max(result.x, result.y), result.z);
+ if (minComp < 0.0 && lum != minComp) {
+ result = lum + ((result - lum) * lum) / (lum - minComp);
+ }
+ if (maxComp > alpha && maxComp != lum) {
+ return lum + ((result - lum) * (alpha - lum)) / (maxComp - lum);
+ }
+ return result;
+}
+vec4 blend_saturation(vec4 src, vec4 dst) {
+ float alpha = dst.w * src.w;
+ vec3 sda = src.xyz * dst.w;
+ vec3 dsa = dst.xyz * src.w;
+ return vec4((((_blend_set_color_luminance(_blend_set_color_saturation(dsa, sda), alpha, dsa) + dst.xyz) - dsa) + src.xyz) - sda, (src.w + dst.w) - alpha);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_saturation(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec2 inLocalCoord;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 color = inColor;
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/85-25.shader_test b/shaders/skia/85-25.shader_test
new file mode 100644
index 0000000..8332d39
--- /dev/null
+++ b/shaders/skia/85-25.shader_test
@@ -0,0 +1,41 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform float uPixelSize_Stage1;
+uniform vec2 uRange_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0;
+ coord.y -= 11.0 * uPixelSize_Stage1;
+ for (int i = 0;i < 23; i++) {
+ output_Stage1 = max(output_Stage1, texture(uTextureSampler_0_Stage1, coord));
+ coord.y += uPixelSize_Stage1;
+ }
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/85-26.shader_test b/shaders/skia/85-26.shader_test
new file mode 100644
index 0000000..e7bdc17
--- /dev/null
+++ b/shaders/skia/85-26.shader_test
@@ -0,0 +1,121 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 uleftBorderColor_Stage1_c1_c0_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c1_c0_c0_c0;
+uniform vec4 ustart_Stage1_c1_c0_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c1_c0_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = ClampedGradientEffect_Stage1_c0_c0_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ return _output;
+}
+vec4 LinearGradientLayout_Stage1_c1_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_1_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c1_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c1_c0_c0_c0_c1_c0 + t * uend_Stage1_c1_c0_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c1_c0_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c1_c0_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c1_c0_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c1_c0_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = ClampedGradientEffect_Stage1_c1_c0_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ return _output;
+}
+vec4 blend_screen(vec4 src, vec4 dst) {
+ return src + (1.0 - src) * dst;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_screen(OverrideInputFragmentProcessor_Stage1_c0_c0(inputColor), OverrideInputFragmentProcessor_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/85-28.shader_test b/shaders/skia/85-28.shader_test
new file mode 100644
index 0000000..f3ea064
--- /dev/null
+++ b/shaders/skia/85-28.shader_test
@@ -0,0 +1,48 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+noperspective in vec4 vQuadEdge_Stage0;
+noperspective in vec4 vinColor_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vinColor_Stage0;
+ float edgeAlpha;
+ vec2 duvdx = dFdx(vQuadEdge_Stage0.xy);
+ vec2 duvdy = -dFdy(vQuadEdge_Stage0.xy);
+ if (vQuadEdge_Stage0.z > 0.0 && vQuadEdge_Stage0.w > 0.0) {
+ edgeAlpha = min(min(vQuadEdge_Stage0.z, vQuadEdge_Stage0.w) + 0.5, 1.0);
+ } else {
+ vec2 gF = vec2((2.0 * vQuadEdge_Stage0.x) * duvdx.x - duvdx.y, (2.0 * vQuadEdge_Stage0.x) * duvdy.x - duvdy.y);
+ edgeAlpha = vQuadEdge_Stage0.x * vQuadEdge_Stage0.x - vQuadEdge_Stage0.y;
+ edgeAlpha = clamp(0.5 - edgeAlpha / length(gF), 0.0, 1.0);
+ }
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ {
+ sk_FragColor = (vec4(1.0) - outputColor_Stage0) * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 inPosition;
+in vec4 inColor;
+in vec4 inQuadEdge;
+noperspective out vec4 vQuadEdge_Stage0;
+noperspective out vec4 vinColor_Stage0;
+void main() {
+ vQuadEdge_Stage0 = inQuadEdge;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = inPosition;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/85-29.shader_test b/shaders/skia/85-29.shader_test
new file mode 100644
index 0000000..322e472
--- /dev/null
+++ b/shaders/skia/85-29.shader_test
@@ -0,0 +1,310 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_KHR_blend_equation_advanced : require
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+layout (blend_support_all_equations) out ;
+uniform vec4 uColor_Stage0;
+uniform vec4 ucircleData_Stage1_c1_c0_c0_c0_c0_c0;
+uniform vec2 ubaseFrequency_Stage1_c1_c0_c0_c0_c1_c0;
+uniform float uz_Stage1_c1_c0_c0_c0_c1_c0;
+uniform vec2 uImageIncrement_Stage1_c1_c0_c1_c0;
+uniform float uSurfaceScale_Stage1_c1_c0_c1_c0;
+uniform vec3 uLightColor_Stage1_c1_c0_c1_c0;
+uniform float uKS_Stage1_c1_c0_c1_c0;
+uniform float uShininess_Stage1_c1_c0_c1_c0;
+uniform vec4 uTexDom_Stage1_c1_c0_c1_c0;
+uniform vec3 uDecalParams_Stage1_c1_c0_c1_c0;
+uniform vec3 uLightDirection_Stage1_c1_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+uniform sampler2D uTextureSampler_2_Stage1;
+uniform sampler2D uTextureSampler_3_Stage1;
+uniform sampler2D uTextureSampler_4_Stage1;
+noperspective in vec3 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 ColorTableEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ float nonZeroAlpha = max(_input.w, 9.9999997473787516e-05);
+ vec4 coord = vec4(_input.xyz / nonZeroAlpha, nonZeroAlpha);
+ coord = coord * 0.9960939884185791 + vec4(0.0019529999699443579, 0.0019529999699443579, 0.0019529999699443579, 0.0019529999699443579);
+ _output.w = texture(uTextureSampler_0_Stage1, vec2(coord.w, 0.125)).w;
+ _output.x = texture(uTextureSampler_0_Stage1, vec2(coord.x, 0.375)).w;
+ _output.y = texture(uTextureSampler_0_Stage1, vec2(coord.y, 0.625)).w;
+ _output.z = texture(uTextureSampler_0_Stage1, vec2(coord.z, 0.875)).w;
+ _output.xyz *= _output.w;
+ return _output;
+}
+vec4 CircleBlurFragmentProcessor_Stage1_c1_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 vec = vec2((gl_FragCoord.x - ucircleData_Stage1_c1_c0_c0_c0_c0_c0.x) * ucircleData_Stage1_c1_c0_c0_c0_c0_c0.w, (gl_FragCoord.y - ucircleData_Stage1_c1_c0_c0_c0_c0_c0.y) * ucircleData_Stage1_c1_c0_c0_c0_c0_c0.w);
+ float dist = length(vec) + (0.5 - ucircleData_Stage1_c1_c0_c0_c0_c0_c0.z) * ucircleData_Stage1_c1_c0_c0_c0_c0_c0.w;
+ _output = _input * texture(uTextureSampler_1_Stage1, vec2(dist, 0.5)).w;
+ return _output;
+}
+vec3 fade_Stage1_c1_c0_c0_c0_c1_c0(vec3 t) {
+ return ((t * t) * t) * (t * (t * 6.0 - 15.0) + 10.0);
+}
+float perm_Stage1_c1_c0_c0_c0_c1_c0(float x) {
+ return texture(uTextureSampler_2_Stage1, vec2(fract(x / 256.0), 0.0)).x * 255.0;
+}
+float grad_Stage1_c1_c0_c0_c0_c1_c0(float x, vec3 p) {
+ return dot(texture(uTextureSampler_3_Stage1, vec2(fract(x / 16.0), 0.0)).xyz * 255.0 - vec3(1.0), p);
+}
+float lerp_Stage1_c1_c0_c0_c0_c1_c0(float a, float b, float w) {
+ return a + w * (b - a);
+}
+float noise_Stage1_c1_c0_c0_c0_c1_c0(vec3 p) {
+ vec3 P = mod(floor(p), 256.0);
+ p -= floor(p);
+ vec3 f = fade_Stage1_c1_c0_c0_c0_c1_c0(p);
+ float A = perm_Stage1_c1_c0_c0_c0_c1_c0(P.x) + P.y;
+ float AA = perm_Stage1_c1_c0_c0_c0_c1_c0(A) + P.z;
+ float AB = perm_Stage1_c1_c0_c0_c0_c1_c0(A + 1.0) + P.z;
+ float B = perm_Stage1_c1_c0_c0_c0_c1_c0(P.x + 1.0) + P.y;
+ float BA = perm_Stage1_c1_c0_c0_c0_c1_c0(B) + P.z;
+ float BB = perm_Stage1_c1_c0_c0_c0_c1_c0(B + 1.0) + P.z;
+ float result = lerp_Stage1_c1_c0_c0_c0_c1_c0(lerp_Stage1_c1_c0_c0_c0_c1_c0(lerp_Stage1_c1_c0_c0_c0_c1_c0(grad_Stage1_c1_c0_c0_c0_c1_c0(perm_Stage1_c1_c0_c0_c0_c1_c0(AA), p), grad_Stage1_c1_c0_c0_c0_c1_c0(perm_Stage1_c1_c0_c0_c0_c1_c0(BA), p + vec3(-1.0, 0.0, 0.0)), f.x), lerp_Stage1_c1_c0_c0_c0_c1_c0(grad_Stage1_c1_c0_c0_c0_c1_c0(perm_Stage1_c1_c0_c0_c0_c1_c0(AB), p + vec3(0.0, -1.0, 0.0)), grad_Stage1_c1_c0_c0_c0_c1_c0(perm_Stage1_c1_c0_c0_c0_c1_c0(BB), p + vec3(-1.0, -1.0, 0.0)), f.x), f.y), lerp_Stage1_c1_c0_c0_c0_c1_c0(lerp_Stage1_c1_c0_c0_c0_c1_c0(grad_Stage1_c1_c0_c0_c0_c1_c0(perm_Stage1_c1_c0_c0_c0_c1_c0(AA + 1.0), p + vec3(0.0, 0.0, -1.0)), grad_Stage1_c1_c0_c0_c0_c1_c0(perm_Stage1_c1_c0_c0_c0_c1_c0(BA + 1.0), p + vec3(-1.0, 0.0, -1.0)), f.x), lerp_Stage1_c1_c0_c0_c0_c1_c0(grad_Stage1_c1_c0_c0_c0_c1_c0(perm_Stage1_c1_c0_c0_c0_c1_c0(AB + 1.0), p + vec3(0.0, -1.0, -1.0)), grad_Stage1_c1_c0_c0_c0_c1_c0(perm_Stage1_c1_c0_c0_c0_c1_c0(BB + 1.0), p + vec3(-1.0, -1.0, -1.0)), f.x), f.y), f.z);
+ return result;
+}
+float noiseOctaves_Stage1_c1_c0_c0_c0_c1_c0(vec3 p) {
+ float result = 0.0;
+ float ratio = 1.0;
+ for (float i = 0.0;i < 3.0; i++) {
+ result += noise_Stage1_c1_c0_c0_c0_c1_c0(p) / ratio;
+ p *= 2.0;
+ ratio *= 2.0;
+ }
+ return (result + 1.0) / 2.0;
+}
+vec4 ImprovedPerlinNoise_Stage1_c1_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 vTransformedCoords_0_Stage0_ensure2D = vTransformedCoords_0_Stage0.xy / vTransformedCoords_0_Stage0.z;
+ vec2 coords = vTransformedCoords_0_Stage0_ensure2D * ubaseFrequency_Stage1_c1_c0_c0_c0_c1_c0;
+ float r = noiseOctaves_Stage1_c1_c0_c0_c0_c1_c0(vec3(coords, uz_Stage1_c1_c0_c0_c0_c1_c0));
+ float g = noiseOctaves_Stage1_c1_c0_c0_c0_c1_c0(vec3(coords, uz_Stage1_c1_c0_c0_c0_c1_c0));
+ float b = noiseOctaves_Stage1_c1_c0_c0_c0_c1_c0(vec3(coords, uz_Stage1_c1_c0_c0_c0_c1_c0));
+ float a = noiseOctaves_Stage1_c1_c0_c0_c0_c1_c0(vec3(coords, uz_Stage1_c1_c0_c0_c0_c1_c0));
+ _output = vec4(r, g, b, a);
+ _output = clamp(_output, 0.0, 1.0);
+ _output = vec4(_output.xyz * _output.www, _output.w);
+ return _output;
+}
+vec4 blend_dst_out(vec4 src, vec4 dst) {
+ return (1.0 - src.w) * dst;
+}
+vec4 ComposeTwo_Stage1_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_dst_out(CircleBlurFragmentProcessor_Stage1_c1_c0_c0_c0_c0_c0(inputColor), ImprovedPerlinNoise_Stage1_c1_c0_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 light_Stage1_c1_c0_c1_c0(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ vec3 halfDir = normalize(surfaceToLight + vec3(0.0, 0.0, 1.0));
+ float colorScale = uKS_Stage1_c1_c0_c1_c0 * pow(dot(normal, halfDir), uShininess_Stage1_c1_c0_c1_c0);
+ vec3 color = lightColor * clamp(colorScale, 0.0, 1.0);
+ return vec4(color, max(max(color.x, color.y), color.z));
+}
+float sobel_Stage1_c1_c0_c1_c0(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage1_c1_c0_c1_c0(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage1_c1_c0_c1_c0(float m[9], float surfaceScale) {
+ return pointToNormal_Stage1_c1_c0_c1_c0(sobel_Stage1_c1_c0_c1_c0(m[1], m[2], m[4], m[5], 0.0, 0.0, 0.66666698455810547), sobel_Stage1_c1_c0_c1_c0(0.0, 0.0, m[1], m[4], m[2], m[5], 0.66666698455810547), surfaceScale);
+}
+vec4 SpecularLighting_Stage1_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coord = vTransformedCoords_1_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage1_c1_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c1_c0.xy, uTexDom_Stage1_c1_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_4_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp0 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1_c1_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c1_c0.xy, uTexDom_Stage1_c1_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_4_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1_c1_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c1_c0.xy, uTexDom_Stage1_c1_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_4_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage1_c1_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c1_c0.xy, uTexDom_Stage1_c1_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_4_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c1_c0.xy, uTexDom_Stage1_c1_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_4_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1_c1_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c1_c0.xy, uTexDom_Stage1_c1_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_4_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp5 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage1_c1_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c1_c0.xy, uTexDom_Stage1_c1_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_4_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp6 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage1_c1_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c1_c0.xy, uTexDom_Stage1_c1_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_4_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp7 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage1_c1_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c1_c0.xy, uTexDom_Stage1_c1_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_4_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp8 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = uLightDirection_Stage1_c1_c0_c1_c0;
+ _output = light_Stage1_c1_c0_c1_c0(normal_Stage1_c1_c0_c1_c0(m, uSurfaceScale_Stage1_c1_c0_c1_c0), surfaceToLight, uLightColor_Stage1_c1_c0_c1_c0);
+ _output *= _input;
+ return _output;
+}
+vec4 blend_plus(vec4 src, vec4 dst) {
+ return min(src + dst, 1.0);
+}
+vec4 ComposeTwo_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_plus(ComposeTwo_Stage1_c1_c0_c0_c0(inputColor), SpecularLighting_Stage1_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = uColor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_plus(ColorTableEffect_Stage1_c0_c0(inputColor), ComposeTwo_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 inPosition;
+noperspective out vec3 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vec2 pos2 = (uViewM_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0);
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/85-3.shader_test b/shaders/skia/85-3.shader_test
new file mode 100644
index 0000000..122cd8d
--- /dev/null
+++ b/shaders/skia/85-3.shader_test
@@ -0,0 +1,54 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform mat3 ucolorSpaceMatrix_Stage1_c0_c0;
+uniform vec3 ucolorSpaceTranslate_Stage1_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+vec4 YUVtoRGBEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 planes[1];
+ planes[0] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0));
+ vec4 color = vec4(planes[0].y, planes[0].x, planes[0].z, planes[0].w);
+ color.xyz = clamp(color.xyz * ucolorSpaceMatrix_Stage1_c0_c0 + ucolorSpaceTranslate_Stage1_c0_c0, 0.0, 1.0);
+ color.xyz *= color.w;
+ _output = color;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = YUVtoRGBEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/85-30.shader_test b/shaders/skia/85-30.shader_test
new file mode 100644
index 0000000..9878f21
--- /dev/null
+++ b/shaders/skia/85-30.shader_test
@@ -0,0 +1,204 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage2;
+uniform float uSurfaceScale_Stage2;
+uniform vec3 uLightColor_Stage2;
+uniform float uKS_Stage2;
+uniform float uShininess_Stage2;
+uniform vec4 uTexDom_Stage2;
+uniform vec3 uDecalParams_Stage2;
+uniform vec3 uLightDirection_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 light_Stage2(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ vec3 halfDir = normalize(surfaceToLight + vec3(0.0, 0.0, 1.0));
+ float colorScale = uKS_Stage2 * pow(dot(normal, halfDir), uShininess_Stage2);
+ vec3 color = lightColor * clamp(colorScale, 0.0, 1.0);
+ return vec4(color, max(max(color.x, color.y), color.z));
+}
+float sobel_Stage2(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage2(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage2(float m[9], float surfaceScale) {
+ return pointToNormal_Stage2(sobel_Stage2(m[0], m[1], m[3], m[4], 0.0, 0.0, 0.66666698455810547), sobel_Stage2(m[0], m[3], m[1], m[4], 0.0, 0.0, 0.66666698455810547), surfaceScale);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ vec2 coord = vTransformedCoords_1_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp0 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp5 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp6 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp7 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp8 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = uLightDirection_Stage2;
+ output_Stage2 = light_Stage2(normal_Stage2(m, uSurfaceScale_Stage2), surfaceToLight, uLightColor_Stage2);
+ output_Stage2 *= output_Stage1;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/85-31.shader_test b/shaders/skia/85-31.shader_test
new file mode 100644
index 0000000..9a7b5d2
--- /dev/null
+++ b/shaders/skia/85-31.shader_test
@@ -0,0 +1,78 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec3 uedges_Stage2_c0_c0[5];
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 ConvexPoly_Stage2_c0_c0(vec4 _input, vec2 _coords) {
+ vec4 _output;
+ float alpha = 1.0;
+ float edge;
+ edge = dot(uedges_Stage2_c0_c0[0], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage2_c0_c0[1], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage2_c0_c0[2], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage2_c0_c0[3], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage2_c0_c0[4], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ _output = _input * alpha;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ float coord = vTransformedCoords_1_Stage0.y - 0.5;
+ float f = fract(coord);
+ coord += 0.5 - f;
+ float f2 = f * f;
+ vec4 w = mat4(0.055555555555555552, 0.88888888888888884, 0.055555555555555552, 0.0, -0.5, 0.0, 0.5, 0.0, 0.83333333333333337, -2.0, 1.5, -0.33333333333333331, -0.3888888888888889, 1.1666666666666667, -1.1666666666666667, 0.3888888888888889) * vec4(1.0, f, f2, f2 * f);
+ vec4 c[4];
+ c[0] = ConvexPoly_Stage2_c0_c0(vec4(1.0), vec2(vTransformedCoords_1_Stage0.x, coord + -1.0));
+ c[1] = ConvexPoly_Stage2_c0_c0(vec4(1.0), vec2(vTransformedCoords_1_Stage0.x, coord));
+ c[2] = ConvexPoly_Stage2_c0_c0(vec4(1.0), vec2(vTransformedCoords_1_Stage0.x, coord + 1.0));
+ c[3] = ConvexPoly_Stage2_c0_c0(vec4(1.0), vec2(vTransformedCoords_1_Stage0.x, coord + 2.0));
+ vec4 bicubicColor = ((c[0] * w.x + c[1] * w.y) + c[2] * w.z) + c[3] * w.w;
+ bicubicColor = clamp(bicubicColor, 0.0, 1.0);
+ output_Stage2 = bicubicColor * output_Stage1;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/85-4.shader_test b/shaders/skia/85-4.shader_test
new file mode 100644
index 0000000..f41a3e6
--- /dev/null
+++ b/shaders/skia/85-4.shader_test
@@ -0,0 +1,78 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 ucolor_Stage1_c0_c0_c0_c0;
+uniform vec4 ucolor_Stage2_c1_c0;
+noperspective in vec4 vcolor_Stage0;
+vec4 ConstColorProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = _input.w * ucolor_Stage1_c0_c0_c0_c0;
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = ConstColorProcessor_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c1_c0;
+ }
+ return _output;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 blend_darken(vec4 src, vec4 dst) {
+ vec4 result = blend_src_over(src, dst);
+ result.xyz = min(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
+ return result;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_src_over(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_darken(ConstColorProcessor_Stage2_c1_c0(vec4(1.0)), output_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 position;
+in vec4 inColor;
+noperspective out vec4 vcolor_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/85-7.shader_test b/shaders/skia/85-7.shader_test
new file mode 100644
index 0000000..a72ed76
--- /dev/null
+++ b/shaders/skia/85-7.shader_test
@@ -0,0 +1,94 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uColor_Stage0;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+uniform vec2 uDstTextureUpperLeft_Stage2;
+uniform vec2 uDstTextureCoordScale_Stage2;
+uniform sampler2D uDstTextureSampler_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in float vinCoverage_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+vec4 blend_src(vec4 src, vec4 dst) {
+ return src;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = uColor_Stage0;
+ float alpha = 1.0;
+ alpha = vinCoverage_Stage0;
+ outputCoverage_Stage0 = vec4(alpha);
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_dst_in(outputColor_Stage0, ClampedGradientEffect_Stage1_c0_c0(vec4(1.0)));
+ }
+ {
+ if (all(lessThanEqual(outputCoverage_Stage0.xyz, vec3(0.0)))) {
+ discard;
+ }
+ vec2 _dstTexCoord = (gl_FragCoord.xy - uDstTextureUpperLeft_Stage2) * uDstTextureCoordScale_Stage2;
+ _dstTexCoord.y = 1.0 - _dstTexCoord.y;
+ vec4 _dstColor = texture(uDstTextureSampler_Stage2, _dstTexCoord);
+ sk_FragColor = blend_src(output_Stage1, _dstColor);
+ sk_FragColor = outputCoverage_Stage0 * sk_FragColor + (vec4(1.0) - outputCoverage_Stage0) * _dstColor;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in float inCoverage;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out float vinCoverage_Stage0;
+void main() {
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ vinCoverage_Stage0 = inCoverage;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/85-8.shader_test b/shaders/skia/85-8.shader_test
new file mode 100644
index 0000000..7163810
--- /dev/null
+++ b/shaders/skia/85-8.shader_test
@@ -0,0 +1,44 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uinnerRect_Stage1;
+uniform vec2 uradiusPlusHalf_Stage1;
+flat in vec4 vcolor_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec2 dxy = max(vec2(uinnerRect_Stage1.x - gl_FragCoord.x, gl_FragCoord.y - uinnerRect_Stage1.w), 0.0);
+ float rightAlpha = clamp(uinnerRect_Stage1.z - gl_FragCoord.x, 0.0, 1.0);
+ float topAlpha = clamp(gl_FragCoord.y - uinnerRect_Stage1.y, 0.0, 1.0);
+ float alpha = (topAlpha * rightAlpha) * clamp(uradiusPlusHalf_Stage1.x - length(dxy), 0.0, 1.0);
+ alpha = 1.0 - alpha;
+ output_Stage1 = vec4(alpha);
+ }
+ {
+ sk_FragColor = outputColor_Stage0 * output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 position;
+in vec4 color;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/85-9.shader_test b/shaders/skia/85-9.shader_test
new file mode 100644
index 0000000..f164946
--- /dev/null
+++ b/shaders/skia/85-9.shader_test
@@ -0,0 +1,86 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage2_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c1_c0;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_dst_in(outputColor_Stage0, ClampedGradientEffect_Stage1_c0_c0(vec4(1.0)));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_src_in(ConstColorProcessor_Stage2_c1_c0(vec4(1.0)), output_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/85.shader_test b/shaders/skia/85.shader_test
new file mode 100644
index 0000000..b94fece
--- /dev/null
+++ b/shaders/skia/85.shader_test
@@ -0,0 +1,85 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 usubset_Stage1_c0_c0_c0_c0;
+uniform vec4 uclamp_Stage1_c0_c0_c0_c0;
+uniform sampler2DRect uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0_c0_c0(vec4 _input, vec2 _coords) {
+ vec4 _output;
+ vec2 inCoord = _coords;
+ vec2 subsetCoord;
+ subsetCoord.x = mod(inCoord.x - usubset_Stage1_c0_c0_c0_c0.x, usubset_Stage1_c0_c0_c0_c0.z - usubset_Stage1_c0_c0_c0_c0.x) + usubset_Stage1_c0_c0_c0_c0.x;
+ subsetCoord.y = mod(inCoord.y - usubset_Stage1_c0_c0_c0_c0.y, usubset_Stage1_c0_c0_c0_c0.w - usubset_Stage1_c0_c0_c0_c0.y) + usubset_Stage1_c0_c0_c0_c0.y;
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage1_c0_c0_c0_c0.x, uclamp_Stage1_c0_c0_c0_c0.z);
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage1_c0_c0_c0_c0.y, uclamp_Stage1_c0_c0_c0_c0.w);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ _output = _input * textureColor;
+ return _output;
+}
+vec4 Bicubic_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coord = vTransformedCoords_0_Stage0 - vec2(0.5);
+ vec2 f = fract(coord);
+ coord += 0.5 - f;
+ vec4 wx = mat4(0.055555555555555552, 0.88888888888888884, 0.055555555555555552, 0.0, -0.5, 0.0, 0.5, 0.0, 0.83333333333333337, -2.0, 1.5, -0.33333333333333331, -0.3888888888888889, 1.1666666666666667, -1.1666666666666667, 0.3888888888888889) * vec4(1.0, f.x, f.x * f.x, (f.x * f.x) * f.x);
+ vec4 wy = mat4(0.055555555555555552, 0.88888888888888884, 0.055555555555555552, 0.0, -0.5, 0.0, 0.5, 0.0, 0.83333333333333337, -2.0, 1.5, -0.33333333333333331, -0.3888888888888889, 1.1666666666666667, -1.1666666666666667, 0.3888888888888889) * vec4(1.0, f.y, f.y * f.y, (f.y * f.y) * f.y);
+ vec4 rowColors[4];
+ rowColors[0] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(-1.0, -1.0));
+ rowColors[1] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(0.0, -1.0));
+ rowColors[2] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(1.0, -1.0));
+ rowColors[3] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(2.0, -1.0));
+ vec4 s0 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ rowColors[0] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(-1.0, 0.0));
+ rowColors[1] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord);
+ rowColors[2] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(1.0, 0.0));
+ rowColors[3] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(2.0, 0.0));
+ vec4 s1 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ rowColors[0] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(-1.0, 1.0));
+ rowColors[1] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(0.0, 1.0));
+ rowColors[2] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(1.0, 1.0));
+ rowColors[3] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(2.0, 1.0));
+ vec4 s2 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ rowColors[0] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(-1.0, 2.0));
+ rowColors[1] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(0.0, 2.0));
+ rowColors[2] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(1.0, 2.0));
+ rowColors[3] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(2.0, 2.0));
+ vec4 s3 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ vec4 bicubicColor = ((wy.x * s0 + wy.y * s1) + wy.z * s2) + wy.w * s3;
+ bicubicColor = clamp(bicubicColor, 0.0, 1.0);
+ _output = bicubicColor * _input;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = Bicubic_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/850-1.shader_test b/shaders/skia/850-1.shader_test
new file mode 100644
index 0000000..c8e4fca
--- /dev/null
+++ b/shaders/skia/850-1.shader_test
@@ -0,0 +1,121 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage2_c0_c0;
+uniform vec4 urightBorderColor_Stage2_c0_c0;
+uniform float ubias_Stage2_c0_c0_c0_c0;
+uniform float uscale_Stage2_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale8_9_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias8_9_Stage2_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage2_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage2_c0_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 SweepGradientLayout_Stage2_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float angle;
+ {
+ angle = atan(-vTransformedCoords_1_Stage0.y, -vTransformedCoords_1_Stage0.x);
+ }
+ float t = ((angle * 0.15915493667125702 + 0.5) + ubias_Stage2_c0_c0_c0_c0) * uscale_Stage2_c0_c0_c0_c0;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage2_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.w) {
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage2_c0_c0_c1_c0;
+ bias = ubias0_1_Stage2_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage2_c0_c0_c1_c0;
+ bias = ubias2_3_Stage2_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage2_c0_c0_c1_c0;
+ bias = ubias4_5_Stage2_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage2_c0_c0_c1_c0;
+ bias = ubias6_7_Stage2_c0_c0_c1_c0;
+ }
+ }
+ } else {
+ {
+ {
+ scale = uscale8_9_Stage2_c0_c0_c1_c0;
+ bias = ubias8_9_Stage2_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = SweepGradientLayout_Stage2_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage2_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage2_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage2_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_dst_in(output_Stage1, ClampedGradientEffect_Stage2_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/850.shader_test b/shaders/skia/850.shader_test
new file mode 100644
index 0000000..e60663d
--- /dev/null
+++ b/shaders/skia/850.shader_test
@@ -0,0 +1,207 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_KHR_blend_equation_advanced : require
+out vec4 sk_FragColor;
+layout (blend_support_all_equations) out ;
+uniform vec2 uImageIncrement_Stage1_c0_c0_c0_c0;
+uniform vec4 uKernel_Stage1_c0_c0_c0_c0[3];
+uniform vec2 ubaseFrequency_Stage1_c1_c0;
+uniform float uz_Stage1_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+uniform sampler2D uTextureSampler_2_Stage1;
+noperspective in vec2 vEllipseOffsets_Stage0;
+noperspective in vec4 vEllipseRadii_Stage0;
+noperspective in vec4 vinColor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 GaussianConvolution_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0 - 5.0 * uImageIncrement_Stage1_c0_c0_c0_c0;
+ vec2 coordSampled = vec2(0.0, 0.0);
+ coordSampled = coord;
+ _output += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c0_c0[0].x;
+ coord += uImageIncrement_Stage1_c0_c0_c0_c0;
+ coordSampled = coord;
+ _output += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c0_c0[0].y;
+ coord += uImageIncrement_Stage1_c0_c0_c0_c0;
+ coordSampled = coord;
+ _output += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c0_c0[0].z;
+ coord += uImageIncrement_Stage1_c0_c0_c0_c0;
+ coordSampled = coord;
+ _output += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c0_c0[0].w;
+ coord += uImageIncrement_Stage1_c0_c0_c0_c0;
+ coordSampled = coord;
+ _output += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c0_c0[1].x;
+ coord += uImageIncrement_Stage1_c0_c0_c0_c0;
+ coordSampled = coord;
+ _output += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c0_c0[1].y;
+ coord += uImageIncrement_Stage1_c0_c0_c0_c0;
+ coordSampled = coord;
+ _output += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c0_c0[1].z;
+ coord += uImageIncrement_Stage1_c0_c0_c0_c0;
+ coordSampled = coord;
+ _output += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c0_c0[1].w;
+ coord += uImageIncrement_Stage1_c0_c0_c0_c0;
+ coordSampled = coord;
+ _output += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c0_c0[2].x;
+ coord += uImageIncrement_Stage1_c0_c0_c0_c0;
+ coordSampled = coord;
+ _output += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c0_c0[2].y;
+ coord += uImageIncrement_Stage1_c0_c0_c0_c0;
+ coordSampled = coord;
+ _output += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c0_c0[2].z;
+ coord += uImageIncrement_Stage1_c0_c0_c0_c0;
+ _output *= _input;
+ return _output;
+}
+vec4 ConfigConversionEffect_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = floor(_input * 255.0 + 0.5) / 255.0;
+ {
+ _output.xyz = floor((_output.xyz * _output.w) * 255.0 + 0.5) / 255.0;
+ }
+ return _output;
+}
+float _blend_color_luminance(vec3 color) {
+ return dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), color);
+}
+vec3 _blend_set_color_luminance(vec3 hueSatColor, float alpha, vec3 lumColor) {
+ float lum = _blend_color_luminance(lumColor);
+ vec3 result = (lum - _blend_color_luminance(hueSatColor)) + hueSatColor;
+ float minComp = min(min(result.x, result.y), result.z);
+ float maxComp = max(max(result.x, result.y), result.z);
+ if (minComp < 0.0 && lum != minComp) {
+ result = lum + ((result - lum) * lum) / (lum - minComp);
+ }
+ if (maxComp > alpha && maxComp != lum) {
+ return lum + ((result - lum) * (alpha - lum)) / (maxComp - lum);
+ }
+ return result;
+}
+vec4 blend_color(vec4 src, vec4 dst) {
+ float alpha = dst.w * src.w;
+ vec3 sda = src.xyz * dst.w;
+ vec3 dsa = dst.xyz * src.w;
+ return vec4((((_blend_set_color_luminance(sda, alpha, dsa) + dst.xyz) - dsa) + src.xyz) - sda, (src.w + dst.w) - alpha);
+}
+vec4 ComposeTwo_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_color(GaussianConvolution_Stage1_c0_c0_c0_c0(inputColor), ConfigConversionEffect_Stage1_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec3 fade_Stage1_c1_c0(vec3 t) {
+ return ((t * t) * t) * (t * (t * 6.0 - 15.0) + 10.0);
+}
+float perm_Stage1_c1_c0(float x) {
+ return texture(uTextureSampler_1_Stage1, vec2(fract(x / 256.0), 0.0)).x * 255.0;
+}
+float grad_Stage1_c1_c0(float x, vec3 p) {
+ return dot(texture(uTextureSampler_2_Stage1, vec2(fract(x / 16.0), 0.0)).xyz * 255.0 - vec3(1.0), p);
+}
+float lerp_Stage1_c1_c0(float a, float b, float w) {
+ return a + w * (b - a);
+}
+float noise_Stage1_c1_c0(vec3 p) {
+ vec3 P = mod(floor(p), 256.0);
+ p -= floor(p);
+ vec3 f = fade_Stage1_c1_c0(p);
+ float A = perm_Stage1_c1_c0(P.x) + P.y;
+ float AA = perm_Stage1_c1_c0(A) + P.z;
+ float AB = perm_Stage1_c1_c0(A + 1.0) + P.z;
+ float B = perm_Stage1_c1_c0(P.x + 1.0) + P.y;
+ float BA = perm_Stage1_c1_c0(B) + P.z;
+ float BB = perm_Stage1_c1_c0(B + 1.0) + P.z;
+ float result = lerp_Stage1_c1_c0(lerp_Stage1_c1_c0(lerp_Stage1_c1_c0(grad_Stage1_c1_c0(perm_Stage1_c1_c0(AA), p), grad_Stage1_c1_c0(perm_Stage1_c1_c0(BA), p + vec3(-1.0, 0.0, 0.0)), f.x), lerp_Stage1_c1_c0(grad_Stage1_c1_c0(perm_Stage1_c1_c0(AB), p + vec3(0.0, -1.0, 0.0)), grad_Stage1_c1_c0(perm_Stage1_c1_c0(BB), p + vec3(-1.0, -1.0, 0.0)), f.x), f.y), lerp_Stage1_c1_c0(lerp_Stage1_c1_c0(grad_Stage1_c1_c0(perm_Stage1_c1_c0(AA + 1.0), p + vec3(0.0, 0.0, -1.0)), grad_Stage1_c1_c0(perm_Stage1_c1_c0(BA + 1.0), p + vec3(-1.0, 0.0, -1.0)), f.x), lerp_Stage1_c1_c0(grad_Stage1_c1_c0(perm_Stage1_c1_c0(AB + 1.0), p + vec3(0.0, -1.0, -1.0)), grad_Stage1_c1_c0(perm_Stage1_c1_c0(BB + 1.0), p + vec3(-1.0, -1.0, -1.0)), f.x), f.y), f.z);
+ return result;
+}
+float noiseOctaves_Stage1_c1_c0(vec3 p) {
+ float result = 0.0;
+ float ratio = 1.0;
+ for (float i = 0.0;i < 6.0; i++) {
+ result += noise_Stage1_c1_c0(p) / ratio;
+ p *= 2.0;
+ ratio *= 2.0;
+ }
+ return (result + 1.0) / 2.0;
+}
+vec4 ImprovedPerlinNoise_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coords = vTransformedCoords_1_Stage0 * ubaseFrequency_Stage1_c1_c0;
+ float r = noiseOctaves_Stage1_c1_c0(vec3(coords, uz_Stage1_c1_c0));
+ float g = noiseOctaves_Stage1_c1_c0(vec3(coords, uz_Stage1_c1_c0));
+ float b = noiseOctaves_Stage1_c1_c0(vec3(coords, uz_Stage1_c1_c0));
+ float a = noiseOctaves_Stage1_c1_c0(vec3(coords, uz_Stage1_c1_c0));
+ _output = vec4(r, g, b, a);
+ _output = clamp(_output, 0.0, 1.0);
+ _output = vec4(_output.xyz * _output.www, _output.w);
+ return _output;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vinColor_Stage0;
+ vec2 offset = vEllipseOffsets_Stage0;
+ offset *= vEllipseRadii_Stage0.xy;
+ float test = dot(offset, offset) - 1.0;
+ vec2 grad = (2.0 * offset) * vEllipseRadii_Stage0.xy;
+ float grad_dot = dot(grad, grad);
+ grad_dot = max(grad_dot, 1.1754999560161448e-38);
+ float invlen = inversesqrt(grad_dot);
+ float edgeAlpha = clamp(0.5 - test * invlen, 0.0, 1.0);
+ offset = vEllipseOffsets_Stage0 * vEllipseRadii_Stage0.zw;
+ test = dot(offset, offset) - 1.0;
+ grad = (2.0 * offset) * vEllipseRadii_Stage0.zw;
+ grad_dot = dot(grad, grad);
+ invlen = inversesqrt(grad_dot);
+ edgeAlpha *= clamp(0.5 + test * invlen, 0.0, 1.0);
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_src_over(ComposeTwo_Stage1_c0_c0(inputColor), ImprovedPerlinNoise_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ sk_FragColor = outputCoverage_Stage0 * output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec2 inEllipseOffset;
+in vec4 inEllipseRadii;
+noperspective out vec2 vEllipseOffsets_Stage0;
+noperspective out vec4 vEllipseRadii_Stage0;
+noperspective out vec4 vinColor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vEllipseOffsets_Stage0 = inEllipseOffset;
+ vEllipseRadii_Stage0 = inEllipseRadii;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/853.shader_test b/shaders/skia/853.shader_test
new file mode 100644
index 0000000..09352e6
--- /dev/null
+++ b/shaders/skia/853.shader_test
@@ -0,0 +1,179 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_KHR_blend_equation_advanced : require
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+layout (blend_support_all_equations) out ;
+uniform vec4 urectH_Stage1_c0_c0_c0_c0;
+uniform float uinvSixSigma_Stage1_c0_c0_c0_c0;
+uniform vec4 ucolor_Stage1_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vEllipseOffsets_Stage0;
+noperspective in vec4 vEllipseRadii_Stage0;
+noperspective in vec4 vinColor_Stage0;
+vec4 RectBlurEffect_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float xCoverage, yCoverage;
+ {
+ float x, y;
+ {
+ x = max(urectH_Stage1_c0_c0_c0_c0.x - gl_FragCoord.x, gl_FragCoord.x - urectH_Stage1_c0_c0_c0_c0.z);
+ y = max(urectH_Stage1_c0_c0_c0_c0.y - gl_FragCoord.y, gl_FragCoord.y - urectH_Stage1_c0_c0_c0_c0.w);
+ }
+ xCoverage = texture(uTextureSampler_0_Stage1, vec2(x * uinvSixSigma_Stage1_c0_c0_c0_c0, 0.5)).w;
+ yCoverage = texture(uTextureSampler_0_Stage1, vec2(y * uinvSixSigma_Stage1_c0_c0_c0_c0, 0.5)).w;
+ _output = (_input * xCoverage) * yCoverage;
+ }
+ _output = (_input * xCoverage) * yCoverage;
+ return _output;
+}
+vec4 ConfigConversionEffect_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = floor(_input * 255.0 + 0.5) / 255.0;
+ {
+ _output.xyz = floor((_output.xyz * _output.w) * 255.0 + 0.5) / 255.0;
+ }
+ return _output;
+}
+float _guarded_divide(float n, float d) {
+ return n / d;
+}
+float _soft_light_component(float sc, float sa, float dc, float da) {
+ if (2.0 * sc <= sa) {
+ return (_guarded_divide((dc * dc) * (sa - 2.0 * sc), da) + (1.0 - da) * sc) + dc * ((-sa + 2.0 * sc) + 1.0);
+ } else if (4.0 * dc <= da) {
+ float DSqd = dc * dc;
+ float DCub = DSqd * dc;
+ float DaSqd = da * da;
+ float DaCub = DaSqd * da;
+ return _guarded_divide(((DaSqd * (sc - dc * ((3.0 * sa - 6.0 * sc) - 1.0)) + ((12.0 * da) * DSqd) * (sa - 2.0 * sc)) - (16.0 * DCub) * (sa - 2.0 * sc)) - DaCub * sc, DaSqd);
+ }
+ return ((dc * ((sa - 2.0 * sc) + 1.0) + sc) - sqrt(da * dc) * (sa - 2.0 * sc)) - da * sc;
+}
+vec4 blend_soft_light(vec4 src, vec4 dst) {
+ if (dst.w == 0.0) {
+ return src;
+ }
+ return vec4(_soft_light_component(src.x, src.w, dst.x, dst.w), _soft_light_component(src.y, src.w, dst.y, dst.w), _soft_light_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+}
+vec4 ComposeTwo_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_soft_light(RectBlurEffect_Stage1_c0_c0_c0_c0(inputColor), ConfigConversionEffect_Stage1_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 ConstColorProcessor_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage1_c1_c0;
+ }
+ return _output;
+}
+float _blend_color_saturation(vec3 color) {
+ return max(max(color.x, color.y), color.z) - min(min(color.x, color.y), color.z);
+}
+vec3 _blend_set_color_saturation_helper(vec3 minMidMax, float sat) {
+ if (minMidMax.x < minMidMax.z) {
+ return vec3(0.0, (sat * (minMidMax.y - minMidMax.x)) / (minMidMax.z - minMidMax.x), sat);
+ }
+ return vec3(0.0);
+}
+vec3 _blend_set_color_saturation(vec3 hueLumColor, vec3 satColor) {
+ float sat = _blend_color_saturation(satColor);
+ if (hueLumColor.x <= hueLumColor.y) {
+ if (hueLumColor.y <= hueLumColor.z) {
+ hueLumColor.xyz = _blend_set_color_saturation_helper(hueLumColor, sat);
+ } else if (hueLumColor.x <= hueLumColor.z) {
+ hueLumColor.xzy = _blend_set_color_saturation_helper(hueLumColor.xzy, sat);
+ } else {
+ hueLumColor.zxy = _blend_set_color_saturation_helper(hueLumColor.zxy, sat);
+ }
+ } else if (hueLumColor.x <= hueLumColor.z) {
+ hueLumColor.yxz = _blend_set_color_saturation_helper(hueLumColor.yxz, sat);
+ } else if (hueLumColor.y <= hueLumColor.z) {
+ hueLumColor.yzx = _blend_set_color_saturation_helper(hueLumColor.yzx, sat);
+ } else {
+ hueLumColor.zyx = _blend_set_color_saturation_helper(hueLumColor.zyx, sat);
+ }
+ return hueLumColor;
+}
+float _blend_color_luminance(vec3 color) {
+ return dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), color);
+}
+vec3 _blend_set_color_luminance(vec3 hueSatColor, float alpha, vec3 lumColor) {
+ float lum = _blend_color_luminance(lumColor);
+ vec3 result = (lum - _blend_color_luminance(hueSatColor)) + hueSatColor;
+ float minComp = min(min(result.x, result.y), result.z);
+ float maxComp = max(max(result.x, result.y), result.z);
+ if (minComp < 0.0 && lum != minComp) {
+ result = lum + ((result - lum) * lum) / (lum - minComp);
+ }
+ if (maxComp > alpha && maxComp != lum) {
+ return lum + ((result - lum) * (alpha - lum)) / (maxComp - lum);
+ }
+ return result;
+}
+vec4 blend_hue(vec4 src, vec4 dst) {
+ float alpha = dst.w * src.w;
+ vec3 sda = src.xyz * dst.w;
+ vec3 dsa = dst.xyz * src.w;
+ return vec4((((_blend_set_color_luminance(_blend_set_color_saturation(sda, dsa), alpha, dsa) + dst.xyz) - dsa) + src.xyz) - sda, (src.w + dst.w) - alpha);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vinColor_Stage0;
+ vec2 offset = vEllipseOffsets_Stage0;
+ offset *= vEllipseRadii_Stage0.xy;
+ float test = dot(offset, offset) - 1.0;
+ vec2 grad = (2.0 * offset) * vEllipseRadii_Stage0.xy;
+ float grad_dot = dot(grad, grad);
+ grad_dot = max(grad_dot, 1.1754999560161448e-38);
+ float invlen = inversesqrt(grad_dot);
+ float edgeAlpha = clamp(0.5 - test * invlen, 0.0, 1.0);
+ offset = vEllipseOffsets_Stage0 * vEllipseRadii_Stage0.zw;
+ test = dot(offset, offset) - 1.0;
+ grad = (2.0 * offset) * vEllipseRadii_Stage0.zw;
+ grad_dot = dot(grad, grad);
+ invlen = inversesqrt(grad_dot);
+ edgeAlpha *= clamp(0.5 + test * invlen, 0.0, 1.0);
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_hue(ComposeTwo_Stage1_c0_c0(inputColor), ConstColorProcessor_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ sk_FragColor = outputCoverage_Stage0 * output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 inPosition;
+in vec4 inColor;
+in vec2 inEllipseOffset;
+in vec4 inEllipseRadii;
+noperspective out vec2 vEllipseOffsets_Stage0;
+noperspective out vec4 vEllipseRadii_Stage0;
+noperspective out vec4 vinColor_Stage0;
+void main() {
+ vEllipseOffsets_Stage0 = inEllipseOffset;
+ vEllipseRadii_Stage0 = inEllipseRadii;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = inPosition;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/856-1.shader_test b/shaders/skia/856-1.shader_test
new file mode 100644
index 0000000..ba58193
--- /dev/null
+++ b/shaders/skia/856-1.shader_test
@@ -0,0 +1,104 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 ufocalParams_Stage2_c0_c0_c0_c0;
+uniform vec4 uscale01_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias01_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale23_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias23_Stage2_c0_c0_c1_c0;
+uniform float uthreshold_Stage2_c0_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage2_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_1_Stage0;
+ float t = -1.0;
+ float v = 1.0;
+ {
+ {
+ float r0_2 = ufocalParams_Stage2_c0_c0_c0_c0.y;
+ t = r0_2 - p.y * p.y;
+ if (t >= 0.0) {
+ t = p.x + sqrt(t);
+ } else {
+ v = -1.0;
+ }
+ }
+ }
+ _output = vec4(t, v, 0.0, 0.0);
+ return _output;
+}
+vec4 DualIntervalGradientColorizer_Stage2_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthreshold_Stage2_c0_c0_c1_c0) {
+ scale = uscale01_Stage2_c0_c0_c1_c0;
+ bias = ubias01_Stage2_c0_c0_c1_c0;
+ } else {
+ scale = uscale23_Stage2_c0_c0_c1_c0;
+ bias = ubias23_Stage2_c0_c0_c1_c0;
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage2_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = DualIntervalGradientColorizer_Stage2_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_dst_in(output_Stage1, TiledGradientEffect_Stage2_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/856.shader_test b/shaders/skia/856.shader_test
new file mode 100644
index 0000000..80897f4
--- /dev/null
+++ b/shaders/skia/856.shader_test
@@ -0,0 +1,251 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uinnerRect_Stage1;
+uniform vec2 uinvRadiiXY_Stage1;
+uniform mat4 um_Stage2;
+uniform vec4 uv_Stage2;
+uniform vec2 uImageIncrement_Stage3;
+uniform float uSurfaceScale_Stage3;
+uniform vec3 uLightColor_Stage3;
+uniform float uKD_Stage3;
+uniform vec4 uTexDom_Stage3;
+uniform vec3 uDecalParams_Stage3;
+uniform vec3 uLightDirection_Stage3;
+uniform sampler2D uTextureSampler_0_Stage3;
+uniform sampler2D uTextureSampler_0_Stage4;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in float vinCoverage_Stage0;
+vec4 light_Stage3(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ float colorScale = uKD_Stage3 * dot(normal, surfaceToLight);
+ return vec4(lightColor * clamp(colorScale, 0.0, 1.0), 1.0);
+}
+float sobel_Stage3(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage3(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage3(float m[9], float surfaceScale) {
+ return pointToNormal_Stage3(sobel_Stage3(0.0, 0.0, m[3], m[4], m[6], m[7], 0.66666698455810547), sobel_Stage3(m[3], m[6], m[4], m[7], 0.0, 0.0, 0.66666698455810547), surfaceScale);
+}
+vec4 ColorTableEffect_Stage4_c0_c0(vec4 _input, vec2 _coords) {
+ vec4 _output;
+ float nonZeroAlpha = max(_input.w, 9.9999997473787516e-05);
+ vec4 coord = vec4(_input.xyz / nonZeroAlpha, nonZeroAlpha);
+ coord = coord * 0.9960939884185791 + vec4(0.0019529999699443579, 0.0019529999699443579, 0.0019529999699443579, 0.0019529999699443579);
+ _output.w = texture(uTextureSampler_0_Stage4, vec2(coord.w, 0.125)).w;
+ _output.x = texture(uTextureSampler_0_Stage4, vec2(coord.x, 0.375)).w;
+ _output.y = texture(uTextureSampler_0_Stage4, vec2(coord.y, 0.625)).w;
+ _output.z = texture(uTextureSampler_0_Stage4, vec2(coord.z, 0.875)).w;
+ _output.xyz *= _output.w;
+ return _output;
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ float alpha = 1.0;
+ alpha = vinCoverage_Stage0;
+ outputCoverage_Stage0 = vec4(alpha);
+ }
+ vec4 output_Stage1;
+ {
+ vec2 dxy0 = uinnerRect_Stage1.xy - gl_FragCoord.xy;
+ vec2 dxy1 = gl_FragCoord.xy - uinnerRect_Stage1.zw;
+ vec2 dxy = max(max(dxy0, dxy1), 0.0);
+ vec2 Z = dxy * uinvRadiiXY_Stage1;
+ float implicit = dot(Z, dxy) - 1.0;
+ float grad_dot = 4.0 * dot(Z, Z);
+ grad_dot = max(grad_dot, 9.9999997473787516e-05);
+ float approx_dist = implicit * inversesqrt(grad_dot);
+ float alpha = clamp(0.5 + approx_dist, 0.0, 1.0);
+ output_Stage1 = outputCoverage_Stage0 * alpha;
+ }
+ vec4 output_Stage2;
+ {
+ vec4 inputColor = output_Stage1;
+ output_Stage2 = um_Stage2 * inputColor + uv_Stage2;
+ {
+ output_Stage2 = clamp(output_Stage2, 0.0, 1.0);
+ }
+ }
+ vec4 output_Stage3;
+ {
+ vec2 coord = vTransformedCoords_0_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage3;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage3.xy, uTexDom_Stage3.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage3, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage3.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage3.y);
+ if (err > uDecalParams_Stage3.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage3.z < 1.0) {
+ err = 0.0;
+ }
+ temp0 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage3;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage3.xy, uTexDom_Stage3.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage3, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage3.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage3.y);
+ if (err > uDecalParams_Stage3.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage3.z < 1.0) {
+ err = 0.0;
+ }
+ temp1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage3;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage3.xy, uTexDom_Stage3.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage3, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage3.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage3.y);
+ if (err > uDecalParams_Stage3.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage3.z < 1.0) {
+ err = 0.0;
+ }
+ temp2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage3;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage3.xy, uTexDom_Stage3.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage3, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage3.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage3.y);
+ if (err > uDecalParams_Stage3.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage3.z < 1.0) {
+ err = 0.0;
+ }
+ temp3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage3.xy, uTexDom_Stage3.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage3, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage3.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage3.y);
+ if (err > uDecalParams_Stage3.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage3.z < 1.0) {
+ err = 0.0;
+ }
+ temp4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage3;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage3.xy, uTexDom_Stage3.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage3, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage3.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage3.y);
+ if (err > uDecalParams_Stage3.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage3.z < 1.0) {
+ err = 0.0;
+ }
+ temp5 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage3;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage3.xy, uTexDom_Stage3.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage3, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage3.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage3.y);
+ if (err > uDecalParams_Stage3.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage3.z < 1.0) {
+ err = 0.0;
+ }
+ temp6 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage3;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage3.xy, uTexDom_Stage3.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage3, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage3.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage3.y);
+ if (err > uDecalParams_Stage3.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage3.z < 1.0) {
+ err = 0.0;
+ }
+ temp7 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage3;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage3.xy, uTexDom_Stage3.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage3, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage3.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage3.y);
+ if (err > uDecalParams_Stage3.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage3.z < 1.0) {
+ err = 0.0;
+ }
+ temp8 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = uLightDirection_Stage3;
+ output_Stage3 = light_Stage3(normal_Stage3(m, uSurfaceScale_Stage3), surfaceToLight, uLightColor_Stage3);
+ output_Stage3 *= output_Stage2;
+ }
+ vec4 output_Stage4;
+ {
+ output_Stage4 = ColorTableEffect_Stage4_c0_c0(output_Stage3, gl_FragCoord.xy);
+ }
+ {
+ sk_FragColor = output_Stage4;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in float inCoverage;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out float vinCoverage_Stage0;
+void main() {
+ vec4 color = inColor;
+ vcolor_Stage0 = color;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ vinCoverage_Stage0 = inCoverage;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/859-1.shader_test b/shaders/skia/859-1.shader_test
new file mode 100644
index 0000000..bd03ad0
--- /dev/null
+++ b/shaders/skia/859-1.shader_test
@@ -0,0 +1,100 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 ufocalParams_Stage2_c0_c0_c0_c0;
+uniform vec4 ustart_Stage2_c0_c0_c1_c0;
+uniform vec4 uend_Stage2_c0_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage2_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_1_Stage0;
+ float t = -1.0;
+ float v = 1.0;
+ {
+ {
+ float x_t = -1.0;
+ {
+ x_t = dot(p, p) / p.x;
+ }
+ {
+ if (x_t <= 0.0) {
+ v = -1.0;
+ }
+ }
+ {
+ {
+ t = x_t;
+ }
+ }
+ }
+ }
+ _output = vec4(t, v, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage2_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage2_c0_c0_c1_c0 + t * uend_Stage2_c0_c0_c1_c0;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage2_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = SingleIntervalGradientColorizer_Stage2_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_dst_in(output_Stage1, TiledGradientEffect_Stage2_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/859.shader_test b/shaders/skia/859.shader_test
new file mode 100644
index 0000000..8172718
--- /dev/null
+++ b/shaders/skia/859.shader_test
@@ -0,0 +1,530 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 ucircle_Stage1_c0_c0_c0_c0_c0_c0;
+uniform vec2 uImageIncrement_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 uKernel_Stage1_c0_c0_c0_c0_c1_c0[4];
+uniform vec2 uKernelOffset_Stage1_c0_c0_c0_c0_c1_c0;
+uniform float uGain_Stage1_c0_c0_c0_c0_c1_c0;
+uniform float uBias_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 uTexDom_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec2 uImageIncrement_Stage1_c0_c0_c1_c0_c0_c0;
+uniform float uSurfaceScale_Stage1_c0_c0_c1_c0_c0_c0;
+uniform vec3 uLightColor_Stage1_c0_c0_c1_c0_c0_c0;
+uniform float uKS_Stage1_c0_c0_c1_c0_c0_c0;
+uniform float uShininess_Stage1_c0_c0_c1_c0_c0_c0;
+uniform vec4 uTexDom_Stage1_c0_c0_c1_c0_c0_c0;
+uniform vec3 uDecalParams_Stage1_c0_c0_c1_c0_c0_c0;
+uniform vec3 uLightDirection_Stage1_c0_c0_c1_c0_c0_c0;
+uniform float uinnerThreshold_Stage1_c1_c0;
+uniform float uouterThreshold_Stage1_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+uniform sampler2D uTextureSampler_2_Stage1;
+uniform sampler2D uTextureSampler_3_Stage1;
+noperspective in vec2 vEllipseOffsets0_Stage0;
+noperspective in vec2 vEllipseOffsets1_Stage0;
+noperspective in vec4 vinColor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+vec4 CircleEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float d;
+ {
+ d = (length((ucircle_Stage1_c0_c0_c0_c0_c0_c0.xy - gl_FragCoord.xy) * ucircle_Stage1_c0_c0_c0_c0_c0_c0.w) - 1.0) * ucircle_Stage1_c0_c0_c0_c0_c0_c0.z;
+ }
+ {
+ _output = d > 0.5 ? _input : vec4(0.0);
+ }
+ return _output;
+}
+vec4 MatrixConvolution_Stage1_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 sum = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0 - uKernelOffset_Stage1_c0_c0_c0_c0_c1_c0 * uImageIncrement_Stage1_c0_c0_c0_c0_c1_c0;
+ vec4 c;
+ {
+ float k = uKernel_Stage1_c0_c0_c0_c0_c1_c0[0].x;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0_c1_c0.xy, uTexDom_Stage1_c0_c0_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c0_c0_c1_c0[0].y;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1_c0_c0_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0_c1_c0.xy, uTexDom_Stage1_c0_c0_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c0_c0_c1_c0[0].z;
+ {
+ vec2 origCoord = coord + vec2(2.0, 0.0) * uImageIncrement_Stage1_c0_c0_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0_c1_c0.xy, uTexDom_Stage1_c0_c0_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c0_c0_c1_c0[0].w;
+ {
+ vec2 origCoord = coord + vec2(3.0, 0.0) * uImageIncrement_Stage1_c0_c0_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0_c1_c0.xy, uTexDom_Stage1_c0_c0_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c0_c0_c1_c0[1].x;
+ {
+ vec2 origCoord = coord + vec2(4.0, 0.0) * uImageIncrement_Stage1_c0_c0_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0_c1_c0.xy, uTexDom_Stage1_c0_c0_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c0_c0_c1_c0[1].y;
+ {
+ vec2 origCoord = coord + vec2(5.0, 0.0) * uImageIncrement_Stage1_c0_c0_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0_c1_c0.xy, uTexDom_Stage1_c0_c0_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c0_c0_c1_c0[1].z;
+ {
+ vec2 origCoord = coord + vec2(6.0, 0.0) * uImageIncrement_Stage1_c0_c0_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0_c1_c0.xy, uTexDom_Stage1_c0_c0_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c0_c0_c1_c0[1].w;
+ {
+ vec2 origCoord = coord + vec2(7.0, 0.0) * uImageIncrement_Stage1_c0_c0_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0_c1_c0.xy, uTexDom_Stage1_c0_c0_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c0_c0_c1_c0[2].x;
+ {
+ vec2 origCoord = coord + vec2(8.0, 0.0) * uImageIncrement_Stage1_c0_c0_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0_c1_c0.xy, uTexDom_Stage1_c0_c0_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c0_c0_c1_c0[2].y;
+ {
+ vec2 origCoord = coord + vec2(9.0, 0.0) * uImageIncrement_Stage1_c0_c0_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0_c1_c0.xy, uTexDom_Stage1_c0_c0_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c0_c0_c1_c0[2].z;
+ {
+ vec2 origCoord = coord + vec2(10.0, 0.0) * uImageIncrement_Stage1_c0_c0_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0_c1_c0.xy, uTexDom_Stage1_c0_c0_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c0_c0_c1_c0[2].w;
+ {
+ vec2 origCoord = coord + vec2(11.0, 0.0) * uImageIncrement_Stage1_c0_c0_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0_c1_c0.xy, uTexDom_Stage1_c0_c0_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c0_c0_c1_c0[3].x;
+ {
+ vec2 origCoord = coord + vec2(12.0, 0.0) * uImageIncrement_Stage1_c0_c0_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0_c1_c0.xy, uTexDom_Stage1_c0_c0_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ _output = sum * uGain_Stage1_c0_c0_c0_c0_c1_c0 + uBias_Stage1_c0_c0_c0_c0_c1_c0;
+ _output.w = clamp(_output.w, 0.0, 1.0);
+ _output.xyz = clamp(_output.xyz, 0.0, _output.w);
+ _output *= _input;
+ return _output;
+}
+vec4 blend_exclusion(vec4 src, vec4 dst) {
+ return vec4((dst.xyz + src.xyz) - (2.0 * dst.xyz) * src.xyz, src.w + (1.0 - src.w) * dst.w);
+}
+vec4 ComposeTwo_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_exclusion(CircleEffect_Stage1_c0_c0_c0_c0_c0_c0(inputColor), MatrixConvolution_Stage1_c0_c0_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 light_Stage1_c0_c0_c1_c0_c0_c0(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ vec3 halfDir = normalize(surfaceToLight + vec3(0.0, 0.0, 1.0));
+ float colorScale = uKS_Stage1_c0_c0_c1_c0_c0_c0 * pow(dot(normal, halfDir), uShininess_Stage1_c0_c0_c1_c0_c0_c0);
+ vec3 color = lightColor * clamp(colorScale, 0.0, 1.0);
+ return vec4(color, max(max(color.x, color.y), color.z));
+}
+float sobel_Stage1_c0_c0_c1_c0_c0_c0(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage1_c0_c0_c1_c0_c0_c0(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage1_c0_c0_c1_c0_c0_c0(float m[9], float surfaceScale) {
+ return pointToNormal_Stage1_c0_c0_c1_c0_c0_c0(sobel_Stage1_c0_c0_c1_c0_c0_c0(0.0, 0.0, m[3], m[4], m[6], m[7], 0.66666698455810547), sobel_Stage1_c0_c0_c1_c0_c0_c0(m[3], m[6], m[4], m[7], 0.0, 0.0, 0.66666698455810547), surfaceScale);
+}
+vec4 SpecularLighting_Stage1_c0_c0_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coord = vTransformedCoords_1_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage1_c0_c0_c1_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c1_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c1_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c1_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c1_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c1_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c1_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp0 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1_c0_c0_c1_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c1_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c1_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c1_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c1_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c1_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c1_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1_c0_c0_c1_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c1_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c1_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c1_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c1_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c1_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c1_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage1_c0_c0_c1_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c1_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c1_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c1_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c1_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c1_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c1_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c1_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c1_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c1_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c1_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c1_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c1_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1_c0_c0_c1_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c1_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c1_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c1_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c1_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c1_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c1_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp5 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage1_c0_c0_c1_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c1_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c1_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c1_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c1_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c1_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c1_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp6 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage1_c0_c0_c1_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c1_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c1_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c1_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c1_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c1_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c1_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp7 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage1_c0_c0_c1_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c1_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c1_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c1_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c1_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c1_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c1_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp8 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = uLightDirection_Stage1_c0_c0_c1_c0_c0_c0;
+ _output = light_Stage1_c0_c0_c1_c0_c0_c0(normal_Stage1_c0_c0_c1_c0_c0_c0(m, uSurfaceScale_Stage1_c0_c0_c1_c0_c0_c0), surfaceToLight, uLightColor_Stage1_c0_c0_c1_c0_c0_c0);
+ _output *= _input;
+ return _output;
+}
+vec4 ColorTableEffect_Stage1_c0_c0_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float nonZeroAlpha = max(_input.w, 9.9999997473787516e-05);
+ vec4 coord = vec4(_input.xyz / nonZeroAlpha, nonZeroAlpha);
+ coord = coord * 0.9960939884185791 + vec4(0.0019529999699443579, 0.0019529999699443579, 0.0019529999699443579, 0.0019529999699443579);
+ _output.w = texture(uTextureSampler_2_Stage1, vec2(coord.w, 0.125)).w;
+ _output.x = texture(uTextureSampler_2_Stage1, vec2(coord.x, 0.375)).w;
+ _output.y = texture(uTextureSampler_2_Stage1, vec2(coord.y, 0.625)).w;
+ _output.z = texture(uTextureSampler_2_Stage1, vec2(coord.z, 0.875)).w;
+ _output.xyz *= _output.w;
+ return _output;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 blend_darken(vec4 src, vec4 dst) {
+ vec4 result = blend_src_over(src, dst);
+ result.xyz = min(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
+ return result;
+}
+vec4 ComposeTwo_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_darken(SpecularLighting_Stage1_c0_c0_c1_c0_c0_c0(inputColor), ColorTableEffect_Stage1_c0_c0_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+float _blend_color_saturation(vec3 color) {
+ return max(max(color.x, color.y), color.z) - min(min(color.x, color.y), color.z);
+}
+vec3 _blend_set_color_saturation_helper(vec3 minMidMax, float sat) {
+ if (minMidMax.x < minMidMax.z) {
+ return vec3(0.0, (sat * (minMidMax.y - minMidMax.x)) / (minMidMax.z - minMidMax.x), sat);
+ }
+ return vec3(0.0);
+}
+vec3 _blend_set_color_saturation(vec3 hueLumColor, vec3 satColor) {
+ float sat = _blend_color_saturation(satColor);
+ if (hueLumColor.x <= hueLumColor.y) {
+ if (hueLumColor.y <= hueLumColor.z) {
+ hueLumColor.xyz = _blend_set_color_saturation_helper(hueLumColor, sat);
+ } else if (hueLumColor.x <= hueLumColor.z) {
+ hueLumColor.xzy = _blend_set_color_saturation_helper(hueLumColor.xzy, sat);
+ } else {
+ hueLumColor.zxy = _blend_set_color_saturation_helper(hueLumColor.zxy, sat);
+ }
+ } else if (hueLumColor.x <= hueLumColor.z) {
+ hueLumColor.yxz = _blend_set_color_saturation_helper(hueLumColor.yxz, sat);
+ } else if (hueLumColor.y <= hueLumColor.z) {
+ hueLumColor.yzx = _blend_set_color_saturation_helper(hueLumColor.yzx, sat);
+ } else {
+ hueLumColor.zyx = _blend_set_color_saturation_helper(hueLumColor.zyx, sat);
+ }
+ return hueLumColor;
+}
+float _blend_color_luminance(vec3 color) {
+ return dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), color);
+}
+vec3 _blend_set_color_luminance(vec3 hueSatColor, float alpha, vec3 lumColor) {
+ float lum = _blend_color_luminance(lumColor);
+ vec3 result = (lum - _blend_color_luminance(hueSatColor)) + hueSatColor;
+ float minComp = min(min(result.x, result.y), result.z);
+ float maxComp = max(max(result.x, result.y), result.z);
+ if (minComp < 0.0 && lum != minComp) {
+ result = lum + ((result - lum) * lum) / (lum - minComp);
+ }
+ if (maxComp > alpha && maxComp != lum) {
+ return lum + ((result - lum) * (alpha - lum)) / (maxComp - lum);
+ }
+ return result;
+}
+vec4 blend_saturation(vec4 src, vec4 dst) {
+ float alpha = dst.w * src.w;
+ vec3 sda = src.xyz * dst.w;
+ vec3 dsa = dst.xyz * src.w;
+ return vec4((((_blend_set_color_luminance(_blend_set_color_saturation(dsa, sda), alpha, dsa) + dst.xyz) - dsa) + src.xyz) - sda, (src.w + dst.w) - alpha);
+}
+vec4 ComposeTwo_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_saturation(ComposeTwo_Stage1_c0_c0_c0_c0(inputColor), ComposeTwo_Stage1_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 AlphaThresholdFragmentProcessor_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 color = _input;
+ vec4 mask_color = texture(uTextureSampler_3_Stage1, vTransformedCoords_2_Stage0);
+ if (mask_color.w < 0.5) {
+ if (color.w > uouterThreshold_Stage1_c1_c0) {
+ float scale = uouterThreshold_Stage1_c1_c0 / color.w;
+ color.xyz *= scale;
+ color.w = uouterThreshold_Stage1_c1_c0;
+ }
+ } else if (color.w < uinnerThreshold_Stage1_c1_c0) {
+ float scale = uinnerThreshold_Stage1_c1_c0 / max(0.0010000000474974513, color.w);
+ color.xyz *= scale;
+ color.w = uinnerThreshold_Stage1_c1_c0;
+ }
+ _output = color;
+ return _output;
+}
+vec4 blend_difference(vec4 src, vec4 dst) {
+ return vec4((src.xyz + dst.xyz) - 2.0 * min(src.xyz * dst.w, dst.xyz * src.w), src.w + (1.0 - src.w) * dst.w);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vinColor_Stage0;
+ vec2 scaledOffset = vEllipseOffsets0_Stage0;
+ float test = dot(scaledOffset, scaledOffset) - 1.0;
+ vec2 duvdx = dFdx(vEllipseOffsets0_Stage0);
+ vec2 duvdy = dFdy(vEllipseOffsets0_Stage0);
+ vec2 grad = vec2(vEllipseOffsets0_Stage0.x * duvdx.x + vEllipseOffsets0_Stage0.y * duvdx.y, vEllipseOffsets0_Stage0.x * duvdy.x + vEllipseOffsets0_Stage0.y * duvdy.y);
+ float grad_dot = 4.0 * dot(grad, grad);
+ grad_dot = max(grad_dot, 1.1754999560161448e-38);
+ float invlen = inversesqrt(grad_dot);
+ float edgeAlpha = clamp(1.0 - test * invlen, 0.0, 1.0);
+ edgeAlpha *= clamp(1.0 + test * invlen, 0.0, 1.0);
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_difference(ComposeTwo_Stage1_c0_c0(inputColor), AlphaThresholdFragmentProcessor_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ sk_FragColor = output_Stage1 * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec2 inEllipseOffsets0;
+in vec2 inEllipseOffsets1;
+noperspective out vec2 vEllipseOffsets0_Stage0;
+noperspective out vec2 vEllipseOffsets1_Stage0;
+noperspective out vec4 vinColor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+void main() {
+ vEllipseOffsets0_Stage0 = inEllipseOffsets0;
+ vEllipseOffsets1_Stage0 = inEllipseOffsets1;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/862-1.shader_test b/shaders/skia/862-1.shader_test
new file mode 100644
index 0000000..b1b4918
--- /dev/null
+++ b/shaders/skia/862-1.shader_test
@@ -0,0 +1,117 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage2_c0_c0;
+uniform vec4 urightBorderColor_Stage2_c0_c0;
+uniform vec2 ufocalParams_Stage2_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage2_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage2_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage2_c0_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage2_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_1_Stage0;
+ float t = -1.0;
+ float v = 1.0;
+ {
+ {
+ float r0_2 = ufocalParams_Stage2_c0_c0_c0_c0.y;
+ t = r0_2 - p.y * p.y;
+ if (t >= 0.0) {
+ t = p.x + sqrt(t);
+ } else {
+ v = -1.0;
+ }
+ }
+ }
+ _output = vec4(t, v, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage2_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage2_c0_c0_c1_c0;
+ bias = ubias0_1_Stage2_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage2_c0_c0_c1_c0;
+ bias = ubias2_3_Stage2_c0_c0_c1_c0;
+ }
+ } else {
+ {
+ scale = uscale4_5_Stage2_c0_c0_c1_c0;
+ bias = ubias4_5_Stage2_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage2_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage2_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage2_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage2_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_dst_in(output_Stage1, ClampedGradientEffect_Stage2_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/865-1.shader_test b/shaders/skia/865-1.shader_test
new file mode 100644
index 0000000..f3a066a
--- /dev/null
+++ b/shaders/skia/865-1.shader_test
@@ -0,0 +1,130 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 ufocalParams_Stage2_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale8_9_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias8_9_Stage2_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage2_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage2_c0_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage2_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_1_Stage0;
+ float t = -1.0;
+ float v = 1.0;
+ {
+ {
+ float r0_2 = ufocalParams_Stage2_c0_c0_c0_c0.y;
+ t = r0_2 - p.y * p.y;
+ if (t >= 0.0) {
+ t = p.x + sqrt(t);
+ } else {
+ v = -1.0;
+ }
+ }
+ }
+ _output = vec4(t, v, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage2_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.w) {
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage2_c0_c0_c1_c0;
+ bias = ubias0_1_Stage2_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage2_c0_c0_c1_c0;
+ bias = ubias2_3_Stage2_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage2_c0_c0_c1_c0;
+ bias = ubias4_5_Stage2_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage2_c0_c0_c1_c0;
+ bias = ubias6_7_Stage2_c0_c0_c1_c0;
+ }
+ }
+ } else {
+ {
+ {
+ scale = uscale8_9_Stage2_c0_c0_c1_c0;
+ bias = ubias8_9_Stage2_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage2_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage2_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_dst_in(output_Stage1, TiledGradientEffect_Stage2_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/865.shader_test b/shaders/skia/865.shader_test
new file mode 100644
index 0000000..39606ef
--- /dev/null
+++ b/shaders/skia/865.shader_test
@@ -0,0 +1,446 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uColor_Stage0;
+uniform float uCoverage_Stage0;
+uniform vec3 uedges_Stage1_c0_c0_c0_c0[2];
+uniform vec2 uImageIncrement_Stage1_c0_c0_c1_c0;
+uniform float uSurfaceScale_Stage1_c0_c0_c1_c0;
+uniform vec3 uLightColor_Stage1_c0_c0_c1_c0;
+uniform float uKS_Stage1_c0_c0_c1_c0;
+uniform float uShininess_Stage1_c0_c0_c1_c0;
+uniform vec4 uTexDom_Stage1_c0_c0_c1_c0;
+uniform vec3 uDecalParams_Stage1_c0_c0_c1_c0;
+uniform vec3 uLightLocation_Stage1_c0_c0_c1_c0;
+uniform float uExponent_Stage1_c0_c0_c1_c0;
+uniform float uCosInnerConeAngle_Stage1_c0_c0_c1_c0;
+uniform float uCosOuterConeAngle_Stage1_c0_c0_c1_c0;
+uniform float uConeScale_Stage1_c0_c0_c1_c0;
+uniform vec3 uS_Stage1_c0_c0_c1_c0;
+uniform vec2 uImageIncrement_Stage1_c1_c0;
+uniform float uSurfaceScale_Stage1_c1_c0;
+uniform vec3 uLightColor_Stage1_c1_c0;
+uniform float uKS_Stage1_c1_c0;
+uniform float uShininess_Stage1_c1_c0;
+uniform vec4 uTexDom_Stage1_c1_c0;
+uniform vec3 uDecalParams_Stage1_c1_c0;
+uniform vec3 uLightDirection_Stage1_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 ConvexPoly_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float alpha = 1.0;
+ float edge;
+ edge = dot(uedges_Stage1_c0_c0_c0_c0[0], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage1_c0_c0_c0_c0[1], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ alpha = 1.0 - alpha;
+ _output = _input * alpha;
+ return _output;
+}
+vec4 light_Stage1_c0_c0_c1_c0(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ vec3 halfDir = normalize(surfaceToLight + vec3(0.0, 0.0, 1.0));
+ float colorScale = uKS_Stage1_c0_c0_c1_c0 * pow(dot(normal, halfDir), uShininess_Stage1_c0_c0_c1_c0);
+ vec3 color = lightColor * clamp(colorScale, 0.0, 1.0);
+ return vec4(color, max(max(color.x, color.y), color.z));
+}
+float sobel_Stage1_c0_c0_c1_c0(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage1_c0_c0_c1_c0(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage1_c0_c0_c1_c0(float m[9], float surfaceScale) {
+ return pointToNormal_Stage1_c0_c0_c1_c0(sobel_Stage1_c0_c0_c1_c0(m[1], m[2], m[4], m[5], 0.0, 0.0, 0.66666698455810547), sobel_Stage1_c0_c0_c1_c0(0.0, 0.0, m[1], m[4], m[2], m[5], 0.66666698455810547), surfaceScale);
+}
+vec3 lightColor_Stage1_c0_c0_c1_c0(vec3 surfaceToLight) {
+ float cosAngle = -dot(surfaceToLight, uS_Stage1_c0_c0_c1_c0);
+ if (cosAngle < uCosOuterConeAngle_Stage1_c0_c0_c1_c0) {
+ return vec3(0.0);
+ }
+ float scale = pow(cosAngle, uExponent_Stage1_c0_c0_c1_c0);
+ if (cosAngle < uCosInnerConeAngle_Stage1_c0_c0_c1_c0) {
+ return ((uLightColor_Stage1_c0_c0_c1_c0 * scale) * (cosAngle - uCosOuterConeAngle_Stage1_c0_c0_c1_c0)) * uConeScale_Stage1_c0_c0_c1_c0;
+ }
+ return uLightColor_Stage1_c0_c0_c1_c0;
+}
+vec4 SpecularLighting_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coord = vTransformedCoords_0_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage1_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c1_c0.xy, uTexDom_Stage1_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp0 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c1_c0.xy, uTexDom_Stage1_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c1_c0.xy, uTexDom_Stage1_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage1_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c1_c0.xy, uTexDom_Stage1_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c1_c0.xy, uTexDom_Stage1_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c1_c0.xy, uTexDom_Stage1_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp5 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage1_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c1_c0.xy, uTexDom_Stage1_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp6 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage1_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c1_c0.xy, uTexDom_Stage1_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp7 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage1_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c1_c0.xy, uTexDom_Stage1_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp8 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = normalize(uLightLocation_Stage1_c0_c0_c1_c0 - vec3(gl_FragCoord.xy, uSurfaceScale_Stage1_c0_c0_c1_c0 * m[4]));
+ _output = light_Stage1_c0_c0_c1_c0(normal_Stage1_c0_c0_c1_c0(m, uSurfaceScale_Stage1_c0_c0_c1_c0), surfaceToLight, lightColor_Stage1_c0_c0_c1_c0(surfaceToLight));
+ _output *= _input;
+ return _output;
+}
+float _blend_color_luminance(vec3 color) {
+ return dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), color);
+}
+vec3 _blend_set_color_luminance(vec3 hueSatColor, float alpha, vec3 lumColor) {
+ float lum = _blend_color_luminance(lumColor);
+ vec3 result = (lum - _blend_color_luminance(hueSatColor)) + hueSatColor;
+ float minComp = min(min(result.x, result.y), result.z);
+ float maxComp = max(max(result.x, result.y), result.z);
+ if (minComp < 0.0 && lum != minComp) {
+ result = lum + ((result - lum) * lum) / (lum - minComp);
+ }
+ if (maxComp > alpha && maxComp != lum) {
+ return lum + ((result - lum) * (alpha - lum)) / (maxComp - lum);
+ }
+ return result;
+}
+vec4 blend_luminosity(vec4 src, vec4 dst) {
+ float alpha = dst.w * src.w;
+ vec3 sda = src.xyz * dst.w;
+ vec3 dsa = dst.xyz * src.w;
+ return vec4((((_blend_set_color_luminance(dsa, alpha, sda) + dst.xyz) - dsa) + src.xyz) - sda, (src.w + dst.w) - alpha);
+}
+vec4 ComposeTwo_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_luminosity(ConvexPoly_Stage1_c0_c0_c0_c0(inputColor), SpecularLighting_Stage1_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 light_Stage1_c1_c0(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ vec3 halfDir = normalize(surfaceToLight + vec3(0.0, 0.0, 1.0));
+ float colorScale = uKS_Stage1_c1_c0 * pow(dot(normal, halfDir), uShininess_Stage1_c1_c0);
+ vec3 color = lightColor * clamp(colorScale, 0.0, 1.0);
+ return vec4(color, max(max(color.x, color.y), color.z));
+}
+float sobel_Stage1_c1_c0(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage1_c1_c0(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage1_c1_c0(float m[9], float surfaceScale) {
+ return pointToNormal_Stage1_c1_c0(sobel_Stage1_c1_c0(0.0, 0.0, m[3], m[5], m[6], m[8], 0.33333298563957214), sobel_Stage1_c1_c0(0.0, 0.0, m[4], m[7], m[5], m[8], 0.5), surfaceScale);
+}
+vec4 SpecularLighting_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coord = vTransformedCoords_1_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage1_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0.xy, uTexDom_Stage1_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp0 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0.xy, uTexDom_Stage1_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0.xy, uTexDom_Stage1_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage1_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0.xy, uTexDom_Stage1_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0.xy, uTexDom_Stage1_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0.xy, uTexDom_Stage1_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp5 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage1_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0.xy, uTexDom_Stage1_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp6 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage1_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0.xy, uTexDom_Stage1_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp7 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage1_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0.xy, uTexDom_Stage1_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp8 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = uLightDirection_Stage1_c1_c0;
+ _output = light_Stage1_c1_c0(normal_Stage1_c1_c0(m, uSurfaceScale_Stage1_c1_c0), surfaceToLight, uLightColor_Stage1_c1_c0);
+ _output *= _input;
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = uColor_Stage0;
+ outputCoverage_Stage0 = vec4(uCoverage_Stage0);
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_src_in(ComposeTwo_Stage1_c0_c0(inputColor), SpecularLighting_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ sk_FragColor = (1.0 - output_Stage1.w) * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 inPosition;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vec2 pos2 = (uViewM_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/868-1.shader_test b/shaders/skia/868-1.shader_test
new file mode 100644
index 0000000..ac75182
--- /dev/null
+++ b/shaders/skia/868-1.shader_test
@@ -0,0 +1,126 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 ufocalParams_Stage2_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage2_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage2_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage2_c0_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage2_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_1_Stage0;
+ float t = -1.0;
+ {
+ {
+ float invR1 = ufocalParams_Stage2_c0_c0_c0_c0.x;
+ float x_t = -1.0;
+ {
+ x_t = length(p) - p.x * invR1;
+ }
+ {
+ {
+ t = x_t;
+ }
+ }
+ {
+ t = 1.0 - t;
+ }
+ }
+ }
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage2_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage2_c0_c0_c1_c0;
+ bias = ubias0_1_Stage2_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage2_c0_c0_c1_c0;
+ bias = ubias2_3_Stage2_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage2_c0_c0_c1_c0;
+ bias = ubias4_5_Stage2_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage2_c0_c0_c1_c0;
+ bias = ubias6_7_Stage2_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage2_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage2_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_dst_in(output_Stage1, TiledGradientEffect_Stage2_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/868.shader_test b/shaders/skia/868.shader_test
new file mode 100644
index 0000000..db3c2b8
--- /dev/null
+++ b/shaders/skia/868.shader_test
@@ -0,0 +1,396 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uinnerRect_Stage1_c0_c0_c0_c0_c0_c0;
+uniform vec4 uinvRadiiLTRB_Stage1_c0_c0_c0_c0_c0_c0;
+uniform vec2 uImageIncrement_Stage1_c0_c0_c0_c0_c1_c0;
+uniform float uSurfaceScale_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec3 uLightColor_Stage1_c0_c0_c0_c0_c1_c0;
+uniform float uKD_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 uTexDom_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec3 uDecalParams_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec3 uLightLocation_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec2 uScale_Stage1_c0_c0_c1_c0;
+uniform vec4 uTexDom_Stage1_c0_c0_c1_c0;
+uniform vec3 uDecalParams_Stage1_c0_c0_c1_c0;
+uniform vec2 ubaseFrequency_Stage1_c1_c0;
+uniform float uz_Stage1_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+uniform sampler2D uTextureSampler_2_Stage1;
+uniform sampler2D uTextureSampler_3_Stage1;
+uniform sampler2D uTextureSampler_4_Stage1;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+noperspective in vec3 vTransformedCoords_3_Stage0;
+noperspective in float vinCoverage_Stage0;
+vec4 EllipticalRRect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 dxy0 = uinnerRect_Stage1_c0_c0_c0_c0_c0_c0.xy - gl_FragCoord.xy;
+ vec2 dxy1 = gl_FragCoord.xy - uinnerRect_Stage1_c0_c0_c0_c0_c0_c0.zw;
+ vec2 dxy = max(max(dxy0, dxy1), 0.0);
+ vec2 Z = max(max(dxy0 * uinvRadiiLTRB_Stage1_c0_c0_c0_c0_c0_c0.xy, dxy1 * uinvRadiiLTRB_Stage1_c0_c0_c0_c0_c0_c0.zw), 0.0);
+ float implicit = dot(Z, dxy) - 1.0;
+ float grad_dot = 4.0 * dot(Z, Z);
+ grad_dot = max(grad_dot, 9.9999997473787516e-05);
+ float approx_dist = implicit * inversesqrt(grad_dot);
+ float alpha = clamp(0.5 + approx_dist, 0.0, 1.0);
+ _output = _input * alpha;
+ return _output;
+}
+vec4 light_Stage1_c0_c0_c0_c0_c1_c0(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ float colorScale = uKD_Stage1_c0_c0_c0_c0_c1_c0 * dot(normal, surfaceToLight);
+ return vec4(lightColor * clamp(colorScale, 0.0, 1.0), 1.0);
+}
+float sobel_Stage1_c0_c0_c0_c0_c1_c0(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage1_c0_c0_c0_c0_c1_c0(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage1_c0_c0_c0_c0_c1_c0(float m[9], float surfaceScale) {
+ return pointToNormal_Stage1_c0_c0_c0_c0_c1_c0(sobel_Stage1_c0_c0_c0_c0_c1_c0(0.0, 0.0, m[3], m[5], m[6], m[8], 0.33333298563957214), sobel_Stage1_c0_c0_c0_c0_c1_c0(0.0, 0.0, m[4], m[7], m[5], m[8], 0.5), surfaceScale);
+}
+vec4 DiffuseLighting_Stage1_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coord = vTransformedCoords_0_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage1_c0_c0_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0_c1_c0.xy, uTexDom_Stage1_c0_c0_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp0 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1_c0_c0_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0_c1_c0.xy, uTexDom_Stage1_c0_c0_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1_c0_c0_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0_c1_c0.xy, uTexDom_Stage1_c0_c0_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage1_c0_c0_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0_c1_c0.xy, uTexDom_Stage1_c0_c0_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0_c1_c0.xy, uTexDom_Stage1_c0_c0_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1_c0_c0_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0_c1_c0.xy, uTexDom_Stage1_c0_c0_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp5 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage1_c0_c0_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0_c1_c0.xy, uTexDom_Stage1_c0_c0_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp6 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage1_c0_c0_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0_c1_c0.xy, uTexDom_Stage1_c0_c0_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp7 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage1_c0_c0_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0_c1_c0.xy, uTexDom_Stage1_c0_c0_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp8 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = normalize(uLightLocation_Stage1_c0_c0_c0_c0_c1_c0 - vec3(gl_FragCoord.xy, uSurfaceScale_Stage1_c0_c0_c0_c0_c1_c0 * m[4]));
+ _output = light_Stage1_c0_c0_c0_c0_c1_c0(normal_Stage1_c0_c0_c0_c0_c1_c0(m, uSurfaceScale_Stage1_c0_c0_c0_c0_c1_c0), surfaceToLight, uLightColor_Stage1_c0_c0_c0_c0_c1_c0);
+ _output *= _input;
+ return _output;
+}
+vec4 blend_modulate(vec4 src, vec4 dst) {
+ return src * dst;
+}
+vec4 ComposeTwo_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_modulate(EllipticalRRect_Stage1_c0_c0_c0_c0_c0_c0(inputColor), DiffuseLighting_Stage1_c0_c0_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 DisplacementMap_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 dColor = texture(uTextureSampler_1_Stage1, vTransformedCoords_1_Stage0);
+ dColor.xyz = dColor.w < 9.9999999747524271e-07 ? vec3(0.0) : clamp(dColor.xyz / dColor.w, 0.0, 1.0);
+ vec2 cCoords = vTransformedCoords_2_Stage0 + uScale_Stage1_c0_c0_c1_c0 * (dColor.yy - vec2(0.5));
+ {
+ vec2 origCoord = cCoords;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c1_c0.xy, uTexDom_Stage1_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ _output = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ return _output;
+}
+float _blend_color_saturation(vec3 color) {
+ return max(max(color.x, color.y), color.z) - min(min(color.x, color.y), color.z);
+}
+vec3 _blend_set_color_saturation_helper(vec3 minMidMax, float sat) {
+ if (minMidMax.x < minMidMax.z) {
+ return vec3(0.0, (sat * (minMidMax.y - minMidMax.x)) / (minMidMax.z - minMidMax.x), sat);
+ }
+ return vec3(0.0);
+}
+vec3 _blend_set_color_saturation(vec3 hueLumColor, vec3 satColor) {
+ float sat = _blend_color_saturation(satColor);
+ if (hueLumColor.x <= hueLumColor.y) {
+ if (hueLumColor.y <= hueLumColor.z) {
+ hueLumColor.xyz = _blend_set_color_saturation_helper(hueLumColor, sat);
+ } else if (hueLumColor.x <= hueLumColor.z) {
+ hueLumColor.xzy = _blend_set_color_saturation_helper(hueLumColor.xzy, sat);
+ } else {
+ hueLumColor.zxy = _blend_set_color_saturation_helper(hueLumColor.zxy, sat);
+ }
+ } else if (hueLumColor.x <= hueLumColor.z) {
+ hueLumColor.yxz = _blend_set_color_saturation_helper(hueLumColor.yxz, sat);
+ } else if (hueLumColor.y <= hueLumColor.z) {
+ hueLumColor.yzx = _blend_set_color_saturation_helper(hueLumColor.yzx, sat);
+ } else {
+ hueLumColor.zyx = _blend_set_color_saturation_helper(hueLumColor.zyx, sat);
+ }
+ return hueLumColor;
+}
+float _blend_color_luminance(vec3 color) {
+ return dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), color);
+}
+vec3 _blend_set_color_luminance(vec3 hueSatColor, float alpha, vec3 lumColor) {
+ float lum = _blend_color_luminance(lumColor);
+ vec3 result = (lum - _blend_color_luminance(hueSatColor)) + hueSatColor;
+ float minComp = min(min(result.x, result.y), result.z);
+ float maxComp = max(max(result.x, result.y), result.z);
+ if (minComp < 0.0 && lum != minComp) {
+ result = lum + ((result - lum) * lum) / (lum - minComp);
+ }
+ if (maxComp > alpha && maxComp != lum) {
+ return lum + ((result - lum) * (alpha - lum)) / (maxComp - lum);
+ }
+ return result;
+}
+vec4 blend_hue(vec4 src, vec4 dst) {
+ float alpha = dst.w * src.w;
+ vec3 sda = src.xyz * dst.w;
+ vec3 dsa = dst.xyz * src.w;
+ return vec4((((_blend_set_color_luminance(_blend_set_color_saturation(sda, dsa), alpha, dsa) + dst.xyz) - dsa) + src.xyz) - sda, (src.w + dst.w) - alpha);
+}
+vec4 ComposeTwo_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_hue(ComposeTwo_Stage1_c0_c0_c0_c0(inputColor), DisplacementMap_Stage1_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec3 fade_Stage1_c1_c0(vec3 t) {
+ return ((t * t) * t) * (t * (t * 6.0 - 15.0) + 10.0);
+}
+float perm_Stage1_c1_c0(float x) {
+ return texture(uTextureSampler_3_Stage1, vec2(fract(x / 256.0), 0.0)).x * 255.0;
+}
+float grad_Stage1_c1_c0(float x, vec3 p) {
+ return dot(texture(uTextureSampler_4_Stage1, vec2(fract(x / 16.0), 0.0)).xyz * 255.0 - vec3(1.0), p);
+}
+float lerp_Stage1_c1_c0(float a, float b, float w) {
+ return a + w * (b - a);
+}
+float noise_Stage1_c1_c0(vec3 p) {
+ vec3 P = mod(floor(p), 256.0);
+ p -= floor(p);
+ vec3 f = fade_Stage1_c1_c0(p);
+ float A = perm_Stage1_c1_c0(P.x) + P.y;
+ float AA = perm_Stage1_c1_c0(A) + P.z;
+ float AB = perm_Stage1_c1_c0(A + 1.0) + P.z;
+ float B = perm_Stage1_c1_c0(P.x + 1.0) + P.y;
+ float BA = perm_Stage1_c1_c0(B) + P.z;
+ float BB = perm_Stage1_c1_c0(B + 1.0) + P.z;
+ float result = lerp_Stage1_c1_c0(lerp_Stage1_c1_c0(lerp_Stage1_c1_c0(grad_Stage1_c1_c0(perm_Stage1_c1_c0(AA), p), grad_Stage1_c1_c0(perm_Stage1_c1_c0(BA), p + vec3(-1.0, 0.0, 0.0)), f.x), lerp_Stage1_c1_c0(grad_Stage1_c1_c0(perm_Stage1_c1_c0(AB), p + vec3(0.0, -1.0, 0.0)), grad_Stage1_c1_c0(perm_Stage1_c1_c0(BB), p + vec3(-1.0, -1.0, 0.0)), f.x), f.y), lerp_Stage1_c1_c0(lerp_Stage1_c1_c0(grad_Stage1_c1_c0(perm_Stage1_c1_c0(AA + 1.0), p + vec3(0.0, 0.0, -1.0)), grad_Stage1_c1_c0(perm_Stage1_c1_c0(BA + 1.0), p + vec3(-1.0, 0.0, -1.0)), f.x), lerp_Stage1_c1_c0(grad_Stage1_c1_c0(perm_Stage1_c1_c0(AB + 1.0), p + vec3(0.0, -1.0, -1.0)), grad_Stage1_c1_c0(perm_Stage1_c1_c0(BB + 1.0), p + vec3(-1.0, -1.0, -1.0)), f.x), f.y), f.z);
+ return result;
+}
+float noiseOctaves_Stage1_c1_c0(vec3 p) {
+ float result = 0.0;
+ float ratio = 1.0;
+ for (float i = 0.0;i < 4.0; i++) {
+ result += noise_Stage1_c1_c0(p) / ratio;
+ p *= 2.0;
+ ratio *= 2.0;
+ }
+ return (result + 1.0) / 2.0;
+}
+vec4 ImprovedPerlinNoise_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 vTransformedCoords_3_Stage0_ensure2D = vTransformedCoords_3_Stage0.xy / vTransformedCoords_3_Stage0.z;
+ vec2 coords = vTransformedCoords_3_Stage0_ensure2D * ubaseFrequency_Stage1_c1_c0;
+ float r = noiseOctaves_Stage1_c1_c0(vec3(coords, uz_Stage1_c1_c0));
+ float g = noiseOctaves_Stage1_c1_c0(vec3(coords, uz_Stage1_c1_c0));
+ float b = noiseOctaves_Stage1_c1_c0(vec3(coords, uz_Stage1_c1_c0));
+ float a = noiseOctaves_Stage1_c1_c0(vec3(coords, uz_Stage1_c1_c0));
+ _output = vec4(r, g, b, a);
+ _output = clamp(_output, 0.0, 1.0);
+ _output = vec4(_output.xyz * _output.www, _output.w);
+ return _output;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 blend_lighten(vec4 src, vec4 dst) {
+ vec4 result = blend_src_over(src, dst);
+ result.xyz = max(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
+ return result;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ float alpha = 1.0;
+ alpha = vinCoverage_Stage0;
+ outputCoverage_Stage0 = vec4(alpha);
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_lighten(ComposeTwo_Stage1_c0_c0(inputColor), ImprovedPerlinNoise_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ sk_FragColor = output_Stage1 * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+uniform mat3 uCoordTransformMatrix_3_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in float inCoverage;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+noperspective out vec3 vTransformedCoords_3_Stage0;
+noperspective out float vinCoverage_Stage0;
+void main() {
+ vec4 color = inColor;
+ vcolor_Stage0 = color;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_3_Stage0 = uCoordTransformMatrix_3_Stage0 * vec3(inPosition, 1.0);
+ vinCoverage_Stage0 = inCoverage;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/871-1.shader_test b/shaders/skia/871-1.shader_test
new file mode 100644
index 0000000..377a668
--- /dev/null
+++ b/shaders/skia/871-1.shader_test
@@ -0,0 +1,93 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 ufocalParams_Stage2_c0_c0_c0_c0;
+uniform vec4 ustart_Stage2_c0_c0_c1_c0;
+uniform vec4 uend_Stage2_c0_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage2_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_1_Stage0;
+ float t = -1.0;
+ float v = 1.0;
+ {
+ {
+ float r0_2 = ufocalParams_Stage2_c0_c0_c0_c0.y;
+ t = r0_2 - p.y * p.y;
+ if (t >= 0.0) {
+ t = p.x + sqrt(t);
+ } else {
+ v = -1.0;
+ }
+ }
+ }
+ _output = vec4(t, v, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage2_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage2_c0_c0_c1_c0 + t * uend_Stage2_c0_c0_c1_c0;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage2_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = SingleIntervalGradientColorizer_Stage2_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_dst_in(output_Stage1, TiledGradientEffect_Stage2_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/874-1.shader_test b/shaders/skia/874-1.shader_test
new file mode 100644
index 0000000..23e2337
--- /dev/null
+++ b/shaders/skia/874-1.shader_test
@@ -0,0 +1,110 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 ufocalParams_Stage2_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage2_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage2_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage2_c0_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage2_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_1_Stage0;
+ float t = -1.0;
+ {
+ {
+ float r0 = ufocalParams_Stage2_c0_c0_c0_c0.x;
+ {
+ t = length(p) - r0;
+ }
+ }
+ }
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage2_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage2_c0_c0_c1_c0;
+ bias = ubias0_1_Stage2_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage2_c0_c0_c1_c0;
+ bias = ubias2_3_Stage2_c0_c0_c1_c0;
+ }
+ } else {
+ {
+ scale = uscale4_5_Stage2_c0_c0_c1_c0;
+ bias = ubias4_5_Stage2_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage2_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else {
+ {
+ t.x = fract(t.x);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage2_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_dst_in(output_Stage1, TiledGradientEffect_Stage2_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/874.shader_test b/shaders/skia/874.shader_test
new file mode 100644
index 0000000..d0fb6d0
--- /dev/null
+++ b/shaders/skia/874.shader_test
@@ -0,0 +1,238 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform float uPixelSize_Stage1;
+uniform vec2 uRange_Stage1;
+uniform vec4 ucircleData_Stage2;
+uniform vec4 uleftBorderColor_Stage3_c0_c0;
+uniform vec4 urightBorderColor_Stage3_c0_c0;
+uniform vec4 uscale0_1_Stage3_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage3_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage3_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage3_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage3_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage3_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage3_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage3_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage3_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage3_c0_c0_c1_c0;
+uniform vec2 ubaseFrequency_Stage4_c1_c0;
+uniform vec2 ustitchData_Stage4_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+uniform sampler2D uTextureSampler_0_Stage4;
+uniform sampler2D uTextureSampler_1_Stage4;
+in vec2 vTextureCoords_Stage0;
+flat in int vTexIndex_Stage0;
+in vec2 vIntTextureCoords_Stage0;
+in vec4 vinColor_Stage0;
+in vec2 vTransformedCoords_0_Stage0;
+in vec2 vTransformedCoords_1_Stage0;
+in vec2 vTransformedCoords_2_Stage0;
+vec4 LinearGradientLayout_Stage3_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_1_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage3_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage3_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage3_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage3_c0_c0_c1_c0;
+ bias = ubias0_1_Stage3_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage3_c0_c0_c1_c0;
+ bias = ubias2_3_Stage3_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage3_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage3_c0_c0_c1_c0;
+ bias = ubias4_5_Stage3_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage3_c0_c0_c1_c0;
+ bias = ubias6_7_Stage3_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage3_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage3_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage3_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage3_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage3_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+float perlinnoise_Stage4_c1_c0(float chanCoord, vec2 noiseVec, vec2 stitchData) {
+ vec4 floorVal;
+ floorVal.xy = floor(noiseVec);
+ floorVal.zw = floorVal.xy + vec2(1.0);
+ vec2 fractVal = fract(noiseVec);
+ vec2 noiseSmooth = (fractVal * fractVal) * (vec2(3.0) - vec2(2.0) * fractVal);
+ if (floorVal.x >= stitchData.x) {
+ floorVal.x -= stitchData.x;
+ }
+ if (floorVal.y >= stitchData.y) {
+ floorVal.y -= stitchData.y;
+ }
+ if (floorVal.z >= stitchData.x) {
+ floorVal.z -= stitchData.x;
+ }
+ if (floorVal.w >= stitchData.y) {
+ floorVal.w -= stitchData.y;
+ }
+ floorVal = fract(floor(mod(floorVal, 256.0)) / vec4(256.0));
+ vec2 latticeIdx;
+ latticeIdx.x = texture(uTextureSampler_0_Stage4, vec2(floorVal.x, 0.5)).x;
+ latticeIdx.y = texture(uTextureSampler_0_Stage4, vec2(floorVal.z, 0.5)).x;
+ vec4 bcoords = fract(latticeIdx.xyxy + floorVal.yyww);
+ vec2 uv;
+ vec4 lattice = texture(uTextureSampler_1_Stage4, vec2(bcoords.x, chanCoord)).zyxw;
+ uv.x = dot((lattice.yw + lattice.xz * vec2(0.00390625)) * vec2(2.0) - vec2(1.0), fractVal);
+ fractVal.x -= 1.0;
+ lattice = texture(uTextureSampler_1_Stage4, vec2(bcoords.y, chanCoord)).zyxw;
+ uv.y = dot((lattice.yw + lattice.xz * vec2(0.00390625)) * vec2(2.0) - vec2(1.0), fractVal);
+ vec2 ab;
+ ab.x = mix(uv.x, uv.y, noiseSmooth.x);
+ fractVal.y -= 1.0;
+ lattice = texture(uTextureSampler_1_Stage4, vec2(bcoords.w, chanCoord)).zyxw;
+ uv.y = dot((lattice.yw + lattice.xz * vec2(0.00390625)) * vec2(2.0) - vec2(1.0), fractVal);
+ fractVal.x += 1.0;
+ lattice = texture(uTextureSampler_1_Stage4, vec2(bcoords.z, chanCoord)).zyxw;
+ uv.x = dot((lattice.yw + lattice.xz * vec2(0.00390625)) * vec2(2.0) - vec2(1.0), fractVal);
+ ab.y = mix(uv.x, uv.y, noiseSmooth.x);
+ return mix(ab.x, ab.y, noiseSmooth.y);
+}
+vec4 PerlinNoise_Stage4_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 noiseVec = floor(vTransformedCoords_2_Stage0) * ubaseFrequency_Stage4_c1_c0;
+ _output = vec4(0.0);
+ vec2 stitchData = ustitchData_Stage4_c1_c0;
+ float ratio = 1.0;
+ for (int octave = 0;octave < 8; ++octave) {
+ _output += vec4(perlinnoise_Stage4_c1_c0(0.125, noiseVec, stitchData), perlinnoise_Stage4_c1_c0(0.375, noiseVec, stitchData), perlinnoise_Stage4_c1_c0(0.625, noiseVec, stitchData), perlinnoise_Stage4_c1_c0(0.875, noiseVec, stitchData)) * ratio;
+ noiseVec *= vec2(2.0);
+ ratio *= 0.5;
+ stitchData *= vec2(2.0);
+ }
+ _output = _output * vec4(0.5) + vec4(0.5);
+ _output = clamp(_output, 0.0, 1.0);
+ _output = vec4(_output.xyz * _output.www, _output.w);
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vinColor_Stage0;
+ vec2 uv = vTextureCoords_Stage0;
+ vec4 texColor;
+ {
+ texColor = texture(uTextureSampler_0_Stage0, uv);
+ }
+ float distance = 7.96875 * (texColor.x - 0.50196081399917603);
+ float afwidth;
+ vec2 dist_grad = vec2(dFdx(distance), -dFdy(distance));
+ float dg_len2 = dot(dist_grad, dist_grad);
+ if (dg_len2 < 9.9999997473787516e-05) {
+ dist_grad = vec2(0.70709997415542603, 0.70709997415542603);
+ } else {
+ dist_grad = dist_grad * inversesqrt(dg_len2);
+ }
+ vec2 Jdx = dFdx(vIntTextureCoords_Stage0);
+ vec2 Jdy = -dFdy(vIntTextureCoords_Stage0);
+ vec2 grad = vec2(dist_grad.x * Jdx.x + dist_grad.y * Jdy.x, dist_grad.x * Jdx.y + dist_grad.y * Jdy.y);
+ afwidth = 0.64999997615814209 * length(grad);
+ float val = smoothstep(-afwidth, afwidth, distance);
+ outputCoverage_Stage0 = vec4(val);
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = vec4(1.0, 1.0, 1.0, 1.0);
+ vec2 coord = vTransformedCoords_0_Stage0;
+ coord.y -= 4.0 * uPixelSize_Stage1;
+ for (int i = 0;i < 9; i++) {
+ output_Stage1 = min(output_Stage1, texture(uTextureSampler_0_Stage1, coord));
+ coord.y += uPixelSize_Stage1;
+ }
+ output_Stage1 *= outputCoverage_Stage0;
+ }
+ vec4 output_Stage2;
+ {
+ vec2 vec = vec2((gl_FragCoord.x - ucircleData_Stage2.x) * ucircleData_Stage2.w, (gl_FragCoord.y - ucircleData_Stage2.y) * ucircleData_Stage2.w);
+ float dist = length(vec) + (0.5 - ucircleData_Stage2.z) * ucircleData_Stage2.w;
+ output_Stage2 = output_Stage1 * texture(uTextureSampler_0_Stage2, vec2(dist, 0.5)).w;
+ }
+ vec4 output_Stage3;
+ {
+ output_Stage3 = blend_dst_in(output_Stage2, ClampedGradientEffect_Stage3_c0_c0(vec4(1.0)));
+ }
+ vec4 output_Stage4;
+ {
+ output_Stage4 = blend_dst_in(output_Stage3, PerlinNoise_Stage4_c1_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = outputColor_Stage0 * output_Stage4;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform vec2 uAtlasDimensionsInv_Stage0;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in uvec2 inTextureCoords;
+out vec2 vTextureCoords_Stage0;
+flat out int vTexIndex_Stage0;
+out vec2 vIntTextureCoords_Stage0;
+out vec4 vinColor_Stage0;
+out vec2 vTransformedCoords_0_Stage0;
+out vec2 vTransformedCoords_1_Stage0;
+out vec2 vTransformedCoords_2_Stage0;
+void main() {
+ ivec2 signedCoords = ivec2(int(inTextureCoords.x), int(inTextureCoords.y));
+ vec2 unormTexCoords = vec2(float(signedCoords.x / 2), float(signedCoords.y / 2));
+ vTextureCoords_Stage0 = unormTexCoords * uAtlasDimensionsInv_Stage0;
+ vTexIndex_Stage0 = 0;
+ vIntTextureCoords_Stage0 = unormTexCoords;
+ vinColor_Stage0 = inColor;
+ vec3 pos3 = uViewM_Stage0 * vec3(inPosition, 1.0);
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos3.x, pos3.y, 0.0, pos3.z);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/877-1.shader_test b/shaders/skia/877-1.shader_test
new file mode 100644
index 0000000..4f4d847
--- /dev/null
+++ b/shaders/skia/877-1.shader_test
@@ -0,0 +1,129 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 ufocalParams_Stage2_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage2_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage2_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage2_c0_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage2_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_1_Stage0;
+ float t = -1.0;
+ float v = 1.0;
+ {
+ {
+ float x_t = -1.0;
+ {
+ x_t = dot(p, p) / p.x;
+ }
+ {
+ if (x_t <= 0.0) {
+ v = -1.0;
+ }
+ }
+ {
+ {
+ t = x_t;
+ }
+ }
+ {
+ t = 1.0 - t;
+ }
+ }
+ }
+ _output = vec4(t, v, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage2_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage2_c0_c0_c1_c0;
+ bias = ubias0_1_Stage2_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage2_c0_c0_c1_c0;
+ bias = ubias2_3_Stage2_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage2_c0_c0_c1_c0;
+ bias = ubias4_5_Stage2_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage2_c0_c0_c1_c0;
+ bias = ubias6_7_Stage2_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage2_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else {
+ {
+ t.x = fract(t.x);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage2_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_dst_in(output_Stage1, TiledGradientEffect_Stage2_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/877.shader_test b/shaders/skia/877.shader_test
new file mode 100644
index 0000000..025077f
--- /dev/null
+++ b/shaders/skia/877.shader_test
@@ -0,0 +1,234 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 urectH_Stage1_c0_c0_c0_c0_c0_c0;
+uniform float uinvSixSigma_Stage1_c0_c0_c0_c0_c0_c0;
+uniform vec3 uedges_Stage1_c0_c0_c0_c0_c1_c0[8];
+uniform vec4 urectH_Stage1_c0_c0_c1_c0_c1_c0;
+uniform float uinvSixSigma_Stage1_c0_c0_c1_c0_c1_c0;
+uniform mat4 um_Stage1_c1_c0_c0_c0;
+uniform vec4 uv_Stage1_c1_c0_c0_c0;
+uniform vec4 ucircleData_Stage1_c1_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+uniform sampler2D uTextureSampler_2_Stage1;
+uniform sampler2D uTextureSampler_3_Stage1;
+noperspective in vec4 vinCircleEdge_Stage0;
+noperspective in vec4 vinColor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 RectBlurEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float xCoverage, yCoverage;
+ {
+ float x, y;
+ {
+ x = max(urectH_Stage1_c0_c0_c0_c0_c0_c0.x - gl_FragCoord.x, gl_FragCoord.x - urectH_Stage1_c0_c0_c0_c0_c0_c0.z);
+ y = max(urectH_Stage1_c0_c0_c0_c0_c0_c0.y - gl_FragCoord.y, gl_FragCoord.y - urectH_Stage1_c0_c0_c0_c0_c0_c0.w);
+ }
+ xCoverage = texture(uTextureSampler_0_Stage1, vec2(x * uinvSixSigma_Stage1_c0_c0_c0_c0_c0_c0, 0.5)).w;
+ yCoverage = texture(uTextureSampler_0_Stage1, vec2(y * uinvSixSigma_Stage1_c0_c0_c0_c0_c0_c0, 0.5)).w;
+ _output = (_input * xCoverage) * yCoverage;
+ }
+ _output = (_input * xCoverage) * yCoverage;
+ return _output;
+}
+vec4 ConvexPoly_Stage1_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float alpha = 1.0;
+ float edge;
+ edge = dot(uedges_Stage1_c0_c0_c0_c0_c1_c0[0], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage1_c0_c0_c0_c0_c1_c0[1], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage1_c0_c0_c0_c0_c1_c0[2], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage1_c0_c0_c0_c0_c1_c0[3], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage1_c0_c0_c0_c0_c1_c0[4], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage1_c0_c0_c0_c0_c1_c0[5], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage1_c0_c0_c0_c0_c1_c0[6], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage1_c0_c0_c0_c0_c1_c0[7], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ alpha = 1.0 - alpha;
+ _output = _input * alpha;
+ return _output;
+}
+vec4 blend_dst_out(vec4 src, vec4 dst) {
+ return (1.0 - src.w) * dst;
+}
+vec4 ComposeTwo_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_dst_out(RectBlurEffect_Stage1_c0_c0_c0_c0_c0_c0(inputColor), ConvexPoly_Stage1_c0_c0_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c0_c0_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_1_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+vec4 RectBlurEffect_Stage1_c0_c0_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float xCoverage, yCoverage;
+ {
+ float x, y;
+ {
+ x = max(urectH_Stage1_c0_c0_c1_c0_c1_c0.x - gl_FragCoord.x, gl_FragCoord.x - urectH_Stage1_c0_c0_c1_c0_c1_c0.z);
+ y = max(urectH_Stage1_c0_c0_c1_c0_c1_c0.y - gl_FragCoord.y, gl_FragCoord.y - urectH_Stage1_c0_c0_c1_c0_c1_c0.w);
+ }
+ xCoverage = texture(uTextureSampler_2_Stage1, vec2(x * uinvSixSigma_Stage1_c0_c0_c1_c0_c1_c0, 0.5)).w;
+ yCoverage = texture(uTextureSampler_2_Stage1, vec2(y * uinvSixSigma_Stage1_c0_c0_c1_c0_c1_c0, 0.5)).w;
+ _output = (_input * xCoverage) * yCoverage;
+ }
+ _output = (_input * xCoverage) * yCoverage;
+ return _output;
+}
+float _guarded_divide(float n, float d) {
+ return n / d;
+}
+float _color_dodge_component(float sc, float sa, float dc, float da) {
+ if (dc == 0.0) {
+ return sc * (1.0 - da);
+ } else {
+ float d = sa - sc;
+ if (d == 0.0) {
+ return (sa * da + sc * (1.0 - da)) + dc * (1.0 - sa);
+ }
+ d = min(da, _guarded_divide(dc * sa, d));
+ return (d * sa + sc * (1.0 - da)) + dc * (1.0 - sa);
+ }
+}
+vec4 blend_color_dodge(vec4 src, vec4 dst) {
+ return vec4(_color_dodge_component(src.x, src.w, dst.x, dst.w), _color_dodge_component(src.y, src.w, dst.y, dst.w), _color_dodge_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+}
+vec4 ComposeTwo_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_color_dodge(TextureEffect_Stage1_c0_c0_c1_c0_c0_c0(inputColor), RectBlurEffect_Stage1_c0_c0_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+float _color_burn_component(float sc, float sa, float dc, float da) {
+ if (da == dc) {
+ return (sa * da + sc * (1.0 - da)) + dc * (1.0 - sa);
+ } else if (sc == 0.0) {
+ return dc * (1.0 - sa);
+ }
+ float d = max(0.0, da - _guarded_divide((da - dc) * sa, sc));
+ return (d * sa + sc * (1.0 - da)) + dc * (1.0 - sa);
+}
+vec4 blend_color_burn(vec4 src, vec4 dst) {
+ return vec4(_color_burn_component(src.x, src.w, dst.x, dst.w), _color_burn_component(src.y, src.w, dst.y, dst.w), _color_burn_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+}
+vec4 ComposeTwo_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_color_burn(ComposeTwo_Stage1_c0_c0_c0_c0(inputColor), ComposeTwo_Stage1_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 ColorMatrixFragmentProcessor_Stage1_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = _input;
+ {
+ float nonZeroAlpha = max(inputColor.w, 9.9999997473787516e-05);
+ inputColor = vec4(inputColor.xyz / nonZeroAlpha, inputColor.w);
+ }
+ _output = um_Stage1_c1_c0_c0_c0 * inputColor + uv_Stage1_c1_c0_c0_c0;
+ {
+ _output = clamp(_output, 0.0, 1.0);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 CircleBlurFragmentProcessor_Stage1_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 vec = vec2((gl_FragCoord.x - ucircleData_Stage1_c1_c0_c1_c0.x) * ucircleData_Stage1_c1_c0_c1_c0.w, (gl_FragCoord.y - ucircleData_Stage1_c1_c0_c1_c0.y) * ucircleData_Stage1_c1_c0_c1_c0.w);
+ float dist = length(vec) + (0.5 - ucircleData_Stage1_c1_c0_c1_c0.z) * ucircleData_Stage1_c1_c0_c1_c0.w;
+ _output = _input * texture(uTextureSampler_3_Stage1, vec2(dist, 0.5)).w;
+ return _output;
+}
+float _blend_overlay_component(float sc, float sa, float dc, float da) {
+ if (2.0 * dc <= da) {
+ return (2.0 * sc) * dc;
+ }
+ return sa * da - (2.0 * (da - dc)) * (sa - sc);
+}
+vec4 blend_overlay(vec4 src, vec4 dst) {
+ vec4 result = vec4(_blend_overlay_component(src.x, src.w, dst.x, dst.w), _blend_overlay_component(src.y, src.w, dst.y, dst.w), _blend_overlay_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+ result.xyz += dst.xyz * (1.0 - src.w) + src.xyz * (1.0 - dst.w);
+ return result;
+}
+vec4 blend_hard_light(vec4 src, vec4 dst) {
+ return blend_overlay(dst, src);
+}
+vec4 ComposeTwo_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_hard_light(ColorMatrixFragmentProcessor_Stage1_c1_c0_c0_c0(inputColor), CircleBlurFragmentProcessor_Stage1_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ vec4 circleEdge;
+ circleEdge = vinCircleEdge_Stage0;
+ outputColor_Stage0 = vinColor_Stage0;
+ float d = length(circleEdge.xy);
+ float distanceToOuterEdge = circleEdge.z * (1.0 - d);
+ float edgeAlpha = clamp(distanceToOuterEdge, 0.0, 1.0);
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_color_dodge(ComposeTwo_Stage1_c0_c0(inputColor), ComposeTwo_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ sk_FragColor = output_Stage1 * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec4 inCircleEdge;
+noperspective out vec4 vinCircleEdge_Stage0;
+noperspective out vec4 vinColor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vinCircleEdge_Stage0 = inCircleEdge;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/88-1.shader_test b/shaders/skia/88-1.shader_test
new file mode 100644
index 0000000..3edddb1
--- /dev/null
+++ b/shaders/skia/88-1.shader_test
@@ -0,0 +1,69 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 TextureEffect_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage2, vTransformedCoords_1_Stage0) * _input;
+ return _output;
+}
+float _blend_color_luminance(vec3 color) {
+ return dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), color);
+}
+vec3 _blend_set_color_luminance(vec3 hueSatColor, float alpha, vec3 lumColor) {
+ float lum = _blend_color_luminance(lumColor);
+ vec3 result = (lum - _blend_color_luminance(hueSatColor)) + hueSatColor;
+ float minComp = min(min(result.x, result.y), result.z);
+ float maxComp = max(max(result.x, result.y), result.z);
+ if (minComp < 0.0 && lum != minComp) {
+ result = lum + ((result - lum) * lum) / (lum - minComp);
+ }
+ if (maxComp > alpha && maxComp != lum) {
+ return lum + ((result - lum) * (alpha - lum)) / (maxComp - lum);
+ }
+ return result;
+}
+vec4 blend_luminosity(vec4 src, vec4 dst) {
+ float alpha = dst.w * src.w;
+ vec3 sda = src.xyz * dst.w;
+ vec3 dsa = dst.xyz * src.w;
+ return vec4((((_blend_set_color_luminance(dsa, alpha, sda) + dst.xyz) - dsa) + src.xyz) - sda, (src.w + dst.w) - alpha);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_luminosity(output_Stage1, TextureEffect_Stage2_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/88-10.shader_test b/shaders/skia/88-10.shader_test
new file mode 100644
index 0000000..8afd21c
--- /dev/null
+++ b/shaders/skia/88-10.shader_test
@@ -0,0 +1,44 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform float uPixelSize_Stage1;
+uniform vec2 uRange_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = vec4(1.0, 1.0, 1.0, 1.0);
+ vec2 coord = vTransformedCoords_0_Stage0;
+ coord.y -= 4.0 * uPixelSize_Stage1;
+ float highBound = min(uRange_Stage1.y, coord.y + 8.0 * uPixelSize_Stage1);
+ coord.y = max(uRange_Stage1.x, coord.y);
+ for (int i = 0;i < 9; i++) {
+ output_Stage1 = min(output_Stage1, texture(uTextureSampler_0_Stage1, coord));
+ coord.y += uPixelSize_Stage1;
+ coord.y = min(highBound, coord.y);
+ }
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/88-11.shader_test b/shaders/skia/88-11.shader_test
new file mode 100644
index 0000000..ed79501
--- /dev/null
+++ b/shaders/skia/88-11.shader_test
@@ -0,0 +1,140 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform float uSurfaceScale_Stage1;
+uniform vec3 uLightColor_Stage1;
+uniform float uKS_Stage1;
+uniform float uShininess_Stage1;
+uniform vec3 uLightLocation_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 light_Stage1(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ vec3 halfDir = normalize(surfaceToLight + vec3(0.0, 0.0, 1.0));
+ float colorScale = uKS_Stage1 * pow(dot(normal, halfDir), uShininess_Stage1);
+ vec3 color = lightColor * clamp(colorScale, 0.0, 1.0);
+ return vec4(color, max(max(color.x, color.y), color.z));
+}
+float sobel_Stage1(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage1(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage1(float m[9], float surfaceScale) {
+ return pointToNormal_Stage1(sobel_Stage1(0.0, 0.0, m[4], m[5], m[7], m[8], 0.66666698455810547), sobel_Stage1(0.0, 0.0, m[4], m[7], m[5], m[8], 0.66666698455810547), surfaceScale);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ vec2 coord = vTransformedCoords_0_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp0 = textureColor;
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp1 = textureColor;
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp2 = textureColor;
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp3 = textureColor;
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp4 = textureColor;
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp5 = textureColor;
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp6 = textureColor;
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp7 = textureColor;
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp8 = textureColor;
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = normalize(uLightLocation_Stage1 - vec3(gl_FragCoord.xy, uSurfaceScale_Stage1 * m[4]));
+ output_Stage1 = light_Stage1(normal_Stage1(m, uSurfaceScale_Stage1), surfaceToLight, uLightColor_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/88-12.shader_test b/shaders/skia/88-12.shader_test
new file mode 100644
index 0000000..4ac2cb7
--- /dev/null
+++ b/shaders/skia/88-12.shader_test
@@ -0,0 +1,86 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec2 uDstTextureUpperLeft_Stage1;
+uniform vec2 uDstTextureCoordScale_Stage1;
+uniform sampler2D uTextureSampler_0_Stage0;
+uniform sampler2D uDstTextureSampler_Stage1;
+noperspective in vec2 vTextureCoords_Stage0;
+flat in int vTexIndex_Stage0;
+noperspective in vec4 vinColor_Stage0;
+float _blend_color_luminance(vec3 color) {
+ return dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), color);
+}
+vec3 _blend_set_color_luminance(vec3 hueSatColor, float alpha, vec3 lumColor) {
+ float lum = _blend_color_luminance(lumColor);
+ vec3 result = (lum - _blend_color_luminance(hueSatColor)) + hueSatColor;
+ float minComp = min(min(result.x, result.y), result.z);
+ float maxComp = max(max(result.x, result.y), result.z);
+ if (minComp < 0.0 && lum != minComp) {
+ result = lum + ((result - lum) * lum) / (lum - minComp);
+ }
+ if (maxComp > alpha && maxComp != lum) {
+ return lum + ((result - lum) * (alpha - lum)) / (maxComp - lum);
+ }
+ return result;
+}
+vec4 blend_color(vec4 src, vec4 dst) {
+ float alpha = dst.w * src.w;
+ vec3 sda = src.xyz * dst.w;
+ vec3 dsa = dst.xyz * src.w;
+ return vec4((((_blend_set_color_luminance(sda, alpha, dsa) + dst.xyz) - dsa) + src.xyz) - sda, (src.w + dst.w) - alpha);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vinColor_Stage0;
+ vec4 texColor;
+ {
+ texColor = texture(uTextureSampler_0_Stage0, vTextureCoords_Stage0);
+ }
+ outputCoverage_Stage0 = texColor;
+ }
+ {
+ if (all(lessThanEqual(outputCoverage_Stage0.xyz, vec3(0.0)))) {
+ discard;
+ }
+ vec2 _dstTexCoord = (gl_FragCoord.xy - uDstTextureUpperLeft_Stage1) * uDstTextureCoordScale_Stage1;
+ _dstTexCoord.y = 1.0 - _dstTexCoord.y;
+ vec4 _dstColor = texture(uDstTextureSampler_Stage1, _dstTexCoord);
+ sk_FragColor = blend_color(outputColor_Stage0, _dstColor);
+ float lerpRed = mix(_dstColor.w, sk_FragColor.w, outputCoverage_Stage0.x);
+ float lerpBlue = mix(_dstColor.w, sk_FragColor.w, outputCoverage_Stage0.y);
+ float lerpGreen = mix(_dstColor.w, sk_FragColor.w, outputCoverage_Stage0.z);
+ sk_FragColor = outputCoverage_Stage0 * sk_FragColor + (vec4(1.0) - outputCoverage_Stage0) * _dstColor;
+ sk_FragColor.w = max(max(lerpRed, lerpBlue), lerpGreen);
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform vec2 uAtlasSizeInv_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in uvec2 inTextureCoords;
+noperspective out vec2 vTextureCoords_Stage0;
+flat out int vTexIndex_Stage0;
+noperspective out vec4 vinColor_Stage0;
+void main() {
+ ivec2 signedCoords = ivec2(int(inTextureCoords.x), int(inTextureCoords.y));
+ vec2 unormTexCoords = vec2(float(signedCoords.x / 2), float(signedCoords.y / 2));
+ vTextureCoords_Stage0 = unormTexCoords * uAtlasSizeInv_Stage0;
+ vTexIndex_Stage0 = 0;
+ vinColor_Stage0 = inColor;
+ gl_Position = vec4(inPosition.x, inPosition.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/88-13.shader_test b/shaders/skia/88-13.shader_test
new file mode 100644
index 0000000..1aeb06d
--- /dev/null
+++ b/shaders/skia/88-13.shader_test
@@ -0,0 +1,32 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+flat in vec4 vcolor_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ {
+ sk_FragColor = outputColor_Stage0;
+ sk_FragColor = sk_FragColor.wwww;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 position;
+in vec4 color;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/88-2.shader_test b/shaders/skia/88-2.shader_test
new file mode 100644
index 0000000..6f3b06b
--- /dev/null
+++ b/shaders/skia/88-2.shader_test
@@ -0,0 +1,80 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform float uSrcTF_Stage2[7];
+uniform mat3 uColorXform_Stage2;
+uniform float uDstTF_Stage2[7];
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+float src_tf_Stage2(float x) {
+ float G = uSrcTF_Stage2[0];
+ float A = uSrcTF_Stage2[1];
+ float B = uSrcTF_Stage2[2];
+ float C = uSrcTF_Stage2[3];
+ float D = uSrcTF_Stage2[4];
+ float E = uSrcTF_Stage2[5];
+ float F = uSrcTF_Stage2[6];
+ float s = sign(x);
+ x = abs(x);
+ x = x < D ? C * x + F : pow(A * x + B, G) + E;
+ return s * x;
+}
+float dst_tf_Stage2(float x) {
+ float G = uDstTF_Stage2[0];
+ float A = uDstTF_Stage2[1];
+ float B = uDstTF_Stage2[2];
+ float C = uDstTF_Stage2[3];
+ float D = uDstTF_Stage2[4];
+ float E = uDstTF_Stage2[5];
+ float F = uDstTF_Stage2[6];
+ float s = sign(x);
+ x = abs(x);
+ x = x < D ? C * x + F : pow(A * x + B, G) + E;
+ return s * x;
+}
+vec4 gamut_xform_Stage2(vec4 color) {
+ color.xyz = uColorXform_Stage2 * color.xyz;
+ return color;
+}
+vec4 color_xform_Stage2(vec4 color) {
+ color.x = src_tf_Stage2(color.x);
+ color.y = src_tf_Stage2(color.y);
+ color.z = src_tf_Stage2(color.z);
+ color = gamut_xform_Stage2(color);
+ color.x = dst_tf_Stage2(color.x);
+ color.y = dst_tf_Stage2(color.y);
+ color.z = dst_tf_Stage2(color.z);
+ return color;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = color_xform_Stage2(output_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/88-20.shader_test b/shaders/skia/88-20.shader_test
new file mode 100644
index 0000000..60ab4d3
--- /dev/null
+++ b/shaders/skia/88-20.shader_test
@@ -0,0 +1,74 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform vec2 uBounds_Stage1;
+uniform vec4 uKernel_Stage1[3];
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0 - 4.0 * uImageIncrement_Stage1;
+ vec2 coordSampled = vec2(0.0, 0.0);
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.y = clamp(coord.y, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].x;
+ coord += uImageIncrement_Stage1;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/88-22.shader_test b/shaders/skia/88-22.shader_test
new file mode 100644
index 0000000..08a8fae
--- /dev/null
+++ b/shaders/skia/88-22.shader_test
@@ -0,0 +1,116 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_0_Stage0;
+ float t = -1.0;
+ {
+ {
+ float invR1 = ufocalParams_Stage1_c0_c0_c0_c0.x;
+ float fx = ufocalParams_Stage1_c0_c0_c0_c0.y;
+ float x_t = -1.0;
+ {
+ x_t = length(p) - p.x * invR1;
+ }
+ {
+ {
+ t = x_t + fx;
+ }
+ }
+ }
+ }
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_dst_in(outputColor_Stage0, ClampedGradientEffect_Stage1_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/88-23.shader_test b/shaders/skia/88-23.shader_test
new file mode 100644
index 0000000..0e11799
--- /dev/null
+++ b/shaders/skia/88-23.shader_test
@@ -0,0 +1,132 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_0_Stage0;
+ float t = -1.0;
+ {
+ {
+ float invR1 = ufocalParams_Stage1_c0_c0_c0_c0.x;
+ float fx = ufocalParams_Stage1_c0_c0_c0_c0.y;
+ float x_t = -1.0;
+ {
+ x_t = length(p) - p.x * invR1;
+ }
+ {
+ {
+ t = x_t + fx;
+ }
+ }
+ }
+ }
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_dst_in(outputColor_Stage0, ClampedGradientEffect_Stage1_c0_c0(vec4(1.0)));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_1_Stage0.x);
+ uint y = uint(vTransformedCoords_1_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ output_Stage2 = vec4(clamp(output_Stage2.xyz + value * 0.0039215688593685627, 0.0, output_Stage2.w), output_Stage2.w);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/88-24.shader_test b/shaders/skia/88-24.shader_test
new file mode 100644
index 0000000..362b706
--- /dev/null
+++ b/shaders/skia/88-24.shader_test
@@ -0,0 +1,86 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 TextureEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = TextureEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = OverrideInputFragmentProcessor_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+float _blend_color_luminance(vec3 color) {
+ return dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), color);
+}
+vec3 _blend_set_color_luminance(vec3 hueSatColor, float alpha, vec3 lumColor) {
+ float lum = _blend_color_luminance(lumColor);
+ vec3 result = (lum - _blend_color_luminance(hueSatColor)) + hueSatColor;
+ float minComp = min(min(result.x, result.y), result.z);
+ float maxComp = max(max(result.x, result.y), result.z);
+ if (minComp < 0.0 && lum != minComp) {
+ result = lum + ((result - lum) * lum) / (lum - minComp);
+ }
+ if (maxComp > alpha && maxComp != lum) {
+ return lum + ((result - lum) * (alpha - lum)) / (maxComp - lum);
+ }
+ return result;
+}
+vec4 blend_color(vec4 src, vec4 dst) {
+ float alpha = dst.w * src.w;
+ vec3 sda = src.xyz * dst.w;
+ vec3 dsa = dst.xyz * src.w;
+ return vec4((((_blend_set_color_luminance(sda, alpha, dsa) + dst.xyz) - dsa) + src.xyz) - sda, (src.w + dst.w) - alpha);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_color(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec2 inLocalCoord;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 color = inColor;
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/88-25.shader_test b/shaders/skia/88-25.shader_test
new file mode 100644
index 0000000..788ab93
--- /dev/null
+++ b/shaders/skia/88-25.shader_test
@@ -0,0 +1,114 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage2_c1_c0_c0_c0;
+uniform vec4 urightBorderColor_Stage2_c1_c0_c0_c0;
+uniform vec4 ustart_Stage2_c1_c0_c0_c0_c1_c0;
+uniform vec4 uend_Stage2_c1_c0_c0_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+in vec2 vTransformedCoords_0_Stage0;
+in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+in float vcoverage_Stage0;
+flat in vec4 vgeomDomain_Stage0;
+vec4 TextureEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+vec4 RadialGradientLayout_Stage2_c1_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = length(vTransformedCoords_1_Stage0);
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage2_c1_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage2_c1_c0_c0_c0_c1_c0 + t * uend_Stage2_c1_c0_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage2_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = RadialGradientLayout_Stage2_c1_c0_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage2_c1_c0_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage2_c1_c0_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage2_c1_c0_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+vec4 ComposeOne_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_dst_in(_input, ClampedGradientEffect_Stage2_c1_c0_c0_c0(vec4(1.0)));
+ return _output;
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ float coverage = vcoverage_Stage0 * gl_FragCoord.w;
+ vec4 geoDomain;
+ geoDomain = vgeomDomain_Stage0;
+ if (coverage < 0.5) {
+ vec4 dists4 = clamp(vec4(1.0, 1.0, -1.0, -1.0) * (gl_FragCoord.xyxy - geoDomain), 0.0, 1.0);
+ vec2 dists2 = dists4.xy * dists4.zw;
+ coverage = min(coverage, dists2.x * dists2.y);
+ }
+ outputCoverage_Stage0 = vec4(coverage);
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TextureEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_src_in(outputCoverage_Stage0, ComposeOne_Stage2_c1_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage1 * output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec4 positionWithCoverage;
+in vec4 color;
+in vec2 localCoord;
+in vec4 geomDomain;
+out vec2 vTransformedCoords_0_Stage0;
+out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+out float vcoverage_Stage0;
+flat out vec4 vgeomDomain_Stage0;
+void main() {
+ vec3 position = positionWithCoverage.xyz;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ vcoverage_Stage0 = positionWithCoverage.w * positionWithCoverage.z;
+ vgeomDomain_Stage0 = geomDomain;
+ gl_Position = vec4(position.x, position.y, 0.0, position.z);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/88-26.shader_test b/shaders/skia/88-26.shader_test
new file mode 100644
index 0000000..373c986
--- /dev/null
+++ b/shaders/skia/88-26.shader_test
@@ -0,0 +1,127 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 uleftBorderColor_Stage1_c1_c0_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c1_c0_c0_c0;
+uniform vec4 ustart_Stage1_c1_c0_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c1_c0_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+vec4 ComposeOne_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_dst_in(_input, ClampedGradientEffect_Stage1_c0_c0_c0_c0(vec4(1.0)));
+ return _output;
+}
+vec4 LinearGradientLayout_Stage1_c1_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_1_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c1_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c1_c0_c0_c0_c1_c0 + t * uend_Stage1_c1_c0_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c1_c0_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c1_c0_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c1_c0_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c1_c0_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 ComposeOne_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_dst_in(_input, ClampedGradientEffect_Stage1_c1_c0_c0_c0(vec4(1.0)));
+ return _output;
+}
+vec4 blend_screen(vec4 src, vec4 dst) {
+ return src + (1.0 - src) * dst;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_screen(ComposeOne_Stage1_c0_c0(inputColor), ComposeOne_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/88-28.shader_test b/shaders/skia/88-28.shader_test
new file mode 100644
index 0000000..2c73041
--- /dev/null
+++ b/shaders/skia/88-28.shader_test
@@ -0,0 +1,48 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform sampler2D uTextureSampler_0_Stage0;
+noperspective in vec2 vTextureCoords_Stage0;
+flat in int vTexIndex_Stage0;
+noperspective in vec4 vinColor_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vinColor_Stage0;
+ vec4 texColor;
+ {
+ texColor = texture(uTextureSampler_0_Stage0, vTextureCoords_Stage0);
+ }
+ outputCoverage_Stage0 = texColor;
+ }
+ {
+ sk_FragColor = (vec4(1.0) - outputColor_Stage0) * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform vec2 uAtlasSizeInv_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in uvec2 inTextureCoords;
+noperspective out vec2 vTextureCoords_Stage0;
+flat out int vTexIndex_Stage0;
+noperspective out vec4 vinColor_Stage0;
+void main() {
+ ivec2 signedCoords = ivec2(int(inTextureCoords.x), int(inTextureCoords.y));
+ vec2 unormTexCoords = vec2(float(signedCoords.x / 2), float(signedCoords.y / 2));
+ vTextureCoords_Stage0 = unormTexCoords * uAtlasSizeInv_Stage0;
+ vTexIndex_Stage0 = 0;
+ vinColor_Stage0 = inColor;
+ gl_Position = vec4(inPosition.x, inPosition.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/88-29.shader_test b/shaders/skia/88-29.shader_test
new file mode 100644
index 0000000..f1ea092
--- /dev/null
+++ b/shaders/skia/88-29.shader_test
@@ -0,0 +1,329 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_KHR_blend_equation_advanced : require
+out vec4 sk_FragColor;
+layout (blend_support_all_equations) out ;
+uniform vec4 ucolor_Stage1_c0_c0;
+uniform vec2 uImageIncrement_Stage1_c1_c0;
+uniform vec4 uKernel_Stage1_c1_c0[4];
+uniform vec2 uKernelOffset_Stage1_c1_c0;
+uniform float uGain_Stage1_c1_c0;
+uniform float uBias_Stage1_c1_c0;
+uniform vec4 uTexDom_Stage1_c1_c0;
+uniform vec3 uDecalParams_Stage1_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in float vinCoverage_Stage0;
+vec4 ConstColorProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage1_c0_c0;
+ }
+ return _output;
+}
+vec4 MatrixConvolution_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 sum = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0 - uKernelOffset_Stage1_c1_c0 * uImageIncrement_Stage1_c1_c0;
+ vec4 c;
+ {
+ float k = uKernel_Stage1_c1_c0[0].x;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0.xy, uTexDom_Stage1_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0[0].y;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0.xy, uTexDom_Stage1_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0[0].z;
+ {
+ vec2 origCoord = coord + vec2(2.0, 0.0) * uImageIncrement_Stage1_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0.xy, uTexDom_Stage1_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0[0].w;
+ {
+ vec2 origCoord = coord + vec2(3.0, 0.0) * uImageIncrement_Stage1_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0.xy, uTexDom_Stage1_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0[1].x;
+ {
+ vec2 origCoord = coord + vec2(4.0, 0.0) * uImageIncrement_Stage1_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0.xy, uTexDom_Stage1_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0[1].y;
+ {
+ vec2 origCoord = coord + vec2(5.0, 0.0) * uImageIncrement_Stage1_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0.xy, uTexDom_Stage1_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0[1].z;
+ {
+ vec2 origCoord = coord + vec2(6.0, 0.0) * uImageIncrement_Stage1_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0.xy, uTexDom_Stage1_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0[1].w;
+ {
+ vec2 origCoord = coord + vec2(7.0, 0.0) * uImageIncrement_Stage1_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0.xy, uTexDom_Stage1_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0[2].x;
+ {
+ vec2 origCoord = coord + vec2(8.0, 0.0) * uImageIncrement_Stage1_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0.xy, uTexDom_Stage1_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0[2].y;
+ {
+ vec2 origCoord = coord + vec2(9.0, 0.0) * uImageIncrement_Stage1_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0.xy, uTexDom_Stage1_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0[2].z;
+ {
+ vec2 origCoord = coord + vec2(10.0, 0.0) * uImageIncrement_Stage1_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0.xy, uTexDom_Stage1_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0[2].w;
+ {
+ vec2 origCoord = coord + vec2(11.0, 0.0) * uImageIncrement_Stage1_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0.xy, uTexDom_Stage1_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0[3].x;
+ {
+ vec2 origCoord = coord + vec2(12.0, 0.0) * uImageIncrement_Stage1_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0.xy, uTexDom_Stage1_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0[3].y;
+ {
+ vec2 origCoord = coord + vec2(13.0, 0.0) * uImageIncrement_Stage1_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0.xy, uTexDom_Stage1_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ _output = sum * uGain_Stage1_c1_c0 + uBias_Stage1_c1_c0;
+ _output.w = clamp(_output.w, 0.0, 1.0);
+ _output.xyz = clamp(_output.xyz, 0.0, _output.w);
+ _output *= _input;
+ return _output;
+}
+float _blend_overlay_component(float sc, float sa, float dc, float da) {
+ if (2.0 * dc <= da) {
+ return (2.0 * sc) * dc;
+ }
+ return sa * da - (2.0 * (da - dc)) * (sa - sc);
+}
+vec4 blend_overlay(vec4 src, vec4 dst) {
+ vec4 result = vec4(_blend_overlay_component(src.x, src.w, dst.x, dst.w), _blend_overlay_component(src.y, src.w, dst.y, dst.w), _blend_overlay_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+ result.xyz += dst.xyz * (1.0 - src.w) + src.xyz * (1.0 - dst.w);
+ return result;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ float alpha = 1.0;
+ alpha = vinCoverage_Stage0;
+ outputCoverage_Stage0 = vec4(alpha);
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_overlay(ConstColorProcessor_Stage1_c0_c0(inputColor), MatrixConvolution_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ sk_FragColor = outputCoverage_Stage0 * output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in float inCoverage;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out float vinCoverage_Stage0;
+void main() {
+ vec4 color = inColor;
+ vcolor_Stage0 = color;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ vinCoverage_Stage0 = inCoverage;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/88-30.shader_test b/shaders/skia/88-30.shader_test
new file mode 100644
index 0000000..c6167bb
--- /dev/null
+++ b/shaders/skia/88-30.shader_test
@@ -0,0 +1,206 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage2;
+uniform float uSurfaceScale_Stage2;
+uniform vec3 uLightColor_Stage2;
+uniform float uKS_Stage2;
+uniform float uShininess_Stage2;
+uniform vec4 uTexDom_Stage2;
+uniform vec3 uDecalParams_Stage2;
+uniform vec3 uLightLocation_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 light_Stage2(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ vec3 halfDir = normalize(surfaceToLight + vec3(0.0, 0.0, 1.0));
+ float colorScale = uKS_Stage2 * pow(dot(normal, halfDir), uShininess_Stage2);
+ vec3 color = lightColor * clamp(colorScale, 0.0, 1.0);
+ return vec4(color, max(max(color.x, color.y), color.z));
+}
+float sobel_Stage2(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage2(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage2(float m[9], float surfaceScale) {
+ return pointToNormal_Stage2(sobel_Stage2(m[0], m[2], m[3], m[5], 0.0, 0.0, 0.33333298563957214), sobel_Stage2(m[0], m[3], m[1], m[4], m[2], m[5], 0.5), surfaceScale);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ vec2 coord = vTransformedCoords_1_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp0 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp5 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp6 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp7 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp8 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = normalize(uLightLocation_Stage2 - vec3(gl_FragCoord.xy, uSurfaceScale_Stage2 * m[4]));
+ output_Stage2 = light_Stage2(normal_Stage2(m, uSurfaceScale_Stage2), surfaceToLight, uLightColor_Stage2);
+ output_Stage2 *= output_Stage1;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/88-31.shader_test b/shaders/skia/88-31.shader_test
new file mode 100644
index 0000000..6146926
--- /dev/null
+++ b/shaders/skia/88-31.shader_test
@@ -0,0 +1,86 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec3 uedges_Stage2_c0_c0[7];
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec3 vTransformedCoords_1_Stage0;
+vec4 ConvexPoly_Stage2_c0_c0(vec4 _input, vec2 _coords) {
+ vec4 _output;
+ float alpha = 1.0;
+ float edge;
+ edge = dot(uedges_Stage2_c0_c0[0], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage2_c0_c0[1], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage2_c0_c0[2], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage2_c0_c0[3], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage2_c0_c0[4], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage2_c0_c0[5], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage2_c0_c0[6], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ alpha = 1.0 - alpha;
+ _output = _input * alpha;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ vec2 vTransformedCoords_1_Stage0_ensure2D = vTransformedCoords_1_Stage0.xy / vTransformedCoords_1_Stage0.z;
+ float coord = vTransformedCoords_1_Stage0_ensure2D.y - 0.5;
+ float f = fract(coord);
+ coord += 0.5 - f;
+ float f2 = f * f;
+ vec4 w = mat4(0.055555555555555552, 0.88888888888888884, 0.055555555555555552, 0.0, -0.5, 0.0, 0.5, 0.0, 0.83333333333333337, -2.0, 1.5, -0.33333333333333331, -0.3888888888888889, 1.1666666666666667, -1.1666666666666667, 0.3888888888888889) * vec4(1.0, f, f2, f2 * f);
+ vec4 c[4];
+ c[0] = ConvexPoly_Stage2_c0_c0(vec4(1.0), vec2(vTransformedCoords_1_Stage0_ensure2D.x, coord + -1.0));
+ c[1] = ConvexPoly_Stage2_c0_c0(vec4(1.0), vec2(vTransformedCoords_1_Stage0_ensure2D.x, coord));
+ c[2] = ConvexPoly_Stage2_c0_c0(vec4(1.0), vec2(vTransformedCoords_1_Stage0_ensure2D.x, coord + 1.0));
+ c[3] = ConvexPoly_Stage2_c0_c0(vec4(1.0), vec2(vTransformedCoords_1_Stage0_ensure2D.x, coord + 2.0));
+ vec4 bicubicColor = ((c[0] * w.x + c[1] * w.y) + c[2] * w.z) + c[3] * w.w;
+ bicubicColor = clamp(bicubicColor, 0.0, 1.0);
+ output_Stage2 = bicubicColor * output_Stage1;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec3 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0);
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/88-4.shader_test b/shaders/skia/88-4.shader_test
new file mode 100644
index 0000000..d4d6114
--- /dev/null
+++ b/shaders/skia/88-4.shader_test
@@ -0,0 +1,145 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage2;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.w) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ } else {
+ {
+ if (t < uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+vec4 ComposeOne_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_dst_in(_input, TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0)));
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = ComposeOne_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_src_over(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ {
+ output_Stage2 = output_Stage1 * ucolor_Stage2;
+ }
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 inColor;
+in vec2 inLocalCoord;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/88-6.shader_test b/shaders/skia/88-6.shader_test
new file mode 100644
index 0000000..a243cda
--- /dev/null
+++ b/shaders/skia/88-6.shader_test
@@ -0,0 +1,47 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+noperspective in vec4 vQuadEdge_Stage0;
+noperspective in vec4 vinColor_Stage0;
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ float edgeAlpha;
+ vec2 duvdx = dFdx(vQuadEdge_Stage0.xy);
+ vec2 duvdy = dFdy(vQuadEdge_Stage0.xy);
+ if (vQuadEdge_Stage0.z > 0.0 && vQuadEdge_Stage0.w > 0.0) {
+ edgeAlpha = min(min(vQuadEdge_Stage0.z, vQuadEdge_Stage0.w) + 0.5, 1.0);
+ } else {
+ vec2 gF = vec2((2.0 * vQuadEdge_Stage0.x) * duvdx.x - duvdx.y, (2.0 * vQuadEdge_Stage0.x) * duvdy.x - duvdy.y);
+ edgeAlpha = vQuadEdge_Stage0.x * vQuadEdge_Stage0.x - vQuadEdge_Stage0.y;
+ edgeAlpha = clamp(0.5 - edgeAlpha / length(gF), 0.0, 1.0);
+ }
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ {
+ sk_FragColor = outputCoverage_Stage0;
+ sk_FragColor = sk_FragColor.wwww;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 inPosition;
+in vec4 inColor;
+in vec4 inQuadEdge;
+noperspective out vec4 vQuadEdge_Stage0;
+noperspective out vec4 vinColor_Stage0;
+void main() {
+ vQuadEdge_Stage0 = inQuadEdge;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = inPosition;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/88-7.shader_test b/shaders/skia/88-7.shader_test
new file mode 100644
index 0000000..d0aed54
--- /dev/null
+++ b/shaders/skia/88-7.shader_test
@@ -0,0 +1,97 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+uniform vec2 uDstTextureUpperLeft_Stage2;
+uniform vec2 uDstTextureCoordScale_Stage2;
+uniform sampler2D uDstTextureSampler_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+noperspective in float vcoverage_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+vec4 blend_src(vec4 src, vec4 dst) {
+ return src;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ float coverage = vcoverage_Stage0;
+ outputCoverage_Stage0 = vec4(coverage);
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_dst_in(outputColor_Stage0, ClampedGradientEffect_Stage1_c0_c0(vec4(1.0)));
+ }
+ {
+ if (all(lessThanEqual(outputCoverage_Stage0.xyz, vec3(0.0)))) {
+ discard;
+ }
+ vec2 _dstTexCoord = (gl_FragCoord.xy - uDstTextureUpperLeft_Stage2) * uDstTextureCoordScale_Stage2;
+ _dstTexCoord.y = 1.0 - _dstTexCoord.y;
+ vec4 _dstColor = texture(uDstTextureSampler_Stage2, _dstTexCoord);
+ sk_FragColor = blend_src(output_Stage1, _dstColor);
+ sk_FragColor = outputCoverage_Stage0 * sk_FragColor + (vec4(1.0) - outputCoverage_Stage0) * _dstColor;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in float coverage;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+noperspective out float vcoverage_Stage0;
+void main() {
+ vec2 position = position;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ vcoverage_Stage0 = coverage;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/88-8.shader_test b/shaders/skia/88-8.shader_test
new file mode 100644
index 0000000..045789f
--- /dev/null
+++ b/shaders/skia/88-8.shader_test
@@ -0,0 +1,45 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uinnerRect_Stage1;
+uniform vec2 uradiusPlusHalf_Stage1;
+flat in vec4 vcolor_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ float dy0 = uinnerRect_Stage1.y - gl_FragCoord.y;
+ vec2 dxy1 = gl_FragCoord.xy - uinnerRect_Stage1.zw;
+ vec2 dxy = max(vec2(dxy1.x, max(dy0, dxy1.y)), 0.0);
+ float leftAlpha = clamp(gl_FragCoord.x - uinnerRect_Stage1.x, 0.0, 1.0);
+ float alpha = leftAlpha * clamp(uradiusPlusHalf_Stage1.x - length(dxy), 0.0, 1.0);
+ alpha = 1.0 - alpha;
+ output_Stage1 = vec4(alpha);
+ }
+ {
+ sk_FragColor = outputColor_Stage0 * output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 position;
+in vec4 color;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/88-9.shader_test b/shaders/skia/88-9.shader_test
new file mode 100644
index 0000000..2a88631
--- /dev/null
+++ b/shaders/skia/88-9.shader_test
@@ -0,0 +1,78 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage2_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c1_c0;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_src_in(ConstColorProcessor_Stage2_c1_c0(vec4(1.0)), output_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/88.shader_test b/shaders/skia/88.shader_test
new file mode 100644
index 0000000..16b7f5a
--- /dev/null
+++ b/shaders/skia/88.shader_test
@@ -0,0 +1,90 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 usubset_Stage1_c0_c0_c0_c0;
+uniform vec4 uclamp_Stage1_c0_c0_c0_c0;
+uniform sampler2DRect uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0_c0_c0(vec4 _input, vec2 _coords) {
+ vec4 _output;
+ vec2 inCoord = _coords;
+ vec2 subsetCoord;
+ {
+ float w = usubset_Stage1_c0_c0_c0_c0.z - usubset_Stage1_c0_c0_c0_c0.x;
+ float w2 = 2.0 * w;
+ float m = mod(inCoord.x - usubset_Stage1_c0_c0_c0_c0.x, w2);
+ subsetCoord.x = mix(m, w2 - m, step(w, m)) + usubset_Stage1_c0_c0_c0_c0.x;
+ }
+ subsetCoord.y = mod(inCoord.y - usubset_Stage1_c0_c0_c0_c0.y, usubset_Stage1_c0_c0_c0_c0.w - usubset_Stage1_c0_c0_c0_c0.y) + usubset_Stage1_c0_c0_c0_c0.y;
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage1_c0_c0_c0_c0.x, uclamp_Stage1_c0_c0_c0_c0.z);
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage1_c0_c0_c0_c0.y, uclamp_Stage1_c0_c0_c0_c0.w);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ _output = _input * textureColor;
+ return _output;
+}
+vec4 Bicubic_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coord = vTransformedCoords_0_Stage0 - vec2(0.5);
+ vec2 f = fract(coord);
+ coord += 0.5 - f;
+ vec4 wx = mat4(0.055555555555555552, 0.88888888888888884, 0.055555555555555552, 0.0, -0.5, 0.0, 0.5, 0.0, 0.83333333333333337, -2.0, 1.5, -0.33333333333333331, -0.3888888888888889, 1.1666666666666667, -1.1666666666666667, 0.3888888888888889) * vec4(1.0, f.x, f.x * f.x, (f.x * f.x) * f.x);
+ vec4 wy = mat4(0.055555555555555552, 0.88888888888888884, 0.055555555555555552, 0.0, -0.5, 0.0, 0.5, 0.0, 0.83333333333333337, -2.0, 1.5, -0.33333333333333331, -0.3888888888888889, 1.1666666666666667, -1.1666666666666667, 0.3888888888888889) * vec4(1.0, f.y, f.y * f.y, (f.y * f.y) * f.y);
+ vec4 rowColors[4];
+ rowColors[0] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(-1.0, -1.0));
+ rowColors[1] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(0.0, -1.0));
+ rowColors[2] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(1.0, -1.0));
+ rowColors[3] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(2.0, -1.0));
+ vec4 s0 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ rowColors[0] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(-1.0, 0.0));
+ rowColors[1] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord);
+ rowColors[2] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(1.0, 0.0));
+ rowColors[3] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(2.0, 0.0));
+ vec4 s1 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ rowColors[0] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(-1.0, 1.0));
+ rowColors[1] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(0.0, 1.0));
+ rowColors[2] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(1.0, 1.0));
+ rowColors[3] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(2.0, 1.0));
+ vec4 s2 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ rowColors[0] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(-1.0, 2.0));
+ rowColors[1] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(0.0, 2.0));
+ rowColors[2] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(1.0, 2.0));
+ rowColors[3] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(2.0, 2.0));
+ vec4 s3 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ vec4 bicubicColor = ((wy.x * s0 + wy.y * s1) + wy.z * s2) + wy.w * s3;
+ bicubicColor = clamp(bicubicColor, 0.0, 1.0);
+ _output = bicubicColor * _input;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = Bicubic_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/880-1.shader_test b/shaders/skia/880-1.shader_test
new file mode 100644
index 0000000..0376e3f
--- /dev/null
+++ b/shaders/skia/880-1.shader_test
@@ -0,0 +1,105 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage2_c0_c0;
+uniform vec4 urightBorderColor_Stage2_c0_c0;
+uniform vec2 ufocalParams_Stage2_c0_c0_c0_c0;
+uniform vec4 uscale01_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias01_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale23_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias23_Stage2_c0_c0_c1_c0;
+uniform float uthreshold_Stage2_c0_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage2_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_1_Stage0;
+ float t = -1.0;
+ float v = 1.0;
+ {
+ {
+ float r0_2 = ufocalParams_Stage2_c0_c0_c0_c0.y;
+ t = r0_2 - p.y * p.y;
+ if (t >= 0.0) {
+ t = p.x + sqrt(t);
+ } else {
+ v = -1.0;
+ }
+ }
+ }
+ _output = vec4(t, v, 0.0, 0.0);
+ return _output;
+}
+vec4 DualIntervalGradientColorizer_Stage2_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthreshold_Stage2_c0_c0_c1_c0) {
+ scale = uscale01_Stage2_c0_c0_c1_c0;
+ bias = ubias01_Stage2_c0_c0_c1_c0;
+ } else {
+ scale = uscale23_Stage2_c0_c0_c1_c0;
+ bias = ubias23_Stage2_c0_c0_c1_c0;
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage2_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage2_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage2_c0_c0;
+ } else {
+ _output = DualIntervalGradientColorizer_Stage2_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_dst_in(output_Stage1, ClampedGradientEffect_Stage2_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/880.shader_test b/shaders/skia/880.shader_test
new file mode 100644
index 0000000..8c76478
--- /dev/null
+++ b/shaders/skia/880.shader_test
@@ -0,0 +1,281 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uColor_Stage0;
+uniform float uCoverage_Stage0;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform float ubias_Stage1_c0_c0_c0_c0;
+uniform float uscale_Stage1_c0_c0_c0_c0;
+uniform vec4 uscale01_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias01_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale23_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias23_Stage1_c0_c0_c1_c0;
+uniform float uthreshold_Stage1_c0_c0_c1_c0;
+uniform vec4 uinnerRect_Stage2;
+uniform vec2 uradiusPlusHalf_Stage2;
+uniform vec2 uImageIncrement_Stage3;
+uniform float uSurfaceScale_Stage3;
+uniform vec3 uLightColor_Stage3;
+uniform float uKD_Stage3;
+uniform vec4 uTexDom_Stage3;
+uniform vec3 uDecalParams_Stage3;
+uniform vec3 uLightLocation_Stage3;
+uniform vec4 uellipse_Stage5;
+uniform sampler2D uTextureSampler_0_Stage3;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 SweepGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float angle;
+ {
+ angle = atan(-vTransformedCoords_0_Stage0.y, -vTransformedCoords_0_Stage0.x);
+ }
+ float t = ((angle * 0.15915493667125702 + 0.5) + ubias_Stage1_c0_c0_c0_c0) * uscale_Stage1_c0_c0_c0_c0;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 DualIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthreshold_Stage1_c0_c0_c1_c0) {
+ scale = uscale01_Stage1_c0_c0_c1_c0;
+ bias = ubias01_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale23_Stage1_c0_c0_c1_c0;
+ bias = ubias23_Stage1_c0_c0_c1_c0;
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = SweepGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = DualIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 light_Stage3(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ float colorScale = uKD_Stage3 * dot(normal, surfaceToLight);
+ return vec4(lightColor * clamp(colorScale, 0.0, 1.0), 1.0);
+}
+float sobel_Stage3(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage3(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage3(float m[9], float surfaceScale) {
+ return pointToNormal_Stage3(sobel_Stage3(m[1], m[2], m[4], m[5], 0.0, 0.0, 0.66666698455810547), sobel_Stage3(0.0, 0.0, m[1], m[4], m[2], m[5], 0.66666698455810547), surfaceScale);
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ outputCoverage_Stage0 = vec4(uCoverage_Stage0);
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_dst_in(outputCoverage_Stage0, ClampedGradientEffect_Stage1_c0_c0(vec4(1.0)));
+ }
+ vec4 output_Stage2;
+ {
+ vec2 dxy0 = uinnerRect_Stage2.xy - gl_FragCoord.xy;
+ vec2 dxy1 = gl_FragCoord.xy - uinnerRect_Stage2.zw;
+ vec2 dxy = max(max(dxy0, dxy1), 0.0);
+ float alpha = clamp(uradiusPlusHalf_Stage2.x - length(dxy), 0.0, 1.0);
+ alpha = 1.0 - alpha;
+ output_Stage2 = output_Stage1 * alpha;
+ }
+ vec4 output_Stage3;
+ {
+ vec2 coord = vTransformedCoords_1_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage3;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage3.xy, uTexDom_Stage3.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage3, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage3.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage3.y);
+ if (err > uDecalParams_Stage3.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage3.z < 1.0) {
+ err = 0.0;
+ }
+ temp0 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage3;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage3.xy, uTexDom_Stage3.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage3, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage3.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage3.y);
+ if (err > uDecalParams_Stage3.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage3.z < 1.0) {
+ err = 0.0;
+ }
+ temp1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage3;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage3.xy, uTexDom_Stage3.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage3, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage3.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage3.y);
+ if (err > uDecalParams_Stage3.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage3.z < 1.0) {
+ err = 0.0;
+ }
+ temp2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage3;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage3.xy, uTexDom_Stage3.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage3, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage3.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage3.y);
+ if (err > uDecalParams_Stage3.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage3.z < 1.0) {
+ err = 0.0;
+ }
+ temp3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage3.xy, uTexDom_Stage3.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage3, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage3.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage3.y);
+ if (err > uDecalParams_Stage3.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage3.z < 1.0) {
+ err = 0.0;
+ }
+ temp4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage3;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage3.xy, uTexDom_Stage3.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage3, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage3.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage3.y);
+ if (err > uDecalParams_Stage3.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage3.z < 1.0) {
+ err = 0.0;
+ }
+ temp5 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage3;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage3.xy, uTexDom_Stage3.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage3, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage3.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage3.y);
+ if (err > uDecalParams_Stage3.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage3.z < 1.0) {
+ err = 0.0;
+ }
+ temp6 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage3;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage3.xy, uTexDom_Stage3.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage3, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage3.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage3.y);
+ if (err > uDecalParams_Stage3.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage3.z < 1.0) {
+ err = 0.0;
+ }
+ temp7 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage3;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage3.xy, uTexDom_Stage3.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage3, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage3.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage3.y);
+ if (err > uDecalParams_Stage3.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage3.z < 1.0) {
+ err = 0.0;
+ }
+ temp8 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = normalize(uLightLocation_Stage3 - vec3(gl_FragCoord.xy, uSurfaceScale_Stage3 * m[4]));
+ output_Stage3 = light_Stage3(normal_Stage3(m, uSurfaceScale_Stage3), surfaceToLight, uLightColor_Stage3);
+ output_Stage3 *= output_Stage2;
+ }
+ {
+ vec2 d = gl_FragCoord.xy - uellipse_Stage5.xy;
+ vec2 Z = d * uellipse_Stage5.zw;
+ float grad_dot = 4.0 * dot(Z, Z);
+ {
+ grad_dot = max(grad_dot, 1.1754999560161448e-38);
+ }
+ }
+ {
+ sk_FragColor = vec4(0.0);
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 inPosition;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vec2 pos2 = (uViewM_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/883.shader_test b/shaders/skia/883.shader_test
new file mode 100644
index 0000000..3492299
--- /dev/null
+++ b/shaders/skia/883.shader_test
@@ -0,0 +1,518 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uColor_Stage0;
+uniform vec2 uImageIncrement_Stage1;
+uniform float uSurfaceScale_Stage1;
+uniform vec3 uLightColor_Stage1;
+uniform float uKD_Stage1;
+uniform vec4 uTexDom_Stage1;
+uniform vec3 uDecalParams_Stage1;
+uniform vec3 uLightLocation_Stage1;
+uniform float uExponent_Stage1;
+uniform float uCosInnerConeAngle_Stage1;
+uniform float uCosOuterConeAngle_Stage1;
+uniform float uConeScale_Stage1;
+uniform vec3 uS_Stage1;
+uniform vec2 uImageIncrement_Stage3;
+uniform float uSurfaceScale_Stage3;
+uniform vec3 uLightColor_Stage3;
+uniform float uKD_Stage3;
+uniform vec4 uTexDom_Stage3;
+uniform vec3 uDecalParams_Stage3;
+uniform vec3 uLightDirection_Stage3;
+uniform vec4 ucircleData_Stage4;
+uniform vec2 uImageIncrement_Stage5;
+uniform vec4 uKernel_Stage5[3];
+uniform vec2 ubaseFrequency_Stage6_c0_c0;
+uniform vec2 uDstTextureUpperLeft_Stage7;
+uniform vec2 uDstTextureCoordScale_Stage7;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage3;
+uniform sampler2D uTextureSampler_0_Stage4;
+uniform sampler2D uTextureSampler_0_Stage5;
+uniform sampler2D uTextureSampler_0_Stage6;
+uniform sampler2D uTextureSampler_1_Stage6;
+uniform sampler2D uDstTextureSampler_Stage7;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+noperspective in vec2 vTransformedCoords_3_Stage0;
+vec4 light_Stage1(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ float colorScale = uKD_Stage1 * dot(normal, surfaceToLight);
+ return vec4(lightColor * clamp(colorScale, 0.0, 1.0), 1.0);
+}
+float sobel_Stage1(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage1(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage1(float m[9], float surfaceScale) {
+ return pointToNormal_Stage1(sobel_Stage1(m[0], m[2], m[3], m[5], m[6], m[8], 0.25), sobel_Stage1(m[0], m[6], m[1], m[7], m[2], m[8], 0.25), surfaceScale);
+}
+vec3 lightColor_Stage1(vec3 surfaceToLight) {
+ float cosAngle = -dot(surfaceToLight, uS_Stage1);
+ if (cosAngle < uCosOuterConeAngle_Stage1) {
+ return vec3(0.0);
+ }
+ float scale = pow(cosAngle, uExponent_Stage1);
+ if (cosAngle < uCosInnerConeAngle_Stage1) {
+ return ((uLightColor_Stage1 * scale) * (cosAngle - uCosOuterConeAngle_Stage1)) * uConeScale_Stage1;
+ }
+ return uLightColor_Stage1;
+}
+vec4 light_Stage3(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ float colorScale = uKD_Stage3 * dot(normal, surfaceToLight);
+ return vec4(lightColor * clamp(colorScale, 0.0, 1.0), 1.0);
+}
+float sobel_Stage3(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage3(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage3(float m[9], float surfaceScale) {
+ return pointToNormal_Stage3(sobel_Stage3(m[0], m[2], m[3], m[5], m[6], m[8], 0.25), sobel_Stage3(m[0], m[6], m[1], m[7], m[2], m[8], 0.25), surfaceScale);
+}
+float perlinnoise_Stage6_c0_c0(float chanCoord, vec2 noiseVec) {
+ vec4 floorVal;
+ floorVal.xy = floor(noiseVec);
+ floorVal.zw = floorVal.xy + vec2(1.0);
+ vec2 fractVal = fract(noiseVec);
+ vec2 noiseSmooth = (fractVal * fractVal) * (vec2(3.0) - vec2(2.0) * fractVal);
+ floorVal = fract(floor(mod(floorVal, 256.0)) / vec4(256.0));
+ vec2 latticeIdx;
+ latticeIdx.x = texture(uTextureSampler_0_Stage6, vec2(floorVal.x, 0.5)).x;
+ latticeIdx.y = texture(uTextureSampler_0_Stage6, vec2(floorVal.z, 0.5)).x;
+ vec4 bcoords = fract(latticeIdx.xyxy + floorVal.yyww);
+ vec2 uv;
+ vec4 lattice = texture(uTextureSampler_1_Stage6, vec2(bcoords.x, chanCoord)).zyxw;
+ uv.x = dot((lattice.yw + lattice.xz * vec2(0.00390625)) * vec2(2.0) - vec2(1.0), fractVal);
+ fractVal.x -= 1.0;
+ lattice = texture(uTextureSampler_1_Stage6, vec2(bcoords.y, chanCoord)).zyxw;
+ uv.y = dot((lattice.yw + lattice.xz * vec2(0.00390625)) * vec2(2.0) - vec2(1.0), fractVal);
+ vec2 ab;
+ ab.x = mix(uv.x, uv.y, noiseSmooth.x);
+ fractVal.y -= 1.0;
+ lattice = texture(uTextureSampler_1_Stage6, vec2(bcoords.w, chanCoord)).zyxw;
+ uv.y = dot((lattice.yw + lattice.xz * vec2(0.00390625)) * vec2(2.0) - vec2(1.0), fractVal);
+ fractVal.x += 1.0;
+ lattice = texture(uTextureSampler_1_Stage6, vec2(bcoords.z, chanCoord)).zyxw;
+ uv.x = dot((lattice.yw + lattice.xz * vec2(0.00390625)) * vec2(2.0) - vec2(1.0), fractVal);
+ ab.y = mix(uv.x, uv.y, noiseSmooth.x);
+ return mix(ab.x, ab.y, noiseSmooth.y);
+}
+vec4 PerlinNoise_Stage6_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 noiseVec = floor(vTransformedCoords_3_Stage0) * ubaseFrequency_Stage6_c0_c0;
+ _output = vec4(0.0);
+ float ratio = 1.0;
+ for (int octave = 0;octave < 7; ++octave) {
+ _output += abs(vec4(perlinnoise_Stage6_c0_c0(0.125, noiseVec), perlinnoise_Stage6_c0_c0(0.375, noiseVec), perlinnoise_Stage6_c0_c0(0.625, noiseVec), perlinnoise_Stage6_c0_c0(0.875, noiseVec))) * ratio;
+ noiseVec *= vec2(2.0);
+ ratio *= 0.5;
+ }
+ _output = clamp(_output, 0.0, 1.0);
+ _output = vec4(_output.xyz * _output.www, _output.w);
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+vec4 blend_src_out(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = uColor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec2 coord = vTransformedCoords_0_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp0 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp5 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp6 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp7 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp8 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = normalize(uLightLocation_Stage1 - vec3(gl_FragCoord.xy, uSurfaceScale_Stage1 * m[4]));
+ output_Stage1 = light_Stage1(normal_Stage1(m, uSurfaceScale_Stage1), surfaceToLight, lightColor_Stage1(surfaceToLight));
+ output_Stage1 *= outputColor_Stage0;
+ }
+ vec4 output_Stage2;
+ {
+ {
+ output_Stage2 = clamp(output_Stage1, 0.0, 1.0);
+ }
+ }
+ vec4 output_Stage3;
+ {
+ vec2 coord = vTransformedCoords_1_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage3;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage3.xy, uTexDom_Stage3.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage3, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage3.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage3.y);
+ if (err > uDecalParams_Stage3.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage3.z < 1.0) {
+ err = 0.0;
+ }
+ temp0 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage3;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage3.xy, uTexDom_Stage3.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage3, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage3.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage3.y);
+ if (err > uDecalParams_Stage3.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage3.z < 1.0) {
+ err = 0.0;
+ }
+ temp1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage3;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage3.xy, uTexDom_Stage3.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage3, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage3.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage3.y);
+ if (err > uDecalParams_Stage3.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage3.z < 1.0) {
+ err = 0.0;
+ }
+ temp2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage3;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage3.xy, uTexDom_Stage3.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage3, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage3.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage3.y);
+ if (err > uDecalParams_Stage3.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage3.z < 1.0) {
+ err = 0.0;
+ }
+ temp3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage3.xy, uTexDom_Stage3.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage3, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage3.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage3.y);
+ if (err > uDecalParams_Stage3.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage3.z < 1.0) {
+ err = 0.0;
+ }
+ temp4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage3;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage3.xy, uTexDom_Stage3.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage3, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage3.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage3.y);
+ if (err > uDecalParams_Stage3.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage3.z < 1.0) {
+ err = 0.0;
+ }
+ temp5 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage3;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage3.xy, uTexDom_Stage3.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage3, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage3.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage3.y);
+ if (err > uDecalParams_Stage3.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage3.z < 1.0) {
+ err = 0.0;
+ }
+ temp6 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage3;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage3.xy, uTexDom_Stage3.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage3, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage3.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage3.y);
+ if (err > uDecalParams_Stage3.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage3.z < 1.0) {
+ err = 0.0;
+ }
+ temp7 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage3;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage3.xy, uTexDom_Stage3.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage3, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage3.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage3.y);
+ if (err > uDecalParams_Stage3.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage3.z < 1.0) {
+ err = 0.0;
+ }
+ temp8 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = uLightDirection_Stage3;
+ output_Stage3 = light_Stage3(normal_Stage3(m, uSurfaceScale_Stage3), surfaceToLight, uLightColor_Stage3);
+ output_Stage3 *= output_Stage2;
+ }
+ vec4 output_Stage4;
+ {
+ vec2 vec = vec2((gl_FragCoord.x - ucircleData_Stage4.x) * ucircleData_Stage4.w, (gl_FragCoord.y - ucircleData_Stage4.y) * ucircleData_Stage4.w);
+ float dist = length(vec) + (0.5 - ucircleData_Stage4.z) * ucircleData_Stage4.w;
+ output_Stage4 = output_Stage3 * texture(uTextureSampler_0_Stage4, vec2(dist, 0.5)).w;
+ }
+ vec4 output_Stage5;
+ {
+ output_Stage5 = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_2_Stage0 - 5.0 * uImageIncrement_Stage5;
+ vec2 coordSampled = vec2(0.0, 0.0);
+ coordSampled = coord;
+ output_Stage5 += texture(uTextureSampler_0_Stage5, coordSampled) * uKernel_Stage5[0].x;
+ coord += uImageIncrement_Stage5;
+ coordSampled = coord;
+ output_Stage5 += texture(uTextureSampler_0_Stage5, coordSampled) * uKernel_Stage5[0].y;
+ coord += uImageIncrement_Stage5;
+ coordSampled = coord;
+ output_Stage5 += texture(uTextureSampler_0_Stage5, coordSampled) * uKernel_Stage5[0].z;
+ coord += uImageIncrement_Stage5;
+ coordSampled = coord;
+ output_Stage5 += texture(uTextureSampler_0_Stage5, coordSampled) * uKernel_Stage5[0].w;
+ coord += uImageIncrement_Stage5;
+ coordSampled = coord;
+ output_Stage5 += texture(uTextureSampler_0_Stage5, coordSampled) * uKernel_Stage5[1].x;
+ coord += uImageIncrement_Stage5;
+ coordSampled = coord;
+ output_Stage5 += texture(uTextureSampler_0_Stage5, coordSampled) * uKernel_Stage5[1].y;
+ coord += uImageIncrement_Stage5;
+ coordSampled = coord;
+ output_Stage5 += texture(uTextureSampler_0_Stage5, coordSampled) * uKernel_Stage5[1].z;
+ coord += uImageIncrement_Stage5;
+ coordSampled = coord;
+ output_Stage5 += texture(uTextureSampler_0_Stage5, coordSampled) * uKernel_Stage5[1].w;
+ coord += uImageIncrement_Stage5;
+ coordSampled = coord;
+ output_Stage5 += texture(uTextureSampler_0_Stage5, coordSampled) * uKernel_Stage5[2].x;
+ coord += uImageIncrement_Stage5;
+ coordSampled = coord;
+ output_Stage5 += texture(uTextureSampler_0_Stage5, coordSampled) * uKernel_Stage5[2].y;
+ coord += uImageIncrement_Stage5;
+ coordSampled = coord;
+ output_Stage5 += texture(uTextureSampler_0_Stage5, coordSampled) * uKernel_Stage5[2].z;
+ coord += uImageIncrement_Stage5;
+ output_Stage5 *= output_Stage4;
+ }
+ vec4 output_Stage6;
+ {
+ output_Stage6 = blend_dst_in(vec4(1.0), PerlinNoise_Stage6_c0_c0(vec4(1.0)));
+ }
+ {
+ if (all(lessThanEqual(output_Stage6.xyz, vec3(0.0)))) {
+ discard;
+ }
+ vec2 _dstTexCoord = (gl_FragCoord.xy - uDstTextureUpperLeft_Stage7) * uDstTextureCoordScale_Stage7;
+ _dstTexCoord.y = 1.0 - _dstTexCoord.y;
+ vec4 _dstColor = texture(uDstTextureSampler_Stage7, _dstTexCoord);
+ sk_FragColor = blend_src_out(output_Stage5, _dstColor);
+ sk_FragColor = output_Stage6 * sk_FragColor + (vec4(1.0) - output_Stage6) * _dstColor;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+uniform mat3 uCoordTransformMatrix_3_Stage0;
+in vec2 position;
+in vec2 inLocalCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+noperspective out vec2 vTransformedCoords_3_Stage0;
+void main() {
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ vTransformedCoords_3_Stage0 = (uCoordTransformMatrix_3_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/886-1.shader_test b/shaders/skia/886-1.shader_test
new file mode 100644
index 0000000..d06ab73
--- /dev/null
+++ b/shaders/skia/886-1.shader_test
@@ -0,0 +1,119 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 ufocalParams_Stage2_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage2_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage2_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage2_c0_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage2_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_1_Stage0;
+ float t = -1.0;
+ {
+ {
+ float invR1 = ufocalParams_Stage2_c0_c0_c0_c0.x;
+ float x_t = -1.0;
+ {
+ x_t = length(p) - p.x * invR1;
+ }
+ {
+ {
+ t = x_t;
+ }
+ }
+ {
+ t = 1.0 - t;
+ }
+ }
+ }
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage2_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage2_c0_c0_c1_c0;
+ bias = ubias0_1_Stage2_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage2_c0_c0_c1_c0;
+ bias = ubias2_3_Stage2_c0_c0_c1_c0;
+ }
+ } else {
+ {
+ scale = uscale4_5_Stage2_c0_c0_c1_c0;
+ bias = ubias4_5_Stage2_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage2_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else {
+ {
+ t.x = fract(t.x);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage2_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_dst_in(output_Stage1, TiledGradientEffect_Stage2_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/886.shader_test b/shaders/skia/886.shader_test
new file mode 100644
index 0000000..4109080
--- /dev/null
+++ b/shaders/skia/886.shader_test
@@ -0,0 +1,29 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uColor_Stage0;
+void main() {
+ {
+ sk_FragColor = 1.0 - vec4(1.0);
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 inPosition;
+void main() {
+ vec2 pos2 = inPosition;
+ {
+ vec2 _posTmp = pos2;
+ _posTmp = floor(_posTmp) + vec2(0.5, 0.5);
+ gl_Position = vec4(_posTmp, 0.0, 1.0);
+ }
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/889-1.shader_test b/shaders/skia/889-1.shader_test
new file mode 100644
index 0000000..c4c1160
--- /dev/null
+++ b/shaders/skia/889-1.shader_test
@@ -0,0 +1,130 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage2_c0_c0;
+uniform vec4 urightBorderColor_Stage2_c0_c0;
+uniform vec2 ufocalParams_Stage2_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage2_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage2_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage2_c0_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage2_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_1_Stage0;
+ float t = -1.0;
+ float v = 1.0;
+ {
+ {
+ float invR1 = ufocalParams_Stage2_c0_c0_c0_c0.x;
+ float x_t = -1.0;
+ {
+ float temp = p.x * p.x - p.y * p.y;
+ if (temp >= 0.0) {
+ {
+ x_t = sqrt(temp) - p.x * invR1;
+ }
+ }
+ }
+ {
+ if (x_t <= 0.0) {
+ v = -1.0;
+ }
+ }
+ {
+ {
+ t = x_t;
+ }
+ }
+ }
+ }
+ _output = vec4(t, v, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage2_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage2_c0_c0_c1_c0;
+ bias = ubias0_1_Stage2_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage2_c0_c0_c1_c0;
+ bias = ubias2_3_Stage2_c0_c0_c1_c0;
+ }
+ } else {
+ {
+ scale = uscale4_5_Stage2_c0_c0_c1_c0;
+ bias = ubias4_5_Stage2_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage2_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage2_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage2_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage2_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_dst_in(output_Stage1, ClampedGradientEffect_Stage2_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/889.shader_test b/shaders/skia/889.shader_test
new file mode 100644
index 0000000..c9122d4
--- /dev/null
+++ b/shaders/skia/889.shader_test
@@ -0,0 +1,40 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+in vec2 vEllipseOffsets0_Stage0;
+in vec2 vEllipseOffsets1_Stage0;
+in vec4 vinColor_Stage0;
+void main() {
+ {
+ vec2 duvdx = dFdx(vEllipseOffsets0_Stage0);
+ vec2 duvdy = dFdy(vEllipseOffsets0_Stage0);
+ vec2 grad = vec2(vEllipseOffsets0_Stage0.x * duvdx.x + vEllipseOffsets0_Stage0.y * duvdx.y, vEllipseOffsets0_Stage0.x * duvdy.x + vEllipseOffsets0_Stage0.y * duvdy.y);
+ float grad_dot = 4.0 * dot(grad, grad);
+ grad_dot = max(grad_dot, 1.1754999560161448e-38);
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec2 inEllipseOffsets0;
+in vec2 inEllipseOffsets1;
+out vec2 vEllipseOffsets0_Stage0;
+out vec2 vEllipseOffsets1_Stage0;
+out vec4 vinColor_Stage0;
+void main() {
+ vEllipseOffsets0_Stage0 = inEllipseOffsets0;
+ vEllipseOffsets1_Stage0 = inEllipseOffsets1;
+ vinColor_Stage0 = inColor;
+ vec3 pos3 = uViewM_Stage0 * vec3(inPosition, 1.0);
+ gl_Position = vec4(pos3.x, pos3.y, 0.0, pos3.z);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/892-1.shader_test b/shaders/skia/892-1.shader_test
new file mode 100644
index 0000000..d14d6c0
--- /dev/null
+++ b/shaders/skia/892-1.shader_test
@@ -0,0 +1,129 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage2_c0_c0;
+uniform vec4 urightBorderColor_Stage2_c0_c0;
+uniform vec2 ufocalParams_Stage2_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage2_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage2_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage2_c0_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage2_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_1_Stage0;
+ float t = -1.0;
+ float v = 1.0;
+ {
+ {
+ float x_t = -1.0;
+ {
+ x_t = dot(p, p) / p.x;
+ }
+ {
+ if (x_t <= 0.0) {
+ v = -1.0;
+ }
+ }
+ {
+ {
+ t = x_t;
+ }
+ }
+ }
+ }
+ _output = vec4(t, v, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage2_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage2_c0_c0_c1_c0;
+ bias = ubias0_1_Stage2_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage2_c0_c0_c1_c0;
+ bias = ubias2_3_Stage2_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage2_c0_c0_c1_c0;
+ bias = ubias4_5_Stage2_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage2_c0_c0_c1_c0;
+ bias = ubias6_7_Stage2_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage2_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage2_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage2_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage2_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_dst_in(output_Stage1, ClampedGradientEffect_Stage2_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/892.shader_test b/shaders/skia/892.shader_test
new file mode 100644
index 0000000..578c0bd
--- /dev/null
+++ b/shaders/skia/892.shader_test
@@ -0,0 +1,56 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+noperspective in vec2 vEllipseOffsets0_Stage0;
+noperspective in vec2 vEllipseOffsets1_Stage0;
+noperspective in vec4 vinColor_Stage0;
+void main() {
+ {
+ vec2 scaledOffset = vEllipseOffsets0_Stage0;
+ float test = dot(scaledOffset, scaledOffset) - 1.0;
+ vec2 duvdx = dFdx(vEllipseOffsets0_Stage0);
+ vec2 duvdy = -dFdy(vEllipseOffsets0_Stage0);
+ vec2 grad = vec2(vEllipseOffsets0_Stage0.x * duvdx.x + vEllipseOffsets0_Stage0.y * duvdx.y, vEllipseOffsets0_Stage0.x * duvdy.x + vEllipseOffsets0_Stage0.y * duvdy.y);
+ float grad_dot = 4.0 * dot(grad, grad);
+ grad_dot = max(grad_dot, 1.1754999560161448e-38);
+ float invlen = inversesqrt(grad_dot);
+ float edgeAlpha = clamp(0.5 - test * invlen, 0.0, 1.0);
+ scaledOffset = vEllipseOffsets1_Stage0;
+ test = dot(scaledOffset, scaledOffset) - 1.0;
+ duvdx = dFdx(vEllipseOffsets1_Stage0);
+ duvdy = -dFdy(vEllipseOffsets1_Stage0);
+ grad = vec2(vEllipseOffsets1_Stage0.x * duvdx.x + vEllipseOffsets1_Stage0.y * duvdx.y, vEllipseOffsets1_Stage0.x * duvdy.x + vEllipseOffsets1_Stage0.y * duvdy.y);
+ grad_dot = 4.0 * dot(grad, grad);
+ invlen = inversesqrt(grad_dot);
+ edgeAlpha *= clamp(0.5 + test * invlen, 0.0, 1.0);
+ }
+ {
+ sk_FragColor = vec4(0.0);
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec2 inEllipseOffsets0;
+in vec2 inEllipseOffsets1;
+noperspective out vec2 vEllipseOffsets0_Stage0;
+noperspective out vec2 vEllipseOffsets1_Stage0;
+noperspective out vec4 vinColor_Stage0;
+void main() {
+ vEllipseOffsets0_Stage0 = inEllipseOffsets0;
+ vEllipseOffsets1_Stage0 = inEllipseOffsets1;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = (uViewM_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/895-1.shader_test b/shaders/skia/895-1.shader_test
new file mode 100644
index 0000000..b981d96
--- /dev/null
+++ b/shaders/skia/895-1.shader_test
@@ -0,0 +1,115 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 ufocalParams_Stage2_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage2_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage2_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage2_c0_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage2_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_1_Stage0;
+ float t = -1.0;
+ {
+ {
+ float r0 = ufocalParams_Stage2_c0_c0_c0_c0.x;
+ {
+ t = length(p) - r0;
+ }
+ }
+ }
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage2_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage2_c0_c0_c1_c0;
+ bias = ubias0_1_Stage2_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage2_c0_c0_c1_c0;
+ bias = ubias2_3_Stage2_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage2_c0_c0_c1_c0;
+ bias = ubias4_5_Stage2_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage2_c0_c0_c1_c0;
+ bias = ubias6_7_Stage2_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage2_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else {
+ {
+ t.x = fract(t.x);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage2_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_dst_in(output_Stage1, TiledGradientEffect_Stage2_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/895.shader_test b/shaders/skia/895.shader_test
new file mode 100644
index 0000000..44f115c
--- /dev/null
+++ b/shaders/skia/895.shader_test
@@ -0,0 +1,120 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 urectUniform_Stage2;
+uniform vec4 ucolor_Stage3;
+uniform vec4 uinnerRect_Stage4;
+uniform vec2 uradiusPlusHalf_Stage4;
+uniform vec4 urectH_Stage5;
+uniform float uinvSixSigma_Stage5;
+uniform sampler2D uTextureSampler_0_Stage5;
+noperspective in vec2 vEllipseOffsets0_Stage0;
+noperspective in vec2 vEllipseOffsets1_Stage0;
+noperspective in vec4 vinColor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ vec2 scaledOffset = vEllipseOffsets0_Stage0;
+ float test = dot(scaledOffset, scaledOffset) - 1.0;
+ vec2 duvdx = dFdx(vEllipseOffsets0_Stage0);
+ vec2 duvdy = -dFdy(vEllipseOffsets0_Stage0);
+ vec2 grad = vec2(vEllipseOffsets0_Stage0.x * duvdx.x + vEllipseOffsets0_Stage0.y * duvdx.y, vEllipseOffsets0_Stage0.x * duvdy.x + vEllipseOffsets0_Stage0.y * duvdy.y);
+ float grad_dot = 4.0 * dot(grad, grad);
+ grad_dot = max(grad_dot, 1.1754999560161448e-38);
+ float invlen = inversesqrt(grad_dot);
+ float edgeAlpha = clamp(0.5 - test * invlen, 0.0, 1.0);
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = outputCoverage_Stage0;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_0_Stage0.x);
+ uint y = uint(vTransformedCoords_0_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ output_Stage1 = vec4(clamp(output_Stage1.xyz + value * 0.01587301678955555, 0.0, output_Stage1.w), output_Stage1.w);
+ }
+ vec4 output_Stage2;
+ {
+ float alpha;
+ {
+ float xSub, ySub;
+ xSub = min(gl_FragCoord.x - urectUniform_Stage2.x, 0.0);
+ xSub += min(urectUniform_Stage2.z - gl_FragCoord.x, 0.0);
+ ySub = min(gl_FragCoord.y - urectUniform_Stage2.y, 0.0);
+ ySub += min(urectUniform_Stage2.w - gl_FragCoord.y, 0.0);
+ alpha = (1.0 + max(xSub, -1.0)) * (1.0 + max(ySub, -1.0));
+ }
+ {
+ alpha = 1.0 - alpha;
+ }
+ output_Stage2 = output_Stage1 * alpha;
+ }
+ vec4 output_Stage3;
+ {
+ {
+ output_Stage3 = output_Stage2 * ucolor_Stage3;
+ }
+ }
+ vec4 output_Stage4;
+ {
+ vec2 dxy0 = uinnerRect_Stage4.xy - gl_FragCoord.xy;
+ vec2 dxy1 = gl_FragCoord.xy - uinnerRect_Stage4.zw;
+ vec2 dxy = max(max(dxy0, dxy1), 0.0);
+ float alpha = clamp(uradiusPlusHalf_Stage4.x - length(dxy), 0.0, 1.0);
+ output_Stage4 = output_Stage3 * alpha;
+ }
+ vec4 output_Stage5;
+ {
+ float xCoverage, yCoverage;
+ {
+ float x, y;
+ {
+ x = max(urectH_Stage5.x - gl_FragCoord.x, gl_FragCoord.x - urectH_Stage5.z);
+ y = max(urectH_Stage5.y - gl_FragCoord.y, gl_FragCoord.y - urectH_Stage5.w);
+ }
+ xCoverage = texture(uTextureSampler_0_Stage5, vec2(x * uinvSixSigma_Stage5, 0.5)).w;
+ yCoverage = texture(uTextureSampler_0_Stage5, vec2(y * uinvSixSigma_Stage5, 0.5)).w;
+ output_Stage5 = (output_Stage4 * xCoverage) * yCoverage;
+ }
+ output_Stage5 = (output_Stage4 * xCoverage) * yCoverage;
+ }
+ {
+ sk_FragColor = output_Stage5;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec2 inEllipseOffsets0;
+in vec2 inEllipseOffsets1;
+noperspective out vec2 vEllipseOffsets0_Stage0;
+noperspective out vec2 vEllipseOffsets1_Stage0;
+noperspective out vec4 vinColor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vEllipseOffsets0_Stage0 = inEllipseOffsets0;
+ vEllipseOffsets1_Stage0 = inEllipseOffsets1;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = (uViewM_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/898-1.shader_test b/shaders/skia/898-1.shader_test
new file mode 100644
index 0000000..4c2ba1f
--- /dev/null
+++ b/shaders/skia/898-1.shader_test
@@ -0,0 +1,112 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 ufocalParams_Stage2_c0_c0_c0_c0;
+uniform vec4 uscale01_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias01_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale23_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias23_Stage2_c0_c0_c1_c0;
+uniform float uthreshold_Stage2_c0_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage2_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_1_Stage0;
+ float t = -1.0;
+ float v = 1.0;
+ {
+ {
+ float x_t = -1.0;
+ {
+ x_t = dot(p, p) / p.x;
+ }
+ {
+ if (x_t <= 0.0) {
+ v = -1.0;
+ }
+ }
+ {
+ {
+ t = x_t;
+ }
+ }
+ {
+ t = 1.0 - t;
+ }
+ }
+ }
+ _output = vec4(t, v, 0.0, 0.0);
+ return _output;
+}
+vec4 DualIntervalGradientColorizer_Stage2_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthreshold_Stage2_c0_c0_c1_c0) {
+ scale = uscale01_Stage2_c0_c0_c1_c0;
+ bias = ubias01_Stage2_c0_c0_c1_c0;
+ } else {
+ scale = uscale23_Stage2_c0_c0_c1_c0;
+ bias = ubias23_Stage2_c0_c0_c1_c0;
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage2_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else {
+ {
+ t.x = fract(t.x);
+ }
+ _output = DualIntervalGradientColorizer_Stage2_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_dst_in(output_Stage1, TiledGradientEffect_Stage2_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/901.shader_test b/shaders/skia/901.shader_test
new file mode 100644
index 0000000..fd957d8
--- /dev/null
+++ b/shaders/skia/901.shader_test
@@ -0,0 +1,374 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uColor_Stage0;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+uniform vec2 uImageIncrement_Stage2;
+uniform float uSurfaceScale_Stage2;
+uniform vec3 uLightColor_Stage2;
+uniform float uKS_Stage2;
+uniform float uShininess_Stage2;
+uniform vec4 uTexDom_Stage2;
+uniform vec3 uDecalParams_Stage2;
+uniform vec3 uLightLocation_Stage2;
+uniform float uExponent_Stage2;
+uniform float uCosInnerConeAngle_Stage2;
+uniform float uCosOuterConeAngle_Stage2;
+uniform float uConeScale_Stage2;
+uniform vec3 uS_Stage2;
+uniform vec4 uellipse_Stage3;
+uniform float uinnerThreshold_Stage4_c1_c0;
+uniform float uouterThreshold_Stage4_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage2;
+uniform sampler2D uTextureSampler_0_Stage4;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_0_Stage0;
+ float t = -1.0;
+ {
+ {
+ float r0 = ufocalParams_Stage1_c0_c0_c0_c0.x;
+ {
+ t = length(p) - r0;
+ }
+ }
+ }
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 light_Stage2(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ vec3 halfDir = normalize(surfaceToLight + vec3(0.0, 0.0, 1.0));
+ float colorScale = uKS_Stage2 * pow(dot(normal, halfDir), uShininess_Stage2);
+ vec3 color = lightColor * clamp(colorScale, 0.0, 1.0);
+ return vec4(color, max(max(color.x, color.y), color.z));
+}
+float sobel_Stage2(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage2(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage2(float m[9], float surfaceScale) {
+ return pointToNormal_Stage2(sobel_Stage2(0.0, 0.0, m[4], m[5], m[7], m[8], 0.66666698455810547), sobel_Stage2(0.0, 0.0, m[4], m[7], m[5], m[8], 0.66666698455810547), surfaceScale);
+}
+vec3 lightColor_Stage2(vec3 surfaceToLight) {
+ float cosAngle = -dot(surfaceToLight, uS_Stage2);
+ if (cosAngle < uCosOuterConeAngle_Stage2) {
+ return vec3(0.0);
+ }
+ float scale = pow(cosAngle, uExponent_Stage2);
+ if (cosAngle < uCosInnerConeAngle_Stage2) {
+ return ((uLightColor_Stage2 * scale) * (cosAngle - uCosOuterConeAngle_Stage2)) * uConeScale_Stage2;
+ }
+ return uLightColor_Stage2;
+}
+vec4 AlphaThresholdFragmentProcessor_Stage4_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 color = _input;
+ vec4 mask_color = texture(uTextureSampler_0_Stage4, vTransformedCoords_2_Stage0);
+ if (mask_color.w < 0.5) {
+ if (color.w > uouterThreshold_Stage4_c1_c0) {
+ float scale = uouterThreshold_Stage4_c1_c0 / color.w;
+ color.xyz *= scale;
+ color.w = uouterThreshold_Stage4_c1_c0;
+ }
+ } else if (color.w < uinnerThreshold_Stage4_c1_c0) {
+ float scale = uinnerThreshold_Stage4_c1_c0 / max(0.0010000000474974513, color.w);
+ color.xyz *= scale;
+ color.w = uinnerThreshold_Stage4_c1_c0;
+ }
+ _output = color;
+ return _output;
+}
+vec4 ClampFragmentProcessor_Stage4_c2_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = clamp(_input, 0.0, 1.0);
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+float _blend_color_saturation(vec3 color) {
+ return max(max(color.x, color.y), color.z) - min(min(color.x, color.y), color.z);
+}
+vec3 _blend_set_color_saturation_helper(vec3 minMidMax, float sat) {
+ if (minMidMax.x < minMidMax.z) {
+ return vec3(0.0, (sat * (minMidMax.y - minMidMax.x)) / (minMidMax.z - minMidMax.x), sat);
+ }
+ return vec3(0.0);
+}
+vec3 _blend_set_color_saturation(vec3 hueLumColor, vec3 satColor) {
+ float sat = _blend_color_saturation(satColor);
+ if (hueLumColor.x <= hueLumColor.y) {
+ if (hueLumColor.y <= hueLumColor.z) {
+ hueLumColor.xyz = _blend_set_color_saturation_helper(hueLumColor, sat);
+ } else if (hueLumColor.x <= hueLumColor.z) {
+ hueLumColor.xzy = _blend_set_color_saturation_helper(hueLumColor.xzy, sat);
+ } else {
+ hueLumColor.zxy = _blend_set_color_saturation_helper(hueLumColor.zxy, sat);
+ }
+ } else if (hueLumColor.x <= hueLumColor.z) {
+ hueLumColor.yxz = _blend_set_color_saturation_helper(hueLumColor.yxz, sat);
+ } else if (hueLumColor.y <= hueLumColor.z) {
+ hueLumColor.yzx = _blend_set_color_saturation_helper(hueLumColor.yzx, sat);
+ } else {
+ hueLumColor.zyx = _blend_set_color_saturation_helper(hueLumColor.zyx, sat);
+ }
+ return hueLumColor;
+}
+float _blend_color_luminance(vec3 color) {
+ return dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), color);
+}
+vec3 _blend_set_color_luminance(vec3 hueSatColor, float alpha, vec3 lumColor) {
+ float lum = _blend_color_luminance(lumColor);
+ vec3 result = (lum - _blend_color_luminance(hueSatColor)) + hueSatColor;
+ float minComp = min(min(result.x, result.y), result.z);
+ float maxComp = max(max(result.x, result.y), result.z);
+ if (minComp < 0.0 && lum != minComp) {
+ result = lum + ((result - lum) * lum) / (lum - minComp);
+ }
+ if (maxComp > alpha && maxComp != lum) {
+ return lum + ((result - lum) * (alpha - lum)) / (maxComp - lum);
+ }
+ return result;
+}
+vec4 blend_hue(vec4 src, vec4 dst) {
+ float alpha = dst.w * src.w;
+ vec3 sda = src.xyz * dst.w;
+ vec3 dsa = dst.xyz * src.w;
+ return vec4((((_blend_set_color_luminance(_blend_set_color_saturation(sda, dsa), alpha, dsa) + dst.xyz) - dsa) + src.xyz) - sda, (src.w + dst.w) - alpha);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_dst_in(vec4(1.0), TiledGradientEffect_Stage1_c0_c0(vec4(1.0)));
+ }
+ vec4 output_Stage2;
+ {
+ vec2 coord = vTransformedCoords_1_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp0 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp5 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp6 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp7 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp8 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = normalize(uLightLocation_Stage2 - vec3(gl_FragCoord.xy, uSurfaceScale_Stage2 * m[4]));
+ output_Stage2 = light_Stage2(normal_Stage2(m, uSurfaceScale_Stage2), surfaceToLight, lightColor_Stage2(surfaceToLight));
+ output_Stage2 *= output_Stage1;
+ }
+ vec4 output_Stage3;
+ {
+ vec2 d = gl_FragCoord.xy - uellipse_Stage3.xy;
+ vec2 Z = d * uellipse_Stage3.zw;
+ float implicit = dot(Z, d) - 1.0;
+ float grad_dot = 4.0 * dot(Z, Z);
+ {
+ grad_dot = max(grad_dot, 1.1754999560161448e-38);
+ }
+ float approx_dist = implicit * inversesqrt(grad_dot);
+ float alpha;
+ {
+ alpha = clamp(0.5 + approx_dist, 0.0, 1.0);
+ }
+ output_Stage3 = output_Stage2 * alpha;
+ }
+ vec4 output_Stage4;
+ {
+ vec4 inputColor = vec4(output_Stage3.xyz, 1.0);
+ output_Stage4 = blend_hue(AlphaThresholdFragmentProcessor_Stage4_c1_c0(inputColor), ClampFragmentProcessor_Stage4_c2_c0(inputColor));
+ output_Stage4 *= output_Stage3.w;
+ }
+ {
+ sk_FragColor = 1.0 - output_Stage4;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+in vec2 inPosition;
+in vec2 inLocalCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+void main() {
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/904-1.shader_test b/shaders/skia/904-1.shader_test
new file mode 100644
index 0000000..0668437
--- /dev/null
+++ b/shaders/skia/904-1.shader_test
@@ -0,0 +1,127 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage2_c0_c0;
+uniform vec4 urightBorderColor_Stage2_c0_c0;
+uniform vec2 ufocalParams_Stage2_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale8_9_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias8_9_Stage2_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage2_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage2_c0_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage2_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_1_Stage0;
+ float t = -1.0;
+ {
+ {
+ float r0 = ufocalParams_Stage2_c0_c0_c0_c0.x;
+ {
+ t = length(p) - r0;
+ }
+ }
+ }
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage2_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.w) {
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage2_c0_c0_c1_c0;
+ bias = ubias0_1_Stage2_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage2_c0_c0_c1_c0;
+ bias = ubias2_3_Stage2_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage2_c0_c0_c1_c0;
+ bias = ubias4_5_Stage2_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage2_c0_c0_c1_c0;
+ bias = ubias6_7_Stage2_c0_c0_c1_c0;
+ }
+ }
+ } else {
+ {
+ {
+ scale = uscale8_9_Stage2_c0_c0_c1_c0;
+ bias = ubias8_9_Stage2_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage2_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage2_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage2_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage2_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_dst_in(output_Stage1, ClampedGradientEffect_Stage2_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/904.shader_test b/shaders/skia/904.shader_test
new file mode 100644
index 0000000..dfee00b
--- /dev/null
+++ b/shaders/skia/904.shader_test
@@ -0,0 +1,173 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+uniform vec2 uScale_Stage1;
+uniform vec4 uTexDom_Stage1;
+uniform vec3 uDecalParams_Stage1;
+uniform vec4 uboundsUniform_Stage2;
+uniform float uxInvZoom_Stage2;
+uniform float uyInvZoom_Stage2;
+uniform float uxInvInset_Stage2;
+uniform float uyInvInset_Stage2;
+uniform vec2 uoffset_Stage2;
+uniform vec4 uboundsUniform_Stage3;
+uniform float uxInvZoom_Stage3;
+uniform float uyInvZoom_Stage3;
+uniform float uxInvInset_Stage3;
+uniform float uyInvInset_Stage3;
+uniform vec2 uoffset_Stage3;
+uniform vec2 ubaseFrequency_Stage4_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+uniform sampler2D uTextureSampler_0_Stage3;
+uniform sampler2D uTextureSampler_0_Stage4;
+uniform sampler2D uTextureSampler_1_Stage4;
+uniform sampler2D uTextureSampler_0_Stage5;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+noperspective in vec2 vTransformedCoords_3_Stage0;
+noperspective in vec2 vTransformedCoords_4_Stage0;
+noperspective in vec2 vTransformedCoords_5_Stage0;
+noperspective in float vinCoverage_Stage0;
+float perlinnoise_Stage4_c0_c0(float chanCoord, vec2 noiseVec) {
+ vec4 floorVal;
+ floorVal.xy = floor(noiseVec);
+ floorVal.zw = floorVal.xy + vec2(1.0);
+ vec2 fractVal = fract(noiseVec);
+ vec2 noiseSmooth = (fractVal * fractVal) * (vec2(3.0) - vec2(2.0) * fractVal);
+ floorVal = fract(floor(mod(floorVal, 256.0)) / vec4(256.0));
+ vec2 latticeIdx;
+ latticeIdx.x = texture(uTextureSampler_0_Stage4, vec2(floorVal.x, 0.5)).x;
+ latticeIdx.y = texture(uTextureSampler_0_Stage4, vec2(floorVal.z, 0.5)).x;
+ vec4 bcoords = fract(latticeIdx.xyxy + floorVal.yyww);
+ vec2 uv;
+ vec4 lattice = texture(uTextureSampler_1_Stage4, vec2(bcoords.x, chanCoord)).zyxw;
+ uv.x = dot((lattice.yw + lattice.xz * vec2(0.00390625)) * vec2(2.0) - vec2(1.0), fractVal);
+ fractVal.x -= 1.0;
+ lattice = texture(uTextureSampler_1_Stage4, vec2(bcoords.y, chanCoord)).zyxw;
+ uv.y = dot((lattice.yw + lattice.xz * vec2(0.00390625)) * vec2(2.0) - vec2(1.0), fractVal);
+ vec2 ab;
+ ab.x = mix(uv.x, uv.y, noiseSmooth.x);
+ fractVal.y -= 1.0;
+ lattice = texture(uTextureSampler_1_Stage4, vec2(bcoords.w, chanCoord)).zyxw;
+ uv.y = dot((lattice.yw + lattice.xz * vec2(0.00390625)) * vec2(2.0) - vec2(1.0), fractVal);
+ fractVal.x += 1.0;
+ lattice = texture(uTextureSampler_1_Stage4, vec2(bcoords.z, chanCoord)).zyxw;
+ uv.x = dot((lattice.yw + lattice.xz * vec2(0.00390625)) * vec2(2.0) - vec2(1.0), fractVal);
+ ab.y = mix(uv.x, uv.y, noiseSmooth.x);
+ return mix(ab.x, ab.y, noiseSmooth.y);
+}
+vec4 PerlinNoise_Stage4_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 noiseVec = floor(vTransformedCoords_4_Stage0) * ubaseFrequency_Stage4_c0_c0;
+ _output = vec4(0.0);
+ float ratio = 1.0;
+ for (int octave = 0;octave < 4; ++octave) {
+ _output += abs(vec4(perlinnoise_Stage4_c0_c0(0.125, noiseVec), perlinnoise_Stage4_c0_c0(0.375, noiseVec), perlinnoise_Stage4_c0_c0(0.625, noiseVec), perlinnoise_Stage4_c0_c0(0.875, noiseVec))) * ratio;
+ noiseVec *= vec2(2.0);
+ ratio *= 0.5;
+ }
+ _output = clamp(_output, 0.0, 1.0);
+ _output = vec4(_output.xyz * _output.www, _output.w);
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ {
+ vec4 dColor = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ dColor.xyz = dColor.w < 9.9999999747524271e-07 ? vec3(0.0) : clamp(dColor.xyz / dColor.w, 0.0, 1.0);
+ vec2 cCoords = vTransformedCoords_1_Stage0 + uScale_Stage1 * (dColor.yz - vec2(0.5));
+ {
+ vec2 origCoord = cCoords;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ }
+ }
+ {
+ vec2 coord = vTransformedCoords_2_Stage0;
+ vec2 delta = (coord - uboundsUniform_Stage2.xy) * uboundsUniform_Stage2.zw;
+ delta = min(delta, vec2(1.0, 1.0) - delta);
+ delta *= vec2(uxInvInset_Stage2, uyInvInset_Stage2);
+ if (delta.x < 2.0 && delta.y < 2.0) {
+ delta = vec2(2.0, 2.0) - delta;
+ float dist = length(delta);
+ dist = max(2.0 - dist, 0.0);
+ }
+ }
+ vec4 output_Stage3;
+ {
+ vec2 coord = vTransformedCoords_3_Stage0;
+ vec2 zoom_coord = uoffset_Stage3 + coord * vec2(uxInvZoom_Stage3, uyInvZoom_Stage3);
+ vec2 delta = (coord - uboundsUniform_Stage3.xy) * uboundsUniform_Stage3.zw;
+ delta = min(delta, vec2(1.0, 1.0) - delta);
+ delta *= vec2(uxInvInset_Stage3, uyInvInset_Stage3);
+ float weight = 0.0;
+ if (delta.x < 2.0 && delta.y < 2.0) {
+ delta = vec2(2.0, 2.0) - delta;
+ float dist = length(delta);
+ dist = max(2.0 - dist, 0.0);
+ weight = min(dist * dist, 1.0);
+ } else {
+ vec2 delta_squared = delta * delta;
+ weight = min(min(delta_squared.x, delta_squared.y), 1.0);
+ }
+ output_Stage3 = texture(uTextureSampler_0_Stage3, mix(coord, zoom_coord, weight));
+ }
+ {
+ blend_dst_in(output_Stage3, PerlinNoise_Stage4_c0_c0(vec4(1.0)));
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+uniform mat3 uCoordTransformMatrix_3_Stage0;
+uniform mat3 uCoordTransformMatrix_4_Stage0;
+uniform mat3 uCoordTransformMatrix_5_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in float inCoverage;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+noperspective out vec2 vTransformedCoords_3_Stage0;
+noperspective out vec2 vTransformedCoords_4_Stage0;
+noperspective out vec2 vTransformedCoords_5_Stage0;
+noperspective out float vinCoverage_Stage0;
+void main() {
+ vec4 color = inColor;
+ vcolor_Stage0 = color;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_3_Stage0 = (uCoordTransformMatrix_3_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_4_Stage0 = (uCoordTransformMatrix_4_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_5_Stage0 = (uCoordTransformMatrix_5_Stage0 * vec3(inPosition, 1.0)).xy;
+ vinCoverage_Stage0 = inCoverage;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/907-1.shader_test b/shaders/skia/907-1.shader_test
new file mode 100644
index 0000000..3cc4b24
--- /dev/null
+++ b/shaders/skia/907-1.shader_test
@@ -0,0 +1,110 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage2_c0_c0;
+uniform vec4 urightBorderColor_Stage2_c0_c0;
+uniform vec2 ufocalParams_Stage2_c0_c0_c0_c0;
+uniform vec4 uscale01_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias01_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale23_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias23_Stage2_c0_c0_c1_c0;
+uniform float uthreshold_Stage2_c0_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage2_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_1_Stage0;
+ float t = -1.0;
+ {
+ {
+ float invR1 = ufocalParams_Stage2_c0_c0_c0_c0.x;
+ float x_t = -1.0;
+ {
+ x_t = length(p) - p.x * invR1;
+ }
+ {
+ {
+ t = x_t;
+ }
+ }
+ {
+ t = 1.0 - t;
+ }
+ }
+ }
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 DualIntervalGradientColorizer_Stage2_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthreshold_Stage2_c0_c0_c1_c0) {
+ scale = uscale01_Stage2_c0_c0_c1_c0;
+ bias = ubias01_Stage2_c0_c0_c1_c0;
+ } else {
+ scale = uscale23_Stage2_c0_c0_c1_c0;
+ bias = ubias23_Stage2_c0_c0_c1_c0;
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage2_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage2_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage2_c0_c0;
+ } else {
+ _output = DualIntervalGradientColorizer_Stage2_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_dst_in(output_Stage1, ClampedGradientEffect_Stage2_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/91-1.shader_test b/shaders/skia/91-1.shader_test
new file mode 100644
index 0000000..bbf8df1
--- /dev/null
+++ b/shaders/skia/91-1.shader_test
@@ -0,0 +1,55 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uCoordTransformMatrix_2_Stage0;
+uniform vec4 uk_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 TextureEffect_Stage2_c0_c0(vec4 _input, vec2 _coords) {
+ _coords = _coords * uCoordTransformMatrix_2_Stage0.xz + uCoordTransformMatrix_2_Stage0.yw;
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage2, _coords) * _input;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ vec4 dst = TextureEffect_Stage2_c0_c0(vec4(1.0), vTransformedCoords_1_Stage0);
+ output_Stage2 = clamp((((uk_Stage2.x * output_Stage2) * dst + uk_Stage2.y * output_Stage2) + uk_Stage2.z * dst) + uk_Stage2.w, 0.0, 1.0);
+ {
+ output_Stage2.xyz = min(output_Stage2.xyz, output_Stage2.w);
+ }
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/91-10.shader_test b/shaders/skia/91-10.shader_test
new file mode 100644
index 0000000..5d459c3
--- /dev/null
+++ b/shaders/skia/91-10.shader_test
@@ -0,0 +1,41 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform float uPixelSize_Stage1;
+uniform vec2 uRange_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = vec4(1.0, 1.0, 1.0, 1.0);
+ vec2 coord = vTransformedCoords_0_Stage0;
+ coord.y -= 4.0 * uPixelSize_Stage1;
+ for (int i = 0;i < 9; i++) {
+ output_Stage1 = min(output_Stage1, texture(uTextureSampler_0_Stage1, coord));
+ coord.y += uPixelSize_Stage1;
+ }
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/91-11.shader_test b/shaders/skia/91-11.shader_test
new file mode 100644
index 0000000..8639ee4
--- /dev/null
+++ b/shaders/skia/91-11.shader_test
@@ -0,0 +1,140 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform float uSurfaceScale_Stage1;
+uniform vec3 uLightColor_Stage1;
+uniform float uKS_Stage1;
+uniform float uShininess_Stage1;
+uniform vec3 uLightLocation_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 light_Stage1(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ vec3 halfDir = normalize(surfaceToLight + vec3(0.0, 0.0, 1.0));
+ float colorScale = uKS_Stage1 * pow(dot(normal, halfDir), uShininess_Stage1);
+ vec3 color = lightColor * clamp(colorScale, 0.0, 1.0);
+ return vec4(color, max(max(color.x, color.y), color.z));
+}
+float sobel_Stage1(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage1(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage1(float m[9], float surfaceScale) {
+ return pointToNormal_Stage1(sobel_Stage1(0.0, 0.0, m[3], m[5], m[6], m[8], 0.33333298563957214), sobel_Stage1(0.0, 0.0, m[4], m[7], m[5], m[8], 0.5), surfaceScale);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ vec2 coord = vTransformedCoords_0_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp0 = textureColor;
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp1 = textureColor;
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp2 = textureColor;
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp3 = textureColor;
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp4 = textureColor;
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp5 = textureColor;
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp6 = textureColor;
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp7 = textureColor;
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp8 = textureColor;
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = normalize(uLightLocation_Stage1 - vec3(gl_FragCoord.xy, uSurfaceScale_Stage1 * m[4]));
+ output_Stage1 = light_Stage1(normal_Stage1(m, uSurfaceScale_Stage1), surfaceToLight, uLightColor_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/91-13.shader_test b/shaders/skia/91-13.shader_test
new file mode 100644
index 0000000..9830ebc
--- /dev/null
+++ b/shaders/skia/91-13.shader_test
@@ -0,0 +1,63 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform float uinnerThreshold_Stage1_c1_c0;
+uniform float uouterThreshold_Stage1_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 TextureEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+vec4 AlphaThresholdFragmentProcessor_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 color = _input;
+ vec4 mask_color = texture(uTextureSampler_1_Stage1, vTransformedCoords_1_Stage0);
+ if (mask_color.w < 0.5) {
+ if (color.w > uouterThreshold_Stage1_c1_c0) {
+ float scale = uouterThreshold_Stage1_c1_c0 / color.w;
+ color.xyz *= scale;
+ color.w = uouterThreshold_Stage1_c1_c0;
+ }
+ } else if (color.w < uinnerThreshold_Stage1_c1_c0) {
+ float scale = uinnerThreshold_Stage1_c1_c0 / max(0.0010000000474974513, color.w);
+ color.xyz *= scale;
+ color.w = uinnerThreshold_Stage1_c1_c0;
+ }
+ _output = color;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = AlphaThresholdFragmentProcessor_Stage1_c1_c0(TextureEffect_Stage1_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/91-2.shader_test b/shaders/skia/91-2.shader_test
new file mode 100644
index 0000000..eb4c585
--- /dev/null
+++ b/shaders/skia/91-2.shader_test
@@ -0,0 +1,105 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform float uSrcTF_Stage1_c0_c0[7];
+uniform mat3 uColorXform_Stage1_c0_c0;
+uniform float uDstTF_Stage1_c0_c0[7];
+uniform mat3 ucolorSpaceMatrix_Stage1_c0_c0_c0_c0;
+uniform vec3 ucolorSpaceTranslate_Stage1_c0_c0_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+vec4 YUVtoRGBEffect_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 planes[1];
+ planes[0] = TextureEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ vec4 color = vec4(planes[0].y, planes[0].x, planes[0].z, planes[0].w);
+ color.xyz = clamp(color.xyz * ucolorSpaceMatrix_Stage1_c0_c0_c0_c0 + ucolorSpaceTranslate_Stage1_c0_c0_c0_c0, 0.0, 1.0);
+ color.xyz *= color.w;
+ _output = color;
+ return _output;
+}
+float src_tf_Stage1_c0_c0(float x) {
+ float G = uSrcTF_Stage1_c0_c0[0];
+ float A = uSrcTF_Stage1_c0_c0[1];
+ float B = uSrcTF_Stage1_c0_c0[2];
+ float C = uSrcTF_Stage1_c0_c0[3];
+ float D = uSrcTF_Stage1_c0_c0[4];
+ float E = uSrcTF_Stage1_c0_c0[5];
+ float F = uSrcTF_Stage1_c0_c0[6];
+ float s = sign(x);
+ x = abs(x);
+ x = x < D ? C * x + F : pow(A * x + B, G) + E;
+ return s * x;
+}
+float dst_tf_Stage1_c0_c0(float x) {
+ float G = uDstTF_Stage1_c0_c0[0];
+ float A = uDstTF_Stage1_c0_c0[1];
+ float B = uDstTF_Stage1_c0_c0[2];
+ float C = uDstTF_Stage1_c0_c0[3];
+ float D = uDstTF_Stage1_c0_c0[4];
+ float E = uDstTF_Stage1_c0_c0[5];
+ float F = uDstTF_Stage1_c0_c0[6];
+ float s = sign(x);
+ x = abs(x);
+ x = x < D ? C * x + F : pow(A * x + B, G) + E;
+ return s * x;
+}
+vec4 gamut_xform_Stage1_c0_c0(vec4 color) {
+ color.xyz = uColorXform_Stage1_c0_c0 * color.xyz;
+ return color;
+}
+vec4 color_xform_Stage1_c0_c0(vec4 color) {
+ float nonZeroAlpha = max(color.w, 9.9999997473787516e-05);
+ color = vec4(color.xyz / nonZeroAlpha, nonZeroAlpha);
+ color.x = src_tf_Stage1_c0_c0(color.x);
+ color.y = src_tf_Stage1_c0_c0(color.y);
+ color.z = src_tf_Stage1_c0_c0(color.z);
+ color = gamut_xform_Stage1_c0_c0(color);
+ color.x = dst_tf_Stage1_c0_c0(color.x);
+ color.y = dst_tf_Stage1_c0_c0(color.y);
+ color.z = dst_tf_Stage1_c0_c0(color.z);
+ color.xyz *= color.w;
+ return color;
+}
+vec4 ColorSpaceXform_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = color_xform_Stage1_c0_c0(YUVtoRGBEffect_Stage1_c0_c0_c0_c0(vec4(1.0))) * _input;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ColorSpaceXform_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/91-22.shader_test b/shaders/skia/91-22.shader_test
new file mode 100644
index 0000000..63b3dd6
--- /dev/null
+++ b/shaders/skia/91-22.shader_test
@@ -0,0 +1,127 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_0_Stage0;
+ float t = -1.0;
+ float v = 1.0;
+ {
+ {
+ float invR1 = ufocalParams_Stage1_c0_c0_c0_c0.x;
+ float fx = ufocalParams_Stage1_c0_c0_c0_c0.y;
+ float x_t = -1.0;
+ {
+ float temp = p.x * p.x - p.y * p.y;
+ if (temp >= 0.0) {
+ {
+ x_t = -sqrt(temp) - p.x * invR1;
+ }
+ }
+ }
+ {
+ if (x_t <= 0.0) {
+ v = -1.0;
+ }
+ }
+ {
+ {
+ t = -x_t + fx;
+ }
+ }
+ }
+ }
+ _output = vec4(t, v, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_dst_in(outputColor_Stage0, ClampedGradientEffect_Stage1_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/91-23.shader_test b/shaders/skia/91-23.shader_test
new file mode 100644
index 0000000..fa95906
--- /dev/null
+++ b/shaders/skia/91-23.shader_test
@@ -0,0 +1,143 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec2 ufocalParams_Stage1_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_0_Stage0;
+ float t = -1.0;
+ float v = 1.0;
+ {
+ {
+ float invR1 = ufocalParams_Stage1_c0_c0_c0_c0.x;
+ float fx = ufocalParams_Stage1_c0_c0_c0_c0.y;
+ float x_t = -1.0;
+ {
+ float temp = p.x * p.x - p.y * p.y;
+ if (temp >= 0.0) {
+ {
+ x_t = -sqrt(temp) - p.x * invR1;
+ }
+ }
+ }
+ {
+ if (x_t <= 0.0) {
+ v = -1.0;
+ }
+ }
+ {
+ {
+ t = -x_t + fx;
+ }
+ }
+ }
+ }
+ _output = vec4(t, v, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_dst_in(outputColor_Stage0, ClampedGradientEffect_Stage1_c0_c0(vec4(1.0)));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ float value;
+ {
+ uint x = uint(vTransformedCoords_1_Stage0.x);
+ uint y = uint(vTransformedCoords_1_Stage0.y);
+ uint m = (((((y & 1u) << 5u | (x & 1u) << 4u) | (y & 2u) << 2u) | (x & 2u) << 1u) | (y & 4u) >> 1u) | (x & 4u) >> 2u;
+ value = float(m) / 64.0 - 0.4921875;
+ }
+ output_Stage2 = vec4(clamp(output_Stage2.xyz + value * 0.0039215688593685627, 0.0, output_Stage2.w), output_Stage2.w);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/91-24.shader_test b/shaders/skia/91-24.shader_test
new file mode 100644
index 0000000..52c4326
--- /dev/null
+++ b/shaders/skia/91-24.shader_test
@@ -0,0 +1,86 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 TextureEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = TextureEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = OverrideInputFragmentProcessor_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+float _blend_color_luminance(vec3 color) {
+ return dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), color);
+}
+vec3 _blend_set_color_luminance(vec3 hueSatColor, float alpha, vec3 lumColor) {
+ float lum = _blend_color_luminance(lumColor);
+ vec3 result = (lum - _blend_color_luminance(hueSatColor)) + hueSatColor;
+ float minComp = min(min(result.x, result.y), result.z);
+ float maxComp = max(max(result.x, result.y), result.z);
+ if (minComp < 0.0 && lum != minComp) {
+ result = lum + ((result - lum) * lum) / (lum - minComp);
+ }
+ if (maxComp > alpha && maxComp != lum) {
+ return lum + ((result - lum) * (alpha - lum)) / (maxComp - lum);
+ }
+ return result;
+}
+vec4 blend_luminosity(vec4 src, vec4 dst) {
+ float alpha = dst.w * src.w;
+ vec3 sda = src.xyz * dst.w;
+ vec3 dsa = dst.xyz * src.w;
+ return vec4((((_blend_set_color_luminance(dsa, alpha, sda) + dst.xyz) - dsa) + src.xyz) - sda, (src.w + dst.w) - alpha);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_luminosity(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec2 inLocalCoord;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 color = inColor;
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/91-25.shader_test b/shaders/skia/91-25.shader_test
new file mode 100644
index 0000000..71035c6
--- /dev/null
+++ b/shaders/skia/91-25.shader_test
@@ -0,0 +1,92 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage2_c1_c0_c0_c0;
+uniform vec4 urightBorderColor_Stage2_c1_c0_c0_c0;
+uniform vec4 ustart_Stage2_c1_c0_c0_c0_c1_c0;
+uniform vec4 uend_Stage2_c1_c0_c0_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+in vec2 vTransformedCoords_0_Stage0;
+in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+vec4 RadialGradientLayout_Stage2_c1_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = length(vTransformedCoords_1_Stage0);
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage2_c1_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage2_c1_c0_c0_c0_c1_c0 + t * uend_Stage2_c1_c0_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage2_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = RadialGradientLayout_Stage2_c1_c0_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage2_c1_c0_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage2_c1_c0_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage2_c1_c0_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+vec4 ComposeOne_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_dst_in(_input, ClampedGradientEffect_Stage2_c1_c0_c0_c0(vec4(1.0)));
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TextureEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_src_in(vec4(1.0), ComposeOne_Stage2_c1_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage1 * output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec3 position;
+in vec4 color;
+in vec2 localCoord;
+out vec2 vTransformedCoords_0_Stage0;
+out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, position.z);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/91-26.shader_test b/shaders/skia/91-26.shader_test
new file mode 100644
index 0000000..f54b958
--- /dev/null
+++ b/shaders/skia/91-26.shader_test
@@ -0,0 +1,69 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_KHR_blend_equation_advanced : require
+out vec4 sk_FragColor;
+layout (blend_support_all_equations) out ;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/91-27.shader_test b/shaders/skia/91-27.shader_test
new file mode 100644
index 0000000..ef808ea
--- /dev/null
+++ b/shaders/skia/91-27.shader_test
@@ -0,0 +1,33 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_KHR_blend_equation_advanced : require
+out vec4 sk_FragColor;
+layout (blend_support_all_equations) out ;
+noperspective in vec4 vcolor_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ {
+ sk_FragColor = outputColor_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 position;
+in vec4 color;
+noperspective out vec4 vcolor_Stage0;
+void main() {
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/91-28.shader_test b/shaders/skia/91-28.shader_test
new file mode 100644
index 0000000..1999175
--- /dev/null
+++ b/shaders/skia/91-28.shader_test
@@ -0,0 +1,88 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+uniform float uSrcTF_Stage0[7];
+uniform mat3 uColorXform_Stage0;
+uniform float uDstTF_Stage0[7];
+uniform sampler2D uTextureSampler_0_Stage0;
+noperspective in vec2 vtextureCoords_Stage0;
+flat in vec4 vtextureDomain_Stage0;
+flat in vec4 vcolor_Stage0;
+float src_tf_Stage0(float x) {
+ float G = uSrcTF_Stage0[0];
+ float A = uSrcTF_Stage0[1];
+ float B = uSrcTF_Stage0[2];
+ float C = uSrcTF_Stage0[3];
+ float D = uSrcTF_Stage0[4];
+ float E = uSrcTF_Stage0[5];
+ float F = uSrcTF_Stage0[6];
+ float s = sign(x);
+ x = abs(x);
+ x = x < D ? C * x + F : pow(A * x + B, G) + E;
+ return s * x;
+}
+float dst_tf_Stage0(float x) {
+ float G = uDstTF_Stage0[0];
+ float A = uDstTF_Stage0[1];
+ float B = uDstTF_Stage0[2];
+ float C = uDstTF_Stage0[3];
+ float D = uDstTF_Stage0[4];
+ float E = uDstTF_Stage0[5];
+ float F = uDstTF_Stage0[6];
+ float s = sign(x);
+ x = abs(x);
+ x = x < D ? C * x + F : pow(A * x + B, G) + E;
+ return s * x;
+}
+vec4 gamut_xform_Stage0(vec4 color) {
+ color.xyz = uColorXform_Stage0 * color.xyz;
+ return color;
+}
+vec4 color_xform_Stage0(vec4 color) {
+ float nonZeroAlpha = max(color.w, 9.9999997473787516e-05);
+ color = vec4(color.xyz / nonZeroAlpha, nonZeroAlpha);
+ color.x = src_tf_Stage0(color.x);
+ color.y = src_tf_Stage0(color.y);
+ color.z = src_tf_Stage0(color.z);
+ color = gamut_xform_Stage0(color);
+ color.x = dst_tf_Stage0(color.x);
+ color.y = dst_tf_Stage0(color.y);
+ color.z = dst_tf_Stage0(color.z);
+ color.xyz *= color.w;
+ return color;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ vec2 textureCoords;
+ textureCoords = vtextureCoords_Stage0;
+ vec4 textureDomain;
+ textureDomain = vtextureDomain_Stage0;
+ outputColor_Stage0 = vcolor_Stage0;
+ outputColor_Stage0 = color_xform_Stage0(texture(uTextureSampler_0_Stage0, clamp(textureCoords, textureDomain.xy, textureDomain.zw))) * outputColor_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 position;
+in vec2 textureCoords;
+in vec4 textureDomain;
+in vec4 color;
+noperspective out vec2 vtextureCoords_Stage0;
+flat out vec4 vtextureDomain_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vec2 pos2 = position;
+ vtextureCoords_Stage0 = textureCoords;
+ vtextureDomain_Stage0 = textureDomain;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/91-29.shader_test b/shaders/skia/91-29.shader_test
new file mode 100644
index 0000000..b1d24bf
--- /dev/null
+++ b/shaders/skia/91-29.shader_test
@@ -0,0 +1,204 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage2;
+uniform float uSurfaceScale_Stage2;
+uniform vec3 uLightColor_Stage2;
+uniform float uKS_Stage2;
+uniform float uShininess_Stage2;
+uniform vec4 uTexDom_Stage2;
+uniform vec3 uDecalParams_Stage2;
+uniform vec3 uLightDirection_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 light_Stage2(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ vec3 halfDir = normalize(surfaceToLight + vec3(0.0, 0.0, 1.0));
+ float colorScale = uKS_Stage2 * pow(dot(normal, halfDir), uShininess_Stage2);
+ vec3 color = lightColor * clamp(colorScale, 0.0, 1.0);
+ return vec4(color, max(max(color.x, color.y), color.z));
+}
+float sobel_Stage2(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage2(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage2(float m[9], float surfaceScale) {
+ return pointToNormal_Stage2(sobel_Stage2(m[1], m[2], m[4], m[5], 0.0, 0.0, 0.66666698455810547), sobel_Stage2(0.0, 0.0, m[1], m[4], m[2], m[5], 0.66666698455810547), surfaceScale);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ vec2 coord = vTransformedCoords_1_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp0 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp5 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp6 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp7 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp8 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = uLightDirection_Stage2;
+ output_Stage2 = light_Stage2(normal_Stage2(m, uSurfaceScale_Stage2), surfaceToLight, uLightColor_Stage2);
+ output_Stage2 *= output_Stage1;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/91-30.shader_test b/shaders/skia/91-30.shader_test
new file mode 100644
index 0000000..e7799a3
--- /dev/null
+++ b/shaders/skia/91-30.shader_test
@@ -0,0 +1,86 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 urectUniform_Stage2_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 AARectEffect_Stage2_c0_c0(vec4 _input, vec2 _coords) {
+ vec4 _output;
+ float alpha;
+ {
+ float xSub, ySub;
+ xSub = min(gl_FragCoord.x - urectUniform_Stage2_c0_c0.x, 0.0);
+ xSub += min(urectUniform_Stage2_c0_c0.z - gl_FragCoord.x, 0.0);
+ ySub = min(gl_FragCoord.y - urectUniform_Stage2_c0_c0.y, 0.0);
+ ySub += min(urectUniform_Stage2_c0_c0.w - gl_FragCoord.y, 0.0);
+ alpha = (1.0 + max(xSub, -1.0)) * (1.0 + max(ySub, -1.0));
+ }
+ _output = _input * alpha;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ vec2 coord = vTransformedCoords_1_Stage0 - vec2(0.5);
+ vec2 f = fract(coord);
+ coord += 0.5 - f;
+ vec4 wx = mat4(0.055555555555555552, 0.88888888888888884, 0.055555555555555552, 0.0, -0.5, 0.0, 0.5, 0.0, 0.83333333333333337, -2.0, 1.5, -0.33333333333333331, -0.3888888888888889, 1.1666666666666667, -1.1666666666666667, 0.3888888888888889) * vec4(1.0, f.x, f.x * f.x, (f.x * f.x) * f.x);
+ vec4 wy = mat4(0.055555555555555552, 0.88888888888888884, 0.055555555555555552, 0.0, -0.5, 0.0, 0.5, 0.0, 0.83333333333333337, -2.0, 1.5, -0.33333333333333331, -0.3888888888888889, 1.1666666666666667, -1.1666666666666667, 0.3888888888888889) * vec4(1.0, f.y, f.y * f.y, (f.y * f.y) * f.y);
+ vec4 rowColors[4];
+ rowColors[0] = AARectEffect_Stage2_c0_c0(vec4(1.0), coord + vec2(-1.0, -1.0));
+ rowColors[1] = AARectEffect_Stage2_c0_c0(vec4(1.0), coord + vec2(0.0, -1.0));
+ rowColors[2] = AARectEffect_Stage2_c0_c0(vec4(1.0), coord + vec2(1.0, -1.0));
+ rowColors[3] = AARectEffect_Stage2_c0_c0(vec4(1.0), coord + vec2(2.0, -1.0));
+ vec4 s0 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ rowColors[0] = AARectEffect_Stage2_c0_c0(vec4(1.0), coord + vec2(-1.0, 0.0));
+ rowColors[1] = AARectEffect_Stage2_c0_c0(vec4(1.0), coord);
+ rowColors[2] = AARectEffect_Stage2_c0_c0(vec4(1.0), coord + vec2(1.0, 0.0));
+ rowColors[3] = AARectEffect_Stage2_c0_c0(vec4(1.0), coord + vec2(2.0, 0.0));
+ vec4 s1 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ rowColors[0] = AARectEffect_Stage2_c0_c0(vec4(1.0), coord + vec2(-1.0, 1.0));
+ rowColors[1] = AARectEffect_Stage2_c0_c0(vec4(1.0), coord + vec2(0.0, 1.0));
+ rowColors[2] = AARectEffect_Stage2_c0_c0(vec4(1.0), coord + vec2(1.0, 1.0));
+ rowColors[3] = AARectEffect_Stage2_c0_c0(vec4(1.0), coord + vec2(2.0, 1.0));
+ vec4 s2 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ rowColors[0] = AARectEffect_Stage2_c0_c0(vec4(1.0), coord + vec2(-1.0, 2.0));
+ rowColors[1] = AARectEffect_Stage2_c0_c0(vec4(1.0), coord + vec2(0.0, 2.0));
+ rowColors[2] = AARectEffect_Stage2_c0_c0(vec4(1.0), coord + vec2(1.0, 2.0));
+ rowColors[3] = AARectEffect_Stage2_c0_c0(vec4(1.0), coord + vec2(2.0, 2.0));
+ vec4 s3 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ vec4 bicubicColor = ((wy.x * s0 + wy.y * s1) + wy.z * s2) + wy.w * s3;
+ bicubicColor = clamp(bicubicColor, 0.0, 1.0);
+ output_Stage2 = bicubicColor * output_Stage1;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/91-31.shader_test b/shaders/skia/91-31.shader_test
new file mode 100644
index 0000000..772c186
--- /dev/null
+++ b/shaders/skia/91-31.shader_test
@@ -0,0 +1,44 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform float uPixelSize_Stage1;
+uniform vec2 uRange_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0;
+ coord.x -= 3.0 * uPixelSize_Stage1;
+ float highBound = min(uRange_Stage1.y, coord.x + 6.0 * uPixelSize_Stage1);
+ coord.x = max(uRange_Stage1.x, coord.x);
+ for (int i = 0;i < 7; i++) {
+ output_Stage1 = max(output_Stage1, texture(uTextureSampler_0_Stage1, coord));
+ coord.x += uPixelSize_Stage1;
+ coord.x = min(highBound, coord.x);
+ }
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/91-4.shader_test b/shaders/skia/91-4.shader_test
new file mode 100644
index 0000000..1c7a691
--- /dev/null
+++ b/shaders/skia/91-4.shader_test
@@ -0,0 +1,68 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 ucolor_Stage1_c0_c0_c0_c0;
+uniform vec4 ucolor_Stage2;
+noperspective in vec4 vcolor_Stage0;
+vec4 ConstColorProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = _input.w * ucolor_Stage1_c0_c0_c0_c0;
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = ConstColorProcessor_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_src_over(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ {
+ output_Stage2 = output_Stage1 * ucolor_Stage2;
+ }
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 position;
+in vec4 inColor;
+noperspective out vec4 vcolor_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/91-6.shader_test b/shaders/skia/91-6.shader_test
new file mode 100644
index 0000000..ccb662e
--- /dev/null
+++ b/shaders/skia/91-6.shader_test
@@ -0,0 +1,42 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+noperspective in vec4 vinCircleEdge_Stage0;
+noperspective in vec4 vinColor_Stage0;
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ vec4 circleEdge;
+ circleEdge = vinCircleEdge_Stage0;
+ float d = length(circleEdge.xy);
+ float distanceToOuterEdge = circleEdge.z * (1.0 - d);
+ float edgeAlpha = clamp(distanceToOuterEdge, 0.0, 1.0);
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ {
+ sk_FragColor = outputCoverage_Stage0;
+ sk_FragColor = sk_FragColor.wwww;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 inPosition;
+in vec4 inColor;
+in vec4 inCircleEdge;
+noperspective out vec4 vinCircleEdge_Stage0;
+noperspective out vec4 vinColor_Stage0;
+void main() {
+ vinCircleEdge_Stage0 = inCircleEdge;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = inPosition;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/91-7.shader_test b/shaders/skia/91-7.shader_test
new file mode 100644
index 0000000..ab6d308
--- /dev/null
+++ b/shaders/skia/91-7.shader_test
@@ -0,0 +1,149 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+uniform vec2 uDstTextureUpperLeft_Stage2;
+uniform vec2 uDstTextureCoordScale_Stage2;
+uniform sampler2D uDstTextureSampler_Stage2;
+flat in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 varccoord_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+vec4 blend_src(vec4 src, vec4 dst) {
+ return src;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ float x_plus_1 = varccoord_Stage0.x, y = varccoord_Stage0.y;
+ float coverage;
+ if (0.0 == x_plus_1) {
+ coverage = y;
+ } else {
+ float fn = x_plus_1 * (x_plus_1 - 2.0);
+ fn = ((y) * (y) + (fn));
+ float fnwidth = fwidth(fn);
+ float d = fn / fnwidth;
+ coverage = clamp(0.5 - d, 0.0, 1.0);
+ }
+ outputCoverage_Stage0 = vec4(coverage);
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_dst_in(outputColor_Stage0, ClampedGradientEffect_Stage1_c0_c0(vec4(1.0)));
+ }
+ {
+ if (all(lessThanEqual(outputCoverage_Stage0.xyz, vec3(0.0)))) {
+ discard;
+ }
+ vec2 _dstTexCoord = (gl_FragCoord.xy - uDstTextureUpperLeft_Stage2) * uDstTextureCoordScale_Stage2;
+ _dstTexCoord.y = 1.0 - _dstTexCoord.y;
+ vec4 _dstColor = texture(uDstTextureSampler_Stage2, _dstTexCoord);
+ sk_FragColor = blend_src(output_Stage1, _dstColor);
+ sk_FragColor = outputCoverage_Stage0 * sk_FragColor + (vec4(1.0) - outputCoverage_Stage0) * _dstColor;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec4 radii_selector;
+in vec4 corner_and_radius_outsets;
+in vec4 aa_bloat_and_coverage;
+in vec4 skew;
+in vec2 translate;
+in vec4 radii_x;
+in vec4 radii_y;
+in vec4 color;
+in vec4 local_rect;
+flat out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 varccoord_Stage0;
+void main() {
+ vcolor_Stage0 = color;
+ vec2 corner = corner_and_radius_outsets.xy;
+ vec2 radius_outset = corner_and_radius_outsets.zw;
+ vec2 aa_bloat_direction = aa_bloat_and_coverage.xy;
+ float coverage = aa_bloat_and_coverage.z;
+ float is_linear_coverage = aa_bloat_and_coverage.w;
+ vec2 pixellength = inversesqrt(vec2(dot(skew.xz, skew.xz), dot(skew.yw, skew.yw)));
+ vec4 normalized_axis_dirs = skew * pixellength.xyxy;
+ vec2 axiswidths = abs(normalized_axis_dirs.xy) + abs(normalized_axis_dirs.zw);
+ vec2 aa_bloatradius = (axiswidths * pixellength) * 0.5;
+ vec4 radii_and_neighbors = radii_selector * mat4(radii_x, radii_y, radii_x.yxwz, radii_y.wzyx);
+ vec2 radii = radii_and_neighbors.xy;
+ vec2 neighbor_radii = radii_and_neighbors.zw;
+ if (any(greaterThan(aa_bloatradius, vec2(1.0)))) {
+ corner = max(abs(corner), aa_bloatradius) * sign(corner);
+ coverage /= max(aa_bloatradius.x, 1.0) * max(aa_bloatradius.y, 1.0);
+ radii = vec2(0.0);
+ }
+ if (any(lessThan(radii, aa_bloatradius * 1.25))) {
+ radii = aa_bloatradius;
+ radius_outset = floor(abs(radius_outset)) * radius_outset;
+ is_linear_coverage = 1.0;
+ } else {
+ radii = clamp(radii, pixellength, 2.0 - pixellength);
+ neighbor_radii = clamp(neighbor_radii, pixellength, 2.0 - pixellength);
+ vec2 spacing = (2.0 - radii) - neighbor_radii;
+ vec2 extra_pad = max(pixellength * 0.0625 - spacing, vec2(0.0));
+ radii -= extra_pad * 0.5;
+ }
+ vec2 aa_outset = aa_bloat_direction * aa_bloatradius;
+ vec2 vertexpos = (corner + radius_outset * radii) + aa_outset;
+ vec2 localcoord = (local_rect.xy * (1.0 - vertexpos) + local_rect.zw * (1.0 + vertexpos)) * 0.5;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localcoord, 1.0)).xy;
+ mat2 skewmatrix = mat2(skew.xy, skew.zw);
+ vec2 devcoord = vertexpos * skewmatrix + translate;
+ if (0.0 != is_linear_coverage) {
+ varccoord_Stage0.xy = vec2(0.0, coverage);
+ } else {
+ vec2 arccoord = (1.0 - abs(radius_outset)) + (aa_outset / radii) * corner;
+ varccoord_Stage0.xy = vec2(arccoord.x + 1.0, arccoord.y);
+ }
+ gl_Position = vec4(devcoord.x, devcoord.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/91-8.shader_test b/shaders/skia/91-8.shader_test
new file mode 100644
index 0000000..9b699c9
--- /dev/null
+++ b/shaders/skia/91-8.shader_test
@@ -0,0 +1,45 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uinnerRect_Stage1;
+uniform vec2 uradiusPlusHalf_Stage1;
+flat in vec4 vcolor_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec2 dxy0 = uinnerRect_Stage1.xy - gl_FragCoord.xy;
+ float dx1 = gl_FragCoord.x - uinnerRect_Stage1.z;
+ vec2 dxy = max(vec2(max(dxy0.x, dx1), dxy0.y), 0.0);
+ float bottomAlpha = clamp(uinnerRect_Stage1.w - gl_FragCoord.y, 0.0, 1.0);
+ float alpha = bottomAlpha * clamp(uradiusPlusHalf_Stage1.x - length(dxy), 0.0, 1.0);
+ alpha = 1.0 - alpha;
+ output_Stage1 = vec4(alpha);
+ }
+ {
+ sk_FragColor = outputColor_Stage0 * output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 position;
+in vec4 color;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/91-9.shader_test b/shaders/skia/91-9.shader_test
new file mode 100644
index 0000000..1d96bb1
--- /dev/null
+++ b/shaders/skia/91-9.shader_test
@@ -0,0 +1,82 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage2_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c1_c0;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_src_in(ConstColorProcessor_Stage2_c1_c0(vec4(1.0)), output_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/91.shader_test b/shaders/skia/91.shader_test
new file mode 100644
index 0000000..5f64147
--- /dev/null
+++ b/shaders/skia/91.shader_test
@@ -0,0 +1,90 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 usubset_Stage1_c0_c0_c0_c0;
+uniform vec4 uclamp_Stage1_c0_c0_c0_c0;
+uniform sampler2DRect uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0_c0_c0(vec4 _input, vec2 _coords) {
+ vec4 _output;
+ vec2 inCoord = _coords;
+ vec2 subsetCoord;
+ subsetCoord.x = inCoord.x;
+ {
+ float w = usubset_Stage1_c0_c0_c0_c0.w - usubset_Stage1_c0_c0_c0_c0.y;
+ float w2 = 2.0 * w;
+ float m = mod(inCoord.y - usubset_Stage1_c0_c0_c0_c0.y, w2);
+ subsetCoord.y = mix(m, w2 - m, step(w, m)) + usubset_Stage1_c0_c0_c0_c0.y;
+ }
+ vec2 clampedCoord;
+ clampedCoord.x = subsetCoord.x;
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage1_c0_c0_c0_c0.y, uclamp_Stage1_c0_c0_c0_c0.w);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ _output = _input * textureColor;
+ return _output;
+}
+vec4 Bicubic_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coord = vTransformedCoords_0_Stage0 - vec2(0.5);
+ vec2 f = fract(coord);
+ coord += 0.5 - f;
+ vec4 wx = mat4(0.055555555555555552, 0.88888888888888884, 0.055555555555555552, 0.0, -0.5, 0.0, 0.5, 0.0, 0.83333333333333337, -2.0, 1.5, -0.33333333333333331, -0.3888888888888889, 1.1666666666666667, -1.1666666666666667, 0.3888888888888889) * vec4(1.0, f.x, f.x * f.x, (f.x * f.x) * f.x);
+ vec4 wy = mat4(0.055555555555555552, 0.88888888888888884, 0.055555555555555552, 0.0, -0.5, 0.0, 0.5, 0.0, 0.83333333333333337, -2.0, 1.5, -0.33333333333333331, -0.3888888888888889, 1.1666666666666667, -1.1666666666666667, 0.3888888888888889) * vec4(1.0, f.y, f.y * f.y, (f.y * f.y) * f.y);
+ vec4 rowColors[4];
+ rowColors[0] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(-1.0, -1.0));
+ rowColors[1] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(0.0, -1.0));
+ rowColors[2] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(1.0, -1.0));
+ rowColors[3] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(2.0, -1.0));
+ vec4 s0 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ rowColors[0] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(-1.0, 0.0));
+ rowColors[1] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord);
+ rowColors[2] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(1.0, 0.0));
+ rowColors[3] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(2.0, 0.0));
+ vec4 s1 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ rowColors[0] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(-1.0, 1.0));
+ rowColors[1] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(0.0, 1.0));
+ rowColors[2] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(1.0, 1.0));
+ rowColors[3] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(2.0, 1.0));
+ vec4 s2 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ rowColors[0] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(-1.0, 2.0));
+ rowColors[1] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(0.0, 2.0));
+ rowColors[2] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(1.0, 2.0));
+ rowColors[3] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(2.0, 2.0));
+ vec4 s3 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ vec4 bicubicColor = ((wy.x * s0 + wy.y * s1) + wy.z * s2) + wy.w * s3;
+ bicubicColor = clamp(bicubicColor, 0.0, 1.0);
+ _output = bicubicColor * _input;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = Bicubic_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/913-1.shader_test b/shaders/skia/913-1.shader_test
new file mode 100644
index 0000000..65e7b87
--- /dev/null
+++ b/shaders/skia/913-1.shader_test
@@ -0,0 +1,117 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 ufocalParams_Stage2_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage2_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage2_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage2_c0_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage2_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_1_Stage0;
+ float t = -1.0;
+ {
+ {
+ float r0 = ufocalParams_Stage2_c0_c0_c0_c0.x;
+ {
+ t = length(p) - r0;
+ }
+ }
+ }
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage2_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage2_c0_c0_c1_c0;
+ bias = ubias0_1_Stage2_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage2_c0_c0_c1_c0;
+ bias = ubias2_3_Stage2_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage2_c0_c0_c1_c0;
+ bias = ubias4_5_Stage2_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage2_c0_c0_c1_c0;
+ bias = ubias6_7_Stage2_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage2_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage2_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_dst_in(output_Stage1, TiledGradientEffect_Stage2_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/913.shader_test b/shaders/skia/913.shader_test
new file mode 100644
index 0000000..a3c4e6b
--- /dev/null
+++ b/shaders/skia/913.shader_test
@@ -0,0 +1,222 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uColor_Stage0;
+uniform vec4 ucolor_Stage1;
+uniform vec3 uedges_Stage2[4];
+uniform vec4 uleftBorderColor_Stage3_c0_c0;
+uniform vec4 urightBorderColor_Stage3_c0_c0;
+uniform vec4 uscale0_1_Stage3_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage3_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage3_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage3_c0_c0_c1_c0;
+uniform vec4 uscale8_9_Stage3_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage3_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage3_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage3_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage3_c0_c0_c1_c0;
+uniform vec4 ubias8_9_Stage3_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage3_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage3_c0_c0_c1_c0;
+uniform vec2 ufocalParams_Stage4_c1_c0_c0_c0;
+uniform vec4 uscale0_1_Stage4_c1_c0_c1_c0;
+uniform vec4 uscale2_3_Stage4_c1_c0_c1_c0;
+uniform vec4 uscale4_5_Stage4_c1_c0_c1_c0;
+uniform vec4 uscale6_7_Stage4_c1_c0_c1_c0;
+uniform vec4 ubias0_1_Stage4_c1_c0_c1_c0;
+uniform vec4 ubias2_3_Stage4_c1_c0_c1_c0;
+uniform vec4 ubias4_5_Stage4_c1_c0_c1_c0;
+uniform vec4 ubias6_7_Stage4_c1_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage4_c1_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage4_c1_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 RadialGradientLayout_Stage3_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = length(vTransformedCoords_0_Stage0);
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage3_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthresholds1_7_Stage3_c0_c0_c1_c0.w) {
+ if (t < uthresholds1_7_Stage3_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage3_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage3_c0_c0_c1_c0;
+ bias = ubias0_1_Stage3_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage3_c0_c0_c1_c0;
+ bias = ubias2_3_Stage3_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage3_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage3_c0_c0_c1_c0;
+ bias = ubias4_5_Stage3_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage3_c0_c0_c1_c0;
+ bias = ubias6_7_Stage3_c0_c0_c1_c0;
+ }
+ }
+ } else {
+ {
+ {
+ scale = uscale8_9_Stage3_c0_c0_c1_c0;
+ bias = ubias8_9_Stage3_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage3_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = RadialGradientLayout_Stage3_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage3_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage3_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage3_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 TwoPointConicalGradientLayout_Stage4_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_1_Stage0;
+ float t = -1.0;
+ {
+ {
+ float invR1 = ufocalParams_Stage4_c1_c0_c0_c0.x;
+ float x_t = -1.0;
+ {
+ x_t = length(p) - p.x * invR1;
+ }
+ {
+ {
+ t = x_t;
+ }
+ }
+ {
+ t = 1.0 - t;
+ }
+ }
+ }
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage4_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage4_c1_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage4_c1_c0_c1_c0.x) {
+ scale = uscale0_1_Stage4_c1_c0_c1_c0;
+ bias = ubias0_1_Stage4_c1_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage4_c1_c0_c1_c0;
+ bias = ubias2_3_Stage4_c1_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage4_c1_c0_c1_c0.z) {
+ scale = uscale4_5_Stage4_c1_c0_c1_c0;
+ bias = ubias4_5_Stage4_c1_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage4_c1_c0_c1_c0;
+ bias = ubias6_7_Stage4_c1_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage4_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage4_c1_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage4_c1_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ {
+ output_Stage1 = ucolor_Stage1;
+ }
+ }
+ vec4 output_Stage2;
+ {
+ float alpha = 1.0;
+ float edge;
+ edge = dot(uedges_Stage2[0], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage2[1], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage2[2], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage2[3], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ alpha = 1.0 - alpha;
+ output_Stage2 = output_Stage1 * alpha;
+ }
+ vec4 output_Stage3;
+ {
+ output_Stage3 = blend_dst_in(output_Stage2, ClampedGradientEffect_Stage3_c0_c0(vec4(1.0)));
+ }
+ vec4 output_Stage4;
+ {
+ output_Stage4 = blend_dst_in(output_Stage3, TiledGradientEffect_Stage4_c1_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage4;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(position, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(position, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/916-1.shader_test b/shaders/skia/916-1.shader_test
new file mode 100644
index 0000000..b6bc996
--- /dev/null
+++ b/shaders/skia/916-1.shader_test
@@ -0,0 +1,101 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage2_c0_c0;
+uniform vec4 urightBorderColor_Stage2_c0_c0;
+uniform vec2 ufocalParams_Stage2_c0_c0_c0_c0;
+uniform vec4 uscale01_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias01_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale23_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias23_Stage2_c0_c0_c1_c0;
+uniform float uthreshold_Stage2_c0_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage2_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_1_Stage0;
+ float t = -1.0;
+ {
+ {
+ float r0 = ufocalParams_Stage2_c0_c0_c0_c0.x;
+ {
+ t = -length(p) - r0;
+ }
+ }
+ }
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 DualIntervalGradientColorizer_Stage2_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthreshold_Stage2_c0_c0_c1_c0) {
+ scale = uscale01_Stage2_c0_c0_c1_c0;
+ bias = ubias01_Stage2_c0_c0_c1_c0;
+ } else {
+ scale = uscale23_Stage2_c0_c0_c1_c0;
+ bias = ubias23_Stage2_c0_c0_c1_c0;
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage2_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage2_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage2_c0_c0;
+ } else {
+ _output = DualIntervalGradientColorizer_Stage2_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_dst_in(output_Stage1, ClampedGradientEffect_Stage2_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/916.shader_test b/shaders/skia/916.shader_test
new file mode 100644
index 0000000..3807b76
--- /dev/null
+++ b/shaders/skia/916.shader_test
@@ -0,0 +1,315 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform float uSurfaceScale_Stage1;
+uniform vec3 uLightColor_Stage1;
+uniform float uKD_Stage1;
+uniform vec4 uTexDom_Stage1;
+uniform vec3 uDecalParams_Stage1;
+uniform vec3 uLightDirection_Stage1;
+uniform vec4 uinnerRect_Stage2;
+uniform vec4 uinvRadiiLTRB_Stage2;
+uniform float ucornerRadius_Stage3_c0_c0;
+uniform vec4 uproxyRect_Stage3_c0_c0;
+uniform float ublurRadius_Stage3_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage3;
+uniform sampler2D uTextureSampler_1_Stage3;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 light_Stage1(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ float colorScale = uKD_Stage1 * dot(normal, surfaceToLight);
+ return vec4(lightColor * clamp(colorScale, 0.0, 1.0), 1.0);
+}
+float sobel_Stage1(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage1(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage1(float m[9], float surfaceScale) {
+ return pointToNormal_Stage1(sobel_Stage1(m[0], m[1], m[3], m[4], 0.0, 0.0, 0.66666698455810547), sobel_Stage1(m[0], m[3], m[1], m[4], 0.0, 0.0, 0.66666698455810547), surfaceScale);
+}
+vec4 RRectBlurEffect_Stage3_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 translatedFragPos = gl_FragCoord.xy - uproxyRect_Stage3_c0_c0.xy;
+ float threshold = ucornerRadius_Stage3_c0_c0 + 2.0 * ublurRadius_Stage3_c0_c0;
+ vec2 middle = (uproxyRect_Stage3_c0_c0.zw - uproxyRect_Stage3_c0_c0.xy) - 2.0 * threshold;
+ if (translatedFragPos.x >= threshold && translatedFragPos.x < middle.x + threshold) {
+ translatedFragPos.x = threshold;
+ } else if (translatedFragPos.x >= middle.x + threshold) {
+ translatedFragPos.x -= middle.x - 1.0;
+ }
+ if (translatedFragPos.y > threshold && translatedFragPos.y < middle.y + threshold) {
+ translatedFragPos.y = threshold;
+ } else if (translatedFragPos.y >= middle.y + threshold) {
+ translatedFragPos.y -= middle.y - 1.0;
+ }
+ vec2 proxyDims = vec2(2.0 * threshold + 1.0);
+ vec2 texCoord = translatedFragPos / proxyDims;
+ _output = _input * texture(uTextureSampler_0_Stage3, texCoord);
+ return _output;
+}
+vec4 TextureEffect_Stage3_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_1_Stage3, vTransformedCoords_1_Stage0) * _input;
+ return _output;
+}
+float _blend_overlay_component(float sc, float sa, float dc, float da) {
+ if (2.0 * dc <= da) {
+ return (2.0 * sc) * dc;
+ }
+ return sa * da - (2.0 * (da - dc)) * (sa - sc);
+}
+vec4 blend_overlay(vec4 src, vec4 dst) {
+ vec4 result = vec4(_blend_overlay_component(src.x, src.w, dst.x, dst.w), _blend_overlay_component(src.y, src.w, dst.y, dst.w), _blend_overlay_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+ result.xyz += dst.xyz * (1.0 - src.w) + src.xyz * (1.0 - dst.w);
+ return result;
+}
+vec4 blend_hard_light(vec4 src, vec4 dst) {
+ return blend_overlay(dst, src);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ vec2 coord = vTransformedCoords_0_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp0 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp5 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp6 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp7 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1.y);
+ if (err > uDecalParams_Stage1.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1.z < 1.0) {
+ err = 0.0;
+ }
+ temp8 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = uLightDirection_Stage1;
+ output_Stage1 = light_Stage1(normal_Stage1(m, uSurfaceScale_Stage1), surfaceToLight, uLightColor_Stage1);
+ }
+ vec4 output_Stage2;
+ {
+ vec2 dxy0 = uinnerRect_Stage2.xy - gl_FragCoord.xy;
+ vec2 dxy1 = gl_FragCoord.xy - uinnerRect_Stage2.zw;
+ vec2 dxy = max(max(dxy0, dxy1), 0.0);
+ vec2 Z = max(max(dxy0 * uinvRadiiLTRB_Stage2.xy, dxy1 * uinvRadiiLTRB_Stage2.zw), 0.0);
+ float implicit = dot(Z, dxy) - 1.0;
+ float grad_dot = 4.0 * dot(Z, Z);
+ grad_dot = max(grad_dot, 9.9999997473787516e-05);
+ float approx_dist = implicit * inversesqrt(grad_dot);
+ float alpha = clamp(0.5 - approx_dist, 0.0, 1.0);
+ output_Stage2 = output_Stage1 * alpha;
+ }
+ vec4 output_Stage3;
+ {
+ vec4 inputColor = vec4(output_Stage2.xyz, 1.0);
+ output_Stage3 = blend_hard_light(RRectBlurEffect_Stage3_c0_c0(inputColor), TextureEffect_Stage3_c1_c0(inputColor));
+ output_Stage3 *= output_Stage2.w;
+ }
+ {
+ sk_FragColor = 1.0 - output_Stage3;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform float uSrcTF_Stage0[7];
+uniform mat3 uColorXform_Stage0;
+uniform float uDstTF_Stage0[7];
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 inColor;
+in vec2 inLocalCoord;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+float src_tf_Stage0(float x) {
+ float G = uSrcTF_Stage0[0];
+ float A = uSrcTF_Stage0[1];
+ float B = uSrcTF_Stage0[2];
+ float C = uSrcTF_Stage0[3];
+ float D = uSrcTF_Stage0[4];
+ float E = uSrcTF_Stage0[5];
+ float F = uSrcTF_Stage0[6];
+ float s = sign(x);
+ x = abs(x);
+ x = x < D ? C * x + F : pow(A * x + B, G) + E;
+ return s * x;
+}
+float dst_tf_Stage0(float x) {
+ float G = uDstTF_Stage0[0];
+ float A = uDstTF_Stage0[1];
+ float B = uDstTF_Stage0[2];
+ float C = uDstTF_Stage0[3];
+ float D = uDstTF_Stage0[4];
+ float E = uDstTF_Stage0[5];
+ float F = uDstTF_Stage0[6];
+ float s = sign(x);
+ x = abs(x);
+ x = x < D ? C * x + F : pow(A * x + B, G) + E;
+ return s * x;
+}
+vec4 gamut_xform_Stage0(vec4 color) {
+ color.xyz = uColorXform_Stage0 * color.xyz;
+ return color;
+}
+vec4 color_xform_Stage0(vec4 color) {
+ float nonZeroAlpha = max(color.w, 9.9999997473787516e-05);
+ color = vec4(color.xyz / nonZeroAlpha, nonZeroAlpha);
+ color.x = src_tf_Stage0(color.x);
+ color.y = src_tf_Stage0(color.y);
+ color.z = src_tf_Stage0(color.z);
+ color = gamut_xform_Stage0(color);
+ color.x = dst_tf_Stage0(color.x);
+ color.y = dst_tf_Stage0(color.y);
+ color.z = dst_tf_Stage0(color.z);
+ color.xyz *= color.w;
+ return color;
+}
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = color_xform_Stage0(color);
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = position;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/919-1.shader_test b/shaders/skia/919-1.shader_test
new file mode 100644
index 0000000..25d08e7
--- /dev/null
+++ b/shaders/skia/919-1.shader_test
@@ -0,0 +1,109 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 ufocalParams_Stage2_c0_c0_c0_c0;
+uniform vec4 uscale01_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias01_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale23_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias23_Stage2_c0_c0_c1_c0;
+uniform float uthreshold_Stage2_c0_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage2_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_1_Stage0;
+ float t = -1.0;
+ {
+ {
+ float invR1 = ufocalParams_Stage2_c0_c0_c0_c0.x;
+ float x_t = -1.0;
+ {
+ x_t = length(p) - p.x * invR1;
+ }
+ {
+ {
+ t = x_t;
+ }
+ }
+ {
+ t = 1.0 - t;
+ }
+ }
+ }
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 DualIntervalGradientColorizer_Stage2_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthreshold_Stage2_c0_c0_c1_c0) {
+ scale = uscale01_Stage2_c0_c0_c1_c0;
+ bias = ubias01_Stage2_c0_c0_c1_c0;
+ } else {
+ scale = uscale23_Stage2_c0_c0_c1_c0;
+ bias = ubias23_Stage2_c0_c0_c1_c0;
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage2_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = DualIntervalGradientColorizer_Stage2_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_dst_in(output_Stage1, TiledGradientEffect_Stage2_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/919.shader_test b/shaders/skia/919.shader_test
new file mode 100644
index 0000000..e538e07
--- /dev/null
+++ b/shaders/skia/919.shader_test
@@ -0,0 +1,113 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_KHR_blend_equation_advanced : require
+out vec4 sk_FragColor;
+layout (blend_support_all_equations) out ;
+uniform vec4 urectUniform_Stage1_c0_c0_c0_c0;
+uniform vec4 ucircleData_Stage1_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+noperspective in vec4 vcolor_Stage0;
+vec4 AARectEffect_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float alpha;
+ {
+ float xSub, ySub;
+ xSub = min(gl_FragCoord.x - urectUniform_Stage1_c0_c0_c0_c0.x, 0.0);
+ xSub += min(urectUniform_Stage1_c0_c0_c0_c0.z - gl_FragCoord.x, 0.0);
+ ySub = min(gl_FragCoord.y - urectUniform_Stage1_c0_c0_c0_c0.y, 0.0);
+ ySub += min(urectUniform_Stage1_c0_c0_c0_c0.w - gl_FragCoord.y, 0.0);
+ alpha = (1.0 + max(xSub, -1.0)) * (1.0 + max(ySub, -1.0));
+ }
+ {
+ alpha = 1.0 - alpha;
+ }
+ _output = _input * alpha;
+ return _output;
+}
+vec4 ColorTableEffect_Stage1_c0_c0_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float nonZeroAlpha = max(_input.w, 9.9999997473787516e-05);
+ vec4 coord = vec4(_input.xyz / nonZeroAlpha, nonZeroAlpha);
+ coord = coord * 0.9960939884185791 + vec4(0.0019529999699443579, 0.0019529999699443579, 0.0019529999699443579, 0.0019529999699443579);
+ _output.w = texture(uTextureSampler_0_Stage1, vec2(coord.w, 0.125)).w;
+ _output.x = texture(uTextureSampler_0_Stage1, vec2(coord.x, 0.375)).w;
+ _output.y = texture(uTextureSampler_0_Stage1, vec2(coord.y, 0.625)).w;
+ _output.z = texture(uTextureSampler_0_Stage1, vec2(coord.z, 0.875)).w;
+ _output.xyz *= _output.w;
+ return _output;
+}
+vec4 ClampFragmentProcessor_Stage1_c0_c0_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ float alpha = clamp(_input.w, 0.0, 1.0);
+ _output = vec4(clamp(_input.xyz, 0.0, alpha), alpha);
+ }
+ return _output;
+}
+vec4 blend_dst_atop(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src + src.w * dst;
+}
+vec4 ComposeTwo_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_dst_atop(ColorTableEffect_Stage1_c0_c0_c1_c0_c0_c0(inputColor), ClampFragmentProcessor_Stage1_c0_c0_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 blend_dst_out(vec4 src, vec4 dst) {
+ return (1.0 - src.w) * dst;
+}
+vec4 ComposeTwo_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_dst_out(AARectEffect_Stage1_c0_c0_c0_c0(inputColor), ComposeTwo_Stage1_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 CircleBlurFragmentProcessor_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 vec = vec2((gl_FragCoord.x - ucircleData_Stage1_c1_c0.x) * ucircleData_Stage1_c1_c0.w, (gl_FragCoord.y - ucircleData_Stage1_c1_c0.y) * ucircleData_Stage1_c1_c0.w);
+ float dist = length(vec) + (0.5 - ucircleData_Stage1_c1_c0.z) * ucircleData_Stage1_c1_c0.w;
+ _output = _input * texture(uTextureSampler_1_Stage1, vec2(dist, 0.5)).w;
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_src_in(ComposeTwo_Stage1_c0_c0(inputColor), CircleBlurFragmentProcessor_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+noperspective out vec4 vcolor_Stage0;
+void main() {
+ vec4 color = inColor;
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/922-1.shader_test b/shaders/skia/922-1.shader_test
new file mode 100644
index 0000000..3adfab5
--- /dev/null
+++ b/shaders/skia/922-1.shader_test
@@ -0,0 +1,128 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 ufocalParams_Stage2_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage2_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage2_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage2_c0_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage2_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_1_Stage0;
+ float t = -1.0;
+ float v = 1.0;
+ {
+ {
+ float x_t = -1.0;
+ {
+ x_t = dot(p, p) / p.x;
+ }
+ {
+ if (x_t <= 0.0) {
+ v = -1.0;
+ }
+ }
+ {
+ {
+ t = x_t;
+ }
+ }
+ }
+ }
+ _output = vec4(t, v, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage2_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage2_c0_c0_c1_c0;
+ bias = ubias0_1_Stage2_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage2_c0_c0_c1_c0;
+ bias = ubias2_3_Stage2_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage2_c0_c0_c1_c0;
+ bias = ubias4_5_Stage2_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage2_c0_c0_c1_c0;
+ bias = ubias6_7_Stage2_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage2_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage2_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_dst_in(output_Stage1, TiledGradientEffect_Stage2_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/922.shader_test b/shaders/skia/922.shader_test
new file mode 100644
index 0000000..0b2a74f
--- /dev/null
+++ b/shaders/skia/922.shader_test
@@ -0,0 +1,232 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uScale_Stage1_c0_c0;
+uniform vec4 uTexDom_Stage1_c0_c0;
+uniform vec3 uDecalParams_Stage1_c0_c0;
+uniform vec4 urectH_Stage1_c1_c0_c0_c0_c0_c0;
+uniform float uinvSixSigma_Stage1_c1_c0_c0_c0_c0_c0;
+uniform vec4 ucolor_Stage1_c1_c0_c0_c0_c1_c0;
+uniform vec2 ubaseFrequency_Stage1_c1_c0_c1_c0_c0_c0;
+uniform float uz_Stage1_c1_c0_c1_c0_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+uniform sampler2D uTextureSampler_2_Stage1;
+uniform sampler2D uTextureSampler_3_Stage1;
+uniform sampler2D uTextureSampler_4_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+vec4 DisplacementMap_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 dColor = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ dColor.xyz = dColor.w < 9.9999999747524271e-07 ? vec3(0.0) : clamp(dColor.xyz / dColor.w, 0.0, 1.0);
+ vec2 cCoords = vTransformedCoords_1_Stage0 + uScale_Stage1_c0_c0 * (dColor.wy - vec2(0.5));
+ {
+ vec2 origCoord = cCoords;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0.xy, uTexDom_Stage1_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ _output = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ return _output;
+}
+vec4 RectBlurEffect_Stage1_c1_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float xCoverage, yCoverage;
+ {
+ float x, y;
+ {
+ x = max(urectH_Stage1_c1_c0_c0_c0_c0_c0.x - gl_FragCoord.x, gl_FragCoord.x - urectH_Stage1_c1_c0_c0_c0_c0_c0.z);
+ y = max(urectH_Stage1_c1_c0_c0_c0_c0_c0.y - gl_FragCoord.y, gl_FragCoord.y - urectH_Stage1_c1_c0_c0_c0_c0_c0.w);
+ }
+ xCoverage = texture(uTextureSampler_2_Stage1, vec2(x * uinvSixSigma_Stage1_c1_c0_c0_c0_c0_c0, 0.5)).w;
+ yCoverage = texture(uTextureSampler_2_Stage1, vec2(y * uinvSixSigma_Stage1_c1_c0_c0_c0_c0_c0, 0.5)).w;
+ _output = (_input * xCoverage) * yCoverage;
+ }
+ _output = (_input * xCoverage) * yCoverage;
+ return _output;
+}
+vec4 ConstColorProcessor_Stage1_c1_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage1_c1_c0_c0_c0_c1_c0;
+ }
+ return _output;
+}
+vec4 blend_src_out(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src;
+}
+vec4 ComposeTwo_Stage1_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_src_out(RectBlurEffect_Stage1_c1_c0_c0_c0_c0_c0(inputColor), ConstColorProcessor_Stage1_c1_c0_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec3 fade_Stage1_c1_c0_c1_c0_c0_c0(vec3 t) {
+ return ((t * t) * t) * (t * (t * 6.0 - 15.0) + 10.0);
+}
+float perm_Stage1_c1_c0_c1_c0_c0_c0(float x) {
+ return texture(uTextureSampler_3_Stage1, vec2(fract(x / 256.0), 0.0)).x * 255.0;
+}
+float grad_Stage1_c1_c0_c1_c0_c0_c0(float x, vec3 p) {
+ return dot(texture(uTextureSampler_4_Stage1, vec2(fract(x / 16.0), 0.0)).xyz * 255.0 - vec3(1.0), p);
+}
+float lerp_Stage1_c1_c0_c1_c0_c0_c0(float a, float b, float w) {
+ return a + w * (b - a);
+}
+float noise_Stage1_c1_c0_c1_c0_c0_c0(vec3 p) {
+ vec3 P = mod(floor(p), 256.0);
+ p -= floor(p);
+ vec3 f = fade_Stage1_c1_c0_c1_c0_c0_c0(p);
+ float A = perm_Stage1_c1_c0_c1_c0_c0_c0(P.x) + P.y;
+ float AA = perm_Stage1_c1_c0_c1_c0_c0_c0(A) + P.z;
+ float AB = perm_Stage1_c1_c0_c1_c0_c0_c0(A + 1.0) + P.z;
+ float B = perm_Stage1_c1_c0_c1_c0_c0_c0(P.x + 1.0) + P.y;
+ float BA = perm_Stage1_c1_c0_c1_c0_c0_c0(B) + P.z;
+ float BB = perm_Stage1_c1_c0_c1_c0_c0_c0(B + 1.0) + P.z;
+ float result = lerp_Stage1_c1_c0_c1_c0_c0_c0(lerp_Stage1_c1_c0_c1_c0_c0_c0(lerp_Stage1_c1_c0_c1_c0_c0_c0(grad_Stage1_c1_c0_c1_c0_c0_c0(perm_Stage1_c1_c0_c1_c0_c0_c0(AA), p), grad_Stage1_c1_c0_c1_c0_c0_c0(perm_Stage1_c1_c0_c1_c0_c0_c0(BA), p + vec3(-1.0, 0.0, 0.0)), f.x), lerp_Stage1_c1_c0_c1_c0_c0_c0(grad_Stage1_c1_c0_c1_c0_c0_c0(perm_Stage1_c1_c0_c1_c0_c0_c0(AB), p + vec3(0.0, -1.0, 0.0)), grad_Stage1_c1_c0_c1_c0_c0_c0(perm_Stage1_c1_c0_c1_c0_c0_c0(BB), p + vec3(-1.0, -1.0, 0.0)), f.x), f.y), lerp_Stage1_c1_c0_c1_c0_c0_c0(lerp_Stage1_c1_c0_c1_c0_c0_c0(grad_Stage1_c1_c0_c1_c0_c0_c0(perm_Stage1_c1_c0_c1_c0_c0_c0(AA + 1.0), p + vec3(0.0, 0.0, -1.0)), grad_Stage1_c1_c0_c1_c0_c0_c0(perm_Stage1_c1_c0_c1_c0_c0_c0(BA + 1.0), p + vec3(-1.0, 0.0, -1.0)), f.x), lerp_Stage1_c1_c0_c1_c0_c0_c0(grad_Stage1_c1_c0_c1_c0_c0_c0(perm_Stage1_c1_c0_c1_c0_c0_c0(AB + 1.0), p + vec3(0.0, -1.0, -1.0)), grad_Stage1_c1_c0_c1_c0_c0_c0(perm_Stage1_c1_c0_c1_c0_c0_c0(BB + 1.0), p + vec3(-1.0, -1.0, -1.0)), f.x), f.y), f.z);
+ return result;
+}
+float noiseOctaves_Stage1_c1_c0_c1_c0_c0_c0(vec3 p) {
+ float result = 0.0;
+ float ratio = 1.0;
+ for (float i = 0.0;i < 9.0; i++) {
+ result += noise_Stage1_c1_c0_c1_c0_c0_c0(p) / ratio;
+ p *= 2.0;
+ ratio *= 2.0;
+ }
+ return (result + 1.0) / 2.0;
+}
+vec4 ImprovedPerlinNoise_Stage1_c1_c0_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coords = vTransformedCoords_2_Stage0 * ubaseFrequency_Stage1_c1_c0_c1_c0_c0_c0;
+ float r = noiseOctaves_Stage1_c1_c0_c1_c0_c0_c0(vec3(coords, uz_Stage1_c1_c0_c1_c0_c0_c0));
+ float g = noiseOctaves_Stage1_c1_c0_c1_c0_c0_c0(vec3(coords, uz_Stage1_c1_c0_c1_c0_c0_c0));
+ float b = noiseOctaves_Stage1_c1_c0_c1_c0_c0_c0(vec3(coords, uz_Stage1_c1_c0_c1_c0_c0_c0));
+ float a = noiseOctaves_Stage1_c1_c0_c1_c0_c0_c0(vec3(coords, uz_Stage1_c1_c0_c1_c0_c0_c0));
+ _output = vec4(r, g, b, a);
+ _output = clamp(_output, 0.0, 1.0);
+ _output = vec4(_output.xyz * _output.www, _output.w);
+ return _output;
+}
+vec4 Big_Ole_Key_Stage1_c1_c0_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = _input;
+ return _output;
+}
+vec4 blend_multiply(vec4 src, vec4 dst) {
+ return vec4(((1.0 - src.w) * dst.xyz + (1.0 - dst.w) * src.xyz) + src.xyz * dst.xyz, src.w + (1.0 - src.w) * dst.w);
+}
+vec4 ComposeTwo_Stage1_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_multiply(ImprovedPerlinNoise_Stage1_c1_c0_c1_c0_c0_c0(inputColor), Big_Ole_Key_Stage1_c1_c0_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+vec4 ComposeTwo_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_dst_in(ComposeTwo_Stage1_c1_c0_c0_c0(inputColor), ComposeTwo_Stage1_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+float _blend_color_saturation(vec3 color) {
+ return max(max(color.x, color.y), color.z) - min(min(color.x, color.y), color.z);
+}
+vec3 _blend_set_color_saturation_helper(vec3 minMidMax, float sat) {
+ if (minMidMax.x < minMidMax.z) {
+ return vec3(0.0, (sat * (minMidMax.y - minMidMax.x)) / (minMidMax.z - minMidMax.x), sat);
+ }
+ return vec3(0.0);
+}
+vec3 _blend_set_color_saturation(vec3 hueLumColor, vec3 satColor) {
+ float sat = _blend_color_saturation(satColor);
+ if (hueLumColor.x <= hueLumColor.y) {
+ if (hueLumColor.y <= hueLumColor.z) {
+ hueLumColor.xyz = _blend_set_color_saturation_helper(hueLumColor, sat);
+ } else if (hueLumColor.x <= hueLumColor.z) {
+ hueLumColor.xzy = _blend_set_color_saturation_helper(hueLumColor.xzy, sat);
+ } else {
+ hueLumColor.zxy = _blend_set_color_saturation_helper(hueLumColor.zxy, sat);
+ }
+ } else if (hueLumColor.x <= hueLumColor.z) {
+ hueLumColor.yxz = _blend_set_color_saturation_helper(hueLumColor.yxz, sat);
+ } else if (hueLumColor.y <= hueLumColor.z) {
+ hueLumColor.yzx = _blend_set_color_saturation_helper(hueLumColor.yzx, sat);
+ } else {
+ hueLumColor.zyx = _blend_set_color_saturation_helper(hueLumColor.zyx, sat);
+ }
+ return hueLumColor;
+}
+float _blend_color_luminance(vec3 color) {
+ return dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), color);
+}
+vec3 _blend_set_color_luminance(vec3 hueSatColor, float alpha, vec3 lumColor) {
+ float lum = _blend_color_luminance(lumColor);
+ vec3 result = (lum - _blend_color_luminance(hueSatColor)) + hueSatColor;
+ float minComp = min(min(result.x, result.y), result.z);
+ float maxComp = max(max(result.x, result.y), result.z);
+ if (minComp < 0.0 && lum != minComp) {
+ result = lum + ((result - lum) * lum) / (lum - minComp);
+ }
+ if (maxComp > alpha && maxComp != lum) {
+ return lum + ((result - lum) * (alpha - lum)) / (maxComp - lum);
+ }
+ return result;
+}
+vec4 blend_hue(vec4 src, vec4 dst) {
+ float alpha = dst.w * src.w;
+ vec3 sda = src.xyz * dst.w;
+ vec3 dsa = dst.xyz * src.w;
+ return vec4((((_blend_set_color_luminance(_blend_set_color_saturation(sda, dsa), alpha, dsa) + dst.xyz) - dsa) + src.xyz) - sda, (src.w + dst.w) - alpha);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(vec4(1.0).xyz, 1.0);
+ output_Stage1 = blend_hue(DisplacementMap_Stage1_c0_c0(inputColor), ComposeTwo_Stage1_c1_c0(inputColor));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/925-1.shader_test b/shaders/skia/925-1.shader_test
new file mode 100644
index 0000000..905e2ae
--- /dev/null
+++ b/shaders/skia/925-1.shader_test
@@ -0,0 +1,144 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage2_c0_c0;
+uniform vec4 urightBorderColor_Stage2_c0_c0;
+uniform vec2 ufocalParams_Stage2_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale8_9_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias8_9_Stage2_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage2_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage2_c0_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage2_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_1_Stage0;
+ float t = -1.0;
+ float v = 1.0;
+ {
+ {
+ float invR1 = ufocalParams_Stage2_c0_c0_c0_c0.x;
+ float x_t = -1.0;
+ {
+ float temp = p.x * p.x - p.y * p.y;
+ if (temp >= 0.0) {
+ {
+ x_t = sqrt(temp) - p.x * invR1;
+ }
+ }
+ }
+ {
+ if (x_t <= 0.0) {
+ v = -1.0;
+ }
+ }
+ {
+ {
+ t = x_t;
+ }
+ }
+ }
+ }
+ _output = vec4(t, v, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage2_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.w) {
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage2_c0_c0_c1_c0;
+ bias = ubias0_1_Stage2_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage2_c0_c0_c1_c0;
+ bias = ubias2_3_Stage2_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage2_c0_c0_c1_c0;
+ bias = ubias4_5_Stage2_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage2_c0_c0_c1_c0;
+ bias = ubias6_7_Stage2_c0_c0_c1_c0;
+ }
+ }
+ } else {
+ {
+ {
+ scale = uscale8_9_Stage2_c0_c0_c1_c0;
+ bias = ubias8_9_Stage2_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage2_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage2_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage2_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage2_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_dst_in(output_Stage1, ClampedGradientEffect_Stage2_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/925.shader_test b/shaders/skia/925.shader_test
new file mode 100644
index 0000000..9b5a72c
--- /dev/null
+++ b/shaders/skia/925.shader_test
@@ -0,0 +1,22 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+uniform vec4 uColor_Stage0;
+void main() {
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 position;
+void main() {
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/928-1.shader_test b/shaders/skia/928-1.shader_test
new file mode 100644
index 0000000..4a7817e
--- /dev/null
+++ b/shaders/skia/928-1.shader_test
@@ -0,0 +1,125 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage2_c0_c0;
+uniform vec4 urightBorderColor_Stage2_c0_c0;
+uniform vec2 ufocalParams_Stage2_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage2_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage2_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage2_c0_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage2_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_1_Stage0;
+ float t = -1.0;
+ float v = 1.0;
+ {
+ {
+ float fx = ufocalParams_Stage2_c0_c0_c0_c0.y;
+ float x_t = -1.0;
+ {
+ x_t = dot(p, p) / p.x;
+ }
+ {
+ if (x_t <= 0.0) {
+ v = -1.0;
+ }
+ }
+ {
+ {
+ t = x_t + fx;
+ }
+ }
+ }
+ }
+ _output = vec4(t, v, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage2_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage2_c0_c0_c1_c0;
+ bias = ubias0_1_Stage2_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage2_c0_c0_c1_c0;
+ bias = ubias2_3_Stage2_c0_c0_c1_c0;
+ }
+ } else {
+ {
+ scale = uscale4_5_Stage2_c0_c0_c1_c0;
+ bias = ubias4_5_Stage2_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage2_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage2_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage2_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage2_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_dst_in(output_Stage1, ClampedGradientEffect_Stage2_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/928.shader_test b/shaders/skia/928.shader_test
new file mode 100644
index 0000000..f57221f
--- /dev/null
+++ b/shaders/skia/928.shader_test
@@ -0,0 +1,165 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform float uSrcTF_Stage0[7];
+uniform mat3 uColorXform_Stage0;
+uniform float uDstTF_Stage0[7];
+uniform vec2 uScale_Stage1_c0_c0;
+uniform vec4 uTexDom_Stage1_c0_c0;
+uniform vec3 uDecalParams_Stage1_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+uniform sampler2D uTextureSampler_2_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vtextureCoords_Stage0;
+flat in vec4 vtextureDomain_Stage0;
+flat in vec4 vcolor_Stage0;
+float src_tf_Stage0(float x) {
+ float G = uSrcTF_Stage0[0];
+ float A = uSrcTF_Stage0[1];
+ float B = uSrcTF_Stage0[2];
+ float C = uSrcTF_Stage0[3];
+ float D = uSrcTF_Stage0[4];
+ float E = uSrcTF_Stage0[5];
+ float F = uSrcTF_Stage0[6];
+ float s = sign(x);
+ x = abs(x);
+ x = x < D ? C * x + F : pow(A * x + B, G) + E;
+ return s * x;
+}
+float dst_tf_Stage0(float x) {
+ float G = uDstTF_Stage0[0];
+ float A = uDstTF_Stage0[1];
+ float B = uDstTF_Stage0[2];
+ float C = uDstTF_Stage0[3];
+ float D = uDstTF_Stage0[4];
+ float E = uDstTF_Stage0[5];
+ float F = uDstTF_Stage0[6];
+ float s = sign(x);
+ x = abs(x);
+ x = x < D ? C * x + F : pow(A * x + B, G) + E;
+ return s * x;
+}
+vec4 gamut_xform_Stage0(vec4 color) {
+ color.xyz = uColorXform_Stage0 * color.xyz;
+ return color;
+}
+vec4 color_xform_Stage0(vec4 color) {
+ float nonZeroAlpha = max(color.w, 9.9999997473787516e-05);
+ color = vec4(color.xyz / nonZeroAlpha, nonZeroAlpha);
+ color.x = src_tf_Stage0(color.x);
+ color.y = src_tf_Stage0(color.y);
+ color.z = src_tf_Stage0(color.z);
+ color = gamut_xform_Stage0(color);
+ color.x = dst_tf_Stage0(color.x);
+ color.y = dst_tf_Stage0(color.y);
+ color.z = dst_tf_Stage0(color.z);
+ color.xyz *= color.w;
+ return color;
+}
+vec4 DisplacementMap_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 dColor = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ dColor.xyz = dColor.w < 9.9999999747524271e-07 ? vec3(0.0) : clamp(dColor.xyz / dColor.w, 0.0, 1.0);
+ vec2 cCoords = vTransformedCoords_1_Stage0 + uScale_Stage1_c0_c0 * (dColor.zz - vec2(0.5));
+ {
+ vec2 origCoord = cCoords;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0.xy, uTexDom_Stage1_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ _output = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ return _output;
+}
+vec4 ColorTableEffect_Stage1_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float nonZeroAlpha = max(_input.w, 9.9999997473787516e-05);
+ vec4 coord = vec4(_input.xyz / nonZeroAlpha, nonZeroAlpha);
+ coord = coord * 0.9960939884185791 + vec4(0.0019529999699443579, 0.0019529999699443579, 0.0019529999699443579, 0.0019529999699443579);
+ _output.w = texture(uTextureSampler_2_Stage1, vec2(coord.w, 0.125)).w;
+ _output.x = texture(uTextureSampler_2_Stage1, vec2(coord.x, 0.375)).w;
+ _output.y = texture(uTextureSampler_2_Stage1, vec2(coord.y, 0.625)).w;
+ _output.z = texture(uTextureSampler_2_Stage1, vec2(coord.z, 0.875)).w;
+ _output.xyz *= _output.w;
+ return _output;
+}
+vec4 ClampFragmentProcessor_Stage1_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ float alpha = clamp(_input.w, 0.0, 1.0);
+ _output = vec4(clamp(_input.xyz, 0.0, alpha), alpha);
+ }
+ return _output;
+}
+vec4 blend_dst_atop(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src + src.w * dst;
+}
+vec4 ComposeTwo_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_dst_atop(ColorTableEffect_Stage1_c1_c0_c0_c0(inputColor), ClampFragmentProcessor_Stage1_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 blend_dst_over(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src + dst;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ vec2 textureCoords;
+ textureCoords = vtextureCoords_Stage0;
+ vec4 textureDomain;
+ textureDomain = vtextureDomain_Stage0;
+ outputColor_Stage0 = vcolor_Stage0;
+ outputColor_Stage0 = color_xform_Stage0(texture(uTextureSampler_0_Stage0, clamp(textureCoords, textureDomain.xy, textureDomain.zw))) * outputColor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_dst_over(DisplacementMap_Stage1_c0_c0(inputColor), ComposeTwo_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 textureCoords;
+in vec4 textureDomain;
+in vec4 color;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vtextureCoords_Stage0;
+flat out vec4 vtextureDomain_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vec2 pos2 = position;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(textureCoords, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(textureCoords, 1.0)).xy;
+ vtextureCoords_Stage0 = textureCoords;
+ vtextureDomain_Stage0 = textureDomain;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/931-1.shader_test b/shaders/skia/931-1.shader_test
new file mode 100644
index 0000000..08a5dec
--- /dev/null
+++ b/shaders/skia/931-1.shader_test
@@ -0,0 +1,98 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 ufocalParams_Stage2_c0_c0_c0_c0;
+uniform vec4 uscale01_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias01_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale23_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias23_Stage2_c0_c0_c1_c0;
+uniform float uthreshold_Stage2_c0_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage2_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_1_Stage0;
+ float t = -1.0;
+ {
+ {
+ float r0 = ufocalParams_Stage2_c0_c0_c0_c0.x;
+ {
+ t = length(p) - r0;
+ }
+ }
+ }
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 DualIntervalGradientColorizer_Stage2_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthreshold_Stage2_c0_c0_c1_c0) {
+ scale = uscale01_Stage2_c0_c0_c1_c0;
+ bias = ubias01_Stage2_c0_c0_c1_c0;
+ } else {
+ scale = uscale23_Stage2_c0_c0_c1_c0;
+ bias = ubias23_Stage2_c0_c0_c1_c0;
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage2_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else {
+ {
+ t.x = fract(t.x);
+ }
+ _output = DualIntervalGradientColorizer_Stage2_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_dst_in(output_Stage1, TiledGradientEffect_Stage2_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/931.shader_test b/shaders/skia/931.shader_test
new file mode 100644
index 0000000..40d93a4
--- /dev/null
+++ b/shaders/skia/931.shader_test
@@ -0,0 +1,44 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+noperspective in vec4 vQuadEdge_Stage0;
+noperspective in vec4 vinColor_Stage0;
+void main() {
+ {
+ float edgeAlpha;
+ vec2 duvdx = dFdx(vQuadEdge_Stage0.xy);
+ vec2 duvdy = dFdy(vQuadEdge_Stage0.xy);
+ if (vQuadEdge_Stage0.z > 0.0 && vQuadEdge_Stage0.w > 0.0) {
+ edgeAlpha = min(min(vQuadEdge_Stage0.z, vQuadEdge_Stage0.w) + 0.5, 1.0);
+ } else {
+ vec2 gF = vec2((2.0 * vQuadEdge_Stage0.x) * duvdx.x - duvdx.y, (2.0 * vQuadEdge_Stage0.x) * duvdy.x - duvdy.y);
+ edgeAlpha = vQuadEdge_Stage0.x * vQuadEdge_Stage0.x - vQuadEdge_Stage0.y;
+ edgeAlpha = clamp(0.5 - edgeAlpha / length(gF), 0.0, 1.0);
+ }
+ }
+ {
+ sk_FragColor = vec4(0.0);
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 inPosition;
+in vec4 inColor;
+in vec4 inQuadEdge;
+noperspective out vec4 vQuadEdge_Stage0;
+noperspective out vec4 vinColor_Stage0;
+void main() {
+ vQuadEdge_Stage0 = inQuadEdge;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = inPosition;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/934-1.shader_test b/shaders/skia/934-1.shader_test
new file mode 100644
index 0000000..17c87b4
--- /dev/null
+++ b/shaders/skia/934-1.shader_test
@@ -0,0 +1,127 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 ufocalParams_Stage2_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage2_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage2_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage2_c0_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage2_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_1_Stage0;
+ float t = -1.0;
+ float v = 1.0;
+ {
+ {
+ float fx = ufocalParams_Stage2_c0_c0_c0_c0.y;
+ float x_t = -1.0;
+ {
+ x_t = dot(p, p) / p.x;
+ }
+ {
+ if (x_t <= 0.0) {
+ v = -1.0;
+ }
+ }
+ {
+ {
+ t = x_t + fx;
+ }
+ }
+ }
+ }
+ _output = vec4(t, v, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage2_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage2_c0_c0_c1_c0;
+ bias = ubias0_1_Stage2_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage2_c0_c0_c1_c0;
+ bias = ubias2_3_Stage2_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage2_c0_c0_c1_c0;
+ bias = ubias4_5_Stage2_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage2_c0_c0_c1_c0;
+ bias = ubias6_7_Stage2_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage2_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else {
+ {
+ t.x = fract(t.x);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage2_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_dst_in(output_Stage1, TiledGradientEffect_Stage2_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/934.shader_test b/shaders/skia/934.shader_test
new file mode 100644
index 0000000..c07e2af
--- /dev/null
+++ b/shaders/skia/934.shader_test
@@ -0,0 +1,152 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_KHR_blend_equation_advanced : require
+out vec4 sk_FragColor;
+layout (blend_support_all_equations) out ;
+uniform vec4 uColor_Stage0;
+uniform vec4 uinnerRect_Stage1_c0_c0;
+uniform vec4 uinvRadiiLTRB_Stage1_c0_c0;
+uniform vec4 ucircleData_Stage1_c1_c0_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+vec4 EllipticalRRect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 dxy0 = uinnerRect_Stage1_c0_c0.xy - gl_FragCoord.xy;
+ vec2 dxy1 = gl_FragCoord.xy - uinnerRect_Stage1_c0_c0.zw;
+ vec2 dxy = max(max(dxy0, dxy1), 0.0);
+ vec2 Z = max(max(dxy0 * uinvRadiiLTRB_Stage1_c0_c0.xy, dxy1 * uinvRadiiLTRB_Stage1_c0_c0.zw), 0.0);
+ float implicit = dot(Z, dxy) - 1.0;
+ float grad_dot = 4.0 * dot(Z, Z);
+ grad_dot = max(grad_dot, 9.9999997473787516e-05);
+ float approx_dist = implicit * inversesqrt(grad_dot);
+ float alpha = clamp(0.5 - approx_dist, 0.0, 1.0);
+ _output = _input * alpha;
+ return _output;
+}
+vec4 CircleBlurFragmentProcessor_Stage1_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 vec = vec2((gl_FragCoord.x - ucircleData_Stage1_c1_c0_c0_c0.x) * ucircleData_Stage1_c1_c0_c0_c0.w, (gl_FragCoord.y - ucircleData_Stage1_c1_c0_c0_c0.y) * ucircleData_Stage1_c1_c0_c0_c0.w);
+ float dist = length(vec) + (0.5 - ucircleData_Stage1_c1_c0_c0_c0.z) * ucircleData_Stage1_c1_c0_c0_c0.w;
+ _output = _input * texture(uTextureSampler_0_Stage1, vec2(dist, 0.5)).w;
+ return _output;
+}
+vec4 Big_Ole_Key_Stage1_c1_c0_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = _input;
+ return _output;
+}
+vec4 ColorTableEffect_Stage1_c1_c0_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float nonZeroAlpha = max(_input.w, 9.9999997473787516e-05);
+ vec4 coord = vec4(_input.xyz / nonZeroAlpha, nonZeroAlpha);
+ coord = coord * 0.9960939884185791 + vec4(0.0019529999699443579, 0.0019529999699443579, 0.0019529999699443579, 0.0019529999699443579);
+ _output.w = texture(uTextureSampler_1_Stage1, vec2(coord.w, 0.125)).w;
+ _output.x = texture(uTextureSampler_1_Stage1, vec2(coord.x, 0.375)).w;
+ _output.y = texture(uTextureSampler_1_Stage1, vec2(coord.y, 0.625)).w;
+ _output.z = texture(uTextureSampler_1_Stage1, vec2(coord.z, 0.875)).w;
+ _output.xyz *= _output.w;
+ return _output;
+}
+float _blend_color_saturation(vec3 color) {
+ return max(max(color.x, color.y), color.z) - min(min(color.x, color.y), color.z);
+}
+vec3 _blend_set_color_saturation_helper(vec3 minMidMax, float sat) {
+ if (minMidMax.x < minMidMax.z) {
+ return vec3(0.0, (sat * (minMidMax.y - minMidMax.x)) / (minMidMax.z - minMidMax.x), sat);
+ }
+ return vec3(0.0);
+}
+vec3 _blend_set_color_saturation(vec3 hueLumColor, vec3 satColor) {
+ float sat = _blend_color_saturation(satColor);
+ if (hueLumColor.x <= hueLumColor.y) {
+ if (hueLumColor.y <= hueLumColor.z) {
+ hueLumColor.xyz = _blend_set_color_saturation_helper(hueLumColor, sat);
+ } else if (hueLumColor.x <= hueLumColor.z) {
+ hueLumColor.xzy = _blend_set_color_saturation_helper(hueLumColor.xzy, sat);
+ } else {
+ hueLumColor.zxy = _blend_set_color_saturation_helper(hueLumColor.zxy, sat);
+ }
+ } else if (hueLumColor.x <= hueLumColor.z) {
+ hueLumColor.yxz = _blend_set_color_saturation_helper(hueLumColor.yxz, sat);
+ } else if (hueLumColor.y <= hueLumColor.z) {
+ hueLumColor.yzx = _blend_set_color_saturation_helper(hueLumColor.yzx, sat);
+ } else {
+ hueLumColor.zyx = _blend_set_color_saturation_helper(hueLumColor.zyx, sat);
+ }
+ return hueLumColor;
+}
+float _blend_color_luminance(vec3 color) {
+ return dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), color);
+}
+vec3 _blend_set_color_luminance(vec3 hueSatColor, float alpha, vec3 lumColor) {
+ float lum = _blend_color_luminance(lumColor);
+ vec3 result = (lum - _blend_color_luminance(hueSatColor)) + hueSatColor;
+ float minComp = min(min(result.x, result.y), result.z);
+ float maxComp = max(max(result.x, result.y), result.z);
+ if (minComp < 0.0 && lum != minComp) {
+ result = lum + ((result - lum) * lum) / (lum - minComp);
+ }
+ if (maxComp > alpha && maxComp != lum) {
+ return lum + ((result - lum) * (alpha - lum)) / (maxComp - lum);
+ }
+ return result;
+}
+vec4 blend_saturation(vec4 src, vec4 dst) {
+ float alpha = dst.w * src.w;
+ vec3 sda = src.xyz * dst.w;
+ vec3 dsa = dst.xyz * src.w;
+ return vec4((((_blend_set_color_luminance(_blend_set_color_saturation(dsa, sda), alpha, dsa) + dst.xyz) - dsa) + src.xyz) - sda, (src.w + dst.w) - alpha);
+}
+vec4 ComposeTwo_Stage1_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_saturation(Big_Ole_Key_Stage1_c1_c0_c1_c0_c0_c0(inputColor), ColorTableEffect_Stage1_c1_c0_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 blend_src_atop(vec4 src, vec4 dst) {
+ return dst.w * src + (1.0 - src.w) * dst;
+}
+vec4 ComposeTwo_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_src_atop(CircleBlurFragmentProcessor_Stage1_c1_c0_c0_c0(inputColor), ComposeTwo_Stage1_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 blend_plus(vec4 src, vec4 dst) {
+ return min(src + dst, 1.0);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = uColor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_plus(EllipticalRRect_Stage1_c0_c0(inputColor), ComposeTwo_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 inPosition;
+in vec2 inLocalCoord;
+void main() {
+ vec2 pos2 = (uViewM_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/937-1.shader_test b/shaders/skia/937-1.shader_test
new file mode 100644
index 0000000..4493894
--- /dev/null
+++ b/shaders/skia/937-1.shader_test
@@ -0,0 +1,107 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 ufocalParams_Stage2_c0_c0_c0_c0;
+uniform vec4 uscale01_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias01_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale23_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias23_Stage2_c0_c0_c1_c0;
+uniform float uthreshold_Stage2_c0_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage2_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_1_Stage0;
+ float t = -1.0;
+ {
+ {
+ float invR1 = ufocalParams_Stage2_c0_c0_c0_c0.x;
+ float x_t = -1.0;
+ {
+ x_t = length(p) - p.x * invR1;
+ }
+ {
+ {
+ t = x_t;
+ }
+ }
+ {
+ t = 1.0 - t;
+ }
+ }
+ }
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 DualIntervalGradientColorizer_Stage2_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthreshold_Stage2_c0_c0_c1_c0) {
+ scale = uscale01_Stage2_c0_c0_c1_c0;
+ bias = ubias01_Stage2_c0_c0_c1_c0;
+ } else {
+ scale = uscale23_Stage2_c0_c0_c1_c0;
+ bias = ubias23_Stage2_c0_c0_c1_c0;
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage2_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else {
+ {
+ t.x = fract(t.x);
+ }
+ _output = DualIntervalGradientColorizer_Stage2_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_dst_in(output_Stage1, TiledGradientEffect_Stage2_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/937.shader_test b/shaders/skia/937.shader_test
new file mode 100644
index 0000000..ef8a1df
--- /dev/null
+++ b/shaders/skia/937.shader_test
@@ -0,0 +1,26 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+uniform vec4 uColor_Stage0;
+void main() {
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 inPosition;
+void main() {
+ vec3 pos3 = uViewM_Stage0 * vec3(inPosition, 1.0);
+ {
+ vec2 _posTmp = vec2(pos3.x / pos3.z, pos3.y / pos3.z);
+ _posTmp = floor(_posTmp) + vec2(0.5, 0.5);
+ gl_Position = vec4(_posTmp, 0.0, 1.0);
+ }
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/94-1.shader_test b/shaders/skia/94-1.shader_test
new file mode 100644
index 0000000..c9ee221
--- /dev/null
+++ b/shaders/skia/94-1.shader_test
@@ -0,0 +1,68 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uborder_Stage2_c0_c0;
+uniform vec4 usubset_Stage2_c0_c0;
+uniform vec4 unorm_Stage2_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 TextureEffect_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 inCoord = vTransformedCoords_1_Stage0;
+ inCoord *= unorm_Stage2_c0_c0.xy;
+ vec2 subsetCoord;
+ subsetCoord.x = inCoord.x;
+ subsetCoord.y = inCoord.y;
+ vec2 clampedCoord;
+ clampedCoord.x = subsetCoord.x;
+ clampedCoord.y = subsetCoord.y;
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord * unorm_Stage2_c0_c0.zw);
+ if (inCoord.x < usubset_Stage2_c0_c0.x || inCoord.x > usubset_Stage2_c0_c0.z) {
+ textureColor = uborder_Stage2_c0_c0;
+ }
+ if (inCoord.y < usubset_Stage2_c0_c0.y || inCoord.y > usubset_Stage2_c0_c0.w) {
+ textureColor = uborder_Stage2_c0_c0;
+ }
+ _output = _input * textureColor;
+ return _output;
+}
+vec4 blend_screen(vec4 src, vec4 dst) {
+ return src + (1.0 - src) * dst;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_screen(output_Stage1, TextureEffect_Stage2_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/94-10.shader_test b/shaders/skia/94-10.shader_test
new file mode 100644
index 0000000..db9d555
--- /dev/null
+++ b/shaders/skia/94-10.shader_test
@@ -0,0 +1,44 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform float uPixelSize_Stage1;
+uniform vec2 uRange_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = vec4(1.0, 1.0, 1.0, 1.0);
+ vec2 coord = vTransformedCoords_0_Stage0;
+ coord.x -= 16.0 * uPixelSize_Stage1;
+ float highBound = min(uRange_Stage1.y, coord.x + 32.0 * uPixelSize_Stage1);
+ coord.x = max(uRange_Stage1.x, coord.x);
+ for (int i = 0;i < 33; i++) {
+ output_Stage1 = min(output_Stage1, texture(uTextureSampler_0_Stage1, coord));
+ coord.x += uPixelSize_Stage1;
+ coord.x = min(highBound, coord.x);
+ }
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/94-11.shader_test b/shaders/skia/94-11.shader_test
new file mode 100644
index 0000000..2e28261
--- /dev/null
+++ b/shaders/skia/94-11.shader_test
@@ -0,0 +1,140 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform float uSurfaceScale_Stage1;
+uniform vec3 uLightColor_Stage1;
+uniform float uKS_Stage1;
+uniform float uShininess_Stage1;
+uniform vec3 uLightLocation_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 light_Stage1(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ vec3 halfDir = normalize(surfaceToLight + vec3(0.0, 0.0, 1.0));
+ float colorScale = uKS_Stage1 * pow(dot(normal, halfDir), uShininess_Stage1);
+ vec3 color = lightColor * clamp(colorScale, 0.0, 1.0);
+ return vec4(color, max(max(color.x, color.y), color.z));
+}
+float sobel_Stage1(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage1(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage1(float m[9], float surfaceScale) {
+ return pointToNormal_Stage1(sobel_Stage1(0.0, 0.0, m[3], m[4], m[6], m[7], 0.66666698455810547), sobel_Stage1(m[3], m[6], m[4], m[7], 0.0, 0.0, 0.66666698455810547), surfaceScale);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ vec2 coord = vTransformedCoords_0_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp0 = textureColor;
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp1 = textureColor;
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp2 = textureColor;
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp3 = textureColor;
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp4 = textureColor;
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp5 = textureColor;
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp6 = textureColor;
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp7 = textureColor;
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp8 = textureColor;
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = normalize(uLightLocation_Stage1 - vec3(gl_FragCoord.xy, uSurfaceScale_Stage1 * m[4]));
+ output_Stage1 = light_Stage1(normal_Stage1(m, uSurfaceScale_Stage1), surfaceToLight, uLightColor_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/94-12.shader_test b/shaders/skia/94-12.shader_test
new file mode 100644
index 0000000..8901201
--- /dev/null
+++ b/shaders/skia/94-12.shader_test
@@ -0,0 +1,98 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+uniform vec2 uDstTextureUpperLeft_Stage2;
+uniform vec2 uDstTextureCoordScale_Stage2;
+uniform sampler2D uTextureSampler_0_Stage0;
+uniform sampler2D uDstTextureSampler_Stage2;
+noperspective in vec2 vTextureCoords_Stage0;
+flat in int vTexIndex_Stage0;
+noperspective in vec4 vinColor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ t.x = fract(t.x);
+ }
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 blend_src(vec4 src, vec4 dst) {
+ return src;
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ vec4 texColor;
+ {
+ texColor = texture(uTextureSampler_0_Stage0, vTextureCoords_Stage0);
+ }
+ outputCoverage_Stage0 = texColor;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TiledGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ if (all(lessThanEqual(outputCoverage_Stage0.xyz, vec3(0.0)))) {
+ discard;
+ }
+ vec2 _dstTexCoord = (gl_FragCoord.xy - uDstTextureUpperLeft_Stage2) * uDstTextureCoordScale_Stage2;
+ _dstTexCoord.y = 1.0 - _dstTexCoord.y;
+ vec4 _dstColor = texture(uDstTextureSampler_Stage2, _dstTexCoord);
+ sk_FragColor = blend_src(output_Stage1, _dstColor);
+ float lerpRed = mix(_dstColor.w, sk_FragColor.w, outputCoverage_Stage0.x);
+ float lerpBlue = mix(_dstColor.w, sk_FragColor.w, outputCoverage_Stage0.y);
+ float lerpGreen = mix(_dstColor.w, sk_FragColor.w, outputCoverage_Stage0.z);
+ sk_FragColor = outputCoverage_Stage0 * sk_FragColor + (vec4(1.0) - outputCoverage_Stage0) * _dstColor;
+ sk_FragColor.w = max(max(lerpRed, lerpBlue), lerpGreen);
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform vec2 uAtlasSizeInv_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in uvec2 inTextureCoords;
+noperspective out vec2 vTextureCoords_Stage0;
+flat out int vTexIndex_Stage0;
+noperspective out vec4 vinColor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ ivec2 signedCoords = ivec2(int(inTextureCoords.x), int(inTextureCoords.y));
+ vec2 unormTexCoords = vec2(float(signedCoords.x / 2), float(signedCoords.y / 2));
+ vTextureCoords_Stage0 = unormTexCoords * uAtlasSizeInv_Stage0;
+ vTexIndex_Stage0 = 0;
+ vinColor_Stage0 = inColor;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(inPosition.x, inPosition.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/94-2.shader_test b/shaders/skia/94-2.shader_test
new file mode 100644
index 0000000..62db4ab
--- /dev/null
+++ b/shaders/skia/94-2.shader_test
@@ -0,0 +1,112 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform float uSrcTF_Stage1_c0_c0[7];
+uniform mat3 uColorXform_Stage1_c0_c0;
+uniform float uDstTF_Stage1_c0_c0[7];
+uniform mat3 ucolorSpaceMatrix_Stage1_c0_c0_c0_c0;
+uniform vec3 ucolorSpaceTranslate_Stage1_c0_c0_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_1_Stage1, vTransformedCoords_1_Stage0) * _input;
+ return _output;
+}
+vec4 YUVtoRGBEffect_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 planes[2];
+ planes[0] = TextureEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ planes[1] = TextureEffect_Stage1_c0_c0_c0_c0_c1_c0(vec4(1.0));
+ vec4 color = vec4(planes[0].x, planes[1].x, planes[1].y, 1.0);
+ color.xyz = clamp(color.xyz * ucolorSpaceMatrix_Stage1_c0_c0_c0_c0 + ucolorSpaceTranslate_Stage1_c0_c0_c0_c0, 0.0, 1.0);
+ _output = color;
+ return _output;
+}
+float src_tf_Stage1_c0_c0(float x) {
+ float G = uSrcTF_Stage1_c0_c0[0];
+ float A = uSrcTF_Stage1_c0_c0[1];
+ float B = uSrcTF_Stage1_c0_c0[2];
+ float C = uSrcTF_Stage1_c0_c0[3];
+ float D = uSrcTF_Stage1_c0_c0[4];
+ float E = uSrcTF_Stage1_c0_c0[5];
+ float F = uSrcTF_Stage1_c0_c0[6];
+ float s = sign(x);
+ x = abs(x);
+ x = x < D ? C * x + F : pow(A * x + B, G) + E;
+ return s * x;
+}
+float dst_tf_Stage1_c0_c0(float x) {
+ float G = uDstTF_Stage1_c0_c0[0];
+ float A = uDstTF_Stage1_c0_c0[1];
+ float B = uDstTF_Stage1_c0_c0[2];
+ float C = uDstTF_Stage1_c0_c0[3];
+ float D = uDstTF_Stage1_c0_c0[4];
+ float E = uDstTF_Stage1_c0_c0[5];
+ float F = uDstTF_Stage1_c0_c0[6];
+ float s = sign(x);
+ x = abs(x);
+ x = x < D ? C * x + F : pow(A * x + B, G) + E;
+ return s * x;
+}
+vec4 gamut_xform_Stage1_c0_c0(vec4 color) {
+ color.xyz = uColorXform_Stage1_c0_c0 * color.xyz;
+ return color;
+}
+vec4 color_xform_Stage1_c0_c0(vec4 color) {
+ color.x = src_tf_Stage1_c0_c0(color.x);
+ color.y = src_tf_Stage1_c0_c0(color.y);
+ color.z = src_tf_Stage1_c0_c0(color.z);
+ color = gamut_xform_Stage1_c0_c0(color);
+ color.x = dst_tf_Stage1_c0_c0(color.x);
+ color.y = dst_tf_Stage1_c0_c0(color.y);
+ color.z = dst_tf_Stage1_c0_c0(color.z);
+ return color;
+}
+vec4 ColorSpaceXform_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = color_xform_Stage1_c0_c0(YUVtoRGBEffect_Stage1_c0_c0_c0_c0(vec4(1.0))) * _input;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ColorSpaceXform_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/94-21.shader_test b/shaders/skia/94-21.shader_test
new file mode 100644
index 0000000..d9a9c48
--- /dev/null
+++ b/shaders/skia/94-21.shader_test
@@ -0,0 +1,129 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 uleftBorderColor_Stage1_c1_c0_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c1_c0_c0_c0;
+uniform vec4 ustart_Stage1_c1_c0_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c1_c0_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = ClampedGradientEffect_Stage1_c0_c0_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ return _output;
+}
+vec4 LinearGradientLayout_Stage1_c1_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_1_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c1_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c1_c0_c0_c0_c1_c0 + t * uend_Stage1_c1_c0_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c1_c0_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c1_c0_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c1_c0_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c1_c0_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = ClampedGradientEffect_Stage1_c1_c0_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ return _output;
+}
+float _blend_overlay_component(float sc, float sa, float dc, float da) {
+ if (2.0 * dc <= da) {
+ return (2.0 * sc) * dc;
+ }
+ return sa * da - (2.0 * (da - dc)) * (sa - sc);
+}
+vec4 blend_overlay(vec4 src, vec4 dst) {
+ vec4 result = vec4(_blend_overlay_component(src.x, src.w, dst.x, dst.w), _blend_overlay_component(src.y, src.w, dst.y, dst.w), _blend_overlay_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+ result.xyz += dst.xyz * (1.0 - src.w) + src.xyz * (1.0 - dst.w);
+ return result;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_overlay(OverrideInputFragmentProcessor_Stage1_c0_c0(inputColor), OverrideInputFragmentProcessor_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/94-23.shader_test b/shaders/skia/94-23.shader_test
new file mode 100644
index 0000000..a6bb075
--- /dev/null
+++ b/shaders/skia/94-23.shader_test
@@ -0,0 +1,139 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform vec2 uBounds_Stage1;
+uniform vec4 uKernel_Stage1[7];
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0 - 12.0 * uImageIncrement_Stage1;
+ vec2 coordSampled = vec2(0.0, 0.0);
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[4].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[4].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[4].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[4].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[5].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[5].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[5].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[5].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ coordSampled.x = clamp(coord.x, uBounds_Stage1.x, uBounds_Stage1.y);
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[6].x;
+ coord += uImageIncrement_Stage1;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ sk_FragColor = sk_FragColor.wwww;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/94-24.shader_test b/shaders/skia/94-24.shader_test
new file mode 100644
index 0000000..5a4e0f5
--- /dev/null
+++ b/shaders/skia/94-24.shader_test
@@ -0,0 +1,206 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage2;
+uniform float uSurfaceScale_Stage2;
+uniform vec3 uLightColor_Stage2;
+uniform float uKS_Stage2;
+uniform float uShininess_Stage2;
+uniform vec4 uTexDom_Stage2;
+uniform vec3 uDecalParams_Stage2;
+uniform vec3 uLightLocation_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 light_Stage2(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ vec3 halfDir = normalize(surfaceToLight + vec3(0.0, 0.0, 1.0));
+ float colorScale = uKS_Stage2 * pow(dot(normal, halfDir), uShininess_Stage2);
+ vec3 color = lightColor * clamp(colorScale, 0.0, 1.0);
+ return vec4(color, max(max(color.x, color.y), color.z));
+}
+float sobel_Stage2(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage2(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage2(float m[9], float surfaceScale) {
+ return pointToNormal_Stage2(sobel_Stage2(m[0], m[1], m[3], m[4], 0.0, 0.0, 0.66666698455810547), sobel_Stage2(m[0], m[3], m[1], m[4], 0.0, 0.0, 0.66666698455810547), surfaceScale);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ vec2 coord = vTransformedCoords_1_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp0 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp5 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp6 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp7 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp8 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = normalize(uLightLocation_Stage2 - vec3(gl_FragCoord.xy, uSurfaceScale_Stage2 * m[4]));
+ output_Stage2 = light_Stage2(normal_Stage2(m, uSurfaceScale_Stage2), surfaceToLight, uLightColor_Stage2);
+ output_Stage2 *= output_Stage1;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/94-25.shader_test b/shaders/skia/94-25.shader_test
new file mode 100644
index 0000000..0803136
--- /dev/null
+++ b/shaders/skia/94-25.shader_test
@@ -0,0 +1,76 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uCoordTransformMatrix_2_Stage0;
+uniform vec4 usubset_Stage2_c0_c0;
+uniform vec4 uclamp_Stage2_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 TextureEffect_Stage2_c0_c0(vec4 _input, vec2 _coords) {
+ _coords = _coords * uCoordTransformMatrix_2_Stage0.xz + uCoordTransformMatrix_2_Stage0.yw;
+ vec4 _output;
+ vec2 inCoord = _coords;
+ vec2 subsetCoord;
+ {
+ float w = usubset_Stage2_c0_c0.z - usubset_Stage2_c0_c0.x;
+ float w2 = 2.0 * w;
+ float m = mod(inCoord.x - usubset_Stage2_c0_c0.x, w2);
+ subsetCoord.x = mix(m, w2 - m, step(w, m)) + usubset_Stage2_c0_c0.x;
+ }
+ subsetCoord.y = mod(inCoord.y - usubset_Stage2_c0_c0.y, usubset_Stage2_c0_c0.w - usubset_Stage2_c0_c0.y) + usubset_Stage2_c0_c0.y;
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage2_c0_c0.x, uclamp_Stage2_c0_c0.z);
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage2_c0_c0.y, uclamp_Stage2_c0_c0.w);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ _output = _input * textureColor;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ float coord = vTransformedCoords_1_Stage0.x - 0.5;
+ float f = fract(coord);
+ coord += 0.5 - f;
+ float f2 = f * f;
+ vec4 w = mat4(0.055555555555555552, 0.88888888888888884, 0.055555555555555552, 0.0, -0.5, 0.0, 0.5, 0.0, 0.83333333333333337, -2.0, 1.5, -0.33333333333333331, -0.3888888888888889, 1.1666666666666667, -1.1666666666666667, 0.3888888888888889) * vec4(1.0, f, f2, f2 * f);
+ vec4 c[4];
+ c[0] = TextureEffect_Stage2_c0_c0(vec4(1.0), vec2(coord + -1.0, vTransformedCoords_1_Stage0.y));
+ c[1] = TextureEffect_Stage2_c0_c0(vec4(1.0), vec2(coord, vTransformedCoords_1_Stage0.y));
+ c[2] = TextureEffect_Stage2_c0_c0(vec4(1.0), vec2(coord + 1.0, vTransformedCoords_1_Stage0.y));
+ c[3] = TextureEffect_Stage2_c0_c0(vec4(1.0), vec2(coord + 2.0, vTransformedCoords_1_Stage0.y));
+ vec4 bicubicColor = ((c[0] * w.x + c[1] * w.y) + c[2] * w.z) + c[3] * w.w;
+ bicubicColor.xyz = max(vec3(0.0), min(bicubicColor.xyz, bicubicColor.www));
+ output_Stage2 = bicubicColor * output_Stage1;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/94-26.shader_test b/shaders/skia/94-26.shader_test
new file mode 100644
index 0000000..fcaa9e7
--- /dev/null
+++ b/shaders/skia/94-26.shader_test
@@ -0,0 +1,41 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform float uPixelSize_Stage1;
+uniform vec2 uRange_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0;
+ coord.x -= 3.0 * uPixelSize_Stage1;
+ for (int i = 0;i < 7; i++) {
+ output_Stage1 = max(output_Stage1, texture(uTextureSampler_0_Stage1, coord));
+ coord.x += uPixelSize_Stage1;
+ }
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/94-4.shader_test b/shaders/skia/94-4.shader_test
new file mode 100644
index 0000000..0b61a4e
--- /dev/null
+++ b/shaders/skia/94-4.shader_test
@@ -0,0 +1,162 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage2;
+uniform vec4 ucolor_Stage3_c1_c0;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.w) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ } else {
+ {
+ if (t < uthresholds9_13_Stage1_c0_c0_c0_c0_c0_c0_c1_c0.x) {
+ scale = uscale8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias8_9_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ } else {
+ scale = uscale10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ bias = ubias10_11_Stage1_c0_c0_c0_c0_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c0_c0_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+vec4 ComposeOne_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_dst_in(_input, TiledGradientEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0)));
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = ComposeOne_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 ConstColorProcessor_Stage3_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage3_c1_c0;
+ }
+ return _output;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 blend_darken(vec4 src, vec4 dst) {
+ vec4 result = blend_src_over(src, dst);
+ result.xyz = min(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
+ return result;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_src_over(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ {
+ output_Stage2 = output_Stage1 * ucolor_Stage2;
+ }
+ }
+ vec4 output_Stage3;
+ {
+ output_Stage3 = blend_darken(ConstColorProcessor_Stage3_c1_c0(vec4(1.0)), output_Stage2);
+ }
+ {
+ sk_FragColor = output_Stage3;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 inColor;
+in vec2 inLocalCoord;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/94-6.shader_test b/shaders/skia/94-6.shader_test
new file mode 100644
index 0000000..b255df4
--- /dev/null
+++ b/shaders/skia/94-6.shader_test
@@ -0,0 +1,36 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uColor_Stage0;
+noperspective in float vinCoverage_Stage0;
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ float alpha = 1.0;
+ alpha = vinCoverage_Stage0;
+ outputCoverage_Stage0 = vec4(alpha);
+ }
+ {
+ sk_FragColor = outputCoverage_Stage0;
+ sk_FragColor = sk_FragColor.wwww;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 inPosition;
+in float inCoverage;
+noperspective out float vinCoverage_Stage0;
+void main() {
+ vec2 pos2 = inPosition;
+ vinCoverage_Stage0 = inCoverage;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/94-8.shader_test b/shaders/skia/94-8.shader_test
new file mode 100644
index 0000000..57ba062
--- /dev/null
+++ b/shaders/skia/94-8.shader_test
@@ -0,0 +1,45 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uinnerRect_Stage1;
+uniform vec2 uradiusPlusHalf_Stage1;
+flat in vec4 vcolor_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ float dx0 = uinnerRect_Stage1.x - gl_FragCoord.x;
+ vec2 dxy1 = gl_FragCoord.xy - uinnerRect_Stage1.zw;
+ vec2 dxy = max(vec2(max(dx0, dxy1.x), dxy1.y), 0.0);
+ float topAlpha = clamp(gl_FragCoord.y - uinnerRect_Stage1.y, 0.0, 1.0);
+ float alpha = topAlpha * clamp(uradiusPlusHalf_Stage1.x - length(dxy), 0.0, 1.0);
+ alpha = 1.0 - alpha;
+ output_Stage1 = vec4(alpha);
+ }
+ {
+ sk_FragColor = outputColor_Stage0 * output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 position;
+in vec4 color;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/94-9.shader_test b/shaders/skia/94-9.shader_test
new file mode 100644
index 0000000..36ea563
--- /dev/null
+++ b/shaders/skia/94-9.shader_test
@@ -0,0 +1,89 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage2_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c1_c0;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_dst_in(outputColor_Stage0, ClampedGradientEffect_Stage1_c0_c0(vec4(1.0)));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_src_in(ConstColorProcessor_Stage2_c1_c0(vec4(1.0)), output_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/94.shader_test b/shaders/skia/94.shader_test
new file mode 100644
index 0000000..480ed00
--- /dev/null
+++ b/shaders/skia/94.shader_test
@@ -0,0 +1,95 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 usubset_Stage1_c0_c0_c0_c0;
+uniform vec4 uclamp_Stage1_c0_c0_c0_c0;
+uniform sampler2DRect uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0_c0_c0(vec4 _input, vec2 _coords) {
+ vec4 _output;
+ vec2 inCoord = _coords;
+ vec2 subsetCoord;
+ {
+ float w = usubset_Stage1_c0_c0_c0_c0.z - usubset_Stage1_c0_c0_c0_c0.x;
+ float w2 = 2.0 * w;
+ float m = mod(inCoord.x - usubset_Stage1_c0_c0_c0_c0.x, w2);
+ subsetCoord.x = mix(m, w2 - m, step(w, m)) + usubset_Stage1_c0_c0_c0_c0.x;
+ }
+ {
+ float w = usubset_Stage1_c0_c0_c0_c0.w - usubset_Stage1_c0_c0_c0_c0.y;
+ float w2 = 2.0 * w;
+ float m = mod(inCoord.y - usubset_Stage1_c0_c0_c0_c0.y, w2);
+ subsetCoord.y = mix(m, w2 - m, step(w, m)) + usubset_Stage1_c0_c0_c0_c0.y;
+ }
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage1_c0_c0_c0_c0.x, uclamp_Stage1_c0_c0_c0_c0.z);
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage1_c0_c0_c0_c0.y, uclamp_Stage1_c0_c0_c0_c0.w);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ _output = _input * textureColor;
+ return _output;
+}
+vec4 Bicubic_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coord = vTransformedCoords_0_Stage0 - vec2(0.5);
+ vec2 f = fract(coord);
+ coord += 0.5 - f;
+ vec4 wx = mat4(0.055555555555555552, 0.88888888888888884, 0.055555555555555552, 0.0, -0.5, 0.0, 0.5, 0.0, 0.83333333333333337, -2.0, 1.5, -0.33333333333333331, -0.3888888888888889, 1.1666666666666667, -1.1666666666666667, 0.3888888888888889) * vec4(1.0, f.x, f.x * f.x, (f.x * f.x) * f.x);
+ vec4 wy = mat4(0.055555555555555552, 0.88888888888888884, 0.055555555555555552, 0.0, -0.5, 0.0, 0.5, 0.0, 0.83333333333333337, -2.0, 1.5, -0.33333333333333331, -0.3888888888888889, 1.1666666666666667, -1.1666666666666667, 0.3888888888888889) * vec4(1.0, f.y, f.y * f.y, (f.y * f.y) * f.y);
+ vec4 rowColors[4];
+ rowColors[0] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(-1.0, -1.0));
+ rowColors[1] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(0.0, -1.0));
+ rowColors[2] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(1.0, -1.0));
+ rowColors[3] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(2.0, -1.0));
+ vec4 s0 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ rowColors[0] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(-1.0, 0.0));
+ rowColors[1] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord);
+ rowColors[2] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(1.0, 0.0));
+ rowColors[3] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(2.0, 0.0));
+ vec4 s1 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ rowColors[0] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(-1.0, 1.0));
+ rowColors[1] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(0.0, 1.0));
+ rowColors[2] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(1.0, 1.0));
+ rowColors[3] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(2.0, 1.0));
+ vec4 s2 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ rowColors[0] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(-1.0, 2.0));
+ rowColors[1] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(0.0, 2.0));
+ rowColors[2] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(1.0, 2.0));
+ rowColors[3] = TextureEffect_Stage1_c0_c0_c0_c0(vec4(1.0), coord + vec2(2.0, 2.0));
+ vec4 s3 = ((wx.x * rowColors[0] + wx.y * rowColors[1]) + wx.z * rowColors[2]) + wx.w * rowColors[3];
+ vec4 bicubicColor = ((wy.x * s0 + wy.y * s1) + wy.z * s2) + wy.w * s3;
+ bicubicColor = clamp(bicubicColor, 0.0, 1.0);
+ _output = bicubicColor * _input;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = Bicubic_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/940-1.shader_test b/shaders/skia/940-1.shader_test
new file mode 100644
index 0000000..52c022d
--- /dev/null
+++ b/shaders/skia/940-1.shader_test
@@ -0,0 +1,106 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 ufocalParams_Stage2_c0_c0_c0_c0;
+uniform vec4 uscale01_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias01_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale23_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias23_Stage2_c0_c0_c1_c0;
+uniform float uthreshold_Stage2_c0_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage2_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_1_Stage0;
+ float t = -1.0;
+ {
+ {
+ float invR1 = ufocalParams_Stage2_c0_c0_c0_c0.x;
+ float x_t = -1.0;
+ {
+ x_t = length(p) - p.x * invR1;
+ }
+ {
+ {
+ t = x_t;
+ }
+ }
+ }
+ }
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 DualIntervalGradientColorizer_Stage2_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthreshold_Stage2_c0_c0_c1_c0) {
+ scale = uscale01_Stage2_c0_c0_c1_c0;
+ bias = ubias01_Stage2_c0_c0_c1_c0;
+ } else {
+ scale = uscale23_Stage2_c0_c0_c1_c0;
+ bias = ubias23_Stage2_c0_c0_c1_c0;
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage2_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = DualIntervalGradientColorizer_Stage2_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_dst_in(output_Stage1, TiledGradientEffect_Stage2_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/940.shader_test b/shaders/skia/940.shader_test
new file mode 100644
index 0000000..d1c98ff
--- /dev/null
+++ b/shaders/skia/940.shader_test
@@ -0,0 +1,97 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uColor_Stage0;
+uniform float uCoverage_Stage0;
+uniform vec4 uinnerRect_Stage1;
+uniform vec4 uinvRadiiLTRB_Stage1;
+uniform vec4 uleftBorderColor_Stage3_c0_c0;
+uniform vec4 urightBorderColor_Stage3_c0_c0;
+uniform vec4 ustart_Stage3_c0_c0_c1_c0;
+uniform vec4 uend_Stage3_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 RadialGradientLayout_Stage3_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = length(vTransformedCoords_0_Stage0);
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage3_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage3_c0_c0_c1_c0 + t * uend_Stage3_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage3_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = RadialGradientLayout_Stage3_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage3_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage3_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage3_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = uColor_Stage0;
+ outputCoverage_Stage0 = vec4(uCoverage_Stage0);
+ }
+ vec4 output_Stage1;
+ {
+ vec2 dxy0 = uinnerRect_Stage1.xy - gl_FragCoord.xy;
+ vec2 dxy1 = gl_FragCoord.xy - uinnerRect_Stage1.zw;
+ vec2 dxy = max(max(dxy0, dxy1), 0.0);
+ vec2 Z = max(max(dxy0 * uinvRadiiLTRB_Stage1.xy, dxy1 * uinvRadiiLTRB_Stage1.zw), 0.0);
+ float implicit = dot(Z, dxy) - 1.0;
+ float grad_dot = 4.0 * dot(Z, Z);
+ grad_dot = max(grad_dot, 9.9999997473787516e-05);
+ float approx_dist = implicit * inversesqrt(grad_dot);
+ float alpha = clamp(0.5 - approx_dist, 0.0, 1.0);
+ output_Stage1 = outputColor_Stage0 * alpha;
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = output_Stage1;
+ }
+ vec4 output_Stage3;
+ {
+ output_Stage3 = blend_dst_in(outputCoverage_Stage0, ClampedGradientEffect_Stage3_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage2 * output_Stage3;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec2 pos2 = (uViewM_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/943-1.shader_test b/shaders/skia/943-1.shader_test
new file mode 100644
index 0000000..a720d5d
--- /dev/null
+++ b/shaders/skia/943-1.shader_test
@@ -0,0 +1,113 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage2_c0_c0;
+uniform vec4 urightBorderColor_Stage2_c0_c0;
+uniform vec2 ufocalParams_Stage2_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage2_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage2_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage2_c0_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage2_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_1_Stage0;
+ float t = -1.0;
+ {
+ {
+ float r0 = ufocalParams_Stage2_c0_c0_c0_c0.x;
+ {
+ t = length(p) - r0;
+ }
+ }
+ }
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage2_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage2_c0_c0_c1_c0;
+ bias = ubias0_1_Stage2_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage2_c0_c0_c1_c0;
+ bias = ubias2_3_Stage2_c0_c0_c1_c0;
+ }
+ } else {
+ {
+ scale = uscale4_5_Stage2_c0_c0_c1_c0;
+ bias = ubias4_5_Stage2_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage2_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage2_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage2_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage2_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_dst_in(output_Stage1, ClampedGradientEffect_Stage2_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/943.shader_test b/shaders/skia/943.shader_test
new file mode 100644
index 0000000..f2b3749
--- /dev/null
+++ b/shaders/skia/943.shader_test
@@ -0,0 +1,490 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1_c0_c0_c0_c0_c0_c0;
+uniform float uSurfaceScale_Stage1_c0_c0_c0_c0_c0_c0;
+uniform vec3 uLightColor_Stage1_c0_c0_c0_c0_c0_c0;
+uniform float uKS_Stage1_c0_c0_c0_c0_c0_c0;
+uniform float uShininess_Stage1_c0_c0_c0_c0_c0_c0;
+uniform vec4 uTexDom_Stage1_c0_c0_c0_c0_c0_c0;
+uniform vec3 uDecalParams_Stage1_c0_c0_c0_c0_c0_c0;
+uniform vec3 uLightLocation_Stage1_c0_c0_c0_c0_c0_c0;
+uniform vec2 uImageIncrement_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 uKernel_Stage1_c0_c0_c0_c0_c1_c0[4];
+uniform vec4 ucircleData_Stage1_c0_c0_c1_c0;
+uniform vec2 uImageIncrement_Stage1_c1_c0;
+uniform float uSurfaceScale_Stage1_c1_c0;
+uniform vec3 uLightColor_Stage1_c1_c0;
+uniform float uKS_Stage1_c1_c0;
+uniform float uShininess_Stage1_c1_c0;
+uniform vec4 uTexDom_Stage1_c1_c0;
+uniform vec3 uDecalParams_Stage1_c1_c0;
+uniform vec3 uLightDirection_Stage1_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+uniform sampler2D uTextureSampler_2_Stage1;
+uniform sampler2D uTextureSampler_3_Stage1;
+noperspective in vec4 vcolor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+vec4 light_Stage1_c0_c0_c0_c0_c0_c0(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ vec3 halfDir = normalize(surfaceToLight + vec3(0.0, 0.0, 1.0));
+ float colorScale = uKS_Stage1_c0_c0_c0_c0_c0_c0 * pow(dot(normal, halfDir), uShininess_Stage1_c0_c0_c0_c0_c0_c0);
+ vec3 color = lightColor * clamp(colorScale, 0.0, 1.0);
+ return vec4(color, max(max(color.x, color.y), color.z));
+}
+float sobel_Stage1_c0_c0_c0_c0_c0_c0(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage1_c0_c0_c0_c0_c0_c0(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage1_c0_c0_c0_c0_c0_c0(float m[9], float surfaceScale) {
+ return pointToNormal_Stage1_c0_c0_c0_c0_c0_c0(sobel_Stage1_c0_c0_c0_c0_c0_c0(0.0, 0.0, m[4], m[5], m[7], m[8], 0.66666698455810547), sobel_Stage1_c0_c0_c0_c0_c0_c0(0.0, 0.0, m[4], m[7], m[5], m[8], 0.66666698455810547), surfaceScale);
+}
+vec4 SpecularLighting_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coord = vTransformedCoords_0_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage1_c0_c0_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp0 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1_c0_c0_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1_c0_c0_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage1_c0_c0_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1_c0_c0_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp5 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage1_c0_c0_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp6 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage1_c0_c0_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp7 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage1_c0_c0_c0_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0_c0_c0.xy, uTexDom_Stage1_c0_c0_c0_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp8 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = normalize(uLightLocation_Stage1_c0_c0_c0_c0_c0_c0 - vec3(gl_FragCoord.xy, uSurfaceScale_Stage1_c0_c0_c0_c0_c0_c0 * m[4]));
+ _output = light_Stage1_c0_c0_c0_c0_c0_c0(normal_Stage1_c0_c0_c0_c0_c0_c0(m, uSurfaceScale_Stage1_c0_c0_c0_c0_c0_c0), surfaceToLight, uLightColor_Stage1_c0_c0_c0_c0_c0_c0);
+ _output *= _input;
+ return _output;
+}
+vec4 GaussianConvolution_Stage1_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_1_Stage0 - 6.0 * uImageIncrement_Stage1_c0_c0_c0_c0_c1_c0;
+ vec2 coordSampled = vec2(0.0, 0.0);
+ coordSampled = coord;
+ _output += texture(uTextureSampler_1_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c0_c0_c1_c0[0].x;
+ coord += uImageIncrement_Stage1_c0_c0_c0_c0_c1_c0;
+ coordSampled = coord;
+ _output += texture(uTextureSampler_1_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c0_c0_c1_c0[0].y;
+ coord += uImageIncrement_Stage1_c0_c0_c0_c0_c1_c0;
+ coordSampled = coord;
+ _output += texture(uTextureSampler_1_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c0_c0_c1_c0[0].z;
+ coord += uImageIncrement_Stage1_c0_c0_c0_c0_c1_c0;
+ coordSampled = coord;
+ _output += texture(uTextureSampler_1_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c0_c0_c1_c0[0].w;
+ coord += uImageIncrement_Stage1_c0_c0_c0_c0_c1_c0;
+ coordSampled = coord;
+ _output += texture(uTextureSampler_1_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c0_c0_c1_c0[1].x;
+ coord += uImageIncrement_Stage1_c0_c0_c0_c0_c1_c0;
+ coordSampled = coord;
+ _output += texture(uTextureSampler_1_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c0_c0_c1_c0[1].y;
+ coord += uImageIncrement_Stage1_c0_c0_c0_c0_c1_c0;
+ coordSampled = coord;
+ _output += texture(uTextureSampler_1_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c0_c0_c1_c0[1].z;
+ coord += uImageIncrement_Stage1_c0_c0_c0_c0_c1_c0;
+ coordSampled = coord;
+ _output += texture(uTextureSampler_1_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c0_c0_c1_c0[1].w;
+ coord += uImageIncrement_Stage1_c0_c0_c0_c0_c1_c0;
+ coordSampled = coord;
+ _output += texture(uTextureSampler_1_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c0_c0_c1_c0[2].x;
+ coord += uImageIncrement_Stage1_c0_c0_c0_c0_c1_c0;
+ coordSampled = coord;
+ _output += texture(uTextureSampler_1_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c0_c0_c1_c0[2].y;
+ coord += uImageIncrement_Stage1_c0_c0_c0_c0_c1_c0;
+ coordSampled = coord;
+ _output += texture(uTextureSampler_1_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c0_c0_c1_c0[2].z;
+ coord += uImageIncrement_Stage1_c0_c0_c0_c0_c1_c0;
+ coordSampled = coord;
+ _output += texture(uTextureSampler_1_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c0_c0_c1_c0[2].w;
+ coord += uImageIncrement_Stage1_c0_c0_c0_c0_c1_c0;
+ coordSampled = coord;
+ _output += texture(uTextureSampler_1_Stage1, coordSampled) * uKernel_Stage1_c0_c0_c0_c0_c1_c0[3].x;
+ coord += uImageIncrement_Stage1_c0_c0_c0_c0_c1_c0;
+ _output *= _input;
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+vec4 ComposeTwo_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_dst_in(SpecularLighting_Stage1_c0_c0_c0_c0_c0_c0(inputColor), GaussianConvolution_Stage1_c0_c0_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 CircleBlurFragmentProcessor_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 vec = vec2((gl_FragCoord.x - ucircleData_Stage1_c0_c0_c1_c0.x) * ucircleData_Stage1_c0_c0_c1_c0.w, (gl_FragCoord.y - ucircleData_Stage1_c0_c0_c1_c0.y) * ucircleData_Stage1_c0_c0_c1_c0.w);
+ float dist = length(vec) + (0.5 - ucircleData_Stage1_c0_c0_c1_c0.z) * ucircleData_Stage1_c0_c0_c1_c0.w;
+ _output = _input * texture(uTextureSampler_2_Stage1, vec2(dist, 0.5)).w;
+ return _output;
+}
+vec4 blend_plus(vec4 src, vec4 dst) {
+ return min(src + dst, 1.0);
+}
+vec4 ComposeTwo_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_plus(ComposeTwo_Stage1_c0_c0_c0_c0(inputColor), CircleBlurFragmentProcessor_Stage1_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 light_Stage1_c1_c0(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ vec3 halfDir = normalize(surfaceToLight + vec3(0.0, 0.0, 1.0));
+ float colorScale = uKS_Stage1_c1_c0 * pow(dot(normal, halfDir), uShininess_Stage1_c1_c0);
+ vec3 color = lightColor * clamp(colorScale, 0.0, 1.0);
+ return vec4(color, max(max(color.x, color.y), color.z));
+}
+float sobel_Stage1_c1_c0(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage1_c1_c0(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage1_c1_c0(float m[9], float surfaceScale) {
+ return pointToNormal_Stage1_c1_c0(sobel_Stage1_c1_c0(m[0], m[1], m[3], m[4], 0.0, 0.0, 0.66666698455810547), sobel_Stage1_c1_c0(m[0], m[3], m[1], m[4], 0.0, 0.0, 0.66666698455810547), surfaceScale);
+}
+vec4 SpecularLighting_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coord = vTransformedCoords_2_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage1_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0.xy, uTexDom_Stage1_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_3_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp0 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0.xy, uTexDom_Stage1_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_3_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0.xy, uTexDom_Stage1_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_3_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage1_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0.xy, uTexDom_Stage1_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_3_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0.xy, uTexDom_Stage1_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_3_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0.xy, uTexDom_Stage1_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_3_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp5 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage1_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0.xy, uTexDom_Stage1_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_3_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp6 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage1_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0.xy, uTexDom_Stage1_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_3_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp7 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage1_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0.xy, uTexDom_Stage1_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_3_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp8 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = uLightDirection_Stage1_c1_c0;
+ _output = light_Stage1_c1_c0(normal_Stage1_c1_c0(m, uSurfaceScale_Stage1_c1_c0), surfaceToLight, uLightColor_Stage1_c1_c0);
+ _output *= _input;
+ return _output;
+}
+float _guarded_divide(float n, float d) {
+ return n / d;
+}
+float _color_dodge_component(float sc, float sa, float dc, float da) {
+ if (dc == 0.0) {
+ return sc * (1.0 - da);
+ } else {
+ float d = sa - sc;
+ if (d == 0.0) {
+ return (sa * da + sc * (1.0 - da)) + dc * (1.0 - sa);
+ }
+ d = min(da, _guarded_divide(dc * sa, d));
+ return (d * sa + sc * (1.0 - da)) + dc * (1.0 - sa);
+ }
+}
+vec4 blend_color_dodge(vec4 src, vec4 dst) {
+ return vec4(_color_dodge_component(src.x, src.w, dst.x, dst.w), _color_dodge_component(src.y, src.w, dst.y, dst.w), _color_dodge_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_color_dodge(ComposeTwo_Stage1_c0_c0(inputColor), SpecularLighting_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+noperspective out vec4 vcolor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+void main() {
+ vec4 color = inColor;
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/946-1.shader_test b/shaders/skia/946-1.shader_test
new file mode 100644
index 0000000..6c7b08b
--- /dev/null
+++ b/shaders/skia/946-1.shader_test
@@ -0,0 +1,112 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 ufocalParams_Stage2_c0_c0_c0_c0;
+uniform vec4 uscale01_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias01_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale23_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias23_Stage2_c0_c0_c1_c0;
+uniform float uthreshold_Stage2_c0_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage2_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_1_Stage0;
+ float t = -1.0;
+ float v = 1.0;
+ {
+ {
+ float fx = ufocalParams_Stage2_c0_c0_c0_c0.y;
+ float x_t = -1.0;
+ {
+ x_t = dot(p, p) / p.x;
+ }
+ {
+ if (x_t <= 0.0) {
+ v = -1.0;
+ }
+ }
+ {
+ {
+ t = x_t + fx;
+ }
+ }
+ }
+ }
+ _output = vec4(t, v, 0.0, 0.0);
+ return _output;
+}
+vec4 DualIntervalGradientColorizer_Stage2_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthreshold_Stage2_c0_c0_c1_c0) {
+ scale = uscale01_Stage2_c0_c0_c1_c0;
+ bias = ubias01_Stage2_c0_c0_c1_c0;
+ } else {
+ scale = uscale23_Stage2_c0_c0_c1_c0;
+ bias = ubias23_Stage2_c0_c0_c1_c0;
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage2_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = DualIntervalGradientColorizer_Stage2_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_dst_in(output_Stage1, TiledGradientEffect_Stage2_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/946.shader_test b/shaders/skia/946.shader_test
new file mode 100644
index 0000000..7c6e9ac
--- /dev/null
+++ b/shaders/skia/946.shader_test
@@ -0,0 +1,33 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_KHR_blend_equation_advanced : require
+out vec4 sk_FragColor;
+layout (blend_support_all_equations) out ;
+uniform vec4 uColor_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = uColor_Stage0;
+ }
+ {
+ sk_FragColor = outputColor_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 inPosition;
+in vec2 inLocalCoord;
+void main() {
+ vec2 pos2 = (uViewM_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/949-1.shader_test b/shaders/skia/949-1.shader_test
new file mode 100644
index 0000000..ed41c27
--- /dev/null
+++ b/shaders/skia/949-1.shader_test
@@ -0,0 +1,124 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage2_c0_c0;
+uniform vec4 urightBorderColor_Stage2_c0_c0;
+uniform vec2 ufocalParams_Stage2_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage2_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage2_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage2_c0_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage2_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_1_Stage0;
+ float t = -1.0;
+ float v = 1.0;
+ {
+ {
+ float x_t = -1.0;
+ {
+ x_t = dot(p, p) / p.x;
+ }
+ {
+ if (x_t <= 0.0) {
+ v = -1.0;
+ }
+ }
+ {
+ {
+ t = x_t;
+ }
+ }
+ }
+ }
+ _output = vec4(t, v, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage2_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage2_c0_c0_c1_c0;
+ bias = ubias0_1_Stage2_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage2_c0_c0_c1_c0;
+ bias = ubias2_3_Stage2_c0_c0_c1_c0;
+ }
+ } else {
+ {
+ scale = uscale4_5_Stage2_c0_c0_c1_c0;
+ bias = ubias4_5_Stage2_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage2_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage2_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage2_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage2_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_dst_in(output_Stage1, ClampedGradientEffect_Stage2_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/949.shader_test b/shaders/skia/949.shader_test
new file mode 100644
index 0000000..b126445
--- /dev/null
+++ b/shaders/skia/949.shader_test
@@ -0,0 +1,428 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_KHR_blend_equation_advanced : require
+out vec4 sk_FragColor;
+layout (blend_support_all_equations) out ;
+uniform vec4 uColor_Stage0;
+uniform float uinnerThreshold_Stage1_c0_c0_c0_c0_c1_c0;
+uniform float uouterThreshold_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 uinnerRect_Stage1_c0_c0_c1_c0_c0_c0;
+uniform vec4 uinvRadiiLTRB_Stage1_c0_c0_c1_c0_c0_c0;
+uniform vec4 uellipse_Stage1_c0_c0_c1_c0_c1_c0;
+uniform vec2 uImageIncrement_Stage1_c1_c0;
+uniform vec4 uKernel_Stage1_c1_c0[5];
+uniform vec2 uKernelOffset_Stage1_c1_c0;
+uniform float uGain_Stage1_c1_c0;
+uniform float uBias_Stage1_c1_c0;
+uniform vec4 uTexDom_Stage1_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+in vec2 vTransformedCoords_0_Stage0;
+in vec2 vTransformedCoords_1_Stage0;
+vec4 ClampFragmentProcessor_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ float alpha = clamp(_input.w, 0.0, 1.0);
+ _output = vec4(clamp(_input.xyz, 0.0, alpha), alpha);
+ }
+ return _output;
+}
+vec4 AlphaThresholdFragmentProcessor_Stage1_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 color = _input;
+ vec4 mask_color = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ if (mask_color.w < 0.5) {
+ if (color.w > uouterThreshold_Stage1_c0_c0_c0_c0_c1_c0) {
+ float scale = uouterThreshold_Stage1_c0_c0_c0_c0_c1_c0 / color.w;
+ color.xyz *= scale;
+ color.w = uouterThreshold_Stage1_c0_c0_c0_c0_c1_c0;
+ }
+ } else if (color.w < uinnerThreshold_Stage1_c0_c0_c0_c0_c1_c0) {
+ float scale = uinnerThreshold_Stage1_c0_c0_c0_c0_c1_c0 / max(0.0010000000474974513, color.w);
+ color.xyz *= scale;
+ color.w = uinnerThreshold_Stage1_c0_c0_c0_c0_c1_c0;
+ }
+ _output = color;
+ return _output;
+}
+vec4 blend_plus(vec4 src, vec4 dst) {
+ return min(src + dst, 1.0);
+}
+vec4 ComposeTwo_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_plus(ClampFragmentProcessor_Stage1_c0_c0_c0_c0_c0_c0(inputColor), AlphaThresholdFragmentProcessor_Stage1_c0_c0_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 EllipticalRRect_Stage1_c0_c0_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 dxy0 = uinnerRect_Stage1_c0_c0_c1_c0_c0_c0.xy - gl_FragCoord.xy;
+ vec2 dxy1 = gl_FragCoord.xy - uinnerRect_Stage1_c0_c0_c1_c0_c0_c0.zw;
+ vec2 dxy = max(max(dxy0, dxy1), 0.0);
+ vec2 Z = max(max(dxy0 * uinvRadiiLTRB_Stage1_c0_c0_c1_c0_c0_c0.xy, dxy1 * uinvRadiiLTRB_Stage1_c0_c0_c1_c0_c0_c0.zw), 0.0);
+ float implicit = dot(Z, dxy) - 1.0;
+ float grad_dot = 4.0 * dot(Z, Z);
+ grad_dot = max(grad_dot, 9.9999997473787516e-05);
+ float approx_dist = implicit * inversesqrt(grad_dot);
+ float alpha = clamp(0.5 - approx_dist, 0.0, 1.0);
+ _output = _input * alpha;
+ return _output;
+}
+vec4 EllipseEffect_Stage1_c0_c0_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 d = gl_FragCoord.xy - uellipse_Stage1_c0_c0_c1_c0_c1_c0.xy;
+ vec2 Z = d * uellipse_Stage1_c0_c0_c1_c0_c1_c0.zw;
+ float implicit = dot(Z, d) - 1.0;
+ float grad_dot = 4.0 * dot(Z, Z);
+ {
+ grad_dot = max(grad_dot, 1.1754999560161448e-38);
+ }
+ float approx_dist = implicit * inversesqrt(grad_dot);
+ float alpha;
+ {
+ alpha = clamp(0.5 - approx_dist, 0.0, 1.0);
+ }
+ _output = _input * alpha;
+ return _output;
+}
+vec4 blend_difference(vec4 src, vec4 dst) {
+ return vec4((src.xyz + dst.xyz) - 2.0 * min(src.xyz * dst.w, dst.xyz * src.w), src.w + (1.0 - src.w) * dst.w);
+}
+vec4 ComposeTwo_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_difference(EllipticalRRect_Stage1_c0_c0_c1_c0_c0_c0(inputColor), EllipseEffect_Stage1_c0_c0_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 blend_dst_over(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src + dst;
+}
+vec4 ComposeTwo_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_dst_over(ComposeTwo_Stage1_c0_c0_c0_c0(inputColor), ComposeTwo_Stage1_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 MatrixConvolution_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 sum = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_1_Stage0 - uKernelOffset_Stage1_c1_c0 * uImageIncrement_Stage1_c1_c0;
+ vec4 c;
+ {
+ float k = uKernel_Stage1_c1_c0[0].x;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0.xy, uTexDom_Stage1_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0[0].y;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0.xy, uTexDom_Stage1_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0[0].z;
+ {
+ vec2 origCoord = coord + vec2(2.0, 0.0) * uImageIncrement_Stage1_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0.xy, uTexDom_Stage1_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0[0].w;
+ {
+ vec2 origCoord = coord + vec2(3.0, 0.0) * uImageIncrement_Stage1_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0.xy, uTexDom_Stage1_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0[1].x;
+ {
+ vec2 origCoord = coord + vec2(4.0, 0.0) * uImageIncrement_Stage1_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0.xy, uTexDom_Stage1_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0[1].y;
+ {
+ vec2 origCoord = coord + vec2(5.0, 0.0) * uImageIncrement_Stage1_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0.xy, uTexDom_Stage1_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0[1].z;
+ {
+ vec2 origCoord = coord + vec2(6.0, 0.0) * uImageIncrement_Stage1_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0.xy, uTexDom_Stage1_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0[1].w;
+ {
+ vec2 origCoord = coord + vec2(7.0, 0.0) * uImageIncrement_Stage1_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0.xy, uTexDom_Stage1_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0[2].x;
+ {
+ vec2 origCoord = coord + vec2(8.0, 0.0) * uImageIncrement_Stage1_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0.xy, uTexDom_Stage1_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0[2].y;
+ {
+ vec2 origCoord = coord + vec2(9.0, 0.0) * uImageIncrement_Stage1_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0.xy, uTexDom_Stage1_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0[2].z;
+ {
+ vec2 origCoord = coord + vec2(10.0, 0.0) * uImageIncrement_Stage1_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0.xy, uTexDom_Stage1_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0[2].w;
+ {
+ vec2 origCoord = coord + vec2(11.0, 0.0) * uImageIncrement_Stage1_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0.xy, uTexDom_Stage1_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0[3].x;
+ {
+ vec2 origCoord = coord + vec2(12.0, 0.0) * uImageIncrement_Stage1_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0.xy, uTexDom_Stage1_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0[3].y;
+ {
+ vec2 origCoord = coord + vec2(13.0, 0.0) * uImageIncrement_Stage1_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0.xy, uTexDom_Stage1_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0[3].z;
+ {
+ vec2 origCoord = coord + vec2(14.0, 0.0) * uImageIncrement_Stage1_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0.xy, uTexDom_Stage1_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0[3].w;
+ {
+ vec2 origCoord = coord + vec2(15.0, 0.0) * uImageIncrement_Stage1_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0.xy, uTexDom_Stage1_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0[4].x;
+ {
+ vec2 origCoord = coord + vec2(16.0, 0.0) * uImageIncrement_Stage1_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0.xy, uTexDom_Stage1_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0[4].y;
+ {
+ vec2 origCoord = coord + vec2(17.0, 0.0) * uImageIncrement_Stage1_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0.xy, uTexDom_Stage1_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0[4].z;
+ {
+ vec2 origCoord = coord + vec2(18.0, 0.0) * uImageIncrement_Stage1_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0.xy, uTexDom_Stage1_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0[4].w;
+ {
+ vec2 origCoord = coord + vec2(19.0, 0.0) * uImageIncrement_Stage1_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0.xy, uTexDom_Stage1_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ vec2 origCoord = vTransformedCoords_1_Stage0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0.xy, uTexDom_Stage1_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ _output.w = c.w;
+ _output.xyz = clamp(sum.xyz * uGain_Stage1_c1_c0 + uBias_Stage1_c1_c0, 0.0, 1.0);
+ _output.xyz *= _output.w;
+ _output *= _input;
+ return _output;
+}
+vec4 blend_xor(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src + (1.0 - src.w) * dst;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = uColor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_xor(ComposeTwo_Stage1_c0_c0(inputColor), MatrixConvolution_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 inLocalCoord;
+out vec2 vTransformedCoords_0_Stage0;
+out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vec3 pos3 = uViewM_Stage0 * vec3(position, 1.0);
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(inLocalCoord, 1.0)).xy;
+ gl_Position = vec4(pos3.x, pos3.y, 0.0, pos3.z);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/952-1.shader_test b/shaders/skia/952-1.shader_test
new file mode 100644
index 0000000..3297da4
--- /dev/null
+++ b/shaders/skia/952-1.shader_test
@@ -0,0 +1,133 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage2_c0_c0;
+uniform vec4 urightBorderColor_Stage2_c0_c0;
+uniform vec2 ufocalParams_Stage2_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage2_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage2_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage2_c0_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage2_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_1_Stage0;
+ float t = -1.0;
+ float v = 1.0;
+ {
+ {
+ float invR1 = ufocalParams_Stage2_c0_c0_c0_c0.x;
+ float x_t = -1.0;
+ {
+ float temp = p.x * p.x - p.y * p.y;
+ if (temp >= 0.0) {
+ {
+ x_t = -sqrt(temp) - p.x * invR1;
+ }
+ }
+ }
+ {
+ if (x_t <= 0.0) {
+ v = -1.0;
+ }
+ }
+ {
+ {
+ t = x_t;
+ }
+ }
+ {
+ t = 1.0 - t;
+ }
+ }
+ }
+ _output = vec4(t, v, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage2_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage2_c0_c0_c1_c0;
+ bias = ubias0_1_Stage2_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage2_c0_c0_c1_c0;
+ bias = ubias2_3_Stage2_c0_c0_c1_c0;
+ }
+ } else {
+ {
+ scale = uscale4_5_Stage2_c0_c0_c1_c0;
+ bias = ubias4_5_Stage2_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage2_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage2_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage2_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage2_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_dst_in(output_Stage1, ClampedGradientEffect_Stage2_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/952.shader_test b/shaders/skia/952.shader_test
new file mode 100644
index 0000000..fc84413
--- /dev/null
+++ b/shaders/skia/952.shader_test
@@ -0,0 +1,196 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+uniform vec4 uColor_Stage0;
+uniform vec2 uImageIncrement_Stage1;
+uniform vec4 uKernel_Stage1[4];
+uniform vec2 uKernelOffset_Stage1;
+uniform float uGain_Stage1;
+uniform float uBias_Stage1;
+uniform vec4 uTexDom_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ vec4 sum = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0 - uKernelOffset_Stage1 * uImageIncrement_Stage1;
+ vec4 c;
+ {
+ float k = uKernel_Stage1[0].x;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[0].y;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[0].z;
+ {
+ vec2 origCoord = coord + vec2(2.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[0].w;
+ {
+ vec2 origCoord = coord + vec2(3.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[1].x;
+ {
+ vec2 origCoord = coord + vec2(4.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[1].y;
+ {
+ vec2 origCoord = coord + vec2(5.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[1].z;
+ {
+ vec2 origCoord = coord + vec2(6.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[1].w;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[2].x;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[2].y;
+ {
+ vec2 origCoord = coord + vec2(2.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[2].z;
+ {
+ vec2 origCoord = coord + vec2(3.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[2].w;
+ {
+ vec2 origCoord = coord + vec2(4.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[3].x;
+ {
+ vec2 origCoord = coord + vec2(5.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1[3].y;
+ {
+ vec2 origCoord = coord + vec2(6.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1.xy, uTexDom_Stage1.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ output_Stage1 = sum * uGain_Stage1 + uBias_Stage1;
+ output_Stage1.w = clamp(output_Stage1.w, 0.0, 1.0);
+ output_Stage1.xyz = clamp(output_Stage1.xyz, 0.0, output_Stage1.w);
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec2 pos2 = (uViewM_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/955-1.shader_test b/shaders/skia/955-1.shader_test
new file mode 100644
index 0000000..9c5d20e
--- /dev/null
+++ b/shaders/skia/955-1.shader_test
@@ -0,0 +1,119 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 ufocalParams_Stage2_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage2_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage2_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage2_c0_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage2_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_1_Stage0;
+ float t = -1.0;
+ {
+ {
+ float invR1 = ufocalParams_Stage2_c0_c0_c0_c0.x;
+ float fx = ufocalParams_Stage2_c0_c0_c0_c0.y;
+ float x_t = -1.0;
+ {
+ x_t = length(p) - p.x * invR1;
+ }
+ {
+ {
+ t = x_t + fx;
+ }
+ }
+ }
+ }
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage2_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage2_c0_c0_c1_c0;
+ bias = ubias0_1_Stage2_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage2_c0_c0_c1_c0;
+ bias = ubias2_3_Stage2_c0_c0_c1_c0;
+ }
+ } else {
+ {
+ scale = uscale4_5_Stage2_c0_c0_c1_c0;
+ bias = ubias4_5_Stage2_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage2_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage2_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_dst_in(output_Stage1, TiledGradientEffect_Stage2_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/955.shader_test b/shaders/skia/955.shader_test
new file mode 100644
index 0000000..2960e15
--- /dev/null
+++ b/shaders/skia/955.shader_test
@@ -0,0 +1,124 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_KHR_blend_equation_advanced : require
+out vec4 sk_FragColor;
+layout (blend_support_all_equations) out ;
+uniform vec4 uboundsUniform_Stage1_c0_c0;
+uniform float uxInvZoom_Stage1_c0_c0;
+uniform float uyInvZoom_Stage1_c0_c0;
+uniform float uxInvInset_Stage1_c0_c0;
+uniform float uyInvInset_Stage1_c0_c0;
+uniform vec2 uoffset_Stage1_c0_c0;
+uniform vec2 uScale_Stage1_c1_c0;
+uniform vec4 uTexDom_Stage1_c1_c0;
+uniform vec3 uDecalParams_Stage1_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+uniform sampler2D uTextureSampler_2_Stage1;
+noperspective in vec2 vEllipseOffsets_Stage0;
+noperspective in vec4 vEllipseRadii_Stage0;
+noperspective in vec4 vinColor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+vec4 MagnifierEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coord = vTransformedCoords_0_Stage0;
+ vec2 zoom_coord = uoffset_Stage1_c0_c0 + coord * vec2(uxInvZoom_Stage1_c0_c0, uyInvZoom_Stage1_c0_c0);
+ vec2 delta = (coord - uboundsUniform_Stage1_c0_c0.xy) * uboundsUniform_Stage1_c0_c0.zw;
+ delta = min(delta, vec2(1.0, 1.0) - delta);
+ delta *= vec2(uxInvInset_Stage1_c0_c0, uyInvInset_Stage1_c0_c0);
+ float weight = 0.0;
+ if (delta.x < 2.0 && delta.y < 2.0) {
+ delta = vec2(2.0, 2.0) - delta;
+ float dist = length(delta);
+ dist = max(2.0 - dist, 0.0);
+ weight = min(dist * dist, 1.0);
+ } else {
+ vec2 delta_squared = delta * delta;
+ weight = min(min(delta_squared.x, delta_squared.y), 1.0);
+ }
+ _output = texture(uTextureSampler_0_Stage1, mix(coord, zoom_coord, weight));
+ return _output;
+}
+vec4 DisplacementMap_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 dColor = texture(uTextureSampler_1_Stage1, vTransformedCoords_1_Stage0);
+ dColor.xyz = dColor.w < 9.9999999747524271e-07 ? vec3(0.0) : clamp(dColor.xyz / dColor.w, 0.0, 1.0);
+ vec2 cCoords = vTransformedCoords_2_Stage0 + uScale_Stage1_c1_c0 * (dColor.zw - vec2(0.5));
+ {
+ vec2 origCoord = cCoords;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0.xy, uTexDom_Stage1_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ _output = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ return _output;
+}
+vec4 blend_dst_over(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src + dst;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vinColor_Stage0;
+ vec2 offset = vEllipseOffsets_Stage0;
+ float test = dot(offset, offset) - 1.0;
+ vec2 grad = (2.0 * offset) * vEllipseRadii_Stage0.xy;
+ float grad_dot = dot(grad, grad);
+ grad_dot = max(grad_dot, 1.1754999560161448e-38);
+ float invlen = inversesqrt(grad_dot);
+ float edgeAlpha = clamp(0.5 - test * invlen, 0.0, 1.0);
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_dst_over(MagnifierEffect_Stage1_c0_c0(inputColor), DisplacementMap_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ sk_FragColor = outputCoverage_Stage0 * output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec2 inEllipseOffset;
+in vec4 inEllipseRadii;
+noperspective out vec2 vEllipseOffsets_Stage0;
+noperspective out vec4 vEllipseRadii_Stage0;
+noperspective out vec4 vinColor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+void main() {
+ vEllipseOffsets_Stage0 = inEllipseOffset;
+ vEllipseRadii_Stage0 = inEllipseRadii;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/958-1.shader_test b/shaders/skia/958-1.shader_test
new file mode 100644
index 0000000..0cf30ca
--- /dev/null
+++ b/shaders/skia/958-1.shader_test
@@ -0,0 +1,114 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 ufocalParams_Stage2_c0_c0_c0_c0;
+uniform vec4 uscale01_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias01_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale23_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias23_Stage2_c0_c0_c1_c0;
+uniform float uthreshold_Stage2_c0_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage2_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_1_Stage0;
+ float t = -1.0;
+ float v = 1.0;
+ {
+ {
+ float x_t = -1.0;
+ {
+ x_t = dot(p, p) / p.x;
+ }
+ {
+ if (x_t <= 0.0) {
+ v = -1.0;
+ }
+ }
+ {
+ {
+ t = x_t;
+ }
+ }
+ {
+ t = 1.0 - t;
+ }
+ }
+ }
+ _output = vec4(t, v, 0.0, 0.0);
+ return _output;
+}
+vec4 DualIntervalGradientColorizer_Stage2_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthreshold_Stage2_c0_c0_c1_c0) {
+ scale = uscale01_Stage2_c0_c0_c1_c0;
+ bias = ubias01_Stage2_c0_c0_c1_c0;
+ } else {
+ scale = uscale23_Stage2_c0_c0_c1_c0;
+ bias = ubias23_Stage2_c0_c0_c1_c0;
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage2_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = DualIntervalGradientColorizer_Stage2_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_dst_in(output_Stage1, TiledGradientEffect_Stage2_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/958.shader_test b/shaders/skia/958.shader_test
new file mode 100644
index 0000000..965ac91
--- /dev/null
+++ b/shaders/skia/958.shader_test
@@ -0,0 +1,170 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_KHR_blend_equation_advanced : require
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+layout (blend_support_all_equations) out ;
+uniform vec3 uedges_Stage1_c0_c0[4];
+uniform vec4 ucircleData_Stage1_c1_c0_c0_c0;
+uniform float ucornerRadius_Stage1_c1_c0_c1_c0_c0_c0;
+uniform vec4 uproxyRect_Stage1_c1_c0_c1_c0_c0_c0;
+uniform float ublurRadius_Stage1_c1_c0_c1_c0_c0_c0;
+uniform vec4 uinnerRect_Stage1_c1_c0_c1_c0_c1_c0;
+uniform vec2 uinvRadiiXY_Stage1_c1_c0_c1_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+noperspective in vec4 vinCircleEdge_Stage0;
+noperspective in vec4 vinColor_Stage0;
+vec4 ConvexPoly_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ float alpha = 1.0;
+ float edge;
+ edge = dot(uedges_Stage1_c0_c0[0], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage1_c0_c0[1], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage1_c0_c0[2], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ edge = dot(uedges_Stage1_c0_c0[3], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = edge >= 0.5 ? 1.0 : 0.0;
+ alpha *= edge;
+ alpha = 1.0 - alpha;
+ _output = _input * alpha;
+ return _output;
+}
+vec4 CircleBlurFragmentProcessor_Stage1_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 vec = vec2((gl_FragCoord.x - ucircleData_Stage1_c1_c0_c0_c0.x) * ucircleData_Stage1_c1_c0_c0_c0.w, (gl_FragCoord.y - ucircleData_Stage1_c1_c0_c0_c0.y) * ucircleData_Stage1_c1_c0_c0_c0.w);
+ float dist = length(vec) + (0.5 - ucircleData_Stage1_c1_c0_c0_c0.z) * ucircleData_Stage1_c1_c0_c0_c0.w;
+ _output = _input * texture(uTextureSampler_0_Stage1, vec2(dist, 0.5)).w;
+ return _output;
+}
+vec4 RRectBlurEffect_Stage1_c1_c0_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 translatedFragPos = gl_FragCoord.xy - uproxyRect_Stage1_c1_c0_c1_c0_c0_c0.xy;
+ float threshold = ucornerRadius_Stage1_c1_c0_c1_c0_c0_c0 + 2.0 * ublurRadius_Stage1_c1_c0_c1_c0_c0_c0;
+ vec2 middle = (uproxyRect_Stage1_c1_c0_c1_c0_c0_c0.zw - uproxyRect_Stage1_c1_c0_c1_c0_c0_c0.xy) - 2.0 * threshold;
+ if (translatedFragPos.x >= threshold && translatedFragPos.x < middle.x + threshold) {
+ translatedFragPos.x = threshold;
+ } else if (translatedFragPos.x >= middle.x + threshold) {
+ translatedFragPos.x -= middle.x - 1.0;
+ }
+ if (translatedFragPos.y > threshold && translatedFragPos.y < middle.y + threshold) {
+ translatedFragPos.y = threshold;
+ } else if (translatedFragPos.y >= middle.y + threshold) {
+ translatedFragPos.y -= middle.y - 1.0;
+ }
+ vec2 proxyDims = vec2(2.0 * threshold + 1.0);
+ vec2 texCoord = translatedFragPos / proxyDims;
+ _output = _input * texture(uTextureSampler_1_Stage1, texCoord);
+ return _output;
+}
+vec4 EllipticalRRect_Stage1_c1_c0_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 dxy0 = uinnerRect_Stage1_c1_c0_c1_c0_c1_c0.xy - gl_FragCoord.xy;
+ vec2 dxy1 = gl_FragCoord.xy - uinnerRect_Stage1_c1_c0_c1_c0_c1_c0.zw;
+ vec2 dxy = max(max(dxy0, dxy1), 0.0);
+ vec2 Z = dxy * uinvRadiiXY_Stage1_c1_c0_c1_c0_c1_c0;
+ float implicit = dot(Z, dxy) - 1.0;
+ float grad_dot = 4.0 * dot(Z, Z);
+ grad_dot = max(grad_dot, 9.9999997473787516e-05);
+ float approx_dist = implicit * inversesqrt(grad_dot);
+ float alpha = clamp(0.5 - approx_dist, 0.0, 1.0);
+ _output = _input * alpha;
+ return _output;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 blend_lighten(vec4 src, vec4 dst) {
+ vec4 result = blend_src_over(src, dst);
+ result.xyz = max(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
+ return result;
+}
+vec4 ComposeTwo_Stage1_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_lighten(RRectBlurEffect_Stage1_c1_c0_c1_c0_c0_c0(inputColor), EllipticalRRect_Stage1_c1_c0_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 blend_plus(vec4 src, vec4 dst) {
+ return min(src + dst, 1.0);
+}
+vec4 ComposeTwo_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_plus(CircleBlurFragmentProcessor_Stage1_c1_c0_c0_c0(inputColor), ComposeTwo_Stage1_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+float _blend_color_luminance(vec3 color) {
+ return dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), color);
+}
+vec3 _blend_set_color_luminance(vec3 hueSatColor, float alpha, vec3 lumColor) {
+ float lum = _blend_color_luminance(lumColor);
+ vec3 result = (lum - _blend_color_luminance(hueSatColor)) + hueSatColor;
+ float minComp = min(min(result.x, result.y), result.z);
+ float maxComp = max(max(result.x, result.y), result.z);
+ if (minComp < 0.0 && lum != minComp) {
+ result = lum + ((result - lum) * lum) / (lum - minComp);
+ }
+ if (maxComp > alpha && maxComp != lum) {
+ return lum + ((result - lum) * (alpha - lum)) / (maxComp - lum);
+ }
+ return result;
+}
+vec4 blend_luminosity(vec4 src, vec4 dst) {
+ float alpha = dst.w * src.w;
+ vec3 sda = src.xyz * dst.w;
+ vec3 dsa = dst.xyz * src.w;
+ return vec4((((_blend_set_color_luminance(dsa, alpha, sda) + dst.xyz) - dsa) + src.xyz) - sda, (src.w + dst.w) - alpha);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ vec4 circleEdge;
+ circleEdge = vinCircleEdge_Stage0;
+ outputColor_Stage0 = vinColor_Stage0;
+ float d = length(circleEdge.xy);
+ float distanceToOuterEdge = circleEdge.z * (1.0 - d);
+ float edgeAlpha = clamp(distanceToOuterEdge, 0.0, 1.0);
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_luminosity(ConvexPoly_Stage1_c0_c0(inputColor), ComposeTwo_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ sk_FragColor = outputCoverage_Stage0 * output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 inPosition;
+in vec4 inColor;
+in vec4 inCircleEdge;
+noperspective out vec4 vinCircleEdge_Stage0;
+noperspective out vec4 vinColor_Stage0;
+void main() {
+ vinCircleEdge_Stage0 = inCircleEdge;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = inPosition;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/961.shader_test b/shaders/skia/961.shader_test
new file mode 100644
index 0000000..3a2f2af
--- /dev/null
+++ b/shaders/skia/961.shader_test
@@ -0,0 +1,582 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_KHR_blend_equation_advanced : require
+out vec4 sk_FragColor;
+layout (blend_support_all_equations) out ;
+uniform vec4 uColor_Stage0;
+uniform vec4 uboundsUniform_Stage1_c0_c0;
+uniform float uxInvZoom_Stage1_c0_c0;
+uniform float uyInvZoom_Stage1_c0_c0;
+uniform float uxInvInset_Stage1_c0_c0;
+uniform float uyInvInset_Stage1_c0_c0;
+uniform vec2 uoffset_Stage1_c0_c0;
+uniform vec2 uImageIncrement_Stage1_c1_c0;
+uniform vec4 uKernel_Stage1_c1_c0[6];
+uniform vec2 uKernelOffset_Stage1_c1_c0;
+uniform float uGain_Stage1_c1_c0;
+uniform float uBias_Stage1_c1_c0;
+uniform vec4 uTexDom_Stage1_c1_c0;
+uniform vec3 uDecalParams_Stage1_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 MagnifierEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coord = vTransformedCoords_0_Stage0;
+ vec2 zoom_coord = uoffset_Stage1_c0_c0 + coord * vec2(uxInvZoom_Stage1_c0_c0, uyInvZoom_Stage1_c0_c0);
+ vec2 delta = (coord - uboundsUniform_Stage1_c0_c0.xy) * uboundsUniform_Stage1_c0_c0.zw;
+ delta = min(delta, vec2(1.0, 1.0) - delta);
+ delta *= vec2(uxInvInset_Stage1_c0_c0, uyInvInset_Stage1_c0_c0);
+ float weight = 0.0;
+ if (delta.x < 2.0 && delta.y < 2.0) {
+ delta = vec2(2.0, 2.0) - delta;
+ float dist = length(delta);
+ dist = max(2.0 - dist, 0.0);
+ weight = min(dist * dist, 1.0);
+ } else {
+ vec2 delta_squared = delta * delta;
+ weight = min(min(delta_squared.x, delta_squared.y), 1.0);
+ }
+ _output = texture(uTextureSampler_0_Stage1, mix(coord, zoom_coord, weight));
+ return _output;
+}
+vec4 MatrixConvolution_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 sum = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_1_Stage0 - uKernelOffset_Stage1_c1_c0 * uImageIncrement_Stage1_c1_c0;
+ vec4 c;
+ {
+ float k = uKernel_Stage1_c1_c0[0].x;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0.xy, uTexDom_Stage1_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0[0].y;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0.xy, uTexDom_Stage1_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0[0].z;
+ {
+ vec2 origCoord = coord + vec2(2.0, 0.0) * uImageIncrement_Stage1_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0.xy, uTexDom_Stage1_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0[0].w;
+ {
+ vec2 origCoord = coord + vec2(3.0, 0.0) * uImageIncrement_Stage1_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0.xy, uTexDom_Stage1_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0[1].x;
+ {
+ vec2 origCoord = coord + vec2(4.0, 0.0) * uImageIncrement_Stage1_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0.xy, uTexDom_Stage1_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0[1].y;
+ {
+ vec2 origCoord = coord + vec2(5.0, 0.0) * uImageIncrement_Stage1_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0.xy, uTexDom_Stage1_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0[1].z;
+ {
+ vec2 origCoord = coord + vec2(6.0, 0.0) * uImageIncrement_Stage1_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0.xy, uTexDom_Stage1_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0[1].w;
+ {
+ vec2 origCoord = coord + vec2(7.0, 0.0) * uImageIncrement_Stage1_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0.xy, uTexDom_Stage1_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0[2].x;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0.xy, uTexDom_Stage1_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0[2].y;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0.xy, uTexDom_Stage1_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0[2].z;
+ {
+ vec2 origCoord = coord + vec2(2.0, 1.0) * uImageIncrement_Stage1_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0.xy, uTexDom_Stage1_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0[2].w;
+ {
+ vec2 origCoord = coord + vec2(3.0, 1.0) * uImageIncrement_Stage1_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0.xy, uTexDom_Stage1_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0[3].x;
+ {
+ vec2 origCoord = coord + vec2(4.0, 1.0) * uImageIncrement_Stage1_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0.xy, uTexDom_Stage1_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0[3].y;
+ {
+ vec2 origCoord = coord + vec2(5.0, 1.0) * uImageIncrement_Stage1_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0.xy, uTexDom_Stage1_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0[3].z;
+ {
+ vec2 origCoord = coord + vec2(6.0, 1.0) * uImageIncrement_Stage1_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0.xy, uTexDom_Stage1_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0[3].w;
+ {
+ vec2 origCoord = coord + vec2(7.0, 1.0) * uImageIncrement_Stage1_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0.xy, uTexDom_Stage1_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0[4].x;
+ {
+ vec2 origCoord = coord + vec2(0.0, 2.0) * uImageIncrement_Stage1_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0.xy, uTexDom_Stage1_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0[4].y;
+ {
+ vec2 origCoord = coord + vec2(1.0, 2.0) * uImageIncrement_Stage1_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0.xy, uTexDom_Stage1_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0[4].z;
+ {
+ vec2 origCoord = coord + vec2(2.0, 2.0) * uImageIncrement_Stage1_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0.xy, uTexDom_Stage1_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0[4].w;
+ {
+ vec2 origCoord = coord + vec2(3.0, 2.0) * uImageIncrement_Stage1_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0.xy, uTexDom_Stage1_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0[5].x;
+ {
+ vec2 origCoord = coord + vec2(4.0, 2.0) * uImageIncrement_Stage1_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0.xy, uTexDom_Stage1_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0[5].y;
+ {
+ vec2 origCoord = coord + vec2(5.0, 2.0) * uImageIncrement_Stage1_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0.xy, uTexDom_Stage1_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0[5].z;
+ {
+ vec2 origCoord = coord + vec2(6.0, 2.0) * uImageIncrement_Stage1_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0.xy, uTexDom_Stage1_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c1_c0[5].w;
+ {
+ vec2 origCoord = coord + vec2(7.0, 2.0) * uImageIncrement_Stage1_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0.xy, uTexDom_Stage1_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ c.xyz /= c.w;
+ c.xyz = clamp(c.xyz, 0.0, 1.0);
+ sum += c * k;
+ }
+ {
+ vec2 origCoord = vTransformedCoords_1_Stage0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0.xy, uTexDom_Stage1_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_1_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ _output.w = c.w;
+ _output.xyz = clamp(sum.xyz * uGain_Stage1_c1_c0 + uBias_Stage1_c1_c0, 0.0, 1.0);
+ _output.xyz *= _output.w;
+ _output *= _input;
+ return _output;
+}
+float _blend_color_luminance(vec3 color) {
+ return dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), color);
+}
+vec3 _blend_set_color_luminance(vec3 hueSatColor, float alpha, vec3 lumColor) {
+ float lum = _blend_color_luminance(lumColor);
+ vec3 result = (lum - _blend_color_luminance(hueSatColor)) + hueSatColor;
+ float minComp = min(min(result.x, result.y), result.z);
+ float maxComp = max(max(result.x, result.y), result.z);
+ if (minComp < 0.0 && lum != minComp) {
+ result = lum + ((result - lum) * lum) / (lum - minComp);
+ }
+ if (maxComp > alpha && maxComp != lum) {
+ return lum + ((result - lum) * (alpha - lum)) / (maxComp - lum);
+ }
+ return result;
+}
+vec4 blend_color(vec4 src, vec4 dst) {
+ float alpha = dst.w * src.w;
+ vec3 sda = src.xyz * dst.w;
+ vec3 dsa = dst.xyz * src.w;
+ return vec4((((_blend_set_color_luminance(sda, alpha, dsa) + dst.xyz) - dsa) + src.xyz) - sda, (src.w + dst.w) - alpha);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = uColor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_color(MagnifierEffect_Stage1_c0_c0(inputColor), MatrixConvolution_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 inPosition;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/964-1.shader_test b/shaders/skia/964-1.shader_test
new file mode 100644
index 0000000..354894f
--- /dev/null
+++ b/shaders/skia/964-1.shader_test
@@ -0,0 +1,108 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage2_c0_c0;
+uniform vec4 urightBorderColor_Stage2_c0_c0;
+uniform vec2 ufocalParams_Stage2_c0_c0_c0_c0;
+uniform vec4 ustart_Stage2_c0_c0_c1_c0;
+uniform vec4 uend_Stage2_c0_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage2_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_1_Stage0;
+ float t = -1.0;
+ float v = 1.0;
+ {
+ {
+ float invR1 = ufocalParams_Stage2_c0_c0_c0_c0.x;
+ float fx = ufocalParams_Stage2_c0_c0_c0_c0.y;
+ float x_t = -1.0;
+ {
+ float temp = p.x * p.x - p.y * p.y;
+ if (temp >= 0.0) {
+ {
+ x_t = sqrt(temp) - p.x * invR1;
+ }
+ }
+ }
+ {
+ if (x_t <= 0.0) {
+ v = -1.0;
+ }
+ }
+ {
+ {
+ t = x_t + fx;
+ }
+ }
+ }
+ }
+ _output = vec4(t, v, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage2_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage2_c0_c0_c1_c0 + t * uend_Stage2_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage2_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage2_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage2_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage2_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_dst_in(output_Stage1, ClampedGradientEffect_Stage2_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/964.shader_test b/shaders/skia/964.shader_test
new file mode 100644
index 0000000..6c283cf
--- /dev/null
+++ b/shaders/skia/964.shader_test
@@ -0,0 +1,134 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uColor_Stage0;
+uniform float ucornerRadius_Stage2;
+uniform vec4 uproxyRect_Stage2;
+uniform float ublurRadius_Stage2;
+uniform vec4 uinnerRect_Stage3_c0_c0;
+uniform vec2 uinvRadiiXY_Stage3_c0_c0;
+uniform mat4 um_Stage5;
+uniform vec4 uv_Stage5;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec3 vDashParams_Stage0;
+noperspective in vec4 vRectParams_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 EllipticalRRect_Stage3_c0_c0(vec4 _input, vec2 _coords) {
+ vec4 _output;
+ vec2 dxy0 = uinnerRect_Stage3_c0_c0.xy - gl_FragCoord.xy;
+ vec2 dxy1 = gl_FragCoord.xy - uinnerRect_Stage3_c0_c0.zw;
+ vec2 dxy = max(max(dxy0, dxy1), 0.0);
+ vec2 Z = dxy * uinvRadiiXY_Stage3_c0_c0;
+ float implicit = dot(Z, dxy) - 1.0;
+ float grad_dot = 4.0 * dot(Z, Z);
+ grad_dot = max(grad_dot, 9.9999997473787516e-05);
+ float approx_dist = implicit * inversesqrt(grad_dot);
+ float alpha = clamp(0.5 + approx_dist, 0.0, 1.0);
+ _output = _input * alpha;
+ return _output;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = uColor_Stage0;
+ float xShifted = vDashParams_Stage0.x - floor(vDashParams_Stage0.x / vDashParams_Stage0.z) * vDashParams_Stage0.z;
+ vec2 fragPosShifted = vec2(xShifted, vDashParams_Stage0.y);
+ float alpha = 1.0;
+ alpha *= fragPosShifted.x - vRectParams_Stage0.x > -0.5 ? 1.0 : 0.0;
+ alpha *= vRectParams_Stage0.z - fragPosShifted.x >= -0.5 ? 1.0 : 0.0;
+ outputCoverage_Stage0 = vec4(alpha);
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = floor(outputColor_Stage0 * 255.0 + 0.5) / 255.0;
+ {
+ output_Stage1.xyz = floor((output_Stage1.xyz * output_Stage1.w) * 255.0 + 0.5) / 255.0;
+ }
+ }
+ vec4 output_Stage2;
+ {
+ vec2 translatedFragPos = gl_FragCoord.xy - uproxyRect_Stage2.xy;
+ float threshold = ucornerRadius_Stage2 + 2.0 * ublurRadius_Stage2;
+ vec2 middle = (uproxyRect_Stage2.zw - uproxyRect_Stage2.xy) - 2.0 * threshold;
+ if (translatedFragPos.x >= threshold && translatedFragPos.x < middle.x + threshold) {
+ translatedFragPos.x = threshold;
+ } else if (translatedFragPos.x >= middle.x + threshold) {
+ translatedFragPos.x -= middle.x - 1.0;
+ }
+ if (translatedFragPos.y > threshold && translatedFragPos.y < middle.y + threshold) {
+ translatedFragPos.y = threshold;
+ } else if (translatedFragPos.y >= middle.y + threshold) {
+ translatedFragPos.y -= middle.y - 1.0;
+ }
+ vec2 proxyDims = vec2(2.0 * threshold + 1.0);
+ vec2 texCoord = translatedFragPos / proxyDims;
+ output_Stage2 = output_Stage1 * texture(uTextureSampler_0_Stage2, texCoord);
+ }
+ vec4 output_Stage3;
+ {
+ float coord = vTransformedCoords_0_Stage0.y - 0.5;
+ float f = fract(coord);
+ coord += 0.5 - f;
+ float f2 = f * f;
+ vec4 w = mat4(0.055555555555555552, 0.88888888888888884, 0.055555555555555552, 0.0, -0.5, 0.0, 0.5, 0.0, 0.83333333333333337, -2.0, 1.5, -0.33333333333333331, -0.3888888888888889, 1.1666666666666667, -1.1666666666666667, 0.3888888888888889) * vec4(1.0, f, f2, f2 * f);
+ vec4 c[4];
+ c[0] = EllipticalRRect_Stage3_c0_c0(vec4(1.0), vec2(vTransformedCoords_0_Stage0.x, coord + -1.0));
+ c[1] = EllipticalRRect_Stage3_c0_c0(vec4(1.0), vec2(vTransformedCoords_0_Stage0.x, coord));
+ c[2] = EllipticalRRect_Stage3_c0_c0(vec4(1.0), vec2(vTransformedCoords_0_Stage0.x, coord + 1.0));
+ c[3] = EllipticalRRect_Stage3_c0_c0(vec4(1.0), vec2(vTransformedCoords_0_Stage0.x, coord + 2.0));
+ vec4 bicubicColor = ((c[0] * w.x + c[1] * w.y) + c[2] * w.z) + c[3] * w.w;
+ bicubicColor = clamp(bicubicColor, 0.0, 1.0);
+ output_Stage3 = bicubicColor * output_Stage2;
+ }
+ vec4 output_Stage4;
+ {
+ output_Stage4 = floor(output_Stage3 * 255.0 + 0.5) / 255.0;
+ {
+ output_Stage4.xyz = floor((output_Stage4.xyz * output_Stage4.w) * 255.0 + 0.5) / 255.0;
+ }
+ }
+ vec4 output_Stage5;
+ {
+ vec4 inputColor = output_Stage4;
+ {
+ float nonZeroAlpha = max(inputColor.w, 9.9999997473787516e-05);
+ inputColor = vec4(inputColor.xyz / nonZeroAlpha, inputColor.w);
+ }
+ output_Stage5 = um_Stage5 * inputColor + uv_Stage5;
+ {
+ output_Stage5.w = clamp(output_Stage5.w, 0.0, 1.0);
+ }
+ {
+ output_Stage5.xyz *= output_Stage5.w;
+ }
+ }
+ {
+ sk_FragColor = output_Stage5 * outputCoverage_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec3 inDashParams;
+in vec4 inRect;
+noperspective out vec3 vDashParams_Stage0;
+noperspective out vec4 vRectParams_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vDashParams_Stage0 = inDashParams;
+ vRectParams_Stage0 = inRect;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/967-1.shader_test b/shaders/skia/967-1.shader_test
new file mode 100644
index 0000000..12a8463
--- /dev/null
+++ b/shaders/skia/967-1.shader_test
@@ -0,0 +1,113 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage2_c0_c0;
+uniform vec4 urightBorderColor_Stage2_c0_c0;
+uniform vec2 ufocalParams_Stage2_c0_c0_c0_c0;
+uniform vec4 uscale01_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias01_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale23_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias23_Stage2_c0_c0_c1_c0;
+uniform float uthreshold_Stage2_c0_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage2_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_1_Stage0;
+ float t = -1.0;
+ float v = 1.0;
+ {
+ {
+ float fx = ufocalParams_Stage2_c0_c0_c0_c0.y;
+ float x_t = -1.0;
+ {
+ x_t = dot(p, p) / p.x;
+ }
+ {
+ if (x_t <= 0.0) {
+ v = -1.0;
+ }
+ }
+ {
+ {
+ t = x_t + fx;
+ }
+ }
+ }
+ }
+ _output = vec4(t, v, 0.0, 0.0);
+ return _output;
+}
+vec4 DualIntervalGradientColorizer_Stage2_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthreshold_Stage2_c0_c0_c1_c0) {
+ scale = uscale01_Stage2_c0_c0_c1_c0;
+ bias = ubias01_Stage2_c0_c0_c1_c0;
+ } else {
+ scale = uscale23_Stage2_c0_c0_c1_c0;
+ bias = ubias23_Stage2_c0_c0_c1_c0;
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage2_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage2_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage2_c0_c0;
+ } else {
+ _output = DualIntervalGradientColorizer_Stage2_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_dst_in(output_Stage1, ClampedGradientEffect_Stage2_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/967.shader_test b/shaders/skia/967.shader_test
new file mode 100644
index 0000000..ebd6771
--- /dev/null
+++ b/shaders/skia/967.shader_test
@@ -0,0 +1,129 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+uniform float uSrcTF_Stage0[7];
+uniform mat3 uColorXform_Stage0;
+uniform float uDstTF_Stage0[7];
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vtextureCoords_Stage0;
+flat in vec4 vtextureDomain_Stage0;
+flat in vec4 vcolor_Stage0;
+float src_tf_Stage0(float x) {
+ float G = uSrcTF_Stage0[0];
+ float A = uSrcTF_Stage0[1];
+ float B = uSrcTF_Stage0[2];
+ float C = uSrcTF_Stage0[3];
+ float D = uSrcTF_Stage0[4];
+ float E = uSrcTF_Stage0[5];
+ float F = uSrcTF_Stage0[6];
+ float s = sign(x);
+ x = abs(x);
+ x = x < D ? C * x + F : pow(A * x + B, G) + E;
+ return s * x;
+}
+float dst_tf_Stage0(float x) {
+ float G = uDstTF_Stage0[0];
+ float A = uDstTF_Stage0[1];
+ float B = uDstTF_Stage0[2];
+ float C = uDstTF_Stage0[3];
+ float D = uDstTF_Stage0[4];
+ float E = uDstTF_Stage0[5];
+ float F = uDstTF_Stage0[6];
+ float s = sign(x);
+ x = abs(x);
+ x = x < D ? C * x + F : pow(A * x + B, G) + E;
+ return s * x;
+}
+vec4 gamut_xform_Stage0(vec4 color) {
+ color.xyz = uColorXform_Stage0 * color.xyz;
+ return color;
+}
+vec4 color_xform_Stage0(vec4 color) {
+ float nonZeroAlpha = max(color.w, 9.9999997473787516e-05);
+ color = vec4(color.xyz / nonZeroAlpha, nonZeroAlpha);
+ color.x = src_tf_Stage0(color.x);
+ color.y = src_tf_Stage0(color.y);
+ color.z = src_tf_Stage0(color.z);
+ color = gamut_xform_Stage0(color);
+ color.x = dst_tf_Stage0(color.x);
+ color.y = dst_tf_Stage0(color.y);
+ color.z = dst_tf_Stage0(color.z);
+ color.xyz *= color.w;
+ return color;
+}
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ t.x = fract(t.x);
+ }
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ vec2 textureCoords;
+ textureCoords = vtextureCoords_Stage0;
+ vec4 textureDomain;
+ textureDomain = vtextureDomain_Stage0;
+ outputColor_Stage0 = vcolor_Stage0;
+ outputColor_Stage0 = color_xform_Stage0(texture(uTextureSampler_0_Stage0, clamp(textureCoords, textureDomain.xy, textureDomain.zw))) * outputColor_Stage0;
+ }
+ {
+ blend_dst_in(vec4(1.0), TiledGradientEffect_Stage1_c0_c0(vec4(1.0)));
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 textureCoords;
+in vec4 textureDomain;
+in vec4 color;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vtextureCoords_Stage0;
+flat out vec4 vtextureDomain_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vec2 pos2 = position;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(textureCoords, 1.0)).xy;
+ vtextureCoords_Stage0 = textureCoords;
+ vtextureDomain_Stage0 = textureDomain;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/97-1.shader_test b/shaders/skia/97-1.shader_test
new file mode 100644
index 0000000..96b1a65
--- /dev/null
+++ b/shaders/skia/97-1.shader_test
@@ -0,0 +1,123 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform float uSrcTF_Stage1_c0_c0[7];
+uniform mat3 uColorXform_Stage1_c0_c0;
+uniform float uDstTF_Stage1_c0_c0[7];
+uniform mat3 ucolorSpaceMatrix_Stage1_c0_c0_c0_c0;
+uniform vec3 ucolorSpaceTranslate_Stage1_c0_c0_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+uniform sampler2D uTextureSampler_2_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 TextureEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0) * _input;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_1_Stage1, vTransformedCoords_1_Stage0) * _input;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c0_c0_c0_c0_c2_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_2_Stage1, vTransformedCoords_2_Stage0) * _input;
+ return _output;
+}
+vec4 YUVtoRGBEffect_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 planes[3];
+ planes[0] = TextureEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ planes[1] = TextureEffect_Stage1_c0_c0_c0_c0_c1_c0(vec4(1.0));
+ planes[2] = TextureEffect_Stage1_c0_c0_c0_c0_c2_c0(vec4(1.0));
+ vec4 color = vec4(planes[0].x, planes[1].x, planes[2].x, 1.0);
+ color.xyz = clamp(color.xyz * ucolorSpaceMatrix_Stage1_c0_c0_c0_c0 + ucolorSpaceTranslate_Stage1_c0_c0_c0_c0, 0.0, 1.0);
+ _output = color;
+ return _output;
+}
+float src_tf_Stage1_c0_c0(float x) {
+ float G = uSrcTF_Stage1_c0_c0[0];
+ float A = uSrcTF_Stage1_c0_c0[1];
+ float B = uSrcTF_Stage1_c0_c0[2];
+ float C = uSrcTF_Stage1_c0_c0[3];
+ float D = uSrcTF_Stage1_c0_c0[4];
+ float E = uSrcTF_Stage1_c0_c0[5];
+ float F = uSrcTF_Stage1_c0_c0[6];
+ float s = sign(x);
+ x = abs(x);
+ x = x < D ? C * x + F : pow(A * x + B, G) + E;
+ return s * x;
+}
+float dst_tf_Stage1_c0_c0(float x) {
+ float G = uDstTF_Stage1_c0_c0[0];
+ float A = uDstTF_Stage1_c0_c0[1];
+ float B = uDstTF_Stage1_c0_c0[2];
+ float C = uDstTF_Stage1_c0_c0[3];
+ float D = uDstTF_Stage1_c0_c0[4];
+ float E = uDstTF_Stage1_c0_c0[5];
+ float F = uDstTF_Stage1_c0_c0[6];
+ float s = sign(x);
+ x = abs(x);
+ x = x < D ? C * x + F : pow(A * x + B, G) + E;
+ return s * x;
+}
+vec4 gamut_xform_Stage1_c0_c0(vec4 color) {
+ color.xyz = uColorXform_Stage1_c0_c0 * color.xyz;
+ return color;
+}
+vec4 color_xform_Stage1_c0_c0(vec4 color) {
+ color.x = src_tf_Stage1_c0_c0(color.x);
+ color.y = src_tf_Stage1_c0_c0(color.y);
+ color.z = src_tf_Stage1_c0_c0(color.z);
+ color = gamut_xform_Stage1_c0_c0(color);
+ color.x = dst_tf_Stage1_c0_c0(color.x);
+ color.y = dst_tf_Stage1_c0_c0(color.y);
+ color.z = dst_tf_Stage1_c0_c0(color.z);
+ return color;
+}
+vec4 ColorSpaceXform_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = color_xform_Stage1_c0_c0(YUVtoRGBEffect_Stage1_c0_c0_c0_c0(vec4(1.0))) * _input;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ColorSpaceXform_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/97-10.shader_test b/shaders/skia/97-10.shader_test
new file mode 100644
index 0000000..c88eedd
--- /dev/null
+++ b/shaders/skia/97-10.shader_test
@@ -0,0 +1,98 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+uniform vec2 uDstTextureUpperLeft_Stage2;
+uniform vec2 uDstTextureCoordScale_Stage2;
+uniform sampler2D uTextureSampler_0_Stage0;
+uniform sampler2D uDstTextureSampler_Stage2;
+noperspective in vec2 vTextureCoords_Stage0;
+flat in int vTexIndex_Stage0;
+noperspective in vec4 vinColor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ {
+ {
+ t.x = fract(t.x);
+ }
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+void main() {
+ vec4 outputCoverage_Stage0;
+ {
+ vec4 texColor;
+ {
+ texColor = texture(uTextureSampler_0_Stage0, vTextureCoords_Stage0);
+ }
+ outputCoverage_Stage0 = texColor;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = TiledGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ {
+ if (all(lessThanEqual(outputCoverage_Stage0.xyz, vec3(0.0)))) {
+ discard;
+ }
+ vec2 _dstTexCoord = (gl_FragCoord.xy - uDstTextureUpperLeft_Stage2) * uDstTextureCoordScale_Stage2;
+ _dstTexCoord.y = 1.0 - _dstTexCoord.y;
+ vec4 _dstColor = texture(uDstTextureSampler_Stage2, _dstTexCoord);
+ sk_FragColor = blend_src_over(output_Stage1, _dstColor);
+ float lerpRed = mix(_dstColor.w, sk_FragColor.w, outputCoverage_Stage0.x);
+ float lerpBlue = mix(_dstColor.w, sk_FragColor.w, outputCoverage_Stage0.y);
+ float lerpGreen = mix(_dstColor.w, sk_FragColor.w, outputCoverage_Stage0.z);
+ sk_FragColor = outputCoverage_Stage0 * sk_FragColor + (vec4(1.0) - outputCoverage_Stage0) * _dstColor;
+ sk_FragColor.w = max(max(lerpRed, lerpBlue), lerpGreen);
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform vec2 uAtlasSizeInv_Stage0;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in uvec2 inTextureCoords;
+noperspective out vec2 vTextureCoords_Stage0;
+flat out int vTexIndex_Stage0;
+noperspective out vec4 vinColor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ ivec2 signedCoords = ivec2(int(inTextureCoords.x), int(inTextureCoords.y));
+ vec2 unormTexCoords = vec2(float(signedCoords.x / 2), float(signedCoords.y / 2));
+ vTextureCoords_Stage0 = unormTexCoords * uAtlasSizeInv_Stage0;
+ vTexIndex_Stage0 = 0;
+ vinColor_Stage0 = inColor;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(inPosition.x, inPosition.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/97-16.shader_test b/shaders/skia/97-16.shader_test
new file mode 100644
index 0000000..f3a6454
--- /dev/null
+++ b/shaders/skia/97-16.shader_test
@@ -0,0 +1,94 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform vec4 uKernel_Stage1[5];
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0 - 9.0 * uImageIncrement_Stage1;
+ vec2 coordSampled = vec2(0.0, 0.0);
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[0].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[1].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[2].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].z;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[3].w;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[4].x;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[4].y;
+ coord += uImageIncrement_Stage1;
+ coordSampled = coord;
+ output_Stage1 += texture(uTextureSampler_0_Stage1, coordSampled) * uKernel_Stage1[4].z;
+ coord += uImageIncrement_Stage1;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/97-18.shader_test b/shaders/skia/97-18.shader_test
new file mode 100644
index 0000000..f8bc4ca
--- /dev/null
+++ b/shaders/skia/97-18.shader_test
@@ -0,0 +1,135 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 uleftBorderColor_Stage1_c1_c0_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c1_c0_c0_c0;
+uniform vec4 ustart_Stage1_c1_c0_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c1_c0_c0_c0_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+flat in vec4 vcolor_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+vec4 ComposeOne_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_dst_in(_input, ClampedGradientEffect_Stage1_c0_c0_c0_c0(vec4(1.0)));
+ return _output;
+}
+vec4 LinearGradientLayout_Stage1_c1_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_1_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c1_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c1_c0_c0_c0_c1_c0 + t * uend_Stage1_c1_c0_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c1_c0_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c1_c0_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c1_c0_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c1_c0_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 ComposeOne_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = blend_dst_in(_input, ClampedGradientEffect_Stage1_c1_c0_c0_c0(vec4(1.0)));
+ return _output;
+}
+float _blend_overlay_component(float sc, float sa, float dc, float da) {
+ if (2.0 * dc <= da) {
+ return (2.0 * sc) * dc;
+ }
+ return sa * da - (2.0 * (da - dc)) * (sa - sc);
+}
+vec4 blend_overlay(vec4 src, vec4 dst) {
+ vec4 result = vec4(_blend_overlay_component(src.x, src.w, dst.x, dst.w), _blend_overlay_component(src.y, src.w, dst.y, dst.w), _blend_overlay_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+ result.xyz += dst.xyz * (1.0 - src.w) + src.xyz * (1.0 - dst.w);
+ return result;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_overlay(ComposeOne_Stage1_c0_c0(inputColor), ComposeOne_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec4 color;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/97-20.shader_test b/shaders/skia/97-20.shader_test
new file mode 100644
index 0000000..bb67703
--- /dev/null
+++ b/shaders/skia/97-20.shader_test
@@ -0,0 +1,324 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_KHR_blend_equation_advanced : require
+out vec4 sk_FragColor;
+layout (blend_support_all_equations) out ;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 uscale01_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias01_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale23_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias23_Stage1_c0_c0_c1_c0;
+uniform float uthreshold_Stage1_c0_c0_c1_c0;
+uniform float ucornerRadius_Stage2;
+uniform vec4 uproxyRect_Stage2;
+uniform float ublurRadius_Stage2;
+uniform mat4 um_Stage3;
+uniform vec4 uv_Stage3;
+uniform vec2 uImageIncrement_Stage4;
+uniform float uSurfaceScale_Stage4;
+uniform vec3 uLightColor_Stage4;
+uniform float uKD_Stage4;
+uniform vec4 uTexDom_Stage4;
+uniform vec3 uDecalParams_Stage4;
+uniform vec3 uLightDirection_Stage4;
+uniform vec4 uboundsUniform_Stage6;
+uniform float uxInvZoom_Stage6;
+uniform float uyInvZoom_Stage6;
+uniform float uxInvInset_Stage6;
+uniform float uyInvInset_Stage6;
+uniform vec2 uoffset_Stage6;
+uniform sampler2D uTextureSampler_0_Stage2;
+uniform sampler2D uTextureSampler_0_Stage4;
+uniform sampler2D uTextureSampler_0_Stage6;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 DualIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthreshold_Stage1_c0_c0_c1_c0) {
+ scale = uscale01_Stage1_c0_c0_c1_c0;
+ bias = ubias01_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale23_Stage1_c0_c0_c1_c0;
+ bias = ubias23_Stage1_c0_c0_c1_c0;
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = DualIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 light_Stage4(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ float colorScale = uKD_Stage4 * dot(normal, surfaceToLight);
+ return vec4(lightColor * clamp(colorScale, 0.0, 1.0), 1.0);
+}
+float sobel_Stage4(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage4(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage4(float m[9], float surfaceScale) {
+ return pointToNormal_Stage4(sobel_Stage4(m[0], m[2], m[3], m[5], m[6], m[8], 0.25), sobel_Stage4(m[0], m[6], m[1], m[7], m[2], m[8], 0.25), surfaceScale);
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_dst_in(vec4(1.0), ClampedGradientEffect_Stage1_c0_c0(vec4(1.0)));
+ }
+ vec4 output_Stage2;
+ {
+ vec2 translatedFragPos = gl_FragCoord.xy - uproxyRect_Stage2.xy;
+ float threshold = ucornerRadius_Stage2 + 2.0 * ublurRadius_Stage2;
+ vec2 middle = (uproxyRect_Stage2.zw - uproxyRect_Stage2.xy) - 2.0 * threshold;
+ if (translatedFragPos.x >= threshold && translatedFragPos.x < middle.x + threshold) {
+ translatedFragPos.x = threshold;
+ } else if (translatedFragPos.x >= middle.x + threshold) {
+ translatedFragPos.x -= middle.x - 1.0;
+ }
+ if (translatedFragPos.y > threshold && translatedFragPos.y < middle.y + threshold) {
+ translatedFragPos.y = threshold;
+ } else if (translatedFragPos.y >= middle.y + threshold) {
+ translatedFragPos.y -= middle.y - 1.0;
+ }
+ vec2 proxyDims = vec2(2.0 * threshold + 1.0);
+ vec2 texCoord = translatedFragPos / proxyDims;
+ output_Stage2 = output_Stage1 * texture(uTextureSampler_0_Stage2, texCoord);
+ }
+ vec4 output_Stage3;
+ {
+ vec4 inputColor = output_Stage2;
+ {
+ float nonZeroAlpha = max(inputColor.w, 9.9999997473787516e-05);
+ inputColor = vec4(inputColor.xyz / nonZeroAlpha, inputColor.w);
+ }
+ output_Stage3 = um_Stage3 * inputColor + uv_Stage3;
+ {
+ output_Stage3 = clamp(output_Stage3, 0.0, 1.0);
+ }
+ }
+ vec4 output_Stage4;
+ {
+ vec2 coord = vTransformedCoords_1_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage4;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage4.xy, uTexDom_Stage4.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage4, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage4.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage4.y);
+ if (err > uDecalParams_Stage4.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage4.z < 1.0) {
+ err = 0.0;
+ }
+ temp0 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage4;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage4.xy, uTexDom_Stage4.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage4, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage4.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage4.y);
+ if (err > uDecalParams_Stage4.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage4.z < 1.0) {
+ err = 0.0;
+ }
+ temp1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage4;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage4.xy, uTexDom_Stage4.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage4, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage4.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage4.y);
+ if (err > uDecalParams_Stage4.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage4.z < 1.0) {
+ err = 0.0;
+ }
+ temp2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage4;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage4.xy, uTexDom_Stage4.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage4, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage4.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage4.y);
+ if (err > uDecalParams_Stage4.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage4.z < 1.0) {
+ err = 0.0;
+ }
+ temp3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage4.xy, uTexDom_Stage4.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage4, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage4.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage4.y);
+ if (err > uDecalParams_Stage4.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage4.z < 1.0) {
+ err = 0.0;
+ }
+ temp4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage4;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage4.xy, uTexDom_Stage4.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage4, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage4.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage4.y);
+ if (err > uDecalParams_Stage4.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage4.z < 1.0) {
+ err = 0.0;
+ }
+ temp5 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage4;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage4.xy, uTexDom_Stage4.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage4, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage4.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage4.y);
+ if (err > uDecalParams_Stage4.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage4.z < 1.0) {
+ err = 0.0;
+ }
+ temp6 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage4;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage4.xy, uTexDom_Stage4.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage4, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage4.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage4.y);
+ if (err > uDecalParams_Stage4.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage4.z < 1.0) {
+ err = 0.0;
+ }
+ temp7 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage4;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage4.xy, uTexDom_Stage4.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage4, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage4.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage4.y);
+ if (err > uDecalParams_Stage4.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage4.z < 1.0) {
+ err = 0.0;
+ }
+ temp8 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = uLightDirection_Stage4;
+ output_Stage4 = light_Stage4(normal_Stage4(m, uSurfaceScale_Stage4), surfaceToLight, uLightColor_Stage4);
+ output_Stage4 *= output_Stage3;
+ }
+ vec4 output_Stage5;
+ {
+ output_Stage5 = floor(output_Stage4 * 255.0 + 0.5) / 255.0;
+ {
+ output_Stage5.xyz = floor((output_Stage5.xyz * output_Stage5.w) * 255.0 + 0.5) / 255.0;
+ }
+ }
+ vec4 output_Stage6;
+ {
+ vec2 coord = vTransformedCoords_2_Stage0;
+ vec2 zoom_coord = uoffset_Stage6 + coord * vec2(uxInvZoom_Stage6, uyInvZoom_Stage6);
+ vec2 delta = (coord - uboundsUniform_Stage6.xy) * uboundsUniform_Stage6.zw;
+ delta = min(delta, vec2(1.0, 1.0) - delta);
+ delta *= vec2(uxInvInset_Stage6, uyInvInset_Stage6);
+ float weight = 0.0;
+ if (delta.x < 2.0 && delta.y < 2.0) {
+ delta = vec2(2.0, 2.0) - delta;
+ float dist = length(delta);
+ dist = max(2.0 - dist, 0.0);
+ weight = min(dist * dist, 1.0);
+ } else {
+ vec2 delta_squared = delta * delta;
+ weight = min(min(delta_squared.x, delta_squared.y), 1.0);
+ }
+ output_Stage6 = texture(uTextureSampler_0_Stage6, mix(coord, zoom_coord, weight));
+ }
+ {
+ sk_FragColor = output_Stage6 * output_Stage5;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/97-21.shader_test b/shaders/skia/97-21.shader_test
new file mode 100644
index 0000000..1abaa3f
--- /dev/null
+++ b/shaders/skia/97-21.shader_test
@@ -0,0 +1,222 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage2;
+uniform float uSurfaceScale_Stage2;
+uniform vec3 uLightColor_Stage2;
+uniform float uKS_Stage2;
+uniform float uShininess_Stage2;
+uniform vec4 uTexDom_Stage2;
+uniform vec3 uDecalParams_Stage2;
+uniform vec3 uLightLocation_Stage2;
+uniform float uExponent_Stage2;
+uniform float uCosInnerConeAngle_Stage2;
+uniform float uCosOuterConeAngle_Stage2;
+uniform float uConeScale_Stage2;
+uniform vec3 uS_Stage2;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 light_Stage2(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ vec3 halfDir = normalize(surfaceToLight + vec3(0.0, 0.0, 1.0));
+ float colorScale = uKS_Stage2 * pow(dot(normal, halfDir), uShininess_Stage2);
+ vec3 color = lightColor * clamp(colorScale, 0.0, 1.0);
+ return vec4(color, max(max(color.x, color.y), color.z));
+}
+float sobel_Stage2(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage2(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage2(float m[9], float surfaceScale) {
+ return pointToNormal_Stage2(sobel_Stage2(m[0], m[1], m[3], m[4], m[6], m[7], 0.5), sobel_Stage2(m[0], m[6], m[1], m[7], 0.0, 0.0, 0.33333298563957214), surfaceScale);
+}
+vec3 lightColor_Stage2(vec3 surfaceToLight) {
+ float cosAngle = -dot(surfaceToLight, uS_Stage2);
+ if (cosAngle < uCosOuterConeAngle_Stage2) {
+ return vec3(0.0);
+ }
+ float scale = pow(cosAngle, uExponent_Stage2);
+ if (cosAngle < uCosInnerConeAngle_Stage2) {
+ return ((uLightColor_Stage2 * scale) * (cosAngle - uCosOuterConeAngle_Stage2)) * uConeScale_Stage2;
+ }
+ return uLightColor_Stage2;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ vec2 coord = vTransformedCoords_1_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp0 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp5 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp6 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp7 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp8 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = normalize(uLightLocation_Stage2 - vec3(gl_FragCoord.xy, uSurfaceScale_Stage2 * m[4]));
+ output_Stage2 = light_Stage2(normal_Stage2(m, uSurfaceScale_Stage2), surfaceToLight, lightColor_Stage2(surfaceToLight));
+ output_Stage2 *= output_Stage1;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/97-22.shader_test b/shaders/skia/97-22.shader_test
new file mode 100644
index 0000000..612ad51
--- /dev/null
+++ b/shaders/skia/97-22.shader_test
@@ -0,0 +1,76 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uCoordTransformMatrix_2_Stage0;
+uniform vec4 usubset_Stage2_c0_c0;
+uniform vec4 uclamp_Stage2_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 TextureEffect_Stage2_c0_c0(vec4 _input, vec2 _coords) {
+ _coords = _coords * uCoordTransformMatrix_2_Stage0.xz + uCoordTransformMatrix_2_Stage0.yw;
+ vec4 _output;
+ vec2 inCoord = _coords;
+ vec2 subsetCoord;
+ subsetCoord.x = mod(inCoord.x - usubset_Stage2_c0_c0.x, usubset_Stage2_c0_c0.z - usubset_Stage2_c0_c0.x) + usubset_Stage2_c0_c0.x;
+ {
+ float w = usubset_Stage2_c0_c0.w - usubset_Stage2_c0_c0.y;
+ float w2 = 2.0 * w;
+ float m = mod(inCoord.y - usubset_Stage2_c0_c0.y, w2);
+ subsetCoord.y = mix(m, w2 - m, step(w, m)) + usubset_Stage2_c0_c0.y;
+ }
+ vec2 clampedCoord;
+ clampedCoord.x = clamp(subsetCoord.x, uclamp_Stage2_c0_c0.x, uclamp_Stage2_c0_c0.z);
+ clampedCoord.y = clamp(subsetCoord.y, uclamp_Stage2_c0_c0.y, uclamp_Stage2_c0_c0.w);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ _output = _input * textureColor;
+ return _output;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ float coord = vTransformedCoords_1_Stage0.y - 0.5;
+ float f = fract(coord);
+ coord += 0.5 - f;
+ float f2 = f * f;
+ vec4 w = mat4(0.055555555555555552, 0.88888888888888884, 0.055555555555555552, 0.0, -0.5, 0.0, 0.5, 0.0, 0.83333333333333337, -2.0, 1.5, -0.33333333333333331, -0.3888888888888889, 1.1666666666666667, -1.1666666666666667, 0.3888888888888889) * vec4(1.0, f, f2, f2 * f);
+ vec4 c[4];
+ c[0] = TextureEffect_Stage2_c0_c0(vec4(1.0), vec2(vTransformedCoords_1_Stage0.x, coord + -1.0));
+ c[1] = TextureEffect_Stage2_c0_c0(vec4(1.0), vec2(vTransformedCoords_1_Stage0.x, coord));
+ c[2] = TextureEffect_Stage2_c0_c0(vec4(1.0), vec2(vTransformedCoords_1_Stage0.x, coord + 1.0));
+ c[3] = TextureEffect_Stage2_c0_c0(vec4(1.0), vec2(vTransformedCoords_1_Stage0.x, coord + 2.0));
+ vec4 bicubicColor = ((c[0] * w.x + c[1] * w.y) + c[2] * w.z) + c[3] * w.w;
+ bicubicColor.xyz = max(vec3(0.0), min(bicubicColor.xyz, bicubicColor.www));
+ output_Stage2 = bicubicColor * output_Stage1;
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/97-3.shader_test b/shaders/skia/97-3.shader_test
new file mode 100644
index 0000000..845ff7a
--- /dev/null
+++ b/shaders/skia/97-3.shader_test
@@ -0,0 +1,85 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uniformColor_Stage1_c0_c0;
+uniform vec4 ucolor_Stage1_c0_c0_c0_c0;
+uniform vec4 ucolor_Stage2;
+uniform vec4 ucolor_Stage3_c1_c0;
+noperspective in vec4 vcolor_Stage0;
+vec4 ConstColorProcessor_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = _input.w * ucolor_Stage1_c0_c0_c0_c0;
+ }
+ return _output;
+}
+vec4 OverrideInputFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 constColor;
+ {
+ constColor = uniformColor_Stage1_c0_c0;
+ }
+ _output = ConstColorProcessor_Stage1_c0_c0_c0_c0(constColor);
+ return _output;
+}
+vec4 ConstColorProcessor_Stage3_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage3_c1_c0;
+ }
+ return _output;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 blend_darken(vec4 src, vec4 dst) {
+ vec4 result = blend_src_over(src, dst);
+ result.xyz = min(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
+ return result;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_src_over(OverrideInputFragmentProcessor_Stage1_c0_c0(vec4(1.0)), outputColor_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ {
+ output_Stage2 = output_Stage1 * ucolor_Stage2;
+ }
+ }
+ vec4 output_Stage3;
+ {
+ output_Stage3 = blend_darken(ConstColorProcessor_Stage3_c1_c0(vec4(1.0)), output_Stage2);
+ }
+ {
+ sk_FragColor = output_Stage3;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uViewM_Stage0;
+in vec2 position;
+in vec4 inColor;
+noperspective out vec4 vcolor_Stage0;
+void main() {
+ vec4 color = inColor;
+ color = color.zyxw;
+ color = vec4(color.xyz * color.w, color.w);
+ vcolor_Stage0 = color;
+ vec2 pos2 = (uViewM_Stage0 * vec3(position, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/97-6.shader_test b/shaders/skia/97-6.shader_test
new file mode 100644
index 0000000..9e0331b
--- /dev/null
+++ b/shaders/skia/97-6.shader_test
@@ -0,0 +1,45 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uinnerRect_Stage1;
+uniform vec2 uradiusPlusHalf_Stage1;
+flat in vec4 vcolor_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec2 dxy0 = uinnerRect_Stage1.xy - gl_FragCoord.xy;
+ float dy1 = gl_FragCoord.y - uinnerRect_Stage1.w;
+ vec2 dxy = max(vec2(dxy0.x, max(dxy0.y, dy1)), 0.0);
+ float rightAlpha = clamp(uinnerRect_Stage1.z - gl_FragCoord.x, 0.0, 1.0);
+ float alpha = rightAlpha * clamp(uradiusPlusHalf_Stage1.x - length(dxy), 0.0, 1.0);
+ alpha = 1.0 - alpha;
+ output_Stage1 = vec4(alpha);
+ }
+ {
+ sk_FragColor = outputColor_Stage0 * output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 position;
+in vec4 color;
+flat out vec4 vcolor_Stage0;
+void main() {
+ vcolor_Stage0 = color;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/97-7.shader_test b/shaders/skia/97-7.shader_test
new file mode 100644
index 0000000..ddaf0c6
--- /dev/null
+++ b/shaders/skia/97-7.shader_test
@@ -0,0 +1,78 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 ustart_Stage1_c0_c0_c1_c0;
+uniform vec4 uend_Stage1_c0_c0_c1_c0;
+uniform vec4 ucolor_Stage2_c1_c0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = vTransformedCoords_0_Stage0.x + 9.9999997473787516e-06;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage1_c0_c0_c1_c0 + t * uend_Stage1_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = LinearGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ return _output;
+}
+vec4 ConstColorProcessor_Stage2_c1_c0(vec4 _input) {
+ vec4 _output;
+ {
+ _output = ucolor_Stage2_c1_c0;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = ClampedGradientEffect_Stage1_c0_c0(vec4(1.0, 1.0, 1.0, 1.0));
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_dst_in(ConstColorProcessor_Stage2_c1_c0(vec4(1.0)), output_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/97-8.shader_test b/shaders/skia/97-8.shader_test
new file mode 100644
index 0000000..6d4ee76
--- /dev/null
+++ b/shaders/skia/97-8.shader_test
@@ -0,0 +1,41 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform float uPixelSize_Stage1;
+uniform vec2 uRange_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = vec4(1.0, 1.0, 1.0, 1.0);
+ vec2 coord = vTransformedCoords_0_Stage0;
+ coord.x -= 16.0 * uPixelSize_Stage1;
+ for (int i = 0;i < 33; i++) {
+ output_Stage1 = min(output_Stage1, texture(uTextureSampler_0_Stage1, coord));
+ coord.x += uPixelSize_Stage1;
+ }
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/97-9.shader_test b/shaders/skia/97-9.shader_test
new file mode 100644
index 0000000..9566dc8
--- /dev/null
+++ b/shaders/skia/97-9.shader_test
@@ -0,0 +1,140 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec2 uImageIncrement_Stage1;
+uniform float uSurfaceScale_Stage1;
+uniform vec3 uLightColor_Stage1;
+uniform float uKS_Stage1;
+uniform float uShininess_Stage1;
+uniform vec3 uLightLocation_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+vec4 light_Stage1(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ vec3 halfDir = normalize(surfaceToLight + vec3(0.0, 0.0, 1.0));
+ float colorScale = uKS_Stage1 * pow(dot(normal, halfDir), uShininess_Stage1);
+ vec3 color = lightColor * clamp(colorScale, 0.0, 1.0);
+ return vec4(color, max(max(color.x, color.y), color.z));
+}
+float sobel_Stage1(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage1(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage1(float m[9], float surfaceScale) {
+ return pointToNormal_Stage1(sobel_Stage1(m[1], m[2], m[4], m[5], m[7], m[8], 0.5), sobel_Stage1(0.0, 0.0, m[1], m[7], m[2], m[8], 0.33333298563957214), surfaceScale);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ vec2 coord = vTransformedCoords_0_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp0 = textureColor;
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp1 = textureColor;
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp2 = textureColor;
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp3 = textureColor;
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp4 = textureColor;
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp5 = textureColor;
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp6 = textureColor;
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp7 = textureColor;
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage1;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ temp8 = textureColor;
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = normalize(uLightLocation_Stage1 - vec3(gl_FragCoord.xy, uSurfaceScale_Stage1 * m[4]));
+ output_Stage1 = light_Stage1(normal_Stage1(m, uSurfaceScale_Stage1), surfaceToLight, uLightColor_Stage1);
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/97.shader_test b/shaders/skia/97.shader_test
new file mode 100644
index 0000000..57cc92e
--- /dev/null
+++ b/shaders/skia/97.shader_test
@@ -0,0 +1,68 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uborder_Stage1;
+uniform vec4 usubset_Stage1;
+uniform vec4 unorm_Stage1;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 TextureEffect_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = texture(uTextureSampler_0_Stage2, vTransformedCoords_1_Stage0) * _input;
+ return _output;
+}
+vec4 blend_screen(vec4 src, vec4 dst) {
+ return src + (1.0 - src) * dst;
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ vec2 inCoord = vTransformedCoords_0_Stage0;
+ inCoord *= unorm_Stage1.xy;
+ vec2 subsetCoord;
+ subsetCoord.x = inCoord.x;
+ subsetCoord.y = inCoord.y;
+ vec2 clampedCoord;
+ clampedCoord.x = subsetCoord.x;
+ clampedCoord.y = subsetCoord.y;
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord * unorm_Stage1.zw);
+ if (inCoord.x < usubset_Stage1.x || inCoord.x > usubset_Stage1.z) {
+ textureColor = uborder_Stage1;
+ }
+ if (inCoord.y < usubset_Stage1.y || inCoord.y > usubset_Stage1.w) {
+ textureColor = uborder_Stage1;
+ }
+ output_Stage1 = textureColor;
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_screen(output_Stage1, TextureEffect_Stage2_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/970-1.shader_test b/shaders/skia/970-1.shader_test
new file mode 100644
index 0000000..26d59bd
--- /dev/null
+++ b/shaders/skia/970-1.shader_test
@@ -0,0 +1,94 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage2_c0_c0;
+uniform vec4 urightBorderColor_Stage2_c0_c0;
+uniform vec2 ufocalParams_Stage2_c0_c0_c0_c0;
+uniform vec4 ustart_Stage2_c0_c0_c1_c0;
+uniform vec4 uend_Stage2_c0_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage2_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_1_Stage0;
+ float t = -1.0;
+ float v = 1.0;
+ {
+ {
+ float r0_2 = ufocalParams_Stage2_c0_c0_c0_c0.y;
+ t = r0_2 - p.y * p.y;
+ if (t >= 0.0) {
+ t = p.x + sqrt(t);
+ } else {
+ v = -1.0;
+ }
+ }
+ }
+ _output = vec4(t, v, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage2_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage2_c0_c0_c1_c0 + t * uend_Stage2_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage2_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage2_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage2_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage2_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_dst_in(output_Stage1, ClampedGradientEffect_Stage2_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/973-1.shader_test b/shaders/skia/973-1.shader_test
new file mode 100644
index 0000000..37b4910
--- /dev/null
+++ b/shaders/skia/973-1.shader_test
@@ -0,0 +1,127 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage2_c0_c0;
+uniform vec4 urightBorderColor_Stage2_c0_c0;
+uniform vec2 ufocalParams_Stage2_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage2_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage2_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage2_c0_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage2_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_1_Stage0;
+ float t = -1.0;
+ {
+ {
+ float invR1 = ufocalParams_Stage2_c0_c0_c0_c0.x;
+ float x_t = -1.0;
+ {
+ x_t = length(p) - p.x * invR1;
+ }
+ {
+ {
+ t = x_t;
+ }
+ }
+ {
+ t = 1.0 - t;
+ }
+ }
+ }
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage2_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage2_c0_c0_c1_c0;
+ bias = ubias0_1_Stage2_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage2_c0_c0_c1_c0;
+ bias = ubias2_3_Stage2_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage2_c0_c0_c1_c0;
+ bias = ubias4_5_Stage2_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage2_c0_c0_c1_c0;
+ bias = ubias6_7_Stage2_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage2_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage2_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage2_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage2_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_dst_in(output_Stage1, ClampedGradientEffect_Stage2_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/976-1.shader_test b/shaders/skia/976-1.shader_test
new file mode 100644
index 0000000..600db1c
--- /dev/null
+++ b/shaders/skia/976-1.shader_test
@@ -0,0 +1,117 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 ufocalParams_Stage2_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage2_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage2_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage2_c0_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage2_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_1_Stage0;
+ float t = -1.0;
+ {
+ {
+ float r0 = ufocalParams_Stage2_c0_c0_c0_c0.x;
+ {
+ t = -length(p) - r0;
+ }
+ }
+ }
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage2_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage2_c0_c0_c1_c0;
+ bias = ubias0_1_Stage2_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage2_c0_c0_c1_c0;
+ bias = ubias2_3_Stage2_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage2_c0_c0_c1_c0;
+ bias = ubias4_5_Stage2_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage2_c0_c0_c1_c0;
+ bias = ubias6_7_Stage2_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage2_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage2_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_dst_in(output_Stage1, TiledGradientEffect_Stage2_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/979-1.shader_test b/shaders/skia/979-1.shader_test
new file mode 100644
index 0000000..b6bd3d4
--- /dev/null
+++ b/shaders/skia/979-1.shader_test
@@ -0,0 +1,138 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage2_c0_c0;
+uniform vec4 urightBorderColor_Stage2_c0_c0;
+uniform vec2 ufocalParams_Stage2_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale8_9_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias8_9_Stage2_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage2_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage2_c0_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage2_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_1_Stage0;
+ float t = -1.0;
+ float v = 1.0;
+ {
+ {
+ float x_t = -1.0;
+ {
+ x_t = dot(p, p) / p.x;
+ }
+ {
+ if (x_t <= 0.0) {
+ v = -1.0;
+ }
+ }
+ {
+ {
+ t = x_t;
+ }
+ }
+ }
+ }
+ _output = vec4(t, v, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage2_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.w) {
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage2_c0_c0_c1_c0;
+ bias = ubias0_1_Stage2_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage2_c0_c0_c1_c0;
+ bias = ubias2_3_Stage2_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage2_c0_c0_c1_c0;
+ bias = ubias4_5_Stage2_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage2_c0_c0_c1_c0;
+ bias = ubias6_7_Stage2_c0_c0_c1_c0;
+ }
+ }
+ } else {
+ {
+ {
+ scale = uscale8_9_Stage2_c0_c0_c1_c0;
+ bias = ubias8_9_Stage2_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage2_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage2_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage2_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage2_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_dst_in(output_Stage1, ClampedGradientEffect_Stage2_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/979.shader_test b/shaders/skia/979.shader_test
new file mode 100644
index 0000000..3858c1d
--- /dev/null
+++ b/shaders/skia/979.shader_test
@@ -0,0 +1,302 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_KHR_blend_equation_advanced : require
+out vec4 sk_FragColor;
+layout (blend_support_all_equations) out ;
+uniform vec2 uImageIncrement_Stage1_c0_c0;
+uniform float uSurfaceScale_Stage1_c0_c0;
+uniform vec3 uLightColor_Stage1_c0_c0;
+uniform float uKD_Stage1_c0_c0;
+uniform vec4 uTexDom_Stage1_c0_c0;
+uniform vec3 uDecalParams_Stage1_c0_c0;
+uniform vec3 uLightLocation_Stage1_c0_c0;
+uniform vec4 ucircle_Stage1_c1_c0_c0_c0_c0_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+noperspective in vec2 vEllipseOffsets0_Stage0;
+noperspective in vec2 vEllipseOffsets1_Stage0;
+noperspective in vec4 vinColor_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec3 vTransformedCoords_1_Stage0;
+vec4 light_Stage1_c0_c0(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ float colorScale = uKD_Stage1_c0_c0 * dot(normal, surfaceToLight);
+ return vec4(lightColor * clamp(colorScale, 0.0, 1.0), 1.0);
+}
+float sobel_Stage1_c0_c0(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage1_c0_c0(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage1_c0_c0(float m[9], float surfaceScale) {
+ return pointToNormal_Stage1_c0_c0(sobel_Stage1_c0_c0(m[1], m[2], m[4], m[5], 0.0, 0.0, 0.66666698455810547), sobel_Stage1_c0_c0(0.0, 0.0, m[1], m[4], m[2], m[5], 0.66666698455810547), surfaceScale);
+}
+vec4 DiffuseLighting_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coord = vTransformedCoords_0_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage1_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0.xy, uTexDom_Stage1_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp0 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0.xy, uTexDom_Stage1_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0.xy, uTexDom_Stage1_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage1_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0.xy, uTexDom_Stage1_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0.xy, uTexDom_Stage1_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0.xy, uTexDom_Stage1_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp5 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage1_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0.xy, uTexDom_Stage1_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp6 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage1_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0.xy, uTexDom_Stage1_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp7 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage1_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0.xy, uTexDom_Stage1_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp8 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = normalize(uLightLocation_Stage1_c0_c0 - vec3(gl_FragCoord.xy, uSurfaceScale_Stage1_c0_c0 * m[4]));
+ _output = light_Stage1_c0_c0(normal_Stage1_c0_c0(m, uSurfaceScale_Stage1_c0_c0), surfaceToLight, uLightColor_Stage1_c0_c0);
+ _output *= _input;
+ return _output;
+}
+vec4 CircleEffect_Stage1_c1_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float d;
+ {
+ d = (1.0 - length((ucircle_Stage1_c1_c0_c0_c0_c0_c0.xy - gl_FragCoord.xy) * ucircle_Stage1_c1_c0_c0_c0_c0_c0.w)) * ucircle_Stage1_c1_c0_c0_c0_c0_c0.z;
+ }
+ {
+ _output = _input * clamp(d, 0.0, 1.0);
+ }
+ return _output;
+}
+vec4 Big_Ole_Key_Stage1_c1_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = _input;
+ return _output;
+}
+float _guarded_divide(float n, float d) {
+ return n / d;
+}
+float _color_burn_component(float sc, float sa, float dc, float da) {
+ if (da == dc) {
+ return (sa * da + sc * (1.0 - da)) + dc * (1.0 - sa);
+ } else if (sc == 0.0) {
+ return dc * (1.0 - sa);
+ }
+ float d = max(0.0, da - _guarded_divide((da - dc) * sa, sc));
+ return (d * sa + sc * (1.0 - da)) + dc * (1.0 - sa);
+}
+vec4 blend_color_burn(vec4 src, vec4 dst) {
+ return vec4(_color_burn_component(src.x, src.w, dst.x, dst.w), _color_burn_component(src.y, src.w, dst.y, dst.w), _color_burn_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+}
+vec4 ComposeTwo_Stage1_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_color_burn(CircleEffect_Stage1_c1_c0_c0_c0_c0_c0(inputColor), Big_Ole_Key_Stage1_c1_c0_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 TextureEffect_Stage1_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = textureProj(uTextureSampler_1_Stage1, vTransformedCoords_1_Stage0) * _input;
+ return _output;
+}
+float _color_dodge_component(float sc, float sa, float dc, float da) {
+ if (dc == 0.0) {
+ return sc * (1.0 - da);
+ } else {
+ float d = sa - sc;
+ if (d == 0.0) {
+ return (sa * da + sc * (1.0 - da)) + dc * (1.0 - sa);
+ }
+ d = min(da, _guarded_divide(dc * sa, d));
+ return (d * sa + sc * (1.0 - da)) + dc * (1.0 - sa);
+ }
+}
+vec4 blend_color_dodge(vec4 src, vec4 dst) {
+ return vec4(_color_dodge_component(src.x, src.w, dst.x, dst.w), _color_dodge_component(src.y, src.w, dst.y, dst.w), _color_dodge_component(src.z, src.w, dst.z, dst.w), src.w + (1.0 - src.w) * dst.w);
+}
+vec4 ComposeTwo_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_color_dodge(ComposeTwo_Stage1_c1_c0_c0_c0(inputColor), TextureEffect_Stage1_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 blend_multiply(vec4 src, vec4 dst) {
+ return vec4(((1.0 - src.w) * dst.xyz + (1.0 - dst.w) * src.xyz) + src.xyz * dst.xyz, src.w + (1.0 - src.w) * dst.w);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vinColor_Stage0;
+ vec2 scaledOffset = vEllipseOffsets0_Stage0;
+ float test = dot(scaledOffset, scaledOffset) - 1.0;
+ vec2 duvdx = dFdx(vEllipseOffsets0_Stage0);
+ vec2 duvdy = dFdy(vEllipseOffsets0_Stage0);
+ vec2 grad = vec2(vEllipseOffsets0_Stage0.x * duvdx.x + vEllipseOffsets0_Stage0.y * duvdx.y, vEllipseOffsets0_Stage0.x * duvdy.x + vEllipseOffsets0_Stage0.y * duvdy.y);
+ float grad_dot = 4.0 * dot(grad, grad);
+ grad_dot = max(grad_dot, 1.1754999560161448e-38);
+ float invlen = inversesqrt(grad_dot);
+ float edgeAlpha = clamp(0.5 - test * invlen, 0.0, 1.0);
+ outputCoverage_Stage0 = vec4(edgeAlpha);
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_multiply(DiffuseLighting_Stage1_c0_c0(inputColor), ComposeTwo_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ sk_FragColor = outputCoverage_Stage0 * output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 inPosition;
+in vec4 inColor;
+in vec2 inEllipseOffsets0;
+in vec2 inEllipseOffsets1;
+noperspective out vec2 vEllipseOffsets0_Stage0;
+noperspective out vec2 vEllipseOffsets1_Stage0;
+noperspective out vec4 vinColor_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec3 vTransformedCoords_1_Stage0;
+void main() {
+ vEllipseOffsets0_Stage0 = inEllipseOffsets0;
+ vEllipseOffsets1_Stage0 = inEllipseOffsets1;
+ vinColor_Stage0 = inColor;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = uCoordTransformMatrix_1_Stage0 * vec3(inPosition, 1.0);
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/982-1.shader_test b/shaders/skia/982-1.shader_test
new file mode 100644
index 0000000..986e395
--- /dev/null
+++ b/shaders/skia/982-1.shader_test
@@ -0,0 +1,122 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage2_c0_c0;
+uniform vec4 urightBorderColor_Stage2_c0_c0;
+uniform vec2 ufocalParams_Stage2_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage2_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage2_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage2_c0_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage2_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_1_Stage0;
+ float t = -1.0;
+ {
+ {
+ float invR1 = ufocalParams_Stage2_c0_c0_c0_c0.x;
+ float x_t = -1.0;
+ {
+ x_t = length(p) - p.x * invR1;
+ }
+ {
+ {
+ t = x_t;
+ }
+ }
+ {
+ t = 1.0 - t;
+ }
+ }
+ }
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage2_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage2_c0_c0_c1_c0;
+ bias = ubias0_1_Stage2_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage2_c0_c0_c1_c0;
+ bias = ubias2_3_Stage2_c0_c0_c1_c0;
+ }
+ } else {
+ {
+ scale = uscale4_5_Stage2_c0_c0_c1_c0;
+ bias = ubias4_5_Stage2_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage2_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage2_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage2_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage2_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_dst_in(output_Stage1, ClampedGradientEffect_Stage2_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/982.shader_test b/shaders/skia/982.shader_test
new file mode 100644
index 0000000..67095b2
--- /dev/null
+++ b/shaders/skia/982.shader_test
@@ -0,0 +1,453 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_KHR_blend_equation_advanced : require
+out vec4 sk_FragColor;
+layout (blend_support_all_equations) out ;
+uniform vec4 uleftBorderColor_Stage1_c0_c0;
+uniform vec4 urightBorderColor_Stage1_c0_c0;
+uniform vec4 uscale0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage1_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage1_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage1_c0_c0_c1_c0;
+uniform vec2 uImageIncrement_Stage2;
+uniform float uSurfaceScale_Stage2;
+uniform vec3 uLightColor_Stage2;
+uniform float uKS_Stage2;
+uniform float uShininess_Stage2;
+uniform vec4 uTexDom_Stage2;
+uniform vec3 uDecalParams_Stage2;
+uniform vec3 uLightLocation_Stage2;
+uniform vec2 uImageIncrement_Stage3;
+uniform float uSurfaceScale_Stage3;
+uniform vec3 uLightColor_Stage3;
+uniform float uKD_Stage3;
+uniform vec4 uTexDom_Stage3;
+uniform vec3 uDecalParams_Stage3;
+uniform vec3 uLightLocation_Stage3;
+uniform float uExponent_Stage3;
+uniform float uCosInnerConeAngle_Stage3;
+uniform float uCosOuterConeAngle_Stage3;
+uniform float uConeScale_Stage3;
+uniform vec3 uS_Stage3;
+uniform sampler2D uTextureSampler_0_Stage2;
+uniform sampler2D uTextureSampler_0_Stage3;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+vec4 RadialGradientLayout_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float t = length(vTransformedCoords_0_Stage0);
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage1_c0_c0_c1_c0;
+ bias = ubias0_1_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage1_c0_c0_c1_c0;
+ bias = ubias2_3_Stage1_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage1_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage1_c0_c0_c1_c0;
+ bias = ubias4_5_Stage1_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage1_c0_c0_c1_c0;
+ bias = ubias6_7_Stage1_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = RadialGradientLayout_Stage1_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage1_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage1_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage1_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 light_Stage2(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ vec3 halfDir = normalize(surfaceToLight + vec3(0.0, 0.0, 1.0));
+ float colorScale = uKS_Stage2 * pow(dot(normal, halfDir), uShininess_Stage2);
+ vec3 color = lightColor * clamp(colorScale, 0.0, 1.0);
+ return vec4(color, max(max(color.x, color.y), color.z));
+}
+float sobel_Stage2(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage2(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage2(float m[9], float surfaceScale) {
+ return pointToNormal_Stage2(sobel_Stage2(0.0, 0.0, m[3], m[4], m[6], m[7], 0.66666698455810547), sobel_Stage2(m[3], m[6], m[4], m[7], 0.0, 0.0, 0.66666698455810547), surfaceScale);
+}
+vec4 light_Stage3(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ float colorScale = uKD_Stage3 * dot(normal, surfaceToLight);
+ return vec4(lightColor * clamp(colorScale, 0.0, 1.0), 1.0);
+}
+float sobel_Stage3(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage3(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage3(float m[9], float surfaceScale) {
+ return pointToNormal_Stage3(sobel_Stage3(m[0], m[1], m[3], m[4], 0.0, 0.0, 0.66666698455810547), sobel_Stage3(m[0], m[3], m[1], m[4], 0.0, 0.0, 0.66666698455810547), surfaceScale);
+}
+vec3 lightColor_Stage3(vec3 surfaceToLight) {
+ float cosAngle = -dot(surfaceToLight, uS_Stage3);
+ if (cosAngle < uCosOuterConeAngle_Stage3) {
+ return vec3(0.0);
+ }
+ float scale = pow(cosAngle, uExponent_Stage3);
+ if (cosAngle < uCosInnerConeAngle_Stage3) {
+ return ((uLightColor_Stage3 * scale) * (cosAngle - uCosOuterConeAngle_Stage3)) * uConeScale_Stage3;
+ }
+ return uLightColor_Stage3;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = blend_dst_in(vec4(1.0), ClampedGradientEffect_Stage1_c0_c0(vec4(1.0)));
+ }
+ vec4 output_Stage2;
+ {
+ vec2 coord = vTransformedCoords_1_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp0 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp5 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp6 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp7 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage2.xy, uTexDom_Stage2.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage2.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage2.y);
+ if (err > uDecalParams_Stage2.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage2.z < 1.0) {
+ err = 0.0;
+ }
+ temp8 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = normalize(uLightLocation_Stage2 - vec3(gl_FragCoord.xy, uSurfaceScale_Stage2 * m[4]));
+ output_Stage2 = light_Stage2(normal_Stage2(m, uSurfaceScale_Stage2), surfaceToLight, uLightColor_Stage2);
+ }
+ vec4 output_Stage3;
+ {
+ vec2 coord = vTransformedCoords_2_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage3;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage3.xy, uTexDom_Stage3.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage3, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage3.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage3.y);
+ if (err > uDecalParams_Stage3.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage3.z < 1.0) {
+ err = 0.0;
+ }
+ temp0 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage3;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage3.xy, uTexDom_Stage3.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage3, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage3.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage3.y);
+ if (err > uDecalParams_Stage3.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage3.z < 1.0) {
+ err = 0.0;
+ }
+ temp1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage3;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage3.xy, uTexDom_Stage3.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage3, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage3.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage3.y);
+ if (err > uDecalParams_Stage3.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage3.z < 1.0) {
+ err = 0.0;
+ }
+ temp2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage3;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage3.xy, uTexDom_Stage3.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage3, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage3.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage3.y);
+ if (err > uDecalParams_Stage3.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage3.z < 1.0) {
+ err = 0.0;
+ }
+ temp3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage3.xy, uTexDom_Stage3.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage3, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage3.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage3.y);
+ if (err > uDecalParams_Stage3.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage3.z < 1.0) {
+ err = 0.0;
+ }
+ temp4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage3;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage3.xy, uTexDom_Stage3.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage3, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage3.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage3.y);
+ if (err > uDecalParams_Stage3.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage3.z < 1.0) {
+ err = 0.0;
+ }
+ temp5 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage3;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage3.xy, uTexDom_Stage3.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage3, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage3.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage3.y);
+ if (err > uDecalParams_Stage3.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage3.z < 1.0) {
+ err = 0.0;
+ }
+ temp6 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage3;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage3.xy, uTexDom_Stage3.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage3, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage3.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage3.y);
+ if (err > uDecalParams_Stage3.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage3.z < 1.0) {
+ err = 0.0;
+ }
+ temp7 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage3;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage3.xy, uTexDom_Stage3.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage3, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage3.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage3.y);
+ if (err > uDecalParams_Stage3.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage3.z < 1.0) {
+ err = 0.0;
+ }
+ temp8 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = normalize(uLightLocation_Stage3 - vec3(gl_FragCoord.xy, uSurfaceScale_Stage3 * m[4]));
+ output_Stage3 = light_Stage3(normal_Stage3(m, uSurfaceScale_Stage3), surfaceToLight, lightColor_Stage3(surfaceToLight));
+ output_Stage3 *= output_Stage2;
+ }
+ {
+ sk_FragColor = output_Stage3 * output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/985-1.shader_test b/shaders/skia/985-1.shader_test
new file mode 100644
index 0000000..95e9ad3
--- /dev/null
+++ b/shaders/skia/985-1.shader_test
@@ -0,0 +1,132 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 ufocalParams_Stage2_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage2_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage2_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage2_c0_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage2_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_1_Stage0;
+ float t = -1.0;
+ float v = 1.0;
+ {
+ {
+ float invR1 = ufocalParams_Stage2_c0_c0_c0_c0.x;
+ float x_t = -1.0;
+ {
+ float temp = p.x * p.x - p.y * p.y;
+ if (temp >= 0.0) {
+ {
+ x_t = sqrt(temp) - p.x * invR1;
+ }
+ }
+ }
+ {
+ if (x_t <= 0.0) {
+ v = -1.0;
+ }
+ }
+ {
+ {
+ t = x_t;
+ }
+ }
+ }
+ }
+ _output = vec4(t, v, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage2_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage2_c0_c0_c1_c0;
+ bias = ubias0_1_Stage2_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage2_c0_c0_c1_c0;
+ bias = ubias2_3_Stage2_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage2_c0_c0_c1_c0;
+ bias = ubias4_5_Stage2_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage2_c0_c0_c1_c0;
+ bias = ubias6_7_Stage2_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage2_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else {
+ {
+ t.x = fract(t.x);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage2_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_dst_in(output_Stage1, TiledGradientEffect_Stage2_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/988-1.shader_test b/shaders/skia/988-1.shader_test
new file mode 100644
index 0000000..dcdc216
--- /dev/null
+++ b/shaders/skia/988-1.shader_test
@@ -0,0 +1,90 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage2_c0_c0;
+uniform vec4 urightBorderColor_Stage2_c0_c0;
+uniform vec2 ufocalParams_Stage2_c0_c0_c0_c0;
+uniform vec4 ustart_Stage2_c0_c0_c1_c0;
+uniform vec4 uend_Stage2_c0_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage2_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_1_Stage0;
+ float t = -1.0;
+ {
+ {
+ float r0 = ufocalParams_Stage2_c0_c0_c0_c0.x;
+ {
+ t = -length(p) - r0;
+ }
+ }
+ }
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 SingleIntervalGradientColorizer_Stage2_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ _output = (1.0 - t) * ustart_Stage2_c0_c0_c1_c0 + t * uend_Stage2_c0_c0_c1_c0;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage2_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage2_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage2_c0_c0;
+ } else {
+ _output = SingleIntervalGradientColorizer_Stage2_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_dst_in(output_Stage1, ClampedGradientEffect_Stage2_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/988.shader_test b/shaders/skia/988.shader_test
new file mode 100644
index 0000000..7542dc1
--- /dev/null
+++ b/shaders/skia/988.shader_test
@@ -0,0 +1,155 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_KHR_blend_equation_advanced : require
+out vec4 sk_FragColor;
+layout (blend_support_all_equations) out ;
+uniform vec4 ucircleData_Stage1_c0_c0;
+uniform vec4 ucircleData_Stage1_c1_c0_c0_c0_c0_c0;
+uniform float ucornerRadius_Stage1_c1_c0_c1_c0_c0_c0;
+uniform vec4 uproxyRect_Stage1_c1_c0_c1_c0_c0_c0;
+uniform float ublurRadius_Stage1_c1_c0_c1_c0_c0_c0;
+uniform float ucornerRadius_Stage1_c1_c0_c1_c0_c1_c0;
+uniform vec4 uproxyRect_Stage1_c1_c0_c1_c0_c1_c0;
+uniform float ublurRadius_Stage1_c1_c0_c1_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+uniform sampler2D uTextureSampler_2_Stage1;
+uniform sampler2D uTextureSampler_3_Stage1;
+noperspective in vec4 vcolor_Stage0;
+noperspective in float vinCoverage_Stage0;
+vec4 CircleBlurFragmentProcessor_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 vec = vec2((gl_FragCoord.x - ucircleData_Stage1_c0_c0.x) * ucircleData_Stage1_c0_c0.w, (gl_FragCoord.y - ucircleData_Stage1_c0_c0.y) * ucircleData_Stage1_c0_c0.w);
+ float dist = length(vec) + (0.5 - ucircleData_Stage1_c0_c0.z) * ucircleData_Stage1_c0_c0.w;
+ _output = _input * texture(uTextureSampler_0_Stage1, vec2(dist, 0.5)).w;
+ return _output;
+}
+vec4 CircleBlurFragmentProcessor_Stage1_c1_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 vec = vec2((gl_FragCoord.x - ucircleData_Stage1_c1_c0_c0_c0_c0_c0.x) * ucircleData_Stage1_c1_c0_c0_c0_c0_c0.w, (gl_FragCoord.y - ucircleData_Stage1_c1_c0_c0_c0_c0_c0.y) * ucircleData_Stage1_c1_c0_c0_c0_c0_c0.w);
+ float dist = length(vec) + (0.5 - ucircleData_Stage1_c1_c0_c0_c0_c0_c0.z) * ucircleData_Stage1_c1_c0_c0_c0_c0_c0.w;
+ _output = _input * texture(uTextureSampler_1_Stage1, vec2(dist, 0.5)).w;
+ return _output;
+}
+vec4 Big_Ole_Key_Stage1_c1_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = _input;
+ return _output;
+}
+vec4 blend_dst_atop(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src + src.w * dst;
+}
+vec4 ComposeTwo_Stage1_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_dst_atop(CircleBlurFragmentProcessor_Stage1_c1_c0_c0_c0_c0_c0(inputColor), Big_Ole_Key_Stage1_c1_c0_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 RRectBlurEffect_Stage1_c1_c0_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 translatedFragPos = gl_FragCoord.xy - uproxyRect_Stage1_c1_c0_c1_c0_c0_c0.xy;
+ float threshold = ucornerRadius_Stage1_c1_c0_c1_c0_c0_c0 + 2.0 * ublurRadius_Stage1_c1_c0_c1_c0_c0_c0;
+ vec2 middle = (uproxyRect_Stage1_c1_c0_c1_c0_c0_c0.zw - uproxyRect_Stage1_c1_c0_c1_c0_c0_c0.xy) - 2.0 * threshold;
+ if (translatedFragPos.x >= threshold && translatedFragPos.x < middle.x + threshold) {
+ translatedFragPos.x = threshold;
+ } else if (translatedFragPos.x >= middle.x + threshold) {
+ translatedFragPos.x -= middle.x - 1.0;
+ }
+ if (translatedFragPos.y > threshold && translatedFragPos.y < middle.y + threshold) {
+ translatedFragPos.y = threshold;
+ } else if (translatedFragPos.y >= middle.y + threshold) {
+ translatedFragPos.y -= middle.y - 1.0;
+ }
+ vec2 proxyDims = vec2(2.0 * threshold + 1.0);
+ vec2 texCoord = translatedFragPos / proxyDims;
+ _output = _input * texture(uTextureSampler_2_Stage1, texCoord);
+ return _output;
+}
+vec4 RRectBlurEffect_Stage1_c1_c0_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 translatedFragPos = gl_FragCoord.xy - uproxyRect_Stage1_c1_c0_c1_c0_c1_c0.xy;
+ float threshold = ucornerRadius_Stage1_c1_c0_c1_c0_c1_c0 + 2.0 * ublurRadius_Stage1_c1_c0_c1_c0_c1_c0;
+ vec2 middle = (uproxyRect_Stage1_c1_c0_c1_c0_c1_c0.zw - uproxyRect_Stage1_c1_c0_c1_c0_c1_c0.xy) - 2.0 * threshold;
+ if (translatedFragPos.x >= threshold && translatedFragPos.x < middle.x + threshold) {
+ translatedFragPos.x = threshold;
+ } else if (translatedFragPos.x >= middle.x + threshold) {
+ translatedFragPos.x -= middle.x - 1.0;
+ }
+ if (translatedFragPos.y > threshold && translatedFragPos.y < middle.y + threshold) {
+ translatedFragPos.y = threshold;
+ } else if (translatedFragPos.y >= middle.y + threshold) {
+ translatedFragPos.y -= middle.y - 1.0;
+ }
+ vec2 proxyDims = vec2(2.0 * threshold + 1.0);
+ vec2 texCoord = translatedFragPos / proxyDims;
+ _output = _input * texture(uTextureSampler_3_Stage1, texCoord);
+ return _output;
+}
+vec4 blend_plus(vec4 src, vec4 dst) {
+ return min(src + dst, 1.0);
+}
+vec4 ComposeTwo_Stage1_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_plus(RRectBlurEffect_Stage1_c1_c0_c1_c0_c0_c0(inputColor), RRectBlurEffect_Stage1_c1_c0_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 ComposeTwo_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_plus(ComposeTwo_Stage1_c1_c0_c0_c0(inputColor), ComposeTwo_Stage1_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 blend_darken(vec4 src, vec4 dst) {
+ vec4 result = blend_src_over(src, dst);
+ result.xyz = min(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
+ return result;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = vcolor_Stage0;
+ float alpha = 1.0;
+ alpha = vinCoverage_Stage0;
+ outputCoverage_Stage0 = vec4(alpha);
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_darken(CircleBlurFragmentProcessor_Stage1_c0_c0(inputColor), ComposeTwo_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ sk_FragColor = outputCoverage_Stage0 * output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+in vec2 inPosition;
+in vec4 inColor;
+in float inCoverage;
+noperspective out vec4 vcolor_Stage0;
+noperspective out float vinCoverage_Stage0;
+void main() {
+ vec4 color = inColor;
+ vcolor_Stage0 = color;
+ vec2 pos2 = inPosition;
+ vinCoverage_Stage0 = inCoverage;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/991-1.shader_test b/shaders/skia/991-1.shader_test
new file mode 100644
index 0000000..f8c363d
--- /dev/null
+++ b/shaders/skia/991-1.shader_test
@@ -0,0 +1,126 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 ufocalParams_Stage2_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale8_9_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias8_9_Stage2_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage2_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage2_c0_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage2_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_1_Stage0;
+ float t = -1.0;
+ {
+ {
+ float r0 = ufocalParams_Stage2_c0_c0_c0_c0.x;
+ {
+ t = length(p) - r0;
+ }
+ }
+ }
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage2_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.w) {
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage2_c0_c0_c1_c0;
+ bias = ubias0_1_Stage2_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage2_c0_c0_c1_c0;
+ bias = ubias2_3_Stage2_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage2_c0_c0_c1_c0;
+ bias = ubias4_5_Stage2_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage2_c0_c0_c1_c0;
+ bias = ubias6_7_Stage2_c0_c0_c1_c0;
+ }
+ }
+ } else {
+ {
+ {
+ scale = uscale8_9_Stage2_c0_c0_c1_c0;
+ bias = ubias8_9_Stage2_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage2_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage2_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_dst_in(output_Stage1, TiledGradientEffect_Stage2_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/991.shader_test b/shaders/skia/991.shader_test
new file mode 100644
index 0000000..5bf5c40
--- /dev/null
+++ b/shaders/skia/991.shader_test
@@ -0,0 +1,291 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+uniform vec4 uColor_Stage0;
+uniform vec3 uedges_Stage1[8];
+uniform vec2 uImageIncrement_Stage2;
+uniform vec4 uKernel_Stage2[4];
+uniform vec2 uKernelOffset_Stage2;
+uniform float uGain_Stage2;
+uniform float uBias_Stage2;
+uniform vec3 uedges_Stage3[6];
+uniform sampler2D uTextureSampler_0_Stage2;
+noperspective in vec3 vDashParams_Stage0;
+noperspective in vec4 vRectParams_Stage0;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vec4 outputColor_Stage0;
+ vec4 outputCoverage_Stage0;
+ {
+ outputColor_Stage0 = uColor_Stage0;
+ float xShifted = vDashParams_Stage0.x - floor(vDashParams_Stage0.x / vDashParams_Stage0.z) * vDashParams_Stage0.z;
+ vec2 fragPosShifted = vec2(xShifted, vDashParams_Stage0.y);
+ float xSub, ySub;
+ xSub = min(fragPosShifted.x - vRectParams_Stage0.x, 0.0);
+ xSub += min(vRectParams_Stage0.z - fragPosShifted.x, 0.0);
+ ySub = min(fragPosShifted.y - vRectParams_Stage0.y, 0.0);
+ ySub += min(vRectParams_Stage0.w - fragPosShifted.y, 0.0);
+ float alpha = (1.0 + max(xSub, -1.0)) * (1.0 + max(ySub, -1.0));
+ outputCoverage_Stage0 = vec4(alpha);
+ }
+ vec4 output_Stage1;
+ {
+ float alpha = 1.0;
+ float edge;
+ edge = dot(uedges_Stage1[0], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage1[1], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage1[2], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage1[3], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage1[4], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage1[5], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage1[6], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage1[7], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ alpha = 1.0 - alpha;
+ output_Stage1 = outputCoverage_Stage0 * alpha;
+ }
+ vec4 output_Stage2;
+ {
+ vec4 sum = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0 - uKernelOffset_Stage2 * uImageIncrement_Stage2;
+ vec4 c;
+ {
+ float k = uKernel_Stage2[0].x;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[0].y;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[0].z;
+ {
+ vec2 origCoord = coord + vec2(2.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[0].w;
+ {
+ vec2 origCoord = coord + vec2(3.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[1].x;
+ {
+ vec2 origCoord = coord + vec2(4.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[1].y;
+ {
+ vec2 origCoord = coord + vec2(5.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[1].z;
+ {
+ vec2 origCoord = coord + vec2(6.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[1].w;
+ {
+ vec2 origCoord = coord + vec2(7.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[2].x;
+ {
+ vec2 origCoord = coord + vec2(8.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[2].y;
+ {
+ vec2 origCoord = coord + vec2(9.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[2].z;
+ {
+ vec2 origCoord = coord + vec2(10.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[2].w;
+ {
+ vec2 origCoord = coord + vec2(11.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[3].x;
+ {
+ vec2 origCoord = coord + vec2(12.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[3].y;
+ {
+ vec2 origCoord = coord + vec2(13.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage2[3].z;
+ {
+ vec2 origCoord = coord + vec2(14.0, 0.0) * uImageIncrement_Stage2;
+ vec2 clampedCoord;
+ clampedCoord = origCoord;
+ vec4 textureColor = texture(uTextureSampler_0_Stage2, clampedCoord);
+ c = textureColor;
+ }
+ sum += c * k;
+ }
+ output_Stage2 = sum * uGain_Stage2 + uBias_Stage2;
+ output_Stage2.w = clamp(output_Stage2.w, 0.0, 1.0);
+ output_Stage2.xyz = clamp(output_Stage2.xyz, 0.0, output_Stage2.w);
+ output_Stage2 *= output_Stage1;
+ }
+ vec4 output_Stage3;
+ {
+ float alpha = 1.0;
+ float edge;
+ edge = dot(uedges_Stage3[0], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage3[1], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage3[2], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage3[3], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage3[4], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ edge = dot(uedges_Stage3[5], vec3(gl_FragCoord.x, gl_FragCoord.y, 1.0));
+ edge = clamp(edge, 0.0, 1.0);
+ alpha *= edge;
+ output_Stage3 = output_Stage2 * alpha;
+ }
+ {
+ sk_FragColor = outputColor_Stage0 * output_Stage3;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+in vec2 inPosition;
+in vec3 inDashParams;
+in vec4 inRect;
+noperspective out vec3 vDashParams_Stage0;
+noperspective out vec4 vRectParams_Stage0;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+void main() {
+ vDashParams_Stage0 = inDashParams;
+ vRectParams_Stage0 = inRect;
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/994-1.shader_test b/shaders/skia/994-1.shader_test
new file mode 100644
index 0000000..0b98d58
--- /dev/null
+++ b/shaders/skia/994-1.shader_test
@@ -0,0 +1,132 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec4 uleftBorderColor_Stage2_c0_c0;
+uniform vec4 urightBorderColor_Stage2_c0_c0;
+uniform vec2 ufocalParams_Stage2_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage2_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage2_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage2_c0_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage2_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_1_Stage0;
+ float t = -1.0;
+ float v = 1.0;
+ {
+ {
+ float x_t = -1.0;
+ {
+ x_t = dot(p, p) / p.x;
+ }
+ {
+ if (x_t <= 0.0) {
+ v = -1.0;
+ }
+ }
+ {
+ {
+ t = x_t;
+ }
+ }
+ {
+ t = 1.0 - t;
+ }
+ }
+ }
+ _output = vec4(t, v, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage2_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ {
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage2_c0_c0_c1_c0;
+ bias = ubias0_1_Stage2_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage2_c0_c0_c1_c0;
+ bias = ubias2_3_Stage2_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage2_c0_c0_c1_c0;
+ bias = ubias4_5_Stage2_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage2_c0_c0_c1_c0;
+ bias = ubias6_7_Stage2_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage2_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage2_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage2_c0_c0;
+ } else {
+ _output = UnrolledBinaryGradientColorizer_Stage2_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_dst_in(output_Stage1, ClampedGradientEffect_Stage2_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/994.shader_test b/shaders/skia/994.shader_test
new file mode 100644
index 0000000..0f5a417
--- /dev/null
+++ b/shaders/skia/994.shader_test
@@ -0,0 +1,185 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_KHR_blend_equation_advanced : require
+out vec4 sk_FragColor;
+layout (blend_support_all_equations) out ;
+uniform vec4 uColor_Stage0;
+uniform vec4 uboundsUniform_Stage1;
+uniform float uxInvZoom_Stage1;
+uniform float uyInvZoom_Stage1;
+uniform float uxInvInset_Stage1;
+uniform float uyInvInset_Stage1;
+uniform vec2 uoffset_Stage1;
+uniform vec4 urectUniform_Stage2;
+uniform vec4 uleftBorderColor_Stage3_c0_c0;
+uniform vec4 urightBorderColor_Stage3_c0_c0;
+uniform float ubias_Stage3_c0_c0_c0_c0;
+uniform float uscale_Stage3_c0_c0_c0_c0;
+uniform vec4 uscale01_Stage3_c0_c0_c1_c0;
+uniform vec4 ubias01_Stage3_c0_c0_c1_c0;
+uniform vec4 uscale23_Stage3_c0_c0_c1_c0;
+uniform vec4 ubias23_Stage3_c0_c0_c1_c0;
+uniform float uthreshold_Stage3_c0_c0_c1_c0;
+uniform float uPixelSize_Stage4;
+uniform vec2 uRange_Stage4;
+uniform vec4 ucolor_Stage5;
+uniform float ucornerRadius_Stage6;
+uniform vec4 uproxyRect_Stage6;
+uniform float ublurRadius_Stage6;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_0_Stage4;
+uniform sampler2D uTextureSampler_0_Stage6;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+vec4 SweepGradientLayout_Stage3_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ float angle;
+ {
+ angle = atan(-vTransformedCoords_1_Stage0.y, -vTransformedCoords_1_Stage0.x);
+ }
+ float t = ((angle * 0.15915493667125702 + 0.5) + ubias_Stage3_c0_c0_c0_c0) * uscale_Stage3_c0_c0_c0_c0;
+ _output = vec4(t, 1.0, 0.0, 0.0);
+ return _output;
+}
+vec4 DualIntervalGradientColorizer_Stage3_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthreshold_Stage3_c0_c0_c1_c0) {
+ scale = uscale01_Stage3_c0_c0_c1_c0;
+ bias = ubias01_Stage3_c0_c0_c1_c0;
+ } else {
+ scale = uscale23_Stage3_c0_c0_c1_c0;
+ bias = ubias23_Stage3_c0_c0_c1_c0;
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 ClampedGradientEffect_Stage3_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = SweepGradientLayout_Stage3_c0_c0_c0_c0(vec4(1.0));
+ if (t.x < 0.0) {
+ _output = uleftBorderColor_Stage3_c0_c0;
+ } else if (t.x > 1.0) {
+ _output = urightBorderColor_Stage3_c0_c0;
+ } else {
+ _output = DualIntervalGradientColorizer_Stage3_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = uColor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec2 coord = vTransformedCoords_0_Stage0;
+ vec2 zoom_coord = uoffset_Stage1 + coord * vec2(uxInvZoom_Stage1, uyInvZoom_Stage1);
+ vec2 delta = (coord - uboundsUniform_Stage1.xy) * uboundsUniform_Stage1.zw;
+ delta = min(delta, vec2(1.0, 1.0) - delta);
+ delta *= vec2(uxInvInset_Stage1, uyInvInset_Stage1);
+ float weight = 0.0;
+ if (delta.x < 2.0 && delta.y < 2.0) {
+ delta = vec2(2.0, 2.0) - delta;
+ float dist = length(delta);
+ dist = max(2.0 - dist, 0.0);
+ weight = min(dist * dist, 1.0);
+ } else {
+ vec2 delta_squared = delta * delta;
+ weight = min(min(delta_squared.x, delta_squared.y), 1.0);
+ }
+ output_Stage1 = texture(uTextureSampler_0_Stage1, mix(coord, zoom_coord, weight));
+ }
+ vec4 output_Stage2;
+ {
+ float alpha;
+ {
+ float xSub, ySub;
+ xSub = min(gl_FragCoord.x - urectUniform_Stage2.x, 0.0);
+ xSub += min(urectUniform_Stage2.z - gl_FragCoord.x, 0.0);
+ ySub = min(gl_FragCoord.y - urectUniform_Stage2.y, 0.0);
+ ySub += min(urectUniform_Stage2.w - gl_FragCoord.y, 0.0);
+ alpha = (1.0 + max(xSub, -1.0)) * (1.0 + max(ySub, -1.0));
+ }
+ output_Stage2 = output_Stage1 * alpha;
+ }
+ vec4 output_Stage3;
+ {
+ output_Stage3 = blend_dst_in(output_Stage2, ClampedGradientEffect_Stage3_c0_c0(vec4(1.0)));
+ }
+ vec4 output_Stage4;
+ {
+ output_Stage4 = vec4(1.0, 1.0, 1.0, 1.0);
+ vec2 coord = vTransformedCoords_2_Stage0;
+ coord.y -= 9.0 * uPixelSize_Stage4;
+ for (int i = 0;i < 19; i++) {
+ output_Stage4 = min(output_Stage4, texture(uTextureSampler_0_Stage4, coord));
+ coord.y += uPixelSize_Stage4;
+ }
+ output_Stage4 *= output_Stage3;
+ }
+ vec4 output_Stage5;
+ {
+ {
+ output_Stage5 = ucolor_Stage5;
+ }
+ }
+ vec4 output_Stage6;
+ {
+ vec2 translatedFragPos = gl_FragCoord.xy - uproxyRect_Stage6.xy;
+ float threshold = ucornerRadius_Stage6 + 2.0 * ublurRadius_Stage6;
+ vec2 middle = (uproxyRect_Stage6.zw - uproxyRect_Stage6.xy) - 2.0 * threshold;
+ if (translatedFragPos.x >= threshold && translatedFragPos.x < middle.x + threshold) {
+ translatedFragPos.x = threshold;
+ } else if (translatedFragPos.x >= middle.x + threshold) {
+ translatedFragPos.x -= middle.x - 1.0;
+ }
+ if (translatedFragPos.y > threshold && translatedFragPos.y < middle.y + threshold) {
+ translatedFragPos.y = threshold;
+ } else if (translatedFragPos.y >= middle.y + threshold) {
+ translatedFragPos.y -= middle.y - 1.0;
+ }
+ vec2 proxyDims = vec2(2.0 * threshold + 1.0);
+ vec2 texCoord = translatedFragPos / proxyDims;
+ output_Stage6 = output_Stage5 * texture(uTextureSampler_0_Stage6, texCoord);
+ }
+ {
+ sk_FragColor = output_Stage6 * outputColor_Stage0;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+in vec2 inPosition;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+void main() {
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/997-1.shader_test b/shaders/skia/997-1.shader_test
new file mode 100644
index 0000000..32a44d1
--- /dev/null
+++ b/shaders/skia/997-1.shader_test
@@ -0,0 +1,140 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+out vec4 sk_FragColor;
+uniform vec2 ufocalParams_Stage2_c0_c0_c0_c0;
+uniform vec4 uscale0_1_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale2_3_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale4_5_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale6_7_Stage2_c0_c0_c1_c0;
+uniform vec4 uscale8_9_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias0_1_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias2_3_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias4_5_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias6_7_Stage2_c0_c0_c1_c0;
+uniform vec4 ubias8_9_Stage2_c0_c0_c1_c0;
+uniform vec4 uthresholds1_7_Stage2_c0_c0_c1_c0;
+uniform vec4 uthresholds9_13_Stage2_c0_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+vec4 TwoPointConicalGradientLayout_Stage2_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 p = vTransformedCoords_1_Stage0;
+ float t = -1.0;
+ float v = 1.0;
+ {
+ {
+ float x_t = -1.0;
+ {
+ x_t = dot(p, p) / p.x;
+ }
+ {
+ if (x_t <= 0.0) {
+ v = -1.0;
+ }
+ }
+ {
+ {
+ t = x_t;
+ }
+ }
+ {
+ t = 1.0 - t;
+ }
+ }
+ }
+ _output = vec4(t, v, 0.0, 0.0);
+ return _output;
+}
+vec4 UnrolledBinaryGradientColorizer_Stage2_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ float t = _input.x;
+ vec4 scale, bias;
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.w) {
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.y) {
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.x) {
+ scale = uscale0_1_Stage2_c0_c0_c1_c0;
+ bias = ubias0_1_Stage2_c0_c0_c1_c0;
+ } else {
+ scale = uscale2_3_Stage2_c0_c0_c1_c0;
+ bias = ubias2_3_Stage2_c0_c0_c1_c0;
+ }
+ } else {
+ if (t < uthresholds1_7_Stage2_c0_c0_c1_c0.z) {
+ scale = uscale4_5_Stage2_c0_c0_c1_c0;
+ bias = ubias4_5_Stage2_c0_c0_c1_c0;
+ } else {
+ scale = uscale6_7_Stage2_c0_c0_c1_c0;
+ bias = ubias6_7_Stage2_c0_c0_c1_c0;
+ }
+ }
+ } else {
+ {
+ {
+ scale = uscale8_9_Stage2_c0_c0_c1_c0;
+ bias = ubias8_9_Stage2_c0_c0_c1_c0;
+ }
+ }
+ }
+ _output = t * scale + bias;
+ return _output;
+}
+vec4 TiledGradientEffect_Stage2_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 t = TwoPointConicalGradientLayout_Stage2_c0_c0_c0_c0(vec4(1.0));
+ if (t.y < 0.0) {
+ _output = vec4(0.0);
+ } else {
+ {
+ float t_1 = t.x - 1.0;
+ float tiled_t = (t_1 - 2.0 * floor(t_1 * 0.5)) - 1.0;
+ t.x = abs(tiled_t);
+ }
+ _output = UnrolledBinaryGradientColorizer_Stage2_c0_c0_c1_c0(t);
+ }
+ {
+ _output.xyz *= _output.w;
+ }
+ return _output;
+}
+vec4 blend_src_in(vec4 src, vec4 dst) {
+ return src * dst.w;
+}
+vec4 blend_dst_in(vec4 src, vec4 dst) {
+ return blend_src_in(dst, src);
+}
+void main() {
+ vec4 output_Stage1;
+ {
+ output_Stage1 = texture(uTextureSampler_0_Stage1, vTransformedCoords_0_Stage0);
+ }
+ vec4 output_Stage2;
+ {
+ output_Stage2 = blend_dst_in(output_Stage1, TiledGradientEffect_Stage2_c0_c0(vec4(1.0)));
+ }
+ {
+ sk_FragColor = output_Stage2;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+in vec2 position;
+in vec2 localCoord;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+void main() {
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(localCoord, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(localCoord, 1.0)).xy;
+ gl_Position = vec4(position.x, position.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+
diff --git a/shaders/skia/997.shader_test b/shaders/skia/997.shader_test
new file mode 100644
index 0000000..7286a97
--- /dev/null
+++ b/shaders/skia/997.shader_test
@@ -0,0 +1,650 @@
+[require]
+GLSL >= 1.40
+
+[fragment shader]
+#version 140
+
+#extension GL_KHR_blend_equation_advanced : require
+#extension GL_ARB_fragment_coord_conventions : require
+layout(origin_upper_left) in vec4 gl_FragCoord;
+out vec4 sk_FragColor;
+layout (blend_support_all_equations) out ;
+uniform vec4 uColor_Stage0;
+uniform vec4 uellipse_Stage1_c0_c0_c0_c0_c0_c0;
+uniform vec2 uImageIncrement_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 uKernel_Stage1_c0_c0_c0_c0_c1_c0[4];
+uniform vec2 uKernelOffset_Stage1_c0_c0_c0_c0_c1_c0;
+uniform float uGain_Stage1_c0_c0_c0_c0_c1_c0;
+uniform float uBias_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 uTexDom_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec3 uDecalParams_Stage1_c0_c0_c0_c0_c1_c0;
+uniform vec4 ucolor0_Stage1_c0_c0_c1_c0_c1_c0;
+uniform vec4 ucolor1_Stage1_c0_c0_c1_c0_c1_c0;
+uniform vec4 ucolor2_Stage1_c0_c0_c1_c0_c1_c0;
+uniform vec4 ucolor3_Stage1_c0_c0_c1_c0_c1_c0;
+uniform vec4 ucolor4_Stage1_c0_c0_c1_c0_c1_c0;
+uniform vec4 ucolor5_Stage1_c0_c0_c1_c0_c1_c0;
+uniform vec4 uinnerRect_Stage1_c1_c0_c0_c0_c0_c0;
+uniform vec2 uradiusPlusHalf_Stage1_c1_c0_c0_c0_c0_c0;
+uniform float ucornerRadius_Stage1_c1_c0_c0_c0_c1_c0;
+uniform vec4 uproxyRect_Stage1_c1_c0_c0_c0_c1_c0;
+uniform float ublurRadius_Stage1_c1_c0_c0_c0_c1_c0;
+uniform vec2 uImageIncrement_Stage1_c1_c0_c1_c0_c0_c0;
+uniform float uSurfaceScale_Stage1_c1_c0_c1_c0_c0_c0;
+uniform vec3 uLightColor_Stage1_c1_c0_c1_c0_c0_c0;
+uniform float uKS_Stage1_c1_c0_c1_c0_c0_c0;
+uniform float uShininess_Stage1_c1_c0_c1_c0_c0_c0;
+uniform vec4 uTexDom_Stage1_c1_c0_c1_c0_c0_c0;
+uniform vec3 uDecalParams_Stage1_c1_c0_c1_c0_c0_c0;
+uniform vec3 uLightDirection_Stage1_c1_c0_c1_c0_c0_c0;
+uniform vec4 uinnerRect_Stage1_c1_c0_c1_c0_c1_c0;
+uniform vec2 uradiusPlusHalf_Stage1_c1_c0_c1_c0_c1_c0;
+uniform sampler2D uTextureSampler_0_Stage1;
+uniform sampler2D uTextureSampler_1_Stage1;
+uniform sampler2D uTextureSampler_2_Stage1;
+noperspective in vec2 vTransformedCoords_0_Stage0;
+noperspective in vec2 vTransformedCoords_1_Stage0;
+noperspective in vec2 vTransformedCoords_2_Stage0;
+vec4 EllipseEffect_Stage1_c0_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 d = gl_FragCoord.xy - uellipse_Stage1_c0_c0_c0_c0_c0_c0.xy;
+ vec2 Z = d * uellipse_Stage1_c0_c0_c0_c0_c0_c0.zw;
+ float implicit = dot(Z, d) - 1.0;
+ float grad_dot = 4.0 * dot(Z, Z);
+ {
+ grad_dot = max(grad_dot, 1.1754999560161448e-38);
+ }
+ float approx_dist = implicit * inversesqrt(grad_dot);
+ float alpha;
+ {
+ alpha = clamp(0.5 - approx_dist, 0.0, 1.0);
+ }
+ _output = _input * alpha;
+ return _output;
+}
+vec4 MatrixConvolution_Stage1_c0_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 sum = vec4(0.0, 0.0, 0.0, 0.0);
+ vec2 coord = vTransformedCoords_0_Stage0 - uKernelOffset_Stage1_c0_c0_c0_c0_c1_c0 * uImageIncrement_Stage1_c0_c0_c0_c0_c1_c0;
+ vec4 c;
+ {
+ float k = uKernel_Stage1_c0_c0_c0_c0_c1_c0[0].x;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0_c1_c0.xy, uTexDom_Stage1_c0_c0_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c0_c0_c1_c0[0].y;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1_c0_c0_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0_c1_c0.xy, uTexDom_Stage1_c0_c0_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c0_c0_c1_c0[0].z;
+ {
+ vec2 origCoord = coord + vec2(2.0, 0.0) * uImageIncrement_Stage1_c0_c0_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0_c1_c0.xy, uTexDom_Stage1_c0_c0_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c0_c0_c1_c0[0].w;
+ {
+ vec2 origCoord = coord + vec2(3.0, 0.0) * uImageIncrement_Stage1_c0_c0_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0_c1_c0.xy, uTexDom_Stage1_c0_c0_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c0_c0_c1_c0[1].x;
+ {
+ vec2 origCoord = coord + vec2(4.0, 0.0) * uImageIncrement_Stage1_c0_c0_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0_c1_c0.xy, uTexDom_Stage1_c0_c0_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c0_c0_c1_c0[1].y;
+ {
+ vec2 origCoord = coord + vec2(5.0, 0.0) * uImageIncrement_Stage1_c0_c0_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0_c1_c0.xy, uTexDom_Stage1_c0_c0_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c0_c0_c1_c0[1].z;
+ {
+ vec2 origCoord = coord + vec2(6.0, 0.0) * uImageIncrement_Stage1_c0_c0_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0_c1_c0.xy, uTexDom_Stage1_c0_c0_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c0_c0_c1_c0[1].w;
+ {
+ vec2 origCoord = coord + vec2(7.0, 0.0) * uImageIncrement_Stage1_c0_c0_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0_c1_c0.xy, uTexDom_Stage1_c0_c0_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c0_c0_c1_c0[2].x;
+ {
+ vec2 origCoord = coord + vec2(8.0, 0.0) * uImageIncrement_Stage1_c0_c0_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0_c1_c0.xy, uTexDom_Stage1_c0_c0_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c0_c0_c1_c0[2].y;
+ {
+ vec2 origCoord = coord + vec2(9.0, 0.0) * uImageIncrement_Stage1_c0_c0_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0_c1_c0.xy, uTexDom_Stage1_c0_c0_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c0_c0_c1_c0[2].z;
+ {
+ vec2 origCoord = coord + vec2(10.0, 0.0) * uImageIncrement_Stage1_c0_c0_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0_c1_c0.xy, uTexDom_Stage1_c0_c0_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c0_c0_c1_c0[2].w;
+ {
+ vec2 origCoord = coord + vec2(11.0, 0.0) * uImageIncrement_Stage1_c0_c0_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0_c1_c0.xy, uTexDom_Stage1_c0_c0_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c0_c0_c1_c0[3].x;
+ {
+ vec2 origCoord = coord + vec2(12.0, 0.0) * uImageIncrement_Stage1_c0_c0_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0_c1_c0.xy, uTexDom_Stage1_c0_c0_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c0_c0_c1_c0[3].y;
+ {
+ vec2 origCoord = coord + vec2(13.0, 0.0) * uImageIncrement_Stage1_c0_c0_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0_c1_c0.xy, uTexDom_Stage1_c0_c0_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ {
+ float k = uKernel_Stage1_c0_c0_c0_c0_c1_c0[3].z;
+ {
+ vec2 origCoord = coord + vec2(14.0, 0.0) * uImageIncrement_Stage1_c0_c0_c0_c0_c1_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c0_c0_c0_c0_c1_c0.xy, uTexDom_Stage1_c0_c0_c0_c0_c1_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_0_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.y);
+ if (err > uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c0_c0_c0_c0_c1_c0.z < 1.0) {
+ err = 0.0;
+ }
+ c = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ sum += c * k;
+ }
+ _output = sum * uGain_Stage1_c0_c0_c0_c0_c1_c0 + uBias_Stage1_c0_c0_c0_c0_c1_c0;
+ _output.w = clamp(_output.w, 0.0, 1.0);
+ _output.xyz = clamp(_output.xyz, 0.0, _output.w);
+ _output *= _input;
+ return _output;
+}
+vec4 blend_src_over(vec4 src, vec4 dst) {
+ return src + (1.0 - src.w) * dst;
+}
+vec4 blend_darken(vec4 src, vec4 dst) {
+ vec4 result = blend_src_over(src, dst);
+ result.xyz = min(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
+ return result;
+}
+vec4 ComposeTwo_Stage1_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_darken(EllipseEffect_Stage1_c0_c0_c0_c0_c0_c0(inputColor), MatrixConvolution_Stage1_c0_c0_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 Big_Ole_Key_Stage1_c0_c0_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ _output = _input;
+ return _output;
+}
+vec4 Overdraw_Stage1_c0_c0_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ _output = _input;
+ float alpha = 255.0 * _output.w;
+ if (alpha < 0.5) {
+ _output = ucolor0_Stage1_c0_c0_c1_c0_c1_c0;
+ } else if (alpha < 1.5) {
+ _output = ucolor1_Stage1_c0_c0_c1_c0_c1_c0;
+ } else if (alpha < 2.5) {
+ _output = ucolor2_Stage1_c0_c0_c1_c0_c1_c0;
+ } else if (alpha < 3.5) {
+ _output = ucolor3_Stage1_c0_c0_c1_c0_c1_c0;
+ } else if (alpha < 4.5) {
+ _output = ucolor4_Stage1_c0_c0_c1_c0_c1_c0;
+ } else {
+ _output = ucolor5_Stage1_c0_c0_c1_c0_c1_c0;
+ }
+ return _output;
+}
+vec4 ComposeTwo_Stage1_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_darken(Big_Ole_Key_Stage1_c0_c0_c1_c0_c0_c0(inputColor), Overdraw_Stage1_c0_c0_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 blend_dst_atop(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src + src.w * dst;
+}
+vec4 ComposeTwo_Stage1_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_dst_atop(ComposeTwo_Stage1_c0_c0_c0_c0(inputColor), ComposeTwo_Stage1_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 CircularRRect_Stage1_c1_c0_c0_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 dxy0 = uinnerRect_Stage1_c1_c0_c0_c0_c0_c0.xy - gl_FragCoord.xy;
+ vec2 dxy1 = gl_FragCoord.xy - uinnerRect_Stage1_c1_c0_c0_c0_c0_c0.zw;
+ vec2 dxy = max(max(dxy0, dxy1), 0.0);
+ float alpha = clamp(uradiusPlusHalf_Stage1_c1_c0_c0_c0_c0_c0.x - length(dxy), 0.0, 1.0);
+ _output = _input * alpha;
+ return _output;
+}
+vec4 RRectBlurEffect_Stage1_c1_c0_c0_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 translatedFragPos = gl_FragCoord.xy - uproxyRect_Stage1_c1_c0_c0_c0_c1_c0.xy;
+ float threshold = ucornerRadius_Stage1_c1_c0_c0_c0_c1_c0 + 2.0 * ublurRadius_Stage1_c1_c0_c0_c0_c1_c0;
+ vec2 middle = (uproxyRect_Stage1_c1_c0_c0_c0_c1_c0.zw - uproxyRect_Stage1_c1_c0_c0_c0_c1_c0.xy) - 2.0 * threshold;
+ if (translatedFragPos.x >= threshold && translatedFragPos.x < middle.x + threshold) {
+ translatedFragPos.x = threshold;
+ } else if (translatedFragPos.x >= middle.x + threshold) {
+ translatedFragPos.x -= middle.x - 1.0;
+ }
+ if (translatedFragPos.y > threshold && translatedFragPos.y < middle.y + threshold) {
+ translatedFragPos.y = threshold;
+ } else if (translatedFragPos.y >= middle.y + threshold) {
+ translatedFragPos.y -= middle.y - 1.0;
+ }
+ vec2 proxyDims = vec2(2.0 * threshold + 1.0);
+ vec2 texCoord = translatedFragPos / proxyDims;
+ _output = _input * texture(uTextureSampler_1_Stage1, texCoord);
+ return _output;
+}
+vec4 blend_dst_over(vec4 src, vec4 dst) {
+ return (1.0 - dst.w) * src + dst;
+}
+vec4 ComposeTwo_Stage1_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_dst_over(CircularRRect_Stage1_c1_c0_c0_c0_c0_c0(inputColor), RRectBlurEffect_Stage1_c1_c0_c0_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 light_Stage1_c1_c0_c1_c0_c0_c0(vec3 normal, vec3 surfaceToLight, vec3 lightColor) {
+ vec3 halfDir = normalize(surfaceToLight + vec3(0.0, 0.0, 1.0));
+ float colorScale = uKS_Stage1_c1_c0_c1_c0_c0_c0 * pow(dot(normal, halfDir), uShininess_Stage1_c1_c0_c1_c0_c0_c0);
+ vec3 color = lightColor * clamp(colorScale, 0.0, 1.0);
+ return vec4(color, max(max(color.x, color.y), color.z));
+}
+float sobel_Stage1_c1_c0_c1_c0_c0_c0(float a, float b, float c, float d, float e, float f, float scale) {
+ return (((((-a + b) - 2.0 * c) + 2.0 * d) - e) + f) * scale;
+}
+vec3 pointToNormal_Stage1_c1_c0_c1_c0_c0_c0(float x, float y, float scale) {
+ return normalize(vec3(-x * scale, -y * scale, 1.0));
+}
+vec3 normal_Stage1_c1_c0_c1_c0_c0_c0(float m[9], float surfaceScale) {
+ return pointToNormal_Stage1_c1_c0_c1_c0_c0_c0(sobel_Stage1_c1_c0_c1_c0_c0_c0(0.0, 0.0, m[3], m[4], m[6], m[7], 0.66666698455810547), sobel_Stage1_c1_c0_c1_c0_c0_c0(m[3], m[6], m[4], m[7], 0.0, 0.0, 0.66666698455810547), surfaceScale);
+}
+vec4 SpecularLighting_Stage1_c1_c0_c1_c0_c0_c0(vec4 _input) {
+ vec4 _output;
+ vec2 coord = vTransformedCoords_2_Stage0;
+ float m[9];
+ vec4 temp0;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 1.0) * uImageIncrement_Stage1_c1_c0_c1_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c1_c0_c0_c0.xy, uTexDom_Stage1_c1_c0_c1_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c1_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c1_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c1_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c1_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp0 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[0] = temp0.w;
+ vec4 temp1;
+ {
+ vec2 origCoord = coord + vec2(0.0, 1.0) * uImageIncrement_Stage1_c1_c0_c1_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c1_c0_c0_c0.xy, uTexDom_Stage1_c1_c0_c1_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c1_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c1_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c1_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c1_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp1 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[1] = temp1.w;
+ vec4 temp2;
+ {
+ vec2 origCoord = coord + uImageIncrement_Stage1_c1_c0_c1_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c1_c0_c0_c0.xy, uTexDom_Stage1_c1_c0_c1_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c1_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c1_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c1_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c1_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp2 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[2] = temp2.w;
+ vec4 temp3;
+ {
+ vec2 origCoord = coord + vec2(-1.0, 0.0) * uImageIncrement_Stage1_c1_c0_c1_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c1_c0_c0_c0.xy, uTexDom_Stage1_c1_c0_c1_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c1_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c1_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c1_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c1_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp3 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[3] = temp3.w;
+ vec4 temp4;
+ {
+ vec2 origCoord = coord;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c1_c0_c0_c0.xy, uTexDom_Stage1_c1_c0_c1_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c1_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c1_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c1_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c1_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp4 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[4] = temp4.w;
+ vec4 temp5;
+ {
+ vec2 origCoord = coord + vec2(1.0, 0.0) * uImageIncrement_Stage1_c1_c0_c1_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c1_c0_c0_c0.xy, uTexDom_Stage1_c1_c0_c1_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c1_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c1_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c1_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c1_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp5 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[5] = temp5.w;
+ vec4 temp6;
+ {
+ vec2 origCoord = coord + vec2(-1.0, -1.0) * uImageIncrement_Stage1_c1_c0_c1_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c1_c0_c0_c0.xy, uTexDom_Stage1_c1_c0_c1_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c1_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c1_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c1_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c1_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp6 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[6] = temp6.w;
+ vec4 temp7;
+ {
+ vec2 origCoord = coord + vec2(0.0, -1.0) * uImageIncrement_Stage1_c1_c0_c1_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c1_c0_c0_c0.xy, uTexDom_Stage1_c1_c0_c1_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c1_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c1_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c1_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c1_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp7 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[7] = temp7.w;
+ vec4 temp8;
+ {
+ vec2 origCoord = coord + vec2(1.0, -1.0) * uImageIncrement_Stage1_c1_c0_c1_c0_c0_c0;
+ vec2 clampedCoord;
+ clampedCoord = clamp(origCoord, uTexDom_Stage1_c1_c0_c1_c0_c0_c0.xy, uTexDom_Stage1_c1_c0_c1_c0_c0_c0.zw);
+ vec4 textureColor = texture(uTextureSampler_2_Stage1, clampedCoord);
+ float err = max(abs(clampedCoord.x - origCoord.x) * uDecalParams_Stage1_c1_c0_c1_c0_c0_c0.x, abs(clampedCoord.y - origCoord.y) * uDecalParams_Stage1_c1_c0_c1_c0_c0_c0.y);
+ if (err > uDecalParams_Stage1_c1_c0_c1_c0_c0_c0.z) {
+ err = 1.0;
+ } else if (uDecalParams_Stage1_c1_c0_c1_c0_c0_c0.z < 1.0) {
+ err = 0.0;
+ }
+ temp8 = mix(textureColor, vec4(0.0, 0.0, 0.0, 0.0), err);
+ }
+ m[8] = temp8.w;
+ vec3 surfaceToLight = uLightDirection_Stage1_c1_c0_c1_c0_c0_c0;
+ _output = light_Stage1_c1_c0_c1_c0_c0_c0(normal_Stage1_c1_c0_c1_c0_c0_c0(m, uSurfaceScale_Stage1_c1_c0_c1_c0_c0_c0), surfaceToLight, uLightColor_Stage1_c1_c0_c1_c0_c0_c0);
+ _output *= _input;
+ return _output;
+}
+vec4 CircularRRect_Stage1_c1_c0_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec2 dxy0 = uinnerRect_Stage1_c1_c0_c1_c0_c1_c0.xy - gl_FragCoord.xy;
+ vec2 dxy1 = gl_FragCoord.xy - uinnerRect_Stage1_c1_c0_c1_c0_c1_c0.zw;
+ vec2 dxy = max(max(dxy0, dxy1), 0.0);
+ float alpha = clamp(uradiusPlusHalf_Stage1_c1_c0_c1_c0_c1_c0.x - length(dxy), 0.0, 1.0);
+ alpha = 1.0 - alpha;
+ _output = _input * alpha;
+ return _output;
+}
+vec4 blend_exclusion(vec4 src, vec4 dst) {
+ return vec4((dst.xyz + src.xyz) - (2.0 * dst.xyz) * src.xyz, src.w + (1.0 - src.w) * dst.w);
+}
+vec4 ComposeTwo_Stage1_c1_c0_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_exclusion(SpecularLighting_Stage1_c1_c0_c1_c0_c0_c0(inputColor), CircularRRect_Stage1_c1_c0_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 ComposeTwo_Stage1_c1_c0(vec4 _input) {
+ vec4 _output;
+ vec4 inputColor = vec4(_input.xyz, 1.0);
+ _output = blend_dst_over(ComposeTwo_Stage1_c1_c0_c0_c0(inputColor), ComposeTwo_Stage1_c1_c0_c1_c0(inputColor));
+ _output *= _input.w;
+ return _output;
+}
+vec4 blend_modulate(vec4 src, vec4 dst) {
+ return src * dst;
+}
+void main() {
+ vec4 outputColor_Stage0;
+ {
+ outputColor_Stage0 = uColor_Stage0;
+ }
+ vec4 output_Stage1;
+ {
+ vec4 inputColor = vec4(outputColor_Stage0.xyz, 1.0);
+ output_Stage1 = blend_modulate(ComposeTwo_Stage1_c0_c0(inputColor), ComposeTwo_Stage1_c1_c0(inputColor));
+ output_Stage1 *= outputColor_Stage0.w;
+ }
+ {
+ sk_FragColor = output_Stage1;
+ }
+}
+
+[vertex shader]
+#version 140
+
+uniform vec4 sk_RTAdjust;
+uniform mat3 uCoordTransformMatrix_0_Stage0;
+uniform mat3 uCoordTransformMatrix_1_Stage0;
+uniform mat3 uCoordTransformMatrix_2_Stage0;
+in vec2 inPosition;
+noperspective out vec2 vTransformedCoords_0_Stage0;
+noperspective out vec2 vTransformedCoords_1_Stage0;
+noperspective out vec2 vTransformedCoords_2_Stage0;
+void main() {
+ vec2 pos2 = inPosition;
+ vTransformedCoords_0_Stage0 = (uCoordTransformMatrix_0_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_1_Stage0 = (uCoordTransformMatrix_1_Stage0 * vec3(inPosition, 1.0)).xy;
+ vTransformedCoords_2_Stage0 = (uCoordTransformMatrix_2_Stage0 * vec3(inPosition, 1.0)).xy;
+ gl_Position = vec4(pos2.x, pos2.y, 0.0, 1.0);
+ gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
+}
+